45.9 MB
/srv/reproducible-results/rbuild-debian/r-b-build.Wg6ETuAz/b1/erlang_27.0.1+dfsg-3_armhf.changes vs.
/srv/reproducible-results/rbuild-debian/r-b-build.Wg6ETuAz/b2/erlang_27.0.1+dfsg-3_armhf.changes
8.73 KB
Files
    
Offset 1, 50 lines modifiedOffset 1, 50 lines modified
  
1 ·b9221c20fc6f4b2386847cbf914d23b4·20868·debug·optional·erlang-asn1-dbgsym_27.0.1+dfsg-3_armhf.deb1 ·b9221c20fc6f4b2386847cbf914d23b4·20868·debug·optional·erlang-asn1-dbgsym_27.0.1+dfsg-3_armhf.deb
2 ·122d649fbb280912d07e19dd41a39b86·889484·interpreters·optional·erlang-asn1_27.0.1+dfsg-3_armhf.deb2 ·09bd1533547874c936406975d0c02644·889500·interpreters·optional·erlang-asn1_27.0.1+dfsg-3_armhf.deb
3 ·4fac7b8c9750ac51cea43433edcb467f·7304824·debug·optional·erlang-base-dbgsym_27.0.1+dfsg-3_armhf.deb3 ·4fac7b8c9750ac51cea43433edcb467f·7304824·debug·optional·erlang-base-dbgsym_27.0.1+dfsg-3_armhf.deb
4 ·d60e81ac2dea715d2150b0e28a9ee19d·10774996·interpreters·optional·erlang-base_27.0.1+dfsg-3_armhf.deb4 ·45ec01e7662b7c9e86714972d2ab5d41·10775012·interpreters·optional·erlang-base_27.0.1+dfsg-3_armhf.deb
5 ·5fb359b9836c2462ddd79c9587091dd3·41496·debug·optional·erlang-common-test-dbgsym_27.0.1+dfsg-3_armhf.deb5 ·5fb359b9836c2462ddd79c9587091dd3·41496·debug·optional·erlang-common-test-dbgsym_27.0.1+dfsg-3_armhf.deb
6 ·b042ae38a0ef51592be46911cef53939·1306716·interpreters·optional·erlang-common-test_27.0.1+dfsg-3_armhf.deb6 ·26bef994f49cc8c59d8e0b7a06949cd8·1306728·interpreters·optional·erlang-common-test_27.0.1+dfsg-3_armhf.deb
7 ·732b45ee8011dd06ac389078852fa44c·120856·debug·optional·erlang-crypto-dbgsym_27.0.1+dfsg-3_armhf.deb7 ·732b45ee8011dd06ac389078852fa44c·120856·debug·optional·erlang-crypto-dbgsym_27.0.1+dfsg-3_armhf.deb
8 ·92d0e7e2ad8364d8fd360735bece7d6a·174780·interpreters·optional·erlang-crypto_27.0.1+dfsg-3_armhf.deb8 ·9d31562fec437b3fc763b725152bf884·174808·interpreters·optional·erlang-crypto_27.0.1+dfsg-3_armhf.deb
9 ·5524d5c70ae5387a6d0a20afb433ea35·478696·interpreters·optional·erlang-debugger_27.0.1+dfsg-3_armhf.deb9 ·a5895ba17151d708f2c1721086c4a695·478716·interpreters·optional·erlang-debugger_27.0.1+dfsg-3_armhf.deb
10 ·a8d68d1d9af07f48daaf168879afa7d2·287260·interpreters·optional·erlang-dev_27.0.1+dfsg-3_armhf.deb10 ·b3879c2c6e8f07b041eeb537206bec4f·287320·interpreters·optional·erlang-dev_27.0.1+dfsg-3_armhf.deb
11 ·693c58cf419f83071eefb7750459ef13·78580·debug·optional·erlang-dialyzer-dbgsym_27.0.1+dfsg-3_armhf.deb11 ·693c58cf419f83071eefb7750459ef13·78580·debug·optional·erlang-dialyzer-dbgsym_27.0.1+dfsg-3_armhf.deb
12 ·b7f046acb0ac55ed7e7fbf941ecaf3b0·1073540·interpreters·optional·erlang-dialyzer_27.0.1+dfsg-3_armhf.deb12 ·c202e2de53a27848f161169e8eb783d8·1073552·interpreters·optional·erlang-dialyzer_27.0.1+dfsg-3_armhf.deb
13 ·96cb700cae5b07fbacaf4902aa162bfe·809056·interpreters·optional·erlang-diameter_27.0.1+dfsg-3_armhf.deb13 ·7581930bbc2cf978c089aafd0fad75b1·809080·interpreters·optional·erlang-diameter_27.0.1+dfsg-3_armhf.deb
14 ·0e51428b9691f248d4b3937c6ac0e1e1·16570916·doc·optional·erlang-doc_27.0.1+dfsg-3_all.deb14 ·a5108d2c0b5d71aa2da6deba047dbcb6·16576016·doc·optional·erlang-doc_27.0.1+dfsg-3_all.deb
15 ·9baf578db7de3506afacd74020282005·459264·interpreters·optional·erlang-edoc_27.0.1+dfsg-3_armhf.deb15 ·771867d62b0ef8a1a14a20c87d6d1400·459292·interpreters·optional·erlang-edoc_27.0.1+dfsg-3_armhf.deb
16 ·271ce11df2f6a26acb09b887ec0739fc·137632·interpreters·optional·erlang-eldap_27.0.1+dfsg-3_armhf.deb16 ·329c436df6b6e028b1307310e1054a9d·137660·interpreters·optional·erlang-eldap_27.0.1+dfsg-3_armhf.deb
17 ·6ac37e0097a919c52d30833e688d6594·185196·interpreters·optional·erlang-et_27.0.1+dfsg-3_armhf.deb 
18 ·9fd727e5f52246f037c6db2c0609626b·171420·interpreters·optional·erlang-eunit_27.0.1+dfsg-3_armhf.deb 
19 ·18e19557e81695aaf95ad017a15245e5·963300·interpreters·optional·erlang-examples_27.0.1+dfsg-3_all.deb 
20 ·50a5e9d8d7ab67d36ae34834ab3e2ecd·105608·interpreters·optional·erlang-ftp_27.0.1+dfsg-3_armhf.deb 
21 ·06d8c8e1becaf9eec1d1f78686e87633·667664·interpreters·optional·erlang-inets_27.0.1+dfsg-3_armhf.deb17 ·df5d3bdc9c74b803855cd1100aca2c4f·185212·interpreters·optional·erlang-et_27.0.1+dfsg-3_armhf.deb
 18 ·c5ad16a042184295c7b506c3bb7c7cad·171448·interpreters·optional·erlang-eunit_27.0.1+dfsg-3_armhf.deb
 19 ·94906edcc16f720caa7fd60e81cc4ddd·963316·interpreters·optional·erlang-examples_27.0.1+dfsg-3_all.deb
 20 ·724beb658f1a4704e32bee7e850f7e1f·105632·interpreters·optional·erlang-ftp_27.0.1+dfsg-3_armhf.deb
 21 ·74e1bb1a7edff3d7d0f53cbbf3fc8444·667680·interpreters·optional·erlang-inets_27.0.1+dfsg-3_armhf.deb
22 ·4c0850390741d3fd168847372d4c2c2c·113252·interpreters·optional·erlang-jinterface_27.0.1+dfsg-3_all.deb22 ·34477ab28db62cb2b49490ad4c20656c·113236·interpreters·optional·erlang-jinterface_27.0.1+dfsg-3_all.deb
23 ·90da1e2c85253e8b9175908cb662fbdf·64808·debug·optional·erlang-megaco-dbgsym_27.0.1+dfsg-3_armhf.deb23 ·90da1e2c85253e8b9175908cb662fbdf·64808·debug·optional·erlang-megaco-dbgsym_27.0.1+dfsg-3_armhf.deb
24 ·d193fb574b9808431b12beab2d58188d·3686656·interpreters·optional·erlang-megaco_27.0.1+dfsg-3_armhf.deb24 ·d4f3c11c5ccb215571b26ada65fde89e·3686680·interpreters·optional·erlang-megaco_27.0.1+dfsg-3_armhf.deb
25 ·be444d585e46956d824094e1ed867a50·897752·interpreters·optional·erlang-mnesia_27.0.1+dfsg-3_armhf.deb25 ·6430c2191aa676d533fc5edb4eefddc9·897780·interpreters·optional·erlang-mnesia_27.0.1+dfsg-3_armhf.deb
26 ·2135a2ab7f4931c882f971c48542bd6d·92804·interpreters·optional·erlang-mode_27.0.1+dfsg-3_all.deb26 ·abb4a4831715d83e0bc13525ddcb7388·92844·interpreters·optional·erlang-mode_27.0.1+dfsg-3_all.deb
27 ·890fa2b1778306bf0d92a36640bbd8fd·14512·interpreters·optional·erlang-nox_27.0.1+dfsg-3_all.deb27 ·a667c30ba36b76b0788b3a60c70feec9·14532·interpreters·optional·erlang-nox_27.0.1+dfsg-3_all.deb
28 ·7f3e9772658a68efa47521f93bfc58f2·1027812·interpreters·optional·erlang-observer_27.0.1+dfsg-3_armhf.deb28 ·9e54d3c9fe3dcfaa41b95faea565ef8b·1027836·interpreters·optional·erlang-observer_27.0.1+dfsg-3_armhf.deb
29 ·e352ab1f2e19275ba6f2f9a96892eeba·59716·debug·optional·erlang-odbc-dbgsym_27.0.1+dfsg-3_armhf.deb29 ·e352ab1f2e19275ba6f2f9a96892eeba·59716·debug·optional·erlang-odbc-dbgsym_27.0.1+dfsg-3_armhf.deb
30 ·0a1f3e7c54fd88433e8a8612cb954820·63992·interpreters·optional·erlang-odbc_27.0.1+dfsg-3_armhf.deb30 ·3603aa0f8c9b479d1bf3cfaac8fd8ac0·64004·interpreters·optional·erlang-odbc_27.0.1+dfsg-3_armhf.deb
31 ·2a3b859be4942a2eb94801475dcc516e·18484·debug·optional·erlang-os-mon-dbgsym_27.0.1+dfsg-3_armhf.deb31 ·2a3b859be4942a2eb94801475dcc516e·18484·debug·optional·erlang-os-mon-dbgsym_27.0.1+dfsg-3_armhf.deb
32 ·7032d3318347c81118c071ff4c3f4e9a·111144·interpreters·optional·erlang-os-mon_27.0.1+dfsg-3_armhf.deb 
33 ·dbc0fbc603ab193d8c947d5a48d5b562·210576·interpreters·optional·erlang-parsetools_27.0.1+dfsg-3_armhf.deb 
34 ·50f71166bbe11bbd71b1eccfca126301·777900·interpreters·optional·erlang-public-key_27.0.1+dfsg-3_armhf.deb 
35 ·82b4b5b00a942d08746a1466d3336eec·384164·interpreters·optional·erlang-reltool_27.0.1+dfsg-3_armhf.deb32 ·d6cf371d7d8f5c48c598ca485bcd6055·111172·interpreters·optional·erlang-os-mon_27.0.1+dfsg-3_armhf.deb
 33 ·46a7d2a6633ea54657ffa69e539b9298·210600·interpreters·optional·erlang-parsetools_27.0.1+dfsg-3_armhf.deb
 34 ·05d97c4dd56f54650c8208ed7bdb9379·777920·interpreters·optional·erlang-public-key_27.0.1+dfsg-3_armhf.deb
 35 ·6268a8d89e04f20fdc21e0e105c51368·384184·interpreters·optional·erlang-reltool_27.0.1+dfsg-3_armhf.deb
36 ·e05a12a3633a6f14ffd41a6c1ca358b8·25460·debug·optional·erlang-runtime-tools-dbgsym_27.0.1+dfsg-3_armhf.deb36 ·e05a12a3633a6f14ffd41a6c1ca358b8·25460·debug·optional·erlang-runtime-tools-dbgsym_27.0.1+dfsg-3_armhf.deb
37 ·5b7683a39434f97b16b3c5d1917df8f8·242836·interpreters·optional·erlang-runtime-tools_27.0.1+dfsg-3_armhf.deb37 ·24190b3c9d18f0f32238c5470fc8f500·242848·interpreters·optional·erlang-runtime-tools_27.0.1+dfsg-3_armhf.deb
38 ·f98adace7f756e82d659b067b4126592·1950512·interpreters·optional·erlang-snmp_27.0.1+dfsg-3_armhf.deb38 ·ad942728a257ac863e1ee8328beed965·1950540·interpreters·optional·erlang-snmp_27.0.1+dfsg-3_armhf.deb
39 ·0c6e47ffe5648804f75f41235b9c3215·6110640·interpreters·optional·erlang-src_27.0.1+dfsg-3_all.deb 
40 ·345d9bbebba67c40c0c4f1b58aaa568a·1004264·interpreters·optional·erlang-ssh_27.0.1+dfsg-3_armhf.deb39 ·373e4c50c0fa6d388e2fc4a79be8cc05·6110664·interpreters·optional·erlang-src_27.0.1+dfsg-3_all.deb
 40 ·e144a48b2d3a98d01ee596e9e145a85c·1004080·interpreters·optional·erlang-ssh_27.0.1+dfsg-3_armhf.deb
41 ·ae49692ac53a836eeba4c395bdf35b6d·1793536·interpreters·optional·erlang-ssl_27.0.1+dfsg-3_armhf.deb41 ·a89ef30d65451c65565483071b04edcf·1793548·interpreters·optional·erlang-ssl_27.0.1+dfsg-3_armhf.deb
42 ·4cf5c006a359859c0f4945fb34f52134·337616·interpreters·optional·erlang-syntax-tools_27.0.1+dfsg-3_armhf.deb 
43 ·75b39c93dd090fb93df7e245e673158b·113156·interpreters·optional·erlang-tftp_27.0.1+dfsg-3_armhf.deb42 ·faa17e058e36298d2d9e481fc53cf2a9·337628·interpreters·optional·erlang-syntax-tools_27.0.1+dfsg-3_armhf.deb
 43 ·8a77bbbde62eec061e6e921c9b6c716c·113184·interpreters·optional·erlang-tftp_27.0.1+dfsg-3_armhf.deb
44 ·51ba5f2d850806d943d45b32f69b1aef·620812·interpreters·optional·erlang-tools_27.0.1+dfsg-3_armhf.deb44 ·e3b38be9569fa2679b1d396cce65263d·620832·interpreters·optional·erlang-tools_27.0.1+dfsg-3_armhf.deb
45 ·ca8b5555b1b5dfc81a70b32268261b3c·5183488·debug·optional·erlang-wx-dbgsym_27.0.1+dfsg-3_armhf.deb45 ·ca8b5555b1b5dfc81a70b32268261b3c·5183488·debug·optional·erlang-wx-dbgsym_27.0.1+dfsg-3_armhf.deb
46 ·0cf9f40c599b9d762af76ddd0b3ff08f·4424116·interpreters·optional·erlang-wx_27.0.1+dfsg-3_armhf.deb46 ·cfca49f4844ad67c52872ecc4037ce30·4424120·interpreters·optional·erlang-wx_27.0.1+dfsg-3_armhf.deb
47 ·665dc4397ad86dd287d141a6465c3727·14472·interpreters·optional·erlang-x11_27.0.1+dfsg-3_all.deb47 ·74bfe3c349cb655eb461a0b800cbbc4a·14492·interpreters·optional·erlang-x11_27.0.1+dfsg-3_all.deb
48 ·9fe2f37a9a6b52000c784e7578744cd7·1331760·interpreters·optional·erlang-xmerl_27.0.1+dfsg-3_armhf.deb48 ·cfde8d7c701e5ce9a10b8715bfa394e0·1331776·interpreters·optional·erlang-xmerl_27.0.1+dfsg-3_armhf.deb
49 ·302ef976ee10855dcbfe62393d188279·14872·interpreters·optional·erlang_27.0.1+dfsg-3_all.deb49 ·402a533890a60333b856067f9876652c·14876·interpreters·optional·erlang_27.0.1+dfsg-3_all.deb
15.0 KB
erlang-asn1_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1512·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1516·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···887780·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···887792·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.3 KB
data.tar
1.48 KB
file list
    
Offset 31, 11 lines modifiedOffset 31, 11 lines modified
31 -rw-r--r--···0·root·········(0)·root·········(0)·····4840·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/ebin/asn1rt_nif.beam31 -rw-r--r--···0·root·········(0)·root·········(0)·····4840·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/ebin/asn1rt_nif.beam
32 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/priv/32 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/priv/
33 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/priv/lib/33 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/priv/lib/
34 -rw-r--r--···0·root·········(0)·root·········(0)·····9712·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/priv/lib/asn1rt_nif.so34 -rw-r--r--···0·root·········(0)·root·········(0)·····9712·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/asn1-5.3/priv/lib/asn1rt_nif.so
35 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/35 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
36 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/36 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
37 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/37 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/
38 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/AUTHORS.gz38 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/AUTHORS.gz
39 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/README.Debian39 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/README.Debian
40 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/changelog.Debian.gz40 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/changelog.Debian.gz
41 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/copyright41 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-asn1/copyright
12.8 KB
./usr/share/doc/erlang-asn1/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.3 KB
erlang-base_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0····12728·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0····12728·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0·10762076·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0·10762092·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.7 KB
data.tar.xz
14.7 KB
data.tar
1.86 KB
file list
    
Offset 391, 15 lines modifiedOffset 391, 15 lines modified
391 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/systemd/391 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/systemd/
392 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/systemd/system/392 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/systemd/system/
393 -rw-r--r--···0·root·········(0)·root·········(0)······264·2024-08-29·10:53:40.000000·./usr/lib/systemd/system/epmd.service393 -rw-r--r--···0·root·········(0)·root·········(0)······264·2024-08-29·10:53:40.000000·./usr/lib/systemd/system/epmd.service
394 -rw-r--r--···0·root·········(0)·root·········(0)······157·2024-08-29·10:53:40.000000·./usr/lib/systemd/system/epmd.socket394 -rw-r--r--···0·root·········(0)·root·········(0)······157·2024-08-29·10:53:40.000000·./usr/lib/systemd/system/epmd.socket
395 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/395 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
396 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/396 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
397 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/397 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/
398 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/AUTHORS.gz398 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/AUTHORS.gz
399 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/README.Debian399 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/README.Debian
400 -rw-r--r--···0·root·········(0)·root·········(0)·····4418·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/changelog.Debian.gz400 -rw-r--r--···0·root·········(0)·root·········(0)·····4418·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/changelog.Debian.gz
401 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/copyright401 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-base/copyright
402 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/402 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
403 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/403 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/
404 -rw-r--r--···0·root·········(0)·root·········(0)·····3384·2024-08-29·10:53:40.000000·./usr/share/man/man1/epmd.1.gz404 -rw-r--r--···0·root·········(0)·root·········(0)·····3384·2024-08-29·10:53:40.000000·./usr/share/man/man1/epmd.1.gz
405 -rw-r--r--···0·root·········(0)·root·········(0)····19849·2024-08-29·10:53:40.000000·./usr/share/man/man1/erl.1.gz405 -rw-r--r--···0·root·········(0)·root·········(0)····19849·2024-08-29·10:53:40.000000·./usr/share/man/man1/erl.1.gz
12.8 KB
./usr/share/doc/erlang-base/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.5 KB
erlang-common-test_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2644·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2644·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1303880·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1303892·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.9 KB
data.tar.xz
14.9 KB
data.tar
2.03 KB
file list
    
Offset 64, 15 lines modifiedOffset 64, 15 lines modified
64 -rw-r--r--···0·root·········(0)·root·········(0)····34734·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/priv/tile1.jpg64 -rw-r--r--···0·root·········(0)·root·········(0)····34734·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/priv/tile1.jpg
65 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/proper_ext/65 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/proper_ext/
66 -rw-r--r--···0·root·········(0)·root·········(0)·····7816·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/proper_ext/ct_proper_ext.beam66 -rw-r--r--···0·root·········(0)·root·········(0)·····7816·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/proper_ext/ct_proper_ext.beam
67 -rw-r--r--···0·root·········(0)·root·········(0)·····6019·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/proper_ext/ct_proper_ext.erl67 -rw-r--r--···0·root·········(0)·root·········(0)·····6019·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/common_test-1.27/proper_ext/ct_proper_ext.erl
68 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/68 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
69 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/69 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
70 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/70 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/
71 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/AUTHORS.gz71 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/AUTHORS.gz
72 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/README.Debian72 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/README.Debian
73 -rw-r--r--···0·root·········(0)·root·········(0)·····4425·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/changelog.Debian.gz73 -rw-r--r--···0·root·········(0)·root·········(0)·····4425·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/changelog.Debian.gz
74 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/copyright74 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-common-test/copyright
75 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/75 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/
76 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/76 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/
77 -rw-r--r--···0·root·········(0)·root·········(0)·······42·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-common-test77 -rw-r--r--···0·root·········(0)·root·········(0)·······42·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-common-test
78 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/78 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
12.9 KB
./usr/share/doc/erlang-common-test/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-crypto_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1088·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1088·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···173500·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···173528·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.52 KB
file list
    
Offset 13, 11 lines modifiedOffset 13, 11 lines modified
13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/
14 -rw-r--r--···0·root·········(0)·root·········(0)····99844·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/crypto.so14 -rw-r--r--···0·root·········(0)·root·········(0)····99844·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/crypto.so
15 -rw-r--r--···0·root·········(0)·root·········(0)·····5512·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/crypto_callback.so15 -rw-r--r--···0·root·········(0)·root·········(0)·····5512·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/crypto_callback.so
16 -rw-r--r--···0·root·········(0)·root·········(0)·····9740·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/otp_test_engine.so16 -rw-r--r--···0·root·········(0)·root·········(0)·····9740·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/crypto-5.5/priv/lib/otp_test_engine.so
17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/
20 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/AUTHORS.gz20 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/AUTHORS.gz
21 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/README.Debian21 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/README.Debian
22 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/changelog.Debian.gz22 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/changelog.Debian.gz
23 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/copyright23 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-crypto/copyright
12.8 KB
./usr/share/doc/erlang-crypto/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.3 KB
erlang-debugger_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1672·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1672·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···476832·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···476852·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.8 KB
data.tar.xz
14.7 KB
data.tar
1.87 KB
file list
    
Offset 34, 14 lines modifiedOffset 34, 14 lines modified
34 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/34 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/
35 -rw-r--r--···0·root·········(0)·root·········(0)······647·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/debugger.gif35 -rw-r--r--···0·root·········(0)·root·········(0)······647·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/debugger.gif
36 -rw-r--r--···0·root·········(0)·root·········(0)······153·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/debugger.tool36 -rw-r--r--···0·root·········(0)·root·········(0)······153·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/debugger.tool
37 -rw-r--r--···0·root·········(0)·root·········(0)·····4723·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/erlang_bug.png37 -rw-r--r--···0·root·········(0)·root·········(0)·····4723·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/debugger-5.4/priv/erlang_bug.png
38 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/38 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/
41 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/AUTHORS.gz41 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/AUTHORS.gz
42 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/README.Debian42 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/README.Debian
43 -rw-r--r--···0·root·········(0)·root·········(0)·····4424·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/changelog.Debian.gz43 -rw-r--r--···0·root·········(0)·root·········(0)·····4424·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/changelog.Debian.gz
44 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/copyright44 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-debugger/copyright
45 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/45 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/
46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/
47 -rw-r--r--···0·root·········(0)·root·········(0)·······39·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-debugger47 -rw-r--r--···0·root·········(0)·root·········(0)·······39·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-debugger
12.8 KB
./usr/share/doc/erlang-debugger/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
33.6 KB
erlang-dev_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····3648·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····3652·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···283420·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···283476·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
33.0 KB
data.tar.xz
33.0 KB
data.tar
1.92 KB
file list
    
Offset 167, 15 lines modifiedOffset 167, 15 lines modified
167 -rw-r--r--···0·root·········(0)·root·········(0)····38439·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/include/erl_nif_api_funcs.h167 -rw-r--r--···0·root·········(0)·root·········(0)····38439·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/include/erl_nif_api_funcs.h
168 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/lib/168 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/lib/
169 -rw-r--r--···0·root·········(0)·root·········(0)···150522·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/lib/libei.a169 -rw-r--r--···0·root·········(0)·root·········(0)···150522·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/lib/libei.a
170 -rw-r--r--···0·root·········(0)·root·········(0)···148372·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/lib/libei_st.a170 -rw-r--r--···0·root·········(0)·root·········(0)···148372·2024-08-29·10:53:40.000000·./usr/lib/erlang/usr/lib/libei_st.a
171 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/171 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
172 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/172 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
173 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/173 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/
174 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/AUTHORS.gz174 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/AUTHORS.gz
175 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/README.Debian175 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/README.Debian
176 -rw-r--r--···0·root·········(0)·root·········(0)·····4420·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/changelog.Debian.gz176 -rw-r--r--···0·root·········(0)·root·········(0)·····4420·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/changelog.Debian.gz
177 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/copyright177 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dev/copyright
178 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/178 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
179 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/179 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/
180 -rw-r--r--···0·root·········(0)·root·········(0)·····3427·2024-08-29·10:53:40.000000·./usr/share/man/man1/erlang-depends.1.gz180 -rw-r--r--···0·root·········(0)·root·········(0)·····3427·2024-08-29·10:53:40.000000·./usr/share/man/man1/erlang-depends.1.gz
181 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/include/driver_int.h·->·../lib/erlang/usr/include/driver_int.h181 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/include/driver_int.h·->·../lib/erlang/usr/include/driver_int.h
18.2 KB
./usr/bin/erlang-depends
    
Offset 7, 308 lines modifiedOffset 7, 308 lines modified
7 -define(VERSION,·"1:27.0.1+dfsg").7 -define(VERSION,·"1:27.0.1+dfsg").
8 -define(ABI_VERSION,·"17.0").8 -define(ABI_VERSION,·"17.0").
9 -define(PCRE_VERSION,·"8.44").9 -define(PCRE_VERSION,·"8.44").
  
10 %·Since·all·packages·required·built·application·to·run·may·be·unavailable10 %·Since·all·packages·required·built·application·to·run·may·be·unavailable
11 %·on·build·stage·it's·necessary·to·list·all·module-package·relationships11 %·on·build·stage·it's·necessary·to·list·all·module-package·relationships
12 %·explicitly:12 %·explicitly:
13 -define(MODULES,·[{"atomics",·"erlang-base"},13 -define(MODULES,·[{"dets",·"erlang-base"},
14 {"erts_internal",·"erlang-base"}, 
15 {"erlang",·"erlang-base"}, 
16 {"erl_tracer",·"erlang-base"}, 
17 {"zlib",·"erlang-base"}, 
18 {"prim_eval",·"erlang-base"}, 
19 {"prim_zip",·"erlang-base"}, 
20 {"counters",·"erlang-base"}, 
21 {"prim_inet",·"erlang-base"}, 
22 {"prim_net",·"erlang-base"}, 
23 {"persistent_term",·"erlang-base"}, 
24 {"init",·"erlang-base"}, 
25 {"prim_socket",·"erlang-base"}, 
26 {"erl_prim_loader",·"erlang-base"}, 
27 {"erts_trace_cleaner",·"erlang-base"}, 
28 {"socket_registry",·"erlang-base"}, 
29 {"erts_dirty_process_signal_handler",·"erlang-base"}, 
30 {"prim_file",·"erlang-base"}, 
31 {"erts_code_purger",·"erlang-base"}, 
32 {"erl_init",·"erlang-base"}, 
33 {"erts_literal_area_collector",·"erlang-base"}, 
34 {"prim_buffer",·"erlang-base"}, 
35 {"erlsrv",·"erlang-base"}, 
36 {"systools_relup",·"erlang-base"}, 
37 {"systools_make",·"erlang-base"}, 
38 {"alarm_handler",·"erlang-base"}, 
39 {"rb",·"erlang-base"},14 {"argparse",·"erlang-base"},
40 {"sasl_report_tty_h",·"erlang-base"}, 
41 {"systools_lib",·"erlang-base"}, 
42 {"sasl_report",·"erlang-base"}, 
43 {"release_handler_1",·"erlang-base"}, 
44 {"rb_format_supp",·"erlang-base"}, 
45 {"systools",·"erlang-base"}, 
46 {"sasl",·"erlang-base"}, 
47 {"release_handler",·"erlang-base"}, 
48 {"format_lib_supp",·"erlang-base"}, 
49 {"systools_rc",·"erlang-base"}, 
50 {"sasl_report_file_h",·"erlang-base"}, 
51 {"misc_supp",·"erlang-base"}, 
52 {"target_system",·"erlang-base"}, 
53 {"ets",·"erlang-base"}, 
54 {"math",·"erlang-base"},15 {"math",·"erlang-base"},
55 {"slave",·"erlang-base"}, 
56 {"timer",·"erlang-base"},16 {"otp_internal",·"erlang-base"},
57 {"c",·"erlang-base"}, 
58 {"erl_abstract_code",·"erlang-base"}, 
59 {"shell_default",·"erlang-base"}, 
60 {"erl_parse",·"erlang-base"},17 {"erl_parse",·"erlang-base"},
61 {"orddict",·"erlang-base"}, 
62 {"io_lib_fread",·"erlang-base"}, 
63 {"dict",·"erlang-base"}, 
64 {"rand",·"erlang-base"}, 
65 {"io_lib",·"erlang-base"},18 {"filelib",·"erlang-base"},
 19 {"filename",·"erlang-base"},
 20 {"erl_internal",·"erlang-base"},
 21 {"zip",·"erlang-base"},
66 {"random",·"erlang-base"},22 {"gen_fsm",·"erlang-base"},
 23 {"epp",·"erlang-base"},
67 {"json",·"erlang-base"},24 {"sofs",·"erlang-base"},
 25 {"supervisor",·"erlang-base"},
68 {"pool",·"erlang-base"},26 {"erl_pp",·"erlang-base"},
 27 {"sets",·"erlang-base"},
 28 {"gb_sets",·"erlang-base"},
 29 {"erl_compile",·"erlang-base"},
 30 {"qlc_pt",·"erlang-base"},
 31 {"file_sorter",·"erlang-base"},
 32 {"shell_default",·"erlang-base"},
69 {"eval_bits",·"erlang-base"},33 {"erl_lint",·"erlang-base"},
 34 {"gen_server",·"erlang-base"},
 35 {"log_mf_h",·"erlang-base"},
70 {"binary",·"erlang-base"},36 {"binary",·"erlang-base"},
 37 {"dets_utils",·"erlang-base"},
71 {"win32reg",·"erlang-base"},38 {"erl_tar",·"erlang-base"},
72 {"gen_event",·"erlang-base"},39 {"gen_event",·"erlang-base"},
73 {"gen_server",·"erlang-base"}, 
74 {"sofs",·"erlang-base"}, 
75 {"erl_error",·"erlang-base"}, 
76 {"edlin",·"erlang-base"}, 
77 {"filelib",·"erlang-base"}, 
78 {"array",·"erlang-base"}, 
79 {"io_lib_pretty",·"erlang-base"}, 
80 {"erl_eval",·"erlang-base"}, 
81 {"ordsets",·"erlang-base"}, 
82 {"dets",·"erlang-base"}, 
83 {"string",·"erlang-base"}, 
84 {"erl_features",·"erlang-base"}, 
85 {"shell",·"erlang-base"}, 
86 {"io",·"erlang-base"}, 
87 {"sys",·"erlang-base"},40 {"sys",·"erlang-base"},
88 {"beam_lib",·"erlang-base"},41 {"io_lib_fread",·"erlang-base"},
 42 {"dets_v9",·"erlang-base"},
 43 {"dets_server",·"erlang-base"},
89 {"supervisor_bridge",·"erlang-base"},44 {"supervisor_bridge",·"erlang-base"},
 45 {"erl_abstract_code",·"erlang-base"},
90 {"gen_statem",·"erlang-base"},46 {"gen_statem",·"erlang-base"},
91 {"erl_internal",·"erlang-base"}, 
92 {"shell_docs_markdown",·"erlang-base"}, 
93 {"unicode_util",·"erlang-base"}, 
94 {"dets_v9",·"erlang-base"}, 
95 {"erl_pp",·"erlang-base"}, 
96 {"maps",·"erlang-base"}, 
97 {"digraph",·"erlang-base"}, 
98 {"queue",·"erlang-base"}, 
99 {"escript",·"erlang-base"}, 
100 {"shell_docs",·"erlang-base"}, 
101 {"gb_trees",·"erlang-base"},47 {"gb_trees",·"erlang-base"},
102 {"edlin_expand",·"erlang-base"},48 {"c",·"erlang-base"},
103 {"file_sorter",·"erlang-base"},49 {"io",·"erlang-base"},
 50 {"ordsets",·"erlang-base"},
 51 {"shell_docs_markdown",·"erlang-base"},
104 {"erl_bits",·"erlang-base"},52 {"dict",·"erlang-base"},
105 {"io_lib_format",·"erlang-base"},53 {"io_lib_format",·"erlang-base"},
106 {"epp",·"erlang-base"}, 
107 {"uri_string",·"erlang-base"}, 
108 {"gen_fsm",·"erlang-base"}, 
109 {"proc_lib",·"erlang-base"}, 
110 {"re",·"erlang-base"}, 
111 {"sets",·"erlang-base"},54 {"erl_bits",·"erlang-base"},
112 {"zip",·"erlang-base"}, 
113 {"filename",·"erlang-base"}, 
Max diff block lines reached; 14074/18583 bytes (75.74%) of diff not shown.
12.8 KB
./usr/share/doc/erlang-dev/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.4 KB
erlang-dialyzer_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1852·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1852·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1071496·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1071508·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.9 KB
data.tar.xz
14.8 KB
data.tar
1.98 KB
file list
    
Offset 43, 15 lines modifiedOffset 43, 15 lines modified
43 -rw-r--r--···0·root·········(0)·root·········(0)···123752·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/erl_bif_types.beam43 -rw-r--r--···0·root·········(0)·root·········(0)···123752·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/erl_bif_types.beam
44 -rw-r--r--···0·root·········(0)·root·········(0)···267656·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/erl_types.beam44 -rw-r--r--···0·root·········(0)·root·········(0)···267656·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/erl_types.beam
45 -rw-r--r--···0·root·········(0)·root·········(0)····10920·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/typer.beam45 -rw-r--r--···0·root·········(0)·root·········(0)····10920·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/typer.beam
46 -rw-r--r--···0·root·········(0)·root·········(0)····51220·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/typer_core.beam46 -rw-r--r--···0·root·········(0)·root·········(0)····51220·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/dialyzer-5.2/ebin/typer_core.beam
47 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/47 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
48 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/48 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
49 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/49 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/
50 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/AUTHORS.gz50 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/AUTHORS.gz
51 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/README.Debian51 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/README.Debian
52 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/changelog.Debian.gz52 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/changelog.Debian.gz
53 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/copyright53 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-dialyzer/copyright
54 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/54 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
55 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/55 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/
56 -rw-r--r--···0·root·········(0)·root·········(0)·····5273·2024-08-29·10:53:40.000000·./usr/share/man/man1/dialyzer.1.gz56 -rw-r--r--···0·root·········(0)·root·········(0)·····5273·2024-08-29·10:53:40.000000·./usr/share/man/man1/dialyzer.1.gz
57 -rw-r--r--···0·root·········(0)·root·········(0)·····1277·2024-08-29·10:53:40.000000·./usr/share/man/man1/typer.1.gz57 -rw-r--r--···0·root·········(0)·root·········(0)·····1277·2024-08-29·10:53:40.000000·./usr/share/man/man1/typer.1.gz
12.8 KB
./usr/share/doc/erlang-dialyzer/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.5 KB
erlang-diameter_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2152·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2156·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···806712·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···806732·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.9 KB
data.tar.xz
14.9 KB
data.tar
2.05 KB
file list
    
Offset 56, 15 lines modifiedOffset 56, 15 lines modified
56 -rw-r--r--···0·root·········(0)·root·········(0)·····2472·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_transport_sup.beam56 -rw-r--r--···0·root·········(0)·root·········(0)·····2472·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_transport_sup.beam
57 -rw-r--r--···0·root·········(0)·root·········(0)····15416·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_types.beam57 -rw-r--r--···0·root·········(0)·root·········(0)····15416·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_types.beam
58 -rw-r--r--···0·root·········(0)·root·········(0)····26816·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_watchdog.beam58 -rw-r--r--···0·root·········(0)·root·········(0)····26816·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_watchdog.beam
59 -rw-r--r--···0·root·········(0)·root·········(0)·····2464·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_watchdog_sup.beam59 -rw-r--r--···0·root·········(0)·root·········(0)·····2464·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/diameter-2.4/ebin/diameter_watchdog_sup.beam
60 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/60 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
61 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/61 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
62 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/62 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/
63 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/AUTHORS.gz63 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/AUTHORS.gz
64 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/README.Debian64 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/README.Debian
65 -rw-r--r--···0·root·········(0)·root·········(0)·····4422·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/changelog.Debian.gz65 -rw-r--r--···0·root·········(0)·root·········(0)·····4422·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/changelog.Debian.gz
66 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/copyright66 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-diameter/copyright
67 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/67 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
68 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/68 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/
69 -rw-r--r--···0·root·········(0)·root·········(0)······804·2024-08-29·10:53:40.000000·./usr/share/man/man1/diameterc.1.gz69 -rw-r--r--···0·root·········(0)·root·········(0)······804·2024-08-29·10:53:40.000000·./usr/share/man/man1/diameterc.1.gz
70 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/bin/diameterc·->·../lib/erlang/lib/diameter-2.4/bin/diameterc70 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/bin/diameterc·->·../lib/erlang/lib/diameter-2.4/bin/diameterc
12.8 KB
./usr/share/doc/erlang-diameter/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
45.2 MB
erlang-doc_27.0.1+dfsg-3_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0····39216·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0····39196·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0·16531508·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0·16536628·2024-08-29·10:53:40.000000·data.tar.xz
20.9 KB
control.tar.xz
20.8 KB
control.tar
489 B
./control
    
Offset 1, 13 lines modifiedOffset 1, 13 lines modified
1 Package:·erlang-doc1 Package:·erlang-doc
2 Source:·erlang2 Source:·erlang
3 Version:·1:27.0.1+dfsg-33 Version:·1:27.0.1+dfsg-3
4 Architecture:·all4 Architecture:·all
5 Maintainer:·Debian·Erlang·Packagers·<pkg-erlang-devel@lists.alioth.debian.org>5 Maintainer:·Debian·Erlang·Packagers·<pkg-erlang-devel@lists.alioth.debian.org>
6 Installed-Size:·959886 Installed-Size:·96039
7 Depends:·libjs-jquery,·libjs-jquery-ui,·node-mermaid7 Depends:·libjs-jquery,·libjs-jquery-ui,·node-mermaid
8 Suggests:·erlang:any8 Suggests:·erlang:any
9 Conflicts:·erlang-base:any·(<<·1:13.b.4),·erlang-base-hipe:any,·erlang-doc-html9 Conflicts:·erlang-base:any·(<<·1:13.b.4),·erlang-base-hipe:any,·erlang-doc-html
10 Replaces:·erlang-doc-html10 Replaces:·erlang-doc-html
11 Provides:·erlang-doc-html11 Provides:·erlang-doc-html
12 Section:·doc12 Section:·doc
13 Priority:·optional13 Priority:·optional
20.3 KB
./md5sums
30.0 B
./md5sums
Files differ
20.3 KB
line order
Max HTML report size reached
45.2 MB
data.tar.xz
45.2 MB
data.tar
123 KB
file list
    
Offset 38, 15 lines modifiedOffset 38, 15 lines modified
38 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/38 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/
39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/
40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/
41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/
42 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/42 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
43 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/43 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
44 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/44 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/
45 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/AUTHORS.gz45 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/AUTHORS.gz
46 -rw-r--r--···0·root·········(0)·root·········(0)·····8220·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/CONTRIBUTING.md46 -rw-r--r--···0·root·········(0)·root·········(0)·····8220·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/CONTRIBUTING.md
47 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/HOWTO/47 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/HOWTO/
48 -rw-r--r--···0·root·········(0)·root·········(0)·····3008·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/BENCHMARKS.md48 -rw-r--r--···0·root·········(0)·root·········(0)·····3008·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/BENCHMARKS.md
49 -rw-r--r--···0·root·········(0)·root·········(0)·····2978·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/BOOTSTRAP.md49 -rw-r--r--···0·root·········(0)·root·········(0)·····2978·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/BOOTSTRAP.md
50 -rw-r--r--···0·root·········(0)·root·········(0)·····3577·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/DEPRECATE.md50 -rw-r--r--···0·root·········(0)·root·········(0)·····3577·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/DEPRECATE.md
51 -rw-r--r--···0·root·········(0)·root·········(0)····21862·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/DEVELOPMENT.md51 -rw-r--r--···0·root·········(0)·root·········(0)····21862·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/DEVELOPMENT.md
52 -rw-r--r--···0·root·········(0)·root·········(0)····15200·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/DOCUMENTATION.md52 -rw-r--r--···0·root·········(0)·root·········(0)····15200·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/HOWTO/DOCUMENTATION.md
Offset 66, 25 lines modifiedOffset 66, 25 lines modified
66 -rw-r--r--···0·root·········(0)·root·········(0)·····4204·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/README.md66 -rw-r--r--···0·root·········(0)·root·········(0)·····4204·2024-07-09·11:36:07.000000·./usr/share/doc/erlang-doc/README.md
67 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/changelog.Debian.gz67 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/changelog.Debian.gz
68 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/copyright68 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/copyright
69 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/69 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/
70 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/70 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/
71 -rw-r--r--···0·root·········(0)·root·········(0)·····1599·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/.build71 -rw-r--r--···0·root·········(0)·root·········(0)·····1599·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/.build
72 -rw-r--r--···0·root·········(0)·root·········(0)·····5287·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/404.html72 -rw-r--r--···0·root·········(0)·root·········(0)·····5287·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/404.html
73 -rw-r--r--···0·root·········(0)·root·········(0)·····6021·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/asn1.html73 -rw-r--r--···0·root·········(0)·root·········(0)·····6299·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/asn1.html
74 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/assets/74 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/assets/
75 -rw-r--r--···0·root·········(0)·root·········(0)·····5837·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/assets/logo.png75 -rw-r--r--···0·root·········(0)·root·········(0)·····5837·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/assets/logo.png
76 -rw-r--r--···0·root·········(0)·root·········(0)·····6047·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/common_test.html76 -rw-r--r--···0·root·········(0)·root·········(0)·····6334·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/common_test.html
77 -rw-r--r--···0·root·········(0)·root·········(0)·····6058·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/compiler.html77 -rw-r--r--···0·root·········(0)·root·········(0)·····6330·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/compiler.html
78 -rw-r--r--···0·root·········(0)·root·········(0)·····6033·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/crypto.html78 -rw-r--r--···0·root·········(0)·root·········(0)·····6314·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/crypto.html
79 -rw-r--r--···0·root·········(0)·root·········(0)·····6038·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/debugger.html79 -rw-r--r--···0·root·········(0)·root·········(0)·····6322·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/debugger.html
80 -rw-r--r--···0·root·········(0)·root·········(0)····29810·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/deprecations.html80 -rw-r--r--···0·root·········(0)·root·········(0)····29810·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/deprecations.html
81 -rw-r--r--···0·root·········(0)·root·········(0)·····6119·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/design_principles.html81 -rw-r--r--···0·root·········(0)·root·········(0)·····6400·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/design_principles.html
82 -rw-r--r--···0·root·········(0)·root·········(0)·····6032·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dialyzer.html82 -rw-r--r--···0·root·········(0)·root·········(0)·····6315·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dialyzer.html
83 -rw-r--r--···0·root·········(0)·root·········(0)·····6039·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/diameter.html83 -rw-r--r--···0·root·········(0)·root·········(0)·····6324·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/diameter.html
84 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/84 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/
85 -rw-r--r--···0·root·········(0)·root·········(0)····20933·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/handlebars.runtime-CFQAK6SD.js85 -rw-r--r--···0·root·········(0)·root·········(0)····20933·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/handlebars.runtime-CFQAK6SD.js
86 -rw-r--r--···0·root·········(0)·root·········(0)····33580·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/handlebars.templates-K7URE6B4.js86 -rw-r--r--···0·root·········(0)·root·········(0)····33580·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/handlebars.templates-K7URE6B4.js
87 -rw-r--r--···0·root·········(0)·root·········(0)····70147·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/html-7HPNBV52.js87 -rw-r--r--···0·root·········(0)·root·········(0)····70147·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/html-7HPNBV52.js
88 -rw-r--r--···0·root·········(0)·root·········(0)····67195·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/html-erlang-G5LYFEUD.css88 -rw-r--r--···0·root·········(0)·root·········(0)····67195·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/html-erlang-G5LYFEUD.css
89 -rw-r--r--···0·root·········(0)·root·········(0)····17732·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/inconsolata-latin-400-normal-OXLHDACS.woff289 -rw-r--r--···0·root·········(0)·root·········(0)····17732·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/inconsolata-latin-400-normal-OXLHDACS.woff2
90 -rw-r--r--···0·root·········(0)·root·········(0)····17976·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/inconsolata-latin-700-normal-S55P5GAG.woff290 -rw-r--r--···0·root·········(0)·root·········(0)····17976·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/inconsolata-latin-700-normal-S55P5GAG.woff2
Offset 95, 58 lines modifiedOffset 95, 58 lines modified
95 -rw-r--r--···0·root·········(0)·root·········(0)····23236·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-300-normal-YUMVEFOL.woff295 -rw-r--r--···0·root·········(0)·root·········(0)····23236·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-300-normal-YUMVEFOL.woff2
96 -rw-r--r--···0·root·········(0)·root·········(0)····23580·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-400-normal-W7754I4D.woff296 -rw-r--r--···0·root·········(0)·root·········(0)····23580·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-400-normal-W7754I4D.woff2
97 -rw-r--r--···0·root·········(0)·root·········(0)····23040·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-700-normal-2XVSBPG4.woff297 -rw-r--r--···0·root·········(0)·root·········(0)····23040·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-700-normal-2XVSBPG4.woff2
98 -rw-r--r--···0·root·········(0)·root·········(0)·····5624·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-ext-300-normal-VPGGJKJL.woff298 -rw-r--r--···0·root·········(0)·root·········(0)·····5624·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
99 -rw-r--r--···0·root·········(0)·root·········(0)·····5472·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-ext-400-normal-N27NCBWW.woff299 -rw-r--r--···0·root·········(0)·root·········(0)·····5472·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-ext-400-normal-N27NCBWW.woff2
100 -rw-r--r--···0·root·········(0)·root·········(0)·····5368·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2100 -rw-r--r--···0·root·········(0)·root·········(0)·····5368·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
101 -rw-r--r--···0·root·········(0)·root·········(0)·····1956·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/remixicon-NKANDIL5.woff2101 -rw-r--r--···0·root·········(0)·root·········(0)·····1956·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/remixicon-NKANDIL5.woff2
102 -rw-r--r--···0·root·········(0)·root·········(0)···105688·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/search_data-6667DB87.js102 -rw-r--r--···0·root·········(0)·root·········(0)···109746·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/search_data-6DCAA4BB.js
103 -rw-r--r--···0·root·········(0)·root·········(0)·····5163·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/sidebar_items-35348DA6.js103 -rw-r--r--···0·root·········(0)·root·········(0)·····9129·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/dist/sidebar_items-D0B3FEFA.js
104 -rw-r--r--···0·root·········(0)·root·········(0)·····5821·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/edoc.html104 -rw-r--r--···0·root·········(0)·root·········(0)·····6018·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/edoc.html
105 -rw-r--r--···0·root·········(0)·root·········(0)·····6105·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/efficiency_guide.html105 -rw-r--r--···0·root·········(0)·root·········(0)·····6372·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/efficiency_guide.html
106 -rw-r--r--···0·root·········(0)·root·········(0)·····6050·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/eldap.html106 -rw-r--r--···0·root·········(0)·root·········(0)·····6344·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/eldap.html
107 -rw-r--r--···0·root·········(0)·root·········(0)·····6076·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/embedded.html107 -rw-r--r--···0·root·········(0)·root·········(0)·····6336·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/embedded.html
108 -rw-r--r--···0·root·········(0)·root·········(0)·····6055·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/erl_interface.html108 -rw-r--r--···0·root·········(0)·root·········(0)·····6346·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/erl_interface.html
109 -rw-r--r--···0·root·········(0)·root·········(0)·····6022·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/erts.html109 -rw-r--r--···0·root·········(0)·root·········(0)·····6307·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/erts.html
110 -rw-r--r--···0·root·········(0)·root·········(0)·····6022·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/et.html110 -rw-r--r--···0·root·········(0)·root·········(0)·····6306·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/et.html
111 -rw-r--r--···0·root·········(0)·root·········(0)·····6034·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/eunit.html111 -rw-r--r--···0·root·········(0)·root·········(0)·····6322·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/eunit.html
112 -rw-r--r--···0·root·········(0)·root·········(0)·····6035·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/ftp.html112 -rw-r--r--···0·root·········(0)·root·········(0)·····6323·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/ftp.html
113 -rw-r--r--···0·root·········(0)·root·········(0)·····6123·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/getting_started.html113 -rw-r--r--···0·root·········(0)·root·········(0)·····6400·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/getting_started.html
114 -rw-r--r--···0·root·········(0)·root·········(0)······262·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/index.html114 -rw-r--r--···0·root·········(0)·root·········(0)······262·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/index.html
115 -rw-r--r--···0·root·········(0)·root·········(0)·····6031·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/inets.html115 -rw-r--r--···0·root·········(0)·root·········(0)·····6317·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/inets.html
116 -rw-r--r--···0·root·········(0)·root·········(0)·····6145·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/installation_guide.html116 -rw-r--r--···0·root·········(0)·root·········(0)·····6338·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/installation_guide.html
117 -rw-r--r--···0·root·········(0)·root·········(0)·····6050·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/jinterface.html117 -rw-r--r--···0·root·········(0)·root·········(0)·····6337·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/jinterface.html
118 -rw-r--r--···0·root·········(0)·root·········(0)·····6022·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/kernel.html118 -rw-r--r--···0·root·········(0)·root·········(0)·····6303·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/kernel.html
119 -rw-r--r--···0·root·········(0)·root·········(0)···172151·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/man_index.html119 -rw-r--r--···0·root·········(0)·root·········(0)···172151·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/man_index.html
120 -rw-r--r--···0·root·········(0)·root·········(0)·····6049·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/megaco.html120 -rw-r--r--···0·root·········(0)·root·········(0)·····6344·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/megaco.html
121 -rw-r--r--···0·root·········(0)·root·········(0)·····6030·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/mnesia.html121 -rw-r--r--···0·root·········(0)·root·········(0)·····6317·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/mnesia.html
122 -rw-r--r--···0·root·········(0)·root·········(0)·····6073·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/oam.html122 -rw-r--r--···0·root·········(0)·root·········(0)·····6319·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/oam.html
123 -rw-r--r--···0·root·········(0)·root·········(0)·····6037·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/observer.html123 -rw-r--r--···0·root·········(0)·root·········(0)·····6323·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/observer.html
124 -rw-r--r--···0·root·········(0)·root·········(0)·····6026·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/odbc.html124 -rw-r--r--···0·root·········(0)·root·········(0)·····6312·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/odbc.html
125 -rw-r--r--···0·root·········(0)·root·········(0)·····6019·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/os_mon.html125 -rw-r--r--···0·root·········(0)·root·········(0)·····6301·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/os_mon.html
126 -rw-r--r--···0·root·········(0)·root·········(0)·····6050·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/parsetools.html126 -rw-r--r--···0·root·········(0)·root·········(0)·····6341·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/parsetools.html
127 -rw-r--r--···0·root·········(0)·root·········(0)·····6126·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/programming_examples.html127 -rw-r--r--···0·root·········(0)·root·········(0)·····6406·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/programming_examples.html
128 -rw-r--r--···0·root·········(0)·root·········(0)·····6046·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/public_key.html128 -rw-r--r--···0·root·········(0)·root·········(0)·····6333·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/public_key.html
129 -rw-r--r--···0·root·········(0)·root·········(0)·····8585·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/readme.html129 -rw-r--r--···0·root·········(0)·root·········(0)·····8585·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/readme.html
130 -rw-r--r--···0·root·········(0)·root·········(0)·····6119·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/reference_manual.html130 -rw-r--r--···0·root·········(0)·root·········(0)·····6398·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/reference_manual.html
131 -rw-r--r--···0·root·········(0)·root·········(0)·····6056·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/reltool.html131 -rw-r--r--···0·root·········(0)·root·········(0)·····6351·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/reltool.html
132 -rw-r--r--···0·root·········(0)·root·········(0)····28132·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/removed.html132 -rw-r--r--···0·root·········(0)·root·········(0)····28132·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/removed.html
133 -rw-r--r--···0·root·········(0)·root·········(0)·····6070·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/runtime_tools.html133 -rw-r--r--···0·root·········(0)·root·········(0)·····6367·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/runtime_tools.html
134 -rw-r--r--···0·root·········(0)·root·········(0)·····6021·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/sasl.html134 -rw-r--r--···0·root·········(0)·root·········(0)·····6307·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/sasl.html
135 -rw-r--r--···0·root·········(0)·root·········(0)·····9502·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/scheduled_for_removal.html135 -rw-r--r--···0·root·········(0)·root·········(0)·····9502·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/scheduled_for_removal.html
136 -rw-r--r--···0·root·········(0)·root·········(0)·····5271·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/search.html136 -rw-r--r--···0·root·········(0)·root·········(0)·····5271·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/search.html
137 -rw-r--r--···0·root·········(0)·root·········(0)·····6015·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/snmp.html137 -rw-r--r--···0·root·········(0)·root·········(0)·····6294·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/snmp.html
138 -rw-r--r--···0·root·········(0)·root·········(0)·····6025·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/ssh.html138 -rw-r--r--···0·root·········(0)·root·········(0)·····6312·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/ssh.html
139 -rw-r--r--···0·root·········(0)·root·········(0)·····6014·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/ssl.html139 -rw-r--r--···0·root·········(0)·root·········(0)·····6292·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/ssl.html
140 -rw-r--r--···0·root·········(0)·root·········(0)·····6025·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/stdlib.html140 -rw-r--r--···0·root·········(0)·root·········(0)·····6311·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/stdlib.html
141 -rw-r--r--···0·root·········(0)·root·········(0)·····6064·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/syntax_tools.html141 -rw-r--r--···0·root·········(0)·root·········(0)·····6357·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/syntax_tools.html
142 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/142 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/
143 -rw-r--r--···0·root·········(0)·root·········(0)·····2387·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/.build143 -rw-r--r--···0·root·········(0)·root·········(0)·····2387·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/.build
144 -rw-r--r--···0·root·········(0)·root·········(0)·····5505·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/404.html144 -rw-r--r--···0·root·········(0)·root·········(0)·····5505·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/404.html
145 -rw-r--r--···0·root·········(0)·root·········(0)···635259·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/Erlang·System·Documentation.epub145 -rw-r--r--···0·root·········(0)·root·········(0)···635235·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/Erlang·System·Documentation.epub
146 -rw-r--r--···0·root·········(0)·root·········(0)····53232·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/applications.html146 -rw-r--r--···0·root·········(0)·root·········(0)····53232·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/applications.html
147 -rw-r--r--···0·root·········(0)·root·········(0)····97283·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/appup_cookbook.html147 -rw-r--r--···0·root·········(0)·root·········(0)····97283·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/appup_cookbook.html
148 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/148 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/
149 -rw-r--r--···0·root·········(0)·root·········(0)······687·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist1.gif149 -rw-r--r--···0·root·········(0)·root·········(0)······687·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist1.gif
150 -rw-r--r--···0·root·········(0)·root·········(0)·····1491·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist2.gif150 -rw-r--r--···0·root·········(0)·root·········(0)·····1491·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist2.gif
151 -rw-r--r--···0·root·········(0)·root·········(0)·····1108·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist3.gif151 -rw-r--r--···0·root·········(0)·root·········(0)·····1108·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist3.gif
152 -rw-r--r--···0·root·········(0)·root·········(0)······518·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist4.gif152 -rw-r--r--···0·root·········(0)·root·········(0)······518·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/assets/dist4.gif
Offset 249, 21 lines modifiedOffset 249, 21 lines modified
249 -rw-r--r--···0·root·········(0)·root·········(0)····12535·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/system_limits.html249 -rw-r--r--···0·root·········(0)·root·········(0)····12535·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/system_limits.html
250 -rw-r--r--···0·root·········(0)·root·········(0)····18024·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/system_principles.html250 -rw-r--r--···0·root·········(0)·root·········(0)····18024·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/system_principles.html
251 -rw-r--r--···0·root·········(0)·root·········(0)····51799·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/tablesdatabases.html251 -rw-r--r--···0·root·········(0)·root·········(0)····51799·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/tablesdatabases.html
252 -rw-r--r--···0·root·········(0)·root·········(0)·····7678·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/tutorial.html252 -rw-r--r--···0·root·········(0)·root·········(0)·····7678·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/tutorial.html
253 -rw-r--r--···0·root·········(0)·root·········(0)····58409·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/typespec.html253 -rw-r--r--···0·root·········(0)·root·········(0)····58409·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/typespec.html
254 -rw-r--r--···0·root·········(0)·root·········(0)····10271·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/upgrade.html254 -rw-r--r--···0·root·········(0)·root·········(0)····10271·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/upgrade.html
255 -rw-r--r--···0·root·········(0)·root·········(0)····23480·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/versions.html255 -rw-r--r--···0·root·········(0)·root·········(0)····23480·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system/versions.html
256 -rw-r--r--···0·root·········(0)·root·········(0)·····6117·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system_principles.html256 -rw-r--r--···0·root·········(0)·root·········(0)·····6393·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/system_principles.html
257 -rw-r--r--···0·root·········(0)·root·········(0)·····6011·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/tftp.html257 -rw-r--r--···0·root·········(0)·root·········(0)·····6288·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/tftp.html
258 -rw-r--r--···0·root·········(0)·root·········(0)·····6046·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/tools.html258 -rw-r--r--···0·root·········(0)·root·········(0)·····6338·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/tools.html
259 -rw-r--r--···0·root·········(0)·root·········(0)·····6084·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/tutorial.html259 -rw-r--r--···0·root·········(0)·root·········(0)·····6338·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/tutorial.html
260 -rw-r--r--···0·root·········(0)·root·········(0)····26009·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/upcoming_incompatibilities.html260 -rw-r--r--···0·root·········(0)·root·········(0)····26094·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/upcoming_incompatibilities.html
261 -rw-r--r--···0·root·········(0)·root·········(0)·····6013·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/wx.html261 -rw-r--r--···0·root·········(0)·root·········(0)·····6289·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/wx.html
262 -rw-r--r--···0·root·········(0)·root·········(0)·····6025·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/xmerl.html262 -rw-r--r--···0·root·········(0)·root·········(0)·····6305·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/doc/xmerl.html
263 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/263 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/
264 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/264 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/
265 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/265 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/
266 -rw-r--r--···0·root·········(0)·root·········(0)·····2047·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/.build266 -rw-r--r--···0·root·········(0)·root·········(0)·····2047·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/.build
267 -rw-r--r--···0·root·········(0)·root·········(0)·····5756·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/404.html267 -rw-r--r--···0·root·········(0)·root·········(0)·····5756·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/404.html
268 -rw-r--r--···0·root·········(0)·root·········(0)····51154·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/absform.html268 -rw-r--r--···0·root·········(0)·root·········(0)····51154·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/absform.html
269 -rw-r--r--···0·root·········(0)·root·········(0)····10103·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/alt_disco.html269 -rw-r--r--···0·root·········(0)·root·········(0)····10103·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/alt_disco.html
Offset 309, 15 lines modifiedOffset 309, 15 lines modified
309 -rw-r--r--···0·root·········(0)·root·········(0)····23236·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-300-normal-YUMVEFOL.woff2309 -rw-r--r--···0·root·········(0)·root·········(0)····23236·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-300-normal-YUMVEFOL.woff2
310 -rw-r--r--···0·root·········(0)·root·········(0)····23580·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-400-normal-W7754I4D.woff2310 -rw-r--r--···0·root·········(0)·root·········(0)····23580·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-400-normal-W7754I4D.woff2
311 -rw-r--r--···0·root·········(0)·root·········(0)····23040·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-700-normal-2XVSBPG4.woff2311 -rw-r--r--···0·root·········(0)·root·········(0)····23040·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-700-normal-2XVSBPG4.woff2
312 -rw-r--r--···0·root·········(0)·root·········(0)·····5624·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-ext-300-normal-VPGGJKJL.woff2312 -rw-r--r--···0·root·········(0)·root·········(0)·····5624·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
Max diff block lines reached; 101384/125890 bytes (80.53%) of diff not shown.
12.8 KB
./usr/share/doc/erlang-doc/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
630 B
./usr/share/doc/erlang-doc/html/doc/.build
    
Offset 22, 16 lines modifiedOffset 22, 16 lines modified
22 dist/lato-latin-300-normal-YUMVEFOL.woff222 dist/lato-latin-300-normal-YUMVEFOL.woff2
23 dist/lato-latin-400-normal-W7754I4D.woff223 dist/lato-latin-400-normal-W7754I4D.woff2
24 dist/lato-latin-700-normal-2XVSBPG4.woff224 dist/lato-latin-700-normal-2XVSBPG4.woff2
25 dist/lato-latin-ext-300-normal-VPGGJKJL.woff225 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
26 dist/lato-latin-ext-400-normal-N27NCBWW.woff226 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
27 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff227 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
28 dist/remixicon-NKANDIL5.woff228 dist/remixicon-NKANDIL5.woff2
29 dist/search_data-6667DB87.js29 dist/search_data-6DCAA4BB.js
30 dist/sidebar_items-35348DA6.js30 dist/sidebar_items-D0B3FEFA.js
31 edoc.html31 edoc.html
32 efficiency_guide.html32 efficiency_guide.html
33 eldap.html33 eldap.html
34 embedded.html34 embedded.html
35 erl_interface.html35 erl_interface.html
36 erts.html36 erts.html
37 et.html37 et.html
657 B
./usr/share/doc/erlang-doc/html/doc/404.html
    
Offset 12, 15 lines modifiedOffset 12, 15 lines modified
  
12 ····<title>404··Erlang/OTP·v27.0.1</title>12 ····<title>404··Erlang/OTP·v27.0.1</title>
13 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>13 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
14 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>14 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
15 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>15 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
16 ····<script·src="dist/sidebar_items-35348DA6.js"></script>16 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
17 ····<script·src="docs_config.js"></script>17 ····<script·src="docs_config.js"></script>
18 ····<script·async·src="dist/html-7HPNBV52.js"></script>18 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
19 ··</head>19 ··</head>
20 ··<body·data-type="extras"·class="page-extra">20 ··<body·data-type="extras"·class="page-extra">
21 ····<script>21 ····<script>
  
3.37 KB
./usr/share/doc/erlang-doc/html/doc/asn1.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>asn1··Erlang/OTP·v27.0.1</title>9 ····<title>asn1\n\n<script>window.location.replace("../lib/asn1-5.3/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/asn1.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/asn1.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>asn1</span>112 ····<span>asn1\n\n&lt;script&gt;window.location.replace(&quot;../lib/asn1-5.3/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/asn1-5.3/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="snmp.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="snmp.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 snmp122 snmp\n\n<script>window.location.replace("../lib/snmp-5.16/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="crypto.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="crypto.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 crypto132 crypto\n\n<script>window.location.replace("../lib/crypto-5.5/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1020 B
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 a\x8as\x8sn\x8n1\x819 a\x8as\x8sn\x8n1\x81\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./a.as.sn.n1.1-.-5.5...3.3/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8n_\x8m_\x8p11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8n_\x8m_\x8p_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8c_\x8r_\x8y_\x8p_\x8t_\x8o12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8c_\x8r_\x8y_\x8p_\x8t_\x8o_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.5 KB
./usr/share/doc/erlang-doc/html/doc/common_test.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>common_test··Erlang/OTP·v27.0.1</title>9 ····<title>common_test\n\n<script>window.location.replace("../lib/common_test-1.27/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/testing/common_test.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/testing/common_test.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>common_test</span>112 ····<span>common_test\n\n&lt;script&gt;window.location.replace(&quot;../lib/common_test-1.27/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/common_test-1.27/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="tools.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="tools.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 tools122 tools\n\n<script>window.location.replace("../lib/tools-4.0/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="eunit.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="eunit.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 eunit132 eunit\n\n<script>window.location.replace("../lib/eunit-2.9.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.06 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 c\x8co\x8om\x8mm\x8mo\x8on\x8n_\x8_t\x8te\x8es\x8st\x8t9 c\x8co\x8om\x8mm\x8mo\x8on\x8n_\x8_t\x8te\x8es\x8st\x8t\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./c.co.om.mm.mo.on.n_._t.te.es.st.t-.-1.1...2.27.7/./d.do.oc.c/./
 10 h\x8ht\x8tm\x8ml\x8l/\x8/i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8t_\x8o_\x8o_\x8l_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8u_\x8n_\x8i_\x8t12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8u_\x8n_\x8i_\x8t_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.62 KB
./usr/share/doc/erlang-doc/html/doc/compiler.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>compiler··Erlang/OTP·v27.0.1</title>9 ····<title>compiler\n\n<script>window.location.replace("../lib/compiler-8.5.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/compiler.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/compiler.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>compiler</span>112 ····<span>compiler\n\n&lt;script&gt;window.location.replace(&quot;../lib/compiler-8.5.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/compiler-8.5.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="embedded.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="embedded.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Embedded·Systems·User's·Guide122 Embedded·Systems·User's·Guide\n\n<script>window.location.replace("../doc/system/embedded.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="erts.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="erts.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 erts132 erts\n\n<script>window.location.replace("../erts-15.0.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.17 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 c\x8co\x8om\x8mp\x8pi\x8il\x8le\x8er\x8r9 c\x8co\x8om\x8mp\x8pi\x8il\x8le\x8er\x8r\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./c.co.om.mp.pi.il.le.er.r-.-8.8...5.5...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8E_\x8m_\x8b_\x8e_\x8d_\x8d_\x8e_\x8d_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8s_\x8·_\x8U_\x8s_\x8e_\x8r_\x8'_\x8s_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8E_\x8m_\x8b_\x8e_\x8d_\x8d_\x8e_\x8d_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8s_\x8·_\x8U_\x8s_\x8e_\x8r_\x8'_\x8s_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8r_\x8t_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8r_\x8t_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.42 KB
./usr/share/doc/erlang-doc/html/doc/crypto.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>crypto··Erlang/OTP·v27.0.1</title>9 ····<title>crypto\n\n<script>window.location.replace("../lib/crypto-5.5/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/crypto.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/crypto.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>crypto</span>112 ····<span>crypto\n\n&lt;script&gt;window.location.replace(&quot;../lib/crypto-5.5/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/crypto-5.5/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="asn1.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="asn1.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 asn1122 asn1\n\n<script>window.location.replace("../lib/asn1-5.3/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="diameter.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="diameter.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 diameter132 diameter\n\n<script>window.location.replace("../lib/diameter-2.4/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.03 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 c\x8cr\x8ry\x8yp\x8pt\x8to\x8o9 c\x8cr\x8ry\x8yp\x8pt\x8to\x8o\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./c.cr.ry.yp.pt.to.o-.-5.5...5.5/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8a_\x8s_\x8n_\x8111 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8a_\x8s_\x8n_\x81_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8d_\x8i_\x8a_\x8m_\x8e_\x8t_\x8e_\x8r12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8d_\x8i_\x8a_\x8m_\x8e_\x8t_\x8e_\x8r_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.46 KB
./usr/share/doc/erlang-doc/html/doc/debugger.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>debugger··Erlang/OTP·v27.0.1</title>9 ····<title>debugger\n\n<script>window.location.replace("../lib/debugger-5.4/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/debugger.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/debugger.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>debugger</span>112 ····<span>debugger\n\n&lt;script&gt;window.location.replace(&quot;../lib/debugger-5.4/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/debugger-5.4/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="xmerl.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="xmerl.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 xmerl122 xmerl\n\n<script>window.location.replace("../lib/xmerl-2.0/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="dialyzer.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="dialyzer.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 dialyzer132 dialyzer\n\n<script>window.location.replace("../lib/dialyzer-5.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.05 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 d\x8de\x8eb\x8bu\x8ug\x8gg\x8ge\x8er\x8r9 d\x8de\x8eb\x8bu\x8ug\x8gg\x8ge\x8er\x8r\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./d.de.eb.bu.ug.gg.ge.er.r-.-5.5...4.4/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8x_\x8m_\x8e_\x8r_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8x_\x8m_\x8e_\x8r_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8d_\x8i_\x8a_\x8l_\x8y_\x8z_\x8e_\x8r12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8d_\x8i_\x8a_\x8l_\x8y_\x8z_\x8e_\x8r_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
684 B
./usr/share/doc/erlang-doc/html/doc/deprecations.html
    
Offset 10, 15 lines modifiedOffset 10, 15 lines modified
  
10 ····<title>Deprecations··Erlang/OTP·v27.0.1</title>10 ····<title>Deprecations··Erlang/OTP·v27.0.1</title>
11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
14 ····<script·src="dist/sidebar_items-35348DA6.js"></script>14 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
15 ····<script·src="docs_config.js"></script>15 ····<script·src="docs_config.js"></script>
16 ····<script·async·src="dist/html-7HPNBV52.js"></script>16 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
17 ··</head>17 ··</head>
18 ··<body·data-type="extras"·class="page-extra">18 ··<body·data-type="extras"·class="page-extra">
19 ····<script>19 ····<script>
  
3.8 KB
./usr/share/doc/erlang-doc/html/doc/design_principles.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>OTP·Design·Principles··Erlang/OTP·v27.0.1</title>9 ····<title>OTP·Design·Principles\n\n<script>window.location.replace("../doc/system/design_principles.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/design_principles.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/design_principles.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>OTP·Design·Principles</span>112 ····<span>OTP·Design·Principles\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/design_principles.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/design_principles.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="system_principles.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="system_principles.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 System·Principles122 System·Principles\n\n<script>window.location.replace("../doc/system/system_principles.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="programming_examples.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="programming_examples.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 Programming·Examples132 Programming·Examples\n\n<script>window.location.replace("../doc/system/programming_examples.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.25 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 O\x8OT\x8TP\x8P·D\x8De\x8es\x8si\x8ig\x8gn\x8n·P\x8Pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s9 O\x8OT\x8TP\x8P·D\x8De\x8es\x8si\x8ig\x8gn\x8n·P\x8Pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 d\x8de\x8es\x8si\x8ig\x8gn\x8n_\x8_p\x8pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8P_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8E_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8P_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8E_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.44 KB
./usr/share/doc/erlang-doc/html/doc/dialyzer.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>dialyzer··Erlang/OTP·v27.0.1</title>9 ····<title>dialyzer\n\n<script>window.location.replace("../lib/dialyzer-5.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/dialyzer.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/dialyzer.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>dialyzer</span>112 ····<span>dialyzer\n\n&lt;script&gt;window.location.replace(&quot;../lib/dialyzer-5.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/dialyzer-5.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="debugger.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="debugger.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 debugger122 debugger\n\n<script>window.location.replace("../lib/debugger-5.4/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="et.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="et.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 et132 et\n\n<script>window.location.replace("../lib/et-1.7.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.03 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 d\x8di\x8ia\x8al\x8ly\x8yz\x8ze\x8er\x8r9 d\x8di\x8ia\x8al\x8ly\x8yz\x8ze\x8er\x8r\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./d.di.ia.al.ly.yz.ze.er.r-.-5.5...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8d_\x8e_\x8b_\x8u_\x8g_\x8g_\x8e_\x8r11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8d_\x8e_\x8b_\x8u_\x8g_\x8g_\x8e_\x8r_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8t12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8t_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.45 KB
./usr/share/doc/erlang-doc/html/doc/diameter.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>diameter··Erlang/OTP·v27.0.1</title>9 ····<title>diameter\n\n<script>window.location.replace("../lib/diameter-2.4/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/diameter.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/diameter.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>diameter</span>112 ····<span>diameter\n\n&lt;script&gt;window.location.replace(&quot;../lib/diameter-2.4/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/diameter-2.4/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="crypto.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="crypto.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 crypto122 crypto\n\n<script>window.location.replace("../lib/crypto-5.5/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="eldap.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="eldap.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 eldap132 eldap\n\n<script>window.location.replace("../lib/eldap-1.2.13/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.04 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 d\x8di\x8ia\x8am\x8me\x8et\x8te\x8er\x8r9 d\x8di\x8ia\x8am\x8me\x8et\x8te\x8er\x8r\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./d.di.ia.am.me.et.te.er.r-.-2.2...4.4/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8c_\x8r_\x8y_\x8p_\x8t_\x8o11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8c_\x8r_\x8y_\x8p_\x8t_\x8o_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8l_\x8d_\x8a_\x8p12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8l_\x8d_\x8a_\x8p_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
2.92 KB
./usr/share/doc/erlang-doc/html/doc/edoc.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>edoc··Erlang/OTP·v27.0.1</title>9 ····<title>edoc\n\n<script>window.location.replace("../lib/edoc-1.3.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 29 lines modifiedOffset 108, 29 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/documentation/edoc.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/documentation/edoc.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>edoc</span>112 ····<span>edoc\n\n&lt;script&gt;window.location.replace(&quot;../lib/edoc-1.3.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/edoc-1.3.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="eunit.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="eunit.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 eunit122 eunit\n\n<script>window.location.replace("../lib/eunit-2.9.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ··</div>127 ··</div>
908 B
html2text {}
    
Offset 1, 12 lines modifiedOffset 1, 14 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 e\x8ed\x8do\x8oc\x8c9 e\x8ed\x8do\x8oc\x8c\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./e.ed.do.oc.c-.-1.1...3.3...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8u_\x8n_\x8i_\x8t11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8u_\x8n_\x8i_\x8t_.\_.n_.\_.n
10 Search·HexDocs12 Search·HexDocs
11 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e13 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
12 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B14 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.81 KB
./usr/share/doc/erlang-doc/html/doc/efficiency_guide.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Efficiency·Guide··Erlang/OTP·v27.0.1</title>9 ····<title>Efficiency·Guide\n\n<script>window.location.replace("../doc/system/efficiency_guide.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/efficiency_guide.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/efficiency_guide.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Efficiency·Guide</span>112 ····<span>Efficiency·Guide\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/efficiency_guide.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/efficiency_guide.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="reference_manual.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="reference_manual.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Erlang·Reference·Manual122 Erlang·Reference·Manual\n\n<script>window.location.replace("../doc/system/reference_manual.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="tutorial.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="tutorial.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 Interoperability·Tutorial132 Interoperability·Tutorial\n\n<script>window.location.replace("../doc/system/tutorial.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.29 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 E\x8Ef\x8ff\x8fi\x8ic\x8ci\x8ie\x8en\x8nc\x8cy\x8y·G\x8Gu\x8ui\x8id\x8de\x8e9 E\x8Ef\x8ff\x8fi\x8ic\x8ci\x8ie\x8en\x8nc\x8cy\x8y·G\x8Gu\x8ui\x8id\x8de\x8e\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 e\x8ef\x8ff\x8fi\x8ic\x8ci\x8ie\x8en\x8nc\x8cy\x8y_\x8_g\x8gu\x8ui\x8id\x8de\x8e.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8R_\x8e_\x8f_\x8e_\x8r_\x8e_\x8n_\x8c_\x8e_\x8·_\x8M_\x8a_\x8n_\x8u_\x8a_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8R_\x8e_\x8f_\x8e_\x8r_\x8e_\x8n_\x8c_\x8e_\x8·_\x8M_\x8a_\x8n_\x8u_\x8a_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8I_\x8n_\x8t_\x8e_\x8r_\x8o_\x8p_\x8e_\x8r_\x8a_\x8b_\x8i_\x8l_\x8i_\x8t_\x8y_\x8·_\x8T_\x8u_\x8t_\x8o_\x8r_\x8i_\x8a_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8I_\x8n_\x8t_\x8e_\x8r_\x8o_\x8p_\x8e_\x8r_\x8a_\x8b_\x8i_\x8l_\x8i_\x8t_\x8y_\x8·_\x8T_\x8u_\x8t_\x8o_\x8r_\x8i_\x8a_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.51 KB
./usr/share/doc/erlang-doc/html/doc/eldap.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>eldap··Erlang/OTP·v27.0.1</title>9 ····<title>eldap\n\n<script>window.location.replace("../lib/eldap-1.2.13/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/eldap.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/eldap.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>eldap</span>112 ····<span>eldap\n\n&lt;script&gt;window.location.replace(&quot;../lib/eldap-1.2.13/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/eldap-1.2.13/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="diameter.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="diameter.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 diameter122 diameter\n\n<script>window.location.replace("../lib/diameter-2.4/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="erl_interface.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="erl_interface.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 erl_interface132 erl_interface\n\n<script>window.location.replace("../lib/erl_interface-5.5.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.08 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 e\x8el\x8ld\x8da\x8ap\x8p9 e\x8el\x8ld\x8da\x8ap\x8p\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./e.el.ld.da.ap.p-.-1.1...2.2...1.13.3/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8d_\x8i_\x8a_\x8m_\x8e_\x8t_\x8e_\x8r11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8d_\x8i_\x8a_\x8m_\x8e_\x8t_\x8e_\x8r_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8r_\x8l_\x8__\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8r_\x8l_\x8__\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.64 KB
./usr/share/doc/erlang-doc/html/doc/embedded.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Embedded·Systems·User's·Guide··Erlang/OTP·v27.0.1</title>9 ····<title>Embedded·Systems·User's·Guide\n\n<script>window.location.replace("../doc/system/embedded.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/embedded.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/embedded.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Embedded·Systems·User's·Guide</span>112 ····<span>Embedded·Systems·User's·Guide\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/embedded.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/embedded.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="oam.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="oam.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 OAM·Principles122 OAM·Principles\n\n<script>window.location.replace("../doc/system/oam.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="compiler.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="compiler.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 compiler132 compiler\n\n<script>window.location.replace("../lib/compiler-8.5.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.18 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 E\x8Em\x8mb\x8be\x8ed\x8dd\x8de\x8ed\x8d·S\x8Sy\x8ys\x8st\x8te\x8em\x8ms\x8s·U\x8Us\x8se\x8er\x8r'\x8's\x8s·G\x8Gu\x8ui\x8id\x8de\x8e9 E\x8Em\x8mb\x8be\x8ed\x8dd\x8de\x8ed\x8d·S\x8Sy\x8ys\x8st\x8te\x8em\x8ms\x8s·U\x8Us\x8se\x8er\x8r'\x8's\x8s·G\x8Gu\x8ui\x8id\x8de\x8e\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./
 10 s\x8sy\x8ys\x8st\x8te\x8em\x8m/\x8/e\x8em\x8mb\x8be\x8ed\x8dd\x8de\x8ed\x8d.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8O_\x8A_\x8M_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8O_\x8A_\x8M_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8c_\x8o_\x8m_\x8p_\x8i_\x8l_\x8e_\x8r12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8c_\x8o_\x8m_\x8p_\x8i_\x8l_\x8e_\x8r_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.53 KB
./usr/share/doc/erlang-doc/html/doc/erl_interface.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>erl_interface··Erlang/OTP·v27.0.1</title>9 ····<title>erl_interface\n\n<script>window.location.replace("../lib/erl_interface-5.5.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/erl_interface.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/erl_interface.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>erl_interface</span>112 ····<span>erl_interface\n\n&lt;script&gt;window.location.replace(&quot;../lib/erl_interface-5.5.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/erl_interface-5.5.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="eldap.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="eldap.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 eldap122 eldap\n\n<script>window.location.replace("../lib/eldap-1.2.13/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="ftp.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="ftp.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 ftp132 ftp\n\n<script>window.location.replace("../lib/ftp-1.2.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.07 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 e\x8er\x8rl\x8l_\x8_i\x8in\x8nt\x8te\x8er\x8rf\x8fa\x8ac\x8ce\x8e9 e\x8er\x8rl\x8l_\x8_i\x8in\x8nt\x8te\x8er\x8rf\x8fa\x8ac\x8ce\x8e\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./e.er.rl.l_._i.in.nt.te.er.rf.fa.ac.ce.e-.-5.5...5.5...2.2/./
 10 d\x8do\x8oc\x8c/\x8/h\x8ht\x8tm\x8ml\x8l/\x8/i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8l_\x8d_\x8a_\x8p11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8l_\x8d_\x8a_\x8p_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8f_\x8t_\x8p12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8f_\x8t_\x8p_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.4 KB
./usr/share/doc/erlang-doc/html/doc/erts.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>erts··Erlang/OTP·v27.0.1</title>9 ····<title>erts\n\n<script>window.location.replace("../erts-15.0.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/erts.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/erts.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>erts</span>112 ····<span>erts\n\n&lt;script&gt;window.location.replace(&quot;../erts-15.0.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../erts-15.0.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="compiler.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="compiler.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 compiler122 compiler\n\n<script>window.location.replace("../lib/compiler-8.5.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="kernel.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="kernel.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 kernel132 kernel\n\n<script>window.location.replace("../lib/kernel-10.0.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.02 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 e\x8er\x8rt\x8ts\x8s9 e\x8er\x8rt\x8ts\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././e.er.rt.ts.s-.-1.15.5...0.0...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./i.in.nd.de.ex.x...h.ht.tm.ml.l".").)<.</./
 10 s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8c_\x8o_\x8m_\x8p_\x8i_\x8l_\x8e_\x8r11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8c_\x8o_\x8m_\x8p_\x8i_\x8l_\x8e_\x8r_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8k_\x8e_\x8r_\x8n_\x8e_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8k_\x8e_\x8r_\x8n_\x8e_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.39 KB
./usr/share/doc/erlang-doc/html/doc/et.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>et··Erlang/OTP·v27.0.1</title>9 ····<title>et\n\n<script>window.location.replace("../lib/et-1.7.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/et.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/et.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>et</span>112 ····<span>et\n\n&lt;script&gt;window.location.replace(&quot;../lib/et-1.7.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/et-1.7.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="dialyzer.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="dialyzer.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 dialyzer122 dialyzer\n\n<script>window.location.replace("../lib/dialyzer-5.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="observer.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="observer.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 observer132 observer\n\n<script>window.location.replace("../lib/observer-2.16/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.02 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 e\x8et\x8t9 e\x8et\x8t\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./e.et.t-.-1.1...7.7...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./i.in.nd.de.ex.x...h.ht.tm.ml.l".").)<.</./
 10 s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8d_\x8i_\x8a_\x8l_\x8y_\x8z_\x8e_\x8r11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8d_\x8i_\x8a_\x8l_\x8y_\x8z_\x8e_\x8r_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8o_\x8b_\x8s_\x8e_\x8r_\x8v_\x8e_\x8r12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8o_\x8b_\x8s_\x8e_\x8r_\x8v_\x8e_\x8r_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.44 KB
./usr/share/doc/erlang-doc/html/doc/eunit.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>eunit··Erlang/OTP·v27.0.1</title>9 ····<title>eunit\n\n<script>window.location.replace("../lib/eunit-2.9.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/testing/eunit.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/testing/eunit.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>eunit</span>112 ····<span>eunit\n\n&lt;script&gt;window.location.replace(&quot;../lib/eunit-2.9.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/eunit-2.9.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="common_test.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="common_test.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 common_test122 common_test\n\n<script>window.location.replace("../lib/common_test-1.27/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="edoc.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="edoc.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 edoc132 edoc\n\n<script>window.location.replace("../lib/edoc-1.3.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.04 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 e\x8eu\x8un\x8ni\x8it\x8t9 e\x8eu\x8un\x8ni\x8it\x8t\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./e.eu.un.ni.it.t-.-2.2...9.9...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8c_\x8o_\x8m_\x8m_\x8o_\x8n_\x8__\x8t_\x8e_\x8s_\x8t11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8c_\x8o_\x8m_\x8m_\x8o_\x8n_\x8__\x8t_\x8e_\x8s_\x8t_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8d_\x8o_\x8c12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8e_\x8d_\x8o_\x8c_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.44 KB
./usr/share/doc/erlang-doc/html/doc/ftp.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>ftp··Erlang/OTP·v27.0.1</title>9 ····<title>ftp\n\n<script>window.location.replace("../lib/ftp-1.2.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/ftp.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/ftp.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>ftp</span>112 ····<span>ftp\n\n&lt;script&gt;window.location.replace(&quot;../lib/ftp-1.2.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/ftp-1.2.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="erl_interface.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="erl_interface.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 erl_interface122 erl_interface\n\n<script>window.location.replace("../lib/erl_interface-5.5.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="inets.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="inets.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 inets132 inets\n\n<script>window.location.replace("../lib/inets-9.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.04 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 f\x8ft\x8tp\x8p9 f\x8ft\x8tp\x8p\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./f.ft.tp.p-.-1.1...2.2...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8r_\x8l_\x8__\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8r_\x8l_\x8__\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8i_\x8n_\x8e_\x8t_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8i_\x8n_\x8e_\x8t_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.82 KB
./usr/share/doc/erlang-doc/html/doc/getting_started.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Getting·Started·With·Erlang··Erlang/OTP·v27.0.1</title>9 ····<title>Getting·Started·With·Erlang\n\n<script>window.location.replace("../doc/system/getting_started.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/getting_started.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/getting_started.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Getting·Started·With·Erlang</span>112 ····<span>Getting·Started·With·Erlang\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/getting_started.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/getting_started.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="installation_guide.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="installation_guide.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Installation·Guide122 Installation·Guide\n\n<script>window.location.replace("../doc/system/installation_guide.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="system_principles.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="system_principles.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 System·Principles132 System·Principles\n\n<script>window.location.replace("../doc/system/system_principles.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.26 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 G\x8Ge\x8et\x8tt\x8ti\x8in\x8ng\x8g·S\x8St\x8ta\x8ar\x8rt\x8te\x8ed\x8d·W\x8Wi\x8it\x8th\x8h·E\x8Er\x8rl\x8la\x8an\x8ng\x8g9 G\x8Ge\x8et\x8tt\x8ti\x8in\x8ng\x8g·S\x8St\x8ta\x8ar\x8rt\x8te\x8ed\x8d·W\x8Wi\x8it\x8th\x8h·E\x8Er\x8rl\x8la\x8an\x8ng\x8g\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 g\x8ge\x8et\x8tt\x8ti\x8in\x8ng\x8g_\x8_s\x8st\x8ta\x8ar\x8rt\x8te\x8ed\x8d.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8I_\x8n_\x8s_\x8t_\x8a_\x8l_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8I_\x8n_\x8s_\x8t_\x8a_\x8l_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.42 KB
./usr/share/doc/erlang-doc/html/doc/inets.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>inets··Erlang/OTP·v27.0.1</title>9 ····<title>inets\n\n<script>window.location.replace("../lib/inets-9.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/inets.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/inets.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>inets</span>112 ····<span>inets\n\n&lt;script&gt;window.location.replace(&quot;../lib/inets-9.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/inets-9.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="ftp.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="ftp.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 ftp122 ftp\n\n<script>window.location.replace("../lib/ftp-1.2.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="jinterface.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="jinterface.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 jinterface132 jinterface\n\n<script>window.location.replace("../lib/jinterface-1.14.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.02 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 i\x8in\x8ne\x8et\x8ts\x8s9 i\x8in\x8ne\x8et\x8ts\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./i.in.ne.et.ts.s-.-9.9...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8f_\x8t_\x8p11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8f_\x8t_\x8p_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8j_\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8j_\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.58 KB
./usr/share/doc/erlang-doc/html/doc/installation_guide.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Installation·Guide··Erlang/OTP·v27.0.1</title>9 ····<title>Installation·Guide\n\n<script>window.location.replace("../doc/system/installation_guide.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 18 lines modifiedOffset 108, 18 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/installation_guide.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/installation_guide.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Installation·Guide</span>112 ····<span>Installation·Guide\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/installation_guide.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/installation_guide.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="upcoming_incompatibilities.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="upcoming_incompatibilities.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
Offset 134, 15 lines modifiedOffset 134, 15 lines modified
134 ··<div·class="bottom-actions-item">134 ··<div·class="bottom-actions-item">
  
135 ······<a·href="getting_started.html"·class="bottom-actions-button"·rel="next">135 ······<a·href="getting_started.html"·class="bottom-actions-button"·rel="next">
136 ········<span·class="subheader">136 ········<span·class="subheader">
137 ··········Next·Page·137 ··········Next·Page·
138 ········</span>138 ········</span>
139 ········<span·class="title">139 ········<span·class="title">
140 Getting·Started·With·Erlang140 Getting·Started·With·Erlang\n\n<script>window.location.replace("../doc/system/getting_started.html")</script>
141 ········</span>141 ········</span>
142 ······</a>142 ······</a>
  
143 ··</div>143 ··</div>
144 </div>144 </div>
145 ····<footer·class="footer">145 ····<footer·class="footer">
146 ······<p>146 ······<p>
1.22 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 I\x8In\x8ns\x8st\x8ta\x8al\x8ll\x8la\x8at\x8ti\x8io\x8on\x8n·G\x8Gu\x8ui\x8id\x8de\x8e9 I\x8In\x8ns\x8st\x8ta\x8al\x8ll\x8la\x8at\x8ti\x8io\x8on\x8n·G\x8Gu\x8ui\x8id\x8de\x8e\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 i\x8in\x8ns\x8st\x8ta\x8al\x8ll\x8la\x8at\x8ti\x8io\x8on\x8n_\x8_g\x8gu\x8ui\x8id\x8de\x8e.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8U_\x8p_\x8c_\x8o_\x8m_\x8i_\x8n_\x8g_\x8·_\x8P_\x8o_\x8t_\x8e_\x8n_\x8t_\x8i_\x8a_\x8l_\x8·_\x8I_\x8n_\x8c_\x8o_\x8m_\x8p_\x8a_\x8t_\x8i_\x8b_\x8i_\x8l_\x8i_\x8t_\x8i_\x8e_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8U_\x8p_\x8c_\x8o_\x8m_\x8i_\x8n_\x8g_\x8·_\x8P_\x8o_\x8t_\x8e_\x8n_\x8t_\x8i_\x8a_\x8l_\x8·_\x8I_\x8n_\x8c_\x8o_\x8m_\x8p_\x8a_\x8t_\x8i_\x8b_\x8i_\x8l_\x8i_\x8t_\x8i_\x8e_\x8s
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d_\x8·_\x8W_\x8i_\x8t_\x8h_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d_\x8·_\x8W_\x8i_\x8t_\x8h_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.5 KB
./usr/share/doc/erlang-doc/html/doc/jinterface.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>jinterface··Erlang/OTP·v27.0.1</title>9 ····<title>jinterface\n\n<script>window.location.replace("../lib/jinterface-1.14.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/jinterface.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/jinterface.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>jinterface</span>112 ····<span>jinterface\n\n&lt;script&gt;window.location.replace(&quot;../lib/jinterface-1.14.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/jinterface-1.14.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="inets.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="inets.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 inets122 inets\n\n<script>window.location.replace("../lib/inets-9.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="megaco.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="megaco.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 megaco132 megaco\n\n<script>window.location.replace("../lib/megaco-4.6/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.06 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 j\x8ji\x8in\x8nt\x8te\x8er\x8rf\x8fa\x8ac\x8ce\x8e9 j\x8ji\x8in\x8nt\x8te\x8er\x8rf\x8fa\x8ac\x8ce\x8e\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./j.ji.in.nt.te.er.rf.fa.ac.ce.e-.-1.1...1.14.4...1.1/./d.do.oc.c/./
 10 h\x8ht\x8tm\x8ml\x8l/\x8/i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8i_\x8n_\x8e_\x8t_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8i_\x8n_\x8e_\x8t_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8m_\x8e_\x8g_\x8a_\x8c_\x8o12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8m_\x8e_\x8g_\x8a_\x8c_\x8o_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.39 KB
./usr/share/doc/erlang-doc/html/doc/kernel.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>kernel··Erlang/OTP·v27.0.1</title>9 ····<title>kernel\n\n<script>window.location.replace("../lib/kernel-10.0.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/kernel.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/kernel.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>kernel</span>112 ····<span>kernel\n\n&lt;script&gt;window.location.replace(&quot;../lib/kernel-10.0.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/kernel-10.0.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="erts.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="erts.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 erts122 erts\n\n<script>window.location.replace("../erts-15.0.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="sasl.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="sasl.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 sasl132 sasl\n\n<script>window.location.replace("../lib/sasl-4.2.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.01 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 k\x8ke\x8er\x8rn\x8ne\x8el\x8l9 k\x8ke\x8er\x8rn\x8ne\x8el\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./k.ke.er.rn.ne.el.l-.-1.10.0...0.0...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8r_\x8t_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8r_\x8t_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8a_\x8s_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8a_\x8s_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
678 B
./usr/share/doc/erlang-doc/html/doc/man_index.html
    
Offset 10, 15 lines modifiedOffset 10, 15 lines modified
  
10 ····<title>Module·Index··Erlang/OTP·v27.0.1</title>10 ····<title>Module·Index··Erlang/OTP·v27.0.1</title>
11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
14 ····<script·src="dist/sidebar_items-35348DA6.js"></script>14 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
15 ····<script·src="docs_config.js"></script>15 ····<script·src="docs_config.js"></script>
16 ····<script·async·src="dist/html-7HPNBV52.js"></script>16 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
17 ··</head>17 ··</head>
18 ··<body·data-type="extras"·class="page-extra">18 ··<body·data-type="extras"·class="page-extra">
19 ····<script>19 ····<script>
  
3.5 KB
./usr/share/doc/erlang-doc/html/doc/megaco.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>megaco··Erlang/OTP·v27.0.1</title>9 ····<title>megaco\n\n<script>window.location.replace("../lib/megaco-4.6/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/megaco.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/megaco.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>megaco</span>112 ····<span>megaco\n\n&lt;script&gt;window.location.replace(&quot;../lib/megaco-4.6/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/megaco-4.6/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="jinterface.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="jinterface.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 jinterface122 jinterface\n\n<script>window.location.replace("../lib/jinterface-1.14.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="public_key.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="public_key.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 public_key132 public_key\n\n<script>window.location.replace("../lib/public_key-1.16.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.07 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 m\x8me\x8eg\x8ga\x8ac\x8co\x8o9 m\x8me\x8eg\x8ga\x8ac\x8co\x8o\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./m.me.eg.ga.ac.co.o-.-4.4...6.6/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8j_\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8j_\x8i_\x8n_\x8t_\x8e_\x8r_\x8f_\x8a_\x8c_\x8e_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8p_\x8u_\x8b_\x8l_\x8i_\x8c_\x8__\x8k_\x8e_\x8y12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8p_\x8u_\x8b_\x8l_\x8i_\x8c_\x8__\x8k_\x8e_\x8y_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.42 KB
./usr/share/doc/erlang-doc/html/doc/mnesia.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>mnesia··Erlang/OTP·v27.0.1</title>9 ····<title>mnesia\n\n<script>window.location.replace("../lib/mnesia-4.23.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/database/mnesia.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/database/mnesia.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>mnesia</span>112 ····<span>mnesia\n\n&lt;script&gt;window.location.replace(&quot;../lib/mnesia-4.23.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/mnesia-4.23.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="stdlib.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="stdlib.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 stdlib122 stdlib\n\n<script>window.location.replace("../lib/stdlib-6.0.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="odbc.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="odbc.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 odbc132 odbc\n\n<script>window.location.replace("../lib/odbc-2.14.3/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.02 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 m\x8mn\x8ne\x8es\x8si\x8ia\x8a9 m\x8mn\x8ne\x8es\x8si\x8ia\x8a\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./m.mn.ne.es.si.ia.a-.-4.4...2.23.3...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8t_\x8d_\x8l_\x8i_\x8b11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8t_\x8d_\x8l_\x8i_\x8b_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8o_\x8d_\x8b_\x8c12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8o_\x8d_\x8b_\x8c_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.71 KB
./usr/share/doc/erlang-doc/html/doc/oam.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>OAM·Principles··Erlang/OTP·v27.0.1</title>9 ····<title>OAM·Principles\n\n<script>window.location.replace("../doc/system/oam.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/oam.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/oam.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>OAM·Principles</span>112 ····<span>OAM·Principles\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/oam.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/oam.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="tutorial.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="tutorial.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Interoperability·Tutorial122 Interoperability·Tutorial\n\n<script>window.location.replace("../doc/system/tutorial.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="embedded.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="embedded.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 Embedded·Systems·User's·Guide132 Embedded·Systems·User's·Guide\n\n<script>window.location.replace("../doc/system/embedded.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.27 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 O\x8OA\x8AM\x8M·P\x8Pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s9 O\x8OA\x8AM\x8M·P\x8Pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./o.oa.am.m...h.ht.tm.ml.l".").)<.</./
 10 s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8I_\x8n_\x8t_\x8e_\x8r_\x8o_\x8p_\x8e_\x8r_\x8a_\x8b_\x8i_\x8l_\x8i_\x8t_\x8y_\x8·_\x8T_\x8u_\x8t_\x8o_\x8r_\x8i_\x8a_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8I_\x8n_\x8t_\x8e_\x8r_\x8o_\x8p_\x8e_\x8r_\x8a_\x8b_\x8i_\x8l_\x8i_\x8t_\x8y_\x8·_\x8T_\x8u_\x8t_\x8o_\x8r_\x8i_\x8a_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8E_\x8m_\x8b_\x8e_\x8d_\x8d_\x8e_\x8d_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8s_\x8·_\x8U_\x8s_\x8e_\x8r_\x8'_\x8s_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8E_\x8m_\x8b_\x8e_\x8d_\x8d_\x8e_\x8d_\x8·_\x8S_\x8y_\x8s_\x8t_\x8e_\x8m_\x8s_\x8·_\x8U_\x8s_\x8e_\x8r_\x8'_\x8s_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.46 KB
./usr/share/doc/erlang-doc/html/doc/observer.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>observer··Erlang/OTP·v27.0.1</title>9 ····<title>observer\n\n<script>window.location.replace("../lib/observer-2.16/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/observer.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/observer.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>observer</span>112 ····<span>observer\n\n&lt;script&gt;window.location.replace(&quot;../lib/observer-2.16/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/observer-2.16/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="et.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="et.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 et122 et\n\n<script>window.location.replace("../lib/et-1.7.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="parsetools.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="parsetools.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 parsetools132 parsetools\n\n<script>window.location.replace("../lib/parsetools-2.6/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.05 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 o\x8ob\x8bs\x8se\x8er\x8rv\x8ve\x8er\x8r9 o\x8ob\x8bs\x8se\x8er\x8rv\x8ve\x8er\x8r\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./o.ob.bs.se.er.rv.ve.er.r-.-2.2...1.16.6/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8t11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8e_\x8t_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8p_\x8a_\x8r_\x8s_\x8e_\x8t_\x8o_\x8o_\x8l_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8p_\x8a_\x8r_\x8s_\x8e_\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.4 KB
./usr/share/doc/erlang-doc/html/doc/odbc.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>odbc··Erlang/OTP·v27.0.1</title>9 ····<title>odbc\n\n<script>window.location.replace("../lib/odbc-2.14.3/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/database/odbc.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/database/odbc.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>odbc</span>112 ····<span>odbc\n\n&lt;script&gt;window.location.replace(&quot;../lib/odbc-2.14.3/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/odbc-2.14.3/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="mnesia.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="mnesia.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 mnesia122 mnesia\n\n<script>window.location.replace("../lib/mnesia-4.23.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="os_mon.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="os_mon.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 os_mon132 os_mon\n\n<script>window.location.replace("../lib/os_mon-2.10/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.02 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 o\x8od\x8db\x8bc\x8c9 o\x8od\x8db\x8bc\x8c\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./o.od.db.bc.c-.-2.2...1.14.4...3.3/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8m_\x8n_\x8e_\x8s_\x8i_\x8a11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8m_\x8n_\x8e_\x8s_\x8i_\x8a_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8o_\x8s_\x8__\x8m_\x8o_\x8n12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8o_\x8s_\x8__\x8m_\x8o_\x8n_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.38 KB
./usr/share/doc/erlang-doc/html/doc/os_mon.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>os_mon··Erlang/OTP·v27.0.1</title>9 ····<title>os_mon\n\n<script>window.location.replace("../lib/os_mon-2.10/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/oam/os_mon.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/oam/os_mon.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>os_mon</span>112 ····<span>os_mon\n\n&lt;script&gt;window.location.replace(&quot;../lib/os_mon-2.10/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/os_mon-2.10/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="odbc.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="odbc.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 odbc122 odbc\n\n<script>window.location.replace("../lib/odbc-2.14.3/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="snmp.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="snmp.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 snmp132 snmp\n\n<script>window.location.replace("../lib/snmp-5.16/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.0 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 o\x8os\x8s_\x8_m\x8mo\x8on\x8n9 o\x8os\x8s_\x8_m\x8mo\x8on\x8n\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./o.os.s_._m.mo.on.n-.-2.2...1.10.0/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8o_\x8d_\x8b_\x8c11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8o_\x8d_\x8b_\x8c_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8n_\x8m_\x8p12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8n_\x8m_\x8p_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.52 KB
./usr/share/doc/erlang-doc/html/doc/parsetools.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>parsetools··Erlang/OTP·v27.0.1</title>9 ····<title>parsetools\n\n<script>window.location.replace("../lib/parsetools-2.6/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/parsetools.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/parsetools.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>parsetools</span>112 ····<span>parsetools\n\n&lt;script&gt;window.location.replace(&quot;../lib/parsetools-2.6/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/parsetools-2.6/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="observer.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="observer.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 observer122 observer\n\n<script>window.location.replace("../lib/observer-2.16/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="reltool.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="reltool.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 reltool132 reltool\n\n<script>window.location.replace("../lib/reltool-1.0.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.08 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 p\x8pa\x8ar\x8rs\x8se\x8et\x8to\x8oo\x8ol\x8ls\x8s9 p\x8pa\x8ar\x8rs\x8se\x8et\x8to\x8oo\x8ol\x8ls\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./p.pa.ar.rs.se.et.to.oo.ol.ls.s-.-2.2...6.6/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8o_\x8b_\x8s_\x8e_\x8r_\x8v_\x8e_\x8r11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8o_\x8b_\x8s_\x8e_\x8r_\x8v_\x8e_\x8r_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8r_\x8e_\x8l_\x8t_\x8o_\x8o_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8r_\x8e_\x8l_\x8t_\x8o_\x8o_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.87 KB
./usr/share/doc/erlang-doc/html/doc/programming_examples.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Programming·Examples··Erlang/OTP·v27.0.1</title>9 ····<title>Programming·Examples\n\n<script>window.location.replace("../doc/system/programming_examples.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/programming_examples.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/programming_examples.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Programming·Examples</span>112 ····<span>Programming·Examples\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/programming_examples.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/programming_examples.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="design_principles.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="design_principles.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 OTP·Design·Principles122 OTP·Design·Principles\n\n<script>window.location.replace("../doc/system/design_principles.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="reference_manual.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="reference_manual.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 Erlang·Reference·Manual132 Erlang·Reference·Manual\n\n<script>window.location.replace("../doc/system/reference_manual.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.3 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 P\x8Pr\x8ro\x8og\x8gr\x8ra\x8am\x8mm\x8mi\x8in\x8ng\x8g·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8es\x8s9 P\x8Pr\x8ro\x8og\x8gr\x8ra\x8am\x8mm\x8mi\x8in\x8ng\x8g·E\x8Ex\x8xa\x8am\x8mp\x8pl\x8le\x8es\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 p\x8pr\x8ro\x8og\x8gr\x8ra\x8am\x8mm\x8mi\x8in\x8ng\x8g_\x8_e\x8ex\x8xa\x8am\x8mp\x8pl\x8le\x8es\x8s.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8O_\x8T_\x8P_\x8·_\x8D_\x8e_\x8s_\x8i_\x8g_\x8n_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8O_\x8T_\x8P_\x8·_\x8D_\x8e_\x8s_\x8i_\x8g_\x8n_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8R_\x8e_\x8f_\x8e_\x8r_\x8e_\x8n_\x8c_\x8e_\x8·_\x8M_\x8a_\x8n_\x8u_\x8a_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8R_\x8e_\x8f_\x8e_\x8r_\x8e_\x8n_\x8c_\x8e_\x8·_\x8M_\x8a_\x8n_\x8u_\x8a_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.49 KB
./usr/share/doc/erlang-doc/html/doc/public_key.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>public_key··Erlang/OTP·v27.0.1</title>9 ····<title>public_key\n\n<script>window.location.replace("../lib/public_key-1.16.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/public_key.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/public_key.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>public_key</span>112 ····<span>public_key\n\n&lt;script&gt;window.location.replace(&quot;../lib/public_key-1.16.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/public_key-1.16.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="megaco.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="megaco.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 megaco122 megaco\n\n<script>window.location.replace("../lib/megaco-4.6/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="ssh.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="ssh.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 ssh132 ssh\n\n<script>window.location.replace("../lib/ssh-5.2.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.05 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 p\x8pu\x8ub\x8bl\x8li\x8ic\x8c_\x8_k\x8ke\x8ey\x8y9 p\x8pu\x8ub\x8bl\x8li\x8ic\x8c_\x8_k\x8ke\x8ey\x8y\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./p.pu.ub.bl.li.ic.c_._k.ke.ey.y-.-1.1...1.16.6...1.1/./d.do.oc.c/./
 10 h\x8ht\x8tm\x8ml\x8l/\x8/i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8m_\x8e_\x8g_\x8a_\x8c_\x8o11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8m_\x8e_\x8g_\x8a_\x8c_\x8o_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8s_\x8h12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8s_\x8h_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
677 B
./usr/share/doc/erlang-doc/html/doc/readme.html
    
Offset 10, 15 lines modifiedOffset 10, 15 lines modified
  
10 ····<title>Erlang/OTP·27.0.1··Erlang/OTP·v27.0.1</title>10 ····<title>Erlang/OTP·27.0.1··Erlang/OTP·v27.0.1</title>
11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
14 ····<script·src="dist/sidebar_items-35348DA6.js"></script>14 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
15 ····<script·src="docs_config.js"></script>15 ····<script·src="docs_config.js"></script>
16 ····<script·async·src="dist/html-7HPNBV52.js"></script>16 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
17 ··</head>17 ··</head>
18 ··<body·data-type="extras"·class="page-extra">18 ··<body·data-type="extras"·class="page-extra">
19 ····<script>19 ····<script>
  
3.8 KB
./usr/share/doc/erlang-doc/html/doc/reference_manual.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Erlang·Reference·Manual··Erlang/OTP·v27.0.1</title>9 ····<title>Erlang·Reference·Manual\n\n<script>window.location.replace("../doc/system/reference_manual.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/reference_manual.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/reference_manual.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Erlang·Reference·Manual</span>112 ····<span>Erlang·Reference·Manual\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/reference_manual.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/reference_manual.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="programming_examples.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="programming_examples.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Programming·Examples122 Programming·Examples\n\n<script>window.location.replace("../doc/system/programming_examples.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="efficiency_guide.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="efficiency_guide.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 Efficiency·Guide132 Efficiency·Guide\n\n<script>window.location.replace("../doc/system/efficiency_guide.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.25 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 E\x8Er\x8rl\x8la\x8an\x8ng\x8g·R\x8Re\x8ef\x8fe\x8er\x8re\x8en\x8nc\x8ce\x8e·M\x8Ma\x8an\x8nu\x8ua\x8al\x8l9 E\x8Er\x8rl\x8la\x8an\x8ng\x8g·R\x8Re\x8ef\x8fe\x8er\x8re\x8en\x8nc\x8ce\x8e·M\x8Ma\x8an\x8nu\x8ua\x8al\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 r\x8re\x8ef\x8fe\x8er\x8re\x8en\x8nc\x8ce\x8e_\x8_m\x8ma\x8an\x8nu\x8ua\x8al\x8l.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8P_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8E_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8P_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8E_\x8x_\x8a_\x8m_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8E_\x8f_\x8f_\x8i_\x8c_\x8i_\x8e_\x8n_\x8c_\x8y_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8E_\x8f_\x8f_\x8i_\x8c_\x8i_\x8e_\x8n_\x8c_\x8y_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.55 KB
./usr/share/doc/erlang-doc/html/doc/reltool.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>reltool··Erlang/OTP·v27.0.1</title>9 ····<title>reltool\n\n<script>window.location.replace("../lib/reltool-1.0.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/reltool.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/reltool.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>reltool</span>112 ····<span>reltool\n\n&lt;script&gt;window.location.replace(&quot;../lib/reltool-1.0.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/reltool-1.0.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="parsetools.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="parsetools.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 parsetools122 parsetools\n\n<script>window.location.replace("../lib/parsetools-2.6/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="runtime_tools.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="runtime_tools.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 runtime_tools132 runtime_tools\n\n<script>window.location.replace("../lib/runtime_tools-2.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.1 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 r\x8re\x8el\x8lt\x8to\x8oo\x8ol\x8l9 r\x8re\x8el\x8lt\x8to\x8oo\x8ol\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./r.re.el.lt.to.oo.ol.l-.-1.1...0.0...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8p_\x8a_\x8r_\x8s_\x8e_\x8t_\x8o_\x8o_\x8l_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8p_\x8a_\x8r_\x8s_\x8e_\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8r_\x8u_\x8n_\x8t_\x8i_\x8m_\x8e_\x8__\x8t_\x8o_\x8o_\x8l_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8r_\x8u_\x8n_\x8t_\x8i_\x8m_\x8e_\x8__\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
683 B
./usr/share/doc/erlang-doc/html/doc/removed.html
    
Offset 10, 15 lines modifiedOffset 10, 15 lines modified
  
10 ····<title>Removed·Functionality··Erlang/OTP·v27.0.1</title>10 ····<title>Removed·Functionality··Erlang/OTP·v27.0.1</title>
11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
14 ····<script·src="dist/sidebar_items-35348DA6.js"></script>14 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
15 ····<script·src="docs_config.js"></script>15 ····<script·src="docs_config.js"></script>
16 ····<script·async·src="dist/html-7HPNBV52.js"></script>16 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
17 ··</head>17 ··</head>
18 ··<body·data-type="extras"·class="page-extra">18 ··<body·data-type="extras"·class="page-extra">
19 ····<script>19 ····<script>
  
3.62 KB
./usr/share/doc/erlang-doc/html/doc/runtime_tools.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>runtime_tools··Erlang/OTP·v27.0.1</title>9 ····<title>runtime_tools\n\n<script>window.location.replace("../lib/runtime_tools-2.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/runtime_tools.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/runtime_tools.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>runtime_tools</span>112 ····<span>runtime_tools\n\n&lt;script&gt;window.location.replace(&quot;../lib/runtime_tools-2.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/runtime_tools-2.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="reltool.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="reltool.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 reltool122 reltool\n\n<script>window.location.replace("../lib/reltool-1.0.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="syntax_tools.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="syntax_tools.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 syntax_tools132 syntax_tools\n\n<script>window.location.replace("../lib/syntax_tools-3.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.13 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 r\x8ru\x8un\x8nt\x8ti\x8im\x8me\x8e_\x8_t\x8to\x8oo\x8ol\x8ls\x8s9 r\x8ru\x8un\x8nt\x8ti\x8im\x8me\x8e_\x8_t\x8to\x8oo\x8ol\x8ls\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./r.ru.un.nt.ti.im.me.e_._t.to.oo.ol.ls.s-.-2.2...1.1/./d.do.oc.c/./
 10 h\x8ht\x8tm\x8ml\x8l/\x8/i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8r_\x8e_\x8l_\x8t_\x8o_\x8o_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8r_\x8e_\x8l_\x8t_\x8o_\x8o_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8y_\x8n_\x8t_\x8a_\x8x_\x8__\x8t_\x8o_\x8o_\x8l_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8y_\x8n_\x8t_\x8a_\x8x_\x8__\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.39 KB
./usr/share/doc/erlang-doc/html/doc/sasl.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>sasl··Erlang/OTP·v27.0.1</title>9 ····<title>sasl\n\n<script>window.location.replace("../lib/sasl-4.2.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/sasl.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/sasl.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>sasl</span>112 ····<span>sasl\n\n&lt;script&gt;window.location.replace(&quot;../lib/sasl-4.2.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/sasl-4.2.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="kernel.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="kernel.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 kernel122 kernel\n\n<script>window.location.replace("../lib/kernel-10.0.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="stdlib.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="stdlib.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 stdlib132 stdlib\n\n<script>window.location.replace("../lib/stdlib-6.0.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.01 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 s\x8sa\x8as\x8sl\x8l9 s\x8sa\x8as\x8sl\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./s.sa.as.sl.l-.-4.4...2.2...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8k_\x8e_\x8r_\x8n_\x8e_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8k_\x8e_\x8r_\x8n_\x8e_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8t_\x8d_\x8l_\x8i_\x8b12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8t_\x8d_\x8l_\x8i_\x8b_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
711 B
./usr/share/doc/erlang-doc/html/doc/scheduled_for_removal.html
    
Offset 10, 15 lines modifiedOffset 10, 15 lines modified
  
10 ····<title>Scheduled·for·Removal··Erlang/OTP·v27.0.1</title>10 ····<title>Scheduled·for·Removal··Erlang/OTP·v27.0.1</title>
11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
14 ····<script·src="dist/sidebar_items-35348DA6.js"></script>14 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
15 ····<script·src="docs_config.js"></script>15 ····<script·src="docs_config.js"></script>
16 ····<script·async·src="dist/html-7HPNBV52.js"></script>16 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
17 ··</head>17 ··</head>
18 ··<body·data-type="extras"·class="page-extra">18 ··<body·data-type="extras"·class="page-extra">
19 ····<script>19 ····<script>
  
1.13 KB
./usr/share/doc/erlang-doc/html/doc/search.html
    
Offset 12, 15 lines modifiedOffset 12, 15 lines modified
  
12 ····<title>Search··Erlang/OTP·v27.0.1</title>12 ····<title>Search··Erlang/OTP·v27.0.1</title>
13 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>13 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
14 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>14 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
15 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>15 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
16 ····<script·src="dist/sidebar_items-35348DA6.js"></script>16 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
17 ····<script·src="docs_config.js"></script>17 ····<script·src="docs_config.js"></script>
18 ····<script·async·src="dist/html-7HPNBV52.js"></script>18 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
19 ··</head>19 ··</head>
20 ··<body·data-type="search"·class="page-search">20 ··<body·data-type="search"·class="page-search">
21 ····<script>21 ····<script>
  
Offset 108, 15 lines modifiedOffset 108, 15 lines modified
108 <div·id="search">108 <div·id="search">
109 ··<h1>109 ··<h1>
110 ····<span></span>110 ····<span></span>
111 ··</h1>111 ··</h1>
  
112 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>112 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
113 </div>113 </div>
114 <script·src="dist/search_data-6667DB87.js"></script>114 <script·src="dist/search_data-6DCAA4BB.js"></script>
115 ····<footer·class="footer">115 ····<footer·class="footer">
116 ······<p>116 ······<p>
  
117 ········<span·class="line">117 ········<span·class="line">
118 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">118 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
119 ············Search·HexDocs119 ············Search·HexDocs
120 ··········</button>120 ··········</button>
3.36 KB
./usr/share/doc/erlang-doc/html/doc/snmp.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>snmp··Erlang/OTP·v27.0.1</title>9 ····<title>snmp\n\n<script>window.location.replace("../lib/snmp-5.16/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/oam/snmp.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/oam/snmp.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>snmp</span>112 ····<span>snmp\n\n&lt;script&gt;window.location.replace(&quot;../lib/snmp-5.16/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/snmp-5.16/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="os_mon.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="os_mon.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 os_mon122 os_mon\n\n<script>window.location.replace("../lib/os_mon-2.10/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="asn1.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="asn1.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 asn1132 asn1\n\n<script>window.location.replace("../lib/asn1-5.3/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1020 B
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 s\x8sn\x8nm\x8mp\x8p9 s\x8sn\x8nm\x8mp\x8p\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./s.sn.nm.mp.p-.-5.5...1.16.6/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8o_\x8s_\x8__\x8m_\x8o_\x8n11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8o_\x8s_\x8__\x8m_\x8o_\x8n_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8a_\x8s_\x8n_\x8112 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8a_\x8s_\x8n_\x81_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.39 KB
./usr/share/doc/erlang-doc/html/doc/ssh.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>ssh··Erlang/OTP·v27.0.1</title>9 ····<title>ssh\n\n<script>window.location.replace("../lib/ssh-5.2.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/ssh.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/ssh.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>ssh</span>112 ····<span>ssh\n\n&lt;script&gt;window.location.replace(&quot;../lib/ssh-5.2.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/ssh-5.2.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="public_key.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="public_key.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 public_key122 public_key\n\n<script>window.location.replace("../lib/public_key-1.16.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="ssl.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="ssl.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 ssl132 ssl\n\n<script>window.location.replace("../lib/ssl-11.2.1/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.01 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 s\x8ss\x8sh\x8h9 s\x8ss\x8sh\x8h\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./s.ss.sh.h-.-5.5...2.2...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8p_\x8u_\x8b_\x8l_\x8i_\x8c_\x8__\x8k_\x8e_\x8y11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8p_\x8u_\x8b_\x8l_\x8i_\x8c_\x8__\x8k_\x8e_\x8y_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8s_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8s_\x8s_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.34 KB
./usr/share/doc/erlang-doc/html/doc/ssl.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>ssl··Erlang/OTP·v27.0.1</title>9 ····<title>ssl\n\n<script>window.location.replace("../lib/ssl-11.2.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/ssl.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/ssl.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>ssl</span>112 ····<span>ssl\n\n&lt;script&gt;window.location.replace(&quot;../lib/ssl-11.2.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/ssl-11.2.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="ssh.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="ssh.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 ssh122 ssh\n\n<script>window.location.replace("../lib/ssh-5.2.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="tftp.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="tftp.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 tftp132 tftp\n\n<script>window.location.replace("../lib/tftp-1.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1000 B
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 s\x8ss\x8sl\x8l9 s\x8ss\x8sl\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./s.ss.sl.l-.-1.11.1...2.2...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8s_\x8h11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8s_\x8h_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8t_\x8f_\x8t_\x8p12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8t_\x8f_\x8t_\x8p_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.41 KB
./usr/share/doc/erlang-doc/html/doc/stdlib.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>stdlib··Erlang/OTP·v27.0.1</title>9 ····<title>stdlib\n\n<script>window.location.replace("../lib/stdlib-6.0.1/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/stdlib.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/core/stdlib.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>stdlib</span>112 ····<span>stdlib\n\n&lt;script&gt;window.location.replace(&quot;../lib/stdlib-6.0.1/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/stdlib-6.0.1/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="sasl.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="sasl.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 sasl122 sasl\n\n<script>window.location.replace("../lib/sasl-4.2.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="mnesia.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="mnesia.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 mnesia132 mnesia\n\n<script>window.location.replace("../lib/mnesia-4.23.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.02 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 s\x8st\x8td\x8dl\x8li\x8ib\x8b9 s\x8st\x8td\x8dl\x8li\x8ib\x8b\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./s.st.td.dl.li.ib.b-.-6.6...0.0...1.1/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8a_\x8s_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8a_\x8s_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8m_\x8n_\x8e_\x8s_\x8i_\x8a12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8m_\x8n_\x8e_\x8s_\x8i_\x8a_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.59 KB
./usr/share/doc/erlang-doc/html/doc/syntax_tools.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>syntax_tools··Erlang/OTP·v27.0.1</title>9 ····<title>syntax_tools\n\n<script>window.location.replace("../lib/syntax_tools-3.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/syntax_tools.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/syntax_tools.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>syntax_tools</span>112 ····<span>syntax_tools\n\n&lt;script&gt;window.location.replace(&quot;../lib/syntax_tools-3.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/syntax_tools-3.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="runtime_tools.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="runtime_tools.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 runtime_tools122 runtime_tools\n\n<script>window.location.replace("../lib/runtime_tools-2.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="tools.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="tools.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 tools132 tools\n\n<script>window.location.replace("../lib/tools-4.0/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.11 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 s\x8sy\x8yn\x8nt\x8ta\x8ax\x8x_\x8_t\x8to\x8oo\x8ol\x8ls\x8s9 s\x8sy\x8yn\x8nt\x8ta\x8ax\x8x_\x8_t\x8to\x8oo\x8ol\x8ls\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./s.sy.yn.nt.ta.ax.x_._t.to.oo.ol.ls.s-.-3.3...2.2/./d.do.oc.c/./
 10 h\x8ht\x8tm\x8ml\x8l/\x8/i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8r_\x8u_\x8n_\x8t_\x8i_\x8m_\x8e_\x8__\x8t_\x8o_\x8o_\x8l_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8r_\x8u_\x8n_\x8t_\x8i_\x8m_\x8e_\x8__\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8t_\x8o_\x8o_\x8l_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
4.01 MB
./usr/share/doc/erlang-doc/html/doc/system/Erlang System Documentation.epub
14.8 KB
zipinfo {}
Max HTML report size reached
261 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
68.4 KB
OEBPS/typespec.xhtml
Max HTML report size reached
69.8 KB
OEBPS/tablesdatabases.xhtml
Max HTML report size reached
63.7 KB
OEBPS/sup_princ.xhtml
Max HTML report size reached
368 KB
OEBPS/statem.xhtml
Max HTML report size reached
196 KB
OEBPS/spec_proc.xhtml
Max HTML report size reached
426 KB
OEBPS/seq_prog.xhtml
Max HTML report size reached
113 KB
OEBPS/robustness.xhtml
Max HTML report size reached
18.0 KB
OEBPS/release_structure.xhtml
Max HTML report size reached
67.3 KB
OEBPS/release_handling.xhtml
Max HTML report size reached
30.2 KB
OEBPS/ref_man_records.xhtml
Max HTML report size reached
5.29 KB
OEBPS/ref_man_processes.xhtml
Max HTML report size reached
20.9 KB
OEBPS/ref_man_functions.xhtml
Max HTML report size reached
84.0 KB
OEBPS/records_macros.xhtml
Max HTML report size reached
69.8 KB
OEBPS/prog_ex_records.xhtml
Max HTML report size reached
3.69 KB
OEBPS/patterns.xhtml
Max HTML report size reached
1.47 KB
OEBPS/otp-patch-apply.xhtml
    
Offset 106, 13 lines modifiedOffset 106, 13 lines modified
106 ··</a>106 ··</a>
107 ··<span·class="text">Sanity·check</span>107 ··<span·class="text">Sanity·check</span>
108 </h2>108 </h2>
109 <p>The·application·dependencies·can·be·checked·using·the·Erlang·shell.109 <p>The·application·dependencies·can·be·checked·using·the·Erlang·shell.
110 Application·dependencies·are·verified·among·installed·applications·by110 Application·dependencies·are·verified·among·installed·applications·by
111 <code·class="inline">otp_patch_apply</code>,·but·these·are·not·necessarily·those·actually·loaded.111 <code·class="inline">otp_patch_apply</code>,·but·these·are·not·necessarily·those·actually·loaded.
112 By·calling·<code·class="inline">system_information:sanity_check()</code>·one·can·validate112 By·calling·<code·class="inline">system_information:sanity_check()</code>·one·can·validate
113 dependencies·among·applications·actually·loaded.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">system_information</span><span·class="p">:</span><span·class="nf">sanity_check</span><span·class="p"·data-group-id="6307467843-1">(</span><span·class="p"·data-group-id="6307467843-1">)</span><span·class="p">.</span><span·class="w">113 dependencies·among·applications·actually·loaded.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">system_information</span><span·class="p">:</span><span·class="nf">sanity_check</span><span·class="p"·data-group-id="8713086934-1">(</span><span·class="p"·data-group-id="8713086934-1">)</span><span·class="p">.</span><span·class="w">
114 </span><span·class="ss">ok</span></code></pre><p>Please·take·a·look·at·the·reference·of·<a·href="../../../lib/runtime_tools/doc/html/system_information.html#sanity_check/0"·title="">sanity_check()</a>·for·more114 </span><span·class="ss">ok</span></code></pre><p>Please·take·a·look·at·the·reference·of·<a·href="../../../lib/runtime_tools/doc/html/system_information.html#sanity_check/0"·title="">sanity_check()</a>·for·more
115 information.</p>115 information.</p>
  
116 ··</body>116 ··</body>
117 </html>117 </html>
9.2 KB
OEBPS/opaques.xhtml
Max HTML report size reached
4.94 KB
OEBPS/oam.xhtml
Max HTML report size reached
15.9 KB
OEBPS/nif.xhtml
Max HTML report size reached
23.8 KB
OEBPS/modules.xhtml
Max HTML report size reached
34.7 KB
OEBPS/maps.xhtml
Max HTML report size reached
58.0 KB
OEBPS/macros.xhtml
Max HTML report size reached
55.2 KB
OEBPS/listhandling.xhtml
Max HTML report size reached
76.8 KB
OEBPS/list_comprehensions.xhtml
Max HTML report size reached
6.1 KB
OEBPS/install-win32.xhtml
Max HTML report size reached
32.9 KB
OEBPS/included_applications.xhtml
Max HTML report size reached
48.0 KB
OEBPS/gen_server_concepts.xhtml
Max HTML report size reached
213 KB
OEBPS/funs.xhtml
Max HTML report size reached
300 KB
OEBPS/expressions.xhtml
Max HTML report size reached
1.63 KB
OEBPS/example.xhtml
    
Offset 36, 14 lines modifiedOffset 36, 14 lines modified
  
36 int·bar(int·y)·{36 int·bar(int·y)·{
37 ··return·y*2;37 ··return·y*2;
38 }</code></pre><p>The·functions·are·deliberately·kept·as·simple·as·possible,·for·readability38 }</code></pre><p>The·functions·are·deliberately·kept·as·simple·as·possible,·for·readability
39 reasons.</p><p>From·an·Erlang·perspective,·it·is·preferable·to·be·able·to·call·<code·class="inline">foo</code>·and·<code·class="inline">bar</code>39 reasons.</p><p>From·an·Erlang·perspective,·it·is·preferable·to·be·able·to·call·<code·class="inline">foo</code>·and·<code·class="inline">bar</code>
40 without·having·to·bother·about·that·they·are·C·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·Erlang·code</span><span·class="w">40 without·having·to·bother·about·that·they·are·C·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·Erlang·code</span><span·class="w">
41 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">41 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
42 </span><span·class="n">Res</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">complex</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="1118950921-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="1118950921-1">)</span><span·class="p">,</span><span·class="w">42 </span><span·class="n">Res</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">complex</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="7433082917-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="7433082917-1">)</span><span·class="p">,</span><span·class="w">
43 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Here,·the·communication·with·C·is·hidden·in·the·implementation·of·<code·class="inline">complex.erl</code>.43 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Here,·the·communication·with·C·is·hidden·in·the·implementation·of·<code·class="inline">complex.erl</code>.
44 In·the·following·sections,·it·is·shown·how·this·module·can·be·implemented·using44 In·the·following·sections,·it·is·shown·how·this·module·can·be·implemented·using
45 the·different·interoperability·mechanisms.</p>45 the·different·interoperability·mechanisms.</p>
  
46 ··</body>46 ··</body>
47 </html>47 </html>
40.5 KB
OEBPS/events.xhtml
Max HTML report size reached
9.93 KB
OEBPS/errors.xhtml
Max HTML report size reached
17.6 KB
OEBPS/error_logging.xhtml
Max HTML report size reached
70.9 KB
OEBPS/erl_interface.xhtml
Max HTML report size reached
65.6 KB
OEBPS/eff_guide_processes.xhtml
Max HTML report size reached
33.3 KB
OEBPS/eff_guide_functions.xhtml
Max HTML report size reached
7.09 KB
OEBPS/drivers.xhtml
Max HTML report size reached
64.8 KB
OEBPS/documentation.xhtml
Max HTML report size reached
16.1 KB
OEBPS/distributed_applications.xhtml
Max HTML report size reached
5.6 KB
OEBPS/distributed.xhtml
Max HTML report size reached
58.3 KB
OEBPS/design_principles.xhtml
Max HTML report size reached
74.1 KB
OEBPS/data_types.xhtml
Max HTML report size reached
184 KB
OEBPS/create_target.xhtml
Max HTML report size reached
3.28 KB
OEBPS/content.opf
3.25 KB
OEBPS/content.opf
Max HTML report size reached
208 KB
OEBPS/conc_prog.xhtml
Max HTML report size reached
51.5 KB
OEBPS/commoncaveats.xhtml
Max HTML report size reached
13.7 KB
OEBPS/code_loading.xhtml
Max HTML report size reached
63.5 KB
OEBPS/c_portdriver.xhtml
Max HTML report size reached
58.5 KB
OEBPS/c_port.xhtml
Max HTML report size reached
31.4 KB
OEBPS/bit_syntax.xhtml
Max HTML report size reached
61.6 KB
OEBPS/binaryhandling.xhtml
Max HTML report size reached
4.43 KB
OEBPS/benchmarking.xhtml
Max HTML report size reached
149 KB
OEBPS/appup_cookbook.xhtml
Max HTML report size reached
55.9 KB
OEBPS/applications.xhtml
Max HTML report size reached
56.0 KB
./usr/share/doc/erlang-doc/html/doc/system/applications.html
    
Offset 135, 34 lines modifiedOffset 135, 34 lines modified
135 <a·href="applications.html#app_dir">directory·structure</a>.</p><p><a·href=""·id="callback_module"></a></p><h2·id="application-callback-module"·class="section-heading">135 <a·href="applications.html#app_dir">directory·structure</a>.</p><p><a·href=""·id="callback_module"></a></p><h2·id="application-callback-module"·class="section-heading">
136 ··<a·href="#application-callback-module"·class="hover-link">136 ··<a·href="#application-callback-module"·class="hover-link">
137 ····<i·class="ri-link-m"·aria-hidden="true"></i>137 ····<i·class="ri-link-m"·aria-hidden="true"></i>
138 ··</a>138 ··</a>
139 ··<span·class="text">Application·Callback·Module</span>139 ··<span·class="text">Application·Callback·Module</span>
140 </h2>140 </h2>
141 <p>How·to·start·and·stop·the·code·for·the·application,·including·its·supervision141 <p>How·to·start·and·stop·the·code·for·the·application,·including·its·supervision
142 tree,·is·described·by·two·callback·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start</span><span·class="p"·data-group-id="5982462364-1">(</span><span·class="n">StartType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="5982462364-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·554,·SHA:·2bfefde5684608744d913b08699456e6ece09f5aca6896856aaf99af13cc9a91·...·]4-3">}</span><span·class="w">142 tree,·is·described·by·two·callback·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start</span><span·class="p"·data-group-id="1835083184-1">(</span><span·class="n">StartType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="1835083184-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·554,·SHA:·2faefffe0e4d2f80429d33a0c370eafffdd88071e58923faf41acdb81747d796·...·]4-3">}</span><span·class="w">
143 </span><span·class="nf">stop</span><span·class="p"·data-group-id="5982462364-4">(</span><span·class="n">State</span><span·class="p"·data-group-id="5982462364-4">)</span></code></pre><ul><li><code·class="inline">start/2</code>·is·called·when·starting·the·application·and·is·to·create·the143 </span><span·class="nf">stop</span><span·class="p"·data-group-id="1835083184-4">(</span><span·class="n">State</span><span·class="p"·data-group-id="1835083184-4">)</span></code></pre><ul><li><code·class="inline">start/2</code>·is·called·when·starting·the·application·and·is·to·create·the
144 supervision·tree·by·starting·the·top·supervisor.·It·is·expected·to·return·the144 supervision·tree·by·starting·the·top·supervisor.·It·is·expected·to·return·the
145 pid·of·the·top·supervisor·and·an·optional·term,·<code·class="inline">State</code>,·which·defaults·to145 pid·of·the·top·supervisor·and·an·optional·term,·<code·class="inline">State</code>,·which·defaults·to
146 <code·class="inline">[]</code>.·This·term·is·passed·as·is·to·<code·class="inline">stop/1</code>.</li><li><code·class="inline">StartType</code>·is·usually·the·atom·<code·class="inline">normal</code>.·It·has·other·values·only·in·the·case146 <code·class="inline">[]</code>.·This·term·is·passed·as·is·to·<code·class="inline">stop/1</code>.</li><li><code·class="inline">StartType</code>·is·usually·the·atom·<code·class="inline">normal</code>.·It·has·other·values·only·in·the·case
147 of·a·takeover·or·failover;·see147 of·a·takeover·or·failover;·see
148 <a·href="distributed_applications.html">Distributed·Applications</a>.</li><li><code·class="inline">StartArgs</code>·is·defined·by·the·key·<code·class="inline">mod</code>·in·the148 <a·href="distributed_applications.html">Distributed·Applications</a>.</li><li><code·class="inline">StartArgs</code>·is·defined·by·the·key·<code·class="inline">mod</code>·in·the
149 <a·href="applications.html#appl_res_file">application·resource·file</a>.</li><li><code·class="inline">stop/1</code>·is·called·<em>after</em>·the·application·has·been·stopped·and·is·to·do·any149 <a·href="applications.html#appl_res_file">application·resource·file</a>.</li><li><code·class="inline">stop/1</code>·is·called·<em>after</em>·the·application·has·been·stopped·and·is·to·do·any
150 necessary·cleaning·up.·The·actual·stopping·of·the·application,·that·is,150 necessary·cleaning·up.·The·actual·stopping·of·the·application,·that·is,
151 shutting·down·the·supervision·tree,·is·handled·automatically·as·described·in151 shutting·down·the·supervision·tree,·is·handled·automatically·as·described·in
152 <a·href="applications.html#stopping">Starting·and·Stopping·Applications</a>.</li></ul><p><a·href=""·id="ch_app"></a></p><p>Example·of·an·application·callback·module·for·packaging·the·supervision·tree152 <a·href="applications.html#stopping">Starting·and·Stopping·Applications</a>.</li></ul><p><a·href=""·id="ch_app"></a></p><p>Example·of·an·application·callback·module·for·packaging·the·supervision·tree
153 from·<a·href="sup_princ.html#ex">Supervisor·Behaviour</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9878776226-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="9878776226-1">)</span><span·class="p">.</span><span·class="w">153 from·<a·href="sup_princ.html#ex">Supervisor·Behaviour</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3907018366-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="3907018366-1">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="9878776226-2">(</span><span·class="ss">application</span><span·class="p"·data-group-id="9878776226-2">)</span><span·class="p">.</span><span·class="w">154 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="3907018366-2">(</span><span·class="ss">application</span><span·class="p"·data-group-id="3907018366-2">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="w">155 </span><span·class="w">
156 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9878776226-3">(</span><span·class="p"·data-group-id="9878776226-4">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·115,·SHA:·ee2a248c4f5707154b20689f825e19245a16c58bf0dc643790aff051d0ff56df·...·]6-3">)</span><span·class="p">.</span><span·class="w">156 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3907018366-3">(</span><span·class="p"·data-group-id="3907018366-4">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·115,·SHA:·619ded334b0bb97b088b0a8bb5943a91f5c622cf572951997e9b683384beecef·...·]6-3">)</span><span·class="p">.</span><span·class="w">
  
157 </span><span·class="nf">start</span><span·class="p"·data-group-id="9878776226-5">(</span><span·class="p">_</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="9878776226-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">start</span><span·class="p"·data-group-id="3907018366-5">(</span><span·class="p">_</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="3907018366-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="nc">ch_sup</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="9878776226-6">(</span><span·class="p"·data-group-id="9878776226-6">)</span><span·class="p">.</span><span·class="w">158 ····</span><span·class="nc">ch_sup</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="3907018366-6">(</span><span·class="p"·data-group-id="3907018366-6">)</span><span·class="p">.</span><span·class="w">
  
159 </span><span·class="nf">stop</span><span·class="p"·data-group-id="9878776226-7">(</span><span·class="p">_</span><span·class="n">State</span><span·class="p"·data-group-id="9878776226-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 </span><span·class="nf">stop</span><span·class="p"·data-group-id="3907018366-7">(</span><span·class="p">_</span><span·class="n">State</span><span·class="p"·data-group-id="3907018366-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>A·library·application·that·cannot·be·started·or·stopped·does·not·need·any160 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>A·library·application·that·cannot·be·started·or·stopped·does·not·need·any
161 application·callback·module.</p><p><a·href=""·id="appl_res_file"></a></p><h2·id="application-resource-file"·class="section-heading">161 application·callback·module.</p><p><a·href=""·id="appl_res_file"></a></p><h2·id="application-resource-file"·class="section-heading">
162 ··<a·href="#application-resource-file"·class="hover-link">162 ··<a·href="#application-resource-file"·class="hover-link">
163 ····<i·class="ri-link-m"·aria-hidden="true"></i>163 ····<i·class="ri-link-m"·aria-hidden="true"></i>
164 ··</a>164 ··</a>
165 ··<span·class="text">Application·Resource·File</span>165 ··<span·class="text">Application·Resource·File</span>
166 </h2>166 </h2>
Offset 173, 22 lines modifiedOffset 173, 22 lines modified
173 keys.</li></ul><p>The·contents·of·a·minimal·<code·class="inline">.app</code>·file·for·a·library·application·<code·class="inline">libapp</code>·looks173 keys.</li></ul><p>The·contents·of·a·minimal·<code·class="inline">.app</code>·file·for·a·library·application·<code·class="inline">libapp</code>·looks
174 as·follows:</p><pre><code·class="text">{application,·libapp,·[]}.</code></pre><p>The·contents·of·a·minimal·<code·class="inline">.app</code>·file·<code·class="inline">ch_app.app</code>·for·a·supervision·tree174 as·follows:</p><pre><code·class="text">{application,·libapp,·[]}.</code></pre><p>The·contents·of·a·minimal·<code·class="inline">.app</code>·file·<code·class="inline">ch_app.app</code>·for·a·supervision·tree
175 application·like·<code·class="inline">ch_app</code>·looks·as·follows:</p><pre><code·class="text">{application,·ch_app,175 application·like·<code·class="inline">ch_app</code>·looks·as·follows:</p><pre><code·class="text">{application,·ch_app,
176 ·[{mod,·{ch_app,[]}}]}.</code></pre><p>The·key·<code·class="inline">mod</code>·defines·the·callback·module·and·start·argument·of·the·application,176 ·[{mod,·{ch_app,[]}}]}.</code></pre><p>The·key·<code·class="inline">mod</code>·defines·the·callback·module·and·start·argument·of·the·application,
177 in·this·case·<code·class="inline">ch_app</code>·and·<code·class="inline">[]</code>,·respectively.·This·means·that·the·following·is177 in·this·case·<code·class="inline">ch_app</code>·and·<code·class="inline">[]</code>,·respectively.·This·means·that·the·following·is
178 called·when·the·application·is·to·be·started:</p><pre><code·class="text">ch_app:start(normal,·[])</code></pre><p>The·following·is·called·when·the·application·is·stopped:</p><pre><code·class="text">ch_app:stop([])</code></pre><p>When·using·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>,·the·Erlang/OTP·tools·for·packaging·code·(see·Section178 called·when·the·application·is·to·be·started:</p><pre><code·class="text">ch_app:start(normal,·[])</code></pre><p>The·following·is·called·when·the·application·is·stopped:</p><pre><code·class="text">ch_app:stop([])</code></pre><p>When·using·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>,·the·Erlang/OTP·tools·for·packaging·code·(see·Section
179 <a·href="release_structure.html">Releases</a>),·the·keys·<code·class="inline">description</code>,·<code·class="inline">vsn</code>,·<code·class="inline">modules</code>,179 <a·href="release_structure.html">Releases</a>),·the·keys·<code·class="inline">description</code>,·<code·class="inline">vsn</code>,·<code·class="inline">modules</code>,
180 <code·class="inline">registered</code>,·and·<code·class="inline">applications</code>·are·also·to·be·specified:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1153127186-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">180 <code·class="inline">registered</code>,·and·<code·class="inline">applications</code>·are·also·to·be·specified:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3093033834-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">
181 ·</span><span·class="p"·data-group-id="1153127186-2">[</span><span·class="p"·data-group-id="1153127186-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="1153127186-3">}</span><span·class="p">,</span><span·class="w">181 ·</span><span·class="p"·data-group-id="3093033834-2">[</span><span·class="p"·data-group-id="3093033834-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="3093033834-3">}</span><span·class="p">,</span><span·class="w">
182 ··</span><span·class="p"·data-group-id="1153127186-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="1153127186-4">}</span><span·class="p">,</span><span·class="w">182 ··</span><span·class="p"·data-group-id="3093033834-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="3093033834-4">}</span><span·class="p">,</span><span·class="w">
183 ··</span><span·class="p"·data-group-id="1153127186-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1153127186-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup<[·...·truncated·by·diffoscope;·len:·175,·SHA:·6951498bb18b5533b795f3cef319e53dba7317edd66ac1b8eefe2fc0748417b5·...·]-5">}</span><span·class="p">,</span><span·class="w">183 ··</span><span·class="p"·data-group-id="3093033834-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093033834-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup<[·...·truncated·by·diffoscope;·len:·175,·SHA:·db7ea61ba4c7fdd8598d27cbee53587f9db8dc792c48d5ade7d25b8212fd8d66·...·]-5">}</span><span·class="p">,</span><span·class="w">
184 ··</span><span·class="p"·data-group-id="1153127186-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1153127186-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="1153127186-8">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·97a2ea3bb7a5c44b05152e31729690f67cab85d89aa7422207c1f632ff2058d0·...·]-7">}</span><span·class="p">,</span><span·class="w">184 ··</span><span·class="p"·data-group-id="3093033834-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093033834-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="3093033834-8">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·1a14b823e88951f0e899e7e9af4ab8f414fb1d11e247cc335a25ddfb5c52d80f·...·]-7">}</span><span·class="p">,</span><span·class="w">
185 ··</span><span·class="p"·data-group-id="1153127186-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1153127186-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·183,·SHA:·5f0cacd574bf998e04eced430f0f4594b645948edbf25886db291917e40e27ea·...·]-9">}</span><span·class="p">,</span><span·class="w">185 ··</span><span·class="p"·data-group-id="3093033834-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093033834-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·183,·SHA:·511c1fe71b80e24ce535b5ad5064d23f27359244aa1bfd55b4f55f92e5917a16·...·]-9">}</span><span·class="p">,</span><span·class="w">
186 ··</span><span·class="p"·data-group-id="1153127186-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1153127186-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="1153127186-13">[</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·7c6081307352d03043d4428ec5faa01636a0d665f121ae312f4b0cfcabb8e721·...·]-11">}</span><span·class="w">186 ··</span><span·class="p"·data-group-id="3093033834-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093033834-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="3093033834-13">[</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·736356efe93c1c5db3d296380c0c37f9bc1ee4abd241d2329311a1d552d3ef21·...·]-11">}</span><span·class="w">
187 ·</span><span·class="p"·data-group-id="1153127186-2">]</span><span·class="p"·data-group-id="1153127186-1">}</span><span·class="p">.</span></code></pre><ul><li><code·class="inline">description</code>·-·A·short·description,·a·string.·Defaults·to·<code·class="inline">&quot;&quot;</code>.</li><li><code·class="inline">vsn</code>·-·Version·number,·a·string.·Defaults·to·<code·class="inline">&quot;&quot;</code>.</li><li><code·class="inline">modules</code>·-·All·modules·<em>introduced</em>·by·this·application.·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·uses187 ·</span><span·class="p"·data-group-id="3093033834-2">]</span><span·class="p"·data-group-id="3093033834-1">}</span><span·class="p">.</span></code></pre><ul><li><code·class="inline">description</code>·-·A·short·description,·a·string.·Defaults·to·<code·class="inline">&quot;&quot;</code>.</li><li><code·class="inline">vsn</code>·-·Version·number,·a·string.·Defaults·to·<code·class="inline">&quot;&quot;</code>.</li><li><code·class="inline">modules</code>·-·All·modules·<em>introduced</em>·by·this·application.·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·uses
188 this·list·when·generating·boot·scripts·and·tar·files.·A·module·must·only188 this·list·when·generating·boot·scripts·and·tar·files.·A·module·must·only
189 be·included·in·one·application.·Defaults·to·<code·class="inline">[]</code>.</li><li><code·class="inline">registered</code>·-·All·names·of·registered·processes·in·the·application.189 be·included·in·one·application.·Defaults·to·<code·class="inline">[]</code>.</li><li><code·class="inline">registered</code>·-·All·names·of·registered·processes·in·the·application.
190 <a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·uses·this·list·to·detect·name·clashes·between·applications.190 <a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·uses·this·list·to·detect·name·clashes·between·applications.
191 Defaults·to·<code·class="inline">[]</code>.</li><li><code·class="inline">applications</code>·-·All·applications·that·must·be·started·before·this191 Defaults·to·<code·class="inline">[]</code>.</li><li><code·class="inline">applications</code>·-·All·applications·that·must·be·started·before·this
192 application·is·started.·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·uses·this·list·to·generate·correct·boot192 application·is·started.·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·uses·this·list·to·generate·correct·boot
193 scripts.·Defaults·to·<code·class="inline">[]</code>.·Notice·that·all·applications·have·dependencies·to193 scripts.·Defaults·to·<code·class="inline">[]</code>.·Notice·that·all·applications·have·dependencies·to
194 at·least·Kernel·and·STDLIB.</li></ul><blockquote><h4·class="info">Note</h4><p>For·details·about·the·syntax·and·contents·of·the·application·resource·file,194 at·least·Kernel·and·STDLIB.</li></ul><blockquote><h4·class="info">Note</h4><p>For·details·about·the·syntax·and·contents·of·the·application·resource·file,
Offset 300, 38 lines modifiedOffset 300, 38 lines modified
300 stop·applications.</p><h2·id="loading-and-unloading-applications"·class="section-heading">300 stop·applications.</p><h2·id="loading-and-unloading-applications"·class="section-heading">
301 ··<a·href="#loading-and-unloading-applications"·class="hover-link">301 ··<a·href="#loading-and-unloading-applications"·class="hover-link">
302 ····<i·class="ri-link-m"·aria-hidden="true"></i>302 ····<i·class="ri-link-m"·aria-hidden="true"></i>
303 ··</a>303 ··</a>
304 ··<span·class="text">Loading·and·Unloading·Applications</span>304 ··<span·class="text">Loading·and·Unloading·Applications</span>
305 </h2>305 </h2>
306 <p>Before·an·application·can·be·started,·it·must·be·<em>loaded</em>.·The·application306 <p>Before·an·application·can·be·started,·it·must·be·<em>loaded</em>.·The·application
307 controller·reads·and·stores·the·information·from·the·<code·class="inline">.app</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">load</span><span·class="p"·data-group-id="9242000377-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="9242000377-1">)</span><span·class="p">.</span><span·class="w">307 controller·reads·and·stores·the·information·from·the·<code·class="inline">.app</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">load</span><span·class="p"·data-group-id="5043342519-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="5043342519-1">)</span><span·class="p">.</span><span·class="w">
308 </span><span·class="ss">ok</span><span·class="gp·unselectable">308 </span><span·class="ss">ok</span><span·class="gp·unselectable">
309 2&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">loaded_applications</span><span·class="p"·data-group-id="9242000377-2">(</span><span·class="p"·data-group-id="9242000377-2">)</span><span·class="p">.</span><span·class="w">309 2&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">loaded_applications</span><span·class="p"·data-group-id="5043342519-2">(</span><span·class="p"·data-group-id="5043342519-2">)</span><span·class="p">.</span><span·class="w">
310 </span><span·class="p"·data-group-id="9242000377-3">[</span><span·class="p"·data-group-id="9242000377-4">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;2.8.1.3&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·f7df5a73bb0894c22211f4475e5e0abdfc4a4e09901a6c2595125f9f3105c96f·...·]-4">}</span><span·class="p">,</span><span·class="w">310 </span><span·class="p"·data-group-id="5043342519-3">[</span><span·class="p"·data-group-id="5043342519-4">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;2.8.1.3&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·b38919d42748320c8c322abc65b98483b738b3148d1c573272b8cf770f410bfb·...·]-4">}</span><span·class="p">,</span><span·class="w">
311 ·</span><span·class="p"·data-group-id="9242000377-5">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;1.11.4.3&quot;</span><span·class="p"·data-group-id="9242000377-5">}</span><span·class="p">,</span><span·class="w">311 ·</span><span·class="p"·data-group-id="5043342519-5">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;1.11.4.3&quot;</span><span·class="p"·data-group-id="5043342519-5">}</span><span·class="p">,</span><span·class="w">
312 ·</span><span·class="p"·data-group-id="9242000377-6">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="9242000377-6">}</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·210aa4627039463c08a148d55fa47239cf4ebdb1e5c4eec2a3d6182b56d9783e·...·]-3">]</span></code></pre><p>An·application·that·has·been·stopped,·or·has·never·been·started,·can·be312 ·</span><span·class="p"·data-group-id="5043342519-6">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="5043342519-6">}</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·3b24a3bc1d87d88ac78a5c8eeded2c4553d445c871c3cc4d85cf70dcca8bfc58·...·]-3">]</span></code></pre><p>An·application·that·has·been·stopped,·or·has·never·been·started,·can·be
313 unloaded.·The·information·about·the·application·is·erased·from·the·internal313 unloaded.·The·information·about·the·application·is·erased·from·the·internal
314 database·of·the·application·controller.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">unload</span><span·class="p"·data-group-id="8138027423-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="8138027423-1">)</span><span·class="p">.</span><span·class="w">314 database·of·the·application·controller.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">unload</span><span·class="p"·data-group-id="2742477177-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="2742477177-1">)</span><span·class="p">.</span><span·class="w">
315 </span><span·class="ss">ok</span><span·class="gp·unselectable">315 </span><span·class="ss">ok</span><span·class="gp·unselectable">
316 4&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">loaded_applications</span><span·class="p"·data-group-id="8138027423-2">(</span><span·class="p"·data-group-id="8138027423-2">)</span><span·class="p">.</span><span·class="w">316 4&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">loaded_applications</span><span·class="p"·data-group-id="2742477177-2">(</span><span·class="p"·data-group-id="2742477177-2">)</span><span·class="p">.</span><span·class="w">
317 </span><span·class="p"·data-group-id="8138027423-3">[</span><span·class="p"·data-group-id="8138027423-4">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;2.8.1.3&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·8d8d78987228fba390c1bfa9f0f89829af6d597426e764086998be0bae2b3684·...·]-4">}</span><span·class="p">,</span><span·class="w">317 </span><span·class="p"·data-group-id="2742477177-3">[</span><span·class="p"·data-group-id="2742477177-4">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;2.8.1.3&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·441ae3f956ea1812057ec55b4ae3b57c6cd728e297a21fe64fdee8827b705d2c·...·]-4">}</span><span·class="p">,</span><span·class="w">
318 ·</span><span·class="p"·data-group-id="8138027423-5">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;1.11.4.3&quot;</span><span·class="p"·data-group-id="8138027423-5">}</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·55c48747796c2e371ff8e43108bbed8ae222d4b0784c86e565b719a3706a4a71·...·]-3">]</span></code></pre><blockquote><h4·class="info">Note</h4><p>Loading/unloading·an·application·does·not·load/unload·the·code·used·by·the318 ·</span><span·class="p"·data-group-id="2742477177-5">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;1.11.4.3&quot;</span><span·class="p"·data-group-id="2742477177-5">}</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·a6ef3a1ad2e2cc0db24095611b7b6abba8a63b66719610d523ae493912ed33a5·...·]-3">]</span></code></pre><blockquote><h4·class="info">Note</h4><p>Loading/unloading·an·application·does·not·load/unload·the·code·used·by·the
319 application.·Code·loading·is·handled·in·the·usual·way·by·the·code·server.</p></blockquote><p><a·href=""·id="stopping"></a></p><h2·id="starting-and-stopping-applications"·class="section-heading">319 application.·Code·loading·is·handled·in·the·usual·way·by·the·code·server.</p></blockquote><p><a·href=""·id="stopping"></a></p><h2·id="starting-and-stopping-applications"·class="section-heading">
320 ··<a·href="#starting-and-stopping-applications"·class="hover-link">320 ··<a·href="#starting-and-stopping-applications"·class="hover-link">
321 ····<i·class="ri-link-m"·aria-hidden="true"></i>321 ····<i·class="ri-link-m"·aria-hidden="true"></i>
322 ··</a>322 ··</a>
323 ··<span·class="text">Starting·and·Stopping·Applications</span>323 ··<span·class="text">Starting·and·Stopping·Applications</span>
324 </h2>324 </h2>
325 <p>An·application·is·started·by·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6803734764-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="6803734764-1">)</span><span·class="p">.</span><span·class="w">325 <p>An·application·is·started·by·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3031161823-1">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="3031161823-1">)</span><span·class="p">.</span><span·class="w">
326 </span><span·class="ss">ok</span><span·class="gp·unselectable">326 </span><span·class="ss">ok</span><span·class="gp·unselectable">
327 6&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">which_applications</span><span·class="p"·data-group-id="6803734764-2">(</span><span·class="p"·data-group-id="6803734764-2">)</span><span·class="p">.</span><span·class="w">327 6&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">which_applications</span><span·class="p"·data-group-id="3031161823-2">(</span><span·class="p"·data-group-id="3031161823-2">)</span><span·class="p">.</span><span·class="w">
328 </span><span·class="p"·data-group-id="6803734764-3">[</span><span·class="p"·data-group-id="6803734764-4">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;2.8.1.3&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·78b761187ccd8bb20ce795ebf506e50c6a27921e77d81bf788d3b8b591224873·...·]-4">}</span><span·class="p">,</span><span·class="w">328 </span><span·class="p"·data-group-id="3031161823-3">[</span><span·class="p"·data-group-id="3031161823-4">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;2.8.1.3&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·e6202fa09eef422f35a314596cfd6f5e43fa288ab010b352e8bcdd147ab93daf·...·]-4">}</span><span·class="p">,</span><span·class="w">
329 ·</span><span·class="p"·data-group-id="6803734764-5">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;1.11.4.3&quot;</span><span·class="p"·data-group-id="6803734764-5">}</span><span·class="p">,</span><span·class="w">329 ·</span><span·class="p"·data-group-id="3031161823-5">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;1.11.4.3&quot;</span><span·class="p"·data-group-id="3031161823-5">}</span><span·class="p">,</span><span·class="w">
330 ·</span><span·class="p"·data-group-id="6803734764-6">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="6803734764-6">}</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·88a1e37c8671b8c9f15f332efe4aae605241bbc3c413fbad8df6827ddf353dc1·...·]-3">]</span></code></pre><p>If·the·application·is·not·already·loaded,·the·application·controller·first·loads330 ·</span><span·class="p"·data-group-id="3031161823-6">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="3031161823-6">}</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·f92a9475344dd80f1819f0c65188d971c8d744ee4dc8230c6b543270b93c347f·...·]-3">]</span></code></pre><p>If·the·application·is·not·already·loaded,·the·application·controller·first·loads
331 it·using·<a·href="../../lib/kernel-10.0.1/doc/html/application.html#load/1"><code·class="inline">application:load/1</code></a>.·It·checks·the·value·of·the·<code·class="inline">applications</code>·key·to331 it·using·<a·href="../../lib/kernel-10.0.1/doc/html/application.html#load/1"><code·class="inline">application:load/1</code></a>.·It·checks·the·value·of·the·<code·class="inline">applications</code>·key·to
332 ensure·that·all·applications·that·are·to·be·started·before·this·application·are332 ensure·that·all·applications·that·are·to·be·started·before·this·application·are
333 running.</p><p><a·href=""·id="application_master"></a></p><p>Following·that,·the·application·controller·creates·an·<em>application·master</em>·for333 running.</p><p><a·href=""·id="application_master"></a></p><p>Following·that,·the·application·controller·creates·an·<em>application·master</em>·for
334 the·application.</p><p>The·application·master·establishes·itself·as·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#group_leader/0">group334 the·application.</p><p>The·application·master·establishes·itself·as·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#group_leader/0">group
335 leader</a>·of·all·processes·in·the·application335 leader</a>·of·all·processes·in·the·application
336 and·will·forward·I/O·to·the·previous·group·leader.</p><blockquote><h4·class="info">Note</h4><p>The·purpose·of·the·application·master·being·the·group·leader·is·to·easily336 and·will·forward·I/O·to·the·previous·group·leader.</p><blockquote><h4·class="info">Note</h4><p>The·purpose·of·the·application·master·being·the·group·leader·is·to·easily
337 keep·track·of·which·processes·that·belong·to·the·application.·That·is·needed337 keep·track·of·which·processes·that·belong·to·the·application.·That·is·needed
Offset 347, 55 lines modifiedOffset 347, 55 lines modified
347 defined·by·the·<code·class="inline">mod</code>·key.</p><h2·id="configuring-an-application"·class="section-heading">347 defined·by·the·<code·class="inline">mod</code>·key.</p><h2·id="configuring-an-application"·class="section-heading">
348 ··<a·href="#configuring-an-application"·class="hover-link">348 ··<a·href="#configuring-an-application"·class="hover-link">
349 ····<i·class="ri-link-m"·aria-hidden="true"></i>349 ····<i·class="ri-link-m"·aria-hidden="true"></i>
350 ··</a>350 ··</a>
351 ··<span·class="text">Configuring·an·Application</span>351 ··<span·class="text">Configuring·an·Application</span>
352 </h2>352 </h2>
353 <p>An·application·can·be·configured·using·<em>configuration·parameters</em>.·These·are·a353 <p>An·application·can·be·configured·using·<em>configuration·parameters</em>.·These·are·a
354 list·of·<code·class="inline">{Par,Val}</code>·tuples·specified·by·a·key·<code·class="inline">env</code>·in·the·<code·class="inline">.app</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9585974618-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">354 list·of·<code·class="inline">{Par,Val}</code>·tuples·specified·by·a·key·<code·class="inline">env</code>·in·the·<code·class="inline">.app</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4519052364-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">
355 ·</span><span·class="p"·data-group-id="9585974618-2">[</span><span·class="p"·data-group-id="9585974618-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="9585974618-3">}</span><span·class="p">,</span><span·class="w">355 ·</span><span·class="p"·data-group-id="4519052364-2">[</span><span·class="p"·data-group-id="4519052364-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="4519052364-3">}</span><span·class="p">,</span><span·class="w">
356 ··</span><span·class="p"·data-group-id="9585974618-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="9585974618-4">}</span><span·class="p">,</span><span·class="w">356 ··</span><span·class="p"·data-group-id="4519052364-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="4519052364-4">}</span><span·class="p">,</span><span·class="w">
357 ··</span><span·class="p"·data-group-id="9585974618-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9585974618-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup<[·...·truncated·by·diffoscope;·len:·175,·SHA:·e415452b81c06a9a16cb7e68a5c91e3dc9baf531e4221fd3469705f6e4e75808·...·]-5">}</span><span·class="p">,</span><span·class="w">357 ··</span><span·class="p"·data-group-id="4519052364-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519052364-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup<[·...·truncated·by·diffoscope;·len:·175,·SHA:·24955ebe2aa6385c70611a0ccf2ca1875f0de265a3e44cb3ee2d3ab156b9f9b1·...·]-5">}</span><span·class="p">,</span><span·class="w">
358 ··</span><span·class="p"·data-group-id="9585974618-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9585974618-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="9585974618-8">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·f84ed58a1984fbb1323d4c8e71917a0f4fc81706bd4d9c4e2d8ffd6a6c59ad09·...·]-7">}</span><span·class="p">,</span><span·class="w">358 ··</span><span·class="p"·data-group-id="4519052364-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519052364-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4519052364-8">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·7dfcce9841643a72898e62a34d9bae1c5ab958b31e69df0eef222ed7f5fbd744·...·]-7">}</span><span·class="p">,</span><span·class="w">
359 ··</span><span·class="p"·data-group-id="9585974618-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9585974618-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·183,·SHA:·e989d045f56fef631ae54284760757d3a74d5d0a13c2beb62710fdab0cf846bc·...·]-9">}</span><span·class="p">,</span><span·class="w">359 ··</span><span·class="p"·data-group-id="4519052364-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519052364-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·183,·SHA:·6910a83794ee7c6da0a32592fc1292c19620569c8cacd0152f48b96485d249ff·...·]-9">}</span><span·class="p">,</span><span·class="w">
360 ··</span><span·class="p"·data-group-id="9585974618-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9585974618-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="9585974618-13">[</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·821ef849716265f17dff4c09dec146b1cceabc570c5bce81e415d1a91ace1ce3·...·]-11">}</span><span·class="p">,</span><span·class="w">360 ··</span><span·class="p"·data-group-id="4519052364-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519052364-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="4519052364-13">[</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·ca5567190afb630c6f1bca37280381bc5dd05168b0ce5ab774077ecebf3780d1·...·]-11">}</span><span·class="p">,</span><span·class="w">
361 ··</span><span·class="p"·data-group-id="9585974618-14">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9585974618-15">[</span><span·class="p"·data-group-id="9585974618-16">{</span><span·class="ss">file</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·224,·SHA:·77734d41dbd11c4f4d8b0f85ebec04e3c5ea9a183310e5ee91449ef369b8ff90·...·]-14">}</span><span·class="w">361 ··</span><span·class="p"·data-group-id="4519052364-14">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519052364-15">[</span><span·class="p"·data-group-id="4519052364-16">{</span><span·class="ss">file</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·224,·SHA:·4258d595af80da6fbe150f900ca059ef68ac89a833e79c27ee3066a724c2fcaf·...·]-14">}</span><span·class="w">
362 ·</span><span·class="p"·data-group-id="9585974618-2">]</span><span·class="p"·data-group-id="9585974618-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">Par</code>·is·to·be·an·atom.·<code·class="inline">Val</code>·is·any·term.·The·application·can·retrieve·the362 ·</span><span·class="p"·data-group-id="4519052364-2">]</span><span·class="p"·data-group-id="4519052364-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">Par</code>·is·to·be·an·atom.·<code·class="inline">Val</code>·is·any·term.·The·application·can·retrieve·the
363 value·of·a·configuration·parameter·by·calling·<code·class="inline">application:get_env(App,·Par)</code>·or363 value·of·a·configuration·parameter·by·calling·<code·class="inline">application:get_env(App,·Par)</code>·or
364 a·number·of·similar·functions.·For·more·information,·see·module·<a·href="../../lib/kernel-10.0.1/doc/html/application.html"><code·class="inline">application</code></a>364 a·number·of·similar·functions.·For·more·information,·see·module·<a·href="../../lib/kernel-10.0.1/doc/html/application.html"><code·class="inline">application</code></a>
365 in·Kernel.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl</span><span·class="w">365 in·Kernel.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl</span><span·class="w">
366 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="7091986023-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="7091986023-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.2[·...·truncated·by·diffoscope;·len:·414,·SHA:·23b6e70cf56172c3f0fab561370628c94ef79c0623c040510950779e9623d1f1·...·]-3">]</span><span·class="w">366 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="7388321304-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="7388321304-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.2[·...·truncated·by·diffoscope;·len:·414,·SHA:·d8a5b643dd43cea052f4802c691e23fedb4b9a057167742032d1dbb02e536ad2·...·]-3">]</span><span·class="w">
  
367 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">2.3</span><span·class="p">.</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="7091986023-4">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7091986023-4">)</span><span·class="gp·unselectable">367 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">2.3</span><span·class="p">.</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="7388321304-4">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7388321304-4">)</span><span·class="gp·unselectable">
368 1&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7091986023-5">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="7091986023-5">)</span><span·class="p">.</span><span·class="w">368 1&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7388321304-5">(</span><span·class="ss">ch_app</span><span·class="p"·data-group-id="7388321304-5">)</span><span·class="p">.</span><span·class="w">
369 </span><span·class="ss">ok</span><span·class="gp·unselectable">369 </span><span·class="ss">ok</span><span·class="gp·unselectable">
370 2&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">get_env</span><span·class="p"·data-group-id="7091986023-6">(</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file</span><span·class="p"·data-group-id="7091986023-6">)</span><span·class="p">.</span><span·class="w">370 2&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">get_env</span><span·class="p"·data-group-id="7388321304-6">(</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file</span><span·class="p"·data-group-id="7388321304-6">)</span><span·class="p">.</span><span·class="w">
371 </span><span·class="p"·data-group-id="7091986023-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="s">&quot;/usr/local/log&quot;</span><span·class="p"·data-group-id="7091986023-7">}</span></code></pre><p>The·values·in·the·<code·class="inline">.app</code>·file·can·be·overridden·by·values·in·a·<em>system371 </span><span·class="p"·data-group-id="7388321304-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="s">&quot;/usr/local/log&quot;</span><span·class="p"·data-group-id="7388321304-7">}</span></code></pre><p>The·values·in·the·<code·class="inline">.app</code>·file·can·be·overridden·by·values·in·a·<em>system
372 configuration·file</em>.·This·is·a·file·that·contains·configuration·parameters·for372 configuration·file</em>.·This·is·a·file·that·contains·configuration·parameters·for
373 relevant·applications:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8413893078-1">[</span><span·class="p"·data-group-id="8413893078-2">{</span><span·class="n">Application1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8413893078-3">[</span><span·class="p"·data-group-id="8413893078-4">[·...·truncated·by·diffoscope;·len:·331,·SHA:·c2c25d8ac46c531c9eb296be980537864a3b61af189fdde2087cbdf350d2e0b2·...·]-2">}</span><span·class="p">,</span><span·class="w">373 relevant·applications:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0902981590-1">[</span><span·class="p"·data-group-id="0902981590-2">{</span><span·class="n">Application1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0902981590-3">[</span><span·class="p"·data-group-id="0902981590-4">[·...·truncated·by·diffoscope;·len:·331,·SHA:·959dba4474d01765bdb3c28f69556cb982c3eb6959f6c1045439b6c72e7807e1·...·]-2">}</span><span·class="p">,</span><span·class="w">
374 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">374 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">
375 ·</span><span·class="p"·data-group-id="8413893078-5">{</span><span·class="n">ApplicationN</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8413893078-6">[</span><span·class="p"·data-group-id="8413893078-7">{</span><span·class="n">ParN1</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·331,·SHA:·6a1946ec48559dc3e973a2ac3c5b01eac050d68c19083c81fdacf54c5287fd93·...·]-1">]</span><span·class="p">.</span></code></pre><p>The·system·configuration·is·to·be·called·<code·class="inline">Name.config</code>·and·Erlang·is·to·be375 ·</span><span·class="p"·data-group-id="0902981590-5">{</span><span·class="n">ApplicationN</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0902981590-6">[</span><span·class="p"·data-group-id="0902981590-7">{</span><span·class="n">ParN1</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·331,·SHA:·9ca50d6a9705270b5c7162336a64edfd49b0b99c4ebded310010bcd2b92fc8ae·...·]-1">]</span><span·class="p">.</span></code></pre><p>The·system·configuration·is·to·be·called·<code·class="inline">Name.config</code>·and·Erlang·is·to·be
Max diff block lines reached; 10651/57209 bytes (18.62%) of diff not shown.
149 KB
./usr/share/doc/erlang-doc/html/doc/system/appup_cookbook.html
    
Offset 120, 18 lines modifiedOffset 120, 18 lines modified
120 ··<a·href="#changing-a-functional-module"·class="hover-link">120 ··<a·href="#changing-a-functional-module"·class="hover-link">
121 ····<i·class="ri-link-m"·aria-hidden="true"></i>121 ····<i·class="ri-link-m"·aria-hidden="true"></i>
122 ··</a>122 ··</a>
123 ··<span·class="text">Changing·a·Functional·Module</span>123 ··<span·class="text">Changing·a·Functional·Module</span>
124 </h2>124 </h2>
125 <p>When·a·functional·module·has·been·changed,·for·example,·if·a·new·function·has125 <p>When·a·functional·module·has·been·changed,·for·example,·if·a·new·function·has
126 been·added·or·a·bug·has·been·corrected,·simple·code·replacement·is·sufficient,126 been·added·or·a·bug·has·been·corrected,·simple·code·replacement·is·sufficient,
127 for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9726083256-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">127 for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3380164098-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
128 ·</span><span·class="p"·data-group-id="9726083256-2">[</span><span·class="p"·data-group-id="9726083256-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9726083256-4">[</span><span·class="p"·data-group-id="9726083256-5">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m</span><span·class="p"·data-group-id="9726083256-5">}</span><span·class="p"·data-group-id="9726083256-4">]</span><span·class="p"·data-group-id="9726083256-3">}</span><span·class="p"·data-group-id="9726083256-2">]</span><span·class="p">,</span><span·class="w"> 
129 ·</span><span·class="p"·data-group-id="9726083256-6">[</span><span·class="p"·data-group-id="9726083256-7">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9726083256-8">[</span><span·class="p"·data-group-id="9726083256-9"[·...·truncated·by·diffoscope;·len:·322,·SHA:·a1322bad192d1f1c2330686272b510d930e1a1e2292c5789de4501e2ee33268c·...·]</span><span·class="w">128 ·</span><span·class="p"·data-group-id="3380164098-2">[</span><span·class="p"·data-group-id="3380164098-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3380164098-4">[</span><span·class="p"·data-group-id="3380164098-5"[·...·truncated·by·diffoscope;·len:·346,·SHA:·26bf28f20e5b4ca7d3a83b2b445ccd53d5659458691c7121942e45541578a79e·...·]</span><span·class="w">
 129 ·</span><span·class="p"·data-group-id="3380164098-6">[</span><span·class="p"·data-group-id="3380164098-7">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3380164098-8">[</span><span·class="p"·data-group-id="3380164098-9">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m</span><span·class="p"·data-group-id="3380164098-9">}</span><span·class="p"·data-group-id="3380164098-8">]</span><span·class="p"·data-group-id="3380164098-7">}</span><span·class="p"·data-group-id="3380164098-6">]</span><span·class="w">
130 </span><span·class="p"·data-group-id="9726083256-1">}</span><span·class="p">.</span></code></pre><h2·id="changing-a-residence-module"·class="section-heading">130 </span><span·class="p"·data-group-id="3380164098-1">}</span><span·class="p">.</span></code></pre><h2·id="changing-a-residence-module"·class="section-heading">
131 ··<a·href="#changing-a-residence-module"·class="hover-link">131 ··<a·href="#changing-a-residence-module"·class="hover-link">
132 ····<i·class="ri-link-m"·aria-hidden="true"></i>132 ····<i·class="ri-link-m"·aria-hidden="true"></i>
133 ··</a>133 ··</a>
134 ··<span·class="text">Changing·a·Residence·Module</span>134 ··<span·class="text">Changing·a·Residence·Module</span>
135 </h2>135 </h2>
136 <p>In·a·system·implemented·according·to·the·OTP·design·principles,·all·processes,136 <p>In·a·system·implemented·according·to·the·OTP·design·principles,·all·processes,
137 except·system·processes·and·special·processes,·reside·in·one·of·the·behaviours137 except·system·processes·and·special·processes,·reside·in·one·of·the·behaviours
Offset 142, 46 lines modifiedOffset 142, 46 lines modified
142 ··<a·href="#changing-a-callback-module"·class="hover-link">142 ··<a·href="#changing-a-callback-module"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
144 ··</a>144 ··</a>
145 ··<span·class="text">Changing·a·Callback·Module</span>145 ··<span·class="text">Changing·a·Callback·Module</span>
146 </h2>146 </h2>
147 <p>A·callback·module·is·a·functional·module,·and·for·code·extensions·simple·code147 <p>A·callback·module·is·a·functional·module,·and·for·code·extensions·simple·code
148 replacement·is·sufficient.</p><p><em>Example</em></p><p>When·adding·a·function·to·<code·class="inline">ch3</code>,·as·described·in·the·example·in148 replacement·is·sufficient.</p><p><em>Example</em></p><p>When·adding·a·function·to·<code·class="inline">ch3</code>,·as·described·in·the·example·in
149 <a·href="release_handling.html#appup">Release·Handling</a>,·<code·class="inline">ch_app.appup</code>·looks·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3411338976-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">149 <a·href="release_handling.html#appup">Release·Handling</a>,·<code·class="inline">ch_app.appup</code>·looks·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0448066964-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
150 ·</span><span·class="p"·data-group-id="3411338976-2">[</span><span·class="p"·data-group-id="3411338976-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3411338976-4">[</span><span·class="p"·data-group-id="3411338976-5">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="3411338976-5">}</span><span·class="p"·data-group-id="3411338976-4">]</span><span·class="p"·data-group-id="3411338976-3">}</span><span·class="p"·data-group-id="3411338976-2">]</span><span·class="p">,</span><span·class="w"> 
151 ·</span><span·class="p"·data-group-id="3411338976-6">[</span><span·class="p"·data-group-id="3411338976-7">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3411338976-8">[</span><span·class="p"·data-group-id="3411338976-9"[·...·truncated·by·diffoscope;·len:·324,·SHA:·7fabb221cc41206266bf7cb12c490c9fc07e64410b36729910c2c5b0ca1e10cd·...·]</span><span·class="w">150 ·</span><span·class="p"·data-group-id="0448066964-2">[</span><span·class="p"·data-group-id="0448066964-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0448066964-4">[</span><span·class="p"·data-group-id="0448066964-5"[·...·truncated·by·diffoscope;·len:·348,·SHA:·943f185db67ef8dab9f4c369d2d2183caf4baf6bba7e79cb28b418f9eac593a9·...·]</span><span·class="w">
 151 ·</span><span·class="p"·data-group-id="0448066964-6">[</span><span·class="p"·data-group-id="0448066964-7">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0448066964-8">[</span><span·class="p"·data-group-id="0448066964-9">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="0448066964-9">}</span><span·class="p"·data-group-id="0448066964-8">]</span><span·class="p"·data-group-id="0448066964-7">}</span><span·class="p"·data-group-id="0448066964-6">]</span><span·class="w">
152 </span><span·class="p"·data-group-id="3411338976-1">}</span><span·class="p">.</span></code></pre><p>OTP·also·supports·changing·the·internal·state·of·behaviour·processes;·see152 </span><span·class="p"·data-group-id="0448066964-1">}</span><span·class="p">.</span></code></pre><p>OTP·also·supports·changing·the·internal·state·of·behaviour·processes;·see
153 <a·href="appup_cookbook.html#int_state">Changing·Internal·State</a>.</p><p><a·href=""·id="int_state"></a></p><h2·id="changing-internal-state"·class="section-heading">153 <a·href="appup_cookbook.html#int_state">Changing·Internal·State</a>.</p><p><a·href=""·id="int_state"></a></p><h2·id="changing-internal-state"·class="section-heading">
154 ··<a·href="#changing-internal-state"·class="hover-link">154 ··<a·href="#changing-internal-state"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">Changing·Internal·State</span>157 ··<span·class="text">Changing·Internal·State</span>
158 </h2>158 </h2>
159 <p>In·this·case,·simple·code·replacement·is·not·sufficient.·The·process·must159 <p>In·this·case,·simple·code·replacement·is·not·sufficient.·The·process·must
160 explicitly·transform·its·state·using·the·callback·function·<code·class="inline">code_change/3</code>·before160 explicitly·transform·its·state·using·the·callback·function·<code·class="inline">code_change/3</code>·before
161 switching·to·the·new·version·of·the·callback·module.·Thus,·synchronized·code161 switching·to·the·new·version·of·the·callback·module.·Thus,·synchronized·code
162 replacement·is·used.</p><p><em>Example</em></p><p>Consider·the·<code·class="inline">ch3</code>·module·from162 replacement·is·used.</p><p><em>Example</em></p><p>Consider·the·<code·class="inline">ch3</code>·module·from
163 <a·href="gen_server_concepts.html#ex">gen_server·Behaviour</a>.·The·internal·state·is·a·term163 <a·href="gen_server_concepts.html#ex">gen_server·Behaviour</a>.·The·internal·state·is·a·term
164 <code·class="inline">Chs</code>·representing·the·available·channels.·Assume·you·want·to·add·a·counter·<code·class="inline">N</code>,164 <code·class="inline">Chs</code>·representing·the·available·channels.·Assume·you·want·to·add·a·counter·<code·class="inline">N</code>,
165 which·keeps·track·of·the·number·of·<code·class="inline">alloc</code>·requests·so·far.·This·means·that·the165 which·keeps·track·of·the·number·of·<code·class="inline">alloc</code>·requests·so·far.·This·means·that·the
166 format·must·be·changed·to·<code·class="inline">{Chs,N}</code>.</p><p>The·<code·class="inline">.appup</code>·file·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2276264926-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">166 format·must·be·changed·to·<code·class="inline">{Chs,N}</code>.</p><p>The·<code·class="inline">.appup</code>·file·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1913924644-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
167 ·</span><span·class="p"·data-group-id="2276264926-2">[</span><span·class="p"·data-group-id="2276264926-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2276264926-4">[</span><span·class="p"·data-group-id="2276264926-5"[·...·truncated·by·diffoscope;·len:·654,·SHA:·684b5af86ebfda760ab1d93f769f5c811c5476b227ac5c554c729fd30a75ad2b·...·]-2">]</span><span·class="p">,</span><span·class="w">167 ·</span><span·class="p"·data-group-id="1913924644-2">[</span><span·class="p"·data-group-id="1913924644-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1913924644-4">[</span><span·class="p"·data-group-id="1913924644-5"[·...·truncated·by·diffoscope;·len:·654,·SHA:·2c79dac4f91e5b9aff46b4803662f9386e3b9b1b12db4ae2d9149edc7140c12d·...·]-2">]</span><span·class="p">,</span><span·class="w">
168 ·</span><span·class="p"·data-group-id="2276264926-8">[</span><span·class="p"·data-group-id="2276264926-9">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2276264926-10">[</span><span·class="p"·data-group-id="2276264926-1[·...·truncated·by·diffoscope;·len:·662,·SHA:·b1b5a864a95deb4e78f2c67c48771070d43b954b15b2295ba74a4ec2e29dbe4e·...·]-8">]</span><span·class="w">168 ·</span><span·class="p"·data-group-id="1913924644-8">[</span><span·class="p"·data-group-id="1913924644-9">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1913924644-10">[</span><span·class="p"·data-group-id="1913924644-1[·...·truncated·by·diffoscope;·len:·662,·SHA:·8267e1b316c267ab323ed5ca3fdd7ee75f3b1def1dd0bcca4deff1ea928415d9·...·]-8">]</span><span·class="w">
169 </span><span·class="p"·data-group-id="2276264926-1">}</span><span·class="p">.</span></code></pre><p>The·third·element·of·the·<code·class="inline">update</code>·instruction·is·a·tuple·<code·class="inline">{advanced,Extra}</code>,169 </span><span·class="p"·data-group-id="1913924644-1">}</span><span·class="p">.</span></code></pre><p>The·third·element·of·the·<code·class="inline">update</code>·instruction·is·a·tuple·<code·class="inline">{advanced,Extra}</code>,
170 which·says·that·the·affected·processes·are·to·do·a·state·transformation·before170 which·says·that·the·affected·processes·are·to·do·a·state·transformation·before
171 loading·the·new·version·of·the·module.·This·is·done·by·the·processes·calling·the171 loading·the·new·version·of·the·module.·This·is·done·by·the·processes·calling·the
172 callback·function·<code·class="inline">code_change/3</code>·(see·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>·in·STDLIB).172 callback·function·<code·class="inline">code_change/3</code>·(see·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>·in·STDLIB).
173 The·term·<code·class="inline">Extra</code>,·in·this·case·<code·class="inline">[]</code>,·is·passed·as·is·to·the·function:</p><p><a·href=""·id="code_change"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8659264059-1">(</span><span·class="ss">ch3</span><span·class="p"·data-group-id="8659264059-1">)</span><span·class="p">.</span><span·class="w">173 The·term·<code·class="inline">Extra</code>,·in·this·case·<code·class="inline">[]</code>,·is·passed·as·is·to·the·function:</p><p><a·href=""·id="code_change"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9044829975-1">(</span><span·class="ss">ch3</span><span·class="p"·data-group-id="9044829975-1">)</span><span·class="p">.</span><span·class="w">
174 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">174 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
175 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8659264059-2">(</span><span·class="p"·data-group-id="8659264059-3">[</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi">3</span><span·class="p"·data-group-id="8659264059-3">]</span><span·class="p"·data-group-id="8659264059-2">)</span><span·class="p">.</span><span·class="w">175 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9044829975-2">(</span><span·class="p"·data-group-id="9044829975-3">[</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi">3</span><span·class="p"·data-group-id="9044829975-3">]</span><span·class="p"·data-group-id="9044829975-2">)</span><span·class="p">.</span><span·class="w">
176 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">176 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
177 </span><span·class="nf">code_change</span><span·class="p"·data-group-id="8659264059-4">(</span><span·class="p"·data-group-id="8659264059-5">{</span><span·class="ss">down</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Vsn</span><span·class="p"·data-group-id="8659264059-5">}</span><s[·...·truncated·by·diffoscope;·len:·391,·SHA:·ff38f0a44b4fb87cfffb2aa7eb9a597d04a2c7b453e1db3320ae05dccb8df1ee·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">code_change</span><span·class="p"·data-group-id="9044829975-4">(</span><span·class="p"·data-group-id="9044829975-5">{</span><span·class="ss">down</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Vsn</span><span·class="p"·data-group-id="9044829975-5">}</span><s[·...·truncated·by·diffoscope;·len:·391,·SHA:·e09bd7f97a32d333522279aab184428e9f6d70e92a8805842b796cd62a0c4d3a·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ····</span><span·class="p"·data-group-id="8659264059-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="8659264059-7">}</span><span·class="p">;</span><span·class="w">178 ····</span><span·class="p"·data-group-id="9044829975-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="9044829975-7">}</span><span·class="p">;</span><span·class="w">
179 </span><span·class="nf">code_change</span><span·class="p"·data-group-id="8659264059-8">(</span><span·class="p">_</span><span·class="n">Vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Extra</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·a4538bd5abbb6ce27b9c2fd598aa2147e24227640f8feaf93646f44733a9c51e·...·]-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">179 </span><span·class="nf">code_change</span><span·class="p"·data-group-id="9044829975-8">(</span><span·class="p">_</span><span·class="n">Vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Extra</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·aea6a1928b8b357478bc5c8e5bf0950c66f8b2a3add693e6ad6c84db192bdfba·...·]-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
180 ····</span><span·class="p"·data-group-id="8659264059-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8659264059-10">{</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·c[·...·truncated·by·diffoscope;·len:·88,·SHA:·0414417b7439924748cf3cd499184de7ccc82046b64785e0c59ec95bda24bf5d·...·]-9">}</span><span·class="p">.</span></code></pre><p>The·first·argument·is·<code·class="inline">{down,Vsn}</code>·if·there·is·a·downgrade,·or·<code·class="inline">Vsn</code>·if·there·is180 ····</span><span·class="p"·data-group-id="9044829975-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9044829975-10">{</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·c[·...·truncated·by·diffoscope;·len:·88,·SHA:·12f9c5395074713dd206fbd2ecb68419bef623326baf4f186526565096030c30·...·]-9">}</span><span·class="p">.</span></code></pre><p>The·first·argument·is·<code·class="inline">{down,Vsn}</code>·if·there·is·a·downgrade,·or·<code·class="inline">Vsn</code>·if·there·is
181 a·upgrade.·The·term·<code·class="inline">Vsn</code>·is·fetched·from·the·'original'·version·of·the·module,181 a·upgrade.·The·term·<code·class="inline">Vsn</code>·is·fetched·from·the·'original'·version·of·the·module,
182 that·is,·the·version·you·are·upgrading·from,·or·downgrading·to.</p><p>The·version·is·defined·by·the·module·attribute·<code·class="inline">vsn</code>,·if·any.·There·is·no·such182 that·is,·the·version·you·are·upgrading·from,·or·downgrading·to.</p><p>The·version·is·defined·by·the·module·attribute·<code·class="inline">vsn</code>,·if·any.·There·is·no·such
183 attribute·in·<code·class="inline">ch3</code>,·so·in·this·case·the·version·is·the·checksum·(a·huge·integer)183 attribute·in·<code·class="inline">ch3</code>,·so·in·this·case·the·version·is·the·checksum·(a·huge·integer)
184 of·the·beam·file,·an·uninteresting·value,·which·is·ignored.</p><p>The·other·callback·functions·of·<code·class="inline">ch3</code>·must·also·be·modified·and·perhaps·a·new184 of·the·beam·file,·an·uninteresting·value,·which·is·ignored.</p><p>The·other·callback·functions·of·<code·class="inline">ch3</code>·must·also·be·modified·and·perhaps·a·new
185 interface·function·must·be·added,·but·this·is·not·shown·here.</p><h2·id="module-dependencies"·class="section-heading">185 interface·function·must·be·added,·but·this·is·not·shown·here.</p><h2·id="module-dependencies"·class="section-heading">
186 ··<a·href="#module-dependencies"·class="hover-link">186 ··<a·href="#module-dependencies"·class="hover-link">
187 ····<i·class="ri-link-m"·aria-hidden="true"></i>187 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 190, 67 lines modifiedOffset 190, 67 lines modified
190 </h2>190 </h2>
191 <p>Assume·that·a·module·is·extended·by·adding·an·interface·function,·as·in·the191 <p>Assume·that·a·module·is·extended·by·adding·an·interface·function,·as·in·the
192 example·in·<a·href="release_handling.html#appup">Release·Handling</a>,·where·a·function192 example·in·<a·href="release_handling.html#appup">Release·Handling</a>,·where·a·function
193 <code·class="inline">available/0</code>·is·added·to·<code·class="inline">ch3</code>.</p><p>If·a·call·is·added·to·this·function,·say·in·module·<code·class="inline">m1</code>,·a·runtime·error·could193 <code·class="inline">available/0</code>·is·added·to·<code·class="inline">ch3</code>.</p><p>If·a·call·is·added·to·this·function,·say·in·module·<code·class="inline">m1</code>,·a·runtime·error·could
194 can·occur·during·release·upgrade·if·the·new·version·of·<code·class="inline">m1</code>·is·loaded·first·and194 can·occur·during·release·upgrade·if·the·new·version·of·<code·class="inline">m1</code>·is·loaded·first·and
195 calls·<code·class="inline">ch3:available/0</code>·before·the·new·version·of·<code·class="inline">ch3</code>·is·loaded.</p><p>Thus,·<code·class="inline">ch3</code>·must·be·loaded·before·<code·class="inline">m1</code>,·in·the·upgrade·case,·and·conversely·in195 calls·<code·class="inline">ch3:available/0</code>·before·the·new·version·of·<code·class="inline">ch3</code>·is·loaded.</p><p>Thus,·<code·class="inline">ch3</code>·must·be·loaded·before·<code·class="inline">m1</code>,·in·the·upgrade·case,·and·conversely·in
196 the·downgrade·case.·<code·class="inline">m1</code>·is·said·to·be·<em>dependent·on</em>·<code·class="inline">ch3</code>.·In·a·release196 the·downgrade·case.·<code·class="inline">m1</code>·is·said·to·be·<em>dependent·on</em>·<code·class="inline">ch3</code>.·In·a·release
197 handling·instruction,·this·is·expressed·by·the·<code·class="inline">DepMods</code>·element:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3674544774-1">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="3674544774-1">}</span><span·class="w"> 
198 </span><span·class="p"·data-group-id="3674544774-2">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3674544774[·...·truncated·by·diffoscope;·len:·608,·SHA:·a1038faa4302b212feffd9762561b09c2592c33d92f9c9b2ce1f3974564bb87a·...·]197 handling·instruction,·this·is·expressed·by·the·<code·class="inline">DepMods</code>·element:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6688732974-1">{</span><span·class="nb">load_module</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·199,·SHA:·7bdffc3ccbaa4318a3b749a29b33dce7e003548075d0e9ab9644f8f17bb77d4b·...·]
 198 </span><span·class="p"·data-group-id="6688732974-2">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6688732974-3">{</span><span·class="ss">advanced</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Extra</span><span·class="p"·data-group-id="6688732974-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="6688732974-2">}</span></code></pre><p><code·class="inline">DepMods</code>·is·a·list·of·modules,·on·which·<code·class="inline">Module</code>·is·dependent.</p><p><em>Example</em></p><p>The·module·<code·class="inline">m1</code>·in·application·<code·class="inline">myapp</code>·is·dependent·on·<code·class="inline">ch3</code>·when
199 upgrading·from·&quot;1&quot;·to·&quot;2&quot;,·or·downgrading·from·&quot;2&quot;·to·&quot;1&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">myapp</span><span·class="p">.</span><span·class="nc">appup</span><span·class="p">:</span><span·class="w">199 upgrading·from·&quot;1&quot;·to·&quot;2&quot;,·or·downgrading·from·&quot;2&quot;·to·&quot;1&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">myapp</span><span·class="p">.</span><span·class="nc">appup</span><span·class="p">:</span><span·class="w">
  
200 </span><span·class="p"·data-group-id="9798243152-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">200 </span><span·class="p"·data-group-id="4110862491-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
201 ·</span><span·class="p"·data-group-id="9798243152-2">[</span><span·class="p"·data-group-id="9798243152-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9798243152-4">[</span><span·class="p"·data-group-id="9798243152-5">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9798243152-6">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="9798243152-6">]</span><span·class="p"·data-group-id="9798243152-5">}</span><span·class="p"·data-group-id="9798243152-4">]</span><span·class="p"·data-group-id="9798243152-3">}</span><span·class="p"·data-group-id="9798243152-2">]</span><span·class="p">,</span><span·class="w"> 
202 ·</span><span·class="p"·data-group-id="9798243152-7">[</span><span·class="p"·data-group-id="9798243152-8">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9798243152-9">[</span><span·class="p"·data-group-id="9798243152-10[·...·truncated·by·diffoscope;·len:·508,·SHA:·9b63d504ccdd5ea99c6bd785b3c49b283fdd7a49a903fdb2c625dcf3ca85f16e·...·]</span><span·class="w">201 ·</span><span·class="p"·data-group-id="4110862491-2">[</span><span·class="p"·data-group-id="4110862491-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4110862491-4">[</span><span·class="p"·data-group-id="4110862491-5"[·...·truncated·by·diffoscope;·len:·528,·SHA:·b074b5f2b2a6a1bd61d47d7c1fc5cf88e29ceba1411e9c1139181bfbbe2df485·...·]</span><span·class="w">
 202 ·</span><span·class="p"·data-group-id="4110862491-7">[</span><span·class="p"·data-group-id="4110862491-8">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4110862491-9">[</span><span·class="p"·data-group-id="4110862491-10">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4110862491-11">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4110862491-11">]</span><span·class="p"·data-group-id="4110862491-10">}</span><span·class="p"·data-group-id="4110862491-9">]</span><span·class="p"·data-group-id="4110862491-8">}</span><span·class="p"·data-group-id="4110862491-7">]</span><span·class="w">
203 </span><span·class="p"·data-group-id="9798243152-1">}</span><span·class="p">.</span><span·class="w">203 </span><span·class="p"·data-group-id="4110862491-1">}</span><span·class="p">.</span><span·class="w">
  
204 </span><span·class="ss">ch_app</span><span·class="p">.</span><span·class="nc">appup</span><span·class="p">:</span><span·class="w">204 </span><span·class="ss">ch_app</span><span·class="p">.</span><span·class="nc">appup</span><span·class="p">:</span><span·class="w">
  
205 </span><span·class="p"·data-group-id="9798243152-12">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">205 </span><span·class="p"·data-group-id="4110862491-12">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
206 ·</span><span·class="p"·data-group-id="9798243152-13">[</span><span·class="p"·data-group-id="9798243152-14">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9798243152-15">[</span><span·class="p"·data-group-id="9798243152-16">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="9798243152-16">}</span><span·class="p"·data-group-id="9798243152-15">]</span><span·class="p"·data-group-id="9798243152-14">}</span><span·class="p"·data-group-id="9798243152-13">]</span><span·class="p">,</span><span·class="w"> 
207 ·</span><span·class="p"·data-group-id="9798243152-17">[</span><span·class="p"·data-group-id="9798243152-18">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9798243152-19">[</span><span·class="p"·data-group-id="9798243152[·...·truncated·by·diffoscope;·len:·332,·SHA:·a019ee582bff393105dbc7967408b209b011a62be67997795a4cf02519344cea·...·]</span><span·class="w">206 ·</span><span·class="p"·data-group-id="4110862491-13">[</span><span·class="p"·data-group-id="4110862491-14">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4110862491-15">[</span><span·class="p"·data-group-id="4110862491[·...·truncated·by·diffoscope;·len:·356,·SHA:·41df8d19c511adf02d04d63a654ef1c90487fc61dfdbd0a687df9ea71eefa698·...·]</span><span·class="w">
 207 ·</span><span·class="p"·data-group-id="4110862491-17">[</span><span·class="p"·data-group-id="4110862491-18">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4110862491-19">[</span><span·class="p"·data-group-id="4110862491-20">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4110862491-20">}</span><span·class="p"·data-group-id="4110862491-19">]</span><span·class="p"·data-group-id="4110862491-18">}</span><span·class="p"·data-group-id="4110862491-17">]</span><span·class="w">
208 </span><span·class="p"·data-group-id="9798243152-12">}</span><span·class="p">.</span></code></pre><p>If·instead·<code·class="inline">m1</code>·and·<code·class="inline">ch3</code>·belong·to·the·same·application,·the·<code·class="inline">.appup</code>·file·can208 </span><span·class="p"·data-group-id="4110862491-12">}</span><span·class="p">.</span></code></pre><p>If·instead·<code·class="inline">m1</code>·and·<code·class="inline">ch3</code>·belong·to·the·same·application,·the·<code·class="inline">.appup</code>·file·can
209 look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4210382154-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">209 look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4475665900-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
210 ·</span><span·class="p"·data-group-id="4210382154-2">[</span><span·class="p"·data-group-id="4210382154-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">210 ·</span><span·class="p"·data-group-id="4475665900-2">[</span><span·class="p"·data-group-id="4475665900-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">
211 ···</span><span·class="p"·data-group-id="4210382154-4">[</span><span·class="p"·data-group-id="4210382154-5">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4210382154-5">}</span><span·class="p">,</span><span·class="w">211 ···</span><span·class="p"·data-group-id="4475665900-4">[</span><span·class="p"·data-group-id="4475665900-5">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4475665900-5">}</span><span·class="p">,</span><span·class="w">
212 ····</span><span·class="p"·data-group-id="4210382154-6">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4210382154-7">[</span><span·class="ss">ch3</spa[·...·truncated·by·diffoscope;·len:·255,·SHA:·d4fd0b0db0c4963f26bc37f537d8b62a54a3efb495371e19eb40a2928a4751c4·...·]-2">]</span><span·class="p">,</span><span·class="w">212 ····</span><span·class="p"·data-group-id="4475665900-6">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4475665900-7">[</span><span·class="ss">ch3</spa[·...·truncated·by·diffoscope;·len:·255,·SHA:·3e0d84cbd856446decd6753954811f270d1e602e2e1c5f54c6fe8df8d24ee6a5·...·]-2">]</span><span·class="p">,</span><span·class="w">
213 ·</span><span·class="p"·data-group-id="4210382154-8">[</span><span·class="p"·data-group-id="4210382154-9">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">213 ·</span><span·class="p"·data-group-id="4475665900-8">[</span><span·class="p"·data-group-id="4475665900-9">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">
214 ···</span><span·class="p"·data-group-id="4210382154-10">[</span><span·class="p"·data-group-id="4210382154-11">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4210382154-11">}</span><span·class="p">,</span><span·class="w">214 ···</span><span·class="p"·data-group-id="4475665900-10">[</span><span·class="p"·data-group-id="4475665900-11">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4475665900-11">}</span><span·class="p">,</span><span·class="w">
215 ····</span><span·class="p"·data-group-id="4210382154-12">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4210382154-13">[</span><span·class="ss">ch3</s[·...·truncated·by·diffoscope;·len:·260,·SHA:·14d32aab2e2d8d20391a695240c5a38ed322a7826c8495b2e0dc9582d4afb7ca·...·]-8">]</span><span·class="w">215 ····</span><span·class="p"·data-group-id="4475665900-12">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">m1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4475665900-13">[</span><span·class="ss">ch3</s[·...·truncated·by·diffoscope;·len:·260,·SHA:·f27adb8c61987c86e54522e8e269cc87cb010cce15d471f1a7e690d7604473c8·...·]-8">]</span><span·class="w">
216 </span><span·class="p"·data-group-id="4210382154-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">m1</code>·is·dependent·on·<code·class="inline">ch3</code>·also·when·downgrading.·<code·class="inline">systools</code>·knows·the216 </span><span·class="p"·data-group-id="4475665900-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">m1</code>·is·dependent·on·<code·class="inline">ch3</code>·also·when·downgrading.·<code·class="inline">systools</code>·knows·the
217 difference·between·up-·and·downgrading·and·generates·a·correct·<code·class="inline">relup</code>,·where217 difference·between·up-·and·downgrading·and·generates·a·correct·<code·class="inline">relup</code>,·where
218 <code·class="inline">ch3</code>·is·loaded·before·<code·class="inline">m1</code>·when·upgrading,·but·<code·class="inline">m1</code>·is·loaded·before·<code·class="inline">ch3</code>·when218 <code·class="inline">ch3</code>·is·loaded·before·<code·class="inline">m1</code>·when·upgrading,·but·<code·class="inline">m1</code>·is·loaded·before·<code·class="inline">ch3</code>·when
219 downgrading.</p><p><a·href=""·id="spec"></a></p><h2·id="changing-code-for-a-special-process"·class="section-heading">219 downgrading.</p><p><a·href=""·id="spec"></a></p><h2·id="changing-code-for-a-special-process"·class="section-heading">
220 ··<a·href="#changing-code-for-a-special-process"·class="hover-link">220 ··<a·href="#changing-code-for-a-special-process"·class="hover-link">
221 ····<i·class="ri-link-m"·aria-hidden="true"></i>221 ····<i·class="ri-link-m"·aria-hidden="true"></i>
222 ··</a>222 ··</a>
223 ··<span·class="text">Changing·Code·for·a·Special·Process</span>223 ··<span·class="text">Changing·Code·for·a·Special·Process</span>
224 </h2>224 </h2>
225 <p>In·this·case,·simple·code·replacement·is·not·sufficient.·When·a·new·version·of·a225 <p>In·this·case,·simple·code·replacement·is·not·sufficient.·When·a·new·version·of·a
226 residence·module·for·a·special·process·is·loaded,·the·process·must·make·a·fully226 residence·module·for·a·special·process·is·loaded,·the·process·must·make·a·fully
227 qualified·call·to·its·loop·function·to·switch·to·the·new·code.·Thus,227 qualified·call·to·its·loop·function·to·switch·to·the·new·code.·Thus,
228 synchronized·code·replacement·must·be·used.</p><blockquote><h4·class="info">Note</h4><p>The·name(s)·of·the·user-defined·residence·module(s)·must·be·listed·in·the228 synchronized·code·replacement·must·be·used.</p><blockquote><h4·class="info">Note</h4><p>The·name(s)·of·the·user-defined·residence·module(s)·must·be·listed·in·the
229 <code·class="inline">Modules</code>·part·of·the·child·specification·for·the·special·process.·Otherwise229 <code·class="inline">Modules</code>·part·of·the·child·specification·for·the·special·process.·Otherwise
230 the·release·handler·cannot·find·the·process.</p></blockquote><p><em>Example</em></p><p>Consider·the·example·<code·class="inline">ch4</code>·in·<a·href="spec_proc.html#ex">sys·and·proc_lib</a>.230 the·release·handler·cannot·find·the·process.</p></blockquote><p><em>Example</em></p><p>Consider·the·example·<code·class="inline">ch4</code>·in·<a·href="spec_proc.html#ex">sys·and·proc_lib</a>.
231 When·started·by·a·supervisor,·the·child·specification·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0735929570-1">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0735929570-2">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</sp[·...·truncated·by·diffoscope;·len:·198,·SHA:·7234bfc917caf014868d4c58016df30a8ffc7a2527a9125750ffccbcf16ad77f·...·]-2">}</span><span·class="p">,</span><span·class="w">231 When·started·by·a·supervisor,·the·child·specification·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9783916038-1">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9783916038-2">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</sp[·...·truncated·by·diffoscope;·len:·198,·SHA:·c4d5f84b26f084224f4004154aac78c18655546ef97e0b99cabed7a509645084·...·]-2">}</span><span·class="p">,</span><span·class="w">
232 ·</span><span·class="ss">permanent</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">worker</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0735929570-4">[</span><span·class="ss">ch4</span><span·class="p"·data-group-id="0735929570-4">]</span><span·class="p"·data-group-id="0735929570-1">}</span></code></pre><p>If·<code·class="inline">ch4</code>·is·part·of·the·application·<code·class="inline">sp_app</code>·and·a·new·version·of·the·module·is232 ·</span><span·class="ss">permanent</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">worker</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9783916038-4">[</span><span·class="ss">ch4</span><span·class="p"·data-group-id="9783916038-4">]</span><span·class="p"·data-group-id="9783916038-1">}</span></code></pre><p>If·<code·class="inline">ch4</code>·is·part·of·the·application·<code·class="inline">sp_app</code>·and·a·new·version·of·the·module·is
233 to·be·loaded·when·upgrading·from·version·&quot;1&quot;·to·&quot;2&quot;·of·this·application,233 to·be·loaded·when·upgrading·from·version·&quot;1&quot;·to·&quot;2&quot;·of·this·application,
234 <code·class="inline">sp_app.appup</code>·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2272730898-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">234 <code·class="inline">sp_app.appup</code>·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9133905222-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
235 ·</span><span·class="p"·data-group-id="2272730898-2">[</span><span·class="p"·data-group-id="2272730898-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2272730898-4">[</span><span·class="p"·data-group-id="2272730898-5">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2272730898-6">{</span><span·class="ss">advanced</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2272730898-7">[</span><span·class="p"·data-group-id="2272730898-7">]</span><span·class="p"·data-group-id="2272730898-6">}</span><span·class="p"·data-group-id="2272730898-5">}</span><span·class="p"·data-group-id="2272730898-4">]</span><span·class="p"·data-group-id="2272730898-3">}</span><span·class="p"·data-group-id="2272730898-2">]</span><span·class="p">,</span><span·class="w"> 
236 ·</span><span·class="p"·data-group-id="2272730898-8">[</span><span·class="p"·data-group-id="2272730898-9">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2272730898-10">[</span><span·class="p"·data-group-id="2272730898-1[·...·truncated·by·diffoscope;·len:·667,·SHA:·2173d63b5e1a871b04a959a4b992cd18d354ca545194da2890b1b36661a146ea·...·]</span><span·class="w">235 ·</span><span·class="p"·data-group-id="9133905222-2">[</span><span·class="p"·data-group-id="9133905222-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9133905222-4">[</span><span·class="p"·data-group-id="9133905222-5"[·...·truncated·by·diffoscope;·len:·683,·SHA:·0a01998ffeaa7b729286bd8c150b927c8986e088287297d68b7c23c682fd3f9d·...·]</span><span·class="w">
 236 ·</span><span·class="p"·data-group-id="9133905222-8">[</span><span·class="p"·data-group-id="9133905222-9">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9133905222-10">[</span><span·class="p"·data-group-id="9133905222-11">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9133905222-12">{</span><span·class="ss">advanced</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9133905222-13">[</span><span·class="p"·data-group-id="9133905222-13">]</span><span·class="p"·data-group-id="9133905222-12">}</span><span·class="p"·data-group-id="9133905222-11">}</span><span·class="p"·data-group-id="9133905222-10">]</span><span·class="p"·data-group-id="9133905222-9">}</span><span·class="p"·data-group-id="9133905222-8">]</span><span·class="w">
237 </span><span·class="p"·data-group-id="2272730898-1">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">update</code>·instruction·must·contain·the·tuple·<code·class="inline">{advanced,Extra}</code>.·The237 </span><span·class="p"·data-group-id="9133905222-1">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">update</code>·instruction·must·contain·the·tuple·<code·class="inline">{advanced,Extra}</code>.·The
238 instruction·makes·the·special·process·call·the·callback·function238 instruction·makes·the·special·process·call·the·callback·function
239 <code·class="inline">system_code_change/4</code>,·a·function·the·user·must·implement.·The·term·<code·class="inline">Extra</code>,·in239 <code·class="inline">system_code_change/4</code>,·a·function·the·user·must·implement.·The·term·<code·class="inline">Extra</code>,·in
240 this·case·<code·class="inline">[]</code>,·is·passed·as·is·to·<code·class="inline">system_code_change/4</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6629210224-1">(</span><span·class="ss">ch4</span><span·class="p"·data-group-id="6629210224-1">)</span><span·class="p">.</span><span·class="w">240 this·case·<code·class="inline">[]</code>,·is·passed·as·is·to·<code·class="inline">system_code_change/4</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4480922089-1">(</span><span·class="ss">ch4</span><span·class="p"·data-group-id="4480922089-1">)</span><span·class="p">.</span><span·class="w">
241 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">241 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 103750/152471 bytes (68.05%) of diff not shown.
4.51 KB
./usr/share/doc/erlang-doc/html/doc/system/benchmarking.html
    
Offset 144, 16 lines modifiedOffset 144, 16 lines modified
144 fast·as·possible,·what·can·we·do?·One·way·could·be·to·generate·more144 fast·as·possible,·what·can·we·do?·One·way·could·be·to·generate·more
145 than·two·bytes·at·the·time.</p><pre><code·class="text">%·erlperf·'rand:bytes(100).'·'crypto:strong_rand_bytes(100).'145 than·two·bytes·at·the·time.</p><pre><code·class="text">%·erlperf·'rand:bytes(100).'·'crypto:strong_rand_bytes(100).'
146 Code···································||········QPS·······Time···Rel146 Code···································||········QPS·······Time···Rel
147 rand:bytes(100).························1····2124·Ki·····470·ns··100%147 rand:bytes(100).························1····2124·Ki·····470·ns··100%
148 crypto:strong_rand_bytes(100).··········1····1915·Ki·····522·ns···90%</code></pre><p><a·href="../../lib/stdlib-6.0.1/doc/html/rand.html#bytes/1"><code·class="inline">rand:bytes/1</code></a>·is·still·faster·when·we·generate·100·bytes·at·the·time,148 crypto:strong_rand_bytes(100).··········1····1915·Ki·····522·ns···90%</code></pre><p><a·href="../../lib/stdlib-6.0.1/doc/html/rand.html#bytes/1"><code·class="inline">rand:bytes/1</code></a>·is·still·faster·when·we·generate·100·bytes·at·the·time,
149 but·the·relative·difference·is·smaller.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erlperf·&#39;rand:bytes(1000).&#39;·&#39;crypto:strong_rand_bytes(1000).&#39;</span><span·class="w">149 but·the·relative·difference·is·smaller.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erlperf·&#39;rand:bytes(1000).&#39;·&#39;crypto:strong_rand_bytes(1000).&#39;</span><span·class="w">
150 </span><span·class="n">Code</span><span·class="w">····································</span><span·class="p">||</span><span·class="w">········</span><span·class="n">QPS</span><span·class="w">·······</span><span·class="n">Time</span><span·class="w">···</span><span·class="n">Rel</span><span·class="w">150 </span><span·class="n">Code</span><span·class="w">····································</span><span·class="p">||</span><span·class="w">········</span><span·class="n">QPS</span><span·class="w">·······</span><span·class="n">Time</span><span·class="w">···</span><span·class="n">Rel</span><span·class="w">
151 </span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">strong_rand_bytes</span><span·class="p"·data-group-id="8369121805-1">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="8369121805-1">)</span><span·class="p">.</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">····</span><span·class="mi">1518</span><span·class="w">·</span><span·class="n">Ki</span><span·class="w">·····</span><span·class="mi">658</span><span·class="w">·</span><span·class="ss">ns</span><span·class="w">··</span><span·class="mi">100</span><span·class="c1">%</span><span·class="w">151 </span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">strong_rand_bytes</span><span·class="p"·data-group-id="5836508889-1">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="5836508889-1">)</span><span·class="p">.</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">····</span><span·class="mi">1518</span><span·class="w">·</span><span·class="n">Ki</span><span·class="w">·····</span><span·class="mi">658</span><span·class="w">·</span><span·class="ss">ns</span><span·class="w">··</span><span·class="mi">100</span><span·class="c1">%</span><span·class="w">
152 </span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">bytes</span><span·class="p"·data-group-id="8369121805-2">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="8369121805-2">)</span><span·class="p">.</span><span·class="w">························</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">284</span><span·class="w">·</span><span·class="n">Ki</span><span·class="w">····</span><span·class="mi">3521</span><span·class="w">·</span><span·class="ss">ns</span><span·class="w">···</span><span·class="mi">19</span><span·class="c1">%</span></code></pre><p>When·we·generate·1000·bytes·at·the·time,·<a·href="../../lib/crypto-5.5/doc/html/crypto.html#strong_rand_bytes/1"><code·class="inline">crypto:strong_rand_bytes/1</code></a>·is152 </span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">bytes</span><span·class="p"·data-group-id="5836508889-2">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="5836508889-2">)</span><span·class="p">.</span><span·class="w">························</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">284</span><span·class="w">·</span><span·class="n">Ki</span><span·class="w">····</span><span·class="mi">3521</span><span·class="w">·</span><span·class="ss">ns</span><span·class="w">···</span><span·class="mi">19</span><span·class="c1">%</span></code></pre><p>When·we·generate·1000·bytes·at·the·time,·<a·href="../../lib/crypto-5.5/doc/html/crypto.html#strong_rand_bytes/1"><code·class="inline">crypto:strong_rand_bytes/1</code></a>·is
153 now·the·fastest.</p><h2·id="benchmarking-using-erlang-otp-functionality"·class="section-heading">153 now·the·fastest.</p><h2·id="benchmarking-using-erlang-otp-functionality"·class="section-heading">
154 ··<a·href="#benchmarking-using-erlang-otp-functionality"·class="hover-link">154 ··<a·href="#benchmarking-using-erlang-otp-functionality"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">Benchmarking·using·Erlang/OTP·functionality</span>157 ··<span·class="text">Benchmarking·using·Erlang/OTP·functionality</span>
158 </h2>158 </h2>
159 <p>Benchmarks·can·measure·wall-clock·time·or·CPU·time.</p><ul><li><p><a·href="../../lib/stdlib-6.0.1/doc/html/timer.html#tc/3"><code·class="inline">timer:tc/3</code></a>·measures·wall-clock·time.·The·advantage·with·wall-clock·time·is159 <p>Benchmarks·can·measure·wall-clock·time·or·CPU·time.</p><ul><li><p><a·href="../../lib/stdlib-6.0.1/doc/html/timer.html#tc/3"><code·class="inline">timer:tc/3</code></a>·measures·wall-clock·time.·The·advantage·with·wall-clock·time·is
61.8 KB
./usr/share/doc/erlang-doc/html/doc/system/binaryhandling.html
    
Offset 114, 43 lines modifiedOffset 114, 43 lines modified
  
114 ····<span>Constructing·and·Matching·Binaries</span>114 ····<span>Constructing·and·Matching·Binaries</span>
115 ··</h1>115 ··</h1>
  
116 <p>This·section·gives·a·few·examples·on·how·to·handle·binaries·in·an·efficient·way.116 <p>This·section·gives·a·few·examples·on·how·to·handle·binaries·in·an·efficient·way.
117 The·sections·that·follow·take·an·in-depth·look·at·how·binaries·are·implemented117 The·sections·that·follow·take·an·in-depth·look·at·how·binaries·are·implemented
118 and·how·to·best·take·advantages·of·the·optimizations·done·by·the·compiler·and118 and·how·to·best·take·advantages·of·the·optimizations·done·by·the·compiler·and
119 runtime·system.</p><p>Binaries·can·be·efficiently·<em>built</em>·in·the·following·way:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="8039865129-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="8039865129-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">119 runtime·system.</p><p>Binaries·can·be·efficiently·<em>built</em>·in·the·following·way:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="2492899152-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="2492899152-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
120 ····</span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="8039865129-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8039865129-2">)</span><span·class="p">.</span><span·class="w">120 ····</span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="2492899152-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2492899152-2">)</span><span·class="p">.</span><span·class="w">
  
121 </span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="8039865129-3">(</span><span·class="p"·data-group-id="8039865129-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="8039865129-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·0b660dc904ef56e9dd5acd96713f27da6883d2feba10ba75cfafbc8123794bfb·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">121 </span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="2492899152-3">(</span><span·class="p"·data-group-id="2492899152-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2492899152-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·e27acee17f4608afd2ae6db37eab23f42527f10d2aadc2bd8ef7f301a34ded2d·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
122 ····</span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="8039865129-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">H</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·8a871ead447658ad48b100a5985466cc2d8c18b7df5103143dc3bfc96279acee·...·]-5">)</span><span·class="p">;</span><span·class="w">122 ····</span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="2492899152-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">H</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·692c9a2464aeba5f85814e526f2202cfc14cd1c4b86e1a89e351a16e4f9cdcc1·...·]-5">)</span><span·class="p">;</span><span·class="w">
123 </span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="8039865129-6">(</span><span·class="p"·data-group-id="8039865129-7">[</span><span·class="p"·data-group-id="8039865129-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="8039865129-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">123 </span><span·class="nf">my_list_to_binary</span><span·class="p"·data-group-id="2492899152-6">(</span><span·class="p"·data-group-id="2492899152-7">[</span><span·class="p"·data-group-id="2492899152-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="2492899152-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
124 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>Appending·data·to·a·binary·as·in·the·example·is·efficient·because·it·is124 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>Appending·data·to·a·binary·as·in·the·example·is·efficient·because·it·is
125 specially·optimized·by·the·runtime·system·to·avoid·copying·the·<code·class="inline">Acc</code>·binary125 specially·optimized·by·the·runtime·system·to·avoid·copying·the·<code·class="inline">Acc</code>·binary
126 every·time.</p><p>Prepending·data·to·a·binary·in·a·loop·is·not·efficient:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="8999888696-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="8999888696-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">126 every·time.</p><p>Prepending·data·to·a·binary·in·a·loop·is·not·efficient:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6739642958-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="6739642958-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
127 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="8999888696-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8999888696-2">)</span><span·class="p">.</span><span·class="w">127 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6739642958-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6739642958-2">)</span><span·class="p">.</span><span·class="w">
  
128 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="8999888696-3">(</span><span·class="p"·data-group-id="8999888696-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="8999888696-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·03e88de72b3d9747882dc0449c65a3cd7c6208263a7f9308567e0369d5c3646d·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">128 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6739642958-3">(</span><span·class="p"·data-group-id="6739642958-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="6739642958-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·ba618865745ac785582e78c1209fe18851b0e5cbdbb91009eba0ee87d93b50ab·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
129 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="8999888696-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">H</span><span·class="p">,</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·9e55b06ca2adb5218805aeaac3595dd0781c39d6b4b510de1177c51cb29d3920·...·]-5">)</span><span·class="p">;</span><span·class="w">129 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6739642958-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">H</span><span·class="p">,</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·ac342510d5f9690a77830dea0db7de6e54b3bd6d706d2e39f457f00a4e0b5436·...·]-5">)</span><span·class="p">;</span><span·class="w">
130 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="8999888696-6">(</span><span·class="p"·data-group-id="8999888696-7">[</span><span·class="p"·data-group-id="8999888696-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="8999888696-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">130 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6739642958-6">(</span><span·class="p"·data-group-id="6739642958-7">[</span><span·class="p"·data-group-id="6739642958-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="6739642958-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
131 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>This·is·not·efficient·for·long·lists·because·the·<code·class="inline">Acc</code>·binary·is·copied·every131 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>This·is·not·efficient·for·long·lists·because·the·<code·class="inline">Acc</code>·binary·is·copied·every
132 time.·One·way·to·make·the·function·more·efficient·is·like·this:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="0417899942-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="0417899942-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">132 time.·One·way·to·make·the·function·more·efficient·is·like·this:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6332452105-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="6332452105-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
133 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="0417899942-2">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="0417899942-3">(</span><span·class="n">List</span><span·class="p"·data-group-id="0417899942-3">)</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·134,·SHA:·4502fe600489daf514825ef67c7cbd1af3c75416abfaeaefba5f87fa863c71d2·...·]-2">)</span><span·class="p">.</span><span·class="w">133 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6332452105-2">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="6332452105-3">(</span><span·class="n">List</span><span·class="p"·data-group-id="6332452105-3">)</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·134,·SHA:·c5b7e806525d185153fee66d564edca2b1de407f12af795ca913833d7aed89dc·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
134 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="0417899942-4">(</span><span·class="p"·data-group-id="0417899942-5">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="0417899942-5">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·d5eaebcb6f72a8ba6ef9522cc566c8e3429bb9bc84ee224b7035f47eb7761494·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">134 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6332452105-4">(</span><span·class="p"·data-group-id="6332452105-5">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="6332452105-5">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·30c4cb7705374e64ac631a72db469c9b21207999d7b2b0e7ceb79139309fc75c·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
135 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="0417899942-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">H</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·cd8207db95dc5dc8f84e372549be24e976ccc0718f748e61c73fb4c201b39ddb·...·]-6">)</span><span·class="p">;</span><span·class="w">135 ····</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6332452105-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">H</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·8ecdd034219793cfbda5a36790366ebad8bb6fafd94e85195ebc82409e43fd0f·...·]-6">)</span><span·class="p">;</span><span·class="w">
136 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="0417899942-7">(</span><span·class="p"·data-group-id="0417899942-8">[</span><span·class="p"·data-group-id="0417899942-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="0417899942-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">136 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="6332452105-7">(</span><span·class="p"·data-group-id="6332452105-8">[</span><span·class="p"·data-group-id="6332452105-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="6332452105-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
137 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>Another·way·to·avoid·copying·the·binary·each·time·is·like·this:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="5775384217-1">(</span><span·class="p"·data-group-id="5775384217-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="5775384217-2">]</span><span·class="p"·data-group-id="5775384217-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">137 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>Another·way·to·avoid·copying·the·binary·each·time·is·like·this:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="3326345546-1">(</span><span·class="p"·data-group-id="3326345546-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="3326345546-2">]</span><span·class="p"·data-group-id="3326345546-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
138 ····</span><span·class="n">RevTail</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="5775384217-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="5775384217-3">)</span><span·class="p">,</span><span·class="w">138 ····</span><span·class="n">RevTail</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="3326345546-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="3326345546-3">)</span><span·class="p">,</span><span·class="w">
139 ····</span><span·class="p">&lt;&lt;</span><span·class="n">RevTail</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">H</span><span·class="p">&gt;&gt;</span><span·class="p">;</span><span·class="w">139 ····</span><span·class="p">&lt;&lt;</span><span·class="n">RevTail</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">H</span><span·class="p">&gt;&gt;</span><span·class="p">;</span><span·class="w">
140 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="5775384217-4">(</span><span·class="p"·data-group-id="5775384217-5">[</span><span·class="p"·data-group-id="5775384217-5">]</span><span·class="p"·data-group-id="5775384217-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">140 </span><span·class="nf">rev_list_to_binary</span><span·class="p"·data-group-id="3326345546-4">(</span><span·class="p"·data-group-id="3326345546-5">[</span><span·class="p"·data-group-id="3326345546-5">]</span><span·class="p"·data-group-id="3326345546-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
141 ····</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span></code></pre><p>Note·that·in·each·of·the·<strong>DO</strong>·examples,·the·binary·to·be·appended·to·is·always141 ····</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span></code></pre><p>Note·that·in·each·of·the·<strong>DO</strong>·examples,·the·binary·to·be·appended·to·is·always
142 given·as·the·first·segment.</p><p>Binaries·can·be·efficiently·<em>matched</em>·in·the·following·way:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="2511115550-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">H</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2511115550-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">142 given·as·the·first·segment.</p><p>Binaries·can·be·efficiently·<em>matched</em>·in·the·following·way:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="0610854543-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">H</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0610854543-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
143 ····</span><span·class="p"·data-group-id="2511115550-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="2511115550-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="2511115550-3">)</span><span·class="p"·data-group-id="2511115550-2">]</span><span·class="p">;</span><span·class="w"> 
144 </span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="2511115550-4">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2511115550-4">)</span><span·class="w">·</span><span·class="p">[·...·truncated·by·diffoscope;·len:·239,·SHA:·36757eaf074b265e8bfb24efd645a546b3fdefce89ff7bdf8300f8f29515ee65·...·]">143 ····</span><span·class="p"·data-group-id="0610854543-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="0610854543-3">(</span><span·class="n">T</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·118,·SHA:·a2b25538031ca0057e525286538f0494a2f6d142d5badb62adc2c1b25c9f8df4·...·]">
 144 </span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="0610854543-4">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0610854543-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0610854543-5">[</span><span·class="p"·data-group-id="0610854543-5">]</span><span·class="p">.</span></code></pre><h2·id="how-binaries-are-implemented"·class="section-heading">
145 ··<a·href="#how-binaries-are-implemented"·class="hover-link">145 ··<a·href="#how-binaries-are-implemented"·class="hover-link">
146 ····<i·class="ri-link-m"·aria-hidden="true"></i>146 ····<i·class="ri-link-m"·aria-hidden="true"></i>
147 ··</a>147 ··</a>
148 ··<span·class="text">How·Binaries·are·Implemented</span>148 ··<span·class="text">How·Binaries·are·Implemented</span>
149 </h2>149 </h2>
150 <p>Internally,·binaries·and·bitstrings·are·implemented·in·the·same·way.·In·this150 <p>Internally,·binaries·and·bitstrings·are·implemented·in·the·same·way.·In·this
151 section,·they·are·called·<em>binaries</em>·because·that·is·what·they·are·called·in·the151 section,·they·are·called·<em>binaries</em>·because·that·is·what·they·are·called·in·the
Offset 219, 15 lines modifiedOffset 219, 15 lines modified
219 the·optimization·in·a·more·efficient·way.</p><blockquote><h4·class="info">Change</h4><p>The·compiler·support·for·making·the·optimization·more·efficient·was·added·in219 the·optimization·in·a·more·efficient·way.</p><blockquote><h4·class="info">Change</h4><p>The·compiler·support·for·making·the·optimization·more·efficient·was·added·in
220 Erlang/OTP·26.</p></blockquote><p>To·explain·how·the·basic·optimization·works,·let·us·examine·the·following·code220 Erlang/OTP·26.</p></blockquote><p>To·explain·how·the·basic·optimization·works,·let·us·examine·the·following·code
221 line·by·line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Bin0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····················</span><span·class="c1">%%·1</span><span·class="w">221 line·by·line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Bin0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····················</span><span·class="c1">%%·1</span><span·class="w">
222 </span><span·class="n">Bin1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin0</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%%·2</span><span·class="w">222 </span><span·class="n">Bin1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin0</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%%·2</span><span·class="w">
223 </span><span·class="n">Bin2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin1</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%%·3</span><span·class="w">223 </span><span·class="n">Bin2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin1</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%%·3</span><span·class="w">
224 </span><span·class="n">Bin3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin2</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%%·4</span><span·class="w">224 </span><span·class="n">Bin3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin2</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%%·4</span><span·class="w">
225 </span><span·class="n">Bin4</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin1</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%%·5·!!!</span><span·class="w">225 </span><span·class="n">Bin4</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Bin1</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%%·5·!!!</span><span·class="w">
226 </span><span·class="p"·data-group-id="6006868316-1">{</span><span·class="n">Bin4</span><span·class="p">,</span><span·class="n">Bin3</span><span·class="p"·data-group-id="6006868316-1">}</span><span·class="w">······················</span><span·class="c1">%%·6</span></code></pre><ul><li><p>Line·1·(marked·with·the·<code·class="inline">%%·1</code>·comment),·assigns·a226 </span><span·class="p"·data-group-id="3212083632-1">{</span><span·class="n">Bin4</span><span·class="p">,</span><span·class="n">Bin3</span><span·class="p"·data-group-id="3212083632-1">}</span><span·class="w">······················</span><span·class="c1">%%·6</span></code></pre><ul><li><p>Line·1·(marked·with·the·<code·class="inline">%%·1</code>·comment),·assigns·a
227 <a·href="binaryhandling.html#heap_binary">heap·binary</a>·to·the·<code·class="inline">Bin0</code>·variable.</p></li><li><p>Line·2·is·an·append·operation.·As·<code·class="inline">Bin0</code>·has·not·been·involved·in·an·append227 <a·href="binaryhandling.html#heap_binary">heap·binary</a>·to·the·<code·class="inline">Bin0</code>·variable.</p></li><li><p>Line·2·is·an·append·operation.·As·<code·class="inline">Bin0</code>·has·not·been·involved·in·an·append
228 operation,·a·new·<a·href="binaryhandling.html#refc_binary">refc·binary</a>·is·created·and228 operation,·a·new·<a·href="binaryhandling.html#refc_binary">refc·binary</a>·is·created·and
229 the·contents·of·<code·class="inline">Bin0</code>·is·copied·into·it.·The·<em>ProcBin</em>·part·of·the·refc229 the·contents·of·<code·class="inline">Bin0</code>·is·copied·into·it.·The·<em>ProcBin</em>·part·of·the·refc
230 binary·has·its·size·set·to·the·size·of·the·data·stored·in·the·binary,·while230 binary·has·its·size·set·to·the·size·of·the·data·stored·in·the·binary,·while
231 the·binary·object·has·extra·space·allocated.·The·size·of·the·binary·object·is231 the·binary·object·has·extra·space·allocated.·The·size·of·the·binary·object·is
232 either·twice·the·size·of·<code·class="inline">Bin1</code>·or·256,·whichever·is·larger.·In·this·case·it232 either·twice·the·size·of·<code·class="inline">Bin1</code>·or·256,·whichever·is·larger.·In·this·case·it
233 is·256.</p></li><li><p>Line·3·is·more·interesting.·<code·class="inline">Bin1</code>·<em>has</em>·been·used·in·an·append·operation,·and233 is·256.</p></li><li><p>Line·3·is·more·interesting.·<code·class="inline">Bin1</code>·<em>has</em>·been·used·in·an·append·operation,·and
Offset 253, 23 lines modifiedOffset 253, 23 lines modified
253 handle·an·append·operation·to·a·heap·binary·by·copying·it·to·a·refc·binary·(line253 handle·an·append·operation·to·a·heap·binary·by·copying·it·to·a·refc·binary·(line
254 2),·and·also·handle·an·append·operation·to·a·previous·version·of·the·binary·by254 2),·and·also·handle·an·append·operation·to·a·previous·version·of·the·binary·by
255 copying·it·(line·5).·The·support·for·doing·that·does·not·come·for·free.·For255 copying·it·(line·5).·The·support·for·doing·that·does·not·come·for·free.·For
256 example,·to·make·it·possible·to·know·when·it·is·necessary·to·copy·the·binary,256 example,·to·make·it·possible·to·know·when·it·is·necessary·to·copy·the·binary,
257 for·every·append·operation,·the·runtime·system·must·create·a·sub·binary.</p><p>When·the·compiler·can·determine·that·none·of·those·situations·need·to·be·handled257 for·every·append·operation,·the·runtime·system·must·create·a·sub·binary.</p><p>When·the·compiler·can·determine·that·none·of·those·situations·need·to·be·handled
258 and·that·the·append·operation·cannot·possibly·fail,·the·compiler·generates·code258 and·that·the·append·operation·cannot·possibly·fail,·the·compiler·generates·code
259 that·causes·the·runtime·system·to·apply·a·more·efficient·variant·of·the259 that·causes·the·runtime·system·to·apply·a·more·efficient·variant·of·the
260 optimization.</p><p><strong>Example:</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7887563894-1">(</span><span·class="ss">repack</span><span·class="p"·data-group-id="7887563894-1">)</span><span·class="p">.</span><span·class="w"> 
261 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7887563894-2">(</span><span·class="p"·data-group-id="7887563894-3">[</span><span·class="ss">repack</span><span·class="p">/</span><span·class="mi">1</span><span·clas[·...·truncated·by·diffoscope;·len:·86,·SHA:·2420f55df5ed574cc8c764ff1302994450e868db053cc8b887efecdfc223f50e·...·]">)</span><span·class="p">.</span><span·class="w">260 optimization.</p><p><strong>Example:</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0676072241-1">(</span><span·class="ss">repack</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·21,·SHA:·afaba7262cf58e8d7aae0aed9a3ac912b61d1a69a7f39ec301915c763e4d7ed7·...·]">)</span><span·class="p">.</span><span·class="w">
 261 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0676072241-2">(</span><span·class="p"·data-group-id="0676072241-3">[</span><span·class="ss">repack</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="0676072241-3">]</span><span·class="p"·data-group-id="0676072241-2">)</span><span·class="p">.</span><span·class="w">
  
262 </span><span·class="nf">repack</span><span·class="p"·data-group-id="7887563894-4">(</span><span·class="n">Bin</span><span·class="p"·data-group-id="7887563894-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="7887563894-5">(<[·...·truncated·by·diffoscope;·len:·73,·SHA:·61b1c5987568b61ca2d801cbb7e72a32171039fb0c401395fd24514f2c4f9c21·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">262 </span><span·class="nf">repack</span><span·class="p"·data-group-id="0676072241-4">(</span><span·class="n">Bin</span><span·class="p"·data-group-id="0676072241-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="0676072241-5">(<[·...·truncated·by·diffoscope;·len:·73,·SHA:·70a7d68ea45736d1921769c88ebdf214d625edd7b9e56e765d16b37efc73d271·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
263 ····</span><span·class="nf">repack</span><span·class="p"·data-group-id="7887563894-6">(</span><span·class="n">Bin</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7887563894-6">)</span><span·class="p">.</span><span·class="w">263 ····</span><span·class="nf">repack</span><span·class="p"·data-group-id="0676072241-6">(</span><span·class="n">Bin</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0676072241-6">)</span><span·class="p">.</span><span·class="w">
  
264 </span><span·class="nf">repack</span><span·class="p"·data-group-id="7887563894-7">(</span><span·class="p">&lt;&lt;</span><span·class="n">C</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</sp[·...·truncated·by·diffoscope;·len:·121,·SHA:·0efa9a25e003656a91a27dafd2f7596feead204a60914f17263db209bf7d09d3·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">264 </span><span·class="nf">repack</span><span·class="p"·data-group-id="0676072241-7">(</span><span·class="p">&lt;&lt;</span><span·class="n">C</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</sp[·...·truncated·by·diffoscope;·len:·121,·SHA:·35ec66080e5f4bcaf06bcd7c19d725b43ab4a437946c9356da5745dbf94dbc22·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
265 ····</span><span·class="nf">repack</span><span·class="p"·data-group-id="7887563894-8">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Result</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">C</span>[·...·truncated·by·diffoscope;·len:·122,·SHA:·a0e79e306583db055e42b83395e3ad604a431322e669e8755cfea233506b2730·...·]-8">)</span><span·class="p">;</span><span·class="w">265 ····</span><span·class="nf">repack</span><span·class="p"·data-group-id="0676072241-8">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Result</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">C</span>[·...·truncated·by·diffoscope;·len:·122,·SHA:·c2f2e02901e5902aa51b933fbc52fd0f3b15b79cb34895dcf760a840d323dd3d·...·]-8">)</span><span·class="p">;</span><span·class="w">
266 </span><span·class="nf">repack</span><span·class="p"·data-group-id="7887563894-9">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="7887563894-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">266 </span><span·class="nf">repack</span><span·class="p"·data-group-id="0676072241-9">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="0676072241-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
267 ····</span><span·class="n">Result</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">repack/2</code>·function·only·keeps·a·single·version·of·the·binary,·so·there·is267 ····</span><span·class="n">Result</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">repack/2</code>·function·only·keeps·a·single·version·of·the·binary,·so·there·is
268 never·any·need·to·copy·the·binary.·The·compiler·rewrites·the·creation·of·the268 never·any·need·to·copy·the·binary.·The·compiler·rewrites·the·creation·of·the
269 empty·binary·in·<code·class="inline">repack/1</code>·to·instead·create·a·refc·binary·with·256·bytes269 empty·binary·in·<code·class="inline">repack/1</code>·to·instead·create·a·refc·binary·with·256·bytes
270 already·reserved;·thus,·the·append·operation·in·<code·class="inline">repack/2</code>·never·needs·to·handle270 already·reserved;·thus,·the·append·operation·in·<code·class="inline">repack/2</code>·never·needs·to·handle
271 a·binary·not·prepared·for·appending.</p><p><a·href=""·id="forced_copying"></a></p><h3·id="circumstances-that-force-copying"·class="section-heading">271 a·binary·not·prepared·for·appending.</p><p><a·href=""·id="forced_copying"></a></p><h3·id="circumstances-that-force-copying"·class="section-heading">
272 ··<a·href="#circumstances-that-force-copying"·class="hover-link">272 ··<a·href="#circumstances-that-force-copying"·class="hover-link">
273 ····<i·class="ri-link-m"·aria-hidden="true"></i>273 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 304, 49 lines modifiedOffset 304, 49 lines modified
304 a·binary·that·has·been·shrunk,·the·binary·object·will·be·reallocated·to·make304 a·binary·that·has·been·shrunk,·the·binary·object·will·be·reallocated·to·make
305 place·for·the·data·to·be·appended.</p><h2·id="matching-binaries"·class="section-heading">305 place·for·the·data·to·be·appended.</p><h2·id="matching-binaries"·class="section-heading">
306 ··<a·href="#matching-binaries"·class="hover-link">306 ··<a·href="#matching-binaries"·class="hover-link">
307 ····<i·class="ri-link-m"·aria-hidden="true"></i>307 ····<i·class="ri-link-m"·aria-hidden="true"></i>
308 ··</a>308 ··</a>
309 ··<span·class="text">Matching·Binaries</span>309 ··<span·class="text">Matching·Binaries</span>
310 </h2>310 </h2>
311 <p>Let·us·revisit·the·example·in·the·beginning·of·the·previous·section:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="3550238999-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">H</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3550238999-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">311 <p>Let·us·revisit·the·example·in·the·beginning·of·the·previous·section:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="0143383625-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">H</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0143383625-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
312 ····</span><span·class="p"·data-group-id="3550238999-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="3550238999-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="3550238999-3">)</span><span·class="p"·data-group-id="3550238999-2">]</span><span·class="p">;</span><span·class="w"> 
313 </span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="3550238999-4">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3550238999-4">)</span><span·class="w">·</span><span·class="p">[·...·truncated·by·diffoscope;·len:·257,·SHA:·b3fd2d679e475d0fb6517b16fe7ce55be98ced3428f17d381cc555803ca5b706·...·]312 ····</span><span·class="p"·data-group-id="0143383625-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="0143383625-3">(</span><span·class="n">T</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·120,·SHA:·ede0b0de40fc474d8a17de24d9bc18debc7909061b18e8d97aae4f674c8791c0·...·]
 313 </span><span·class="nf">my_binary_to_list</span><span·class="p"·data-group-id="0143383625-4">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0143383625-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0143383625-5">[</span><span·class="p"·data-group-id="0143383625-5">]</span><span·class="p">.</span></code></pre><p>The·first·time·<code·class="inline">my_binary_to_list/1</code>·is·called,·a
314 <a·href="binaryhandling.html#match_context">match·context</a>·is·created.·The·match·context314 <a·href="binaryhandling.html#match_context">match·context</a>·is·created.·The·match·context
315 points·to·the·first·byte·of·the·binary.·1·byte·is·matched·out·and·the·match315 points·to·the·first·byte·of·the·binary.·1·byte·is·matched·out·and·the·match
316 context·is·updated·to·point·to·the·second·byte·in·the·binary.</p><p>At·this·point·it·would·make·sense·to·create·a316 context·is·updated·to·point·to·the·second·byte·in·the·binary.</p><p>At·this·point·it·would·make·sense·to·create·a
317 <a·href="binaryhandling.html#sub_binary">sub·binary</a>,·but·in·this·particular·example·the317 <a·href="binaryhandling.html#sub_binary">sub·binary</a>,·but·in·this·particular·example·the
318 compiler·sees·that·there·will·soon·be·a·call·to·a·function·(in·this·case,·to318 compiler·sees·that·there·will·soon·be·a·call·to·a·function·(in·this·case,·to
319 <code·class="inline">my_binary_to_list/1</code>·itself)·that·immediately·will·create·a·new·match·context319 <code·class="inline">my_binary_to_list/1</code>·itself)·that·immediately·will·create·a·new·match·context
320 and·discard·the·sub·binary.</p><p>Therefore·<code·class="inline">my_binary_to_list/1</code>·calls·itself·with·the·match·context·instead·of320 and·discard·the·sub·binary.</p><p>Therefore·<code·class="inline">my_binary_to_list/1</code>·calls·itself·with·the·match·context·instead·of
321 with·a·sub·binary.·The·instruction·that·initializes·the·matching·operation321 with·a·sub·binary.·The·instruction·that·initializes·the·matching·operation
322 basically·does·nothing·when·it·sees·that·it·was·passed·a·match·context·instead322 basically·does·nothing·when·it·sees·that·it·was·passed·a·match·context·instead
323 of·a·binary.</p><p>When·the·end·of·the·binary·is·reached·and·the·second·clause·matches,·the·match323 of·a·binary.</p><p>When·the·end·of·the·binary·is·reached·and·the·second·clause·matches,·the·match
324 context·will·simply·be·discarded·(removed·in·the·next·garbage·collection,·as324 context·will·simply·be·discarded·(removed·in·the·next·garbage·collection,·as
325 there·is·no·longer·any·reference·to·it).</p><p>To·summarize,·<code·class="inline">my_binary_to_list/1</code>·only·needs·to·create·<em>one</em>·match·context·and325 there·is·no·longer·any·reference·to·it).</p><p>To·summarize,·<code·class="inline">my_binary_to_list/1</code>·only·needs·to·create·<em>one</em>·match·context·and
326 no·sub·binaries.</p><p>Notice·that·the·match·context·in·<code·class="inline">my_binary_to_list/1</code>·was·discarded·when·the326 no·sub·binaries.</p><p>Notice·that·the·match·context·in·<code·class="inline">my_binary_to_list/1</code>·was·discarded·when·the
327 entire·binary·had·been·traversed.·What·happens·if·the·iteration·stops·before·it327 entire·binary·had·been·traversed.·What·happens·if·the·iteration·stops·before·it
328 has·reached·the·end·of·the·binary?·Will·the·optimization·still·work?</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">after_zero</span><span·class="p"·data-group-id="9536230788-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9536230788-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">328 has·reached·the·end·of·the·binary?·Will·the·optimization·still·work?</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">after_zero</span><span·class="p"·data-group-id="3030024860-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3030024860-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
329 ····</span><span·class="n">T</span><span·class="p">;</span><span·class="w">329 ····</span><span·class="n">T</span><span·class="p">;</span><span·class="w">
330 </span><span·class="nf">after_zero</span><span·class="p"·data-group-id="9536230788-2">(</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9536230788-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">330 </span><span·class="nf">after_zero</span><span·class="p"·data-group-id="3030024860-2">(</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3030024860-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
331 ····</span><span·class="nf">after_zero</span><span·class="p"·data-group-id="9536230788-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="9536230788-3">)</span><span·class="p">;</span><span·class="w">331 ····</span><span·class="nf">after_zero</span><span·class="p"·data-group-id="3030024860-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="3030024860-3">)</span><span·class="p">;</span><span·class="w">
332 </span><span·class="nf">after_zero</span><span·class="p"·data-group-id="9536230788-4">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9536230788-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">332 </span><span·class="nf">after_zero</span><span·class="p"·data-group-id="3030024860-4">(</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3030024860-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
333 ····</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span></code></pre><p>Yes,·it·will.·The·compiler·will·remove·the·building·of·the·sub·binary·in·the333 ····</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span></code></pre><p>Yes,·it·will.·The·compiler·will·remove·the·building·of·the·sub·binary·in·the
334 second·clause:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">334 second·clause:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
335 </span><span·class="nf">after_zero</span><span·class="p"·data-group-id="4265656171-1">(</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4265656171-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">335 </span><span·class="nf">after_zero</span><span·class="p"·data-group-id="8722829545-1">(</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8722829545-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
336 ····</span><span·class="nf">after_zero</span><span·class="p"·data-group-id="4265656171-2">(</span><span·class="n">T</span><span·class="p"·data-group-id="4265656171-2">)</span><span·class="p">;</span><span·class="w">336 ····</span><span·class="nf">after_zero</span><span·class="p"·data-group-id="8722829545-2">(</span><span·class="n">T</span><span·class="p"·data-group-id="8722829545-2">)</span><span·class="p">;</span><span·class="w">
337 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>But·it·will·generate·code·that·builds·a·sub·binary·in·the·first·clause:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">after_zero</span><span·class="p"·data-group-id="0621267414-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0621267414-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">337 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>But·it·will·generate·code·that·builds·a·sub·binary·in·the·first·clause:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">after_zero</span><span·class="p"·data-group-id="0607162872-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0607162872-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
338 ····</span><span·class="n">T</span><span·class="p">;</span><span·class="w">338 ····</span><span·class="n">T</span><span·class="p">;</span><span·class="w">
339 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Therefore,·<code·class="inline">after_zero/1</code>·builds·one·match·context·and·one·sub·binary·(assuming339 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Therefore,·<code·class="inline">after_zero/1</code>·builds·one·match·context·and·one·sub·binary·(assuming
340 it·is·passed·a·binary·that·contains·a·zero·byte).</p><p>Code·like·the·following·will·also·be·optimized:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all_but_zeroes_to_list</span><span·class="p"·data-group-id="9263756630-1">(</span><span·class="n">Buffer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="9263756630-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">340 it·is·passed·a·binary·that·contains·a·zero·byte).</p><p>Code·like·the·following·will·also·be·optimized:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all_but_zeroes_to_list</span><span·class="p"·data-group-id="1185379842-1">(</span><span·class="n">Buffer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="1185379842-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
341 ····</span><span·class="p"·data-group-id="9263756630-2">{</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="9263756630-3">(</span><span·class="n">Acc</span><span·class="p"·data-group-id="9263756630-3">)</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·76,·SHA:·90409eb395debcff49bc5d226bd03140ddb7a60c07b20e4372484bad5de5d5e9·...·]-2">}</span><span·class="p">;</span><span·class="w">341 ····</span><span·class="p"·data-group-id="1185379842-2">{</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="1185379842-3">(</span><span·class="n">Acc</span><span·class="p"·data-group-id="1185379842-3">)</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·76,·SHA:·7adba279f6a987dc4526744167572b8e66d15a3362880def8db9999054dbbab5·...·]-2">}</span><span·class="p">;</span><span·class="w">
342 </span><span·class="nf">all_but_zeroes_to_list</span><span·class="p"·data-group-id="9263756630-4">(</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·150,·SHA:·b9259e22304256fe739505e2a9bdc0234d69c1408b875c9d84e9569ab31f5427·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">342 </span><span·class="nf">all_but_zeroes_to_list</span><span·class="p"·data-group-id="1185379842-4">(</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·150,·SHA:·2b50bc58834b9a7ffe55b162a7a76acc760763ddaeb54d5a2a1fc876def3c1c6·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
343 ····</span><span·class="nf">all_but_zeroes_to_list</span><span·class="p"·data-group-id="9263756630-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Remaining</span><span·class="o">-</span><span·class="mi">1</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·56ec580e653938df8b7fa4ee360dffabd2e1d4ad161bb39345e131520210a04c·...·]-5">)</span><span·class="p">;</span><span·class="w">343 ····</span><span·class="nf">all_but_zeroes_to_list</span><span·class="p"·data-group-id="1185379842-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Remaining</span><span·class="o">-</span><span·class="mi">1</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·01be796a6fa8eb95e5bb9f32a47a1f2304f1cc861d6d26587ae11e87afac3833·...·]-5">)</span><span·class="p">;</span><span·class="w">
Max diff block lines reached; 14712/63176 bytes (23.29%) of diff not shown.
31.6 KB
./usr/share/doc/erlang-doc/html/doc/system/bit_syntax.html
    
Offset 141, 25 lines modifiedOffset 141, 25 lines modified
141 </span><span·class="n">Bin12</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc&quot;</span><span·class="p">&gt;&gt;</span></code></pre><p>This·gives·two·binaries·of·size·3,·with·the·following·evaluations:</p><ul><li><a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list(Bin11)</code></a>·evaluates·to·<code·class="inline">[1,·17,·42]</code>.</li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list(Bin12)</code></a>·evaluates·to·<code·class="inline">[97,·98,·99]</code>.</li></ul><p><em>Example·2:</em>Similarly,·a·binary·can·be·constructed·from·a·set·of·bound141 </span><span·class="n">Bin12</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc&quot;</span><span·class="p">&gt;&gt;</span></code></pre><p>This·gives·two·binaries·of·size·3,·with·the·following·evaluations:</p><ul><li><a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list(Bin11)</code></a>·evaluates·to·<code·class="inline">[1,·17,·42]</code>.</li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list(Bin12)</code></a>·evaluates·to·<code·class="inline">[97,·98,·99]</code>.</li></ul><p><em>Example·2:</em>Similarly,·a·binary·can·be·constructed·from·a·set·of·bound
142 variables:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">17</span><span·class="p">,</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">142 variables:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">17</span><span·class="p">,</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">
143 </span><span·class="n">Bin2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p">,</span><span·class="w">·</span><span·class="n">C</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">&gt;&gt;</span></code></pre><p>This·gives·a·binary·of·size·4.·Here,·a·<em>size·expression</em>·is·used·for·the143 </span><span·class="n">Bin2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p">,</span><span·class="w">·</span><span·class="n">C</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">&gt;&gt;</span></code></pre><p>This·gives·a·binary·of·size·4.·Here,·a·<em>size·expression</em>·is·used·for·the
144 variable·<code·class="inline">C</code>·to·specify·a·16-bits·segment·of·<code·class="inline">Bin2</code>.</p><p><a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list(Bin2)</code></a>·evaluates·to·<code·class="inline">[1,·17,·00,·42]</code>.</p><p><em>Example·3:</em>·A·Bin·can·also·be·used·for·matching.·<code·class="inline">D</code>,·<code·class="inline">E</code>,·and·<code·class="inline">F</code>·are·unbound144 variable·<code·class="inline">C</code>·to·specify·a·16-bits·segment·of·<code·class="inline">Bin2</code>.</p><p><a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list(Bin2)</code></a>·evaluates·to·<code·class="inline">[1,·17,·00,·42]</code>.</p><p><em>Example·3:</em>·A·Bin·can·also·be·used·for·matching.·<code·class="inline">D</code>,·<code·class="inline">E</code>,·and·<code·class="inline">F</code>·are·unbound
145 variables,·and·<code·class="inline">Bin2</code>·is·bound,·as·in·Example·2:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="n">D</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Bin2</span></code></pre><p>This·gives·<code·class="inline">D·=·273</code>,·<code·class="inline">E·=·00</code>,·and·F·binds·to·a·binary·of·size·1:145 variables,·and·<code·class="inline">Bin2</code>·is·bound,·as·in·Example·2:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="n">D</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Bin2</span></code></pre><p>This·gives·<code·class="inline">D·=·273</code>,·<code·class="inline">E·=·00</code>,·and·F·binds·to·a·binary·of·size·1:
146 <code·class="inline">binary_to_list(F)·=·[42]</code>.</p><p><em>Example·4:</em>·The·following·is·a·more·elaborate·example·of·matching.·Here,146 <code·class="inline">binary_to_list(F)·=·[42]</code>.</p><p><em>Example·4:</em>·The·following·is·a·more·elaborate·example·of·matching.·Here,
147 <code·class="inline">Dgram</code>·is·bound·to·the·consecutive·bytes·of·an·IP·datagram·of·IP·protocol147 <code·class="inline">Dgram</code>·is·bound·to·the·consecutive·bytes·of·an·IP·datagram·of·IP·protocol
148 version·4.·The·ambition·is·to·extract·the·header·and·the·data·of·the·datagram:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7022466235-1">(</span><span·class="n">IP_VERSION</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="7022466235-1">)</span><span·class="p">.</span><span·class="w">148 version·4.·The·ambition·is·to·extract·the·header·and·the·data·of·the·datagram:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="5807539692-1">(</span><span·class="n">IP_VERSION</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="5807539692-1">)</span><span·class="p">.</span><span·class="w">
149 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7022466235-2">(</span><span·class="n">IP_MIN_HDR_LEN</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="7022466235-2">)</span><span·class="p">.</span><span·class="w">149 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="5807539692-2">(</span><span·class="n">IP_MIN_HDR_LEN</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="5807539692-2">)</span><span·class="p">.</span><span·class="w">
  
150 </span><span·class="n">DgramSize</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">byte_size</span><span·class="p"·data-group-id="7022466235-3">(</span><span·class="n">Dgram</span><span·class="p"·data-group-id="7022466235-3">)</span><span·class="p">,</span><span·class="w">150 </span><span·class="n">DgramSize</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">byte_size</span><span·class="p"·data-group-id="5807539692-3">(</span><span·class="n">Dgram</span><span·class="p"·data-group-id="5807539692-3">)</span><span·class="p">,</span><span·class="w">
151 </span><span·class="k">case</span><span·class="w">·</span><span·class="n">Dgram</span><span·class="w">·</span><span·class="k">of</span><span·class="w">151 </span><span·class="k">case</span><span·class="w">·</span><span·class="n">Dgram</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
152 ····</span><span·class="p">&lt;&lt;</span><span·class="o">?</span><span·class="n">IP_VERSION</span><span·class="p">:</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HLen</span><span·class="p">:</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SrvcType</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TotLen</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">152 ····</span><span·class="p">&lt;&lt;</span><span·class="o">?</span><span·class="n">IP_VERSION</span><span·class="p">:</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HLen</span><span·class="p">:</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SrvcType</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TotLen</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">
153 ······</span><span·class="n">ID</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Flgs</span><span·class="p">:</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FragOff</span><span·class="p">:</span><span·class="mi">13</span><span·class="p">,</span><span·class="w">153 ······</span><span·class="n">ID</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Flgs</span><span·class="p">:</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FragOff</span><span·class="p">:</span><span·class="mi">13</span><span·class="p">,</span><span·class="w">
154 ······</span><span·class="n">TTL</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Proto</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HdrChkSum</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">154 ······</span><span·class="n">TTL</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Proto</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HdrChkSum</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">
155 ······</span><span·class="n">SrcIP</span><span·class="p">:</span><span·class="mi">32</span><span·class="p">,</span><span·class="w">155 ······</span><span·class="n">SrcIP</span><span·class="p">:</span><span·class="mi">32</span><span·class="p">,</span><span·class="w">
156 ······</span><span·class="n">DestIP</span><span·class="p">:</span><span·class="mi">32</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RestDgram</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">HLen</span><span·class="o">&gt;=</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">*</span><span·class="n">HLen</span><span·class="o">=&lt;</span><span·class="n">DgramSize</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 ······</span><span·class="n">DestIP</span><span·class="p">:</span><span·class="mi">32</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RestDgram</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">HLen</span><span·class="o">&gt;=</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">*</span><span·class="n">HLen</span><span·class="o">=&lt;</span><span·class="n">DgramSize</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ········</span><span·class="n">OptsLen</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">*</span><span·class="p"·data-group-id="7022466235-4">(</span><span·class="n">HLen</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">?</span><span·class="n">IP_MIN_HDR_LEN</span><span·class="p"·data-group-id="7022466235-4">)</span><span·class="p">,</span><span·class="w">157 ········</span><span·class="n">OptsLen</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">*</span><span·class="p"·data-group-id="5807539692-4">(</span><span·class="n">HLen</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">?</span><span·class="n">IP_MIN_HDR_LEN</span><span·class="p"·data-group-id="5807539692-4">)</span><span·class="p">,</span><span·class="w">
158 ········</span><span·class="p">&lt;&lt;</span><span·class="n">Opts</span><span·class="p">:</span><span·class="n">OptsLen</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">Data</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RestDgram</span><span·class="p">,</span><span·class="w">158 ········</span><span·class="p">&lt;&lt;</span><span·class="n">Opts</span><span·class="p">:</span><span·class="n">OptsLen</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">Data</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RestDgram</span><span·class="p">,</span><span·class="w">
159 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">159 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
160 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Here,·the·segment·corresponding·to·the·<code·class="inline">Opts</code>·variable·has·a·<em>type·modifier</em>,160 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Here,·the·segment·corresponding·to·the·<code·class="inline">Opts</code>·variable·has·a·<em>type·modifier</em>,
161 specifying·that·<code·class="inline">Opts</code>·is·to·bind·to·a·binary.·All·other·variables·have·the161 specifying·that·<code·class="inline">Opts</code>·is·to·bind·to·a·binary.·All·other·variables·have·the
162 default·type·equal·to·unsigned·integer.</p><p>An·IP·datagram·header·is·of·variable·length.·This·length·is·measured·in·the162 default·type·equal·to·unsigned·integer.</p><p>An·IP·datagram·header·is·of·variable·length.·This·length·is·measured·in·the
163 number·of·32-bit·words·and·is·given·in·the·segment·corresponding·to·<code·class="inline">HLen</code>.·The163 number·of·32-bit·words·and·is·given·in·the·segment·corresponding·to·<code·class="inline">HLen</code>.·The
164 minimum·value·of·<code·class="inline">HLen</code>·is·5.·It·is·the·segment·corresponding·to·<code·class="inline">Opts</code>·that·is164 minimum·value·of·<code·class="inline">HLen</code>·is·5.·It·is·the·segment·corresponding·to·<code·class="inline">Opts</code>·that·is
Offset 229, 15 lines modifiedOffset 229, 15 lines modified
229 is·1.</p><p>For·clarity,·it·is·recommended·not·to·change·the·unit·size·for·binaries.229 is·1.</p><p>For·clarity,·it·is·recommended·not·to·change·the·unit·size·for·binaries.
230 Instead,·use·<code·class="inline">binary</code>·when·you·need·byte·alignment·and·<code·class="inline">bitstring</code>·when·you·need230 Instead,·use·<code·class="inline">binary</code>·when·you·need·byte·alignment·and·<code·class="inline">bitstring</code>·when·you·need
231 bit·alignment.</p><p>The·following·example·successfully·constructs·a·bitstring·of·7·bits,·provided231 bit·alignment.</p><p>The·following·example·successfully·constructs·a·bitstring·of·7·bits,·provided
232 that·all·of·X·and·Y·are·integers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">:</span><span·class="mi">6</span><span·class="p">&gt;&gt;</span></code></pre><p>As·mentioned·earlier,·segments·have·the·following·general·syntax:</p><p><code·class="inline">Value:Size/TypeSpecifierList</code></p><p>When·constructing·binaries,·<code·class="inline">Value</code>·and·<code·class="inline">Size</code>·can·be·any·Erlang·expression.232 that·all·of·X·and·Y·are·integers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">:</span><span·class="mi">6</span><span·class="p">&gt;&gt;</span></code></pre><p>As·mentioned·earlier,·segments·have·the·following·general·syntax:</p><p><code·class="inline">Value:Size/TypeSpecifierList</code></p><p>When·constructing·binaries,·<code·class="inline">Value</code>·and·<code·class="inline">Size</code>·can·be·any·Erlang·expression.
233 However,·for·syntactical·reasons,·both·<code·class="inline">Value</code>·and·<code·class="inline">Size</code>·must·be·enclosed·in233 However,·for·syntactical·reasons,·both·<code·class="inline">Value</code>·and·<code·class="inline">Size</code>·must·be·enclosed·in
234 parenthesis·if·the·expression·consists·of·anything·more·than·a·single·literal·or234 parenthesis·if·the·expression·consists·of·anything·more·than·a·single·literal·or
235 a·variable.·The·following·gives·a·compiler·syntax·error:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span></code></pre><p>This·expression·must·be·rewritten·into·the·following,·to·be·accepted·by·the235 a·variable.·The·following·gives·a·compiler·syntax·error:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span></code></pre><p>This·expression·must·be·rewritten·into·the·following,·to·be·accepted·by·the
236 compiler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="p"·data-group-id="0730635066-1">(</span><span·class="n">X</span><span·class="o">+</span><span·class="mi">1</span><span·class="p"·data-group-id="0730635066-1">)</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span></code></pre><h3·id="including-literal-strings"·class="section-heading">236 compiler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="p"·data-group-id="8984112678-1">(</span><span·class="n">X</span><span·class="o">+</span><span·class="mi">1</span><span·class="p"·data-group-id="8984112678-1">)</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span></code></pre><h3·id="including-literal-strings"·class="section-heading">
237 ··<a·href="#including-literal-strings"·class="hover-link">237 ··<a·href="#including-literal-strings"·class="hover-link">
238 ····<i·class="ri-link-m"·aria-hidden="true"></i>238 ····<i·class="ri-link-m"·aria-hidden="true"></i>
239 ··</a>239 ··</a>
240 ··<span·class="text">Including·Literal·Strings</span>240 ··<span·class="text">Including·Literal·Strings</span>
241 </h3>241 </h3>
242 <p>A·literal·string·can·be·written·instead·of·an·element:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="s">&quot;hello&quot;</span><span·class="p">&gt;&gt;</span></code></pre><p>This·is·syntactic·sugar·for·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="sc">$h</span><span·class="p">,</span><span·class="sc">$e</span><span·class="p">,</span><span·class="sc">$l</span><span·class="p">,</span><span·class="sc">$l</span><span·class="p">,</span><span·class="sc">$o</span><span·class="p">&gt;&gt;</span></code></pre><h2·id="matching-binaries"·class="section-heading">242 <p>A·literal·string·can·be·written·instead·of·an·element:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="s">&quot;hello&quot;</span><span·class="p">&gt;&gt;</span></code></pre><p>This·is·syntactic·sugar·for·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">&lt;&lt;</span><span·class="sc">$h</span><span·class="p">,</span><span·class="sc">$e</span><span·class="p">,</span><span·class="sc">$l</span><span·class="p">,</span><span·class="sc">$l</span><span·class="p">,</span><span·class="sc">$o</span><span·class="p">&gt;&gt;</span></code></pre><h2·id="matching-binaries"·class="section-heading">
243 ··<a·href="#matching-binaries"·class="hover-link">243 ··<a·href="#matching-binaries"·class="hover-link">
Offset 249, 49 lines modifiedOffset 249, 49 lines modified
249 occur·wherever·patterns·are·allowed,·including·inside·other·patterns.·Binary249 occur·wherever·patterns·are·allowed,·including·inside·other·patterns.·Binary
250 patterns·cannot·be·nested.·The·pattern·<code·class="inline">&lt;&lt;&gt;&gt;</code>·matches·a·zero·length·binary.</p><p>Each·segment·in·a·binary·can·consist·of·zero·or·more·bits.·A·segment·of·type250 patterns·cannot·be·nested.·The·pattern·<code·class="inline">&lt;&lt;&gt;&gt;</code>·matches·a·zero·length·binary.</p><p>Each·segment·in·a·binary·can·consist·of·zero·or·more·bits.·A·segment·of·type
251 <code·class="inline">binary</code>·must·have·a·size·evenly·divisible·by·8·(or·divisible·by·the·unit·size,251 <code·class="inline">binary</code>·must·have·a·size·evenly·divisible·by·8·(or·divisible·by·the·unit·size,
252 if·the·unit·size·has·been·changed).·A·segment·of·type·<code·class="inline">bitstring</code>·has·no252 if·the·unit·size·has·been·changed).·A·segment·of·type·<code·class="inline">bitstring</code>·has·no
253 restrictions·on·the·size.·A·segment·of·type·<code·class="inline">float</code>·must·have·size·64·or·32.</p><p>As·mentioned·earlier,·segments·have·the·following·general·syntax:</p><p><code·class="inline">Value:Size/TypeSpecifierList</code></p><p>When·matching·<code·class="inline">Value</code>,·value·must·be·either·a·variable·or·an·integer,·or·a253 restrictions·on·the·size.·A·segment·of·type·<code·class="inline">float</code>·must·have·size·64·or·32.</p><p>As·mentioned·earlier,·segments·have·the·following·general·syntax:</p><p><code·class="inline">Value:Size/TypeSpecifierList</code></p><p>When·matching·<code·class="inline">Value</code>,·value·must·be·either·a·variable·or·an·integer,·or·a
254 floating·point·literal.·Expressions·are·not·allowed.</p><p><code·class="inline">Size</code>·must·be·a254 floating·point·literal.·Expressions·are·not·allowed.</p><p><code·class="inline">Size</code>·must·be·a
255 <a·href="../../doc/system/expressions.html#guard-expressions">guard·expression</a>,·which·can·use255 <a·href="../../doc/system/expressions.html#guard-expressions">guard·expression</a>,·which·can·use
256 literals·and·previously·bound·variables.·The·following·is·not·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="9046102833-1">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="n">N</span><span·class="p">,</span><span·class="n">T</span><span·class[·...·truncated·by·diffoscope;·len:·115,·SHA:·d3484b4ee911574b2307092eb6654ece26a353b04ad2b870b89426d024efe4e4·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">256 literals·and·previously·bound·variables.·The·following·is·not·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="3792319907-1">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="n">N</span><span·class="p">,</span><span·class="n">T</span><span·class[·...·truncated·by·diffoscope;·len:·115,·SHA:·bcf04bad693f1ce1ae7e10b0bbd14430ddb53a1a3f0176b02cdda593369d0c31·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
257 ···</span><span·class="p"·data-group-id="9046102833-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">T</span><span·class="p"·data-group-id="9046102833-2">}</span><span·class="p">.</span></code></pre><p>The·two·occurrences·of·<code·class="inline">N</code>·are·not·related.·The·compiler·will·complain·that·the 
258 <code·class="inline">N</code>·in·the·size·field·is·unbound.</p><p>The·correct·way·to·write·this·example·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="4060234797-1">(</span><span·[·...·truncated·by·diffoscope;·len:·213,·SHA:·552b6ed76ab8e339b9b6a3a36026bf8ffd07d507ff597bc7980ad2596110c479·...·]257 ···</span><span·class="p"·data-group-id="3792319907-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">T</span><span·class="p"·data-group-id="3792319907-2">}</span><span·class="p">.</span></code></pre><p>The·two·occurrences·of·<code[·...·truncated·by·diffoscope;·len:·77,·SHA:·b79cd7a1b3a5d65635c58ed8a311bdfe1e6d3c335245d3f0a149a77a129ced39·...·]
 258 <code·class="inline">N</code>·in·the·size·field·is·unbound.</p><p>The·correct·way·to·write·this·example·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="7043680403-1">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="7043680403-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
259 ···</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="n">N</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p">,</span><span·class="w">259 ···</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="n">N</span><span·class="p">,</span><span·class="n">T</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p">,</span><span·class="w">
260 ···</span><span·class="p"·data-group-id="4060234797-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">T</span><span·class="p"·data-group-id="4060234797-2">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>Before·OTP·23,·<code·class="inline">Size</code>·was·restricted·to·be·an·integer·or·a·variable·bound·to260 ···</span><span·class="p"·data-group-id="7043680403-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">T</span><span·class="p"·data-group-id="7043680403-2">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>Before·OTP·23,·<code·class="inline">Size</code>·was·restricted·to·be·an·integer·or·a·variable·bound·to
261 an·integer.</p></blockquote><h3·id="binding-and-using-a-size-variable"·class="section-heading">261 an·integer.</p></blockquote><h3·id="binding-and-using-a-size-variable"·class="section-heading">
262 ··<a·href="#binding-and-using-a-size-variable"·class="hover-link">262 ··<a·href="#binding-and-using-a-size-variable"·class="hover-link">
263 ····<i·class="ri-link-m"·aria-hidden="true"></i>263 ····<i·class="ri-link-m"·aria-hidden="true"></i>
264 ··</a>264 ··</a>
265 ··<span·class="text">Binding·and·Using·a·Size·Variable</span>265 ··<span·class="text">Binding·and·Using·a·Size·Variable</span>
266 </h3>266 </h3>
267 <p>There·is·one·exception·to·the·rule·that·a·variable·that·is·used·as·size·must·be267 <p>There·is·one·exception·to·the·rule·that·a·variable·that·is·used·as·size·must·be
268 previously·bound.·It·is·possible·to·match·and·bind·a·variable,·and·use·it·as·a268 previously·bound.·It·is·possible·to·match·and·bind·a·variable,·and·use·it·as·a
269 size·within·the·same·binary·pattern.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bar</span><span·class="p"·data-group-id="6625397611-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">Sz</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">Payload</span><span·class="p">:</span><span·class="n">Sz</span><span·class="o">/</span><s[·...·truncated·by·diffoscope;·len:·305,·SHA:·b72fe2a8bebeae257ba4cc8c6651545478c3e79e4d6fbf0fcbe113f0114bf5c6·...·]1-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">269 size·within·the·same·binary·pattern.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bar</span><span·class="p"·data-group-id="4763423581-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">Sz</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">Payload</span><span·class="p">:</span><span·class="n">Sz</span><span·class="o">/</span><s[·...·truncated·by·diffoscope;·len:·305,·SHA:·eb6c3a38759d68d824bc30ca4a1983753c438e7ebb1727a34682a188b2d12fcb·...·]1-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
270 ···</span><span·class="p"·data-group-id="6625397611-2">{</span><span·class="n">Payload</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="6625397611-2">}</span><span·class="p">.</span></code></pre><p>Here·<code·class="inline">Sz</code>·is·bound·to·the·value·in·the·first·byte·of·the·binary.·<code·class="inline">Sz</code>·is·then270 ···</span><span·class="p"·data-group-id="4763423581-2">{</span><span·class="n">Payload</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="4763423581-2">}</span><span·class="p">.</span></code></pre><p>Here·<code·class="inline">Sz</code>·is·bound·to·the·value·in·the·first·byte·of·the·binary.·<code·class="inline">Sz</code>·is·then
271 used·at·the·number·of·bytes·to·match·out·as·a·binary.</p><p>Starting·in·OTP·23,·the·size·can·be·a·guard·expression:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bar</span><span·class="p"·data-group-id="2375158320-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">Sz</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">Payload</span><span·class="p">:</span><span·class="p"·data-group-id="2375158320-2">(</spa[·...·truncated·by·diffoscope;·len:·514,·SHA:·4f982ce18467d10ae893417002eaa26f79aee83eeec1edbbabb361b8ecc1a5d2·...·]0-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">271 used·at·the·number·of·bytes·to·match·out·as·a·binary.</p><p>Starting·in·OTP·23,·the·size·can·be·a·guard·expression:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bar</span><span·class="p"·data-group-id="0390049880-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">Sz</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">Payload</span><span·class="p">:</span><span·class="p"·data-group-id="0390049880-2">(</spa[·...·truncated·by·diffoscope;·len:·514,·SHA:·cfd493d2adba80951e691606c9c7db33530438616e55024797db28a8d0a8016c·...·]0-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
272 ···</span><span·class="p"·data-group-id="2375158320-4">{</span><span·class="n">Payload</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="2375158320-4">}</span><span·class="p">.</span></code></pre><p>Here·<code·class="inline">Sz</code>·is·the·combined·size·of·the·header·and·the·payload,·so·we·will·need·to272 ···</span><span·class="p"·data-group-id="0390049880-4">{</span><span·class="n">Payload</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="0390049880-4">}</span><span·class="p">.</span></code></pre><p>Here·<code·class="inline">Sz</code>·is·the·combined·size·of·the·header·and·the·payload,·so·we·will·need·to
273 subtract·one·byte·to·get·the·size·of·the·payload.</p><h3·id="getting-the-rest-of-the-binary-or-bitstring"·class="section-heading">273 subtract·one·byte·to·get·the·size·of·the·payload.</p><h3·id="getting-the-rest-of-the-binary-or-bitstring"·class="section-heading">
274 ··<a·href="#getting-the-rest-of-the-binary-or-bitstring"·class="hover-link">274 ··<a·href="#getting-the-rest-of-the-binary-or-bitstring"·class="hover-link">
275 ····<i·class="ri-link-m"·aria-hidden="true"></i>275 ····<i·class="ri-link-m"·aria-hidden="true"></i>
276 ··</a>276 ··</a>
277 ··<span·class="text">Getting·the·Rest·of·the·Binary·or·Bitstring</span>277 ··<span·class="text">Getting·the·Rest·of·the·Binary·or·Bitstring</span>
278 </h3>278 </h3>
279 <p>To·match·out·the·rest·of·a·binary,·specify·a·binary·field·without·size:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="4677063759-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">A</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">Rest</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;<[·...·truncated·by·diffoscope;·len:·668,·SHA:·a6974fbf814ee9bb2cb8647c21e7ce0065c2a06446d4332b9cc1171a296d8ff5·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span></code></pre><p>There·are·no·restrictions·on·the·number·of·bits·in·the·tail.</p><h2·id="appending-to-a-binary"·class="section-heading">279 <p>To·match·out·the·rest·of·a·binary,·specify·a·binary·field·without·size:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="0841127604-1">(</span><span·class="p">&lt;&lt;</span><span·class="n">A</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">Rest</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;<[·...·truncated·by·diffoscope;·len:·668,·SHA:·d16e6d989e77b2f92297b34988932c60930737d7aa9835143b8135405f267c9e·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span></code></pre><p>There·are·no·restrictions·on·the·number·of·bits·in·the·tail.</p><h2·id="appending-to-a-binary"·class="section-heading">
280 ··<a·href="#appending-to-a-binary"·class="hover-link">280 ··<a·href="#appending-to-a-binary"·class="hover-link">
281 ····<i·class="ri-link-m"·aria-hidden="true"></i>281 ····<i·class="ri-link-m"·aria-hidden="true"></i>
282 ··</a>282 ··</a>
283 ··<span·class="text">Appending·to·a·Binary</span>283 ··<span·class="text">Appending·to·a·Binary</span>
284 </h2>284 </h2>
285 <p>Appending·to·a·binary·in·an·efficient·way·can·be·done·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="8071903848-1">(</span><span·class="n">T</span><span·class="p"·data-group-id="8071903848-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">285 <p>Appending·to·a·binary·in·an·efficient·way·can·be·done·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="0029671659-1">(</span><span·class="n">T</span><span·class="p"·data-group-id="0029671659-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
286 ····</span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="8071903848-2">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8071903848-2">)</span><span·class="p">.</span><span·class="w">286 ····</span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="0029671659-2">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0029671659-2">)</span><span·class="p">.</span><span·class="w">
  
287 </span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="8071903848-3">(</span><span·class="p"·data-group-id="8071903848-4">[</span><span·class="p"·data-group-id="8071903848-5">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">,</span><span·class="n">Z</span><span·cl[·...·truncated·by·diffoscope;·len:·309,·SHA:·b49bfe8387c65121e958f3ed7adb7c4806d06b2be1ecb49732cdbc4e92305931·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">287 </span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="0029671659-3">(</span><span·class="p"·data-group-id="0029671659-4">[</span><span·class="p"·data-group-id="0029671659-5">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">,</span><span·class="n">Z</span><span·cl[·...·truncated·by·diffoscope;·len:·309,·SHA:·806cfd3b21fe166238b0a94841a3d8ca92e9c01efda9486af716cc316c668be1·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
288 ····</span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="8071903848-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">X</span><sp[·...·truncated·by·diffoscope;·len:·315,·SHA:·14a332e8be9d66707f22fbeda3778d19a06f747b232f38f48475e1fada58ccf4·...·]-6">)</span><span·class="p">;</span><span·class="w">288 ····</span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="0029671659-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">Acc</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">X</span><sp[·...·truncated·by·diffoscope;·len:·315,·SHA:·59c06904297a5ed0c1b21f856318371803d6b3df8ced0192fc69a649bda9aec4·...·]-6">)</span><span·class="p">;</span><span·class="w">
289 </span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="8071903848-7">(</span><span·class="p"·data-group-id="8071903848-8">[</span><span·class="p"·data-group-id="8071903848-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="8071903848-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">289 </span><span·class="nf">triples_to_bin</span><span·class="p"·data-group-id="0029671659-7">(</span><span·class="p"·data-group-id="0029671659-8">[</span><span·class="p"·data-group-id="0029671659-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="0029671659-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
290 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre>290 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre>
291 </div>291 </div>
  
292 <div·class="bottom-actions"·id="bottom-actions">292 <div·class="bottom-actions"·id="bottom-actions">
293 ··<div·class="bottom-actions-item">293 ··<div·class="bottom-actions-item">
  
294 ······<a·href="list_comprehensions.html"·class="bottom-actions-button"·rel="prev">294 ······<a·href="list_comprehensions.html"·class="bottom-actions-button"·rel="prev">
58.7 KB
./usr/share/doc/erlang-doc/html/doc/system/c_port.html
    
Offset 148, 101 lines modifiedOffset 148, 101 lines modified
148 external·program,·if·it·is·written·properly).</p><p>The·port·is·created·using·the·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>·with148 external·program,·if·it·is·written·properly).</p><p>The·port·is·created·using·the·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>·with
149 <code·class="inline">{spawn,ExtPrg}</code>·as·the·first·argument.·The·string·<code·class="inline">ExtPrg</code>·is·the·name·of·the149 <code·class="inline">{spawn,ExtPrg}</code>·as·the·first·argument.·The·string·<code·class="inline">ExtPrg</code>·is·the·name·of·the
150 external·program,·including·any·command·line·arguments.·The·second·argument·is·a150 external·program,·including·any·command·line·arguments.·The·second·argument·is·a
151 list·of·options,·in·this·case·only·<code·class="inline">{packet,2}</code>.·This·option·says·that·a·2·byte151 list·of·options,·in·this·case·only·<code·class="inline">{packet,2}</code>.·This·option·says·that·a·2·byte
152 length·indicator·is·to·be·used·to·simplify·the·communication·between·C·and152 length·indicator·is·to·be·used·to·simplify·the·communication·between·C·and
153 Erlang.·The·Erlang·port·automatically·adds·the·length·indicator,·but·this·must153 Erlang.·The·Erlang·port·automatically·adds·the·length·indicator,·but·this·must
154 be·done·explicitly·in·the·external·C·program.</p><p>The·process·is·also·set·to·trap·exits,·which·enables·detection·of·failure·of·the154 be·done·explicitly·in·the·external·C·program.</p><p>The·process·is·also·set·to·trap·exits,·which·enables·detection·of·failure·of·the
155 external·program:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9847014199-1">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="9847014199-1">)</span><span·class="p">.</span><span·class="w">155 external·program:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0653338435-1">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="0653338435-1">)</span><span·class="p">.</span><span·class="w">
156 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9847014199-2">(</span><span·class="p"·data-group-id="9847014199-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·aa9fa75d4af8bef60301c29b0f059016b653003db88ab1e4027fcd71d8c9afbf·...·]-2">)</span><span·class="p">.</span><span·class="w">156 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0653338435-2">(</span><span·class="p"·data-group-id="0653338435-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·ab6ebc698958ccb04557bc22699dd63c33a11c93cb5d981aca45b38bc51991cb·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
157 </span><span·class="nf">start</span><span·class="p"·data-group-id="9847014199-4">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="9847014199-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">start</span><span·class="p"·data-group-id="0653338435-4">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="0653338435-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ··</span><span·class="nf">spawn</span><span·class="p"·data-group-id="9847014199-5">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9847014199-6">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·16311dc8d6df59cd9e456f83fbafe7162a34f599fbf811c73ff56ea79f47c16b·...·]-5">)</span><span·class="p">.</span><span·class="w">158 ··</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0653338435-5">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0653338435-6">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·9edc9930e5e558143951a6a2e1b011a53cb0812bc83c83a0816363329722e1db·...·]-5">)</span><span·class="p">.</span><span·class="w">
  
159 </span><span·class="nf">init</span><span·class="p"·data-group-id="9847014199-7">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="9847014199-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 </span><span·class="nf">init</span><span·class="p"·data-group-id="0653338435-7">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="0653338435-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ··</span><span·class="nf">register</span><span·class="p"·data-group-id="9847014199-8">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="9847014199-9">(</span><span·class="p"·data-group-id="9847014199-9">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·c2363be542f693af67e94d0a04bd21e867a3a1008febfee8dbefa70b5f5898e7·...·]-8">)</span><span·class="p">,</span><span·class="w">160 ··</span><span·class="nf">register</span><span·class="p"·data-group-id="0653338435-8">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="0653338435-9">(</span><span·class="p"·data-group-id="0653338435-9">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·38b729bb4aac2321b24c2d81c17d016a00aae67711ea6a495ffbed0828dae7ff·...·]-8">)</span><span·class="p">,</span><span·class="w">
161 ··</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="9847014199-10">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="9847014199-10">)</span><span·class="p">,</span><span·class="w">161 ··</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="0653338435-10">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="0653338435-10">)</span><span·class="p">,</span><span·class="w">
162 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="9847014199-11">(</span><span·class="p"·data-group-id="9847014199-12">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="9847014199-12">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9847014199-13">[</span><span·class="p"·data-group-id="9847014199-14">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="9847014199-14">}</span><span·class="p"·data-group-id="9847014199-13">]</span><span·class="p"·data-group-id="9847014199-11">)</span><span·class="p">,</span><span·class="w"> 
163 ··</span><span·class="nf">loop</span><span·class="p"·data-group-id="9847014199-15">(</span><span·class="n">Port</span><span·class="p"·data-group-id="9847014199-15">)</span><span·class="p">.</span></code></pre><p>Now·<code·class="inline">complex1:foo/1</code>·and·<code·class="inl[·...·truncated·by·diffoscope;·len:·58,·SHA:·3117d01f7bd68ff4689794ef31e2a9077a76513598f83716c3d6401703233deb·...·]162 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="0653338435-11">(</span><span·class="p"·data-group-id="0653338435-12">{</span><span·class="nb">spawn</span><[·...·truncated·by·diffoscope;·len:·591,·SHA:·c9d9f53f225069a111e48ac6f852ccb64fefe966e4d629ce21b41669eb60e0b0·...·]
 163 ··</span><span·class="nf">loop</span><span·class="p"·data-group-id="0653338435-15">(</span><span·class="n">Port</span><span·class="p"·data-group-id="0653338435-15">)</span><span·class="p">.</span></code></pre><p>Now·<code·class="inline">complex1:foo/1</code>·and·<code·class="inline">complex1:bar/1</code>·can·be·implemented.·Both·send·a
164 message·to·the·<code·class="inline">complex</code>·process·and·receive·the·following·replies:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="7858760567-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="7858760567-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">164 message·to·the·<code·class="inline">complex</code>·process·and·receive·the·following·replies:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="5698909735-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="5698909735-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
165 ··</span><span·class="nf">call_port</span><span·class="p"·data-group-id="7858760567-2">(</span><span·class="p"·data-group-id="7858760567-3">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="7858760567-3">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·b98b07fc601bbba4bac30e3aa0c8b29e1e0340154f3390fca4f8c62eb96ee3e2·...·]-2">)</span><span·class="p">.</span><span·class="w">165 ··</span><span·class="nf">call_port</span><span·class="p"·data-group-id="5698909735-2">(</span><span·class="p"·data-group-id="5698909735-3">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="5698909735-3">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·4db7a2fbe0d9b38860cff73bc1380977d8bf860f48d62591657069d94d234078·...·]-2">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="nf">bar</span><span·class="p"·data-group-id="7858760567-4">(</span><span·class="n">Y</span><span·class="p"·data-group-id="7858760567-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">166 </span><span·class="nf">bar</span><span·class="p"·data-group-id="5698909735-4">(</span><span·class="n">Y</span><span·class="p"·data-group-id="5698909735-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
167 ··</span><span·class="nf">call_port</span><span·class="p"·data-group-id="7858760567-5">(</span><span·class="p"·data-group-id="7858760567-6">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="7858760567-6">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·b98b07fc601bbba4bac30e3aa0c8b29e1e0340154f3390fca4f8c62eb96ee3e2·...·]-5">)</span><span·class="p">.</span><span·class="w">167 ··</span><span·class="nf">call_port</span><span·class="p"·data-group-id="5698909735-5">(</span><span·class="p"·data-group-id="5698909735-6">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="5698909735-6">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·4db7a2fbe0d9b38860cff73bc1380977d8bf860f48d62591657069d94d234078·...·]-5">)</span><span·class="p">.</span><span·class="w">
  
168 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="7858760567-7">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="7858760567-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">168 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="5698909735-7">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="5698909735-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
169 ··</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7858760567-8">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7858760567-9">(</span><span·class="p"·data-group-id="7858760567-9">)</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·91,·SHA:·2b428842d0526b0ab62cf28d9b8e8150259e104bcf1bb788ba394c7054f9ecfe·...·]-8">}</span><span·class="p">,</span><span·class="w">169 ··</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5698909735-8">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="5698909735-9">(</span><span·class="p"·data-group-id="5698909735-9">)</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·91,·SHA:·3186acb5a80d00321b0ed0eb075167e6c550e907301ff6fdc7ea31ef87e0123d·...·]-8">}</span><span·class="p">,</span><span·class="w">
170 ··</span><span·class="k">receive</span><span·class="w">170 ··</span><span·class="k">receive</span><span·class="w">
171 ····</span><span·class="p"·data-group-id="7858760567-10">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="7858760567-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 ····</span><span·class="p"·data-group-id="5698909735-10">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="5698909735-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ······</span><span·class="n">Result</span><span·class="w">172 ······</span><span·class="n">Result</span><span·class="w">
173 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">complex</code>·process·does·the·following:</p><ul><li>Encodes·the·message·into·a·sequence·of·bytes.</li><li>Sends·it·to·the·port.</li><li>Waits·for·a·reply.</li><li>Decodes·the·reply.</li><li>Sends·it·back·to·the·caller:</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="0355532642-1">(</span><span·class="n">Port</span><span·class="p"·data-group-id="0355532642-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">complex</code>·process·does·the·following:</p><ul><li>Encodes·the·message·into·a·sequence·of·bytes.</li><li>Sends·it·to·the·port.</li><li>Waits·for·a·reply.</li><li>Decodes·the·reply.</li><li>Sends·it·back·to·the·caller:</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="2799097222-1">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2799097222-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ··</span><span·class="k">receive</span><span·class="w">174 ··</span><span·class="k">receive</span><span·class="w">
175 ····</span><span·class="p"·data-group-id="0355532642-2">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0355532642-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 ····</span><span·class="p"·data-group-id="2799097222-2">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="2799097222-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ······</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0355532642-3">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0355532642-4">(</span><span·class="p"·data-group-id="0355532642-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0355532642-5">{</span[·...·truncated·by·diffoscope;·len:·335,·SHA:·9a08b87d2b214b9a1b74e034705f4a24fcf6e74e49541af91c3a60ef75ac87f5·...·]2-3">}</span><span·class="p">,</span><span·class="w">176 ······</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2799097222-3">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2799097222-4">(</span><span·class="p"·data-group-id="2799097222-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2799097222-5">{</span[·...·truncated·by·diffoscope;·len:·335,·SHA:·0bd7f166b12b991c973e25e61ca98e259d6ddf262946ab82bbd6621d92691fa1·...·]2-3">}</span><span·class="p">,</span><span·class="w">
177 ······</span><span·class="k">receive</span><span·class="w">177 ······</span><span·class="k">receive</span><span·class="w">
178 ········</span><span·class="p"·data-group-id="0355532642-7">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0355532642-8">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·90,·SHA:·afd0cfec643fb1447a435220a73b401febd2ee7eb6e6788967152675ab6c7b6d·...·]2-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 ········</span><span·class="p"·data-group-id="2799097222-7">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2799097222-8">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·90,·SHA:·bd1d1e45d9ed6ca5b1762fa767b07df20265f240fd52b7ebe73c45aa9a4fd3b0·...·]2-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ··········</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0355532642-9">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="0355532642-10">(</span><span·class="n">Data</span><span·class="p"·data-group-id="0355532642-10[·...·truncated·by·diffoscope;·len:·50,·SHA:·6e5a98c1083dbb4d227beb143258e5994a6ff91cc14472e22cbc1609e0fe1252·...·]2-9">}</span><span·class="w">179 ··········</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2799097222-9">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="2799097222-10">(</span><span·class="n">Data</span><span·class="p"·data-group-id="2799097222-10[·...·truncated·by·diffoscope;·len:·50,·SHA:·88c808e5523ff70489a50cc120ab0f273a8f11dfb5e2a90d8e4630681d8a757e·...·]2-9">}</span><span·class="w">
180 ······</span><span·class="k">end</span><span·class="p">,</span><span·class="w">180 ······</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
181 ······</span><span·class="nf">loop</span><span·class="p"·data-group-id="0355532642-11">(</span><span·class="n">Port</span><span·class="p"·data-group-id="0355532642-11">)</span><span·class="w">181 ······</span><span·class="nf">loop</span><span·class="p"·data-group-id="2799097222-11">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2799097222-11">)</span><span·class="w">
182 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Assuming·that·both·the·arguments·and·the·results·from·the·C·functions·are·less182 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Assuming·that·both·the·arguments·and·the·results·from·the·C·functions·are·less
183 than·256,·a·simple·encoding/decoding·scheme·is·employed.·In·this·scheme,·<code·class="inline">foo</code>183 than·256,·a·simple·encoding/decoding·scheme·is·employed.·In·this·scheme,·<code·class="inline">foo</code>
184 is·represented·by·byte·1,·<code·class="inline">bar</code>·is·represented·by·2,·and·the·argument/result·is184 is·represented·by·byte·1,·<code·class="inline">bar</code>·is·represented·by·2,·and·the·argument/result·is
185 represented·by·a·single·byte·as·well:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">encode</span><span·class="p"·data-group-id="8877791079-1">(</span><span·class="p"·data-group-id="8877791079-2">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="8877791079-2">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·612b3c69dfd30704480ffdc893f159cc24059b3eec2f33bcd529984a9925cf94·...·]-3">]</span><span·class="p">;</span><span·class="w">185 represented·by·a·single·byte·as·well:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">encode</span><span·class="p"·data-group-id="4421422993-1">(</span><span·class="p"·data-group-id="4421422993-2">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="4421422993-2">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·3b23bccbaedefc83f2e7591c6f12eb17ac1736b06418651c89ca74781b1bacc4·...·]-3">]</span><span·class="p">;</span><span·class="w">
186 </span><span·class="nf">encode</span><span·class="p"·data-group-id="8877791079-4">(</span><span·class="p"·data-group-id="8877791079-5">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8877791079-5">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·f7c11820ccf9c88f25bd5da5417a3583a3f7e61605f51e37bef434891b52e252·...·]-6">]</span><span·class="p">.</span><span·class="w">186 </span><span·class="nf">encode</span><span·class="p"·data-group-id="4421422993-4">(</span><span·class="p"·data-group-id="4421422993-5">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="4421422993-5">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·9ed30ac2b8b21c44062e0dca9ac9f45c675ed0c3edd6a02f6054a18eb0d8ca92·...·]-6">]</span><span·class="p">.</span><span·class="w">
  
187 </span><span·class="nf">decode</span><span·class="p"·data-group-id="8877791079-7">(</span><span·class="p"·data-group-id="8877791079-8">[</span><span·class="n">Int</span><span·class="p"·data-group-id="8877791079-8">]</span><span·class="p"·data-group-id="8877791079-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><p>The·resulting·Erlang·program,·including·functionality·for·stopping·the·port·and187 </span><span·class="nf">decode</span><span·class="p"·data-group-id="4421422993-7">(</span><span·class="p"·data-group-id="4421422993-8">[</span><span·class="n">Int</span><span·class="p"·data-group-id="4421422993-8">]</span><span·class="p"·data-group-id="4421422993-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><p>The·resulting·Erlang·program,·including·functionality·for·stopping·the·port·and
188 detecting·port·failures,·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9318060228-1">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="9318060228-1">)</span><span·class="p">.</span><span·class="w">188 detecting·port·failures,·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2557312724-1">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="2557312724-1">)</span><span·class="p">.</span><span·class="w">
189 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9318060228-2">(</span><span·class="p"·data-group-id="9318060228-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·5517eb2dabeab52dc6a2a2eda33266293961c724a156ccb5314388c368ba78f9·...·]-2">)</span><span·class="p">.</span><span·class="w">189 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2557312724-2">(</span><span·class="p"·data-group-id="2557312724-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·77becadbbe41f8450cefb4c0eff5a78bd7039e6ff0142ad532a12ebf22f3b025·...·]-2">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9318060228-4">(</span><span·class="p"·data-group-id="9318060228-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·255aeceb76328cb564a8c26cb8fc88cdfca00efadcd49ae151bcf225f2f0556b·...·]-4">)</span><span·class="p">.</span><span·class="w">190 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2557312724-4">(</span><span·class="p"·data-group-id="2557312724-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·6aa3d6a26a4eb639e736c6939808681c668be7c57e70c0052fb029751b9a2300·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
191 </span><span·class="nf">start</span><span·class="p"·data-group-id="9318060228-6">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="9318060228-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 </span><span·class="nf">start</span><span·class="p"·data-group-id="2557312724-6">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="2557312724-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="9318060228-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-8">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·61618ed013f5f0888d1ded4c60b87448435dbffabc5e3fca5c1ef360ea20a3c4·...·]-7">)</span><span·class="p">.</span><span·class="w">192 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="2557312724-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-8">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·d3d53e9cb17c7bdb2e39dd08763f73f3ad1e954953f4b2e4d2295f8df44b91f7·...·]-7">)</span><span·class="p">.</span><span·class="w">
193 </span><span·class="nf">stop</span><span·class="p"·data-group-id="9318060228-9">(</span><span·class="p"·data-group-id="9318060228-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 </span><span·class="nf">stop</span><span·class="p"·data-group-id="2557312724-9">(</span><span·class="p"·data-group-id="2557312724-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">194 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">
  
195 </span><span·class="nf">foo</span><span·class="p"·data-group-id="9318060228-10">(</span><span·class="n">X</span><span·class="p"·data-group-id="9318060228-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">195 </span><span·class="nf">foo</span><span·class="p"·data-group-id="2557312724-10">(</span><span·class="n">X</span><span·class="p"·data-group-id="2557312724-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
196 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="9318060228-11">(</span><span·class="p"·data-group-id="9318060228-12">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="9318060228-12">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·72c6687245774a524802233ff6119f07bef5ba95ad5290ce445b18ce3ca199a5·...·]-11">)</span><span·class="p">.</span><span·class="w">196 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="2557312724-11">(</span><span·class="p"·data-group-id="2557312724-12">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="2557312724-12">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9fd0e21446aba5b06551a846dd1f9e0f7a2a9188b5058a222965d572c0035c9a·...·]-11">)</span><span·class="p">.</span><span·class="w">
197 </span><span·class="nf">bar</span><span·class="p"·data-group-id="9318060228-13">(</span><span·class="n">Y</span><span·class="p"·data-group-id="9318060228-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">197 </span><span·class="nf">bar</span><span·class="p"·data-group-id="2557312724-13">(</span><span·class="n">Y</span><span·class="p"·data-group-id="2557312724-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
198 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="9318060228-14">(</span><span·class="p"·data-group-id="9318060228-15">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="9318060228-15">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·72c6687245774a524802233ff6119f07bef5ba95ad5290ce445b18ce3ca199a5·...·]-14">)</span><span·class="p">.</span><span·class="w">198 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="2557312724-14">(</span><span·class="p"·data-group-id="2557312724-15">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="2557312724-15">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9fd0e21446aba5b06551a846dd1f9e0f7a2a9188b5058a222965d572c0035c9a·...·]-14">)</span><span·class="p">.</span><span·class="w">
  
199 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="9318060228-16">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="9318060228-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">199 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="2557312724-16">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="2557312724-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
200 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-17">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="9318060228-18">(</span><span·class="p"·data-group-id="9318060228-18">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·501839cbd9b90815023f8f2f988738d90bd6a13b040774eb51cbcbb97a0bf901·...·]-17">}</span><span·class="p">,</span><span·class="w">200 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-17">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2557312724-18">(</span><span·class="p"·data-group-id="2557312724-18">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·63693be2953610aec4832f5e58b0771651f94e695cd55e9a98b0cd14f2b2d387·...·]-17">}</span><span·class="p">,</span><span·class="w">
201 ····</span><span·class="k">receive</span><span·class="w">201 ····</span><span·class="k">receive</span><span·class="w">
202 »       </span><span·class="p"·data-group-id="9318060228-19">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="9318060228-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">202 »       </span><span·class="p"·data-group-id="2557312724-19">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="2557312724-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
203 »       ····</span><span·class="n">Result</span><span·class="w">203 »       ····</span><span·class="n">Result</span><span·class="w">
204 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">204 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
205 </span><span·class="nf">init</span><span·class="p"·data-group-id="9318060228-20">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="9318060228-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 </span><span·class="nf">init</span><span·class="p"·data-group-id="2557312724-20">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="2557312724-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="9318060228-21">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="9318060228-22">(</span><span·class="p"·data-group-id="9318060228-22">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·53460c12eaef77da69c2b06873b492b8e595ceb183eb6ca9b0c9e053ff1d86da·...·]-21">)</span><span·class="p">,</span><span·class="w">206 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="2557312724-21">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2557312724-22">(</span><span·class="p"·data-group-id="2557312724-22">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·46ade75ddc26abae5dabf5fa5c65d03130dfaaa74f353e169f122702634f2438·...·]-21">)</span><span·class="p">,</span><span·class="w">
207 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="9318060228-23">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="9318060228-23">)</span><span·class="p">,</span><span·class="w">207 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="2557312724-23">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="2557312724-23">)</span><span·class="p">,</span><span·class="w">
208 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="9318060228-24">(</span><span·class="p"·data-group-id="9318060228-25">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="9318060228-25">}</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·389,·SHA:·096c7df98eba1c7acf26e5dbf589b9af6e956d833a679222161825f22d46d6f8·...·]-24">)</span><span·class="p">,</span><span·class="w">208 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="2557312724-24">(</span><span·class="p"·data-group-id="2557312724-25">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="2557312724-25">}</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·389,·SHA:·87601cc473cf7cc0f94ff9b3c7676e97f2c83505e02f24525915faef1f5f51f2·...·]-24">)</span><span·class="p">,</span><span·class="w">
209 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="9318060228-28">(</span><span·class="n">Port</span><span·class="p"·data-group-id="9318060228-28">)</span><span·class="p">.</span><span·class="w">209 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="2557312724-28">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2557312724-28">)</span><span·class="p">.</span><span·class="w">
  
210 </span><span·class="nf">loop</span><span·class="p"·data-group-id="9318060228-29">(</span><span·class="n">Port</span><span·class="p"·data-group-id="9318060228-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">210 </span><span·class="nf">loop</span><span·class="p"·data-group-id="2557312724-29">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2557312724-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
211 ····</span><span·class="k">receive</span><span·class="w">211 ····</span><span·class="k">receive</span><span·class="w">
212 »       </span><span·class="p"·data-group-id="9318060228-30">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="9318060228-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">212 »       </span><span·class="p"·data-group-id="2557312724-30">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="2557312724-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
213 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-31">{</span><span·class="nf">self</span><span·class="p"·data-group-id="9318060228-32">(</span><span·class="p"·data-group-id="9318060228-32">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-33">{</[·...·truncated·by·diffoscope;·len:·343,·SHA:·5d5f0733c6e7917ce8850c7a7223bc5c7a7c1577be4a7989399830c2aef10055·...·]-31">}</span><span·class="p">,</span><span·class="w">213 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-31">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2557312724-32">(</span><span·class="p"·data-group-id="2557312724-32">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-33">{</[·...·truncated·by·diffoscope;·len:·343,·SHA:·ca3bcea8a41f442141da23281beff727130087e4194421e42f664f1f9d137a4b·...·]-31">}</span><span·class="p">,</span><span·class="w">
214 »       ····</span><span·class="k">receive</span><span·class="w">214 »       ····</span><span·class="k">receive</span><span·class="w">
215 »       »       </span><span·class="p"·data-group-id="9318060228-35">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-36">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·eece04bc68fc83793f1ea411ead927cc9a623f943a735e2e70bf3e550dbf95dd·...·]-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">215 »       »       </span><span·class="p"·data-group-id="2557312724-35">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-36">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·8d257393c5298c6d02c6f8551a17e6fa08867f9b0242a3674b6cf02b4e06a408·...·]-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
216 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-37">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="9318060228-38">(</span><span·class="n">Data</span><span·class="p"·data-group-id="9318060228-3[·...·truncated·by·diffoscope;·len:·52,·SHA:·1bf81aacdcdecd5cb001dcac35778b84e88826de7d9c69e6051331b6e6505b75·...·]-37">}</span><span·class="w">216 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-37">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="2557312724-38">(</span><span·class="n">Data</span><span·class="p"·data-group-id="2557312724-3[·...·truncated·by·diffoscope;·len:·52,·SHA:·bdd34290e444616f2aca235a7e40de911115642a69095ccfd0a300948727567f·...·]-37">}</span><span·class="w">
217 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">217 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
218 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="9318060228-39">(</span><span·class="n">Port</span><span·class="p"·data-group-id="9318060228-39">)</span><span·class="p">;</span><span·class="w">218 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="2557312724-39">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2557312724-39">)</span><span·class="p">;</span><span·class="w">
219 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="9318060228-40">{</span><span·class="nf">self</span><span·class="p"·data-group-id="9318060228-41">(</span><span·class="p"·data-group-id="9318060228-41">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·729d2d346e76ac63ce5e98a7acf4d1a82d0eb268f3fe8c8bbfe49f8b5e7a2dd0·...·]-40">}</span><span·class="p">,</span><span·class="w">220 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2557312724-40">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2557312724-41">(</span><span·class="p"·data-group-id="2557312724-41">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·1425a7d0efdd41ba6cbce71a0c39504c339ef1d138ab26ebfa68fc03a95bacc0·...·]-40">}</span><span·class="p">,</span><span·class="w">
221 »       ····</span><span·class="k">receive</span><span·class="w">221 »       ····</span><span·class="k">receive</span><span·class="w">
222 »       »       </span><span·class="p"·data-group-id="9318060228-42">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="9318060228-42">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 »       »       </span><span·class="p"·data-group-id="2557312724-42">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="2557312724-42">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="9318060228-43">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="9318060228-43">)</span><span·class="w">223 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="2557312724-43">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="2557312724-43">)</span><span·class="w">
224 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">224 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
225 »       </span><span·class="p"·data-group-id="9318060228-44">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="9318060228-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">225 »       </span><span·class="p"·data-group-id="2557312724-44">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="2557312724-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
226 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="9318060228-45">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="9318060228-45">)</span><span·class="w">226 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="2557312724-45">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="2557312724-45">)</span><span·class="w">
227 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">227 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
228 </span><span·class="nf">encode</span><span·class="p"·data-group-id="9318060228-46">(</span><span·class="p"·data-group-id="9318060228-47">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="9318060228-47">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·adeab7d4d1ae9f49b3a4c6f277847b3df02555abcb30540dc45d08f9a3618d22·...·]-48">]</span><span·class="p">;</span><span·class="w">228 </span><span·class="nf">encode</span><span·class="p"·data-group-id="2557312724-46">(</span><span·class="p"·data-group-id="2557312724-47">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="2557312724-47">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·ad503606976fc4e661b990fceb4ecaffbe8079650a75010329a7e9779c5bd3b8·...·]-48">]</span><span·class="p">;</span><span·class="w">
229 </span><span·class="nf">encode</span><span·class="p"·data-group-id="9318060228-49">(</span><span·class="p"·data-group-id="9318060228-50">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="9318060228-50">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·498d398b0d8496b8b9fe011e2a103b8104e2da2f43bb3e177a057836b9bc02b3·...·]-51">]</span><span·class="p">.</span><span·class="w">229 </span><span·class="nf">encode</span><span·class="p"·data-group-id="2557312724-49">(</span><span·class="p"·data-group-id="2557312724-50">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="2557312724-50">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·393b65a4776fd903462e916676861742d30260df4f62826aea4498768604b7d2·...·]-51">]</span><span·class="p">.</span><span·class="w">
  
230 </span><span·class="nf">decode</span><span·class="p"·data-group-id="9318060228-52">(</span><span·class="p"·data-group-id="9318060228-53">[</span><span·class="n">Int</span><span·class="p"·data-group-id="9318060228-53">]</span><span·class="p"·data-group-id="9318060228-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><h2·id="c-program"·class="section-heading">230 </span><span·class="nf">decode</span><span·class="p"·data-group-id="2557312724-52">(</span><span·class="p"·data-group-id="2557312724-53">[</span><span·class="n">Int</span><span·class="p"·data-group-id="2557312724-53">]</span><span·class="p"·data-group-id="2557312724-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><h2·id="c-program"·class="section-heading">
231 ··<a·href="#c-program"·class="hover-link">231 ··<a·href="#c-program"·class="hover-link">
232 ····<i·class="ri-link-m"·aria-hidden="true"></i>232 ····<i·class="ri-link-m"·aria-hidden="true"></i>
233 ··</a>233 ··</a>
234 ··<span·class="text">C·Program</span>234 ··<span·class="text">C·Program</span>
235 </h2>235 </h2>
236 <p>On·the·C·side,·it·is·necessary·to·write·functions·for·receiving·and·sending·data236 <p>On·the·C·side,·it·is·necessary·to·write·functions·for·receiving·and·sending·data
237 with·2·byte·length·indicators·from/to·Erlang.·By·default,·the·C·program·is·to237 with·2·byte·length·indicators·from/to·Erlang.·By·default,·the·C·program·is·to
Offset 333, 25 lines modifiedOffset 333, 25 lines modified
333 and·terminates.</p><h2·id="running-the-example"·class="section-heading">333 and·terminates.</p><h2·id="running-the-example"·class="section-heading">
334 ··<a·href="#running-the-example"·class="hover-link">334 ··<a·href="#running-the-example"·class="hover-link">
335 ····<i·class="ri-link-m"·aria-hidden="true"></i>335 ····<i·class="ri-link-m"·aria-hidden="true"></i>
336 ··</a>336 ··</a>
337 ··<span·class="text">Running·the·Example</span>337 ··<span·class="text">Running·the·Example</span>
338 </h2>338 </h2>
339 <p><em>Step·1.</em>·Compile·the·C·code:</p><pre><code·class="text">$·gcc·-o·extprg·complex.c·erl_comm.c·port.c</code></pre><p><em>Step·2.</em>·Start·Erlang·and·compile·the·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">339 <p><em>Step·1.</em>·Compile·the·C·code:</p><pre><code·class="text">$·gcc·-o·extprg·complex.c·erl_comm.c·port.c</code></pre><p><em>Step·2.</em>·Start·Erlang·and·compile·the·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">
340 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="p"·data-group-id="7238223062-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">14.2</span><span·class="p"·data-group-id="7238223062-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="7238223062-2">[</span><span·class="ss">source</[·...·truncated·by·diffoscope;·len:·1282,·SHA:·d23251cefeb59b85212138d57b16919b380ad824ad9b194c3b5033c33f818b54·...·]-7">]</span><span·class="w">340 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="p"·data-group-id="7318394593-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">14.2</span><span·class="p"·data-group-id="7318394593-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="7318394593-2">[</span><span·class="ss">source</[·...·truncated·by·diffoscope;·len:·1282,·SHA:·42b3027d40ebf4f13778953ecddc91c4a2d09707b37c58588866b4e0a474a66e·...·]-7">]</span><span·class="w">
  
341 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V14</span><span·class="p">.</span><span·class="mi">2</span><span·class="w">·</span><span·class="p"·data-group-id="7238223062-8">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><spa[·...·truncated·by·diffoscope;·len:·398,·SHA:·baa00077df7b26e4db7750bce1ee1a1498440aed6823ee079aedfb70c5adacaf·...·]-8">)</span><span·class="gp·unselectable">341 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V14</span><span·class="p">.</span><span·class="mi">2</span><span·class="w">·</span><span·class="p"·data-group-id="7318394593-8">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><spa[·...·truncated·by·diffoscope;·len:·398,·SHA:·34058b250931081c54047d6f7a81b912e523478412d0c97ffa723bc0ef9d4ee7·...·]-8">)</span><span·class="gp·unselectable">
342 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="7238223062-10">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="7238223062-10">)</span><span·class="p">.</span><span·class="w">342 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="7318394593-10">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="7318394593-10">)</span><span·class="p">.</span><span·class="w">
343 </span><span·class="p"·data-group-id="7238223062-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">complex1</span><span·class="p"·data-group-id="7238223062-11">}</span></code></pre><p><em>Step·3.</em>·Run·the·example:</p><pre><code·class="makeup·erlang"·translate="n[·...·truncated·by·diffoscope;·len:·268,·SHA:·ef34f29031f754a8de03d4664592c71046621a361c1bd2b93aedd8b415e534ad·...·]-1">)</span><span·class="p">.</span><span·class="w">343 </span><span·class="p"·data-group-id="7318394593-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">complex1</span><span·class="p"·data-group-id="7318394593-11">}</span></code></pre><p><em>Step·3.</em>·Run·the·example:</p><pre><code·class="makeup·erlang"·translate="n[·...·truncated·by·diffoscope;·len:·268,·SHA:·3dfe467ad7a75c02422464998ed4a7d19a111e8989f61cbaadd1e035650d0f38·...·]-1">)</span><span·class="p">.</span><span·class="w">
344 </span><span·class="o">&lt;</span><span·class="mf">0.34</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">344 </span><span·class="o">&lt;</span><span·class="mf">0.34</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
345 3&gt;·</span><span·class="nc">complex1</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="9310554279-2">(</span><span·class="mi">3</span><span·class="p"·data-group-id="9310554279-2">)</span><span·class="p">.</span><span·class="w">345 3&gt;·</span><span·class="nc">complex1</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="8537533636-2">(</span><span·class="mi">3</span><span·class="p"·data-group-id="8537533636-2">)</span><span·class="p">.</span><span·class="w">
346 </span><span·class="mi">4</span><span·class="gp·unselectable">346 </span><span·class="mi">4</span><span·class="gp·unselectable">
347 4&gt;·</span><span·class="nc">complex1</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="9310554279-3">(</span><span·class="mi">5</span><span·class="p"·data-group-id="9310554279-3">)</span><span·class="p">.</span><span·class="w">347 4&gt;·</span><span·class="nc">complex1</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="8537533636-3">(</span><span·class="mi">5</span><span·class="p"·data-group-id="8537533636-3">)</span><span·class="p">.</span><span·class="w">
348 </span><span·class="mi">10</span><span·class="gp·unselectable">348 </span><span·class="mi">10</span><span·class="gp·unselectable">
349 5&gt;·</span><span·class="nc">complex1</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="9310554279-4">(</span><span·class="p"·data-group-id="9310554279-4">)</span><span·class="p">.</span><span·class="w">349 5&gt;·</span><span·class="nc">complex1</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="8537533636-4">(</span><span·class="p"·data-group-id="8537533636-4">)</span><span·class="p">.</span><span·class="w">
350 </span><span·class="ss">stop</span></code></pre>350 </span><span·class="ss">stop</span></code></pre>
351 </div>351 </div>
  
352 <div·class="bottom-actions"·id="bottom-actions">352 <div·class="bottom-actions"·id="bottom-actions">
353 ··<div·class="bottom-actions-item">353 ··<div·class="bottom-actions-item">
  
Max diff block lines reached; 0/60004 bytes (0.00%) of diff not shown.
63.7 KB
./usr/share/doc/erlang-doc/html/doc/system/c_portdriver.html
    
Offset 151, 112 lines modifiedOffset 151, 112 lines modified
151 <p>Like·a·port·program,·the·port·communicates·with·an·Erlang·process.·All151 <p>Like·a·port·program,·the·port·communicates·with·an·Erlang·process.·All
152 communication·goes·through·one·Erlang·process·that·is·the·<em>connected·process</em>·of152 communication·goes·through·one·Erlang·process·that·is·the·<em>connected·process</em>·of
153 the·port·driver.·Terminating·this·process·closes·the·port·driver.</p><p>Before·the·port·is·created,·the·driver·must·be·loaded.·This·is·done·with·the153 the·port·driver.·Terminating·this·process·closes·the·port·driver.</p><p>Before·the·port·is·created,·the·driver·must·be·loaded.·This·is·done·with·the
154 function·<a·href="../../lib/kernel-10.0.1/doc/html/erl_ddll.html#load_driver/2"><code·class="inline">erl_ddll:load_driver/2</code></a>,·with·the·name·of·the·shared·library·as154 function·<a·href="../../lib/kernel-10.0.1/doc/html/erl_ddll.html#load_driver/2"><code·class="inline">erl_ddll:load_driver/2</code></a>,·with·the·name·of·the·shared·library·as
155 argument.</p><p>The·port·is·then·created·using·the·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>,·with·the155 argument.</p><p>The·port·is·then·created·using·the·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>,·with·the
156 tuple·<code·class="inline">{spawn,·DriverName}</code>·as·the·first·argument.·The·string·<code·class="inline">SharedLib</code>·is·the156 tuple·<code·class="inline">{spawn,·DriverName}</code>·as·the·first·argument.·The·string·<code·class="inline">SharedLib</code>·is·the
157 name·of·the·port·driver.·The·second·argument·is·a·list·of·options,·none·in·this157 name·of·the·port·driver.·The·second·argument·is·a·list·of·options,·none·in·this
158 case:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3945066035-1">(</span><span·class="ss">complex5</span><span·class="p"·data-group-id="3945066035-1">)</span><span·class="p">.</span><span·class="w">158 case:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6964114789-1">(</span><span·class="ss">complex5</span><span·class="p"·data-group-id="6964114789-1">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3945066035-2">(</span><span·class="p"·data-group-id="3945066035-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·0238ded65f09a9e46ee4278a2284df9f831a5578234e532fc113a65aae0d64a7·...·]-2">)</span><span·class="p">.</span><span·class="w">159 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6964114789-2">(</span><span·class="p"·data-group-id="6964114789-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·aceb3b24a643c009f7477265da3ca9c03981dd9d469b84d0affe1ecdb17dff55·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
160 </span><span·class="nf">start</span><span·class="p"·data-group-id="3945066035-4">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="3945066035-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">160 </span><span·class="nf">start</span><span·class="p"·data-group-id="6964114789-4">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="6964114789-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
161 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="3945066035-5">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="3945066035-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">161 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="6964114789-5">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="6964114789-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
162 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">162 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
163 ········</span><span·class="p"·data-group-id="3945066035-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="3945066035-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">163 ········</span><span·class="p"·data-group-id="6964114789-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="6964114789-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
164 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="3945066035-7">(</span><span·class="p"·data-group-id="3945066035-8">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">could_not_load_driver</span><span·class="p"·data-group-id="3945066035-8">}</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·b3852cb3313a2993c15d371da93577e132648f494ce1a8e187d094fa3413483d·...·]-7">)</span><span·class="w">164 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="6964114789-7">(</span><span·class="p"·data-group-id="6964114789-8">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">could_not_load_driver</span><span·class="p"·data-group-id="6964114789-8">}</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·e93692a54da5041ade6b187d237332bf1961b50aceb0e2f7107e94e6074b76b9·...·]-7">)</span><span·class="w">
165 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">165 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
166 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3945066035-9">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3945066035-10">[</span><sp[·...·truncated·by·diffoscope;·len:·124,·SHA:·89741ac4ec636f838b152cb9f81d35917785f2d9e1e3ca819b1d5f0b38c88818·...·]-9">)</span><span·class="p">.</span><span·class="w">166 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6964114789-9">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6964114789-10">[</span><sp[·...·truncated·by·diffoscope;·len:·124,·SHA:·7198efe495f9705d0289fe96293556e4f46baede54728c616d077a94bd410e70·...·]-9">)</span><span·class="p">.</span><span·class="w">
  
167 </span><span·class="nf">init</span><span·class="p"·data-group-id="3945066035-11">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="3945066035-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 </span><span·class="nf">init</span><span·class="p"·data-group-id="6964114789-11">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="6964114789-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ··</span><span·class="nf">register</span><span·class="p"·data-group-id="3945066035-12">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3945066035-13">(</span><span·class="p"·data-group-id="3945066035-13">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·7061c37446db10c326e29d75656fe95eb358948929c178796adb3fc109282470·...·]-12">)</span><span·class="p">,</span><span·class="w">168 ··</span><span·class="nf">register</span><span·class="p"·data-group-id="6964114789-12">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="6964114789-13">(</span><span·class="p"·data-group-id="6964114789-13">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·80908c81dbc30edaa8670b4cb101c54827ba624bf1d4c2cb5343cef834191d9c·...·]-12">)</span><span·class="p">,</span><span·class="w">
169 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="3945066035-14">(</span><span·class="p"·data-group-id="3945066035-15">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="3945066035-15">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·181,·SHA:·e285f1498f6736a06a8952f6b0a0111517bcbe48a50b8871260ca09767f9885d·...·]-14">)</span><span·class="p">,</span><span·class="w">169 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="6964114789-14">(</span><span·class="p"·data-group-id="6964114789-15">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="6964114789-15">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·181,·SHA:·ba8010f3026a8b7c31ccde60bf5ec0e9497e8029768bfe3cb80a295bb25e7b11·...·]-14">)</span><span·class="p">,</span><span·class="w">
170 ··</span><span·class="nf">loop</span><span·class="p"·data-group-id="3945066035-17">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3945066035-17">)</span><span·class="p">.</span></code></pre><p>Now·<code·class="inline">complex5:foo/1</code>·and·<code·class="inline">complex5:bar/1</code>·can·be·implemented.·Both·send·a170 ··</span><span·class="nf">loop</span><span·class="p"·data-group-id="6964114789-17">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6964114789-17">)</span><span·class="p">.</span></code></pre><p>Now·<code·class="inline">complex5:foo/1</code>·and·<code·class="inline">complex5:bar/1</code>·can·be·implemented.·Both·send·a
171 message·to·the·<code·class="inline">complex</code>·process·and·receive·the·following·reply:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="0611114093-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="0611114093-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 message·to·the·<code·class="inline">complex</code>·process·and·receive·the·following·reply:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="0086077058-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="0086077058-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="0611114093-2">(</span><span·class="p"·data-group-id="0611114093-3">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="0611114093-3">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·5d0230dde825e1d133c08d157603758e09013d4aa0060eb85eef98a98a684805·...·]-2">)</span><span·class="p">.</span><span·class="w">172 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="0086077058-2">(</span><span·class="p"·data-group-id="0086077058-3">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="0086077058-3">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·23e7e8574970468628749402e2a591c955b2e7450fa51141ba2527f724c79322·...·]-2">)</span><span·class="p">.</span><span·class="w">
173 </span><span·class="nf">bar</span><span·class="p"·data-group-id="0611114093-4">(</span><span·class="n">Y</span><span·class="p"·data-group-id="0611114093-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">bar</span><span·class="p"·data-group-id="0086077058-4">(</span><span·class="n">Y</span><span·class="p"·data-group-id="0086077058-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="0611114093-5">(</span><span·class="p"·data-group-id="0611114093-6">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="0611114093-6">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·5d0230dde825e1d133c08d157603758e09013d4aa0060eb85eef98a98a684805·...·]-5">)</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="0086077058-5">(</span><span·class="p"·data-group-id="0086077058-6">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="0086077058-6">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·23e7e8574970468628749402e2a591c955b2e7450fa51141ba2527f724c79322·...·]-5">)</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="0611114093-7">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="0611114093-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="0086077058-7">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="0086077058-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0611114093-8">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="0611114093-9">(</span><span·class="p"·data-group-id="0611114093-9">)</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·90,·SHA:·e0f614d007643525c81fc6ef7f1822293ba9e6d23948cbd0251629fc3b3f193d·...·]-8">}</span><span·class="p">,</span><span·class="w">176 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0086077058-8">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="0086077058-9">(</span><span·class="p"·data-group-id="0086077058-9">)</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·90,·SHA:·2426b8ddf7cc6178bccc15fc6b950878838c4eee7f7282dcb21e84adf643c011·...·]-8">}</span><span·class="p">,</span><span·class="w">
177 ····</span><span·class="k">receive</span><span·class="w">177 ····</span><span·class="k">receive</span><span·class="w">
178 ········</span><span·class="p"·data-group-id="0611114093-10">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="0611114093-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 ········</span><span·class="p"·data-group-id="0086077058-10">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="0086077058-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ············</span><span·class="n">Result</span><span·class="w">179 ············</span><span·class="n">Result</span><span·class="w">
180 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">complex</code>·process·performs·the·following:</p><ul><li>Encodes·the·message·into·a·sequence·of·bytes.</li><li>Sends·it·to·the·port.</li><li>Waits·for·a·reply.</li><li>Decodes·the·reply.</li><li>Sends·it·back·to·the·caller:</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="7830266479-1">(</span><span·class="n">Port</span><span·class="p"·data-group-id="7830266479-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">complex</code>·process·performs·the·following:</p><ul><li>Encodes·the·message·into·a·sequence·of·bytes.</li><li>Sends·it·to·the·port.</li><li>Waits·for·a·reply.</li><li>Decodes·the·reply.</li><li>Sends·it·back·to·the·caller:</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="5052808820-1">(</span><span·class="n">Port</span><span·class="p"·data-group-id="5052808820-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ····</span><span·class="k">receive</span><span·class="w">181 ····</span><span·class="k">receive</span><span·class="w">
182 ········</span><span·class="p"·data-group-id="7830266479-2">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7830266479-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 ········</span><span·class="p"·data-group-id="5052808820-2">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="5052808820-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ············</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7830266479-3">{</span><span·class="nf">self</span><span·class="p"·data-group-id="7830266479-4">(</span><span·class="p"·data-group-id="7830266479-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7830266479-5">{</span[·...·truncated·by·diffoscope;·len:·336,·SHA:·441b76bad078ae748ee946b77ad22117206029008ae262ab711640577d6567bc·...·]-3">}</span><span·class="p">,</span><span·class="w">183 ············</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5052808820-3">{</span><span·class="nf">self</span><span·class="p"·data-group-id="5052808820-4">(</span><span·class="p"·data-group-id="5052808820-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5052808820-5">{</span[·...·truncated·by·diffoscope;·len:·336,·SHA:·f0ed6b99d710bcabe5ab4542c78fda6667d70f65fefb48331e9a6d09ad76bed3·...·]-3">}</span><span·class="p">,</span><span·class="w">
184 ············</span><span·class="k">receive</span><span·class="w">184 ············</span><span·class="k">receive</span><span·class="w">
185 ················</span><span·class="p"·data-group-id="7830266479-7">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7830266479-8">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·4f0df83b744b32e7df26298dc9589e19cf6dcac9808d703892707ce9c6dcbc49·...·]-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">185 ················</span><span·class="p"·data-group-id="5052808820-7">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5052808820-8">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·069c1d8fabb54e9ab80e8fac19eaf26e1a24c6e87ab32ef755a6c0e9d19560a6·...·]-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
186 ····················</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7830266479-9">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="7830266479-10">(</span><span·class="n">Data</span><span·class="p"·data-group-id="7830266479-10[·...·truncated·by·diffoscope;·len:·51,·SHA:·df7b4bed302ab1b4c020491e853ae5598edb42384ed35ce9fbf95c9a97dd930e·...·]-9">}</span><span·class="w">186 ····················</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5052808820-9">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="5052808820-10">(</span><span·class="n">Data</span><span·class="p"·data-group-id="5052808820-10[·...·truncated·by·diffoscope;·len:·51,·SHA:·ce3b5a2c62f81b1d11bc625bfebf2f17adde99d33c27e55005b189d8a61fa616·...·]-9">}</span><span·class="w">
187 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">187 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
188 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="7830266479-11">(</span><span·class="n">Port</span><span·class="p"·data-group-id="7830266479-11">)</span><span·class="w">188 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="5052808820-11">(</span><span·class="n">Port</span><span·class="p"·data-group-id="5052808820-11">)</span><span·class="w">
189 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Assuming·that·both·the·arguments·and·the·results·from·the·C·functions·are·less189 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Assuming·that·both·the·arguments·and·the·results·from·the·C·functions·are·less
190 than·256,·a·simple·encoding/decoding·scheme·is·employed.·In·this·scheme,·<code·class="inline">foo</code>190 than·256,·a·simple·encoding/decoding·scheme·is·employed.·In·this·scheme,·<code·class="inline">foo</code>
191 is·represented·by·byte·1,·<code·class="inline">bar</code>·is·represented·by·2,·and·the·argument/result·is191 is·represented·by·byte·1,·<code·class="inline">bar</code>·is·represented·by·2,·and·the·argument/result·is
192 represented·by·a·single·byte·as·well:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">encode</span><span·class="p"·data-group-id="9726310152-1">(</span><span·class="p"·data-group-id="9726310152-2">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="9726310152-2">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·5ef9ddeda17e4040f692fddbcc721838c78cfc65fbe7301b3b225f08d99cbffc·...·]-3">]</span><span·class="p">;</span><span·class="w">192 represented·by·a·single·byte·as·well:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">encode</span><span·class="p"·data-group-id="6153013394-1">(</span><span·class="p"·data-group-id="6153013394-2">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="6153013394-2">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·08ef80957391c48930fa36958297a97d73f4d4203985285bc74f34c6ba1f5200·...·]-3">]</span><span·class="p">;</span><span·class="w">
193 </span><span·class="nf">encode</span><span·class="p"·data-group-id="9726310152-4">(</span><span·class="p"·data-group-id="9726310152-5">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="9726310152-5">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·688c4803bede409a97eaa848582cd97add8b76af35164cc151553866408e24b3·...·]-6">]</span><span·class="p">.</span><span·class="w">193 </span><span·class="nf">encode</span><span·class="p"·data-group-id="6153013394-4">(</span><span·class="p"·data-group-id="6153013394-5">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="6153013394-5">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·291,·SHA:·44f51ffecfe7096826f333a77d4f441d7870ee2da68f5ca745d2f0be9f96ecde·...·]-6">]</span><span·class="p">.</span><span·class="w">
  
194 </span><span·class="nf">decode</span><span·class="p"·data-group-id="9726310152-7">(</span><span·class="p"·data-group-id="9726310152-8">[</span><span·class="n">Int</span><span·class="p"·data-group-id="9726310152-8">]</span><span·class="p"·data-group-id="9726310152-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><p>The·resulting·Erlang·program,·including·functions·for·stopping·the·port·and194 </span><span·class="nf">decode</span><span·class="p"·data-group-id="6153013394-7">(</span><span·class="p"·data-group-id="6153013394-8">[</span><span·class="n">Int</span><span·class="p"·data-group-id="6153013394-8">]</span><span·class="p"·data-group-id="6153013394-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><p>The·resulting·Erlang·program,·including·functions·for·stopping·the·port·and
195 detecting·port·failures,·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">195 detecting·port·failures,·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
196 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5914476542-1">(</span><span·class="ss">complex5</span><span·class="p"·data-group-id="5914476542-1">)</span><span·class="p">.</span><span·class="w">196 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2165877494-1">(</span><span·class="ss">complex5</span><span·class="p"·data-group-id="2165877494-1">)</span><span·class="p">.</span><span·class="w">
197 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5914476542-2">(</span><span·class="p"·data-group-id="5914476542-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·66b04e795407411fddcc84e190687efd1382d5983ae6361651f287486a739c02·...·]-2">)</span><span·class="p">.</span><span·class="w">197 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2165877494-2">(</span><span·class="p"·data-group-id="2165877494-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·39e5042cf1bca0b22f5e79e06943613c4e613b5b52f39ad315101b0087348e4c·...·]-2">)</span><span·class="p">.</span><span·class="w">
198 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5914476542-4">(</span><span·class="p"·data-group-id="5914476542-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·a7249dcc617799d186883f2103f7f4cdd805af4dec5f1c3c141c19a61114e196·...·]-4">)</span><span·class="p">.</span><span·class="w">198 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2165877494-4">(</span><span·class="p"·data-group-id="2165877494-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·3e3e7600e79f00ebd19647b80befb8c094ec918951a3cad84f4db7d2efec12b3·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
199 </span><span·class="nf">start</span><span·class="p"·data-group-id="5914476542-6">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="5914476542-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">199 </span><span·class="nf">start</span><span·class="p"·data-group-id="2165877494-6">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="2165877494-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
200 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="5914476542-7">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="5914476542-7">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">200 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="2165877494-7">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="2165877494-7">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
201 »       </span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">201 »       </span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
202 »       </span><span·class="p"·data-group-id="5914476542-8">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="5914476542-8">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">202 »       </span><span·class="p"·data-group-id="2165877494-8">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="2165877494-8">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
203 »       </span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="5914476542-9">(</span><span·class="p"·data-group-id="5914476542-10">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">could_not_load_driver</span><span·class="p"·data-group-id="5914476542-10">}</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·1d3991235d749dd0d4b56d36f2c74d87b8f56cc343262273a480e15aee476099·...·]-9">)</span><span·class="w">203 »       </span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="2165877494-9">(</span><span·class="p"·data-group-id="2165877494-10">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">could_not_load_driver</span><span·class="p"·data-group-id="2165877494-10">}</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·9e8511009547ebf8fbcaa86422d0067c0758b84b81b1a9fd8a167b24995d1976·...·]-9">)</span><span·class="w">
204 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="5914476542-11">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-12">[</span><s[·...·truncated·by·diffoscope;·len:·125,·SHA:·82d33fe1a1130e682b0d8fa92e4b6120d4fb1d1e2661ec38f93a7f3f97347ebf·...·]-11">)</span><span·class="p">.</span><span·class="w">205 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="2165877494-11">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-12">[</span><s[·...·truncated·by·diffoscope;·len:·125,·SHA:·04fdb0a9f3176e0099e9b869a47dcc56d0faebb70f11ff3276916851812ddb73·...·]-11">)</span><span·class="p">.</span><span·class="w">
  
206 </span><span·class="nf">init</span><span·class="p"·data-group-id="5914476542-13">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="5914476542-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">206 </span><span·class="nf">init</span><span·class="p"·data-group-id="2165877494-13">(</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="2165877494-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
207 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="5914476542-14">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="5914476542-15">(</span><span·class="p"·data-group-id="5914476542-15">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·f73a28d3578a0e6567a58666ee57a56c5b7085f60c1c91c15e3b5cbb390d22f5·...·]-14">)</span><span·class="p">,</span><span·class="w">207 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="2165877494-14">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2165877494-15">(</span><span·class="p"·data-group-id="2165877494-15">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·f007c00768a8daf37c5328e0f2778bf510d4f58bb8891cb64836982832880f91·...·]-14">)</span><span·class="p">,</span><span·class="w">
208 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="5914476542-16">(</span><span·class="p"·data-group-id="5914476542-17">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="5914476542-17">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·181,·SHA:·77192f989f9d1bd99674b691021afa661a09ff2c18a70513c9b87184d6ba659e·...·]-16">)</span><span·class="p">,</span><span·class="w">208 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="2165877494-16">(</span><span·class="p"·data-group-id="2165877494-17">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SharedLib</span><span·class="p"·data-group-id="2165877494-17">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·181,·SHA:·a16a37e77f59a1ba77b6d4fb950a908ad2f16717fab35775a7d30a5c9f37fbb5·...·]-16">)</span><span·class="p">,</span><span·class="w">
209 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="5914476542-19">(</span><span·class="n">Port</span><span·class="p"·data-group-id="5914476542-19">)</span><span·class="p">.</span><span·class="w">209 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="2165877494-19">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2165877494-19">)</span><span·class="p">.</span><span·class="w">
  
210 </span><span·class="nf">stop</span><span·class="p"·data-group-id="5914476542-20">(</span><span·class="p"·data-group-id="5914476542-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">210 </span><span·class="nf">stop</span><span·class="p"·data-group-id="2165877494-20">(</span><span·class="p"·data-group-id="2165877494-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
211 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">211 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">
  
212 </span><span·class="nf">foo</span><span·class="p"·data-group-id="5914476542-21">(</span><span·class="n">X</span><span·class="p"·data-group-id="5914476542-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">212 </span><span·class="nf">foo</span><span·class="p"·data-group-id="2165877494-21">(</span><span·class="n">X</span><span·class="p"·data-group-id="2165877494-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
213 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="5914476542-22">(</span><span·class="p"·data-group-id="5914476542-23">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="5914476542-23">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9552d8b2384b6db27b06225b89a33eece81a3f00fe566f4503d48f25f63d6e6a·...·]-22">)</span><span·class="p">.</span><span·class="w">213 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="2165877494-22">(</span><span·class="p"·data-group-id="2165877494-23">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="2165877494-23">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·e05c273b8c208d730ed50dc89ddbfc9805fa3f2a4642402c6137eb10bac8d768·...·]-22">)</span><span·class="p">.</span><span·class="w">
214 </span><span·class="nf">bar</span><span·class="p"·data-group-id="5914476542-24">(</span><span·class="n">Y</span><span·class="p"·data-group-id="5914476542-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 </span><span·class="nf">bar</span><span·class="p"·data-group-id="2165877494-24">(</span><span·class="n">Y</span><span·class="p"·data-group-id="2165877494-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="5914476542-25">(</span><span·class="p"·data-group-id="5914476542-26">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="5914476542-26">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9552d8b2384b6db27b06225b89a33eece81a3f00fe566f4503d48f25f63d6e6a·...·]-25">)</span><span·class="p">.</span><span·class="w">215 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="2165877494-25">(</span><span·class="p"·data-group-id="2165877494-26">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="2165877494-26">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·e05c273b8c208d730ed50dc89ddbfc9805fa3f2a4642402c6137eb10bac8d768·...·]-25">)</span><span·class="p">.</span><span·class="w">
  
216 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="5914476542-27">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="5914476542-27">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="2165877494-27">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="2165877494-27">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-28">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="5914476542-29">(</span><span·class="p"·data-group-id="5914476542-29">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·49f0237bef1b9a2233af93a042f5bbd0c8902e88ef0ff48d5e7800ef696b3210·...·]-28">}</span><span·class="p">,</span><span·class="w">217 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-28">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2165877494-29">(</span><span·class="p"·data-group-id="2165877494-29">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·24f5737b5fc802891fb1834329a5fd93f317521977bd85f11e7ed61b11349bb8·...·]-28">}</span><span·class="p">,</span><span·class="w">
218 ····</span><span·class="k">receive</span><span·class="w">218 ····</span><span·class="k">receive</span><span·class="w">
219 »       </span><span·class="p"·data-group-id="5914476542-30">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="5914476542-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 »       </span><span·class="p"·data-group-id="2165877494-30">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="2165877494-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 »       ····</span><span·class="n">Result</span><span·class="w">220 »       ····</span><span·class="n">Result</span><span·class="w">
221 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">221 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
222 </span><span·class="nf">loop</span><span·class="p"·data-group-id="5914476542-31">(</span><span·class="n">Port</span><span·class="p"·data-group-id="5914476542-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 </span><span·class="nf">loop</span><span·class="p"·data-group-id="2165877494-31">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2165877494-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ····</span><span·class="k">receive</span><span·class="w">223 ····</span><span·class="k">receive</span><span·class="w">
224 »       </span><span·class="p"·data-group-id="5914476542-32">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="5914476542-32">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 »       </span><span·class="p"·data-group-id="2165877494-32">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="2165877494-32">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-33">{</span><span·class="nf">self</span><span·class="p"·data-group-id="5914476542-34">(</span><span·class="p"·data-group-id="5914476542-34">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-35">{</[·...·truncated·by·diffoscope;·len:·343,·SHA:·4db75599457df7d3d0c37c4e434e71e5d148c4917590ecb3a4974b6c3502a122·...·]-33">}</span><span·class="p">,</span><span·class="w">225 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-33">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2165877494-34">(</span><span·class="p"·data-group-id="2165877494-34">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-35">{</[·...·truncated·by·diffoscope;·len:·343,·SHA:·02db290acb4b0aec0e53fb40658f3ab81905c4ee9f7b62a09a325d1d6dd0a1f6·...·]-33">}</span><span·class="p">,</span><span·class="w">
226 »       ····</span><span·class="k">receive</span><span·class="w">226 »       ····</span><span·class="k">receive</span><span·class="w">
227 »       »       </span><span·class="p"·data-group-id="5914476542-37">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-38">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·392ca0bf1da1d3fd0556d2d2411e7f336a9d1bf92cd23a246811566a25061269·...·]-37">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 »       »       </span><span·class="p"·data-group-id="2165877494-37">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-38">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·1fc2d0538c291f60050e618500570ce71732e794d80255fcc88eb882084ac80f·...·]-37">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-39">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="5914476542-40">(</span><span·class="n">Data</span><span·class="p"·data-group-id="5914476542-4[·...·truncated·by·diffoscope;·len:·52,·SHA:·8d63cd1bcae29e31e93cddf65e562d134979ef6ff863b9e91cd4dfa69a806867·...·]-39">}</span><span·class="w">228 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-39">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="2165877494-40">(</span><span·class="n">Data</span><span·class="p"·data-group-id="2165877494-4[·...·truncated·by·diffoscope;·len:·52,·SHA:·45e083070eddfb0eb2e4a217c45a96c68a8872ee63ba65b05a6dfb8c9c2f1c34·...·]-39">}</span><span·class="w">
229 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">229 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
230 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="5914476542-41">(</span><span·class="n">Port</span><span·class="p"·data-group-id="5914476542-41">)</span><span·class="p">;</span><span·class="w">230 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="2165877494-41">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2165877494-41">)</span><span·class="p">;</span><span·class="w">
231 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-42">{</span><span·class="nf">self</span><span·class="p"·data-group-id="5914476542-43">(</span><span·class="p"·data-group-id="5914476542-43">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·9dfcc5dd5bafcd907e48506e763597935e23d34aa5a629fb3217a4bf5568743f·...·]-42">}</span><span·class="p">,</span><span·class="w">232 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-42">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2165877494-43">(</span><span·class="p"·data-group-id="2165877494-43">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·7d6c10acd24740696fa6c21f610114eb90edaa5ef27347b72d6592ec2bbee858·...·]-42">}</span><span·class="p">,</span><span·class="w">
233 »       ····</span><span·class="k">receive</span><span·class="w">233 »       ····</span><span·class="k">receive</span><span·class="w">
234 »       »       </span><span·class="p"·data-group-id="5914476542-44">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="5914476542-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">234 »       »       </span><span·class="p"·data-group-id="2165877494-44">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="2165877494-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
235 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="5914476542-45">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="5914476542-45">)</span><span·class="w">235 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="2165877494-45">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="2165877494-45">)</span><span·class="w">
236 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">236 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
237 »       </span><span·class="p"·data-group-id="5914476542-46">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="5914476542-46">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">237 »       </span><span·class="p"·data-group-id="2165877494-46">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="2165877494-46">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
238 »       ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5914476542-47">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914476542-48">[</sp[·...·truncated·by·diffoscope;·len:·127,·SHA:·81d8e859beb94f90f32d4a3065049e06f56c9da09627b45168962666edfa32d9·...·]-47">)</span><span·class="p">,</span><span·class="w">238 »       ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2165877494-47">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2165877494-48">[</sp[·...·truncated·by·diffoscope;·len:·127,·SHA:·67bb28d86672e846961a63222b769ba5b8ebceae565f4007faf9fd84ebf34094·...·]-47">)</span><span·class="p">,</span><span·class="w">
239 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="5914476542-49">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="5914476542-49">)</span><span·class="w">239 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="2165877494-49">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="2165877494-49">)</span><span·class="w">
240 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">240 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
241 </span><span·class="nf">encode</span><span·class="p"·data-group-id="5914476542-50">(</span><span·class="p"·data-group-id="5914476542-51">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="5914476542-51">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·4f3d30a3c9a75927471fd3ea1ccdd211f09bfc449798c2eada4fab28e06b1888·...·]-52">]</span><span·class="p">;</span><span·class="w">241 </span><span·class="nf">encode</span><span·class="p"·data-group-id="2165877494-50">(</span><span·class="p"·data-group-id="2165877494-51">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="2165877494-51">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·99726345700890927c47ec58878754066b5aa42c82973e9c6efe1a7bbda839a9·...·]-52">]</span><span·class="p">;</span><span·class="w">
242 </span><span·class="nf">encode</span><span·class="p"·data-group-id="5914476542-53">(</span><span·class="p"·data-group-id="5914476542-54">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="5914476542-54">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·14fc9fe7b8dc3884c671421dc5327f04a8400315bb08b32aa304f47715c9d577·...·]-55">]</span><span·class="p">.</span><span·class="w">242 </span><span·class="nf">encode</span><span·class="p"·data-group-id="2165877494-53">(</span><span·class="p"·data-group-id="2165877494-54">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="2165877494-54">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·63506eab3ecf9d530e5d2a73dfede53d389ce0ec714118bc78c69a5c4e81289c·...·]-55">]</span><span·class="p">.</span><span·class="w">
  
243 </span><span·class="nf">decode</span><span·class="p"·data-group-id="5914476542-56">(</span><span·class="p"·data-group-id="5914476542-57">[</span><span·class="n">Int</span><span·class="p"·data-group-id="5914476542-57">]</span><span·class="p"·data-group-id="5914476542-56">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><h2·id="c-driver"·class="section-heading">243 </span><span·class="nf">decode</span><span·class="p"·data-group-id="2165877494-56">(</span><span·class="p"·data-group-id="2165877494-57">[</span><span·class="n">Int</span><span·class="p"·data-group-id="2165877494-57">]</span><span·class="p"·data-group-id="2165877494-56">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><h2·id="c-driver"·class="section-heading">
244 ··<a·href="#c-driver"·class="hover-link">244 ··<a·href="#c-driver"·class="hover-link">
245 ····<i·class="ri-link-m"·aria-hidden="true"></i>245 ····<i·class="ri-link-m"·aria-hidden="true"></i>
246 ··</a>246 ··</a>
247 ··<span·class="text">C·Driver</span>247 ··<span·class="text">C·Driver</span>
248 </h2>248 </h2>
249 <p>The·C·driver·is·a·module·that·is·compiled·and·linked·into·a·shared·library.·It249 <p>The·C·driver·is·a·module·that·is·compiled·and·linked·into·a·shared·library.·It
250 uses·a·driver·structure·and·includes·the·header·file·<code·class="inline">erl_driver.h</code>.</p><p>The·driver·structure·is·filled·with·the·driver·name·and·function·pointers.·It·is250 uses·a·driver·structure·and·includes·the·header·file·<code·class="inline">erl_driver.h</code>.</p><p>The·driver·structure·is·filled·with·the·driver·name·and·function·pointers.·It·is
Offset 347, 25 lines modifiedOffset 347, 25 lines modified
347 ··<a·href="#running-the-example"·class="hover-link">347 ··<a·href="#running-the-example"·class="hover-link">
348 ····<i·class="ri-link-m"·aria-hidden="true"></i>348 ····<i·class="ri-link-m"·aria-hidden="true"></i>
349 ··</a>349 ··</a>
350 ··<span·class="text">Running·the·Example</span>350 ··<span·class="text">Running·the·Example</span>
351 </h2>351 </h2>
352 <p><em>Step·1.</em>·Compile·the·C·code:</p><pre><code·class="text">unix&gt;·gcc·-o·example_drv.so·-fpic·-shared·complex.c·port_driver.c352 <p><em>Step·1.</em>·Compile·the·C·code:</p><pre><code·class="text">unix&gt;·gcc·-o·example_drv.so·-fpic·-shared·complex.c·port_driver.c
353 windows&gt;·cl·-LD·-MD·-Fe·example_drv.dll·complex.c·port_driver.c</code></pre><p><em>Step·2.</em>·Start·Erlang·and·compile·the·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="ss">erl</span><span·class="w">353 windows&gt;·cl·-LD·-MD·-Fe·example_drv.dll·complex.c·port_driver.c</code></pre><p><em>Step·2.</em>·Start·Erlang·and·compile·the·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="ss">erl</span><span·class="w">
354 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="p"·data-group-id="3410962695-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">14.2</span><span·class="p"·data-group-id="3410962695-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="3410962695-2">[</span><span·class="ss">source<[·...·truncated·by·diffoscope;·len:·1283,·SHA:·aefb84f205fae5fe90f211996abc1dd9ec5f23d6b09a33ade2a9c36732366ade·...·]-7">]</span><span·class="w">354 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="p"·data-group-id="5485830008-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">14.2</span><span·class="p"·data-group-id="5485830008-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="5485830008-2">[</span><span·class="ss">source<[·...·truncated·by·diffoscope;·len:·1283,·SHA:·763127f0b2b4ac737a7ff41346b2781ad138613263cc9d0484ab8b5fd8b44dca·...·]-7">]</span><span·class="w">
  
355 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V14</span><span·class="p">.</span><span·class="mi">2</span><span·class="w">·</span><span·class="p"·data-group-id="3410962695-8">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·399,·SHA:·15d4d47bcb1f749fa5ccec74e4834793c1469848b2be15da3c127c195c293fc5·...·]-8">)</span><span·class="gp·unselectable">355 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V14</span><span·class="p">.</span><span·class="mi">2</span><span·class="w">·</span><span·class="p"·data-group-id="5485830008-8">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·399,·SHA:·becde56088751ad11f7f1c2faae4bfa8dc3ed818e24d96d640b1f8e19b7ecc7e·...·]-8">)</span><span·class="gp·unselectable">
356 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="3410962695-10">(</span><span·class="ss">complex5</span><span·class="p"·data-group-id="3410962695-10">)</span><span·class="p">.</span><span·class="w">356 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="5485830008-10">(</span><span·class="ss">complex5</span><span·class="p"·data-group-id="5485830008-10">)</span><span·class="p">.</span><span·class="w">
357 </span><span·class="p"·data-group-id="3410962695-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">complex5</span><span·class="p"·data-group-id="3410962695-11">}</span></code></pre><p><em>Step·3.</em>·Run·the·example:</p><pre><code·class="makeup·erlang"·translate="[·...·truncated·by·diffoscope;·len:·272,·SHA:·732c9a6fe0deaea75350aec845061325f7001aa6cb6fdae278163283a12b285a·...·]-1">)</span><span·class="p">.</span><span·class="w">357 </span><span·class="p"·data-group-id="5485830008-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">complex5</span><span·class="p"·data-group-id="5485830008-11">}</span></code></pre><p><em>Step·3.</em>·Run·the·example:</p><pre><code·class="makeup·erlang"·translate="[·...·truncated·by·diffoscope;·len:·272,·SHA:·f459a5486973d148ed11f834b825282d32ce827aab8973c0d699c1b58e0c8da6·...·]-1">)</span><span·class="p">.</span><span·class="w">
358 </span><span·class="o">&lt;</span><span·class="mf">0.34</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">358 </span><span·class="o">&lt;</span><span·class="mf">0.34</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
359 3&gt;·</span><span·class="nc">complex5</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="9127844514-2">(</span><span·class="mi">3</span><span·class="p"·data-group-id="9127844514-2">)</span><span·class="p">.</span><span·class="w">359 3&gt;·</span><span·class="nc">complex5</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="7165602506-2">(</span><span·class="mi">3</span><span·class="p"·data-group-id="7165602506-2">)</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 1320/65149 bytes (2.03%) of diff not shown.
13.9 KB
./usr/share/doc/erlang-doc/html/doc/system/code_loading.html
    
Offset 122, 16 lines modifiedOffset 122, 16 lines modified
122 ····<i·class="ri-link-m"·aria-hidden="true"></i>122 ····<i·class="ri-link-m"·aria-hidden="true"></i>
123 ··</a>123 ··</a>
124 ··<span·class="text">Compilation</span>124 ··<span·class="text">Compilation</span>
125 </h2>125 </h2>
126 <p>Erlang·programs·must·be·<em>compiled</em>·to·object·code.·The·compiler·can·generate·a126 <p>Erlang·programs·must·be·<em>compiled</em>·to·object·code.·The·compiler·can·generate·a
127 new·file·that·contains·the·object·code.·The·current·abstract·machine,·which·runs127 new·file·that·contains·the·object·code.·The·current·abstract·machine,·which·runs
128 the·object·code,·is·called·BEAM,·therefore·the·object·files·get·the·suffix128 the·object·code,·is·called·BEAM,·therefore·the·object·files·get·the·suffix
129 <code·class="inline">.beam</code>.·The·compiler·can·also·generate·a·binary·which·can·be·loaded·directly.</p><p>The·compiler·is·located·in·the·module·<a·href="../../lib/compiler-8.5.1/doc/html/compile.html"><code·class="inline">compile</code></a>·in·Compiler.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="8597441975-1">(</span><span·class="n">Module</span><span·class="p"·data-group-id="8597441975-1">)</span><span·class="w">129 <code·class="inline">.beam</code>.·The·compiler·can·also·generate·a·binary·which·can·be·loaded·directly.</p><p>The·compiler·is·located·in·the·module·<a·href="../../lib/compiler-8.5.1/doc/html/compile.html"><code·class="inline">compile</code></a>·in·Compiler.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="6712272154-1">(</span><span·class="n">Module</span><span·class="p"·data-group-id="6712272154-1">)</span><span·class="w">
130 </span><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="8597441975-2">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Options</span><span·class="p"·data-group-id="8597441975-2">)</span></code></pre><p>The·Erlang·shell·understands·the·command·<code·class="inline">c(Module)</code>,·which·both·compiles·and130 </span><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="6712272154-2">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Options</span><span·class="p"·data-group-id="6712272154-2">)</span></code></pre><p>The·Erlang·shell·understands·the·command·<code·class="inline">c(Module)</code>,·which·both·compiles·and
131 loads·<code·class="inline">Module</code>.</p><p>There·is·also·a·module·<code·class="inline">make</code>,·which·provides·a·set·of·functions·similar·to·the131 loads·<code·class="inline">Module</code>.</p><p>There·is·also·a·module·<code·class="inline">make</code>,·which·provides·a·set·of·functions·similar·to·the
132 UNIX·type·Make·functions,·see·module·<a·href="../../lib/tools-4.0/doc/html/make.html"><code·class="inline">make</code></a>·in·Tools.</p><p>The·compiler·can·also·be·accessed·from·the·OS·prompt·using·the132 UNIX·type·Make·functions,·see·module·<a·href="../../lib/tools-4.0/doc/html/make.html"><code·class="inline">make</code></a>·in·Tools.</p><p>The·compiler·can·also·be·accessed·from·the·OS·prompt·using·the
133 <a·href="../../erts-15.0.1/doc/html/erl_cmd.html">erl</a>·executable·in·ERTS.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-compile·Module1...ModuleN</span><span·class="w">133 <a·href="../../erts-15.0.1/doc/html/erl_cmd.html">erl</a>·executable·in·ERTS.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-compile·Module1...ModuleN</span><span·class="w">
134 </span><span·class="c1">%·erl·-make</span></code></pre><p>The·<code·class="inline">erlc</code>·program·provides·way·to·compile·modules·from·the·OS134 </span><span·class="c1">%·erl·-make</span></code></pre><p>The·<code·class="inline">erlc</code>·program·provides·way·to·compile·modules·from·the·OS
135 shell,·see·the·<a·href="../../erts-15.0.1/doc/html/erlc_cmd.html">erlc</a>·executable·in·ERTS.·It135 shell,·see·the·<a·href="../../erts-15.0.1/doc/html/erlc_cmd.html">erlc</a>·executable·in·ERTS.·It
136 understands·a·number·of·flags·that·can·be·used·to·define·macros,·add·search136 understands·a·number·of·flags·that·can·be·used·to·define·macros,·add·search
137 paths·for·include·files,·and·more.</p><pre><code·class="text">%·erlc·&lt;flags&gt;·File1.erl...FileN.erl</code></pre><p><a·href=""·id="loading"></a></p><h2·id="code-loading"·class="section-heading">137 paths·for·include·files,·and·more.</p><pre><code·class="text">%·erlc·&lt;flags&gt;·File1.erl...FileN.erl</code></pre><p><a·href=""·id="loading"></a></p><h2·id="code-loading"·class="section-heading">
Offset 156, 54 lines modifiedOffset 156, 54 lines modified
156 When·a·module·is·loaded·into·the·system·for·the·first·time,·the·code·becomes156 When·a·module·is·loaded·into·the·system·for·the·first·time,·the·code·becomes
157 'current'.·If·then·a·new·instance·of·the·module·is·loaded,·the·code·of·the157 'current'.·If·then·a·new·instance·of·the·module·is·loaded,·the·code·of·the
158 previous·instance·becomes·'old'·and·the·new·instance·becomes·'current'.</p><p>Both·old·and·current·code·is·valid,·and·can·be·evaluated·concurrently.·Fully158 previous·instance·becomes·'old'·and·the·new·instance·becomes·'current'.</p><p>Both·old·and·current·code·is·valid,·and·can·be·evaluated·concurrently.·Fully
159 qualified·function·calls·always·refer·to·current·code.·Old·code·can·still·be159 qualified·function·calls·always·refer·to·current·code.·Old·code·can·still·be
160 evaluated·because·of·processes·lingering·in·the·old·code.</p><p>If·a·third·instance·of·the·module·is·loaded,·the·code·server·removes·(purges)160 evaluated·because·of·processes·lingering·in·the·old·code.</p><p>If·a·third·instance·of·the·module·is·loaded,·the·code·server·removes·(purges)
161 the·old·code·and·any·processes·lingering·in·it·is·terminated.·Then·the·third161 the·old·code·and·any·processes·lingering·in·it·is·terminated.·Then·the·third
162 instance·becomes·'current'·and·the·previously·current·code·becomes·'old'.</p><p>To·change·from·old·code·to·current·code,·a·process·must·make·a·fully·qualified162 instance·becomes·'current'·and·the·previously·current·code·becomes·'old'.</p><p>To·change·from·old·code·to·current·code,·a·process·must·make·a·fully·qualified
163 function·call.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4608735372-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="4608735372-1">)</span><span·class="p">.</span><span·class="w">163 function·call.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0003718893-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="0003718893-1">)</span><span·class="p">.</span><span·class="w">
164 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4608735372-2">(</span><span·class="p"·data-group-id="4608735372-3">[</span><span·class="ss">loop</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4608735372-3">]</span><span·class="p"·data-group-id="4608735372-2">)</span><span·class="p">.</span><span·class="w">164 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0003718893-2">(</span><span·class="p"·data-group-id="0003718893-3">[</span><span·class="ss">loop</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0003718893-3">]</span><span·class="p"·data-group-id="0003718893-2">)</span><span·class="p">.</span><span·class="w">
  
165 </span><span·class="nf">loop</span><span·class="p"·data-group-id="4608735372-4">(</span><span·class="p"·data-group-id="4608735372-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">165 </span><span·class="nf">loop</span><span·class="p"·data-group-id="0003718893-4">(</span><span·class="p"·data-group-id="0003718893-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
166 ····</span><span·class="k">receive</span><span·class="w">166 ····</span><span·class="k">receive</span><span·class="w">
167 ········</span><span·class="ss">code_switch</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 ········</span><span·class="ss">code_switch</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ············</span><span·class="nc">m</span><span·class="p">:</span><span·class="nf">loop</span><span·class="p"·data-group-id="4608735372-5">(</span><span·class="p"·data-group-id="4608735372-5">)</span><span·class="p">;</span><span·class="w">168 ············</span><span·class="nc">m</span><span·class="p">:</span><span·class="nf">loop</span><span·class="p"·data-group-id="0003718893-5">(</span><span·class="p"·data-group-id="0003718893-5">)</span><span·class="p">;</span><span·class="w">
169 ········</span><span·class="n">Msg</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 ········</span><span·class="n">Msg</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">170 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
171 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4608735372-6">(</span><span·class="p"·data-group-id="4608735372-6">)</span><span·class="w">171 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="0003718893-6">(</span><span·class="p"·data-group-id="0003718893-6">)</span><span·class="w">
172 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>To·make·the·process·change·code,·send·the·message·<code·class="inline">code_switch</code>·to·it.·The172 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>To·make·the·process·change·code,·send·the·message·<code·class="inline">code_switch</code>·to·it.·The
173 process·then·makes·a·fully·qualified·call·to·<code·class="inline">m:loop()</code>·and·changes·to·current173 process·then·makes·a·fully·qualified·call·to·<code·class="inline">m:loop()</code>·and·changes·to·current
174 code.·Notice·that·<code·class="inline">m:loop/0</code>·must·be·exported.</p><p>For·code·replacement·of·funs·to·work,·use·the·syntax174 code.·Notice·that·<code·class="inline">m:loop/0</code>·must·be·exported.</p><p>For·code·replacement·of·funs·to·work,·use·the·syntax
175 <code·class="inline">fun·Module:FunctionName/Arity</code>.</p><p><a·href=""·id="on_load"></a></p><h2·id="running-a-function-when-a-module-is-loaded"·class="section-heading">175 <code·class="inline">fun·Module:FunctionName/Arity</code>.</p><p><a·href=""·id="on_load"></a></p><h2·id="running-a-function-when-a-module-is-loaded"·class="section-heading">
176 ··<a·href="#running-a-function-when-a-module-is-loaded"·class="hover-link">176 ··<a·href="#running-a-function-when-a-module-is-loaded"·class="hover-link">
177 ····<i·class="ri-link-m"·aria-hidden="true"></i>177 ····<i·class="ri-link-m"·aria-hidden="true"></i>
178 ··</a>178 ··</a>
179 ··<span·class="text">Running·a·Function·When·a·Module·is·Loaded</span>179 ··<span·class="text">Running·a·Function·When·a·Module·is·Loaded</span>
180 </h2>180 </h2>
181 <p>The·<code·class="inline">-on_load()</code>·directive·names·a·function·that·is·to·be·run·automatically·when181 <p>The·<code·class="inline">-on_load()</code>·directive·names·a·function·that·is·to·be·run·automatically·when
182 a·module·is·loaded.</p><p>Its·syntax·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="8697413796-1">(</span><span·class="n">Name</span><span·class="o">/</span><span·class="mi">0</span><span·class="p"·data-group-id="8697413796-1">)</span><span·class="p">.</span></code></pre><p>It·is·not·necessary·to·export·the·function.·It·is·called·in·a·freshly·spawned182 a·module·is·loaded.</p><p>Its·syntax·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="1608360340-1">(</span><span·class="n">Name</span><span·class="o">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1608360340-1">)</span><span·class="p">.</span></code></pre><p>It·is·not·necessary·to·export·the·function.·It·is·called·in·a·freshly·spawned
183 process·(which·terminates·as·soon·as·the·function·returns).</p><p>The·function·must·return·<code·class="inline">ok</code>·if·the·module·is·to·become·the·new·current·code183 process·(which·terminates·as·soon·as·the·function·returns).</p><p>The·function·must·return·<code·class="inline">ok</code>·if·the·module·is·to·become·the·new·current·code
184 for·the·module·and·become·callable.</p><p>Returning·any·other·value·or·generating·an·exception·causes·the·new·code·to·be184 for·the·module·and·become·callable.</p><p>Returning·any·other·value·or·generating·an·exception·causes·the·new·code·to·be
185 unloaded.·If·the·return·value·is·not·an·atom,·a·warning·error·report·is·sent·to185 unloaded.·If·the·return·value·is·not·an·atom,·a·warning·error·report·is·sent·to
186 the·error·logger.</p><p>If·there·already·is·current·code·for·the·module,·that·code·will·remain·current186 the·error·logger.</p><p>If·there·already·is·current·code·for·the·module,·that·code·will·remain·current
187 and·can·be·called·until·the·<code·class="inline">on_load</code>·function·has·returned.·If·the·<code·class="inline">on_load</code>187 and·can·be·called·until·the·<code·class="inline">on_load</code>·function·has·returned.·If·the·<code·class="inline">on_load</code>
188 function·fails,·the·current·code·(if·any)·will·remain·current.·If·there·is·no188 function·fails,·the·current·code·(if·any)·will·remain·current.·If·there·is·no
189 current·code·for·a·module,·any·process·that·makes·an·external·call·to·the·module189 current·code·for·a·module,·any·process·that·makes·an·external·call·to·the·module
190 before·the·<code·class="inline">on_load</code>·function·has·finished·will·be·suspended·until·the·<code·class="inline">on_load</code>190 before·the·<code·class="inline">on_load</code>·function·has·finished·will·be·suspended·until·the·<code·class="inline">on_load</code>
191 function·have·finished.</p><blockquote><h4·class="info">Change</h4><p>Before·Erlang/OTP·19,·if·the·<code·class="inline">on_load</code>·function·failed,·any·previously·current191 function·have·finished.</p><blockquote><h4·class="info">Change</h4><p>Before·Erlang/OTP·19,·if·the·<code·class="inline">on_load</code>·function·failed,·any·previously·current
192 code·would·become·old,·essentially·leaving·the·system·without·any·working·and192 code·would·become·old,·essentially·leaving·the·system·without·any·working·and
193 reachable·instance·of·the·module.</p></blockquote><p>In·embedded·mode,·first·all·modules·are·loaded.·Then·all·<code·class="inline">on_load</code>·functions·are193 reachable·instance·of·the·module.</p></blockquote><p>In·embedded·mode,·first·all·modules·are·loaded.·Then·all·<code·class="inline">on_load</code>·functions·are
194 called.·The·system·is·terminated·unless·all·of·the·<code·class="inline">on_load</code>·functions·return194 called.·The·system·is·terminated·unless·all·of·the·<code·class="inline">on_load</code>·functions·return
195 <code·class="inline">ok</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8853313090-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="8853313090-1">)</span><span·class="p">.</span><span·class="w">195 <code·class="inline">ok</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1528346326-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="1528346326-1">)</span><span·class="p">.</span><span·class="w">
196 </span><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="8853313090-2">(</span><span·class="ss">load_my_nifs</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="8853313090-2">)</span><span·class="p">.</span><span·class="w">196 </span><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="1528346326-2">(</span><span·class="ss">load_my_nifs</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1528346326-2">)</span><span·class="p">.</span><span·class="w">
  
197 </span><span·class="nf">load_my_nifs</span><span·class="p"·data-group-id="8853313090-3">(</span><span·class="p"·data-group-id="8853313090-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">197 </span><span·class="nf">load_my_nifs</span><span·class="p"·data-group-id="1528346326-3">(</span><span·class="p"·data-group-id="1528346326-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
198 ····</span><span·class="n">NifPath</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%Set·up·the·path·to·the·NIF·library.</span><span·class="w">198 ····</span><span·class="n">NifPath</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%Set·up·the·path·to·the·NIF·library.</span><span·class="w">
199 ····</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%Initialize·the·Info·term</span><span·class="w">199 ····</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%Initialize·the·Info·term</span><span·class="w">
200 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="8853313090-4">(</span><span·class="n">NifPath</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p"·data-group-id="8853313090-4">)</span><span·class="p">.</span></code></pre><p>If·the·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#load_nif/2"><code·class="inline">erlang:load_nif/2</code></a>·fails,·the·module·is·unloaded·and·a·warning200 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="1528346326-4">(</span><span·class="n">NifPath</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p"·data-group-id="1528346326-4">)</span><span·class="p">.</span></code></pre><p>If·the·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#load_nif/2"><code·class="inline">erlang:load_nif/2</code></a>·fails,·the·module·is·unloaded·and·a·warning
201 report·is·sent·to·the·error·loader.</p>201 report·is·sent·to·the·error·loader.</p>
202 </div>202 </div>
  
203 <div·class="bottom-actions"·id="bottom-actions">203 <div·class="bottom-actions"·id="bottom-actions">
204 ··<div·class="bottom-actions-item">204 ··<div·class="bottom-actions-item">
  
205 ······<a·href="distributed.html"·class="bottom-actions-button"·rel="prev">205 ······<a·href="distributed.html"·class="bottom-actions-button"·rel="prev">
51.5 KB
./usr/share/doc/erlang-doc/html/doc/system/commoncaveats.html
    
Offset 118, 31 lines modifiedOffset 118, 31 lines modified
118 <p>This·section·lists·a·few·constructs·to·watch·out·for.</p><h2·id="operator"·class="section-heading">118 <p>This·section·lists·a·few·constructs·to·watch·out·for.</p><h2·id="operator"·class="section-heading">
119 ··<a·href="#operator"·class="hover-link">119 ··<a·href="#operator"·class="hover-link">
120 ····<i·class="ri-link-m"·aria-hidden="true"></i>120 ····<i·class="ri-link-m"·aria-hidden="true"></i>
121 ··</a>121 ··</a>
122 ··<span·class="text">Operator·<code·class="inline">++</code></span>122 ··<span·class="text">Operator·<code·class="inline">++</code></span>
123 </h2>123 </h2>
124 <p>The·<code·class="inline">++</code>·operator·copies·its·left-hand·side·operand.·That·is·clearly124 <p>The·<code·class="inline">++</code>·operator·copies·its·left-hand·side·operand.·That·is·clearly
125 seen·if·we·do·our·own·implementation·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_plus_plus</span><span·class="p"·data-group-id="9683285360-1">(</span><span·class="p"·data-group-id="9683285360-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="9683285360-2">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·60,·SHA:·ab8d8f45077a360a77751ce791534e4905cd167c11f5651b7c4783a875ce7765·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">125 seen·if·we·do·our·own·implementation·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_plus_plus</span><span·class="p"·data-group-id="2513744412-1">(</span><span·class="p"·data-group-id="2513744412-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2513744412-2">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·60,·SHA:·f32089d7a792cb81daa272c0d4c355d79284452dd5b0683b0a37bbf186233113·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
126 ····</span><span·class="p"·data-group-id="9683285360-3">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">my_plus_plus</span><span·class="p"·data-group-id="9683285360-4">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·424621ade8607b153d47b7c3f75e22f2c78ba35bb0a3b03efccf81acbe435591·...·]-3">]</span><span·class="p">;</span><span·class="w">126 ····</span><span·class="p"·data-group-id="2513744412-3">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">my_plus_plus</span><span·class="p"·data-group-id="2513744412-4">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·486bd0f860551637fe4177d7b03ad71480be17ac9bbfcc482d6c011aae66cfc7·...·]-3">]</span><span·class="p">;</span><span·class="w">
127 </span><span·class="nf">my_plus_plus</span><span·class="p"·data-group-id="9683285360-5">(</span><span·class="p"·data-group-id="9683285360-6">[</span><span·class="p"·data-group-id="9683285360-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</span><span·class="p"·data-group-id="9683285360-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">127 </span><span·class="nf">my_plus_plus</span><span·class="p"·data-group-id="2513744412-5">(</span><span·class="p"·data-group-id="2513744412-6">[</span><span·class="p"·data-group-id="2513744412-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</span><span·class="p"·data-group-id="2513744412-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
128 ····</span><span·class="n">Tail</span><span·class="p">.</span></code></pre><p>We·must·be·careful·how·we·use·<code·class="inline">++</code>·in·a·loop.·First·is·how·not·to·use·it:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">naive_reverse</span><span·class="p"·data-group-id="1877240253-1">(</span><span·class="p"·data-group-id="1877240253-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="1877240253-2">]</span><span·class="p"·data-group-id="1877240253-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">128 ····</span><span·class="n">Tail</span><span·class="p">.</span></code></pre><p>We·must·be·careful·how·we·use·<code·class="inline">++</code>·in·a·loop.·First·is·how·not·to·use·it:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">naive_reverse</span><span·class="p"·data-group-id="7004980978-1">(</span><span·class="p"·data-group-id="7004980978-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="7004980978-2">]</span><span·class="p"·data-group-id="7004980978-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
129 ····</span><span·class="nf">naive_reverse</span><span·class="p"·data-group-id="1877240253-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="1877240253-3">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="1877240253-4">[</span><span·class="n">H</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·f09c7678f5b263f59e1abedb76a56fb5293e4b63d5a2c0f1864ec2c3f35872c9·...·]-4">]</span><span·class="p">;</span><span·class="w">129 ····</span><span·class="nf">naive_reverse</span><span·class="p"·data-group-id="7004980978-3">(</span><span·class="n">T</span><span·class="p"·data-group-id="7004980978-3">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="7004980978-4">[</span><span·class="n">H</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·52fa52b7fdcdc01e6a8eb04e5b969a872df56ae4432feeaf81f1673b05cd29fb·...·]-4">]</span><span·class="p">;</span><span·class="w">
130 </span><span·class="nf">naive_reverse</span><span·class="p"·data-group-id="1877240253-5">(</span><span·class="p"·data-group-id="1877240253-6">[</span><span·class="p"·data-group-id="1877240253-6">]</span><span·class="p"·data-group-id="1877240253-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">130 </span><span·class="nf">naive_reverse</span><span·class="p"·data-group-id="7004980978-5">(</span><span·class="p"·data-group-id="7004980978-6">[</span><span·class="p"·data-group-id="7004980978-6">]</span><span·class="p"·data-group-id="7004980978-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
131 ····</span><span·class="p"·data-group-id="1877240253-7">[</span><span·class="p"·data-group-id="1877240253-7">]</span><span·class="p">.</span></code></pre><p>As·the·<code·class="inline">++</code>·operator·copies·its·left-hand·side·operand,·the·growing131 ····</span><span·class="p"·data-group-id="7004980978-7">[</span><span·class="p"·data-group-id="7004980978-7">]</span><span·class="p">.</span></code></pre><p>As·the·<code·class="inline">++</code>·operator·copies·its·left-hand·side·operand,·the·growing
132 result·is·copied·repeatedly,·leading·to·quadratic·complexity.</p><p>On·the·other·hand,·using·<code·class="inline">++</code>·in·loop·like·this·is·perfectly·fine:</p><p><strong>OK</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="3656993818-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="3656993818-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">132 result·is·copied·repeatedly,·leading·to·quadratic·complexity.</p><p>On·the·other·hand,·using·<code·class="inline">++</code>·in·loop·like·this·is·perfectly·fine:</p><p><strong>OK</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="0371371158-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="0371371158-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
133 ····</span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="3656993818-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3656993818-3">[</span><span·class="p"·data-group-id="3656993818-3">]</span><span·class="p"·data-group-id="3656993818-2">)</span><span·class="p">.</span><span·class="w">133 ····</span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="0371371158-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0371371158-3">[</span><span·class="p"·data-group-id="0371371158-3">]</span><span·class="p"·data-group-id="0371371158-2">)</span><span·class="p">.</span><span·class="w">
  
134 </span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="3656993818-4">(</span><span·class="p"·data-group-id="3656993818-5">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="3656993818-5">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·58,·SHA:·5df4f3fe02d163c98762dd235d815b5beafb4355cb0d02af99287ebd90a98e8d·...·]8-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">134 </span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="0371371158-4">(</span><span·class="p"·data-group-id="0371371158-5">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="0371371158-5">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·58,·SHA:·dca6545951607fc329aeb473c5092c1b8ef54e5af0554c733cec631e2dfbcd83·...·]8-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
135 ····</span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="3656993818-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3656993818-7">[</span><span·class="n">H</span><span·class="p"·data-group-id="3656993818-7">]</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·107,·SHA:·673d4653ed790810d328df46fc2f8061c2062b7b7a94df993a0257ad7a3c3713·...·]8-6">)</span><span·class="p">;</span><span·class="w">135 ····</span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="0371371158-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0371371158-7">[</span><span·class="n">H</span><span·class="p"·data-group-id="0371371158-7">]</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·107,·SHA:·a3768ffbb69e3f8d0418ac9e5108ff9872c91f3d7c58ef6f88742c310ee0c2ce·...·]8-6">)</span><span·class="p">;</span><span·class="w">
136 </span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="3656993818-8">(</span><span·class="p"·data-group-id="3656993818-9">[</span><span·class="p"·data-group-id="3656993818-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="3656993818-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">136 </span><span·class="nf">naive_but_ok_reverse</span><span·class="p"·data-group-id="0371371158-8">(</span><span·class="p"·data-group-id="0371371158-9">[</span><span·class="p"·data-group-id="0371371158-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="0371371158-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
137 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>Each·list·element·is·copied·only·once.·The·growing·result·<code·class="inline">Acc</code>·is·the·right-hand137 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>Each·list·element·is·copied·only·once.·The·growing·result·<code·class="inline">Acc</code>·is·the·right-hand
138 side·operand,·which·it·is·<em>not</em>·copied.</p><p>Experienced·Erlang·programmers·would·probably·write·as·follows:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">vanilla_reverse</span><span·class="p"·data-group-id="8045965215-1">(</span><span·class="p"·data-group-id="8045965215-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="8045965215-2">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·9cb7a6769392df8fea4051374d0507280228f504279ccc2f6c91ac2dbcf095bd·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 side·operand,·which·it·is·<em>not</em>·copied.</p><p>Experienced·Erlang·programmers·would·probably·write·as·follows:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">vanilla_reverse</span><span·class="p"·data-group-id="2803278268-1">(</span><span·class="p"·data-group-id="2803278268-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2803278268-2">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·f6dfedfb5e4e9b09da19d02745423c20b22e6227b589f02ffd4d48d89936d4ea·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ····</span><span·class="nf">vanilla_reverse</span><span·class="p"·data-group-id="8045965215-3">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8045965215-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="8045[·...·truncated·by·diffoscope;·len:·59,·SHA:·736efb1fc1b8948b85fe59a6f9484493c50aafea759ad9c987eb1f043ba6db3e·...·]-3">)</span><span·class="p">;</span><span·class="w">139 ····</span><span·class="nf">vanilla_reverse</span><span·class="p"·data-group-id="2803278268-3">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2803278268-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="2803[·...·truncated·by·diffoscope;·len:·59,·SHA:·1736a9101c420aebb78aae00430353eeda8b00970b12a378677511edaa957778·...·]-3">)</span><span·class="p">;</span><span·class="w">
140 </span><span·class="nf">vanilla_reverse</span><span·class="p"·data-group-id="8045965215-5">(</span><span·class="p"·data-group-id="8045965215-6">[</span><span·class="p"·data-group-id="8045965215-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="8045965215-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">140 </span><span·class="nf">vanilla_reverse</span><span·class="p"·data-group-id="2803278268-5">(</span><span·class="p"·data-group-id="2803278268-6">[</span><span·class="p"·data-group-id="2803278268-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="2803278268-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
141 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>In·principle,·this·is·slightly·more·efficient·because·the·list·element·<code·class="inline">[H]</code>141 ····</span><span·class="n">Acc</span><span·class="p">.</span></code></pre><p>In·principle,·this·is·slightly·more·efficient·because·the·list·element·<code·class="inline">[H]</code>
142 is·not·built·before·being·copied·and·discarded.·In·practice,·the·compiler142 is·not·built·before·being·copied·and·discarded.·In·practice,·the·compiler
143 rewrites·<code·class="inline">[H]·++·Acc</code>·to·<code·class="inline">[H|Acc]</code>.</p><h2·id="timer-module"·class="section-heading">143 rewrites·<code·class="inline">[H]·++·Acc</code>·to·<code·class="inline">[H|Acc]</code>.</p><h2·id="timer-module"·class="section-heading">
144 ··<a·href="#timer-module"·class="hover-link">144 ··<a·href="#timer-module"·class="hover-link">
145 ····<i·class="ri-link-m"·aria-hidden="true"></i>145 ····<i·class="ri-link-m"·aria-hidden="true"></i>
146 ··</a>146 ··</a>
147 ··<span·class="text">Timer·Module</span>147 ··<span·class="text">Timer·Module</span>
Offset 160, 77 lines modifiedOffset 160, 77 lines modified
160 therefore·harmless.</p><h2·id="accidental-copying-and-loss-of-sharing"·class="section-heading">160 therefore·harmless.</p><h2·id="accidental-copying-and-loss-of-sharing"·class="section-heading">
161 ··<a·href="#accidental-copying-and-loss-of-sharing"·class="hover-link">161 ··<a·href="#accidental-copying-and-loss-of-sharing"·class="hover-link">
162 ····<i·class="ri-link-m"·aria-hidden="true"></i>162 ····<i·class="ri-link-m"·aria-hidden="true"></i>
163 ··</a>163 ··</a>
164 ··<span·class="text">Accidental·Copying·and·Loss·of·Sharing</span>164 ··<span·class="text">Accidental·Copying·and·Loss·of·Sharing</span>
165 </h2>165 </h2>
166 <p>When·spawning·a·new·process·using·a·fun,·one·can·accidentally·copy·more·data·to166 <p>When·spawning·a·new·process·using·a·fun,·one·can·accidentally·copy·more·data·to
167 the·process·than·intended.·For·example:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">accidental1</span><span·class="p"·data-group-id="4694449086-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="4694449086-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 the·process·than·intended.·For·example:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">accidental1</span><span·class="p"·data-group-id="7081382857-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="7081382857-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4694449086-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4694449086-3">(</span><span·class="p"·data-group-id="4694449086-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">168 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="7081382857-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7081382857-3">(</span><span·class="p"·data-group-id="7081382857-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
169 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4694449086-4">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4694449086-5">[</span><span·class="n">State</span><span·class="o">#</[·...·truncated·by·diffoscope;·len:·180,·SHA:·10339caaceffcd104a96b15afdf8dfba9d2290ecdde9596b5b5d764f989ad94c·...·]-4">)</span><span·class="w">169 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7081382857-4">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7081382857-5">[</span><span·class="n">State</span><span·class="o">#</[·...·truncated·by·diffoscope;·len:·180,·SHA:·97944461311000117fb3681ffdad71c2ab1d54808ae4bdb72cbeaba82c23955d·...·]-4">)</span><span·class="w">
170 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="4694449086-2">)</span><span·class="p">.</span></code></pre><p>The·code·in·the·fun·will·extract·one·element·from·the·record·and·print·it.·The170 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="7081382857-2">)</span><span·class="p">.</span></code></pre><p>The·code·in·the·fun·will·extract·one·element·from·the·record·and·print·it.·The
171 rest·of·the·<code·class="inline">state</code>·record·is·not·used.·However,·when·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/1"><code·class="inline">spawn/1</code></a>171 rest·of·the·<code·class="inline">state</code>·record·is·not·used.·However,·when·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/1"><code·class="inline">spawn/1</code></a>
172 function·is·executed,·the·entire·record·is·copied·to·the·newly·created·process.</p><p>The·same·kind·of·problem·can·happen·with·a·map:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">accidental2</span><span·class="p"·data-group-id="5296526747-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="5296526747-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 function·is·executed,·the·entire·record·is·copied·to·the·newly·created·process.</p><p>The·same·kind·of·problem·can·happen·with·a·map:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">accidental2</span><span·class="p"·data-group-id="0164876623-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="0164876623-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="5296526747-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5296526747-3">(</span><span·class="p"·data-group-id="5296526747-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0164876623-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0164876623-3">(</span><span·class="p"·data-group-id="0164876623-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5296526747-4">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5296526747-5">[</span><span·class="nf">map_get</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·288,·SHA:·0eae68fe5f40756e3859b1823db83b7830b2e42fad957e6f7c14ad73ecfb72a3·...·]-4">)</span><span·class="w">174 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0164876623-4">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0164876623-5">[</span><span·class="nf">map_get</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·288,·SHA:·8bb543c9463b8c3fdffab60d998e0b5b8eed087f31325b4a42e6eef0f90fd426·...·]-4">)</span><span·class="w">
175 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="5296526747-2">)</span><span·class="p">.</span></code></pre><p>In·the·following·example·(part·of·a·module·implementing·the·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>175 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="0164876623-2">)</span><span·class="p">.</span></code></pre><p>In·the·following·example·(part·of·a·module·implementing·the·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>
176 behavior)·the·created·fun·is·sent·to·another·process:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_call</span><span·class="p"·data-group-id="2063976681-1">(</span><span·class="ss">give_me_a_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·3bf015cc128a7196f21148774d9f6c1ca685e91d0ae4dcfeced7c03f62987a6a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 behavior)·the·created·fun·is·sent·to·another·process:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_call</span><span·class="p"·data-group-id="2192148149-1">(</span><span·class="ss">give_me_a_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·f7841e8af3754212c8bcfd58f039de725f09f1245b21962fe6f8934a6ff6fdcf·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ····</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2063976681-2">(</span><span·class="p"·data-group-id="2063976681-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="nb">size</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">177 ····</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2192148149-2">(</span><span·class="p"·data-group-id="2192148149-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="nb">size</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
178 ····</span><span·class="p"·data-group-id="2063976681-3">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2063976681-3">}</span><span·class="p">.</span></code></pre><p>How·bad·that·unnecessary·copy·is·depends·on·the·contents·of·the·record·or·the178 ····</span><span·class="p"·data-group-id="2192148149-3">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2192148149-3">}</span><span·class="p">.</span></code></pre><p>How·bad·that·unnecessary·copy·is·depends·on·the·contents·of·the·record·or·the
179 map.</p><p>For·example,·if·the·<code·class="inline">state</code>·record·is·initialized·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init1</span><span·class="p"·data-group-id="5095337277-1">(</span><span·class="p"·data-group-id="5095337277-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">179 map.</p><p>For·example,·if·the·<code·class="inline">state</code>·record·is·initialized·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init1</span><span·class="p"·data-group-id="6878910790-1">(</span><span·class="p"·data-group-id="6878910790-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
180 ····</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5095337277-2">{</span><span·class="ss">data</span><span·class="o">=</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="5095337277-3">(</span><span·class="mi">1</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·147,·SHA:·d562bac98a0fe1a66662a7924d93279f41a7866c43d2bf3428bd570eeb0bb1c2·...·]-2">}</span><span·class="p">.</span></code></pre><p>a·list·with·10000·elements·(or·about·20000·heap·words)·will·be·copied·to·the180 ····</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="6878910790-2">{</span><span·class="ss">data</span><span·class="o">=</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="6878910790-3">(</span><span·class="mi">1</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·147,·SHA:·2f643bde3b2390553ae5418e0e97ec15ec5371204b8a00e807106ba3c26fe6e9·...·]-2">}</span><span·class="p">.</span></code></pre><p>a·list·with·10000·elements·(or·about·20000·heap·words)·will·be·copied·to·the
181 newly·created·process.</p><p>An·unnecessary·copy·of·10000·element·list·can·be·bad·enough,·but·it·can·get·even181 newly·created·process.</p><p>An·unnecessary·copy·of·10000·element·list·can·be·bad·enough,·but·it·can·get·even
182 worse·if·the·<code·class="inline">state</code>·record·contains·<em>shared·subterms</em>.·Here·is·a·simple·example182 worse·if·the·<code·class="inline">state</code>·record·contains·<em>shared·subterms</em>.·Here·is·a·simple·example
183 of·a·term·with·a·shared·subterm:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3592423650-1">{</span><span·class="n">SubTerm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SubTerm</span><span·class="p"·data-group-id="3592423650-1">}</span></code></pre><p>When·a·term·is·copied·to·another·process,·sharing·of·subterms·will·be·lost·and183 of·a·term·with·a·shared·subterm:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9665616272-1">{</span><span·class="n">SubTerm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SubTerm</span><span·class="p"·data-group-id="9665616272-1">}</span></code></pre><p>When·a·term·is·copied·to·another·process,·sharing·of·subterms·will·be·lost·and
184 the·copied·term·can·be·many·times·larger·than·the·original·term.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init2</span><span·class="p"·data-group-id="4768249765-1">(</span><span·class="p"·data-group-id="4768249765-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 the·copied·term·can·be·many·times·larger·than·the·original·term.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init2</span><span·class="p"·data-group-id="2904650645-1">(</span><span·class="p"·data-group-id="2904650645-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ····</span><span·class="n">SharedSubTerms</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="4768249765-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4768249765-3">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="4768249765-3">)</span><span[·...·truncated·by·diffoscope;·len:·851,·SHA:·88dda1d501e5ef9cf1701ede15e4f8f39a0453e5a546771879d4284eb8332188·...·]5-2">)</span><span·class="p">,</span><span·class="w">185 ····</span><span·class="n">SharedSubTerms</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="2904650645-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="2904650645-3">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="2904650645-3">)</span><span[·...·truncated·by·diffoscope;·len:·851,·SHA:·6af1b488caf3baefc8de2b744453fbf23e2fa5e66d1a7e7810f7c67cfc611b27·...·]5-2">)</span><span·class="p">,</span><span·class="w">
186 ····</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4768249765-7">{</span><span·class="ss">data</span><span·class="o">=</span><span·class="n">Shared</span><span·class="p"·data-group-id="4768249765-7">}</span><span·class="p">.</span></code></pre><p>In·the·process·that·calls·<code·class="inline">init2/0</code>,·the·size·of·the·<code·class="inline">data</code>·field·in·the·<code·class="inline">state</code>186 ····</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="2904650645-7">{</span><span·class="ss">data</span><span·class="o">=</span><span·class="n">Shared</span><span·class="p"·data-group-id="2904650645-7">}</span><span·class="p">.</span></code></pre><p>In·the·process·that·calls·<code·class="inline">init2/0</code>,·the·size·of·the·<code·class="inline">data</code>·field·in·the·<code·class="inline">state</code>
187 record·will·be·32·heap·words.·When·the·record·is·copied·to·the·newly·created187 record·will·be·32·heap·words.·When·the·record·is·copied·to·the·newly·created
188 process,·sharing·will·be·lost·and·the·size·of·the·copied·<code·class="inline">data</code>·field·will·be188 process,·sharing·will·be·lost·and·the·size·of·the·copied·<code·class="inline">data</code>·field·will·be
189 131070·heap·words.·More·details·about189 131070·heap·words.·More·details·about
190 <a·href="eff_guide_processes.html#loss-of-sharing">loss·off·sharing</a>·are·found·in·a·later190 <a·href="eff_guide_processes.html#loss-of-sharing">loss·off·sharing</a>·are·found·in·a·later
191 section.</p><p>To·avoid·the·problem,·outside·of·the·fun·extract·only·the·fields·of·the·record191 section.</p><p>To·avoid·the·problem,·outside·of·the·fun·extract·only·the·fields·of·the·record
192 that·are·actually·used:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fixed_accidental1</span><span·class="p"·data-group-id="5602310759-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="5602310759-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 that·are·actually·used:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fixed_accidental1</span><span·class="p"·data-group-id="5541795597-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="5541795597-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ····</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">193 ····</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">
194 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="5602310759-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5602310759-3">(</span><span·class="p"·data-group-id="5602310759-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">194 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="5541795597-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5541795597-3">(</span><span·class="p"·data-group-id="5541795597-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
195 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5602310759-4">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5602310759-5">[</span><span·class="n">Info</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·73,·SHA:·f34c452306bf13152ed281c3f34a155a3f004d134f044f93552606650f088b28·...·]-4">)</span><span·class="w">195 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5541795597-4">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5541795597-5">[</span><span·class="n">Info</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·73,·SHA:·eea4de0ceb8ddf8934033f778a714d375134cc729646c02dbb0a4fdef3768003·...·]-4">)</span><span·class="w">
196 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="5602310759-2">)</span><span·class="p">.</span></code></pre><p>Similarly,·outside·of·the·fun·extract·only·the·map·elements·that·are·actually196 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="5541795597-2">)</span><span·class="p">.</span></code></pre><p>Similarly,·outside·of·the·fun·extract·only·the·map·elements·that·are·actually
197 used:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fixed_accidental2</span><span·class="p"·data-group-id="3483337674-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="3483337674-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">197 used:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fixed_accidental2</span><span·class="p"·data-group-id="9657114327-1">(</span><span·class="n">State</span><span·class="p"·data-group-id="9657114327-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
198 ····</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">map_get</span><span·class="p"·data-group-id="3483337674-2">(</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="3483337674-2">)</span><span·class="p">,</span><span·class="w">198 ····</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">map_get</span><span·class="p"·data-group-id="9657114327-2">(</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="9657114327-2">)</span><span·class="p">,</span><span·class="w">
199 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3483337674-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="3483337674-4">(</span><span·class="p"·data-group-id="3483337674-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">199 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="9657114327-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="9657114327-4">(</span><span·class="p"·data-group-id="9657114327-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
200 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3483337674-5">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3483337674-6">[</span><span·class="n">Info</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·74,·SHA:·7585277f7388ea494bca53ced1fb65902be53714f0b5ac8f01b92bd6879e7f46·...·]-5">)</span><span·class="w">200 ··················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9657114327-5">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9657114327-6">[</span><span·class="n">Info</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·74,·SHA:·354b4943797351fdffb05d38f40d75b6905a53ac6303656df046c955756aff64·...·]-5">)</span><span·class="w">
201 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="3483337674-3">)</span><span·class="p">.</span></code></pre><h2·id="list_to_atom-1"·class="section-heading">201 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="9657114327-3">)</span><span·class="p">.</span></code></pre><h2·id="list_to_atom-1"·class="section-heading">
202 ··<a·href="#list_to_atom-1"·class="hover-link">202 ··<a·href="#list_to_atom-1"·class="hover-link">
203 ····<i·class="ri-link-m"·aria-hidden="true"></i>203 ····<i·class="ri-link-m"·aria-hidden="true"></i>
204 ··</a>204 ··</a>
205 ··<span·class="text">list_to_atom/1</span>205 ··<span·class="text">list_to_atom/1</span>
206 </h2>206 </h2>
207 <p>Atoms·are·not·garbage-collected.·Once·an·atom·is·created,·it·is·never·removed.207 <p>Atoms·are·not·garbage-collected.·Once·an·atom·is·created,·it·is·never·removed.
208 The·emulator·terminates·if·the·limit·for·the·number·of·atoms·(1,048,576·by208 The·emulator·terminates·if·the·limit·for·the·number·of·atoms·(1,048,576·by
209 default)·is·reached.</p><p>Therefore,·converting·arbitrary·input·strings·to·atoms·can·be·dangerous·in·a209 default)·is·reached.</p><p>Therefore,·converting·arbitrary·input·strings·to·atoms·can·be·dangerous·in·a
210 system·that·runs·continuously.·If·only·certain·well-defined·atoms·are·allowed·as210 system·that·runs·continuously.·If·only·certain·well-defined·atoms·are·allowed·as
211 input,·<a·href="../../erts-15.0.1/doc/html/erlang.html#list_to_existing_atom/1"><code·class="inline">list_to_existing_atom/1</code></a>·or211 input,·<a·href="../../erts-15.0.1/doc/html/erlang.html#list_to_existing_atom/1"><code·class="inline">list_to_existing_atom/1</code></a>·or
212 <a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_existing_atom/1"><code·class="inline">binary_to_existing_atom/1</code></a>·can·be·used212 <a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_existing_atom/1"><code·class="inline">binary_to_existing_atom/1</code></a>·can·be·used
213 to·guard·against·a·denial-of-service·attack.·(All·atoms·that·are·allowed·must213 to·guard·against·a·denial-of-service·attack.·(All·atoms·that·are·allowed·must
214 have·been·created·earlier,·for·example,·by·using·all·of·them·in·a·module214 have·been·created·earlier,·for·example,·by·using·all·of·them·in·a·module
215 and·loading·that·module.)</p><p>Using·<a·href="../../erts-15.0.1/doc/html/erlang.html#list_to_atom/1"><code·class="inline">list_to_atom/1</code></a>·to·construct·an·atom·that215 and·loading·that·module.)</p><p>Using·<a·href="../../erts-15.0.1/doc/html/erlang.html#list_to_atom/1"><code·class="inline">list_to_atom/1</code></a>·to·construct·an·atom·that
216 is·passed·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply/3</code></a>·is·quite·expensive.</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">apply</span><span·class="p"·data-group-id="7509026461-1">(</span><span·class="nf">list_to_atom</span><span·class="p"·data-group-id="7509026461-2">(</span><span·class="s">&quot;some_prefix&quot;</span><span·class="o">++</span><span·class="n">Var</span><span·class="p"·data-group-id="7509026461-2">)</[·...·truncated·by·diffoscope;·len:·196,·SHA:·adbc555cd925a5ddf885d4179feade1b00bc7a66e492b990da336a9acabc64c2·...·]-1">)</span></code></pre><h2·id="length-1"·class="section-heading">216 is·passed·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply/3</code></a>·is·quite·expensive.</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">apply</span><span·class="p"·data-group-id="3271842769-1">(</span><span·class="nf">list_to_atom</span><span·class="p"·data-group-id="3271842769-2">(</span><span·class="s">&quot;some_prefix&quot;</span><span·class="o">++</span><span·class="n">Var</span><span·class="p"·data-group-id="3271842769-2">)</[·...·truncated·by·diffoscope;·len:·196,·SHA:·68b7c3531d58c5fb9f7a5552b8aabab9ca5f0333351ebc2fab583c0ab0225699·...·]-1">)</span></code></pre><h2·id="length-1"·class="section-heading">
217 ··<a·href="#length-1"·class="hover-link">217 ··<a·href="#length-1"·class="hover-link">
218 ····<i·class="ri-link-m"·aria-hidden="true"></i>218 ····<i·class="ri-link-m"·aria-hidden="true"></i>
219 ··</a>219 ··</a>
220 ··<span·class="text">length/1</span>220 ··<span·class="text">length/1</span>
221 </h2>221 </h2>
222 <p>The·time·for·calculating·the·length·of·a·list·is·proportional·to·the·length·of222 <p>The·time·for·calculating·the·length·of·a·list·is·proportional·to·the·length·of
223 the·list,·as·opposed·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#tuple_size/1"><code·class="inline">tuple_size/1</code></a>,223 the·list,·as·opposed·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#tuple_size/1"><code·class="inline">tuple_size/1</code></a>,
224 <a·href="../../erts-15.0.1/doc/html/erlang.html#byte_size/1"><code·class="inline">byte_size/1</code></a>,·and·<a·href="../../erts-15.0.1/doc/html/erlang.html#bit_size/1"><code·class="inline">bit_size/1</code></a>,·which·all224 <a·href="../../erts-15.0.1/doc/html/erlang.html#byte_size/1"><code·class="inline">byte_size/1</code></a>,·and·<a·href="../../erts-15.0.1/doc/html/erlang.html#bit_size/1"><code·class="inline">bit_size/1</code></a>,·which·all
225 execute·in·constant·time.</p><p>Normally,·there·is·no·need·to·worry·about·the·speed·of·<a·href="../../erts-15.0.1/doc/html/erlang.html#length/1"><code·class="inline">length/1</code></a>,225 execute·in·constant·time.</p><p>Normally,·there·is·no·need·to·worry·about·the·speed·of·<a·href="../../erts-15.0.1/doc/html/erlang.html#length/1"><code·class="inline">length/1</code></a>,
226 because·it·is·efficiently·implemented·in·C.·In·time-critical·code,·you·might226 because·it·is·efficiently·implemented·in·C.·In·time-critical·code,·you·might
227 want·to·avoid·it·if·the·input·list·could·potentially·be·very·long.</p><p>Some·uses·of·<a·href="../../erts-15.0.1/doc/html/erlang.html#length/1"><code·class="inline">length/1</code></a>·can·be·replaced·by·matching.·For·example,227 want·to·avoid·it·if·the·input·list·could·potentially·be·very·long.</p><p>Some·uses·of·<a·href="../../erts-15.0.1/doc/html/erlang.html#length/1"><code·class="inline">length/1</code></a>·can·be·replaced·by·matching.·For·example,
228 the·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="6204640018-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="6204640018-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">length</span><span·class="p"·data-group-id="6204640018-2">(</span><span·class="n">L</span><span·class="p"·data-group-id="6204640018-2">)</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
229 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>can·be·rewritten·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="8601041411-1">(</span><span[·...·truncated·by·diffoscope;·len:·363,·SHA:·f47b0331cff353b9917bfa23ecccc626052f286663e554bd246d44dc154281c1·...·]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">228 the·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="3636742713-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="3636742713-1">)</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·301,·SHA:·c4a1588cd4098e42e444bb0201454d91a67caaf7614f40392ad8512245bfedc8·...·]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
 229 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>can·be·rewritten·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="9258435084-1">(</span><span·class="p"·data-group-id="9258435084-2">[</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p">|</span><span·class="p">_</span><span·class="p"·data-group-id="9258435084-2">]</span><span·class="o">=</span><span·class="n">L</span><span·class="p"·data-group-id="9258435084-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
230 ···</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>One·slight·difference·is·that·<a·href="../../erts-15.0.1/doc/html/erlang.html#length/1"><code·class="inline">length(L)</code></a>·fails·if·<code·class="inline">L</code>·is·an230 ···</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>One·slight·difference·is·that·<a·href="../../erts-15.0.1/doc/html/erlang.html#length/1"><code·class="inline">length(L)</code></a>·fails·if·<code·class="inline">L</code>·is·an
231 improper·list,·while·the·pattern·in·the·second·code·fragment·accepts·an·improper231 improper·list,·while·the·pattern·in·the·second·code·fragment·accepts·an·improper
232 list.</p><h2·id="setelement-3"·class="section-heading">232 list.</p><h2·id="setelement-3"·class="section-heading">
233 ··<a·href="#setelement-3"·class="hover-link">233 ··<a·href="#setelement-3"·class="hover-link">
234 ····<i·class="ri-link-m"·aria-hidden="true"></i>234 ····<i·class="ri-link-m"·aria-hidden="true"></i>
235 ··</a>235 ··</a>
236 ··<span·class="text">setelement/3</span>236 ··<span·class="text">setelement/3</span>
Offset 238, 18 lines modifiedOffset 238, 18 lines modified
238 <p><a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·copies·the·tuple·it·modifies.·Therefore,238 <p><a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·copies·the·tuple·it·modifies.·Therefore,
239 updating·a·tuple·in·a·loop·using·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·creates·a·new239 updating·a·tuple·in·a·loop·using·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·creates·a·new
240 copy·of·the·tuple·every·time.</p><p>There·is·one·exception·to·the·rule·that·the·tuple·is·copied.·If·the·compiler240 copy·of·the·tuple·every·time.</p><p>There·is·one·exception·to·the·rule·that·the·tuple·is·copied.·If·the·compiler
241 clearly·can·see·that·destructively·updating·the·tuple·would·give·the·same·result241 clearly·can·see·that·destructively·updating·the·tuple·would·give·the·same·result
242 as·if·the·tuple·was·copied,·the·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·is242 as·if·the·tuple·was·copied,·the·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·is
243 replaced·with·a·special·destructive·<code·class="inline">setelement</code>·instruction.·In·the·following243 replaced·with·a·special·destructive·<code·class="inline">setelement</code>·instruction.·In·the·following
244 code·sequence,·the·first·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·call·copies·the·tuple244 code·sequence,·the·first·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·call·copies·the·tuple
245 and·modifies·the·ninth·element:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">multiple_setelement</span><span·class="p"·data-group-id="9793394920-1">(</span><span·class="n">T0</span><span·class="p"·data-group-id="9793394920-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="9793394920-2">(<[·...·truncated·by·diffoscope;·len:·72,·SHA:·a6d85c8c052ef683d33ef51edabd4e9537879327fd0cff344553e7d9301db006·...·]-2">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">9</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">245 and·modifies·the·ninth·element:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">multiple_setelement</span><span·class="p"·data-group-id="4925115531-1">(</span><span·class="n">T0</span><span·class="p"·data-group-id="4925115531-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="4925115531-2">(<[·...·truncated·by·diffoscope;·len:·72,·SHA:·530ca26e48581d721313d01662f2cd0686428881e4823460eddea32dee838ccd·...·]-2">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">9</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
246 ····</span><span·class="n">T1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">setelement</span><span·class="p"·data-group-id="9793394920-3">(</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p"·data-group-id="9793394920-3">)</span><span·class="p">,</span><span·class="w">246 ····</span><span·class="n">T1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">setelement</span><span·class="p"·data-group-id="4925115531-3">(</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p"·data-group-id="4925115531-3">)</span><span·class="p">,</span><span·class="w">
247 ····</span><span·class="n">T2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">setelement</span><span·class="p"·data-group-id="9793394920-4">(</span><span·class="mi">7</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foobar</span><span·class="p"·data-group-id="9793394920-4">)</span><span·class="p">,</span><span·class="w">247 ····</span><span·class="n">T2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">setelement</span><span·class="p"·data-group-id="4925115531-4">(</span><span·class="mi">7</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foobar</span><span·class="p"·data-group-id="4925115531-4">)</span><span·class="p">,</span><span·class="w">
248 ····</span><span·class="nf">setelement</span><span·class="p"·data-group-id="9793394920-5">(</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new_value</span><span·class="p"·data-group-id="9793394920-5">)</span><span·class="p">.</span></code></pre><p>The·two·following·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·calls·modify·the·tuple·in248 ····</span><span·class="nf">setelement</span><span·class="p"·data-group-id="4925115531-5">(</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new_value</span><span·class="p"·data-group-id="4925115531-5">)</span><span·class="p">.</span></code></pre><p>The·two·following·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·calls·modify·the·tuple·in
249 place.</p><p>For·the·optimization·to·be·applied,·<em>all</em>·the·following·conditions·must·be·true:</p><ul><li>The·tuple·argument·must·be·known·to·be·a·tuple·of·a·known·size.</li><li>The·indices·must·be·integer·literals,·not·variables·or·expressions.</li><li>The·indices·must·be·given·in·descending·order.</li><li>There·must·be·no·calls·to·another·function·in·between·the·calls·to249 place.</p><p>For·the·optimization·to·be·applied,·<em>all</em>·the·following·conditions·must·be·true:</p><ul><li>The·tuple·argument·must·be·known·to·be·a·tuple·of·a·known·size.</li><li>The·indices·must·be·integer·literals,·not·variables·or·expressions.</li><li>The·indices·must·be·given·in·descending·order.</li><li>There·must·be·no·calls·to·another·function·in·between·the·calls·to
250 <a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>.</li><li>The·tuple·returned·from·one·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·call·must·only·be250 <a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>.</li><li>The·tuple·returned·from·one·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>·call·must·only·be
251 used·in·the·subsequent·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>.</li></ul><p>If·the·code·cannot·be·structured·as·in·the·<code·class="inline">multiple_setelement/1</code>·example,·the251 used·in·the·subsequent·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#setelement/3"><code·class="inline">setelement/3</code></a>.</li></ul><p>If·the·code·cannot·be·structured·as·in·the·<code·class="inline">multiple_setelement/1</code>·example,·the
252 best·way·to·modify·multiple·elements·in·a·large·tuple·is·to·convert·the·tuple·to252 best·way·to·modify·multiple·elements·in·a·large·tuple·is·to·convert·the·tuple·to
253 a·list,·modify·the·list,·and·convert·it·back·to·a·tuple.</p><h2·id="size-1"·class="section-heading">253 a·list,·modify·the·list,·and·convert·it·back·to·a·tuple.</p><h2·id="size-1"·class="section-heading">
Max diff block lines reached; 50/52582 bytes (0.10%) of diff not shown.
208 KB
./usr/share/doc/erlang-doc/html/doc/system/conc_prog.html
    
Offset 132, 107 lines modifiedOffset 132, 107 lines modified
132 threads·of·execution·in·an·Erlang·program·and·to·allow·these·threads·to132 threads·of·execution·in·an·Erlang·program·and·to·allow·these·threads·to
133 communicate·with·each·other.·In·Erlang,·each·thread·of·execution·is·called·a133 communicate·with·each·other.·In·Erlang,·each·thread·of·execution·is·called·a
134 <em>process</em>.</p><p>(Aside:·the·term·&quot;process&quot;·is·usually·used·when·the·threads·of·execution·share134 <em>process</em>.</p><p>(Aside:·the·term·&quot;process&quot;·is·usually·used·when·the·threads·of·execution·share
135 no·data·with·each·other·and·the·term·&quot;thread&quot;·when·they·share·data·in·some·way.135 no·data·with·each·other·and·the·term·&quot;thread&quot;·when·they·share·data·in·some·way.
136 Threads·of·execution·in·Erlang·share·no·data,·that·is·why·they·are·called136 Threads·of·execution·in·Erlang·share·no·data,·that·is·why·they·are·called
137 processes).</p><p>The·Erlang·BIF·<code·class="inline">spawn</code>·is·used·to·create·a·new·process:137 processes).</p><p>The·Erlang·BIF·<code·class="inline">spawn</code>·is·used·to·create·a·new·process:
138 <code·class="inline">spawn(Module,·Exported_Function,·List·of·Arguments)</code>.·Consider·the·following138 <code·class="inline">spawn(Module,·Exported_Function,·List·of·Arguments)</code>.·Consider·the·following
139 module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0066977593-1">(</span><span·class="ss">tut14</span><span·class="p"·data-group-id="0066977593-1">)</span><span·class="p">.</span><span·class="w">139 module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8750720344-1">(</span><span·class="ss">tut14</span><span·class="p"·data-group-id="8750720344-1">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="w">140 </span><span·class="w">
141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0066977593-2">(</span><span·class="p"·data-group-id="0066977593-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">/<[·...·truncated·by·diffoscope;·len:·125,·SHA:·7c40c54b9bd5457fa3732a52170895666262f208d3be0ba963e2005b0697f615·...·]-2">)</span><span·class="p">.</span><span·class="w">141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8750720344-2">(</span><span·class="p"·data-group-id="8750720344-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">/<[·...·truncated·by·diffoscope;·len:·125,·SHA:·7ee4c111ae0707dd2bc0240c47e4a319d867552c2e96910f01a6b8782e7f6a7b·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
142 </span><span·class="nf">say_something</span><span·class="p"·data-group-id="0066977593-4">(</span><span·class="n">What</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="0066977593-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">142 </span><span·class="nf">say_something</span><span·class="p"·data-group-id="8750720344-4">(</span><span·class="n">What</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="8750720344-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
143 ····</span><span·class="ss">done</span><span·class="p">;</span><span·class="w">143 ····</span><span·class="ss">done</span><span·class="p">;</span><span·class="w">
144 </span><span·class="nf">say_something</span><span·class="p"·data-group-id="0066977593-5">(</span><span·class="n">What</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Times</span><span·class="p"·data-group-id="0066977593-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">144 </span><span·class="nf">say_something</span><span·class="p"·data-group-id="8750720344-5">(</span><span·class="n">What</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Times</span><span·class="p"·data-group-id="8750720344-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
145 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0066977593-6">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0066977593-7">[</span><span·class="n">What</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·926958e79a09a4f2f869551b9746929abb2f8c75567135fa354de237e846e484·...·]-6">)</span><span·class="p">,</span><span·class="w">145 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8750720344-6">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8750720344-7">[</span><span·class="n">What</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·fb91e7cb53c936caed1c21d058639419dd19558f2f7a5c97b9275786197ecb28·...·]-6">)</span><span·class="p">,</span><span·class="w">
146 ····</span><span·class="nf">say_something</span><span·class="p"·data-group-id="0066977593-8">(</span><span·class="n">What</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Times</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="006[·...·truncated·by·diffoscope;·len:·7,·SHA:·88d460aa06bbb2cefce09680341f4fbf397de8a56ec591be56b3cc37eab5774d·...·]-8">)</span><span·class="p">.</span><span·class="w">146 ····</span><span·class="nf">say_something</span><span·class="p"·data-group-id="8750720344-8">(</span><span·class="n">What</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Times</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="875[·...·truncated·by·diffoscope;·len:·7,·SHA:·bdef84a71214d3356176c08aeba399576f15334eb0dc9251cc8c24c956c51988·...·]-8">)</span><span·class="p">.</span><span·class="w">
  
147 </span><span·class="nf">start</span><span·class="p"·data-group-id="0066977593-9">(</span><span·class="p"·data-group-id="0066977593-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">147 </span><span·class="nf">start</span><span·class="p"·data-group-id="8750720344-9">(</span><span·class="p"·data-group-id="8750720344-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
148 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0066977593-10">(</span><span·class="ss">tut14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0066977593-11">[</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·180,·SHA:·36b3895b207efd8502e90f11a7d0046ec26c8b2b93a65bf54295980862450770·...·]-10">)</span><span·class="p">,</span><span·class="w">148 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="8750720344-10">(</span><span·class="ss">tut14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8750720344-11">[</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·180,·SHA:·78c3d69d878a844d3a97bcba26498f13b7eca0fc023f55d07aac25b3e3339bbe·...·]-10">)</span><span·class="p">,</span><span·class="w">
149 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0066977593-12">(</span><span·class="ss">tut14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0066977593-13">[</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·471,·SHA:·3df18307cac08976bb33d20c4b5a4ea4644d63eab6f53b8afebda51bc562671a·...·]-1">)</span><span·class="p">.</span><span·class="w">149 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="8750720344-12">(</span><span·class="ss">tut14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8750720344-13">[</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·471,·SHA:·aeca436d552d32730507580bcda047348a20a89587a0ec7edaa495c5d4e3dc17·...·]-1">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="p"·data-group-id="6960753178-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut14</span><span·class="p"·data-group-id="6960753178-2">}</span><span·class="gp·unselectable">150 </span><span·class="p"·data-group-id="3006526166-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut14</span><span·class="p"·data-group-id="3006526166-2">}</span><span·class="gp·unselectable">
151 6&gt;·</span><span·class="nc">tut14</span><span·class="p">:</span><span·class="nf">say_something</span><span·class="p"·data-group-id="6960753178-3">(</span><span·class="ss">hello</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="6960753178-3">)</span><span·class="p">.</span><span·class="w">151 6&gt;·</span><span·class="nc">tut14</span><span·class="p">:</span><span·class="nf">say_something</span><span·class="p"·data-group-id="3006526166-3">(</span><span·class="ss">hello</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="3006526166-3">)</span><span·class="p">.</span><span·class="w">
152 </span><span·class="ss">hello</span><span·class="w">152 </span><span·class="ss">hello</span><span·class="w">
153 </span><span·class="ss">hello</span><span·class="w">153 </span><span·class="ss">hello</span><span·class="w">
154 </span><span·class="ss">hello</span><span·class="w">154 </span><span·class="ss">hello</span><span·class="w">
155 </span><span·class="ss">done</span></code></pre><p>As·shown,·the·function·<code·class="inline">say_something</code>·writes·its·first·argument·the·number·of155 </span><span·class="ss">done</span></code></pre><p>As·shown,·the·function·<code·class="inline">say_something</code>·writes·its·first·argument·the·number·of
156 times·specified·by·second·argument.·The·function·<code·class="inline">start</code>·starts·two·Erlang156 times·specified·by·second·argument.·The·function·<code·class="inline">start</code>·starts·two·Erlang
157 processes,·one·that·writes·&quot;hello&quot;·three·times·and·one·that·writes·&quot;goodbye&quot;157 processes,·one·that·writes·&quot;hello&quot;·three·times·and·one·that·writes·&quot;goodbye&quot;
158 three·times.·Both·processes·use·the·function·<code·class="inline">say_something</code>.·Notice·that·a158 three·times.·Both·processes·use·the·function·<code·class="inline">say_something</code>.·Notice·that·a
159 function·used·in·this·way·by·<code·class="inline">spawn</code>,·to·start·a·process,·must·be·exported·from159 function·used·in·this·way·by·<code·class="inline">spawn</code>,·to·start·a·process,·must·be·exported·from
160 the·module·(that·is,·in·the·<code·class="inline">-export</code>·at·the·start·of·the·module).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="nc">tut14</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5117754691-1">(</span><span·class="p"·data-group-id="5117754691-1">)</span><span·class="p">.</span><span·class="w">160 the·module·(that·is,·in·the·<code·class="inline">-export</code>·at·the·start·of·the·module).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="nc">tut14</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6237141367-1">(</span><span·class="p"·data-group-id="6237141367-1">)</span><span·class="p">.</span><span·class="w">
161 </span><span·class="ss">hello</span><span·class="w">161 </span><span·class="ss">hello</span><span·class="w">
162 </span><span·class="ss">goodbye</span><span·class="w">162 </span><span·class="ss">goodbye</span><span·class="w">
163 </span><span·class="o">&lt;</span><span·class="mf">0.63</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">163 </span><span·class="o">&lt;</span><span·class="mf">0.63</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
164 </span><span·class="ss">hello</span><span·class="w">164 </span><span·class="ss">hello</span><span·class="w">
165 </span><span·class="ss">goodbye</span><span·class="w">165 </span><span·class="ss">goodbye</span><span·class="w">
166 </span><span·class="ss">hello</span><span·class="w">166 </span><span·class="ss">hello</span><span·class="w">
167 </span><span·class="ss">goodbye</span></code></pre><p>Notice·that·it·did·not·write·&quot;hello&quot;·three·times·and·then·&quot;goodbye&quot;·three·times.167 </span><span·class="ss">goodbye</span></code></pre><p>Notice·that·it·did·not·write·&quot;hello&quot;·three·times·and·then·&quot;goodbye&quot;·three·times.
168 Instead,·the·first·process·wrote·a·&quot;hello&quot;,·the·second·a·&quot;goodbye&quot;,·the·first168 Instead,·the·first·process·wrote·a·&quot;hello&quot;,·the·second·a·&quot;goodbye&quot;,·the·first
169 another·&quot;hello&quot;·and·so·forth.·But·where·did·the·<code·class="inline">&lt;0.63.0&gt;</code>·come·from?·The·return169 another·&quot;hello&quot;·and·so·forth.·But·where·did·the·<code·class="inline">&lt;0.63.0&gt;</code>·come·from?·The·return
170 value·of·a·function·is·the·return·value·of·the·last·&quot;thing&quot;·in·the·function.·The170 value·of·a·function·is·the·return·value·of·the·last·&quot;thing&quot;·in·the·function.·The
171 last·thing·in·the·function·<code·class="inline">start</code>·is</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="7540351072-1">(</span><span·class="ss">tut14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7540351072-2">[</span><span·class="ss">go[·...·truncated·by·diffoscope;·len:·179,·SHA:·fb69327cda19bb03a8faa81bd8ec7555dcd0be16c1989543b0664829a76f0cd6·...·]-1">)</span><span·class="p">.</span></code></pre><p><code·class="inline">spawn</code>·returns·a·<em>process·identifier</em>,·or·<em>pid</em>,·which·uniquely·identifies·the171 last·thing·in·the·function·<code·class="inline">start</code>·is</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="9387714316-1">(</span><span·class="ss">tut14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">say_something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9387714316-2">[</span><span·class="ss">go[·...·truncated·by·diffoscope;·len:·179,·SHA:·1a008c50d9455c9d367c6888b0d25b206ca5145345d40507726764600f8313e9·...·]-1">)</span><span·class="p">.</span></code></pre><p><code·class="inline">spawn</code>·returns·a·<em>process·identifier</em>,·or·<em>pid</em>,·which·uniquely·identifies·the
172 process.·So·<code·class="inline">&lt;0.63.0&gt;</code>·is·the·pid·of·the·<code·class="inline">spawn</code>·function·call·above.·The·next172 process.·So·<code·class="inline">&lt;0.63.0&gt;</code>·is·the·pid·of·the·<code·class="inline">spawn</code>·function·call·above.·The·next
173 example·shows·how·to·use·pids.</p><p>Notice·also·that·~p·is·used·instead·of·~w·in·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#format/2"><code·class="inline">io:format/2</code></a>.·To·quote·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#tilde_p">the·manual</a>:</p><blockquote><p>~p·Writes·the·data·with·standard·syntax·in·the·same·way·as·~w,·but·breaks·terms173 example·shows·how·to·use·pids.</p><p>Notice·also·that·~p·is·used·instead·of·~w·in·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#format/2"><code·class="inline">io:format/2</code></a>.·To·quote·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#tilde_p">the·manual</a>:</p><blockquote><p>~p·Writes·the·data·with·standard·syntax·in·the·same·way·as·~w,·but·breaks·terms
174 whose·printed·representation·is·longer·than·one·line·into·many·lines·and·indents174 whose·printed·representation·is·longer·than·one·line·into·many·lines·and·indents
175 each·line·sensibly.·It·also·tries·to·detect·flat·lists·of·printable·characters·and175 each·line·sensibly.·It·also·tries·to·detect·flat·lists·of·printable·characters·and
176 to·output·these·as·strings</p></blockquote><h2·id="message-passing"·class="section-heading">176 to·output·these·as·strings</p></blockquote><h2·id="message-passing"·class="section-heading">
177 ··<a·href="#message-passing"·class="hover-link">177 ··<a·href="#message-passing"·class="hover-link">
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Message·Passing</span>180 ··<span·class="text">Message·Passing</span>
181 </h2>181 </h2>
182 <p>In·the·following·example·two·processes·are·created·and·they·send·messages·to182 <p>In·the·following·example·two·processes·are·created·and·they·send·messages·to
183 each·other·a·number·of·times.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6856505917-1">(</span><span·class="ss">tut15</span><span·class="p"·data-group-id="6856505917-1">)</span><span·class="p">.</span><span·class="w">183 each·other·a·number·of·times.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4683890998-1">(</span><span·class="ss">tut15</span><span·class="p"·data-group-id="4683890998-1">)</span><span·class="p">.</span><span·class="w">
184 </span><span·class="w">184 </span><span·class="w">
185 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6856505917-2">(</span><span·class="p"·data-group-id="6856505917-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·48622591c64a492284f9700aae3ecb3e36bbe20e0dd8a61ef7ea68a3272c1519·...·]-2">)</span><span·class="p">.</span><span·class="w">185 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4683890998-2">(</span><span·class="p"·data-group-id="4683890998-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·361f3d5978a1e8d7431f2b9381f34600f969f093ffc773264ba97629df23c1be·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
186 </span><span·class="nf">ping</span><span·class="p"·data-group-id="6856505917-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="6856505917-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">186 </span><span·class="nf">ping</span><span·class="p"·data-group-id="4683890998-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="4683890998-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
187 ····</span><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">finished</span><span·class="p">,</span><span·class="w">187 ····</span><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">finished</span><span·class="p">,</span><span·class="w">
188 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6856505917-5">(</span><span·class="s">&quot;ping·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-6">[</span><span·class="p"·data-group-id="68565[·...·truncated·by·diffoscope;·len:·58,·SHA:·73df326e34bb5ef4ca43d32ee5652941c98c0f3cc04b73d6f5a2d671fa4b151e·...·]-5">)</span><span·class="p">;</span><span·class="w">188 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4683890998-5">(</span><span·class="s">&quot;ping·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-6">[</span><span·class="p"·data-group-id="46838[·...·truncated·by·diffoscope;·len:·58,·SHA:·f52721acf7a38464b38acdf1aa5d99035cf3e33f037e8180cd708dd8892c2efb·...·]-5">)</span><span·class="p">;</span><span·class="w">
  
189 </span><span·class="nf">ping</span><span·class="p"·data-group-id="6856505917-7">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="6856505917-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 </span><span·class="nf">ping</span><span·class="p"·data-group-id="4683890998-7">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="4683890998-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-8">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="6856505917-9">(</span><span·class="p"·data-group-id="6856505917-9">)</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·49060b360831feca857ac195534da52d348bcfd9e97d258a9f484daeb6d57052·...·]-8">}</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-8">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="4683890998-9">(</span><span·class="p"·data-group-id="4683890998-9">)</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·ad5c16be13b692ef7a78d9b131a33348b75f7b713252f93235c67722bddd61cb·...·]-8">}</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="k">receive</span><span·class="w">191 ····</span><span·class="k">receive</span><span·class="w">
192 ········</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 ········</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6856505917-10">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-11">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·e5fdc50cb680fe8f01c67e3b3e032451c632f481db241d498670afdc8ad21603·...·]-10">)</span><span·class="w">193 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4683890998-10">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-11">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·7d3c403a37126224c20b7ee6d46cfebd20d276ffb7a12fd061b70013ee918e76·...·]-10">)</span><span·class="w">
194 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">194 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
195 ····</span><span·class="nf">ping</span><span·class="p"·data-group-id="6856505917-12">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="68[·...·truncated·by·diffoscope;·len:·8,·SHA:·fa9479751c94e1516b3103ee1bed51fc333b91ffbb777b1c243e6946a4ae509a·...·]-12">)</span><span·class="p">.</span><span·class="w">195 ····</span><span·class="nf">ping</span><span·class="p"·data-group-id="4683890998-12">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="46[·...·truncated·by·diffoscope;·len:·8,·SHA:·28da0373424dfb72d6bbc33859ffe72f4f2900b8e9504e568765efa242ba7ffb·...·]-12">)</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="nf">pong</span><span·class="p"·data-group-id="6856505917-13">(</span><span·class="p"·data-group-id="6856505917-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">196 </span><span·class="nf">pong</span><span·class="p"·data-group-id="4683890998-13">(</span><span·class="p"·data-group-id="4683890998-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
197 ····</span><span·class="k">receive</span><span·class="w">197 ····</span><span·class="k">receive</span><span·class="w">
198 ········</span><span·class="ss">finished</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 ········</span><span·class="ss">finished</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6856505917-14">(</span><span·class="s">&quot;Pong·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-15">[</span><span·class="p"·data-group-id="685[·...·truncated·by·diffoscope;·len:·61,·SHA:·babd7af5dd09a6cd45546d735212232ce4c31dc000d73acecb07d2fa8e4af4a5·...·]-14">)</span><span·class="p">;</span><span·class="w">199 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4683890998-14">(</span><span·class="s">&quot;Pong·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-15">[</span><span·class="p"·data-group-id="468[·...·truncated·by·diffoscope;·len:·61,·SHA:·b84955f0b360e9d23b5c4eb6ba0f3b1b6bbc6ee595d3ca404fcba0e80d19c477·...·]-14">)</span><span·class="p">;</span><span·class="w">
200 ········</span><span·class="p"·data-group-id="6856505917-16">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="6856505917-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 ········</span><span·class="p"·data-group-id="4683890998-16">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="4683890998-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6856505917-17">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-18">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·ac85dc3a04c7248b4aee4ca99910b24a96046daaffb190e0d608672f5f817351·...·]-17">)</span><span·class="p">,</span><span·class="w">201 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4683890998-17">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-18">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·5222db887b13ad659acab876113f850f529ed192e0b6b4051ff0558384f1b897·...·]-17">)</span><span·class="p">,</span><span·class="w">
202 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">202 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">
203 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="6856505917-19">(</span><span·class="p"·data-group-id="6856505917-19">)</span><span·class="w">203 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="4683890998-19">(</span><span·class="p"·data-group-id="4683890998-19">)</span><span·class="w">
204 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">204 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
205 </span><span·class="nf">start</span><span·class="p"·data-group-id="6856505917-20">(</span><span·class="p"·data-group-id="6856505917-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 </span><span·class="nf">start</span><span·class="p"·data-group-id="4683890998-20">(</span><span·class="p"·data-group-id="4683890998-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 ····</span><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6856505917-21">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-22">[</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·69,·SHA:·9eca58156ea56092497118fd8fb254e6691739116f100b0dd957315d55282811·...·]-21">)</span><span·class="p">,</span><span·class="w">206 ····</span><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4683890998-21">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-22">[</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·69,·SHA:·7228334986f39dbed668ca3f4e0614094c170051f7055e3bedc80ab054248ca4·...·]-21">)</span><span·class="p">,</span><span·class="w">
207 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6856505917-23">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6856505917-24">[</span><span·class="mi">3</span><[·...·truncated·by·diffoscope;·len:·462,·SHA:·96ee641bcdea494990c7725565914aece6bd00ca78a1023c62336333b79f56c9·...·]-1">)</span><span·class="p">.</span><span·class="w">207 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4683890998-23">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4683890998-24">[</span><span·class="mi">3</span><[·...·truncated·by·diffoscope;·len:·462,·SHA:·631f0594c8aaffcdfec5ac0d4ab9d29291c98c060d9eaf9d67fd23ecf88d0daa·...·]-1">)</span><span·class="p">.</span><span·class="w">
208 </span><span·class="p"·data-group-id="5757029587-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut15</span><span·class="p"·data-group-id="5757029587-2">}</span><span·class="gp·unselectable">208 </span><span·class="p"·data-group-id="7303131129-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut15</span><span·class="p"·data-group-id="7303131129-2">}</span><span·class="gp·unselectable">
209 2&gt;·</span><span·class="nc">tut15</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">start</span><span·class="p"·data-group-id="5757029587-3">(</span><span·class="p"·data-group-id="5757029587-3">)</span><span·class="p">.</span><span·class="w">209 2&gt;·</span><span·class="nc">tut15</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">start</span><span·class="p"·data-group-id="7303131129-3">(</span><span·class="p"·data-group-id="7303131129-3">)</span><span·class="p">.</span><span·class="w">
210 </span><span·class="o">&lt;</span><span·class="mf">0.36</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">210 </span><span·class="o">&lt;</span><span·class="mf">0.36</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
211 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">ping</span><span·class="w">211 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">ping</span><span·class="w">
212 </span><span·class="n">Ping</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">pong</span><span·class="w">212 </span><span·class="n">Ping</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">pong</span><span·class="w">
213 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">ping</span><span·class="w">213 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">ping</span><span·class="w">
214 </span><span·class="n">Ping</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">pong</span><span·class="w">214 </span><span·class="n">Ping</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">pong</span><span·class="w">
215 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">ping</span><span·class="w">215 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">ping</span><span·class="w">
216 </span><span·class="n">Ping</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">pong</span><span·class="w">216 </span><span·class="n">Ping</span><span·class="w">·</span><span·class="ss">received</span><span·class="w">·</span><span·class="ss">pong</span><span·class="w">
217 </span><span·class="ss">ping</span><span·class="w">·</span><span·class="ss">finished</span><span·class="w">217 </span><span·class="ss">ping</span><span·class="w">·</span><span·class="ss">finished</span><span·class="w">
218 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">finished</span></code></pre><p>The·function·<code·class="inline">start</code>·first·creates·a·process,·let·us·call·it·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6604319663-1">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6604319663-2">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·6083e9330a3ef9973f14c95ab9aee539a5bbcdfaa4ecdd4862a1c52c660e12d6·...·]-1">)</span></code></pre><p>This·process·executes·<code·class="inline">tut15:pong()</code>.·<code·class="inline">Pong_PID</code>·is·the·process·identity·of·the218 </span><span·class="n">Pong</span><span·class="w">·</span><span·class="ss">finished</span></code></pre><p>The·function·<code·class="inline">start</code>·first·creates·a·process,·let·us·call·it·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="2864736141-1">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2864736141-2">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·7472de68c3781dd589b8ac2716e57cb4d305eb05c8861f52654668fc6fbf5a5d·...·]-1">)</span></code></pre><p>This·process·executes·<code·class="inline">tut15:pong()</code>.·<code·class="inline">Pong_PID</code>·is·the·process·identity·of·the
219 &quot;pong&quot;·process.·The·function·<code·class="inline">start</code>·now·creates·another·process·&quot;ping&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="6737641576-1">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6737641576-2">[</span><span·class="mi">3</span><sp[·...·truncated·by·diffoscope;·len:·575,·SHA:·54063bd4b18c3fb56bdc6ff20790cbe127e6ef7e9a5d0a7c3d5b87767f59b427·...·]-1">)</span></code></pre><p><code·class="inline">&lt;0.36.0&gt;</code>·is·the·return·value·from·the·<code·class="inline">start</code>·function.</p><p>The·process·&quot;pong&quot;·now·does:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">219 &quot;pong&quot;·process.·The·function·<code·class="inline">start</code>·now·creates·another·process·&quot;ping&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="4958771549-1">(</span><span·class="ss">tut15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4958771549-2">[</span><span·class="mi">3</span><sp[·...·truncated·by·diffoscope;·len:·575,·SHA:·7ab5cb0ae0b9c4ada286a2337a0d9e6ac61524ecbc013ffe0835dc4eae0e6e42·...·]-1">)</span></code></pre><p><code·class="inline">&lt;0.36.0&gt;</code>·is·the·return·value·from·the·<code·class="inline">start</code>·function.</p><p>The·process·&quot;pong&quot;·now·does:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">
220 ····</span><span·class="ss">finished</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">220 ····</span><span·class="ss">finished</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
221 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3970496897-1">(</span><span·class="s">&quot;Pong·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3970496897-2">[</span><span·class="p"·data-group-id="39704[·...·truncated·by·diffoscope;·len:·58,·SHA:·563398836fa9e36385ecfb94d89c5a54b9b09d18054f6ca8cfa54f0d6b34df6a·...·]-1">)</span><span·class="p">;</span><span·class="w">221 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1621090052-1">(</span><span·class="s">&quot;Pong·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1621090052-2">[</span><span·class="p"·data-group-id="16210[·...·truncated·by·diffoscope;·len:·58,·SHA:·1f673f9371ecf142aa7a97b648eb2d4e0ee185eacfdec852a929f866e8414e34·...·]-1">)</span><span·class="p">;</span><span·class="w">
222 ····</span><span·class="p"·data-group-id="3970496897-3">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="3970496897-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 ····</span><span·class="p"·data-group-id="1621090052-3">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="1621090052-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3970496897-4">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3970496897-5">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·9c668b1a73d5eea0ae0405913896de2474d6eb2e807d44731280202541907b93·...·]-4">)</span><span·class="p">,</span><span·class="w">223 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1621090052-4">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1621090052-5">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·560b587adbbc7124e282e6a55a971cd3b9589f2e543db979323dcccee01d6a9d·...·]-4">)</span><span·class="p">,</span><span·class="w">
224 ········</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">224 ········</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">
225 ········</span><span·class="nf">pong</span><span·class="p"·data-group-id="3970496897-6">(</span><span·class="p"·data-group-id="3970496897-6">)</span><span·class="w">225 ········</span><span·class="nf">pong</span><span·class="p"·data-group-id="1621090052-6">(</span><span·class="p"·data-group-id="1621090052-6">)</span><span·class="w">
226 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">receive</code>·construct·is·used·to·allow·processes·to·wait·for·messages·from226 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">receive</code>·construct·is·used·to·allow·processes·to·wait·for·messages·from
227 other·processes.·It·has·the·following·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">227 other·processes.·It·has·the·following·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">
228 ···</span><span·class="ss">pattern1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">228 ···</span><span·class="ss">pattern1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
229 ·······</span><span·class="ss">actions1</span><span·class="p">;</span><span·class="w">229 ·······</span><span·class="ss">actions1</span><span·class="p">;</span><span·class="w">
230 ···</span><span·class="ss">pattern2</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">230 ···</span><span·class="ss">pattern2</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
231 ·······</span><span·class="ss">actions2</span><span·class="p">;</span><span·class="w">231 ·······</span><span·class="ss">actions2</span><span·class="p">;</span><span·class="w">
232 ···</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">232 ···</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
Offset 253, 84 lines modifiedOffset 253, 84 lines modified
253 queue·(keeping·the·first·message·and·any·other·messages·in·the·queue).·If·the253 queue·(keeping·the·first·message·and·any·other·messages·in·the·queue).·If·the
254 second·message·does·not·match,·the·third·message·is·tried,·and·so·on,·until·the254 second·message·does·not·match,·the·third·message·is·tried,·and·so·on,·until·the
255 end·of·the·queue·is·reached.·If·the·end·of·the·queue·is·reached,·the·process255 end·of·the·queue·is·reached.·If·the·end·of·the·queue·is·reached,·the·process
256 blocks·(stops·execution)·and·waits·until·a·new·message·is·received·and·this256 blocks·(stops·execution)·and·waits·until·a·new·message·is·received·and·this
257 procedure·is·repeated.</p><p>The·Erlang·implementation·is·&quot;clever&quot;·and·minimizes·the·number·of·times·each257 procedure·is·repeated.</p><p>The·Erlang·implementation·is·&quot;clever&quot;·and·minimizes·the·number·of·times·each
258 message·is·tested·against·the·patterns·in·each·<code·class="inline">receive</code>.</p><p>Now·back·to·the·ping·pong·example.</p><p>&quot;Pong&quot;·is·waiting·for·messages.·If·the·atom·<code·class="inline">finished</code>·is·received,·&quot;pong&quot;258 message·is·tested·against·the·patterns·in·each·<code·class="inline">receive</code>.</p><p>Now·back·to·the·ping·pong·example.</p><p>&quot;Pong&quot;·is·waiting·for·messages.·If·the·atom·<code·class="inline">finished</code>·is·received,·&quot;pong&quot;
259 writes·&quot;Pong·finished&quot;·to·the·output·and,·as·it·has·nothing·more·to·do,259 writes·&quot;Pong·finished&quot;·to·the·output·and,·as·it·has·nothing·more·to·do,
260 terminates.·If·it·receives·a·message·with·the·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7868810552-1">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="7868810552-1">}</span></code></pre><p>it·writes·&quot;Pong·received·ping&quot;·to·the·output·and·sends·the·atom·<code·class="inline">pong</code>·to·the260 terminates.·If·it·receives·a·message·with·the·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0481199261-1">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="0481199261-1">}</span></code></pre><p>it·writes·&quot;Pong·received·ping&quot;·to·the·output·and·sends·the·atom·<code·class="inline">pong</code>·to·the
261 process·&quot;ping&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span></code></pre><p>Notice·how·the·operator·&quot;!&quot;·is·used·to·send·messages.·The·syntax·of·&quot;!&quot;·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Message</span></code></pre><p>That·is,·<code·class="inline">Message</code>·(any·Erlang·term)·is·sent·to·the·process·with·identity·<code·class="inline">Pid</code>.</p><p>After·sending·the·message·<code·class="inline">pong</code>·to·the·process·&quot;ping&quot;,·&quot;pong&quot;·calls·the·<code·class="inline">pong</code>261 process·&quot;ping&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span></code></pre><p>Notice·how·the·operator·&quot;!&quot;·is·used·to·send·messages.·The·syntax·of·&quot;!&quot;·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Message</span></code></pre><p>That·is,·<code·class="inline">Message</code>·(any·Erlang·term)·is·sent·to·the·process·with·identity·<code·class="inline">Pid</code>.</p><p>After·sending·the·message·<code·class="inline">pong</code>·to·the·process·&quot;ping&quot;,·&quot;pong&quot;·calls·the·<code·class="inline">pong</code>
262 function·again,·which·causes·it·to·get·back·to·the·<code·class="inline">receive</code>·again·and·wait·for262 function·again,·which·causes·it·to·get·back·to·the·<code·class="inline">receive</code>·again·and·wait·for
263 another·message.</p><p>Now·let·us·look·at·the·process·&quot;ping&quot;.·Recall·that·it·was·started·by·executing:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">tut15</span><span·class="p">:</span><span·class="nf">ping</span><span·class="p"·data-group-id="3586366662-1">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="3586366662-1">)</span></code></pre><p>Looking·at·the·function·<code·class="inline">ping/2</code>,·the·second·clause·of·<code·class="inline">ping/2</code>·is·executed263 another·message.</p><p>Now·let·us·look·at·the·process·&quot;ping&quot;.·Recall·that·it·was·started·by·executing:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">tut15</span><span·class="p">:</span><span·class="nf">ping</span><span·class="p"·data-group-id="0052917041-1">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="0052917041-1">)</span></code></pre><p>Looking·at·the·function·<code·class="inline">ping/2</code>,·the·second·clause·of·<code·class="inline">ping/2</code>·is·executed
264 since·the·value·of·the·first·argument·is·3·(not·0)·(first·clause·head·is264 since·the·value·of·the·first·argument·is·3·(not·0)·(first·clause·head·is
265 <code·class="inline">ping(0,Pong_PID)</code>,·second·clause·head·is·<code·class="inline">ping(N,Pong_PID)</code>,·so·<code·class="inline">N</code>·becomes·3).</p><p>The·second·clause·sends·a·message·to·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2275917622-1">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2275917622-2">(</span><span·class="p"·data-group-id="2275917622-2">)</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·f6b0745769040747c46e5b1a5041f56d38a4a629143db4d84c215d9a497d3b51·...·]-1">}</span><span·class="p">,</span></code></pre><p><a·href="../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·returns·the·pid·of·the·process·that·executes·<a·href="../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>,·in·this·case·the265 <code·class="inline">ping(0,Pong_PID)</code>,·second·clause·head·is·<code·class="inline">ping(N,Pong_PID)</code>,·so·<code·class="inline">N</code>·becomes·3).</p><p>The·second·clause·sends·a·message·to·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pong_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2588425185-1">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2588425185-2">(</span><span·class="p"·data-group-id="2588425185-2">)</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·ee0fa84dd8c528f40c70103a9f3d2cb0d9f188b74ff25b2ac53a186b5e8b0aa8·...·]-1">}</span><span·class="p">,</span></code></pre><p><a·href="../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·returns·the·pid·of·the·process·that·executes·<a·href="../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>,·in·this·case·the
266 pid·of·&quot;ping&quot;.·(Recall·the·code·for·&quot;pong&quot;,·this·lands·up·in·the·variable266 pid·of·&quot;ping&quot;.·(Recall·the·code·for·&quot;pong&quot;,·this·lands·up·in·the·variable
267 <code·class="inline">Ping_PID</code>·in·the·<code·class="inline">receive</code>·previously·explained.)</p><p>&quot;Ping&quot;·now·waits·for·a·reply·from·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">267 <code·class="inline">Ping_PID</code>·in·the·<code·class="inline">receive</code>·previously·explained.)</p><p>&quot;Ping&quot;·now·waits·for·a·reply·from·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">
268 ····</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">268 ····</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
269 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3272352406-1">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3272352406-2">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·4da03c21806747673a8c0edfe0474b407f775598ad78c76461e923483d8e9810·...·]-1">)</span><span·class="w">269 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9119110427-1">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9119110427-2">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·2d92418e9bebb4cb8c4662c590f68e4d8487ba54f97fd92756687c4fc0b80cd5·...·]-1">)</span><span·class="w">
270 </span><span·class="k">end</span><span·class="p">,</span></code></pre><p>It·writes·&quot;Ping·received·pong&quot;·when·this·reply·arrives,·after·which·&quot;ping&quot;·calls270 </span><span·class="k">end</span><span·class="p">,</span></code></pre><p>It·writes·&quot;Ping·received·pong&quot;·when·this·reply·arrives,·after·which·&quot;ping&quot;·calls
271 the·<code·class="inline">ping</code>·function·again.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">ping</span><span·class="p"·data-group-id="0854402580-1">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="085[·...·truncated·by·diffoscope;·len:·7,·SHA:·deff79a9262913605f6dc8188610efe9d658973012b03927f29d6408d340129f·...·]-1">)</span></code></pre><p><code·class="inline">N-1</code>·causes·the·first·argument·to·be·decremented·until·it·becomes·0.·When·this271 the·<code·class="inline">ping</code>·function·again.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">ping</span><span·class="p"·data-group-id="4781862191-1">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_PID</span><span·class="p"·data-group-id="478[·...·truncated·by·diffoscope;·len:·7,·SHA:·74440e27df63358e4e89946dcc7a5a9313b038ecfa6348b9eccf8a66a8d300d0·...·]-1">)</span></code></pre><p><code·class="inline">N-1</code>·causes·the·first·argument·to·be·decremented·until·it·becomes·0.·When·this
Max diff block lines reached; 163488/213243 bytes (76.67%) of diff not shown.
184 KB
./usr/share/doc/erlang-doc/html/doc/system/create_target.html
    
Offset 138, 21 lines modifiedOffset 138, 21 lines modified
138 ··<span·class="text">Creating·a·Target·System</span>138 ··<span·class="text">Creating·a·Target·System</span>
139 </h2>139 </h2>
140 <p>It·is·assumed·that·you·have·a·working·Erlang/OTP·system·structured·according·to140 <p>It·is·assumed·that·you·have·a·working·Erlang/OTP·system·structured·according·to
141 the·OTP·design·principles.</p><p><em>Step·1.</em>·Create·a·<code·class="inline">.rel</code>·file·(see·the·<a·href="../../lib/sasl-4.2.2/doc/html/rel.html">rel(4)</a>·manual·page·in141 the·OTP·design·principles.</p><p><em>Step·1.</em>·Create·a·<code·class="inline">.rel</code>·file·(see·the·<a·href="../../lib/sasl-4.2.2/doc/html/rel.html">rel(4)</a>·manual·page·in
142 SASL),·which·specifies·the·ERTS·version·and·lists·all·applications·that·are·to142 SASL),·which·specifies·the·ERTS·version·and·lists·all·applications·that·are·to
143 be·included·in·the·new·basic·target·system.·An·example·is·the·following143 be·included·in·the·new·basic·target·system.·An·example·is·the·following
144 <code·class="inline">mysystem.rel</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·mysystem.rel</span><span·class="w">144 <code·class="inline">mysystem.rel</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·mysystem.rel</span><span·class="w">
145 </span><span·class="p"·data-group-id="2676395146-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">145 </span><span·class="p"·data-group-id="8555094480-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">
146 ·</span><span·class="p"·data-group-id="2676395146-2">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;FIRST&quot;</span><span·class="p"·data-group-id="2676395146-2">}</span><span·class="p">,</span><span·class="w">146 ·</span><span·class="p"·data-group-id="8555094480-2">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;FIRST&quot;</span><span·class="p"·data-group-id="8555094480-2">}</span><span·class="p">,</span><span·class="w">
147 ·</span><span·class="p"·data-group-id="2676395146-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.10.4&quot;</span><span·class="p"·data-group-id="2676395146-3">}</span><span·class="p">,</span><span·class="w">147 ·</span><span·class="p"·data-group-id="8555094480-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.10.4&quot;</span><span·class="p"·data-group-id="8555094480-3">}</span><span·class="p">,</span><span·class="w">
148 ·</span><span·class="p"·data-group-id="2676395146-4">[</span><span·class="p"·data-group-id="2676395146-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.16.4&quot;</span><span·class="p"·data-group-id="2676395146-5">}</span><span·class="p">,</span><span·class="w">148 ·</span><span·class="p"·data-group-id="8555094480-4">[</span><span·class="p"·data-group-id="8555094480-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.16.4&quot;</span><span·class="p"·data-group-id="8555094480-5">}</span><span·class="p">,</span><span·class="w">
149 ··</span><span·class="p"·data-group-id="2676395146-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1.19.4&quot;</span><span·class="p"·data-group-id="2676395146-6">}</span><span·class="p">,</span><span·class="w">149 ··</span><span·class="p"·data-group-id="8555094480-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1.19.4&quot;</span><span·class="p"·data-group-id="8555094480-6">}</span><span·class="p">,</span><span·class="w">
150 ··</span><span·class="p"·data-group-id="2676395146-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.3.4&quot;</span><span·class="p"·data-group-id="2676395146-7">}</span><span·class="p">,</span><span·class="w">150 ··</span><span·class="p"·data-group-id="8555094480-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.3.4&quot;</span><span·class="p"·data-group-id="8555094480-7">}</span><span·class="p">,</span><span·class="w">
151 ··</span><span·class="p"·data-group-id="2676395146-8">{</span><span·class="ss">pea</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p"·data-group-id="2676395146-8">}</span><span·class="p"·data-group-id="2676395146-4">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·78b1e514b005dfc45af23953a6c521de91c031239130cb03df76b85c859dbf1e·...·]-1">}</span><span·class="p">.</span></code></pre><p>The·listed·applications·are·not·only·original·Erlang/OTP·applications·but151 ··</span><span·class="p"·data-group-id="8555094480-8">{</span><span·class="ss">pea</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p"·data-group-id="8555094480-8">}</span><span·class="p"·data-group-id="8555094480-4">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·19960ebda5dc3e506108940455f11c9308cc21339f7c35646b34f5ebd77d616c·...·]-1">}</span><span·class="p">.</span></code></pre><p>The·listed·applications·are·not·only·original·Erlang/OTP·applications·but
152 possibly·also·new·applications·that·you·have·written·(here·exemplified·by·the152 possibly·also·new·applications·that·you·have·written·(here·exemplified·by·the
153 application·Pea·(<code·class="inline">pea</code>)).</p><p><em>Step·2.</em>·Start·Erlang/OTP·from·the·directory·where·the·<code·class="inline">mysystem.rel</code>·file153 application·Pea·(<code·class="inline">pea</code>)).</p><p><em>Step·2.</em>·Start·Erlang/OTP·from·the·directory·where·the·<code·class="inline">mysystem.rel</code>·file
154 resides:</p><pre><code·class="text">%·erl·-pa·/home/user/target_system/myapps/pea-1.0/ebin</code></pre><p>The·<code·class="inline">-pa</code>·argument·prepends·the·path·to·the·<code·class="inline">ebin</code>·directory·for154 resides:</p><pre><code·class="text">%·erl·-pa·/home/user/target_system/myapps/pea-1.0/ebin</code></pre><p>The·<code·class="inline">-pa</code>·argument·prepends·the·path·to·the·<code·class="inline">ebin</code>·directory·for
155 the·Pea·application·to·the·code·path.</p><p><em>Step·3.</em>·Create·the·target·system:</p><pre><code·class="text">1&gt;·target_system:create(&quot;mysystem&quot;).</code></pre><p>The·function·<code·class="inline">target_system:create/1</code>·performs·the·following:</p><ol><li><p>Reads·the·file·<code·class="inline">mysystem.rel</code>·and·creates·a·new·file·<code·class="inline">plain.rel</code>.155 the·Pea·application·to·the·code·path.</p><p><em>Step·3.</em>·Create·the·target·system:</p><pre><code·class="text">1&gt;·target_system:create(&quot;mysystem&quot;).</code></pre><p>The·function·<code·class="inline">target_system:create/1</code>·performs·the·following:</p><ol><li><p>Reads·the·file·<code·class="inline">mysystem.rel</code>·and·creates·a·new·file·<code·class="inline">plain.rel</code>.
156 The·new·file·is·identical·to·the·original,·except·that·it·only156 The·new·file·is·identical·to·the·original,·except·that·it·only
157 lists·the·Kernel·and·STDLIB·applications.</p></li><li><p>From·the·files·<code·class="inline">mysystem.rel</code>·and·<code·class="inline">plain.rel</code>·creates·the·files157 lists·the·Kernel·and·STDLIB·applications.</p></li><li><p>From·the·files·<code·class="inline">mysystem.rel</code>·and·<code·class="inline">plain.rel</code>·creates·the·files
158 <code·class="inline">mysystem.script</code>,·<code·class="inline">mysystem.boot</code>,·<code·class="inline">plain.script</code>,·and·<code·class="inline">plain.boot</code>158 <code·class="inline">mysystem.script</code>,·<code·class="inline">mysystem.boot</code>,·<code·class="inline">plain.script</code>,·and·<code·class="inline">plain.boot</code>
Offset 242, 25 lines modifiedOffset 242, 25 lines modified
242 ··<a·href="#creating-the-next-version"·class="hover-link">242 ··<a·href="#creating-the-next-version"·class="hover-link">
243 ····<i·class="ri-link-m"·aria-hidden="true"></i>243 ····<i·class="ri-link-m"·aria-hidden="true"></i>
244 ··</a>244 ··</a>
245 ··<span·class="text">Creating·the·Next·Version</span>245 ··<span·class="text">Creating·the·Next·Version</span>
246 </h2>246 </h2>
247 <p>In·this·example·the·Pea·application·has·been·changed,·and·so·are·the247 <p>In·this·example·the·Pea·application·has·been·changed,·and·so·are·the
248 applications·ERTS,·Kernel,·STDLIB·and·SASL.</p><p><em>Step·1.</em>·Create·the·file·<code·class="inline">.rel</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·mysystem2.rel</span><span·class="w">248 applications·ERTS,·Kernel,·STDLIB·and·SASL.</p><p><em>Step·1.</em>·Create·the·file·<code·class="inline">.rel</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·mysystem2.rel</span><span·class="w">
249 </span><span·class="p"·data-group-id="1046966225-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">249 </span><span·class="p"·data-group-id="5169173253-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">
250 ·</span><span·class="p"·data-group-id="1046966225-2">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SECOND&quot;</span><span·class="p"·data-group-id="1046966225-2">}</span><span·class="p">,</span><span·class="w">250 ·</span><span·class="p"·data-group-id="5169173253-2">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SECOND&quot;</span><span·class="p"·data-group-id="5169173253-2">}</span><span·class="p">,</span><span·class="w">
251 ·</span><span·class="p"·data-group-id="1046966225-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;6.0&quot;</span><span·class="p"·data-group-id="1046966225-3">}</span><span·class="p">,</span><span·class="w">251 ·</span><span·class="p"·data-group-id="5169173253-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;6.0&quot;</span><span·class="p"·data-group-id="5169173253-3">}</span><span·class="p">,</span><span·class="w">
252 ·</span><span·class="p"·data-group-id="1046966225-4">[</span><span·class="p"·data-group-id="1046966225-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;3.0&quot;</span><span·class="p"·data-group-id="1046966225-5">}</span><span·class="p">,</span><span·class="w">252 ·</span><span·class="p"·data-group-id="5169173253-4">[</span><span·class="p"·data-group-id="5169173253-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;3.0&quot;</span><span·class="p"·data-group-id="5169173253-5">}</span><span·class="p">,</span><span·class="w">
253 ··</span><span·class="p"·data-group-id="1046966225-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.0&quot;</span><span·class="p"·data-group-id="1046966225-6">}</span><span·class="p">,</span><span·class="w">253 ··</span><span·class="p"·data-group-id="5169173253-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.0&quot;</span><span·class="p"·data-group-id="5169173253-6">}</span><span·class="p">,</span><span·class="w">
254 ··</span><span·class="p"·data-group-id="1046966225-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.4&quot;</span><span·class="p"·data-group-id="1046966225-7">}</span><span·class="p">,</span><span·class="w">254 ··</span><span·class="p"·data-group-id="5169173253-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.4&quot;</span><span·class="p"·data-group-id="5169173253-7">}</span><span·class="p">,</span><span·class="w">
255 ··</span><span·class="p"·data-group-id="1046966225-8">{</span><span·class="ss">pea</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.0&quot;</span><span·class="p"·data-group-id="1046966225-8">}</span><span·class="p"·data-group-id="1046966225-4">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·2b0ab8f565b70dc0fec6b992df30b42d49bd045b9f3af79749ea8edbf06c783b·...·]-1">}</span><span·class="p">.</span></code></pre><p><em>Step·2.</em>·Create·the·application·upgrade·file·(see255 ··</span><span·class="p"·data-group-id="5169173253-8">{</span><span·class="ss">pea</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.0&quot;</span><span·class="p"·data-group-id="5169173253-8">}</span><span·class="p"·data-group-id="5169173253-4">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·4e1bd15d34895144f5095795b3b55f40a4ff7da283c8279300afdbf888236c5f·...·]-1">}</span><span·class="p">.</span></code></pre><p><em>Step·2.</em>·Create·the·application·upgrade·file·(see
256 <a·href="../../lib/sasl-4.2.2/doc/html/appup.html">appup</a>·in·SASL)·for·Pea,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·pea.appup</span><span·class="w">256 <a·href="../../lib/sasl-4.2.2/doc/html/appup.html">appup</a>·in·SASL)·for·Pea,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·pea.appup</span><span·class="w">
257 </span><span·class="p"·data-group-id="9470174828-1">{</span><span·class="s">&quot;2.0&quot;</span><span·class="p">,</span><span·class="w">257 </span><span·class="p"·data-group-id="5903802443-1">{</span><span·class="s">&quot;2.0&quot;</span><span·class="p">,</span><span·class="w">
258 ·</span><span·class="p"·data-group-id="9470174828-2">[</span><span·class="p"·data-group-id="9470174828-3">{</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9470174828-4">[</span><span·class="p"·data-group-id="9470174828-5">{</span><span·class="[·...·truncated·by·diffoscope;·len:·277,·SHA:·1c10cf1fc56f8578a849cb22bcd9426e4b8581536d722b0749caba30e53db5ec·...·]-2">]</span><span·class="p">,</span><span·class="w">258 ·</span><span·class="p"·data-group-id="5903802443-2">[</span><span·class="p"·data-group-id="5903802443-3">{</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="5903802443-4">[</span><span·class="p"·data-group-id="5903802443-5">{</span><span·class="[·...·truncated·by·diffoscope;·len:·277,·SHA:·009d6540e96e257c1fd5e5eeb5edc520f3f07bd4a0a9af699799280a2df7a8d2·...·]-2">]</span><span·class="p">,</span><span·class="w">
259 ·</span><span·class="p"·data-group-id="9470174828-6">[</span><span·class="p"·data-group-id="9470174828-7">{</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9470174828-8">[</span><span·class="p"·data-group-id="9470174828-9">{</span><span·class="[·...·truncated·by·diffoscope;·len:·330,·SHA:·ba7d142e7425ebf844a7e31e98b7a3851026155cac1d067ea253c21c0e1228f0·...·]-1">}</span><span·class="p">.</span></code></pre><p><em>Step·3.</em>·From·the·directory·where·the·file·<code·class="inline">mysystem2.rel</code>·resides,·start·the259 ·</span><span·class="p"·data-group-id="5903802443-6">[</span><span·class="p"·data-group-id="5903802443-7">{</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="5903802443-8">[</span><span·class="p"·data-group-id="5903802443-9">{</span><span·class="[·...·truncated·by·diffoscope;·len:·330,·SHA:·5d28277928b9d5b5d36e5ab8bd604b1558f3ac77cda374b4080a748e983cc2d1·...·]-1">}</span><span·class="p">.</span></code></pre><p><em>Step·3.</em>·From·the·directory·where·the·file·<code·class="inline">mysystem2.rel</code>·resides,·start·the
260 Erlang/OTP·system,·giving·the·path·to·the·new·version·of·Pea:</p><pre><code·class="text">%·erl·-pa·/home/user/target_system/myapps/pea-2.0/ebin</code></pre><p><em>Step·4.</em>·Create·the·release·upgrade·file·(see·<a·href="../../lib/sasl-4.2.2/doc/html/relup.html">relup</a>260 Erlang/OTP·system,·giving·the·path·to·the·new·version·of·Pea:</p><pre><code·class="text">%·erl·-pa·/home/user/target_system/myapps/pea-2.0/ebin</code></pre><p><em>Step·4.</em>·Create·the·release·upgrade·file·(see·<a·href="../../lib/sasl-4.2.2/doc/html/relup.html">relup</a>
261 in·SASL):</p><pre><code·class="text">1&gt;·systools:make_relup(&quot;mysystem2&quot;,[&quot;mysystem&quot;],[&quot;mysystem&quot;],261 in·SASL):</p><pre><code·class="text">1&gt;·systools:make_relup(&quot;mysystem2&quot;,[&quot;mysystem&quot;],[&quot;mysystem&quot;],
262 ····[{path,[&quot;/home/user/target_system/myapps/pea-1.0/ebin&quot;,262 ····[{path,[&quot;/home/user/target_system/myapps/pea-1.0/ebin&quot;,
263 ····&quot;/my/old/erlang/lib/*/ebin&quot;]}]).</code></pre><p>Here·<code·class="inline">&quot;mysystem&quot;</code>·is·the·base·release·and·<code·class="inline">&quot;mysystem2&quot;</code>·is·the·release·to263 ····&quot;/my/old/erlang/lib/*/ebin&quot;]}]).</code></pre><p>Here·<code·class="inline">&quot;mysystem&quot;</code>·is·the·base·release·and·<code·class="inline">&quot;mysystem2&quot;</code>·is·the·release·to
264 upgrade·to.</p><p>The·<code·class="inline">path</code>·option·is·used·for·pointing·out·the·old·version·of·all·applications.264 upgrade·to.</p><p>The·<code·class="inline">path</code>·option·is·used·for·pointing·out·the·old·version·of·all·applications.
265 (The·new·versions·are·already·in·the·code·path·-·assuming·of·course·that·the265 (The·new·versions·are·already·in·the·code·path·-·assuming·of·course·that·the
266 Erlang·node·on·which·this·is·executed·is·running·the·correct·version·of266 Erlang·node·on·which·this·is·executed·is·running·the·correct·version·of
Offset 292, 21 lines modifiedOffset 292, 21 lines modified
292 {continue_after_restart,&quot;FIRST&quot;,[]}292 {continue_after_restart,&quot;FIRST&quot;,[]}
293 heart:·Tue·Apr··1·12:15:10·2014:·Erlang·has·closed.293 heart:·Tue·Apr··1·12:15:10·2014:·Erlang·has·closed.
294 heart:·Tue·Apr··1·12:15:11·2014:·Executed·&quot;/usr/local/erl-target/bin/start·/usr/local/erl-target/releases/new_start_erl.data&quot;·-&gt;·0.·Terminating.294 heart:·Tue·Apr··1·12:15:11·2014:·Executed·&quot;/usr/local/erl-target/bin/start·/usr/local/erl-target/releases/new_start_erl.data&quot;·-&gt;·0.·Terminating.
295 [End]</code></pre><p>The·above·return·value·and·output·after·the·call·to295 [End]</code></pre><p>The·above·return·value·and·output·after·the·call·to
296 <a·href="../../lib/sasl-4.2.2/doc/html/release_handler.html#install_release/1"><code·class="inline">release_handler:install_release/1</code></a>·means·that·the·<code·class="inline">release_handler</code>·has296 <a·href="../../lib/sasl-4.2.2/doc/html/release_handler.html#install_release/1"><code·class="inline">release_handler:install_release/1</code></a>·means·that·the·<code·class="inline">release_handler</code>·has
297 restarted·the·node·by·using·<code·class="inline">heart</code>.·This·is·always·done·when·the·upgrade297 restarted·the·node·by·using·<code·class="inline">heart</code>.·This·is·always·done·when·the·upgrade
298 involves·a·change·of·the·applications·ERTS,·Kernel,·STDLIB,·or·SASL.·For·more298 involves·a·change·of·the·applications·ERTS,·Kernel,·STDLIB,·or·SASL.·For·more
299 information,·see·<a·href="upgrade.html">Upgrade·when·Erlang/OTP·has·Changed</a>.</p><p>The·node·is·accessible·through·a·new·pipe:</p><pre><code·class="text">%·/usr/local/erl-target/bin/to_erl·/tmp/erlang.pipe.2</code></pre><p>List·the·available·releases·in·the·system:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">release_handler</span><span·class="p">:</span><span·class="nf">which_releases</span><span·class="p"·data-group-id="0939477956-1">(</span><span·class="p"·data-group-id="0939477956-1">)</span><span·class="p">.</span><span·class="w">299 information,·see·<a·href="upgrade.html">Upgrade·when·Erlang/OTP·has·Changed</a>.</p><p>The·node·is·accessible·through·a·new·pipe:</p><pre><code·class="text">%·/usr/local/erl-target/bin/to_erl·/tmp/erlang.pipe.2</code></pre><p>List·the·available·releases·in·the·system:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">release_handler</span><span·class="p">:</span><span·class="nf">which_releases</span><span·class="p"·data-group-id="7906264665-1">(</span><span·class="p"·data-group-id="7906264665-1">)</span><span·class="p">.</span><span·class="w">
300 </span><span·class="p"·data-group-id="0939477956-2">[</span><span·class="p"·data-group-id="0939477956-3">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="s">&quot;SECOND&quot;</span><span·class="p">,</span><span·class="w">300 </span><span·class="p"·data-group-id="7906264665-2">[</span><span·class="p"·data-group-id="7906264665-3">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="s">&quot;SECOND&quot;</span><span·class="p">,</span><span·class="w">
301 ··</span><span·class="p"·data-group-id="0939477956-4">[</span><span·class="s">&quot;kernel-3.0&quot;</span><span·class="p">,</span><span·class="s">&quot;stdlib-2.0&quot;</span><span·class="p">,</span><span·class="s">&quot;sasl-2.4&quot;</span><span·class="p">,</span><span·class="s">&quot;pea-2.0[·...·truncated·by·diffoscope;·len:·54,·SHA:·7a255fd969171713b65d09e7ca40876d3679cdcb7f4fdef9cef6f65837b0df2f·...·]-4">]</span><span·class="p">,</span><span·class="w">301 ··</span><span·class="p"·data-group-id="7906264665-4">[</span><span·class="s">&quot;kernel-3.0&quot;</span><span·class="p">,</span><span·class="s">&quot;stdlib-2.0&quot;</span><span·class="p">,</span><span·class="s">&quot;sasl-2.4&quot;</span><span·class="p">,</span><span·class="s">&quot;pea-2.0[·...·truncated·by·diffoscope;·len:·54,·SHA:·1345b60a7c08664f8e99f5bde6bacaf790edbe86be72a5e2483774cbb217609d·...·]-4">]</span><span·class="p">,</span><span·class="w">
302 ··</span><span·class="ss">current</span><span·class="p"·data-group-id="0939477956-3">}</span><span·class="p">,</span><span·class="w">302 ··</span><span·class="ss">current</span><span·class="p"·data-group-id="7906264665-3">}</span><span·class="p">,</span><span·class="w">
303 ·</span><span·class="p"·data-group-id="0939477956-5">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRST&quot;</span><span·class="p">,</span><span·class="w">303 ·</span><span·class="p"·data-group-id="7906264665-5">{</span><span·class="s">&quot;MYSYSTEM&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRST&quot;</span><span·class="p">,</span><span·class="w">
304 ··</span><span·class="p"·data-group-id="0939477956-6">[</span><span·class="s">&quot;kernel-2.16.4&quot;</span><span·class="p">,</span><span·class="s">&quot;stdlib-1.19.4&quot;</span><span·class="p">,</span><span·class="s">&quot;sasl-2.3.4&quot;</span><span·class="p">,</span><span·class="s">&quot[·...·truncated·by·diffoscope;·len:·62,·SHA:·00ce826b98739da094fea1f4b15929dbde2ced989bb231e3fcf17b4274d0cf45·...·]-6">]</span><span·class="p">,</span><span·class="w">304 ··</span><span·class="p"·data-group-id="7906264665-6">[</span><span·class="s">&quot;kernel-2.16.4&quot;</span><span·class="p">,</span><span·class="s">&quot;stdlib-1.19.4&quot;</span><span·class="p">,</span><span·class="s">&quot;sasl-2.3.4&quot;</span><span·class="p">,</span><span·class="s">&quot[·...·truncated·by·diffoscope;·len:·62,·SHA:·7da50fb731175333363dc0aa9dfc527d32d5b0991a37f4514020734afb0c39f2·...·]-6">]</span><span·class="p">,</span><span·class="w">
305 ··</span><span·class="ss">permanent</span><span·class="p"·data-group-id="0939477956-5">}</span><span·class="p"·data-group-id="0939477956-2">]</span></code></pre><p>Our·new·release,·&quot;SECOND&quot;,·is·now·the·current·release,·but·we·can·also·see·that305 ··</span><span·class="ss">permanent</span><span·class="p"·data-group-id="7906264665-5">}</span><span·class="p"·data-group-id="7906264665-2">]</span></code></pre><p>Our·new·release,·&quot;SECOND&quot;,·is·now·the·current·release,·but·we·can·also·see·that
306 our·&quot;FIRST&quot;·release·is·still·permanent.·This·means·that·if·the·node·would·be306 our·&quot;FIRST&quot;·release·is·still·permanent.·This·means·that·if·the·node·would·be
307 restarted·now,·it·would·come·up·running·the·&quot;FIRST&quot;·release·again.</p><p><em>Step·3.</em>·Make·the·new·release·permanent:</p><pre><code·class="text">2&gt;·release_handler:make_permanent(&quot;SECOND&quot;).</code></pre><p>Check·the·releases·again:</p><pre><code·class="c">3&gt;·release_handler:which_releases().307 restarted·now,·it·would·come·up·running·the·&quot;FIRST&quot;·release·again.</p><p><em>Step·3.</em>·Make·the·new·release·permanent:</p><pre><code·class="text">2&gt;·release_handler:make_permanent(&quot;SECOND&quot;).</code></pre><p>Check·the·releases·again:</p><pre><code·class="c">3&gt;·release_handler:which_releases().
308 [{&quot;MYSYSTEM&quot;,&quot;SECOND&quot;,308 [{&quot;MYSYSTEM&quot;,&quot;SECOND&quot;,
309 ··[&quot;kernel-3.0&quot;,&quot;stdlib-2.0&quot;,&quot;sasl-2.4&quot;,&quot;pea-2.0&quot;],309 ··[&quot;kernel-3.0&quot;,&quot;stdlib-2.0&quot;,&quot;sasl-2.4&quot;,&quot;pea-2.0&quot;],
310 ··permanent},310 ··permanent},
311 ·{&quot;MYSYSTEM&quot;,&quot;FIRST&quot;,311 ·{&quot;MYSYSTEM&quot;,&quot;FIRST&quot;,
312 ··[&quot;kernel-2.16.4&quot;,&quot;stdlib-1.19.4&quot;,&quot;sasl-2.3.4&quot;,&quot;pea-1.0&quot;],312 ··[&quot;kernel-2.16.4&quot;,&quot;stdlib-1.19.4&quot;,&quot;sasl-2.3.4&quot;,&quot;pea-1.0&quot;],
Offset 315, 268 lines modifiedOffset 315, 268 lines modified
315 ··<a·href="#listing-of-target_system-erl"·class="hover-link">315 ··<a·href="#listing-of-target_system-erl"·class="hover-link">
316 ····<i·class="ri-link-m"·aria-hidden="true"></i>316 ····<i·class="ri-link-m"·aria-hidden="true"></i>
317 ··</a>317 ··</a>
318 ··<span·class="text">Listing·of·target_system.erl</span>318 ··<span·class="text">Listing·of·target_system.erl</span>
319 </h2>319 </h2>
320 <p>This·module·can·also·be·found·in·the·<code·class="inline">examples</code>·directory·of·the·SASL320 <p>This·module·can·also·be·found·in·the·<code·class="inline">examples</code>·directory·of·the·SASL
321 application.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">321 application.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
322 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7295969901-1">(</span><span·class="ss">target_system</span><span·class="p"·data-group-id="7295969901-1">)</span><span·class="p">.</span><span·class="w">322 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1685579687-1">(</span><span·class="ss">target_system</span><span·class="p"·data-group-id="1685579687-1">)</span><span·class="p">.</span><span·class="w">
323 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7295969901-2">(</span><span·class="p"·data-group-id="7295969901-3">[</span><span·class="ss">create</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">create</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·247,·SHA:·1200c7c9ac4eff8d559144c9faf53c3b7549ec06e700987bf1c12fb5a7c75c01·...·]-2">)</span><span·class="p">.</span><span·class="w">323 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1685579687-2">(</span><span·class="p"·data-group-id="1685579687-3">[</span><span·class="ss">create</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">create</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·247,·SHA:·b8337ca9806bd4174270a1e88da0e248ff5a0354cf00af4ed2fe6843801ebba2·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
324 </span><span·class="c1">%%·Note:·RelFileName·below·is·the·*stem*·without·trailing·.rel,</span><span·class="w">324 </span><span·class="c1">%%·Note:·RelFileName·below·is·the·*stem*·without·trailing·.rel,</span><span·class="w">
325 </span><span·class="c1">%%·.script·etc.</span><span·class="w">325 </span><span·class="c1">%%·.script·etc.</span><span·class="w">
326 </span><span·class="c1">%%</span><span·class="w">326 </span><span·class="c1">%%</span><span·class="w">
  
327 </span><span·class="c1">%%·create(RelFileName)</span><span·class="w">327 </span><span·class="c1">%%·create(RelFileName)</span><span·class="w">
328 </span><span·class="c1">%%</span><span·class="w">328 </span><span·class="c1">%%</span><span·class="w">
329 </span><span·class="nf">create</span><span·class="p"·data-group-id="7295969901-4">(</span><span·class="n">RelFileName</span><span·class="p"·data-group-id="7295969901-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">329 </span><span·class="nf">create</span><span·class="p"·data-group-id="1685579687-4">(</span><span·class="n">RelFileName</span><span·class="p"·data-group-id="1685579687-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
330 ····</span><span·class="nf">create</span><span·class="p"·data-group-id="7295969901-5">(</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="p"·data-group-id="7295969901-6">[</span><span·class="p"·data-group-id="7295969901-6">]</span><span·class="p"·data-group-id="7295969901-5">)</span><span·class="p">.</span><span·class="w">330 ····</span><span·class="nf">create</span><span·class="p"·data-group-id="1685579687-5">(</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="p"·data-group-id="1685579687-6">[</span><span·class="p"·data-group-id="1685579687-6">]</span><span·class="p"·data-group-id="1685579687-5">)</span><span·class="p">.</span><span·class="w">
  
331 </span><span·class="nf">create</span><span·class="p"·data-group-id="7295969901-7">(</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="n">SystoolsOpts</span><span·class="p"·data-group-id="7295969901-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">331 </span><span·class="nf">create</span><span·class="p"·data-group-id="1685579687-7">(</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="n">SystoolsOpts</span><span·class="p"·data-group-id="1685579687-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
332 ····</span><span·class="n">RelFile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RelFileName</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;.rel&quot;</span><span·class="p">,</span><span·class="w">332 ····</span><span·class="n">RelFile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RelFileName</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;.rel&quot;</span><span·class="p">,</span><span·class="w">
333 ····</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">dirname</span><span·class="p"·data-group-id="7295969901-8">(</span><span·class="n">RelFileName</span><span·class="p"·data-group-id="7295969901-8">)</span><span·class="p">,</span><span·class="w">333 ····</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">dirname</span><span·class="p"·data-group-id="1685579687-8">(</span><span·class="n">RelFileName</span><span·class="p"·data-group-id="1685579687-8">)</span><span·class="p">,</span><span·class="w">
334 ····</span><span·class="n">PlainRelFileName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="7295969901-9">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="s">&quot;plain&quot;</span><span·class="p"·data-group-id="7295969901-9">)</span><span·class="p">,</span><span·class="w">334 ····</span><span·class="n">PlainRelFileName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="1685579687-9">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="s">&quot;plain&quot;</span><span·class="p"·data-group-id="1685579687-9">)</span><span·class="p">,</span><span·class="w">
335 ····</span><span·class="n">PlainRelFile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PlainRelFileName</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;.rel&quot;</span><span·class="p">,</span><span·class="w">335 ····</span><span·class="n">PlainRelFile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PlainRelFileName</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;.rel&quot;</span><span·class="p">,</span><span·class="w">
336 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7295969901-10">(</span><span·class="s">&quot;Reading·file:·~ts·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7295969901-11">[</span><span·class="n">RelFile</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·7650c5a5b5067214520065c260cb8ebe057cd3253a0702fb6d37b01994173fbd·...·]-10">)</span><span·class="p">,</span><span·class="w">336 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1685579687-10">(</span><span·class="s">&quot;Reading·file:·~ts·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1685579687-11">[</span><span·class="n">RelFile</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·5d923fa931b427aaf20d9f0f303b86c4c8193df893a2feaa572935ce31104701·...·]-10">)</span><span·class="p">,</span><span·class="w">
337 ····</span><span·class="p"·data-group-id="7295969901-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7295969901-13">[</span><span·class="n">RelSpec</span><span·class="p"·data-group-id="7295969901-13">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·313,·SHA:·0c92ed10da50c9e6049bb7e3438a1c2d8f31f75cc3b0b67150da64f7ae6ae345·...·]-14">)</span><span·class="p">,</span><span·class="w">337 ····</span><span·class="p"·data-group-id="1685579687-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1685579687-13">[</span><span·class="n">RelSpec</span><span·class="p"·data-group-id="1685579687-13">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·313,·SHA:·3ad58d3bfbb56c473df4fa07e506290c7e1c58308234acc9e7adabbb1a89f7dd·...·]-14">)</span><span·class="p">,</span><span·class="w">
338 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7295969901-15">(</span><span·class="s">&quot;Creating·file:·~ts·from·~ts·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">338 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1685579687-15">(</span><span·class="s">&quot;Creating·file:·~ts·from·~ts·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
339 ··············</span><span·class="p"·data-group-id="7295969901-16">[</span><span·class="n">PlainRelFile</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelFile</span><span·class="p"·data-group-id="7295969901-16">]</span><span·class="p"·data-group-id="7295969901-15">)</span><span·class="p">,</span><span·class="w">339 ··············</span><span·class="p"·data-group-id="1685579687-16">[</span><span·class="n">PlainRelFile</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelFile</span><span·class="p"·data-group-id="1685579687-16">]</span><span·class="p"·data-group-id="1685579687-15">)</span><span·class="p">,</span><span·class="w">
340 ····</span><span·class="p"·data-group-id="7295969901-17">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">340 ····</span><span·class="p"·data-group-id="1685579687-17">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">
341 ·····</span><span·class="p"·data-group-id="7295969901-18">{</span><span·class="n">RelName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelVsn</span><span·class="p"·data-group-id="7295969901-18">}</span><span·class="p">,</span><span·class="w">341 ·····</span><span·class="p"·data-group-id="1685579687-18">{</span><span·class="n">RelName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelVsn</span><span·class="p"·data-group-id="1685579687-18">}</span><span·class="p">,</span><span·class="w">
342 ·····</span><span·class="p"·data-group-id="7295969901-19">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErtsVsn</span><span·class="p"·data-group-id="7295969901-19">}</span><span·class="p">,</span><span·class="w">342 ·····</span><span·class="p"·data-group-id="1685579687-19">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErtsVsn</span><span·class="p"·data-group-id="1685579687-19">}</span><span·class="p">,</span><span·class="w">
343 ·····</span><span·class="n">AppVsns</span><span·class="p"·data-group-id="7295969901-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RelSpec</span><span·class="p">,</span><span·class="w">343 ·····</span><span·class="n">AppVsns</span><span·class="p"·data-group-id="1685579687-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RelSpec</span><span·class="p">,</span><span·class="w">
344 ····</span><span·class="n">PlainRelSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7295969901-20">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">344 ····</span><span·class="n">PlainRelSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1685579687-20">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">
345 ····················</span><span·class="p"·data-group-id="7295969901-21">{</span><span·class="n">RelName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelVsn</span><span·class="p"·data-group-id="7295969901-21">}</span><span·class="p">,</span><span·class="w">345 ····················</span><span·class="p"·data-group-id="1685579687-21">{</span><span·class="n">RelName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelVsn</span><span·class="p"·data-group-id="1685579687-21">}</span><span·class="p">,</span><span·class="w">
346 ····················</span><span·class="p"·data-group-id="7295969901-22">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErtsVsn</span><span·class="p"·data-group-id="7295969901-22">}</span><span·class="p">,</span><span·class="w">346 ····················</span><span·class="p"·data-group-id="1685579687-22">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErtsVsn</span><span·class="p"·data-group-id="1685579687-22">}</span><span·class="p">,</span><span·class="w">
347 ····················</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="7295969901-23">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7295969901-24">(</span><span·class="p"·data-group-id="7295969901-25">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·e1007aeb04bcf28406bcb38a1be70b97079489de6ca3f3092bb636b7852d8698·...·]-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">347 ····················</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="1685579687-23">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1685579687-24">(</span><span·class="p"·data-group-id="1685579687-25">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·97dc31077e300de0978f656415b1bb76d799d5d27d855889d8067d25bf4e3441·...·]-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
348 ·········································</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">348 ·········································</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
349 ····································</span><span·class="p"·data-group-id="7295969901-26">(</span><span·class="p"·data-group-id="7295969901-27">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="7295969901-27">}</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·efdfd75efcee9c91af0d2680f8e097dc1254d058efa5bffc99f778cb85e93f0f·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">349 ····································</span><span·class="p"·data-group-id="1685579687-26">(</span><span·class="p"·data-group-id="1685579687-27">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="1685579687-27">}</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·0bd3c29d32a048e6498dc2cf641133076ec1f80ac195661b66886721e3446784·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
350 ·········································</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">350 ·········································</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
351 ····································</span><span·class="p"·data-group-id="7295969901-28">(</span><span·class="p">_</span><span·class="p"·data-group-id="7295969901-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">351 ····································</span><span·class="p"·data-group-id="1685579687-28">(</span><span·class="p">_</span><span·class="p"·data-group-id="1685579687-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
352 ·········································</span><span·class="ss">false</span><span·class="w">352 ·········································</span><span·class="ss">false</span><span·class="w">
353 ·································</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsns</span><span·class="p"·data-group-id="7295969901-23">)</span><span·class="w">353 ·································</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsns</span><span·class="p"·data-group-id="1685579687-23">)</span><span·class="w">
354 ···················</span><span·class="p"·data-group-id="7295969901-20">}</span><span·class="p">,</span><span·class="w">354 ···················</span><span·class="p"·data-group-id="1685579687-20">}</span><span·class="p">,</span><span·class="w">
355 ····</span><span·class="p"·data-group-id="7295969901-29">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="7295969901-29">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·387,·SHA:·979542d005b2e74dece47a8b30944355210cbf2ae2faf9503251bc606d1e9e07·...·]-30">)</span><span·class="p">,</span><span·class="w">355 ····</span><span·class="p"·data-group-id="1685579687-29">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="1685579687-29">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·387,·SHA:·096c7c601a3e2826d221223458531d62f66cc5c9e58d82e3fe45e7c28dbc1e12·...·]-30">)</span><span·class="p">,</span><span·class="w">
356 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7295969901-32">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">.</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·206,·SHA:·ed7613679d0afe1d0d50f11b154f6946388e73059e18de65e1e4aa3dc9efbd79·...·]-32">)</span><span·class="p">,</span><span·class="w">356 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1685579687-32">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">.</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·206,·SHA:·232c5885df65717adfce57aab2b484d60ba29e5d0e6dd3a760b37338fd0912f8·...·]-32">)</span><span·class="p">,</span><span·class="w">
357 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="7295969901-34">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="7295969901-34">)</span><span·class="p">,</span><span·class="w">357 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1685579687-34">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="1685579687-34">)</span><span·class="p">,</span><span·class="w">
  
358 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7295969901-35">(</span><span·class="s">&quot;Making·\&quot;~ts.script\&quot;·and·\&quot;~ts.boot\&quot;·files·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">358 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1685579687-35">(</span><span·class="s">&quot;Making·\&quot;~ts.script\&quot;·and·\&quot;~ts.boot\&quot;·files·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
359 »       ······</span><span·class="p"·data-group-id="7295969901-36">[</span><span·class="n">PlainRelFileName</span><span·class="p">,</span><span·class="n">PlainRelFileName</span><span·class="p"·data-group-id="7295969901-36">]</span><span·class="p"·data-group-id="7295969901-35">)</span><span·class="p">,</span><span·class="w">359 »       ······</span><span·class="p"·data-group-id="1685579687-36">[</span><span·class="n">PlainRelFileName</span><span·class="p">,</span><span·class="n">PlainRelFileName</span><span·class="p"·data-group-id="1685579687-36">]</span><span·class="p"·data-group-id="1685579687-35">)</span><span·class="p">,</span><span·class="w">
360 ····</span><span·class="nf">make_script</span><span·class="p"·data-group-id="7295969901-37">(</span><span·class="n">PlainRelFileName</span><span·class="p">,</span><span·class="n">SystoolsOpts</span><span·class="p"·data-group-id="7295969901-37">)</span><span·class="p">,</span><span·class="w">360 ····</span><span·class="nf">make_script</span><span·class="p"·data-group-id="1685579687-37">(</span><span·class="n">PlainRelFileName</span><span·class="p">,</span><span·class="n">SystoolsOpts</span><span·class="p"·data-group-id="1685579687-37">)</span><span·class="p">,</span><span·class="w">
  
361 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7295969901-38">(</span><span·class="s">&quot;Making·\&quot;~ts.script\&quot;·and·\&quot;~ts.boot\&quot;·files·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">361 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1685579687-38">(</span><span·class="s">&quot;Making·\&quot;~ts.script\&quot;·and·\&quot;~ts.boot\&quot;·files·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
362 ··············</span><span·class="p"·data-group-id="7295969901-39">[</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelFileName</span><span·class="p"·data-group-id="7295969901-39">]</span><span·class="p"·data-group-id="7295969901-38">)</span><span·class="p">,</span><span·class="w">362 ··············</span><span·class="p"·data-group-id="1685579687-39">[</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RelFileName</span><span·class="p"·data-group-id="1685579687-39">]</span><span·class="p"·data-group-id="1685579687-38">)</span><span·class="p">,</span><span·class="w">
363 ····</span><span·class="nf">make_script</span><span·class="p"·data-group-id="7295969901-40">(</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="n">SystoolsOpts</span><span·class="p"·data-group-id="7295969901-40">)</span><span·class="p">,</span><span·class="w">363 ····</span><span·class="nf">make_script</span><span·class="p"·data-group-id="1685579687-40">(</span><span·class="n">RelFileName</span><span·class="p">,</span><span·class="n">SystoolsOpts</span><span·class="p"·data-group-id="1685579687-40">)</span><span·class="p">,</span><span·class="w">
  
364 ····</span><span·class="n">TarFileName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RelFileName</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;.tar.gz&quot;</span><span·class="p">,</span><span·class="w">364 ····</span><span·class="n">TarFileName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RelFileName</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;.tar.gz&quot;</span><span·class="p">,</span><span·class="w">
365 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7295969901-41">(</span><span·class="s">&quot;Creating·tar·file·~ts·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7295969901-42">[</span><span·class="n">TarFil[·...·truncated·by·diffoscope;·len:·107,·SHA:·d28e078b0e6e60642392589a3b1e9c40fe1b21c802419ab91dbb610cd391605f·...·]-41">)</span><span·class="p">,</span><span·class="w">365 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1685579687-41">(</span><span·class="s">&quot;Creating·tar·file·~ts·...</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1685579687-42">[</span><span·class="n">TarFil[·...·truncated·by·diffoscope;·len:·107,·SHA:·40951afd01a8e877f0cb0eba2169d360bd1dcd10650c53794071b940ffd43c26·...·]-41">)</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 141572/188703 bytes (75.02%) of diff not shown.
74.2 KB
./usr/share/doc/erlang-doc/html/doc/system/data_types.html
    
Offset 192, 18 lines modifiedOffset 192, 18 lines modified
192 ··</a>192 ··</a>
193 ··<span·class="text">Representation·of·Floating·Point·Numbers</span>193 ··<span·class="text">Representation·of·Floating·Point·Numbers</span>
194 </h3>194 </h3>
195 <p>When·working·with·floats·you·may·not·see·what·you·expect·when·printing·or·doing195 <p>When·working·with·floats·you·may·not·see·what·you·expect·when·printing·or·doing
196 arithmetic·operations.·This·is·because·floats·are·represented·by·a·fixed·number196 arithmetic·operations.·This·is·because·floats·are·represented·by·a·fixed·number
197 of·bits·in·a·base-2·system·while·printed·floats·are·represented·with·a·base-10197 of·bits·in·a·base-2·system·while·printed·floats·are·represented·with·a·base-10
198 system.·Erlang·uses·64-bit·floats.·Here·are·examples·of·this·phenomenon:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="mf">0.1</span><span·class="o">+</span><span·class="mf">0.2</span><span·class="p">.</span><span·class="w">198 system.·Erlang·uses·64-bit·floats.·Here·are·examples·of·this·phenomenon:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="mf">0.1</span><span·class="o">+</span><span·class="mf">0.2</span><span·class="p">.</span><span·class="w">
199 </span><span·class="mf">0.30000000000000004</span></code></pre><p>The·real·numbers·<code·class="inline">0.1</code>·and·<code·class="inline">0.2</code>·cannot·be·represented·exactly·as·floats.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="1576268345-1">{</span><span·class="mf">36028797018963968.0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">36028797018963968</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mf">36028797018963968.0</span><span·class="p">,</span><span·class="w">199 </span><span·class="mf">0.30000000000000004</span></code></pre><p>The·real·numbers·<code·class="inline">0.1</code>·and·<code·class="inline">0.2</code>·cannot·be·represented·exactly·as·floats.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="4843216581-1">{</span><span·class="mf">36028797018963968.0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">36028797018963968</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mf">36028797018963968.0</span><span·class="p">,</span><span·class="w">
200 ··</span><span·class="mf">36028797018963970.0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">36028797018963970</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mf">36028797018963970.0</span><span·class="p"·data-group-id="1576268345-1">}</span><span·class="p">.</span><span·class="w">200 ··</span><span·class="mf">36028797018963970.0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">36028797018963970</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mf">36028797018963970.0</span><span·class="p"·data-group-id="4843216581-1">}</span><span·class="p">.</span><span·class="w">
201 </span><span·class="p"·data-group-id="1576268345-2">{</span><span·class="mf">3.602879701896397e16</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">201 </span><span·class="p"·data-group-id="4843216581-2">{</span><span·class="mf">3.602879701896397e16</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">
202 ·</span><span·class="mf">3.602879701896397e16</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="1576268345-2">}</span><span·class="p">.</span></code></pre><p>The·value·<code·class="inline">36028797018963968</code>·can·be·represented·exactly·as·a·float·value·but202 ·</span><span·class="mf">3.602879701896397e16</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="4843216581-2">}</span><span·class="p">.</span></code></pre><p>The·value·<code·class="inline">36028797018963968</code>·can·be·represented·exactly·as·a·float·value·but
203 Erlang's·pretty·printer·rounds·<code·class="inline">36028797018963968.0</code>·to·<code·class="inline">3.602879701896397e16</code>203 Erlang's·pretty·printer·rounds·<code·class="inline">36028797018963968.0</code>·to·<code·class="inline">3.602879701896397e16</code>
204 (<code·class="inline">=36028797018963970.0</code>)·as·all·values·in·the·range204 (<code·class="inline">=36028797018963970.0</code>)·as·all·values·in·the·range
205 <code·class="inline">[36028797018963966.0,·36028797018963972.0]</code>·are·represented·by205 <code·class="inline">[36028797018963966.0,·36028797018963972.0]</code>·are·represented·by
206 <code·class="inline">36028797018963968.0</code>.</p><p>For·more·information·about·floats·and·issues·with·them·see:</p><ul><li><a·href="https://floating-point-gui.de/">What·Every·Programmer·Should·Know·About·Floating-Point·Arithmetic</a></li><li><a·href="https://0.30000000000000004.com/">0.30000000000000004.com/</a></li><li><a·href="https://docs.python.org/3/tutorial/floatingpoint.html">Floating·Point·Arithmetic:·Issues·and·Limitations</a></li></ul><p>If·you·need·to·work·with·exact·decimal·fractions,·for·instance·to·represent206 <code·class="inline">36028797018963968.0</code>.</p><p>For·more·information·about·floats·and·issues·with·them·see:</p><ul><li><a·href="https://floating-point-gui.de/">What·Every·Programmer·Should·Know·About·Floating-Point·Arithmetic</a></li><li><a·href="https://0.30000000000000004.com/">0.30000000000000004.com/</a></li><li><a·href="https://docs.python.org/3/tutorial/floatingpoint.html">Floating·Point·Arithmetic:·Issues·and·Limitations</a></li></ul><p>If·you·need·to·work·with·exact·decimal·fractions,·for·instance·to·represent
207 money,·it·is·recommended·to·use·a·library·that·handles·that,·or·work·in207 money,·it·is·recommended·to·use·a·library·that·handles·that,·or·work·in
208 cents·instead·of·dollars·or·euros·so·that·decimal·fractions·are·not·needed.</p><p>Also·note·that·Erlang's·floats·do·not·exactly·match·IEEE·754·floats,208 cents·instead·of·dollars·or·euros·so·that·decimal·fractions·are·not·needed.</p><p>Also·note·that·Erlang's·floats·do·not·exactly·match·IEEE·754·floats,
209 in·that·neither·<em>Inf</em>·nor·<em>NaN</em>·are·supported·in·Erlang.·Any209 in·that·neither·<em>Inf</em>·nor·<em>NaN</em>·are·supported·in·Erlang.·Any
Offset 237, 52 lines modifiedOffset 237, 52 lines modified
237 by·eight·are·called·<em>binaries</em>.</p><p><em>Examples:</em></p><pre><code·class="text">1&gt;·&lt;&lt;10,20&gt;&gt;.237 by·eight·are·called·<em>binaries</em>.</p><p><em>Examples:</em></p><pre><code·class="text">1&gt;·&lt;&lt;10,20&gt;&gt;.
238 &lt;&lt;10,20&gt;&gt;238 &lt;&lt;10,20&gt;&gt;
239 2&gt;·&lt;&lt;&quot;ABC&quot;&gt;&gt;.239 2&gt;·&lt;&lt;&quot;ABC&quot;&gt;&gt;.
240 &lt;&lt;&quot;ABC&quot;&gt;&gt;240 &lt;&lt;&quot;ABC&quot;&gt;&gt;
241 3&gt;·&lt;&lt;1:1,0:1&gt;&gt;.241 3&gt;·&lt;&lt;1:1,0:1&gt;&gt;.
242 &lt;&lt;2:2&gt;&gt;</code></pre><p>The·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_bitstring/1"><code·class="inline">is_bitstring/1</code></a>·BIF·tests·whether·a242 &lt;&lt;2:2&gt;&gt;</code></pre><p>The·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_bitstring/1"><code·class="inline">is_bitstring/1</code></a>·BIF·tests·whether·a
243 term·is·a·bit·string,·and·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_binary/1"><code·class="inline">is_binary/1</code></a>243 term·is·a·bit·string,·and·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_binary/1"><code·class="inline">is_binary/1</code></a>
244 BIF·tests·whether·a·term·is·a·binary.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">is_bitstring</span><span·class="p"·data-group-id="7947179805-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7947179805-1">)</span><span·class="p">.</span><span·class="w">244 BIF·tests·whether·a·term·is·a·binary.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">is_bitstring</span><span·class="p"·data-group-id="8056029572-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8056029572-1">)</span><span·class="p">.</span><span·class="w">
245 </span><span·class="ss">true</span><span·class="gp·unselectable">245 </span><span·class="ss">true</span><span·class="gp·unselectable">
246 2&gt;·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="7947179805-2">(</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7947179805-2">)</span><span·class="p">.</span><span·class="w">246 2&gt;·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="8056029572-2">(</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8056029572-2">)</span><span·class="p">.</span><span·class="w">
247 </span><span·class="ss">false</span><span·class="gp·unselectable">247 </span><span·class="ss">false</span><span·class="gp·unselectable">
248 3&gt;·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="7947179805-3">(</span><span·class="p">&lt;&lt;</span><span·class="mi">42</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7947179805-3">)</span><span·class="p">.</span><span·class="w">248 3&gt;·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="8056029572-3">(</span><span·class="p">&lt;&lt;</span><span·class="mi">42</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8056029572-3">)</span><span·class="p">.</span><span·class="w">
249 </span><span·class="ss">true</span><span·class="w">249 </span><span·class="ss">true</span><span·class="w">
250 </span></code></pre><p>For·more·examples,·see·<a·href="../../doc/system/bit_syntax.html">Programming·Examples</a>.</p><h2·id="reference"·class="section-heading">250 </span></code></pre><p>For·more·examples,·see·<a·href="../../doc/system/bit_syntax.html">Programming·Examples</a>.</p><h2·id="reference"·class="section-heading">
251 ··<a·href="#reference"·class="hover-link">251 ··<a·href="#reference"·class="hover-link">
252 ····<i·class="ri-link-m"·aria-hidden="true"></i>252 ····<i·class="ri-link-m"·aria-hidden="true"></i>
253 ··</a>253 ··</a>
254 ··<span·class="text">Reference</span>254 ··<span·class="text">Reference</span>
255 </h2>255 </h2>
256 <p>A·term·that·is·<a·href="../../doc/system/system_limits.html#unique_references">unique</a>256 <p>A·term·that·is·<a·href="../../doc/system/system_limits.html#unique_references">unique</a>
257 among·connected·nodes.·A·reference·is·created·by·calling·the257 among·connected·nodes.·A·reference·is·created·by·calling·the
258 <a·href="../../erts-15.0.1/doc/html/erlang.html#make_ref/0"><code·class="inline">make_ref/0</code></a>·BIF.·The258 <a·href="../../erts-15.0.1/doc/html/erlang.html#make_ref/0"><code·class="inline">make_ref/0</code></a>·BIF.·The
259 <a·href="../../erts-15.0.1/doc/html/erlang.html#is_reference/1"><code·class="inline">is_reference/1</code></a>·BIF·tests·whether·a·term259 <a·href="../../erts-15.0.1/doc/html/erlang.html#is_reference/1"><code·class="inline">is_reference/1</code></a>·BIF·tests·whether·a·term
260 is·a·reference.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·data-group-id="3412350916-1">(</span><span·class="p"·data-group-id="3412350916-1">)</span><span·class="p">.</span><span·class="w">260 is·a·reference.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·data-group-id="8636751991-1">(</span><span·class="p"·data-group-id="8636751991-1">)</span><span·class="p">.</span><span·class="w">
261 </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.76482849</span><span·class="p">.</span><span·class="mf">3801088007.198204</span><span·class="o">&gt;</span><span·class="gp·unselectable">261 </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.76482849</span><span·class="p">.</span><span·class="mf">3801088007.198204</span><span·class="o">&gt;</span><span·class="gp·unselectable">
262 2&gt;·</span><span·class="nf">is_reference</span><span·class="p"·data-group-id="3412350916-2">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="3412350916-2">)</span><span·class="p">.</span><span·class="w">262 2&gt;·</span><span·class="nf">is_reference</span><span·class="p"·data-group-id="8636751991-2">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="8636751991-2">)</span><span·class="p">.</span><span·class="w">
263 </span><span·class="ss">true</span></code></pre><h2·id="fun"·class="section-heading">263 </span><span·class="ss">true</span></code></pre><h2·id="fun"·class="section-heading">
264 ··<a·href="#fun"·class="hover-link">264 ··<a·href="#fun"·class="hover-link">
265 ····<i·class="ri-link-m"·aria-hidden="true"></i>265 ····<i·class="ri-link-m"·aria-hidden="true"></i>
266 ··</a>266 ··</a>
267 ··<span·class="text">Fun</span>267 ··<span·class="text">Fun</span>
268 </h2>268 </h2>
269 <p>A·fun·is·a·functional·object.·Funs·make·it·possible·to·create·an·anonymous269 <p>A·fun·is·a·functional·object.·Funs·make·it·possible·to·create·an·anonymous
270 function·and·pass·the·function·itself··not·its·name··as·argument·to·other270 function·and·pass·the·function·itself··not·its·name··as·argument·to·other
271 functions.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Fun1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="8864822669-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="8864822669-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="o">+</span><span·class="mi">1</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">271 functions.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Fun1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2164316410-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="2164316410-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="o">+</span><span·class="mi">1</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
272 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">6.39074546</span><span·class="o">&gt;</span><span·class="gp·unselectable">272 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">6.39074546</span><span·class="o">&gt;</span><span·class="gp·unselectable">
273 2&gt;·</span><span·class="n">Fun1</span><span·class="p"·data-group-id="8864822669-2">(</span><span·class="mi">2</span><span·class="p"·data-group-id="8864822669-2">)</span><span·class="p">.</span><span·class="w">273 2&gt;·</span><span·class="n">Fun1</span><span·class="p"·data-group-id="2164316410-2">(</span><span·class="mi">2</span><span·class="p"·data-group-id="2164316410-2">)</span><span·class="p">.</span><span·class="w">
274 </span><span·class="mi">3</span></code></pre><p>The·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_function/1"><code·class="inline">is_function/1</code></a>·and·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_function/2"><code·class="inline">is_function/2</code></a>274 </span><span·class="mi">3</span></code></pre><p>The·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_function/1"><code·class="inline">is_function/1</code></a>·and·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_function/2"><code·class="inline">is_function/2</code></a>
275 BIFs·tests·whether·a·term·is·a·fun.</p><p><em>Examples</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6743086624-1">(</span><span·class="p"·data-group-id="6743086624-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">275 BIFs·tests·whether·a·term·is·a·fun.</p><p><em>Examples</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="0510932664-1">(</span><span·class="p"·data-group-id="0510932664-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
276 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">43.105768164</span><span·class="o">&gt;</span><span·class="gp·unselectable">276 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">43.105768164</span><span·class="o">&gt;</span><span·class="gp·unselectable">
277 2&gt;·</span><span·class="nf">is_function</span><span·class="p"·data-group-id="6743086624-2">(</span><span·class="n">F</span><span·class="p"·data-group-id="6743086624-2">)</span><span·class="p">.</span><span·class="w">277 2&gt;·</span><span·class="nf">is_function</span><span·class="p"·data-group-id="0510932664-2">(</span><span·class="n">F</span><span·class="p"·data-group-id="0510932664-2">)</span><span·class="p">.</span><span·class="w">
278 </span><span·class="ss">true</span><span·class="gp·unselectable">278 </span><span·class="ss">true</span><span·class="gp·unselectable">
279 3&gt;·</span><span·class="nf">is_function</span><span·class="p"·data-group-id="6743086624-3">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="6743086624-3">)</span><span·class="p">.</span><span·class="w">279 3&gt;·</span><span·class="nf">is_function</span><span·class="p"·data-group-id="0510932664-3">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="0510932664-3">)</span><span·class="p">.</span><span·class="w">
280 </span><span·class="ss">true</span><span·class="gp·unselectable">280 </span><span·class="ss">true</span><span·class="gp·unselectable">
281 4&gt;·</span><span·class="nf">is_function</span><span·class="p"·data-group-id="6743086624-4">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="6743086624-4">)</span><span·class="p">.</span><span·class="w">281 4&gt;·</span><span·class="nf">is_function</span><span·class="p"·data-group-id="0510932664-4">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0510932664-4">)</span><span·class="p">.</span><span·class="w">
282 </span><span·class="ss">false</span></code></pre><p>Read·more·about·funs·in·<a·href="expressions.html#fun-expressions">Fun·Expressions</a>.·For·more282 </span><span·class="ss">false</span></code></pre><p>Read·more·about·funs·in·<a·href="expressions.html#fun-expressions">Fun·Expressions</a>.·For·more
283 examples,·see·<a·href="../../doc/system/funs.html">Programming·Examples</a>.</p><h2·id="port-identifier"·class="section-heading">283 examples,·see·<a·href="../../doc/system/funs.html">Programming·Examples</a>.</p><h2·id="port-identifier"·class="section-heading">
284 ··<a·href="#port-identifier"·class="hover-link">284 ··<a·href="#port-identifier"·class="hover-link">
285 ····<i·class="ri-link-m"·aria-hidden="true"></i>285 ····<i·class="ri-link-m"·aria-hidden="true"></i>
286 ··</a>286 ··</a>
287 ··<span·class="text">Port·Identifier</span>287 ··<span·class="text">Port·Identifier</span>
288 </h2>288 </h2>
Offset 300, 94 lines modifiedOffset 300, 94 lines modified
300 for·a·new·process·after·a·while.</p><p>The·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·returns·the·Pid·of·the·calling·process.·When300 for·a·new·process·after·a·while.</p><p>The·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·returns·the·Pid·of·the·calling·process.·When
301 <a·href="ref_man_processes.html#process-creation">creating·a·new·process</a>,·the·parent301 <a·href="ref_man_processes.html#process-creation">creating·a·new·process</a>,·the·parent
302 process·will·be·able·to·get·the·Pid·of·the·child·process·either·via·the·return302 process·will·be·able·to·get·the·Pid·of·the·child·process·either·via·the·return
303 value,·as·is·the·case·when·calling·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/3"><code·class="inline">spawn/3</code></a>·BIF,·or·via303 value,·as·is·the·case·when·calling·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/3"><code·class="inline">spawn/3</code></a>·BIF,·or·via
304 a·message,·which·is·the·case·when·calling·the304 a·message,·which·is·the·case·when·calling·the
305 <a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_request/5"><code·class="inline">spawn_request/5</code></a>·BIF.·A·Pid·is·typically·used·when305 <a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_request/5"><code·class="inline">spawn_request/5</code></a>·BIF.·A·Pid·is·typically·used·when
306 when·sending·a·process·a·<a·href="ref_man_processes.html#signals">signal</a>.·The306 when·sending·a·process·a·<a·href="ref_man_processes.html#signals">signal</a>.·The
307 <a·href="../../erts-15.0.1/doc/html/erlang.html#is_pid/1"><code·class="inline">is_pid/1</code></a>·BIF·tests·whether·a·term·is·a·Pid.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3928504353-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="3928504353-1">)</span><span·class="p">.</span><span·class="w">307 <a·href="../../erts-15.0.1/doc/html/erlang.html#is_pid/1"><code·class="inline">is_pid/1</code></a>·BIF·tests·whether·a·term·is·a·Pid.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0323097946-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="0323097946-1">)</span><span·class="p">.</span><span·class="w">
308 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3928504353-2">(</span><span·class="p"·data-group-id="3928504353-3">[</span><span·class="ss">loop</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="3928504353-3">]</span><span·class="p"·data-group-id="3928504353-2">)</span><span·class="p">.</span><span·class="w">308 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0323097946-2">(</span><span·class="p"·data-group-id="0323097946-3">[</span><span·class="ss">loop</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0323097946-3">]</span><span·class="p"·data-group-id="0323097946-2">)</span><span·class="p">.</span><span·class="w">
  
309 </span><span·class="nf">loop</span><span·class="p"·data-group-id="3928504353-4">(</span><span·class="p"·data-group-id="3928504353-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">309 </span><span·class="nf">loop</span><span·class="p"·data-group-id="0323097946-4">(</span><span·class="p"·data-group-id="0323097946-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
310 ····</span><span·class="k">receive</span><span·class="w">310 ····</span><span·class="k">receive</span><span·class="w">
311 ········</span><span·class="ss">who_are_you</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">311 ········</span><span·class="ss">who_are_you</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
312 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3928504353-5">(</span><span·class="s">&quot;I·am·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3928504353-6">[</span><span·class="nf">s[·...·truncated·by·diffoscope;·len:·210,·SHA:·d8e600132b34d6d64e4c9145e5eb77109f646a06294c473f4b1f444f0ce7350a·...·]-5">)</span><span·class="p">,</span><span·class="w">312 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0323097946-5">(</span><span·class="s">&quot;I·am·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0323097946-6">[</span><span·class="nf">s[·...·truncated·by·diffoscope;·len:·210,·SHA:·a25ab8540e87a96efa84f09f773906be1cf296c293a692a56d0b79ec7483e847·...·]-5">)</span><span·class="p">,</span><span·class="w">
313 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="3928504353-8">(</span><span·class="p"·data-group-id="3928504353-8">)</span><span·class="w">313 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="0323097946-8">(</span><span·class="p"·data-group-id="0323097946-8">)</span><span·class="w">
314 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">314 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
315 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3928504353-9">(</span><span·class="ss">m</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3928504353-10">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·b3c3e6df48b033cd51e2440674bad879379a9462120193239fd46358d69d54f9·...·]-9">)</span><span·class="p">.</span><span·class="w">315 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0323097946-9">(</span><span·class="ss">m</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0323097946-10">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·8aa8b0e756b9a9eff9190e166bff90521b0768966a8fe2bb4d8fa9d5c05d35ee·...·]-9">)</span><span·class="p">.</span><span·class="w">
316 </span><span·class="o">&lt;</span><span·class="mf">0.58</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">316 </span><span·class="o">&lt;</span><span·class="mf">0.58</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
317 2&gt;·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">who_are_you</span><span·class="p">.</span><span·class="w">317 2&gt;·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">who_are_you</span><span·class="p">.</span><span·class="w">
318 </span><span·class="n">I</span><span·class="w">·</span><span·class="ss">am</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.58</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">318 </span><span·class="n">I</span><span·class="w">·</span><span·class="ss">am</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.58</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
319 </span><span·class="ss">who_are_you</span></code></pre><p>Read·more·about·processes·in·<a·href="ref_man_processes.html">Processes</a>.</p><h2·id="tuple"·class="section-heading">319 </span><span·class="ss">who_are_you</span></code></pre><p>Read·more·about·processes·in·<a·href="ref_man_processes.html">Processes</a>.</p><h2·id="tuple"·class="section-heading">
320 ··<a·href="#tuple"·class="hover-link">320 ··<a·href="#tuple"·class="hover-link">
321 ····<i·class="ri-link-m"·aria-hidden="true"></i>321 ····<i·class="ri-link-m"·aria-hidden="true"></i>
322 ··</a>322 ··</a>
323 ··<span·class="text">Tuple</span>323 ··<span·class="text">Tuple</span>
324 </h2>324 </h2>
325 <p>A·tuple·is·a·compound·data·type·with·a·fixed·number·of·terms:</p><pre><code·class="text">{Term1,...,TermN}</code></pre><p>Each·term·<code·class="inline">Term</code>·in·the·tuple·is·called·an·<em>element</em>.·The·number·of·elements·is325 <p>A·tuple·is·a·compound·data·type·with·a·fixed·number·of·terms:</p><pre><code·class="text">{Term1,...,TermN}</code></pre><p>Each·term·<code·class="inline">Term</code>·in·the·tuple·is·called·an·<em>element</em>.·The·number·of·elements·is
326 said·to·be·the·<em>size</em>·of·the·tuple.</p><p>There·exists·a·number·of·BIFs·to·manipulate·tuples.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8922833022-1">{</span><span·class="ss">adam</span><span·class="p">,</span><span·class="mi">24</span><span·class="p">,</span><span·class="p"·data-group-id="8922833022-2">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·187e90555a36c1a286b2ec9353514de7bdc26ca0f0b24a227bea0e5420079eee·...·]-1">}</span><span·class="p">.</span><span·class="w">326 said·to·be·the·<em>size</em>·of·the·tuple.</p><p>There·exists·a·number·of·BIFs·to·manipulate·tuples.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2989506623-1">{</span><span·class="ss">adam</span><span·class="p">,</span><span·class="mi">24</span><span·class="p">,</span><span·class="p"·data-group-id="2989506623-2">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·924fff40a8a9b94ff26cbff47e4936c1ee89c6a5e1cadb4f064f4b88f4188a04·...·]-1">}</span><span·class="p">.</span><span·class="w">
327 </span><span·class="p"·data-group-id="8922833022-3">{</span><span·class="ss">adam</span><span·class="p">,</span><span·class="mi">24</span><span·class="p">,</span><span·class="p"·data-group-id="8922833022-4">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·402f6cd0ff856d666c67151b236496f9b05ec27e244cc41078890462c68b8f0f·...·]-3">}</span><span·class="gp·unselectable">327 </span><span·class="p"·data-group-id="2989506623-3">{</span><span·class="ss">adam</span><span·class="p">,</span><span·class="mi">24</span><span·class="p">,</span><span·class="p"·data-group-id="2989506623-4">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·1f8c71f2e8679cd5532d79b63da9f656ffb33d3ecf596f4fad5984f8c814f853·...·]-3">}</span><span·class="gp·unselectable">
328 2&gt;·</span><span·class="nf">element</span><span·class="p"·data-group-id="8922833022-5">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">P</span><span·class="p"·data-group-id="8922833022-5">)</span><span·class="p">.</span><span·class="w">328 2&gt;·</span><span·class="nf">element</span><span·class="p"·data-group-id="2989506623-5">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">P</span><span·class="p"·data-group-id="2989506623-5">)</span><span·class="p">.</span><span·class="w">
329 </span><span·class="ss">adam</span><span·class="gp·unselectable">329 </span><span·class="ss">adam</span><span·class="gp·unselectable">
330 3&gt;·</span><span·class="nf">element</span><span·class="p"·data-group-id="8922833022-6">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="n">P</span><span·class="p"·data-group-id="8922833022-6">)</span><span·class="p">.</span><span·class="w">330 3&gt;·</span><span·class="nf">element</span><span·class="p"·data-group-id="2989506623-6">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="n">P</span><span·class="p"·data-group-id="2989506623-6">)</span><span·class="p">.</span><span·class="w">
331 </span><span·class="p"·data-group-id="8922833022-7">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><span·class="p"·data-group-id="8922833022-7">}</span><span·class="gp·unselectable">331 </span><span·class="p"·data-group-id="2989506623-7">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><span·class="p"·data-group-id="2989506623-7">}</span><span·class="gp·unselectable">
332 4&gt;·</span><span·class="n">P2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">setelement</span><span·class="p"·data-group-id="8922833022-8">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="mi">25</span><span·class="p"·data-group-id="8922833022-8">)</span><span·class="p">.</span><span·class="w">332 4&gt;·</span><span·class="n">P2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">setelement</span><span·class="p"·data-group-id="2989506623-8">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="mi">25</span><span·class="p"·data-group-id="2989506623-8">)</span><span·class="p">.</span><span·class="w">
333 </span><span·class="p"·data-group-id="8922833022-9">{</span><span·class="ss">adam</span><span·class="p">,</span><span·class="mi">25</span><span·class="p">,</span><span·class="p"·data-group-id="8922833022-10">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span>[·...·truncated·by·diffoscope;·len:·95,·SHA:·119e3fb5925d4749af826aebebc06e7be9db0720c6b27585be3d7732e78827fe·...·]-9">}</span><span·class="gp·unselectable">333 </span><span·class="p"·data-group-id="2989506623-9">{</span><span·class="ss">adam</span><span·class="p">,</span><span·class="mi">25</span><span·class="p">,</span><span·class="p"·data-group-id="2989506623-10">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span>[·...·truncated·by·diffoscope;·len:·95,·SHA:·4b48862cb0141aaa42712525c12bdabf99d8dd9f374ae0985a6e7492a02b025c·...·]-9">}</span><span·class="gp·unselectable">
334 5&gt;·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="8922833022-11">(</span><span·class="n">P</span><span·class="p"·data-group-id="8922833022-11">)</span><span·class="p">.</span><span·class="w">334 5&gt;·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="2989506623-11">(</span><span·class="n">P</span><span·class="p"·data-group-id="2989506623-11">)</span><span·class="p">.</span><span·class="w">
335 </span><span·class="mi">3</span><span·class="gp·unselectable">335 </span><span·class="mi">3</span><span·class="gp·unselectable">
336 6&gt;·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="8922833022-12">(</span><span·class="p"·data-group-id="8922833022-13">{</span><span·class="p"·data-group-id="8922833022-13">}</span><span·class="p"·data-group-id="8922833022-12">)</span><span·class="p">.</span><span·class="w">336 6&gt;·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="2989506623-12">(</span><span·class="p"·data-group-id="2989506623-13">{</span><span·class="p"·data-group-id="2989506623-13">}</span><span·class="p"·data-group-id="2989506623-12">)</span><span·class="p">.</span><span·class="w">
337 </span><span·class="mi">0</span><span·class="gp·unselectable">337 </span><span·class="mi">0</span><span·class="gp·unselectable">
338 7&gt;·</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="8922833022-14">(</span><span·class="p"·data-group-id="8922833022-15">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="8922833022-15">}</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·7a3f84d7877d92644aca41add0d036d3ad7a02de047a69d8250403a643cb1220·...·]-14">)</span><span·class="p">.</span><span·class="w">338 7&gt;·</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="2989506623-14">(</span><span·class="p"·data-group-id="2989506623-15">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="2989506623-15">}</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·803f46b03a5e5217bd03f8480d5e2f5702987fa79fe0d34a811e805deea24e47·...·]-14">)</span><span·class="p">.</span><span·class="w">
339 </span><span·class="ss">true</span></code></pre><h2·id="map"·class="section-heading">339 </span><span·class="ss">true</span></code></pre><h2·id="map"·class="section-heading">
340 ··<a·href="#map"·class="hover-link">340 ··<a·href="#map"·class="hover-link">
341 ····<i·class="ri-link-m"·aria-hidden="true"></i>341 ····<i·class="ri-link-m"·aria-hidden="true"></i>
342 ··</a>342 ··</a>
343 ··<span·class="text">Map</span>343 ··<span·class="text">Map</span>
344 </h2>344 </h2>
345 <p>A·map·is·a·compound·data·type·with·a·variable·number·of·key-value·associations:</p><pre><code·class="text">#{Key1·=&gt;·Value1,·...,·KeyN·=&gt;·ValueN}</code></pre><p>Each·key-value·association·in·the·map·is·called·an·<em>association·pair</em>.·The·key345 <p>A·map·is·a·compound·data·type·with·a·variable·number·of·key-value·associations:</p><pre><code·class="text">#{Key1·=&gt;·Value1,·...,·KeyN·=&gt;·ValueN}</code></pre><p>Each·key-value·association·in·the·map·is·called·an·<em>association·pair</em>.·The·key
346 and·value·parts·of·the·pair·are·called·<em>elements</em>.·The·number·of·association346 and·value·parts·of·the·pair·are·called·<em>elements</em>.·The·number·of·association
347 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><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">M1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4293272663-1">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">adam</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">age</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·453,·SHA:·4461de15679af37262da3cfaee0a2daf614fa52e2b3c8534b6daf19f1808e6ab·...·]-1">}</span><span·class="p">.</span><span·class="w">347 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><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">M1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0523544580-1">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">adam</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">age</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·453,·SHA:·de959e1fe8627e3714cf4319fe6130696167d1b4603853aaf9deb071fcdaf760·...·]-1">}</span><span·class="p">.</span><span·class="w">
348 </span><span·class="p"·data-group-id="4293272663-3">#{</span><span·class="ss">age</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">24</span><span·class="p">,</span><span·class="ss">date</span><span·class="w">·</span><span·class="p">=&gt;</span>[·...·truncated·by·diffoscope;·len:·405,·SHA:·058c4557db08e6bcf5d1c2d6d2785dc3ef251dc5fe58990cfe1a4b6f555bb39a·...·]-3">}</span><span·class="gp·unselectable">348 </span><span·class="p"·data-group-id="0523544580-3">#{</span><span·class="ss">age</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">24</span><span·class="p">,</span><span·class="ss">date</span><span·class="w">·</span><span·class="p">=&gt;</span>[·...·truncated·by·diffoscope;·len:·405,·SHA:·6790c31cec7027171c4a2add94f6689ae95b2c88be19c52ee39db7ce6ed5dc78·...·]-3">}</span><span·class="gp·unselectable">
349 2&gt;·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="4293272663-5">(</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M1</span><span·class="p"·data-group-id="4293272663-5">)</span><span·class="p">.</span><span·class="w">349 2&gt;·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="0523544580-5">(</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M1</span><span·class="p"·data-group-id="0523544580-5">)</span><span·class="p">.</span><span·class="w">
350 </span><span·class="ss">adam</span><span·class="gp·unselectable">350 </span><span·class="ss">adam</span><span·class="gp·unselectable">
351 3&gt;·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="4293272663-6">(</span><span·class="ss">date</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M1</span><span·class="p"·data-group-id="4293272663-6">)</span><span·class="p">.</span><span·class="w">351 3&gt;·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="0523544580-6">(</span><span·class="ss">date</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M1</span><span·class="p"·data-group-id="0523544580-6">)</span><span·class="p">.</span><span·class="w">
352 </span><span·class="p"·data-group-id="4293272663-7">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><span·class="p"·data-group-id="4293272663-7">}</span><span·class="gp·unselectable">352 </span><span·class="p"·data-group-id="0523544580-7">{</span><span·class="ss">july</span><span·class="p">,</span><span·class="mi">29</span><span·class="p"·data-group-id="0523544580-7">}</span><span·class="gp·unselectable">
Max diff block lines reached; 35623/75851 bytes (46.96%) of diff not shown.
58.4 KB
./usr/share/doc/erlang-doc/html/doc/system/design_principles.html
    
Offset 152, 135 lines modifiedOffset 152, 135 lines modified
152 the·code·for·a·process·in·a·generic·part·(a·behaviour·module)·and·a·specific152 the·code·for·a·process·in·a·generic·part·(a·behaviour·module)·and·a·specific
153 part·(a·<em>callback·module</em>).</p><p>The·behaviour·module·is·part·of·Erlang/OTP.·To·implement·a·process·such·as·a153 part·(a·<em>callback·module</em>).</p><p>The·behaviour·module·is·part·of·Erlang/OTP.·To·implement·a·process·such·as·a
154 supervisor,·the·user·only·needs·to·implement·the·callback·module,·which·is·to154 supervisor,·the·user·only·needs·to·implement·the·callback·module,·which·is·to
155 export·a·pre-defined·set·of·functions,·the·<em>callback·functions</em>.</p><p>The·following·example·illustrate·how·code·can·be·divided·into·a·generic·and·a155 export·a·pre-defined·set·of·functions,·the·<em>callback·functions</em>.</p><p>The·following·example·illustrate·how·code·can·be·divided·into·a·generic·and·a
156 specific·part.·Consider·the·following·code·(written·in·plain·Erlang)·for·a156 specific·part.·Consider·the·following·code·(written·in·plain·Erlang)·for·a
157 simple·server,·which·keeps·track·of·a·number·of·&quot;channels&quot;.·Other·processes·can157 simple·server,·which·keeps·track·of·a·number·of·&quot;channels&quot;.·Other·processes·can
158 allocate·and·free·the·channels·by·calling·the·functions·<code·class="inline">alloc/0</code>·and·<code·class="inline">free/1</code>,158 allocate·and·free·the·channels·by·calling·the·functions·<code·class="inline">alloc/0</code>·and·<code·class="inline">free/1</code>,
159 respectively.</p><p><a·href=""·id="ch1"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4149215123-1">(</span><span·class="ss">ch1</span><span·class="p"·data-group-id="4149215123-1">)</span><span·class="p">.</span><span·class="w"> 
160 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4149215123-2">(</span><span·class="p"·data-group-id="4149215123-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class[·...·truncated·by·diffoscope;·len:·85,·SHA:·c83aa379918fa858e4ed4a47ee6141946d1928bd1b23d77372864956fca9fdab·...·]">)</span><span·class="p">.</span><span·class="w">159 respectively.</p><p><a·href=""·id="ch1"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1805184831-1">(</span><span·class="ss">ch1</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·17,·SHA:·f2317fad3016c10a32cef2578c9840415a7f75e1af2e573306ead4b93881ae3c·...·]">)</span><span·class="p">.</span><span·class="w">
 160 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1805184831-2">(</span><span·class="p"·data-group-id="1805184831-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1805184831-3">]</span><span·class="p"·data-group-id="1805184831-2">)</span><span·class="p">.</span><span·class="w">
161 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4149215123-4">(</span><span·class="p"·data-group-id="4149215123-5">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·3ac0676b4ed3829fa211cdbadeb230eb0ef9115e0a9deb8fa690bd0636550b2e·...·]-4">)</span><span·class="p">.</span><span·class="w">161 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1805184831-4">(</span><span·class="p"·data-group-id="1805184831-5">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·152398964095cce499805e573a49b27009a0a398807919f0073919cf33a664d6·...·]-4">)</span><span·class="p">.</span><span·class="w">
162 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4149215123-6">(</span><span·class="p"·data-group-id="4149215123-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4149215123-7">]</span><span·class="p"·data-group-id="4149215123-6">)</span><span·class="p">.</span><span·class="w">162 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1805184831-6">(</span><span·class="p"·data-group-id="1805184831-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1805184831-7">]</span><span·class="p"·data-group-id="1805184831-6">)</span><span·class="p">.</span><span·class="w">
  
163 </span><span·class="nf">start</span><span·class="p"·data-group-id="4149215123-8">(</span><span·class="p"·data-group-id="4149215123-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">163 </span><span·class="nf">start</span><span·class="p"·data-group-id="1805184831-8">(</span><span·class="p"·data-group-id="1805184831-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
164 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4149215123-9">(</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4149215123-10">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·bd0c2311db8ac03e35f3ec13d20b2b1b7b56bb91cc03fbefe91a72bd7cd8c009·...·]-9">)</span><span·class="p">.</span><span·class="w">164 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="1805184831-9">(</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1805184831-10">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·2072d4360a9f74c5da0decbb5d1e75dae537cd72b0857e8c2ccf68af14aea749·...·]-9">)</span><span·class="p">.</span><span·class="w">
  
165 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="4149215123-11">(</span><span·class="p"·data-group-id="4149215123-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">165 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="1805184831-11">(</span><span·class="p"·data-group-id="1805184831-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
166 ····</span><span·class="ss">ch1</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4149215123-12">{</span><span·class="nf">self</span><span·class="p"·data-group-id="4149215123-13">(</span><span·class="p"·data-group-id="4149215123-13">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·089435e4b6911e32c8af90d5fb8b6133b5e6537039bdacd5b3b41a2f79a1f639·...·]-12">}</span><span·class="p">,</span><span·class="w">166 ····</span><span·class="ss">ch1</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1805184831-12">{</span><span·class="nf">self</span><span·class="p"·data-group-id="1805184831-13">(</span><span·class="p"·data-group-id="1805184831-13">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·ccb30b4755280f6fd5934951452eeb0b77f6eb8dc17e53036a1f599fd8e8d47b·...·]-12">}</span><span·class="p">,</span><span·class="w">
167 ····</span><span·class="k">receive</span><span·class="w">167 ····</span><span·class="k">receive</span><span·class="w">
168 ········</span><span·class="p"·data-group-id="4149215123-14">{</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="4149215123-14">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">168 ········</span><span·class="p"·data-group-id="1805184831-14">{</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="1805184831-14">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
169 ············</span><span·class="n">Res</span><span·class="w">169 ············</span><span·class="n">Res</span><span·class="w">
170 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">170 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
171 </span><span·class="nf">free</span><span·class="p"·data-group-id="4149215123-15">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="4149215123-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 </span><span·class="nf">free</span><span·class="p"·data-group-id="1805184831-15">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="1805184831-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ····</span><span·class="ss">ch1</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4149215123-16">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4149215123-16">}</span><span·class="p">,</span><span·class="w">172 ····</span><span·class="ss">ch1</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1805184831-16">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="1805184831-16">}</span><span·class="p">,</span><span·class="w">
173 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">173 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
174 </span><span·class="nf">init</span><span·class="p"·data-group-id="4149215123-17">(</span><span·class="p"·data-group-id="4149215123-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">174 </span><span·class="nf">init</span><span·class="p"·data-group-id="1805184831-17">(</span><span·class="p"·data-group-id="1805184831-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
175 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="4149215123-18">(</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="4149215123-19">(</span><span·class="p"·data-group-id="4149215123-19">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·c97d19564232d9954fa98b08071db6df89e4fa12bcdba17df1e3f4b4aab3e72b·...·]-18">)</span><span·class="p">,</span><span·class="w">175 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="1805184831-18">(</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1805184831-19">(</span><span·class="p"·data-group-id="1805184831-19">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·f839661cdc8ac8b7c56db6b3a3fdfd0d2272c675353331a3bddfe309bffdbbba·...·]-18">)</span><span·class="p">,</span><span·class="w">
176 ····</span><span·class="n">Chs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="4149215123-20">(</span><span·class="p"·data-group-id="4149215123-20">)</span><span·class="p">,</span><span·class="w">176 ····</span><span·class="n">Chs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="1805184831-20">(</span><span·class="p"·data-group-id="1805184831-20">)</span><span·class="p">,</span><span·class="w">
177 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="4149215123-21">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="4149215123-21">)</span><span·class="p">.</span><span·class="w">177 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="1805184831-21">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="1805184831-21">)</span><span·class="p">.</span><span·class="w">
  
178 </span><span·class="nf">loop</span><span·class="p"·data-group-id="4149215123-22">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="4149215123-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">loop</span><span·class="p"·data-group-id="1805184831-22">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="1805184831-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="k">receive</span><span·class="w">179 ····</span><span·class="k">receive</span><span·class="w">
180 ········</span><span·class="p"·data-group-id="4149215123-23">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="4149215123-23">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 ········</span><span·class="p"·data-group-id="1805184831-23">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="1805184831-23">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ············</span><span·class="p"·data-group-id="4149215123-24">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4149215123-24">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·143,·SHA:·067b594dca71d97a53d76b6fb3034f4cf64e6b5a9c1c64acfc2e125587517f9e·...·]-25">)</span><span·class="p">,</span><span·class="w">181 ············</span><span·class="p"·data-group-id="1805184831-24">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="1805184831-24">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·143,·SHA:·d06dc128ff76e138a5390b22e737509313d62d256d4da7d4fccc1313efed2943·...·]-25">)</span><span·class="p">,</span><span·class="w">
182 ············</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4149215123-26">{</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4149215123-26">}</span><span·class="p">,</span><span·class="w">182 ············</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1805184831-26">{</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="1805184831-26">}</span><span·class="p">,</span><span·class="w">
183 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4149215123-27">(</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4149215123-27">)</span><span·class="p">;</span><span·class="w">183 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="1805184831-27">(</span><span·class="n">Chs2</span><span·class="p"·data-group-id="1805184831-27">)</span><span·class="p">;</span><span·class="w">
184 ········</span><span·class="p"·data-group-id="4149215123-28">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4149215123-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 ········</span><span·class="p"·data-group-id="1805184831-28">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="1805184831-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ············</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="4149215123-29">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="4149215123-29">)</span><span·class="p">,</span><span·class="w">185 ············</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="1805184831-29">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="1805184831-29">)</span><span·class="p">,</span><span·class="w">
186 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4149215123-30">(</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4149215123-30">)</span><span·class="w">186 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="1805184831-30">(</span><span·class="n">Chs2</span><span·class="p"·data-group-id="1805184831-30">)</span><span·class="w">
187 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·code·for·the·server·can·be·rewritten·into·a·generic·part·<code·class="inline">server.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1645290538-1">(</span><span·class="ss">server</span><span·class="p"·data-group-id="1645290538-1">)</span><span·class="p">.</span><span·class="w">187 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·code·for·the·server·can·be·rewritten·into·a·generic·part·<code·class="inline">server.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7913139025-1">(</span><span·class="ss">server</span><span·class="p"·data-group-id="7913139025-1">)</span><span·class="p">.</span><span·class="w">
188 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1645290538-2">(</span><span·class="p"·data-group-id="1645290538-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1645290538-3">]</span><span·class="p"·data-group-id="1645290538-2">)</span><span·class="p">.</span><span·class="w">188 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7913139025-2">(</span><span·class="p"·data-group-id="7913139025-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="7913139025-3">]</span><span·class="p"·data-group-id="7913139025-2">)</span><span·class="p">.</span><span·class="w">
189 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1645290538-4">(</span><span·class="p"·data-group-id="1645290538-5">[</span><span·class="ss">call</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cast</span><span·class="p">/</span><spa[·...·truncated·by·diffoscope;·len:·115,·SHA:·f07328036bf8d37772f4ab2d4b5ec91a334fbba016f9b56da44527ab849507f0·...·]-4">)</span><span·class="p">.</span><span·class="w">189 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7913139025-4">(</span><span·class="p"·data-group-id="7913139025-5">[</span><span·class="ss">call</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cast</span><span·class="p">/</span><spa[·...·truncated·by·diffoscope;·len:·115,·SHA:·98373a1502a3a3fd7c11fd4b08f4ecf6c8a06a849c2c1b3663a67b5417eae985·...·]-4">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1645290538-6">(</span><span·class="p"·data-group-id="1645290538-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1645290538-7">]</span><span·class="p"·data-group-id="1645290538-6">)</span><span·class="p">.</span><span·class="w">190 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7913139025-6">(</span><span·class="p"·data-group-id="7913139025-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="7913139025-7">]</span><span·class="p"·data-group-id="7913139025-6">)</span><span·class="p">.</span><span·class="w">
  
191 </span><span·class="nf">start</span><span·class="p"·data-group-id="1645290538-8">(</span><span·class="n">Mod</span><span·class="p"·data-group-id="1645290538-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 </span><span·class="nf">start</span><span·class="p"·data-group-id="7913139025-8">(</span><span·class="n">Mod</span><span·class="p"·data-group-id="7913139025-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="1645290538-9">(</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1645290538-10">[</span><span·class="n">Mod</span>[·...·truncated·by·diffoscope;·len:·95,·SHA:·8083656e54626116cec5499da13899d15484540435e7a20da8b39430f017d7e1·...·]-9">)</span><span·class="p">.</span><span·class="w">192 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="7913139025-9">(</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7913139025-10">[</span><span·class="n">Mod</span>[·...·truncated·by·diffoscope;·len:·95,·SHA:·248ab74e0f5b6a24f9154699f7499a96fe1e271ca583189ff587616512a6d143·...·]-9">)</span><span·class="p">.</span><span·class="w">
  
193 </span><span·class="nf">call</span><span·class="p"·data-group-id="1645290538-11">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="1645290538-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 </span><span·class="nf">call</span><span·class="p"·data-group-id="7913139025-11">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="7913139025-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1645290538-12">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1645290538-13">(</span><span·class="p"·data-group-id="1645290538-13">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·4ae9460c0fbf78b26d8e65efa0fd88f2efa46f980057cde89a9ceb798e78c84a·...·]-12">}</span><span·class="p">,</span><span·class="w">194 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7913139025-12">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7913139025-13">(</span><span·class="p"·data-group-id="7913139025-13">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·0e60722a05aa56b11dcf1987ba4809a2330472b69ab32ef32343532beebf620d·...·]-12">}</span><span·class="p">,</span><span·class="w">
195 ····</span><span·class="k">receive</span><span·class="w">195 ····</span><span·class="k">receive</span><span·class="w">
196 ········</span><span·class="p"·data-group-id="1645290538-14">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="1645290538-14">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">196 ········</span><span·class="p"·data-group-id="7913139025-14">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="7913139025-14">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
197 ············</span><span·class="n">Res</span><span·class="w">197 ············</span><span·class="n">Res</span><span·class="w">
198 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">198 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
199 </span><span·class="nf">cast</span><span·class="p"·data-group-id="1645290538-15">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="1645290538-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">199 </span><span·class="nf">cast</span><span·class="p"·data-group-id="7913139025-15">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="7913139025-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
200 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1645290538-16">{</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="1645290538-16">}</span><span·class="p">,</span><span·class="w">200 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7913139025-16">{</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="7913139025-16">}</span><span·class="p">,</span><span·class="w">
201 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">201 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
202 </span><span·class="nf">init</span><span·class="p"·data-group-id="1645290538-17">(</span><span·class="n">Mod</span><span·class="p"·data-group-id="1645290538-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">202 </span><span·class="nf">init</span><span·class="p"·data-group-id="7913139025-17">(</span><span·class="n">Mod</span><span·class="p"·data-group-id="7913139025-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
203 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="1645290538-18">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1645290538-19">(</span><span·class="p"·data-group-id="1645290538-19">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·e6073b74cbc621fde21b056fa54e54fc0fd754d10a9e2e487e41eed8ffcfbde5·...·]-18">)</span><span·class="p">,</span><span·class="w">203 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="7913139025-18">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7913139025-19">(</span><span·class="p"·data-group-id="7913139025-19">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·a73a51b70eec64c4d621168361fa2da6c5c68de7a662b7c38fc95f9a4857c89a·...·]-18">)</span><span·class="p">,</span><span·class="w">
204 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">:</span><span·class="nf">init</span><span·class="p"·data-group-id="1645290538-20">(</span><span·class="p"·data-group-id="1645290538-20">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">:</span><span·class="nf">init</span><span·class="p"·data-group-id="7913139025-20">(</span><span·class="p"·data-group-id="7913139025-20">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="1645290538-21">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="1645290538-21">)</span><span·class="p">.</span><span·class="w">205 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="7913139025-21">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7913139025-21">)</span><span·class="p">.</span><span·class="w">
  
206 </span><span·class="nf">loop</span><span·class="p"·data-group-id="1645290538-22">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="1645290538-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">206 </span><span·class="nf">loop</span><span·class="p"·data-group-id="7913139025-22">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7913139025-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
207 ····</span><span·class="k">receive</span><span·class="w">207 ····</span><span·class="k">receive</span><span·class="w">
208 ········</span><span·class="p"·data-group-id="1645290538-23">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="1645290538-23">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 ········</span><span·class="p"·data-group-id="7913139025-23">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="7913139025-23">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 ············</span><span·class="p"·data-group-id="1645290538-24">{</span><span·class="n">Res</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State2</span><span·class="p"·data-group-id="1645290538-24">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·278,·SHA:·618556ea6709c48e56fb1e5af567de5cbe7da5ce7a15338040e876120e8418fe·...·]-25">)</span><span·class="p">,</span><span·class="w">209 ············</span><span·class="p"·data-group-id="7913139025-24">{</span><span·class="n">Res</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State2</span><span·class="p"·data-group-id="7913139025-24">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·278,·SHA:·f4e42b7f0b0bff81c84440a262af0e454f84ffeabfe07596b9df46466536a854·...·]-25">)</span><span·class="p">,</span><span·class="w">
210 ············</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1645290538-26">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="1645290538-26">}</span><span·class="p">,</span><span·class="w">210 ············</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7913139025-26">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="7913139025-26">}</span><span·class="p">,</span><span·class="w">
211 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="1645290538-27">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State2</span><span·class="p"·data-group-id="1645290538-27">)</span><span·class="p">;</span><span·class="w">211 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="7913139025-27">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State2</span><span·class="p"·data-group-id="7913139025-27">)</span><span·class="p">;</span><span·class="w">
212 ········</span><span·class="p"·data-group-id="1645290538-28">{</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="1645290538-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">212 ········</span><span·class="p"·data-group-id="7913139025-28">{</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="7913139025-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
213 ············</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">:</span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="1645290538-29">(</span><span·class="n">Req</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="1645290538-29">)</span><span·class="p">,</span><span·class="w">213 ············</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">:</span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="7913139025-29">(</span><span·class="n">Req</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7913139025-29">)</span><span·class="p">,</span><span·class="w">
214 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="1645290538-30">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State2</span><span·class="p"·data-group-id="1645290538-30">)</span><span·class="w">214 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="7913139025-30">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State2</span><span·class="p"·data-group-id="7913139025-30">)</span><span·class="w">
215 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>And·a·callback·module·<code·class="inline">ch2.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4309246558-1">(</span><span·class="ss">ch2</span><span·class="p"·data-group-id="4309246558-1">)</span><span·class="p">.</span><span·class="w">215 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>And·a·callback·module·<code·class="inline">ch2.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8997253384-1">(</span><span·class="ss">ch2</span><span·class="p"·data-group-id="8997253384-1">)</span><span·class="p">.</span><span·class="w">
216 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4309246558-2">(</span><span·class="p"·data-group-id="4309246558-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4309246558-3">]</span><span·class="p"·data-group-id="4309246558-2">)</span><span·class="p">.</span><span·class="w">216 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8997253384-2">(</span><span·class="p"·data-group-id="8997253384-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="8997253384-3">]</span><span·class="p"·data-group-id="8997253384-2">)</span><span·class="p">.</span><span·class="w">
217 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4309246558-4">(</span><span·class="p"·data-group-id="4309246558-5">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·e87d8b3b177366bc3461e2bfae82402188142fc9da52c274e81e169f06a52a46·...·]-4">)</span><span·class="p">.</span><span·class="w">217 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8997253384-4">(</span><span·class="p"·data-group-id="8997253384-5">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·595629709cd42af8aae10824199c77b241075e649f94d4057a3e1e285be97865·...·]-4">)</span><span·class="p">.</span><span·class="w">
218 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4309246558-6">(</span><span·class="p"·data-group-id="4309246558-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</sp[·...·truncated·by·diffoscope;·len:·254,·SHA:·1334ff459a034227715cc1b6a865de34b4a10e605954057d54b37a27ee61d0d2·...·]-6">)</span><span·class="p">.</span><span·class="w">218 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8997253384-6">(</span><span·class="p"·data-group-id="8997253384-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</sp[·...·truncated·by·diffoscope;·len:·254,·SHA:·bd3416f12382a728720b1cc134bd2a9c4b8c545d0af8381e2dedac56bb51890a·...·]-6">)</span><span·class="p">.</span><span·class="w">
  
219 </span><span·class="nf">start</span><span·class="p"·data-group-id="4309246558-8">(</span><span·class="p"·data-group-id="4309246558-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 </span><span·class="nf">start</span><span·class="p"·data-group-id="8997253384-8">(</span><span·class="p"·data-group-id="8997253384-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4309246558-9">(</span><span·class="ss">ch2</span><span·class="p"·data-group-id="4309246558-9">)</span><span·class="p">.</span><span·class="w">220 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8997253384-9">(</span><span·class="ss">ch2</span><span·class="p"·data-group-id="8997253384-9">)</span><span·class="p">.</span><span·class="w">
  
221 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="4309246558-10">(</span><span·class="p"·data-group-id="4309246558-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="8997253384-10">(</span><span·class="p"·data-group-id="8997253384-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="4309246558-11">(</span><span·class="ss">ch2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="4309246558-11">)</span><span·class="p">.</span><span·class="w">222 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8997253384-11">(</span><span·class="ss">ch2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="8997253384-11">)</span><span·class="p">.</span><span·class="w">
  
223 </span><span·class="nf">free</span><span·class="p"·data-group-id="4309246558-12">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="4309246558-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 </span><span·class="nf">free</span><span·class="p"·data-group-id="8997253384-12">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="8997253384-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="4309246558-13">(</span><span·class="ss">ch2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4309246558-14">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·20767b3a7c5338a127ddd7b755ebc673263862f8d345fad09cb1f79d2f363241·...·]-13">)</span><span·class="p">.</span><span·class="w">224 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="8997253384-13">(</span><span·class="ss">ch2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8997253384-14">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·d2629e2b5f8b5dc993b66b5129b070c765d31a4e0dd6d60695aef1081c21a2ea·...·]-13">)</span><span·class="p">.</span><span·class="w">
  
225 </span><span·class="nf">init</span><span·class="p"·data-group-id="4309246558-15">(</span><span·class="p"·data-group-id="4309246558-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">225 </span><span·class="nf">init</span><span·class="p"·data-group-id="8997253384-15">(</span><span·class="p"·data-group-id="8997253384-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
226 ····</span><span·class="nf">channels</span><span·class="p"·data-group-id="4309246558-16">(</span><span·class="p"·data-group-id="4309246558-16">)</span><span·class="p">.</span><span·class="w">226 ····</span><span·class="nf">channels</span><span·class="p"·data-group-id="8997253384-16">(</span><span·class="p"·data-group-id="8997253384-16">)</span><span·class="p">.</span><span·class="w">
  
227 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="4309246558-17">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="4309246558-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="8997253384-17">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="8997253384-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 ····</span><span·class="nf">alloc</span><span·class="p"·data-group-id="4309246558-18">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="4309246558-18">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·=&gt;·{Ch,Chs2}</span><span·class="w">228 ····</span><span·class="nf">alloc</span><span·class="p"·data-group-id="8997253384-18">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="8997253384-18">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·=&gt;·{Ch,Chs2}</span><span·class="w">
  
229 </span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="4309246558-19">(</span><span·class="p"·data-group-id="4309246558-20">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4309246558-20">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·91,·SHA:·eaee026e1ebd08649d5ea713ba12da1133f5cd4e9e761d6a28b0bb3ead5eee40·...·]-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">229 </span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="8997253384-19">(</span><span·class="p"·data-group-id="8997253384-20">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="8997253384-20">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·91,·SHA:·dd4f6002d3863cfe4cb140f97afe65a54f3d76f485e78829938c00a0b18bd7dc·...·]-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
230 ····</span><span·class="nf">free</span><span·class="p"·data-group-id="4309246558-21">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="4309246558-21">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·=&gt;·Chs2</span></code></pre><p>Notice·the·following:</p><ul><li>The·code·in·<code·class="inline">server</code>·can·be·reused·to·build·many·different·servers.</li><li>The·server·name,·in·this·example·the·atom·<code·class="inline">ch2</code>,·is·hidden·from·the·users·of230 ····</span><span·class="nf">free</span><span·class="p"·data-group-id="8997253384-21">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="8997253384-21">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·=&gt;·Chs2</span></code></pre><p>Notice·the·following:</p><ul><li>The·code·in·<code·class="inline">server</code>·can·be·reused·to·build·many·different·servers.</li><li>The·server·name,·in·this·example·the·atom·<code·class="inline">ch2</code>,·is·hidden·from·the·users·of
231 the·client·functions.·This·means·that·the·name·can·be·changed·without231 the·client·functions.·This·means·that·the·name·can·be·changed·without
232 affecting·them.</li><li>The·protocol·(messages·sent·to·and·received·from·the·server)·is·also·hidden.232 affecting·them.</li><li>The·protocol·(messages·sent·to·and·received·from·the·server)·is·also·hidden.
233 This·is·good·programming·practice·and·allows·one·to·change·the·protocol233 This·is·good·programming·practice·and·allows·one·to·change·the·protocol
234 without·changing·the·code·using·the·interface·functions.</li><li>The·functionality·of·<code·class="inline">server</code>·can·be·extended·without·having·to·change·<code·class="inline">ch2</code>234 without·changing·the·code·using·the·interface·functions.</li><li>The·functionality·of·<code·class="inline">server</code>·can·be·extended·without·having·to·change·<code·class="inline">ch2</code>
235 or·any·other·callback·module.</li></ul><p>In·<code·class="inline">ch1.erl</code>·and·<code·class="inline">ch2.erl</code>·above,·the·implementation·of·<code·class="inline">channels/0</code>,·<code·class="inline">alloc/1</code>,235 or·any·other·callback·module.</li></ul><p>In·<code·class="inline">ch1.erl</code>·and·<code·class="inline">ch2.erl</code>·above,·the·implementation·of·<code·class="inline">channels/0</code>,·<code·class="inline">alloc/1</code>,
236 and·<code·class="inline">free/2</code>·has·been·intentionally·left·out,·as·it·is·not·relevant·to·the236 and·<code·class="inline">free/2</code>·has·been·intentionally·left·out,·as·it·is·not·relevant·to·the
237 example.·For·completeness,·one·way·to·write·these·functions·is·given·below.·This237 example.·For·completeness,·one·way·to·write·these·functions·is·given·below.·This
238 is·an·example·only,·a·realistic·implementation·must·be·able·to·handle·situations238 is·an·example·only,·a·realistic·implementation·must·be·able·to·handle·situations
239 like·running·out·of·channels·to·allocate,·and·so·on.</p><p><a·href=""·id="channels-implementation"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">channels</span><span·class="p"·data-group-id="8965171291-1">(</span><span·class="p"·data-group-id="8965171291-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">239 like·running·out·of·channels·to·allocate,·and·so·on.</p><p><a·href=""·id="channels-implementation"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">channels</span><span·class="p"·data-group-id="6331311188-1">(</span><span·class="p"·data-group-id="6331311188-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
240 ···</span><span·class="p"·data-group-id="8965171291-2">{</span><span·class="p">_</span><span·class="n">Allocated</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8965171291-3">[</span><span·class="p"·data-group-id="8965171291-3">]</span>[·...·truncated·by·diffoscope;·len:·498,·SHA:·ca3d3e5c7545cb94f4c6865c89c97f8a417baefcf94f741d31788f8937eea92c·...·]-2">}</span><span·class="p">.</span><span·class="w">240 ···</span><span·class="p"·data-group-id="6331311188-2">{</span><span·class="p">_</span><span·class="n">Allocated</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6331311188-3">[</span><span·class="p"·data-group-id="6331311188-3">]</span>[·...·truncated·by·diffoscope;·len:·498,·SHA:·76c28ec5b18f44b4788de37ec4ccee9ddc34b9d8789c52d6981f511ffcc60596·...·]-2">}</span><span·class="p">.</span><span·class="w">
  
241 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="8965171291-5">(</span><span·class="p"·data-group-id="8965171291-6">{</span><span·class="n">Allocated</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8965171291-7">[</span><span·class="n">H</span><span·class="p">|</span>[·...·truncated·by·diffoscope;·len:·294,·SHA:·bb094969c87a97a5ef5b27a40502a92fe7952dc1fb2a62b64ce6a9fb00f697b7·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">241 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="6331311188-5">(</span><span·class="p"·data-group-id="6331311188-6">{</span><span·class="n">Allocated</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6331311188-7">[</span><span·class="n">H</span><span·class="p">|</span>[·...·truncated·by·diffoscope;·len:·294,·SHA:·c73920569ed93889c26be878bfe840ffbd028d6bca2bff060ac96eed1129762e·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
242 ···</span><span·class="p"·data-group-id="8965171291-8">{</span><span·class="n">H</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8965171291-9">{</span><span·class="p"·data-group-id="8965171291-10">[</span><span·class="n">H</span><span·class="p">|</span><span·c[·...·truncated·by·diffoscope;·len:·245,·SHA:·dcdac9f52cd0c6f381588dd6e0fa8a041ac3f2000987f4d6eb701cf42cb04ec0·...·]-8">}</span><span·class="p">.</span><span·class="w">242 ···</span><span·class="p"·data-group-id="6331311188-8">{</span><span·class="n">H</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6331311188-9">{</span><span·class="p"·data-group-id="6331311188-10">[</span><span·class="n">H</span><span·class="p">|</span><span·c[·...·truncated·by·diffoscope;·len:·245,·SHA:·7c4b1937f147662d76c4c4d1638f964aa61fe1b03d096dff31a988782e7e3b09·...·]-8">}</span><span·class="p">.</span><span·class="w">
  
243 </span><span·class="nf">free</span><span·class="p"·data-group-id="8965171291-11">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8965171291-12">{</span><span·class="n">Alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Free</span><sp[·...·truncated·by·diffoscope;·len:·195,·SHA:·8114469bd9cc1a655da62353b3df5121e6843ed7452c426d69120e07e11f7705·...·]-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">243 </span><span·class="nf">free</span><span·class="p"·data-group-id="6331311188-11">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6331311188-12">{</span><span·class="n">Alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Free</span><sp[·...·truncated·by·diffoscope;·len:·195,·SHA:·08a77b2c92cfe3c8a51ade1525d22d87fe19caf3ac8789546ee7911fbfc618e4·...·]-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
244 ···</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="8965171291-13">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Alloc</span><span·class="p"·data-group-id="8965171291-13">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">244 ···</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="6331311188-13">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Alloc</span><span·class="p"·data-group-id="6331311188-13">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
245 ······</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">245 ······</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
246 ·········</span><span·class="p"·data-group-id="8965171291-14">{</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="8965171291-15">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Alloc</[·...·truncated·by·diffoscope;·len:·332,·SHA:·72e66f5159c226b545f8fd2754b94c530d19f31ef1a182e5afe7dbf2d9ecb5de·...·]-14">}</span><span·class="p">;</span><span·class="w">246 ·········</span><span·class="p"·data-group-id="6331311188-14">{</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="6331311188-15">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Alloc</[·...·truncated·by·diffoscope;·len:·332,·SHA:·2395b45b0cf7e92d57cf4b8b7928153a8aae8998ec3874c9e5c6a5be06e624d8·...·]-14">}</span><span·class="p">;</span><span·class="w">
247 ······</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">247 ······</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
248 ·········</span><span·class="n">Channels</span><span·class="w">248 ·········</span><span·class="n">Channels</span><span·class="w">
249 ···</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Code·written·without·using·behaviours·can·be·more·efficient,·but·the·increased249 ···</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Code·written·without·using·behaviours·can·be·more·efficient,·but·the·increased
250 efficiency·is·at·the·expense·of·generality.·The·ability·to·manage·all250 efficiency·is·at·the·expense·of·generality.·The·ability·to·manage·all
251 applications·in·the·system·in·a·consistent·manner·is·important.</p><p>Using·behaviours·also·makes·it·easier·to·read·and·understand·code·written·by251 applications·in·the·system·in·a·consistent·manner·is·important.</p><p>Using·behaviours·also·makes·it·easier·to·read·and·understand·code·written·by
252 other·programmers.·Improvised·programming·structures,·while·possibly·more252 other·programmers.·Improvised·programming·structures,·while·possibly·more
253 efficient,·are·always·more·difficult·to·understand.</p><p>The·<code·class="inline">server</code>·module·corresponds,·greatly·simplified,·to·the·Erlang/OTP·behaviour253 efficient,·are·always·more·difficult·to·understand.</p><p>The·<code·class="inline">server</code>·module·corresponds,·greatly·simplified,·to·the·Erlang/OTP·behaviour
254 <code·class="inline">gen_server</code>.</p><p>The·standard·Erlang/OTP·behaviours·are:</p><ul><li><p><a·href="gen_server_concepts.html">gen_server</a></p><p>For·implementing·the·server·of·a·client-server·relation</p></li><li><p><a·href="statem.html">gen_statem</a></p><p>For·implementing·state·machines</p></li><li><p><a·href="events.html">gen_event</a></p><p>For·implementing·event·handling·functionality</p></li><li><p><a·href="sup_princ.html">supervisor</a></p><p>For·implementing·a·supervisor·in·a·supervision·tree</p></li></ul><p>The·compiler·understands·the·module·attribute·<code·class="inline">-behaviour(Behaviour)</code>·and·issues254 <code·class="inline">gen_server</code>.</p><p>The·standard·Erlang/OTP·behaviours·are:</p><ul><li><p><a·href="gen_server_concepts.html">gen_server</a></p><p>For·implementing·the·server·of·a·client-server·relation</p></li><li><p><a·href="statem.html">gen_statem</a></p><p>For·implementing·state·machines</p></li><li><p><a·href="events.html">gen_event</a></p><p>For·implementing·event·handling·functionality</p></li><li><p><a·href="sup_princ.html">supervisor</a></p><p>For·implementing·a·supervisor·in·a·supervision·tree</p></li></ul><p>The·compiler·understands·the·module·attribute·<code·class="inline">-behaviour(Behaviour)</code>·and·issues
255 warnings·about·missing·callback·functions,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3471926322-1">(</span><span·class="ss">chs3</span><span·class="p"·data-group-id="3471926322-1">)</span><span·class="p">.</span><span·class="w">255 warnings·about·missing·callback·functions,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1103434050-1">(</span><span·class="ss">chs3</span><span·class="p"·data-group-id="1103434050-1">)</span><span·class="p">.</span><span·class="w">
256 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="3471926322-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="3471926322-2">)</span><span·class="p">.</span><span·class="w">256 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="1103434050-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="1103434050-2">)</span><span·class="p">.</span><span·class="w">
257 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">257 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
  
258 </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">c</span><span·class="p"·data-group-id="3471926322-3">(</span><span·class="ss">chs3</span><span·class="p"·data-group-id="3471926322-3">)</span><span·class="p">.</span><span·class="w">258 </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">c</span><span·class="p"·data-group-id="1103434050-3">(</span><span·class="ss">chs3</span><span·class="p"·data-group-id="1103434050-3">)</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 829/59679 bytes (1.39%) of diff not shown.
5.66 KB
./usr/share/doc/erlang-doc/html/doc/system/distributed.html
    
Offset 142, 25 lines modifiedOffset 142, 25 lines modified
142 </h2>142 </h2>
143 <p>A·<em>node</em>·is·an·executing·Erlang·runtime·system·that·has·been·given·a·name,·using143 <p>A·<em>node</em>·is·an·executing·Erlang·runtime·system·that·has·been·given·a·name,·using
144 the·command-line·flag·<a·href="../../erts-15.0.1/doc/html/erl_cmd.html#name"><code·class="inline">-name</code></a>·(long·names)·or144 the·command-line·flag·<a·href="../../erts-15.0.1/doc/html/erl_cmd.html#name"><code·class="inline">-name</code></a>·(long·names)·or
145 <a·href="../../erts-15.0.1/doc/html/erl_cmd.html#sname"><code·class="inline">-sname</code></a>·(short·names).</p><p>The·format·of·the·node·name·is·an·atom·<code·class="inline">name@host</code>.·<code·class="inline">name</code>·is·the·name·given·by145 <a·href="../../erts-15.0.1/doc/html/erl_cmd.html#sname"><code·class="inline">-sname</code></a>·(short·names).</p><p>The·format·of·the·node·name·is·an·atom·<code·class="inline">name@host</code>.·<code·class="inline">name</code>·is·the·name·given·by
146 the·user.·<code·class="inline">host</code>·is·the·full·host·name·if·long·names·are·used,·or·the·first·part146 the·user.·<code·class="inline">host</code>·is·the·full·host·name·if·long·names·are·used,·or·the·first·part
147 of·the·host·name·if·short·names·are·used.·Function·<a·href="../../erts-15.0.1/doc/html/erlang.html#node/0"><code·class="inline">node()</code></a>147 of·the·host·name·if·short·names·are·used.·Function·<a·href="../../erts-15.0.1/doc/html/erlang.html#node/0"><code·class="inline">node()</code></a>
148 returns·the·name·of·the·node.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-name·dilbert</span><span·class="w">148 returns·the·name·of·the·node.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-name·dilbert</span><span·class="w">
149 </span><span·class="p"·data-group-id="9610911682-1">(</span><span·class="ss">dilbert@uab</span><span·class="p">.</span><span·class="ss">ericsson</span><span·class="p">.</span><span·class="ss">se</span><span·class="p"·data-group-id="9610911682-1">)</span><span·class="mi">1</span><span·class="o"[·...·truncated·by·diffoscope;·len:·158,·SHA:·fbd27911fae5d8a3978d573a849db55fa169be6473be56efe97941412dcea6f7·...·]-2">)</span><span·class="p">.</span><span·class="w">149 </span><span·class="p"·data-group-id="4535722076-1">(</span><span·class="ss">dilbert@uab</span><span·class="p">.</span><span·class="ss">ericsson</span><span·class="p">.</span><span·class="ss">se</span><span·class="p"·data-group-id="4535722076-1">)</span><span·class="mi">1</span><span·class="o"[·...·truncated·by·diffoscope;·len:·158,·SHA:·2edf7f635e03ac0a13bd148eaeaaff559f450f2feddf9ddb1068326d9c810306·...·]-2">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="ss">&#39;dilbert@uab.ericsson.se&#39;</span><span·class="w">150 </span><span·class="ss">&#39;dilbert@uab.ericsson.se&#39;</span><span·class="w">
  
151 </span><span·class="c1">%·erl·-sname·dilbert</span><span·class="gp·unselectable">151 </span><span·class="c1">%·erl·-sname·dilbert</span><span·class="gp·unselectable">
152 (dilbert@uab)1&gt;·</span><span·class="nf">node</span><span·class="p"·data-group-id="9610911682-3">(</span><span·class="p"·data-group-id="9610911682-3">)</span><span·class="p">.</span><span·class="w">152 (dilbert@uab)1&gt;·</span><span·class="nf">node</span><span·class="p"·data-group-id="4535722076-3">(</span><span·class="p"·data-group-id="4535722076-3">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="ss">dilbert@uab</span></code></pre><p>The·node·name·can·also·be·given·in·runtime·by·calling·<a·href="../../lib/kernel-10.0.1/doc/html/net_kernel.html#start/1"><code·class="inline">net_kernel:start/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl</span><span·class="gp·unselectable">153 </span><span·class="ss">dilbert@uab</span></code></pre><p>The·node·name·can·also·be·given·in·runtime·by·calling·<a·href="../../lib/kernel-10.0.1/doc/html/net_kernel.html#start/1"><code·class="inline">net_kernel:start/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl</span><span·class="gp·unselectable">
154 1&gt;·</span><span·class="nf">node</span><span·class="p"·data-group-id="8677317018-1">(</span><span·class="p"·data-group-id="8677317018-1">)</span><span·class="p">.</span><span·class="w">154 1&gt;·</span><span·class="nf">node</span><span·class="p"·data-group-id="6085544191-1">(</span><span·class="p"·data-group-id="6085544191-1">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="ss">nonode@nohost</span><span·class="gp·unselectable">155 </span><span·class="ss">nonode@nohost</span><span·class="gp·unselectable">
156 2&gt;·</span><span·class="nc">net_kernel</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8677317018-2">(</span><span·class="p"·data-group-id="8677317018-3">[</span><span·class="ss">dilbert</span><span·class="p">,</span><span·class="ss">shortnames</span><span·class="p"·data-group-id="8677317018-3">]</span><span·class="p"·data-group-id="86773170[·...·truncated·by·diffoscope;·len:·2,·SHA:·4ec9599fc203d176a301536c2e091a19bc852759b255bd6818810a42c5fed14a·...·]-2">)</span><span·class="p">.</span><span·class="w">156 2&gt;·</span><span·class="nc">net_kernel</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6085544191-2">(</span><span·class="p"·data-group-id="6085544191-3">[</span><span·class="ss">dilbert</span><span·class="p">,</span><span·class="ss">shortnames</span><span·class="p"·data-group-id="6085544191-3">]</span><span·class="p"·data-group-id="60855441[·...·truncated·by·diffoscope;·len:·2,·SHA:·1da51b8d8ff98f6a48f80ae79fe3ca6c26e1abb7b7d125259255d6d2b875ea08·...·]-2">)</span><span·class="p">.</span><span·class="w">
157 </span><span·class="p"·data-group-id="8677317018-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.102</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8677317018-4">}</span><span·class="gp·unselectable">157 </span><span·class="p"·data-group-id="6085544191-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.102</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6085544191-4">}</span><span·class="gp·unselectable">
158 (dilbert@uab)3&gt;·</span><span·class="nf">node</span><span·class="p"·data-group-id="8677317018-5">(</span><span·class="p"·data-group-id="8677317018-5">)</span><span·class="p">.</span><span·class="w">158 (dilbert@uab)3&gt;·</span><span·class="nf">node</span><span·class="p"·data-group-id="6085544191-5">(</span><span·class="p"·data-group-id="6085544191-5">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="ss">dilbert@uab</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·node·with·a·long·node·name·cannot·communicate·with·a·node·with·a·short·node159 </span><span·class="ss">dilbert@uab</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·node·with·a·long·node·name·cannot·communicate·with·a·node·with·a·short·node
160 name.</p></blockquote><h2·id="node-connections"·class="section-heading">160 name.</p></blockquote><h2·id="node-connections"·class="section-heading">
161 ··<a·href="#node-connections"·class="hover-link">161 ··<a·href="#node-connections"·class="hover-link">
162 ····<i·class="ri-link-m"·aria-hidden="true"></i>162 ····<i·class="ri-link-m"·aria-hidden="true"></i>
163 ··</a>163 ··</a>
164 ··<span·class="text">Node·Connections</span>164 ··<span·class="text">Node·Connections</span>
165 </h2>165 </h2>
16.3 KB
./usr/share/doc/erlang-doc/html/doc/system/distributed_applications.html
    
Offset 150, 36 lines modifiedOffset 150, 36 lines modified
150 (within·the·time-out·specified·by·<code·class="inline">sync_nodes_timeout</code>).</li><li><p><code·class="inline">sync_nodes_timeout·=·integer()·|·infinity</code>·-·Specifies·how·many·milliseconds150 (within·the·time-out·specified·by·<code·class="inline">sync_nodes_timeout</code>).</li><li><p><code·class="inline">sync_nodes_timeout·=·integer()·|·infinity</code>·-·Specifies·how·many·milliseconds
151 to·wait·for·the·other·nodes·to·start.</p></li></ul><p>When·started,·the·node·waits·for·all·nodes·specified·by·<code·class="inline">sync_nodes_mandatory</code>151 to·wait·for·the·other·nodes·to·start.</p></li></ul><p>When·started,·the·node·waits·for·all·nodes·specified·by·<code·class="inline">sync_nodes_mandatory</code>
152 and·<code·class="inline">sync_nodes_optional</code>·to·come·up.·When·all·nodes·are·up,·or·when·all152 and·<code·class="inline">sync_nodes_optional</code>·to·come·up.·When·all·nodes·are·up,·or·when·all
153 mandatory·nodes·are·up·and·the·time·specified·by·<code·class="inline">sync_nodes_timeout</code>·has153 mandatory·nodes·are·up·and·the·time·specified·by·<code·class="inline">sync_nodes_timeout</code>·has
154 elapsed,·all·applications·start.·If·not·all·mandatory·nodes·are·up,·the·node154 elapsed,·all·applications·start.·If·not·all·mandatory·nodes·are·up,·the·node
155 terminates.</p><p><em>Example:</em></p><p>An·application·<code·class="inline">myapp</code>·is·to·run·at·the·node·<code·class="inline">cp1@cave</code>.·If·this·node·goes·down,155 terminates.</p><p><em>Example:</em></p><p>An·application·<code·class="inline">myapp</code>·is·to·run·at·the·node·<code·class="inline">cp1@cave</code>.·If·this·node·goes·down,
156 <code·class="inline">myapp</code>·is·to·be·restarted·at·<code·class="inline">cp2@cave</code>·or·<code·class="inline">cp3@cave</code>.·A·system·configuration156 <code·class="inline">myapp</code>·is·to·be·restarted·at·<code·class="inline">cp2@cave</code>·or·<code·class="inline">cp3@cave</code>.·A·system·configuration
157 file·<code·class="inline">cp1.config</code>·for·<code·class="inline">cp1@cave</code>·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5242776233-1">[</span><span·class="p"·data-group-id="5242776233-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">157 file·<code·class="inline">cp1.config</code>·for·<code·class="inline">cp1@cave</code>·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8130758066-1">[</span><span·class="p"·data-group-id="8130758066-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
158 ··</span><span·class="p"·data-group-id="5242776233-3">[</span><span·class="p"·data-group-id="5242776233-4">{</span><span·class="ss">distributed</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5242776233-5">[</span><span·class="p"·data-group-id="5242776233-6">[·...·truncated·by·diffoscope;·len:·712,·SHA:·0f78012efff61f09e8102caa54da77b9b7794bad4839d80471ad9799c75a88d4·...·]-4">}</span><span·class="p">,</span><span·class="w">158 ··</span><span·class="p"·data-group-id="8130758066-3">[</span><span·class="p"·data-group-id="8130758066-4">{</span><span·class="ss">distributed</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8130758066-5">[</span><span·class="p"·data-group-id="8130758066-6">[·...·truncated·by·diffoscope;·len:·712,·SHA:·a6652a8e06a4190ce4a6123b8ed4a6b382620d7715a5e1239508f44e92bbc405·...·]-4">}</span><span·class="p">,</span><span·class="w">
159 ···</span><span·class="p"·data-group-id="5242776233-9">{</span><span·class="ss">sync_nodes_mandatory</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5242776233-10">[</span><span·class="ss">cp2@cave</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·119,·SHA:·4285857ff06b733cda7c4269a9be7d42cc5fae52cf63ba2b5b90aa7a1607992a·...·]-9">}</span><span·class="p">,</span><span·class="w">159 ···</span><span·class="p"·data-group-id="8130758066-9">{</span><span·class="ss">sync_nodes_mandatory</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8130758066-10">[</span><span·class="ss">cp2@cave</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·119,·SHA:·18587234f7dd417410935202333634a7258a2643d4fa3df397f6be4cf461dff6·...·]-9">}</span><span·class="p">,</span><span·class="w">
160 ···</span><span·class="p"·data-group-id="5242776233-11">{</span><span·class="ss">sync_nodes_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5000</span><span·class="p"·data-group-id="5242776233-11">}</span><span·class="w">160 ···</span><span·class="p"·data-group-id="8130758066-11">{</span><span·class="ss">sync_nodes_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5000</span><span·class="p"·data-group-id="8130758066-11">}</span><span·class="w">
161 ··</span><span·class="p"·data-group-id="5242776233-3">]</span><span·class="w">161 ··</span><span·class="p"·data-group-id="8130758066-3">]</span><span·class="w">
162 ·</span><span·class="p"·data-group-id="5242776233-2">}</span><span·class="w">162 ·</span><span·class="p"·data-group-id="8130758066-2">}</span><span·class="w">
163 </span><span·class="p"·data-group-id="5242776233-1">]</span><span·class="p">.</span></code></pre><p>The·system·configuration·files·for·<code·class="inline">cp2@cave</code>·and·<code·class="inline">cp3@cave</code>·are·identical,163 </span><span·class="p"·data-group-id="8130758066-1">]</span><span·class="p">.</span></code></pre><p>The·system·configuration·files·for·<code·class="inline">cp2@cave</code>·and·<code·class="inline">cp3@cave</code>·are·identical,
164 except·for·the·list·of·mandatory·nodes,·which·is·to·be·<code·class="inline">[cp1@cave,·cp3@cave]</code>164 except·for·the·list·of·mandatory·nodes,·which·is·to·be·<code·class="inline">[cp1@cave,·cp3@cave]</code>
165 for·<code·class="inline">cp2@cave</code>·and·<code·class="inline">[cp1@cave,·cp2@cave]</code>·for·<code·class="inline">cp3@cave</code>.</p><blockquote><h4·class="info">Note</h4><p>All·involved·nodes·must·have·the·same·value·for·<code·class="inline">distributed</code>·and165 for·<code·class="inline">cp2@cave</code>·and·<code·class="inline">[cp1@cave,·cp2@cave]</code>·for·<code·class="inline">cp3@cave</code>.</p><blockquote><h4·class="info">Note</h4><p>All·involved·nodes·must·have·the·same·value·for·<code·class="inline">distributed</code>·and
166 <code·class="inline">sync_nodes_timeout</code>.·Otherwise·the·system·behavior·is·undefined.</p></blockquote><h2·id="starting-and-stopping-distributed-applications"·class="section-heading">166 <code·class="inline">sync_nodes_timeout</code>.·Otherwise·the·system·behavior·is·undefined.</p></blockquote><h2·id="starting-and-stopping-distributed-applications"·class="section-heading">
167 ··<a·href="#starting-and-stopping-distributed-applications"·class="hover-link">167 ··<a·href="#starting-and-stopping-distributed-applications"·class="hover-link">
168 ····<i·class="ri-link-m"·aria-hidden="true"></i>168 ····<i·class="ri-link-m"·aria-hidden="true"></i>
169 ··</a>169 ··</a>
170 ··<span·class="text">Starting·and·Stopping·Distributed·Applications</span>170 ··<span·class="text">Starting·and·Stopping·Distributed·Applications</span>
171 </h2>171 </h2>
172 <p>When·all·involved·(mandatory)·nodes·have·been·started,·the·distributed172 <p>When·all·involved·(mandatory)·nodes·have·been·started,·the·distributed
173 application·can·be·started·by·calling·<code·class="inline">application:start(Application)</code>·at·<em>all173 application·can·be·started·by·calling·<code·class="inline">application:start(Application)</code>·at·<em>all
174 of·these·nodes.</em></p><p>A·boot·script·(see·<a·href="release_structure.html">Releases</a>)·can·be·used·that174 of·these·nodes.</em></p><p>A·boot·script·(see·<a·href="release_structure.html">Releases</a>)·can·be·used·that
175 automatically·starts·the·application.</p><p>The·application·is·started·at·the·first·operational·node·that·is·listed·in·the175 automatically·starts·the·application.</p><p>The·application·is·started·at·the·first·operational·node·that·is·listed·in·the
176 list·of·nodes·in·the·<code·class="inline">distributed</code>·configuration·parameter.·The·application·is176 list·of·nodes·in·the·<code·class="inline">distributed</code>·configuration·parameter.·The·application·is
177 started·as·usual.·That·is,·an·application·master·is·created·and·calls·the177 started·as·usual.·That·is,·an·application·master·is·created·and·calls·the
178 application·callback·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5594727016-1">(</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="5594727016-1">)</span></code></pre><p>Example:</p><p>Continuing·the·example·from·the·previous·section,·the·three·nodes·are·started,178 application·callback·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4647896527-1">(</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="4647896527-1">)</span></code></pre><p>Example:</p><p>Continuing·the·example·from·the·previous·section,·the·three·nodes·are·started,
179 specifying·the·system·configuration·file:</p><pre><code·class="text">&gt;·erl·-sname·cp1·-config·cp1179 specifying·the·system·configuration·file:</p><pre><code·class="text">&gt;·erl·-sname·cp1·-config·cp1
180 &gt;·erl·-sname·cp2·-config·cp2180 &gt;·erl·-sname·cp2·-config·cp2
181 &gt;·erl·-sname·cp3·-config·cp3</code></pre><p>When·all·nodes·are·operational,·<code·class="inline">myapp</code>·can·be·started.·This·is·achieved·by181 &gt;·erl·-sname·cp3·-config·cp3</code></pre><p>When·all·nodes·are·operational,·<code·class="inline">myapp</code>·can·be·started.·This·is·achieved·by
182 calling·<code·class="inline">application:start(myapp)</code>·at·all·three·nodes.·It·is·then·started·at182 calling·<code·class="inline">application:start(myapp)</code>·at·all·three·nodes.·It·is·then·started·at
183 <code·class="inline">cp1</code>,·as·shown·in·the·following·figure:</p><p><a·href=""·id="dist1"></a></p><p><img·src="assets/dist1.gif"·alt="Application·myapp·-·Situation·1"·title="Application·myapp·-·Situation·1"/></p><p>Similarly,·the·application·must·be·stopped·by·calling183 <code·class="inline">cp1</code>,·as·shown·in·the·following·figure:</p><p><a·href=""·id="dist1"></a></p><p><img·src="assets/dist1.gif"·alt="Application·myapp·-·Situation·1"·title="Application·myapp·-·Situation·1"/></p><p>Similarly,·the·application·must·be·stopped·by·calling
184 <code·class="inline">application:stop(Application)</code>·at·all·involved·nodes.</p><h2·id="failover"·class="section-heading">184 <code·class="inline">application:stop(Application)</code>·at·all·involved·nodes.</p><h2·id="failover"·class="section-heading">
185 ··<a·href="#failover"·class="hover-link">185 ··<a·href="#failover"·class="hover-link">
Offset 187, 30 lines modifiedOffset 187, 30 lines modified
187 ··</a>187 ··</a>
188 ··<span·class="text">Failover</span>188 ··<span·class="text">Failover</span>
189 </h2>189 </h2>
190 <p>If·the·node·where·the·application·is·running·goes·down,·the·application·is190 <p>If·the·node·where·the·application·is·running·goes·down,·the·application·is
191 restarted·(after·the·specified·time-out)·at·the·first·operational·node·that·is191 restarted·(after·the·specified·time-out)·at·the·first·operational·node·that·is
192 listed·in·the·list·of·nodes·in·the·<code·class="inline">distributed</code>·configuration·parameter.·This192 listed·in·the·list·of·nodes·in·the·<code·class="inline">distributed</code>·configuration·parameter.·This
193 is·called·a·<em>failover</em>.</p><p>The·application·is·started·the·normal·way·at·the·new·node,·that·is,·by·the193 is·called·a·<em>failover</em>.</p><p>The·application·is·started·the·normal·way·at·the·new·node,·that·is,·by·the
194 application·master·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="1495643047-1">(</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="1495643047-1">)</span></code></pre><p>An·exception·is·if·the·application·has·the·<code·class="inline">start_phases</code>·key·defined·(see194 application·master·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8331158847-1">(</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="8331158847-1">)</span></code></pre><p>An·exception·is·if·the·application·has·the·<code·class="inline">start_phases</code>·key·defined·(see
195 <a·href="included_applications.html">Included·Applications</a>).·The·application·is·then195 <a·href="included_applications.html">Included·Applications</a>).·The·application·is·then
196 instead·started·by·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2081340157-1">(</span><span·class="p"·data-group-id="2081340157-2">{</span><span·class="ss">failover</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="2081340157-2">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·100,·SHA:·963da36fcfc3b169ef1a54b5e6e2ab23e20d2c624dc52596f4e5b30fce126a38·...·]-1">)</span></code></pre><p>Here·<code·class="inline">Node</code>·is·the·terminated·node.</p><p><em>Example:</em></p><p>If·<code·class="inline">cp1</code>·goes·down,·the·system·checks·which·one·of·the·other·nodes,·<code·class="inline">cp2</code>·or196 instead·started·by·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9959443830-1">(</span><span·class="p"·data-group-id="9959443830-2">{</span><span·class="ss">failover</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="9959443830-2">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·100,·SHA:·c584aa05e53d7b48970be9e0107d6673a809e2b95b69d12085feb7002421952e·...·]-1">)</span></code></pre><p>Here·<code·class="inline">Node</code>·is·the·terminated·node.</p><p><em>Example:</em></p><p>If·<code·class="inline">cp1</code>·goes·down,·the·system·checks·which·one·of·the·other·nodes,·<code·class="inline">cp2</code>·or
197 <code·class="inline">cp3</code>,·has·the·least·number·of·running·applications,·but·waits·for·5·seconds·for197 <code·class="inline">cp3</code>,·has·the·least·number·of·running·applications,·but·waits·for·5·seconds·for
198 <code·class="inline">cp1</code>·to·restart.·If·<code·class="inline">cp1</code>·does·not·restart·and·<code·class="inline">cp2</code>·runs·fewer·applications198 <code·class="inline">cp1</code>·to·restart.·If·<code·class="inline">cp1</code>·does·not·restart·and·<code·class="inline">cp2</code>·runs·fewer·applications
199 than·<code·class="inline">cp3</code>,·<code·class="inline">myapp</code>·is·restarted·on·<code·class="inline">cp2</code>.</p><p><a·href=""·id="dist2"></a></p><p><img·src="assets/dist2.gif"·alt="Application·myapp·-·Situation·2"·title="Application·myapp·-·Situation·2"/></p><p>Suppose·now·that·<code·class="inline">cp2</code>·goes·also·down·and·does·not·restart·within·5·seconds.199 than·<code·class="inline">cp3</code>,·<code·class="inline">myapp</code>·is·restarted·on·<code·class="inline">cp2</code>.</p><p><a·href=""·id="dist2"></a></p><p><img·src="assets/dist2.gif"·alt="Application·myapp·-·Situation·2"·title="Application·myapp·-·Situation·2"/></p><p>Suppose·now·that·<code·class="inline">cp2</code>·goes·also·down·and·does·not·restart·within·5·seconds.
200 <code·class="inline">myapp</code>·is·now·restarted·on·<code·class="inline">cp3</code>.</p><p><a·href=""·id="dist3"></a></p><p><img·src="assets/dist3.gif"·alt="Application·myapp·-·Situation·3"·title="Application·myapp·-·Situation·3"/></p><h2·id="takeover"·class="section-heading">200 <code·class="inline">myapp</code>·is·now·restarted·on·<code·class="inline">cp3</code>.</p><p><a·href=""·id="dist3"></a></p><p><img·src="assets/dist3.gif"·alt="Application·myapp·-·Situation·3"·title="Application·myapp·-·Situation·3"/></p><h2·id="takeover"·class="section-heading">
201 ··<a·href="#takeover"·class="hover-link">201 ··<a·href="#takeover"·class="hover-link">
202 ····<i·class="ri-link-m"·aria-hidden="true"></i>202 ····<i·class="ri-link-m"·aria-hidden="true"></i>
203 ··</a>203 ··</a>
204 ··<span·class="text">Takeover</span>204 ··<span·class="text">Takeover</span>
205 </h2>205 </h2>
206 <p>If·a·node·is·started,·which·has·higher·priority·according·to·<code·class="inline">distributed</code>·than206 <p>If·a·node·is·started,·which·has·higher·priority·according·to·<code·class="inline">distributed</code>·than
207 the·node·where·a·distributed·application·is·running,·the·application·is207 the·node·where·a·distributed·application·is·running,·the·application·is
208 restarted·at·the·new·node·and·stopped·at·the·old·node.·This·is·called·a208 restarted·at·the·new·node·and·stopped·at·the·old·node.·This·is·called·a
209 <em>takeover</em>.</p><p>The·application·is·started·by·the·application·master·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7989520630-1">(</span><span·class="p"·data-group-id="7989520630-2">{</span><span·class="ss">takeover</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="7989520630-2">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·100,·SHA:·aacf0159bd85db500fb1deac69ac65d05edded2342198929c7377c2cb324bb35·...·]-1">)</span></code></pre><p>Here·<code·class="inline">Node</code>·is·the·old·node.</p><p><em>Example:</em></p><p>If·<code·class="inline">myapp</code>·is·running·at·<code·class="inline">cp3</code>,·and·if·<code·class="inline">cp2</code>·now·restarts,·it·does·not·restart209 <em>takeover</em>.</p><p>The·application·is·started·by·the·application·master·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Module</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="0227149081-1">(</span><span·class="p"·data-group-id="0227149081-2">{</span><span·class="ss">takeover</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="0227149081-2">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·100,·SHA:·357244399df533988d5a6f9a9d59af9491d08aebee8828954a082bed84edaf93·...·]-1">)</span></code></pre><p>Here·<code·class="inline">Node</code>·is·the·old·node.</p><p><em>Example:</em></p><p>If·<code·class="inline">myapp</code>·is·running·at·<code·class="inline">cp3</code>,·and·if·<code·class="inline">cp2</code>·now·restarts,·it·does·not·restart
210 <code·class="inline">myapp</code>,·as·the·order·between·the·<code·class="inline">cp2</code>·and·<code·class="inline">cp3</code>·nodes·is·undefined.</p><p><a·href=""·id="dist4"></a></p><p><img·src="assets/dist4.gif"·alt="Application·myapp·-·Situation·4"·title="Application·myapp·-·Situation·4"/></p><p>However,·if·<code·class="inline">cp1</code>·also·restarts,·the·function·<a·href="../../lib/kernel-10.0.1/doc/html/application.html#takeover/2"><code·class="inline">application:takeover/2</code></a>·moves210 <code·class="inline">myapp</code>,·as·the·order·between·the·<code·class="inline">cp2</code>·and·<code·class="inline">cp3</code>·nodes·is·undefined.</p><p><a·href=""·id="dist4"></a></p><p><img·src="assets/dist4.gif"·alt="Application·myapp·-·Situation·4"·title="Application·myapp·-·Situation·4"/></p><p>However,·if·<code·class="inline">cp1</code>·also·restarts,·the·function·<a·href="../../lib/kernel-10.0.1/doc/html/application.html#takeover/2"><code·class="inline">application:takeover/2</code></a>·moves
211 <code·class="inline">myapp</code>·to·<code·class="inline">cp1</code>,·as·<code·class="inline">cp1</code>·has·a·higher·priority·than·<code·class="inline">cp3</code>·for·this211 <code·class="inline">myapp</code>·to·<code·class="inline">cp1</code>,·as·<code·class="inline">cp1</code>·has·a·higher·priority·than·<code·class="inline">cp3</code>·for·this
212 application.·In·this·case,·<code·class="inline">Module:start({takeover,·cp3@cave},·StartArgs)</code>·is212 application.·In·this·case,·<code·class="inline">Module:start({takeover,·cp3@cave},·StartArgs)</code>·is
213 executed·at·<code·class="inline">cp1</code>·to·start·the·application.</p><p><a·href=""·id="dist5"></a></p><p><img·src="assets/dist5.gif"·alt="Application·myapp·-·Situation·5"·title="Application·myapp·-·Situation·5"/></p>213 executed·at·<code·class="inline">cp1</code>·to·start·the·application.</p><p><a·href=""·id="dist5"></a></p><p><img·src="assets/dist5.gif"·alt="Application·myapp·-·Situation·5"·title="Application·myapp·-·Situation·5"/></p>
214 </div>214 </div>
  
215 <div·class="bottom-actions"·id="bottom-actions">215 <div·class="bottom-actions"·id="bottom-actions">
64.8 KB
./usr/share/doc/erlang-doc/html/doc/system/documentation.html
    
Offset 112, 23 lines modifiedOffset 112, 23 lines modified
112 ······</a>112 ······</a>
  
  
113 ····<span>Documentation</span>113 ····<span>Documentation</span>
114 ··</h1>114 ··</h1>
  
115 <p>Documentation·in·Erlang·is·done·through·the·<code·class="inline">-moduledoc</code>·and·<code·class="inline">-doc</code>115 <p>Documentation·in·Erlang·is·done·through·the·<code·class="inline">-moduledoc</code>·and·<code·class="inline">-doc</code>
116 <a·href="modules.html#module-attributes">attributes</a>.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9794796011-1">(</span><span·class="ss">arith</span><span·class="p"·data-group-id="9794796011-1">)</span><span·class="p">.</span><span·class="w">116 <a·href="modules.html#module-attributes">attributes</a>.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7297762509-1">(</span><span·class="ss">arith</span><span·class="p"·data-group-id="7297762509-1">)</span><span·class="p">.</span><span·class="w">
117 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;117 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;
118 A·module·for·basic·arithmetic.118 A·module·for·basic·arithmetic.
119 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">119 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">
120 </span><span·class="w">120 </span><span·class="w">
121 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9794796011-2">(</span><span·class="p"·data-group-id="9794796011-3">[</span><span·class="ss">add</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="9794796011-3">]</span><span·class="p"·data-group-id="9794796011-2">)</span><span·class="p">.</span><span·class="w">121 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7297762509-2">(</span><span·class="p"·data-group-id="7297762509-3">[</span><span·class="ss">add</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="7297762509-3">]</span><span·class="p"·data-group-id="7297762509-2">)</span><span·class="p">.</span><span·class="w">
122 </span><span·class="w">122 </span><span·class="w">
123 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;Adds·two·numbers.&quot;</span><span·class="w">123 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;Adds·two·numbers.&quot;</span><span·class="w">
124 </span><span·class="nf">add</span><span·class="p"·data-group-id="9794796011-4">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="9794796011-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">-moduledoc</code>·attribute·has·to·be·located·before·the·first·<code·class="inline">-doc</code>·attribute124 </span><span·class="nf">add</span><span·class="p"·data-group-id="7297762509-4">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="7297762509-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">-moduledoc</code>·attribute·has·to·be·located·before·the·first·<code·class="inline">-doc</code>·attribute
125 or·function·declaration.·It·documents·the·overall·purpose·of·the·module.</p><p>The·<code·class="inline">-doc</code>·attribute·always·precedes·the·<a·href="ref_man_functions.html">function</a>·or125 or·function·declaration.·It·documents·the·overall·purpose·of·the·module.</p><p>The·<code·class="inline">-doc</code>·attribute·always·precedes·the·<a·href="ref_man_functions.html">function</a>·or
126 <a·href="modules.html#module-attributes">attribute</a>·it·documents.·The126 <a·href="modules.html#module-attributes">attribute</a>·it·documents.·The
127 attributes·that·can·be·documented·are127 attributes·that·can·be·documented·are
128 <a·href="typespec.html#type-declarations-of-user-defined-types">user-defined·types</a>128 <a·href="typespec.html#type-declarations-of-user-defined-types">user-defined·types</a>
129 (<code·class="inline">-type</code>·and·<code·class="inline">-opaque</code>)·and129 (<code·class="inline">-type</code>·and·<code·class="inline">-opaque</code>)·and
130 <a·href="modules.html#behaviour-module-attribute">behaviour·module·attributes</a>130 <a·href="modules.html#behaviour-module-attribute">behaviour·module·attributes</a>
131 (<code·class="inline">-callback</code>).</p><p>By·default·the·format·used·for·documentation·attributes·is131 (<code·class="inline">-callback</code>).</p><p>By·default·the·format·used·for·documentation·attributes·is
Offset 140, 55 lines modifiedOffset 140, 55 lines modified
140 <a·href="modules.html#documentation-attributes">Documentation·Attributes</a>.</p><p><code·class="inline">-doc</code>·attributes·have·been·available·since·Erlang/OTP·27.</p><h2·id="documentation-metadata"·class="section-heading">140 <a·href="modules.html#documentation-attributes">Documentation·Attributes</a>.</p><p><code·class="inline">-doc</code>·attributes·have·been·available·since·Erlang/OTP·27.</p><h2·id="documentation-metadata"·class="section-heading">
141 ··<a·href="#documentation-metadata"·class="hover-link">141 ··<a·href="#documentation-metadata"·class="hover-link">
142 ····<i·class="ri-link-m"·aria-hidden="true"></i>142 ····<i·class="ri-link-m"·aria-hidden="true"></i>
143 ··</a>143 ··</a>
144 ··<span·class="text">Documentation·metadata</span>144 ··<span·class="text">Documentation·metadata</span>
145 </h2>145 </h2>
146 <p>It·is·possible·to·add·metadata·to·the·documentation·entry.·You·do·this·by·adding146 <p>It·is·possible·to·add·metadata·to·the·documentation·entry.·You·do·this·by·adding
147 a·<code·class="inline">-moduledoc</code>·or·<code·class="inline">-doc</code>·attribute·with·a·map·as·argument.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3283927124-1">(</span><span·class="ss">arith</span><span·class="p"·data-group-id="3283927124-1">)</span><span·class="p">.</span><span·class="w">147 a·<code·class="inline">-moduledoc</code>·or·<code·class="inline">-doc</code>·attribute·with·a·map·as·argument.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3215603515-1">(</span><span·class="ss">arith</span><span·class="p"·data-group-id="3215603515-1">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;148 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;
149 A·module·for·basic·arithmetic.149 A·module·for·basic·arithmetic.
150 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">150 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="3283927124-2">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p"·data-group-id="3283927124-2">}</span><span·class="p">.</span><span·class="w">151 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="3215603515-2">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p"·data-group-id="3215603515-2">}</span><span·class="p">.</span><span·class="w">
152 </span><span·class="w">152 </span><span·class="w">
153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3283927124-3">(</span><span·class="p"·data-group-id="3283927124-4">[</span><span·class="ss">add</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="3283927124-4">]</span><span·class="p"·data-group-id="3283927124-3">)</span><span·class="p">.</span><span·class="w">153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3215603515-3">(</span><span·class="p"·data-group-id="3215603515-4">[</span><span·class="ss">add</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="3215603515-4">]</span><span·class="p"·data-group-id="3215603515-3">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="w">154 </span><span·class="w">
155 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;Adds·two·numbers.&quot;</span><span·class="w">155 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;Adds·two·numbers.&quot;</span><span·class="w">
156 </span><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="3283927124-5">(</span><span·class="p"·data-group-id="3283927124-6">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p"·data-group-id="32839271[·...·truncated·by·diffoscope;·len:·55,·SHA:·f01f664a682f7690690776c2fb6d1299cf28ec9d92fc4c159ec0af20995d8db1·...·]-5">)</span><span·class="p">.</span><span·class="w">156 </span><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="3215603515-5">(</span><span·class="p"·data-group-id="3215603515-6">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p"·data-group-id="32156035[·...·truncated·by·diffoscope;·len:·55,·SHA:·c506640a5b7be8214b24351377ac840abdfebe530d8c0239c8954b8cd5e99c4a·...·]-5">)</span><span·class="p">.</span><span·class="w">
157 </span><span·class="nf">add</span><span·class="p"·data-group-id="3283927124-7">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="3283927124-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><p>The·metadata·is·used·by·documentation·tools·to·provide·extra·information·to·the157 </span><span·class="nf">add</span><span·class="p"·data-group-id="3215603515-7">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="3215603515-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><p>The·metadata·is·used·by·documentation·tools·to·provide·extra·information·to·the
158 user.·There·can·be·multiple·metadata·documentation·entries,·in·which·case·the158 user.·There·can·be·multiple·metadata·documentation·entries,·in·which·case·the
159 maps·will·be·merged·with·the·latest·taking·precedence·if·there·are·duplicate159 maps·will·be·merged·with·the·latest·taking·precedence·if·there·are·duplicate
160 keys.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;Adds·two·numbers.&quot;</span><span·class="w">160 keys.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;Adds·two·numbers.&quot;</span><span·class="w">
161 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="p"·data-group-id="7142852991-1">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">author</span><span·class=[·...·truncated·by·diffoscope;·len:·143,·SHA:·781f305dd96fbdd9371b6a8e4de0d1280ab494b7b6ba4c19227c54d781d00e8f·...·]-1">}</span><span·class="p">.</span><span·class="w">161 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="p"·data-group-id="8830158662-1">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">author</span><span·class=[·...·truncated·by·diffoscope;·len:·143,·SHA:·d7a4900b2f87cd965b1385e3a7f132631993e8ff2a24f1369c4f2499541ab075·...·]-1">}</span><span·class="p">.</span><span·class="w">
162 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="p"·data-group-id="7142852991-2">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;2.0&quot;</span><span·class="p"·data-group-id="7142852991-2">}</span><span·class="p">.</span><span·class="w">162 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="p"·data-group-id="8830158662-2">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;2.0&quot;</span><span·class="p"·data-group-id="8830158662-2">}</span><span·class="p">.</span><span·class="w">
163 </span><span·class="nf">add</span><span·class="p"·data-group-id="7142852991-3">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="7142852991-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><p>This·will·result·in·a·metadata·entry·of·<code·class="inline">#{since·=&gt;·&quot;2.0&quot;,·author·=&gt;·&quot;Joe&quot;}</code>.</p><p>The·keys·and·values·in·the·metadata·map·can·be·any·type,·but·it·is·recommended163 </span><span·class="nf">add</span><span·class="p"·data-group-id="8830158662-3">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="8830158662-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><p>This·will·result·in·a·metadata·entry·of·<code·class="inline">#{since·=&gt;·&quot;2.0&quot;,·author·=&gt;·&quot;Joe&quot;}</code>.</p><p>The·keys·and·values·in·the·metadata·map·can·be·any·type,·but·it·is·recommended
164 that·only·<a·href="data_types.html#atom">atoms</a>·are·used·for·keys·and164 that·only·<a·href="data_types.html#atom">atoms</a>·are·used·for·keys·and
165 <a·href="data_types.html#string">strings</a>·for·the·values.</p><h2·id="external-documentation-files"·class="section-heading">165 <a·href="data_types.html#string">strings</a>·for·the·values.</p><h2·id="external-documentation-files"·class="section-heading">
166 ··<a·href="#external-documentation-files"·class="hover-link">166 ··<a·href="#external-documentation-files"·class="hover-link">
167 ····<i·class="ri-link-m"·aria-hidden="true"></i>167 ····<i·class="ri-link-m"·aria-hidden="true"></i>
168 ··</a>168 ··</a>
169 ··<span·class="text">External·documentation·files</span>169 ··<span·class="text">External·documentation·files</span>
170 </h2>170 </h2>
171 <p>The·<code·class="inline">-moduledoc</code>·and·<code·class="inline">-doc</code>·can·also·be·placed·in·external·files.·To·do·so·use171 <p>The·<code·class="inline">-moduledoc</code>·and·<code·class="inline">-doc</code>·can·also·be·placed·in·external·files.·To·do·so·use
172 <code·class="inline">-doc·{file,·&quot;path/to/doc.md&quot;}</code>·to·point·to·the·documentation.·The·path·used·is172 <code·class="inline">-doc·{file,·&quot;path/to/doc.md&quot;}</code>·to·point·to·the·documentation.·The·path·used·is
173 relative·to·the·file·where·the·<code·class="inline">-doc</code>·attribute·is·located.·For·example:</p><pre><code·class="text">%%·doc/add.md173 relative·to·the·file·where·the·<code·class="inline">-doc</code>·attribute·is·located.·For·example:</p><pre><code·class="text">%%·doc/add.md
174 Adds·two·numbers.</code></pre><p>and</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·src/arith.erl</span><span·class="w">174 Adds·two·numbers.</code></pre><p>and</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·src/arith.erl</span><span·class="w">
175 </span><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="1270182445-1">(</span><span·class="p"·data-group-id="1270182445-2">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;../doc/add.md&quot;</span><span·class="p"·data-group-id="1270182445-2">}</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·da70f45a48f3b3accc6842fe873cf13ae11de9a8d234e757d5b3889f02440ff9·...·]-1">)</span><span·class="p">.</span><span·class="w">175 </span><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="9770493399-1">(</span><span·class="p"·data-group-id="9770493399-2">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;../doc/add.md&quot;</span><span·class="p"·data-group-id="9770493399-2">}</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·89a269f5bcefacbc8c8cc0e26984c7382ee2b95fb6c15f3f37d599de2f7fbd59·...·]-1">)</span><span·class="p">.</span><span·class="w">
176 </span><span·class="nf">add</span><span·class="p"·data-group-id="1270182445-3">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="1270182445-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><h2·id="documenting-a-module"·class="section-heading">176 </span><span·class="nf">add</span><span·class="p"·data-group-id="9770493399-3">(</span><span·class="n">One</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Two</span><span·class="p"·data-group-id="9770493399-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">One</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Two</span><span·class="p">.</span></code></pre><h2·id="documenting-a-module"·class="section-heading">
177 ··<a·href="#documenting-a-module"·class="hover-link">177 ··<a·href="#documenting-a-module"·class="hover-link">
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Documenting·a·module</span>180 ··<span·class="text">Documenting·a·module</span>
181 </h2>181 </h2>
182 <p>The·module·description·should·include·details·on·how·to·use·the·API·and·examples182 <p>The·module·description·should·include·details·on·how·to·use·the·API·and·examples
183 of·the·different·functions·working·together.·Here·is·a·good·place·to·use·images183 of·the·different·functions·working·together.·Here·is·a·good·place·to·use·images
184 and·other·diagrams·to·better·show·the·usage·of·the·module.·Instead·of·writing·a184 and·other·diagrams·to·better·show·the·usage·of·the·module.·Instead·of·writing·a
185 long·text·in·the·<code·class="inline">moduledoc</code>·attribute,·it·could·be·better·to·break·it·out·into185 long·text·in·the·<code·class="inline">moduledoc</code>·attribute,·it·could·be·better·to·break·it·out·into
186 an·external·page.</p><p>The·<code·class="inline">moduledoc</code>·attribute·should·start·with·a·short·paragraph·describing·the186 an·external·page.</p><p>The·<code·class="inline">moduledoc</code>·attribute·should·start·with·a·short·paragraph·describing·the
187 module·and·then·go·into·greater·details.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3222734920-1">(</span><span·class="ss">arith</span><span·class="p"·data-group-id="3222734920-1">)</span><span·class="p">.</span><span·class="w">187 module·and·then·go·into·greater·details.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7626096088-1">(</span><span·class="ss">arith</span><span·class="p"·data-group-id="7626096088-1">)</span><span·class="p">.</span><span·class="w">
188 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;188 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;
189 ···A·module·for·basic·arithmetic.189 ···A·module·for·basic·arithmetic.
  
190 ···This·module·can·be·used·to·add·and·subtract·values.·For·example:190 ···This·module·can·be·used·to·add·and·subtract·values.·For·example:
  
191 ···```erlang191 ···```erlang
192 ···1&gt;·arith:substract(arith:add(2,·3),·1).192 ···1&gt;·arith:substract(arith:add(2,·3),·1).
Offset 203, 95 lines modifiedOffset 203, 95 lines modified
203 <p>There·are·three·reserved·metadata·keys·for·<code·class="inline">-moduledoc</code>:</p><ul><li><code·class="inline">since</code>·-·Shows·in·which·version·of·the·application·the·module·was·added.203 <p>There·are·three·reserved·metadata·keys·for·<code·class="inline">-moduledoc</code>:</p><ul><li><code·class="inline">since</code>·-·Shows·in·which·version·of·the·application·the·module·was·added.
204 If·this·is·added,·all·functions,·types,·and·callbacks·within·will·also·receive204 If·this·is·added,·all·functions,·types,·and·callbacks·within·will·also·receive
205 the·same·<code·class="inline">since</code>·value·unless·specified·in·the·metadata·of·the·function,·type205 the·same·<code·class="inline">since</code>·value·unless·specified·in·the·metadata·of·the·function,·type
206 or·callback.</li><li><code·class="inline">deprecated</code>·-·Shows·a·text·in·the·documentation·explaining·that·it·is206 or·callback.</li><li><code·class="inline">deprecated</code>·-·Shows·a·text·in·the·documentation·explaining·that·it·is
207 deprecated·and·what·to·use·instead.</li><li><code·class="inline">format</code>·-·The·format·to·use·for·all·documentation·in·this·module.·The207 deprecated·and·what·to·use·instead.</li><li><code·class="inline">format</code>·-·The·format·to·use·for·all·documentation·in·this·module.·The
208 default·is·<code·class="inline">text/markdown</code>.·It·should·be·written·using·the208 default·is·<code·class="inline">text/markdown</code>.·It·should·be·written·using·the
209 <a·href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">mime·type</a>209 <a·href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">mime·type</a>
210 of·the·format.</li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="4912437866-1">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;../doc/arith.asciidoc&quot;</span><span·class="p"·data-group-id="4912437866-1">}</span><span·class="p">.</span><span·class="w">210 of·the·format.</li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="3316012963-1">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;../doc/arith.asciidoc&quot;</span><span·class="p"·data-group-id="3316012963-1">}</span><span·class="p">.</span><span·class="w">
211 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="4912437866-2">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;0.1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">format</span><span·class=[·...·truncated·by·diffoscope;·len:·153,·SHA:·744f92ef8fab64b0be138ed17c234e45d178bf617829852be12189de29c9bc51·...·]-2">}</span><span·class="p">.</span><span·class="w">211 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="3316012963-2">#{</span><span·class="ss">since</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;0.1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">format</span><span·class=[·...·truncated·by·diffoscope;·len:·153,·SHA:·4329f02ca12a2dd3754914b9bfcd9143bf8b6d2b0b888b0b17cebcac1c80b3c2·...·]-2">}</span><span·class="p">.</span><span·class="w">
212 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="4912437866-3">#{</span><span·class="ss">deprecated</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;Use·the·Erlang·arithmetic·operators·instead.&quot;</span><span·class="p"·data-group-id="4912437866-3">}</span><span·class="p">.</span></code></pre><h2·id="documenting-functions-user-defined-types-and-callbacks"·class="section-heading">212 </span><span·class="p">-</span><span·class="na">moduledoc</span><span·class="w">·</span><span·class="p"·data-group-id="3316012963-3">#{</span><span·class="ss">deprecated</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;Use·the·Erlang·arithmetic·operators·instead.&quot;</span><span·class="p"·data-group-id="3316012963-3">}</span><span·class="p">.</span></code></pre><h2·id="documenting-functions-user-defined-types-and-callbacks"·class="section-heading">
213 ··<a·href="#documenting-functions-user-defined-types-and-callbacks"·class="hover-link">213 ··<a·href="#documenting-functions-user-defined-types-and-callbacks"·class="hover-link">
214 ····<i·class="ri-link-m"·aria-hidden="true"></i>214 ····<i·class="ri-link-m"·aria-hidden="true"></i>
215 ··</a>215 ··</a>
216 ··<span·class="text">Documenting·functions,·user-defined·types,·and·callbacks</span>216 ··<span·class="text">Documenting·functions,·user-defined·types,·and·callbacks</span>
217 </h2>217 </h2>
218 <p>Functions,·types,·and·callbacks·can·be·documented·using·the·<code·class="inline">-doc</code>·attribute.218 <p>Functions,·types,·and·callbacks·can·be·documented·using·the·<code·class="inline">-doc</code>·attribute.
219 Each·entry·should·start·with·a·short·paragraph·describing·the·purpose·of·entity,219 Each·entry·should·start·with·a·short·paragraph·describing·the·purpose·of·entity,
220 and·then·go·into·greater·detail·in·needed.</p><p>It·is·not·recommended·to·include·images·or·diagrams·in·this·documentation·as·it220 and·then·go·into·greater·detail·in·needed.</p><p>It·is·not·recommended·to·include·images·or·diagrams·in·this·documentation·as·it
221 is·used·by·IDEs·and·<a·href="../../lib/stdlib-6.0.1/doc/html/c.html#h/1"><code·class="inline">c:h/1</code></a>·to·show·the·documentation·to·the·user.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;221 is·used·by·IDEs·and·<a·href="../../lib/stdlib-6.0.1/doc/html/c.html#h/1"><code·class="inline">c:h/1</code></a>·to·show·the·documentation·to·the·user.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;
222 A·number·that·can·be·used·by·the·arith·module.222 A·number·that·can·be·used·by·the·arith·module.
  
223 We·use·a·special·number·here·so·that·we·know223 We·use·a·special·number·here·so·that·we·know
224 that·this·number·comes·from·this·module.224 that·this·number·comes·from·this·module.
225 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">225 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">
226 </span><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">number</span><span·class="p"·data-group-id="0076649128-1">(</span><span·class="p"·data-group-id="0076649128-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="0076649128-2">{</span><span·class="ss">arith</span><sp[·...·truncated·by·diffoscope;·len:·276,·SHA:·faa17a6f870857c81d0da8fcfe3496f8dfa795b378043f621c9991517ef94022·...·]-2">}</span><span·class="p">.</span><span·class="w">226 </span><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">number</span><span·class="p"·data-group-id="9618975503-1">(</span><span·class="p"·data-group-id="9618975503-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9618975503-2">{</span><span·class="ss">arith</span><sp[·...·truncated·by·diffoscope;·len:·276,·SHA:·685b728b8b88dccaab3ad5e1e2670951049497a973c10371b6b0176b7de263fc·...·]-2">}</span><span·class="p">.</span><span·class="w">
227 </span><span·class="w">227 </span><span·class="w">
228 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;228 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;&quot;&quot;
229 Adds·two·numbers.229 Adds·two·numbers.
  
230 ###·Example:230 ###·Example:
  
231 ```231 ```
232 1&gt;·arith:add(arith:number(1),·arith:number(2)).·{number,·3}232 1&gt;·arith:add(arith:number(1),·arith:number(2)).·{number,·3}
233 ```233 ```
234 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">234 &quot;&quot;&quot;</span><span·class="p">.</span><span·class="w">
235 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">add</span><span·class="p"·data-group-id="0076649128-4">(</span><span·class="nf">number</span><span·class="p"·data-group-id="0076649128-5">(</span><span·class="p"·data-group-id="0076649128-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">number</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·339,·SHA:·c7761efb53f8f1cbf870c1daf1f12c27ab205c78a89e16d603cde73424946a8e·...·]-7">)</span><span·class="p">.</span><span·class="w">235 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">add</span><span·class="p"·data-group-id="9618975503-4">(</span><span·class="nf">number</span><span·class="p"·data-group-id="9618975503-5">(</span><span·class="p"·data-group-id="9618975503-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">number</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·339,·SHA:·7843cef7eb7546af1531f9f9f5d880aa9cdb8cfd98930fd18bbce8aa5291265f·...·]-7">)</span><span·class="p">.</span><span·class="w">
236 </span><span·class="nf">add</span><span·class="p"·data-group-id="0076649128-8">(</span><span·class="p"·data-group-id="0076649128-9">{</span><span·class="ss">number</span><span·class="p">,</span><span·class="w">·</span><span·class="n">One</span><span·class="p"·data-group-id="0076649128-9">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·662,·SHA:·94635c780adc63e3b777d5a536ab8dae3a157d292fbcb8aed8c84493d8d75f70·...·]-11">}</span><span·class="p">.</span></code></pre><h3·id="doc-metadata"·class="section-heading">236 </span><span·class="nf">add</span><span·class="p"·data-group-id="9618975503-8">(</span><span·class="p"·data-group-id="9618975503-9">{</span><span·class="ss">number</span><span·class="p">,</span><span·class="w">·</span><span·class="n">One</span><span·class="p"·data-group-id="9618975503-9">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·662,·SHA:·0cdab7b82a252c4e9f27b5946792be1e4e6955aac884f5a025ed91703cf23942·...·]-11">}</span><span·class="p">.</span></code></pre><h3·id="doc-metadata"·class="section-heading">
237 ··<a·href="#doc-metadata"·class="hover-link">237 ··<a·href="#doc-metadata"·class="hover-link">
238 ····<i·class="ri-link-m"·aria-hidden="true"></i>238 ····<i·class="ri-link-m"·aria-hidden="true"></i>
239 ··</a>239 ··</a>
240 ··<span·class="text">Doc·metadata</span>240 ··<span·class="text">Doc·metadata</span>
241 </h3>241 </h3>
242 <p>There·are·four·reserved·metadata·keys·for·<code·class="inline">-doc</code>:</p><ul><li><p><code·class="inline">since·=&gt;·unicode:chardata()</code>·-·Shows·which·version·of·the·application·the242 <p>There·are·four·reserved·metadata·keys·for·<code·class="inline">-doc</code>:</p><ul><li><p><code·class="inline">since·=&gt;·unicode:chardata()</code>·-·Shows·which·version·of·the·application·the
243 module·was·added.</p></li><li><p><code·class="inline">deprecated·=&gt;·unicode:chardata()</code>·-·Shows·a·text·in·the·documentation243 module·was·added.</p></li><li><p><code·class="inline">deprecated·=&gt;·unicode:chardata()</code>·-·Shows·a·text·in·the·documentation
244 explaining·that·it·is·deprecated·and·what·to·use·instead.·The·compiler·will244 explaining·that·it·is·deprecated·and·what·to·use·instead.·The·compiler·will
245 automatically·insert·this·key·if·there·is·a·<code·class="inline">-deprecated</code>·attribute·marking·a245 automatically·insert·this·key·if·there·is·a·<code·class="inline">-deprecated</code>·attribute·marking·a
246 function·as·deprecated.</p></li><li><p><code·class="inline">equiv·=&gt;·unicode:chardata()·|·F/A·|·F(...)</code>·-·Notes·that·this·function·is·equivalent·to246 function·as·deprecated.</p></li><li><p><code·class="inline">equiv·=&gt;·unicode:chardata()·|·F/A·|·F(...)</code>·-·Notes·that·this·function·is·equivalent·to
Max diff block lines reached; 37330/66271 bytes (56.33%) of diff not shown.
7.16 KB
./usr/share/doc/erlang-doc/html/doc/system/drivers.html
    
Offset 122, 23 lines modifiedOffset 122, 23 lines modified
122 ··<span·class="text">Drivers·and·Concurrency</span>122 ··<span·class="text">Drivers·and·Concurrency</span>
123 </h2>123 </h2>
124 <p>The·runtime·system·always·takes·a·lock·before·running·any·code·in·a·driver.</p><p>By·default,·that·lock·is·at·the·driver·level,·that·is,·if·several·ports·have124 <p>The·runtime·system·always·takes·a·lock·before·running·any·code·in·a·driver.</p><p>By·default,·that·lock·is·at·the·driver·level,·that·is,·if·several·ports·have
125 been·opened·to·the·same·driver,·only·code·for·one·port·at·the·same·time·can·be125 been·opened·to·the·same·driver,·only·code·for·one·port·at·the·same·time·can·be
126 running.</p><p>A·driver·can·be·configured·to·have·one·lock·for·each·port·instead.</p><p>If·a·driver·is·used·in·a·functional·way·(that·is,·holds·no·state,·but·only·does126 running.</p><p>A·driver·can·be·configured·to·have·one·lock·for·each·port·instead.</p><p>If·a·driver·is·used·in·a·functional·way·(that·is,·holds·no·state,·but·only·does
127 some·heavy·calculation·and·returns·a·result),·several·ports·with·registered127 some·heavy·calculation·and·returns·a·result),·several·ports·with·registered
128 names·can·be·opened·beforehand,·and·the·port·to·be·used·can·be·chosen·based·on128 names·can·be·opened·beforehand,·and·the·port·to·be·used·can·be·chosen·based·on
129 the·scheduler·ID·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2521702408-1">(</span><span·class="n">PORT_NAMES</span><span·class="p"·data-group-id="2521702408-2">(</span><span·class="p"·data-group-id="2521702408-2">)</span><span·class="p">,</span><span·class="w">129 the·scheduler·ID·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6837238065-1">(</span><span·class="n">PORT_NAMES</span><span·class="p"·data-group-id="6837238065-2">(</span><span·class="p"·data-group-id="6837238065-2">)</span><span·class="p">,</span><span·class="w">
130 »       </span><span·class="p"·data-group-id="2521702408-3">{</span><span·class="ss">some_driver_01</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_02</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_03</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_04</span><span·class="p">,</span><span·class="w">130 »       </span><span·class="p"·data-group-id="6837238065-3">{</span><span·class="ss">some_driver_01</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_02</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_03</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_04</span><span·class="p">,</span><span·class="w">
131 »       ·</span><span·class="ss">some_driver_05</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_06</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_07</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_08</span><span·class="p">,</span><span·class="w">131 »       ·</span><span·class="ss">some_driver_05</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_06</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_07</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_08</span><span·class="p">,</span><span·class="w">
132 »       ·</span><span·class="ss">some_driver_09</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_10</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_11</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_12</span><span·class="p">,</span><span·class="w">132 »       ·</span><span·class="ss">some_driver_09</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_10</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_11</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_12</span><span·class="p">,</span><span·class="w">
133 »       ·</span><span·class="ss">some_driver_13</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_16</span><span·class="p"·data-group-id="2521702408-3">}</span><span·class="p"·data-group-id="2521702408-1">)</span><span·class="p">.</span><span·class="w">133 »       ·</span><span·class="ss">some_driver_13</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_14</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_15</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">some_driver_16</span><span·class="p"·data-group-id="6837238065-3">}</span><span·class="p"·data-group-id="6837238065-1">)</span><span·class="p">.</span><span·class="w">
  
134 </span><span·class="nf">client_port</span><span·class="p"·data-group-id="2521702408-4">(</span><span·class="p"·data-group-id="2521702408-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">134 </span><span·class="nf">client_port</span><span·class="p"·data-group-id="6837238065-4">(</span><span·class="p"·data-group-id="6837238065-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
135 ····</span><span·class="nf">element</span><span·class="p"·data-group-id="2521702408-5">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="2521702408-6">(</span><span·class="ss">scheduler_id</span><span·class="p"·data-group-id="2521702408-6">)</span><span·class="w">·</span><span·class="ow">rem</span><span·class="w">·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="2521702408-7">(</span><span·class="o">?</span><span·class="n">PORT_NAMES</span><span·class="p"·data-group-id="2521702408-8">(</span><span·class="p"·data-group-id="2521702408-8">)</span><span·class="p"·data-group-id="2521702408-7">)</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w"> 
136 »       ····</span><span·class="o">?</span><span·class="n">PORT_NAMES</span><span·class="p"·data-group-id="2521702408-9">(</span><span·class="p"·data-group-id="2521702408-9">)</span><span·class="p"·data-group-id="2521702408-5">)</span><span·class="p">.</span></co[·...·truncated·by·diffoscope;·len:·89,·SHA:·aa315350b3c5d458adacb1d650a0680f6599dab7560522cff5dacd05f86c84c5·...·]135 ····</span><span·class="nf">element</span><span·class="p"·data-group-id="6837238065-5">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="6837238065-6">(</span><span·class="ss">sc[·...·truncated·by·diffoscope;·len:·585,·SHA:·ea2780595f109de179a50ddea9d08f078147920121be0c288666211b2e85d35f·...·]
 136 »       ····</span><span·class="o">?</span><span·class="n">PORT_NAMES</span><span·class="p"·data-group-id="6837238065-9">(</span><span·class="p"·data-group-id="6837238065-9">)</span><span·class="p"·data-group-id="6837238065-5">)</span><span·class="p">.</span></code></pre><p>As·long·as·there·are·no·more·than·16·schedulers,·there·will·never·be·any·lock
137 contention·on·the·port·lock·for·the·driver.</p><h2·id="avoiding-copying-binaries-when-calling-a-driver"·class="section-heading">137 contention·on·the·port·lock·for·the·driver.</p><h2·id="avoiding-copying-binaries-when-calling-a-driver"·class="section-heading">
138 ··<a·href="#avoiding-copying-binaries-when-calling-a-driver"·class="hover-link">138 ··<a·href="#avoiding-copying-binaries-when-calling-a-driver"·class="hover-link">
139 ····<i·class="ri-link-m"·aria-hidden="true"></i>139 ····<i·class="ri-link-m"·aria-hidden="true"></i>
140 ··</a>140 ··</a>
141 ··<span·class="text">Avoiding·Copying·Binaries·When·Calling·a·Driver</span>141 ··<span·class="text">Avoiding·Copying·Binaries·When·Calling·a·Driver</span>
142 </h2>142 </h2>
143 <p>There·are·basically·two·ways·to·avoid·copying·a·binary·that·is·sent·to·a·driver:</p><ul><li><p>If·the·<code·class="inline">Data</code>·argument·for·<a·href="../../erts-15.0.1/doc/html/erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>·is·a143 <p>There·are·basically·two·ways·to·avoid·copying·a·binary·that·is·sent·to·a·driver:</p><ul><li><p>If·the·<code·class="inline">Data</code>·argument·for·<a·href="../../erts-15.0.1/doc/html/erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>·is·a
33.4 KB
./usr/share/doc/erlang-doc/html/doc/system/eff_guide_functions.html
    
Offset 122, 67 lines modifiedOffset 122, 67 lines modified
122 ··<span·class="text">Pattern·Matching</span>122 ··<span·class="text">Pattern·Matching</span>
123 </h2>123 </h2>
124 <p>Pattern·matching·in·function·head·as·well·as·in·<code·class="inline">case</code>·and·<code·class="inline">receive</code>·clauses·are124 <p>Pattern·matching·in·function·head·as·well·as·in·<code·class="inline">case</code>·and·<code·class="inline">receive</code>·clauses·are
125 optimized·by·the·compiler.·With·a·few·exceptions,·there·is·nothing·to·gain·by125 optimized·by·the·compiler.·With·a·few·exceptions,·there·is·nothing·to·gain·by
126 rearranging·clauses.</p><p>One·exception·is·pattern·matching·of·binaries.·The·compiler·does·not·rearrange126 rearranging·clauses.</p><p>One·exception·is·pattern·matching·of·binaries.·The·compiler·does·not·rearrange
127 clauses·that·match·binaries.·Placing·the·clause·that·matches·against·the·empty127 clauses·that·match·binaries.·Placing·the·clause·that·matches·against·the·empty
128 binary·<em>last</em>·is·usually·slightly·faster·than·placing·it·<em>first</em>.</p><p>The·following·is·a·rather·unnatural·example·to·show·another·exception·where128 binary·<em>last</em>·is·usually·slightly·faster·than·placing·it·<em>first</em>.</p><p>The·following·is·a·rather·unnatural·example·to·show·another·exception·where
129 rearranging·clauses·is·beneficial:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-1">(</span><span·class="ss">one</span><span·class="p"·data-group-id="4049402595-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">129 rearranging·clauses·is·beneficial:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-1">(</span><span·class="ss">one</span><span·class="p"·data-group-id="3850146309-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
130 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-2">(</span><span·class="ss">two</span><span·class="p"·data-group-id="4049402595-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">130 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-2">(</span><span·class="ss">two</span><span·class="p"·data-group-id="3850146309-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">
131 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-3">(</span><span·class="ss">three</span><span·class="p"·data-group-id="4049402595-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">;</span><span·class="w">131 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-3">(</span><span·class="ss">three</span><span·class="p"·data-group-id="3850146309-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">;</span><span·class="w">
132 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-4">(</span><span·class="n">Int</span><span·class="p"·data-group-id="4049402595-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="4049402595-5">([·...·truncated·by·diffoscope;·len:·74,·SHA:·d25f94abecbead3f4e264a02da7b23722e552d2745f02ad78faf987703a3858a·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">;</span><span·class="w">132 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-4">(</span><span·class="n">Int</span><span·class="p"·data-group-id="3850146309-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="3850146309-5">([·...·truncated·by·diffoscope;·len:·74,·SHA:·6539aeda495bdc7dd20eebcb2a2cc387fd1c7de46d9185e45e60a80a16b230c0·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">;</span><span·class="w">
133 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-6">(</span><span·class="ss">four</span><span·class="p"·data-group-id="4049402595-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">;</span><span·class="w">133 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-6">(</span><span·class="ss">four</span><span·class="p"·data-group-id="3850146309-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">;</span><span·class="w">
134 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-7">(</span><span·class="ss">five</span><span·class="p"·data-group-id="4049402595-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">;</span><span·class="w">134 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-7">(</span><span·class="ss">five</span><span·class="p"·data-group-id="3850146309-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">;</span><span·class="w">
135 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="4049402595-8">(</span><span·class="ss">six</span><span·class="p"·data-group-id="4049402595-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">.</span></code></pre><p>The·problem·is·the·clause·with·the·variable·<code·class="inline">Int</code>.·As·a·variable·can·match135 </span><span·class="nf">atom_map1</span><span·class="p"·data-group-id="3850146309-8">(</span><span·class="ss">six</span><span·class="p"·data-group-id="3850146309-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">.</span></code></pre><p>The·problem·is·the·clause·with·the·variable·<code·class="inline">Int</code>.·As·a·variable·can·match
136 anything,·including·the·atoms·<code·class="inline">four</code>,·<code·class="inline">five</code>,·and·<code·class="inline">six</code>,·which·the·following136 anything,·including·the·atoms·<code·class="inline">four</code>,·<code·class="inline">five</code>,·and·<code·class="inline">six</code>,·which·the·following
137 clauses·also·match,·the·compiler·must·generate·suboptimal·code·that·executes·as137 clauses·also·match,·the·compiler·must·generate·suboptimal·code·that·executes·as
138 follows:</p><ul><li>First,·the·input·value·is·compared·to·<code·class="inline">one</code>,·<code·class="inline">two</code>,·and·<code·class="inline">three</code>·(using·a138 follows:</p><ul><li>First,·the·input·value·is·compared·to·<code·class="inline">one</code>,·<code·class="inline">two</code>,·and·<code·class="inline">three</code>·(using·a
139 single·instruction·that·does·a·binary·search;·thus,·quite·efficient·even·if139 single·instruction·that·does·a·binary·search;·thus,·quite·efficient·even·if
140 there·are·many·values)·to·select·which·one·of·the·first·three·clauses·to140 there·are·many·values)·to·select·which·one·of·the·first·three·clauses·to
141 execute·(if·any).</li><li>If·none·of·the·first·three·clauses·match,·the·fourth·clause·match·as·a141 execute·(if·any).</li><li>If·none·of·the·first·three·clauses·match,·the·fourth·clause·match·as·a
142 variable·always·matches.</li><li>If·the·guard·test·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_integer/1"><code·class="inline">is_integer(Int)</code></a>·succeeds,·the·fourth142 variable·always·matches.</li><li>If·the·guard·test·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_integer/1"><code·class="inline">is_integer(Int)</code></a>·succeeds,·the·fourth
143 clause·is·executed.</li><li>If·the·guard·test·fails,·the·input·value·is·compared·to·<code·class="inline">four</code>,·<code·class="inline">five</code>,·and143 clause·is·executed.</li><li>If·the·guard·test·fails,·the·input·value·is·compared·to·<code·class="inline">four</code>,·<code·class="inline">five</code>,·and
144 <code·class="inline">six</code>,·and·the·appropriate·clause·is·selected.·(There·is·a·<code·class="inline">function_clause</code>144 <code·class="inline">six</code>,·and·the·appropriate·clause·is·selected.·(There·is·a·<code·class="inline">function_clause</code>
145 exception·if·none·of·the·values·matched.)</li></ul><p>Rewriting·to·either:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-1">(</span><span·class="ss">one</span><span·class="p"·data-group-id="9157322398-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">145 exception·if·none·of·the·values·matched.)</li></ul><p>Rewriting·to·either:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-1">(</span><span·class="ss">one</span><span·class="p"·data-group-id="8952445061-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
146 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-2">(</span><span·class="ss">two</span><span·class="p"·data-group-id="9157322398-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">146 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-2">(</span><span·class="ss">two</span><span·class="p"·data-group-id="8952445061-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">
147 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-3">(</span><span·class="ss">three</span><span·class="p"·data-group-id="9157322398-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">;</span><span·class="w">147 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-3">(</span><span·class="ss">three</span><span·class="p"·data-group-id="8952445061-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">;</span><span·class="w">
148 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-4">(</span><span·class="ss">four</span><span·class="p"·data-group-id="9157322398-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">;</span><span·class="w">148 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-4">(</span><span·class="ss">four</span><span·class="p"·data-group-id="8952445061-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">;</span><span·class="w">
149 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-5">(</span><span·class="ss">five</span><span·class="p"·data-group-id="9157322398-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">;</span><span·class="w">149 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-5">(</span><span·class="ss">five</span><span·class="p"·data-group-id="8952445061-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">;</span><span·class="w">
150 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-6">(</span><span·class="ss">six</span><span·class="p"·data-group-id="9157322398-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">;</span><span·class="w">150 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-6">(</span><span·class="ss">six</span><span·class="p"·data-group-id="8952445061-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">;</span><span·class="w">
151 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="9157322398-7">(</span><span·class="n">Int</span><span·class="p"·data-group-id="9157322398-7">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="9157322398-8">([·...·truncated·by·diffoscope;·len:·703,·SHA:·681b1e00a2ffb4a177eab10b679ee79550843773747d8ed650d3d88e9f7f3905·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">;</span><span·class="w">151 </span><span·class="nf">atom_map2</span><span·class="p"·data-group-id="8952445061-7">(</span><span·class="n">Int</span><span·class="p"·data-group-id="8952445061-7">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="8952445061-8">([·...·truncated·by·diffoscope;·len:·703,·SHA:·2c8aea8271f473c0d295f32a236a9565331529a3608c11e0500436a5121a4285·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">;</span><span·class="w">
152 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8010894883-3">(</span><span·class="ss">one</span><span·class="p"·data-group-id="8010894883-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">152 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8207661276-3">(</span><span·class="ss">one</span><span·class="p"·data-group-id="8207661276-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
153 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8010894883-4">(</span><span·class="ss">two</span><span·class="p"·data-group-id="8010894883-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">153 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8207661276-4">(</span><span·class="ss">two</span><span·class="p"·data-group-id="8207661276-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">
154 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8010894883-5">(</span><span·class="ss">three</span><span·class="p"·data-group-id="8010894883-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">;</span><span·class="w">154 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8207661276-5">(</span><span·class="ss">three</span><span·class="p"·data-group-id="8207661276-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">;</span><span·class="w">
155 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8010894883-6">(</span><span·class="ss">four</span><span·class="p"·data-group-id="8010894883-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">;</span><span·class="w">155 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8207661276-6">(</span><span·class="ss">four</span><span·class="p"·data-group-id="8207661276-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">;</span><span·class="w">
156 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8010894883-7">(</span><span·class="ss">five</span><span·class="p"·data-group-id="8010894883-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">;</span><span·class="w">156 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8207661276-7">(</span><span·class="ss">five</span><span·class="p"·data-group-id="8207661276-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">;</span><span·class="w">
157 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8010894883-8">(</span><span·class="ss">six</span><span·class="p"·data-group-id="8010894883-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">.</span></code></pre><p>gives·slightly[·...·truncated·by·diffoscope;·len:·540,·SHA:·44927a0c1234694d6d3e528e3f17c84072afb66d01eac39cbab0997805c3037b·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">atom_map3</span><span·class="p"·data-group-id="8207661276-8">(</span><span·class="ss">six</span><span·class="p"·data-group-id="8207661276-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">.</span></code></pre><p>gives·slightly[·...·truncated·by·diffoscope;·len:·540,·SHA:·96272ddc7e85555784cfeef76696a3f963483c9bbc47dfe13f37a4996576c755·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="n">Ys</span><span·class="p">;</span><span·class="w">158 ····</span><span·class="n">Ys</span><span·class="p">;</span><span·class="w">
159 </span><span·class="nf">map_pairs1</span><span·class="p"·data-group-id="7966629415-3">(</span><span·class="p">_</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Xs</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7966629415-4">[</span><span·clas[·...·truncated·by·diffoscope;·len:·84,·SHA:·c0c4a2f6cdb3c1cb8c5b1de97a424bb8a06e364474fe016cb0e46eae1665422e·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 </span><span·class="nf">map_pairs1</span><span·class="p"·data-group-id="8636592211-3">(</span><span·class="p">_</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Xs</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8636592211-4">[</span><span·clas[·...·truncated·by·diffoscope;·len:·84,·SHA:·debc26c3446e5e1790c0af1b19334c83978ba65d01f1b29e5528f1ac08e96f4b·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ····</span><span·class="n">Xs</span><span·class="p">;</span><span·class="w">160 ····</span><span·class="n">Xs</span><span·class="p">;</span><span·class="w">
161 </span><span·class="nf">map_pairs1</span><span·class="p"·data-group-id="7966629415-5">(</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7966629415-6">[</span><span·class="n">X</span><span·class="p">|</span><span·class="n">Xs</span><span·class="p"·data-group-id="796[·...·truncated·by·diffoscope;·len:·287,·SHA:·8f4f921d0e9dc9a3fcca3121dcf096ff6a6382eb80d6f42215bc967343ae46cf·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 </span><span·class="nf">map_pairs1</span><span·class="p"·data-group-id="8636592211-5">(</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8636592211-6">[</span><span·class="n">X</span><span·class="p">|</span><span·class="n">Xs</span><span·class="p"·data-group-id="863[·...·truncated·by·diffoscope;·len:·287,·SHA:·041749adfd62a1591b362c8b9f8cac9b3b5898d42e82ffb0d7932057f93b4d91·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="p"·data-group-id="7966629415-8">[</span><span·class="n">Map</span><span·class="p"·data-group-id="7966629415-9">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="7966629415-9">)</span><span·[·...·truncated·by·diffoscope;·len:·373,·SHA:·3d044d79cbc6d675f5b1ecd35914581ae1bc2cea81b7308b87fe125384c17905·...·]-8">]</span><span·class="p">.</span></code></pre><p>The·first·argument·is·<em>not</em>·a·problem.·It·is·variable,·but·it·is·a·variable·in162 ····</span><span·class="p"·data-group-id="8636592211-8">[</span><span·class="n">Map</span><span·class="p"·data-group-id="8636592211-9">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8636592211-9">)</span><span·[·...·truncated·by·diffoscope;·len:·373,·SHA:·ff2bbe787a01b334036b83ee05f07b1c10660174475386cebc70a389cd8e14aa·...·]-8">]</span><span·class="p">.</span></code></pre><p>The·first·argument·is·<em>not</em>·a·problem.·It·is·variable,·but·it·is·a·variable·in
163 all·clauses.·The·problem·is·the·variable·in·the·second·argument,·<code·class="inline">Xs</code>,·in·the163 all·clauses.·The·problem·is·the·variable·in·the·second·argument,·<code·class="inline">Xs</code>,·in·the
164 middle·clause.·Because·the·variable·can·match·anything,·the·compiler·is·not164 middle·clause.·Because·the·variable·can·match·anything,·the·compiler·is·not
165 allowed·to·rearrange·the·clauses,·but·must·generate·code·that·matches·them·in165 allowed·to·rearrange·the·clauses,·but·must·generate·code·that·matches·them·in
166 the·order·written.</p><p>If·the·function·is·rewritten·as·follows,·the·compiler·is·free·to·rearrange·the166 the·order·written.</p><p>If·the·function·is·rewritten·as·follows,·the·compiler·is·free·to·rearrange·the
167 clauses:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">map_pairs2</span><span·class="p"·data-group-id="1690725596-1">(</span><span·class="p">_</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1690725596-2">[</span><span·class="p"·data-group-id="1690725596-2">]</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·b17496f4b48f029ba5a83868bf5f9b50fd0994a240bcde7887f14ab74e95da8a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 clauses:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">map_pairs2</span><span·class="p"·data-group-id="1208356209-1">(</span><span·class="p">_</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1208356209-2">[</span><span·class="p"·data-group-id="1208356209-2">]</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·67269ce911e9701cbe70ec4ab4fa5bf7bb982a84ffede7c95d844fd6e2c01c37·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ····</span><span·class="n">Ys</span><span·class="p">;</span><span·class="w">168 ····</span><span·class="n">Ys</span><span·class="p">;</span><span·class="w">
169 </span><span·class="nf">map_pairs2</span><span·class="p"·data-group-id="1690725596-3">(</span><span·class="p">_</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1690725596-4">[</span><span·class="p">_</span><span·class="p">|</span><span·class="p">_</span><span·class=[·...·truncated·by·diffoscope;·len:·309,·SHA:·465caf946315483a1756d4ed143bbcf527a481bf958c535dcf3579affec0ac5e·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 </span><span·class="nf">map_pairs2</span><span·class="p"·data-group-id="1208356209-3">(</span><span·class="p">_</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1208356209-4">[</span><span·class="p">_</span><span·class="p">|</span><span·class="p">_</span><span·class=[·...·truncated·by·diffoscope;·len:·309,·SHA:·e8a51cd878b80102f5e7e4d2daa28c39c4caa83a27a9e201bc2fbfc132079a93·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ····</span><span·class="n">Xs</span><span·class="p">;</span><span·class="w">170 ····</span><span·class="n">Xs</span><span·class="p">;</span><span·class="w">
171 </span><span·class="nf">map_pairs2</span><span·class="p"·data-group-id="1690725596-6">(</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1690725596-7">[</span><span·class="n">X</span><span·class="p">|</span><span·class="n">Xs</span><span·class="p"·data-group-id="1690[·...·truncated·by·diffoscope;·len:·286,·SHA:·47dd7a3b9a59195b87264303daf4e98d20d8fd72d2093a2f51b6a8556b8754f4·...·]-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 </span><span·class="nf">map_pairs2</span><span·class="p"·data-group-id="1208356209-6">(</span><span·class="n">Map</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1208356209-7">[</span><span·class="n">X</span><span·class="p">|</span><span·class="n">Xs</span><span·class="p"·data-group-id="1208[·...·truncated·by·diffoscope;·len:·286,·SHA:·de69b7733726f4983622ab41bb9496c0d6195b76168e059866cbb3d1828cf2d1·...·]-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ····</span><span·class="p"·data-group-id="1690725596-9">[</span><span·class="n">Map</span><span·class="p"·data-group-id="1690725596-10">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="1690725596-10">)</span><span[·...·truncated·by·diffoscope;·len:·897,·SHA:·b72e0de1ca1a0f0c5867b403d7269a3549053f31dd60e526ca2bb71a0f3af8fd·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 ····</span><span·class="p"·data-group-id="1208356209-9">[</span><span·class="n">Map</span><span·class="p"·data-group-id="1208356209-10">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="1208356209-10">)</span><span[·...·truncated·by·diffoscope;·len:·897,·SHA:·2a4c3bcb29588c64504e6abb2558c03d2015bf892dc0f546f579bfc17c548157·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Xs0</span><span·class="w">·</span><span·class="k">of</span><span·class="w">173 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Xs0</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
174 »       </span><span·class="p"·data-group-id="9621985944-2">[</span><span·class="n">X</span><span·class="p">|</span><span·class="n">Xs</span><span·class="p"·data-group-id="9621985944-2">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">174 »       </span><span·class="p"·data-group-id="3760261425-2">[</span><span·class="n">X</span><span·class="p">|</span><span·class="n">Xs</span><span·class="p"·data-group-id="3760261425-2">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
175 »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Ys0</span><span·class="w">·</span><span·class="k">of</span><span·class="w">175 »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Ys0</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
176 »       »       </span><span·class="p"·data-group-id="9621985944-3">[</span><span·class="n">Y</span><span·class="p">|</span><span·class="n">Ys</span><span·class="p"·data-group-id="9621985944-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 »       »       </span><span·class="p"·data-group-id="3760261425-3">[</span><span·class="n">Y</span><span·class="p">|</span><span·class="n">Ys</span><span·class="p"·data-group-id="3760261425-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 »       »       ····</span><span·class="p"·data-group-id="9621985944-4">[</span><span·class="n">Map</span><span·class="p"·data-group-id="9621985944-5">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="9621985944-5">)</span><span·[·...·truncated·by·diffoscope;·len:·379,·SHA:·679c355b97339ab2fa0a8a0493d2f3711840668bddec99dc2f6d25fbcf7a5161·...·]-4">]</span><span·class="p">;</span><span·class="w">177 »       »       ····</span><span·class="p"·data-group-id="3760261425-4">[</span><span·class="n">Map</span><span·class="p"·data-group-id="3760261425-5">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="3760261425-5">)</span><span·[·...·truncated·by·diffoscope;·len:·379,·SHA:·d77aa0997904f2d88254fe7e7a977e7dca76660de9ae1ef5196911bc4f620c1e·...·]-4">]</span><span·class="p">;</span><span·class="w">
178 »       »       </span><span·class="p"·data-group-id="9621985944-7">[</span><span·class="p"·data-group-id="9621985944-7">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 »       »       </span><span·class="p"·data-group-id="3760261425-7">[</span><span·class="p"·data-group-id="3760261425-7">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 »       »       ····</span><span·class="n">Xs0</span><span·class="w">179 »       »       ····</span><span·class="n">Xs0</span><span·class="w">
180 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">180 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
181 »       </span><span·class="p"·data-group-id="9621985944-8">[</span><span·class="p"·data-group-id="9621985944-8">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">181 »       </span><span·class="p"·data-group-id="3760261425-8">[</span><span·class="p"·data-group-id="3760261425-8">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
182 »       ····</span><span·class="n">Ys0</span><span·class="w">182 »       ····</span><span·class="n">Ys0</span><span·class="w">
183 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>This·is·slightly·faster·for·probably·the·most·common·case·that·the·input·lists183 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>This·is·slightly·faster·for·probably·the·most·common·case·that·the·input·lists
184 are·not·empty·or·very·short.·(Another·advantage·is·that·Dialyzer·can·deduce·a184 are·not·empty·or·very·short.·(Another·advantage·is·that·Dialyzer·can·deduce·a
185 better·type·for·the·<code·class="inline">Xs</code>·variable.)</p><h2·id="function-calls"·class="section-heading">185 better·type·for·the·<code·class="inline">Xs</code>·variable.)</p><h2·id="function-calls"·class="section-heading">
186 ··<a·href="#function-calls"·class="hover-link">186 ··<a·href="#function-calls"·class="hover-link">
187 ····<i·class="ri-link-m"·aria-hidden="true"></i>187 ····<i·class="ri-link-m"·aria-hidden="true"></i>
188 ··</a>188 ··</a>
65.7 KB
./usr/share/doc/erlang-doc/html/doc/system/eff_guide_processes.html
    
Offset 119, 45 lines modifiedOffset 119, 45 lines modified
119 ··<a·href="#creating-an-erlang-process"·class="hover-link">119 ··<a·href="#creating-an-erlang-process"·class="hover-link">
120 ····<i·class="ri-link-m"·aria-hidden="true"></i>120 ····<i·class="ri-link-m"·aria-hidden="true"></i>
121 ··</a>121 ··</a>
122 ··<span·class="text">Creating·an·Erlang·Process</span>122 ··<span·class="text">Creating·an·Erlang·Process</span>
123 </h2>123 </h2>
124 <p>An·Erlang·process·is·lightweight·compared·to·threads·and·processes·in·operating124 <p>An·Erlang·process·is·lightweight·compared·to·threads·and·processes·in·operating
125 systems.</p><p>A·newly·spawned·Erlang·process·uses·327·words·of·memory.·The·size·can·be·found125 systems.</p><p>A·newly·spawned·Erlang·process·uses·327·words·of·memory.·The·size·can·be·found
126 as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">27</span><span·class="w">·</span><span·class="p"·data-group-id="5640531607-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">14.2</span><span·class="p">.</span><span·class="mi">3</span><span·class="p"·data-group-id="5640531607-1">]</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·1121,·SHA:·e9577860165c31aa14add3849b9b9e1de02246f4c96c7db3fb75f22dc9ad9170·...·]7-6">]</span><span·class="w">126 as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">27</span><span·class="w">·</span><span·class="p"·data-group-id="4243518867-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">14.2</span><span·class="p">.</span><span·class="mi">3</span><span·class="p"·data-group-id="4243518867-1">]</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·1121,·SHA:·073a285db8eba5db01763cd9dc37d0a0d841a60cb6f76353ddfa0e8761f66b40·...·]7-6">]</span><span·class="w">
  
127 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V14</span><span·class="p">.</span><span·class="mf">2.3</span><span·class="w">·</span><span·class="p"·data-group-id="5640531607-7">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·398,·SHA:·4e757069e3e2a51008cc4a369d0d71b8275cf03f0c9eb3343166e5dc5dd4affe·...·]7-7">)</span><span·class="gp·unselectable">127 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V14</span><span·class="p">.</span><span·class="mf">2.3</span><span·class="w">·</span><span·class="p"·data-group-id="4243518867-7">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·398,·SHA:·7d5fabb4f25086bf4fb8dafe844141bb1e31404f924d2219e8c1664bc8f581d6·...·]7-7">)</span><span·class="gp·unselectable">
128 1&gt;·</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5640531607-9">(</span><span·class="p"·data-group-id="5640531607-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">end</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">128 1&gt;·</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4243518867-9">(</span><span·class="p"·data-group-id="4243518867-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">end</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
129 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">43.39164016</span><span·class="o">&gt;</span><span·class="gp·unselectable">129 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">43.39164016</span><span·class="o">&gt;</span><span·class="gp·unselectable">
130 2&gt;·</span><span·class="p"·data-group-id="5640531607-10">{</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="5640531607-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">process_info</[·...·truncated·by·diffoscope;·len:·340,·SHA:·8f8142bbe5242e54f1e4eb299708cabee1c5060d9069737964243e9bb22e7f49·...·]7-11">)</span><span·class="p">.</span><span·class="w">130 2&gt;·</span><span·class="p"·data-group-id="4243518867-10">{</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="4243518867-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">process_info</[·...·truncated·by·diffoscope;·len:·340,·SHA:·10804c3463cff0de71a0500d55e92db4255dc01e4236a617e2a03a69766cef88·...·]7-11">)</span><span·class="p">.</span><span·class="w">
131 </span><span·class="p"·data-group-id="5640531607-13">{</span><span·class="nb">memory</span><span·class="p">,</span><span·class="mi">2616</span><span·class="p"·data-group-id="5640531607-13">}</span><span·class="gp·unselectable">131 </span><span·class="p"·data-group-id="4243518867-13">{</span><span·class="nb">memory</span><span·class="p">,</span><span·class="mi">2616</span><span·class="p"·data-group-id="4243518867-13">}</span><span·class="gp·unselectable">
132 3&gt;·</span><span·class="n">Bytes</span><span·class="w">·</span><span·class="ow">div</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="5640531607-14">(</span><span·class="ss">wordsize</span><span·class="p"·data-group-id="5640531607-14">)</span><span·class="p">.</span><span·class="w">132 3&gt;·</span><span·class="n">Bytes</span><span·class="w">·</span><span·class="ow">div</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="4243518867-14">(</span><span·class="ss">wordsize</span><span·class="p"·data-group-id="4243518867-14">)</span><span·class="p">.</span><span·class="w">
133 </span><span·class="mi">327</span></code></pre><p>The·size·includes·233·words·for·the·heap·area·(which·includes·the·stack).·The133 </span><span·class="mi">327</span></code></pre><p>The·size·includes·233·words·for·the·heap·area·(which·includes·the·stack).·The
134 garbage·collector·increases·the·heap·as·needed.</p><p>The·main·(outer)·loop·for·a·process·<em>must</em>·be·tail-recursive.·Otherwise,·the134 garbage·collector·increases·the·heap·as·needed.</p><p>The·main·(outer)·loop·for·a·process·<em>must</em>·be·tail-recursive.·Otherwise,·the
135 stack·grows·until·the·process·terminates.</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="1242568622-1">(</span><span·class="p"·data-group-id="1242568622-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">135 stack·grows·until·the·process·terminates.</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="4900833580-1">(</span><span·class="p"·data-group-id="4900833580-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
136 ··</span><span·class="k">receive</span><span·class="w">136 ··</span><span·class="k">receive</span><span·class="w">
137 ·····</span><span·class="p"·data-group-id="1242568622-2">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="1242568622-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">137 ·····</span><span·class="p"·data-group-id="4900833580-2">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="4900833580-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
138 ·········</span><span·class="nf">handle_sys_msg</span><span·class="p"·data-group-id="1242568622-3">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="1242568622-3">)</span><span·class="p">,</span><span·class="w">138 ·········</span><span·class="nf">handle_sys_msg</span><span·class="p"·data-group-id="4900833580-3">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="4900833580-3">)</span><span·class="p">,</span><span·class="w">
139 ·········</span><span·class="nf">loop</span><span·class="p"·data-group-id="1242568622-4">(</span><span·class="p"·data-group-id="1242568622-4">)</span><span·class="p">;</span><span·class="w">139 ·········</span><span·class="nf">loop</span><span·class="p"·data-group-id="4900833580-4">(</span><span·class="p"·data-group-id="4900833580-4">)</span><span·class="p">;</span><span·class="w">
140 ·····</span><span·class="p"·data-group-id="1242568622-5">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="1242568622-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">140 ·····</span><span·class="p"·data-group-id="4900833580-5">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="4900833580-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
141 ··········</span><span·class="n">Reply</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="1242568622-6">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="1242568622-6">)</span><span·class="p">,</span><span·class="w">141 ··········</span><span·class="n">Reply</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="4900833580-6">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="4900833580-6">)</span><span·class="p">,</span><span·class="w">
142 ··········</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p">,</span><span·class="w">142 ··········</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p">,</span><span·class="w">
143 ··········</span><span·class="nf">loop</span><span·class="p"·data-group-id="1242568622-7">(</span><span·class="p"·data-group-id="1242568622-7">)</span><span·class="w">143 ··········</span><span·class="nf">loop</span><span·class="p"·data-group-id="4900833580-7">(</span><span·class="p"·data-group-id="4900833580-7">)</span><span·class="w">
144 ··</span><span·class="k">end</span><span·class="p">,</span><span·class="w">144 ··</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
145 ··</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1242568622-8">(</span><span·class="s">&quot;Message·is·processed</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1242568622-9">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·65,·SHA:·36eee46675ec9e6d32534360886132cfbefea06a5d9e9ba6c45867c2ce05f3ed·...·]-8">)</span><span·class="p">.</span></code></pre><p>The·call·to·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#format/2"><code·class="inline">io:format/2</code></a>·will·never·be·executed,·but·a·return·address·will145 ··</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4900833580-8">(</span><span·class="s">&quot;Message·is·processed</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4900833580-9">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·65,·SHA:·42d5f0e6e4daea2088c8078fa19038983f49a2a7455c33f8ad058111c29a171c·...·]-8">)</span><span·class="p">.</span></code></pre><p>The·call·to·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#format/2"><code·class="inline">io:format/2</code></a>·will·never·be·executed,·but·a·return·address·will
146 still·be·pushed·to·the·stack·each·time·<code·class="inline">loop/0</code>·is·called·recursively.·The146 still·be·pushed·to·the·stack·each·time·<code·class="inline">loop/0</code>·is·called·recursively.·The
147 correct·tail-recursive·version·of·the·function·looks·as·follows:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="0253271414-1">(</span><span·class="p"·data-group-id="0253271414-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">147 correct·tail-recursive·version·of·the·function·looks·as·follows:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="2331066348-1">(</span><span·class="p"·data-group-id="2331066348-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
148 ···</span><span·class="k">receive</span><span·class="w">148 ···</span><span·class="k">receive</span><span·class="w">
149 ······</span><span·class="p"·data-group-id="0253271414-2">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0253271414-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 ······</span><span·class="p"·data-group-id="2331066348-2">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="2331066348-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 ·········</span><span·class="nf">handle_sys_msg</span><span·class="p"·data-group-id="0253271414-3">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="0253271414-3">)</span><span·class="p">,</span><span·class="w">150 ·········</span><span·class="nf">handle_sys_msg</span><span·class="p"·data-group-id="2331066348-3">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="2331066348-3">)</span><span·class="p">,</span><span·class="w">
151 ·········</span><span·class="nf">loop</span><span·class="p"·data-group-id="0253271414-4">(</span><span·class="p"·data-group-id="0253271414-4">)</span><span·class="p">;</span><span·class="w">151 ·········</span><span·class="nf">loop</span><span·class="p"·data-group-id="2331066348-4">(</span><span·class="p"·data-group-id="2331066348-4">)</span><span·class="p">;</span><span·class="w">
152 ······</span><span·class="p"·data-group-id="0253271414-5">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0253271414-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">152 ······</span><span·class="p"·data-group-id="2331066348-5">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="2331066348-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
153 ·········</span><span·class="n">Reply</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="0253271414-6">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="0253271414-6">)</span><span·class="p">,</span><span·class="w">153 ·········</span><span·class="n">Reply</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="2331066348-6">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="2331066348-6">)</span><span·class="p">,</span><span·class="w">
154 ·········</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p">,</span><span·class="w">154 ·········</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p">,</span><span·class="w">
155 ·········</span><span·class="nf">loop</span><span·class="p"·data-group-id="0253271414-7">(</span><span·class="p"·data-group-id="0253271414-7">)</span><span·class="w">155 ·········</span><span·class="nf">loop</span><span·class="p"·data-group-id="2331066348-7">(</span><span·class="p"·data-group-id="2331066348-7">)</span><span·class="w">
156 ·</span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="initial-heap-size"·class="section-heading">156 ·</span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="initial-heap-size"·class="section-heading">
157 ··<a·href="#initial-heap-size"·class="hover-link">157 ··<a·href="#initial-heap-size"·class="hover-link">
158 ····<i·class="ri-link-m"·aria-hidden="true"></i>158 ····<i·class="ri-link-m"·aria-hidden="true"></i>
159 ··</a>159 ··</a>
160 ··<span·class="text">Initial·Heap·Size</span>160 ··<span·class="text">Initial·Heap·Size</span>
161 </h3>161 </h3>
162 <p>The·default·initial·heap·size·of·233·words·is·quite·conservative·to·support162 <p>The·default·initial·heap·size·of·233·words·is·quite·conservative·to·support
Offset 189, 30 lines modifiedOffset 189, 30 lines modified
189 ····<i·class="ri-link-m"·aria-hidden="true"></i>189 ····<i·class="ri-link-m"·aria-hidden="true"></i>
190 ··</a>190 ··</a>
191 ··<span·class="text">Receiving·messages</span>191 ··<span·class="text">Receiving·messages</span>
192 </h2>192 </h2>
193 <p>The·cost·of·receiving·messages·depends·on·how·complicated·the·<code·class="inline">receive</code>193 <p>The·cost·of·receiving·messages·depends·on·how·complicated·the·<code·class="inline">receive</code>
194 expression·is.·A·simple·expression·that·matches·any·message·is·very·cheap194 expression·is.·A·simple·expression·that·matches·any·message·is·very·cheap
195 because·it·retrieves·the·first·message·in·the·message·queue:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">195 because·it·retrieves·the·first·message·in·the·message·queue:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">
196 ····</span><span·class="n">Message</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="8299419718-1">(</span><span·class="n">Message</span><span·class="p"·data-group-id="8299419718-1">)</span><span·class="w">196 ····</span><span·class="n">Message</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="5992640934-1">(</span><span·class="n">Message</span><span·class="p"·data-group-id="5992640934-1">)</span><span·class="w">
197 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>However,·this·is·not·always·convenient:·we·can·receive·a·message·that·we·do·not197 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>However,·this·is·not·always·convenient:·we·can·receive·a·message·that·we·do·not
198 know·how·to·handle·at·this·point,·so·it·is·common·to·only·match·the·messages·we198 know·how·to·handle·at·this·point,·so·it·is·common·to·only·match·the·messages·we
199 expect:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">199 expect:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">
200 ····</span><span·class="p"·data-group-id="2438185044-1">{</span><span·class="n">Tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="2438185044-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·157,·SHA:·4ea3b1c3f0d93b03dcd8b691c0fe25491914347aba3d075df865ef6076496bea·...·]-2">)</span><span·class="w">200 ····</span><span·class="p"·data-group-id="7149125852-1">{</span><span·class="n">Tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="7149125852-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·157,·SHA:·457a298ac2831b5b8138e3416b6cc0ec73ff8502b7c69c85bcf4d27870bd63bf·...·]-2">)</span><span·class="w">
201 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>While·this·is·convenient·it·means·that·the·entire·message·queue·must·be·searched201 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>While·this·is·convenient·it·means·that·the·entire·message·queue·must·be·searched
202 until·it·finds·a·matching·message.·This·is·very·expensive·for·processes·with202 until·it·finds·a·matching·message.·This·is·very·expensive·for·processes·with
203 long·message·queues,·so·there·is·an·optimization·for·the·common·case·of203 long·message·queues,·so·there·is·an·optimization·for·the·common·case·of
204 sending·a·request·and·waiting·for·a·response·shortly·after:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">MRef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">monitor</span><span·class="p"·data-group-id="0455042275-1">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Process</span><span·class="p"·data-group-id="0455042275-1">)</span><span·class="p">,</span><span·class="w">204 sending·a·request·and·waiting·for·a·response·shortly·after:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">MRef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">monitor</span><span·class="p"·data-group-id="8544842810-1">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Process</span><span·class="p"·data-group-id="8544842810-1">)</span><span·class="p">,</span><span·class="w">
205 </span><span·class="n">Process</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0455042275-2">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0455042275-3">(</span><span·class="p"·data-group-id="0455042275-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·404f082b27104714f05418640c8d3ab1091791c7bb208f64c858fb429c7d2518·...·]-2">}</span><span·class="p">,</span><span·class="w">205 </span><span·class="n">Process</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8544842810-2">{</span><span·class="nf">self</span><span·class="p"·data-group-id="8544842810-3">(</span><span·class="p"·data-group-id="8544842810-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·85c31323fbae3db76cf2ce512609fa78a52abd522c40f565ba7b5c537a84a4a5·...·]-2">}</span><span·class="p">,</span><span·class="w">
206 </span><span·class="k">receive</span><span·class="w">206 </span><span·class="k">receive</span><span·class="w">
207 ····</span><span·class="p"·data-group-id="0455042275-4">{</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p"·data-group-id="0455042275-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">207 ····</span><span·class="p"·data-group-id="8544842810-4">{</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p"·data-group-id="8544842810-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
208 ········</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="0455042275-5">(</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0455042275-6">[</span><span·class="ss">flush</span><span·class="p"·data-group-id="0455042275-6">]</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·5f2f54efaa2df2b145218d094a37b86d000cf4ae87f1bd98c46dec76e6522383·...·]-5">)</span><span·class="p">,</span><span·class="w">208 ········</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="8544842810-5">(</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8544842810-6">[</span><span·class="ss">flush</span><span·class="p"·data-group-id="8544842810-6">]</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·8c39e53853b11b6d02734622d1d8cc427de96036c258ca5316048d635cde4a85·...·]-5">)</span><span·class="p">,</span><span·class="w">
209 ········</span><span·class="nf">handle_reply</span><span·class="p"·data-group-id="0455042275-7">(</span><span·class="n">Reply</span><span·class="p"·data-group-id="0455042275-7">)</span><span·class="p">;</span><span·class="w">209 ········</span><span·class="nf">handle_reply</span><span·class="p"·data-group-id="8544842810-7">(</span><span·class="n">Reply</span><span·class="p"·data-group-id="8544842810-7">)</span><span·class="p">;</span><span·class="w">
210 ····</span><span·class="p"·data-group-id="0455042275-8">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·141,·SHA:·11c3d453117745c6f8eb1899c7aa3746496998021fd650bfcba2d6fcf2135da5·...·]-8">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">210 ····</span><span·class="p"·data-group-id="8544842810-8">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·141,·SHA:·253cb3f91f529dec14a802b6b1852534ea66ad3bf59eb5c58c2f240ffc5362ea·...·]-8">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
211 ········</span><span·class="nf">handle_error</span><span·class="p"·data-group-id="0455042275-9">(</span><span·class="n">Reason</span><span·class="p"·data-group-id="0455042275-9">)</span><span·class="w">211 ········</span><span·class="nf">handle_error</span><span·class="p"·data-group-id="8544842810-9">(</span><span·class="n">Reason</span><span·class="p"·data-group-id="8544842810-9">)</span><span·class="w">
212 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Since·the·compiler·knows·that·the·reference·created·by212 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Since·the·compiler·knows·that·the·reference·created·by
213 <a·href="../../erts-15.0.1/doc/html/erlang.html#monitor/2"><code·class="inline">monitor/2</code></a>·cannot·exist·before·the·call·(since·it·is·a·globally213 <a·href="../../erts-15.0.1/doc/html/erlang.html#monitor/2"><code·class="inline">monitor/2</code></a>·cannot·exist·before·the·call·(since·it·is·a·globally
214 unique·identifier),·and·that·the·<code·class="inline">receive</code>·only·matches·messages·that·contain214 unique·identifier),·and·that·the·<code·class="inline">receive</code>·only·matches·messages·that·contain
215 said·reference,·it·will·tell·the·emulator·to·search·only·the·messages·that215 said·reference,·it·will·tell·the·emulator·to·search·only·the·messages·that
216 arrived·after·the·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#monitor/2"><code·class="inline">monitor/2</code></a>.</p><p>The·above·is·a·simple·example·where·one·is·but·guaranteed·that·the·optimization216 arrived·after·the·call·to·<a·href="../../erts-15.0.1/doc/html/erlang.html#monitor/2"><code·class="inline">monitor/2</code></a>.</p><p>The·above·is·a·simple·example·where·one·is·but·guaranteed·that·the·optimization
217 will·take,·but·what·about·more·complicated·code?</p><p><a·href=""·id="recv_opt_info"></a></p><h3·id="option-recv_opt_info"·class="section-heading">217 will·take,·but·what·about·more·complicated·code?</p><p><a·href=""·id="recv_opt_info"></a></p><h3·id="option-recv_opt_info"·class="section-heading">
218 ··<a·href="#option-recv_opt_info"·class="hover-link">218 ··<a·href="#option-recv_opt_info"·class="hover-link">
Offset 228, 101 lines modifiedOffset 228, 101 lines modified
228 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">200</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">NOT</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">all</span><span·class="w">·</span><span·class="ss">clauses</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">match</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="ss">suitable</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">228 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">200</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">NOT</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">all</span><span·class="w">·</span><span·class="ss">clauses</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">match</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="ss">suitable</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">
229 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">206</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">used</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">mark</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="ss">message</span><span·class="w">·</span><span·class="ss">queue</span><span·class="w">·</span><span·class="ss">position</span><span·class="w">229 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">206</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">used</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">mark</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="ss">message</span><span·class="w">·</span><span·class="ss">queue</span><span·class="w">·</span><span·class="ss">position</span><span·class="w">
230 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">208</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">all</span><span·class="w">·</span><span·class="ss">clauses</span><span·class="w">·</span><span·class="ss">match</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">created</span><span·class="w">·</span><span·class="ss">by</span><span·class="w">·</span><span·class="nb">monitor</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·</span><span·class="ss">at</span><span·class="w">·</span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">206</span><span·class="w">230 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">208</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">all</span><span·class="w">·</span><span·class="ss">clauses</span><span·class="w">·</span><span·class="ss">match</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">created</span><span·class="w">·</span><span·class="ss">by</span><span·class="w">·</span><span·class="nb">monitor</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·</span><span·class="ss">at</span><span·class="w">·</span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">206</span><span·class="w">
231 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">219</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">INFO</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">passing</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">created</span><span·class="w">·</span><span·class="ss">by</span><span·class="w">·</span><span·class="ss">make_ref</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">at</span><span·class="w">·</span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">218</span><span·class="w">231 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">219</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">INFO</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">passing</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">created</span><span·class="w">·</span><span·class="ss">by</span><span·class="w">·</span><span·class="ss">make_ref</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">at</span><span·class="w">·</span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">218</span><span·class="w">
232 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">222</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">all</span><span·class="w">·</span><span·class="ss">clauses</span><span·class="w">·</span><span·class="ss">match</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="ss">parameter</span><span·class="w">·</span><span·class="mi">1</span></code></pre><p>To·make·it·clearer·exactly·what·code·the·warnings·refer·to,·the·warnings·in·the232 </span><span·class="ss">efficiency_guide</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">222</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="n">OPTIMIZED</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">all</span><span·class="w">·</span><span·class="ss">clauses</span><span·class="w">·</span><span·class="ss">match</span><span·class="w">·</span><span·class="ss">reference</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="ss">parameter</span><span·class="w">·</span><span·class="mi">1</span></code></pre><p>To·make·it·clearer·exactly·what·code·the·warnings·refer·to,·the·warnings·in·the
233 following·examples·are·inserted·as·comments·after·the·clause·they·refer·to,·for233 following·examples·are·inserted·as·comments·after·the·clause·they·refer·to,·for
234 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·DO</span><span·class="w">234 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·DO</span><span·class="w">
235 </span><span·class="nf">simple_receive</span><span·class="p"·data-group-id="4610574961-1">(</span><span·class="p"·data-group-id="4610574961-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">235 </span><span·class="nf">simple_receive</span><span·class="p"·data-group-id="0973825362-1">(</span><span·class="p"·data-group-id="0973825362-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
236 </span><span·class="c1">%%·efficiency_guide.erl:194:·Warning:·INFO:·not·a·selective·receive,·this·is·always·fast</span><span·class="w">236 </span><span·class="c1">%%·efficiency_guide.erl:194:·Warning:·INFO:·not·a·selective·receive,·this·is·always·fast</span><span·class="w">
237 </span><span·class="k">receive</span><span·class="w">237 </span><span·class="k">receive</span><span·class="w">
238 ····</span><span·class="n">Message</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="4610574961-2">(</span><span·class="n">Message</span><span·class="p"·data-group-id="4610574961-2">)</span><span·class="w">238 ····</span><span·class="n">Message</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">handle_msg</span><span·class="p"·data-group-id="0973825362-2">(</span><span·class="n">Message</span><span·class="p"·data-group-id="0973825362-2">)</span><span·class="w">
239 </span><span·class="k">end</span><span·class="p">.</span><span·class="w">239 </span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
240 </span><span·class="c1">%%·DO·NOT,·unless·Tag·is·known·to·be·a·suitable·reference:·see</span><span·class="w">240 </span><span·class="c1">%%·DO·NOT,·unless·Tag·is·known·to·be·a·suitable·reference:·see</span><span·class="w">
241 </span><span·class="c1">%%·cross_function_receive/0·further·down.</span><span·class="w">241 </span><span·class="c1">%%·cross_function_receive/0·further·down.</span><span·class="w">
242 </span><span·class="nf">selective_receive</span><span·class="p"·data-group-id="4610574961-3">(</span><span·class="n">Tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="4610574961-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">242 </span><span·class="nf">selective_receive</span><span·class="p"·data-group-id="0973825362-3">(</span><span·class="n">Tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="0973825362-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
243 </span><span·class="c1">%%·efficiency_guide.erl:200:·Warning:·NOT·OPTIMIZED:·all·clauses·do·not·match·a·suitable·reference</span><span·class="w">243 </span><span·class="c1">%%·efficiency_guide.erl:200:·Warning:·NOT·OPTIMIZED:·all·clauses·do·not·match·a·suitable·reference</span><span·class="w">
244 </span><span·class="k">receive</span><span·class="w">244 </span><span·class="k">receive</span><span·class="w">
245 ····</span><span·class="p"·data-group-id="4610574961-4">{</span><span·class="n">Tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="4610574961-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·157,·SHA:·381242a47f1072280d2fd51949a1e4e29f8b90526ee2b6df8f014456e0d6d145·...·]-5">)</span><span·class="w">245 ····</span><span·class="p"·data-group-id="0973825362-4">{</span><span·class="n">Tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="0973825362-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·157,·SHA:·83b7744627c9d15d34776e5c9e2d21e6cb514693aec449d44b9a1ba9ca40600a·...·]-5">)</span><span·class="w">
246 </span><span·class="k">end</span><span·class="p">.</span><span·class="w">246 </span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
247 </span><span·class="c1">%%·DO</span><span·class="w">247 </span><span·class="c1">%%·DO</span><span·class="w">
248 </span><span·class="nf">optimized_receive</span><span·class="p"·data-group-id="4610574961-6">(</span><span·class="n">Process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p"·data-group-id="4610574961-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">248 </span><span·class="nf">optimized_receive</span><span·class="p"·data-group-id="0973825362-6">(</span><span·class="n">Process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p"·data-group-id="0973825362-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
249 </span><span·class="c1">%%·efficiency_guide.erl:206:·Warning:·OPTIMIZED:·reference·used·to·mark·a·message·queue·position</span><span·class="w">249 </span><span·class="c1">%%·efficiency_guide.erl:206:·Warning:·OPTIMIZED:·reference·used·to·mark·a·message·queue·position</span><span·class="w">
250 ····</span><span·class="n">MRef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">monitor</span><span·class="p"·data-group-id="4610574961-7">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Process</span><span·class="p"·data-group-id="4610574961-7">)</span><span·class="p">,</span><span·class="w">250 ····</span><span·class="n">MRef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">monitor</span><span·class="p"·data-group-id="0973825362-7">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Process</span><span·class="p"·data-group-id="0973825362-7">)</span><span·class="p">,</span><span·class="w">
251 ····</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4610574961-8">{</span><span·class="nf">self</span><span·class="p"·data-group-id="4610574961-9">(</span><span·class="p"·data-group-id="4610574961-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·a287125e4635a648c5f9b072674d9b23d7ac049d119cf6c9f34af65892fbf4c4·...·]-8">}</span><span·class="p">,</span><span·class="w">251 ····</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0973825362-8">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0973825362-9">(</span><span·class="p"·data-group-id="0973825362-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·1f9f4638686daa817ecdaf5ecb0cf0f776d22dd2c75e53cef167fa4a624f30b9·...·]-8">}</span><span·class="p">,</span><span·class="w">
252 ····</span><span·class="c1">%%·efficiency_guide.erl:208:·Warning:·OPTIMIZED:·matches·reference·created·by·monitor/2·at·efficiency_guide.erl:206</span><span·class="w">252 ····</span><span·class="c1">%%·efficiency_guide.erl:208:·Warning:·OPTIMIZED:·matches·reference·created·by·monitor/2·at·efficiency_guide.erl:206</span><span·class="w">
253 ····</span><span·class="k">receive</span><span·class="w">253 ····</span><span·class="k">receive</span><span·class="w">
254 ········</span><span·class="p"·data-group-id="4610574961-10">{</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p"·data-group-id="4610574961-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">254 ········</span><span·class="p"·data-group-id="0973825362-10">{</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p"·data-group-id="0973825362-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
255 ········</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="4610574961-11">(</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4610574961-12">[</span><span·class="ss">flush</span><span·class="p"·data-group-id="4610574961-12">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·6b3654388dc112d4baf6e1bf74f95fa3aeb96dc9a797f73f1dd245be1367d574·...·]-11">)</span><span·class="p">,</span><span·class="w">255 ········</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="0973825362-11">(</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0973825362-12">[</span><span·class="ss">flush</span><span·class="p"·data-group-id="0973825362-12">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·1b043b11ab0cab65e8c0a7e49c5b2e5b31c2ab8dd47ca0858987b45c489c99b8·...·]-11">)</span><span·class="p">,</span><span·class="w">
256 ········</span><span·class="nf">handle_reply</span><span·class="p"·data-group-id="4610574961-13">(</span><span·class="n">Reply</span><span·class="p"·data-group-id="4610574961-13">)</span><span·class="p">;</span><span·class="w">256 ········</span><span·class="nf">handle_reply</span><span·class="p"·data-group-id="0973825362-13">(</span><span·class="n">Reply</span><span·class="p"·data-group-id="0973825362-13">)</span><span·class="p">;</span><span·class="w">
257 ····</span><span·class="p"·data-group-id="4610574961-14">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·142,·SHA:·bf9404e7a5eca00908a6d7b8eef2caa041d6e1be3e70671b515bc476a595da17·...·]-14">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">257 ····</span><span·class="p"·data-group-id="0973825362-14">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·142,·SHA:·e85d142a6f14d888b0f2beec7cb4f15210d8b9dd1af8a20fb345ca1d3546952b·...·]-14">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
258 ····</span><span·class="nf">handle_error</span><span·class="p"·data-group-id="4610574961-15">(</span><span·class="n">Reason</span><span·class="p"·data-group-id="4610574961-15">)</span><span·class="w">258 ····</span><span·class="nf">handle_error</span><span·class="p"·data-group-id="0973825362-15">(</span><span·class="n">Reason</span><span·class="p"·data-group-id="0973825362-15">)</span><span·class="w">
259 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">259 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
260 </span><span·class="c1">%%·DO</span><span·class="w">260 </span><span·class="c1">%%·DO</span><span·class="w">
261 </span><span·class="nf">cross_function_receive</span><span·class="p"·data-group-id="4610574961-16">(</span><span·class="p"·data-group-id="4610574961-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">261 </span><span·class="nf">cross_function_receive</span><span·class="p"·data-group-id="0973825362-16">(</span><span·class="p"·data-group-id="0973825362-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
262 ····</span><span·class="c1">%%·efficiency_guide.erl:218:·Warning:·OPTIMIZED:·reference·used·to·mark·a·message·queue·position</span><span·class="w">262 ····</span><span·class="c1">%%·efficiency_guide.erl:218:·Warning:·OPTIMIZED:·reference·used·to·mark·a·message·queue·position</span><span·class="w">
263 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·data-group-id="4610574961-17">(</span><span·class="p"·data-group-id="4610574961-17">)</span><span·class="p">,</span><span·class="w">263 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·data-group-id="0973825362-17">(</span><span·class="p"·data-group-id="0973825362-17">)</span><span·class="p">,</span><span·class="w">
264 ····</span><span·class="c1">%%·efficiency_guide.erl:219:·Warning:·INFO:·passing·reference·created·by·make_ref/0·at·efficiency_guide.erl:218</span><span·class="w">264 ····</span><span·class="c1">%%·efficiency_guide.erl:219:·Warning:·INFO:·passing·reference·created·by·make_ref/0·at·efficiency_guide.erl:218</span><span·class="w">
265 ····</span><span·class="nf">cross_function_receive</span><span·class="p"·data-group-id="4610574961-18">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="4610574961-18">)</span><span·class="p">.</span><span·class="w">265 ····</span><span·class="nf">cross_function_receive</span><span·class="p"·data-group-id="0973825362-18">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="0973825362-18">)</span><span·class="p">.</span><span·class="w">
  
266 </span><span·class="nf">cross_function_receive</span><span·class="p"·data-group-id="4610574961-19">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="4610574961-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">266 </span><span·class="nf">cross_function_receive</span><span·class="p"·data-group-id="0973825362-19">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="0973825362-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
267 ····</span><span·class="c1">%%·efficiency_guide.erl:222:·Warning:·OPTIMIZED:·all·clauses·match·reference·in·function·parameter·1</span><span·class="w">267 ····</span><span·class="c1">%%·efficiency_guide.erl:222:·Warning:·OPTIMIZED:·all·clauses·match·reference·in·function·parameter·1</span><span·class="w">
268 ····</span><span·class="k">receive</span><span·class="w">268 ····</span><span·class="k">receive</span><span·class="w">
269 ········</span><span·class="p"·data-group-id="4610574961-20">{</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="4610574961-20">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·160,·SHA:·ac0642bf3e51f555810a5ce6b432411d197c5ae4d58bf6769cd81cd176b00daa·...·]-21">)</span><span·class="w">269 ········</span><span·class="p"·data-group-id="0973825362-20">{</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="0973825362-20">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·160,·SHA:·57b89a7b0ddbf26fb42efb956cc28c4581173479725dbf0aa84d5c9ba029a511·...·]-21">)</span><span·class="w">
270 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><h2·id="literal-pool"·class="section-heading">270 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><h2·id="literal-pool"·class="section-heading">
271 ··<a·href="#literal-pool"·class="hover-link">271 ··<a·href="#literal-pool"·class="hover-link">
272 ····<i·class="ri-link-m"·aria-hidden="true"></i>272 ····<i·class="ri-link-m"·aria-hidden="true"></i>
273 ··</a>273 ··</a>
Max diff block lines reached; 19933/67122 bytes (29.70%) of diff not shown.
71.1 KB
./usr/share/doc/erlang-doc/html/doc/system/erl_interface.html
    
Offset 120, 119 lines modifiedOffset 120, 119 lines modified
120 to·read·the·port·example·in·<a·href="c_port.html">Ports</a>·before·reading·this·section.</p><h2·id="erlang-program"·class="section-heading">120 to·read·the·port·example·in·<a·href="c_port.html">Ports</a>·before·reading·this·section.</p><h2·id="erlang-program"·class="section-heading">
121 ··<a·href="#erlang-program"·class="hover-link">121 ··<a·href="#erlang-program"·class="hover-link">
122 ····<i·class="ri-link-m"·aria-hidden="true"></i>122 ····<i·class="ri-link-m"·aria-hidden="true"></i>
123 ··</a>123 ··</a>
124 ··<span·class="text">Erlang·Program</span>124 ··<span·class="text">Erlang·Program</span>
125 </h2>125 </h2>
126 <p>The·following·example·shows·an·Erlang·program·communicating·with·a·C·program126 <p>The·following·example·shows·an·Erlang·program·communicating·with·a·C·program
127 over·a·plain·port·with·home·made·encoding:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8128621081-1">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="8128621081-1">)</span><span·class="p">.</span><span·class="w">127 over·a·plain·port·with·home·made·encoding:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3494737540-1">(</span><span·class="ss">complex1</span><span·class="p"·data-group-id="3494737540-1">)</span><span·class="p">.</span><span·class="w">
128 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8128621081-2">(</span><span·class="p"·data-group-id="8128621081-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·09936736faf9c76f5ae5ee51fcf076cf64cc9bd002deba518eca59d30aaef488·...·]-2">)</span><span·class="p">.</span><span·class="w">128 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3494737540-2">(</span><span·class="p"·data-group-id="3494737540-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·e497cd59959afda61beb2094f1aec1e9c198210a68ddeda3fa6ec0c53f18935c·...·]-2">)</span><span·class="p">.</span><span·class="w">
129 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8128621081-4">(</span><span·class="p"·data-group-id="8128621081-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·ccec410c36cf13a4dac7823abc9afd06932fc65d29f4ea405e7b07ca04193129·...·]-4">)</span><span·class="p">.</span><span·class="w">129 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3494737540-4">(</span><span·class="p"·data-group-id="3494737540-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·8f93384156134db083eb6c80d6cd1874a0a6495c571e2f58079c631f304a075d·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
130 </span><span·class="nf">start</span><span·class="p"·data-group-id="8128621081-6">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="8128621081-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">130 </span><span·class="nf">start</span><span·class="p"·data-group-id="3494737540-6">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="3494737540-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
131 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="8128621081-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-8">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·66f81d4e378c93ccee8bd2b5ced3c207602b5a61a1cf8546dc18170e079fc86a·...·]-7">)</span><span·class="p">.</span><span·class="w">131 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3494737540-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-8">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·505325bd6f131e99f1d983d8b0c86ca67415d42c02d7552dbc62e18fce75c58b·...·]-7">)</span><span·class="p">.</span><span·class="w">
132 </span><span·class="nf">stop</span><span·class="p"·data-group-id="8128621081-9">(</span><span·class="p"·data-group-id="8128621081-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">132 </span><span·class="nf">stop</span><span·class="p"·data-group-id="3494737540-9">(</span><span·class="p"·data-group-id="3494737540-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
133 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">133 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">
  
134 </span><span·class="nf">foo</span><span·class="p"·data-group-id="8128621081-10">(</span><span·class="n">X</span><span·class="p"·data-group-id="8128621081-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">134 </span><span·class="nf">foo</span><span·class="p"·data-group-id="3494737540-10">(</span><span·class="n">X</span><span·class="p"·data-group-id="3494737540-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
135 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="8128621081-11">(</span><span·class="p"·data-group-id="8128621081-12">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="8128621081-12">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·f5512edfc84c42c71ae9251246e184843ba6a815e1a532a2bff7055df5557bc6·...·]-11">)</span><span·class="p">.</span><span·class="w">135 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="3494737540-11">(</span><span·class="p"·data-group-id="3494737540-12">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="3494737540-12">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·e4527ecdf06dc63a2ee4303b19395408a268c39864ec5aeeb6bbe0078d64ff96·...·]-11">)</span><span·class="p">.</span><span·class="w">
136 </span><span·class="nf">bar</span><span·class="p"·data-group-id="8128621081-13">(</span><span·class="n">Y</span><span·class="p"·data-group-id="8128621081-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">136 </span><span·class="nf">bar</span><span·class="p"·data-group-id="3494737540-13">(</span><span·class="n">Y</span><span·class="p"·data-group-id="3494737540-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
137 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="8128621081-14">(</span><span·class="p"·data-group-id="8128621081-15">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8128621081-15">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·f5512edfc84c42c71ae9251246e184843ba6a815e1a532a2bff7055df5557bc6·...·]-14">)</span><span·class="p">.</span><span·class="w">137 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="3494737540-14">(</span><span·class="p"·data-group-id="3494737540-15">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="3494737540-15">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·e4527ecdf06dc63a2ee4303b19395408a268c39864ec5aeeb6bbe0078d64ff96·...·]-14">)</span><span·class="p">.</span><span·class="w">
  
138 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="8128621081-16">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="8128621081-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="3494737540-16">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="3494737540-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-17">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8128621081-18">(</span><span·class="p"·data-group-id="8128621081-18">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·574ca56646d7677bed8afcbffcecb08ef1a3384f83a5d4b08fab85043d11bc02·...·]-17">}</span><span·class="p">,</span><span·class="w">139 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-17">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3494737540-18">(</span><span·class="p"·data-group-id="3494737540-18">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·1d3f6fddd3bd638b47e4171960ae83bee824b0c03587b113c5bb61d0bb4a0194·...·]-17">}</span><span·class="p">,</span><span·class="w">
140 ····</span><span·class="k">receive</span><span·class="w">140 ····</span><span·class="k">receive</span><span·class="w">
141 »       </span><span·class="p"·data-group-id="8128621081-19">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="8128621081-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">141 »       </span><span·class="p"·data-group-id="3494737540-19">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="3494737540-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
142 »       ····</span><span·class="n">Result</span><span·class="w">142 »       ····</span><span·class="n">Result</span><span·class="w">
143 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">143 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
144 </span><span·class="nf">init</span><span·class="p"·data-group-id="8128621081-20">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="8128621081-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">144 </span><span·class="nf">init</span><span·class="p"·data-group-id="3494737540-20">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="3494737540-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
145 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="8128621081-21">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8128621081-22">(</span><span·class="p"·data-group-id="8128621081-22">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·e9a469bc92f5a41d3880abcf55b7a33f06f5b6a0359c9c0c2ffa9f2235706ac1·...·]-21">)</span><span·class="p">,</span><span·class="w">145 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="3494737540-21">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3494737540-22">(</span><span·class="p"·data-group-id="3494737540-22">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·d37bd89ebd2c8bc80d34192b276472b3922c219ed41898b163f64206ff88b639·...·]-21">)</span><span·class="p">,</span><span·class="w">
146 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="8128621081-23">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8128621081-23">)</span><span·class="p">,</span><span·class="w">146 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="3494737540-23">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="3494737540-23">)</span><span·class="p">,</span><span·class="w">
147 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="8128621081-24">(</span><span·class="p"·data-group-id="8128621081-25">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="8128621081-25">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-26">[</span><span·class="p"·data-group-id="8128621081-27">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="8128621081-27">}</span><span·class="p"·data-group-id="8128621081-26">]</span><span·class="p"·data-group-id="8128621081-24">)</span><span·class="p">,</span><span·class="w"> 
148 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="8128621081-28">(</span><span·class="n">Port</span><span·class="p"·data-group-id="8128621081-28">)</span><span·class="p">.</span><span·class="w">147 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="3494737540-24">(</span><span·class="p"·data-group-id="3494737540-25">{</span><span·class="nb">spawn</span><[·...·truncated·by·diffoscope;·len:·568,·SHA:·bedc88da0968a2bbb81224e2931b7107357f703f66846ae3abb32c67361f27fe·...·]</span><span·class="w">
 148 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="3494737540-28">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3494737540-28">)</span><span·class="p">.</span><span·class="w">
  
149 </span><span·class="nf">loop</span><span·class="p"·data-group-id="8128621081-29">(</span><span·class="n">Port</span><span·class="p"·data-group-id="8128621081-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 </span><span·class="nf">loop</span><span·class="p"·data-group-id="3494737540-29">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3494737540-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 ····</span><span·class="k">receive</span><span·class="w">150 ····</span><span·class="k">receive</span><span·class="w">
151 »       </span><span·class="p"·data-group-id="8128621081-30">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="8128621081-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">151 »       </span><span·class="p"·data-group-id="3494737540-30">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="3494737540-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
152 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-31">{</span><span·class="nf">self</span><span·class="p"·data-group-id="8128621081-32">(</span><span·class="p"·data-group-id="8128621081-32">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-33">{</[·...·truncated·by·diffoscope;·len:·343,·SHA:·d7d605bb75723093023ae6395f5f62e191742b2fd6d44c097811e30929f3ed1b·...·]-31">}</span><span·class="p">,</span><span·class="w">152 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-31">{</span><span·class="nf">self</span><span·class="p"·data-group-id="3494737540-32">(</span><span·class="p"·data-group-id="3494737540-32">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-33">{</[·...·truncated·by·diffoscope;·len:·343,·SHA:·55641d0829d5e1ea248c9877c0b122685a740c5527173ae9b58e5f4432db5f9a·...·]-31">}</span><span·class="p">,</span><span·class="w">
153 »       ····</span><span·class="k">receive</span><span·class="w">153 »       ····</span><span·class="k">receive</span><span·class="w">
154 »       »       </span><span·class="p"·data-group-id="8128621081-35">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-36">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·92c89825e028466089c13d93d6cf4bfa961d1becbf027af5d6e39c822e156fa0·...·]-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">154 »       »       </span><span·class="p"·data-group-id="3494737540-35">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-36">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·f542406bdb313b7ff11390dccf6d95dc3f7400799fccb41e955b2494b0682b7d·...·]-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
155 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-37">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="8128621081-38">(</span><span·class="n">Data</span><span·class="p"·data-group-id="8128621081-3[·...·truncated·by·diffoscope;·len:·52,·SHA:·9a68d4465116fdf4fffb6fa3ca128f5a45b32e6b53927e33a0afe4c437771464·...·]-37">}</span><span·class="w">155 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-37">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="3494737540-38">(</span><span·class="n">Data</span><span·class="p"·data-group-id="3494737540-3[·...·truncated·by·diffoscope;·len:·52,·SHA:·bbf46d45d0713e7a2633b13db578ae86b736b619389056ea31236e97a86b5ab7·...·]-37">}</span><span·class="w">
156 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">156 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
157 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="8128621081-39">(</span><span·class="n">Port</span><span·class="p"·data-group-id="8128621081-39">)</span><span·class="p">;</span><span·class="w">157 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="3494737540-39">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3494737540-39">)</span><span·class="p">;</span><span·class="w">
158 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">158 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
159 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8128621081-40">{</span><span·class="nf">self</span><span·class="p"·data-group-id="8128621081-41">(</span><span·class="p"·data-group-id="8128621081-41">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·3f7d83fe1104d7f6051129bd37d94497562b3c2bd8f07bd3033289b48dc81529·...·]-40">}</span><span·class="p">,</span><span·class="w">159 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3494737540-40">{</span><span·class="nf">self</span><span·class="p"·data-group-id="3494737540-41">(</span><span·class="p"·data-group-id="3494737540-41">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f071bb9fad6d906cdeeefe2c103fc592f2c81c77430f9ca867791fb4721bb33b·...·]-40">}</span><span·class="p">,</span><span·class="w">
160 »       ····</span><span·class="k">receive</span><span·class="w">160 »       ····</span><span·class="k">receive</span><span·class="w">
161 »       »       </span><span·class="p"·data-group-id="8128621081-42">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="8128621081-42">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 »       »       </span><span·class="p"·data-group-id="3494737540-42">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="3494737540-42">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="8128621081-43">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="8128621081-43">)</span><span·class="w">162 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="3494737540-43">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="3494737540-43">)</span><span·class="w">
163 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">163 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
164 »       </span><span·class="p"·data-group-id="8128621081-44">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="8128621081-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">164 »       </span><span·class="p"·data-group-id="3494737540-44">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="3494737540-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
165 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="8128621081-45">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="8128621081-45">)</span><span·class="w">165 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="3494737540-45">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="3494737540-45">)</span><span·class="w">
166 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">166 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
167 </span><span·class="nf">encode</span><span·class="p"·data-group-id="8128621081-46">(</span><span·class="p"·data-group-id="8128621081-47">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="8128621081-47">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·086e82ce7803649807cf70f3b472cd4cab28673f549f9aedae31b016cd34610d·...·]-48">]</span><span·class="p">;</span><span·class="w">167 </span><span·class="nf">encode</span><span·class="p"·data-group-id="3494737540-46">(</span><span·class="p"·data-group-id="3494737540-47">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="3494737540-47">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·9ff638d31be4abbf2fd550b8a8a261cb1c2dd65540cca171d7ed194f817c0f9c·...·]-48">]</span><span·class="p">;</span><span·class="w">
168 </span><span·class="nf">encode</span><span·class="p"·data-group-id="8128621081-49">(</span><span·class="p"·data-group-id="8128621081-50">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8128621081-50">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·9b5d5cbeb5531a6be71947aa0450a01bfcadc52d6fd7d26426c7b5ea5d979dfc·...·]-51">]</span><span·class="p">.</span><span·class="w">168 </span><span·class="nf">encode</span><span·class="p"·data-group-id="3494737540-49">(</span><span·class="p"·data-group-id="3494737540-50">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="3494737540-50">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·296,·SHA:·3306e1da45c0168914ab0f25bc2b36e4702330ea55fdbf7e7ba84f78d79d5545·...·]-51">]</span><span·class="p">.</span><span·class="w">
  
169 </span><span·class="nf">decode</span><span·class="p"·data-group-id="8128621081-52">(</span><span·class="p"·data-group-id="8128621081-53">[</span><span·class="n">Int</span><span·class="p"·data-group-id="8128621081-53">]</span><span·class="p"·data-group-id="8128621081-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><p>There·are·two·differences·when·using·Erl_Interface·on·the·C·side·compared·to·the169 </span><span·class="nf">decode</span><span·class="p"·data-group-id="3494737540-52">(</span><span·class="p"·data-group-id="3494737540-53">[</span><span·class="n">Int</span><span·class="p"·data-group-id="3494737540-53">]</span><span·class="p"·data-group-id="3494737540-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Int</span><span·class="p">.</span></code></pre><p>There·are·two·differences·when·using·Erl_Interface·on·the·C·side·compared·to·the
170 example·in·<a·href="c_port.html">Ports</a>,·using·only·the·plain·port:</p><ul><li>As·Erl_Interface·operates·on·the·Erlang·external·term·format,·the·port·must·be170 example·in·<a·href="c_port.html">Ports</a>,·using·only·the·plain·port:</p><ul><li>As·Erl_Interface·operates·on·the·Erlang·external·term·format,·the·port·must·be
171 set·to·use·binaries.</li><li>Instead·of·inventing·an·encoding/decoding·scheme,·the171 set·to·use·binaries.</li><li>Instead·of·inventing·an·encoding/decoding·scheme,·the
172 <a·href="../../erts-15.0.1/doc/html/erlang.html#term_to_binary/1"><code·class="inline">term_to_binary/1</code></a>·and172 <a·href="../../erts-15.0.1/doc/html/erlang.html#term_to_binary/1"><code·class="inline">term_to_binary/1</code></a>·and
173 <a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>·BIFs·are·to·be·used.</li></ul><p>That·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">open_port</span><span·class="p"·data-group-id="6402114429-1">(</span><span·class="p"·data-group-id="6402114429-2">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="6402114429-2">}</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·2065,·SHA:·beb6a345e5642a36d9fe241b43f3caf1bd381a377d104b8ede4229756e91a2df·...·]-1">}</span><span·class="p">,</span><span·class="w">173 <a·href="../../erts-15.0.1/doc/html/erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>·BIFs·are·to·be·used.</li></ul><p>That·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">open_port</span><span·class="p"·data-group-id="2602588912-1">(</span><span·class="p"·data-group-id="2602588912-2">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="2602588912-2">}</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·2065,·SHA:·b5521ef308ae779f8a1be213cb14dec9540949ee103a0d61bbd96529fc3ef788·...·]-1">}</span><span·class="p">,</span><span·class="w">
174 </span><span·class="k">receive</span><span·class="w">174 </span><span·class="k">receive</span><span·class="w">
175 ··</span><span·class="p"·data-group-id="8679403056-5">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8679403056-6">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·276109de49d679608a4307eb173a19542ed2dbc21883a492f7c3c9ab148e7583·...·]-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 ··</span><span·class="p"·data-group-id="2368233792-5">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2368233792-6">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·a18dccacc50949b7a350c5616784becdd917920513f3f06a9e6b113df44dba2e·...·]-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8679403056-7">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="8679403056-8">(</span><span·class="n">Data</span><span·class="p"·data-group-id="8679403056-8">[·...·truncated·by·diffoscope;·len:·49,·SHA:·b5db79bc5b5532da2ab2693b88b00c6dcfe578aecf49c0efaa111a43adf773e6·...·]-7">}</span><span·class="w">176 ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2368233792-7">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">decode</span><span·class="p"·data-group-id="2368233792-8">(</span><span·class="n">Data</span><span·class="p"·data-group-id="2368233792-8">[·...·truncated·by·diffoscope;·len:·49,·SHA:·2c94df0ec3134af6c23d071667b232bce004a43b785d1115d493d69615254b6d·...·]-7">}</span><span·class="w">
177 </span><span·class="k">end</span></code></pre><p>is·replaced·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6658279760-1">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6658279760-2">(</span><span·class="p"·data-group-id="6658279760-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6658279760-3">{</span[·...·truncated·by·diffoscope;·len:·344,·SHA:·ddc11676bc5ecb5eff3193c37433d5cefb6eb08da7e28821d7bcb8189e7e5f47·...·]-1">}</span><span·class="p">,</span><span·class="w">177 </span><span·class="k">end</span></code></pre><p>is·replaced·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4073177464-1">{</span><span·class="nf">self</span><span·class="p"·data-group-id="4073177464-2">(</span><span·class="p"·data-group-id="4073177464-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4073177464-3">{</span[·...·truncated·by·diffoscope;·len:·344,·SHA:·e6cf493db362765c94b1fc927c22fe6880c4b62d4bd22a9aa0c225806ad6f554·...·]-1">}</span><span·class="p">,</span><span·class="w">
178 </span><span·class="k">receive</span><span·class="w">178 </span><span·class="k">receive</span><span·class="w">
179 ··</span><span·class="p"·data-group-id="6658279760-5">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6658279760-6">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·aa49d4a1087b373219effa2c2d0f9e97de2cda619424cf82db06e4c0ba67ee74·...·]-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">179 ··</span><span·class="p"·data-group-id="4073177464-5">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4073177464-6">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·ba30f5fc7a046d446dea46e25a3e04005bdfb7b37af509580991568cf603e95f·...·]-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
180 ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6658279760-7">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="6658279760-8">(</span><span·class="n">Data</span><span·class="p"·data-group-id="665827[·...·truncated·by·diffoscope;·len:·57,·SHA:·f4c256f876370615becc0e720eb730417298caf64f9f74951fd3bd2c8327a58a·...·]-7">}</span><span·class="w">180 ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4073177464-7">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="4073177464-8">(</span><span·class="n">Data</span><span·class="p"·data-group-id="407317[·...·truncated·by·diffoscope;·len:·57,·SHA:·45848e9071dd66d63bf29a799221ec3a25c0cdd14d391bff4ae582a0ca4ab57a·...·]-7">}</span><span·class="w">
181 </span><span·class="k">end</span></code></pre><p>The·resulting·Erlang·program·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8070402108-1">(</span><span·class="ss">complex2</span><span·class="p"·data-group-id="8070402108-1">)</span><span·class="p">.</span><span·class="w">181 </span><span·class="k">end</span></code></pre><p>The·resulting·Erlang·program·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6302023234-1">(</span><span·class="ss">complex2</span><span·class="p"·data-group-id="6302023234-1">)</span><span·class="p">.</span><span·class="w">
182 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8070402108-2">(</span><span·class="p"·data-group-id="8070402108-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·1e91d9a9839d6a60d81c39be072b40cd9a911fea583663c52554f907e904c3ff·...·]-2">)</span><span·class="p">.</span><span·class="w">182 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6302023234-2">(</span><span·class="p"·data-group-id="6302023234-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·241,·SHA:·e0167826349624818ef27e92ec0e52a5b1a3287ab53b7a264a2f8bbcb0623f25·...·]-2">)</span><span·class="p">.</span><span·class="w">
183 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8070402108-4">(</span><span·class="p"·data-group-id="8070402108-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·a04f5b56f6882c472395aeb390064159e4fb8d809c21b1af9c64af3b57b9443a·...·]-4">)</span><span·class="p">.</span><span·class="w">183 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6302023234-4">(</span><span·class="p"·data-group-id="6302023234-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·f11a867c2e33ac79b4dbc850542e8458a87cb7a28e14fa47a61bffa8ef4123e7·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
184 </span><span·class="nf">start</span><span·class="p"·data-group-id="8070402108-6">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="8070402108-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 </span><span·class="nf">start</span><span·class="p"·data-group-id="6302023234-6">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="6302023234-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="8070402108-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-8">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·c821eaab92bd94bd97be5b9985f0e6e81b963d070913ed663b5c5bbdf7761317·...·]-7">)</span><span·class="p">.</span><span·class="w">185 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6302023234-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-8">[</span><spa[·...·truncated·by·diffoscope;·len:·119,·SHA:·5decedf514f10fee83225ad36e483b13bd89b560d0e187423f1d69d79013a25a·...·]-7">)</span><span·class="p">.</span><span·class="w">
186 </span><span·class="nf">stop</span><span·class="p"·data-group-id="8070402108-9">(</span><span·class="p"·data-group-id="8070402108-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">186 </span><span·class="nf">stop</span><span·class="p"·data-group-id="6302023234-9">(</span><span·class="p"·data-group-id="6302023234-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
187 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">187 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p">.</span><span·class="w">
  
188 </span><span·class="nf">foo</span><span·class="p"·data-group-id="8070402108-10">(</span><span·class="n">X</span><span·class="p"·data-group-id="8070402108-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 </span><span·class="nf">foo</span><span·class="p"·data-group-id="6302023234-10">(</span><span·class="n">X</span><span·class="p"·data-group-id="6302023234-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="8070402108-11">(</span><span·class="p"·data-group-id="8070402108-12">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="8070402108-12">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·6d3f126087dbc1fdbfb6708065a42caf0d59389cb5ca22f43aab8ebb4ddaaeba·...·]-11">)</span><span·class="p">.</span><span·class="w">189 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="6302023234-11">(</span><span·class="p"·data-group-id="6302023234-12">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="6302023234-12">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·abf9f1546cce66169a45453e2f9693848b1dd520fc0861f7ad2fb5c3f56cf8fb·...·]-11">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="nf">bar</span><span·class="p"·data-group-id="8070402108-13">(</span><span·class="n">Y</span><span·class="p"·data-group-id="8070402108-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 </span><span·class="nf">bar</span><span·class="p"·data-group-id="6302023234-13">(</span><span·class="n">Y</span><span·class="p"·data-group-id="6302023234-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="8070402108-14">(</span><span·class="p"·data-group-id="8070402108-15">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8070402108-15">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·6d3f126087dbc1fdbfb6708065a42caf0d59389cb5ca22f43aab8ebb4ddaaeba·...·]-14">)</span><span·class="p">.</span><span·class="w">191 ····</span><span·class="nf">call_port</span><span·class="p"·data-group-id="6302023234-14">(</span><span·class="p"·data-group-id="6302023234-15">{</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="6302023234-15">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·abf9f1546cce66169a45453e2f9693848b1dd520fc0861f7ad2fb5c3f56cf8fb·...·]-14">)</span><span·class="p">.</span><span·class="w">
  
192 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="8070402108-16">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="8070402108-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 </span><span·class="nf">call_port</span><span·class="p"·data-group-id="6302023234-16">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="6302023234-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-17">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8070402108-18">(</span><span·class="p"·data-group-id="8070402108-18">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·bc54a76ff306a34890e0ed1294407ac5eafc3b446ea68087cf1664c8772d9127·...·]-17">}</span><span·class="p">,</span><span·class="w">193 ····</span><span·class="ss">complex</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-17">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="6302023234-18">(</span><span·class="p"·data-group-id="6302023234-18">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·94,·SHA:·ffb039660b265848a8ceb83c3a17439216882dc2640a11ffa3e15acf2a18caee·...·]-17">}</span><span·class="p">,</span><span·class="w">
194 ····</span><span·class="k">receive</span><span·class="w">194 ····</span><span·class="k">receive</span><span·class="w">
195 »       </span><span·class="p"·data-group-id="8070402108-19">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="8070402108-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">195 »       </span><span·class="p"·data-group-id="6302023234-19">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="6302023234-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
196 »       ····</span><span·class="n">Result</span><span·class="w">196 »       ····</span><span·class="n">Result</span><span·class="w">
197 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">197 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
198 </span><span·class="nf">init</span><span·class="p"·data-group-id="8070402108-20">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="8070402108-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 </span><span·class="nf">init</span><span·class="p"·data-group-id="6302023234-20">(</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="6302023234-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="8070402108-21">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8070402108-22">(</span><span·class="p"·data-group-id="8070402108-22">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·7deea537505868913ac22b2e11b60ec749b3f182918be4b7ab6ad3a251fe7e84·...·]-21">)</span><span·class="p">,</span><span·class="w">199 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="6302023234-21">(</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="6302023234-22">(</span><span·class="p"·data-group-id="6302023234-22">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·c56cb14dd9da7d409aabe080f6bf703e810418a0e1ea44f09da892dadc050e15·...·]-21">)</span><span·class="p">,</span><span·class="w">
200 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="8070402108-23">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8070402108-23">)</span><span·class="p">,</span><span·class="w">200 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="6302023234-23">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="6302023234-23">)</span><span·class="p">,</span><span·class="w">
201 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="8070402108-24">(</span><span·class="p"·data-group-id="8070402108-25">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="8070402108-25">}</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·467,·SHA:·bca118fc7f05519e0c7a63d2fdef16112c499039fe8ca4feffae9307948ccb10·...·]-24">)</span><span·class="p">,</span><span·class="w">201 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="6302023234-24">(</span><span·class="p"·data-group-id="6302023234-25">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ExtPrg</span><span·class="p"·data-group-id="6302023234-25">}</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·467,·SHA:·a6a4045e743b623f6af55f94ef3525d61064a53033b9e567fb99ef646d59908c·...·]-24">)</span><span·class="p">,</span><span·class="w">
202 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="8070402108-28">(</span><span·class="n">Port</span><span·class="p"·data-group-id="8070402108-28">)</span><span·class="p">.</span><span·class="w">202 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="6302023234-28">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6302023234-28">)</span><span·class="p">.</span><span·class="w">
  
203 </span><span·class="nf">loop</span><span·class="p"·data-group-id="8070402108-29">(</span><span·class="n">Port</span><span·class="p"·data-group-id="8070402108-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 </span><span·class="nf">loop</span><span·class="p"·data-group-id="6302023234-29">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6302023234-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ····</span><span·class="k">receive</span><span·class="w">204 ····</span><span·class="k">receive</span><span·class="w">
205 »       </span><span·class="p"·data-group-id="8070402108-30">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="8070402108-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 »       </span><span·class="p"·data-group-id="6302023234-30">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Caller</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="6302023234-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-31">{</span><span·class="nf">self</span><span·class="p"·data-group-id="8070402108-32">(</span><span·class="p"·data-group-id="8070402108-32">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-33">{</[·...·truncated·by·diffoscope;·len:·351,·SHA:·87b5f0e06089d5993e803885630bcaff7d9bd0104700bd6263e84a8541b80694·...·]-31">}</span><span·class="p">,</span><span·class="w">206 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-31">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6302023234-32">(</span><span·class="p"·data-group-id="6302023234-32">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-33">{</[·...·truncated·by·diffoscope;·len:·351,·SHA:·cf77152b44089c4d20ae48b2be3446559c94bc194a74601286d5eb7354f5c19c·...·]-31">}</span><span·class="p">,</span><span·class="w">
207 »       ····</span><span·class="k">receive</span><span·class="w">207 »       ····</span><span·class="k">receive</span><span·class="w">
208 »       »       </span><span·class="p"·data-group-id="8070402108-35">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-36">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·cb371ff894a0a1c4b3db81d9ead5aacb3de6ec97536c6ecd41a66086d6b8110c·...·]-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 »       »       </span><span·class="p"·data-group-id="6302023234-35">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-36">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><[·...·truncated·by·diffoscope;·len:·94,·SHA:·0da9b5e8aa99f5ebec772537a39aefe6836163d7ea5c46a9312c8810eedaf873·...·]-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-37">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="8070402108-38">(</span><span·class="n">Data</span><span·class="p"·data-group-id="8070[·...·truncated·by·diffoscope;·len:·60,·SHA:·5b9e03cc5a1118f728a60c12b201420158801653b307b83284fcb04d14b81beb·...·]-37">}</span><span·class="w">209 »       »       ····</span><span·class="n">Caller</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-37">{</span><span·class="ss">complex</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="6302023234-38">(</span><span·class="n">Data</span><span·class="p"·data-group-id="6302[·...·truncated·by·diffoscope;·len:·60,·SHA:·96aa415b0e6614723a5aac74b4a4913286bf16315ab86e78e438bd807ed75875·...·]-37">}</span><span·class="w">
210 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">210 »       ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
211 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="8070402108-39">(</span><span·class="n">Port</span><span·class="p"·data-group-id="8070402108-39">)</span><span·class="p">;</span><span·class="w">211 »       ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="6302023234-39">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6302023234-39">)</span><span·class="p">;</span><span·class="w">
212 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">212 »       </span><span·class="ss">stop</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
213 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8070402108-40">{</span><span·class="nf">self</span><span·class="p"·data-group-id="8070402108-41">(</span><span·class="p"·data-group-id="8070402108-41">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·9dfa65683f4c3d9aacc5867fb5b026bc1248d8c07f279bf3faccd79fdcedcd16·...·]-40">}</span><span·class="p">,</span><span·class="w">213 »       ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6302023234-40">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6302023234-41">(</span><span·class="p"·data-group-id="6302023234-41">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">close</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·98a7815a1dad567c14f51f0b4c1e1589d82ee43ca117e6bb2c11ca63ddc56adc·...·]-40">}</span><span·class="p">,</span><span·class="w">
214 »       ····</span><span·class="k">receive</span><span·class="w">214 »       ····</span><span·class="k">receive</span><span·class="w">
215 »       »       </span><span·class="p"·data-group-id="8070402108-42">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="8070402108-42">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">215 »       »       </span><span·class="p"·data-group-id="6302023234-42">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="6302023234-42">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
216 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="8070402108-43">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="8070402108-43">)</span><span·class="w">216 »       »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="6302023234-43">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="6302023234-43">)</span><span·class="w">
217 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">217 »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
218 »       </span><span·class="p"·data-group-id="8070402108-44">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="8070402108-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">218 »       </span><span·class="p"·data-group-id="6302023234-44">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6302023234-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
219 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="8070402108-45">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="8070402108-45">)</span><span·class="w">219 »       ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="6302023234-45">(</span><span·class="ss">port_terminated</span><span·class="p"·data-group-id="6302023234-45">)</span><span·class="w">
220 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Notice·that·calling·<code·class="inline">complex2:foo/1</code>·and·<code·class="inline">complex2:bar/1</code>·results·in·the·tuple220 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Notice·that·calling·<code·class="inline">complex2:foo/1</code>·and·<code·class="inline">complex2:bar/1</code>·results·in·the·tuple
221 <code·class="inline">{foo,X}</code>·or·<code·class="inline">{bar,Y}</code>·being·sent·to·the·<code·class="inline">complex</code>·process,·which·codes·them·as221 <code·class="inline">{foo,X}</code>·or·<code·class="inline">{bar,Y}</code>·being·sent·to·the·<code·class="inline">complex</code>·process,·which·codes·them·as
222 binaries·and·sends·them·to·the·port.·This·means·that·the·C·program·must·be·able222 binaries·and·sends·them·to·the·port.·This·means·that·the·C·program·must·be·able
223 to·handle·these·two·tuples.</p><h2·id="c-program"·class="section-heading">223 to·handle·these·two·tuples.</p><h2·id="c-program"·class="section-heading">
224 ··<a·href="#c-program"·class="hover-link">224 ··<a·href="#c-program"·class="hover-link">
225 ····<i·class="ri-link-m"·aria-hidden="true"></i>225 ····<i·class="ri-link-m"·aria-hidden="true"></i>
226 ··</a>226 ··</a>
Offset 362, 27 lines modifiedOffset 362, 27 lines modified
362 ····-L/usr/local/otp/lib/erl_interface-3.9.2/lib·\362 ····-L/usr/local/otp/lib/erl_interface-3.9.2/lib·\
363 ····complex.c·erl_comm.c·ei.c·-lei·-lpthread</code></pre><p>In·Erlang/OTP·R5B·and·later·versions·of·OTP,·the·<code·class="inline">include</code>·and·<code·class="inline">lib</code>·directories363 ····complex.c·erl_comm.c·ei.c·-lei·-lpthread</code></pre><p>In·Erlang/OTP·R5B·and·later·versions·of·OTP,·the·<code·class="inline">include</code>·and·<code·class="inline">lib</code>·directories
364 are·situated·under·<code·class="inline">$OTPROOT/lib/erl_interface-VSN</code>,·where·<code·class="inline">$OTPROOT</code>·is·the364 are·situated·under·<code·class="inline">$OTPROOT/lib/erl_interface-VSN</code>,·where·<code·class="inline">$OTPROOT</code>·is·the
365 root·directory·of·the·OTP·installation·(<code·class="inline">/usr/local/otp</code>·in·the·recent·example)365 root·directory·of·the·OTP·installation·(<code·class="inline">/usr/local/otp</code>·in·the·recent·example)
366 and·<code·class="inline">VSN</code>·is·the·version·of·the·Erl_interface·application·(3.2.1·in·the·recent366 and·<code·class="inline">VSN</code>·is·the·version·of·the·Erl_interface·application·(3.2.1·in·the·recent
367 example).</p><p>In·R4B·and·earlier·versions·of·OTP,·<code·class="inline">include</code>·and·<code·class="inline">lib</code>·are·situated·under367 example).</p><p>In·R4B·and·earlier·versions·of·OTP,·<code·class="inline">include</code>·and·<code·class="inline">lib</code>·are·situated·under
Max diff block lines reached; 9667/72674 bytes (13.30%) of diff not shown.
17.8 KB
./usr/share/doc/erlang-doc/html/doc/system/error_logging.html
    
Offset 143, 39 lines modifiedOffset 143, 39 lines modified
143 reports·and·other·error·and·information·reports·are·by·default·logged·through143 reports·and·other·error·and·information·reports·are·by·default·logged·through
144 the·log·handler·which·is·set·up·when·the·Kernel·application·is·started.</p><p>Prior·to·Erlang/OTP·21.0,·supervisor,·crash,·and·progress·reports·were·only144 the·log·handler·which·is·set·up·when·the·Kernel·application·is·started.</p><p>Prior·to·Erlang/OTP·21.0,·supervisor,·crash,·and·progress·reports·were·only
145 logged·when·the·SASL·application·was·running.·This·behaviour·can,·for·backwards145 logged·when·the·SASL·application·was·running.·This·behaviour·can,·for·backwards
146 compatibility,·be·enabled·by·setting·the·Kernel·configuration·parameter146 compatibility,·be·enabled·by·setting·the·Kernel·configuration·parameter
147 <a·href="../../lib/kernel-10.0.1/doc/html/kernel_app.html#logger_sasl_compatible"><code·class="inline">logger_sasl_compatible</code></a>·to147 <a·href="../../lib/kernel-10.0.1/doc/html/kernel_app.html#logger_sasl_compatible"><code·class="inline">logger_sasl_compatible</code></a>·to
148 <code·class="inline">true</code>.·For·more·information,·see148 <code·class="inline">true</code>.·For·more·information,·see
149 <a·href="../../lib/sasl-4.2.2/doc/html/error_logging.html">SASL·Error·Logging</a>·in·the·SASL·User's·Guide.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-kernel·logger_level·info</span><span·class="w">149 <a·href="../../lib/sasl-4.2.2/doc/html/error_logging.html">SASL·Error·Logging</a>·in·the·SASL·User's·Guide.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-kernel·logger_level·info</span><span·class="w">
150 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">21</span><span·class="w">·</span><span·class="p"·data-group-id="5386765875-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">10.0</span><span·class="p"·data-group-id="5386765875-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="5386765875-2">[</span><span·class="ss">source<[·...·truncated·by·diffoscope;·len:·1313,·SHA:·3a139caab100e07e7cc7d7f7f9c585866653ab6581a6ffb4e8b5313806dd9524·...·]-7">]</span><span·class="w">150 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">21</span><span·class="w">·</span><span·class="p"·data-group-id="4601043122-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">10.0</span><span·class="p"·data-group-id="4601043122-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="4601043122-2">[</span><span·class="ss">source<[·...·truncated·by·diffoscope;·len:·1313,·SHA:·b8dd69a46cf702641c03f1e54848382345ae0a07aed429d7f46e0c03b9072eda·...·]-7">]</span><span·class="w">
  
151 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.916404</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">151 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.916404</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
152 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">kernel</span><span·class="w">152 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">kernel</span><span·class="w">
153 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">153 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">
154 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.922908</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">154 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.922908</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
155 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stdlib</span><span·class="w">155 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stdlib</span><span·class="w">
156 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">156 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">
157 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.925755</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">157 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.925755</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
158 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5386765875-8">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">kernel_safe_sup</span><span·class="p"·data-group-id="5386765875-8">}</span><span·class="w">158 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4601043122-8">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">kernel_safe_sup</span><span·class="p"·data-group-id="4601043122-8">}</span><span·class="w">
159 ····</span><span·class="nc">started</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5386765875-9">[</span><span·class="p"·data-group-id="5386765875-10">{</span><span·class="ss">pid</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.74</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·114b67bd98e4b2a88dac24d40303b04527b59afb9b98dd89fcc8b73fd82645e6·...·]-10">}</span><span·class="p">,</span><span·class="w">159 ····</span><span·class="nc">started</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4601043122-9">[</span><span·class="p"·data-group-id="4601043122-10">{</span><span·class="ss">pid</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.74</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·9bfd169b2bffe1a92de125fdb1e2f39350e9d21f69ccac56a2ea62485f4aa221·...·]-10">}</span><span·class="p">,</span><span·class="w">
160 ··············</span><span·class="p"·data-group-id="5386765875-11">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="ss">disk_log_sup</span><span·class="p"·data-group-id="5386765875-11">}</span><span·class="p">,</span><span·class="w">160 ··············</span><span·class="p"·data-group-id="4601043122-11">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="ss">disk_log_sup</span><span·class="p"·data-group-id="4601043122-11">}</span><span·class="p">,</span><span·class="w">
161 ··············</span><span·class="p"·data-group-id="5386765875-12">{</span><span·class="ss">mfargs</span><span·class="p">,</span><span·class="p"·data-group-id="5386765875-13">{</span><span·class="ss">disk_log_sup</span><span·class="p">,</span><span·class="ss">start_link</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·196,·SHA:·54103aa9043a1eb1fe144bdd7f462131d071fc4f24d7e6a7a2e60b9450c9dcbb·...·]-12">}</span><span·class="p">,</span><span·class="w">161 ··············</span><span·class="p"·data-group-id="4601043122-12">{</span><span·class="ss">mfargs</span><span·class="p">,</span><span·class="p"·data-group-id="4601043122-13">{</span><span·class="ss">disk_log_sup</span><span·class="p">,</span><span·class="ss">start_link</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·196,·SHA:·059d3b84f04d0127aab563b686991818084ef49f9ff57e04df8a7a8dbdea6bbd·...·]-12">}</span><span·class="p">,</span><span·class="w">
162 ··············</span><span·class="p"·data-group-id="5386765875-15">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="ss">permanent</span><span·class="p"·data-group-id="5386765875-15">}</span><span·class="p">,</span><span·class="w">162 ··············</span><span·class="p"·data-group-id="4601043122-15">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="ss">permanent</span><span·class="p"·data-group-id="4601043122-15">}</span><span·class="p">,</span><span·class="w">
163 ··············</span><span·class="p"·data-group-id="5386765875-16">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="mi">1000</span><span·class="p"·data-group-id="5386765875-16">}</span><span·class="p">,</span><span·class="w">163 ··············</span><span·class="p"·data-group-id="4601043122-16">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="mi">1000</span><span·class="p"·data-group-id="4601043122-16">}</span><span·class="p">,</span><span·class="w">
164 ··············</span><span·class="p"·data-group-id="5386765875-17">{</span><span·class="ss">child_type</span><span·class="p">,</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="5386765875-17">}</span><span·class="p"·data-group-id="5386765875-9">]</span><span·class="w">164 ··············</span><span·class="p"·data-group-id="4601043122-17">{</span><span·class="ss">child_type</span><span·class="p">,</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="4601043122-17">}</span><span·class="p"·data-group-id="4601043122-9">]</span><span·class="w">
165 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.926056</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">165 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">8</span><span·class="o">-</span><span·class="n">Jun</span><span·class="o">-</span><span·class="mi">2018</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">54</span><span·class="p">:</span><span·class="mf">19.926056</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
166 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5386765875-18">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">kernel_safe_sup</span><span·class="p"·data-group-id="5386765875-18">}</span><span·class="w">166 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4601043122-18">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">kernel_safe_sup</span><span·class="p"·data-group-id="4601043122-18">}</span><span·class="w">
167 ····</span><span·class="nc">started</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5386765875-19">[</span><span·class="p"·data-group-id="5386765875-20">{</span><span·class="ss">pid</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.75</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·9d359628adadd25500afc1dfb83423cc2c5af2d5d0e1795d458758b3d8498ace·...·]-20">}</span><span·class="p">,</span><span·class="w">167 ····</span><span·class="nc">started</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4601043122-19">[</span><span·class="p"·data-group-id="4601043122-20">{</span><span·class="ss">pid</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.75</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·8f30338f4b8808189bb3a8c3ffd6f64f801f782842a519239af1ece577ace7ac·...·]-20">}</span><span·class="p">,</span><span·class="w">
168 ··············</span><span·class="p"·data-group-id="5386765875-21">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="ss">disk_log_server</span><span·class="p"·data-group-id="5386765875-21">}</span><span·class="p">,</span><span·class="w">168 ··············</span><span·class="p"·data-group-id="4601043122-21">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="ss">disk_log_server</span><span·class="p"·data-group-id="4601043122-21">}</span><span·class="p">,</span><span·class="w">
169 ··············</span><span·class="p"·data-group-id="5386765875-22">{</span><span·class="ss">mfargs</span><span·class="p">,</span><span·class="p"·data-group-id="5386765875-23">{</span><span·class="ss">disk_log_server</span><span·class="p">,</span><span·class="ss">start_link</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·199,·SHA:·b310719cff7dcff92f8f7fbef1224e55bfdb16a296b619ab4b9a95ee1f8eb0fe·...·]-22">}</span><span·class="p">,</span><span·class="w">169 ··············</span><span·class="p"·data-group-id="4601043122-22">{</span><span·class="ss">mfargs</span><span·class="p">,</span><span·class="p"·data-group-id="4601043122-23">{</span><span·class="ss">disk_log_server</span><span·class="p">,</span><span·class="ss">start_link</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·199,·SHA:·e2b823c85092a6c29c7b922d59d56e7151dc2ccb47adc7ac211125802af43d29·...·]-22">}</span><span·class="p">,</span><span·class="w">
170 ··············</span><span·class="p"·data-group-id="5386765875-25">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="ss">permanent</span><span·class="p"·data-group-id="5386765875-25">}</span><span·class="p">,</span><span·class="w">170 ··············</span><span·class="p"·data-group-id="4601043122-25">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="ss">permanent</span><span·class="p"·data-group-id="4601043122-25">}</span><span·class="p">,</span><span·class="w">
171 ··············</span><span·class="p"·data-group-id="5386765875-26">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="mi">2000</span><span·class="p"·data-group-id="5386765875-26">}</span><span·class="p">,</span><span·class="w">171 ··············</span><span·class="p"·data-group-id="4601043122-26">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="mi">2000</span><span·class="p"·data-group-id="4601043122-26">}</span><span·class="p">,</span><span·class="w">
172 ··············</span><span·class="p"·data-group-id="5386765875-27">{</span><span·class="ss">child_type</span><span·class="p">,</span><span·class="ss">worker</span><span·class="p"·data-group-id="5386765875-27">}</span><span·class="p"·data-group-id="5386765875-19">]</span><span·class="w">172 ··············</span><span·class="p"·data-group-id="4601043122-27">{</span><span·class="ss">child_type</span><span·class="p">,</span><span·class="ss">worker</span><span·class="p"·data-group-id="4601043122-27">}</span><span·class="p"·data-group-id="4601043122-19">]</span><span·class="w">
173 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="5386765875-28">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5386765875-28">)</span><span·class="w">173 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="4601043122-28">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="4601043122-28">)</span><span·class="w">
174 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre>174 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre>
175 </div>175 </div>
  
176 <div·class="bottom-actions"·id="bottom-actions">176 <div·class="bottom-actions"·id="bottom-actions">
177 ··<div·class="bottom-actions-item">177 ··<div·class="bottom-actions-item">
  
178 ······<a·href="system_principles.html"·class="bottom-actions-button"·rel="prev">178 ······<a·href="system_principles.html"·class="bottom-actions-button"·rel="prev">
9.98 KB
./usr/share/doc/erlang-doc/html/doc/system/errors.html
    
Offset 151, 22 lines modifiedOffset 151, 22 lines modified
151 classes,·with·different·origins.·The·<a·href="expressions.html#try">try</a>·expression·can151 classes,·with·different·origins.·The·<a·href="expressions.html#try">try</a>·expression·can
152 distinguish·between·the·different·classes,·whereas·the152 distinguish·between·the·different·classes,·whereas·the
153 <a·href="expressions.html#catch-and-throw">catch</a>·expression·cannot.·<code·class="inline">try</code>·and·<code·class="inline">catch</code>·are·described153 <a·href="expressions.html#catch-and-throw">catch</a>·expression·cannot.·<code·class="inline">try</code>·and·<code·class="inline">catch</code>·are·described
154 in·<a·href="expressions.html">Expressions</a>.</p><table><thead><tr><th·style="text-align:·left;"><em>Class</em></th><th·style="text-align:·left;"><em>Origin</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">error</code></td><td·style="text-align:·left;">Run-time·error,·for·example,·<code·class="inline">1+a</code>,·or·the·process·called·<a·href="../../erts-15.0.1/doc/html/erlang.html#error/1"><code·class="inline">error/1</code></a></td></tr><tr><td·style="text-align:·left;"><code·class="inline">exit</code></td><td·style="text-align:·left;">The·process·called·<a·href="../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a></td></tr><tr><td·style="text-align:·left;"><code·class="inline">throw</code></td><td·style="text-align:·left;">The·process·called·<a·href="../../erts-15.0.1/doc/html/erlang.html#throw/1"><code·class="inline">throw/1</code></a></td></tr></tbody></table><p><em>Table:·Exception·Classes.</em></p><p>All·of·the·above·exceptions·can·also·be·generated·by·calling·<a·href="../../erts-15.0.1/doc/html/erlang.html#raise/3"><code·class="inline">erlang:raise/3</code></a>.</p><p>An·exception·consists·of·its·class,·an·exit·reason·(see154 in·<a·href="expressions.html">Expressions</a>.</p><table><thead><tr><th·style="text-align:·left;"><em>Class</em></th><th·style="text-align:·left;"><em>Origin</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">error</code></td><td·style="text-align:·left;">Run-time·error,·for·example,·<code·class="inline">1+a</code>,·or·the·process·called·<a·href="../../erts-15.0.1/doc/html/erlang.html#error/1"><code·class="inline">error/1</code></a></td></tr><tr><td·style="text-align:·left;"><code·class="inline">exit</code></td><td·style="text-align:·left;">The·process·called·<a·href="../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a></td></tr><tr><td·style="text-align:·left;"><code·class="inline">throw</code></td><td·style="text-align:·left;">The·process·called·<a·href="../../erts-15.0.1/doc/html/erlang.html#throw/1"><code·class="inline">throw/1</code></a></td></tr></tbody></table><p><em>Table:·Exception·Classes.</em></p><p>All·of·the·above·exceptions·can·also·be·generated·by·calling·<a·href="../../erts-15.0.1/doc/html/erlang.html#raise/3"><code·class="inline">erlang:raise/3</code></a>.</p><p>An·exception·consists·of·its·class,·an·exit·reason·(see
155 <a·href="errors.html#exit_reasons">Exit·Reason</a>),·and·a·stack·trace·(which·aids·in·finding155 <a·href="errors.html#exit_reasons">Exit·Reason</a>),·and·a·stack·trace·(which·aids·in·finding
156 the·code·location·of·the·exception).</p><p>The·stack·trace·can·be·bound·to·a·variable·from·within·a·<code·class="inline">try</code>·expression·for156 the·code·location·of·the·exception).</p><p>The·stack·trace·can·be·bound·to·a·variable·from·within·a·<code·class="inline">try</code>·expression·for
157 any·exception·class,·or·as·part·of·the·exit·reason·when·a·run-time·error·is157 any·exception·class,·or·as·part·of·the·exit·reason·when·a·run-time·error·is
158 caught·by·a·<code·class="inline">catch</code>.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="2353437299-1">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="2353437299-2">{</span><span·class="ss">test</span><span·class="p">,</span><span·class="n">Stacktrace</span><span·class="p"·data-group-id="235[·...·truncated·by·diffoscope;·len:·452,·SHA:·0cbf0ac088fd53282e7691111a7c465a78ff008d0893eeca0bac4af71fb46e85·...·]9-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stacktrace</span><span·class="p">.</span><span·class="w">158 caught·by·a·<code·class="inline">catch</code>.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="8398511729-1">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="8398511729-2">{</span><span·class="ss">test</span><span·class="p">,</span><span·class="n">Stacktrace</span><span·class="p"·data-group-id="839[·...·truncated·by·diffoscope;·len:·452,·SHA:·f2049fccc57bc644ff00f062df3d7a287a5d60bc676781ce8ed998a522220f76·...·]9-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stacktrace</span><span·class="p">.</span><span·class="w">
159 </span><span·class="p"·data-group-id="2353437299-5">[</span><span·class="p"·data-group-id="2353437299-6">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">apply_fun</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·124,·SHA:·1882fd503ccfbde474c6e010cdff6d067537ecfd8ddc5aad6fad2feb20e94c6c·...·]9-6">}</span><span·class="p">,</span><span·class="w">159 </span><span·class="p"·data-group-id="8398511729-5">[</span><span·class="p"·data-group-id="8398511729-6">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">apply_fun</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·124,·SHA:·78a18296a2cd26bc3419b77647d54f247adca02248aebd68d06b0a1135256bf0·...·]9-6">}</span><span·class="p">,</span><span·class="w">
160 ·</span><span·class="p"·data-group-id="2353437299-8">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="p"·data-group-id="2353437299-9">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·73,·SHA:·2cbf4150ea5818de6d7fb66b32953637e03a4fc78a5675996a8490580293f1c1·...·]9-8">}</span><span·class="p">,</span><span·class="w">160 ·</span><span·class="p"·data-group-id="8398511729-8">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="p"·data-group-id="8398511729-9">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·73,·SHA:·b44a2dcb2f7fdfc18c3b71ab306d15bbe67313c63241c80eba8e8b9f03cbc0a4·...·]9-8">}</span><span·class="p">,</span><span·class="w">
161 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="2353437299-5">]</span><span·class="gp·unselectable">161 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="8398511729-5">]</span><span·class="gp·unselectable">
162 &gt;·</span><span·class="k">try</span><span·class="w">·</span><span·class="nf">throw</span><span·class="p"·data-group-id="2353437299-10">(</span><span·class="ss">test</span><span·class="p"·data-group-id="2353437299-10">)</span><span·class="w">·</span><span·class="k">catch</span><span·class="w">·</span><span·class="n">Class</span><span·class="p">:</span><span·class="n">Reason</span><span·class="p">:</span><span·class="n">Stacktrace</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Stacktrace</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">162 &gt;·</span><span·class="k">try</span><span·class="w">·</span><span·class="nf">throw</span><span·class="p"·data-group-id="8398511729-10">(</span><span·class="ss">test</span><span·class="p"·data-group-id="8398511729-10">)</span><span·class="w">·</span><span·class="k">catch</span><span·class="w">·</span><span·class="n">Class</span><span·class="p">:</span><span·class="n">Reason</span><span·class="p">:</span><span·class="n">Stacktrace</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Stacktrace</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
163 </span><span·class="p"·data-group-id="2353437299-11">[</span><span·class="p"·data-group-id="2353437299-12">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">apply_fun</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·128,·SHA:·0891a968c97c351f5c912fcf6dd68e2c4aae104ceaa5d59ee33c0b39b04fbeec·...·]9-12">}</span><span·class="p">,</span><span·class="w">163 </span><span·class="p"·data-group-id="8398511729-11">[</span><span·class="p"·data-group-id="8398511729-12">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">apply_fun</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·128,·SHA:·c80e39971a4aea8a5fd7fd30c4a54bcf1d693c3bf38647efee040cb5acc67687·...·]9-12">}</span><span·class="p">,</span><span·class="w">
164 ·</span><span·class="p"·data-group-id="2353437299-14">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="p"·data-group-id="2353437299-15">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·76,·SHA:·9117b09804f45a7654878ab68ea3ea7c1a58774ec095a9716f4d8534160115d4·...·]9-14">}</span><span·class="p">,</span><span·class="w">164 ·</span><span·class="p"·data-group-id="8398511729-14">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="p"·data-group-id="8398511729-15">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·76,·SHA:·57c3f3c5b1e3bd2b6ad2f247db3107bc48f600253ee29a28ba13c131ea682f67·...·]9-14">}</span><span·class="p">,</span><span·class="w">
165 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="2353437299-11">]</span></code></pre><p><a·href=""·id="stacktrace"></a></p><h3·id="the-call-stack-back-trace-stacktrace"·class="section-heading">165 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="8398511729-11">]</span></code></pre><p><a·href=""·id="stacktrace"></a></p><h3·id="the-call-stack-back-trace-stacktrace"·class="section-heading">
166 ··<a·href="#the-call-stack-back-trace-stacktrace"·class="hover-link">166 ··<a·href="#the-call-stack-back-trace-stacktrace"·class="hover-link">
167 ····<i·class="ri-link-m"·aria-hidden="true"></i>167 ····<i·class="ri-link-m"·aria-hidden="true"></i>
168 ··</a>168 ··</a>
169 ··<span·class="text">The·call-stack·back·trace·(stacktrace)</span>169 ··<span·class="text">The·call-stack·back·trace·(stacktrace)</span>
170 </h3>170 </h3>
171 <p>The·stack·back-trace·(<a·href="../../erts-15.0.1/doc/html/erlang.html#t:stacktrace/0"><em>stacktrace</em></a>)·is·a·list·that171 <p>The·stack·back-trace·(<a·href="../../erts-15.0.1/doc/html/erlang.html#t:stacktrace/0"><em>stacktrace</em></a>)·is·a·list·that
172 contains·<code·class="inline">{Module,·Function,·Arity,·ExtraInfo}</code>·and/or·<code·class="inline">{Fun,·Arity,·ExtraInfo}</code>172 contains·<code·class="inline">{Module,·Function,·Arity,·ExtraInfo}</code>·and/or·<code·class="inline">{Fun,·Arity,·ExtraInfo}</code>
40.8 KB
./usr/share/doc/erlang-doc/html/doc/system/events.html
    
Offset 135, 43 lines modifiedOffset 135, 43 lines modified
135 event·handler.</p><h2·id="example"·class="section-heading">135 event·handler.</p><h2·id="example"·class="section-heading">
136 ··<a·href="#example"·class="hover-link">136 ··<a·href="#example"·class="hover-link">
137 ····<i·class="ri-link-m"·aria-hidden="true"></i>137 ····<i·class="ri-link-m"·aria-hidden="true"></i>
138 ··</a>138 ··</a>
139 ··<span·class="text">Example</span>139 ··<span·class="text">Example</span>
140 </h2>140 </h2>
141 <p>The·callback·module·for·the·event·handler·writing·error·messages·to·the·terminal141 <p>The·callback·module·for·the·event·handler·writing·error·messages·to·the·terminal
142 can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6941773598-1">(</span><span·class="ss">terminal_logger</span><span·class="p"·data-group-id="6941773598-1">)</span><span·class="p">.</span><span·class="w">142 can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8834230560-1">(</span><span·class="ss">terminal_logger</span><span·class="p"·data-group-id="8834230560-1">)</span><span·class="p">.</span><span·class="w">
143 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="6941773598-2">(</span><span·class="ss">gen_event</span><span·class="p"·data-group-id="6941773598-2">)</span><span·class="p">.</span><span·class="w">143 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="8834230560-2">(</span><span·class="ss">gen_event</span><span·class="p"·data-group-id="8834230560-2">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="w">144 </span><span·class="w">
145 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6941773598-3">(</span><span·class="p"·data-group-id="6941773598-4">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·253,·SHA:·41e2bd9039c5b5e8b84b052dab453b1da1ae7c6aee5454b63bdcc348055b7b52·...·]-3">)</span><span·class="p">.</span><span·class="w">145 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8834230560-3">(</span><span·class="p"·data-group-id="8834230560-4">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·253,·SHA:·e15f582ffba1197b1b4aa7905763f6e2801805dff5d80ba9069f64887a9affdc·...·]-3">)</span><span·class="p">.</span><span·class="w">
  
146 </span><span·class="nf">init</span><span·class="p"·data-group-id="6941773598-5">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="6941773598-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">146 </span><span·class="nf">init</span><span·class="p"·data-group-id="8834230560-5">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="8834230560-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
147 ····</span><span·class="p"·data-group-id="6941773598-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6941773598-7">[</span><span·class="p"·data-group-id="6941773598-7">]</span><span·class="p"·data-group-id="6941773598-6">}</span><span·class="p">.</span><span·class="w">147 ····</span><span·class="p"·data-group-id="8834230560-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8834230560-7">[</span><span·class="p"·data-group-id="8834230560-7">]</span><span·class="p"·data-group-id="8834230560-6">}</span><span·class="p">.</span><span·class="w">
  
148 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="6941773598-8">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="6941773598-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">148 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="8834230560-8">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="8834230560-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
149 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6941773598-9">(</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6941773598-10">[</span><span·clas[·...·truncated·by·diffoscope;·len:·116,·SHA:·ec81e0a52bdc9717f5f464055447e99f816d043be42733e1dc0f06732292dab0·...·]-9">)</span><span·class="p">,</span><span·class="w">149 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8834230560-9">(</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8834230560-10">[</span><span·clas[·...·truncated·by·diffoscope;·len:·116,·SHA:·03bbe19ac4485a3a8ce49b019be50f8510f442457d467f004ff0b70cbf9b9faf·...·]-9">)</span><span·class="p">,</span><span·class="w">
150 ····</span><span·class="p"·data-group-id="6941773598-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="6941773598-11">}</span><span·class="p">.</span><span·class="w">150 ····</span><span·class="p"·data-group-id="8834230560-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="8834230560-11">}</span><span·class="p">.</span><span·class="w">
  
151 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="6941773598-12">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">State</span><span·class="p"·data-group-id="6941773598-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">151 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="8834230560-12">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">State</span><span·class="p"·data-group-id="8834230560-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
152 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>The·callback·module·for·the·event·handler·writing·error·messages·to·a·file·can152 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>The·callback·module·for·the·event·handler·writing·error·messages·to·a·file·can
153 look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0878076698-1">(</span><span·class="ss">file_logger</span><span·class="p"·data-group-id="0878076698-1">)</span><span·class="p">.</span><span·class="w">153 look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5574584347-1">(</span><span·class="ss">file_logger</span><span·class="p"·data-group-id="5574584347-1">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="0878076698-2">(</span><span·class="ss">gen_event</span><span·class="p"·data-group-id="0878076698-2">)</span><span·class="p">.</span><span·class="w">154 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="5574584347-2">(</span><span·class="ss">gen_event</span><span·class="p"·data-group-id="5574584347-2">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="w">155 </span><span·class="w">
156 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0878076698-3">(</span><span·class="p"·data-group-id="0878076698-4">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·253,·SHA:·0e4e3d3581db69f718087422f730286714e2ebd007c91fdfa827397c301aaf5d·...·]-3">)</span><span·class="p">.</span><span·class="w">156 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5574584347-3">(</span><span·class="p"·data-group-id="5574584347-4">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·253,·SHA:·ae493e2f9a2ae07fb4e2e752096819442d974df8141ae26ef136270186f225e9·...·]-3">)</span><span·class="p">.</span><span·class="w">
  
157 </span><span·class="nf">init</span><span·class="p"·data-group-id="0878076698-5">(</span><span·class="n">File</span><span·class="p"·data-group-id="0878076698-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">init</span><span·class="p"·data-group-id="5574584347-5">(</span><span·class="n">File</span><span·class="p"·data-group-id="5574584347-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="p"·data-group-id="0878076698-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0878076698-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·267,·SHA:·7fbecab8446dd03e2f1b337ec30e8908a73fb61e5670bc35e4ac8de7d89ee9d2·...·]-7">)</span><span·class="p">,</span><span·class="w">158 ····</span><span·class="p"·data-group-id="5574584347-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5574584347-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·267,·SHA:·126f7bf4edbe1ea134cfb4778ebeea58253942c833f7b513b9736dac409e64f5·...·]-7">)</span><span·class="p">,</span><span·class="w">
159 ····</span><span·class="p"·data-group-id="0878076698-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0878076698-8">}</span><span·class="p">.</span><span·class="w">159 ····</span><span·class="p"·data-group-id="5574584347-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5574584347-8">}</span><span·class="p">.</span><span·class="w">
  
160 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="0878076698-9">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0878076698-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">160 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="5574584347-9">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5574584347-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
161 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0878076698-10">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·190,·SHA:·e233cf5978727d83cf8e8f856d1810300e4b202bde7da5bca49e2e7ce1968bfa·...·]-10">)</span><span·class="p">,</span><span·class="w">161 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5574584347-10">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·190,·SHA:·dcf7323e104b21d775f7641723f9de6cbf81f20d216c737baaab75cbd30f134d·...·]-10">)</span><span·class="p">,</span><span·class="w">
162 ····</span><span·class="p"·data-group-id="0878076698-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0878076698-12">}</span><span·class="p">.</span><span·class="w">162 ····</span><span·class="p"·data-group-id="5574584347-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5574584347-12">}</span><span·class="p">.</span><span·class="w">
  
163 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="0878076698-13">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0878076698-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">163 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="5574584347-13">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5574584347-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
164 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="0878076698-14">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="0878076698-14">)</span><span·class="p">.</span></code></pre><p>The·code·is·explained·in·the·next·sections.</p><p><a·href=""·id="mgr"></a></p><h2·id="starting-an-event-manager"·class="section-heading">164 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5574584347-14">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="5574584347-14">)</span><span·class="p">.</span></code></pre><p>The·code·is·explained·in·the·next·sections.</p><p><a·href=""·id="mgr"></a></p><h2·id="starting-an-event-manager"·class="section-heading">
165 ··<a·href="#starting-an-event-manager"·class="hover-link">165 ··<a·href="#starting-an-event-manager"·class="hover-link">
166 ····<i·class="ri-link-m"·aria-hidden="true"></i>166 ····<i·class="ri-link-m"·aria-hidden="true"></i>
167 ··</a>167 ··</a>
168 ··<span·class="text">Starting·an·Event·Manager</span>168 ··<span·class="text">Starting·an·Event·Manager</span>
169 </h2>169 </h2>
170 <p>To·start·an·event·manager·for·handling·errors,·as·described·in·the·previous170 <p>To·start·an·event·manager·for·handling·errors,·as·described·in·the·previous
171 example,·call·the·following·function:</p><pre><code·class="text">gen_event:start_link({local,·error_man})</code></pre><p><a·href="../../lib/stdlib-6.0.1/doc/html/gen_event.html#start_link/1"><code·class="inline">gen_event:start_link/1</code></a>·spawns·and·links·to·a·new·event·manager·process.</p><p>The·argument,·<code·class="inline">{local,·error_man}</code>,·specifies·the·name·under·which·the171 example,·call·the·following·function:</p><pre><code·class="text">gen_event:start_link({local,·error_man})</code></pre><p><a·href="../../lib/stdlib-6.0.1/doc/html/gen_event.html#start_link/1"><code·class="inline">gen_event:start_link/1</code></a>·spawns·and·links·to·a·new·event·manager·process.</p><p>The·argument,·<code·class="inline">{local,·error_man}</code>,·specifies·the·name·under·which·the
Offset 184, 57 lines modifiedOffset 184, 57 lines modified
184 manager·that·is·not·part·of·a·supervision·tree.</p><h2·id="adding-an-event-handler"·class="section-heading">184 manager·that·is·not·part·of·a·supervision·tree.</p><h2·id="adding-an-event-handler"·class="section-heading">
185 ··<a·href="#adding-an-event-handler"·class="hover-link">185 ··<a·href="#adding-an-event-handler"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">Adding·an·Event·Handler</span>188 ··<span·class="text">Adding·an·Event·Handler</span>
189 </h2>189 </h2>
190 <p>The·following·example·shows·how·to·start·an·event·manager·and·add·an·event190 <p>The·following·example·shows·how·to·start·an·event·manager·and·add·an·event
191 handler·to·it·by·using·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="0547327730-1">(</span><span·class="p"·data-group-id="0547327730-2">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">error_man</span><span·class="p"·data-group-id="0547327730-2">}</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·45f883cdbe199091f21cfda65de5eadce1ac23714bb8120ffb36cd81b86fef39·...·]-1">)</span><span·class="p">.</span><span·class="w">191 handler·to·it·by·using·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4663503203-1">(</span><span·class="p"·data-group-id="4663503203-2">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">error_man</span><span·class="p"·data-group-id="4663503203-2">}</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·db5b3e0a53c52a4f4f01e39f966654938c4d5eaff298cc6705f4d08828b7c5db·...·]-1">)</span><span·class="p">.</span><span·class="w">
192 </span><span·class="p"·data-group-id="0547327730-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0547327730-3">}</span><span·class="gp·unselectable">192 </span><span·class="p"·data-group-id="4663503203-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4663503203-3">}</span><span·class="gp·unselectable">
193 2&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="0547327730-4">(</span><span·class="ss">error_man</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminal_logger</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0547327730-5">[</span><span·class="[·...·truncated·by·diffoscope;·len:·81,·SHA:·2744ccd6991ca288916e7132d5557d6bd49e0b23b3a265bec494fa2ec026ec93·...·]-4">)</span><span·class="p">.</span><span·class="w">193 2&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="4663503203-4">(</span><span·class="ss">error_man</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminal_logger</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4663503203-5">[</span><span·class="[·...·truncated·by·diffoscope;·len:·81,·SHA:·49f501690c2a7addf75ab09ebf2f3b68e4718c788f0baa924d49aeca37c991f7·...·]-4">)</span><span·class="p">.</span><span·class="w">
194 </span><span·class="ss">ok</span></code></pre><p>This·function·sends·a·message·to·the·event·manager·registered·as·<code·class="inline">error_man</code>,194 </span><span·class="ss">ok</span></code></pre><p>This·function·sends·a·message·to·the·event·manager·registered·as·<code·class="inline">error_man</code>,
195 telling·it·to·add·the·event·handler·<code·class="inline">terminal_logger</code>.·The·event·manager·calls195 telling·it·to·add·the·event·handler·<code·class="inline">terminal_logger</code>.·The·event·manager·calls
196 the·callback·function·<code·class="inline">terminal_logger:init([])</code>,·where·the·argument·<code·class="inline">[]</code>·is·the196 the·callback·function·<code·class="inline">terminal_logger:init([])</code>,·where·the·argument·<code·class="inline">[]</code>·is·the
197 third·argument·to·<code·class="inline">add_handler</code>.·<code·class="inline">init/1</code>·is·expected·to·return·<code·class="inline">{ok,·State}</code>,197 third·argument·to·<code·class="inline">add_handler</code>.·<code·class="inline">init/1</code>·is·expected·to·return·<code·class="inline">{ok,·State}</code>,
198 where·<code·class="inline">State</code>·is·the·internal·state·of·the·event·handler.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="2326870773-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="2326870773-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
199 ····</span><span·class="p"·data-group-id="2326870773-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2326870773-3">[</span><span·class="p"·data-group-id="2326870773-3">]</span><span·class=[·...·truncated·by·diffoscope;·len:·180,·SHA:·02006435ad2f18402fa8f51be6be836f822769562474db27c9d1b4b38e5795b2·...·]198 where·<code·class="inline">State</code>·is·the·internal·state·of·the·event·handler.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="1586943120-1">(</span><span·class="p">_</span><span·class="n">[·...·truncated·by·diffoscope;·len:·132,·SHA:·b3d3c3f925ea7973204e48d9dcf2203dda5179e1a02421d4075866ba042fc091·...·]
 199 ····</span><span·class="p"·data-group-id="1586943120-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1586943120-3">[</span><span·class="p"·data-group-id="1586943120-3">]</span><span·class="p"·data-group-id="1586943120-2">}</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">init/1</code>·does·not·need·any·input·data·and·ignores·its·argument.·For
200 <code·class="inline">terminal_logger</code>,·the·internal·state·is·not·used.·For·<code·class="inline">file_logger</code>,·the200 <code·class="inline">terminal_logger</code>,·the·internal·state·is·not·used.·For·<code·class="inline">file_logger</code>,·the
201 internal·state·is·used·to·save·the·open·file·descriptor.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="3028939820-1">(</span><span·class="n">File</span><span·class="p"·data-group-id="3028939820-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 internal·state·is·used·to·save·the·open·file·descriptor.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="1355102936-1">(</span><span·class="n">File</span><span·class="p"·data-group-id="1355102936-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ····</span><span·class="p"·data-group-id="3028939820-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="3028939820-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·267,·SHA:·df0db3e2fbc0d4bf3645e0d17febf68e9421f07358fbb881ca9bf286bc1ee20a·...·]-3">)</span><span·class="p">,</span><span·class="w">202 ····</span><span·class="p"·data-group-id="1355102936-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="1355102936-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·267,·SHA:·bbb94551fc6f56091032280bef4856cf9bdc1cb770468d55e0fe502ccaf2b2ea·...·]-3">)</span><span·class="p">,</span><span·class="w">
203 ····</span><span·class="p"·data-group-id="3028939820-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="3028939820-4">}</span><span·class="p">.</span></code></pre><h2·id="notifying-about-events"·class="section-heading">203 ····</span><span·class="p"·data-group-id="1355102936-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="1355102936-4">}</span><span·class="p">.</span></code></pre><h2·id="notifying-about-events"·class="section-heading">
204 ··<a·href="#notifying-about-events"·class="hover-link">204 ··<a·href="#notifying-about-events"·class="hover-link">
205 ····<i·class="ri-link-m"·aria-hidden="true"></i>205 ····<i·class="ri-link-m"·aria-hidden="true"></i>
206 ··</a>206 ··</a>
207 ··<span·class="text">Notifying·about·Events</span>207 ··<span·class="text">Notifying·about·Events</span>
208 </h2>208 </h2>
209 <pre><code·class="text">3&gt;·gen_event:notify(error_man,·no_reply).209 <pre><code·class="text">3&gt;·gen_event:notify(error_man,·no_reply).
210 ***Error***·no_reply210 ***Error***·no_reply
211 ok</code></pre><p><code·class="inline">error_man</code>·is·the·name·of·the·event·manager·and·<code·class="inline">no_reply</code>·is·the·event.</p><p>The·event·is·made·into·a·message·and·sent·to·the·event·manager.·When·the·event211 ok</code></pre><p><code·class="inline">error_man</code>·is·the·name·of·the·event·manager·and·<code·class="inline">no_reply</code>·is·the·event.</p><p>The·event·is·made·into·a·message·and·sent·to·the·event·manager.·When·the·event
212 is·received,·the·event·manager·calls·<code·class="inline">handle_event(Event,·State)</code>·for·each212 is·received,·the·event·manager·calls·<code·class="inline">handle_event(Event,·State)</code>·for·each
213 installed·event·handler,·in·the·same·order·as·they·were·added.·The·function·is213 installed·event·handler,·in·the·same·order·as·they·were·added.·The·function·is
214 expected·to·return·a·tuple·<code·class="inline">{ok,State1}</code>,·where·<code·class="inline">State1</code>·is·a·new·value·for·the214 expected·to·return·a·tuple·<code·class="inline">{ok,State1}</code>,·where·<code·class="inline">State1</code>·is·a·new·value·for·the
215 state·of·the·event·handler.</p><p>In·<code·class="inline">terminal_logger</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_event</span><span·class="p"·data-group-id="5695149852-1">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5695149852-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">215 state·of·the·event·handler.</p><p>In·<code·class="inline">terminal_logger</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_event</span><span·class="p"·data-group-id="6192951122-1">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="6192951122-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
 216 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6192951122-2">(</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6192951122-3">[</span><span·class="n">ErrorMsg</span><span·class="p"·data-group-id="6192951122-3">]</span><span·class="p"·data-group-id="6192951122-2">)</span><span·class="p">,</span><span·class="w">
 217 ····</span><span·class="p"·data-group-id="6192951122-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="6192951122-4">}</span><span·class="p">.</span></code></pre><p>In·<code·class="inline">file_logger</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_event</span><span·class="p"·data-group-id="5523848433-1">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5523848433-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
216 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5695149852-2">(</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5695149852-3">[</span><span·class=[·...·truncated·by·diffoscope;·len:·113,·SHA:·189203ced55b044af1e80c832a5aad4a3103f99e3714164673e2ceea19945164·...·]-2">)</span><span·class="p">,</span><span·class="w">218 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5523848433-2">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·186,·SHA:·0753d8e9efa96333b03f8571942990872f1772692f997f88f1c55e40e2f98025·...·]-2">)</span><span·class="p">,</span><span·class="w">
217 ····</span><span·class="p"·data-group-id="5695149852-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5695149852-4">}</span><span·class="p">.</span></code></pre><p>In·<code·class="inline">file_logger</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_event</span><span·class="p"·data-group-id="3201099102-1">(</span><span·class="n">ErrorMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="3201099102-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
218 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3201099102-2">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;***Error***·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3201099102-3">[</span><span·class="n">ErrorMsg</span><span·class="p"·data-group-id="3201099102-3">]</span><span·class="p"·data-group-id="3201099102-2">)</span><span·class="p">,</span><span·class="w"> 
219 ····</span><span·class="p"·data-group-id="3201099102-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="3201099102-4">}</span><span·class="p">.</span></code></pre><h2·id="deleting-an-event-handler"·class="section-heading">219 ····</span><span·class="p"·data-group-id="5523848433-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="5523848433-4">}</span><span·class="p">.</span></code></pre><h2·id="deleting-an-event-handler"·class="section-heading">
220 ··<a·href="#deleting-an-event-handler"·class="hover-link">220 ··<a·href="#deleting-an-event-handler"·class="hover-link">
221 ····<i·class="ri-link-m"·aria-hidden="true"></i>221 ····<i·class="ri-link-m"·aria-hidden="true"></i>
222 ··</a>222 ··</a>
223 ··<span·class="text">Deleting·an·Event·Handler</span>223 ··<span·class="text">Deleting·an·Event·Handler</span>
224 </h2>224 </h2>
225 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">delete_handler</span><span·class="p"·data-group-id="0408112499-1">(</span><span·class="ss">error_man</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminal_logger</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0408112499-2">[</span><span·class="[·...·truncated·by·diffoscope;·len:·81,·SHA:·0eabb6c0827b3a5c951480b173e7b96ee27a26b63c0f13f10ff2514a748207d2·...·]-1">)</span><span·class="p">.</span><span·class="w">225 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">delete_handler</span><span·class="p"·data-group-id="3507709095-1">(</span><span·class="ss">error_man</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminal_logger</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3507709095-2">[</span><span·class="[·...·truncated·by·diffoscope;·len:·81,·SHA:·288af1ece49af9ee123bde4d9fa5b09aa73ece1da96897f6c797d4f482df896e·...·]-1">)</span><span·class="p">.</span><span·class="w">
226 </span><span·class="ss">ok</span></code></pre><p>This·function·sends·a·message·to·the·event·manager·registered·as·<code·class="inline">error_man</code>,226 </span><span·class="ss">ok</span></code></pre><p>This·function·sends·a·message·to·the·event·manager·registered·as·<code·class="inline">error_man</code>,
227 telling·it·to·delete·the·event·handler·<code·class="inline">terminal_logger</code>.·The·event·manager227 telling·it·to·delete·the·event·handler·<code·class="inline">terminal_logger</code>.·The·event·manager
228 calls·the·callback·function·<code·class="inline">terminal_logger:terminate([],·State)</code>,·where·the228 calls·the·callback·function·<code·class="inline">terminal_logger:terminate([],·State)</code>,·where·the
229 argument·<code·class="inline">[]</code>·is·the·third·argument·to·<code·class="inline">delete_handler</code>.·<code·class="inline">terminate/2</code>·is·to·be229 argument·<code·class="inline">[]</code>·is·the·third·argument·to·<code·class="inline">delete_handler</code>.·<code·class="inline">terminate/2</code>·is·to·be
230 the·opposite·of·<code·class="inline">init/1</code>·and·do·any·necessary·cleaning·up.·Its·return·value·is230 the·opposite·of·<code·class="inline">init/1</code>·and·do·any·necessary·cleaning·up.·Its·return·value·is
231 ignored.</p><p>For·<code·class="inline">terminal_logger</code>,·no·cleaning·up·is·necessary:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">terminate</span><span·class="p"·data-group-id="7427535999-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">State</span><span·class="p"·data-group-id="7427535999-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
232 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>For·<code·class="inline">file_logger</code>,·the·file·descriptor·opened·in·<code·class="inline">init</code>·must·be·closed:</p><pre><code·class="makeup·erlang"·translate="no"><spa[·...·truncated·by·diffoscope;·len:·247,·SHA:·169627de02e85529f1ad4c87aa7541b3870a4491daa6c52d1f99dd03b80039eb·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 ignored.</p><p>For·<code·class="inline">terminal_logger</code>,·no·cleaning·up·is·necessary:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">terminate</span><span·class="p"·data-group-id="2432567340-1">(</span><span·class="p">_</span><s[·...·truncated·by·diffoscope;·len:·166,·SHA:·22128ab31f9b7c318ff7ad3f466e8915e68a7de8153b63c8f6ed46881b63d68b·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
 232 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>For·<code·class="inline">file_logger</code>,·the·file·descriptor·opened·in·<code·class="inline">init</code>·must·be·closed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">terminate</span><span·class="p"·data-group-id="2010286807-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="2010286807-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
233 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6860509463-2">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="6860509463-2">)</span><span·class="p">.</span></code></pre><h2·id="stopping"·class="section-heading">233 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="2010286807-2">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="2010286807-2">)</span><span·class="p">.</span></code></pre><h2·id="stopping"·class="section-heading">
234 ··<a·href="#stopping"·class="hover-link">234 ··<a·href="#stopping"·class="hover-link">
235 ····<i·class="ri-link-m"·aria-hidden="true"></i>235 ····<i·class="ri-link-m"·aria-hidden="true"></i>
236 ··</a>236 ··</a>
237 ··<span·class="text">Stopping</span>237 ··<span·class="text">Stopping</span>
238 </h2>238 </h2>
239 <p>When·an·event·manager·is·stopped,·it·gives·each·of·the·installed·event·handlers239 <p>When·an·event·manager·is·stopped,·it·gives·each·of·the·installed·event·handlers
240 the·chance·to·clean·up·by·calling·<code·class="inline">terminate/2</code>,·the·same·way·as·when·deleting·a240 the·chance·to·clean·up·by·calling·<code·class="inline">terminate/2</code>,·the·same·way·as·when·deleting·a
Offset 249, 33 lines modifiedOffset 249, 33 lines modified
249 this·is·done·is·defined·by·a·<a·href="sup_princ.html#shutdown">shutdown·strategy</a>·set·in249 this·is·done·is·defined·by·a·<a·href="sup_princ.html#shutdown">shutdown·strategy</a>·set·in
250 the·supervisor.</p><h3·id="standalone-event-managers"·class="section-heading">250 the·supervisor.</p><h3·id="standalone-event-managers"·class="section-heading">
251 ··<a·href="#standalone-event-managers"·class="hover-link">251 ··<a·href="#standalone-event-managers"·class="hover-link">
252 ····<i·class="ri-link-m"·aria-hidden="true"></i>252 ····<i·class="ri-link-m"·aria-hidden="true"></i>
253 ··</a>253 ··</a>
254 ··<span·class="text">Standalone·Event·Managers</span>254 ··<span·class="text">Standalone·Event·Managers</span>
255 </h3>255 </h3>
256 <p>An·event·manager·can·also·be·stopped·by·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0396466696-1">(</span><span·class="ss">error_man</span><span·class="p"·data-group-id="0396466696-1">)</span><span·class="p">.</span><span·class="w">256 <p>An·event·manager·can·also·be·stopped·by·calling:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="3055750604-1">(</span><span·class="ss">error_man</span><span·class="p"·data-group-id="3055750604-1">)</span><span·class="p">.</span><span·class="w">
257 </span><span·class="ss">ok</span></code></pre><h2·id="handling-other-messages"·class="section-heading">257 </span><span·class="ss">ok</span></code></pre><h2·id="handling-other-messages"·class="section-heading">
258 ··<a·href="#handling-other-messages"·class="hover-link">258 ··<a·href="#handling-other-messages"·class="hover-link">
259 ····<i·class="ri-link-m"·aria-hidden="true"></i>259 ····<i·class="ri-link-m"·aria-hidden="true"></i>
260 ··</a>260 ··</a>
261 ··<span·class="text">Handling·Other·Messages</span>261 ··<span·class="text">Handling·Other·Messages</span>
262 </h2>262 </h2>
263 <p>If·the·<code·class="inline">gen_event</code>·process·is·to·be·able·to·receive·other·messages263 <p>If·the·<code·class="inline">gen_event</code>·process·is·to·be·able·to·receive·other·messages
264 than·events,·the·callback·function·<code·class="inline">handle_info(Info,·State)</code>·must·be264 than·events,·the·callback·function·<code·class="inline">handle_info(Info,·State)</code>·must·be
265 implemented·to·handle·them.·Examples·of·other·messages·are·exit265 implemented·to·handle·them.·Examples·of·other·messages·are·exit
266 messages·if·the·event·manager·is·linked·to·other·processes·than·the266 messages·if·the·event·manager·is·linked·to·other·processes·than·the
267 supervisor·(for·example·via·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_event.html#add_sup_handler/3"><code·class="inline">gen_event:add_sup_handler/3</code></a>)·and·is267 supervisor·(for·example·via·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_event.html#add_sup_handler/3"><code·class="inline">gen_event:add_sup_handler/3</code></a>)·and·is
268 trapping·exit·signals.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_info</span><span·class="p"·data-group-id="3446371131-1">(</span><span·class="p"·data-group-id="3446371131-2">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reaso[·...·truncated·by·diffoscope;·len:·178,·SHA:·e7e70d2a616f5c297a0bffcae42dba5a1d9964e99ffd7f70175acf4c4e5f5775·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">268 trapping·exit·signals.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_info</span><span·class="p"·data-group-id="4928020295-1">(</span><span·class="p"·data-group-id="4928020295-2">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reaso[·...·truncated·by·diffoscope;·len:·178,·SHA:·b57487875c92f3add2c61e5990db6cc26041657757fc99be499c4ff8de637376·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
269 ····</span><span·class="c1">%%·Code·to·handle·exits·here.</span><span·class="w">269 ····</span><span·class="c1">%%·Code·to·handle·exits·here.</span><span·class="w">
Max diff block lines reached; 2507/41640 bytes (6.02%) of diff not shown.
1.77 KB
./usr/share/doc/erlang-doc/html/doc/system/example.html
    
Offset 131, 15 lines modifiedOffset 131, 15 lines modified
  
131 int·bar(int·y)·{131 int·bar(int·y)·{
132 ··return·y*2;132 ··return·y*2;
133 }</code></pre><p>The·functions·are·deliberately·kept·as·simple·as·possible,·for·readability133 }</code></pre><p>The·functions·are·deliberately·kept·as·simple·as·possible,·for·readability
134 reasons.</p><p>From·an·Erlang·perspective,·it·is·preferable·to·be·able·to·call·<code·class="inline">foo</code>·and·<code·class="inline">bar</code>134 reasons.</p><p>From·an·Erlang·perspective,·it·is·preferable·to·be·able·to·call·<code·class="inline">foo</code>·and·<code·class="inline">bar</code>
135 without·having·to·bother·about·that·they·are·C·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·Erlang·code</span><span·class="w">135 without·having·to·bother·about·that·they·are·C·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·Erlang·code</span><span·class="w">
136 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">136 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
137 </span><span·class="n">Res</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">complex</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="7047584088-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="7047584088-1">)</span><span·class="p">,</span><span·class="w">137 </span><span·class="n">Res</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">complex</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="9878919317-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="9878919317-1">)</span><span·class="p">,</span><span·class="w">
138 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Here,·the·communication·with·C·is·hidden·in·the·implementation·of·<code·class="inline">complex.erl</code>.138 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Here,·the·communication·with·C·is·hidden·in·the·implementation·of·<code·class="inline">complex.erl</code>.
139 In·the·following·sections,·it·is·shown·how·this·module·can·be·implemented·using139 In·the·following·sections,·it·is·shown·how·this·module·can·be·implemented·using
140 the·different·interoperability·mechanisms.</p>140 the·different·interoperability·mechanisms.</p>
141 </div>141 </div>
  
142 <div·class="bottom-actions"·id="bottom-actions">142 <div·class="bottom-actions"·id="bottom-actions">
143 ··<div·class="bottom-actions-item">143 ··<div·class="bottom-actions-item">
300 KB
./usr/share/doc/erlang-doc/html/doc/system/expressions.html
    
Offset 151, 81 lines modifiedOffset 151, 81 lines modified
151 </span><span·class="n">Phone_number</span><span·class="w">151 </span><span·class="n">Phone_number</span><span·class="w">
152 </span><span·class="p">_</span><span·class="w">152 </span><span·class="p">_</span><span·class="w">
153 </span><span·class="p">_</span><span·class="n">Height</span><span·class="w">153 </span><span·class="p">_</span><span·class="n">Height</span><span·class="w">
154 </span><span·class="ss">name@node</span></code></pre><p>Variables·are·bound·to·values·using·<a·href="patterns.html">pattern·matching</a>.·Erlang·uses154 </span><span·class="ss">name@node</span></code></pre><p>Variables·are·bound·to·values·using·<a·href="patterns.html">pattern·matching</a>.·Erlang·uses
155 <em>single·assignment</em>,·that·is,·a·variable·can·only·be·bound·once.</p><p>The·<em>anonymous·variable</em>·is·denoted·by·underscore·(_)·and·can·be·used·when·a155 <em>single·assignment</em>,·that·is,·a·variable·can·only·be·bound·once.</p><p>The·<em>anonymous·variable</em>·is·denoted·by·underscore·(_)·and·can·be·used·when·a
156 variable·is·required·but·its·value·can·be·ignored.</p><p><em>Example:</em></p><pre><code·class="text">[H|_]·=·[1,2,3]</code></pre><p>Variables·starting·with·underscore·(<code·class="inline">_</code>),·for·example,·<code·class="inline">_Height</code>,·are·normal156 variable·is·required·but·its·value·can·be·ignored.</p><p><em>Example:</em></p><pre><code·class="text">[H|_]·=·[1,2,3]</code></pre><p>Variables·starting·with·underscore·(<code·class="inline">_</code>),·for·example,·<code·class="inline">_Height</code>,·are·normal
157 variables,·not·anonymous.·However,·they·are·ignored·by·the·compiler·in·the·sense157 variables,·not·anonymous.·However,·they·are·ignored·by·the·compiler·in·the·sense
158 that·they·do·not·generate·warnings.</p><p><em>Example:</em></p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">member</span><span·class="p"·data-group-id="4010443141-1">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4010443141-2">[</span><span·class="p"·data-group-id="4010443141-2">]</span><span·class="p"·data-group-id="4010443141-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
159 ····</span><span·class="p"·data-group-id="4010443141-3">[</span><span·class="p"·data-group-id="4010443141-3">]</span><span·class="p">.</span></code></pre><p>can·be·rewritten·to·be·more·readable:</p><pre><code·class="makeup·erlang"·translate="no"><span·clas[·...·truncated·by·diffoscope;·len:·295,·SHA:·aa04d5e5cd42bdeb0a115a16f036dc35f0d98af1b31c1601fb75605da5805302·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">158 that·they·do·not·generate·warnings.</p><p><em>Example:</em></p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">member</span><span·class="p"·data-group-id="5497950082-1">(</span><span·class="p">_</span><span·class=[·...·truncated·by·diffoscope;·len:·183,·SHA:·8056c7d5051c503fcf73af596f6006f7e3e700acd70c80e20aeef35f9f8f1b19·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
 159 ····</span><span·class="p"·data-group-id="5497950082-3">[</span><span·class="p"·data-group-id="5497950082-3">]</span><span·class="p">.</span></code></pre><p>can·be·rewritten·to·be·more·readable:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">member</span><span·class="p"·data-group-id="1804217039-1">(</span><span·class="n">Elem</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1804217039-2">[</span><span·class="p"·data-group-id="1804217039-2">]</span><span·class="p"·data-group-id="1804217039-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ····</span><span·class="p"·data-group-id="3045354784-3">[</span><span·class="p"·data-group-id="3045354784-3">]</span><span·class="p">.</span></code></pre><p>This·causes·a·warning·for·an·unused·variable,·<code·class="inline">Elem</code>.·To·avoid·the·warning,160 ····</span><span·class="p"·data-group-id="1804217039-3">[</span><span·class="p"·data-group-id="1804217039-3">]</span><span·class="p">.</span></code></pre><p>This·causes·a·warning·for·an·unused·variable,·<code·class="inline">Elem</code>.·To·avoid·the·warning,
161 the·code·can·be·rewritten·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">member</span><span·class="p"·data-group-id="4059750527-1">(</span><span·class="p">_</span><span·class="n">Elem</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4059750527-2">[</span><span·class="p"·data-group-id="4059750527-2">]</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·6a200992eaf2f6762f276558405757fe04dc333bdad538da3f3b43de0eaaa236·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 the·code·can·be·rewritten·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">member</span><span·class="p"·data-group-id="5477105782-1">(</span><span·class="p">_</span><span·class="n">Elem</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5477105782-2">[</span><span·class="p"·data-group-id="5477105782-2">]</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·ecdc1d92a98497192bb76be47529a362c2b6e9862f5a3c79967613c9b2b501bb·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="p"·data-group-id="4059750527-3">[</span><span·class="p"·data-group-id="4059750527-3">]</span><span·class="p">.</span></code></pre><p>Notice·that·since·variables·starting·with·an·underscore·are·not·anonymous,·the162 ····</span><span·class="p"·data-group-id="5477105782-3">[</span><span·class="p"·data-group-id="5477105782-3">]</span><span·class="p">.</span></code></pre><p>Notice·that·since·variables·starting·with·an·underscore·are·not·anonymous,·the
163 following·example·matches:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7759408031-1">{</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7759408031-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="775940[·...·truncated·by·diffoscope;·len:·700,·SHA:·7c3928a086e3b0cae07d5b0e08e570db292566c7f9818098e7f703431f5b6169·...·]-2">}</span></code></pre><p>The·scope·for·a·variable·is·its·function·clause.·Variables·bound·in·a·branch·of163 following·example·matches:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6951134981-1">{</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="6951134981-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="695113[·...·truncated·by·diffoscope;·len:·700,·SHA:·13762f4710bec8c00d9cfd0dfeb059a0344ad0c47c456db4263a7d9e66560002·...·]-2">}</span></code></pre><p>The·scope·for·a·variable·is·its·function·clause.·Variables·bound·in·a·branch·of
164 an·<code·class="inline">if</code>,·<code·class="inline">case</code>,·or·<code·class="inline">receive</code>·expression·must·be·bound·in·all·branches·to·have·a164 an·<code·class="inline">if</code>,·<code·class="inline">case</code>,·or·<code·class="inline">receive</code>·expression·must·be·bound·in·all·branches·to·have·a
165 value·outside·the·expression.·Otherwise·they·are·regarded·as·unsafe·outside165 value·outside·the·expression.·Otherwise·they·are·regarded·as·unsafe·outside
166 the·expression.</p><p>For·the·<code·class="inline">try</code>·expression·variable·scoping·is·limited·so·that·variables·bound·in166 the·expression.</p><p>For·the·<code·class="inline">try</code>·expression·variable·scoping·is·limited·so·that·variables·bound·in
167 the·expression·are·always·unsafe·outside·the·expression.</p><h2·id="patterns"·class="section-heading">167 the·expression·are·always·unsafe·outside·the·expression.</p><h2·id="patterns"·class="section-heading">
168 ··<a·href="#patterns"·class="hover-link">168 ··<a·href="#patterns"·class="hover-link">
169 ····<i·class="ri-link-m"·aria-hidden="true"></i>169 ····<i·class="ri-link-m"·aria-hidden="true"></i>
170 ··</a>170 ··</a>
171 ··<span·class="text">Patterns</span>171 ··<span·class="text">Patterns</span>
172 </h2>172 </h2>
173 <p>A·pattern·has·the·same·structure·as·a·term·but·can·contain·unbound·variables.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name1</span><span·class="w">173 <p>A·pattern·has·the·same·structure·as·a·term·but·can·contain·unbound·variables.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name1</span><span·class="w">
174 </span><span·class="p"·data-group-id="5036766870-1">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="5036766870-1">]</span><span·class="w">174 </span><span·class="p"·data-group-id="0496782780-1">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="0496782780-1">]</span><span·class="w">
175 </span><span·class="p"·data-group-id="5036766870-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="5036766870-2">}</span></code></pre><p>Patterns·are·allowed·in·clause·heads,·<a·href="expressions.html#case">case·expressions</a>,175 </span><span·class="p"·data-group-id="0496782780-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="0496782780-2">}</span></code></pre><p>Patterns·are·allowed·in·clause·heads,·<a·href="expressions.html#case">case·expressions</a>,
176 <a·href="expressions.html#receive">receive·expressions</a>,·and176 <a·href="expressions.html#receive">receive·expressions</a>,·and
177 <a·href="expressions.html#the-match-operator">match·expressions</a>.</p><h3·id="the-compound-pattern-operator"·class="section-heading">177 <a·href="expressions.html#the-match-operator">match·expressions</a>.</p><h3·id="the-compound-pattern-operator"·class="section-heading">
178 ··<a·href="#the-compound-pattern-operator"·class="hover-link">178 ··<a·href="#the-compound-pattern-operator"·class="hover-link">
179 ····<i·class="ri-link-m"·aria-hidden="true"></i>179 ····<i·class="ri-link-m"·aria-hidden="true"></i>
180 ··</a>180 ··</a>
181 ··<span·class="text">The·Compound·Pattern·Operator</span>181 ··<span·class="text">The·Compound·Pattern·Operator</span>
182 </h3>182 </h3>
183 <p>If·<code·class="inline">Pattern1</code>·and·<code·class="inline">Pattern2</code>·are·valid·patterns,·the·following·is·also·a·valid183 <p>If·<code·class="inline">Pattern1</code>·and·<code·class="inline">Pattern2</code>·are·valid·patterns,·the·following·is·also·a·valid
184 pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pattern1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Pattern2</span></code></pre><p>When·matched·against·a·term,·both·<code·class="inline">Pattern1</code>·and·<code·class="inline">Pattern2</code>·are·matched·against184 pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pattern1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Pattern2</span></code></pre><p>When·matched·against·a·term,·both·<code·class="inline">Pattern1</code>·and·<code·class="inline">Pattern2</code>·are·matched·against
185 the·term.·The·idea·behind·this·feature·is·to·avoid·reconstruction·of·terms.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="0232457557-1">(</span><span·class="p"·data-group-id="0232457557-2">{</span><span·class="ss">connect</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Number</sp[·...·truncated·by·diffoscope;·len:·224,·SHA:·328a013c904f50a3554d68e01215bb63abb7bd51a7891a95d7a197f75ad08c67·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">185 the·term.·The·idea·behind·this·feature·is·to·avoid·reconstruction·of·terms.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="8669821570-1">(</span><span·class="p"·data-group-id="8669821570-2">{</span><span·class="ss">connect</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Number</sp[·...·truncated·by·diffoscope;·len:·224,·SHA:·a2adb7664e49a445d17e8f6f54a8a704b3864866c96ca242c5b821fad64af865·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
186 ····</span><span·class="n">Signal</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0232457557-3">{</span><span·class="ss">connect</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Number</span><span·class="p">,</span><span·class="n">Options</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·2a4bd576f3d74787c5d85f57d20884a86538a1dcd5a81d84e1f578f37d56bc3a·...·]-3">}</span><span·class="p">,</span><span·class="w">186 ····</span><span·class="n">Signal</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8669821570-3">{</span><span·class="ss">connect</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Number</span><span·class="p">,</span><span·class="n">Options</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·58b4f27816804a0cab992da7ae8dfc23b8855372b5e9c34ddf7b878016f8d8d9·...·]-3">}</span><span·class="p">,</span><span·class="w">
187 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">;</span><span·class="w">187 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">;</span><span·class="w">
188 </span><span·class="nf">f</span><span·class="p"·data-group-id="0232457557-4">(</span><span·class="n">Signal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">To</span><span·class="p"·data-group-id="0232457557-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 </span><span·class="nf">f</span><span·class="p"·data-group-id="8669821570-4">(</span><span·class="n">Signal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">To</span><span·class="p"·data-group-id="8669821570-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ····</span><span·class="ss">ignore</span><span·class="p">.</span></code></pre><p>can·instead·be·written·as</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="3285427285-1">(</span><span·class="p"·data-group-id="3285427285-2">{</span><span·class="ss">connect</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="p">_</span><span[·...·truncated·by·diffoscope;·len:·311,·SHA:·6951c10ce0735c325a57f2634903be9e0c460091a2415ed2f6acdfca23b76f16·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 ····</span><span·class="ss">ignore</span><span·class="p">.</span></code></pre><p>can·instead·be·written·as</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="7630105724-1">(</span><span·class="p"·data-group-id="7630105724-2">{</span><span·class="ss">connect</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="p">_</span><span[·...·truncated·by·diffoscope;·len:·311,·SHA:·6e0f98b96f61ae9b468264252a96ee79a661d3a9e86fa1bc9432ad8913083eb9·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">;</span><span·class="w">190 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">;</span><span·class="w">
191 </span><span·class="nf">f</span><span·class="p"·data-group-id="3285427285-3">(</span><span·class="n">Signal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">To</span><span·class="p"·data-group-id="3285427285-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 </span><span·class="nf">f</span><span·class="p"·data-group-id="7630105724-3">(</span><span·class="n">Signal</span><span·class="p">,</span><span·class="w">·</span><span·class="n">To</span><span·class="p"·data-group-id="7630105724-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ····</span><span·class="ss">ignore</span><span·class="p">.</span></code></pre><p>The·compound·pattern·operator·does·not·imply·that·its·operands·are·matched·in192 ····</span><span·class="ss">ignore</span><span·class="p">.</span></code></pre><p>The·compound·pattern·operator·does·not·imply·that·its·operands·are·matched·in
193 any·particular·order.·That·means·that·it·is·not·legal·to·bind·a·variable·in193 any·particular·order.·That·means·that·it·is·not·legal·to·bind·a·variable·in
194 <code·class="inline">Pattern1</code>·and·use·it·in·<code·class="inline">Pattern2</code>,·or·vice·versa.</p><h3·id="string-prefix-in-patterns"·class="section-heading">194 <code·class="inline">Pattern1</code>·and·use·it·in·<code·class="inline">Pattern2</code>,·or·vice·versa.</p><h3·id="string-prefix-in-patterns"·class="section-heading">
195 ··<a·href="#string-prefix-in-patterns"·class="hover-link">195 ··<a·href="#string-prefix-in-patterns"·class="hover-link">
196 ····<i·class="ri-link-m"·aria-hidden="true"></i>196 ····<i·class="ri-link-m"·aria-hidden="true"></i>
197 ··</a>197 ··</a>
198 ··<span·class="text">String·Prefix·in·Patterns</span>198 ··<span·class="text">String·Prefix·in·Patterns</span>
199 </h3>199 </h3>
200 <p>When·matching·strings,·the·following·is·a·valid·pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="8286933124-1">(</span><span·class="s">&quot;prefix&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">Str</span><span·class="p"·data-group-id="8286933124-1">)</span><span·class="w">·</span><span·class="p">-[·...·truncated·by·diffoscope;·len:·837,·SHA:·dde46e0596b5c32db4dbbf449a8cf36e119b61167f8a1b827778cea7ad1ee7a1·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h3·id="expressions-in-patterns"·class="section-heading">200 <p>When·matching·strings,·the·following·is·a·valid·pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="6956478811-1">(</span><span·class="s">&quot;prefix&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">Str</span><span·class="p"·data-group-id="6956478811-1">)</span><span·class="w">·</span><span·class="p">-[·...·truncated·by·diffoscope;·len:·837,·SHA:·5631a8460aef55e5f74cffc2744db1267bde6eb40786e19c3aa8766f675e049f·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h3·id="expressions-in-patterns"·class="section-heading">
201 ··<a·href="#expressions-in-patterns"·class="hover-link">201 ··<a·href="#expressions-in-patterns"·class="hover-link">
202 ····<i·class="ri-link-m"·aria-hidden="true"></i>202 ····<i·class="ri-link-m"·aria-hidden="true"></i>
203 ··</a>203 ··</a>
204 ··<span·class="text">Expressions·in·Patterns</span>204 ··<span·class="text">Expressions·in·Patterns</span>
205 </h3>205 </h3>
206 <p>An·arithmetic·expression·can·be·used·within·a·pattern·if·it·meets·both·of·the206 <p>An·arithmetic·expression·can·be·used·within·a·pattern·if·it·meets·both·of·the
207 following·two·conditions:</p><ul><li>It·uses·only·numeric·or·bitwise·operators.</li><li>Its·value·can·be·evaluated·to·a·constant·when·complied.</li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="p"·data-group-id="1243606790-1">{</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="1243606790-1">}</span><span·class="w">·</span><span·class="k">of</span><span·class="w">207 following·two·conditions:</p><ul><li>It·uses·only·numeric·or·bitwise·operators.</li><li>Its·value·can·be·evaluated·to·a·constant·when·complied.</li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="p"·data-group-id="9216789334-1">{</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="9216789334-1">}</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
208 ····</span><span·class="p"·data-group-id="1243606790-2">{</span><span·class="o">?</span><span·class="n">THRESHOLD</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p"·data-group-id="1243606790-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="the-match-operator"·class="section-heading">208 ····</span><span·class="p"·data-group-id="9216789334-2">{</span><span·class="o">?</span><span·class="n">THRESHOLD</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p"·data-group-id="9216789334-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="the-match-operator"·class="section-heading">
209 ··<a·href="#the-match-operator"·class="hover-link">209 ··<a·href="#the-match-operator"·class="hover-link">
210 ····<i·class="ri-link-m"·aria-hidden="true"></i>210 ····<i·class="ri-link-m"·aria-hidden="true"></i>
211 ··</a>211 ··</a>
212 ··<span·class="text">The·Match·Operator</span>212 ··<span·class="text">The·Match·Operator</span>
213 </h2>213 </h2>
214 <p>The·following·matches·<code·class="inline">Pattern</code>·against·<code·class="inline">Expr</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pattern</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Expr</span></code></pre><p>If·the·matching·succeeds,·any·unbound·variable·in·the·pattern·becomes·bound·and214 <p>The·following·matches·<code·class="inline">Pattern</code>·against·<code·class="inline">Expr</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pattern</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Expr</span></code></pre><p>If·the·matching·succeeds,·any·unbound·variable·in·the·pattern·becomes·bound·and
215 the·value·of·<code·class="inline">Expr</code>·is·returned.</p><p>If·multiple·match·operators·are·applied·in·sequence,·they·will·be·evaluated·from215 the·value·of·<code·class="inline">Expr</code>·is·returned.</p><p>If·multiple·match·operators·are·applied·in·sequence,·they·will·be·evaluated·from
216 right·to·left.</p><p>If·the·matching·fails,·a·<code·class="inline">badmatch</code>·run-time·error·occurs.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="1132169361-1">{</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="1132169361-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·281,·SHA:·dae67cdc30120d838e32bbbd67216962475e95facc32bf5e67c0332a9fa96c29·...·]-2">}</span><span·class="p">.</span><span·class="w">216 right·to·left.</p><p>If·the·matching·fails,·a·<code·class="inline">badmatch</code>·run-time·error·occurs.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="4291541462-1">{</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="4291541462-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·281,·SHA:·f2e1d7d6a928f1db981754cf5a1be8355eaaef416343d4454fc07c30428ab084·...·]-2">}</span><span·class="p">.</span><span·class="w">
217 </span><span·class="p"·data-group-id="1132169361-3">{</span><span·class="ss">answer</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="1132169361-3">}</span><span·class="gp·unselectable">217 </span><span·class="p"·data-group-id="4291541462-3">{</span><span·class="ss">answer</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="4291541462-3">}</span><span·class="gp·unselectable">
218 2&gt;·</span><span·class="n">A</span><span·class="p">.</span><span·class="w">218 2&gt;·</span><span·class="n">A</span><span·class="p">.</span><span·class="w">
219 </span><span·class="ss">answer</span><span·class="gp·unselectable">219 </span><span·class="ss">answer</span><span·class="gp·unselectable">
220 3&gt;·</span><span·class="n">B</span><span·class="p">.</span><span·class="w">220 3&gt;·</span><span·class="n">B</span><span·class="p">.</span><span·class="w">
221 </span><span·class="mi">42</span><span·class="gp·unselectable">221 </span><span·class="mi">42</span><span·class="gp·unselectable">
222 4&gt;·</span><span·class="n">T</span><span·class="p">.</span><span·class="w">222 4&gt;·</span><span·class="n">T</span><span·class="p">.</span><span·class="w">
223 </span><span·class="p"·data-group-id="1132169361-4">{</span><span·class="ss">answer</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="1132169361-4">}</span><span·class="gp·unselectable">223 </span><span·class="p"·data-group-id="4291541462-4">{</span><span·class="ss">answer</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="4291541462-4">}</span><span·class="gp·unselectable">
224 5&gt;·</span><span·class="p"·data-group-id="1132169361-5">{</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="1132169361-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·b5d5ab3678c7ff6943db48cdb456d9418a2927d5b7ec318ef06eeea819a698d9·...·]-6">]</span><span·class="p">.</span><span·class="w">224 5&gt;·</span><span·class="p"·data-group-id="4291541462-5">{</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="4291541462-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·d846d5bfebc0692342f5d4f20558f0ef58a7894d2ae9781278fc92cfeaca8088·...·]-6">]</span><span·class="p">.</span><span·class="w">
225 </span><span·class="gt">**·exception·error:·no·match·of·right-hand·side·value·[1,2]</span></code></pre><p>Because·multiple·match·operators·are·evaluated·from·right·to·left,·it·means225 </span><span·class="gt">**·exception·error:·no·match·of·right-hand·side·value·[1,2]</span></code></pre><p>Because·multiple·match·operators·are·evaluated·from·right·to·left,·it·means
226 that:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pattern1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Pattern2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="w">·</span><span·class="p">.</span><span·class="w">·</span><span·class="p">.</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PatternN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Expression</span></code></pre><p>is·equivalent·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Temporary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Expression</span><span·class="p">,</span><span·class="w">226 that:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pattern1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Pattern2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="w">·</span><span·class="p">.</span><span·class="w">·</span><span·class="p">.</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PatternN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Expression</span></code></pre><p>is·equivalent·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Temporary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Expression</span><span·class="p">,</span><span·class="w">
227 </span><span·class="n">PatternN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Temporary</span><span·class="p">,</span><span·class="w">227 </span><span·class="n">PatternN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Temporary</span><span·class="p">,</span><span·class="w">
228 ···</span><span·class="p">.</span><span·class="w">228 ···</span><span·class="p">.</span><span·class="w">
229 ···</span><span·class="p">.</span><span·class="w">229 ···</span><span·class="p">.</span><span·class="w">
230 ···</span><span·class="p">.</span><span·class="p">,</span><span·class="w">230 ···</span><span·class="p">.</span><span·class="p">,</span><span·class="w">
231 </span><span·class="n">Pattern2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Temporary</span><span·class="p">,</span><span·class="w">231 </span><span·class="n">Pattern2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Temporary</span><span·class="p">,</span><span·class="w">
Offset 239, 28 lines modifiedOffset 239, 28 lines modified
239 can·safely·be·skipped·on·a·first·reading.</p></blockquote><p>The·<code·class="inline">=</code>·character·is·used·to·denote·two·similar·but·distinct·operators:·the239 can·safely·be·skipped·on·a·first·reading.</p></blockquote><p>The·<code·class="inline">=</code>·character·is·used·to·denote·two·similar·but·distinct·operators:·the
240 match·operator·and·the·compound·pattern·operator.·Which·one·is·meant·is240 match·operator·and·the·compound·pattern·operator.·Which·one·is·meant·is
241 determined·by·context.</p><p>The·<em>compound·pattern·operator</em>·is·used·to·construct·a·compound·pattern·from·two241 determined·by·context.</p><p>The·<em>compound·pattern·operator</em>·is·used·to·construct·a·compound·pattern·from·two
242 patterns.·Compound·patterns·are·accepted·everywhere·a·pattern·is·accepted.·A242 patterns.·Compound·patterns·are·accepted·everywhere·a·pattern·is·accepted.·A
243 compound·pattern·matches·if·all·of·its·constituent·patterns·match.·It·is·not243 compound·pattern·matches·if·all·of·its·constituent·patterns·match.·It·is·not
244 legal·for·a·pattern·that·is·part·of·a·compound·pattern·to·use·variables·(as·keys244 legal·for·a·pattern·that·is·part·of·a·compound·pattern·to·use·variables·(as·keys
245 in·map·patterns·or·sizes·in·binary·patterns)·bound·in·other·sub·patterns·of·the245 in·map·patterns·or·sizes·in·binary·patterns)·bound·in·other·sub·patterns·of·the
246 same·compound·pattern.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2859113705-1">(</span><span·class="p"·data-group-id="2859113705-2">#{</span><span·class="n">Key</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="2859113705-2">}</span>[·...·truncated·by·diffoscope;·len:·346,·SHA:·0e40499b32c0ea04a3169aa4a80c9ddb7f6c81e99f2c4a749fc86444a922ded9·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">246 same·compound·pattern.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5553939436-1">(</span><span·class="p"·data-group-id="5553939436-2">#{</span><span·class="n">Key</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="5553939436-2">}</span>[·...·truncated·by·diffoscope;·len:·346,·SHA:·fab048ddfc00c435428123578804d3bc5c40888a814eae2d0768e9a14cea9f4b·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
247 </span><span·class="gt">*·1:7:·variable·&#39;Key&#39;·is·unbound</span><span·class="gp·unselectable">247 </span><span·class="gt">*·1:7:·variable·&#39;Key&#39;·is·unbound</span><span·class="gp·unselectable">
248 2&gt;·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2859113705-4">(</span><span·class="p"·data-group-id="2859113705-5">{</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="2859113705-5">}</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·887,·SHA:·cff890574e510d4dd28de41e2b6a359090a1584bf1b923aa8ca31d839f9f9cf5·...·]-7">)</span><span·class="p">.</span><span·class="w">248 2&gt;·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5553939436-4">(</span><span·class="p"·data-group-id="5553939436-5">{</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="5553939436-5">}</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·887,·SHA:·669142008817503ce4d9b53bbff9c1c1570a2fabd2dda50dbf8052349c1511ce·...·]-7">)</span><span·class="p">.</span><span·class="w">
249 </span><span·class="p"·data-group-id="2859113705-9">{</span><span·class="p"·data-group-id="2859113705-10">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2859113705-10">}</span><span·class="p">,</span><span·class="mi">3</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·1db9e002b936e6468a95fb0e64742d475b1d3c364d94d39955a3fcb781dbf5b2·...·]-9">}</span><span·class="gp·unselectable">249 </span><span·class="p"·data-group-id="5553939436-9">{</span><span·class="p"·data-group-id="5553939436-10">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5553939436-10">}</span><span·class="p">,</span><span·class="mi">3</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·b668c08ff74dc7baf687a4577c153580ec536b0442297619c90a1e98e7664f22·...·]-9">}</span><span·class="gp·unselectable">
250 3&gt;·</span><span·class="n">G</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2859113705-11">(</span><span·class="p">&lt;&lt;</span><span·class="n">A</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">B</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span><[·...·truncated·by·diffoscope;·len:·968,·SHA:·cce7cfdc098ab12354fcf2babc675266766b9fe2d0d6a3757352f9d800f0212b·...·]-13">)</span><span·class="p">.</span><span·class="w">250 3&gt;·</span><span·class="n">G</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5553939436-11">(</span><span·class="p">&lt;&lt;</span><span·class="n">A</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">,</span><span·class="n">B</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span><[·...·truncated·by·diffoscope;·len:·968,·SHA:·221682886e2fcffed09009e76930dfafbce4ad271e6e2c8457de1ea8bab57079·...·]-13">)</span><span·class="p">.</span><span·class="w">
251 </span><span·class="p"·data-group-id="2859113705-14">{</span><span·class="mi">42</span><span·class="p">,</span><span·class="mi">43</span><span·class="p">,</span><span·class="mi">10795</span><span·class="p"·data-group-id="2859113705-14">}</span></code></pre><p>The·<em>match·operator</em>·is·allowed·everywhere·an·expression·is·allowed.·It·is·used251 </span><span·class="p"·data-group-id="5553939436-14">{</span><span·class="mi">42</span><span·class="p">,</span><span·class="mi">43</span><span·class="p">,</span><span·class="mi">10795</span><span·class="p"·data-group-id="5553939436-14">}</span></code></pre><p>The·<em>match·operator</em>·is·allowed·everywhere·an·expression·is·allowed.·It·is·used
252 to·match·the·value·of·an·expression·to·a·pattern.·If·multiple·match·operators252 to·match·the·value·of·an·expression·to·a·pattern.·If·multiple·match·operators
253 are·applied·in·sequence,·they·will·be·evaluated·from·right·to·left.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6615290930-1">#{</span><span·class="ss">key</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">key2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">key2</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·120,·SHA:·813db35a996dcd7a0571d56e440d8f0fa27a2fcf51eb95024fa034d7277dea48·...·]-1">}</span><span·class="p">.</span><span·class="w">253 are·applied·in·sequence,·they·will·be·evaluated·from·right·to·left.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5356870817-1">#{</span><span·class="ss">key</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">key2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">key2</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·120,·SHA:·0193c1eeb5c68840ba51fe809914bffeaf6939e2a4632b5d26aece9ff4c369c2·...·]-1">}</span><span·class="p">.</span><span·class="w">
254 </span><span·class="p"·data-group-id="6615290930-2">#{</span><span·class="ss">key</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">key2</span><span·class="p">,</span><span·class="ss">key2</span><span·class="w">·</span><span·class="p">=&gt;</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·a5f6bd4afb3c477866d08e61edcc875a676c0200bb4f4f41406af0a656da057d·...·]-2">}</span><span·class="gp·unselectable">254 </span><span·class="p"·data-group-id="5356870817-2">#{</span><span·class="ss">key</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">key2</span><span·class="p">,</span><span·class="ss">key2</span><span·class="w">·</span><span·class="p">=&gt;</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·513df97ad7bfc7d7c98f4c361882117c9ec672925b662c110ba8234ad3acec03·...·]-2">}</span><span·class="gp·unselectable">
255 2&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="6615290930-3">(</span><span·class="n">Key</span><span·class="p"·data-group-id="6615290930-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6615290930-4">#{</span><span·class="n">Key</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·420,·SHA:·219fc23f209b25c0453891d43469c30b371bbdf4a00f807f0d5edb9836a8bf9b·...·]-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">.</span><span·class="w">255 2&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="5356870817-3">(</span><span·class="n">Key</span><span·class="p"·data-group-id="5356870817-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5356870817-4">#{</span><span·class="n">Key</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·420,·SHA:·6866b7ffa2eff04c8fa08dfe3296215e400311c322b441790496fa1f69423010·...·]-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">.</span><span·class="w">
256 </span><span·class="ss">value</span><span·class="gp·unselectable">256 </span><span·class="ss">value</span><span·class="gp·unselectable">
257 3&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="6615290930-6">(</span><span·class="n">Key</span><span·class="p"·data-group-id="6615290930-6">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6615290930-7">#{</span><span·class="n">Key</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·622,·SHA:·fb631843cd5518fa5ee1caebbe4bcf572083027b25a86bdaba99896e0f837b58·...·]-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">.</span><span·class="w">257 3&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="5356870817-6">(</span><span·class="n">Key</span><span·class="p"·data-group-id="5356870817-6">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5356870817-7">#{</span><span·class="n">Key</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·622,·SHA:·ce272c76a8c3f1631e5af9c2a32e305a919360c98897a022e572551463cb109a·...·]-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">.</span><span·class="w">
258 </span><span·class="ss">value</span><span·class="gp·unselectable">258 </span><span·class="ss">value</span><span·class="gp·unselectable">
259 4&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="6615290930-10">(</span><span·class="n">Key</span><span·class="p"·data-group-id="6615290930-10">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6615290930-11">(</span><span·class="p"·data-group-id="6615290930-12">#{</s[·...·truncated·by·diffoscope;·len:·533,·SHA:·2012ea251ef06d920919dc77d6cd2f51c04e127271725d3a3f68888cb7ef52fc·...·]-11">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">.</span><span·class="w">259 4&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="5356870817-10">(</span><span·class="n">Key</span><span·class="p"·data-group-id="5356870817-10">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5356870817-11">(</span><span·class="p"·data-group-id="5356870817-12">#{</s[·...·truncated·by·diffoscope;·len:·533,·SHA:·c4d5d46736e86b9d94bf39946d3a06a7576e70991316249594eb320051373217·...·]-11">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">.</span><span·class="w">
260 </span><span·class="gt">*·1:12:·variable·&#39;Key&#39;·is·unbound</span><span·class="gp·unselectable">260 </span><span·class="gt">*·1:12:·variable·&#39;Key&#39;·is·unbound</span><span·class="gp·unselectable">
261 5&gt;·</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="n">Y</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">begin</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">42</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p">.</span><span·class="w">261 5&gt;·</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="n">Y</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">begin</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">8</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">42</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p">.</span><span·class="w">
262 </span><span·class="mi">42</span></code></pre><p>The·expression·at·prompt·<code·class="inline">2&gt;</code>·first·matches·the·value·of·variable·<code·class="inline">M</code>·against262 </span><span·class="mi">42</span></code></pre><p>The·expression·at·prompt·<code·class="inline">2&gt;</code>·first·matches·the·value·of·variable·<code·class="inline">M</code>·against
263 pattern·<code·class="inline">#{key·:=·Key}</code>,·binding·variable·<code·class="inline">Key</code>.·It·then·matches·the·value·of263 pattern·<code·class="inline">#{key·:=·Key}</code>,·binding·variable·<code·class="inline">Key</code>.·It·then·matches·the·value·of
264 <code·class="inline">M</code>·against·pattern·<code·class="inline">#{Key·:=·Value}</code>·using·variable·<code·class="inline">Key</code>·as·the·key,·binding264 <code·class="inline">M</code>·against·pattern·<code·class="inline">#{Key·:=·Value}</code>·using·variable·<code·class="inline">Key</code>·as·the·key,·binding
265 variable·<code·class="inline">Value</code>.</p><p>The·expression·at·prompt·<code·class="inline">3&gt;</code>·matches·expression·<code·class="inline">(#{key·:=·Key}·=·M)</code>·against265 variable·<code·class="inline">Value</code>.</p><p>The·expression·at·prompt·<code·class="inline">3&gt;</code>·matches·expression·<code·class="inline">(#{key·:=·Key}·=·M)</code>·against
266 pattern·<code·class="inline">#{Key·:=·Value}</code>.·The·expression·inside·the·parentheses·is·evaluated266 pattern·<code·class="inline">#{Key·:=·Value}</code>.·The·expression·inside·the·parentheses·is·evaluated
Offset 276, 30 lines modifiedOffset 276, 30 lines modified
276 binding·variable·<code·class="inline">Y</code>·and·creating·a·binary.·The·binary·is·then·matched·against276 binding·variable·<code·class="inline">Y</code>·and·creating·a·binary.·The·binary·is·then·matched·against
277 pattern·<code·class="inline">&lt;&lt;X:Y&gt;&gt;</code>·using·the·value·of·<code·class="inline">Y</code>·as·the·size·of·the·segment.</p><h2·id="function-calls"·class="section-heading">277 pattern·<code·class="inline">&lt;&lt;X:Y&gt;&gt;</code>·using·the·value·of·<code·class="inline">Y</code>·as·the·size·of·the·segment.</p><h2·id="function-calls"·class="section-heading">
278 ··<a·href="#function-calls"·class="hover-link">278 ··<a·href="#function-calls"·class="hover-link">
279 ····<i·class="ri-link-m"·aria-hidden="true"></i>279 ····<i·class="ri-link-m"·aria-hidden="true"></i>
280 ··</a>280 ··</a>
281 ··<span·class="text">Function·Calls</span>281 ··<span·class="text">Function·Calls</span>
282 </h2>282 </h2>
283 <pre><code·class="makeup·erlang"·translate="no"><span·class="n">ExprF</span><span·class="p"·data-group-id="5855068825-1">(</span><span·class="n">Expr1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">ExprN</span><span·class="p"·data-group-id="5855068825-1">)</span><span·class="w">283 <pre><code·class="makeup·erlang"·translate="no"><span·class="n">ExprF</span><span·class="p"·data-group-id="6037396822-1">(</span><span·class="n">Expr1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">ExprN</span><span·class="p"·data-group-id="6037396822-1">)</span><span·class="w">
284 </span><span·class="n">ExprM</span><span·class="p">:</span><span·class="n">ExprF</span><span·class="p"·data-group-id="5855068825-2">(</span><span·class="n">Expr1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">ExprN</span><span·class="p"·data-group-id="5855068825-2">)</span></code></pre><p>In·the·first·form·of·function·calls,·<code·class="inline">ExprM:ExprF(Expr1,...,ExprN)</code>,·each·of284 </span><span·class="n">ExprM</span><span·class="p">:</span><span·class="n">ExprF</span><span·class="p"·data-group-id="6037396822-2">(</span><span·class="n">Expr1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">ExprN</span><span·class="p"·data-group-id="6037396822-2">)</span></code></pre><p>In·the·first·form·of·function·calls,·<code·class="inline">ExprM:ExprF(Expr1,...,ExprN)</code>,·each·of
285 <code·class="inline">ExprM</code>·and·<code·class="inline">ExprF</code>·must·be·an·atom·or·an·expression·that·evaluates·to·an·atom.285 <code·class="inline">ExprM</code>·and·<code·class="inline">ExprF</code>·must·be·an·atom·or·an·expression·that·evaluates·to·an·atom.
286 The·function·is·said·to·be·called·by·using·the·<em>fully·qualified·function·name</em>.286 The·function·is·said·to·be·called·by·using·the·<em>fully·qualified·function·name</em>.
287 This·is·often·referred·to·as·a·<em>remote</em>·or·<em>external·function·call</em>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="4034279547-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="4034279547-1">)</span></code></pre><p>In·the·second·form·of·function·calls,·<code·class="inline">ExprF(Expr1,...,ExprN)</code>,·<code·class="inline">ExprF</code>·must·be287 This·is·often·referred·to·as·a·<em>remote</em>·or·<em>external·function·call</em>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="9102511356-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="9102511356-1">)</span></code></pre><p>In·the·second·form·of·function·calls,·<code·class="inline">ExprF(Expr1,...,ExprN)</code>,·<code·class="inline">ExprF</code>·must·be
288 an·atom·or·evaluate·to·a·fun.</p><p>If·<code·class="inline">ExprF</code>·is·an·atom,·the·function·is·said·to·be·called·by·using·the288 an·atom·or·evaluate·to·a·fun.</p><p>If·<code·class="inline">ExprF</code>·is·an·atom,·the·function·is·said·to·be·called·by·using·the
289 <em>implicitly·qualified·function·name</em>.·If·the·function·<code·class="inline">ExprF</code>·is·locally289 <em>implicitly·qualified·function·name</em>.·If·the·function·<code·class="inline">ExprF</code>·is·locally
290 defined,·it·is·called.·Alternatively,·if·<code·class="inline">ExprF</code>·is·explicitly·imported·from·the290 defined,·it·is·called.·Alternatively,·if·<code·class="inline">ExprF</code>·is·explicitly·imported·from·the
Max diff block lines reached; 253945/306770 bytes (82.78%) of diff not shown.
214 KB
./usr/share/doc/erlang-doc/html/doc/system/funs.html
    
Offset 117, 402 lines modifiedOffset 117, 402 lines modified
  
117 <h2·id="map"·class="section-heading">117 <h2·id="map"·class="section-heading">
118 ··<a·href="#map"·class="hover-link">118 ··<a·href="#map"·class="hover-link">
119 ····<i·class="ri-link-m"·aria-hidden="true"></i>119 ····<i·class="ri-link-m"·aria-hidden="true"></i>
120 ··</a>120 ··</a>
121 ··<span·class="text">map</span>121 ··<span·class="text">map</span>
122 </h2>122 </h2>
123 <p>The·following·function,·<code·class="inline">double</code>,·doubles·every·element·in·a·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">double</span><span·class="p"·data-group-id="3801252100-1">(</span><span·class="p"·data-group-id="3801252100-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="3801252100-2">]</span><span·class="p"·data-group-id="3801252100-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3801252100-3">[</span><span·class="mi">2</span><span·class="o">*</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">double</span><span·class="p"·data-group-id="3801252100-4">(</span><span·class="n">T</span><span·class="p"·data-group-id="3801252100-4">)</span><span·class="p"·data-group-id="3801252100-3">]</span><span·class="p">;</span><span·class="w"> 
124 </span><span·class="nf">double</span><span·class="p"·data-group-id="3801252100-5">(</span><span·class="p"·data-group-id="3801252100-6">[</span><span·class="p"·data-group-id="3801252100-6">]</span><span·class="p"·data-group-id="3801252100-5">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3801252100-7">[</span><span·class="p"·data-group-id="3801252100-7">]</span><span·class="p">.</span></code></pre><p>Hence,·the·argument·entered·as·input·is·doubled·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">double</span><span·class="p"·data-group-id="0415819855-1">(</span><span·class="p"·data-group-id="0415819855-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="0415819855-2">]</span><span·class="p"·data-group-id="0415819855-1">)</span><span·class="p">.</span><span·class="w"> 
125 </span><span·class="p"·data-group-id="0415819855-3">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·936,·SHA:·a64b948ee0ac52a10976509a2f95935083cf5e782f9231270e5ca0f24ed8c5f2·...·]-3">]</span><span·class="p">;</span><span·class="w">123 <p>The·following·function,·<code·class="inline">double</code>,·doubles·every·element·in·a·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">double</span><span·class="p"·data-group-id="8611752660-1">(</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·631,·SHA:·89c4bc592d69f77d38494aee7ff83f85464bbd0f8b3130e6ad2ade12471a67a9·...·]-3">]</span><span·class="p">;</span><span·class="w">
 124 </span><span·class="nf">double</span><span·class="p"·data-group-id="8611752660-5">(</span><span·class="p"·data-group-id="8611752660-6">[</span><span·class="p"·data-group-id="8611752660-6">]</span><span·class="p"·data-group-id="8611752660-5">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8611752660-7">[</span><span·class="p"·data-group-id="8611752660-7">]</span><span·class="p">.</span></code></pre><p>Hence,·the·argument·entered·as·input·is·doubled·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">double</span><span·class="p"·data-group-id="0026004083-1">(</span><span·class="p"·data-group-id="0026004083-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="0026004083-2">]</span><span·class="p"·data-group-id="0026004083-1">)</span><span·class="p">.</span><span·class="w">
 125 </span><span·class="p"·data-group-id="0026004083-3">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="0026004083-3">]</span></code></pre><p>The·following·function,·<code·class="inline">add_one</code>,·adds·one·to·every·element·in·a·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">add_one</span><span·class="p"·data-group-id="9760123922-1">(</span><span·class="p"·data-group-id="9760123922-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="9760123922-2">]</span><span·class="p"·data-group-id="9760123922-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9760123922-3">[</span><span·class="n">H</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">|</span><span·class="nf">add_one</span><span·class="p"·data-group-id="9760123922-4">(</span><span·class="n">T</span><span·class="p"·data-group-id="9760123922-4">)</span><span·class="p"·data-group-id="9760123922-3">]</span><span·class="p">;</span><span·class="w">
126 </span><span·class="nf">add_one</span><span·class="p"·data-group-id="2959792272-5">(</span><span·class="p"·data-group-id="2959792272-6">[</span><span·class="p"·data-group-id="2959792272-6">]</span><span·class="p"·data-group-id="2959792272-5">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·97,·SHA:·6cf70e1e18aa8c2a5805bdf2b4ff3e22eac4ce058903b64140b31d9bd800a860·...·]2-7">]</span><span·class="p">.</span></code></pre><p>The·functions·<code·class="inline">double</code>·and·<code·class="inline">add_one</code>·have·a·similar·structure.·This·can·be·used126 </span><span·class="nf">add_one</span><span·class="p"·data-group-id="9760123922-5">(</span><span·class="p"·data-group-id="9760123922-6">[</span><span·class="p"·data-group-id="9760123922-6">]</span><span·class="p"·data-group-id="9760123922-5">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·97,·SHA:·405bbb53a64be316a75c1d68fd8dd8e0a5bb36dcac4c21eddb020e359634d100·...·]2-7">]</span><span·class="p">.</span></code></pre><p>The·functions·<code·class="inline">double</code>·and·<code·class="inline">add_one</code>·have·a·similar·structure.·This·can·be·used
127 by·writing·a·function·<code·class="inline">map</code>·that·expresses·this·similarity:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">map</span><span·class="p"·data-group-id="1792704755-1">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1792704755-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="179270[·...·truncated·by·diffoscope;·len:·646,·SHA:·41c267c0c259f73792d689f20b74f947f142a782b182701e3a665f52c3f18867·...·]-3">]</span><span·class="p">;</span><span·class="w">127 by·writing·a·function·<code·class="inline">map</code>·that·expresses·this·similarity:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">map</span><span·class="p"·data-group-id="3878161772-1">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3878161772-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="387816[·...·truncated·by·diffoscope;·len:·646,·SHA:·89e732ad4c50d111e605ddf25b4490387c807c705c9dc36b6759750f809d300c·...·]-3">]</span><span·class="p">;</span><span·class="w">
128 </span><span·class="nf">map</span><span·class="p"·data-group-id="1792704755-6">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1792704755-7">[</span><span·class="p"·data-group-id="1792704755-7">]</span><span·class="p"·data-group-id="1792704755-6">)</span><sp[·...·truncated·by·diffoscope;·len:·170,·SHA:·eedf7667c717f76e57b8e61f5ebad8d0641f9e096180712fa202a8ceaa627732·...·]-8">]</span><span·class="p">.</span></code></pre><p>The·functions·<code·class="inline">double</code>·and·<code·class="inline">add_one</code>·can·now·be·expressed·in·terms·of·<code·class="inline">map</code>·as128 </span><span·class="nf">map</span><span·class="p"·data-group-id="3878161772-6">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3878161772-7">[</span><span·class="p"·data-group-id="3878161772-7">]</span><span·class="p"·data-group-id="3878161772-6">)</span><sp[·...·truncated·by·diffoscope;·len:·170,·SHA:·18d09d342897f32c6fd8dd1a6b7842b7f91efeb9f67593dc3a2e450ed0065c07·...·]-8">]</span><span·class="p">.</span></code></pre><p>The·functions·<code·class="inline">double</code>·and·<code·class="inline">add_one</code>·can·now·be·expressed·in·terms·of·<code·class="inline">map</code>·as
129 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">double</span><span·class="p"·data-group-id="8874021139-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="8874021139-1">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="8874021139-2">(</span>[·...·truncated·by·diffoscope;·len:·469,·SHA:·aa33f373100c2b672b29b5237cf4ead70d760e2fecbc2f9b7780b0bc81fff2f5·...·]-2">)</span><span·class="p">.</span><span·class="w">129 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">double</span><span·class="p"·data-group-id="9268425076-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="9268425076-1">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="9268425076-2">(</span>[·...·truncated·by·diffoscope;·len:·469,·SHA:·ec4d11f43efaf04d8ea7c8e4d9160cc60bd76d62b2434547f24130137281638c·...·]-2">)</span><span·class="p">.</span><span·class="w">
130 </span><span·class="nf">add_one</span><span·class="p"·data-group-id="8874021139-4">(</span><span·class="n">L</span><span·class="p"·data-group-id="8874021139-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="8874021139-5">(</span><[·...·truncated·by·diffoscope;·len:·516,·SHA:·92529fd677e1f7cc6e5dc5cea402971af1c3e8ee1651f342360a596117d08905·...·]-5">)</span><span·class="p">.</span></code></pre><p><code·class="inline">map(F,·List)</code>·is·a·function·that·takes·a·function·<code·class="inline">F</code>·and·a·list·<code·class="inline">L</code>·as130 </span><span·class="nf">add_one</span><span·class="p"·data-group-id="9268425076-4">(</span><span·class="n">L</span><span·class="p"·data-group-id="9268425076-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="9268425076-5">(</span><[·...·truncated·by·diffoscope;·len:·516,·SHA:·2ea7ea219fb2f4dbd09453d8aa55ec4cb442723a0d412c79f237e23fca0cbb5a·...·]-5">)</span><span·class="p">.</span></code></pre><p><code·class="inline">map(F,·List)</code>·is·a·function·that·takes·a·function·<code·class="inline">F</code>·and·a·list·<code·class="inline">L</code>·as
131 arguments·and·returns·a·new·list,·obtained·by·applying·<code·class="inline">F</code>·to·each·of·the131 arguments·and·returns·a·new·list,·obtained·by·applying·<code·class="inline">F</code>·to·each·of·the
132 elements·in·<code·class="inline">L</code>.</p><p>The·process·of·abstracting·out·the·common·features·of·a·number·of·different132 elements·in·<code·class="inline">L</code>.</p><p>The·process·of·abstracting·out·the·common·features·of·a·number·of·different
133 programs·is·called·<em>procedural·abstraction</em>.·Procedural·abstraction·can·be·used133 programs·is·called·<em>procedural·abstraction</em>.·Procedural·abstraction·can·be·used
134 to·write·several·different·functions·that·have·a·similar·structure,·but·differ134 to·write·several·different·functions·that·have·a·similar·structure,·but·differ
135 in·some·minor·detail.·This·is·done·as·follows:</p><ol><li><em>Step·1.</em>·Write·one·function·that·represents·the·common·features·of·these135 in·some·minor·detail.·This·is·done·as·follows:</p><ol><li><em>Step·1.</em>·Write·one·function·that·represents·the·common·features·of·these
136 functions.</li><li><em>Step·2.</em>·Parameterize·the·difference·in·terms·of·functions·that·are·passed136 functions.</li><li><em>Step·2.</em>·Parameterize·the·difference·in·terms·of·functions·that·are·passed
137 as·arguments·to·the·common·function.</li></ol><h2·id="foreach"·class="section-heading">137 as·arguments·to·the·common·function.</li></ol><h2·id="foreach"·class="section-heading">
138 ··<a·href="#foreach"·class="hover-link">138 ··<a·href="#foreach"·class="hover-link">
139 ····<i·class="ri-link-m"·aria-hidden="true"></i>139 ····<i·class="ri-link-m"·aria-hidden="true"></i>
140 ··</a>140 ··</a>
141 ··<span·class="text">foreach</span>141 ··<span·class="text">foreach</span>
142 </h2>142 </h2>
143 <p>This·section·illustrates·procedural·abstraction.·Initially,·the·following·two143 <p>This·section·illustrates·procedural·abstraction.·Initially,·the·following·two
144 examples·are·written·as·conventional·functions.</p><p>This·function·prints·all·elements·of·a·list·onto·a·stream:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">print_list</span><span·class="p"·data-group-id="0769660467-1">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0769660467-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="0[·...·truncated·by·diffoscope;·len:·62,·SHA:·e802ca9ccd4df43f3439c0e5b1aaba5e1eb85125a661687854a036e00150bafb·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">144 examples·are·written·as·conventional·functions.</p><p>This·function·prints·all·elements·of·a·list·onto·a·stream:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">print_list</span><span·class="p"·data-group-id="5909244193-1">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5909244193-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="5[·...·truncated·by·diffoscope;·len:·62,·SHA:·5014ed322f8a51ac5d8616d98d2930e9fc785ac69df1eee7979710d0736a1ea2·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
145 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0769660467-3">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·172,·SHA:·1de07be7d9df73da5d30799a30ecf555399b591b969052d6bfd6a2c58d993e63·...·]-3">)</span><span·class="p">,</span><span·class="w">145 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5909244193-3">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·172,·SHA:·affd5305a32be1ee6f06c814e87755502119e5087e9c40e07182497adc88cda2·...·]-3">)</span><span·class="p">,</span><span·class="w">
146 ····</span><span·class="nf">print_list</span><span·class="p"·data-group-id="0769660467-5">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="0769660467-5">)</span><span·class="p">;</span><span·class="w">146 ····</span><span·class="nf">print_list</span><span·class="p"·data-group-id="5909244193-5">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="5909244193-5">)</span><span·class="p">;</span><span·class="w">
147 </span><span·class="nf">print_list</span><span·class="p"·data-group-id="0769660467-6">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0769660467-7">[</span><span·class="p"·data-group-id="0769660467-7">]</span><span·class="p"·data-group-id="0769660467-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">147 </span><span·class="nf">print_list</span><span·class="p"·data-group-id="5909244193-6">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5909244193-7">[</span><span·class="p"·data-group-id="5909244193-7">]</span><span·class="p"·data-group-id="5909244193-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
148 ····</span><span·class="ss">true</span><span·class="p">.</span></code></pre><p>This·function·broadcasts·a·message·to·a·list·of·processes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">broadcast</span><span·class="p"·data-group-id="6828826722-1">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6828826722-2">[</span><span·class="n">Pid</span><span·class="p">|</span><span·class="n">Pids</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·808ddb62693fbc8586252e14fff7c7f8bb94bb4fb43100a774417aeb5fae8346·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">148 ····</span><span·class="ss">true</span><span·class="p">.</span></code></pre><p>This·function·broadcasts·a·message·to·a·list·of·processes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">broadcast</span><span·class="p"·data-group-id="6625005666-1">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6625005666-2">[</span><span·class="n">Pid</span><span·class="p">|</span><span·class="n">Pids</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·49bcd9371430f42d878b06550444e46441d6e469a8d060ecdf41a7a608ed34e7·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
149 ····</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">149 ····</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">
150 ····</span><span·class="nf">broadcast</span><span·class="p"·data-group-id="6828826722-3">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pids</span><span·class="p"·data-group-id="6828826722-3">)</span><span·class="p">;</span><span·class="w">150 ····</span><span·class="nf">broadcast</span><span·class="p"·data-group-id="6625005666-3">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pids</span><span·class="p"·data-group-id="6625005666-3">)</span><span·class="p">;</span><span·class="w">
151 </span><span·class="nf">broadcast</span><span·class="p"·data-group-id="6828826722-4">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6828826722-5">[</span><span·class="p"·data-group-id="6828826722-5">]</span><span·class="p"·data-group-id="6828826722-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">151 </span><span·class="nf">broadcast</span><span·class="p"·data-group-id="6625005666-4">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6625005666-5">[</span><span·class="p"·data-group-id="6625005666-5">]</span><span·class="p"·data-group-id="6625005666-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
152 ····</span><span·class="ss">true</span><span·class="p">.</span></code></pre><p>These·two·functions·have·a·similar·structure.·They·both·iterate·over·a·list·and152 ····</span><span·class="ss">true</span><span·class="p">.</span></code></pre><p>These·two·functions·have·a·similar·structure.·They·both·iterate·over·a·list·and
153 do·something·to·each·element·in·the·list.·The·&quot;something&quot;·is·passed·on·as·an153 do·something·to·each·element·in·the·list.·The·&quot;something&quot;·is·passed·on·as·an
154 extra·argument·to·the·function·that·does·this.</p><p>The·function·<code·class="inline">foreach</code>·expresses·this·similarity:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foreach</span><span·class="p"·data-group-id="5759686202-1">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5759686202-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="575968[·...·truncated·by·diffoscope;·len:·57,·SHA:·f745483b1340d4be0ac588ff064d0093ffc1a8bfb0c5486c6b6fd81c675683a8·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">154 extra·argument·to·the·function·that·does·this.</p><p>The·function·<code·class="inline">foreach</code>·expresses·this·similarity:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foreach</span><span·class="p"·data-group-id="0650950783-1">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0650950783-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="065095[·...·truncated·by·diffoscope;·len:·57,·SHA:·b8e44790155494efbe63fcaf11e2821ecff76c99a1ed0c1179cc649640f306f2·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
155 ····</span><span·class="n">F</span><span·class="p"·data-group-id="5759686202-3">(</span><span·class="n">H</span><span·class="p"·data-group-id="5759686202-3">)</span><span·class="p">,</span><span·class="w">155 ····</span><span·class="n">F</span><span·class="p"·data-group-id="0650950783-3">(</span><span·class="n">H</span><span·class="p"·data-group-id="0650950783-3">)</span><span·class="p">,</span><span·class="w">
156 ····</span><span·class="nf">foreach</span><span·class="p"·data-group-id="5759686202-4">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="5759686202-4">)</span><span·class="p">;</span><span·class="w">156 ····</span><span·class="nf">foreach</span><span·class="p"·data-group-id="0650950783-4">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="0650950783-4">)</span><span·class="p">;</span><span·class="w">
157 </span><span·class="nf">foreach</span><span·class="p"·data-group-id="5759686202-5">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5759686202-6">[</span><span·class="p"·data-group-id="5759686202-6">]</span><span·class="p"·data-group-id="5759686202-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
158 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>Using·the·function·<code·class="inline">foreach</code>,·the·function·<code·class="inline">print_list</code>·becomes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class[·...·truncated·by·diffoscope;·len:·1948,·SHA:·36722846f9d04373862667166c9190a5d2d91bf7ddaa220dc3b648a080a59c3c·...·]>157 </span><span·class="nf">foreach</span><span·class="p"·data-group-id="0650950783-5">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0650950783-6">[</span><span·class="p"·data-group-id="065095078[·...·truncated·by·diffoscope;·len:·133,·SHA:·f1d7dd3bf4569078783218c043272e4ea3497453dbbce830ccc5f53c43cb86bb·...·]>
 158 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>Using·the·function·<code·class="inline">foreach</code>,·the·function·<code·class="inline">print_list</code>·becomes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foreach</span><span·class="p"·data-group-id="1686330918-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1686330918-2">(</span><span·class="n">H</span><span·class="p"·data-group-id="1686330918-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1686330918-3">(</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1686330918-4">[</span><span·class="n">H</span><span·class="p"·data-group-id="1686330918-4">]</span><span·class="p"·data-group-id="1686330918-3">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="1686330918-1">)</span></code></pre><p>Using·the·function·<code·class="inline">foreach</code>,·the·function·<code·class="inline">broadcast</code>·becomes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foreach</span><span·class="p"·data-group-id="9612521338-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="9612521338-2">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="9612521338-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="9612521338-1">)</span></code></pre><p><code·class="inline">foreach</code>·is·evaluated·for·its·side-effect·and·not·its·value.·<code·class="inline">foreach(Fun·,L)</code>
159 calls·<code·class="inline">Fun(X)</code>·for·each·element·<code·class="inline">X</code>·in·<code·class="inline">L</code>·and·the·processing·occurs·in·the159 calls·<code·class="inline">Fun(X)</code>·for·each·element·<code·class="inline">X</code>·in·<code·class="inline">L</code>·and·the·processing·occurs·in·the
160 order·that·the·elements·were·defined·in·<code·class="inline">L</code>.·<code·class="inline">map</code>·does·not·define·the·order·in160 order·that·the·elements·were·defined·in·<code·class="inline">L</code>.·<code·class="inline">map</code>·does·not·define·the·order·in
161 which·its·elements·are·processed.</p><h2·id="syntax-of-funs"·class="section-heading">161 which·its·elements·are·processed.</p><h2·id="syntax-of-funs"·class="section-heading">
162 ··<a·href="#syntax-of-funs"·class="hover-link">162 ··<a·href="#syntax-of-funs"·class="hover-link">
163 ····<i·class="ri-link-m"·aria-hidden="true"></i>163 ····<i·class="ri-link-m"·aria-hidden="true"></i>
164 ··</a>164 ··</a>
165 ··<span·class="text">Syntax·of·Funs</span>165 ··<span·class="text">Syntax·of·Funs</span>
166 </h2>166 </h2>
167 <p>Funs·are·written·with·the·following·syntax·(see167 <p>Funs·are·written·with·the·following·syntax·(see
168 <a·href="../../doc/system/expressions.html#fun-expressions">Fun·Expressions·</a>for·full·description):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7267672379-1">(</span><span·class="n">Arg1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arg2</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class=[·...·truncated·by·diffoscope;·len:·79,·SHA:·082d45309c693b4902ddcdb16976775b768a76032a6ffad23236f4b17f90d424·...·]9-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">168 <a·href="../../doc/system/expressions.html#fun-expressions">Fun·Expressions·</a>for·full·description):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="0346240409-1">(</span><span·class="n">Arg1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arg2</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class=[·...·truncated·by·diffoscope;·len:·79,·SHA:·42d12952164349ca084a29e4670715e731ed5b0e81dfac4f8a1e6bedf809b467·...·]9-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
169 ········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">169 ········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
170 ····</span><span·class="k">end</span></code></pre><p>This·creates·an·anonymous·function·of·<code·class="inline">N</code>·arguments·and·binds·it·to·the·variable170 ····</span><span·class="k">end</span></code></pre><p>This·creates·an·anonymous·function·of·<code·class="inline">N</code>·arguments·and·binds·it·to·the·variable
171 <code·class="inline">F</code>.</p><p>Another·function,·<code·class="inline">FunctionName</code>,·written·in·the·same·module,·can·be·passed·as171 <code·class="inline">F</code>.</p><p>Another·function,·<code·class="inline">FunctionName</code>,·written·in·the·same·module,·can·be·passed·as
172 an·argument,·using·the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">FunctionName</span><span·class="o">/</span><span·class="n">Arity</span></code></pre><p>With·this·form·of·function·reference,·the·function·that·is·referred·to·does·not172 an·argument,·using·the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">FunctionName</span><span·class="o">/</span><span·class="n">Arity</span></code></pre><p>With·this·form·of·function·reference,·the·function·that·is·referred·to·does·not
173 need·to·be·exported·from·the·module.</p><p>It·is·also·possible·to·refer·to·a·function·defined·in·a·different·module,·with173 need·to·be·exported·from·the·module.</p><p>It·is·also·possible·to·refer·to·a·function·defined·in·a·different·module,·with
174 the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">:</span><span·class="n">FunctionName</span><span·class="o">/</span><span·class="n">Arity</span></code></pre><p>In·this·case,·the·function·must·be·exported·from·the·module·in·question.</p><p>The·following·program·illustrates·the·different·ways·of·creating·funs:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2015464944-1">(</span><span·class="ss">fun_test</span><span·class="p"·data-group-id="2015464944-1">)</span><span·class="p">.</span><span·class="w">174 the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">:</span><span·class="n">FunctionName</span><span·class="o">/</span><span·class="n">Arity</span></code></pre><p>In·this·case,·the·function·must·be·exported·from·the·module·in·question.</p><p>The·following·program·illustrates·the·different·ways·of·creating·funs:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0695762911-1">(</span><span·class="ss">fun_test</span><span·class="p"·data-group-id="0695762911-1">)</span><span·class="p">.</span><span·class="w">
175 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2015464944-2">(</span><span·class="p"·data-group-id="2015464944-3">[</span><span·class="ss">t1</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">t2</span><span·class="p">/</span><span·cl[·...·truncated·by·diffoscope;·len:·111,·SHA:·7b80e453f0c212c1891ef08cee73278dbae9d69e49da3d4cb0ec1e2f18ec2210·...·]-2">)</span><span·class="p">.</span><span·class="w">175 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0695762911-2">(</span><span·class="p"·data-group-id="0695762911-3">[</span><span·class="ss">t1</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">t2</span><span·class="p">/</span><span·cl[·...·truncated·by·diffoscope;·len:·111,·SHA:·d7de0ea72548485451a17416a321254dc9fac130956b9340d7db50dc156ec234·...·]-2">)</span><span·class="p">.</span><span·class="w">
176 </span><span·class="p">-</span><span·class="na">import</span><span·class="p"·data-group-id="2015464944-4">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2015464944-5">[</span><span·class="ss">map</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·58ff0ec72609140b18beacecca550a7cfb22ab9cacbafd1b419364f1db4db474·...·]-4">)</span><span·class="p">.</span><span·class="w">176 </span><span·class="p">-</span><span·class="na">import</span><span·class="p"·data-group-id="0695762911-4">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0695762911-5">[</span><span·class="ss">map</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·66e0790cef677acb344a3dce4121ecbfceecc8a52337f4e082c2694f7d57cdff·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
177 </span><span·class="nf">t1</span><span·class="p"·data-group-id="2015464944-6">(</span><span·class="p"·data-group-id="2015464944-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="2015464944-7">(</span><span·class="nf">fun</spa[·...·truncated·by·diffoscope;·len:·795,·SHA:·4b239c2ffab644c7c4d1762a5a88ca9d700588de3fa96db5d066905fe93af2a8·...·]-7">)</span><span·class="p">.</span><span·class="w">177 </span><span·class="nf">t1</span><span·class="p"·data-group-id="0695762911-6">(</span><span·class="p"·data-group-id="0695762911-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="0695762911-7">(</span><span·class="nf">fun</spa[·...·truncated·by·diffoscope;·len:·795,·SHA:·44fdd2fec8524d0774791957a93ba3434ca662f9716e0f2d5acc3f1dcae2d5c9·...·]-7">)</span><span·class="p">.</span><span·class="w">
  
178 </span><span·class="nf">t2</span><span·class="p"·data-group-id="2015464944-10">(</span><span·class="p"·data-group-id="2015464944-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="2015464944-11">(</span><span·class="k">fun</s[·...·truncated·by·diffoscope;·len:·525,·SHA:·7e9a92cd5099d86f1857c2b28057548e3635b16c099434b29c89fa358b63f0af·...·]-11">)</span><span·class="p">.</span><span·class="w">178 </span><span·class="nf">t2</span><span·class="p"·data-group-id="0695762911-10">(</span><span·class="p"·data-group-id="0695762911-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="0695762911-11">(</span><span·class="k">fun</s[·...·truncated·by·diffoscope;·len:·525,·SHA:·901e603f5d3b9e69ab5c6441ab7b8486253fa3819a9456792cf6476d55aeb656·...·]-11">)</span><span·class="p">.</span><span·class="w">
  
179 </span><span·class="nf">double</span><span·class="p"·data-group-id="2015464944-13">(</span><span·class="n">X</span><span·class="p"·data-group-id="2015464944-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">*</span><span·c[·...·truncated·by·diffoscope;·len:·630,·SHA:·9ae59ee954ece28f31a6a210117c8b9d989ee6c745e68f28e6825ed857f15728·...·]-1">)</span></code></pre><p>To·check·whether·a·term·is·a·fun,·use·the·test179 </span><span·class="nf">double</span><span·class="p"·data-group-id="0695762911-13">(</span><span·class="n">X</span><span·class="p"·data-group-id="0695762911-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">*</span><span·c[·...·truncated·by·diffoscope;·len:·630,·SHA:·a5729ce0b9148d23268fd7924df82e883b8273ced79ec3cb783c4ee8ec1215e2·...·]-1">)</span></code></pre><p>To·check·whether·a·term·is·a·fun,·use·the·test
180 <a·href="../../erts-15.0.1/doc/html/erlang.html#is_function/1"><code·class="inline">is_function/1</code></a>·in·a·guard.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="6521853174-1">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="6521853174-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·146,·SHA:·ae84466ce76550df1644dbd28a1a65949e0571efe9d10889ed6e92811a0f5b02·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 <a·href="../../erts-15.0.1/doc/html/erlang.html#is_function/1"><code·class="inline">is_function/1</code></a>·in·a·guard.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="0185598179-1">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="0185598179-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·146,·SHA:·eac069e65196898bc5fbad5326333b9ebafdcda3ea5a25f1ab820a28120ec55b·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ···</span><span·class="nf">apply</span><span·class="p"·data-group-id="6521853174-3">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="6521853174-3">)</span><span·class="p">;</span><span·class="w">181 ···</span><span·class="nf">apply</span><span·class="p"·data-group-id="0185598179-3">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="0185598179-3">)</span><span·class="p">;</span><span·class="w">
182 </span><span·class="nf">f</span><span·class="p"·data-group-id="6521853174-4">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="6521853174-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·142,·SHA:·e24e6c0511eca703eb0bb2b419bbb059ffffc0b8ec91727694f23c65fccbfc8f·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 </span><span·class="nf">f</span><span·class="p"·data-group-id="0185598179-4">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="0185598179-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·142,·SHA:·fa71176de6d9dbe0a4e821f63aeddc74eb6a41e3b8709983b527b947b2394b73·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ···</span><span·class="n">N</span><span·class="p">.</span></code></pre><p>Funs·are·a·distinct·type.·The·BIFs·<code·class="inline">erlang:fun_info/1,2</code>·can·be·used·to·retrieve183 ···</span><span·class="n">N</span><span·class="p">.</span></code></pre><p>Funs·are·a·distinct·type.·The·BIFs·<code·class="inline">erlang:fun_info/1,2</code>·can·be·used·to·retrieve
184 information·about·a·fun,·and·the·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#fun_to_list/1"><code·class="inline">erlang:fun_to_list/1</code></a>·returns·a·textual184 information·about·a·fun,·and·the·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#fun_to_list/1"><code·class="inline">erlang:fun_to_list/1</code></a>·returns·a·textual
185 representation·of·a·fun.·The·<a·href="../../erts-15.0.1/doc/html/erlang.html#check_process_code/2"><code·class="inline">check_process_code/2</code></a>185 representation·of·a·fun.·The·<a·href="../../erts-15.0.1/doc/html/erlang.html#check_process_code/2"><code·class="inline">check_process_code/2</code></a>
186 BIF·returns·<code·class="inline">true</code>·if·the·process·contains·funs·that·depend·on·the·old·version186 BIF·returns·<code·class="inline">true</code>·if·the·process·contains·funs·that·depend·on·the·old·version
187 of·a·module.</p><h2·id="variable-bindings-within-a-fun"·class="section-heading">187 of·a·module.</p><h2·id="variable-bindings-within-a-fun"·class="section-heading">
188 ··<a·href="#variable-bindings-within-a-fun"·class="hover-link">188 ··<a·href="#variable-bindings-within-a-fun"·class="hover-link">
189 ····<i·class="ri-link-m"·aria-hidden="true"></i>189 ····<i·class="ri-link-m"·aria-hidden="true"></i>
190 ··</a>190 ··</a>
191 ··<span·class="text">Variable·Bindings·Within·a·Fun</span>191 ··<span·class="text">Variable·Bindings·Within·a·Fun</span>
192 </h2>192 </h2>
193 <p>The·scope·rules·for·variables·that·occur·in·funs·are·as·follows:</p><ul><li>All·variables·that·occur·in·the·head·of·a·fun·are·assumed·to·be·&quot;fresh&quot;193 <p>The·scope·rules·for·variables·that·occur·in·funs·are·as·follows:</p><ul><li>All·variables·that·occur·in·the·head·of·a·fun·are·assumed·to·be·&quot;fresh&quot;
194 variables.</li><li>Variables·that·are·defined·before·the·fun,·and·that·occur·in·function·calls·or194 variables.</li><li>Variables·that·are·defined·before·the·fun,·and·that·occur·in·function·calls·or
195 guard·tests·within·the·fun,·have·the·values·they·had·outside·the·fun.</li><li>Variables·cannot·be·exported·from·a·fun.</li></ul><p>The·following·examples·illustrate·these·rules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">print_list</span><span·class="p"·data-group-id="3156197415-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="3156197415-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">195 guard·tests·within·the·fun,·have·the·values·they·had·outside·the·fun.</li><li>Variables·cannot·be·exported·from·a·fun.</li></ul><p>The·following·examples·illustrate·these·rules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">print_list</span><span·class="p"·data-group-id="1503423368-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="1503423368-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
196 ····</span><span·class="p"·data-group-id="3156197415-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stream</span><span·class="p"·data-group-id="3156197415-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·272,·SHA:·adb6b3d6ac63860d4ac595da71ff17749cdf43521cac0a9c9abf5b3a49e1e018·...·]-3">)</span><span·class="p">,</span><span·class="w">196 ····</span><span·class="p"·data-group-id="1503423368-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stream</span><span·class="p"·data-group-id="1503423368-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·272,·SHA:·db1c35610f3441fbef189b326409c60b12717b009e8518956e747261ddb221ab·...·]-3">)</span><span·class="p">,</span><span·class="w">
197 ····</span><span·class="nf">foreach</span><span·class="p"·data-group-id="3156197415-4">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="3156197415-5">(</span><span·class="n">X</span><span·class="p"·data-group-id="3156197415-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3156197415-6">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3156197415-7">[</span><span·class="n">X</span><span·class="p"·data-group-id="3156197415-7">]</span><span·class="p"·data-group-id="3156197415-6">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="3156197415-4">)</span><span·class="p">,</span><span·class="w"> 
198 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="3156197415-8">(</span><span·class="n">Stream</span><span·class="p"·data-group-id="3156197415-8">)</span><span·class="p">.</span></code></pre><p>Here,·the·vari[·...·truncated·by·diffoscope;·len:·90,·SHA:·ad1c0fb94c33ac888023d75cdb7e290864ed894c0100b3df0e4d937222cddf46·...·]197 ····</span><span·class="nf">foreach</span><span·class="p"·data-group-id="1503423368-4">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1503423368-5">(</span><span·class="n">X</span><span·class="p"·data-group-id="1503423368-5">)</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·768,·SHA:·98cc90bdf3b996729c8f8f3a39fab6c8f28d35cba9f52f95f6519dcd0d99abd7·...·]
 198 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1503423368-8">(</span><span·class="n">Stream</span><span·class="p"·data-group-id="1503423368-8">)</span><span·class="p">.</span></code></pre><p>Here,·the·variable·<code·class="inline">X</code>,·defined·in·the·head·of·the·fun,·is·a·new·variable.·The
199 variable·<code·class="inline">Stream</code>,·which·is·used·within·the·fun,·gets·its·value·from·the199 variable·<code·class="inline">Stream</code>,·which·is·used·within·the·fun,·gets·its·value·from·the
200 <code·class="inline">file:open</code>·line.</p><p>As·any·variable·that·occurs·in·the·head·of·a·fun·is·considered·a·new·variable,200 <code·class="inline">file:open</code>·line.</p><p>As·any·variable·that·occurs·in·the·head·of·a·fun·is·considered·a·new·variable,
201 it·is·equally·valid·to·write·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">print_list</span><span·class="p"·data-group-id="4158368989-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="4158368989-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 it·is·equally·valid·to·write·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">print_list</span><span·class="p"·data-group-id="6657006726-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="6657006726-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ····</span><span·class="p"·data-group-id="4158368989-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stream</span><span·class="p"·data-group-id="4158368989-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·272,·SHA:·0059dc1092c24287833983af181279d529f224b2867114659400103647e42345·...·]-3">)</span><span·class="p">,</span><span·class="w">202 ····</span><span·class="p"·data-group-id="6657006726-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stream</span><span·class="p"·data-group-id="6657006726-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·272,·SHA:·2e1f3a3516d085def0edbef3aa78a2c0dcefe93bd8a12520e1d69b78b05b4d3e·...·]-3">)</span><span·class="p">,</span><span·class="w">
203 ····</span><span·class="nf">foreach</span><span·class="p"·data-group-id="4158368989-4">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4158368989-5">(</span><span·class="n">File</span><span·class="p"·data-group-id="4158368989-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 ····</span><span·class="nf">foreach</span><span·class="p"·data-group-id="6657006726-4">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6657006726-5">(</span><span·class="n">File</span><span·class="p"·data-group-id="6657006726-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4158368989-6">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="4158368989-7">[<[·...·truncated·by·diffoscope;·len:·127,·SHA:·705dd3ba2af013fdc2b09a9c5487f78a9b74fdd93c195b7c2077b1abff40e51f·...·]-6">)</span><span·class="w">204 ················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6657006726-6">(</span><span·class="n">Stream</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="6657006726-7">[<[·...·truncated·by·diffoscope;·len:·127,·SHA:·efd214febbfeda6126cb0c634f823d55c0655bc27b79ab792b6c6fdc038a95d2·...·]-6">)</span><span·class="w">
205 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="4158368989-4">)</span><span·class="p">,</span><span·class="w">205 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="6657006726-4">)</span><span·class="p">,</span><span·class="w">
206 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="4158368989-8">(</span><span·class="n">Stream</span><span·class="p"·data-group-id="4158368989-8">)</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">File</code>·is·used·as·the·new·variable·instead·of·<code·class="inline">X</code>.·This·is·not·so·wise206 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6657006726-8">(</span><span·class="n">Stream</span><span·class="p"·data-group-id="6657006726-8">)</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">File</code>·is·used·as·the·new·variable·instead·of·<code·class="inline">X</code>.·This·is·not·so·wise
207 because·code·in·the·fun·body·cannot·refer·to·the·variable·<code·class="inline">File</code>,·which·is207 because·code·in·the·fun·body·cannot·refer·to·the·variable·<code·class="inline">File</code>,·which·is
208 defined·outside·of·the·fun.·Compiling·this·example·gives·the·following208 defined·outside·of·the·fun.·Compiling·this·example·gives·the·following
209 diagnostic:</p><pre><code·class="text">./FileName.erl:Line:·Warning:·variable·'File'209 diagnostic:</p><pre><code·class="text">./FileName.erl:Line:·Warning:·variable·'File'
210 ······shadowed·in·'fun'</code></pre><p>This·indicates·that·the·variable·<code·class="inline">File</code>,·which·is·defined·inside·the·fun,210 ······shadowed·in·'fun'</code></pre><p>This·indicates·that·the·variable·<code·class="inline">File</code>,·which·is·defined·inside·the·fun,
211 collides·with·the·variable·<code·class="inline">File</code>,·which·is·defined·outside·the·fun.</p><p>The·rules·for·importing·variables·into·a·fun·has·the·consequence·that·certain211 collides·with·the·variable·<code·class="inline">File</code>,·which·is·defined·outside·the·fun.</p><p>The·rules·for·importing·variables·into·a·fun·has·the·consequence·that·certain
212 pattern·matching·operations·must·be·moved·into·guard·expressions·and·cannot·be212 pattern·matching·operations·must·be·moved·into·guard·expressions·and·cannot·be
213 written·in·the·head·of·the·fun.·For·example,·you·might·write·the·following·code213 written·in·the·head·of·the·fun.·For·example,·you·might·write·the·following·code
214 if·you·intend·the·first·clause·of·<code·class="inline">F</code>·to·be·evaluated·when·the·value·of·its214 if·you·intend·the·first·clause·of·<code·class="inline">F</code>·to·be·evaluated·when·the·value·of·its
215 argument·is·<code·class="inline">Y</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="6655245715-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6655245715-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">215 argument·is·<code·class="inline">Y</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="5478477537-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="5478477537-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
216 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">216 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
217 ····</span><span·class="nf">map</span><span·class="p"·data-group-id="6655245715-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6655245715-3">(</span><span·class="n">X</span><span·class="p"·data-group-id="6655245715-3">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">217 ····</span><span·class="nf">map</span><span·class="p"·data-group-id="5478477537-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5478477537-3">(</span><span·class="n">X</span><span·class="p"·data-group-id="5478477537-3">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
218 ·············</span><span·class="p">;</span><span·class="w">218 ·············</span><span·class="p">;</span><span·class="w">
219 ···········</span><span·class="p"·data-group-id="6655245715-4">(</span><span·class="p">_</span><span·class="p"·data-group-id="6655245715-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 ···········</span><span·class="p"·data-group-id="5478477537-4">(</span><span·class="p">_</span><span·class="p"·data-group-id="5478477537-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 ·············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">220 ·············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
221 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6655245715-2">)</span><span·class="w">221 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="5478477537-2">)</span><span·class="w">
222 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>instead·of·writing·the·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="7021006337-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="7021006337-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>instead·of·writing·the·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="3413197218-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="3413197218-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">223 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
224 ····</span><span·class="nf">map</span><span·class="p"·data-group-id="7021006337-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7021006337-3">(</span><span·class="n">Y</span><span·class="p"·data-group-id="7021006337-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 ····</span><span·class="nf">map</span><span·class="p"·data-group-id="3413197218-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="3413197218-3">(</span><span·class="n">Y</span><span·class="p"·data-group-id="3413197218-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 ·············</span><span·class="p">;</span><span·class="w">225 ·············</span><span·class="p">;</span><span·class="w">
226 ···········</span><span·class="p"·data-group-id="7021006337-4">(</span><span·class="p">_</span><span·class="p"·data-group-id="7021006337-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">226 ···········</span><span·class="p"·data-group-id="3413197218-4">(</span><span·class="p">_</span><span·class="p"·data-group-id="3413197218-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
227 ·············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">227 ·············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
228 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="7021006337-2">)</span><span·class="w">228 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="3413197218-2">)</span><span·class="w">
229 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="funs-and-module-lists"·class="section-heading">229 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="funs-and-module-lists"·class="section-heading">
230 ··<a·href="#funs-and-module-lists"·class="hover-link">230 ··<a·href="#funs-and-module-lists"·class="hover-link">
231 ····<i·class="ri-link-m"·aria-hidden="true"></i>231 ····<i·class="ri-link-m"·aria-hidden="true"></i>
232 ··</a>232 ··</a>
233 ··<span·class="text">Funs·and·Module·Lists</span>233 ··<span·class="text">Funs·and·Module·Lists</span>
234 </h2>234 </h2>
235 <p>The·following·examples·show·a·dialogue·with·the·Erlang·shell.·All·the·higher235 <p>The·following·examples·show·a·dialogue·with·the·Erlang·shell.·All·the·higher
Max diff block lines reached; 152791/218554 bytes (69.91%) of diff not shown.
48.3 KB
./usr/share/doc/erlang-doc/html/doc/system/gen_server_concepts.html
    
Offset 157, 63 lines modifiedOffset 157, 63 lines modified
157 ··<a·href="#example"·class="hover-link">157 ··<a·href="#example"·class="hover-link">
158 ····<i·class="ri-link-m"·aria-hidden="true"></i>158 ····<i·class="ri-link-m"·aria-hidden="true"></i>
159 ··</a>159 ··</a>
160 ··<span·class="text">Example</span>160 ··<span·class="text">Example</span>
161 </h2>161 </h2>
162 <p>An·example·of·a·simple·server·written·in·plain·Erlang·is·provided·in162 <p>An·example·of·a·simple·server·written·in·plain·Erlang·is·provided·in
163 <a·href="design_principles.html#ch1">Overview</a>.·The·server·can·be·reimplemented·using163 <a·href="design_principles.html#ch1">Overview</a>.·The·server·can·be·reimplemented·using
164 <code·class="inline">gen_server</code>,·resulting·in·this·callback·module:</p><p><a·href=""·id="ex"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4525348400-1">(</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4525348400-1">)</span><span·class="p">.</span><span·class="w">164 <code·class="inline">gen_server</code>,·resulting·in·this·callback·module:</p><p><a·href=""·id="ex"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7156358030-1">(</span><span·class="ss">ch3</span><span·class="p"·data-group-id="7156358030-1">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="4525348400-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="4525348400-2">)</span><span·class="p">.</span><span·class="w">165 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="7156358030-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="7156358030-2">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="w">166 </span><span·class="w">
167 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4525348400-3">(</span><span·class="p"·data-group-id="4525348400-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4525348400-4">]</span><span·class="p"·data-group-id="4525348400-3">)</span><span·class="p">.</span><span·class="w">167 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7156358030-3">(</span><span·class="p"·data-group-id="7156358030-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7156358030-4">]</span><span·class="p"·data-group-id="7156358030-3">)</span><span·class="p">.</span><span·class="w">
168 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4525348400-5">(</span><span·class="p"·data-group-id="4525348400-6">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·115,·SHA:·866c91ad8e738d5f2e4743815fe470325c661bb3f1d643e84fd80391337fa176·...·]0-5">)</span><span·class="p">.</span><span·class="w">168 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7156358030-5">(</span><span·class="p"·data-group-id="7156358030-6">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·115,·SHA:·77e44e3169918aff25aba59a9647c3827a6d9d35baf21d885dc8656b782597a1·...·]0-5">)</span><span·class="p">.</span><span·class="w">
169 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4525348400-7">(</span><span·class="p"·data-group-id="4525348400-8">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</sp[·...·truncated·by·diffoscope;·len:·253,·SHA:·771eb0a4620c1cb3491471d908a2f5a667b4b00a2e263d75d93237c46ce10c95·...·]0-7">)</span><span·class="p">.</span><span·class="w">169 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7156358030-7">(</span><span·class="p"·data-group-id="7156358030-8">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</sp[·...·truncated·by·diffoscope;·len:·253,·SHA:·1a0ed49f935acf0a2a000f64143b69694d0f0fb7f603e00345612b279290282c·...·]0-7">)</span><span·class="p">.</span><span·class="w">
  
170 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="4525348400-9">(</span><span·class="p"·data-group-id="4525348400-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">170 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="7156358030-9">(</span><span·class="p"·data-group-id="7156358030-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
171 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4525348400-10">(</span><span·class="p"·data-group-id="4525348400-11">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4525348400-11">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·406,·SHA:·9e5981a7ce1b1300b0b4db742a805b2d624ee3dc4cdc6cbff1adea5684c582a9·...·]0-10">)</span><span·class="p">.</span><span·class="w">171 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="7156358030-10">(</span><span·class="p"·data-group-id="7156358030-11">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="7156358030-11">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·406,·SHA:·d2d6334025bb289f0e80203ce088123141d20f4f8190ab68eff23005b6ba8fe7·...·]0-10">)</span><span·class="p">.</span><span·class="w">
  
172 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="4525348400-14">(</span><span·class="p"·data-group-id="4525348400-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="7156358030-14">(</span><span·class="p"·data-group-id="7156358030-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="4525348400-15">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="4525348400-15">)</span><span·class="p">.</span><span·class="w">173 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7156358030-15">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="7156358030-15">)</span><span·class="p">.</span><span·class="w">
  
174 </span><span·class="nf">free</span><span·class="p"·data-group-id="4525348400-16">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="4525348400-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">174 </span><span·class="nf">free</span><span·class="p"·data-group-id="7156358030-16">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="7156358030-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
175 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="4525348400-17">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4525348400-18">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·37d7be478a30037a30b8234646cfb7216295128aaae3533ae56770ff419df448·...·]0-17">)</span><span·class="p">.</span><span·class="w">175 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="7156358030-17">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7156358030-18">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·f2b26afee013b773a54aa1b09fab6812c44d3044ddc25f773f21f7810fecbe03·...·]0-17">)</span><span·class="p">.</span><span·class="w">
  
176 </span><span·class="nf">init</span><span·class="p"·data-group-id="4525348400-19">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="4525348400-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 </span><span·class="nf">init</span><span·class="p"·data-group-id="7156358030-19">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="7156358030-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ····</span><span·class="p"·data-group-id="4525348400-20">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="4525348400-21">(</span><span·class="p"·data-group-id="4525348400-21">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·21,·SHA:·4bbadd0d14787ba3095eb5e6e0123bcfa8f759a0ad0021e58d5fec745ce9a13b·...·]0-20">}</span><span·class="p">.</span><span·class="w">177 ····</span><span·class="p"·data-group-id="7156358030-20">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="7156358030-21">(</span><span·class="p"·data-group-id="7156358030-21">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·21,·SHA:·03dda959996bbc3caa516d58ea37b08552e69006f4520f1d4e77703d57f17852·...·]0-20">}</span><span·class="p">.</span><span·class="w">
  
178 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="4525348400-22">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·9,·SHA:·db5eda8665620cd06bd302cb6a2d927963112685dec6e10577157dc070099cf1·...·]0-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="7156358030-22">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·9,·SHA:·0c9e1e605a516852e4688d26bf7dd47ba5985913c269d0289f5c460cb51762e6·...·]0-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="p"·data-group-id="4525348400-23">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4525348400-23">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·142,·SHA:·decfa622c276b3dffdbe701076d781fed1a8e006293ea61925bb69d91b762581·...·]0-24">)</span><span·class="p">,</span><span·class="w">179 ····</span><span·class="p"·data-group-id="7156358030-23">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="7156358030-23">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·142,·SHA:·49bf699682afa3764a4469da2cf2e7ab4e98a55a967a99dc724fce9d5a0cf544·...·]0-24">)</span><span·class="p">,</span><span·class="w">
180 ····</span><span·class="p"·data-group-id="4525348400-25">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4525348400-25">}</span><span·class="p">.</span><span·class="w">180 ····</span><span·class="p"·data-group-id="7156358030-25">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="7156358030-25">}</span><span·class="p">.</span><span·class="w">
  
181 </span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="4525348400-26">(</span><span·class="p"·data-group-id="4525348400-27">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4525348400-27">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·90,·SHA:·0cf3a488a912485fa7fa8dbe60af669a2b664aa8f1e5a7a22b0316153e525a72·...·]0-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">181 </span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="7156358030-26">(</span><span·class="p"·data-group-id="7156358030-27">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="7156358030-27">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·90,·SHA:·3321a0a5ca2b4732d2469db914f1490db67112b45c55a6e0a036db828ba6fafb·...·]0-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
182 ····</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="4525348400-28">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="4525348400-28">)</span><span·class="p">,</span><span·class="w">182 ····</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="7156358030-28">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="7156358030-28">)</span><span·class="p">,</span><span·class="w">
183 ····</span><span·class="p"·data-group-id="4525348400-29">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4525348400-29">}</span><span·class="p">.</span></code></pre><p>The·code·is·explained·in·the·next·sections.</p><h2·id="starting-a-gen_server"·class="section-heading">183 ····</span><span·class="p"·data-group-id="7156358030-29">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="7156358030-29">}</span><span·class="p">.</span></code></pre><p>The·code·is·explained·in·the·next·sections.</p><h2·id="starting-a-gen_server"·class="section-heading">
184 ··<a·href="#starting-a-gen_server"·class="hover-link">184 ··<a·href="#starting-a-gen_server"·class="hover-link">
185 ····<i·class="ri-link-m"·aria-hidden="true"></i>185 ····<i·class="ri-link-m"·aria-hidden="true"></i>
186 ··</a>186 ··</a>
187 ··<span·class="text">Starting·a·Gen_Server</span>187 ··<span·class="text">Starting·a·Gen_Server</span>
188 </h2>188 </h2>
189 <p>In·the·example·in·the·previous·section,·<code·class="inline">gen_server</code>·is·started·by·calling189 <p>In·the·example·in·the·previous·section,·<code·class="inline">gen_server</code>·is·started·by·calling
190 <code·class="inline">ch3:start_link()</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start_link</span><span·class="p"·data-group-id="4707496135-1">(</span><span·class="p"·data-group-id="4707496135-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 <code·class="inline">ch3:start_link()</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start_link</span><span·class="p"·data-group-id="1298232781-1">(</span><span·class="p"·data-group-id="1298232781-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4707496135-2">(</span><span·class="p"·data-group-id="4707496135-3">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="4707496135-3">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·682,·SHA:·d866290307a2d1a2b0721d348345fd8ce07a6419b8fb041af94ea29937d414d6·...·]-6">}</span></code></pre><p><code·class="inline">start_link/0</code>·calls·function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/4</code></a>.·This·function·spawns·and191 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="1298232781-2">(</span><span·class="p"·data-group-id="1298232781-3">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="1298232781-3">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·682,·SHA:·d4aace55122f7328bf1dc9ecaa927838a2dcf36e8007f01083c64dd7ea664cfb·...·]-6">}</span></code></pre><p><code·class="inline">start_link/0</code>·calls·function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/4</code></a>.·This·function·spawns·and
192 links·to·a·new·process,·a·<code·class="inline">gen_server</code>.</p><ul><li><p>The·first·argument,·<code·class="inline">{local,·ch3}</code>,·specifies·the·name.·The·gen_server·is·then192 links·to·a·new·process,·a·<code·class="inline">gen_server</code>.</p><ul><li><p>The·first·argument,·<code·class="inline">{local,·ch3}</code>,·specifies·the·name.·The·gen_server·is·then
193 locally·registered·as·<code·class="inline">ch3</code>.</p><p>If·the·name·is·omitted,·the·<code·class="inline">gen_server</code>·is·not·registered.·Instead·its·pid193 locally·registered·as·<code·class="inline">ch3</code>.</p><p>If·the·name·is·omitted,·the·<code·class="inline">gen_server</code>·is·not·registered.·Instead·its·pid
194 must·be·used.·The·name·can·also·be·given·as·<code·class="inline">{global,·Name}</code>,·in·which·case194 must·be·used.·The·name·can·also·be·given·as·<code·class="inline">{global,·Name}</code>,·in·which·case
195 the·<code·class="inline">gen_server</code>·is·registered·using·<a·href="../../lib/kernel-10.0.1/doc/html/global.html#register_name/2"><code·class="inline">global:register_name/2</code></a>.</p></li><li><p>The·second·argument,·<code·class="inline">ch3</code>,·is·the·name·of·the·callback·module,·which·is195 the·<code·class="inline">gen_server</code>·is·registered·using·<a·href="../../lib/kernel-10.0.1/doc/html/global.html#register_name/2"><code·class="inline">global:register_name/2</code></a>.</p></li><li><p>The·second·argument,·<code·class="inline">ch3</code>,·is·the·name·of·the·callback·module,·which·is
196 the·module·where·the·callback·functions·are·located.</p><p>The·interface·functions·(<code·class="inline">start_link/0</code>,·<code·class="inline">alloc/0</code>,·and·<code·class="inline">free/1</code>)·are·located196 the·module·where·the·callback·functions·are·located.</p><p>The·interface·functions·(<code·class="inline">start_link/0</code>,·<code·class="inline">alloc/0</code>,·and·<code·class="inline">free/1</code>)·are·located
197 in·the·same·module·as·the·callback·functions·(<code·class="inline">init/1</code>,·<code·class="inline">handle_call/3</code>,·and197 in·the·same·module·as·the·callback·functions·(<code·class="inline">init/1</code>,·<code·class="inline">handle_call/3</code>,·and
198 <code·class="inline">handle_cast/2</code>).·It·is·usually·good·programming·practice·to·have·the·code198 <code·class="inline">handle_cast/2</code>).·It·is·usually·good·programming·practice·to·have·the·code
199 corresponding·to·one·process·contained·in·a·single·module.</p></li><li><p>The·third·argument,·<code·class="inline">[]</code>,·is·a·term·that·is·passed·as·is·to·the·callback199 corresponding·to·one·process·contained·in·a·single·module.</p></li><li><p>The·third·argument,·<code·class="inline">[]</code>,·is·a·term·that·is·passed·as·is·to·the·callback
200 function·<code·class="inline">init</code>.·Here,·<code·class="inline">init</code>·does·not·need·any·indata·and·ignores·the200 function·<code·class="inline">init</code>.·Here,·<code·class="inline">init</code>·does·not·need·any·indata·and·ignores·the
201 argument.</p></li><li><p>The·fourth·argument,·<code·class="inline">[]</code>,·is·a·list·of·options.·See·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>201 argument.</p></li><li><p>The·fourth·argument,·<code·class="inline">[]</code>,·is·a·list·of·options.·See·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>
202 for·the·available·options.</p></li></ul><p>If·name·registration·succeeds,·the·new·<code·class="inline">gen_server</code>·process·calls·the·callback202 for·the·available·options.</p></li></ul><p>If·name·registration·succeeds,·the·new·<code·class="inline">gen_server</code>·process·calls·the·callback
203 function·<code·class="inline">ch3:init([])</code>.·<code·class="inline">init</code>·is·expected·to·return·<code·class="inline">{ok,·State}</code>,·where203 function·<code·class="inline">ch3:init([])</code>.·<code·class="inline">init</code>·is·expected·to·return·<code·class="inline">{ok,·State}</code>,·where
204 <code·class="inline">State</code>·is·the·internal·state·of·the·<code·class="inline">gen_server</code>.·In·this·case,·the·state·is204 <code·class="inline">State</code>·is·the·internal·state·of·the·<code·class="inline">gen_server</code>.·In·this·case,·the·state·is
205 the·available·channels.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="7937294355-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="7937294355-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 the·available·channels.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="4495189605-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="4495189605-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 ····</span><span·class="p"·data-group-id="7937294355-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="7937294355-3">(</span><span·class="p"·data-group-id="7937294355-3">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·b548f6a1ac9507bf8aee24ff67077839f3af7096d9b531c1a7de2887cae0216c·...·]5-2">}</span><span·class="p">.</span></code></pre><p><a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/4</code></a>·is·synchronous.·It·does·not·return·until·the206 ····</span><span·class="p"·data-group-id="4495189605-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="4495189605-3">(</span><span·class="p"·data-group-id="4495189605-3">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·95fd23d5f6d55c52bc188253a679364f2b619c4f7f7eec1c8629e890f181f529·...·]5-2">}</span><span·class="p">.</span></code></pre><p><a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/4</code></a>·is·synchronous.·It·does·not·return·until·the
207 <code·class="inline">gen_server</code>·has·been·initialized·and·is·ready·to·receive·requests.</p><p><a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/4</code></a>·must·be·used·if·the·<code·class="inline">gen_server</code>·is·part·of207 <code·class="inline">gen_server</code>·has·been·initialized·and·is·ready·to·receive·requests.</p><p><a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/4</code></a>·must·be·used·if·the·<code·class="inline">gen_server</code>·is·part·of
208 a·supervision·tree,·meaning·that·it·was·started·by·a·supervisor.·There208 a·supervision·tree,·meaning·that·it·was·started·by·a·supervisor.·There
209 is·another·function,·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start/4"><code·class="inline">gen_server:start/4</code></a>,·to·start·a·standalone209 is·another·function,·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start/4"><code·class="inline">gen_server:start/4</code></a>,·to·start·a·standalone
210 <code·class="inline">gen_server</code>·that·is·not·part·of·a·supervision·tree.</p><h2·id="synchronous-requests-call"·class="section-heading">210 <code·class="inline">gen_server</code>·that·is·not·part·of·a·supervision·tree.</p><h2·id="synchronous-requests-call"·class="section-heading">
211 ··<a·href="#synchronous-requests-call"·class="hover-link">211 ··<a·href="#synchronous-requests-call"·class="hover-link">
212 ····<i·class="ri-link-m"·aria-hidden="true"></i>212 ····<i·class="ri-link-m"·aria-hidden="true"></i>
213 ··</a>213 ··</a>
Offset 221, 32 lines modifiedOffset 221, 32 lines modified
221 </h2>221 </h2>
222 <p>The·synchronous·request·<code·class="inline">alloc()</code>·is·implemented·using·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#call/2"><code·class="inline">gen_server:call/2</code></a>:</p><pre><code·class="text">alloc()·-&gt;222 <p>The·synchronous·request·<code·class="inline">alloc()</code>·is·implemented·using·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#call/2"><code·class="inline">gen_server:call/2</code></a>:</p><pre><code·class="text">alloc()·-&gt;
223 ····gen_server:call(ch3,·alloc).</code></pre><p><code·class="inline">ch3</code>·is·the·name·of·the·<code·class="inline">gen_server</code>·and·must·agree·with·the·name·used·to·start223 ····gen_server:call(ch3,·alloc).</code></pre><p><code·class="inline">ch3</code>·is·the·name·of·the·<code·class="inline">gen_server</code>·and·must·agree·with·the·name·used·to·start
224 it.·<code·class="inline">alloc</code>·is·the·actual·request.</p><p>The·request·is·made·into·a·message·and·sent·to·the·<code·class="inline">gen_server</code>.·When·the224 it.·<code·class="inline">alloc</code>·is·the·actual·request.</p><p>The·request·is·made·into·a·message·and·sent·to·the·<code·class="inline">gen_server</code>.·When·the
225 request·is·received,·the·<code·class="inline">gen_server</code>·calls·<code·class="inline">handle_call(Request,·From,·State)</code>,225 request·is·received,·the·<code·class="inline">gen_server</code>·calls·<code·class="inline">handle_call(Request,·From,·State)</code>,
226 which·is·expected·to·return·a·tuple·<code·class="inline">{reply,Reply,State1}</code>.·<code·class="inline">Reply</code>·is·the·reply226 which·is·expected·to·return·a·tuple·<code·class="inline">{reply,Reply,State1}</code>.·<code·class="inline">Reply</code>·is·the·reply
227 that·is·to·be·sent·back·to·the·client,·and·<code·class="inline">State1</code>·is·a·new·value·for·the·state227 that·is·to·be·sent·back·to·the·client,·and·<code·class="inline">State1</code>·is·a·new·value·for·the·state
228 of·the·<code·class="inline">gen_server</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_call</span><span·class="p"·data-group-id="7295008830-1">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="7[·...·truncated·by·diffoscope;·len:·8,·SHA:·ae5f07fc392f7639d3a2cfa75c917d91da6334dadf09c90a7a0c9564f06fec6f·...·]0-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">228 of·the·<code·class="inline">gen_server</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_call</span><span·class="p"·data-group-id="5902109150-1">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="5[·...·truncated·by·diffoscope;·len:·8,·SHA:·03329118be4d3bf7a5787978c35a97143b379de9e1595dc84bd922953403c670·...·]0-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
229 ····</span><span·class="p"·data-group-id="7295008830-2">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="7295008830-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·139,·SHA:·1408784f1a66dfb8cf0b645820905cd0a8b397fa1a12698fe942fbb113ddbaec·...·]0-3">)</span><span·class="p">,</span><span·class="w">229 ····</span><span·class="p"·data-group-id="5902109150-2">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="5902109150-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·139,·SHA:·53536a75501aa2df220db6dcb5f1f61c0cc56e47bb77f403309240a997b4f9e6·...·]0-3">)</span><span·class="p">,</span><span·class="w">
230 ····</span><span·class="p"·data-group-id="7295008830-4">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="7295008830-4">}</span><span·class="p">.</span></code></pre><p>In·this·case,·the·reply·is·the·allocated·channel·<code·class="inline">Ch</code>·and·the·new·state·is·the230 ····</span><span·class="p"·data-group-id="5902109150-4">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="5902109150-4">}</span><span·class="p">.</span></code></pre><p>In·this·case,·the·reply·is·the·allocated·channel·<code·class="inline">Ch</code>·and·the·new·state·is·the
231 set·of·remaining·available·channels·<code·class="inline">Chs2</code>.</p><p>Thus,·the·call·<code·class="inline">ch3:alloc()</code>·returns·the·allocated·channel·<code·class="inline">Ch</code>·and·the231 set·of·remaining·available·channels·<code·class="inline">Chs2</code>.</p><p>Thus,·the·call·<code·class="inline">ch3:alloc()</code>·returns·the·allocated·channel·<code·class="inline">Ch</code>·and·the
232 <code·class="inline">gen_server</code>·then·waits·for·new·requests,·now·with·an·updated·list·of·available232 <code·class="inline">gen_server</code>·then·waits·for·new·requests,·now·with·an·updated·list·of·available
233 channels.</p><h2·id="asynchronous-requests-cast"·class="section-heading">233 channels.</p><h2·id="asynchronous-requests-cast"·class="section-heading">
234 ··<a·href="#asynchronous-requests-cast"·class="hover-link">234 ··<a·href="#asynchronous-requests-cast"·class="hover-link">
235 ····<i·class="ri-link-m"·aria-hidden="true"></i>235 ····<i·class="ri-link-m"·aria-hidden="true"></i>
236 ··</a>236 ··</a>
237 ··<span·class="text">Asynchronous·Requests·-·Cast</span>237 ··<span·class="text">Asynchronous·Requests·-·Cast</span>
238 </h2>238 </h2>
239 <p>The·asynchronous·request·<code·class="inline">free(Ch)</code>·is·implemented·using·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#cast/2"><code·class="inline">gen_server:cast/2</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">free</span><span·class="p"·data-group-id="3179206404-1">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="3179206404-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">239 <p>The·asynchronous·request·<code·class="inline">free(Ch)</code>·is·implemented·using·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#cast/2"><code·class="inline">gen_server:cast/2</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">free</span><span·class="p"·data-group-id="0665949123-1">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="0665949123-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
240 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="3179206404-2">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3179206404-3">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span[·...·truncated·by·diffoscope;·len:·89,·SHA:·f1288f2f4eee60bf0addb6a30deed3f0e0b5a4a0ec5e2f00460c68e7c779dda4·...·]-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">ch3</code>·is·the·name·of·the·<code·class="inline">gen_server</code>.·<code·class="inline">{free,·Ch}</code>·is·the·actual·request.</p><p>The·request·is·made·into·a·message·and·sent·to·the·<code·class="inline">gen_server</code>.·<code·class="inline">cast</code>,·and240 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="0665949123-2">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0665949123-3">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span[·...·truncated·by·diffoscope;·len:·89,·SHA:·476e506c44ff772cd92c5a5e1d3f06c2b54aa73ef932790ec555abafc8fb5c6d·...·]-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">ch3</code>·is·the·name·of·the·<code·class="inline">gen_server</code>.·<code·class="inline">{free,·Ch}</code>·is·the·actual·request.</p><p>The·request·is·made·into·a·message·and·sent·to·the·<code·class="inline">gen_server</code>.·<code·class="inline">cast</code>,·and
241 thus·<code·class="inline">free</code>,·then·returns·<code·class="inline">ok</code>.</p><p>When·the·request·is·received,·the·<code·class="inline">gen_server</code>·calls241 thus·<code·class="inline">free</code>,·then·returns·<code·class="inline">ok</code>.</p><p>When·the·request·is·received,·the·<code·class="inline">gen_server</code>·calls
242 <code·class="inline">handle_cast(Request,·State)</code>,·which·is·expected·to·return·a·tuple242 <code·class="inline">handle_cast(Request,·State)</code>,·which·is·expected·to·return·a·tuple
243 <code·class="inline">{noreply,State1}</code>.·<code·class="inline">State1</code>·is·a·new·value·for·the·state·of·the·<code·class="inline">gen_server</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_cast</span><span·class="p"·data-group-id="9157699335-1">(</span><span·class="p"·data-group-id="9157699335-2">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="9157699335-2">}</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·88,·SHA:·adf8e8066a9a4ccbf2b5e144bf192e97b4639578ea406aecf08be38a1e8d08a7·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">243 <code·class="inline">{noreply,State1}</code>.·<code·class="inline">State1</code>·is·a·new·value·for·the·state·of·the·<code·class="inline">gen_server</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle_cast</span><span·class="p"·data-group-id="7520059561-1">(</span><span·class="p"·data-group-id="7520059561-2">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="7520059561-2">}</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·88,·SHA:·c070aebb8ac6a1523cf5b965149e292be36d85bb9a2bb83082e04dd08e730750·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
244 ····</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="9157699335-3">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="9157699335-3">)</span><span·class="p">,</span><span·class="w">244 ····</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="7520059561-3">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="7520059561-3">)</span><span·class="p">,</span><span·class="w">
245 ····</span><span·class="p"·data-group-id="9157699335-4">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="9157699335-4">}</span><span·class="p">.</span></code></pre><p>In·this·case,·the·new·state·is·the·updated·list·of·available·channels·<code·class="inline">Chs2</code>.245 ····</span><span·class="p"·data-group-id="7520059561-4">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="7520059561-4">}</span><span·class="p">.</span></code></pre><p>In·this·case,·the·new·state·is·the·updated·list·of·available·channels·<code·class="inline">Chs2</code>.
246 The·<code·class="inline">gen_server</code>·is·now·ready·for·new·requests.</p><h2·id="stopping"·class="section-heading">246 The·<code·class="inline">gen_server</code>·is·now·ready·for·new·requests.</p><h2·id="stopping"·class="section-heading">
247 ··<a·href="#stopping"·class="hover-link">247 ··<a·href="#stopping"·class="hover-link">
248 ····<i·class="ri-link-m"·aria-hidden="true"></i>248 ····<i·class="ri-link-m"·aria-hidden="true"></i>
249 ··</a>249 ··</a>
250 ··<span·class="text">Stopping</span>250 ··<span·class="text">Stopping</span>
251 </h2>251 </h2>
252 <h3·id="in-a-supervision-tree"·class="section-heading">252 <h3·id="in-a-supervision-tree"·class="section-heading">
Offset 257, 68 lines modifiedOffset 257, 68 lines modified
257 </h3>257 </h3>
258 <p>If·the·<code·class="inline">gen_server</code>·is·part·of·a·supervision·tree,·no·stop·function·is·needed.258 <p>If·the·<code·class="inline">gen_server</code>·is·part·of·a·supervision·tree,·no·stop·function·is·needed.
259 The·<code·class="inline">gen_server</code>·is·automatically·terminated·by·its·supervisor.·Exactly·how·this259 The·<code·class="inline">gen_server</code>·is·automatically·terminated·by·its·supervisor.·Exactly·how·this
260 is·done·is·defined·by·a·<a·href="sup_princ.html#shutdown">shutdown·strategy</a>·set·in·the260 is·done·is·defined·by·a·<a·href="sup_princ.html#shutdown">shutdown·strategy</a>·set·in·the
261 supervisor.</p><p>If·it·is·necessary·to·clean·up·before·termination,·the·shutdown·strategy·must·be261 supervisor.</p><p>If·it·is·necessary·to·clean·up·before·termination,·the·shutdown·strategy·must·be
262 a·time-out·value·and·the·<code·class="inline">gen_server</code>·must·be·set·to·trap·exit·signals·in262 a·time-out·value·and·the·<code·class="inline">gen_server</code>·must·be·set·to·trap·exit·signals·in
263 function·<code·class="inline">init</code>.·When·ordered·to·shutdown,·the·<code·class="inline">gen_server</code>·then·calls·the263 function·<code·class="inline">init</code>.·When·ordered·to·shutdown,·the·<code·class="inline">gen_server</code>·then·calls·the
264 callback·function·<code·class="inline">terminate(shutdown,·State)</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="4694434431-1">(</span><span·class="n">Args</span><span·class="p"·data-group-id="4694434431-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">264 callback·function·<code·class="inline">terminate(shutdown,·State)</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="5684137093-1">(</span><span·class="n">Args</span><span·class="p"·data-group-id="5684137093-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
265 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">265 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">
266 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="4694434431-2">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="4694434431-2">)</span><span·class="p">,</span><span·class="w">266 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="5684137093-2">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="5684137093-2">)</span><span·class="p">,</span><span·class="w">
267 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">267 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">
268 ····</span><span·class="p"·data-group-id="4694434431-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="4694434431-3">}</span><span·class="p">.</span><span·class="w">268 ····</span><span·class="p"·data-group-id="5684137093-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5684137093-3">}</span><span·class="p">.</span><span·class="w">
  
269 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">269 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
  
270 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="4694434431-4">(</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="4694434431-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">270 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="5684137093-4">(</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5684137093-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
271 ····</span><span·class="c1">%%·Code·for·cleaning·up·here</span><span·class="w">271 ····</span><span·class="c1">%%·Code·for·cleaning·up·here</span><span·class="w">
272 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">272 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
273 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><h3·id="standalone-gen_servers"·class="section-heading">273 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><h3·id="standalone-gen_servers"·class="section-heading">
274 ··<a·href="#standalone-gen_servers"·class="hover-link">274 ··<a·href="#standalone-gen_servers"·class="hover-link">
275 ····<i·class="ri-link-m"·aria-hidden="true"></i>275 ····<i·class="ri-link-m"·aria-hidden="true"></i>
276 ··</a>276 ··</a>
277 ··<span·class="text">Standalone·Gen_Servers</span>277 ··<span·class="text">Standalone·Gen_Servers</span>
278 </h3>278 </h3>
279 <p>If·the·<code·class="inline">gen_server</code>·is·not·part·of·a·supervision·tree,·a·stop·function·can·be279 <p>If·the·<code·class="inline">gen_server</code>·is·not·part·of·a·supervision·tree,·a·stop·function·can·be
280 useful,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">280 useful,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
281 </span><span·class="nf">export</span><span·class="p"·data-group-id="9156937153-1">(</span><span·class="p"·data-group-id="9156937153-2">[</span><span·class="ss">stop</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="9156937153-2">]</span><span·class="p"·data-group-id="9156937153-1">)</span><span·class="p">.</span><span·class="w">281 </span><span·class="nf">export</span><span·class="p"·data-group-id="8668965596-1">(</span><span·class="p"·data-group-id="8668965596-2">[</span><span·class="ss">stop</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="8668965596-2">]</span><span·class="p"·data-group-id="8668965596-1">)</span><span·class="p">.</span><span·class="w">
282 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">282 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
  
283 </span><span·class="nf">stop</span><span·class="p"·data-group-id="9156937153-3">(</span><span·class="p"·data-group-id="9156937153-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">283 </span><span·class="nf">stop</span><span·class="p"·data-group-id="8668965596-3">(</span><span·class="p"·data-group-id="8668965596-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 8415/49345 bytes (17.05%) of diff not shown.
33.2 KB
./usr/share/doc/erlang-doc/html/doc/system/included_applications.html
    
Offset 161, 75 lines modifiedOffset 161, 75 lines modified
161 belonging·to·the·primary·application.</p><h2·id="specifying-included-applications"·class="section-heading">161 belonging·to·the·primary·application.</p><h2·id="specifying-included-applications"·class="section-heading">
162 ··<a·href="#specifying-included-applications"·class="hover-link">162 ··<a·href="#specifying-included-applications"·class="hover-link">
163 ····<i·class="ri-link-m"·aria-hidden="true"></i>163 ····<i·class="ri-link-m"·aria-hidden="true"></i>
164 ··</a>164 ··</a>
165 ··<span·class="text">Specifying·Included·Applications</span>165 ··<span·class="text">Specifying·Included·Applications</span>
166 </h2>166 </h2>
167 <p>Which·applications·to·include·is·defined·by·the·<code·class="inline">included_applications</code>·key·in167 <p>Which·applications·to·include·is·defined·by·the·<code·class="inline">included_applications</code>·key·in
168 the·<code·class="inline">.app</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2156943829-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prim_app</span><span·class="p">,</span><span·class="w">168 the·<code·class="inline">.app</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0152100916-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prim_app</span><span·class="p">,</span><span·class="w">
169 ·</span><span·class="p"·data-group-id="2156943829-2">[</span><span·class="p"·data-group-id="2156943829-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Tree·application&quot;</span><span·class="p"·data-group-id="2156943829-3">}</span><span·class="p">,</span><span·class="w">169 ·</span><span·class="p"·data-group-id="0152100916-2">[</span><span·class="p"·data-group-id="0152100916-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Tree·application&quot;</span><span·class="p"·data-group-id="0152100916-3">}</span><span·class="p">,</span><span·class="w">
170 ··</span><span·class="p"·data-group-id="2156943829-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="2156943829-4">}</span><span·class="p">,</span><span·class="w">170 ··</span><span·class="p"·data-group-id="0152100916-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="0152100916-4">}</span><span·class="p">,</span><span·class="w">
171 ··</span><span·class="p"·data-group-id="2156943829-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2156943829-6">[</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pr[·...·truncated·by·diffoscope;·len:·198,·SHA:·dfd2cc743539c862fd3bf0a8027809891c76c2136f856c0d2da3fcd01c130ef5·...·]-5">}</span><span·class="p">,</span><span·class="w">171 ··</span><span·class="p"·data-group-id="0152100916-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0152100916-6">[</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pr[·...·truncated·by·diffoscope;·len:·198,·SHA:·4c22759e3a5f2b698036e0c4826e56f9673da28171e193194d68e3fcd07bb45c·...·]-5">}</span><span·class="p">,</span><span·class="w">
172 ··</span><span·class="p"·data-group-id="2156943829-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2156943829-8">[</span><span·class="ss">prim_app_server</span><span·class="p"·data-group-id="2156943829-8">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·531783b5f64a9e3e759f06dee899c6f3f63598a146b7e84814f18aeacc379d49·...·]-7">}</span><span·class="p">,</span><span·class="w">172 ··</span><span·class="p"·data-group-id="0152100916-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0152100916-8">[</span><span·class="ss">prim_app_server</span><span·class="p"·data-group-id="0152100916-8">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·c76e91c0b7f1cc39807b721040314f7763df0ac00930858777f38c5f14f4e643·...·]-7">}</span><span·class="p">,</span><span·class="w">
173 ··</span><span·class="p"·data-group-id="2156943829-9">{</span><span·class="ss">included_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2156943829-10">[</span><span·class="ss">incl_app</span><span·class="p"·data-group-id="2156943829-10">]</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·c0b4978f7da29d93d50a25be0b5fb29006a80900ea126c62bc1de8c7775e7b93·...·]-9">}</span><span·class="p">,</span><span·class="w">173 ··</span><span·class="p"·data-group-id="0152100916-9">{</span><span·class="ss">included_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0152100916-10">[</span><span·class="ss">incl_app</span><span·class="p"·data-group-id="0152100916-10">]</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·0cfa1db3457c6eb7c63273f79df62dc2190d6a5c0ca2f07b2105692daafa66e3·...·]-9">}</span><span·class="p">,</span><span·class="w">
174 ··</span><span·class="p"·data-group-id="2156943829-11">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2156943829-12">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·184,·SHA:·a4400c37fb25ce6cc8d31df147064d7719d4435efd0977f83af28b98a1a05ab6·...·]-11">}</span><span·class="p">,</span><span·class="w">174 ··</span><span·class="p"·data-group-id="0152100916-11">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0152100916-12">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·184,·SHA:·c7981fd4e79dc699c37bb72485e37b9d913d47a5bde967174f6f8cc94e50b747·...·]-11">}</span><span·class="p">,</span><span·class="w">
175 ··</span><span·class="p"·data-group-id="2156943829-13">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2156943829-14">{</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·class="p"·data-group-id="2156943829-15">[</span><span·class="p"·data-group-id="2156943829-15">]</span><span·class="p"·data-group-id="2156943829-14">}</span><span·class="p"·data-group-id="2156943829-13">}</span><span·class="p">,</span><span·class="w"> 
176 ··</span><span·class="p"·data-group-id="2156943829-16">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2156943829-17">[</span><span·class="p"·data-group-id="2156943829-18">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/usr/local/log&quot;</span><span·class="p"·data-group-id="2156943829-18">}</span><span·class="p"·data-group-id="2156943829-17">]</span><span·class="p"·data-group-id="2156943829-16">}</span><span·class="w"> 
177 ·</span><span·class="p"·data-group-id="2156943829-2">]</span><span·class="p"·data-group-id="2156943829-1">}</span><span·class="p">.</span></code></pre><h2·id="synchronizing-processes-during-startup"·class="section-heading">175 ··</span><span·class="p"·data-group-id="0152100916-13">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0152100916-14">{</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·248,·SHA:·a1aef751501f512410f072d6c8bdbcefd27b648e8c5b69608f1cda6d5fe48c8a·...·]">
 176 ··</span><span·class="p"·data-group-id="0152100916-16">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0152100916-17">[</span><span·class="p"·data-group-id="0152100916-18">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/usr/local/log&quot;</span><span·class="p"·data-group-id="0152100916-18">}</span><span·class="p"·data-group-id="0152100916-17">]</span><span·class="p"·data-group-id="0152100916-16">}</span><span·class="w">
 177 ·</span><span·class="p"·data-group-id="0152100916-2">]</span><span·class="p"·data-group-id="0152100916-1">}</span><span·class="p">.</span></code></pre><h2·id="synchronizing-processes-during-startup"·class="section-heading">
178 ··<a·href="#synchronizing-processes-during-startup"·class="hover-link">178 ··<a·href="#synchronizing-processes-during-startup"·class="hover-link">
179 ····<i·class="ri-link-m"·aria-hidden="true"></i>179 ····<i·class="ri-link-m"·aria-hidden="true"></i>
180 ··</a>180 ··</a>
181 ··<span·class="text">Synchronizing·Processes·during·Startup</span>181 ··<span·class="text">Synchronizing·Processes·during·Startup</span>
182 </h2>182 </h2>
183 <p>The·supervisor·tree·of·an·included·application·is·started·as·part·of·the183 <p>The·supervisor·tree·of·an·included·application·is·started·as·part·of·the
184 supervisor·tree·of·the·including·application.·If·there·is·a·need·for184 supervisor·tree·of·the·including·application.·If·there·is·a·need·for
185 synchronization·between·processes·in·the·including·and·included·applications,185 synchronization·between·processes·in·the·including·and·included·applications,
186 this·can·be·achieved·by·using·<em>start·phases</em>.</p><p>Start·phases·are·defined·by·the·<code·class="inline">start_phases</code>·key·in·the·<code·class="inline">.app</code>·file·as·a·list186 this·can·be·achieved·by·using·<em>start·phases</em>.</p><p>Start·phases·are·defined·by·the·<code·class="inline">start_phases</code>·key·in·the·<code·class="inline">.app</code>·file·as·a·list
187 of·tuples·<code·class="inline">{Phase,PhaseArgs}</code>,·where·<code·class="inline">Phase</code>·is·an·atom·and·<code·class="inline">PhaseArgs</code>·is·a187 of·tuples·<code·class="inline">{Phase,PhaseArgs}</code>,·where·<code·class="inline">Phase</code>·is·an·atom·and·<code·class="inline">PhaseArgs</code>·is·a
188 term.</p><p>The·value·of·the·<code·class="inline">mod</code>·key·of·the·including·application·must·be·set·to188 term.</p><p>The·value·of·the·<code·class="inline">mod</code>·key·of·the·including·application·must·be·set·to
189 <code·class="inline">{application_starter,[Module,StartArgs]}</code>,·where·<code·class="inline">Module</code>·as·usual·is·the189 <code·class="inline">{application_starter,[Module,StartArgs]}</code>,·where·<code·class="inline">Module</code>·as·usual·is·the
190 application·callback·module.·<code·class="inline">StartArgs</code>·is·a·term·provided·as·argument·to·the190 application·callback·module.·<code·class="inline">StartArgs</code>·is·a·term·provided·as·argument·to·the
191 callback·function·<code·class="inline">Module:start/2</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1003514112-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prim_app</span><span·class="p">,</span><span·class="w">191 callback·function·<code·class="inline">Module:start/2</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2118967516-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prim_app</span><span·class="p">,</span><span·class="w">
192 ·</span><span·class="p"·data-group-id="1003514112-2">[</span><span·class="p"·data-group-id="1003514112-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Tree·application&quot;</span><span·class="p"·data-group-id="1003514112-3">}</span><span·class="p">,</span><span·class="w">192 ·</span><span·class="p"·data-group-id="2118967516-2">[</span><span·class="p"·data-group-id="2118967516-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Tree·application&quot;</span><span·class="p"·data-group-id="2118967516-3">}</span><span·class="p">,</span><span·class="w">
193 ··</span><span·class="p"·data-group-id="1003514112-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="1003514112-4">}</span><span·class="p">,</span><span·class="w">193 ··</span><span·class="p"·data-group-id="2118967516-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="2118967516-4">}</span><span·class="p">,</span><span·class="w">
194 ··</span><span·class="p"·data-group-id="1003514112-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-6">[</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pr[·...·truncated·by·diffoscope;·len:·198,·SHA:·6cce7c68499bd2c3b9cdc5d4bc153a6d5e3f8c04c324bec051361314519f1e76·...·]-5">}</span><span·class="p">,</span><span·class="w">194 ··</span><span·class="p"·data-group-id="2118967516-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-6">[</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pr[·...·truncated·by·diffoscope;·len:·198,·SHA:·cb197ef930a5148943645eb12600b305150dc80bf3d984ca7c0c3a0ed728a844·...·]-5">}</span><span·class="p">,</span><span·class="w">
195 ··</span><span·class="p"·data-group-id="1003514112-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-8">[</span><span·class="ss">prim_app_server</span><span·class="p"·data-group-id="1003514112-8">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·f1e61e5646df8e589a4bf24d80b3cc849d0ff2479d76f804fd5c9f4bf4af7c76·...·]-7">}</span><span·class="p">,</span><span·class="w">195 ··</span><span·class="p"·data-group-id="2118967516-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-8">[</span><span·class="ss">prim_app_server</span><span·class="p"·data-group-id="2118967516-8">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·f1613a039dc9bc5651614d5b70c1ff9a00f824bc7776baf33f66897456eb218d·...·]-7">}</span><span·class="p">,</span><span·class="w">
196 ··</span><span·class="p"·data-group-id="1003514112-9">{</span><span·class="ss">included_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-10">[</span><span·class="ss">incl_app</span><span·class="p"·data-group-id="1003514112-10">]</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·d3011d717eba9736ab591694cfa5e3b32df61db018003bca5f4158843242fe73·...·]-9">}</span><span·class="p">,</span><span·class="w">196 ··</span><span·class="p"·data-group-id="2118967516-9">{</span><span·class="ss">included_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-10">[</span><span·class="ss">incl_app</span><span·class="p"·data-group-id="2118967516-10">]</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·87a046768c96923817bb678fada15a40176077fcbdd5a5e036742ed8522985db·...·]-9">}</span><span·class="p">,</span><span·class="w">
197 ··</span><span·class="p"·data-group-id="1003514112-11">{</span><span·class="ss">start_phases</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-12">[</span><span·class="p"·data-group-id="1003514112-13">{</span><span·class="ss">init</span><span·class="[·...·truncated·by·diffoscope;·len:·582,·SHA:·2f7151120f2f8b37bc17872a9d1212f212e6a80d882c88775f48fc25344abd60·...·]-11">}</span><span·class="p">,</span><span·class="w">197 ··</span><span·class="p"·data-group-id="2118967516-11">{</span><span·class="ss">start_phases</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-12">[</span><span·class="p"·data-group-id="2118967516-13">{</span><span·class="ss">init</span><span·class="[·...·truncated·by·diffoscope;·len:·582,·SHA:·ac88adf3733c96b839c26674f98261ba14e1e5e0ffe3597519fdd02aa16da5a2·...·]-11">}</span><span·class="p">,</span><span·class="w">
198 ··</span><span·class="p"·data-group-id="1003514112-17">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-18">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·184,·SHA:·6b0ad163b902ba26fe8b296e29cf88761547caefa76be19d997ee95a32d1ea51·...·]-17">}</span><span·class="p">,</span><span·class="w">198 ··</span><span·class="p"·data-group-id="2118967516-17">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-18">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·184,·SHA:·dd0e021d5ebe634fb9a4a7ea550952adf84915fc5ad714162f67b7e357bb3c5b·...·]-17">}</span><span·class="p">,</span><span·class="w">
199 ··</span><span·class="p"·data-group-id="1003514112-19">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-20">{</span><span·class="ss">application_starter</span><span·class="p">,</span><span·class="p"·data-group-id="1003514112-21">[</span><span·class="ss">prim_app_cb</span><span·class="p">,</span><span·class="p"·data-group-id="1003514112-22">[</span><span·class="p"·data-group-id="1003514112-22">]</span><span·class="p"·data-group-id="1003514112-21">]</span><span·class="p"·data-group-id="1003514112-20">}</span><span·class="p"·data-group-id="1003514112-19">}</span><span·class="p">,</span><span·class="w"> 
200 ··</span><span·class="p"·data-group-id="1003514112-23">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-24">[</span><span·class="p"·data-group-id="1003514112-25">{</span><span·class="ss">file</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·230,·SHA:·a04834f82e24b85ad8dbda59d5c0f229e788aeb6196c9fcd6fcb218cab680b1c·...·]</span><span·class="w">199 ··</span><span·class="p"·data-group-id="2118967516-19">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-20">{</span><span·class="ss">application_starter</span><span·class="p">,</span><span·class="p"·data-group-id="211896[·...·truncated·by·diffoscope;·len:·363,·SHA:·e58da0e1aae95a573ce5e3c4959819baffb613fb8c3be1d21552b7dedcee1966·...·]</span><span·class="w">
 200 ··</span><span·class="p"·data-group-id="2118967516-23">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-24">[</span><span·class="p"·data-group-id="2118967516-25">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/usr/local/log&quot;</span><span·class="p"·data-group-id="2118967516-25">}</span><span·class="p"·data-group-id="2118967516-24">]</span><span·class="p"·data-group-id="2118967516-23">}</span><span·class="w">
201 ·</span><span·class="p"·data-group-id="1003514112-2">]</span><span·class="p"·data-group-id="1003514112-1">}</span><span·class="p">.</span><span·class="w">201 ·</span><span·class="p"·data-group-id="2118967516-2">]</span><span·class="p"·data-group-id="2118967516-1">}</span><span·class="p">.</span><span·class="w">
  
202 </span><span·class="p"·data-group-id="1003514112-26">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">incl_app</span><span·class="p">,</span><span·class="w">202 </span><span·class="p"·data-group-id="2118967516-26">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">incl_app</span><span·class="p">,</span><span·class="w">
203 ·</span><span·class="p"·data-group-id="1003514112-27">[</span><span·class="p"·data-group-id="1003514112-28">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Included·application&quot;</span><span·class="p"·data-group-id="1003514112-28">}</span><span·class="p">,</span><span·class="w">203 ·</span><span·class="p"·data-group-id="2118967516-27">[</span><span·class="p"·data-group-id="2118967516-28">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Included·application&quot;</span><span·class="p"·data-group-id="2118967516-28">}</span><span·class="p">,</span><span·class="w">
204 ··</span><span·class="p"·data-group-id="1003514112-29">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="1003514112-29">}</span><span·class="p">,</span><span·class="w">204 ··</span><span·class="p"·data-group-id="2118967516-29">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="2118967516-29">}</span><span·class="p">,</span><span·class="w">
205 ··</span><span·class="p"·data-group-id="1003514112-30">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-31">[</span><span·class="ss">incl_app_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·201,·SHA:·02071265b5f65c348d0456ced0090d3030bcecc52eae8129792f18af2c86fe77·...·]-30">}</span><span·class="p">,</span><span·class="w">205 ··</span><span·class="p"·data-group-id="2118967516-30">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-31">[</span><span·class="ss">incl_app_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·201,·SHA:·2365917986f5dd5347ad9ecb36df1a41704ee92ce432f52d116abb9c4ce7b513·...·]-30">}</span><span·class="p">,</span><span·class="w">
206 ··</span><span·class="p"·data-group-id="1003514112-32">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-33">[</span><span·class="p"·data-group-id="1003514112-33">]</span><span·class="p"·data-group-id="1003514112-32">}</span><span·class="p">,</span><span·class="w">206 ··</span><span·class="p"·data-group-id="2118967516-32">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-33">[</span><span·class="p"·data-group-id="2118967516-33">]</span><span·class="p"·data-group-id="2118967516-32">}</span><span·class="p">,</span><span·class="w">
207 ··</span><span·class="p"·data-group-id="1003514112-34">{</span><span·class="ss">start_phases</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-35">[</span><span·class="p"·data-group-id="1003514112-36">{</span><span·class="ss">go</span><span·class="p"[·...·truncated·by·diffoscope;·len:·266,·SHA:·d5d940441d2617bab76f7d16d36b793f01c5d64ca72e963e9821d13cb364b1ce·...·]-34">}</span><span·class="p">,</span><span·class="w">207 ··</span><span·class="p"·data-group-id="2118967516-34">{</span><span·class="ss">start_phases</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-35">[</span><span·class="p"·data-group-id="2118967516-36">{</span><span·class="ss">go</span><span·class="p"[·...·truncated·by·diffoscope;·len:·266,·SHA:·3bd917e696a40857754549b0feaca401b084a6804dcc34a0be159abfbf50eaee·...·]-34">}</span><span·class="p">,</span><span·class="w">
208 ··</span><span·class="p"·data-group-id="1003514112-38">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-39">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·184,·SHA:·843c84d60a6a2f58a4bf362551e01248789456395ead0be7dd12421538f123b9·...·]-38">}</span><span·class="p">,</span><span·class="w">208 ··</span><span·class="p"·data-group-id="2118967516-38">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-39">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·184,·SHA:·14ff7abf5a58519143aee047c46a3ff9f97b132ce5baae6bec372849ff03da79·...·]-38">}</span><span·class="p">,</span><span·class="w">
209 ··</span><span·class="p"·data-group-id="1003514112-40">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1003514112-41">{</span><span·class="ss">incl_app_cb</span><span·class="p">,</span><span·class="p"·data-group-id="1003514112-42"[·...·truncated·by·diffoscope;·len:·158,·SHA:·4cf6aeb01a33cbf3a986526fefb3a38f3b1b31f82e8bf6d1e824692e946d96d1·...·]-40">}</span><span·class="w">209 ··</span><span·class="p"·data-group-id="2118967516-40">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118967516-41">{</span><span·class="ss">incl_app_cb</span><span·class="p">,</span><span·class="p"·data-group-id="2118967516-42"[·...·truncated·by·diffoscope;·len:·158,·SHA:·58c41053f83f70de864e2700532ee1aaa2ec6efefdbd9c1a9e1f4fec7c8911b1·...·]-40">}</span><span·class="w">
210 ·</span><span·class="p"·data-group-id="1003514112-27">]</span><span·class="p"·data-group-id="1003514112-26">}</span><span·class="p">.</span></code></pre><p>When·starting·a·primary·application·with·included·applications,·the·primary210 ·</span><span·class="p"·data-group-id="2118967516-27">]</span><span·class="p"·data-group-id="2118967516-26">}</span><span·class="p">.</span></code></pre><p>When·starting·a·primary·application·with·included·applications,·the·primary
211 application·is·started·the·normal·way,·that·is:</p><ul><li>The·application·controller·creates·an·application·master·for·the·application</li><li>The·application·master·calls·<code·class="inline">Module:start(normal,·StartArgs)</code>·to·start·the211 application·is·started·the·normal·way,·that·is:</p><ul><li>The·application·controller·creates·an·application·master·for·the·application</li><li>The·application·master·calls·<code·class="inline">Module:start(normal,·StartArgs)</code>·to·start·the
212 top·supervisor.</li></ul><p>Then,·for·the·primary·application·and·each·included·application·in·top-down,212 top·supervisor.</li></ul><p>Then,·for·the·primary·application·and·each·included·application·in·top-down,
213 left-to-right·order,·the·application·master·calls213 left-to-right·order,·the·application·master·calls
214 <code·class="inline">Module:start_phase(Phase,·Type,·PhaseArgs)</code>·for·each·phase·defined·for·the214 <code·class="inline">Module:start_phase(Phase,·Type,·PhaseArgs)</code>·for·each·phase·defined·for·the
215 primary·application,·in·that·order.·If·a·phase·is·not·defined·for·an·included215 primary·application,·in·that·order.·If·a·phase·is·not·defined·for·an·included
216 application,·the·function·is·not·called·for·this·phase·and·application.</p><p>The·following·requirements·apply·to·the·<code·class="inline">.app</code>·file·for·an·included·application:</p><ul><li>The·<code·class="inline">{mod,·{Module,StartArgs}}</code>·option·must·be·included.·This·option·is·used216 application,·the·function·is·not·called·for·this·phase·and·application.</p><p>The·following·requirements·apply·to·the·<code·class="inline">.app</code>·file·for·an·included·application:</p><ul><li>The·<code·class="inline">{mod,·{Module,StartArgs}}</code>·option·must·be·included.·This·option·is·used
217 to·find·the·callback·module·<code·class="inline">Module</code>·of·the·application.·<code·class="inline">StartArgs</code>·is217 to·find·the·callback·module·<code·class="inline">Module</code>·of·the·application.·<code·class="inline">StartArgs</code>·is
218 ignored,·as·<code·class="inline">Module:start/2</code>·is·called·only·for·the·primary·application.</li><li>If·the·included·application·itself·contains·included·applications,·instead·the218 ignored,·as·<code·class="inline">Module:start/2</code>·is·called·only·for·the·primary·application.</li><li>If·the·included·application·itself·contains·included·applications,·instead·the
219 <code·class="inline">{mod,·{application_starter,·[Module,StartArgs]}}</code>·option·must·be·included.</li><li>The·<code·class="inline">{start_phases,·[{Phase,PhaseArgs}]}</code>·option·must·be·included,·and·the·set219 <code·class="inline">{mod,·{application_starter,·[Module,StartArgs]}}</code>·option·must·be·included.</li><li>The·<code·class="inline">{start_phases,·[{Phase,PhaseArgs}]}</code>·option·must·be·included,·and·the·set
220 of·specified·phases·must·be·a·subset·of·the·set·of·phases·specified·for·the220 of·specified·phases·must·be·a·subset·of·the·set·of·phases·specified·for·the
221 primary·application.</li></ul><p>When·starting·<code·class="inline">prim_app</code>·as·defined·above,·the·application·controller·calls·the221 primary·application.</li></ul><p>When·starting·<code·class="inline">prim_app</code>·as·defined·above,·the·application·controller·calls·the
222 following·callback·functions·before·<code·class="inline">application:start(prim_app)</code>·returns·a222 following·callback·functions·before·<code·class="inline">application:start(prim_app)</code>·returns·a
223 value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5057386181-1">(</span><span·class="ss">prim_app</span><span·class="p"·data-group-id="5057386181-1">)</span><span·class="w">223 value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5914375036-1">(</span><span·class="ss">prim_app</span><span·class="p"·data-group-id="5914375036-1">)</span><span·class="w">
224 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">prim_app_cb</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5057386181-2">(</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5057386181-3">[</span><span·class="p"·data-group-id="5057386181-3">]</span><span·class="p"·data-group-id="5057386181-2">)</span><span·class="w">224 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">prim_app_cb</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5914375036-2">(</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914375036-3">[</span><span·class="p"·data-group-id="5914375036-3">]</span><span·class="p"·data-group-id="5914375036-2">)</span><span·class="w">
225 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">prim_app_cb</span><span·class="p">:</span><span·class="nf">start_phase</span><span·class="p"·data-group-id="5057386181-4">(</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5057386181-5">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·112c6839e4bce2bb22a09fad11f32c9f4424c11c5736b49590608c66decb4c78·...·]-4">)</span><span·class="w">225 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">prim_app_cb</span><span·class="p">:</span><span·class="nf">start_phase</span><span·class="p"·data-group-id="5914375036-4">(</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914375036-5">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·8d4dd9eae9e53766ab8f9f9d539031a7bd41b7dd0d07c1bcb1fcc7a12b4da682·...·]-4">)</span><span·class="w">
226 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">prim_app_cb</span><span·class="p">:</span><span·class="nf">start_phase</span><span·class="p"·data-group-id="5057386181-6">(</span><span·class="ss">go</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5057386181-7">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·cc500ca867de18b09dc4155feb26aea45d35f8b8fc7cee7bbd8658aecf097a27·...·]-6">)</span><span·class="w">226 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">prim_app_cb</span><span·class="p">:</span><span·class="nf">start_phase</span><span·class="p"·data-group-id="5914375036-6">(</span><span·class="ss">go</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914375036-7">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·6f0721912519392bca338f9d9004ffd2b3b6b75f037ea0fe679c41af8a995000·...·]-6">)</span><span·class="w">
227 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">incl_app_cb</span><span·class="p">:</span><span·class="nf">start_phase</span><span·class="p"·data-group-id="5057386181-8">(</span><span·class="ss">go</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5057386181-9">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·e74826ae9eeeec51ff461987cc9139d658cd44100f1265b75bc49b39f7167e0e·...·]-8">)</span><span·class="w">227 ·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">incl_app_cb</span><span·class="p">:</span><span·class="nf">start_phase</span><span·class="p"·data-group-id="5914375036-8">(</span><span·class="ss">go</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5914375036-9">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·d1e87bbdaed180fc0184d06bdfc087d397ebb2caafd4e76436f712ac9e1490b7·...·]-8">)</span><span·class="w">
228 </span><span·class="ss">ok</span></code></pre>228 </span><span·class="ss">ok</span></code></pre>
229 </div>229 </div>
  
230 <div·class="bottom-actions"·id="bottom-actions">230 <div·class="bottom-actions"·id="bottom-actions">
231 ··<div·class="bottom-actions-item">231 ··<div·class="bottom-actions-item">
  
232 ······<a·href="applications.html"·class="bottom-actions-button"·rel="prev">232 ······<a·href="applications.html"·class="bottom-actions-button"·rel="prev">
6.17 KB
./usr/share/doc/erlang-doc/html/doc/system/install-win32.html
    
Offset 295, 15 lines modifiedOffset 295, 15 lines modified
295 </span><span·class="gp·unselectable">$·</span><span·class="">cd·erts/emulator295 </span><span·class="gp·unselectable">$·</span><span·class="">cd·erts/emulator
296 </span><span·class="gp·unselectable">$·</span><span·class="">make·debug296 </span><span·class="gp·unselectable">$·</span><span·class="">make·debug
297 </span><span·class="gp·unselectable">$·</span><span·class="">cd·../etc297 </span><span·class="gp·unselectable">$·</span><span·class="">cd·../etc
298 </span><span·class="gp·unselectable">$·</span><span·class="">make·debug298 </span><span·class="gp·unselectable">$·</span><span·class="">make·debug
299 </span></code></pre><p>and·sometimes</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP299 </span></code></pre><p>and·sometimes</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP
300 </span><span·class="gp·unselectable">$·</span><span·class="">make·local_setup300 </span><span·class="gp·unselectable">$·</span><span·class="">make·local_setup
301 </span></code></pre><p>So·now·when·you·run·<code·class="inline">$ERL_TOP/erl.exe</code>,·you·should·have·a·debug·compiled301 </span></code></pre><p>So·now·when·you·run·<code·class="inline">$ERL_TOP/erl.exe</code>,·you·should·have·a·debug·compiled
302 emulator,·which·you·will·see·if·you·do·a:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="7794646114-1">(</span><span·class="ss">system_version</span><span·class="p"·data-group-id="7794646114-1">)</span><span·class="p">.</span></code></pre><p>in·the·erlang·shell.·If·the·returned·string·contains·<code·class="inline">[debug]</code>,·you302 emulator,·which·you·will·see·if·you·do·a:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="8825703122-1">(</span><span·class="ss">system_version</span><span·class="p"·data-group-id="8825703122-1">)</span><span·class="p">.</span></code></pre><p>in·the·erlang·shell.·If·the·returned·string·contains·<code·class="inline">[debug]</code>,·you
303 got·a·debug·compiled·emulator.</p><p>To·hack·the·erlang·libraries,·you·simply·do·a·<code·class="inline">make·opt</code>·in·the303 got·a·debug·compiled·emulator.</p><p>To·hack·the·erlang·libraries,·you·simply·do·a·<code·class="inline">make·opt</code>·in·the
304 specific·&quot;applications&quot;·directory,·like:</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP/lib/stdlib304 specific·&quot;applications&quot;·directory,·like:</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP/lib/stdlib
305 </span><span·class="gp·unselectable">$·</span><span·class="">make·opt305 </span><span·class="gp·unselectable">$·</span><span·class="">make·opt
306 </span></code></pre><p>or·even·in·the·source·directory...</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP/lib/stdlib/src306 </span></code></pre><p>or·even·in·the·source·directory...</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP/lib/stdlib/src
307 </span><span·class="gp·unselectable">$·</span><span·class="">make·opt307 </span><span·class="gp·unselectable">$·</span><span·class="">make·opt
308 </span></code></pre><p>Note·that·you're·expected·to·have·a·fresh·Erlang·in·your·path·when308 </span></code></pre><p>Note·that·you're·expected·to·have·a·fresh·Erlang·in·your·path·when
309 doing·this,·preferably·the·plain·27·you·have·built·in·the·previous309 doing·this,·preferably·the·plain·27·you·have·built·in·the·previous
Offset 318, 19 lines modifiedOffset 318, 19 lines modified
318 </span><span·class="">:$ERL_TOP/erts/etc/win32/wsl_tools:$ERL_TOP/bootstrap/bin:$PATH318 </span><span·class="">:$ERL_TOP/erts/etc/win32/wsl_tools:$ERL_TOP/bootstrap/bin:$PATH
319 </span></code></pre><p>That·should·make·it·possible·to·rebuild·any·library·without·hassle...</p><p>If·you·want·to·copy·a·library·(an·application)·newly·built,·to·a319 </span></code></pre><p>That·should·make·it·possible·to·rebuild·any·library·without·hassle...</p><p>If·you·want·to·copy·a·library·(an·application)·newly·built,·to·a
320 release·area,·you·do·like·with·the·emulator:</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP/lib/stdlib320 release·area,·you·do·like·with·the·emulator:</p><pre><code·class="makeup·shell"·translate="no"><span·class="gp·unselectable">$·</span><span·class="">cd·$ERL_TOP/lib/stdlib
321 </span><span·class="gp·unselectable">$·</span><span·class="">make·TESTROOT=/tmp/erlang_release·release321 </span><span·class="gp·unselectable">$·</span><span·class="">make·TESTROOT=/tmp/erlang_release·release
322 </span></code></pre><p>Remember·that:</p><ul><li><p>··Windows·specific·C-code·goes·in·the·<code·class="inline">$ERL_TOP/erts/emulator/sys/win32</code>,322 </span></code></pre><p>Remember·that:</p><ul><li><p>··Windows·specific·C-code·goes·in·the·<code·class="inline">$ERL_TOP/erts/emulator/sys/win32</code>,
323 <code·class="inline">$ERL_TOP/erts/emulator/drivers/win32</code>·or·<code·class="inline">$ERL_TOP/erts/etc/win32</code>.</p></li><li><p>··Windows·specific·erlang·code·should·be·used·conditionally·and·the323 <code·class="inline">$ERL_TOP/erts/emulator/drivers/win32</code>·or·<code·class="inline">$ERL_TOP/erts/etc/win32</code>.</p></li><li><p>··Windows·specific·erlang·code·should·be·used·conditionally·and·the
324 host·OS·tested·in·<em>runtime</em>,·the·exactly·same·beam·files·should·be324 host·OS·tested·in·<em>runtime</em>,·the·exactly·same·beam·files·should·be
325 distributed·for·every·platform!·So·write·code·like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">type</span><span·class="p"·data-group-id="5865963181-1">(</span><span·class="p"·data-group-id="5865963181-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">325 distributed·for·every·platform!·So·write·code·like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">type</span><span·class="p"·data-group-id="5333188277-1">(</span><span·class="p"·data-group-id="5333188277-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
326 ····</span><span·class="p"·data-group-id="5865963181-2">{</span><span·class="ss">win32</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="5865963181-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">326 ····</span><span·class="p"·data-group-id="5333188277-2">{</span><span·class="ss">win32</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="5333188277-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
327 ········</span><span·class="nf">do_windows_specific</span><span·class="p"·data-group-id="5865963181-3">(</span><span·class="p"·data-group-id="5865963181-3">)</span><span·class="p">;</span><span·class="w">327 ········</span><span·class="nf">do_windows_specific</span><span·class="p"·data-group-id="5333188277-3">(</span><span·class="p"·data-group-id="5333188277-3">)</span><span·class="p">;</span><span·class="w">
328 ····</span><span·class="n">Other</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">328 ····</span><span·class="n">Other</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
329 ········</span><span·class="nf">do_fallback_or_exit</span><span·class="p"·data-group-id="5865963181-4">(</span><span·class="p"·data-group-id="5865963181-4">)</span><span·class="w">329 ········</span><span·class="nf">do_fallback_or_exit</span><span·class="p"·data-group-id="5333188277-4">(</span><span·class="p"·data-group-id="5333188277-4">)</span><span·class="w">
330 </span><span·class="k">end</span><span·class="p">,</span></code></pre></li></ul><p>That's·basically·all·you·need·to·get·going.</p><h2·id="frequently-asked-questions"·class="section-heading">330 </span><span·class="k">end</span><span·class="p">,</span></code></pre></li></ul><p>That's·basically·all·you·need·to·get·going.</p><h2·id="frequently-asked-questions"·class="section-heading">
331 ··<a·href="#frequently-asked-questions"·class="hover-link">331 ··<a·href="#frequently-asked-questions"·class="hover-link">
332 ····<i·class="ri-link-m"·aria-hidden="true"></i>332 ····<i·class="ri-link-m"·aria-hidden="true"></i>
333 ··</a>333 ··</a>
334 ··<span·class="text">Frequently·Asked·Questions</span>334 ··<span·class="text">Frequently·Asked·Questions</span>
335 </h2>335 </h2>
336 <ul><li><p>··Q:·So,·now·I·can·build·Erlang·using·GCC·on·Windows?</p><p>A:·No,·unfortunately·not.·You'll·need·Microsoft's·Visual·C++336 <ul><li><p>··Q:·So,·now·I·can·build·Erlang·using·GCC·on·Windows?</p><p>A:·No,·unfortunately·not.·You'll·need·Microsoft's·Visual·C++
77.0 KB
./usr/share/doc/erlang-doc/html/doc/system/list_comprehensions.html
    
Offset 117, 33 lines modifiedOffset 117, 33 lines modified
  
117 <h2·id="simple-examples"·class="section-heading">117 <h2·id="simple-examples"·class="section-heading">
118 ··<a·href="#simple-examples"·class="hover-link">118 ··<a·href="#simple-examples"·class="hover-link">
119 ····<i·class="ri-link-m"·aria-hidden="true"></i>119 ····<i·class="ri-link-m"·aria-hidden="true"></i>
120 ··</a>120 ··</a>
121 ··<span·class="text">Simple·Examples</span>121 ··<span·class="text">Simple·Examples</span>
122 </h2>122 </h2>
123 <p>This·section·starts·with·a·simple·example,·showing·a·generator·and·a·filter:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="5338973740-1">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="533897[·...·truncated·by·diffoscope;·len:·650,·SHA:·cb30f2b2402a4056f1e6b10bdbd1943772e08a9a62a5bb9a84632dc8849ee33e·...·]-1">]</span><span·class="p">.</span><span·class="w">123 <p>This·section·starts·with·a·simple·example,·showing·a·generator·and·a·filter:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="1369915913-1">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="136991[·...·truncated·by·diffoscope;·len:·650,·SHA:·e0a7cb58edf53109768373989a88938be79f389320b1901f0a62d229ed96a00d·...·]-1">]</span><span·class="p">.</span><span·class="w">
124 </span><span·class="p"·data-group-id="5338973740-3">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">6</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·658c7c215e1127264721c0979e6012ec858cd210ed91ba998913962067da3c28·...·]-3">]</span></code></pre><p>This·is·read·as·follows:·The·list·of·X·such·that·X·is·taken·from·the·list124 </span><span·class="p"·data-group-id="1369915913-3">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">6</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·1a0028d1c150c7327c8e0873f9bbeb3e6548a58e8bb4a54073c58ab93299a60c·...·]-3">]</span></code></pre><p>This·is·read·as·follows:·The·list·of·X·such·that·X·is·taken·from·the·list
125 <code·class="inline">[1,2,a,...]</code>·and·X·is·greater·than·3.</p><p>The·notation·<code·class="inline">X·&lt;-·[1,2,a,...]</code>·is·a·generator·and·the·expression·<code·class="inline">X·&gt;·3</code>·is·a125 <code·class="inline">[1,2,a,...]</code>·and·X·is·greater·than·3.</p><p>The·notation·<code·class="inline">X·&lt;-·[1,2,a,...]</code>·is·a·generator·and·the·expression·<code·class="inline">X·&gt;·3</code>·is·a
126 filter.</p><p>An·additional·filter,·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_integer/1"><code·class="inline">is_integer(X)</code></a>,·can·be·added·to126 filter.</p><p>An·additional·filter,·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_integer/1"><code·class="inline">is_integer(X)</code></a>,·can·be·added·to
127 restrict·the·result·to·integers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="7687895356-1">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="768789[·...·truncated·by·diffoscope;·len:·861,·SHA:·fe84ecb24053cebc7e1f729d839d609a3be6afad882e56d0ab02b8f9c8c940cd·...·]6-1">]</span><span·class="p">.</span><span·class="w">127 restrict·the·result·to·integers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="8337514886-1">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="833751[·...·truncated·by·diffoscope;·len:·861,·SHA:·d53e9815824a8d8de0fb7e581275c192781b395277c27c9e4c0e1ba2b7e6ebf8·...·]6-1">]</span><span·class="p">.</span><span·class="w">
128 </span><span·class="p"·data-group-id="7687895356-4">[</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7687895356-4">]</span></code></pre><p>Generators·can·be·combined.·For·example,·the·Cartesian·product·of·two·lists·can128 </span><span·class="p"·data-group-id="8337514886-4">[</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="8337514886-4">]</span></code></pre><p>Generators·can·be·combined.·For·example,·the·Cartesian·product·of·two·lists·can
129 be·written·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="9820706076-1">[</span><span·class="p"·data-group-id="9820706076-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="9820706076-2">}</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·739,·SHA:·2bf44ff7a2ebef546bfffd80602ae08cb2b9f5d7fcaf04a22a380bc60504575b·...·]-1">]</span><span·class="p">.</span><span·class="w">129 be·written·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="4820232578-1">[</span><span·class="p"·data-group-id="4820232578-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="4820232578-2">}</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·739,·SHA:·22c837abd7d62d5b37eefec914f55ec0a040bcfc43620d4162390d4261d20af5·...·]-1">]</span><span·class="p">.</span><span·class="w">
130 </span><span·class="p"·data-group-id="9820706076-5">[</span><span·class="p"·data-group-id="9820706076-6">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="9820706076-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·1011,·SHA:·f252320f7e9658dfa5ed7229808183531212fbdcc74d609c0591d694b89b9eb5·...·]-5">]</span></code></pre><h2·id="quick-sort"·class="section-heading">130 </span><span·class="p"·data-group-id="4820232578-5">[</span><span·class="p"·data-group-id="4820232578-6">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="4820232578-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·1011,·SHA:·2b1456d5f26aa54ab50f8baa059b8d6ea28863c784c558ffd9cbf74ad1720b31·...·]-5">]</span></code></pre><h2·id="quick-sort"·class="section-heading">
131 ··<a·href="#quick-sort"·class="hover-link">131 ··<a·href="#quick-sort"·class="hover-link">
132 ····<i·class="ri-link-m"·aria-hidden="true"></i>132 ····<i·class="ri-link-m"·aria-hidden="true"></i>
133 ··</a>133 ··</a>
134 ··<span·class="text">Quick·Sort</span>134 ··<span·class="text">Quick·Sort</span>
135 </h2>135 </h2>
136 <p>The·well-known·quick·sort·routine·can·be·written·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sort</span><span·class="p"·data-group-id="1417434377-1">(</span><span·class="p"·data-group-id="1417434377-2">[</span><span·class="p"·data-group-id="1417434377-2">]</span><span·class="p"·data-group-id="1417434377-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·94,·SHA:·96ea94c42760ceee81d1d7befda7eb3c0d35aab4e9e9235c7ca29637a6cdc4bc·...·]-3">]</span><span·class="p">;</span><span·class="w">136 <p>The·well-known·quick·sort·routine·can·be·written·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sort</span><span·class="p"·data-group-id="1995454428-1">(</span><span·class="p"·data-group-id="1995454428-2">[</span><span·class="p"·data-group-id="1995454428-2">]</span><span·class="p"·data-group-id="1995454428-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·94,·SHA:·8a3d992e9397e95c930d519f95088e1bdcf59e3883237699acd9e0d1fd04ccca·...·]-3">]</span><span·class="p">;</span><span·class="w">
137 </span><span·class="nf">sort</span><span·class="p"·data-group-id="1417434377-4">(</span><span·class="p"·data-group-id="1417434377-5">[</span><span·class="p">_</span><span·class="p"·data-group-id="1417434377-5">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·83ebe3492a17135f2dd33c9ef6f95250641d18279863fe332ed664ea110a7481·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">L</span><span·class="p">;</span><span·class="w">137 </span><span·class="nf">sort</span><span·class="p"·data-group-id="1995454428-4">(</span><span·class="p"·data-group-id="1995454428-5">[</span><span·class="p">_</span><span·class="p"·data-group-id="1995454428-5">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·6914eb583710a9ca37ea811e5ba59a64024a28a30feba52c3029bd86d80666d2·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">L</span><span·class="p">;</span><span·class="w">
138 </span><span·class="nf">sort</span><span·class="p"·data-group-id="1417434377-6">(</span><span·class="p"·data-group-id="1417434377-7">[</span><span·class="n">Pivot</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="1417434377-7">]</span><span·class="p"·data-group-id="1417434377-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 </span><span·class="nf">sort</span><span·class="p"·data-group-id="1995454428-6">(</span><span·class="p"·data-group-id="1995454428-7">[</span><span·class="n">Pivot</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="1995454428-7">]</span><span·class="p"·data-group-id="1995454428-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ····</span><span·class="nf">sort</span><span·class="p"·data-group-id="1417434377-8">(</span><span·class="p"·data-group-id="1417434377-9">[</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·332,·SHA:·8f3049f6e3292f78dba49f15b44162282daad0b0a3eb5373e67eeec1ffb59111·...·]-8">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">139 ····</span><span·class="nf">sort</span><span·class="p"·data-group-id="1995454428-8">(</span><span·class="p"·data-group-id="1995454428-9">[</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·332,·SHA:·bc6992ba70d4467a2b9253a7aea8533536a53638679e26bc2611dc91b73964e9·...·]-8">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">
140 ····</span><span·class="p"·data-group-id="1417434377-10">[</span><span·class="n">Pivot</span><span·class="p"·data-group-id="1417434377-10">]</span><span·class="w">·</span><span·class="o">++</span><span·class="w">140 ····</span><span·class="p"·data-group-id="1995454428-10">[</span><span·class="n">Pivot</span><span·class="p"·data-group-id="1995454428-10">]</span><span·class="w">·</span><span·class="o">++</span><span·class="w">
141 ····</span><span·class="nf">sort</span><span·class="p"·data-group-id="1417434377-11">(</span><span·class="p"·data-group-id="1417434377-12">[</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·336,·SHA:·81f524f7c09f116132539918919ead2c1beca4688bfbf5c801fcd934068b2849·...·]-11">)</span><span·class="p">.</span></code></pre><p>The·expression·<code·class="inline">[X·||·X·&lt;-·T,·X·&lt;·Pivot]</code>·is·the·list·of·all·elements·in·<code·class="inline">T</code>141 ····</span><span·class="nf">sort</span><span·class="p"·data-group-id="1995454428-11">(</span><span·class="p"·data-group-id="1995454428-12">[</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·336,·SHA:·61ae7ec91d7be405372c184a699f92644d0ccff8ae73ded2ec6e16aa38747526·...·]-11">)</span><span·class="p">.</span></code></pre><p>The·expression·<code·class="inline">[X·||·X·&lt;-·T,·X·&lt;·Pivot]</code>·is·the·list·of·all·elements·in·<code·class="inline">T</code>
142 that·are·less·than·<code·class="inline">Pivot</code>.</p><p><code·class="inline">[X·||·X·&lt;-·T,·X·&gt;=·Pivot]</code>·is·the·list·of·all·elements·in·<code·class="inline">T</code>·that·are·greater142 that·are·less·than·<code·class="inline">Pivot</code>.</p><p><code·class="inline">[X·||·X·&lt;-·T,·X·&gt;=·Pivot]</code>·is·the·list·of·all·elements·in·<code·class="inline">T</code>·that·are·greater
143 than·or·equal·to·<code·class="inline">Pivot</code>.</p><p>With·the·algorithm·above,·a·list·is·sorted·as·follows:</p><ul><li>A·list·with·zero·or·one·element·is·trivially·sorted.</li><li>For·lists·with·more·than·one·element:<ol><li>The·first·element·in·the·list·is·isolated·as·the·pivot·element.</li><li>The·remaining·list·is·partitioned·into·two·sublists,·such·that:</li></ol><ul><li>The·first·sublist·contains·all·elements·that·are·smaller·than·the·pivot143 than·or·equal·to·<code·class="inline">Pivot</code>.</p><p>With·the·algorithm·above,·a·list·is·sorted·as·follows:</p><ul><li>A·list·with·zero·or·one·element·is·trivially·sorted.</li><li>For·lists·with·more·than·one·element:<ol><li>The·first·element·in·the·list·is·isolated·as·the·pivot·element.</li><li>The·remaining·list·is·partitioned·into·two·sublists,·such·that:</li></ol><ul><li>The·first·sublist·contains·all·elements·that·are·smaller·than·the·pivot
144 element.</li><li>The·second·sublist·contains·all·elements·that·are·greater·than·or·equal·to144 element.</li><li>The·second·sublist·contains·all·elements·that·are·greater·than·or·equal·to
145 the·pivot·element.</li></ul><ol><li>The·sublists·are·recursively·sorted·by·the·same·algorithm·and·the·results145 the·pivot·element.</li></ul><ol><li>The·sublists·are·recursively·sorted·by·the·same·algorithm·and·the·results
146 are·combined,·resulting·in·a·list·consisting·of:</li></ol><ul><li>All·elements·from·the·first·sublist,·that·is·all·elements·smaller·than·the146 are·combined,·resulting·in·a·list·consisting·of:</li></ol><ul><li>All·elements·from·the·first·sublist,·that·is·all·elements·smaller·than·the
147 pivot·element,·in·sorted·order.</li><li>The·pivot·element.</li><li>All·elements·from·the·second·sublist,·that·is·all·elements·greater·than·or147 pivot·element,·in·sorted·order.</li><li>The·pivot·element.</li><li>All·elements·from·the·second·sublist,·that·is·all·elements·greater·than·or
148 equal·to·the·pivot·element,·in·sorted·order.</li></ul></li></ul><blockquote><h4·class="info">Note</h4><p>While·the·sorting·algorithm·as·shown·above·serves·as·a·nice·example·to148 equal·to·the·pivot·element,·in·sorted·order.</li></ul></li></ul><blockquote><h4·class="info">Note</h4><p>While·the·sorting·algorithm·as·shown·above·serves·as·a·nice·example·to
Offset 151, 93 lines modifiedOffset 151, 93 lines modified
151 <a·href="../../lib/stdlib-6.0.1/doc/html/lists.html"><code·class="inline">lists</code></a>·module·contains·sorting·functions·that·are·implemented·in·a·more151 <a·href="../../lib/stdlib-6.0.1/doc/html/lists.html"><code·class="inline">lists</code></a>·module·contains·sorting·functions·that·are·implemented·in·a·more
152 efficient·way.</p></blockquote><h2·id="permutations"·class="section-heading">152 efficient·way.</p></blockquote><h2·id="permutations"·class="section-heading">
153 ··<a·href="#permutations"·class="hover-link">153 ··<a·href="#permutations"·class="hover-link">
154 ····<i·class="ri-link-m"·aria-hidden="true"></i>154 ····<i·class="ri-link-m"·aria-hidden="true"></i>
155 ··</a>155 ··</a>
156 ··<span·class="text">Permutations</span>156 ··<span·class="text">Permutations</span>
157 </h2>157 </h2>
158 <p>The·following·example·generates·all·permutations·of·the·elements·in·a·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">perms</span><span·class="p"·data-group-id="8034699460-1">(</span><span·class="p"·data-group-id="8034699460-2">[</span><span·class="p"·data-group-id="8034699460-2">]</span><span·class="p"·data-group-id="8034699460-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8034699460-3">[</span><span·class="p"·data-group-id="8034699460-4">[</span><span·class="p"·data-group-id="8034699460-4">]</span><span·class="p"·data-group-id="8034699460-3">]</span><span·class="p">;</span><span·class="w"> 
159 </span><span·class="nf">perms</span><span·class="p"·data-group-id="8034699460-5">(</span><span·class="n">L</span><span·class="p"·data-group-id="8034699460-5">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p[·...·truncated·by·diffoscope;·len:·1101,·SHA:·c339741d7f92835eaa424b1952e8c8bb8e39d20f99f34eaab9a7c2bb5c9c83af·...·]158 <p>The·following·example·generates·all·permutations·of·the·elements·in·a·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">perms</span><span·class="p"·data-group-id="6729295135-1">(</span><span·class="p"·data-group-id="6729295135-2">[·...·truncated·by·diffoscope;·len:·442,·SHA:·f248381d704aa3c5bf234599744c3bd6ab5b618870b3d6ffc7244b57e19b168b·...·]
 159 </span><span·class="nf">perms</span><span·class="p"·data-group-id="6729295135-5">(</span><span·class="n">L</span><span·class="p"·data-group-id="6729295135-5">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6729295135-6">[</span><span·class="p"·data-group-id="6729295135-7">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="6729295135-7">]</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">H</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">perms</span><span·class="p"·data-group-id="6729295135-8">(</span><span·class="n">L</span><span·class="o">--</span><span·class="p"·data-group-id="6729295135-9">[</span><span·class="n">H</span><span·class="p"·data-group-id="6729295135-9">]</span><span·class="p"·data-group-id="6729295135-8">)</span><span·class="p"·data-group-id="6729295135-6">]</span><span·class="p">.</span></code></pre><p>This·takes·<code·class="inline">H</code>·from·<code·class="inline">L</code>·in·all·possible·ways.·The·result·is·the·set·of·all·lists
160 <code·class="inline">[H|T]</code>,·where·<code·class="inline">T</code>·is·the·set·of·all·possible·permutations·of·<code·class="inline">L</code>,·with·<code·class="inline">H</code>160 <code·class="inline">[H|T]</code>,·where·<code·class="inline">T</code>·is·the·set·of·all·possible·permutations·of·<code·class="inline">L</code>,·with·<code·class="inline">H</code>
161 removed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">perms</span><span·class="p"·data-group-id="9342471935-1">(</span><span·class="p"·data-group-id="9342471935-2">[</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">u</span><span·class="p">,</span><span·class="ss">g</span><span·class="p"·data-group-id="9342471935-2">]</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·4b48ba9bcbe0837abd938954e76bc057aed5cc7182b43ae8a12bf10f677a227d·...·]-1">)</span><span·class="p">.</span><span·class="w">161 removed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">perms</span><span·class="p"·data-group-id="9537590540-1">(</span><span·class="p"·data-group-id="9537590540-2">[</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">u</span><span·class="p">,</span><span·class="ss">g</span><span·class="p"·data-group-id="9537590540-2">]</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·d23fad56a9a5e5f68d01cf7fcb1285de215bb0be11eab96288f0e66c99d00df3·...·]-1">)</span><span·class="p">.</span><span·class="w">
162 </span><span·class="p"·data-group-id="9342471935-3">[</span><span·class="p"·data-group-id="9342471935-4">[</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">u</span><span·class="p">,</span><span·class="ss">g</span><span·class="p"·data-group-id="9342471935-4">]</span><span·[·...·truncated·by·diffoscope;·len:·1300,·SHA:·c4a40d5e083e43c7b663a8d8b023150ef4c068e35b776dd028248d21cc6eca6a·...·]-3">]</span></code></pre><h2·id="pythagorean-triplets"·class="section-heading">162 </span><span·class="p"·data-group-id="9537590540-3">[</span><span·class="p"·data-group-id="9537590540-4">[</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">u</span><span·class="p">,</span><span·class="ss">g</span><span·class="p"·data-group-id="9537590540-4">]</span><span·[·...·truncated·by·diffoscope;·len:·1300,·SHA:·33f7be98360cf8cd181e542ff17c0b9fef1c4e626530b8617fbc689023223a0d·...·]-3">]</span></code></pre><h2·id="pythagorean-triplets"·class="section-heading">
163 ··<a·href="#pythagorean-triplets"·class="hover-link">163 ··<a·href="#pythagorean-triplets"·class="hover-link">
164 ····<i·class="ri-link-m"·aria-hidden="true"></i>164 ····<i·class="ri-link-m"·aria-hidden="true"></i>
165 ··</a>165 ··</a>
166 ··<span·class="text">Pythagorean·Triplets</span>166 ··<span·class="text">Pythagorean·Triplets</span>
167 </h2>167 </h2>
168 <p>Pythagorean·triplets·are·sets·of·integers·<code·class="inline">{A,B,C}</code>·such·that168 <p>Pythagorean·triplets·are·sets·of·integers·<code·class="inline">{A,B,C}</code>·such·that
169 <code·class="inline">A**2·+·B**2·=·C**2</code>.</p><p>The·function·<code·class="inline">pyth(N)</code>·generates·a·list·of·all·integers·<code·class="inline">{A,B,C}</code>·such·that169 <code·class="inline">A**2·+·B**2·=·C**2</code>.</p><p>The·function·<code·class="inline">pyth(N)</code>·generates·a·list·of·all·integers·<code·class="inline">{A,B,C}</code>·such·that
170 <code·class="inline">A**2·+·B**2·=·C**2</code>·and·where·the·sum·of·the·sides·is·equal·to,·or·less·than,170 <code·class="inline">A**2·+·B**2·=·C**2</code>·and·where·the·sum·of·the·sides·is·equal·to,·or·less·than,
171 <code·class="inline">N</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">pyth</span><span·class="p"·data-group-id="7591977460-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="7591977460-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 <code·class="inline">N</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">pyth</span><span·class="p"·data-group-id="0077461233-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="0077461233-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ····</span><span·class="p"·data-group-id="7591977460-2">[</span><span·class="w">·</span><span·class="p"·data-group-id="7591977460-3">{</span><span·class="n">A</span><span·class="p">,</span><span·class="n">B</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="759197[·...·truncated·by·diffoscope;·len:·4,·SHA:·b99262e08a9b3a0ee4aaf9b34e504704ec1d74e86e1423496b827ae4501127b6·...·]-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">172 ····</span><span·class="p"·data-group-id="0077461233-2">[</span><span·class="w">·</span><span·class="p"·data-group-id="0077461233-3">{</span><span·class="n">A</span><span·class="p">,</span><span·class="n">B</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="007746[·...·truncated·by·diffoscope;·len:·4,·SHA:·4654d793972c3b6a1d48fb0ab58d9cb0de46c3d33d605f9222c283dfaa12d420·...·]-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">
173 ········</span><span·class="n">A</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="7591977460-4">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="7591977460-4">)</span><span·class="p">,</span><span·class="w">173 ········</span><span·class="n">A</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="0077461233-4">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0077461233-4">)</span><span·class="p">,</span><span·class="w">
174 ········</span><span·class="n">B</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="7591977460-5">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="7591977460-5">)</span><span·class="p">,</span><span·class="w">174 ········</span><span·class="n">B</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="0077461233-5">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0077461233-5">)</span><span·class="p">,</span><span·class="w">
175 ········</span><span·class="n">C</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="7591977460-6">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="7591977460-6">)</span><span·class="p">,</span><span·class="w">175 ········</span><span·class="n">C</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="0077461233-6">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0077461233-6">)</span><span·class="p">,</span><span·class="w">
176 ········</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">+</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">176 ········</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">+</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">
177 ········</span><span·class="n">A</span><span·class="o">*</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">*</span><span·class="n">B</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">C</span><span·class="o">*</span><span·class="n">C</span><span·class="w">177 ········</span><span·class="n">A</span><span·class="o">*</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">*</span><span·class="n">B</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">C</span><span·class="o">*</span><span·class="n">C</span><span·class="w">
178 ····</span><span·class="p"·data-group-id="7591977460-2">]</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="7355305772-1">(</span><span·class="mi">3</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·67af4f99c8ff54da5bd6ae974fea78147a3eefcf759cd27717db014d0d64579c·...·]-1">)</span><span·class="p">.</span><span·class="w">178 ····</span><span·class="p"·data-group-id="0077461233-2">]</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="3017824961-1">(</span><span·class="mi">3</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·a1aaaf4fcfc734ffcff9a5213c320ed887237df3606d4fd06ceda0eac7b6c144·...·]-1">)</span><span·class="p">.</span><span·class="w">
179 </span><span·class="p"·data-group-id="7355305772-2">[</span><span·class="p"·data-group-id="7355305772-2">]</span><span·class="p">.</span><span·class="gp·unselectable">179 </span><span·class="p"·data-group-id="3017824961-2">[</span><span·class="p"·data-group-id="3017824961-2">]</span><span·class="p">.</span><span·class="gp·unselectable">
180 &gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="7355305772-3">(</span><span·class="mi">11</span><span·class="p"·data-group-id="7355305772-3">)</span><span·class="p">.</span><span·class="w">180 &gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="3017824961-3">(</span><span·class="mi">11</span><span·class="p"·data-group-id="3017824961-3">)</span><span·class="p">.</span><span·class="w">
181 </span><span·class="p"·data-group-id="7355305772-4">[</span><span·class="p"·data-group-id="7355305772-4">]</span><span·class="p">.</span><span·class="gp·unselectable">181 </span><span·class="p"·data-group-id="3017824961-4">[</span><span·class="p"·data-group-id="3017824961-4">]</span><span·class="p">.</span><span·class="gp·unselectable">
182 &gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="7355305772-5">(</span><span·class="mi">12</span><span·class="p"·data-group-id="7355305772-5">)</span><span·class="p">.</span><span·class="w">182 &gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="3017824961-5">(</span><span·class="mi">12</span><span·class="p"·data-group-id="3017824961-5">)</span><span·class="p">.</span><span·class="w">
183 </span><span·class="p"·data-group-id="7355305772-6">[</span><span·class="p"·data-group-id="7355305772-7">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7355305772-7">}</span><span[·...·truncated·by·diffoscope;·len:·289,·SHA:·6cc58d7e3a999a67bbb738f5d1b3412d5ad71e316377b5e24fe9dfcd81f2607b·...·]-6">]</span><span·class="gp·unselectable">183 </span><span·class="p"·data-group-id="3017824961-6">[</span><span·class="p"·data-group-id="3017824961-7">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="3017824961-7">}</span><span[·...·truncated·by·diffoscope;·len:·289,·SHA:·bd4d6fae6a52c93bc58f1f63d245c1112bd585d79cd691875cd192186d613631·...·]-6">]</span><span·class="gp·unselectable">
184 &gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="7355305772-9">(</span><span·class="mi">50</span><span·class="p"·data-group-id="7355305772-9">)</span><span·class="p">.</span><span·class="w">184 &gt;·</span><span·class="nf">pyth</span><span·class="p"·data-group-id="3017824961-9">(</span><span·class="mi">50</span><span·class="p"·data-group-id="3017824961-9">)</span><span·class="p">.</span><span·class="w">
185 </span><span·class="p"·data-group-id="7355305772-10">[</span><span·class="p"·data-group-id="7355305772-11">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7355305772-11">}</span><span·class="p">,</span><span·class="w">185 </span><span·class="p"·data-group-id="3017824961-10">[</span><span·class="p"·data-group-id="3017824961-11">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="3017824961-11">}</span><span·class="p">,</span><span·class="w">
186 ·</span><span·class="p"·data-group-id="7355305772-12">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7355305772-12">}</span><span·class="p">,</span><span·class="w">186 ·</span><span·class="p"·data-group-id="3017824961-12">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="3017824961-12">}</span><span·class="p">,</span><span·class="w">
187 ·</span><span·class="p"·data-group-id="7355305772-13">{</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">13</span><span·class="p"·data-group-id="7355305772-13">}</span><span·class="p">,</span><span·class="w">187 ·</span><span·class="p"·data-group-id="3017824961-13">{</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">13</span><span·class="p"·data-group-id="3017824961-13">}</span><span·class="p">,</span><span·class="w">
188 ·</span><span·class="p"·data-group-id="7355305772-14">{</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="7355305772-14">}</span><span·class="p">,</span><span·class="w">188 ·</span><span·class="p"·data-group-id="3017824961-14">{</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="3017824961-14">}</span><span·class="p">,</span><span·class="w">
189 ·</span><span·class="p"·data-group-id="7355305772-15">{</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="7355305772-15">}</span><span·class="p">,</span><span·class="w">189 ·</span><span·class="p"·data-group-id="3017824961-15">{</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="3017824961-15">}</span><span·class="p">,</span><span·class="w">
190 ·</span><span·class="p"·data-group-id="7355305772-16">{</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">17</span><span·class="p"·data-group-id="7355305772-16">}</span><span·class="p">,</span><span·class="w">190 ·</span><span·class="p"·data-group-id="3017824961-16">{</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">17</span><span·class="p"·data-group-id="3017824961-16">}</span><span·class="p">,</span><span·class="w">
191 ·</span><span·class="p"·data-group-id="7355305772-17">{</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">15</span><span·class="p"·data-group-id="7355305772-17">}</span><span·class="p">,</span><span·class="w">191 ·</span><span·class="p"·data-group-id="3017824961-17">{</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">15</span><span·class="p"·data-group-id="3017824961-17">}</span><span·class="p">,</span><span·class="w">
192 ·</span><span·class="p"·data-group-id="7355305772-18">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">13</span><span·class="p"·data-group-id="7355305772-18">}</span><span·class="p">,</span><span·class="w">192 ·</span><span·class="p"·data-group-id="3017824961-18">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">13</span><span·class="p"·data-group-id="3017824961-18">}</span><span·class="p">,</span><span·class="w">
193 ·</span><span·class="p"·data-group-id="7355305772-19">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">15</span><span·class="p"·data-group-id="7355305772-19">}</span><span·class="p">,</span><span·class="w">193 ·</span><span·class="p"·data-group-id="3017824961-19">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">15</span><span·class="p"·data-group-id="3017824961-19">}</span><span·class="p">,</span><span·class="w">
194 ·</span><span·class="p"·data-group-id="7355305772-20">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">20</span><span·class="p"·data-group-id="7355305772-20">}</span><span·class="p">,</span><span·class="w">194 ·</span><span·class="p"·data-group-id="3017824961-20">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">20</span><span·class="p"·data-group-id="3017824961-20">}</span><span·class="p">,</span><span·class="w">
195 ·</span><span·class="p"·data-group-id="7355305772-21">{</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">17</span><span·class="p"·data-group-id="7355305772-21">}</span><span·class="p">,</span><span·class="w">195 ·</span><span·class="p"·data-group-id="3017824961-21">{</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">17</span><span·class="p"·data-group-id="3017824961-21">}</span><span·class="p">,</span><span·class="w">
196 ·</span><span·class="p"·data-group-id="7355305772-22">{</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">20</span><span·class="p"·data-group-id="7355305772-22">}</span><span·class="p"·data-group-id="7355305772-10">]</span[·...·truncated·by·diffoscope;·len:·282,·SHA:·01a783161a05b97bc6c6fe7650465e70b3ec0f3e61d2245f70ec4a8a10b673c2·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">196 ·</span><span·class="p"·data-group-id="3017824961-22">{</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="mi">20</span><span·class="p"·data-group-id="3017824961-22">}</span><span·class="p"·data-group-id="3017824961-10">]</span[·...·truncated·by·diffoscope;·len:·282,·SHA:·eadf182b0a338aa0314323bbaeb3cdd5fc55bb47eb1760c729944f546e44f5be·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
197 ···</span><span·class="p"·data-group-id="7421665622-2">[</span><span·class="p"·data-group-id="7421665622-3">{</span><span·class="n">A</span><span·class="p">,</span><span·class="n">B</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="7421665622-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">197 ···</span><span·class="p"·data-group-id="2292055803-2">[</span><span·class="p"·data-group-id="2292055803-3">{</span><span·class="n">A</span><span·class="p">,</span><span·class="n">B</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="2292055803-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">
198 ·······</span><span·class="n">A</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="7421665622-4">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">2</span><span·class="p"·data-group-id="7421665622-4">)</span><span·class="p">,</span><span·class="w">198 ·······</span><span·class="n">A</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="2292055803-4">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">2</span><span·class="p"·data-group-id="2292055803-4">)</span><span·class="p">,</span><span·class="w">
199 ·······</span><span·class="n">B</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="7421665622-5">(</span><span·class="n">A</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="7421665622-5">)</span><span·class="p">,</span><span·class="w">199 ·······</span><span·class="n">B</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="2292055803-5">(</span><span·class="n">A</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="2292055803-5">)</span><span·class="p">,</span><span·class="w">
200 ·······</span><span·class="n">C</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="7421665622-6">(</span><span·class="n">B</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="7421665622-6">)</span><span·class="p">,</span><span·class="w">200 ·······</span><span·class="n">C</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="2292055803-6">(</span><span·class="n">B</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="2292055803-6">)</span><span·class="p">,</span><span·class="w">
201 ·······</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">+</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">201 ·······</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">+</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">
202 ·······</span><span·class="n">A</span><span·class="o">*</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">*</span><span·class="n">B</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">C</span><span·class="o">*</span><span·class="n">C</span><span·class="w">·</span><span·class="p"·data-group-id="7421665622-2">]</span><span·class="p">.</span></code></pre><h2·id="simplifications-with-list-comprehensions"·class="section-heading">202 ·······</span><span·class="n">A</span><span·class="o">*</span><span·class="n">A</span><span·class="o">+</span><span·class="n">B</span><span·class="o">*</span><span·class="n">B</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">C</span><span·class="o">*</span><span·class="n">C</span><span·class="w">·</span><span·class="p"·data-group-id="2292055803-2">]</span><span·class="p">.</span></code></pre><h2·id="simplifications-with-list-comprehensions"·class="section-heading">
203 ··<a·href="#simplifications-with-list-comprehensions"·class="hover-link">203 ··<a·href="#simplifications-with-list-comprehensions"·class="hover-link">
204 ····<i·class="ri-link-m"·aria-hidden="true"></i>204 ····<i·class="ri-link-m"·aria-hidden="true"></i>
205 ··</a>205 ··</a>
206 ··<span·class="text">Simplifications·With·List·Comprehensions</span>206 ··<span·class="text">Simplifications·With·List·Comprehensions</span>
207 </h2>207 </h2>
208 <p>As·an·example,·list·comprehensions·can·be·used·to·simplify·some·of·the·functions208 <p>As·an·example,·list·comprehensions·can·be·used·to·simplify·some·of·the·functions
209 in·<code·class="inline">lists.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append</span><span·class="p"·data-group-id="5884420656-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="5884420656-1">)</span><span·class="w">···</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="p"·data-group-id="5884420656-2">[</span><span·class="n">X</span><[·...·truncated·by·diffoscope;·len:·411,·SHA:·be3647ac57b54b61de18f2b0232021efea30a91cc6e052344e85b413d6af53e2·...·]-2">]</span><span·class="p">.</span><span·class="w">209 in·<code·class="inline">lists.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append</span><span·class="p"·data-group-id="4438357113-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="4438357113-1">)</span><span·class="w">···</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="p"·data-group-id="4438357113-2">[</span><span·class="n">X</span><[·...·truncated·by·diffoscope;·len:·411,·SHA:·54f2f4ecb87af88e4d1367dcbaebd251ea89d00cded700ccfd236994e711ad28·...·]-2">]</span><span·class="p">.</span><span·class="w">
210 </span><span·class="nf">map</span><span·class="p"·data-group-id="5884420656-3">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="5884420656-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·440,·SHA:·c46379b7406843e7ea0f6334f79e126052430ad5e6d9d2aa49c4b72275793c70·...·]-4">]</span><span·class="p">.</span><span·class="w">210 </span><span·class="nf">map</span><span·class="p"·data-group-id="4438357113-3">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="4438357113-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·440,·SHA:·b50a5cb69a0abe36a212e84a11c52bd806fd79ecd4059b7306795dd85d1157ca·...·]-4">]</span><span·class="p">.</span><span·class="w">
211 </span><span·class="nf">filter</span><span·class="p"·data-group-id="5884420656-6">(</span><span·class="n">Pred</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="5884420656-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·514,·SHA:·328d764af059ec0bf3e6ce9aa98f3e42c38b9d36ee7f5bf6829026efd043ebba·...·]-7">]</span><span·class="p">.</span></code></pre><h2·id="variable-bindings-in-list-comprehensions"·class="section-heading">211 </span><span·class="nf">filter</span><span·class="p"·data-group-id="4438357113-6">(</span><span·class="n">Pred</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="4438357113-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·514,·SHA:·1e0079c7d9837a8254a7b3dbb77898a208792d64c4e03eab07496a79b41d42f5·...·]-7">]</span><span·class="p">.</span></code></pre><h2·id="variable-bindings-in-list-comprehensions"·class="section-heading">
212 ··<a·href="#variable-bindings-in-list-comprehensions"·class="hover-link">212 ··<a·href="#variable-bindings-in-list-comprehensions"·class="hover-link">
213 ····<i·class="ri-link-m"·aria-hidden="true"></i>213 ····<i·class="ri-link-m"·aria-hidden="true"></i>
214 ··</a>214 ··</a>
215 ··<span·class="text">Variable·Bindings·in·List·Comprehensions</span>215 ··<span·class="text">Variable·Bindings·in·List·Comprehensions</span>
216 </h2>216 </h2>
217 <p>The·scope·rules·for·variables·that·occur·in·list·comprehensions·are·as·follows:</p><ul><li>All·variables·that·occur·in·a·generator·pattern·are·assumed·to·be·&quot;fresh&quot;217 <p>The·scope·rules·for·variables·that·occur·in·list·comprehensions·are·as·follows:</p><ul><li>All·variables·that·occur·in·a·generator·pattern·are·assumed·to·be·&quot;fresh&quot;
218 variables.</li><li>Any·variables·that·are·defined·before·the·list·comprehension,·and·that·are218 variables.</li><li>Any·variables·that·are·defined·before·the·list·comprehension,·and·that·are
219 used·in·filters,·have·the·values·they·had·before·the·list·comprehension.</li><li>Variables·cannot·be·exported·from·a·list·comprehension.</li></ul><p>As·an·example·of·these·rules,·suppose·you·want·to·write·the·function·<code·class="inline">select</code>,219 used·in·filters,·have·the·values·they·had·before·the·list·comprehension.</li><li>Variables·cannot·be·exported·from·a·list·comprehension.</li></ul><p>As·an·example·of·these·rules,·suppose·you·want·to·write·the·function·<code·class="inline">select</code>,
220 which·selects·certain·elements·from·a·list·of·tuples.·Suppose·you·write220 which·selects·certain·elements·from·a·list·of·tuples.·Suppose·you·write
221 <code·class="inline">select(X,·L)·-&gt;·[Y·||·{X,·Y}·&lt;-·L].</code>·with·the·intention·of·extracting·all221 <code·class="inline">select(X,·L)·-&gt;·[Y·||·{X,·Y}·&lt;-·L].</code>·with·the·intention·of·extracting·all
222 tuples·from·<code·class="inline">L</code>,·where·the·first·item·is·<code·class="inline">X</code>.</p><p>Compiling·this·gives·the·following·diagnostic:</p><pre><code·class="text">./FileName.erl:Line:·Warning:·variable·'X'·shadowed·in·generate</code></pre><p>This·diagnostic·warns·that·the·variable·<code·class="inline">X</code>·in·the·pattern·is·not·the·same·as222 tuples·from·<code·class="inline">L</code>,·where·the·first·item·is·<code·class="inline">X</code>.</p><p>Compiling·this·gives·the·following·diagnostic:</p><pre><code·class="text">./FileName.erl:Line:·Warning:·variable·'X'·shadowed·in·generate</code></pre><p>This·diagnostic·warns·that·the·variable·<code·class="inline">X</code>·in·the·pattern·is·not·the·same·as
223 the·variable·<code·class="inline">X</code>·that·occurs·in·the·function·head.</p><p>Evaluating·<code·class="inline">select</code>·gives·the·following·result:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">select</span><span·class="p"·data-group-id="3040350621-1">(</span><span·class="ss">b</span><span·class="p">,</span><span·class="p"·data-group-id="3040350621-2">[</span><span·class="p"·data-group-id="3040350621-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·753,·SHA:·7b7728cdc572bb91ce60a5dbf158c36fcb13ab0964e22dc401b552d2868082a1·...·]1-1">)</span><span·class="p">.</span><span·class="w">223 the·variable·<code·class="inline">X</code>·that·occurs·in·the·function·head.</p><p>Evaluating·<code·class="inline">select</code>·gives·the·following·result:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">select</span><span·class="p"·data-group-id="2256207201-1">(</span><span·class="ss">b</span><span·class="p">,</span><span·class="p"·data-group-id="2256207201-2">[</span><span·class="p"·data-group-id="2256207201-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·753,·SHA:·45645bc852ca3ff66bb3a7b7c563525825f06d2f93785933a2a003b2b58406b0·...·]1-1">)</span><span·class="p">.</span><span·class="w">
224 </span><span·class="p"·data-group-id="3040350621-7">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="3040350621-7">]</span></code></pre><p>This·is·not·the·wanted·result.·To·achieve·the·desired·effect,·<code·class="inline">select</code>·must·be224 </span><span·class="p"·data-group-id="2256207201-7">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="2256207201-7">]</span></code></pre><p>This·is·not·the·wanted·result.·To·achieve·the·desired·effect,·<code·class="inline">select</code>·must·be
225 written·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">select</span><span·class="p"·data-group-id="8450988979-1">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="8450988979-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="p"·data-group-id="8450988979-2">[</span><span·class="n">Y</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="p"·data-group-id="8450988979-3">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8450988979-3">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">X1</span><span·class="p"·data-group-id="8450988979-2">]</span><span·class="p">.</span></code></pre><p>The·generator·now·contains·unbound·variables·and·the·test·has·been·moved·into 
226 the·filter.</p><p>This·now·works·as·expected:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">select</span><span·class="p"·data-group-id="1387431730-1">(</span><span·class="ss">b</span><span·class="p">,</span><span·class="p"·data-group-id="1387431730-2">[</span><span·class="p"·data-group-id="1387431730-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="1387431730-3">}</span><span·class="p">,</span><span·class="p"·data-group-id="1387431730-4">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1387431730-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="1387431730-5">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="1387431730-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="1387431730-6">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="1387431730-6">}</span><span·class="p"·data-group-id="1387431730-2">]</span><span·class="p"·data-group-id="1387431730-1">)</span><span·class="p">.</span><span·class="w"> 
227 </span><span·class="p"·data-group-id="1387431730-7">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="1387431730-7">]</span></code></pre><p>Also·note·that·a·variable·in·a·generator·pattern·will·shadow·a·variable·with·the 
228 same·name·bound·in·a·previous·generator·pattern.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="4559014429-1">[</span><span·class="p"·data-group-id="4559014429-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p"·data-group-id="4559014429-2">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="4559014429-3">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="4559014429-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="o">=</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="4559014429-4">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="4559014429-4">]</span><span·class="p"·data-group-id="4559014429-1">]</span><span·class="p">.</span><span·class="w"> 
229 </span><span·class="p"·data-group-id="4559014429-5">[</span><span·class="p"·data-group-id="4559014429-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="4559014429-6">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·1775,·SHA:·cb1d484cd0eb61f1957dd9152fb2d9b59efae8fae0d5d062c6889563b778f87c·...·]225 written·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">select</span><span·class="p"·data-group-id="2178540161-1">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·[·...·truncated·by·diffoscope;·len:·917,·SHA:·e738e983929a20495a68d3799b09284b10acec7913843c6b696e5dcd17c5933b·...·]
 226 the·filter.</p><p>This·now·works·as·expected:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">select</span><span·class="p"·data-group-id="7158264204-1">(</span><span·class="ss">b</span><span·class="p">,</span><span·class="p"·data-group-id="7158264204-2">[</span><span·class="p"·data-group-id="7158264204-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7158264204-3">}</span><span·class="p">,</span><span·class="p"·data-group-id="7158264204-4">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="7158264204-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="7158264204-5">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="7158264204-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="7158264204-6">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="7158264204-6">}</span><span·class="p"·data-group-id="7158264204-2">]</span><span·class="p"·data-group-id="7158264204-1">)</span><span·class="p">.</span><span·class="w">
 227 </span><span·class="p"·data-group-id="7158264204-7">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="7158264204-7">]</span></code></pre><p>Also·note·that·a·variable·in·a·generator·pattern·will·shadow·a·variable·with·the
 228 same·name·bound·in·a·previous·generator·pattern.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="1791351341-1">[</span><span·class="p"·data-group-id="1791351341-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p"·data-group-id="1791351341-2">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="1791351341-3">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="1791351341-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="o">=</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="1791351341-4">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1791351341-4">]</span><span·class="p"·data-group-id="1791351341-1">]</span><span·class="p">.</span><span·class="w">
 229 </span><span·class="p"·data-group-id="1791351341-5">[</span><span·class="p"·data-group-id="1791351341-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1791351341-6">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-7">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="1791351341-7">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-8">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1791351341-8">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-9">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1791351341-9">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-10">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="1791351341-10">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-11">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1791351341-11">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-12">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1791351341-12">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-13">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="1791351341-13">}</span><span·class="p">,</span><span·class="p"·data-group-id="1791351341-14">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1791351341-14">}</span><span·class="p"·data-group-id="1791351341-5">]</span></code></pre><p>A·consequence·of·the·rules·for·importing·variables·into·a·list·comprehensions·is
230 that·certain·pattern·matching·operations·must·be·moved·into·the·filters·and230 that·certain·pattern·matching·operations·must·be·moved·into·the·filters·and
231 cannot·be·written·directly·in·the·generators.</p><p>To·illustrate·this,·do·<em>not</em>·write·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="9269739521-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9269739521-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 cannot·be·written·directly·in·the·generators.</p><p>To·illustrate·this,·do·<em>not</em>·write·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="2207497421-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="2207497421-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">232 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
233 ····</span><span·class="p"·data-group-id="9269739521-2">[</span><span·class="w">·</span><span·class="n">Expression</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">PatternInvolving</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·246,·SHA:·cc180716c258da6808d385390a17c0334ff964fe4fba2bff4ab7ae222a5f638d·...·]21-2">]</span><span·class="w">233 ····</span><span·class="p"·data-group-id="2207497421-2">[</span><span·class="w">·</span><span·class="n">Expression</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">PatternInvolving</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·246,·SHA:·807f8f5b8b90935c86760faab2ef8b13ed7acddf8bba139aded4a982b5349758·...·]21-2">]</span><span·class="w">
234 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Instead,·write·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="0662103094-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0662103094-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">234 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Instead,·write·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="7150006700-1">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="7150006700-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
235 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">235 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
236 ····</span><span·class="p"·data-group-id="0662103094-2">[</span><span·class="w">·</span><span·class="n">Expression</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">PatternInvolving</span><span·class="w">·</span><span·class="n">Y1</span><span·class="w">[·...·truncated·by·diffoscope;·len:·419,·SHA:·c2b0cf8e7c414410ee0b9d6a1385bdf736ed052fa33b5913b7fc7e2582332331·...·]-2">]</span><span·class="w">236 ····</span><span·class="p"·data-group-id="7150006700-2">[</span><span·class="w">·</span><span·class="n">Expression</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">PatternInvolving</span><span·class="w">·</span><span·class="n">Y1</span><span·class="w">[·...·truncated·by·diffoscope;·len:·419,·SHA:·23239f37ff0cffb2bf4905f534254c0382f59faf47b684e6ea87e4fb04fe2e89·...·]-2">]</span><span·class="w">
237 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>237 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>
238 </div>238 </div>
Max diff block lines reached; 158/78686 bytes (0.20%) of diff not shown.
55.5 KB
./usr/share/doc/erlang-doc/html/doc/system/listhandling.html
    
Offset 120, 105 lines modifiedOffset 120, 105 lines modified
120 ····<i·class="ri-link-m"·aria-hidden="true"></i>120 ····<i·class="ri-link-m"·aria-hidden="true"></i>
121 ··</a>121 ··</a>
122 ··<span·class="text">Creating·a·List</span>122 ··<span·class="text">Creating·a·List</span>
123 </h2>123 </h2>
124 <p>Lists·can·only·be·built·starting·from·the·end·and·attaching·list·elements·at·the124 <p>Lists·can·only·be·built·starting·from·the·end·and·attaching·list·elements·at·the
125 beginning.·If·you·use·the·<code·class="inline">++</code>·operator·as·follows,·a·new·list·is·created·that125 beginning.·If·you·use·the·<code·class="inline">++</code>·operator·as·follows,·a·new·list·is·created·that
126 is·a·copy·of·the·elements·in·<code·class="inline">List1</code>,·followed·by·<code·class="inline">List2</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">List1</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">List2</span></code></pre><p>Looking·at·how·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#append/2"><code·class="inline">lists:append/2</code></a>·or·<code·class="inline">++</code>·would·be·implemented·in·plain·Erlang,126 is·a·copy·of·the·elements·in·<code·class="inline">List1</code>,·followed·by·<code·class="inline">List2</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">List1</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">List2</span></code></pre><p>Looking·at·how·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#append/2"><code·class="inline">lists:append/2</code></a>·or·<code·class="inline">++</code>·would·be·implemented·in·plain·Erlang,
127 clearly·the·first·list·is·copied:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append</span><span·class="p"·data-group-id="8056704566-1">(</span><span·class="p"·data-group-id="8056704566-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="8056704566-2">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·60,·SHA:·fe40e33188065a114615ee2e3028622e8a14c09826c9302f68bc2128cf507314·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">127 clearly·the·first·list·is·copied:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append</span><span·class="p"·data-group-id="6854250204-1">(</span><span·class="p"·data-group-id="6854250204-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="6854250204-2">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·60,·SHA:·77ce2ba18eef1dc9c60dedb7f47265c50c754b68c5d194c527d62e5c9eb0b780·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
128 ····</span><span·class="p"·data-group-id="8056704566-3">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">append</span><span·class="p"·data-group-id="8056704566-4">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</span><spa[·...·truncated·by·diffoscope;·len:·90,·SHA:·33b13f8fde429dc8bbab9a55c237fe71dcbe8ec568a8f2909fa61918ac394d0c·...·]-3">]</span><span·class="p">;</span><span·class="w">128 ····</span><span·class="p"·data-group-id="6854250204-3">[</span><span·class="n">H</span><span·class="p">|</span><span·class="nf">append</span><span·class="p"·data-group-id="6854250204-4">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</span><spa[·...·truncated·by·diffoscope;·len:·90,·SHA:·cccfe908c57db823f843494c0bc76c24c839ab003052c589634e9b23a2fc1c15·...·]-3">]</span><span·class="p">;</span><span·class="w">
129 </span><span·class="nf">append</span><span·class="p"·data-group-id="8056704566-5">(</span><span·class="p"·data-group-id="8056704566-6">[</span><span·class="p"·data-group-id="8056704566-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</span><span·class="p"·data-group-id="8056704566-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">129 </span><span·class="nf">append</span><span·class="p"·data-group-id="6854250204-5">(</span><span·class="p"·data-group-id="6854250204-6">[</span><span·class="p"·data-group-id="6854250204-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tail</span><span·class="p"·data-group-id="6854250204-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
130 ····</span><span·class="n">Tail</span><span·class="p">.</span></code></pre><p>When·recursing·and·building·a·list,·it·is·important·to·ensure·that·you·attach130 ····</span><span·class="n">Tail</span><span·class="p">.</span></code></pre><p>When·recursing·and·building·a·list,·it·is·important·to·ensure·that·you·attach
131 the·new·elements·to·the·beginning·of·the·list.·In·this·way,·you·will·build·<em>one</em>131 the·new·elements·to·the·beginning·of·the·list.·In·this·way,·you·will·build·<em>one</em>
132 list,·not·hundreds·or·thousands·of·copies·of·the·growing·result·list.</p><p>Let·us·first·see·how·it·is·not·to·be·done:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bad_fib</span><span·class="p"·data-group-id="2790665809-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="2790665809-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">132 list,·not·hundreds·or·thousands·of·copies·of·the·growing·result·list.</p><p>Let·us·first·see·how·it·is·not·to·be·done:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bad_fib</span><span·class="p"·data-group-id="6582413447-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="6582413447-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
133 ····</span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="2790665809-2">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·131,·SHA:·b63fe58139498aa94ca958f4d6db7fa2759fe560b5098061215b0a8c5ee8a5b6·...·]-2">)</span><span·class="p">.</span><span·class="w">133 ····</span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="6582413447-2">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·131,·SHA:·a1fb267550e7f7aa9489e061446ce5d29d8a8cc450d71cf60784e80c96f3cd87·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
134 </span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="2790665809-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Next</span><span·cl[·...·truncated·by·diffoscope;·len:·108,·SHA:·c34bae1cd45cb22cece8c1b0c189f6cd6d2173cc8783a1bb0acc7ffa192f51f6·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">134 </span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="6582413447-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Next</span><span·cl[·...·truncated·by·diffoscope;·len:·108,·SHA:·7b556a67040660474cd5ccd4733598edd1ffcf4f4eefb9b7ba37e0d5d0711738·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
135 ····</span><span·class="n">Fibs</span><span·class="p">;</span><span·class="w">135 ····</span><span·class="n">Fibs</span><span·class="p">;</span><span·class="w">
136 </span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="2790665809-5">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·59,·SHA:·98c57e60d88356d0de33faa5aff2879bedc32c32246025a7513dce784d567edf·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">136 </span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="6582413447-5">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·59,·SHA:·a5f7f446fd5808a083d94c35f82336e87ade6279b392988f716687a6d6c1ba4c·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
137 ····</span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="2790665809-6">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·464,·SHA:·38e52b4b5cdd92027215a90016b4f36f3974b6add55af29da14be11cca4db6c0·...·]-6">)</span><span·class="p">.</span></code></pre><p>Here·more·than·one·list·is·built.·In·each·iteration·step·a·new·list·is·created137 ····</span><span·class="nf">bad_fib</span><span·class="p"·data-group-id="6582413447-6">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·464,·SHA:·d4ca462379762939c13a231f79a835fac8a54a3277a30cf4b68b0d9a805d6c1c·...·]-6">)</span><span·class="p">.</span></code></pre><p>Here·more·than·one·list·is·built.·In·each·iteration·step·a·new·list·is·created
138 that·is·one·element·longer·than·the·new·previous·list.</p><p>To·avoid·copying·the·result·in·each·iteration,·build·the·list·in·reverse·order138 that·is·one·element·longer·than·the·new·previous·list.</p><p>To·avoid·copying·the·result·in·each·iteration,·build·the·list·in·reverse·order
139 and·reverse·the·list·when·you·are·done:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="9110387012-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="9110387012-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">139 and·reverse·the·list·when·you·are·done:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="5752119116-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="5752119116-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
140 ····</span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="9110387012-2">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·131,·SHA:·1c373a011a7a21e7555a8efc6c556bffc98e4544dda451e2c031cea96666cee4·...·]-2">)</span><span·class="p">.</span><span·class="w">140 ····</span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="5752119116-2">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·131,·SHA:·36dd04bc967db4b1f219b68c8832e876f7237f4fb2b1b74d5f0b86faedbee847·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
141 </span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="9110387012-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Next</span><span·cl[·...·truncated·by·diffoscope;·len:·108,·SHA:·a4588357d5c5859396bdcbd31c2396c4bac81e28b2b51376e0925ffe41f1f501·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">141 </span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="5752119116-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Next</span><span·cl[·...·truncated·by·diffoscope;·len:·108,·SHA:·df6c91d682809a4dc4f5dc78ad3349cad9b055bea488d822f5d33abe0b6c34fe·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
142 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="9110387012-5">(</span><span·class="n">Fibs</span><span·class="p"·data-group-id="9110387012-5">)</span><span·class="p">;</span><span·class="w">142 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="5752119116-5">(</span><span·class="n">Fibs</span><span·class="p"·data-group-id="5752119116-5">)</span><span·class="p">;</span><span·class="w">
143 </span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="9110387012-6">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·59,·SHA:·5558190f897c6095c938bc0bbda7d402d7b937f44fd5220dcee43904e9db8bca·...·]-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">143 </span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="5752119116-6">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Current</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·59,·SHA:·7463fab9ed13fd97b85bc86889538daaad1619a5a471ccd6d8f7076350fb5ddf·...·]-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
144 ····</span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="9110387012-7">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·415,·SHA:·548fa1fdf7847c0e90235b2c59e5200d4af1c8a6a6582983f9943d61643ba748·...·]-7">)</span><span·class="p">.</span></code></pre><h2·id="list-comprehensions"·class="section-heading">144 ····</span><span·class="nf">tail_recursive_fib</span><span·class="p"·data-group-id="5752119116-7">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Next</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·415,·SHA:·a42189c6655547c9426c6b4d97b79a7229aef91af995a53a99043a0fe0dd6a4c·...·]-7">)</span><span·class="p">.</span></code></pre><h2·id="list-comprehensions"·class="section-heading">
145 ··<a·href="#list-comprehensions"·class="hover-link">145 ··<a·href="#list-comprehensions"·class="hover-link">
146 ····<i·class="ri-link-m"·aria-hidden="true"></i>146 ····<i·class="ri-link-m"·aria-hidden="true"></i>
147 ··</a>147 ··</a>
148 ··<span·class="text">List·Comprehensions</span>148 ··<span·class="text">List·Comprehensions</span>
149 </h2>149 </h2>
150 <p>A·list·comprehension:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0897800018-1">[</span><span·class="n">Expr</span><span·class="p"·data-group-id="0897800018-2">(</span><span·class="n">E</span><span·class="p"·data-group-id="0897800018-2">)</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·676,·SHA:·009f90fd603529b278fc72e9d87d274580d70cea19a6e851a11349e2f67571d1·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">150 <p>A·list·comprehension:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9122265697-1">[</span><span·class="n">Expr</span><span·class="p"·data-group-id="9122265697-2">(</span><span·class="n">E</span><span·class="p"·data-group-id="9122265697-2">)</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·676,·SHA:·28998ec694cc96d20469375488565d38375e2a4e4997a3fb873d87fce2c33d52·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
151 ····</span><span·class="p"·data-group-id="9940918298-3">[</span><span·class="n">Expr</span><span·class="p"·data-group-id="9940918298-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="9940918298-4">)</span><span·class="p">|</span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·234,·SHA:·13e8b3cf081fcf8a16713ea7e1bac64b0aabe3173c0064542942a2ec190aba20·...·]-3">]</span><span·class="p">;</span><span·class="w">151 ····</span><span·class="p"·data-group-id="0739645821-3">[</span><span·class="n">Expr</span><span·class="p"·data-group-id="0739645821-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="0739645821-4">)</span><span·class="p">|</span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·234,·SHA:·7909030e211bd6b6eddb41dbef393fb13e69eb69b58e754656d5d5561b5c4fc1·...·]-3">]</span><span·class="p">;</span><span·class="w">
152 </span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="9940918298-6">(</span><span·class="p"·data-group-id="9940918298-7">[</span><span·class="p"·data-group-id="9940918298-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Expr</span><span·class="p"·data-group-id="9940918298-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9940918298-8">[</span><span·class="p"·data-group-id="9940918298-8">]</span><span·class="p">.</span></code></pre><p>If·the·result·of·the·list·comprehension·will·<em>obviously</em>·not·be·used,·a·list 
153 will·not·be·constructed.·For·example,·in·this·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2591113620-1">[</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">put_chars</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·406,·SHA:·915022284aa7cd502ec3661731068b40b1254a0dd3fd171c554dabe0491dc579·...·]152 </span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="0739645821-6">(</span><span·class="p"·data-group-id="0739645821-7">[</span><span·class="p"·data-group-id="0739645821-7">]</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·405,·SHA:·ddecba0481d3651c1e64bf00f2a6cbb139ffe17d5860979449e7554d305612a6·...·]
 153 will·not·be·constructed.·For·example,·in·this·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8408907370-1">[</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">put_chars</span><span·class="p"·data-group-id="8408907370-2">(</span><span·class="n">E</span><span·class="p"·data-group-id="8408907370-2">)</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">E</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="8408907370-1">]</span><span·class="p">,</span><span·class="w">
154 </span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>or·in·this·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="n">Var</span><span·class="w">·</span><span·class="k">of</span><span·class="w">154 </span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>or·in·this·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="n">Var</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
155 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">155 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
156 ········</span><span·class="p"·data-group-id="0483883336-1">[</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">put_chars</span><span·class="p"·data-group-id="0483883336-2">(</span><span·class="n">E</span><span·class="p"·data-group-id="0483883336-2">)</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·220,·SHA:·03f09537904ed2c6bbce6b83f824ca4c3ac9107787305bca6e1dd5e2ee24b572·...·]-1">]</span><span·class="p">;</span><span·class="w">156 ········</span><span·class="p"·data-group-id="2201465203-1">[</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">put_chars</span><span·class="p"·data-group-id="2201465203-2">(</span><span·class="n">E</span><span·class="p"·data-group-id="2201465203-2">)</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·220,·SHA:·06795d4ebccd188b4abe26d8a1eb0e98e1b7bf2d7103629dc30f679869f7ad4f·...·]-1">]</span><span·class="p">;</span><span·class="w">
157 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 </span><span·class="k">end</span><span·class="p">,</span><span·class="w">158 </span><span·class="k">end</span><span·class="p">,</span><span·class="w">
159 </span><span·class="nf">some_function</span><span·class="p"·data-group-id="0483883336-3">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0483883336-3">)</span><span·class="p">,</span></code></pre><p>the·value·is·not·assigned·to·a·variable,·not·passed·to·another·function,·and·not159 </span><span·class="nf">some_function</span><span·class="p"·data-group-id="2201465203-3">(</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="2201465203-3">)</span><span·class="p">,</span></code></pre><p>the·value·is·not·assigned·to·a·variable,·not·passed·to·another·function,·and·not
160 returned.·This·means·that·there·is·no·need·to·construct·a·list·and·the·compiler160 returned.·This·means·that·there·is·no·need·to·construct·a·list·and·the·compiler
161 will·simplify·the·code·for·the·list·comprehension·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="5582126543-1">(</span><span·class="p"·data-group-id="5582126543-2">[</span><span·class="n">E</span><span·class="p">|</span><span·class="n">Tail</span><span·class="p"·data-group-id="5582126543-2">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·63,·SHA:·b8c39ad177a4b5c2a7ce21fa534981ea481f87b454abe4e3e808b36d4d7dd8b5·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 will·simplify·the·code·for·the·list·comprehension·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="2944418437-1">(</span><span·class="p"·data-group-id="2944418437-2">[</span><span·class="n">E</span><span·class="p">|</span><span·class="n">Tail</span><span·class="p"·data-group-id="2944418437-2">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·63,·SHA:·6a99e76ccda68e18948360d8d9e39d0eddb5bda118fb8742cf724d07a5c12500·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="n">Expr</span><span·class="p"·data-group-id="5582126543-3">(</span><span·class="n">E</span><span·class="p"·data-group-id="5582126543-3">)</span><span·class="p">,</span><span·class="w">162 ····</span><span·class="n">Expr</span><span·class="p"·data-group-id="2944418437-3">(</span><span·class="n">E</span><span·class="p"·data-group-id="2944418437-3">)</span><span·class="p">,</span><span·class="w">
163 ····</span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="5582126543-4">(</span><span·class="n">Tail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Expr</span><span·class="p"·data-group-id="5582126543-4">)</span><span·class="p">;</span><span·class="w">163 ····</span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="2944418437-4">(</span><span·class="n">Tail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Expr</span><span·class="p"·data-group-id="2944418437-4">)</span><span·class="p">;</span><span·class="w">
164 </span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="5582126543-5">(</span><span·class="p"·data-group-id="5582126543-6">[</span><span·class="p"·data-group-id="5582126543-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Expr</span><span·class="p"·data-group-id="5582126543-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5582126543-7">[</span><span·class="p"·data-group-id="5582126543-7">]</span><span·class="p">.</span></code></pre><p>The·compiler·also·understands·that·assigning·to·<code·class="inline">_</code>·means·that·the·value·will 
165 not·be·used.·Therefore,·the·code·in·the·following·example·will·also·be·optimized:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·532,·SHA:·323a2963100ce7fb0fe620006ff9244025a1407b306c9566238d23467e8fbd7b·...·]164 </span><span·class="nf">&#39;lc^0&#39;</span><span·class="p"·data-group-id="2944418437-5">(</span><span·class="p"·data-group-id="2944418437-6">[</span><span·class="p"·data-group-id="2944418437-6">]</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·425,·SHA:·3f4c09ce7d56b7e418ba98ad083ddb6ddd5ebe976eddf0c190bf331f9325a806·...·]
 165 not·be·used.·Therefore,·the·code·in·the·following·example·will·also·be·optimized:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3419239060-1">[</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">put_chars</span><span·class="p"·data-group-id="3419239060-2">(</span><span·class="n">E</span><span·class="p"·data-group-id="3419239060-2">)</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">E</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="3419239060-1">]</span><span·class="p">,</span><span·class="w">
166 </span><span·class="ss">ok</span><span·class="p">.</span></code></pre><h2·id="deep-and-flat-lists"·class="section-heading">166 </span><span·class="ss">ok</span><span·class="p">.</span></code></pre><h2·id="deep-and-flat-lists"·class="section-heading">
167 ··<a·href="#deep-and-flat-lists"·class="hover-link">167 ··<a·href="#deep-and-flat-lists"·class="hover-link">
168 ····<i·class="ri-link-m"·aria-hidden="true"></i>168 ····<i·class="ri-link-m"·aria-hidden="true"></i>
169 ··</a>169 ··</a>
170 ··<span·class="text">Deep·and·Flat·Lists</span>170 ··<span·class="text">Deep·and·Flat·Lists</span>
171 </h2>171 </h2>
172 <p><a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#flatten/1"><code·class="inline">lists:flatten/1</code></a>·builds·an·entirely·new·list.·It·is·therefore·expensive,·and172 <p><a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#flatten/1"><code·class="inline">lists:flatten/1</code></a>·builds·an·entirely·new·list.·It·is·therefore·expensive,·and
173 even·<em>more</em>·expensive·than·the·<code·class="inline">++</code>·operator·(which·copies·its·left·argument,173 even·<em>more</em>·expensive·than·the·<code·class="inline">++</code>·operator·(which·copies·its·left·argument,
174 but·not·its·right·argument).</p><p>In·the·following·situations·it·is·unnecessary·to·call·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#flatten/1"><code·class="inline">lists:flatten/1</code></a>:</p><ul><li>When·sending·data·to·a·port.·Ports·understand·deep·lists·so·there·is·no·reason174 but·not·its·right·argument).</p><p>In·the·following·situations·it·is·unnecessary·to·call·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#flatten/1"><code·class="inline">lists:flatten/1</code></a>:</p><ul><li>When·sending·data·to·a·port.·Ports·understand·deep·lists·so·there·is·no·reason
175 to·flatten·the·list·before·sending·it·to·the·port.</li><li>When·calling·BIFs·that·accept·deep·lists,·such·as175 to·flatten·the·list·before·sending·it·to·the·port.</li><li>When·calling·BIFs·that·accept·deep·lists,·such·as
176 <a·href="../../erts-15.0.1/doc/html/erlang.html#list_to_binary/1"><code·class="inline">list_to_binary/1</code></a>·or176 <a·href="../../erts-15.0.1/doc/html/erlang.html#list_to_binary/1"><code·class="inline">list_to_binary/1</code></a>·or
177 <a·href="../../erts-15.0.1/doc/html/erlang.html#iolist_to_binary/1"><code·class="inline">iolist_to_binary/1</code></a>.</li><li>When·you·know·that·your·list·is·only·one·level·deep.·Use·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#append/1"><code·class="inline">lists:append/1</code></a>177 <a·href="../../erts-15.0.1/doc/html/erlang.html#iolist_to_binary/1"><code·class="inline">iolist_to_binary/1</code></a>.</li><li>When·you·know·that·your·list·is·only·one·level·deep.·Use·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#append/1"><code·class="inline">lists:append/1</code></a>
178 instead.</li></ul><p><em>Examples:</em></p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">port_command</span><span·class="p"·data-group-id="5485380103-1">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DeepList</span><span·class="p"·data-group-id="5485380103-1">)</span></code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"[·...·truncated·by·diffoscope;·len:·954,·SHA:·d5bde2b3a891412e8acb59424109d26931d26205d85a7b37199867b7e310f204·...·]-1">]</span><span·class="p">,</span><span·class="w">178 instead.</li></ul><p><em>Examples:</em></p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">port_command</span><span·class="p"·data-group-id="7596327749-1">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DeepList</span><span·class="p"·data-group-id="7596327749-1">)</span></code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"[·...·truncated·by·diffoscope;·len:·954,·SHA:·9675ab027a54904becbedd3e59490ba537550c53b573a6b841dcacdadd1d23a1·...·]-1">]</span><span·class="p">,</span><span·class="w">
179 </span><span·class="nf">port_command</span><span·class="p"·data-group-id="7573055533-2">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TerminatedStr</span><span·class="p"·data-group-id="7573055533-2">)</span></code></pre><p>Instead:</p><p><strong>DO</strong></p><pre><code·class=[·...·truncated·by·diffoscope;·len:·335,·SHA:·5a555eab29d6f8ada65570038f98360037ab501ccb9d4cc451723b34aef1c103·...·]-1">]</span><span·class="p">,</span><span·class="w">179 </span><span·class="nf">port_command</span><span·class="p"·data-group-id="7010773008-2">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TerminatedStr</span><span·class="p"·data-group-id="7010773008-2">)</span></code></pre><p>Instead:</p><p><strong>DO</strong></p><pre><code·class=[·...·truncated·by·diffoscope;·len:·335,·SHA:·c677b6f04d13b51ca41f132e515c33479d5f839e75ba97197c0cfa3b27e81b73·...·]-1">]</span><span·class="p">,</span><span·class="w">
180 </span><span·class="nf">port_command</span><span·class="p"·data-group-id="3408122350-2">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TerminatedStr</span><span·class="p"·data-group-id="3408122350-2">)</span></code></pre><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="8816283645-1">(</span><span·class="p"·data-group-id="8816283645-2">[</span><span·class="p"·data-group-id="8816283645-3">[</span><span·class="mi">1</span><span·class="p"·data-group-id="8816283645-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8816283645-4">[</span><span·class="mi">2</span><span·class="p"·data-group-id="8816283645-4">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8816283645-5">[</span><span·class="mi">3</span><span·class="p"·data-group-id="8816283645-5">]</span><span·class="p"·data-group-id="8816283645-2">]</span><span·class="p"·data-group-id="8816283645-1">)</span><span·class="p">.</span><span·class="w"> 
181 </span><span·class="p"·data-group-id="8816283645-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8816283645-6">]</span></code></pre><p><strong>DO·NOT</strong><[·...·truncated·by·diffoscope;·len:·867,·SHA:·6b78b9d6bf5deff1e6a77c5766b3c43feab198ff8e6a5d39cbe3c3c73b3eae46·...·]-1">)</span><span·class="p">.</span><span·class="w">180 </span><span·class="nf">port_command</span><span·class="p"·data-group-id="7707686137-2">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TerminatedStr</span><span·class="p"·data-group-id="7707686137-2">)</span></code></pre><p>[·...·truncated·by·diffoscope;·len:·886,·SHA:·26220303bf98910283f9ade65a4125bd37d25b6b1c2dfd87357dcb8eb08b92d8·...·]-1">)</span><span·class="p">.</span><span·class="w">
 181 </span><span·class="p"·data-group-id="3907216726-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="3907216726-6">]</span></code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="9877610778-1">(</span><span·class="p"·data-group-id="9877610778-2">[</span><span·class="p"·data-group-id="9877610778-3">[</span><span·class="mi">1</span><span·class="p"·data-group-id="9877610778-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9877610778-4">[</span><span·class="mi">2</span><span·class="p"·data-group-id="9877610778-4">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9877610778-5">[</span><span·class="mi">3</span><span·class="p"·data-group-id="9877610778-5">]</span><span·class="p"·data-group-id="9877610778-2">]</span><span·class="p"·data-group-id="9877610778-1">)</span><span·class="p">.</span><span·class="w">
182 </span><span·class="p"·data-group-id="2279076561-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="2279076561-6">]</span></code></pre><h2·id="recursive-list-functions"·class="section-heading">182 </span><span·class="p"·data-group-id="9877610778-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="9877610778-6">]</span></code></pre><h2·id="recursive-list-functions"·class="section-heading">
183 ··<a·href="#recursive-list-functions"·class="hover-link">183 ··<a·href="#recursive-list-functions"·class="hover-link">
184 ····<i·class="ri-link-m"·aria-hidden="true"></i>184 ····<i·class="ri-link-m"·aria-hidden="true"></i>
185 ··</a>185 ··</a>
186 ··<span·class="text">Recursive·List·Functions</span>186 ··<span·class="text">Recursive·List·Functions</span>
187 </h2>187 </h2>
188 <p>There·are·two·basic·ways·to·write·a·function·that·traverses·a·list·and188 <p>There·are·two·basic·ways·to·write·a·function·that·traverses·a·list·and
189 produces·a·new·list.</p><p>The·first·way·is·writing·a·<em>body-recursive</em>·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Add·42·to·each·integer·in·the·list.</span><span·class="w">189 produces·a·new·list.</p><p>The·first·way·is·writing·a·<em>body-recursive</em>·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Add·42·to·each·integer·in·the·list.</span><span·class="w">
190 </span><span·class="nf">add_42_body</span><span·class="p"·data-group-id="2652471064-1">(</span><span·class="p"·data-group-id="2652471064-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2652471064-2">]</span><span·class="p"·data-group-id="2652471064-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 </span><span·class="nf">add_42_body</span><span·class="p"·data-group-id="9484369385-1">(</span><span·class="p"·data-group-id="9484369385-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="9484369385-2">]</span><span·class="p"·data-group-id="9484369385-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ····</span><span·class="p"·data-group-id="2652471064-3">[</span><span·class="n">H</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">add_42_body</span><span[·...·truncated·by·diffoscope;·len:·166,·SHA:·baf507e0ae5deebd385af877a0ebaaf523d28fc1a283db722d832d86767efab9·...·]-3">]</span><span·class="p">;</span><span·class="w">191 ····</span><span·class="p"·data-group-id="9484369385-3">[</span><span·class="n">H</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">add_42_body</span><span[·...·truncated·by·diffoscope;·len:·166,·SHA:·4d339deaab7a81ab66bb26cf048b7330cfa0d84da398d9861996bd00aaf430ab·...·]-3">]</span><span·class="p">;</span><span·class="w">
192 </span><span·class="nf">add_42_body</span><span·class="p"·data-group-id="2652471064-5">(</span><span·class="p"·data-group-id="2652471064-6">[</span><span·class="p"·data-group-id="2652471064-6">]</span><span·class="p"·data-group-id="2652471064-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 </span><span·class="nf">add_42_body</span><span·class="p"·data-group-id="9484369385-5">(</span><span·class="p"·data-group-id="9484369385-6">[</span><span·class="p"·data-group-id="9484369385-6">]</span><span·class="p"·data-group-id="9484369385-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ····</span><span·class="p"·data-group-id="2652471064-7">[</span><span·class="p"·data-group-id="2652471064-7">]</span><span·class="p">.</span></code></pre><p>The·second·way·is·writing·a·<em>tail-recursive</em>·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Add·42·to·each·integer·in·the·list.</span><span·class="w">193 ····</span><span·class="p"·data-group-id="9484369385-7">[</span><span·class="p"·data-group-id="9484369385-7">]</span><span·class="p">.</span></code></pre><p>The·second·way·is·writing·a·<em>tail-recursive</em>·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Add·42·to·each·integer·in·the·list.</span><span·class="w">
194 </span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="8329427484-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="8329427484-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">194 </span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="0875393511-1">(</span><span·class="n">List</span><span·class="p"·data-group-id="0875393511-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
195 ····</span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="8329427484-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8329427484-3">[</span><span·class="p"·data-group-id="8329427484-3">]</span><span·class="p"·data-group-id="8329427484-2">)</span><span·class="p">.</span><span·class="w">195 ····</span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="0875393511-2">(</span><span·class="n">List</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0875393511-3">[</span><span·class="p"·data-group-id="0875393511-3">]</span><span·class="p"·data-group-id="0875393511-2">)</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="8329427484-4">(</span><span·class="p"·data-group-id="8329427484-5">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="8329427484-5">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·62b4ae3dd83ba9aad97535d886b08cb1c6b67d2c7b2e4f25db5dc9ce0ef6c0d9·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">196 </span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="0875393511-4">(</span><span·class="p"·data-group-id="0875393511-5">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="0875393511-5">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·59,·SHA:·2a2e6e41ae8bcd52c11deed52aae13d4922e55c9c30f292e890df4252b14f806·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
197 ····</span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="8329427484-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8329427484-7">[</span><span·class="n">H</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·205,·SHA:·0e9bf4c3ff49fbfeb8eb023e2f765e2ad7c35a2a356e213c59b94e9bf1af9812·...·]-6">)</span><span·class="p">;</span><span·class="w">197 ····</span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="0875393511-6">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0875393511-7">[</span><span·class="n">H</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·205,·SHA:·c75919e74e2dc4925fb0f7927cd22ccb6c1946b0cd5aa1048f0fa9a422b9ea95·...·]-6">)</span><span·class="p">;</span><span·class="w">
198 </span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="8329427484-8">(</span><span·class="p"·data-group-id="8329427484-9">[</span><span·class="p"·data-group-id="8329427484-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="8329427484-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 </span><span·class="nf">add_42_tail</span><span·class="p"·data-group-id="0875393511-8">(</span><span·class="p"·data-group-id="0875393511-9">[</span><span·class="p"·data-group-id="0875393511-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="0875393511-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="8329427484-10">(</span><span·class="n">Acc</span><span·class="p"·data-group-id="8329427484-10">)</span><span·class="p">.</span></code></pre><p>In·early·version·of·Erlang·the·tail-recursive·function·would·typically199 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="0875393511-10">(</span><span·class="n">Acc</span><span·class="p"·data-group-id="0875393511-10">)</span><span·class="p">.</span></code></pre><p>In·early·version·of·Erlang·the·tail-recursive·function·would·typically
200 be·more·efficient.·In·modern·versions·of·Erlang,·there·is·usually·not200 be·more·efficient.·In·modern·versions·of·Erlang,·there·is·usually·not
201 much·difference·in·performance·between·a·body-recursive·list·function·and201 much·difference·in·performance·between·a·body-recursive·list·function·and
202 tail-recursive·function·that·reverses·the·list·at·the·end.·Therefore,202 tail-recursive·function·that·reverses·the·list·at·the·end.·Therefore,
203 concentrate·on·writing·beautiful·code·and·forget·about·the·performance203 concentrate·on·writing·beautiful·code·and·forget·about·the·performance
204 of·your·list·functions.·In·the·time-critical·parts·of·your·code,204 of·your·list·functions.·In·the·time-critical·parts·of·your·code,
205 <em>measure</em>·before·rewriting·your·code.</p><p>For·a·thorough·discussion·about·tail·and·body·recursion,·see205 <em>measure</em>·before·rewriting·your·code.</p><p>For·a·thorough·discussion·about·tail·and·body·recursion,·see
206 <a·href="http://ferd.ca/erlang-s-tail-recursion-is-not-a-silver-bullet.html">Erlang's·Tail·Recursion·is·Not·a·Silver·Bullet</a>.</p><blockquote><h4·class="info">Note</h4><p>This·section·is·about·list·functions·that·<em>construct</em>·lists.·A·tail-recursive206 <a·href="http://ferd.ca/erlang-s-tail-recursion-is-not-a-silver-bullet.html">Erlang's·Tail·Recursion·is·Not·a·Silver·Bullet</a>.</p><blockquote><h4·class="info">Note</h4><p>This·section·is·about·list·functions·that·<em>construct</em>·lists.·A·tail-recursive
207 function·that·does·not·construct·a·list·runs·in·constant·space,·while·the207 function·that·does·not·construct·a·list·runs·in·constant·space,·while·the
208 corresponding·body-recursive·function·uses·stack·space·proportional·to·the208 corresponding·body-recursive·function·uses·stack·space·proportional·to·the
209 length·of·the·list.</p></blockquote><p>For·example,·a·function·that·sums·a·list·of·integers,·is·<em>not</em>·to·be·written·as209 length·of·the·list.</p></blockquote><p>For·example,·a·function·that·sums·a·list·of·integers,·is·<em>not</em>·to·be·written·as
210 follows:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">recursive_sum</span><span·class="p"·data-group-id="3559353036-1">(</span><span·class="p"·data-group-id="3559353036-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="3559353036-2">]</span><span·class="p"·data-group-id="3559353036-1">)</span><sp[·...·truncated·by·diffoscope;·len:·276,·SHA:·0a7afa7b2bf33fa45ffe91d9b5d8e5e63b8006987d7eed937b5fa301f45d51fe·...·]-3">)</span><span·class="p">;</span><span·class="w">210 follows:</p><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">recursive_sum</span><span·class="p"·data-group-id="6328306737-1">(</span><span·class="p"·data-group-id="6328306737-2">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="6328306737-2">]</span><span·class="p"·data-group-id="6328306737-1">)</span><sp[·...·truncated·by·diffoscope;·len:·276,·SHA:·481859df0304dea7e1787c4997ae09ca924a48e105ae988dd06e92828f73a384·...·]-3">)</span><span·class="p">;</span><span·class="w">
211 </span><span·class="nf">recursive_sum</span><span·class="p"·data-group-id="3559353036-4">(</span><span·class="p"·data-group-id="3559353036-5">[</span><span·class="p"·data-group-id="3559353036-5">]</span><span·class="p"·data-group-id="3559353036-4">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·606,·SHA:·fd9de55b76bc59613b9e807532d7228970892af2442df3cfe92d585cb6714a96·...·]-2">)</span><span·class="p">.</span><span·class="w">211 </span><span·class="nf">recursive_sum</span><span·class="p"·data-group-id="6328306737-4">(</span><span·class="p"·data-group-id="6328306737-5">[</span><span·class="p"·data-group-id="6328306737-5">]</span><span·class="p"·data-group-id="6328306737-4">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·606,·SHA:·47a237b55c2d1ba6d9ce2cbd21794dbdcf392264fcc1cfe81a5090f86beaa48c·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
212 </span><span·class="nf">sum</span><span·class="p"·data-group-id="6498271338-3">(</span><span·class="p"·data-group-id="6498271338-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="6498271338-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·462,·SHA:·23688c94c9d22a283f56f4d7ecbe07e5e9467143655bb3092d650e01a5c75540·...·]-5">)</span><span·class="p">;</span><span·class="w">212 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2907082225-3">(</span><span·class="p"·data-group-id="2907082225-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2907082225-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·462,·SHA:·a72443b08a9a1a34a64379d6abff3add7dcab2199138fcd66d7838272317f38d·...·]-5">)</span><span·class="p">;</span><span·class="w">
213 </span><span·class="nf">sum</span><span·class="p"·data-group-id="6498271338-6">(</span><span·class="p"·data-group-id="6498271338-7">[</span><span·class="p"·data-group-id="6498271338-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="6498271338-6">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p">.</span></code></pre>213 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2907082225-6">(</span><span·class="p"·data-group-id="2907082225-7">[</span><span·class="p"·data-group-id="2907082225-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="2907082225-6">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p">.</span></code></pre>
214 </div>214 </div>
  
215 <div·class="bottom-actions"·id="bottom-actions">215 <div·class="bottom-actions"·id="bottom-actions">
216 ··<div·class="bottom-actions-item">216 ··<div·class="bottom-actions-item">
  
217 ······<a·href="maps.html"·class="bottom-actions-button"·rel="prev">217 ······<a·href="maps.html"·class="bottom-actions-button"·rel="prev">
218 ········<span·class="subheader">218 ········<span·class="subheader">
58.3 KB
./usr/share/doc/erlang-doc/html/doc/system/macros.html
    
Offset 117, 56 lines modifiedOffset 117, 56 lines modified
  
117 <h2·id="file-inclusion"·class="section-heading">117 <h2·id="file-inclusion"·class="section-heading">
118 ··<a·href="#file-inclusion"·class="hover-link">118 ··<a·href="#file-inclusion"·class="hover-link">
119 ····<i·class="ri-link-m"·aria-hidden="true"></i>119 ····<i·class="ri-link-m"·aria-hidden="true"></i>
120 ··</a>120 ··</a>
121 ··<span·class="text">File·Inclusion</span>121 ··<span·class="text">File·Inclusion</span>
122 </h2>122 </h2>
123 <p>A·file·can·be·included·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="4368302436-1">(</span><span·class="n">File</span><span·class="p"·data-group-id="4368302436-1">)</span><span·class="p">.</span><span·class="w">123 <p>A·file·can·be·included·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="9731775338-1">(</span><span·class="n">File</span><span·class="p"·data-group-id="9731775338-1">)</span><span·class="p">.</span><span·class="w">
124 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4368302436-2">(</span><span·class="n">File</span><span·class="p"·data-group-id="4368302436-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">File</code>,·a·string,·is·to·point·out·a·file.·The·contents·of·this·file·are·included124 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="9731775338-2">(</span><span·class="n">File</span><span·class="p"·data-group-id="9731775338-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">File</code>,·a·string,·is·to·point·out·a·file.·The·contents·of·this·file·are·included
125 as·is,·at·the·position·of·the·directive.</p><p>Include·files·are·typically·used·for·record·and·macro·definitions·that·are125 as·is,·at·the·position·of·the·directive.</p><p>Include·files·are·typically·used·for·record·and·macro·definitions·that·are
126 shared·by·several·modules.·It·is·recommended·to·use·the·file·name·extension126 shared·by·several·modules.·It·is·recommended·to·use·the·file·name·extension
127 <code·class="inline">.hrl</code>·for·include·files.</p><p><code·class="inline">File</code>·can·start·with·a·path·component·<code·class="inline">$VAR</code>,·for·some·string·<code·class="inline">VAR</code>.·If·that·is127 <code·class="inline">.hrl</code>·for·include·files.</p><p><code·class="inline">File</code>·can·start·with·a·path·component·<code·class="inline">$VAR</code>,·for·some·string·<code·class="inline">VAR</code>.·If·that·is
128 the·case,·the·value·of·the·environment·variable·<code·class="inline">VAR</code>·as·returned·by128 the·case,·the·value·of·the·environment·variable·<code·class="inline">VAR</code>·as·returned·by
129 <code·class="inline">os:getenv(VAR)</code>·is·substituted·for·<code·class="inline">$VAR</code>.·If·<code·class="inline">os:getenv(VAR)</code>·returns·<code·class="inline">false</code>,129 <code·class="inline">os:getenv(VAR)</code>·is·substituted·for·<code·class="inline">$VAR</code>.·If·<code·class="inline">os:getenv(VAR)</code>·returns·<code·class="inline">false</code>,
130 <code·class="inline">$VAR</code>·is·left·as·is.</p><p>If·the·filename·<code·class="inline">File</code>·is·absolute·(possibly·after·variable·substitution),·the130 <code·class="inline">$VAR</code>·is·left·as·is.</p><p>If·the·filename·<code·class="inline">File</code>·is·absolute·(possibly·after·variable·substitution),·the
131 include·file·with·that·name·is·included.·Otherwise,·the·specified·file·is131 include·file·with·that·name·is·included.·Otherwise,·the·specified·file·is
132 searched·for·in·the·following·directories,·and·in·this·order:</p><ol><li>The·current·working·directory</li><li>The·directory·where·the·module·is·being·compiled</li><li>The·directories·given·by·the·<code·class="inline">include</code>·option</li></ol><p>For·details,·see·<a·href="../../erts-15.0.1/doc/html/erlc_cmd.html">erlc</a>·in·ERTS·and132 searched·for·in·the·following·directories,·and·in·this·order:</p><ol><li>The·current·working·directory</li><li>The·directory·where·the·module·is·being·compiled</li><li>The·directories·given·by·the·<code·class="inline">include</code>·option</li></ol><p>For·details,·see·<a·href="../../erts-15.0.1/doc/html/erlc_cmd.html">erlc</a>·in·ERTS·and
133 <a·href="../../lib/compiler-8.5.1/doc/html/compile.html"><code·class="inline">compile</code></a>·in·Compiler.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="0911590965-1">(</span><span·class="s">&quot;my_records.hrl&quot;</span><span·class="p"·data-group-id="0911590965-1">)</span><span·class="p">.</span><span·class="w">133 <a·href="../../lib/compiler-8.5.1/doc/html/compile.html"><code·class="inline">compile</code></a>·in·Compiler.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="1191455602-1">(</span><span·class="s">&quot;my_records.hrl&quot;</span><span·class="p"·data-group-id="1191455602-1">)</span><span·class="p">.</span><span·class="w">
134 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="0911590965-2">(</span><span·class="s">&quot;incdir/my_records.hrl&quot;</span><span·class="p"·data-group-id="0911590965-2">)</span><span·class="p">.</span><span·class="w">134 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="1191455602-2">(</span><span·class="s">&quot;incdir/my_records.hrl&quot;</span><span·class="p"·data-group-id="1191455602-2">)</span><span·class="p">.</span><span·class="w">
135 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="0911590965-3">(</span><span·class="s">&quot;/home/user/proj/my_records.hrl&quot;</span><span·class="p"·data-group-id="0911590965-3">)</span><span·class="p">.</span><span·class="w">135 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="1191455602-3">(</span><span·class="s">&quot;/home/user/proj/my_records.hrl&quot;</span><span·class="p"·data-group-id="1191455602-3">)</span><span·class="p">.</span><span·class="w">
136 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="0911590965-4">(</span><span·class="s">&quot;$PROJ_ROOT/my_records.hrl&quot;</span><span·class="p"·data-group-id="0911590965-4">)</span><span·class="p">.</span></code></pre><p><code·class="inline">include_lib</code>·is·similar·to·<code·class="inline">include</code>,·but·is·not·to·point·out·an·absolute·file.136 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="1191455602-4">(</span><span·class="s">&quot;$PROJ_ROOT/my_records.hrl&quot;</span><span·class="p"·data-group-id="1191455602-4">)</span><span·class="p">.</span></code></pre><p><code·class="inline">include_lib</code>·is·similar·to·<code·class="inline">include</code>,·but·is·not·to·point·out·an·absolute·file.
137 Instead,·the·first·path·component·(possibly·after·variable·substitution)·is137 Instead,·the·first·path·component·(possibly·after·variable·substitution)·is
138 assumed·to·be·the·name·of·an·application.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="8750939687-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="8750939687-1">)</span><span·class="p">.</span></code></pre><p>The·code·server·uses·<code·class="inline">code:lib_dir(kernel)</code>·to·find·the·directory·of·the·current138 assumed·to·be·the·name·of·an·application.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="5660872521-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="5660872521-1">)</span><span·class="p">.</span></code></pre><p>The·code·server·uses·<code·class="inline">code:lib_dir(kernel)</code>·to·find·the·directory·of·the·current
139 (latest)·version·of·Kernel,·and·then·the·subdirectory·<code·class="inline">include</code>·is·searched·for139 (latest)·version·of·Kernel,·and·then·the·subdirectory·<code·class="inline">include</code>·is·searched·for
140 the·file·<code·class="inline">file.hrl</code>.</p><h2·id="defining-and-using-macros"·class="section-heading">140 the·file·<code·class="inline">file.hrl</code>.</p><h2·id="defining-and-using-macros"·class="section-heading">
141 ··<a·href="#defining-and-using-macros"·class="hover-link">141 ··<a·href="#defining-and-using-macros"·class="hover-link">
142 ····<i·class="ri-link-m"·aria-hidden="true"></i>142 ····<i·class="ri-link-m"·aria-hidden="true"></i>
143 ··</a>143 ··</a>
144 ··<span·class="text">Defining·and·Using·Macros</span>144 ··<span·class="text">Defining·and·Using·Macros</span>
145 </h2>145 </h2>
146 <p>A·macro·is·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="1496260080-1">(</span><span·class="n">Const</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Replacement</span><span·class="p"·data-group-id="1496260080-1">)</span><span·class="p">.</span><span·class="w"> 
147 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="1496260080-2">(</span><span·class="n">Func</span><span·class="p"·data-group-id="1496260080-3">(</span><span·class="n">Var1</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·414,·SHA:·4d8d704691dab9d5d60626f4cc373084e3d92819c6ca384a5672fd1ad36acec4·...·]146 <p>A·macro·is·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0526885233-1">(</span><span·class="n">Const</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·138,·SHA:·fd35bd34440169a829536a205317cbb0e8370e2f1e37650849e80e289712c933·...·]
 147 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0526885233-2">(</span><span·class="n">Func</span><span·class="p"·data-group-id="0526885233-3">(</span><span·class="n">Var1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">VarN</span><span·class="p"·data-group-id="0526885233-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Replacement</span><span·class="p"·data-group-id="0526885233-2">)</span><span·class="p">.</span></code></pre><p>A·macro·definition·can·be·placed·anywhere·among·the·attributes·and·function
148 declarations·of·a·module,·but·the·definition·must·come·before·any·usage·of·the148 declarations·of·a·module,·but·the·definition·must·come·before·any·usage·of·the
149 macro.</p><p>If·a·macro·is·used·in·several·modules,·it·is·recommended·that·the·macro149 macro.</p><p>If·a·macro·is·used·in·several·modules,·it·is·recommended·that·the·macro
150 definition·is·placed·in·an·include·file.</p><p>A·macro·is·used·as·follows:</p><pre><code·class="text">?Const150 definition·is·placed·in·an·include·file.</p><p>A·macro·is·used·as·follows:</p><pre><code·class="text">?Const
151 ?Func(Arg1,...,ArgN)</code></pre><p>Macros·are·expanded·during·compilation.·A·simple·macro·<code·class="inline">?Const</code>·is·replaced·with151 ?Func(Arg1,...,ArgN)</code></pre><p>Macros·are·expanded·during·compilation.·A·simple·macro·<code·class="inline">?Const</code>·is·replaced·with
152 <code·class="inline">Replacement</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="1011211953-1">(</span><span·class="n">TIMEOUT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p"·data-group-id="1011211953-1">)</span><span·class="p">.</span><span·class="w">152 <code·class="inline">Replacement</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="1805554548-1">(</span><span·class="n">TIMEOUT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p"·data-group-id="1805554548-1">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">153 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
154 </span><span·class="nf">call</span><span·class="p"·data-group-id="1011211953-2">(</span><span·class="n">Request</span><span·class="p"·data-group-id="1011211953-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">154 </span><span·class="nf">call</span><span·class="p"·data-group-id="1805554548-2">(</span><span·class="n">Request</span><span·class="p"·data-group-id="1805554548-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
155 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="1011211953-3">(</span><span·class="ss">refserver</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">TIMEOUT</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·295,·SHA:·8cfb88a5e66c7a9cd4c5415b860b0600948c97403a9ea7463bb312000da7deae·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">155 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="1805554548-3">(</span><span·class="ss">refserver</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">TIMEOUT</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·295,·SHA:·b2f379a7b347e27bb9fb2ed06c255578b249e07606a503db203a25a7f7169378·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
156 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="6277260539-2">(</span><span·class="ss">refserver</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p"·data-group-id="6277260539-2">)</span><span·class="p">.</span></code></pre><p>A·macro·<code·class="inline">?Func(Arg1,...,ArgN)</code>·is·replaced·with·<code·class="inline">Replacement</code>,·where·all156 ····</span><span·class="nc">server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="3811559905-2">(</span><span·class="ss">refserver</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p"·data-group-id="3811559905-2">)</span><span·class="p">.</span></code></pre><p>A·macro·<code·class="inline">?Func(Arg1,...,ArgN)</code>·is·replaced·with·<code·class="inline">Replacement</code>,·where·all
157 occurrences·of·a·variable·<code·class="inline">Var</code>·from·the·macro·definition·are·replaced·with·the157 occurrences·of·a·variable·<code·class="inline">Var</code>·from·the·macro·definition·are·replaced·with·the
158 corresponding·argument·<code·class="inline">Arg</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7863667623-1">(</span><span·class="n">MACRO1</span><span·class="p"·data-group-id="7863667623-2">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="7863667623-2">)</span><spa[·...·truncated·by·diffoscope;·len:·433,·SHA:·0a8e7bbda00a6b9945f3b6b805c0be783bfa90d00b679a40d4d1496d938530e1·...·]-1">)</span><span·class="p">.</span><span·class="w">158 corresponding·argument·<code·class="inline">Arg</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7770256121-1">(</span><span·class="n">MACRO1</span><span·class="p"·data-group-id="7770256121-2">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="7770256121-2">)</span><spa[·...·truncated·by·diffoscope;·len:·433,·SHA:·2bb269b93b62a33d99c6c3d438079980ab77039a020a8fef68cee36943f6e6e9·...·]-1">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">159 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
160 </span><span·class="nf">bar</span><span·class="p"·data-group-id="7863667623-4">(</span><span·class="n">X</span><span·class="p"·data-group-id="7863667623-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">160 </span><span·class="nf">bar</span><span·class="p"·data-group-id="7770256121-4">(</span><span·class="n">X</span><span·class="p"·data-group-id="7770256121-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
161 ····</span><span·class="o">?</span><span·class="n">MACRO1</span><span·class="p"·data-group-id="7863667623-5">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="7863667623-5">)</span><span·class="p">,</span><span·class="w">161 ····</span><span·class="o">?</span><span·class="n">MACRO1</span><span·class="p"·data-group-id="7770256121-5">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="7770256121-5">)</span><span·class="p">,</span><span·class="w">
162 ····</span><span·class="o">?</span><span·class="n">MACRO1</span><span·class="p"·data-group-id="7863667623-6">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">123</span><span·class="p"·data-group-id="7863667623-6">)</span></code></pre><p>This·is·expanded·to:</p><pre><code·class="makeup·erlang"·translate=[·...·truncated·by·diffoscope;·len:·150,·SHA:·34b5d74787bebf9057a6b530fae2f2c8d5e80e78010d3d682f35a165fa850efa·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">162 ····</span><span·class="o">?</span><span·class="n">MACRO1</span><span·class="p"·data-group-id="7770256121-6">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">123</span><span·class="p"·data-group-id="7770256121-6">)</span></code></pre><p>This·is·expanded·to:</p><pre><code·class="makeup·erlang"·translate=[·...·truncated·by·diffoscope;·len:·150,·SHA:·7b23693d45c29537373cf7e62cba66ef6f68415c87fa200d7cbbfdfe2867cba0·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
163 ····</span><span·class="p"·data-group-id="3124271184-2">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="3124271184-2">}</span><span·class="p">,</span><span·class="w">163 ····</span><span·class="p"·data-group-id="5777425492-2">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="5777425492-2">}</span><span·class="p">,</span><span·class="w">
164 ····</span><span·class="p"·data-group-id="3124271184-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="n">X</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">123</span><span·class="p"·data-group-id="3124271184-3">}</span><span·class="p">.</span></code></pre><p>It·is·good·programming·practice,·but·not·mandatory,·to·ensure·that·a·macro164 ····</span><span·class="p"·data-group-id="5777425492-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="n">X</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">123</span><span·class="p"·data-group-id="5777425492-3">}</span><span·class="p">.</span></code></pre><p>It·is·good·programming·practice,·but·not·mandatory,·to·ensure·that·a·macro
165 definition·is·a·valid·Erlang·syntactic·form.</p><p>To·view·the·result·of·macro·expansion,·a·module·can·be·compiled·with·the·<code·class="inline">'P'</code>165 definition·is·a·valid·Erlang·syntactic·form.</p><p>To·view·the·result·of·macro·expansion,·a·module·can·be·compiled·with·the·<code·class="inline">'P'</code>
166 option.·<code·class="inline">compile:file(File,·['P'])</code>.·This·produces·a·listing·of·the·parsed·code166 option.·<code·class="inline">compile:file(File,·['P'])</code>.·This·produces·a·listing·of·the·parsed·code
167 after·preprocessing·and·parse·transforms,·in·the·file·<code·class="inline">File.P</code>.</p><h2·id="predefined-macros"·class="section-heading">167 after·preprocessing·and·parse·transforms,·in·the·file·<code·class="inline">File.P</code>.</p><h2·id="predefined-macros"·class="section-heading">
168 ··<a·href="#predefined-macros"·class="hover-link">168 ··<a·href="#predefined-macros"·class="hover-link">
169 ····<i·class="ri-link-m"·aria-hidden="true"></i>169 ····<i·class="ri-link-m"·aria-hidden="true"></i>
170 ··</a>170 ··</a>
171 ··<span·class="text">Predefined·Macros</span>171 ··<span·class="text">Predefined·Macros</span>
Offset 182, 29 lines modifiedOffset 182, 29 lines modified
182 ····<i·class="ri-link-m"·aria-hidden="true"></i>182 ····<i·class="ri-link-m"·aria-hidden="true"></i>
183 ··</a>183 ··</a>
184 ··<span·class="text">Macros·Overloading</span>184 ··<span·class="text">Macros·Overloading</span>
185 </h2>185 </h2>
186 <p>It·is·possible·to·overload·macros,·except·for·predefined·macros.·An·overloaded186 <p>It·is·possible·to·overload·macros,·except·for·predefined·macros.·An·overloaded
187 macro·has·more·than·one·definition,·each·with·a·different·number·of·arguments.</p><blockquote><h4·class="info">Change</h4><p>Support·for·overloading·of·macros·was·added·in·Erlang·5.7.5/OTP·R13B04.</p></blockquote><p>A·macro·<code·class="inline">?Func(Arg1,...,ArgN)</code>·with·a·(possibly·empty)·list·of·arguments·results187 macro·has·more·than·one·definition,·each·with·a·different·number·of·arguments.</p><blockquote><h4·class="info">Change</h4><p>Support·for·overloading·of·macros·was·added·in·Erlang·5.7.5/OTP·R13B04.</p></blockquote><p>A·macro·<code·class="inline">?Func(Arg1,...,ArgN)</code>·with·a·(possibly·empty)·list·of·arguments·results
188 in·an·error·message·if·there·is·at·least·one·definition·of·<code·class="inline">Func</code>·with188 in·an·error·message·if·there·is·at·least·one·definition·of·<code·class="inline">Func</code>·with
189 arguments,·but·none·with·N·arguments.</p><p>Assuming·these·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7125767750-1">(</span><span·class="n">F0</span><span·class="p"·data-group-id="7125767750-2">(</span><span·class="p"·data-group-id="7125767750-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·88debe59b21d1c3d828e615ce3d6607ca260593b6671eee51de21ea5e22e5e0c·...·]-1">)</span><span·class="p">.</span><span·class="w">189 arguments,·but·none·with·N·arguments.</p><p>Assuming·these·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0722658749-1">(</span><span·class="n">F0</span><span·class="p"·data-group-id="0722658749-2">(</span><span·class="p"·data-group-id="0722658749-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·a027b7184eda050348480d75de4c27f909d2dca8474c07bc56de726bc24ac6b1·...·]-1">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7125767750-3">(</span><span·class="n">F1</span><span·class="p"·data-group-id="7125767750-4">(</span><span·class="n">A</span><span·class="p"·data-group-id="7125767750-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·2366876670392506a2822ba29632686f580801c8cb4256675aab6be782e0e499·...·]-3">)</span><span·class="p">.</span><span·class="w">190 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0722658749-3">(</span><span·class="n">F1</span><span·class="p"·data-group-id="0722658749-4">(</span><span·class="n">A</span><span·class="p"·data-group-id="0722658749-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·40b133769e464d524b30d23ab393a5be43c0a7fa4606186612338246724c69e8·...·]-3">)</span><span·class="p">.</span><span·class="w">
191 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7125767750-5">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">m</span><span·class="p">:</span><span·class="ss">f</span><span·class="p"·data-group-id="7125767750-5">)</span><span·class="p">.</span></code></pr[·...·truncated·by·diffoscope;·len:·205,·SHA:·1d2ab850b245ec2a9a2bbf487e23b3a3a8ff4e70197c2719e169fec5018f720b·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0722658749-5">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">m</span><span·class="p">:</span><span·class="ss">f</span><span·class="p"·data-group-id="0722658749-5">)</span><span·class="p">.</span></code></pr[·...·truncated·by·diffoscope;·len:·205,·SHA:·8513a3511442612e1c7e2af0c494d5e6b345ce3077df84edb42fe2abc0ae54d6·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ····</span><span·class="o">?</span><span·class="n">F0</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·No,·an·empty·list·of·arguments·expected.</span><span·class="w">192 ····</span><span·class="o">?</span><span·class="n">F0</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·No,·an·empty·list·of·arguments·expected.</span><span·class="w">
  
193 </span><span·class="nf">f1</span><span·class="p"·data-group-id="6651445467-2">(</span><span·class="n">A</span><span·class="p"·data-group-id="6651445467-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 </span><span·class="nf">f1</span><span·class="p"·data-group-id="8168873181-2">(</span><span·class="n">A</span><span·class="p"·data-group-id="8168873181-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ····</span><span·class="o">?</span><span·class="n">F1</span><span·class="p"·data-group-id="6651445467-3">(</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="6651445467-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·No,·exactly·one·argument·expected.</span></code></pre><p>On·the·other·hand,</p><pre><code·class="text">f()·-&gt;194 ····</span><span·class="o">?</span><span·class="n">F1</span><span·class="p"·data-group-id="8168873181-3">(</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="8168873181-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·No,·exactly·one·argument·expected.</span></code></pre><p>On·the·other·hand,</p><pre><code·class="text">f()·-&gt;
195 ····?C().</code></pre><p>is·expanded·to</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="7759506992-1">(</span><span·class="p"·data-group-id="7759506992-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">195 ····?C().</code></pre><p>is·expanded·to</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="5850072646-1">(</span><span·class="p"·data-group-id="5850072646-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
196 ····</span><span·class="nc">m</span><span·class="p">:</span><span·class="nf">f</span><span·class="p"·data-group-id="7759506992-2">(</span><span·class="p"·data-group-id="7759506992-2">)</span><span·class="p">.</span></code></pre><h2·id="removing-a-macro-definition"·class="section-heading">196 ····</span><span·class="nc">m</span><span·class="p">:</span><span·class="nf">f</span><span·class="p"·data-group-id="5850072646-2">(</span><span·class="p"·data-group-id="5850072646-2">)</span><span·class="p">.</span></code></pre><h2·id="removing-a-macro-definition"·class="section-heading">
197 ··<a·href="#removing-a-macro-definition"·class="hover-link">197 ··<a·href="#removing-a-macro-definition"·class="hover-link">
198 ····<i·class="ri-link-m"·aria-hidden="true"></i>198 ····<i·class="ri-link-m"·aria-hidden="true"></i>
199 ··</a>199 ··</a>
200 ··<span·class="text">Removing·a·macro·definition</span>200 ··<span·class="text">Removing·a·macro·definition</span>
201 </h2>201 </h2>
202 <p>A·definition·of·macro·can·be·removed·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">undef</span><span·class="p"·data-group-id="6023135417-1">(</span><span·class="n">Macro</span><span·class="p"·data-group-id="6023135417-1">)</span><span·class="p">.</span></code></pre><h2·id="conditional-compilation"·class="section-heading">202 <p>A·definition·of·macro·can·be·removed·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">undef</span><span·class="p"·data-group-id="5209505247-1">(</span><span·class="n">Macro</span><span·class="p"·data-group-id="5209505247-1">)</span><span·class="p">.</span></code></pre><h2·id="conditional-compilation"·class="section-heading">
203 ··<a·href="#conditional-compilation"·class="hover-link">203 ··<a·href="#conditional-compilation"·class="hover-link">
204 ····<i·class="ri-link-m"·aria-hidden="true"></i>204 ····<i·class="ri-link-m"·aria-hidden="true"></i>
205 ··</a>205 ··</a>
206 ··<span·class="text">Conditional·Compilation</span>206 ··<span·class="text">Conditional·Compilation</span>
207 </h2>207 </h2>
208 <p>The·following·macro·directives·support·conditional·compilation:</p><ul><li><p><strong><code·class="inline">-ifdef(Macro).</code></strong>·-·Evaluate·the·following·lines·only·if·<code·class="inline">Macro</code>·is208 <p>The·following·macro·directives·support·conditional·compilation:</p><ul><li><p><strong><code·class="inline">-ifdef(Macro).</code></strong>·-·Evaluate·the·following·lines·only·if·<code·class="inline">Macro</code>·is
209 defined.</p></li><li><p><strong><code·class="inline">-ifndef(Macro).</code></strong>·-·Evaluate·the·following·lines·only·if·<code·class="inline">Macro</code>·is·not209 defined.</p></li><li><p><strong><code·class="inline">-ifndef(Macro).</code></strong>·-·Evaluate·the·following·lines·only·if·<code·class="inline">Macro</code>·is·not
Offset 216, 43 lines modifiedOffset 216, 43 lines modified
216 true,·and·the·<code·class="inline">Condition</code>·evaluates·to·true,·the·lines·following·the·<code·class="inline">elif</code>216 true,·and·the·<code·class="inline">Condition</code>·evaluates·to·true,·the·lines·following·the·<code·class="inline">elif</code>
217 are·evaluated·instead.</p></li><li><p><strong><code·class="inline">-endif.</code></strong>·-·Specifies·the·end·of·a·series·of·control·flow·directives.</p></li></ul><blockquote><h4·class="info">Note</h4><p>Macro·directives·cannot·be·used·inside·functions.</p></blockquote><p>Syntactically,·the·<code·class="inline">Condition</code>·in·<code·class="inline">if</code>·and·<code·class="inline">elif</code>·must·be·a217 are·evaluated·instead.</p></li><li><p><strong><code·class="inline">-endif.</code></strong>·-·Specifies·the·end·of·a·series·of·control·flow·directives.</p></li></ul><blockquote><h4·class="info">Note</h4><p>Macro·directives·cannot·be·used·inside·functions.</p></blockquote><p>Syntactically,·the·<code·class="inline">Condition</code>·in·<code·class="inline">if</code>·and·<code·class="inline">elif</code>·must·be·a
218 <a·href="expressions.html#guard-expressions">guard·expression</a>.·Other·constructs·(such·as218 <a·href="expressions.html#guard-expressions">guard·expression</a>.·Other·constructs·(such·as
219 a·<code·class="inline">case</code>·expression)·result·in·a·compilation·error.</p><p>As·opposed·to·the·standard·guard·expressions,·an·expression·in·an·<code·class="inline">if</code>·and219 a·<code·class="inline">case</code>·expression)·result·in·a·compilation·error.</p><p>As·opposed·to·the·standard·guard·expressions,·an·expression·in·an·<code·class="inline">if</code>·and
220 <code·class="inline">elif</code>·also·supports·calling·the·psuedo-function·<code·class="inline">defined(Name)</code>,·which·tests220 <code·class="inline">elif</code>·also·supports·calling·the·psuedo-function·<code·class="inline">defined(Name)</code>,·which·tests
221 whether·the·<code·class="inline">Name</code>·argument·is·the·name·of·a·previously·defined·macro.221 whether·the·<code·class="inline">Name</code>·argument·is·the·name·of·a·previously·defined·macro.
222 <code·class="inline">defined(Name)</code>·evaluates·to·<code·class="inline">true</code>·if·the·macro·is·defined·and·<code·class="inline">false</code>222 <code·class="inline">defined(Name)</code>·evaluates·to·<code·class="inline">true</code>·if·the·macro·is·defined·and·<code·class="inline">false</code>
223 otherwise.·An·attempt·to·call·other·functions·results·in·a·compilation·error.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9187023093-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="9187023093-1">)</span><span·class="p">.</span><span·class="w">223 otherwise.·An·attempt·to·call·other·functions·results·in·a·compilation·error.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6426693326-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="6426693326-1">)</span><span·class="p">.</span><span·class="w">
224 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">224 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
225 </span><span·class="w">225 </span><span·class="w">
226 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="9187023093-2">(</span><span·class="ss">debug</span><span·class="p"·data-group-id="9187023093-2">)</span><span·class="p">.</span><span·class="w">226 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="6426693326-2">(</span><span·class="ss">debug</span><span·class="p"·data-group-id="6426693326-2">)</span><span·class="p">.</span><span·class="w">
227 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="9187023093-3">(</span><span·class="n">LOG</span><span·class="p"·data-group-id="9187023093-4">(</span><span·class="n">X</span><span·class="p"·data-group-id="9187023093-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">io</span><spa[·...·truncated·by·diffoscope;·len:·740,·SHA:·017c9f39f486d093f7cf2dcbb7e99d2e0f6ac45b9a73186fa924bcefeb4efca4·...·]-3">)</span><span·class="p">.</span><span·class="w">227 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6426693326-3">(</span><span·class="n">LOG</span><span·class="p"·data-group-id="6426693326-4">(</span><span·class="n">X</span><span·class="p"·data-group-id="6426693326-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">io</span><spa[·...·truncated·by·diffoscope;·len:·740,·SHA:·7b4d6e0f535697c224447a12c053688a00524d2b74d67005a192c45c2f3f47f3·...·]-3">)</span><span·class="p">.</span><span·class="w">
228 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">228 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
229 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="9187023093-7">(</span><span·class="n">LOG</span><span·class="p"·data-group-id="9187023093-8">(</span><span·class="n">X</span><span·class="p"·data-group-id="9187023093-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·b4012ce9f26251f1b04de67a98deb471a1bbde38c09efe77c520f054a2f61c56·...·]-7">)</span><span·class="p">.</span><span·class="w">229 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6426693326-7">(</span><span·class="n">LOG</span><span·class="p"·data-group-id="6426693326-8">(</span><span·class="n">X</span><span·class="p"·data-group-id="6426693326-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·10b04285239b913b336247243ff901a6dc2b9ed2a32a08de73400a1c10631594·...·]-7">)</span><span·class="p">.</span><span·class="w">
230 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">230 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
  
231 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>When·trace·output·is·desired,·<code·class="inline">debug</code>·is·to·be·defined·when·the·module·<code·class="inline">m</code>·is231 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>When·trace·output·is·desired,·<code·class="inline">debug</code>·is·to·be·defined·when·the·module·<code·class="inline">m</code>·is
232 compiled:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erlc·-Ddebug·m.erl</span><span·class="w">232 compiled:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erlc·-Ddebug·m.erl</span><span·class="w">
  
233 </span><span·class="ow">or</span><span·class="w">233 </span><span·class="ow">or</span><span·class="w">
  
234 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">c</span><span·class="p"·data-group-id="8741567222-1">(</span><span·class="ss">m</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8741567222-2">{</span><span·class="ss">d</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug</span><span·c[·...·truncated·by·diffoscope;·len:·86,·SHA:·759b0ea5399f8a3ff3c91fd753f41351760bdc581d1381667cfbc0bbc700a832·...·]2-1">)</span><span·class="p">.</span><span·class="w">234 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">c</span><span·class="p"·data-group-id="8885713102-1">(</span><span·class="ss">m</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8885713102-2">{</span><span·class="ss">d</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug</span><span·c[·...·truncated·by·diffoscope;·len:·86,·SHA:·b579c198b0305638da741e21b32d06683449f67bd869078c893fb0d9afa26800·...·]2-1">)</span><span·class="p">.</span><span·class="w">
235 </span><span·class="p"·data-group-id="8741567222-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">m</span><span·class="p"·data-group-id="8741567222-3">}</span></code></pre><p><code·class="inline">?LOG(Arg)</code>·is·then·expanded·to·a·call·to·<a·href="../../lib/stdlib-6.0.1/doc/html/io.html#format/2"><code·class="inline">io:format/2</code></a>·and·provide·the·user 
236 with·some·simple·trace·output.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5188478585-1">(</span><span·class="ss">m</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·51,·SHA:·cd2d1e18d2a7794610138016ab083578fa9435ff50110d123a96fdb827966719·...·]235 </span><span·class="p"·data-group-id="8885713102-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">m</span><span·class="p"·data-group-id="8885713102-3">}</span></code></pre><p><code·class="inline">?LOG(Arg)</code>·is·then·expand[·...·truncated·by·diffoscope;·len:·139,·SHA:·c9807b00aacff8a3e82ce37f730392ec99b85d59d4c68b546fd1d9e93f266c58·...·]
 236 with·some·simple·trace·output.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0448833521-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="0448833521-1">)</span><span·class="w">
237 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">237 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
238 </span><span·class="p">-</span><span·class="na">if</span><span·class="p"·data-group-id="5188478585-2">(</span><span·class="o">?</span><span·class="n">OTP_RELEASE</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">25</span><span·class="p"·data-group-id="5188478585-2">)</span><span·class="p">.</span><span·class="w">238 </span><span·class="p">-</span><span·class="na">if</span><span·class="p"·data-group-id="0448833521-2">(</span><span·class="o">?</span><span·class="n">OTP_RELEASE</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">25</span><span·class="p"·data-group-id="0448833521-2">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="c1">%%·Code·that·will·work·in·OTP·25·or·higher</span><span·class="w">239 </span><span·class="c1">%%·Code·that·will·work·in·OTP·25·or·higher</span><span·class="w">
240 </span><span·class="p">-</span><span·class="na">elif</span><span·class="p"·data-group-id="5188478585-3">(</span><span·class="o">?</span><span·class="n">OTP_RELEASE</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">26</span><span·class="p"·data-group-id="5188478585-3">)</span><span·class="p">.</span><span·class="w">240 </span><span·class="p">-</span><span·class="na">elif</span><span·class="p"·data-group-id="0448833521-3">(</span><span·class="o">?</span><span·class="n">OTP_RELEASE</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">26</span><span·class="p"·data-group-id="0448833521-3">)</span><span·class="p">.</span><span·class="w">
241 </span><span·class="c1">%%·Code·that·will·work·in·OTP·26·or·higher</span><span·class="w">241 </span><span·class="c1">%%·Code·that·will·work·in·OTP·26·or·higher</span><span·class="w">
242 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">242 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
243 </span><span·class="c1">%%·Code·that·will·work·in·OTP·24·or·lower.</span><span·class="w">243 </span><span·class="c1">%%·Code·that·will·work·in·OTP·24·or·lower.</span><span·class="w">
244 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">244 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
245 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>This·code·uses·the·<code·class="inline">OTP_RELEASE</code>·macro·to·conditionally·select·code·depending·on245 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>This·code·uses·the·<code·class="inline">OTP_RELEASE</code>·macro·to·conditionally·select·code·depending·on
246 release.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5243777207-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="5243777207-1">)</span><span·class="w">246 release.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5084192965-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="5084192965-1">)</span><span·class="w">
247 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">247 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
248 </span><span·class="p">-</span><span·class="na">if</span><span·class="p"·data-group-id="5243777207-2">(</span><span·class="o">?</span><span·class="n">OTP_RELEASE</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·211,·SHA:·4df5f70ea44ea8ca4ec00151169d36bd95c06a056de999bcc6e205cd74788ab8·...·]-2">)</span><span·class="p">.</span><span·class="w">248 </span><span·class="p">-</span><span·class="na">if</span><span·class="p"·data-group-id="5084192965-2">(</span><span·class="o">?</span><span·class="n">OTP_RELEASE</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·211,·SHA:·8790a1ddb27e0ad8f399ad14cd9fa43798dbc5ff76ea48a1f87c270df9ef3f2a·...·]-2">)</span><span·class="p">.</span><span·class="w">
249 </span><span·class="c1">%%·Debugging·code·that·requires·OTP·26·or·later.</span><span·class="w">249 </span><span·class="c1">%%·Debugging·code·that·requires·OTP·26·or·later.</span><span·class="w">
250 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">250 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 18157/59566 bytes (30.48%) of diff not shown.
34.8 KB
./usr/share/doc/erlang-doc/html/doc/system/maps.html
    
Offset 148, 16 lines modifiedOffset 148, 16 lines modified
148 single·function·that·constructs·the·map·using·the·map·syntax·and·always·use148 single·function·that·constructs·the·map·using·the·map·syntax·and·always·use
149 it.</p></li><li><p>Always·update·the·map·using·the·<code·class="inline">:=</code>·operator·(that·is,·requiring·that·an149 it.</p></li><li><p>Always·update·the·map·using·the·<code·class="inline">:=</code>·operator·(that·is,·requiring·that·an
150 element·with·that·key·already·exists).·The·<code·class="inline">:=</code>·operator·is·slightly·more150 element·with·that·key·already·exists).·The·<code·class="inline">:=</code>·operator·is·slightly·more
151 efficient,·and·it·helps·catching·mispellings·of·keys.</p></li><li><p>Whenever·possible,·match·multiple·map·elements·at·once.</p></li><li><p>Whenever·possible,·update·multiple·map·elements·at·once.</p></li><li><p>Avoid·default·values·and·the·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·function.·If·there·are·default151 efficient,·and·it·helps·catching·mispellings·of·keys.</p></li><li><p>Whenever·possible,·match·multiple·map·elements·at·once.</p></li><li><p>Whenever·possible,·update·multiple·map·elements·at·once.</p></li><li><p>Avoid·default·values·and·the·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·function.·If·there·are·default
152 values,·sharing·of·keys·between·different·instances·of·the·map·will·be·less152 values,·sharing·of·keys·between·different·instances·of·the·map·will·be·less
153 effective,·and·it·is·not·possible·to·match·multiple·elements·having·default153 effective,·and·it·is·not·possible·to·match·multiple·elements·having·default
154 values·in·one·go.</p></li><li><p>To·avoid·having·to·deal·with·a·map·that·may·lack·some·keys,·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#merge/2"><code·class="inline">maps:merge/2</code></a>·can154 values·in·one·go.</p></li><li><p>To·avoid·having·to·deal·with·a·map·that·may·lack·some·keys,·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#merge/2"><code·class="inline">maps:merge/2</code></a>·can
155 efficiently·add·multiple·default·values.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">DefaultMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1390006391-1">#{</span><span·class="ss">shoe_size</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">editor</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·126,·SHA:·200209fed4c92bad32e77ba39682c7209f67907f04e5b4d2e1aa25e7436abc95·...·]-1">}</span><span·class="p">,</span><span·class="w">155 efficiently·add·multiple·default·values.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">DefaultMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4485964318-1">#{</span><span·class="ss">shoe_size</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">editor</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·126,·SHA:·5c7012ed65a6db9854f64c6fb81c4682bd5bfe8e9d6cd15ace5d107aa9e99cb1·...·]-1">}</span><span·class="p">,</span><span·class="w">
156 </span><span·class="n">MapWithDefaultsApplied</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">merge</span><span·class="p"·data-group-id="1390006391-2">(</span><span·class="n">DefaultMap</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherMap</span><span·class="p"·data-group-id="1390006391-2">)</span></code></pre></li></ul><h2·id="using-maps-as-dictionaries"·class="section-heading">156 </span><span·class="n">MapWithDefaultsApplied</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">merge</span><span·class="p"·data-group-id="4485964318-2">(</span><span·class="n">DefaultMap</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherMap</span><span·class="p"·data-group-id="4485964318-2">)</span></code></pre></li></ul><h2·id="using-maps-as-dictionaries"·class="section-heading">
157 ··<a·href="#using-maps-as-dictionaries"·class="hover-link">157 ··<a·href="#using-maps-as-dictionaries"·class="hover-link">
158 ····<i·class="ri-link-m"·aria-hidden="true"></i>158 ····<i·class="ri-link-m"·aria-hidden="true"></i>
159 ··</a>159 ··</a>
160 ··<span·class="text">Using·Maps·as·Dictionaries</span>160 ··<span·class="text">Using·Maps·as·Dictionaries</span>
161 </h2>161 </h2>
162 <p>Using·a·map·as·a·dictionary·implies·the·following·usage·pattern:</p><ul><li>Keys·are·usually·variables·not·known·at·compile-time.</li><li>There·can·be·any·number·of·elements·in·the·map.</li><li>Usually,·no·more·than·one·element·is·looked·up·or·updated·at·once.</li></ul><p>Given·that·usage·pattern,·the·difference·in·performance·between·using·the·map162 <p>Using·a·map·as·a·dictionary·implies·the·following·usage·pattern:</p><ul><li>Keys·are·usually·variables·not·known·at·compile-time.</li><li>There·can·be·any·number·of·elements·in·the·map.</li><li>Usually,·no·more·than·one·element·is·looked·up·or·updated·at·once.</li></ul><p>Given·that·usage·pattern,·the·difference·in·performance·between·using·the·map
163 syntax·and·the·maps·module·is·usually·small.·Therefore,·which·one·to·use·is163 syntax·and·the·maps·module·is·usually·small.·Therefore,·which·one·to·use·is
Offset 167, 18 lines modifiedOffset 167, 18 lines modified
167 choice.</li></ul><h2·id="using-maps-as-sets"·class="section-heading">167 choice.</li></ul><h2·id="using-maps-as-sets"·class="section-heading">
168 ··<a·href="#using-maps-as-sets"·class="hover-link">168 ··<a·href="#using-maps-as-sets"·class="hover-link">
169 ····<i·class="ri-link-m"·aria-hidden="true"></i>169 ····<i·class="ri-link-m"·aria-hidden="true"></i>
170 ··</a>170 ··</a>
171 ··<span·class="text">Using·Maps·as·Sets</span>171 ··<span·class="text">Using·Maps·as·Sets</span>
172 </h2>172 </h2>
173 <p>Starting·in·OTP·24,·the·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html"><code·class="inline">sets</code></a>·module·has·an·option·to·represent·sets·as·maps.173 <p>Starting·in·OTP·24,·the·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html"><code·class="inline">sets</code></a>·module·has·an·option·to·represent·sets·as·maps.
174 Examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="2354959399-1">(</span><span·class="p"·data-group-id="2354959399-2">[</span><span·class="p"·data-group-id="2354959399-3">{</span><span·class="ss">version</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2354959399-3">}</[·...·truncated·by·diffoscope;·len:·99,·SHA:·9e5622931207e9b165da99df08c2b2f01348737043f94836c1de99821e50ba7a·...·]-1">)</span><span·class="p">.</span><span·class="w">174 Examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="6162695035-1">(</span><span·class="p"·data-group-id="6162695035-2">[</span><span·class="p"·data-group-id="6162695035-3">{</span><span·class="ss">version</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="6162695035-3">}</[·...·truncated·by·diffoscope;·len:·99,·SHA:·3d76d1e997531c81dcb6277658ca45c3a4cc8996d1bfaf95772b1fa0748c9a9e·...·]-1">)</span><span·class="p">.</span><span·class="w">
175 </span><span·class="p"·data-group-id="2354959399-4">#{</span><span·class="p"·data-group-id="2354959399-4">}</span><span·class="gp·unselectable">175 </span><span·class="p"·data-group-id="6162695035-4">#{</span><span·class="p"·data-group-id="6162695035-4">}</span><span·class="gp·unselectable">
176 2&gt;·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="2354959399-5">(</span><span·class="p"·data-group-id="2354959399-6">[</span><span·class="ss">x</span><span·class="p">,</span><span·class="ss">y</span><span·class="p">,</span><span·class="ss">z</span><span·class="p"·data-group-id="2354959399-6">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2354959399-7">[</span><span·class="p"·data-group-id="2354959399-8">{</span><span·class="ss">version</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2354959399-8">}</span><span·class="p"·data-group-id="2354959399-7">]</span><span·class="p"·data-group-id="2354959399-5">)</span><span·class="p">.</span><span·class="w"> 
177 </span><span·class="p"·data-group-id="2354959399-9">#{</span><span·class="ss">x</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2354959399-10">[</span><span·class="p"·data-group-id="235495939[·...·truncated·by·diffoscope;·len:·655,·SHA:·fbcbe5523f15c916637b89bfa32b9773a02ee9f4023f1942c44351267f81ff9d·...·]176 2&gt;·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6162695035-5">(</span><span·class="p"·data-group-id="6162695035-6">[</span><span·class="ss">x</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·557,·SHA:·b9dadd7ac667a110800266c6b6c8a9015e1757548699c593c56a1cab4ff0dc13·...·]
 177 </span><span·class="p"·data-group-id="6162695035-9">#{</span><span·class="ss">x</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6162695035-10">[</span><span·class="p"·data-group-id="6162695035-10">]</span><span·class="p">,</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6162695035-11">[</span><span·class="p"·data-group-id="6162695035-11">]</span><span·class="p">,</span><span·class="ss">z</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6162695035-12">[</span><span·class="p"·data-group-id="6162695035-12">]</span><span·class="p"·data-group-id="6162695035-9">}</span></code></pre><p><code·class="inline">sets</code>·backed·by·maps·is·generally·the·most·efficient·set·representation,·with·a
178 few·possible·exceptions:</p><ul><li><a·href="../../lib/stdlib-6.0.1/doc/html/ordsets.html#intersection/2"><code·class="inline">ordsets:intersection/2</code></a>·can·be·more·efficient·than·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#intersection/2"><code·class="inline">sets:intersection/2</code></a>.·If178 few·possible·exceptions:</p><ul><li><a·href="../../lib/stdlib-6.0.1/doc/html/ordsets.html#intersection/2"><code·class="inline">ordsets:intersection/2</code></a>·can·be·more·efficient·than·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#intersection/2"><code·class="inline">sets:intersection/2</code></a>.·If
179 the·intersection·operation·is·frequently·used·and·operations·that·operate·on·a179 the·intersection·operation·is·frequently·used·and·operations·that·operate·on·a
180 single·element·in·a·set·(such·as·<code·class="inline">is_element/2</code>)·are·avoided,·<a·href="../../lib/stdlib-6.0.1/doc/html/ordsets.html"><code·class="inline">ordsets</code></a>·can180 single·element·in·a·set·(such·as·<code·class="inline">is_element/2</code>)·are·avoided,·<a·href="../../lib/stdlib-6.0.1/doc/html/ordsets.html"><code·class="inline">ordsets</code></a>·can
181 be·a·better·choice·than·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html"><code·class="inline">sets</code></a>.</li><li>If·the·intersection·operation·is·frequently·used·and·operations·that·operate181 be·a·better·choice·than·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html"><code·class="inline">sets</code></a>.</li><li>If·the·intersection·operation·is·frequently·used·and·operations·that·operate
182 on·a·single·element·in·a·set·(such·as·<code·class="inline">is_element/2</code>)·must·also·be·efficient,182 on·a·single·element·in·a·set·(such·as·<code·class="inline">is_element/2</code>)·must·also·be·efficient,
183 <a·href="../../lib/stdlib-6.0.1/doc/html/gb_sets.html"><code·class="inline">gb_sets</code></a>·can·potentially·be·a·better·choice·than·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html"><code·class="inline">sets</code></a>.</li><li>If·the·elements·of·the·set·are·integers·in·a·fairly·compact·range,·the·set·can183 <a·href="../../lib/stdlib-6.0.1/doc/html/gb_sets.html"><code·class="inline">gb_sets</code></a>·can·potentially·be·a·better·choice·than·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html"><code·class="inline">sets</code></a>.</li><li>If·the·elements·of·the·set·are·integers·in·a·fairly·compact·range,·the·set·can
184 be·represented·as·an·integer·where·each·bit·represents·an·element·in·the·set.184 be·represented·as·an·integer·where·each·bit·represents·an·element·in·the·set.
Offset 203, 18 lines modifiedOffset 203, 18 lines modified
203 for·the·runtime·system).</p></li><li><p><strong>N</strong>·-·The·number·of·elements·in·the·map.</p></li><li><p><strong>Keys</strong>·-·A·tuple·with·keys·of·the·map:·<code·class="inline">{Key1,...,KeyN}</code>.·The·keys·are203 for·the·runtime·system).</p></li><li><p><strong>N</strong>·-·The·number·of·elements·in·the·map.</p></li><li><p><strong>Keys</strong>·-·A·tuple·with·keys·of·the·map:·<code·class="inline">{Key1,...,KeyN}</code>.·The·keys·are
204 sorted.</p></li><li><p><strong>Value1</strong>·-·The·value·corresponding·to·the·first·key·in·the·key·tuple.</p></li><li><p><strong>ValueN</strong>·-·The·value·corresponding·to·the·last·key·in·the·key·tuple.</p></li></ul><p>As·an·example,·let·us·look·at·how·the·map·<code·class="inline">#{a·=&gt;·foo,·z·=&gt;·bar}</code>·is204 sorted.</p></li><li><p><strong>Value1</strong>·-·The·value·corresponding·to·the·first·key·in·the·key·tuple.</p></li><li><p><strong>ValueN</strong>·-·The·value·corresponding·to·the·last·key·in·the·key·tuple.</p></li></ul><p>As·an·example,·let·us·look·at·how·the·map·<code·class="inline">#{a·=&gt;·foo,·z·=&gt;·bar}</code>·is
205 represented:</p><table><thead><tr><th·style="text-align:·center;">0</th><th·style="text-align:·left;">1</th><th·style="text-align:·center;">2</th><th·style="text-align:·center;">3</th><th·style="text-align:·left;">4</th></tr></thead><tbody><tr><td·style="text-align:·center;"><strong>FLATMAP</strong></td><td·style="text-align:·left;"><em>2</em></td><td·style="text-align:·center;"><code·class="inline">{a,z}</code></td><td·style="text-align:·center;"><code·class="inline">foo</code></td><td·style="text-align:·left;"><code·class="inline">bar</code></td></tr></tbody></table><p><em>Table:·#{a·=&gt;·foo,·z·=&gt;·bar}</em></p><p>Let·us·update·the·map:·<code·class="inline">M#{q·=&gt;·baz}</code>.·The·map·now·looks·like·this:</p><table><thead><tr><th·style="text-align:·center;">0</th><th·style="text-align:·left;">1</th><th·style="text-align:·center;">2</th><th·style="text-align:·center;">3</th><th·style="text-align:·center;">4</th><th·style="text-align:·center;">5</th></tr></thead><tbody><tr><td·style="text-align:·center;"><strong>FLATMAP</strong></td><td·style="text-align:·left;"><em>3</em></td><td·style="text-align:·center;"><code·class="inline">{a,q,z}</code></td><td·style="text-align:·center;"><code·class="inline">foo</code></td><td·style="text-align:·center;"><code·class="inline">baz</code></td><td·style="text-align:·center;"><code·class="inline">bar</code></td></tr></tbody></table><p><em>Table:·#{a·=&gt;·foo,·q·=&gt;·baz,·z·=&gt;·bar}</em></p><p>Finally,·change·the·value·of·one·element:·<code·class="inline">M#{z·:=·bird}</code>.·The·map·now·looks205 represented:</p><table><thead><tr><th·style="text-align:·center;">0</th><th·style="text-align:·left;">1</th><th·style="text-align:·center;">2</th><th·style="text-align:·center;">3</th><th·style="text-align:·left;">4</th></tr></thead><tbody><tr><td·style="text-align:·center;"><strong>FLATMAP</strong></td><td·style="text-align:·left;"><em>2</em></td><td·style="text-align:·center;"><code·class="inline">{a,z}</code></td><td·style="text-align:·center;"><code·class="inline">foo</code></td><td·style="text-align:·left;"><code·class="inline">bar</code></td></tr></tbody></table><p><em>Table:·#{a·=&gt;·foo,·z·=&gt;·bar}</em></p><p>Let·us·update·the·map:·<code·class="inline">M#{q·=&gt;·baz}</code>.·The·map·now·looks·like·this:</p><table><thead><tr><th·style="text-align:·center;">0</th><th·style="text-align:·left;">1</th><th·style="text-align:·center;">2</th><th·style="text-align:·center;">3</th><th·style="text-align:·center;">4</th><th·style="text-align:·center;">5</th></tr></thead><tbody><tr><td·style="text-align:·center;"><strong>FLATMAP</strong></td><td·style="text-align:·left;"><em>3</em></td><td·style="text-align:·center;"><code·class="inline">{a,q,z}</code></td><td·style="text-align:·center;"><code·class="inline">foo</code></td><td·style="text-align:·center;"><code·class="inline">baz</code></td><td·style="text-align:·center;"><code·class="inline">bar</code></td></tr></tbody></table><p><em>Table:·#{a·=&gt;·foo,·q·=&gt;·baz,·z·=&gt;·bar}</em></p><p>Finally,·change·the·value·of·one·element:·<code·class="inline">M#{z·:=·bird}</code>.·The·map·now·looks
206 like·this:</p><table><thead><tr><th·style="text-align:·center;">0</th><th·style="text-align:·left;">1</th><th·style="text-align:·center;">2</th><th·style="text-align:·center;">3</th><th·style="text-align:·center;">4</th><th·style="text-align:·center;">5</th></tr></thead><tbody><tr><td·style="text-align:·center;"><strong>FLATMAP</strong></td><td·style="text-align:·left;"><em>3</em></td><td·style="text-align:·center;"><code·class="inline">{a,q,z}</code></td><td·style="text-align:·center;"><code·class="inline">foo</code></td><td·style="text-align:·center;"><code·class="inline">baz</code></td><td·style="text-align:·center;"><code·class="inline">bird</code></td></tr></tbody></table><p><em>Table:·#{a·=&gt;·foo,·q·=&gt;·baz,·z·=&gt;·bird}</em></p><p>When·the·value·for·an·existing·key·is·updated,·the·key·tuple·is·not·updated,206 like·this:</p><table><thead><tr><th·style="text-align:·center;">0</th><th·style="text-align:·left;">1</th><th·style="text-align:·center;">2</th><th·style="text-align:·center;">3</th><th·style="text-align:·center;">4</th><th·style="text-align:·center;">5</th></tr></thead><tbody><tr><td·style="text-align:·center;"><strong>FLATMAP</strong></td><td·style="text-align:·left;"><em>3</em></td><td·style="text-align:·center;"><code·class="inline">{a,q,z}</code></td><td·style="text-align:·center;"><code·class="inline">foo</code></td><td·style="text-align:·center;"><code·class="inline">baz</code></td><td·style="text-align:·center;"><code·class="inline">bird</code></td></tr></tbody></table><p><em>Table:·#{a·=&gt;·foo,·q·=&gt;·baz,·z·=&gt;·bird}</em></p><p>When·the·value·for·an·existing·key·is·updated,·the·key·tuple·is·not·updated,
207 allowing·the·key·tuple·to·be·shared·with·other·instances·of·the·map·that·have207 allowing·the·key·tuple·to·be·shared·with·other·instances·of·the·map·that·have
208 the·same·keys.·In·fact,·the·key·tuple·can·be·shared·between·all·maps·with·the208 the·same·keys.·In·fact,·the·key·tuple·can·be·shared·between·all·maps·with·the
209 same·keys·with·some·care.·To·arrange·that,·define·a·function·that·returns·a·map.209 same·keys·with·some·care.·To·arrange·that,·define·a·function·that·returns·a·map.
210 For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">new</span><span·class="p"·data-group-id="3948163785-1">(</span><span·class="p"·data-group-id="3948163785-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">210 For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">new</span><span·class="p"·data-group-id="3756762623-1">(</span><span·class="p"·data-group-id="3756762623-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
211 ····</span><span·class="p"·data-group-id="3948163785-2">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·299,·SHA:·61d0008804c5d6fa9205ae2c271657c4376dbfb71d15e1b848b8f8aa13bdd78b·...·]-2">}</span><span·class="p">.</span></code></pre><p>Defined·like·this,·the·key·tuple·<code·class="inline">{a,b,c}</code>·will·be·a·global·literal.·To·ensure211 ····</span><span·class="p"·data-group-id="3756762623-2">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·299,·SHA:·5b8b56e3f6cac8e394b11fe1095be1697538e5f0c4460113dc042b3355801d00·...·]-2">}</span><span·class="p">.</span></code></pre><p>Defined·like·this,·the·key·tuple·<code·class="inline">{a,b,c}</code>·will·be·a·global·literal.·To·ensure
212 that·the·key·tuple·is·shared·when·creating·an·instance·of·the·map,·always·call212 that·the·key·tuple·is·shared·when·creating·an·instance·of·the·map,·always·call
213 <code·class="inline">new()</code>·and·modify·the·returned·map:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p"·data-group-id="8729146752-1">(</span><span·class="n">SOME_MODULE</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="8729146752-2">(</span><span·class="p"·data-group-id="8729146752-2">)</span><span·class="p"·data-group-id="8729146752-1[·...·truncated·by·diffoscope;·len:·229,·SHA:·17bb6cc4406d16038d6b98ee3af0a0712fcce4594283c4f16202ac05d33c4f67·...·]-3">}</span><span·class="p">.</span></code></pre><p>Using·the·map·syntax·with·small·maps·is·particularly·efficient.·As·long·as·the213 <code·class="inline">new()</code>·and·modify·the·returned·map:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p"·data-group-id="4135171505-1">(</span><span·class="n">SOME_MODULE</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="4135171505-2">(</span><span·class="p"·data-group-id="4135171505-2">)</span><span·class="p"·data-group-id="4135171505-1[·...·truncated·by·diffoscope;·len:·229,·SHA:·cead8aa4a7de64f1f1582784668860c14b2385ac27ad1a75d9f13cc442d46186·...·]-3">}</span><span·class="p">.</span></code></pre><p>Using·the·map·syntax·with·small·maps·is·particularly·efficient.·As·long·as·the
214 keys·are·known·at·compile-time,·the·map·is·updated·in·one·go,·making·the·time·to214 keys·are·known·at·compile-time,·the·map·is·updated·in·one·go,·making·the·time·to
215 update·a·map·essentially·constant·regardless·of·the·number·of·keys·updated.·The215 update·a·map·essentially·constant·regardless·of·the·number·of·keys·updated.·The
216 same·goes·for·matching.·(When·the·keys·are·variables,·one·or·more·of·the·keys216 same·goes·for·matching.·(When·the·keys·are·variables,·one·or·more·of·the·keys
217 could·be·identical,·so·the·operations·need·to·be·performed·sequentially·from217 could·be·identical,·so·the·operations·need·to·be·performed·sequentially·from
218 left·to·right.)</p><p>The·memory·size·for·a·small·map·is·the·size·of·all·keys·and·values·plus·5·words.218 left·to·right.)</p><p>The·memory·size·for·a·small·map·is·the·size·of·all·keys·and·values·plus·5·words.
219 See·<a·href="memory.html">Memory</a>·for·more·information·about·memory·sizes.</p><h3·id="how-large-maps-are-implemented"·class="section-heading">219 See·<a·href="memory.html">Memory</a>·for·more·information·about·memory·sizes.</p><h3·id="how-large-maps-are-implemented"·class="section-heading">
220 ··<a·href="#how-large-maps-are-implemented"·class="hover-link">220 ··<a·href="#how-large-maps-are-implemented"·class="hover-link">
Offset 241, 21 lines modifiedOffset 241, 21 lines modified
241 ··<a·href="#using-the-map-syntax"·class="hover-link">241 ··<a·href="#using-the-map-syntax"·class="hover-link">
242 ····<i·class="ri-link-m"·aria-hidden="true"></i>242 ····<i·class="ri-link-m"·aria-hidden="true"></i>
243 ··</a>243 ··</a>
244 ··<span·class="text">Using·the·Map·Syntax</span>244 ··<span·class="text">Using·the·Map·Syntax</span>
245 </h2>245 </h2>
246 <p>Using·the·map·syntax·is·usually·slightly·more·efficient·than·using·the246 <p>Using·the·map·syntax·is·usually·slightly·more·efficient·than·using·the
247 corresponding·function·in·the·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html"><code·class="inline">maps</code></a>·module.</p><p>The·gain·in·efficiency·for·the·map·syntax·is·more·noticeable·for·the·following247 corresponding·function·in·the·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html"><code·class="inline">maps</code></a>·module.</p><p>The·gain·in·efficiency·for·the·map·syntax·is·more·noticeable·for·the·following
248 operations·that·can·only·be·achieved·using·the·map·syntax:</p><ul><li>Matching·multiple·literal·keys</li><li>Updating·multiple·literal·keys</li><li>Adding·multiple·literal·keys·to·a·map</li></ul><p>For·example:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map1</span><span·class="p"·data-group-id="4185738666-1">#{</span><span·class="ss">x</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">y</span><span·class="w">·</span><span·class="p[·...·truncated·by·diffoscope;·len:·820,·SHA:·4d075cc36177667c3ab7b1639b5108cad9a8a911207b1a7369d5ecf8c385a53e·...·]-1">)</span><span·class="p">,</span><span·class="w">248 operations·that·can·only·be·achieved·using·the·map·syntax:</p><ul><li>Matching·multiple·literal·keys</li><li>Updating·multiple·literal·keys</li><li>Adding·multiple·literal·keys·to·a·map</li></ul><p>For·example:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map1</span><span·class="p"·data-group-id="5477309921-1">#{</span><span·class="ss">x</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">y</span><span·class="w">·</span><span·class="p[·...·truncated·by·diffoscope;·len:·820,·SHA:·3218fe523c61e23af868adaadf84a2ff227427eb5c99a0b9e6df514b0a9e0cbc·...·]-1">)</span><span·class="p">,</span><span·class="w">
249 </span><span·class="n">Map3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">update</span><span·class="p"·data-group-id="0910549989-2">(</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Map2</span><span·class="p"·data-group-id="0910549989-2">)</span><span·class="p">,</span><span·class="w">249 </span><span·class="n">Map3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">update</span><span·class="p"·data-group-id="9821864580-2">(</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Map2</span><span·class="p"·data-group-id="9821864580-2">)</span><span·class="p">,</span><span·class="w">
250 </span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">update</span><span·class="p"·data-group-id="0910549989-3">(</span><span·class="ss">z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Map3</span><span·class="p"·data-group-id="0910549989-3">)</span></code></pre><p>If·the·map·is·a·small·map,·the·first·example·runs·roughly·three·times·as·fast.</p><p>Note·that·for·variable·keys,·the·elements·are·updated·sequentially·from·left·to250 </span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">update</span><span·class="p"·data-group-id="9821864580-3">(</span><span·class="ss">z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Map3</span><span·class="p"·data-group-id="9821864580-3">)</span></code></pre><p>If·the·map·is·a·small·map,·the·first·example·runs·roughly·three·times·as·fast.</p><p>Note·that·for·variable·keys,·the·elements·are·updated·sequentially·from·left·to
251 right.·For·example,·given·the·following·update·with·variable·keys:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map1</span><span·class="p"·data-group-id="7233886061-1">#{</span><span·class="n">Key1</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key2</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·276,·SHA:·76970634b15f76bbd0b80c69c0059c64aa8374e4cbb2ca8751a870a8c13dd902·...·]-1">}</span></code></pre><p>the·compiler·rewrites·it·like·this·to·ensure·that·the·updates·are·applied·from251 right.·For·example,·given·the·following·update·with·variable·keys:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map1</span><span·class="p"·data-group-id="5951078119-1">#{</span><span·class="n">Key1</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key2</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·276,·SHA:·5e3e6881eb334159dbddef3d58a8d352d8dfbb5a5d3e571320b279b3bc6f6f02·...·]-1">}</span></code></pre><p>the·compiler·rewrites·it·like·this·to·ensure·that·the·updates·are·applied·from
252 left·to·right:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Map2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map1</span><span·class="p"·data-group-id="0011219620-1">#{</span><span·class="n">Key1</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="0011219620-1">}</span><span·class="p">,</span><span·class="w">252 left·to·right:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Map2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map1</span><span·class="p"·data-group-id="5353965554-1">#{</span><span·class="n">Key1</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="5353965554-1">}</span><span·class="p">,</span><span·class="w">
253 </span><span·class="n">Map3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map2</span><span·class="p"·data-group-id="0011219620-2">#{</span><span·class="n">Key2</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="0011219620-2">}</span><span·class="p">,</span><span·class="w">253 </span><span·class="n">Map3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map2</span><span·class="p"·data-group-id="5353965554-2">#{</span><span·class="n">Key2</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="5353965554-2">}</span><span·class="p">,</span><span·class="w">
254 </span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map3</span><span·class="p"·data-group-id="0011219620-3">#{</span><span·class="n">Key3</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Z</span><span·class="p"·data-group-id="0011219620-3">}</span></code></pre><p>If·a·key·is·known·to·exist·in·a·map,·using·the·<code·class="inline">:=</code>·operator·is·slightly·more254 </span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Map3</span><span·class="p"·data-group-id="5353965554-3">#{</span><span·class="n">Key3</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Z</span><span·class="p"·data-group-id="5353965554-3">}</span></code></pre><p>If·a·key·is·known·to·exist·in·a·map,·using·the·<code·class="inline">:=</code>·operator·is·slightly·more
255 efficient·than·using·the·<code·class="inline">=&gt;</code>·operator·for·a·small·map.</p><h2·id="using-the-functions-in-the-maps-module"·class="section-heading">255 efficient·than·using·the·<code·class="inline">=&gt;</code>·operator·for·a·small·map.</p><h2·id="using-the-functions-in-the-maps-module"·class="section-heading">
256 ··<a·href="#using-the-functions-in-the-maps-module"·class="hover-link">256 ··<a·href="#using-the-functions-in-the-maps-module"·class="hover-link">
257 ····<i·class="ri-link-m"·aria-hidden="true"></i>257 ····<i·class="ri-link-m"·aria-hidden="true"></i>
258 ··</a>258 ··</a>
259 ··<span·class="text">Using·the·Functions·in·the·maps·Module</span>259 ··<span·class="text">Using·the·Functions·in·the·maps·Module</span>
260 </h2>260 </h2>
261 <p>Here·follows·some·notes·about·most·of·the·functions·in·the·<code·class="inline">maps</code>·module.·For261 <p>Here·follows·some·notes·about·most·of·the·functions·in·the·<code·class="inline">maps</code>·module.·For
Offset 306, 23 lines modifiedOffset 306, 23 lines modified
306 ··<a·href="#maps-get-3"·class="hover-link">306 ··<a·href="#maps-get-3"·class="hover-link">
307 ····<i·class="ri-link-m"·aria-hidden="true"></i>307 ····<i·class="ri-link-m"·aria-hidden="true"></i>
308 ··</a>308 ··</a>
309 ··<span·class="text">maps:get/3</span>309 ··<span·class="text">maps:get/3</span>
310 </h3>310 </h3>
311 <p>As·an·optimization,·the·compiler·will·rewrite·a·call·to·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·to·Erlang311 <p>As·an·optimization,·the·compiler·will·rewrite·a·call·to·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·to·Erlang
312 code·similar·to·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Map</span><span·class="w">·</span><span·class="k">of</span><span·class="w">312 code·similar·to·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Map</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
313 ·············</span><span·class="p"·data-group-id="8059677008-1">#{</span><span·class="n">Key</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="8059677008-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">;</span><span·class="w">313 ·············</span><span·class="p"·data-group-id="2445863621-1">#{</span><span·class="n">Key</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="2445863621-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">;</span><span·class="w">
314 ·············</span><span·class="p"·data-group-id="8059677008-2">#{</span><span·class="p"·data-group-id="8059677008-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Default</span><span·class="w">314 ·············</span><span·class="p"·data-group-id="2445863621-2">#{</span><span·class="p"·data-group-id="2445863621-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Default</span><span·class="w">
315 ·········</span><span·class="k">end</span></code></pre><p>This·is·reasonably·efficient,·but·if·a·small·map·is·used·as·an·alternative·to315 ·········</span><span·class="k">end</span></code></pre><p>This·is·reasonably·efficient,·but·if·a·small·map·is·used·as·an·alternative·to
316 using·a·record·it·is·often·better·not·to·rely·on·default·values·as·it·prevents316 using·a·record·it·is·often·better·not·to·rely·on·default·values·as·it·prevents
317 sharing·of·keys,·which·may·in·the·end·use·more·memory·than·what·you·save·from317 sharing·of·keys,·which·may·in·the·end·use·more·memory·than·what·you·save·from
318 not·storing·default·values·in·the·map.</p><p>If·default·values·are·nevertheless·required,·instead·of·calling·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>318 not·storing·default·values·in·the·map.</p><p>If·default·values·are·nevertheless·required,·instead·of·calling·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>
319 multiple·times,·consider·putting·the·default·values·in·a·map·and·merging·that319 multiple·times,·consider·putting·the·default·values·in·a·map·and·merging·that
320 map·with·the·other·map:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">DefaultMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9953677897-1">#{</span><span·class="n">Key1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Value2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key2</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·420,·SHA:·824b22885353e7c5c9401f89ef8d78677e37fa4d5ca828bd19e13bfb38b9ddde·...·]-1">}</span><span·class="p">,</span><span·class="w">320 map·with·the·other·map:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">DefaultMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0060499784-1">#{</span><span·class="n">Key1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Value2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key2</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·420,·SHA:·3d89a56bdd1fbec4719b130ea823d14d32ba417c5fb68a18758adfffb08fcc15·...·]-1">}</span><span·class="p">,</span><span·class="w">
321 </span><span·class="n">MapWithDefaultsApplied</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">merge</span><span·class="p"·data-group-id="9953677897-2">(</span><span·class="n">DefaultMap</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherMap</span><span·class="p"·data-group-id="9953677897-2">)</span></code></pre><p>This·helps·share·keys·between·the·default·map·and·the·one·you·applied·defaults321 </span><span·class="n">MapWithDefaultsApplied</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">merge</span><span·class="p"·data-group-id="0060499784-2">(</span><span·class="n">DefaultMap</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherMap</span><span·class="p"·data-group-id="0060499784-2">)</span></code></pre><p>This·helps·share·keys·between·the·default·map·and·the·one·you·applied·defaults
322 to,·as·long·as·the·default·map·contains·<em>all</em>·the·keys·that·will·ever·be·used322 to,·as·long·as·the·default·map·contains·<em>all</em>·the·keys·that·will·ever·be·used
323 and·not·just·the·ones·with·default·values.·Whether·this·is·faster·than·calling323 and·not·just·the·ones·with·default·values.·Whether·this·is·faster·than·calling
324 <a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·multiple·times·depends·on·the·size·of·the·map·and·the·number·of324 <a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·multiple·times·depends·on·the·size·of·the·map·and·the·number·of
325 default·values.</p><blockquote><h4·class="info">Change</h4><p>Before·OTP·26.0·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·was·implemented·by·calling·the·function·instead325 default·values.</p><blockquote><h4·class="info">Change</h4><p>Before·OTP·26.0·<a·href="../../lib/stdlib-6.0.1/doc/html/maps.html#get/3"><code·class="inline">maps:get/3</code></a>·was·implemented·by·calling·the·function·instead
326 of·rewriting·it·as·an·Erlang·expression.·It·is·now·slightly·faster·but·can·no326 of·rewriting·it·as·an·Erlang·expression.·It·is·now·slightly·faster·but·can·no
327 longer·be·traced.</p></blockquote><h3·id="maps-intersect-2-maps-intersect_with-3"·class="section-heading">327 longer·be·traced.</p></blockquote><h3·id="maps-intersect-2-maps-intersect_with-3"·class="section-heading">
328 ··<a·href="#maps-intersect-2-maps-intersect_with-3"·class="hover-link">328 ··<a·href="#maps-intersect-2-maps-intersect_with-3"·class="hover-link">
23.8 KB
./usr/share/doc/erlang-doc/html/doc/system/modules.html
    
Offset 118, 20 lines modifiedOffset 118, 20 lines modified
118 <h2·id="module-syntax"·class="section-heading">118 <h2·id="module-syntax"·class="section-heading">
119 ··<a·href="#module-syntax"·class="hover-link">119 ··<a·href="#module-syntax"·class="hover-link">
120 ····<i·class="ri-link-m"·aria-hidden="true"></i>120 ····<i·class="ri-link-m"·aria-hidden="true"></i>
121 ··</a>121 ··</a>
122 ··<span·class="text">Module·Syntax</span>122 ··<span·class="text">Module·Syntax</span>
123 </h2>123 </h2>
124 <p>Erlang·code·is·divided·into·<em>modules</em>.·A·module·consists·of·a·sequence·of124 <p>Erlang·code·is·divided·into·<em>modules</em>.·A·module·consists·of·a·sequence·of
125 attributes·and·function·declarations,·each·terminated·by·a·period·(<code·class="inline">.</code>).</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3196294287-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="3196294287-1">)</span><span·class="p">.</span><span·class="w">··········</span><span·class="c1">%·module·attribute</span><span·class="w">125 attributes·and·function·declarations,·each·terminated·by·a·period·(<code·class="inline">.</code>).</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3856004542-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="3856004542-1">)</span><span·class="p">.</span><span·class="w">··········</span><span·class="c1">%·module·attribute</span><span·class="w">
126 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3196294287-2">(</span><span·class="p"·data-group-id="3196294287-3">[</span><span·class="ss">fact</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3196294287-3">]</span><span·class="p"·data-group-id="3196294287-2">)</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·module·attribute</span><span·class="w">126 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3856004542-2">(</span><span·class="p"·data-group-id="3856004542-3">[</span><span·class="ss">fact</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3856004542-3">]</span><span·class="p"·data-group-id="3856004542-2">)</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·module·attribute</span><span·class="w">
  
127 </span><span·class="nf">fact</span><span·class="p"·data-group-id="3196294287-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="3196294287-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="o">&gt;</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="c1">%·beginning·of·function·declaration</span><span·class="w">127 </span><span·class="nf">fact</span><span·class="p"·data-group-id="3856004542-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="3856004542-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="o">&gt;</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="c1">%·beginning·of·function·declaration</span><span·class="w">
128 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="3196294287-5">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="3196294287-5">)</span><span·class="p">;</span><span·class="w">···</span><span·class="c1">%··|</span><span·class="w">128 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="3856004542-5">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="3856004542-5">)</span><span·class="p">;</span><span·class="w">···</span><span·class="c1">%··|</span><span·class="w">
129 </span><span·class="nf">fact</span><span·class="p"·data-group-id="3196294287-6">(</span><span·class="mi">0</span><span·class="p"·data-group-id="3196294287-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···········</span><span·class="c1">%··|</span><span·class="w">129 </span><span·class="nf">fact</span><span·class="p"·data-group-id="3856004542-6">(</span><span·class="mi">0</span><span·class="p"·data-group-id="3856004542-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···········</span><span·class="c1">%··|</span><span·class="w">
130 ····</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">···············</span><span·class="c1">%·end·of·function·declaration</span></code></pre><p>For·a·description·of·function·declarations,·see130 ····</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">···············</span><span·class="c1">%·end·of·function·declaration</span></code></pre><p>For·a·description·of·function·declarations,·see
131 <a·href="ref_man_functions.html">Function·Declaration·Syntax</a>.</p><h2·id="module-attributes"·class="section-heading">131 <a·href="ref_man_functions.html">Function·Declaration·Syntax</a>.</p><h2·id="module-attributes"·class="section-heading">
132 ··<a·href="#module-attributes"·class="hover-link">132 ··<a·href="#module-attributes"·class="hover-link">
133 ····<i·class="ri-link-m"·aria-hidden="true"></i>133 ····<i·class="ri-link-m"·aria-hidden="true"></i>
134 ··</a>134 ··</a>
135 ··<span·class="text">Module·Attributes</span>135 ··<span·class="text">Module·Attributes</span>
136 </h2>136 </h2>
Offset 176, 71 lines modifiedOffset 176, 71 lines modified
176 meaning.</p></blockquote></li></ul><h3·id="behaviour-module-attribute"·class="section-heading">176 meaning.</p></blockquote></li></ul><h3·id="behaviour-module-attribute"·class="section-heading">
177 ··<a·href="#behaviour-module-attribute"·class="hover-link">177 ··<a·href="#behaviour-module-attribute"·class="hover-link">
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Behaviour·Module·Attribute</span>180 ··<span·class="text">Behaviour·Module·Attribute</span>
181 </h3>181 </h3>
182 <p>It·is·possible·to·specify·that·the·module·is·the·callback·module·for·a182 <p>It·is·possible·to·specify·that·the·module·is·the·callback·module·for·a
183 <em>behaviour</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="8265186014-1">(</span><span·class="n">Behaviour</span><span·class="p"·data-group-id="8265186014-1">)</span><span·class="p">.</span></code></pre><p>The·atom·<code·class="inline">Behaviour</code>·gives·the·name·of·the·behaviour,·which·can·be·a183 <em>behaviour</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="8654000202-1">(</span><span·class="n">Behaviour</span><span·class="p"·data-group-id="8654000202-1">)</span><span·class="p">.</span></code></pre><p>The·atom·<code·class="inline">Behaviour</code>·gives·the·name·of·the·behaviour,·which·can·be·a
184 user-defined·behaviour·or·one·of·the·following·OTP·standard·behaviours:</p><ul><li><code·class="inline">gen_server</code></li><li><code·class="inline">gen_statem</code></li><li><code·class="inline">gen_event</code></li><li><code·class="inline">supervisor</code></li></ul><p>The·spelling·<code·class="inline">behavior</code>·is·also·accepted.</p><p>The·callback·functions·of·the·module·can·be·specified·either·directly·by·the184 user-defined·behaviour·or·one·of·the·following·OTP·standard·behaviours:</p><ul><li><code·class="inline">gen_server</code></li><li><code·class="inline">gen_statem</code></li><li><code·class="inline">gen_event</code></li><li><code·class="inline">supervisor</code></li></ul><p>The·spelling·<code·class="inline">behavior</code>·is·also·accepted.</p><p>The·callback·functions·of·the·module·can·be·specified·either·directly·by·the
185 exported·function·<code·class="inline">behaviour_info/1</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">behaviour_info</span><span·class="p"·data-group-id="9897363756-1">(</span><span·class="ss">callbacks</span><span·class="p"·data-group-id="9897363756-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Callbacks</span><span·class="p">.</span></code></pre><p>[·...·truncated·by·diffoscope;·len:·368,·SHA:·7f9f4c620a9cfd45573f2af8bf47b9cda02187cfcdc9ae06d2578e985a4ed6e7·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Result</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">Arguments</code>·is·a·list·of·zero·or·more·arguments.·The·<code·class="inline">-callback</code>·attribute185 exported·function·<code·class="inline">behaviour_info/1</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">behaviour_info</span><span·class="p"·data-group-id="1115441502-1">(</span><span·class="ss">callbacks</span><span·class="p"·data-group-id="1115441502-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Callbacks</span><span·class="p">.</span></code></pre><p>[·...·truncated·by·diffoscope;·len:·368,·SHA:·f7f45ef2bf18b0eb45ca8e65d2654435724a15375306b2875ff9b2c43e0f1a66·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Result</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">Arguments</code>·is·a·list·of·zero·or·more·arguments.·The·<code·class="inline">-callback</code>·attribute
186 is·to·be·preferred·since·the·extra·type·information·can·be·used·by·tools·to186 is·to·be·preferred·since·the·extra·type·information·can·be·used·by·tools·to
187 produce·documentation·or·find·discrepancies.</p><p>Read·more·about·behaviours·and·callback·modules·in187 produce·documentation·or·find·discrepancies.</p><p>Read·more·about·behaviours·and·callback·modules·in
188 <a·href="../../doc/system/spec_proc.html#behaviours">OTP·Design·Principles</a>.</p><h3·id="record-definitions"·class="section-heading">188 <a·href="../../doc/system/spec_proc.html#behaviours">OTP·Design·Principles</a>.</p><h3·id="record-definitions"·class="section-heading">
189 ··<a·href="#record-definitions"·class="hover-link">189 ··<a·href="#record-definitions"·class="hover-link">
190 ····<i·class="ri-link-m"·aria-hidden="true"></i>190 ····<i·class="ri-link-m"·aria-hidden="true"></i>
191 ··</a>191 ··</a>
192 ··<span·class="text">Record·Definitions</span>192 ··<span·class="text">Record·Definitions</span>
193 </h3>193 </h3>
194 <p>The·same·syntax·as·for·module·attributes·is·used·for·record·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3013808530-1">(</span><span·class="n">Record</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fields</span><span·class="p"·data-group-id="3013808530-1">)</span><span·class="p">.</span></code></pre><p>Record·definitions·are·allowed·anywhere·in·a·module,·also·among·the·function194 <p>The·same·syntax·as·for·module·attributes·is·used·for·record·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="6648295139-1">(</span><span·class="n">Record</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fields</span><span·class="p"·data-group-id="6648295139-1">)</span><span·class="p">.</span></code></pre><p>Record·definitions·are·allowed·anywhere·in·a·module,·also·among·the·function
195 declarations.·Read·more·in·<a·href="ref_man_records.html">Records</a>.</p><h3·id="preprocessor"·class="section-heading">195 declarations.·Read·more·in·<a·href="ref_man_records.html">Records</a>.</p><h3·id="preprocessor"·class="section-heading">
196 ··<a·href="#preprocessor"·class="hover-link">196 ··<a·href="#preprocessor"·class="hover-link">
197 ····<i·class="ri-link-m"·aria-hidden="true"></i>197 ····<i·class="ri-link-m"·aria-hidden="true"></i>
198 ··</a>198 ··</a>
199 ··<span·class="text">Preprocessor</span>199 ··<span·class="text">Preprocessor</span>
200 </h3>200 </h3>
201 <p>The·same·syntax·as·for·module·attributes·is·used·by·the·preprocessor,·which201 <p>The·same·syntax·as·for·module·attributes·is·used·by·the·preprocessor,·which
202 supports·file·inclusion,·macros,·and·conditional·compilation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="7316667449-1">(</span><span·class="s">&quot;SomeFile.hrl&quot;</span><span·class="p"·data-group-id="7316667449-1">)</span><span·class="p">.</span><span·class="w">202 supports·file·inclusion,·macros,·and·conditional·compilation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="4008263294-1">(</span><span·class="s">&quot;SomeFile.hrl&quot;</span><span·class="p"·data-group-id="4008263294-1">)</span><span·class="p">.</span><span·class="w">
203 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7316667449-2">(</span><span·class="n">Macro</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Replacement</span><span·class="p"·data-group-id="7316667449-2">)</span><span·class="p">.</span></code></pre><p>Read·more·in·<a·href="macros.html">Preprocessor</a>.</p><h3·id="setting-file-and-line"·class="section-heading">203 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="4008263294-2">(</span><span·class="n">Macro</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Replacement</span><span·class="p"·data-group-id="4008263294-2">)</span><span·class="p">.</span></code></pre><p>Read·more·in·<a·href="macros.html">Preprocessor</a>.</p><h3·id="setting-file-and-line"·class="section-heading">
204 ··<a·href="#setting-file-and-line"·class="hover-link">204 ··<a·href="#setting-file-and-line"·class="hover-link">
205 ····<i·class="ri-link-m"·aria-hidden="true"></i>205 ····<i·class="ri-link-m"·aria-hidden="true"></i>
206 ··</a>206 ··</a>
207 ··<span·class="text">Setting·File·and·Line</span>207 ··<span·class="text">Setting·File·and·Line</span>
208 </h3>208 </h3>
209 <p>The·same·syntax·as·for·module·attributes·is·used·for·changing·the·pre-defined209 <p>The·same·syntax·as·for·module·attributes·is·used·for·changing·the·pre-defined
210 macros·<code·class="inline">?FILE</code>·and·<code·class="inline">?LINE</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">file</span><span·class="p"·data-group-id="6522076213-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Line</span><span·class="p"·data-group-id="6522076213-1">)</span><span·class="p">.</span></code></pre><p>This·attribute·is·used·by·tools,·such·as·Yecc,·to·inform·the·compiler·that·the210 macros·<code·class="inline">?FILE</code>·and·<code·class="inline">?LINE</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">file</span><span·class="p"·data-group-id="5513948158-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Line</span><span·class="p"·data-group-id="5513948158-1">)</span><span·class="p">.</span></code></pre><p>This·attribute·is·used·by·tools,·such·as·Yecc,·to·inform·the·compiler·that·the
211 source·program·is·generated·by·another·tool.·It·also·indicates·the211 source·program·is·generated·by·another·tool.·It·also·indicates·the
212 correspondence·of·source·files·to·lines·of·the·original·user-written·file,·from212 correspondence·of·source·files·to·lines·of·the·original·user-written·file,·from
213 which·the·source·program·is·produced.</p><h3·id="types-and-function-specifications"·class="section-heading">213 which·the·source·program·is·produced.</p><h3·id="types-and-function-specifications"·class="section-heading">
214 ··<a·href="#types-and-function-specifications"·class="hover-link">214 ··<a·href="#types-and-function-specifications"·class="hover-link">
215 ····<i·class="ri-link-m"·aria-hidden="true"></i>215 ····<i·class="ri-link-m"·aria-hidden="true"></i>
216 ··</a>216 ··</a>
217 ··<span·class="text">Types·and·function·specifications</span>217 ··<span·class="text">Types·and·function·specifications</span>
218 </h3>218 </h3>
219 <p>A·similar·syntax·as·for·module·attributes·is·used·for·specifying·types·and219 <p>A·similar·syntax·as·for·module·attributes·is·used·for·specifying·types·and
220 function·specifications:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">my_type</span><span·class="p"·data-group-id="2253356998-1">(</span><span·class="p"·data-group-id="2253356998-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="2253356998-2">(</span><span·class="p"·data-group-id="2253356998-2">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2253356998-3">(</span><span·class="p"·data-group-id="2253356998-3">)</span><span·class="p">.</span><span·class="w"> 
221 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">my_function</span><span·class="p"·data-group-id="2253356998-4">(</span><span·class="nf">integer</span><span·class="p"·data-group-id="2253356998-5">(</span><[·...·truncated·by·diffoscope;·len:·467,·SHA:·0b489de346edf32faeaf3d9972ae924680c450a2267964344a3c85571c5388ff·...·]220 function·specifications:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">my_type</span><span·class="p"·data-group-id="5406393319-1">(</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·512,·SHA:·eeb7d07e02285c055e832cee317d661bde7489117cbd158e98f9d38d4fcca8a4·...·]
 221 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">my_function</span><span·class="p"·data-group-id="5406393319-4">(</span><span·class="nf">integer</span><span·class="p"·data-group-id="5406393319-5">(</span><span·class="p"·data-group-id="5406393319-5">)</span><span·class="p"·data-group-id="5406393319-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5406393319-6">(</span><span·class="p"·data-group-id="5406393319-6">)</span><span·class="p">.</span></code></pre><p>Read·more·in·<a·href="typespec.html">Types·and·Function·specifications</a>.</p><p>The·description·is·based·on
222 <a·href="http://www.erlang.org/eeps/eep-0008.html">EEP8·-·Types·and·function·specifications</a>,222 <a·href="http://www.erlang.org/eeps/eep-0008.html">EEP8·-·Types·and·function·specifications</a>,
223 which·is·not·to·be·further·updated.</p><h3·id="documentation-attributes"·class="section-heading">223 which·is·not·to·be·further·updated.</p><h3·id="documentation-attributes"·class="section-heading">
224 ··<a·href="#documentation-attributes"·class="hover-link">224 ··<a·href="#documentation-attributes"·class="hover-link">
225 ····<i·class="ri-link-m"·aria-hidden="true"></i>225 ····<i·class="ri-link-m"·aria-hidden="true"></i>
226 ··</a>226 ··</a>
227 ··<span·class="text">Documentation·attributes</span>227 ··<span·class="text">Documentation·attributes</span>
228 </h3>228 </h3>
229 <p>The·module·attribute·<code·class="inline">-doc(Documentation)</code>·is·used·to·provide·user·documentation229 <p>The·module·attribute·<code·class="inline">-doc(Documentation)</code>·is·used·to·provide·user·documentation
230 for·a·function/type/callback:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="7059237158-1">(</span><span·class="s">&quot;Example·documentation&quot;</span><span·class="p"·data-group-id="7059237158-1">)</span><span·class="p">.</span><span·class="w">230 for·a·function/type/callback:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="7148821690-1">(</span><span·class="s">&quot;Example·documentation&quot;</span><span·class="p"·data-group-id="7148821690-1">)</span><span·class="p">.</span><span·class="w">
231 </span><span·class="nf">example</span><span·class="p"·data-group-id="7059237158-2">(</span><span·class="p"·data-group-id="7059237158-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>The·attribute·should·be·placed·just·before·the·entity·it·documents.The231 </span><span·class="nf">example</span><span·class="p"·data-group-id="7148821690-2">(</span><span·class="p"·data-group-id="7148821690-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>The·attribute·should·be·placed·just·before·the·entity·it·documents.The
232 parenthesis·are·optional·around·<code·class="inline">Documentation</code>.·The·allowed·values·for232 parenthesis·are·optional·around·<code·class="inline">Documentation</code>.·The·allowed·values·for
233 <code·class="inline">Documentation</code>·are:</p><ul><li><p><strong><a·href="data_types.html#string">literal·string</a>·or233 <code·class="inline">Documentation</code>·are:</p><ul><li><p><strong><a·href="data_types.html#string">literal·string</a>·or
234 <a·href="expressions.html#unicode-segments">utf-8·encoded·binary·string</a></strong>·-·The·string234 <a·href="expressions.html#unicode-segments">utf-8·encoded·binary·string</a></strong>·-·The·string
235 documenting·the·entity.·Any·literal·string·is·allowed,·so·both235 documenting·the·entity.·Any·literal·string·is·allowed,·so·both
236 <a·href="data_types.html#tqstring">triple·quoted·strings</a>·and236 <a·href="data_types.html#tqstring">triple·quoted·strings</a>·and
237 <a·href="data_types.html#sigil">sigils</a>·that·translate·to·literal·strings·can·be·used.237 <a·href="data_types.html#sigil">sigils</a>·that·translate·to·literal·strings·can·be·used.
238 The·following·examples·are·equivalent:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="3453536421-1">(</span><span·class="s">&quot;Example·\&quot;docs\&quot;&quot;</span><span·class="p"·data-group-id="3453536421-1">)</span><span·class="p">.</span><span·class="w">238 The·following·examples·are·equivalent:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="2807595471-1">(</span><span·class="s">&quot;Example·\&quot;docs\&quot;&quot;</span><span·class="p"·data-group-id="2807595471-1">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="3453536421-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Example·\&quot;docs\&quot;&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3453536421-2">)</span><span·class="p">.</span><span·class="w">239 </span><span·class="p">-</span><span·class="na">doc</span><span·class="p"·data-group-id="2807595471-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Example·\&quot;docs\&quot;&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2807595471-2">)</span><span·class="p">.</span><span·class="w">
240 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">~S/Example·&quot;docs&quot;/</span><span·class="p">.</span><span·class="w">240 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">~S/Example·&quot;docs&quot;/</span><span·class="p">.</span><span·class="w">
241 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;241 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;
242 ···Example·&quot;</span><span·class="ss">docs</span><span·class="s">&quot;242 ···Example·&quot;</span><span·class="ss">docs</span><span·class="s">&quot;
243 ···&quot;</span><span·class="s">&quot;&quot;</span><span·class="w">243 ···&quot;</span><span·class="s">&quot;&quot;</span><span·class="w">
244 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">~B|Example·&quot;docs&quot;|</span><span·class="p">.</span></code></pre><p>For·clarity·it·is·recommended·to·use·either·normal·<code·class="inline">&quot;strings&quot;</code>·or·triple244 </span><span·class="p">-</span><span·class="na">doc</span><span·class="w">·</span><span·class="s">~B|Example·&quot;docs&quot;|</span><span·class="p">.</span></code></pre><p>For·clarity·it·is·recommended·to·use·either·normal·<code·class="inline">&quot;strings&quot;</code>·or·triple
245 quoted·strings·for·documentation·attributes.</p></li><li><p><strong><code·class="inline">{file,</code>·<a·href="../../lib/kernel-10.0.1/doc/html/file.html#t:name/0"><code·class="inline">file:name/0</code></a>·<code·class="inline">}</code></strong>·-·Read·the·contents·of·filename·and·use245 quoted·strings·for·documentation·attributes.</p></li><li><p><strong><code·class="inline">{file,</code>·<a·href="../../lib/kernel-10.0.1/doc/html/file.html#t:name/0"><code·class="inline">file:name/0</code></a>·<code·class="inline">}</code></strong>·-·Read·the·contents·of·filename·and·use
246 that·as·the·documentation·string.</p></li><li><p><strong><code·class="inline">false</code></strong>·-·Set·the·current·entity·as·hidden,·that·is,·it·should·not·be246 that·as·the·documentation·string.</p></li><li><p><strong><code·class="inline">false</code></strong>·-·Set·the·current·entity·as·hidden,·that·is,·it·should·not·be
Offset 253, 15 lines modifiedOffset 253, 15 lines modified
253 ··<a·href="#the-feature-directive"·class="hover-link">253 ··<a·href="#the-feature-directive"·class="hover-link">
254 ····<i·class="ri-link-m"·aria-hidden="true"></i>254 ····<i·class="ri-link-m"·aria-hidden="true"></i>
255 ··</a>255 ··</a>
256 ··<span·class="text">The·feature·directive</span>256 ··<span·class="text">The·feature·directive</span>
257 </h2>257 </h2>
258 <p>While·not·a·module·attribute,·but·rather·a·directive·(since·it·might·affect258 <p>While·not·a·module·attribute,·but·rather·a·directive·(since·it·might·affect
259 syntax),·there·is·the·<code·class="inline">-feature(..)</code>·directive·used·for·enabling·and·disabling259 syntax),·there·is·the·<code·class="inline">-feature(..)</code>·directive·used·for·enabling·and·disabling
260 <a·href="../../doc/system/features.html#features">features</a>.</p><p>The·syntax·is·similar·to·that·of·an·attribute,·but·has·two·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">feature</span><span·class="p"·data-group-id="4010355704-1">(</span><span·class="n">FeatureName</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">enable</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">disable</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·26f710883934b2d388c9fb55a2e946ef580d0e2823bc430f006d50685296351f·...·]-1">)</span><span·class="p">.</span></code></pre><p>Note·that·the·<a·href="macros.html#feature-directive">feature·directive</a>·can·only·appear260 <a·href="../../doc/system/features.html#features">features</a>.</p><p>The·syntax·is·similar·to·that·of·an·attribute,·but·has·two·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">feature</span><span·class="p"·data-group-id="6284673960-1">(</span><span·class="n">FeatureName</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">enable</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">disable</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·9a5b27b30a6d837eea3406005e83566b17a2f3081eaf111fba7198a919efe7f0·...·]-1">)</span><span·class="p">.</span></code></pre><p>Note·that·the·<a·href="macros.html#feature-directive">feature·directive</a>·can·only·appear
261 in·a·prefix·of·the·module.</p><h2·id="comments"·class="section-heading">261 in·a·prefix·of·the·module.</p><h2·id="comments"·class="section-heading">
262 ··<a·href="#comments"·class="hover-link">262 ··<a·href="#comments"·class="hover-link">
263 ····<i·class="ri-link-m"·aria-hidden="true"></i>263 ····<i·class="ri-link-m"·aria-hidden="true"></i>
264 ··</a>264 ··</a>
265 ··<span·class="text">Comments</span>265 ··<span·class="text">Comments</span>
266 </h2>266 </h2>
267 <p>Comments·can·be·placed·anywhere·in·a·module·except·within·strings·and267 <p>Comments·can·be·placed·anywhere·in·a·module·except·within·strings·and
16.1 KB
./usr/share/doc/erlang-doc/html/doc/system/nif.html
    
Offset 133, 26 lines modifiedOffset 133, 26 lines modified
133 ··<span·class="text">Erlang·Program</span>133 ··<span·class="text">Erlang·Program</span>
134 </h2>134 </h2>
135 <p>Even·if·all·functions·of·a·module·are·NIFs,·an·Erlang·module·is·still·needed·for135 <p>Even·if·all·functions·of·a·module·are·NIFs,·an·Erlang·module·is·still·needed·for
136 two·reasons:</p><ul><li>The·NIF·library·must·be·explicitly·loaded·by·Erlang·code·in·the·same·module.</li><li>All·NIFs·of·a·module·must·have·an·Erlang·implementation·as·well.</li></ul><p>Normally·these·are·minimal·stub·implementations·that·throw·an·exception.·But136 two·reasons:</p><ul><li>The·NIF·library·must·be·explicitly·loaded·by·Erlang·code·in·the·same·module.</li><li>All·NIFs·of·a·module·must·have·an·Erlang·implementation·as·well.</li></ul><p>Normally·these·are·minimal·stub·implementations·that·throw·an·exception.·But
137 they·can·also·be·used·as·fallback·implementations·for·functions·that·do·not·have137 they·can·also·be·used·as·fallback·implementations·for·functions·that·do·not·have
138 native·implementations·on·some·architectures.</p><p>NIF·libraries·are·loaded·by·calling·<a·href="../../erts-15.0.1/doc/html/erlang.html#load_nif/2"><code·class="inline">erlang:load_nif/2</code></a>,·with·the·name·of·the138 native·implementations·on·some·architectures.</p><p>NIF·libraries·are·loaded·by·calling·<a·href="../../erts-15.0.1/doc/html/erlang.html#load_nif/2"><code·class="inline">erlang:load_nif/2</code></a>,·with·the·name·of·the
139 shared·library·as·argument.·The·second·argument·can·be·any·term·that·will·be139 shared·library·as·argument.·The·second·argument·can·be·any·term·that·will·be
140 passed·on·to·the·library·and·used·for·initialization:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1737041067-1">(</span><span·class="ss">complex6</span><span·class="p"·data-group-id="1737041067-1">)</span><span·class="p">.</span><span·class="w">140 passed·on·to·the·library·and·used·for·initialization:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7461656708-1">(</span><span·class="ss">complex6</span><span·class="p"·data-group-id="7461656708-1">)</span><span·class="p">.</span><span·class="w">
141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1737041067-2">(</span><span·class="p"·data-group-id="1737041067-3">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·d58098d66faf708849a458ca19d46c025d84b4a8a471598aff190d7e271f5697·...·]-2">)</span><span·class="p">.</span><span·class="w">141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7461656708-2">(</span><span·class="p"·data-group-id="7461656708-3">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·e6bab18c00ee7e0ca8a0895cec27fa0be2ce8fc58df98f0cc9887d02d0d67e77·...·]-2">)</span><span·class="p">.</span><span·class="w">
142 </span><span·class="p">-</span><span·class="na">nifs</span><span·class="p"·data-group-id="1737041067-4">(</span><span·class="p"·data-group-id="1737041067-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·6f87bc3a89dcb2282694bf43be9eeb5ade4dcef6758b42d8afdcce183db3d9a1·...·]-4">)</span><span·class="p">.</span><span·class="w">142 </span><span·class="p">-</span><span·class="na">nifs</span><span·class="p"·data-group-id="7461656708-4">(</span><span·class="p"·data-group-id="7461656708-5">[</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">/</span><span·[·...·truncated·by·diffoscope;·len:·113,·SHA:·b3352492ddf020e71e4377fb511802e0b7008b1a5ff8a0dc49bf58a344b4fac7·...·]-4">)</span><span·class="p">.</span><span·class="w">
143 </span><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="1737041067-6">(</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1737041067-6">)</span><span·class="p">.</span><span·class="w">143 </span><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="7461656708-6">(</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7461656708-6">)</span><span·class="p">.</span><span·class="w">
  
144 </span><span·class="nf">init</span><span·class="p"·data-group-id="1737041067-7">(</span><span·class="p"·data-group-id="1737041067-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">144 </span><span·class="nf">init</span><span·class="p"·data-group-id="7461656708-7">(</span><span·class="p"·data-group-id="7461656708-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
145 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="1737041067-8">(</span><span·class="s">&quot;./complex6_nif&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="1737041067-8">)</span><span·class="p">.</span><span·class="w">145 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="7461656708-8">(</span><span·class="s">&quot;./complex6_nif&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="7461656708-8">)</span><span·class="p">.</span><span·class="w">
  
146 </span><span·class="nf">foo</span><span·class="p"·data-group-id="1737041067-9">(</span><span·class="p">_</span><span·class="n">X</span><span·class="p"·data-group-id="1737041067-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">146 </span><span·class="nf">foo</span><span·class="p"·data-group-id="7461656708-9">(</span><span·class="p">_</span><span·class="n">X</span><span·class="p"·data-group-id="7461656708-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
147 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">nif_error</span><span·class="p"·data-group-id="1737041067-10">(</span><span·class="ss">nif_library_not_loaded</span><span·class="p"·data-group-id="1737041067-10">)</span><span·class="p">.</span><span·class="w">147 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">nif_error</span><span·class="p"·data-group-id="7461656708-10">(</span><span·class="ss">nif_library_not_loaded</span><span·class="p"·data-group-id="7461656708-10">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="nf">bar</span><span·class="p"·data-group-id="1737041067-11">(</span><span·class="p">_</span><span·class="n">Y</span><span·class="p"·data-group-id="1737041067-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">148 </span><span·class="nf">bar</span><span·class="p"·data-group-id="7461656708-11">(</span><span·class="p">_</span><span·class="n">Y</span><span·class="p"·data-group-id="7461656708-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
149 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">nif_error</span><span·class="p"·data-group-id="1737041067-12">(</span><span·class="ss">nif_library_not_loaded</span><span·class="p"·data-group-id="1737041067-12">)</span><span·class="p">.</span></code></pre><p>Here,·the·directive·<code·class="inline">on_load</code>·is·used·to·get·function·<code·class="inline">init</code>·to·be·automatically149 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">nif_error</span><span·class="p"·data-group-id="7461656708-12">(</span><span·class="ss">nif_library_not_loaded</span><span·class="p"·data-group-id="7461656708-12">)</span><span·class="p">.</span></code></pre><p>Here,·the·directive·<code·class="inline">on_load</code>·is·used·to·get·function·<code·class="inline">init</code>·to·be·automatically
150 called·when·the·module·is·loaded.·If·<code·class="inline">init</code>·returns·anything·other·than·<code·class="inline">ok</code>,150 called·when·the·module·is·loaded.·If·<code·class="inline">init</code>·returns·anything·other·than·<code·class="inline">ok</code>,
151 such·when·the·loading·of·the·NIF·library·fails·in·this·example,·the·module·is151 such·when·the·loading·of·the·NIF·library·fails·in·this·example,·the·module·is
152 unloaded·and·calls·to·functions·within·it,·fail.</p><p>Loading·the·NIF·library·overrides·the·stub·implementations·and·cause·calls·to152 unloaded·and·calls·to·functions·within·it,·fail.</p><p>Loading·the·NIF·library·overrides·the·stub·implementations·and·cause·calls·to
153 <code·class="inline">foo</code>·and·<code·class="inline">bar</code>·to·be·dispatched·to·the·NIF·implementations·instead.</p><h2·id="nif-library-code"·class="section-heading">153 <code·class="inline">foo</code>·and·<code·class="inline">bar</code>·to·be·dispatched·to·the·NIF·implementations·instead.</p><h2·id="nif-library-code"·class="section-heading">
154 ··<a·href="#nif-library-code"·class="hover-link">154 ··<a·href="#nif-library-code"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
Offset 209, 23 lines modifiedOffset 209, 23 lines modified
209 ··<a·href="#running-the-example"·class="hover-link">209 ··<a·href="#running-the-example"·class="hover-link">
210 ····<i·class="ri-link-m"·aria-hidden="true"></i>210 ····<i·class="ri-link-m"·aria-hidden="true"></i>
211 ··</a>211 ··</a>
212 ··<span·class="text">Running·the·Example</span>212 ··<span·class="text">Running·the·Example</span>
213 </h2>213 </h2>
214 <p><em>Step·1.</em>·Compile·the·C·code:</p><pre><code·class="text">unix&gt;·gcc·-o·complex6_nif.so·-fpic·-shared·complex.c·complex6_nif.c214 <p><em>Step·1.</em>·Compile·the·C·code:</p><pre><code·class="text">unix&gt;·gcc·-o·complex6_nif.so·-fpic·-shared·complex.c·complex6_nif.c
215 windows&gt;·cl·-LD·-MD·-Fe·complex6_nif.dll·complex.c·complex6_nif.c</code></pre><p><em>Step·2:</em>·Start·Erlang·and·compile·the·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="ss">erl</span><span·class="w">215 windows&gt;·cl·-LD·-MD·-Fe·complex6_nif.dll·complex.c·complex6_nif.c</code></pre><p><em>Step·2:</em>·Start·Erlang·and·compile·the·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="ss">erl</span><span·class="w">
216 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R13B04</span><span·class="w">·</span><span·class="p"·data-group-id="9371492731-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.7</span><span·class="p">.</span><span·class="mi">5</span><span·class="p"·data-group-id="9371492731-1">)</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·1129,·SHA:·9b906d4513fb50f050d00f7af5eff6fec0182c81617013333ed9793ac2461a6f·...·]-6">]</span><span·class="w">216 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R13B04</span><span·class="w">·</span><span·class="p"·data-group-id="9405572690-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.7</span><span·class="p">.</span><span·class="mi">5</span><span·class="p"·data-group-id="9405572690-1">)</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·1129,·SHA:·90c2edd033fe4a4f5336e88e3cde9ed3b329df1751c018d7cd061024bf816f08·...·]-6">]</span><span·class="w">
  
217 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">7.5</span><span·class="w">··</span><span·class="p"·data-group-id="9371492731-7">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="9371492731-7">)</span><span·class="gp·unselectable">217 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">7.5</span><span·class="w">··</span><span·class="p"·data-group-id="9405572690-7">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="9405572690-7">)</span><span·class="gp·unselectable">
218 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="9371492731-8">(</span><span·class="ss">complex6</span><span·class="p"·data-group-id="9371492731-8">)</span><span·class="p">.</span><span·class="w">218 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="9405572690-8">(</span><span·class="ss">complex6</span><span·class="p"·data-group-id="9405572690-8">)</span><span·class="p">.</span><span·class="w">
219 </span><span·class="p"·data-group-id="9371492731-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">complex6</span><span·class="p"·data-group-id="9371492731-9">}</span></code></pre><p><em>Step·3:</em>·Run·the·example:</p><pre><code·class="makeup·erlang"·translate="no"[·...·truncated·by·diffoscope;·len:·246,·SHA:·8d826828e5543eb7bf03bf77ecc69643d1a2f0fe118f7fa94a050348c723bc91·...·]-1">)</span><span·class="p">.</span><span·class="w">219 </span><span·class="p"·data-group-id="9405572690-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">complex6</span><span·class="p"·data-group-id="9405572690-9">}</span></code></pre><p><em>Step·3:</em>·Run·the·example:</p><pre><code·class="makeup·erlang"·translate="no"[·...·truncated·by·diffoscope;·len:·246,·SHA:·c7f44723dd5625413d3d48749c497bb5acd7788f2f423b3ca12eeae5a5ec4577·...·]-1">)</span><span·class="p">.</span><span·class="w">
220 </span><span·class="mi">4</span><span·class="gp·unselectable">220 </span><span·class="mi">4</span><span·class="gp·unselectable">
221 4&gt;·</span><span·class="nc">complex6</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="0783697897-2">(</span><span·class="mi">5</span><span·class="p"·data-group-id="0783697897-2">)</span><span·class="p">.</span><span·class="w">221 4&gt;·</span><span·class="nc">complex6</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="0155301914-2">(</span><span·class="mi">5</span><span·class="p"·data-group-id="0155301914-2">)</span><span·class="p">.</span><span·class="w">
222 </span><span·class="mi">10</span><span·class="gp·unselectable">222 </span><span·class="mi">10</span><span·class="gp·unselectable">
223 5&gt;·</span><span·class="nc">complex6</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="0783697897-3">(</span><span·class="s">&quot;not·an·integer&quot;</span><span·class="p"·data-group-id="0783697897-3">)</span><span·class="p">.</span><span·class="w">223 5&gt;·</span><span·class="nc">complex6</span><span·class="p">:</span><span·class="nf">foo</span><span·class="p"·data-group-id="0155301914-3">(</span><span·class="s">&quot;not·an·integer&quot;</span><span·class="p"·data-group-id="0155301914-3">)</span><span·class="p">.</span><span·class="w">
224 </span><span·class="gt">**·exception·error:·bad·argument224 </span><span·class="gt">**·exception·error:·bad·argument
225 ·····in·function··complex6:foo/1225 ·····in·function··complex6:foo/1
226 ········called·as·comlpex6:foo(&quot;not·an·integer&quot;)</span></code></pre>226 ········called·as·comlpex6:foo(&quot;not·an·integer&quot;)</span></code></pre>
227 </div>227 </div>
  
228 <div·class="bottom-actions"·id="bottom-actions">228 <div·class="bottom-actions"·id="bottom-actions">
229 ··<div·class="bottom-actions-item">229 ··<div·class="bottom-actions-item">
5.01 KB
./usr/share/doc/erlang-doc/html/doc/system/oam.html
    
Offset 203, 17 lines modifiedOffset 203, 17 lines modified
203 ··<span·class="text">MIB·Structure</span>203 ··<span·class="text">MIB·Structure</span>
204 </h3>204 </h3>
205 <p>The·top-level·OTP·MIB·is·called·<code·class="inline">OTP-REG</code>·and·it·is·included·in·the·SNMP205 <p>The·top-level·OTP·MIB·is·called·<code·class="inline">OTP-REG</code>·and·it·is·included·in·the·SNMP
206 application.·All·other·OTP·MIBs·import·some·objects·from·this·MIB.</p><p>Each·MIB·is·contained·in·one·application.·The·MIB·text·files·are·stored·under206 application.·All·other·OTP·MIBs·import·some·objects·from·this·MIB.</p><p>Each·MIB·is·contained·in·one·application.·The·MIB·text·files·are·stored·under
207 <code·class="inline">mibs/&lt;MIB&gt;.mib</code>·in·the·application·directory.·The·generated·<code·class="inline">.hrl</code>·files·with207 <code·class="inline">mibs/&lt;MIB&gt;.mib</code>·in·the·application·directory.·The·generated·<code·class="inline">.hrl</code>·files·with
208 constant·declarations·are·stored·under·<code·class="inline">include/&lt;MIB&gt;.hrl</code>,·and·the·compiled208 constant·declarations·are·stored·under·<code·class="inline">include/&lt;MIB&gt;.hrl</code>,·and·the·compiled
209 MIBs·are·stored·under·<code·class="inline">priv/mibs/&lt;MIB&gt;.bin</code>.</p><p>An·application·that·needs·to·import·an·MIB·into·another·MIB·is·to·use·the·<code·class="inline">il</code>209 MIBs·are·stored·under·<code·class="inline">priv/mibs/&lt;MIB&gt;.bin</code>.</p><p>An·application·that·needs·to·import·an·MIB·into·another·MIB·is·to·use·the·<code·class="inline">il</code>
210 option·to·the·SNMP·MIB·compiler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">c</span><span·class="p"·data-group-id="2023186946-1">(</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2023186946-2">[</span><span·class="p"·data-group-id="2023186946-3">{</span><span·class="ss">il</span><span·class="[·...·truncated·by·diffoscope;·len:·337,·SHA:·79e78ca2cc58adf50ff7f6c26f23be19cb2c1dc88f9734fd18767320c6e62ef7·...·]-1">)</span><span·class="p">.</span></code></pre><p>If·the·application·needs·to·include·a·generated·<code·class="inline">.hrl</code>·file,·it·is·to·use·the210 option·to·the·SNMP·MIB·compiler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">c</span><span·class="p"·data-group-id="8094412569-1">(</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8094412569-2">[</span><span·class="p"·data-group-id="8094412569-3">{</span><span·class="ss">il</span><span·class="[·...·truncated·by·diffoscope;·len:·337,·SHA:·60d8bed547d34b7241c83bdba7d25f24db5d2ed09cf86add1e1256b2dd741dbd·...·]-1">)</span><span·class="p">.</span></code></pre><p>If·the·application·needs·to·include·a·generated·<code·class="inline">.hrl</code>·file,·it·is·to·use·the
211 <code·class="inline">-include_lib</code>·directive·to·the·Erlang·compiler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2806491893-1">(</span><span·class="ss">my_mib</span><span·class="p"·data-group-id="2806491893-1">)</span><span·class="p">.</span><span·class="w">211 <code·class="inline">-include_lib</code>·directive·to·the·Erlang·compiler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3218023245-1">(</span><span·class="ss">my_mib</span><span·class="p"·data-group-id="3218023245-1">)</span><span·class="p">.</span><span·class="w">
212 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2806491893-2">(</span><span·class="s">&quot;snmp/include/OTP-REG.hrl&quot;</span><span·class="p"·data-group-id="2806491893-2">)</span><span·class="p">.</span></code></pre><p>Here·is·a·list·of·some·of·the·MIBs·defined·in·the·OTP·system:</p><ul><li><code·class="inline">OTP-REG</code>·(in·SNMP)·contains·the·top-level·OTP·registration·objects,·used·by212 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="3218023245-2">(</span><span·class="s">&quot;snmp/include/OTP-REG.hrl&quot;</span><span·class="p"·data-group-id="3218023245-2">)</span><span·class="p">.</span></code></pre><p>Here·is·a·list·of·some·of·the·MIBs·defined·in·the·OTP·system:</p><ul><li><code·class="inline">OTP-REG</code>·(in·SNMP)·contains·the·top-level·OTP·registration·objects,·used·by
213 all·other·MIBs.</li><li><code·class="inline">OTP-TC</code>·(in·SNMP)·contains·the·general·Textual·Conventions,·which·can·be·used213 all·other·MIBs.</li><li><code·class="inline">OTP-TC</code>·(in·SNMP)·contains·the·general·Textual·Conventions,·which·can·be·used
214 by·any·other·MIB.</li><li><code·class="inline">OTP-SNMPEA-MIB</code>·(in·<code·class="inline">snmp</code>)·contains·objects·for·instrumentation·and·control214 by·any·other·MIB.</li><li><code·class="inline">OTP-SNMPEA-MIB</code>·(in·<code·class="inline">snmp</code>)·contains·objects·for·instrumentation·and·control
215 of·the·extensible·SNMP·agent·itself.·The·agent·also·implements·the·standard215 of·the·extensible·SNMP·agent·itself.·The·agent·also·implements·the·standard
216 SNMPv2-MIB·(or·v1·part·of·MIB-II,·if·SNMPv1·is·used).</li></ul><p>The·different·applications·use·different·strategies·for·loading·the·MIBs·into216 SNMPv2-MIB·(or·v1·part·of·MIB-II,·if·SNMPv1·is·used).</li></ul><p>The·different·applications·use·different·strategies·for·loading·the·MIBs·into
217 the·agent.·Some·MIB·implementations·are·code-only,·while·others·need·a·server.217 the·agent.·Some·MIB·implementations·are·code-only,·while·others·need·a·server.
218 One·way,·used·by·the·code-only·MIB·implementations,·is·for·the·user·to·call·a218 One·way,·used·by·the·code-only·MIB·implementations,·is·for·the·user·to·call·a
219 function·such·as·<code·class="inline">snmpa:load_mibs(Agent,·[Mib])</code>·to·load·the·MIB,·and219 function·such·as·<code·class="inline">snmpa:load_mibs(Agent,·[Mib])</code>·to·load·the·MIB,·and
9.28 KB
./usr/share/doc/erlang-doc/html/doc/system/opaques.html
    
Offset 122, 24 lines modifiedOffset 122, 24 lines modified
122 ··<span·class="text">Opaque·Type·Aliases</span>122 ··<span·class="text">Opaque·Type·Aliases</span>
123 </h2>123 </h2>
124 <p>The·main·use·case·for·opacity·in·Erlang·is·to·hide·the·implementation·of·a·data124 <p>The·main·use·case·for·opacity·in·Erlang·is·to·hide·the·implementation·of·a·data
125 type,·enabling·evolving·the·API·while·minimizing·the·risk·of·breaking·consumers.125 type,·enabling·evolving·the·API·while·minimizing·the·risk·of·breaking·consumers.
126 The·runtime·does·not·check·opacity.·Dialyzer·provides·some·opacity-checking,·but126 The·runtime·does·not·check·opacity.·Dialyzer·provides·some·opacity-checking,·but
127 the·rest·is·up·to·convention.</p><p>This·document·explains·what·Erlang·opacity·is·(and·the·trade-offs·involved)·via127 the·rest·is·up·to·convention.</p><p>This·document·explains·what·Erlang·opacity·is·(and·the·trade-offs·involved)·via
128 the·example·of·the·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#t:set/0"><code·class="inline">sets:set()</code></a>·data·type.·This·type·<em>was</em>128 the·example·of·the·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#t:set/0"><code·class="inline">sets:set()</code></a>·data·type.·This·type·<em>was</em>
129 defined·in·the·<code·class="inline">sets</code>·module·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">set</span><span·class="p"·data-group-id="0619289397-1">(</span><span·class="n">Element</span><span·class="p"·data-group-id="0619289397-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">set</span><span·class="p"·data-group-id="0619289397-2">{</span><span·class="ss">segs</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">segs</span><span·class="p"·data-group-id="0619289397-3">(</span><span·class="n">Element</span><span·class="p"·data-group-id="0619289397-3">)</span><span·class="p"·data-group-id="0619289397-2">}</span><span·class="p">.</span></code></pre><p>OTP·24·changed·the·definition·to·the·following·in 
130 <a·href="https://github.com/erlang/otp/commit/e66941e8d7c47b973dff94c0308ea85a6be1958e">this·commit</a>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">set</[·...·truncated·by·diffoscope;·len:·1135,·SHA:·bc6a6458b5b98703be6c31c32b678e47f4c610986643beca188d7514dace8230·...·]129 defined·in·the·<code·class="inline">sets</code>·module·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">set</span><span·class="p"·data-group-id="631[·...·truncated·by·diffoscope;·len:·732,·SHA:·d318fdd39422369f332db95f33d7107084774973ac232c12c0133bb2a005eece·...·]
 130 <a·href="https://github.com/erlang/otp/commit/e66941e8d7c47b973dff94c0308ea85a6be1958e">this·commit</a>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">set</span><span·class="p"·data-group-id="5732504063-1">(</span><span·class="n">Element</span><span·class="p"·data-group-id="5732504063-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">set</span><span·class="p"·data-group-id="5732504063-2">{</span><span·class="ss">segs</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">segs</span><span·class="p"·data-group-id="5732504063-3">(</span><span·class="n">Element</span><span·class="p"·data-group-id="5732504063-3">)</span><span·class="p"·data-group-id="5732504063-2">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="5732504063-4">#{</span><span·class="n">Element</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="o">?</span><span·class="n">VALUE</span><span·class="p"·data-group-id="5732504063-4">}</span><span·class="p">.</span></code></pre><p>And·this·change·was·safer·and·more·backwards-compatible·than·if·the·type·had
131 been·defined·with·<code·class="inline">-type</code>·instead·of·<code·class="inline">-opaque</code>.·Here·is·why:·when·a·module131 been·defined·with·<code·class="inline">-type</code>·instead·of·<code·class="inline">-opaque</code>.·Here·is·why:·when·a·module
132 defines·an·<code·class="inline">-opaque</code>,·the·contract·is·that·only·the·defining·module·should·rely132 defines·an·<code·class="inline">-opaque</code>,·the·contract·is·that·only·the·defining·module·should·rely
133 on·the·definition·of·the·type:·no·other·modules·should·rely·on·the·definition.</p><p>This·means·that·code·that·pattern-matched·on·<code·class="inline">set</code>·as·a·record/tuple·technically133 on·the·definition·of·the·type:·no·other·modules·should·rely·on·the·definition.</p><p>This·means·that·code·that·pattern-matched·on·<code·class="inline">set</code>·as·a·record/tuple·technically
134 broke·the·contract,·and·opted·in·to·being·potentially·broken·when·the·definition134 broke·the·contract,·and·opted·in·to·being·potentially·broken·when·the·definition
135 of·<code·class="inline">set()</code>·changed.·Before·OTP·24,·this·code·printed·<code·class="inline">ok</code>.·In·OTP·24·it·may135 of·<code·class="inline">set()</code>·changed.·Before·OTP·24,·this·code·printed·<code·class="inline">ok</code>.·In·OTP·24·it·may
136 error:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="2424788707-1">(</span><span·class="p"·data-group-id="2424788707-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">136 error:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="4023541493-1">(</span><span·class="p"·data-group-id="4023541493-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
137 ····</span><span·class="n">Set</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="2424788707-2">(</span><span·class="n">Set</span><span·class="p"·data-group-id="2424788707-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">137 ····</span><span·class="n">Set</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="4023541493-2">(</span><span·class="n">Set</span><span·class="p"·data-group-id="4023541493-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
138 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2424788707-3">(</span><span·class="s">&quot;ok&quot;</span><span·class="p"·data-group-id="2424788707-3">)</span><span·class="w">138 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4023541493-3">(</span><span·class="s">&quot;ok&quot;</span><span·class="p"·data-group-id="4023541493-3">)</span><span·class="w">
139 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p><strong>When·working·with·an·opaque·defined·in·another·module,·here·are·some139 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p><strong>When·working·with·an·opaque·defined·in·another·module,·here·are·some
140 recommendations:</strong></p><ul><li>Don't·examine·the·underlying·type·using·pattern-matching,·guards,·or·functions140 recommendations:</strong></p><ul><li>Don't·examine·the·underlying·type·using·pattern-matching,·guards,·or·functions
141 that·reveal·the·type,·such·as·<a·href="../../erts-15.0.1/doc/html/erlang.html#tuple_size/1"><code·class="inline">tuple_size/1</code></a>·.</li><li>Instead,·use·functions·provided·by·the·module·for·working·with·the·type.·For141 that·reveal·the·type,·such·as·<a·href="../../erts-15.0.1/doc/html/erlang.html#tuple_size/1"><code·class="inline">tuple_size/1</code></a>·.</li><li>Instead,·use·functions·provided·by·the·module·for·working·with·the·type.·For
142 example,·<code·class="inline">sets</code>·module·provides·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#new/0"><code·class="inline">sets:new/0</code></a>,·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#add_element/2"><code·class="inline">sets:add_element/2</code></a>,142 example,·<code·class="inline">sets</code>·module·provides·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#new/0"><code·class="inline">sets:new/0</code></a>,·<a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#add_element/2"><code·class="inline">sets:add_element/2</code></a>,
143 <a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#is_element/2"><code·class="inline">sets:is_element/2</code></a>,·and·so·on.</li><li><p><a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#t:set/1"><code·class="inline">sets:set(a)</code></a>·is·a·subtype·of·<code·class="inline">sets:set(a·|·b)</code>·and·not·the143 <a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#is_element/2"><code·class="inline">sets:is_element/2</code></a>,·and·so·on.</li><li><p><a·href="../../lib/stdlib-6.0.1/doc/html/sets.html#t:set/1"><code·class="inline">sets:set(a)</code></a>·is·a·subtype·of·<code·class="inline">sets:set(a·|·b)</code>·and·not·the
144 other·way·around.·Generally,·you·can·rely·on·the·property·that·<code·class="inline">the_opaque(T)</code>144 other·way·around.·Generally,·you·can·rely·on·the·property·that·<code·class="inline">the_opaque(T)</code>
145 is·a·subtype·of·<code·class="inline">the_opaque(U)</code>·when·T·is·a·subtype·of·U.</p></li></ul><p><strong>When·defining·your·own·opaques,·here·are·some·recommendations:</strong></p><ul><li>Since·consumers·are·expected·to·not·rely·on·the·definition·of·the·opaque·type,145 is·a·subtype·of·<code·class="inline">the_opaque(U)</code>·when·T·is·a·subtype·of·U.</p></li></ul><p><strong>When·defining·your·own·opaques,·here·are·some·recommendations:</strong></p><ul><li>Since·consumers·are·expected·to·not·rely·on·the·definition·of·the·opaque·type,
1.61 KB
./usr/share/doc/erlang-doc/html/doc/system/otp-patch-apply.html
    
Offset 201, 15 lines modifiedOffset 201, 15 lines modified
201 ··</a>201 ··</a>
202 ··<span·class="text">Sanity·check</span>202 ··<span·class="text">Sanity·check</span>
203 </h2>203 </h2>
204 <p>The·application·dependencies·can·be·checked·using·the·Erlang·shell.204 <p>The·application·dependencies·can·be·checked·using·the·Erlang·shell.
205 Application·dependencies·are·verified·among·installed·applications·by205 Application·dependencies·are·verified·among·installed·applications·by
206 <code·class="inline">otp_patch_apply</code>,·but·these·are·not·necessarily·those·actually·loaded.206 <code·class="inline">otp_patch_apply</code>,·but·these·are·not·necessarily·those·actually·loaded.
207 By·calling·<code·class="inline">system_information:sanity_check()</code>·one·can·validate207 By·calling·<code·class="inline">system_information:sanity_check()</code>·one·can·validate
208 dependencies·among·applications·actually·loaded.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">system_information</span><span·class="p">:</span><span·class="nf">sanity_check</span><span·class="p"·data-group-id="8142897993-1">(</span><span·class="p"·data-group-id="8142897993-1">)</span><span·class="p">.</span><span·class="w">208 dependencies·among·applications·actually·loaded.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">system_information</span><span·class="p">:</span><span·class="nf">sanity_check</span><span·class="p"·data-group-id="4433579559-1">(</span><span·class="p"·data-group-id="4433579559-1">)</span><span·class="p">.</span><span·class="w">
209 </span><span·class="ss">ok</span></code></pre><p>Please·take·a·look·at·the·reference·of·<a·href="../../lib/runtime_tools-2.1/doc/html/system_information.html#sanity_check/0"·title="">sanity_check()</a>·for·more209 </span><span·class="ss">ok</span></code></pre><p>Please·take·a·look·at·the·reference·of·<a·href="../../lib/runtime_tools-2.1/doc/html/system_information.html#sanity_check/0"·title="">sanity_check()</a>·for·more
210 information.</p>210 information.</p>
211 </div>211 </div>
  
212 <div·class="bottom-actions"·id="bottom-actions">212 <div·class="bottom-actions"·id="bottom-actions">
213 ··<div·class="bottom-actions-item">213 ··<div·class="bottom-actions-item">
  
3.84 KB
./usr/share/doc/erlang-doc/html/doc/system/patterns.html
    
Offset 128, 18 lines modifiedOffset 128, 18 lines modified
128 succeeds,·any·unbound·variables·in·the·pattern·become·bound.·If·the·matching128 succeeds,·any·unbound·variables·in·the·pattern·become·bound.·If·the·matching
129 fails,·an·exception·is·raised.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">X</span><span·class="p">.</span><span·class="w">129 fails,·an·exception·is·raised.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">X</span><span·class="p">.</span><span·class="w">
130 </span><span·class="gt">**·1:1:·variable·&#39;X&#39;·is·unbound·**</span><span·class="gp·unselectable">130 </span><span·class="gt">**·1:1:·variable·&#39;X&#39;·is·unbound·**</span><span·class="gp·unselectable">
131 2&gt;·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">.</span><span·class="w">131 2&gt;·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">.</span><span·class="w">
132 </span><span·class="mi">2</span><span·class="gp·unselectable">132 </span><span·class="mi">2</span><span·class="gp·unselectable">
133 3&gt;·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">133 3&gt;·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">
134 </span><span·class="mi">3</span><span·class="gp·unselectable">134 </span><span·class="mi">3</span><span·class="gp·unselectable">
135 4&gt;·</span><span·class="p"·data-group-id="8026111605-1">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8026111605-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·543a1f5738bb0dffd57303426ff2deb8f9016744d53a610a705a184f480362ea·...·]-2">}</span><span·class="p">.</span><span·class="w">135 4&gt;·</span><span·class="p"·data-group-id="0883281120-1">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="0883281120-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·b2c12cbd62db78bfb58581086cd08acdae3a9b4b68628fc89b0d5e46ba364bfd·...·]-2">}</span><span·class="p">.</span><span·class="w">
136 </span><span·class="gt">**·exception·error:·no·match·of·right·hand·side·value·{1,2}</span><span·class="gp·unselectable">136 </span><span·class="gt">**·exception·error:·no·match·of·right·hand·side·value·{1,2}</span><span·class="gp·unselectable">
137 5&gt;·</span><span·class="p"·data-group-id="8026111605-3">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="8026111605-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·bc4e1b54af5ba22ac31bcdfcc71b9176d570e31c3cec82f3f9bc481520d9ef67·...·]-4">}</span><span·class="p">.</span><span·class="w">137 5&gt;·</span><span·class="p"·data-group-id="0883281120-3">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="0883281120-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·608a83f40828f940f29f4db43e7d576a3c693bef65b78636ee117d087b4d2d5d·...·]-4">}</span><span·class="p">.</span><span·class="w">
138 </span><span·class="p"·data-group-id="8026111605-5">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8026111605-5">}</span><span·class="gp·unselectable">138 </span><span·class="p"·data-group-id="0883281120-5">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="0883281120-5">}</span><span·class="gp·unselectable">
139 6&gt;·</span><span·class="n">Y</span><span·class="p">.</span><span·class="w">139 6&gt;·</span><span·class="n">Y</span><span·class="p">.</span><span·class="w">
140 </span><span·class="mi">3</span></code></pre>140 </span><span·class="mi">3</span></code></pre>
141 </div>141 </div>
  
142 <div·class="bottom-actions"·id="bottom-actions">142 <div·class="bottom-actions"·id="bottom-actions">
143 ··<div·class="bottom-actions-item">143 ··<div·class="bottom-actions-item">
  
70.1 KB
./usr/share/doc/erlang-doc/html/doc/system/prog_ex_records.html
    
Offset 122, 105 lines modifiedOffset 122, 105 lines modified
122 ··<span·class="text">Records·and·Tuples</span>122 ··<span·class="text">Records·and·Tuples</span>
123 </h2>123 </h2>
124 <p>The·main·advantage·of·using·records·rather·than·tuples·is·that·fields·in·a124 <p>The·main·advantage·of·using·records·rather·than·tuples·is·that·fields·in·a
125 record·are·accessed·by·name,·whereas·fields·in·a·tuple·are·accessed·by·position.125 record·are·accessed·by·name,·whereas·fields·in·a·tuple·are·accessed·by·position.
126 To·illustrate·these·differences,·suppose·that·you·want·to·represent·a·person126 To·illustrate·these·differences,·suppose·that·you·want·to·represent·a·person
127 with·the·tuple·<code·class="inline">{Name,·Address,·Phone}</code>.</p><p>To·write·functions·that·manipulate·this·data,·remember·the·following:</p><ul><li>The·<code·class="inline">Name</code>·field·is·the·first·element·of·the·tuple.</li><li>The·<code·class="inline">Address</code>·field·is·the·second·element.</li><li>The·<code·class="inline">Phone</code>·field·is·the·third·element.</li></ul><p>For·example,·to·extract·data·from·a·variable·<code·class="inline">P</code>·that·contains·such·a·tuple,·you127 with·the·tuple·<code·class="inline">{Name,·Address,·Phone}</code>.</p><p>To·write·functions·that·manipulate·this·data,·remember·the·following:</p><ul><li>The·<code·class="inline">Name</code>·field·is·the·first·element·of·the·tuple.</li><li>The·<code·class="inline">Address</code>·field·is·the·second·element.</li><li>The·<code·class="inline">Phone</code>·field·is·the·third·element.</li></ul><p>For·example,·to·extract·data·from·a·variable·<code·class="inline">P</code>·that·contains·such·a·tuple,·you
128 can·write·the·following·code·and·then·use·pattern·matching·to·extract·the128 can·write·the·following·code·and·then·use·pattern·matching·to·extract·the
129 relevant·fields:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="8585766154-1">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><span·class="p"·data-group-id="8585766154-1">)</span><span·class="p">,</span><span·class="w">129 relevant·fields:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="4135070058-1">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><span·class="p"·data-group-id="4135070058-1">)</span><span·class="p">,</span><span·class="w">
130 </span><span·class="n">Address</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="8585766154-2">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><span·class="p"·data-group-id="8585766154-2">)</span><span·class="p">,</span><span·class="w">130 </span><span·class="n">Address</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="4135070058-2">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><span·class="p"·data-group-id="4135070058-2">)</span><span·class="p">,</span><span·class="w">
131 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Such·code·is·difficult·to·read·and·understand,·and·errors·occur·if·the·numbering131 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Such·code·is·difficult·to·read·and·understand,·and·errors·occur·if·the·numbering
132 of·the·elements·in·the·tuple·is·wrong.·If·the·data·representation·of·the·fields132 of·the·elements·in·the·tuple·is·wrong.·If·the·data·representation·of·the·fields
133 is·changed,·by·re-ordering,·adding,·or·removing·fields,·all·references·to·the133 is·changed,·by·re-ordering,·adding,·or·removing·fields,·all·references·to·the
134 person·tuple·must·be·checked·and·possibly·modified.</p><p>Records·allow·references·to·the·fields·by·name,·instead·of·by·position.·In·the134 person·tuple·must·be·checked·and·possibly·modified.</p><p>Records·allow·references·to·the·fields·by·name,·instead·of·by·position.·In·the
135 following·example,·a·record·instead·of·a·tuple·is·used·to·store·the·data:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="8145756125-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8145756125-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</spa[·...·truncated·by·diffoscope;·len:·174,·SHA:·366ea7555198ef6c4beb9ce8caf41fb39bb21e79613d24e086ae92ba8ec2aec4·...·]5-1">)</span><span·class="p">.</span></code></pre><p>This·enables·references·to·the·fields·of·the·record·by·name.·For·example,·if·<code·class="inline">P</code>135 following·example,·a·record·instead·of·a·tuple·is·used·to·store·the·data:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1533200785-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1533200785-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</spa[·...·truncated·by·diffoscope;·len:·174,·SHA:·9438bec827f97d695eb0343e2fe8a0b9aa66efbaf93aee0fc7dab94fbd0f2a5f·...·]5-1">)</span><span·class="p">.</span></code></pre><p>This·enables·references·to·the·fields·of·the·record·by·name.·For·example,·if·<code·class="inline">P</code>
136 is·a·variable·whose·value·is·a·<code·class="inline">person</code>·record,·the·following·code·access·the136 is·a·variable·whose·value·is·a·<code·class="inline">person</code>·record,·the·following·code·access·the
137 name·and·address·fields·of·the·records:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">137 name·and·address·fields·of·the·records:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">
138 </span><span·class="n">Address</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">address</span><span·class="p">,</span><span·class="w">138 </span><span·class="n">Address</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">address</span><span·class="p">,</span><span·class="w">
139 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Internally,·records·are·represented·using·tagged·tuples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3170705774-1">{</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Phone</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·66,·SHA:·12ca6174cdf0c5ca0225c4a21bb2bc67259ac036884155352189ddf406f1a6dc·...·]-1">}</span></code></pre><h2·id="defining-a-record"·class="section-heading">139 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Internally,·records·are·represented·using·tagged·tuples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4461919862-1">{</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Phone</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·66,·SHA:·b38bf3b48a533f7ea9c0e58ca2ad14747d1bd02efd236c6bce1ac85b8809da7f·...·]-1">}</span></code></pre><h2·id="defining-a-record"·class="section-heading">
140 ··<a·href="#defining-a-record"·class="hover-link">140 ··<a·href="#defining-a-record"·class="hover-link">
141 ····<i·class="ri-link-m"·aria-hidden="true"></i>141 ····<i·class="ri-link-m"·aria-hidden="true"></i>
142 ··</a>142 ··</a>
143 ··<span·class="text">Defining·a·Record</span>143 ··<span·class="text">Defining·a·Record</span>
144 </h2>144 </h2>
145 <p>This·following·definition·of·a·<code·class="inline">person</code>·is·used·in·several·examples·in·this145 <p>This·following·definition·of·a·<code·class="inline">person</code>·is·used·in·several·examples·in·this
146 section.·Three·fields·are·included,·<code·class="inline">name</code>,·<code·class="inline">phone</code>,·and·<code·class="inline">address</code>.·The·default146 section.·Three·fields·are·included,·<code·class="inline">name</code>,·<code·class="inline">phone</code>,·and·<code·class="inline">address</code>.·The·default
147 values·for·<code·class="inline">name</code>·and·<code·class="inline">phone</code>·is·&quot;&quot;·and·[],·respectively.·The·default·value·for147 values·for·<code·class="inline">name</code>·and·<code·class="inline">phone</code>·is·&quot;&quot;·and·[],·respectively.·The·default·value·for
148 <code·class="inline">address</code>·is·the·atom·<code·class="inline">undefined</code>,·since·no·default·value·is·supplied·for·this148 <code·class="inline">address</code>·is·the·atom·<code·class="inline">undefined</code>,·since·no·default·value·is·supplied·for·this
149 field:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="8964879147-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8964879147-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8964879147-3">[</span><span·class="p"·data-group-id="8964879147-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">address</span><span·class="p"·data-group-id="8964879147-2">}</span><span·class="p"·data-group-id="8964879147-1">)</span><span·class="p">.</span></code></pre><p>The·record·must·be·defined·in·the·shell·to·enable·use·of·the·record·syntax·in 
150 the·examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">rd</span><span·class="p"·data-group-id="5271756502-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·676,·SHA:·8768ec4cceb36842006d7d3cae5ceddc0f08a6770dcea863ac4a5b41cbd7f5bf·...·]149 field:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="8684009434-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·732,·SHA:·890c9a0eee17aeeaec2ef9d5c4bca330f61339c30f683bb8c32906b1c261b2d8·...·]
 150 the·examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">rd</span><span·class="p"·data-group-id="2020224951-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2020224951-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2020224951-3">[</span><span·class="p"·data-group-id="2020224951-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">address</span><span·class="p"·data-group-id="2020224951-2">}</span><span·class="p"·data-group-id="2020224951-1">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="ss">person</span></code></pre><p>This·is·because·record·definitions·are·only·available·at·compile·time,·not·at151 </span><span·class="ss">person</span></code></pre><p>This·is·because·record·definitions·are·only·available·at·compile·time,·not·at
152 runtime.·For·details·on·records·in·the·shell,·see·the·<a·href="../../lib/stdlib-6.0.1/doc/html/shell.html"><code·class="inline">shell</code></a>·manual·page·in152 runtime.·For·details·on·records·in·the·shell,·see·the·<a·href="../../lib/stdlib-6.0.1/doc/html/shell.html"><code·class="inline">shell</code></a>·manual·page·in
153 STDLIB.</p><h2·id="creating-a-record"·class="section-heading">153 STDLIB.</p><h2·id="creating-a-record"·class="section-heading">
154 ··<a·href="#creating-a-record"·class="hover-link">154 ··<a·href="#creating-a-record"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">Creating·a·Record</span>157 ··<span·class="text">Creating·a·Record</span>
158 </h2>158 </h2>
159 <p>A·new·<code·class="inline">person</code>·record·is·created·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="3928217944-1">{</span><span·class="ss">phone</span><span·class="o">=</span><span·class="p"·data-group-id="3928217944-2">[</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">2</span><span[·...·truncated·by·diffoscope;·len:·475,·SHA:·a27444c5e7a9934ec0b810172e751a5c844e411f55b4668d10ebd3e005ed1763·...·]-1">}</span><span·class="p">.</span><span·class="w">159 <p>A·new·<code·class="inline">person</code>·record·is·created·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4034427846-1">{</span><span·class="ss">phone</span><span·class="o">=</span><span·class="p"·data-group-id="4034427846-2">[</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">2</span><span[·...·truncated·by·diffoscope;·len:·475,·SHA:·99d0af8234722432703b6c7aea2d10ccc319428cbc4cc16f4559872253f51d6f·...·]-1">}</span><span·class="p">.</span><span·class="w">
160 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="3928217944-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Robert&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">[·...·truncated·by·diffoscope;·len:·707,·SHA:·4521934f6d00095e03bbea996a426c8aa9ad06f8a12ea477404b7ed631b6b81a·...·]-3">}</span></code></pre><p>As·the·<code·class="inline">address</code>·field·was·omitted,·its·default·value·is·used.</p><p>From·Erlang·5.1/OTP·R8B,·a·value·to·all·fields·in·a·record·can·be·set·with·the160 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4034427846-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Robert&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">[·...·truncated·by·diffoscope;·len:·707,·SHA:·d0c58bb447bdb62a0fa5887a82fe514c510d475727f012fb39bc0b817ad93f9f·...·]-3">}</span></code></pre><p>As·the·<code·class="inline">address</code>·field·was·omitted,·its·default·value·is·used.</p><p>From·Erlang·5.1/OTP·R8B,·a·value·to·all·fields·in·a·record·can·be·set·with·the
161 special·field·<code·class="inline">_</code>.·<code·class="inline">_</code>·means·&quot;all·fields·not·explicitly·specified&quot;.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="7046660219-1">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Jakob&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·124,·SHA:·19ceeeb6fe366ece7c3a9a49ce45f3d990084808dd10f5c1d9a9451148dca8ad·...·]19-1">}</span><span·class="p">.</span><span·class="w">161 special·field·<code·class="inline">_</code>.·<code·class="inline">_</code>·means·&quot;all·fields·not·explicitly·specified&quot;.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="1638144319-1">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Jakob&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·124,·SHA:·e65ea1f14fcd0802bde22e8cc1d4fcd0589f538b8037e58531d221ebd869b8e2·...·]19-1">}</span><span·class="p">.</span><span·class="w">
162 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="7046660219-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Jakob&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=[·...·truncated·by·diffoscope;·len:·267,·SHA:·8d4417baecf8af67e95f71597208a4ef5c9dd6952d6b193eec06dddc1412828f·...·]19-2">}</span></code></pre><p>It·is·primarily·intended·to·be·used·in·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#match/2"><code·class="inline">ets:match/2</code></a>·and162 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="1638144319-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Jakob&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=[·...·truncated·by·diffoscope;·len:·267,·SHA:·85ac1cf15ea44fc3d8c2d9ac829cb2166c982679402b615c254462d63f62645d·...·]19-2">}</span></code></pre><p>It·is·primarily·intended·to·be·used·in·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#match/2"><code·class="inline">ets:match/2</code></a>·and
163 <a·href="../../lib/mnesia-4.23.2/doc/html/mnesia.html#match_object/3"><code·class="inline">mnesia:match_object/3</code></a>,·to·set·record·fields·to·the·atom·<code·class="inline">'_'</code>.·(This·is·a163 <a·href="../../lib/mnesia-4.23.2/doc/html/mnesia.html#match_object/3"><code·class="inline">mnesia:match_object/3</code></a>,·to·set·record·fields·to·the·atom·<code·class="inline">'_'</code>.·(This·is·a
164 wildcard·in·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#match/2"><code·class="inline">ets:match/2</code></a>.)</p><h2·id="accessing-a-record-field"·class="section-heading">164 wildcard·in·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#match/2"><code·class="inline">ets:match/2</code></a>.)</p><h2·id="accessing-a-record-field"·class="section-heading">
165 ··<a·href="#accessing-a-record-field"·class="hover-link">165 ··<a·href="#accessing-a-record-field"·class="hover-link">
166 ····<i·class="ri-link-m"·aria-hidden="true"></i>166 ····<i·class="ri-link-m"·aria-hidden="true"></i>
167 ··</a>167 ··</a>
168 ··<span·class="text">Accessing·a·Record·Field</span>168 ··<span·class="text">Accessing·a·Record·Field</span>
169 </h2>169 </h2>
170 <p>The·following·example·shows·how·to·access·a·record·field:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2943591090-1">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·568,·SHA:·7ff8220833b954fa076b1b99734fd73f07d93ed3fda9682affb2d8145b847f5e·...·]-1">}</span><span·class="p">.</span><span·class="w">170 <p>The·following·example·shows·how·to·access·a·record·field:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="3539285375-1">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·568,·SHA:·ff496629210c91271594cdcd235ebc49a68ed9650f680856e468ddc679353998·...·]-1">}</span><span·class="p">.</span><span·class="w">
171 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2943591090-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</[·...·truncated·by·diffoscope;·len:·704,·SHA:·9ac8c427576ad72ffe9e4bd859cbbf04c22f417cb41095c9e9c11886aa1965a7·...·]-3">}</span><span·class="gp·unselectable">171 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="3539285375-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</[·...·truncated·by·diffoscope;·len:·704,·SHA:·15f19dd04d0e43bbcca87244cebad87a31d1b79fa3d72d6a0e1482a2488cc1de·...·]-3">}</span><span·class="gp·unselectable">
172 &gt;·</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">.</span><span·class="w">172 &gt;·</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">.</span><span·class="w">
173 </span><span·class="s">&quot;Joe&quot;</span></code></pre><h2·id="updating-a-record"·class="section-heading">173 </span><span·class="s">&quot;Joe&quot;</span></code></pre><h2·id="updating-a-record"·class="section-heading">
174 ··<a·href="#updating-a-record"·class="hover-link">174 ··<a·href="#updating-a-record"·class="hover-link">
175 ····<i·class="ri-link-m"·aria-hidden="true"></i>175 ····<i·class="ri-link-m"·aria-hidden="true"></i>
176 ··</a>176 ··</a>
177 ··<span·class="text">Updating·a·Record</span>177 ··<span·class="text">Updating·a·Record</span>
178 </h2>178 </h2>
179 <p>The·following·example·shows·how·to·update·a·record:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">P1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4373587272-1">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="o">=</span><span·class="p"·data-group-id="4373587272-2[·...·truncated·by·diffoscope;·len:·373,·SHA:·f22d93a58da96c471a926af70eb26fd25cf38c70a2ecbced2a33e48d6685afa1·...·]-1">}</span><span·class="p">.</span><span·class="w">179 <p>The·following·example·shows·how·to·update·a·record:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">P1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9628164778-1">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="o">=</span><span·class="p"·data-group-id="9628164778-2[·...·truncated·by·diffoscope;·len:·373,·SHA:·33d60cfaeb7a72a99e2b19b3b71d894be685c64d0e16d131c0dc62f043b9f84f·...·]-1">}</span><span·class="p">.</span><span·class="w">
180 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4373587272-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</[·...·truncated·by·diffoscope;·len:·469,·SHA:·5272284fc558f727a598a41268a98518998504a6ed8032f7aa77c3c5509230b4·...·]-3">}</span><span·class="gp·unselectable">180 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9628164778-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</[·...·truncated·by·diffoscope;·len:·469,·SHA:·be93c60fef0c4c6cacbf0a45dbd6180403a7b115fc70bb222940e827d18dd66a·...·]-3">}</span><span·class="gp·unselectable">
181 &gt;·</span><span·class="n">P2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P1</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4373587272-5">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Robert&quot;</span><span·class="p"·data-group-id="4373587272-5">}</span><span·class="p">.</span><span·class="w">181 &gt;·</span><span·class="n">P2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P1</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9628164778-5">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Robert&quot;</span><span·class="p"·data-group-id="9628164778-5">}</span><span·class="p">.</span><span·class="w">
182 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4373587272-6">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Robert&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">[·...·truncated·by·diffoscope;·len:·472,·SHA:·1867e92db116e0d6398112efc2d78258724e2c7c25980b97de3886fce725e052·...·]-6">}</span></code></pre><h2·id="type-testing"·class="section-heading">182 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9628164778-6">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Robert&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">[·...·truncated·by·diffoscope;·len:·472,·SHA:·4a90e84f270a4cb54680c63df9d87b026946407fe431c3068611644ce9d159e7·...·]-6">}</span></code></pre><h2·id="type-testing"·class="section-heading">
183 ··<a·href="#type-testing"·class="hover-link">183 ··<a·href="#type-testing"·class="hover-link">
184 ····<i·class="ri-link-m"·aria-hidden="true"></i>184 ····<i·class="ri-link-m"·aria-hidden="true"></i>
185 ··</a>185 ··</a>
186 ··<span·class="text">Type·Testing</span>186 ··<span·class="text">Type·Testing</span>
187 </h2>187 </h2>
188 <p>The·following·example·shows·that·the·guard·succeeds·if·<code·class="inline">P</code>·is·record·of·type188 <p>The·following·example·shows·that·the·guard·succeeds·if·<code·class="inline">P</code>·is·record·of·type
189 <code·class="inline">person</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="5004094487-1">(</span><span·class="n">P</span><span·class="p"·data-group-id="5004094487-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="5004094487-2">(</s[·...·truncated·by·diffoscope;·len:·147,·SHA:·03de9930cca46848c8f143fc486adc1e47b83f1b6622cbdc23d3ed717aeb3a2c·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">a_person</span><span·class="p">;</span><span·class="w">189 <code·class="inline">person</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="7208844101-1">(</span><span·class="n">P</span><span·class="p"·data-group-id="7208844101-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="7208844101-2">(</s[·...·truncated·by·diffoscope;·len:·147,·SHA:·997e1c5b0d94b6a5ae712e38ce22d3f1c93cd347553bad889624a6d0aa2e65f1·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">a_person</span><span·class="p">;</span><span·class="w">
190 </span><span·class="nf">foo</span><span·class="p"·data-group-id="5004094487-3">(</span><span·class="p">_</span><span·class="p"·data-group-id="5004094487-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">not_a_person</span><span·class="p">.</span></code></pre><h2·id="pattern-matching"·class="section-heading">190 </span><span·class="nf">foo</span><span·class="p"·data-group-id="7208844101-3">(</span><span·class="p">_</span><span·class="p"·data-group-id="7208844101-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">not_a_person</span><span·class="p">.</span></code></pre><h2·id="pattern-matching"·class="section-heading">
191 ··<a·href="#pattern-matching"·class="hover-link">191 ··<a·href="#pattern-matching"·class="hover-link">
192 ····<i·class="ri-link-m"·aria-hidden="true"></i>192 ····<i·class="ri-link-m"·aria-hidden="true"></i>
193 ··</a>193 ··</a>
194 ··<span·class="text">Pattern·Matching</span>194 ··<span·class="text">Pattern·Matching</span>
195 </h2>195 </h2>
196 <p>Matching·can·be·used·in·combination·with·records,·as·shown·in·the·following196 <p>Matching·can·be·used·in·combination·with·records,·as·shown·in·the·following
197 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">P3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9511305235-1">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="o">=</span><span·class="p"·data-group-id="9511305235-2[·...·truncated·by·diffoscope;·len:·373,·SHA:·c743e4e14354385ebf4916434be0b130d475bb816b8c014dbe8297e411f26643·...·]-1">}</span><span·class="p">.</span><span·class="w">197 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">P3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2223792183-1">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span><span·class="o">=</span><span·class="p"·data-group-id="2223792183-2[·...·truncated·by·diffoscope;·len:·373,·SHA:·fe822ec58ad773e957cc3351acbf3d39b8c1a338885218ee0deeaa1c8c8ec0d2·...·]-1">}</span><span·class="p">.</span><span·class="w">
198 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9511305235-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</[·...·truncated·by·diffoscope;·len:·469,·SHA:·97d1c2429f692eee212ff680626c5e226a12a3f794a98851c03f9b99c6226b7c·...·]-3">}</span><span·class="gp·unselectable">198 </span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2223792183-3">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Joe&quot;</span><span·class="p">,</span><span·class="ss">phone</span><span·class="w">·</span><span·class="o">=</[·...·truncated·by·diffoscope;·len:·469,·SHA:·f44c275a9a518286dab84102c4f9e82c60748192cb17a504152c2af11e050829·...·]-3">}</span><span·class="gp·unselectable">
199 &gt;·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="9511305235-5">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="9511305235-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">.</span><span·class="w">199 &gt;·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2223792183-5">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="2223792183-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">.</span><span·class="w">
200 </span><span·class="s">&quot;Joe&quot;</span></code></pre><p>The·following·function·takes·a·list·of·<code·class="inline">person</code>·records·and·searches·for·the200 </span><span·class="s">&quot;Joe&quot;</span></code></pre><p>The·following·function·takes·a·list·of·<code·class="inline">person</code>·records·and·searches·for·the
201 phone·number·of·a·person·with·a·particular·name:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">find_phone</span><span·class="p"·data-group-id="8959387924-1">(</span><span·class="p"·data-group-id="8959387924-2">[</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="8959387924-3">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="n">Name</[·...·truncated·by·diffoscope;·len:·452,·SHA:·55cc68d055ae5f6e03783b5a67f605c265a1e24065688eb1917e7090ff0f7cf6·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 phone·number·of·a·person·with·a·particular·name:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">find_phone</span><span·class="p"·data-group-id="6410900375-1">(</span><span·class="p"·data-group-id="6410900375-2">[</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="6410900375-3">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="n">Name</[·...·truncated·by·diffoscope;·len:·452,·SHA:·5e919f0ae93243661896a18cabf2a7cc42c2ac1400285ca3d5074fd9a67693e0·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ····</span><span·class="p"·data-group-id="8959387924-4">{</span><span·class="ss">found</span><span·class="p">,</span><span·class="w">··</span><span·class="n">Phone</span><span·class="p"·data-group-id="8959387924-4">}</span><span·class="p">;</span><span·class="w">202 ····</span><span·class="p"·data-group-id="6410900375-4">{</span><span·class="ss">found</span><span·class="p">,</span><span·class="w">··</span><span·class="n">Phone</span><span·class="p"·data-group-id="6410900375-4">}</span><span·class="p">;</span><span·class="w">
203 </span><span·class="nf">find_phone</span><span·class="p"·data-group-id="8959387924-5">(</span><span·class="p"·data-group-id="8959387924-6">[</span><span·class="p">_</span><span·class="p">|</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="8959387924-6">]</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·84,·SHA:·da2557a7a55c4a43139a8f98799124ee6a52d73f5e37d1635439258d184645bd·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 </span><span·class="nf">find_phone</span><span·class="p"·data-group-id="6410900375-5">(</span><span·class="p"·data-group-id="6410900375-6">[</span><span·class="p">_</span><span·class="p">|</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="6410900375-6">]</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·84,·SHA:·a3df7da07059bf23e8769e40a2b9e6ae062248718125b605aa9be42eda27090d·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ····</span><span·class="nf">find_phone</span><span·class="p"·data-group-id="8959387924-7">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="8959387924-7">)</span><span·class="p">;</span><span·class="w">204 ····</span><span·class="nf">find_phone</span><span·class="p"·data-group-id="6410900375-7">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="6410900375-7">)</span><span·class="p">;</span><span·class="w">
205 </span><span·class="nf">find_phone</span><span·class="p"·data-group-id="8959387924-8">(</span><span·class="p"·data-group-id="8959387924-9">[</span><span·class="p"·data-group-id="8959387924-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="8959387924-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 </span><span·class="nf">find_phone</span><span·class="p"·data-group-id="6410900375-8">(</span><span·class="p"·data-group-id="6410900375-9">[</span><span·class="p"·data-group-id="6410900375-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="6410900375-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 ····</span><span·class="ss">not_found</span><span·class="p">.</span></code></pre><p>The·fields·referred·to·in·the·pattern·can·be·given·in·any·order.</p><h2·id="nested-records"·class="section-heading">206 ····</span><span·class="ss">not_found</span><span·class="p">.</span></code></pre><p>The·fields·referred·to·in·the·pattern·can·be·given·in·any·order.</p><h2·id="nested-records"·class="section-heading">
207 ··<a·href="#nested-records"·class="hover-link">207 ··<a·href="#nested-records"·class="hover-link">
208 ····<i·class="ri-link-m"·aria-hidden="true"></i>208 ····<i·class="ri-link-m"·aria-hidden="true"></i>
209 ··</a>209 ··</a>
210 ··<span·class="text">Nested·Records</span>210 ··<span·class="text">Nested·Records</span>
211 </h2>211 </h2>
212 <p>The·value·of·a·field·in·a·record·can·be·an·instance·of·a·record.·Retrieval·of212 <p>The·value·of·a·field·in·a·record·can·be·an·instance·of·a·record.·Retrieval·of
213 nested·data·can·be·done·stepwise,·or·in·a·single·step,·as·shown·in·the·following213 nested·data·can·be·done·stepwise,·or·in·a·single·step,·as·shown·in·the·following
214 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4641238799-1">(</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4641238799-2">{</span><span·class="ss">first</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·321,·SHA:·80f1aa71b2a9e7f2154609b15408525de5528ef031e43456b70363c5e0e6cca4·...·]-1">)</span><span·class="p">.</span><span·class="w">214 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4451877048-1">(</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4451877048-2">{</span><span·class="ss">first</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·321,·SHA:·5242c59c3e2c69f5793db788a8b5d64622c6ecad29b61d76468cdcde06d2cac0·...·]-1">)</span><span·class="p">.</span><span·class="w">
215 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4641238799-3">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4641238799-4">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·325,·SHA:·2c48cb5a5a01facbee50ba7bd9ec7e1014a151978b5758331b32f92dbbebafe3·...·]-3">)</span><span·class="p">.</span><span·class="w">215 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4451877048-3">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4451877048-4">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·325,·SHA:·6cb79ea2a42d9af6b07e716210be5fa8b95ff3a160ff14f0abe1cec56953e875·...·]-3">)</span><span·class="p">.</span><span·class="w">
  
216 </span><span·class="nf">demo</span><span·class="p"·data-group-id="4641238799-6">(</span><span·class="p"·data-group-id="4641238799-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 </span><span·class="nf">demo</span><span·class="p"·data-group-id="4451877048-6">(</span><span·class="p"·data-group-id="4451877048-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ··</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4641238799-7">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">name</span><span·class="p"·data-group-id="4641238799-8">{</span><span·class="ss">first</span><span·class="o">=</span><[·...·truncated·by·diffoscope;·len:·380,·SHA:·ea1f4d1d624da1040a67261d9f65e9d55624d7ecdeac53e46d38e2bd638158e4·...·]-7">}</span><span·class="p">,</span><span·class="w">217 ··</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="4451877048-7">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">name</span><span·class="p"·data-group-id="4451877048-8">{</span><span·class="ss">first</span><span·class="o">=</span><[·...·truncated·by·diffoscope;·len:·380,·SHA:·0092e481739564364d112e70f6d48eef48af317527e1f7ba6e6d5c78e22e621a·...·]-7">}</span><span·class="p">,</span><span·class="w">
218 ··</span><span·class="n">First</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4641238799-9">(</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p"·data-group-id="4641238799-9">)</span><span·class="o">#</span><span·class="ss">name</span><span·class="p">.</span><span·class="ss">first</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">demo()</code>·evaluates·to·<code·class="inline">&quot;Robert&quot;</code>.</p><h2·id="a-longer-example"·class="section-heading">218 ··</span><span·class="n">First</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4451877048-9">(</span><span·class="n">P</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p"·data-group-id="4451877048-9">)</span><span·class="o">#</span><span·class="ss">name</span><span·class="p">.</span><span·class="ss">first</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">demo()</code>·evaluates·to·<code·class="inline">&quot;Robert&quot;</code>.</p><h2·id="a-longer-example"·class="section-heading">
219 ··<a·href="#a-longer-example"·class="hover-link">219 ··<a·href="#a-longer-example"·class="hover-link">
220 ····<i·class="ri-link-m"·aria-hidden="true"></i>220 ····<i·class="ri-link-m"·aria-hidden="true"></i>
221 ··</a>221 ··</a>
222 ··<span·class="text">A·Longer·Example</span>222 ··<span·class="text">A·Longer·Example</span>
223 </h2>223 </h2>
224 <p>Comments·are·embedded·in·the·following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·File:·person.hrl</span><span·class="w">224 <p>Comments·are·embedded·in·the·following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·File:·person.hrl</span><span·class="w">
  
Offset 230, 48 lines modifiedOffset 230, 48 lines modified
230 </span><span·class="c1">%%····name:··A·string·(default·is·undefined).</span><span·class="w">230 </span><span·class="c1">%%····name:··A·string·(default·is·undefined).</span><span·class="w">
231 </span><span·class="c1">%%····age:···An·integer·(default·is·undefined).</span><span·class="w">231 </span><span·class="c1">%%····age:···An·integer·(default·is·undefined).</span><span·class="w">
232 </span><span·class="c1">%%····phone:·A·list·of·integers·(default·is·[]).</span><span·class="w">232 </span><span·class="c1">%%····phone:·A·list·of·integers·(default·is·[]).</span><span·class="w">
233 </span><span·class="c1">%%····dict:··A·dictionary·containing·various·information</span><span·class="w">233 </span><span·class="c1">%%····dict:··A·dictionary·containing·various·information</span><span·class="w">
234 </span><span·class="c1">%%···········about·the·person.</span><span·class="w">234 </span><span·class="c1">%%···········about·the·person.</span><span·class="w">
235 </span><span·class="c1">%%···········A·{Key,·Value}·list·(default·is·the·empty·list).</span><span·class="w">235 </span><span·class="c1">%%···········A·{Key,·Value}·list·(default·is·the·empty·list).</span><span·class="w">
236 </span><span·class="c1">%%------------------------------------------------------------</span><span·class="w">236 </span><span·class="c1">%%------------------------------------------------------------</span><span·class="w">
237 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0587340577-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0587340577-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">age</span>[·...·truncated·by·diffoscope;·len:·878,·SHA:·9b9783d7f580ff73b1c14e908b3709c7cd74a1d13d28f37d7e4cc28e34fbe2c8·...·]-1">)</span><span·class="p">.</span><span·class="w">237 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7082077152-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7082077152-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">age</span>[·...·truncated·by·diffoscope;·len:·878,·SHA:·f52185197c011919f72bf08054ad3736bdc9fe89c04cd1be6f96279d3b1b58ba·...·]-1">)</span><span·class="p">.</span><span·class="w">
238 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="5221615980-2">(</span><span·class="s">&quot;person.hrl&quot;</span><span·class="p"·data-group-id="5221615980-2">)</span><span·class="p">.</span><span·class="w">238 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="5802789898-2">(</span><span·class="s">&quot;person.hrl&quot;</span><span·class="p"·data-group-id="5802789898-2">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="5221615980-3">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="5221615980-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·For·test·purposes·only.</span><span·class="w">239 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="5802789898-3">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="5802789898-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·For·test·purposes·only.</span><span·class="w">
  
240 </span><span·class="c1">%%·This·creates·an·instance·of·a·person.</span><span·class="w">240 </span><span·class="c1">%%·This·creates·an·instance·of·a·person.</span><span·class="w">
241 </span><span·class="c1">%%···Note:·The·phone·number·is·not·supplied·so·the</span><span·class="w">241 </span><span·class="c1">%%···Note:·The·phone·number·is·not·supplied·so·the</span><span·class="w">
242 </span><span·class="c1">%%·········default·value·[]·will·be·used.</span><span·class="w">242 </span><span·class="c1">%%·········default·value·[]·will·be·used.</span><span·class="w">
  
243 </span><span·class="nf">make_hacker_without_phone</span><span·class="p"·data-group-id="5221615980-4">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Age</span><span·class="p"·data-group-id="5221615980-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">243 </span><span·class="nf">make_hacker_without_phone</span><span·class="p"·data-group-id="5802789898-4">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Age</span><span·class="p"·data-group-id="5802789898-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
244 ···</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="5221615980-5">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">age</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Age</span><span·class="p">,</span><span·class="w">244 ···</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="5802789898-5">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">age</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Age</span><span·class="p">,</span><span·class="w">
245 ···········</span><span·class="ss">dict</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5221615980-6">[</span><span·class="p"·data-group-id="5221615980-7">{</span><span·class="ss">computer_knowledge</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">excellent</span><span·class="p"·data-group-id="5221615980-7">}</span><span·class="p">,</span><span·class="w">245 ···········</span><span·class="ss">dict</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5802789898-6">[</span><span·class="p"·data-group-id="5802789898-7">{</span><span·class="ss">computer_knowledge</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">excellent</span><span·class="p"·data-group-id="5802789898-7">}</span><span·class="p">,</span><span·class="w">
246 ···················</span><span·class="p"·data-group-id="5221615980-8">{</span><span·class="ss">drinks</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coke</span><span·class="p"·data-group-id="5221615980-8">}</span><span·class="p"·data-group-id="5221615980-6">]</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·f717c40a6b822c8b5dda112807216fde20e5656a62d607ecaeea5acb1f21f06d·...·]-5">}</span><span·class="p">.</span><span·class="w">246 ···················</span><span·class="p"·data-group-id="5802789898-8">{</span><span·class="ss">drinks</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coke</span><span·class="p"·data-group-id="5802789898-8">}</span><span·class="p"·data-group-id="5802789898-6">]</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·a1ddf7de296a97f8f2b788530d59f9cd24fd15f3aa659137f562d8a1376eabe3·...·]-5">}</span><span·class="p">.</span><span·class="w">
  
Max diff block lines reached; 12480/71623 bytes (17.42%) of diff not shown.
84.1 KB
./usr/share/doc/erlang-doc/html/doc/system/records_macros.html
    
Offset 124, 40 lines modifiedOffset 124, 40 lines modified
124 </h2>124 </h2>
125 <p>To·illustrate·this,·the·messenger·example·from·the·previous·section·is·divided125 <p>To·illustrate·this,·the·messenger·example·from·the·previous·section·is·divided
126 into·the·following·five·files:</p><ul><li><p><code·class="inline">mess_config.hrl</code></p><p>Header·file·for·configuration·data</p></li><li><p><code·class="inline">mess_interface.hrl</code></p><p>Interface·definitions·between·the·client·and·the·messenger</p></li><li><p><code·class="inline">user_interface.erl</code></p><p>Functions·for·the·user·interface</p></li><li><p><code·class="inline">mess_client.erl</code></p><p>Functions·for·the·client·side·of·the·messenger</p></li><li><p><code·class="inline">mess_server.erl</code></p><p>Functions·for·the·server·side·of·the·messenger</p></li></ul><p>While·doing·this,·the·message·passing·interface·between·the·shell,·the·client,126 into·the·following·five·files:</p><ul><li><p><code·class="inline">mess_config.hrl</code></p><p>Header·file·for·configuration·data</p></li><li><p><code·class="inline">mess_interface.hrl</code></p><p>Interface·definitions·between·the·client·and·the·messenger</p></li><li><p><code·class="inline">user_interface.erl</code></p><p>Functions·for·the·user·interface</p></li><li><p><code·class="inline">mess_client.erl</code></p><p>Functions·for·the·client·side·of·the·messenger</p></li><li><p><code·class="inline">mess_server.erl</code></p><p>Functions·for·the·server·side·of·the·messenger</p></li></ul><p>While·doing·this,·the·message·passing·interface·between·the·shell,·the·client,
127 and·the·server·is·cleaned·up·and·is·defined·using·<em>records</em>.·Also,·<em>macros</em>·are127 and·the·server·is·cleaned·up·and·is·defined·using·<em>records</em>.·Also,·<em>macros</em>·are
128 introduced:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_config.hrl----</span><span·class="w">128 introduced:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_config.hrl----</span><span·class="w">
  
129 </span><span·class="c1">%%%·Configure·the·location·of·the·server·node,</span><span·class="w">129 </span><span·class="c1">%%%·Configure·the·location·of·the·server·node,</span><span·class="w">
130 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="5021564523-1">(</span><span·class="ss">server_node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">messenger@super</span><span·class="p"·data-group-id="5021564523-1">)</span><span·class="p">.</span><span·class="w">130 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3452187001-1">(</span><span·class="ss">server_node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">messenger@super</span><span·class="p"·data-group-id="3452187001-1">)</span><span·class="p">.</span><span·class="w">
  
131 </span><span·class="c1">%%%----END·FILE----</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_interface.hrl----</span><span·class="w">131 </span><span·class="c1">%%%----END·FILE----</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_interface.hrl----</span><span·class="w">
  
132 </span><span·class="c1">%%%·Message·interface·between·client·and·server·and·client·shell·for</span><span·class="w">132 </span><span·class="c1">%%%·Message·interface·between·client·and·server·and·client·shell·for</span><span·class="w">
133 </span><span·class="c1">%%%·messenger·program</span><span·class="w">133 </span><span·class="c1">%%%·messenger·program</span><span·class="w">
  
134 </span><span·class="c1">%%%Messages·from·Client·to·server·received·in·server/1·function.</span><span·class="w">134 </span><span·class="c1">%%%Messages·from·Client·to·server·received·in·server/1·function.</span><span·class="w">
135 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3268509028-1">(</span><span·class="ss">logon</span><span·class="p">,</span><span·class="p"·data-group-id="3268509028-2">{</span><span·class="ss">client_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">username</span><span·class="p[·...·truncated·by·diffoscope;·len:·80,·SHA:·9ec430fa4c88b52c5b980a102371079b49461cf84712fb18d88f899248b3fe9c·...·]-1">)</span><span·class="p">.</span><span·class="w">135 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0771450705-1">(</span><span·class="ss">logon</span><span·class="p">,</span><span·class="p"·data-group-id="0771450705-2">{</span><span·class="ss">client_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">username</span><span·class="p[·...·truncated·by·diffoscope;·len:·80,·SHA:·4d6d26f9ebdbe0515d7ef74d9b0969d0db7d1ded65a29802e74390dd4db3d616·...·]-1">)</span><span·class="p">.</span><span·class="w">
136 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3268509028-3">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="3268509028-4">{</span><span·class="ss">client_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">to_name</span><span·class="[·...·truncated·by·diffoscope;·len:·160,·SHA:·c04102bbf62a59ade470c3fba3311d44532291b98628a090963e528e1743eadf·...·]-3">)</span><span·class="p">.</span><span·class="w">136 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0771450705-3">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="0771450705-4">{</span><span·class="ss">client_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">to_name</span><span·class="[·...·truncated·by·diffoscope;·len:·160,·SHA:·a6c631d310377f06bea62e13ec83e527adb68ec14f7610e3517bc8d049495d20·...·]-3">)</span><span·class="p">.</span><span·class="w">
137 </span><span·class="c1">%%%·{&#39;EXIT&#39;,·ClientPid,·Reason}··(client·terminated·or·unreachable.</span><span·class="w">137 </span><span·class="c1">%%%·{&#39;EXIT&#39;,·ClientPid,·Reason}··(client·terminated·or·unreachable.</span><span·class="w">
  
138 </span><span·class="c1">%%%·Messages·from·Server·to·Client,·received·in·await_result/0·function</span><span·class="w">138 </span><span·class="c1">%%%·Messages·from·Server·to·Client,·received·in·await_result/0·function</span><span·class="w">
139 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3268509028-5">(</span><span·class="ss">abort_client</span><span·class="p">,</span><span·class="p"·data-group-id="3268509028-6">{</span><span·class="ss">message</span><span·class="p"·data-group-id="3268509028-6">}</span><span·class="p"·data-group-id="326850[·...·truncated·by·diffoscope;·len:·4,·SHA:·e74d3069d3a02c342c1f98d5197ebc861d3ecdb9bd0be746e9547ef3ea0ba251·...·]-5">)</span><span·class="p">.</span><span·class="w">139 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0771450705-5">(</span><span·class="ss">abort_client</span><span·class="p">,</span><span·class="p"·data-group-id="0771450705-6">{</span><span·class="ss">message</span><span·class="p"·data-group-id="0771450705-6">}</span><span·class="p"·data-group-id="077145[·...·truncated·by·diffoscope;·len:·4,·SHA:·5e48fb6a15e3f7e7893a8b1c9f7d0b986226442fb93b76297024499f4aaa3fcd·...·]-5">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="c1">%%%·Messages·are:·user_exists_at_other_node,</span><span·class="w">140 </span><span·class="c1">%%%·Messages·are:·user_exists_at_other_node,</span><span·class="w">
141 </span><span·class="c1">%%%···············you_are_not_logged_on</span><span·class="w">141 </span><span·class="c1">%%%···············you_are_not_logged_on</span><span·class="w">
142 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3268509028-7">(</span><span·class="ss">server_reply</span><span·class="p">,</span><span·class="p"·data-group-id="3268509028-8">{</span><span·class="ss">message</span><span·class="p"·data-group-id="3268509028-8">}</span><span·class="p"·data-group-id="326850[·...·truncated·by·diffoscope;·len:·4,·SHA:·e74d3069d3a02c342c1f98d5197ebc861d3ecdb9bd0be746e9547ef3ea0ba251·...·]-7">)</span><span·class="p">.</span><span·class="w">142 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0771450705-7">(</span><span·class="ss">server_reply</span><span·class="p">,</span><span·class="p"·data-group-id="0771450705-8">{</span><span·class="ss">message</span><span·class="p"·data-group-id="0771450705-8">}</span><span·class="p"·data-group-id="077145[·...·truncated·by·diffoscope;·len:·4,·SHA:·5e48fb6a15e3f7e7893a8b1c9f7d0b986226442fb93b76297024499f4aaa3fcd·...·]-7">)</span><span·class="p">.</span><span·class="w">
143 </span><span·class="c1">%%%·Messages·are:·logged_on</span><span·class="w">143 </span><span·class="c1">%%%·Messages·are:·logged_on</span><span·class="w">
144 </span><span·class="c1">%%%···············receiver_not_found</span><span·class="w">144 </span><span·class="c1">%%%···············receiver_not_found</span><span·class="w">
145 </span><span·class="c1">%%%···············sent··(Message·has·been·sent·(no·guarantee)</span><span·class="w">145 </span><span·class="c1">%%%···············sent··(Message·has·been·sent·(no·guarantee)</span><span·class="w">
146 </span><span·class="c1">%%%·Messages·from·Server·to·Client·received·in·client/1·function</span><span·class="w">146 </span><span·class="c1">%%%·Messages·from·Server·to·Client·received·in·client/1·function</span><span·class="w">
147 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3268509028-9">(</span><span·class="ss">message_from</span><span·class="p">,</span><span·class="p"·data-group-id="3268509028-10">{</span><span·class="ss">from_name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·cl[·...·truncated·by·diffoscope;·len:·87,·SHA:·f29d7200d527cc0a363969c73efbf309961ad9a0e84cafe71b8e8dcf5e3692be·...·]-9">)</span><span·class="p">.</span><span·class="w">147 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0771450705-9">(</span><span·class="ss">message_from</span><span·class="p">,</span><span·class="p"·data-group-id="0771450705-10">{</span><span·class="ss">from_name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·cl[·...·truncated·by·diffoscope;·len:·87,·SHA:·dba8b13f815c2cfbe196e510c6ab65849d967bc4fb4a0c3d6db1429cbc7f64c8·...·]-9">)</span><span·class="p">.</span><span·class="w">
  
148 </span><span·class="c1">%%%·Messages·from·shell·to·Client·received·in·client/1·function</span><span·class="w">148 </span><span·class="c1">%%%·Messages·from·shell·to·Client·received·in·client/1·function</span><span·class="w">
149 </span><span·class="c1">%%%·spawn(mess_client,·client,·[server_node(),·Name])</span><span·class="w">149 </span><span·class="c1">%%%·spawn(mess_client,·client,·[server_node(),·Name])</span><span·class="w">
150 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3268509028-11">(</span><span·class="ss">message_to</span><span·class="p">,</span><span·class="p"·data-group-id="3268509028-12">{</span><span·class="ss">to_name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·class[·...·truncated·by·diffoscope;·len:·84,·SHA:·aac6b8dc0c4246cff4626572278b5de1931fa3bdb7cc11a3e77a080a1ed9a9fb·...·]-11">)</span><span·class="p">.</span><span·class="w">150 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0771450705-11">(</span><span·class="ss">message_to</span><span·class="p">,</span><span·class="p"·data-group-id="0771450705-12">{</span><span·class="ss">to_name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·class[·...·truncated·by·diffoscope;·len:·84,·SHA:·b040aeb68c013674150bb76d89d298c0e3bbe49485725aa1a6be61db318915d9·...·]-11">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="c1">%%%·logoff</span><span·class="w">151 </span><span·class="c1">%%%·logoff</span><span·class="w">
  
152 </span><span·class="c1">%%%----END·FILE----</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·user_interface.erl----</span><span·class="w">152 </span><span·class="c1">%%%----END·FILE----</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·user_interface.erl----</span><span·class="w">
  
153 </span><span·class="c1">%%%·User·interface·to·the·messenger·program</span><span·class="w">153 </span><span·class="c1">%%%·User·interface·to·the·messenger·program</span><span·class="w">
154 </span><span·class="c1">%%%·login(Name)</span><span·class="w">154 </span><span·class="c1">%%%·login(Name)</span><span·class="w">
155 </span><span·class="c1">%%%·····One·user·at·a·time·can·log·in·from·each·Erlang·node·in·the</span><span·class="w">155 </span><span·class="c1">%%%·····One·user·at·a·time·can·log·in·from·each·Erlang·node·in·the</span><span·class="w">
Offset 170, 177 lines modifiedOffset 170, 177 lines modified
170 </span><span·class="c1">%%%·····Logs·off·anybody·at·that·node</span><span·class="w">170 </span><span·class="c1">%%%·····Logs·off·anybody·at·that·node</span><span·class="w">
  
171 </span><span·class="c1">%%%·message(ToName,·Message)</span><span·class="w">171 </span><span·class="c1">%%%·message(ToName,·Message)</span><span·class="w">
172 </span><span·class="c1">%%%·····sends·Message·to·ToName.·Error·messages·if·the·user·of·this</span><span·class="w">172 </span><span·class="c1">%%%·····sends·Message·to·ToName.·Error·messages·if·the·user·of·this</span><span·class="w">
173 </span><span·class="c1">%%%·····function·is·not·logged·on·or·if·ToName·is·not·logged·on·at</span><span·class="w">173 </span><span·class="c1">%%%·····function·is·not·logged·on·or·if·ToName·is·not·logged·on·at</span><span·class="w">
174 </span><span·class="c1">%%%·····any·node.</span><span·class="w">174 </span><span·class="c1">%%%·····any·node.</span><span·class="w">
175 </span><span·class="w">175 </span><span·class="w">
176 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4565032787-1">(</span><span·class="ss">user_interface</span><span·class="p"·data-group-id="4565032787-1">)</span><span·class="p">.</span><span·class="w">176 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3286255856-1">(</span><span·class="ss">user_interface</span><span·class="p"·data-group-id="3286255856-1">)</span><span·class="p">.</span><span·class="w">
177 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4565032787-2">(</span><span·class="p"·data-group-id="4565032787-3">[</span><span·class="ss">logon</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logoff</span><span·class="p">/</span><[·...·truncated·by·diffoscope;·len:·246,·SHA:·93a23e616dacb5c8d6e08c78dc2f00221ab939fa41c420d7fd54f1fd967c413e·...·]-2">)</span><span·class="p">.</span><span·class="w">177 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3286255856-2">(</span><span·class="p"·data-group-id="3286255856-3">[</span><span·class="ss">logon</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logoff</span><span·class="p">/</span><[·...·truncated·by·diffoscope;·len:·246,·SHA:·eaf2ecc68296b0c857be2999e5ab2af6b765f533eb8260a688a7f8b228fb1f62·...·]-2">)</span><span·class="p">.</span><span·class="w">
178 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="4565032787-4">(</span><span·class="s">&quot;mess_interface.hrl&quot;</span><span·class="p"·data-group-id="4565032787-4">)</span><span·class="p">.</span><span·class="w">178 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="3286255856-4">(</span><span·class="s">&quot;mess_interface.hrl&quot;</span><span·class="p"·data-group-id="3286255856-4">)</span><span·class="p">.</span><span·class="w">
179 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="4565032787-5">(</span><span·class="s">&quot;mess_config.hrl&quot;</span><span·class="p"·data-group-id="4565032787-5">)</span><span·class="p">.</span><span·class="w">179 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="3286255856-5">(</span><span·class="s">&quot;mess_config.hrl&quot;</span><span·class="p"·data-group-id="3286255856-5">)</span><span·class="p">.</span><span·class="w">
  
180 </span><span·class="nf">logon</span><span·class="p"·data-group-id="4565032787-6">(</span><span·class="n">Name</span><span·class="p"·data-group-id="4565032787-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 </span><span·class="nf">logon</span><span·class="p"·data-group-id="3286255856-6">(</span><span·class="n">Name</span><span·class="p"·data-group-id="3286255856-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">whereis</span><span·class="p"·data-group-id="4565032787-7">(</span><span·class="ss">mess_client</span><span·class="p"·data-group-id="4565032787-7">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">181 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">whereis</span><span·class="p"·data-group-id="3286255856-7">(</span><span·class="ss">mess_client</span><span·class="p"·data-group-id="3286255856-7">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
182 ········</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 ········</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ············</span><span·class="nf">register</span><span·class="p"·data-group-id="4565032787-8">(</span><span·class="ss">mess_client</span><span·class="p">,</span><span·class="w">183 ············</span><span·class="nf">register</span><span·class="p"·data-group-id="3286255856-8">(</span><span·class="ss">mess_client</span><span·class="p">,</span><span·class="w">
184 ·····················</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4565032787-9">(</span><span·class="ss">mess_client</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">client</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4565032787-10">[</span><span·class="o">?</[·...·truncated·by·diffoscope;·len:·263,·SHA:·15a25acc7cfe566ba4e129c0413bea71e5d3210c5d0e8eb2a68e09aed2ba8c10·...·]-8">)</span><span·class="p">;</span><span·class="w">184 ·····················</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3286255856-9">(</span><span·class="ss">mess_client</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">client</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3286255856-10">[</span><span·class="o">?</[·...·truncated·by·diffoscope;·len:·263,·SHA:·32859830c2fdc6021472c2d921fd2bd466253db2e1bef64a63405a21e020bb81·...·]-8">)</span><span·class="p">;</span><span·class="w">
185 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">already_logged_on</span><span·class="w">185 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">already_logged_on</span><span·class="w">
186 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">186 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
187 </span><span·class="nf">logoff</span><span·class="p"·data-group-id="4565032787-11">(</span><span·class="p"·data-group-id="4565032787-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">187 </span><span·class="nf">logoff</span><span·class="p"·data-group-id="3286255856-11">(</span><span·class="p"·data-group-id="3286255856-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
188 ····</span><span·class="ss">mess_client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">logoff</span><span·class="p">.</span><span·class="w">188 ····</span><span·class="ss">mess_client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">logoff</span><span·class="p">.</span><span·class="w">
  
189 </span><span·class="nf">message</span><span·class="p"·data-group-id="4565032787-12">(</span><span·class="n">ToName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="4565032787-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 </span><span·class="nf">message</span><span·class="p"·data-group-id="3286255856-12">(</span><span·class="n">ToName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="3286255856-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">whereis</span><span·class="p"·data-group-id="4565032787-13">(</span><span·class="ss">mess_client</span><span·class="p"·data-group-id="4565032787-13">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="c1">%·Test·if·the·client·is·running</span><span·class="w">190 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">whereis</span><span·class="p"·data-group-id="3286255856-13">(</span><span·class="ss">mess_client</span><span·class="p"·data-group-id="3286255856-13">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="c1">%·Test·if·the·client·is·running</span><span·class="w">
191 ········</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 ········</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ············</span><span·class="ss">not_logged_on</span><span·class="p">;</span><span·class="w">192 ············</span><span·class="ss">not_logged_on</span><span·class="p">;</span><span·class="w">
193 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">mess_client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">message_to</span><span·class="p"·data-group-id="4565032787-14">{</span><span·class="ss">to_name</span><span·class="o">=</span><span·class="n">ToName</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">Message</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·413d4a03d2ff6a2448d965eac210dd8f69f3ab7a8e37c1f78ebbb3061a7f6659·...·]-14">}</span><span·class="p">,</span><span·class="w">193 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">mess_client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">message_to</span><span·class="p"·data-group-id="3286255856-14">{</span><span·class="ss">to_name</span><span·class="o">=</span><span·class="n">ToName</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">Message</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·b27fe937b9c70b51574b06308ac44bdc51229fb19eaa949a9aa118f657dd5156·...·]-14">}</span><span·class="p">,</span><span·class="w">
194 ·············</span><span·class="ss">ok</span><span·class="w">194 ·············</span><span·class="ss">ok</span><span·class="w">
195 </span><span·class="k">end</span><span·class="p">.</span><span·class="w">195 </span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="c1">%%%----END·FILE----</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_client.erl----</span><span·class="w">196 </span><span·class="c1">%%%----END·FILE----</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_client.erl----</span><span·class="w">
  
197 </span><span·class="c1">%%%·The·client·process·which·runs·on·each·user·node</span><span·class="w">197 </span><span·class="c1">%%%·The·client·process·which·runs·on·each·user·node</span><span·class="w">
198 </span><span·class="w">198 </span><span·class="w">
199 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9943518635-1">(</span><span·class="ss">mess_client</span><span·class="p"·data-group-id="9943518635-1">)</span><span·class="p">.</span><span·class="w">199 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4157352692-1">(</span><span·class="ss">mess_client</span><span·class="p"·data-group-id="4157352692-1">)</span><span·class="p">.</span><span·class="w">
200 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9943518635-2">(</span><span·class="p"·data-group-id="9943518635-3">[</span><span·class="ss">client</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="9943518635-3">]</span><span·class="p"·data-group-id="9943518635-2">)</span><span·class="p">.</span><span·class="w">200 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4157352692-2">(</span><span·class="p"·data-group-id="4157352692-3">[</span><span·class="ss">client</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="4157352692-3">]</span><span·class="p"·data-group-id="4157352692-2">)</span><span·class="p">.</span><span·class="w">
201 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="9943518635-4">(</span><span·class="s">&quot;mess_interface.hrl&quot;</span><span·class="p"·data-group-id="9943518635-4">)</span><span·class="p">.</span><span·class="w">201 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="4157352692-4">(</span><span·class="s">&quot;mess_interface.hrl&quot;</span><span·class="p"·data-group-id="4157352692-4">)</span><span·class="p">.</span><span·class="w">
  
202 </span><span·class="nf">client</span><span·class="p"·data-group-id="9943518635-5">(</span><span·class="n">Server_Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="9943518635-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">202 </span><span·class="nf">client</span><span·class="p"·data-group-id="4157352692-5">(</span><span·class="n">Server_Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="4157352692-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
203 ····</span><span·class="p"·data-group-id="9943518635-6">{</span><span·class="ss">messenger</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="9943518635-6">}</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·476,·SHA:·3be3adba6b56d290fb14372db0bea1766cc25385cefb3b5870567d3ec358482c·...·]-7">}</span><span·class="p">,</span><span·class="w">203 ····</span><span·class="p"·data-group-id="4157352692-6">{</span><span·class="ss">messenger</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="4157352692-6">}</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·476,·SHA:·0f74e56c27cace954faae0f93ed50a916141b4db51e15246002061109c6b1df4·...·]-7">}</span><span·class="p">,</span><span·class="w">
204 ····</span><span·class="nf">await_result</span><span·class="p"·data-group-id="9943518635-9">(</span><span·class="p"·data-group-id="9943518635-9">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="nf">await_result</span><span·class="p"·data-group-id="4157352692-9">(</span><span·class="p"·data-group-id="4157352692-9">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="9943518635-10">(</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="9943518635-10">)</span><span·class="p">.</span><span·class="w">205 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="4157352692-10">(</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="4157352692-10">)</span><span·class="p">.</span><span·class="w">
  
206 </span><span·class="nf">client</span><span·class="p"·data-group-id="9943518635-11">(</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="9943518635-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">206 </span><span·class="nf">client</span><span·class="p"·data-group-id="4157352692-11">(</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="4157352692-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
207 ····</span><span·class="k">receive</span><span·class="w">207 ····</span><span·class="k">receive</span><span·class="w">
208 ········</span><span·class="ss">logoff</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 ········</span><span·class="ss">logoff</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="9943518635-12">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="9943518635-12">)</span><span·class="p">;</span><span·class="w">209 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="4157352692-12">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="4157352692-12">)</span><span·class="p">;</span><span·class="w">
210 ········</span><span·class="o">#</span><span·class="ss">message_to</span><span·class="p"·data-group-id="9943518635-13">{</span><span·class="ss">to_name</span><span·class="o">=</span><span·class="n">ToName</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">Message</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·3dc394fceeb84c1f2e69a50c2f2c9c0eadc023aee2a04d13954b41f6b3fee5f4·...·]-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">210 ········</span><span·class="o">#</span><span·class="ss">message_to</span><span·class="p"·data-group-id="4157352692-13">{</span><span·class="ss">to_name</span><span·class="o">=</span><span·class="n">ToName</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">Message</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·b2e571d3ea8a7612240cd4695e04219b0a17dbf6413aec3109bb6b808193abee·...·]-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
211 ············</span><span·class="p"·data-group-id="9943518635-14">{</span><span·class="ss">messenger</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="9943518635-14">}</span><span·class="w">·</span><span·class="o">!</span><span·class="w">211 ············</span><span·class="p"·data-group-id="4157352692-14">{</span><span·class="ss">messenger</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="4157352692-14">}</span><span·class="w">·</span><span·class="o">!</span><span·class="w">
212 ················</span><span·class="o">#</span><span·class="ss">message</span><span·class="p"·data-group-id="9943518635-15">{</span><span·class="ss">client_pid</span><span·class="o">=</span><span·class="nf">self</span><span·class="p"·data-group-id="9943518635-16">(</span><span·class="p"·data-group-id="9943518635-16">)</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·267,·SHA:·5bef0eabcaf6d26b2d1a96a14ff7404eafb3310c2629e2f338ae14920fa3ea6f·...·]-15">}</span><span·class="p">,</span><span·class="w">212 ················</span><span·class="o">#</span><span·class="ss">message</span><span·class="p"·data-group-id="4157352692-15">{</span><span·class="ss">client_pid</span><span·class="o">=</span><span·class="nf">self</span><span·class="p"·data-group-id="4157352692-16">(</span><span·class="p"·data-group-id="4157352692-16">)</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·267,·SHA:·09fda9149d228a6baf33b08a0300bd6c15ffb1d3437ce97df5d5513e293db743·...·]-15">}</span><span·class="p">,</span><span·class="w">
213 ············</span><span·class="nf">await_result</span><span·class="p"·data-group-id="9943518635-17">(</span><span·class="p"·data-group-id="9943518635-17">)</span><span·class="p">;</span><span·class="w">213 ············</span><span·class="nf">await_result</span><span·class="p"·data-group-id="4157352692-17">(</span><span·class="p"·data-group-id="4157352692-17">)</span><span·class="p">;</span><span·class="w">
214 ········</span><span·class="p"·data-group-id="9943518635-18">{</span><span·class="ss">message_from</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FromName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="994351863[·...·truncated·by·diffoscope;·len:·1,·SHA:·ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d·...·]-18">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 ········</span><span·class="p"·data-group-id="4157352692-18">{</span><span·class="ss">message_from</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FromName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="415735269[·...·truncated·by·diffoscope;·len:·1,·SHA:·d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35·...·]-18">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9943518635-19">(</span><span·class="s">&quot;Message·from·</span><span·class="si">~p</span><span·class="s">:·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·247,·SHA:·f5ec51dcd74f163e435acfae7485026345e620065cf22b108b41700962f1b013·...·]-19">)</span><span·class="w">215 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4157352692-19">(</span><span·class="s">&quot;Message·from·</span><span·class="si">~p</span><span·class="s">:·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·247,·SHA:·38a64131fa65e6057ce7b4f58115d24250e6f902ee7dcb6dd69356bbe55bb59b·...·]-19">)</span><span·class="w">
216 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">216 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
217 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="9943518635-21">(</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="9943518635-21">)</span><span·class="p">.</span><span·class="w">217 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="4157352692-21">(</span><span·class="n">Server_Node</span><span·class="p"·data-group-id="4157352692-21">)</span><span·class="p">.</span><span·class="w">
  
218 </span><span·class="c1">%%%·wait·for·a·response·from·the·server</span><span·class="w">218 </span><span·class="c1">%%%·wait·for·a·response·from·the·server</span><span·class="w">
219 </span><span·class="nf">await_result</span><span·class="p"·data-group-id="9943518635-22">(</span><span·class="p"·data-group-id="9943518635-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 </span><span·class="nf">await_result</span><span·class="p"·data-group-id="4157352692-22">(</span><span·class="p"·data-group-id="4157352692-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 ····</span><span·class="k">receive</span><span·class="w">220 ····</span><span·class="k">receive</span><span·class="w">
221 ········</span><span·class="o">#</span><span·class="ss">abort_client</span><span·class="p"·data-group-id="9943518635-23">{</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">Why</span><span·class="p"·data-group-id="9943518635-23">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 ········</span><span·class="o">#</span><span·class="ss">abort_client</span><span·class="p"·data-group-id="4157352692-23">{</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">Why</span><span·class="p"·data-group-id="4157352692-23">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9943518635-24">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9943518635-25">[</span><span·class="n">Why</[·...·truncated·by·diffoscope;·len:·100,·SHA:·53cf7530700d273d6003208aaf9cf0af113408373804ea82f562763c44f2eae7·...·]-24">)</span><span·class="p">,</span><span·class="w">222 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4157352692-24">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4157352692-25">[</span><span·class="n">Why</[·...·truncated·by·diffoscope;·len:·100,·SHA:·968c178477b9e82851178ba61cadfbdab552a51e2a98ad473e3f23a7328c4457·...·]-24">)</span><span·class="p">,</span><span·class="w">
223 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="9943518635-26">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="9943518635-26">)</span><span·class="p">;</span><span·class="w">223 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="4157352692-26">(</span><span·class="ss">normal</span><span·class="p"·data-group-id="4157352692-26">)</span><span·class="p">;</span><span·class="w">
224 ········</span><span·class="o">#</span><span·class="ss">server_reply</span><span·class="p"·data-group-id="9943518635-27">{</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">What</span><span·class="p"·data-group-id="9943518635-27">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 ········</span><span·class="o">#</span><span·class="ss">server_reply</span><span·class="p"·data-group-id="4157352692-27">{</span><span·class="ss">message</span><span·class="o">=</span><span·class="n">What</span><span·class="p"·data-group-id="4157352692-27">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9943518635-28">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9943518635-29">[</span><span·class="n">What<[·...·truncated·by·diffoscope;·len:·101,·SHA:·d1c0722672935441afc5e86f41ff6b50789da385a714e15d1216225fbece833c·...·]-28">)</span><span·class="w">225 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4157352692-28">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4157352692-29">[</span><span·class="n">What<[·...·truncated·by·diffoscope;·len:·101,·SHA:·5ec7c813a2f29fb8d2506fd370c5cd0a7dbe0bb37a880fe12fb5999ac818fca0·...·]-28">)</span><span·class="w">
226 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">226 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
227 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9943518635-30">(</span><span·class="s">&quot;No·response·from·server</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9943518635-31">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·71,·SHA:·852227ae02420f7faa300243a865ba19aa864b287a206d58330e71b978ba83d9·...·]-30">)</span><span·class="p">,</span><span·class="w">227 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4157352692-30">(</span><span·class="s">&quot;No·response·from·server</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4157352692-31">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·71,·SHA:·d78dfba2a5888de9f6ca5ee8f5981f6a77a14a867fc1b02d3f435756d43545a2·...·]-30">)</span><span·class="p">,</span><span·class="w">
228 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="9943518635-32">(</span><span·class="ss">timeout</span><span·class="p"·data-group-id="9943518635-32">)</span><span·class="w">228 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="4157352692-32">(</span><span·class="ss">timeout</span><span·class="p"·data-group-id="4157352692-32">)</span><span·class="w">
229 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">229 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
230 </span><span·class="c1">%%%----END·FILE---</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_server.erl----</span><span·class="w">230 </span><span·class="c1">%%%----END·FILE---</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%----FILE·mess_server.erl----</span><span·class="w">
  
231 </span><span·class="c1">%%%·This·is·the·server·process·of·the·messenger·service</span><span·class="w">231 </span><span·class="c1">%%%·This·is·the·server·process·of·the·messenger·service</span><span·class="w">
232 </span><span·class="w">232 </span><span·class="w">
233 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8018544910-1">(</span><span·class="ss">mess_server</span><span·class="p"·data-group-id="8018544910-1">)</span><span·class="p">.</span><span·class="w">233 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3009829341-1">(</span><span·class="ss">mess_server</span><span·class="p"·data-group-id="3009829341-1">)</span><span·class="p">.</span><span·class="w">
234 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8018544910-2">(</span><span·class="p"·data-group-id="8018544910-3">[</span><span·class="ss">start_server</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">server</span><span·class="p">/<[·...·truncated·by·diffoscope;·len:·125,·SHA:·e6e99fe9fd3c6ae534916d3910611cbf5a95c925b39afeb743108d6d31058624·...·]-2">)</span><span·class="p">.</span><span·class="w">234 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3009829341-2">(</span><span·class="p"·data-group-id="3009829341-3">[</span><span·class="ss">start_server</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">server</span><span·class="p">/<[·...·truncated·by·diffoscope;·len:·125,·SHA:·30c95eb38331c65949f3e30a3fee4b8468d9c29c6e037f6f7f02a2ce6d0d4f7f·...·]-2">)</span><span·class="p">.</span><span·class="w">
235 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="8018544910-4">(</span><span·class="s">&quot;mess_interface.hrl&quot;</span><span·class="p"·data-group-id="8018544910-4">)</span><span·class="p">.</span><span·class="w">235 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="3009829341-4">(</span><span·class="s">&quot;mess_interface.hrl&quot;</span><span·class="p"·data-group-id="3009829341-4">)</span><span·class="p">.</span><span·class="w">
  
236 </span><span·class="nf">server</span><span·class="p"·data-group-id="8018544910-5">(</span><span·class="p"·data-group-id="8018544910-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">236 </span><span·class="nf">server</span><span·class="p"·data-group-id="3009829341-5">(</span><span·class="p"·data-group-id="3009829341-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
237 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="8018544910-6">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8018544910-6">)</span><span·class="p">,</span><span·class="w">237 ····</span><span·class="nf">process_flag</span><span·class="p"·data-group-id="3009829341-6">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="3009829341-6">)</span><span·class="p">,</span><span·class="w">
238 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="8018544910-7">(</span><span·class="p"·data-group-id="8018544910-8">[</span><span·class="p"·data-group-id="8018544910-8">]</span><span·class="p"·data-group-id="8018544910-7">)</span><span·class="p">.</span><span·class="w">238 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="3009829341-7">(</span><span·class="p"·data-group-id="3009829341-8">[</span><span·class="p"·data-group-id="3009829341-8">]</span><span·class="p"·data-group-id="3009829341-7">)</span><span·class="p">.</span><span·class="w">
  
239 </span><span·class="c1">%%%·the·user·list·has·the·format·[{ClientPid1,·Name1},{ClientPid22,·Name2},...]</span><span·class="w">239 </span><span·class="c1">%%%·the·user·list·has·the·format·[{ClientPid1,·Name1},{ClientPid22,·Name2},...]</span><span·class="w">
240 </span><span·class="nf">server</span><span·class="p"·data-group-id="8018544910-9">(</span><span·class="n">User_List</span><span·class="p"·data-group-id="8018544910-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">240 </span><span·class="nf">server</span><span·class="p"·data-group-id="3009829341-9">(</span><span·class="n">User_List</span><span·class="p"·data-group-id="3009829341-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
241 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8018544910-10">(</span><span·class="s">&quot;User·list·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8018544910-11">[</span><span·cla[·...·truncated·by·diffoscope;·len:·118,·SHA:·9cdf9f5e1511241b8b2c824c58584d2bb24286183b3a41e239cc05b483803c8e·...·]-10">)</span><span·class="p">,</span><span·class="w">241 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3009829341-10">(</span><span·class="s">&quot;User·list·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3009829341-11">[</span><span·cla[·...·truncated·by·diffoscope;·len:·118,·SHA:·b7f52289d03db1c38342493d6930650ef9db2d4c9defd1d47e6151047bdf40bf·...·]-10">)</span><span·class="p">,</span><span·class="w">
242 ····</span><span·class="k">receive</span><span·class="w">242 ····</span><span·class="k">receive</span><span·class="w">
Max diff block lines reached; 34967/86002 bytes (40.66%) of diff not shown.
21.2 KB
./usr/share/doc/erlang-doc/html/doc/system/ref_man_functions.html
    
Offset 120, 51 lines modifiedOffset 120, 51 lines modified
120 ····<i·class="ri-link-m"·aria-hidden="true"></i>120 ····<i·class="ri-link-m"·aria-hidden="true"></i>
121 ··</a>121 ··</a>
122 ··<span·class="text">Function·Declaration·Syntax</span>122 ··<span·class="text">Function·Declaration·Syntax</span>
123 </h2>123 </h2>
124 <p>A·<em>function·declaration</em>·is·a·sequence·of·function·clauses·separated·by124 <p>A·<em>function·declaration</em>·is·a·sequence·of·function·clauses·separated·by
125 semicolons,·and·terminated·by·a·period·(<code·class="inline">.</code>).</p><p>A·<em>function·clause</em>·consists·of·a·<em>clause·head</em>·and·a·<em>clause·body</em>,·separated·by125 semicolons,·and·terminated·by·a·period·(<code·class="inline">.</code>).</p><p>A·<em>function·clause</em>·consists·of·a·<em>clause·head</em>·and·a·<em>clause·body</em>,·separated·by
126 <code·class="inline">-&gt;</code>.</p><p>A·clause·<em>head</em>·consists·of·the·function·name,·an·argument·list,·and·an·optional126 <code·class="inline">-&gt;</code>.</p><p>A·clause·<em>head</em>·consists·of·the·function·name,·an·argument·list,·and·an·optional
127 guard·sequence·beginning·with·the·keyword·<code·class="inline">when</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name</span><span·class="p"·data-group-id="0677306865-1">(</span><span·class="n">Pattern11</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">Pattern1N</span><span·class="p"·data-group-id="0677306865-1">)</sp[·...·truncated·by·diffoscope;·len:·204,·SHA:·9f201e221049ef07b45709cb8922f386c042ed1d9fce391365fd834de2331b42·...·]-2">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">127 guard·sequence·beginning·with·the·keyword·<code·class="inline">when</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Name</span><span·class="p"·data-group-id="1189793194-1">(</span><span·class="n">Pattern11</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">Pattern1N</span><span·class="p"·data-group-id="1189793194-1">)</sp[·...·truncated·by·diffoscope;·len:·204,·SHA:·57bf45935bd4f45ef37ce95586cf44eb249f273b3e8ee17b3cf45ddca28ba368·...·]-2">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
128 ····</span><span·class="n">Body1</span><span·class="p">;</span><span·class="w">128 ····</span><span·class="n">Body1</span><span·class="p">;</span><span·class="w">
129 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">;</span><span·class="w">129 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">;</span><span·class="w">
130 </span><span·class="n">Name</span><span·class="p"·data-group-id="0677306865-3">(</span><span·class="n">PatternK1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">PatternKN</span><span·class="p"·data-group-id="0677306865-3">)</sp[·...·truncated·by·diffoscope;·len:·204,·SHA:·a4248d05a1c06cda64632cd0a015daf8679b36f10fad3226880fb2d030715dd8·...·]-4">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">130 </span><span·class="n">Name</span><span·class="p"·data-group-id="1189793194-3">(</span><span·class="n">PatternK1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">PatternKN</span><span·class="p"·data-group-id="1189793194-3">)</sp[·...·truncated·by·diffoscope;·len:·204,·SHA:·ebdc4bf4643e7732582275204b84a211eb62674ad446b6abc33409efcad7c619·...·]-4">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
131 ····</span><span·class="n">BodyK</span><span·class="p">.</span></code></pre><p>The·function·name·is·an·atom.·Each·argument·is·a·pattern.</p><p>The·number·of·arguments·<code·class="inline">N</code>·is·the·<em>arity</em>·of·the·function.·A·function·is131 ····</span><span·class="n">BodyK</span><span·class="p">.</span></code></pre><p>The·function·name·is·an·atom.·Each·argument·is·a·pattern.</p><p>The·number·of·arguments·<code·class="inline">N</code>·is·the·<em>arity</em>·of·the·function.·A·function·is
132 uniquely·defined·by·the·module·name,·function·name,·and·arity.·That·is,·two132 uniquely·defined·by·the·module·name,·function·name,·and·arity.·That·is,·two
133 functions·with·the·same·name·and·in·the·same·module,·but·with·different·arities133 functions·with·the·same·name·and·in·the·same·module,·but·with·different·arities
134 are·two·different·functions.</p><p>A·function·named·<code·class="inline">f</code>·in·module·<code·class="inline">mod</code>·and·with·arity·<code·class="inline">N</code>·is·often·denoted·as134 are·two·different·functions.</p><p>A·function·named·<code·class="inline">f</code>·in·module·<code·class="inline">mod</code>·and·with·arity·<code·class="inline">N</code>·is·often·denoted·as
135 <code·class="inline">mod:f/N</code>.</p><p>A·clause·<em>body</em>·consists·of·a·sequence·of·expressions·separated·by·comma·(<code·class="inline">,</code>):</p><pre><code·class="text">Expr1,135 <code·class="inline">mod:f/N</code>.</p><p>A·clause·<em>body</em>·consists·of·a·sequence·of·expressions·separated·by·comma·(<code·class="inline">,</code>):</p><pre><code·class="text">Expr1,
136 ...,136 ...,
137 ExprN</code></pre><p>Valid·Erlang·expressions·and·guard·sequences·are·described·in137 ExprN</code></pre><p>Valid·Erlang·expressions·and·guard·sequences·are·described·in
138 <a·href="expressions.html">Expressions</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fact</span><span·class="p"·data-group-id="1773795301-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="1773795301-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="c1">%·first·clause·head</span><span·class="w">138 <a·href="expressions.html">Expressions</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fact</span><span·class="p"·data-group-id="6653199932-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="6653199932-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">··</span><span·class="c1">%·first·clause·head</span><span·class="w">
139 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="1773795301-2">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="1773795301-2">)</span><span·class="p">;</span><span·class="w">·····</span><span·class="c1">%·first·clause·body</span><span·class="w">139 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="6653199932-2">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="6653199932-2">)</span><span·class="p">;</span><span·class="w">·····</span><span·class="c1">%·first·clause·body</span><span·class="w">
  
140 </span><span·class="nf">fact</span><span·class="p"·data-group-id="1773795301-3">(</span><span·class="mi">0</span><span·class="p"·data-group-id="1773795301-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·············</span><span·class="c1">%·second·clause·head</span><span·class="w">140 </span><span·class="nf">fact</span><span·class="p"·data-group-id="6653199932-3">(</span><span·class="mi">0</span><span·class="p"·data-group-id="6653199932-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·············</span><span·class="c1">%·second·clause·head</span><span·class="w">
141 ····</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">·················</span><span·class="c1">%·second·clause·body</span></code></pre><p><a·href=""·id="eval"></a></p><h2·id="function-evaluation"·class="section-heading">141 ····</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">·················</span><span·class="c1">%·second·clause·body</span></code></pre><p><a·href=""·id="eval"></a></p><h2·id="function-evaluation"·class="section-heading">
142 ··<a·href="#function-evaluation"·class="hover-link">142 ··<a·href="#function-evaluation"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
144 ··</a>144 ··</a>
145 ··<span·class="text">Function·Evaluation</span>145 ··<span·class="text">Function·Evaluation</span>
146 </h2>146 </h2>
147 <p>When·a·function·<code·class="inline">M:F/N</code>·is·called,·first·the·code·for·the·function·is·located.147 <p>When·a·function·<code·class="inline">M:F/N</code>·is·called,·first·the·code·for·the·function·is·located.
148 If·the·function·cannot·be·found,·an·<code·class="inline">undef</code>·runtime·error·occurs.·Notice·that148 If·the·function·cannot·be·found,·an·<code·class="inline">undef</code>·runtime·error·occurs.·Notice·that
149 the·function·must·be·exported·to·be·visible·outside·the·module·it·is·defined·in.</p><p>If·the·function·is·found,·the·function·clauses·are·scanned·sequentially·until·a149 the·function·must·be·exported·to·be·visible·outside·the·module·it·is·defined·in.</p><p>If·the·function·is·found,·the·function·clauses·are·scanned·sequentially·until·a
150 clause·is·found·that·fulfills·both·of·the·following·two·conditions:</p><ol><li>The·patterns·in·the·clause·head·can·be·successfully·matched·against·the·given150 clause·is·found·that·fulfills·both·of·the·following·two·conditions:</p><ol><li>The·patterns·in·the·clause·head·can·be·successfully·matched·against·the·given
151 arguments.</li><li>The·guard·sequence,·if·any,·is·true.</li></ol><p>If·such·a·clause·cannot·be·found,·a·<code·class="inline">function_clause</code>·runtime·error·occurs.</p><p>If·such·a·clause·is·found,·the·corresponding·clause·body·is·evaluated.·That·is,151 arguments.</li><li>The·guard·sequence,·if·any,·is·true.</li></ol><p>If·such·a·clause·cannot·be·found,·a·<code·class="inline">function_clause</code>·runtime·error·occurs.</p><p>If·such·a·clause·is·found,·the·corresponding·clause·body·is·evaluated.·That·is,
152 the·expressions·in·the·body·are·evaluated·sequentially·and·the·value·of·the·last152 the·expressions·in·the·body·are·evaluated·sequentially·and·the·value·of·the·last
153 expression·is·returned.</p><p>Consider·the·function·<code·class="inline">fact</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1715331749-1">(</span><span·class="ss">mod</span><span·class="p"·data-group-id="1715331749-1">)</span><span·class="p">.</span><span·class="w">153 expression·is·returned.</p><p>Consider·the·function·<code·class="inline">fact</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9580038469-1">(</span><span·class="ss">mod</span><span·class="p"·data-group-id="9580038469-1">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1715331749-2">(</span><span·class="p"·data-group-id="1715331749-3">[</span><span·class="ss">fact</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1715331749-3">]</span><span·class="p"·data-group-id="1715331749-2">)</span><span·class="p">.</span><span·class="w">154 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9580038469-2">(</span><span·class="p"·data-group-id="9580038469-3">[</span><span·class="ss">fact</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="9580038469-3">]</span><span·class="p"·data-group-id="9580038469-2">)</span><span·class="p">.</span><span·class="w">
  
155 </span><span·class="nf">fact</span><span·class="p"·data-group-id="1715331749-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="1715331749-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">155 </span><span·class="nf">fact</span><span·class="p"·data-group-id="9580038469-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="9580038469-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
156 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="1715331749-5">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1715331749-5">)</span><span·class="p">;</span><span·class="w">156 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="9580038469-5">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9580038469-5">)</span><span·class="p">;</span><span·class="w">
157 </span><span·class="nf">fact</span><span·class="p"·data-group-id="1715331749-6">(</span><span·class="mi">0</span><span·class="p"·data-group-id="1715331749-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">fact</span><span·class="p"·data-group-id="9580038469-6">(</span><span·class="mi">0</span><span·class="p"·data-group-id="9580038469-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="mi">1</span><span·class="p">.</span></code></pre><p>Assume·that·you·want·to·calculate·the·factorial·for·1:</p><pre><code·class="text">1&gt;·mod:fact(1).</code></pre><p>Evaluation·starts·at·the·first·clause.·The·pattern·<code·class="inline">N</code>·is·matched·against158 ····</span><span·class="mi">1</span><span·class="p">.</span></code></pre><p>Assume·that·you·want·to·calculate·the·factorial·for·1:</p><pre><code·class="text">1&gt;·mod:fact(1).</code></pre><p>Evaluation·starts·at·the·first·clause.·The·pattern·<code·class="inline">N</code>·is·matched·against
159 argument·1.·The·matching·succeeds·and·the·guard·(<code·class="inline">N·&gt;·0</code>)·is·true,·thus·<code·class="inline">N</code>·is159 argument·1.·The·matching·succeeds·and·the·guard·(<code·class="inline">N·&gt;·0</code>)·is·true,·thus·<code·class="inline">N</code>·is
160 bound·to·1,·and·the·corresponding·body·is·evaluated:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="0187895209-1">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="0187895209-1">)</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0[·...·truncated·by·diffoscope;·len:·288,·SHA:·a5ed697c5b6500cd74b702a1d85047b43df00a07bc6b4d043dcfd8a4419a70b8·...·]-2">)</span><span·class="w">160 bound·to·1,·and·the·corresponding·body·is·evaluated:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="4801745798-1">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="4801745798-1">)</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4[·...·truncated·by·diffoscope;·len:·288,·SHA:·c61e58e60c3173de2cc7c9f39ae18a1f489ff54b140bb9ce2924b423f722de58·...·]-2">)</span><span·class="w">
161 </span><span·class="mi">1</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="0187895209-3">(</span><span·class="mi">0</span><span·class="p"·data-group-id="0187895209-3">)</span></code></pre><p>Now,·<code·class="inline">fact(0)</code>·is·called,·and·the·function·clauses·are·scanned161 </span><span·class="mi">1</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fact</span><span·class="p"·data-group-id="4801745798-3">(</span><span·class="mi">0</span><span·class="p"·data-group-id="4801745798-3">)</span></code></pre><p>Now,·<code·class="inline">fact(0)</code>·is·called,·and·the·function·clauses·are·scanned
162 sequentially·again.·First,·the·pattern·<code·class="inline">N</code>·is·matched·against·0.·The162 sequentially·again.·First,·the·pattern·<code·class="inline">N</code>·is·matched·against·0.·The
163 matching·succeeds,·but·the·guard·(<code·class="inline">N·&gt;·0</code>)·is·false.·Second,·the163 matching·succeeds,·but·the·guard·(<code·class="inline">N·&gt;·0</code>)·is·false.·Second,·the
164 pattern·<code·class="inline">0</code>·is·matched·against·the·argument·<code·class="inline">0</code>.·The·matching·succeeds164 pattern·<code·class="inline">0</code>·is·matched·against·the·argument·<code·class="inline">0</code>.·The·matching·succeeds
165 and·the·body·is·evaluated:</p><pre><code·class="text">1·*·fact(0)·=&gt;165 and·the·body·is·evaluated:</p><pre><code·class="text">1·*·fact(0)·=&gt;
166 1·*·1·=&gt;166 1·*·1·=&gt;
167 1</code></pre><p>Evaluation·has·succeed·and·<code·class="inline">mod:fact(1)</code>·returns·1.</p><p>If·<code·class="inline">mod:fact/1</code>·is·called·with·a·negative·number·as·argument,·no·clause·head167 1</code></pre><p>Evaluation·has·succeed·and·<code·class="inline">mod:fact(1)</code>·returns·1.</p><p>If·<code·class="inline">mod:fact/1</code>·is·called·with·a·negative·number·as·argument,·no·clause·head
168 matches.·A·<code·class="inline">function_clause</code>·runtime·error·occurs.</p><h2·id="tail-recursion"·class="section-heading">168 matches.·A·<code·class="inline">function_clause</code>·runtime·error·occurs.</p><h2·id="tail-recursion"·class="section-heading">
Offset 173, 17 lines modifiedOffset 173, 17 lines modified
173 ··</a>173 ··</a>
174 ··<span·class="text">Tail·recursion</span>174 ··<span·class="text">Tail·recursion</span>
175 </h2>175 </h2>
176 <p>If·the·last·expression·of·a·function·body·is·a·function·call,·a176 <p>If·the·last·expression·of·a·function·body·is·a·function·call,·a
177 <em>tail-recursive·call</em>·is·done.·This·is·to·ensure·that·no·system177 <em>tail-recursive·call</em>·is·done.·This·is·to·ensure·that·no·system
178 resources,·for·example,·call·stack,·are·consumed.·This·means·that·an178 resources,·for·example,·call·stack,·are·consumed.·This·means·that·an
179 infinite·loop·using·tail-recursive·calls·will·not·exhaust·the·call179 infinite·loop·using·tail-recursive·calls·will·not·exhaust·the·call
180 stack·and·can·(in·principle)·run·forever.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="3591513886-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="3591513886-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 stack·and·can·(in·principle)·run·forever.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="4660770877-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="4660770877-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3591513886-2">(</span><span·class="s">&quot;</span><span·class="si">~w</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3591513886-3">[</span><span·class="n">N</span[·...·truncated·by·diffoscope;·len:·95,·SHA:·3723dd90c8258f219c16ef98442ce5f8b7c9d018b292d49c3b8bdb15d04227ab·...·]-2">)</span><span·class="p">,</span><span·class="w">181 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4660770877-2">(</span><span·class="s">&quot;</span><span·class="si">~w</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4660770877-3">[</span><span·class="n">N</span[·...·truncated·by·diffoscope;·len:·95,·SHA:·74b3876c336b18cb0dca2a9b0b6f989949bedbd92c75136704f36ee3805bf009·...·]-2">)</span><span·class="p">,</span><span·class="w">
182 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="3591513886-4">(</span><span·class="n">N</span><span·class="o">+</span><span·class="mi">1</span><span·class="p"·data-group-id="3591513886-4">)</span><span·class="p">.</span></code></pre><p>The·earlier·factorial·example·is·a·counter-example.·It·is·not182 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="4660770877-4">(</span><span·class="n">N</span><span·class="o">+</span><span·class="mi">1</span><span·class="p"·data-group-id="4660770877-4">)</span><span·class="p">.</span></code></pre><p>The·earlier·factorial·example·is·a·counter-example.·It·is·not
183 tail-recursive,·since·a·multiplication·is·done·on·the·result·of·the·recursive183 tail-recursive,·since·a·multiplication·is·done·on·the·result·of·the·recursive
184 call·to·<code·class="inline">fact(N-1)</code>.</p><h2·id="built-in-functions-bifs"·class="section-heading">184 call·to·<code·class="inline">fact(N-1)</code>.</p><h2·id="built-in-functions-bifs"·class="section-heading">
185 ··<a·href="#built-in-functions-bifs"·class="hover-link">185 ··<a·href="#built-in-functions-bifs"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">Built-In·Functions·(BIFs)</span>188 ··<span·class="text">Built-In·Functions·(BIFs)</span>
189 </h2>189 </h2>
Offset 191, 17 lines modifiedOffset 191, 17 lines modified
191 system.·BIFs·do·things·that·are·difficult·or·impossible·to·implement191 system.·BIFs·do·things·that·are·difficult·or·impossible·to·implement
192 in·Erlang.·Most·of·the·BIFs·belong·to·module·<a·href="../../erts-15.0.1/doc/html/erlang.html"><code·class="inline">erlang</code></a>,·but·there192 in·Erlang.·Most·of·the·BIFs·belong·to·module·<a·href="../../erts-15.0.1/doc/html/erlang.html"><code·class="inline">erlang</code></a>,·but·there
193 are·also·BIFs·belonging·to·a·few·other·modules,·for·example·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html"><code·class="inline">lists</code></a>193 are·also·BIFs·belonging·to·a·few·other·modules,·for·example·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html"><code·class="inline">lists</code></a>
194 and·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html"><code·class="inline">ets</code></a>.</p><p>The·most·commonly·used·BIFs·belonging·to·<a·href="../../erts-15.0.1/doc/html/erlang.html"><code·class="inline">erlang</code></a>·are·<em>auto-imported</em>.·They·do194 and·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html"><code·class="inline">ets</code></a>.</p><p>The·most·commonly·used·BIFs·belonging·to·<a·href="../../erts-15.0.1/doc/html/erlang.html"><code·class="inline">erlang</code></a>·are·<em>auto-imported</em>.·They·do
195 not·need·to·be·prefixed·with·the·module·name.·Which·BIFs·that·are·auto-imported195 not·need·to·be·prefixed·with·the·module·name.·Which·BIFs·that·are·auto-imported
196 is·specified·in·the·<a·href="../../erts-15.0.1/doc/html/erlang.html"><code·class="inline">erlang</code></a>·module·in·ERTS.·For·example,·standard-type196 is·specified·in·the·<a·href="../../erts-15.0.1/doc/html/erlang.html"><code·class="inline">erlang</code></a>·module·in·ERTS.·For·example,·standard-type
197 conversion·BIFs·like·<code·class="inline">atom_to_list</code>·and·BIFs·allowed·in·guards·can·be·called197 conversion·BIFs·like·<code·class="inline">atom_to_list</code>·and·BIFs·allowed·in·guards·can·be·called
198 without·specifying·the·module·name.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="8398733742-1">(</span><span·class="p"·data-group-id="8398733742-2">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="8398733742-2">}</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·42f5f5224b6f3a224c5f3a7c2aa32239eb2992136ba98d799f35a7838c0dd07d·...·]-1">)</span><span·class="p">.</span><span·class="w">198 without·specifying·the·module·name.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">tuple_size</span><span·class="p"·data-group-id="0828837209-1">(</span><span·class="p"·data-group-id="0828837209-2">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="0828837209-2">}</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·179bba04fde0787b96128f5cdc1ad888e2b2ce48343d93eadf83523d60826e3d·...·]-1">)</span><span·class="p">.</span><span·class="w">
199 </span><span·class="mi">3</span><span·class="gp·unselectable">199 </span><span·class="mi">3</span><span·class="gp·unselectable">
200 2&gt;·</span><span·class="nf">atom_to_list</span><span·class="p"·data-group-id="8398733742-3">(</span><span·class="ss">&#39;Erlang&#39;</span><span·class="p"·data-group-id="8398733742-3">)</span><span·class="p">.</span><span·class="w">200 2&gt;·</span><span·class="nf">atom_to_list</span><span·class="p"·data-group-id="0828837209-3">(</span><span·class="ss">&#39;Erlang&#39;</span><span·class="p"·data-group-id="0828837209-3">)</span><span·class="p">.</span><span·class="w">
201 </span><span·class="s">&quot;Erlang&quot;</span></code></pre>201 </span><span·class="s">&quot;Erlang&quot;</span></code></pre>
202 </div>202 </div>
  
203 <div·class="bottom-actions"·id="bottom-actions">203 <div·class="bottom-actions"·id="bottom-actions">
204 ··<div·class="bottom-actions-item">204 ··<div·class="bottom-actions-item">
  
205 ······<a·href="documentation.html"·class="bottom-actions-button"·rel="prev">205 ······<a·href="documentation.html"·class="bottom-actions-button"·rel="prev">
5.34 KB
./usr/share/doc/erlang-doc/html/doc/system/ref_man_processes.html
    
Offset 125, 18 lines modifiedOffset 125, 18 lines modified
125 (grow·and·shrink·dynamically)·with·small·memory·footprint,·fast·to·create·and125 (grow·and·shrink·dynamically)·with·small·memory·footprint,·fast·to·create·and
126 terminate,·and·the·scheduling·overhead·is·low.</p><h2·id="process-creation"·class="section-heading">126 terminate,·and·the·scheduling·overhead·is·low.</p><h2·id="process-creation"·class="section-heading">
127 ··<a·href="#process-creation"·class="hover-link">127 ··<a·href="#process-creation"·class="hover-link">
128 ····<i·class="ri-link-m"·aria-hidden="true"></i>128 ····<i·class="ri-link-m"·aria-hidden="true"></i>
129 ··</a>129 ··</a>
130 ··<span·class="text">Process·Creation</span>130 ··<span·class="text">Process·Creation</span>
131 </h2>131 </h2>
132 <p>A·process·is·created·by·calling·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/3"><code·class="inline">spawn()</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="7581271433-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="7581271433-1">)</span><s[·...·truncated·by·diffoscope;·len:·195,·SHA:·8f3ee16b56c837d766ef9deac0796d8da9a50ac8018b0075bc1b0d00afe08e72·...·]-2">)</span><span·class="w">132 <p>A·process·is·created·by·calling·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/3"><code·class="inline">spawn()</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="0756447267-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="0756447267-1">)</span><s[·...·truncated·by·diffoscope;·len:·195,·SHA:·0a8226dc0197c252f52d16c906b00473d8a51915304a824779a923627f3e8aa3·...·]-2">)</span><span·class="w">
133 ··</span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7581271433-3">(</span><span·class="p"·data-group-id="7581271433-3">)</span><span·class="w">133 ··</span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0756447267-3">(</span><span·class="p"·data-group-id="0756447267-3">)</span><span·class="w">
134 ··</span><span·class="n">Args</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7581271433-4">[</span><span·class="n">Arg1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">ArgN</span><span·class="p"·data-group-id="7581271433-4">]</span><span·class="w">134 ··</span><span·class="n">Args</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0756447267-4">[</span><span·class="n">Arg1</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="n">ArgN</span><span·class="p"·data-group-id="0756447267-4">]</span><span·class="w">
135 ····</span><span·class="n">ArgI</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="7581271433-5">(</span><span·class="p"·data-group-id="7581271433-5">)</span></code></pre><p><code·class="inline">spawn()</code>·creates·a·new·process·and·returns·the·pid.</p><p>The·new·process·starts·executing·in·<code·class="inline">Module:Name(Arg1,...,ArgN)</code>·where·the135 ····</span><span·class="n">ArgI</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="0756447267-5">(</span><span·class="p"·data-group-id="0756447267-5">)</span></code></pre><p><code·class="inline">spawn()</code>·creates·a·new·process·and·returns·the·pid.</p><p>The·new·process·starts·executing·in·<code·class="inline">Module:Name(Arg1,...,ArgN)</code>·where·the
136 arguments·are·the·elements·of·the·(possible·empty)·<code·class="inline">Args</code>·argument·list.</p><p>There·exist·a·number·of·different·<code·class="inline">spawn</code>·BIFs:</p><ul><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/4"><code·class="inline">spawn/1,2,3,4</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_link/4"><code·class="inline">spawn_link/1,2,3,4</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_monitor/4"><code·class="inline">spawn_monitor/1,2,3,4</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_opt/5"><code·class="inline">spawn_opt/2,3,4,5</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_request/5"><code·class="inline">spawn_request/1,2,3,4,5</code></a></li></ul><h2·id="registered-processes"·class="section-heading">136 arguments·are·the·elements·of·the·(possible·empty)·<code·class="inline">Args</code>·argument·list.</p><p>There·exist·a·number·of·different·<code·class="inline">spawn</code>·BIFs:</p><ul><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn/4"><code·class="inline">spawn/1,2,3,4</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_link/4"><code·class="inline">spawn_link/1,2,3,4</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_monitor/4"><code·class="inline">spawn_monitor/1,2,3,4</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_opt/5"><code·class="inline">spawn_opt/2,3,4,5</code></a></li><li><a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_request/5"><code·class="inline">spawn_request/1,2,3,4,5</code></a></li></ul><h2·id="registered-processes"·class="section-heading">
137 ··<a·href="#registered-processes"·class="hover-link">137 ··<a·href="#registered-processes"·class="hover-link">
138 ····<i·class="ri-link-m"·aria-hidden="true"></i>138 ····<i·class="ri-link-m"·aria-hidden="true"></i>
139 ··</a>139 ··</a>
140 ··<span·class="text">Registered·Processes</span>140 ··<span·class="text">Registered·Processes</span>
141 </h2>141 </h2>
142 <p>Besides·addressing·a·process·by·using·its·pid,·there·are·also·BIFs·for142 <p>Besides·addressing·a·process·by·using·its·pid,·there·are·also·BIFs·for
30.4 KB
./usr/share/doc/erlang-doc/html/doc/system/ref_man_records.html
    
Offset 123, 17 lines modifiedOffset 123, 17 lines modified
123 ····<i·class="ri-link-m"·aria-hidden="true"></i>123 ····<i·class="ri-link-m"·aria-hidden="true"></i>
124 ··</a>124 ··</a>
125 ··<span·class="text">Defining·Records</span>125 ··<span·class="text">Defining·Records</span>
126 </h2>126 </h2>
127 <p>A·record·definition·consists·of·the·name·of·the·record,·followed·by·the·field127 <p>A·record·definition·consists·of·the·name·of·the·record,·followed·by·the·field
128 names·of·the·record.·Record·and·field·names·must·be·atoms.·Each·field·can·be128 names·of·the·record.·Record·and·field·names·must·be·atoms.·Each·field·can·be
129 given·an·optional·default·value.·If·no·default·value·is·supplied,·<code·class="inline">undefined</code>·is129 given·an·optional·default·value.·If·no·default·value·is·supplied,·<code·class="inline">undefined</code>·is
130 used.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0049719713-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0049719713-2">{</span><span·class="n">Field1</span><span·class="w">·</span><span·class="p"·data-group-id="0049719713-3">[</span>[·...·truncated·by·diffoscope;·len:·117,·SHA:·1d36b0fbffbd055742d24ccc44e15b2ee8d062a0af997097f6bead35b45b93cc·...·]-3">]</span><span·class="p">,</span><span·class="w">130 used.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="6514708996-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6514708996-2">{</span><span·class="n">Field1</span><span·class="w">·</span><span·class="p"·data-group-id="6514708996-3">[</span>[·...·truncated·by·diffoscope;·len:·117,·SHA:·ba6eea3ff3d1ab4ace60e10970a5c26a0987f7198bd3ed9fd0c3da619fbde8d9·...·]-3">]</span><span·class="p">,</span><span·class="w">
131 ···············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">131 ···············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
132 ···············</span><span·class="n">FieldN</span><span·class="w">·</span><span·class="p"·data-group-id="0049719713-4">[</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ExprN</span><span·class="p"·data-group-id="0049719713-4">]</span><span·class="p"·data-group-id="0049719713-2">}</span><span·class="p"·data-group-id="0049719713-1">)</span><span·class="p">.</span></code></pre><p>The·default·value·for·a·field·is·an·arbitrary·expression,·except·that·it·must132 ···············</span><span·class="n">FieldN</span><span·class="w">·</span><span·class="p"·data-group-id="6514708996-4">[</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ExprN</span><span·class="p"·data-group-id="6514708996-4">]</span><span·class="p"·data-group-id="6514708996-2">}</span><span·class="p"·data-group-id="6514708996-1">)</span><span·class="p">.</span></code></pre><p>The·default·value·for·a·field·is·an·arbitrary·expression,·except·that·it·must
133 not·use·any·variables.</p><p>A·record·definition·can·be·placed·anywhere·among·the·attributes·and·function133 not·use·any·variables.</p><p>A·record·definition·can·be·placed·anywhere·among·the·attributes·and·function
134 declarations·of·a·module,·but·the·definition·must·come·before·any·usage·of·the134 declarations·of·a·module,·but·the·definition·must·come·before·any·usage·of·the
135 record.</p><p>If·a·record·is·used·in·several·modules,·it·is·recommended·that·the·record135 record.</p><p>If·a·record·is·used·in·several·modules,·it·is·recommended·that·the·record
136 definition·is·placed·in·an·include·file.</p><blockquote><h4·class="info">Change</h4><p>Starting·from·Erlang/OTP·26,·records·can·be·defined·in·the·Erlang·shell136 definition·is·placed·in·an·include·file.</p><blockquote><h4·class="info">Change</h4><p>Starting·from·Erlang/OTP·26,·records·can·be·defined·in·the·Erlang·shell
137 using·the·syntax·described·in·this·section.·In·earlier·releases,·it·was137 using·the·syntax·described·in·this·section.·In·earlier·releases,·it·was
138 necessary·to·use·the·<a·href="../../lib/stdlib-6.0.1/doc/html/shell.html"><code·class="inline">shell</code></a>·built-in·function·<code·class="inline">rd/2</code>.</p></blockquote><h2·id="creating-records"·class="section-heading">138 necessary·to·use·the·<a·href="../../lib/stdlib-6.0.1/doc/html/shell.html"><code·class="inline">shell</code></a>·built-in·function·<code·class="inline">rd/2</code>.</p></blockquote><h2·id="creating-records"·class="section-heading">
139 ··<a·href="#creating-records"·class="hover-link">139 ··<a·href="#creating-records"·class="hover-link">
Offset 143, 32 lines modifiedOffset 143, 32 lines modified
143 </h2>143 </h2>
144 <p>The·following·expression·creates·a·new·<code·class="inline">Name</code>·record·where·the·value·of·each144 <p>The·following·expression·creates·a·new·<code·class="inline">Name</code>·record·where·the·value·of·each
145 field·<code·class="inline">FieldI</code>·is·the·value·of·evaluating·the·corresponding·expression·<code·class="inline">ExprI</code>:</p><pre><code·class="text">#Name{Field1=Expr1,·...,·FieldK=ExprK}</code></pre><p>The·fields·can·be·in·any·order,·not·necessarily·the·same·order·as·in·the·record145 field·<code·class="inline">FieldI</code>·is·the·value·of·evaluating·the·corresponding·expression·<code·class="inline">ExprI</code>:</p><pre><code·class="text">#Name{Field1=Expr1,·...,·FieldK=ExprK}</code></pre><p>The·fields·can·be·in·any·order,·not·necessarily·the·same·order·as·in·the·record
146 definition,·and·fields·can·be·omitted.·Omitted·fields·get·their·respective146 definition,·and·fields·can·be·omitted.·Omitted·fields·get·their·respective
147 default·value·instead.</p><p>If·several·fields·are·to·be·assigned·the·same·value,·the·following·construction147 default·value·instead.</p><p>If·several·fields·are·to·be·assigned·the·same·value,·the·following·construction
148 can·be·used:</p><pre><code·class="text">#Name{Field1=Expr1,·...,·FieldK=ExprK,·_=ExprL}</code></pre><p>Omitted·fields·then·get·the·value·of·evaluating·<code·class="inline">ExprL</code>·instead·of·their·default148 can·be·used:</p><pre><code·class="text">#Name{Field1=Expr1,·...,·FieldK=ExprK,·_=ExprL}</code></pre><p>Omitted·fields·then·get·the·value·of·evaluating·<code·class="inline">ExprL</code>·instead·of·their·default
149 values.·This·feature·is·primarily·intended·to·be·used·to·create·patterns·for·ETS149 values.·This·feature·is·primarily·intended·to·be·used·to·create·patterns·for·ETS
150 and·Mnesia·match·functions.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5454196788-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5454196788-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span>[·...·truncated·by·diffoscope;·len:·173,·SHA:·29c54c8498a42850ebd9d909df2dbc771aa12129cea9f20b52ca31a70c121708·...·]-1">)</span><span·class="p">.</span><span·class="w">150 and·Mnesia·match·functions.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5496454101-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5496454101-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</span>[·...·truncated·by·diffoscope;·len:·173,·SHA:·5f8ba591ab00005cefe473a0851a9529cb8f28e976a13b78cf06856ee7158cf8·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
151 </span><span·class="nf">lookup</span><span·class="p"·data-group-id="5454196788-3">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="5454196788-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">151 </span><span·class="nf">lookup</span><span·class="p"·data-group-id="5496454101-3">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="5496454101-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
152 ····</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_object</span><span·class="p"·data-group-id="5454196788-4">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="5454196788-5">{</span><span·class="ss">name</span><span·class="o">=</span><sp[·...·truncated·by·diffoscope;·len:·249,·SHA:·2b75f5eefbc20a17213371da45475c4c859ec11e8eed583dbb70616ffa112d63·...·]-4">)</span><span·class="p">.</span></code></pre><h2·id="accessing-record-fields"·class="section-heading">152 ····</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_object</span><span·class="p"·data-group-id="5496454101-4">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="5496454101-5">{</span><span·class="ss">name</span><span·class="o">=</span><sp[·...·truncated·by·diffoscope;·len:·249,·SHA:·dd1f93bad8d9a60f08ea8096d44976e0a51b064606a9efe40a41ee2af18e94b2·...·]-4">)</span><span·class="p">.</span></code></pre><h2·id="accessing-record-fields"·class="section-heading">
153 ··<a·href="#accessing-record-fields"·class="hover-link">153 ··<a·href="#accessing-record-fields"·class="hover-link">
154 ····<i·class="ri-link-m"·aria-hidden="true"></i>154 ····<i·class="ri-link-m"·aria-hidden="true"></i>
155 ··</a>155 ··</a>
156 ··<span·class="text">Accessing·Record·Fields</span>156 ··<span·class="text">Accessing·Record·Fields</span>
157 </h2>157 </h2>
158 <pre><code·class="text">Expr#Name.Field</code></pre><p>Returns·the·value·of·the·specified·field.·<code·class="inline">Expr</code>·is·to·evaluate·to·a·<code·class="inline">Name</code>158 <pre><code·class="text">Expr#Name.Field</code></pre><p>Returns·the·value·of·the·specified·field.·<code·class="inline">Expr</code>·is·to·evaluate·to·a·<code·class="inline">Name</code>
159 record.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5377921015-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5377921015-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</spa[·...·truncated·by·diffoscope;·len:·175,·SHA:·d381b1771dd9cdfb14f53fb6636b0193a46746cf835289b7724b028f4f084419·...·]-1">)</span><span·class="p">.</span><span·class="w">159 record.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1286888396-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1286888396-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</spa[·...·truncated·by·diffoscope;·len:·175,·SHA:·32aa749c8736cc537156535db431d121b131afca466cf4e894550a1606fc3077·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
160 </span><span·class="nf">get_person_name</span><span·class="p"·data-group-id="5377921015-3">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5377921015-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">160 </span><span·class="nf">get_person_name</span><span·class="p"·data-group-id="1286888396-3">(</span><span·class="n">Person</span><span·class="p"·data-group-id="1286888396-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
161 ····</span><span·class="n">Person</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">.</span></code></pre><p>The·following·expression·returns·the·position·of·the·specified·field·in·the161 ····</span><span·class="n">Person</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">.</span></code></pre><p>The·following·expression·returns·the·position·of·the·specified·field·in·the
162 tuple·representation·of·the·record:</p><pre><code·class="text">#Name.Field</code></pre><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9807708392-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9807708392-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</spa[·...·truncated·by·diffoscope;·len:·175,·SHA:·1448832ffac0fdce24aebf54743f9594324ebc41ce10a4a71ed9f7617ad0e954·...·]-1">)</span><span·class="p">.</span><span·class="w">162 tuple·representation·of·the·record:</p><pre><code·class="text">#Name.Field</code></pre><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7512240044-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7512240044-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">phone</spa[·...·truncated·by·diffoscope;·len:·175,·SHA:·e7a86c89307e471df066309982edbfe7bb600990d318b80fa2db64c1251d8275·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
163 </span><span·class="nf">lookup</span><span·class="p"·data-group-id="9807708392-3">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="9807708392-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">163 </span><span·class="nf">lookup</span><span·class="p"·data-group-id="7512240044-3">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="7512240044-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
164 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="9807708392-4">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·63,·SHA:·9655d440a66a75069dadca3e6f1906a80f8e71c945729725f1c8d07bde21a0b9·...·]-4">)</span><span·class="p">.</span></code></pre><h2·id="updating-records"·class="section-heading">164 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="7512240044-4">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·63,·SHA:·83f558a81ec3ecfef7ea0c271a81371e1c8870d6b4bf95738080f1756b8aa996·...·]-4">)</span><span·class="p">.</span></code></pre><h2·id="updating-records"·class="section-heading">
165 ··<a·href="#updating-records"·class="hover-link">165 ··<a·href="#updating-records"·class="hover-link">
166 ····<i·class="ri-link-m"·aria-hidden="true"></i>166 ····<i·class="ri-link-m"·aria-hidden="true"></i>
167 ··</a>167 ··</a>
168 ··<span·class="text">Updating·Records</span>168 ··<span·class="text">Updating·Records</span>
169 </h2>169 </h2>
170 <pre><code·class="text">Expr#Name{Field1=Expr1,·...,·FieldK=ExprK}</code></pre><p><code·class="inline">Expr</code>·is·to·evaluate·to·a·<code·class="inline">Name</code>·record.·A·copy·of·this·record·is·returned,170 <pre><code·class="text">Expr#Name{Field1=Expr1,·...,·FieldK=ExprK}</code></pre><p><code·class="inline">Expr</code>·is·to·evaluate·to·a·<code·class="inline">Name</code>·record.·A·copy·of·this·record·is·returned,
171 with·the·value·of·each·specified·field·<code·class="inline">FieldI</code>·changed·to·the·value·of171 with·the·value·of·each·specified·field·<code·class="inline">FieldI</code>·changed·to·the·value·of
Offset 178, 51 lines modifiedOffset 178, 51 lines modified
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Records·in·Guards</span>180 ··<span·class="text">Records·in·Guards</span>
181 </h2>181 </h2>
182 <p>Since·record·expressions·are·expanded·to·tuple·expressions,·creating182 <p>Since·record·expressions·are·expanded·to·tuple·expressions,·creating
183 records·and·accessing·record·fields·are·allowed·in·guards.·However,183 records·and·accessing·record·fields·are·allowed·in·guards.·However,
184 all·subexpressions·(for·initializing·fields),·must·be·valid·guard184 all·subexpressions·(for·initializing·fields),·must·be·valid·guard
185 expressions·as·well.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle</span><span·class="p"·data-group-id="2379387867-1">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2379387867-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·441,·SHA:·7984ce1a2dcea9aaadd0c8d088f9f0c77d8efc758e6a3a0ec2f031bdceb172b3·...·]-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">185 expressions·as·well.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">handle</span><span·class="p"·data-group-id="2094083974-1">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2094083974-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·441,·SHA:·810ede265d546c2ee413a41805598d85dd373da52b5c46fefb665b09333453b9·...·]-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
186 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">186 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
  
187 </span><span·class="nf">handle</span><span·class="p"·data-group-id="2379387867-3">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2379387867-3">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">running</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">187 </span><span·class="nf">handle</span><span·class="p"·data-group-id="2094083974-3">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2094083974-3">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">running</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
188 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>There·is·also·a·type·test·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_record/2"><code·class="inline">is_record(Term,·RecordTag)</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">is_person</span><span·class="p"·data-group-id="0903750373-1">(</span><span·class="n">P</span><span·class="p"·data-group-id="0903750373-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="0903750373-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·a3794d376a9cf3bb45517a2bd1d67fb957758002dfc8c6989292ec72f2a5da2d·...·]3-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>There·is·also·a·type·test·BIF·<a·href="../../erts-15.0.1/doc/html/erlang.html#is_record/2"><code·class="inline">is_record(Term,·RecordTag)</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">is_person</span><span·class="p"·data-group-id="4008815013-1">(</span><span·class="n">P</span><span·class="p"·data-group-id="4008815013-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="4008815013-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·73f949e2cdd6c902b603fd251e87e4d1b04d84bf947cf64847d61b6c875fd04c·...·]3-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ····</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">189 ····</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
190 </span><span·class="nf">is_person</span><span·class="p"·data-group-id="0903750373-3">(</span><span·class="p">_</span><span·class="n">P</span><span·class="p"·data-group-id="0903750373-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 </span><span·class="nf">is_person</span><span·class="p"·data-group-id="4008815013-3">(</span><span·class="p">_</span><span·class="n">P</span><span·class="p"·data-group-id="4008815013-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ····</span><span·class="ss">false</span><span·class="p">.</span></code></pre><h2·id="records-in-patterns"·class="section-heading">191 ····</span><span·class="ss">false</span><span·class="p">.</span></code></pre><h2·id="records-in-patterns"·class="section-heading">
192 ··<a·href="#records-in-patterns"·class="hover-link">192 ··<a·href="#records-in-patterns"·class="hover-link">
193 ····<i·class="ri-link-m"·aria-hidden="true"></i>193 ····<i·class="ri-link-m"·aria-hidden="true"></i>
194 ··</a>194 ··</a>
195 ··<span·class="text">Records·in·Patterns</span>195 ··<span·class="text">Records·in·Patterns</span>
196 </h2>196 </h2>
197 <p>A·pattern·that·matches·a·certain·record·is·created·in·the·same·way·as·a·record197 <p>A·pattern·that·matches·a·certain·record·is·created·in·the·same·way·as·a·record
198 is·created:</p><pre><code·class="text">#Name{Field1=Expr1,·...,·FieldK=ExprK}</code></pre><p>In·this·case,·one·or·more·of·<code·class="inline">Expr1</code>·...·<code·class="inline">ExprK</code>·can·be·unbound·variables.</p><h2·id="nested-records"·class="section-heading">198 is·created:</p><pre><code·class="text">#Name{Field1=Expr1,·...,·FieldK=ExprK}</code></pre><p>In·this·case,·one·or·more·of·<code·class="inline">Expr1</code>·...·<code·class="inline">ExprK</code>·can·be·unbound·variables.</p><h2·id="nested-records"·class="section-heading">
199 ··<a·href="#nested-records"·class="hover-link">199 ··<a·href="#nested-records"·class="hover-link">
200 ····<i·class="ri-link-m"·aria-hidden="true"></i>200 ····<i·class="ri-link-m"·aria-hidden="true"></i>
201 ··</a>201 ··</a>
202 ··<span·class="text">Nested·Records</span>202 ··<span·class="text">Nested·Records</span>
203 </h2>203 </h2>
204 <p>Assume·the·following·record·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5691352182-1">(</span><span·class="ss">nrec0</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5691352182-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·132,·SHA:·d6beb13be9d77e91f1c87611d74e2375b1ea84578c09dace6979fe3b92534587·...·]-1">)</span><span·class="p">.</span><span·class="w">204 <p>Assume·the·following·record·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7411761109-1">(</span><span·class="ss">nrec0</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7411761109-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·132,·SHA:·065eff44121a58092929e3a89059409a9ba7ba4cee061648421683dd8cc8654c·...·]-1">)</span><span·class="p">.</span><span·class="w">
205 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5691352182-3">(</span><span·class="ss">nrec1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5691352182-4">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·392,·SHA:·09f69004c3469e5831fe00df66b0af09998c9ad4ce633ee07f223e998dd2a761·...·]-3">)</span><span·class="p">.</span><span·class="w">205 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7411761109-3">(</span><span·class="ss">nrec1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7411761109-4">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·392,·SHA:·bd17669323cdb53302129edcdb379185e2b9fddf34dfc3188d95293ce65eb80f·...·]-3">)</span><span·class="p">.</span><span·class="w">
206 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5691352182-6">(</span><span·class="ss">nrec2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5691352182-7">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·392,·SHA:·2b403a608bde1cc8fede25f2828a83bf4664da3d82a6b994eaea349bad817242·...·]-6">)</span><span·class="p">.</span><span·class="w">206 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7411761109-6">(</span><span·class="ss">nrec2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7411761109-7">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·392,·SHA:·1afcc6c6c6d83bca9c2d93261c1efbdc6e5c6ce1d56fb03720221bf51f5e55a0·...·]-6">)</span><span·class="p">.</span><span·class="w">
  
207 </span><span·class="n">N2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">nrec2</span><span·class="p"·data-group-id="5691352182-9">{</span><span·class="p"·data-group-id="5691352182-9">}</span><span·class="p">,</span></code></pre><p>Accessing·or·updating·nested·records·can·be·written·without·parentheses:</p><pre><code·class="text">&quot;nested0&quot;·=·N2#nrec2.nrec1#nrec1.nrec0#nrec0.name,207 </span><span·class="n">N2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">nrec2</span><span·class="p"·data-group-id="7411761109-9">{</span><span·class="p"·data-group-id="7411761109-9">}</span><span·class="p">,</span></code></pre><p>Accessing·or·updating·nested·records·can·be·written·without·parentheses:</p><pre><code·class="text">&quot;nested0&quot;·=·N2#nrec2.nrec1#nrec1.nrec0#nrec0.name,
208 ····N0n·=·N2#nrec2.nrec1#nrec1.nrec0#nrec0{name·=·&quot;nested0a&quot;},</code></pre><p>which·is·equivalent·to:</p><pre><code·class="text">&quot;nested0&quot;·=·((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0.name,208 ····N0n·=·N2#nrec2.nrec1#nrec1.nrec0#nrec0{name·=·&quot;nested0a&quot;},</code></pre><p>which·is·equivalent·to:</p><pre><code·class="text">&quot;nested0&quot;·=·((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0.name,
209 N0n·=·((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0{name·=·&quot;nested0a&quot;},</code></pre><blockquote><h4·class="info">Change</h4><p>Before·Erlang/OTP·R14,·parentheses·were·necessary·when·accessing·or·updating209 N0n·=·((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0{name·=·&quot;nested0a&quot;},</code></pre><blockquote><h4·class="info">Change</h4><p>Before·Erlang/OTP·R14,·parentheses·were·necessary·when·accessing·or·updating
210 nested·records.</p></blockquote><h2·id="internal-representation-of-records"·class="section-heading">210 nested·records.</p></blockquote><h2·id="internal-representation-of-records"·class="section-heading">
211 ··<a·href="#internal-representation-of-records"·class="hover-link">211 ··<a·href="#internal-representation-of-records"·class="hover-link">
212 ····<i·class="ri-link-m"·aria-hidden="true"></i>212 ····<i·class="ri-link-m"·aria-hidden="true"></i>
213 ··</a>213 ··</a>
214 ··<span·class="text">Internal·Representation·of·Records</span>214 ··<span·class="text">Internal·Representation·of·Records</span>
215 </h2>215 </h2>
216 <p>Record·expressions·are·translated·to·tuple·expressions·during·compilation.·A216 <p>Record·expressions·are·translated·to·tuple·expressions·during·compilation.·A
217 record·defined·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9732240682-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9732240682-2">{</span><span·class="n">Field1</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span[·...·truncated·by·diffoscope;·len:·214,·SHA:·cd19a2d25208085a1649f9442d04dbdff4550b57419cb79b5549992ec53c34d3·...·]-1">)</span><span·class="p">.</span></code></pre><p>is·internally·represented·by·the·tuple:</p><pre><code·class="text">{Name,·Value1,·...,·ValueN}</code></pre><p>Here·each·<code·class="inline">ValueI</code>·is·the·default·value·for·<code·class="inline">FieldI</code>.</p><p>To·each·module·using·records,·a·pseudo·function·is·added·during·compilation·to217 record·defined·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0804025186-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0804025186-2">{</span><span·class="n">Field1</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span[·...·truncated·by·diffoscope;·len:·214,·SHA:·8cf9f6626facb7cd684b3ed6ed6a014824ed5a0263de122902e7c8e2db21e931·...·]-1">)</span><span·class="p">.</span></code></pre><p>is·internally·represented·by·the·tuple:</p><pre><code·class="text">{Name,·Value1,·...,·ValueN}</code></pre><p>Here·each·<code·class="inline">ValueI</code>·is·the·default·value·for·<code·class="inline">FieldI</code>.</p><p>To·each·module·using·records,·a·pseudo·function·is·added·during·compilation·to
218 obtain·information·about·records:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">record_info</span><span·class="p"·data-group-id="0050140560-1">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="0050140560-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·123,·SHA:·c2519b222d07d6bb6504b34b7278a5e6ad7a32f840314e923fd2cd0ad639c727·...·]0-2">]</span><span·class="w">218 obtain·information·about·records:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">record_info</span><span·class="p"·data-group-id="6904360110-1">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="6904360110-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·123,·SHA:·0e25f5f3be9ac165591e0ab8763c65e6d250eb152c22e122eeb7618980e2aecd·...·]0-2">]</span><span·class="w">
219 </span><span·class="nf">record_info</span><span·class="p"·data-group-id="0050140560-3">(</span><span·class="nb">size</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="0050140560-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Size</span></code></pre><p><code·class="inline">Size</code>·is·the·size·of·the·tuple·representation,·that·is,·one·more·than·the219 </span><span·class="nf">record_info</span><span·class="p"·data-group-id="6904360110-3">(</span><span·class="nb">size</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="6904360110-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Size</span></code></pre><p><code·class="inline">Size</code>·is·the·size·of·the·tuple·representation,·that·is,·one·more·than·the
220 number·of·fields.</p>220 number·of·fields.</p>
221 </div>221 </div>
  
222 <div·class="bottom-actions"·id="bottom-actions">222 <div·class="bottom-actions"·id="bottom-actions">
223 ··<div·class="bottom-actions-item">223 ··<div·class="bottom-actions-item">
  
224 ······<a·href="macros.html"·class="bottom-actions-button"·rel="prev">224 ······<a·href="macros.html"·class="bottom-actions-button"·rel="prev">
67.5 KB
./usr/share/doc/erlang-doc/html/doc/system/release_handling.html
    
Offset 223, 38 lines modifiedOffset 223, 38 lines modified
223 ··<span·class="text">update</span>223 ··<span·class="text">update</span>
224 </h3>224 </h3>
225 <p>If·a·more·complex·change·has·been·made,·for·example,·a·change·to·the·format·of225 <p>If·a·more·complex·change·has·been·made,·for·example,·a·change·to·the·format·of
226 the·internal·state·of·a·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>,·simple·code·replacement·is·not·sufficient.226 the·internal·state·of·a·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html"><code·class="inline">gen_server</code></a>,·simple·code·replacement·is·not·sufficient.
227 Instead,·it·is·necessary·to:</p><ul><li>Suspend·the·processes·using·the·module·(to·avoid·that·they·try·to·handle·any227 Instead,·it·is·necessary·to:</p><ul><li>Suspend·the·processes·using·the·module·(to·avoid·that·they·try·to·handle·any
228 requests·before·the·code·replacement·is·completed).</li><li>Ask·them·to·transform·the·internal·state·format·and·switch·to·the·new·version228 requests·before·the·code·replacement·is·completed).</li><li>Ask·them·to·transform·the·internal·state·format·and·switch·to·the·new·version
229 of·the·module.</li><li>Remove·the·old·version.</li><li>Resume·the·processes.</li></ul><p>This·is·called·<em>synchronized·code·replacement</em>·and·for·this·the·following229 of·the·module.</li><li>Remove·the·old·version.</li><li>Resume·the·processes.</li></ul><p>This·is·called·<em>synchronized·code·replacement</em>·and·for·this·the·following
230 instructions·are·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4478077398-1">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4478077398-2">{</span><span·class="ss">advanced</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Extra</span><span·class="p"·data-group-id="4478077398-2">}</span><span·class="p"·data-group-id="4478077398-1">}</span><span·class="w"> 
231 </span><span·class="p"·data-group-id="4478077398-3">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">supervisor</span><span·c[·...·truncated·by·diffoscope;·len:·190,·SHA:·5d0604cb4d635b09211aa671a1d079b4607e0e3bad31d50a140942a5acabb20c·...·]230 instructions·are·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9633888943-1">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·309,·SHA:·72bdfa6a0cc01138969b14282967d46ad9028bbf93e939b5ccedd4099d52ae7f·...·]
 231 </span><span·class="p"·data-group-id="9633888943-3">{</span><span·class="ss">update</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="9633888943-3">}</span></code></pre><p><code·class="inline">update</code>·with·argument·<code·class="inline">{advanced,Extra}</code>·is·used·when·changing·the·internal
232 state·of·a·behaviour·as·described·above.·It·causes·behaviour·processes·to·call232 state·of·a·behaviour·as·described·above.·It·causes·behaviour·processes·to·call
233 the·callback·function·<code·class="inline">code_change/3</code>,·passing·the·term·<code·class="inline">Extra</code>·and·some·other233 the·callback·function·<code·class="inline">code_change/3</code>,·passing·the·term·<code·class="inline">Extra</code>·and·some·other
234 information·as·arguments.·See·the·manual·pages·for·the·respective·behaviours·and234 information·as·arguments.·See·the·manual·pages·for·the·respective·behaviours·and
235 <a·href="appup_cookbook.html#int_state">Appup·Cookbook</a>.</p><p><code·class="inline">update</code>·with·argument·<code·class="inline">supervisor</code>·is·used·when·changing·the·start235 <a·href="appup_cookbook.html#int_state">Appup·Cookbook</a>.</p><p><code·class="inline">update</code>·with·argument·<code·class="inline">supervisor</code>·is·used·when·changing·the·start
236 specification·of·a·supervisor.·See·<a·href="appup_cookbook.html#sup">Appup·Cookbook</a>.</p><p>When·a·module·is·to·be·updated,·the·release·handler·finds·which·processes·that236 specification·of·a·supervisor.·See·<a·href="appup_cookbook.html#sup">Appup·Cookbook</a>.</p><p>When·a·module·is·to·be·updated,·the·release·handler·finds·which·processes·that
237 are·<em>using</em>·the·module·by·traversing·the·supervision·tree·of·each·running237 are·<em>using</em>·the·module·by·traversing·the·supervision·tree·of·each·running
238 application·and·checking·all·the·child·specifications:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2422672034-1">{</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartFunc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Restart</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·222,·SHA:·4c771e33b8148e6d66b388fd5a3e2a35596f86c3655398a02d5d877e1f64f23c·...·]-1">}</span></code></pre><p>A·process·uses·a·module·if·the·name·is·listed·in·<code·class="inline">Modules</code>·in·the·child238 application·and·checking·all·the·child·specifications:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5806202895-1">{</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StartFunc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Restart</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·222,·SHA:·947d76aa62a2691c9d9580740a350a2de95bdb426220384068ebad1661356e3b·...·]-1">}</span></code></pre><p>A·process·uses·a·module·if·the·name·is·listed·in·<code·class="inline">Modules</code>·in·the·child
239 specification·for·the·process.</p><p>If·<code·class="inline">Modules=dynamic</code>,·which·is·the·case·for·event·managers,·the·event·manager239 specification·for·the·process.</p><p>If·<code·class="inline">Modules=dynamic</code>,·which·is·the·case·for·event·managers,·the·event·manager
240 process·informs·the·release·handler·about·the·list·of·currently·installed·event240 process·informs·the·release·handler·about·the·list·of·currently·installed·event
241 handlers·(<code·class="inline">gen_event</code>),·and·it·is·checked·if·the·module·name·is·in·this·list241 handlers·(<code·class="inline">gen_event</code>),·and·it·is·checked·if·the·module·name·is·in·this·list
242 instead.</p><p>The·release·handler·suspends,·asks·for·code·change,·and·resumes·processes·by242 instead.</p><p>The·release·handler·suspends,·asks·for·code·change,·and·resumes·processes·by
243 calling·the·functions·<code·class="inline">sys:suspend/1,2</code>,·<code·class="inline">sys:change_code/4,5</code>,·and243 calling·the·functions·<code·class="inline">sys:suspend/1,2</code>,·<code·class="inline">sys:change_code/4,5</code>,·and
244 <code·class="inline">sys:resume/1,2</code>,·respectively.</p><h3·id="add_module-and-delete_module"·class="section-heading">244 <code·class="inline">sys:resume/1,2</code>,·respectively.</p><h3·id="add_module-and-delete_module"·class="section-heading">
245 ··<a·href="#add_module-and-delete_module"·class="hover-link">245 ··<a·href="#add_module-and-delete_module"·class="hover-link">
246 ····<i·class="ri-link-m"·aria-hidden="true"></i>246 ····<i·class="ri-link-m"·aria-hidden="true"></i>
247 ··</a>247 ··</a>
248 ··<span·class="text">add_module·and·delete_module</span>248 ··<span·class="text">add_module·and·delete_module</span>
249 </h3>249 </h3>
250 <p>If·a·new·module·is·introduced,·the·following·instruction·is·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9596624678-1">{</span><span·class="ss">add_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data-group-id="9596624678-1">}</span></code></pre><p>This·instruction·loads·module·<code·class="inline">Module</code>.·When·running·Erlang·in250 <p>If·a·new·module·is·introduced,·the·following·instruction·is·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6098288133-1">{</span><span·class="ss">add_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data-group-id="6098288133-1">}</span></code></pre><p>This·instruction·loads·module·<code·class="inline">Module</code>.·When·running·Erlang·in
251 embedded·mode·it·is·necessary·to·use·this·this·instruction.·It·is·not251 embedded·mode·it·is·necessary·to·use·this·this·instruction.·It·is·not
252 strictly·required·when·running·Erlang·in·interactive·mode,·since·the252 strictly·required·when·running·Erlang·in·interactive·mode,·since·the
253 code·server·automatically·searches·for·and·loads·unloaded·modules.</p><p>The·opposite·of·<code·class="inline">add_module</code>·is·<code·class="inline">delete_module</code>,·which·unloads·a·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2104305508-1">{</span><span·class="nb">delete_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data-group-id="2104305508-1">}</span></code></pre><p>Any·process,·in·any·application,·with·<code·class="inline">Module</code>·as·residence·module,·is253 code·server·automatically·searches·for·and·loads·unloaded·modules.</p><p>The·opposite·of·<code·class="inline">add_module</code>·is·<code·class="inline">delete_module</code>,·which·unloads·a·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7778220051-1">{</span><span·class="nb">delete_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data-group-id="7778220051-1">}</span></code></pre><p>Any·process,·in·any·application,·with·<code·class="inline">Module</code>·as·residence·module,·is
254 killed·when·the·instruction·is·evaluated.·Therefore,·the·user·must254 killed·when·the·instruction·is·evaluated.·Therefore,·the·user·must
255 ensure·that·all·such·processes·are·terminated·before·deleting·module255 ensure·that·all·such·processes·are·terminated·before·deleting·module
256 <code·class="inline">Module</code>·to·avoid·a·situation·with·failing·supervisor·restarts.</p><h3·id="application-instructions"·class="section-heading">256 <code·class="inline">Module</code>·to·avoid·a·situation·with·failing·supervisor·restarts.</p><h3·id="application-instructions"·class="section-heading">
257 ··<a·href="#application-instructions"·class="hover-link">257 ··<a·href="#application-instructions"·class="hover-link">
258 ····<i·class="ri-link-m"·aria-hidden="true"></i>258 ····<i·class="ri-link-m"·aria-hidden="true"></i>
259 ··</a>259 ··</a>
260 ··<span·class="text">Application·Instructions</span>260 ··<span·class="text">Application·Instructions</span>
Offset 341, 60 lines modifiedOffset 341, 60 lines modified
341 <code·class="inline">.app</code>·file.</li><li>Each·<code·class="inline">UpFromVsn</code>·is·a·previous·version·of·the·application·to·upgrade·from.</li><li>Each·<code·class="inline">DownToVsn</code>·is·a·previous·version·of·the·application·to·downgrade·to.</li><li>Each·<code·class="inline">Instructions</code>·is·a·list·of·release·handling·instructions.</li></ul><p><code·class="inline">UpFromVsn</code>·and·<code·class="inline">DownToVsn</code>·can·also·be·specified·as·regular·expressions.·For341 <code·class="inline">.app</code>·file.</li><li>Each·<code·class="inline">UpFromVsn</code>·is·a·previous·version·of·the·application·to·upgrade·from.</li><li>Each·<code·class="inline">DownToVsn</code>·is·a·previous·version·of·the·application·to·downgrade·to.</li><li>Each·<code·class="inline">Instructions</code>·is·a·list·of·release·handling·instructions.</li></ul><p><code·class="inline">UpFromVsn</code>·and·<code·class="inline">DownToVsn</code>·can·also·be·specified·as·regular·expressions.·For
342 more·information·about·the·syntax·and·contents·of·the·<code·class="inline">.appup</code>·file,·see342 more·information·about·the·syntax·and·contents·of·the·<code·class="inline">.appup</code>·file,·see
343 <a·href="../../lib/sasl-4.2.2/doc/html/appup.html"><code·class="inline">appup</code></a>·in·SASL.</p><p><a·href="appup_cookbook.html">Appup·Cookbook</a>·includes·examples·of·<code·class="inline">.appup</code>·files·for343 <a·href="../../lib/sasl-4.2.2/doc/html/appup.html"><code·class="inline">appup</code></a>·in·SASL.</p><p><a·href="appup_cookbook.html">Appup·Cookbook</a>·includes·examples·of·<code·class="inline">.appup</code>·files·for
344 typical·upgrade/downgrade·cases.</p><p><em>Example:</em>·Consider·the·release·<code·class="inline">ch_rel-1</code>·from344 typical·upgrade/downgrade·cases.</p><p><em>Example:</em>·Consider·the·release·<code·class="inline">ch_rel-1</code>·from
345 <a·href="release_structure.html#ch_rel">Releases</a>.·Assume·you·want·to·add·a·function345 <a·href="release_structure.html#ch_rel">Releases</a>.·Assume·you·want·to·add·a·function
346 <code·class="inline">available/0</code>·to·server·<code·class="inline">ch3</code>,·which·returns·the·number·of·available·channels346 <code·class="inline">available/0</code>·to·server·<code·class="inline">ch3</code>,·which·returns·the·number·of·available·channels
347 (when·trying·out·the·example,·make·the·change·in·a·copy·of·the·original347 (when·trying·out·the·example,·make·the·change·in·a·copy·of·the·original
348 directory,·to·ensure·that·the·first·version·is·still·available):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2673798476-1">(</span><span·class="ss">ch3</span><span·class="p"·data-group-id="2673798476-1">)</span><span·class="p">.</span><span·class="w">348 directory,·to·ensure·that·the·first·version·is·still·available):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6713400504-1">(</span><span·class="ss">ch3</span><span·class="p"·data-group-id="6713400504-1">)</span><span·class="p">.</span><span·class="w">
349 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="2673798476-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="2673798476-2">)</span><span·class="p">.</span><span·class="w">349 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="6713400504-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="6713400504-2">)</span><span·class="p">.</span><span·class="w">
350 </span><span·class="w">350 </span><span·class="w">
351 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2673798476-3">(</span><span·class="p"·data-group-id="2673798476-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="2673798476-4">]</span><span·class="p"·data-group-id="2673798476-3">)</span><span·class="p">.</span><span·class="w">351 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6713400504-3">(</span><span·class="p"·data-group-id="6713400504-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6713400504-4">]</span><span·class="p"·data-group-id="6713400504-3">)</span><span·class="p">.</span><span·class="w">
352 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2673798476-5">(</span><span·class="p"·data-group-id="2673798476-6">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·006f33812ed1a603356217116fc4376913799a91735480cad21c71bb4ec42b0a·...·]-5">)</span><span·class="p">.</span><span·class="w">352 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6713400504-5">(</span><span·class="p"·data-group-id="6713400504-6">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·0729c82378ca715d85209469491a9609a0abbb6620317cb050ba612dccd05663·...·]-5">)</span><span·class="p">.</span><span·class="w">
353 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2673798476-7">(</span><span·class="p"·data-group-id="2673798476-8">[</span><span·class="ss">available</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="2673798476-8">]</span><span·class="p"·data-group-id="2673798476-7">)</span><span·class="p">.</span><span·class="w">353 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6713400504-7">(</span><span·class="p"·data-group-id="6713400504-8">[</span><span·class="ss">available</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6713400504-8">]</span><span·class="p"·data-group-id="6713400504-7">)</span><span·class="p">.</span><span·class="w">
354 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2673798476-9">(</span><span·class="p"·data-group-id="2673798476-10">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·256,·SHA:·be3527836dfb95f8dd1d01eeef4c183ae3a7f3d11f1d3851e02c68423a41a4ce·...·]-9">)</span><span·class="p">.</span><span·class="w">354 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6713400504-9">(</span><span·class="p"·data-group-id="6713400504-10">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·256,·SHA:·88d10defd48df234d6adc96c508b884b8bc72550ae44fda9d456be5738df8091·...·]-9">)</span><span·class="p">.</span><span·class="w">
  
355 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="2673798476-11">(</span><span·class="p"·data-group-id="2673798476-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">355 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="6713400504-11">(</span><span·class="p"·data-group-id="6713400504-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
356 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="2673798476-12">(</span><span·class="p"·data-group-id="2673798476-13">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="2673798476-13">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·407,·SHA:·fc5ffd3293790196cdf4a33e9e141d2123a211249f5dd7512acebe80a7e713f2·...·]-12">)</span><span·class="p">.</span><span·class="w">356 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="6713400504-12">(</span><span·class="p"·data-group-id="6713400504-13">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p"·data-group-id="6713400504-13">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·407,·SHA:·38c3e9a7dfedf7d83f7727d616b8426ffbc454e773d16758dd3e7a8d0afe7d83·...·]-12">)</span><span·class="p">.</span><span·class="w">
  
357 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="2673798476-16">(</span><span·class="p"·data-group-id="2673798476-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">357 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="6713400504-16">(</span><span·class="p"·data-group-id="6713400504-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
358 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="2673798476-17">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="2673798476-17">)</span><span·class="p">.</span><span·class="w">358 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="6713400504-17">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="6713400504-17">)</span><span·class="p">.</span><span·class="w">
  
359 </span><span·class="nf">free</span><span·class="p"·data-group-id="2673798476-18">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="2673798476-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">359 </span><span·class="nf">free</span><span·class="p"·data-group-id="6713400504-18">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="6713400504-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
360 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="2673798476-19">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2673798476-20">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·0ca4f2790eac70310a1820e677ffe67664b8d719b957812ded3cb3b623950263·...·]-19">)</span><span·class="p">.</span><span·class="w">360 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="6713400504-19">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6713400504-20">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·38fd86019f72135885b7d16e725ebe1d131fe6c8af27cf446b2745941f8636d3·...·]-19">)</span><span·class="p">.</span><span·class="w">
  
361 </span><span·class="nf">available</span><span·class="p"·data-group-id="2673798476-21">(</span><span·class="p"·data-group-id="2673798476-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">361 </span><span·class="nf">available</span><span·class="p"·data-group-id="6713400504-21">(</span><span·class="p"·data-group-id="6713400504-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
362 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="2673798476-22">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">available</span><span·class="p"·data-group-id="2673798476-22">)</span><span·class="p">.</span><span·class="w">362 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="6713400504-22">(</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">available</span><span·class="p"·data-group-id="6713400504-22">)</span><span·class="p">.</span><span·class="w">
  
363 </span><span·class="nf">init</span><span·class="p"·data-group-id="2673798476-23">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="2673798476-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">363 </span><span·class="nf">init</span><span·class="p"·data-group-id="6713400504-23">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="6713400504-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
364 ····</span><span·class="p"·data-group-id="2673798476-24">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="2673798476-25">(</span><span·class="p"·data-group-id="2673798476-25">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·cbd17da53b26f1f0f0de2c4e4019a4942f74cf586f67420ecfd4117a0532d2a9·...·]-24">}</span><span·class="p">.</span><span·class="w">364 ····</span><span·class="p"·data-group-id="6713400504-24">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="6713400504-25">(</span><span·class="p"·data-group-id="6713400504-25">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·cfe74b29e798a71f055d257cf673974381da1415a7fd3b29a6444379301bbc4e·...·]-24">}</span><span·class="p">.</span><span·class="w">
  
365 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="2673798476-26">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·66b3950919a3021c3086013aa23238efd1b9f1af33e892105f0a049e06516442·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">365 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="6713400504-26">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·42d5176c9120d789e034bd2233f1a94c6bcfc887d91c8e3b16f24061e5da8e41·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
366 ····</span><span·class="p"·data-group-id="2673798476-27">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="2673798476-27">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·143,·SHA:·c914858671912cc5b44e7c4ea810d4c27ed890b01e24fe48e61f58e17c7488e1·...·]-28">)</span><span·class="p">,</span><span·class="w">366 ····</span><span·class="p"·data-group-id="6713400504-27">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="6713400504-27">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·143,·SHA:·c2acb55bdd30b4fad41927d984c86d1fc44c312f852b57c98ac52f48938c5b39·...·]-28">)</span><span·class="p">,</span><span·class="w">
367 ····</span><span·class="p"·data-group-id="2673798476-29">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="2673798476-29">}</span><span·class="p">;</span><span·class="w">367 ····</span><span·class="p"·data-group-id="6713400504-29">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="6713400504-29">}</span><span·class="p">;</span><span·class="w">
368 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="2673798476-30">(</span><span·class="ss">available</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·14,·SHA:·5f5ae2e7d3c8d1d51a0b53c8a956e3586420d79f302300382b78141f5e65b7a1·...·]-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">368 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="6713400504-30">(</span><span·class="ss">available</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·14,·SHA:·477d51a993c59eeb573cd2a88b78f81b91456fca5abef6ffdbc679ac019f4794·...·]-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
369 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">available</span><span·class="p"·data-group-id="2673798476-31">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="2673798476-31">)</span><span·class="p">,</span><span·class="w">369 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">available</span><span·class="p"·data-group-id="6713400504-31">(</span><span·class="n">Chs</span><span·class="p"·data-group-id="6713400504-31">)</span><span·class="p">,</span><span·class="w">
370 ····</span><span·class="p"·data-group-id="2673798476-32">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="2673798476-32">}</span><span·class="p">.</span><span·class="w">370 ····</span><span·class="p"·data-group-id="6713400504-32">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="6713400504-32">}</span><span·class="p">.</span><span·class="w">
  
371 </span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="2673798476-33">(</span><span·class="p"·data-group-id="2673798476-34">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="2673798476-34">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·91,·SHA:·fb3ad87eceede6cfb6723ad18424ce41d320ebb725558925cbea7f0f36d74196·...·]-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">371 </span><span·class="nf">handle_cast</span><span·class="p"·data-group-id="6713400504-33">(</span><span·class="p"·data-group-id="6713400504-34">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="6713400504-34">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·91,·SHA:·ebd2b0a442da2c83e71fa9b5c62ef5de4def40dcd88c390ab70f942577044d83·...·]-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
372 ····</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="2673798476-35">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="2673798476-35">)</span><span·class="p">,</span><span·class="w">372 ····</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="6713400504-35">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="6713400504-35">)</span><span·class="p">,</span><span·class="w">
373 ····</span><span·class="p"·data-group-id="2673798476-36">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="2673798476-36">}</span><span·class="p">.</span></code></pre><p>A·new·version·of·the·<code·class="inline">ch_app.app</code>·file·must·now·be·created,·where·the·version·is373 ····</span><span·class="p"·data-group-id="6713400504-36">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="6713400504-36">}</span><span·class="p">.</span></code></pre><p>A·new·version·of·the·<code·class="inline">ch_app.app</code>·file·must·now·be·created,·where·the·version·is
374 updated:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9210764095-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">374 updated:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9086911748-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">
375 ·</span><span·class="p"·data-group-id="9210764095-2">[</span><span·class="p"·data-group-id="9210764095-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="9210764095-3">}</span><span·class="p">,</span><span·class="w">375 ·</span><span·class="p"·data-group-id="9086911748-2">[</span><span·class="p"·data-group-id="9086911748-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="9086911748-3">}</span><span·class="p">,</span><span·class="w">
376 ··</span><span·class="p"·data-group-id="9210764095-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2&quot;</span><span·class="p"·data-group-id="9210764095-4">}</span><span·class="p">,</span><span·class="w">376 ··</span><span·class="p"·data-group-id="9086911748-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2&quot;</span><span·class="p"·data-group-id="9086911748-4">}</span><span·class="p">,</span><span·class="w">
377 ··</span><span·class="p"·data-group-id="9210764095-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9210764095-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup</[·...·truncated·by·diffoscope;·len:·174,·SHA:·d6a7011cb2e7b475f0a0fad7006c716168bef1acbc672e85776b58fcdddaa3f1·...·]-5">}</span><span·class="p">,</span><span·class="w">377 ··</span><span·class="p"·data-group-id="9086911748-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9086911748-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup</[·...·truncated·by·diffoscope;·len:·174,·SHA:·75ef8550c9ef850576e5ded0787bece9d1004333b762d607f4b7e6c8b32cb9e0·...·]-5">}</span><span·class="p">,</span><span·class="w">
378 ··</span><span·class="p"·data-group-id="9210764095-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9210764095-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="9210764095-8">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·c58a15c93c72183410d3349ecf3a62655c65235c2d6a3ead375e1ef95703108a·...·]-7">}</span><span·class="p">,</span><span·class="w">378 ··</span><span·class="p"·data-group-id="9086911748-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9086911748-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="9086911748-8">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·e687862f2bc4154d8390c53e77a8219d6292adfdb77b3ee62bd0dd5e2342f044·...·]-7">}</span><span·class="p">,</span><span·class="w">
379 ··</span><span·class="p"·data-group-id="9210764095-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9210764095-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">st[·...·truncated·by·diffoscope;·len:·182,·SHA:·a21ee124a8fc73e35478cd9627e3de59a74fcadb92497117ceb78d734700e81d·...·]-9">}</span><span·class="p">,</span><span·class="w">379 ··</span><span·class="p"·data-group-id="9086911748-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9086911748-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">st[·...·truncated·by·diffoscope;·len:·182,·SHA:·f50d8926d9a51b9c50ca71a76b22b2cec482d8b59c99ed150b39a6449e3a0ee0·...·]-9">}</span><span·class="p">,</span><span·class="w">
380 ··</span><span·class="p"·data-group-id="9210764095-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9210764095-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="9210764095-13">[</sp[·...·truncated·by·diffoscope;·len:·152,·SHA:·6a272278ca6061fdb63cb8d453877ccd9a45a0f89362a9dc41ffb93edc40b44e·...·]-11">}</span><span·class="w">380 ··</span><span·class="p"·data-group-id="9086911748-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9086911748-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="9086911748-13">[</sp[·...·truncated·by·diffoscope;·len:·152,·SHA:·f1e0a345fa0ef0afcf051caaf260cbf1a04670cd8dc02dfef870259e0871ad29·...·]-11">}</span><span·class="w">
381 ·</span><span·class="p"·data-group-id="9210764095-2">]</span><span·class="p"·data-group-id="9210764095-1">}</span><span·class="p">.</span></code></pre><p>To·upgrade·<code·class="inline">ch_app</code>·from·<code·class="inline">&quot;1&quot;</code>·to·<code·class="inline">&quot;2&quot;</code>·(and·to·downgrade·from·<code·class="inline">&quot;2&quot;</code>·to·<code·class="inline">&quot;1&quot;</code>),381 ·</span><span·class="p"·data-group-id="9086911748-2">]</span><span·class="p"·data-group-id="9086911748-1">}</span><span·class="p">.</span></code></pre><p>To·upgrade·<code·class="inline">ch_app</code>·from·<code·class="inline">&quot;1&quot;</code>·to·<code·class="inline">&quot;2&quot;</code>·(and·to·downgrade·from·<code·class="inline">&quot;2&quot;</code>·to·<code·class="inline">&quot;1&quot;</code>),
382 you·only·need·to·load·the·new·(old)·version·of·the·<code·class="inline">ch3</code>·callback·module.·Create382 you·only·need·to·load·the·new·(old)·version·of·the·<code·class="inline">ch3</code>·callback·module.·Create
383 the·application·upgrade·file·<code·class="inline">ch_app.appup</code>·in·the·<code·class="inline">ebin</code>·directory:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8453065558-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">383 the·application·upgrade·file·<code·class="inline">ch_app.appup</code>·in·the·<code·class="inline">ebin</code>·directory:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8791493430-1">{</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">
384 ·</span><span·class="p"·data-group-id="8453065558-2">[</span><span·class="p"·data-group-id="8453065558-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8453065558-4">[</span><span·class="p"·data-group-id="8453065558-5">[·...·truncated·by·diffoscope;·len:·318,·SHA:·6f32ac7609336026d64a0428bb68366ad6c662471d0b68191661db96df3299e5·...·]-2">]</span><span·class="p">,</span><span·class="w">384 ·</span><span·class="p"·data-group-id="8791493430-2">[</span><span·class="p"·data-group-id="8791493430-3">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8791493430-4">[</span><span·class="p"·data-group-id="8791493430-5">[·...·truncated·by·diffoscope;·len:·318,·SHA:·bc73950adef3145e8f3e2863c9fbd5b25b46a1be627dc4c3cce3928a07614783·...·]-2">]</span><span·class="p">,</span><span·class="w">
385 ·</span><span·class="p"·data-group-id="8453065558-6">[</span><span·class="p"·data-group-id="8453065558-7">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8453065558-8">[</span><span·class="p"·data-group-id="8453065558-9">[·...·truncated·by·diffoscope;·len:·318,·SHA:·f435bbd0e13a65cf12df7238c211d5b489c2d316c7203cd1be035100d157ee89·...·]-6">]</span><span·class="w">385 ·</span><span·class="p"·data-group-id="8791493430-6">[</span><span·class="p"·data-group-id="8791493430-7">{</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8791493430-8">[</span><span·class="p"·data-group-id="8791493430-9">[·...·truncated·by·diffoscope;·len:·318,·SHA:·8f34d1b2920c8bda94278946bcb210ed3310d21c112a8700a1b65cd466bb7b01·...·]-6">]</span><span·class="w">
386 </span><span·class="p"·data-group-id="8453065558-1">}</span><span·class="p">.</span></code></pre><p><a·href=""·id="relup"></a></p><h2·id="release-upgrade-file"·class="section-heading">386 </span><span·class="p"·data-group-id="8791493430-1">}</span><span·class="p">.</span></code></pre><p><a·href=""·id="relup"></a></p><h2·id="release-upgrade-file"·class="section-heading">
387 ··<a·href="#release-upgrade-file"·class="hover-link">387 ··<a·href="#release-upgrade-file"·class="hover-link">
388 ····<i·class="ri-link-m"·aria-hidden="true"></i>388 ····<i·class="ri-link-m"·aria-hidden="true"></i>
389 ··</a>389 ··</a>
390 ··<span·class="text">Release·Upgrade·File</span>390 ··<span·class="text">Release·Upgrade·File</span>
391 </h2>391 </h2>
392 <p>To·define·how·to·upgrade/downgrade·between·the·new·version·and·previous·versions392 <p>To·define·how·to·upgrade/downgrade·between·the·new·version·and·previous·versions
393 of·a·release,·a·<em>release·upgrade·file</em>,·or·in·short·<code·class="inline">.relup</code>·file,·is·to·be393 of·a·release,·a·<em>release·upgrade·file</em>,·or·in·short·<code·class="inline">.relup</code>·file,·is·to·be
Offset 405, 22 lines modifiedOffset 405, 22 lines modified
405 are·to·be·added·and·deleted,·and·which·applications·that·must·be·upgraded·and/or405 are·to·be·added·and·deleted,·and·which·applications·that·must·be·upgraded·and/or
406 downgraded.·The·instructions·for·this·are·fetched·from·the·<code·class="inline">.appup</code>·files·and406 downgraded.·The·instructions·for·this·are·fetched·from·the·<code·class="inline">.appup</code>·files·and
407 transformed·into·a·single·list·of·low-level·instructions·in·the·right·order.</p><p>If·the·<code·class="inline">relup</code>·file·is·relatively·simple,·it·can·be·created·manually.·It·is·only407 transformed·into·a·single·list·of·low-level·instructions·in·the·right·order.</p><p>If·the·<code·class="inline">relup</code>·file·is·relatively·simple,·it·can·be·created·manually.·It·is·only
408 to·contain·low-level·instructions.</p><p>For·details·about·the·syntax·and·contents·of·the·release·upgrade·file,·see408 to·contain·low-level·instructions.</p><p>For·details·about·the·syntax·and·contents·of·the·release·upgrade·file,·see
409 <a·href="../../lib/sasl-4.2.2/doc/html/relup.html"><code·class="inline">relup</code></a>·in·SASL.</p><p><em>Example,·continued·from·the·previous·section:</em>·You·have·a·new·version·&quot;2&quot;·of409 <a·href="../../lib/sasl-4.2.2/doc/html/relup.html"><code·class="inline">relup</code></a>·in·SASL.</p><p><em>Example,·continued·from·the·previous·section:</em>·You·have·a·new·version·&quot;2&quot;·of
410 <code·class="inline">ch_app</code>·and·an·<code·class="inline">.appup</code>·file.·A·new·version·of·the·<code·class="inline">.rel</code>·file·is·also·needed.410 <code·class="inline">ch_app</code>·and·an·<code·class="inline">.appup</code>·file.·A·new·version·of·the·<code·class="inline">.rel</code>·file·is·also·needed.
411 This·time·the·file·is·called·<code·class="inline">ch_rel-2.rel</code>·and·the·release·version·string·is411 This·time·the·file·is·called·<code·class="inline">ch_rel-2.rel</code>·and·the·release·version·string·is
412 changed·from·&quot;A&quot;·to·&quot;B&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9843283844-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">412 changed·from·&quot;A&quot;·to·&quot;B&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3912898858-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">
413 ·</span><span·class="p"·data-group-id="9843283844-2">{</span><span·class="s">&quot;ch_rel&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;B&quot;</span><span·class="p"·data-group-id="9843283844-2">}</span><span·class="p">,</span><span·class="w">413 ·</span><span·class="p"·data-group-id="3912898858-2">{</span><span·class="s">&quot;ch_rel&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;B&quot;</span><span·class="p"·data-group-id="3912898858-2">}</span><span·class="p">,</span><span·class="w">
414 ·</span><span·class="p"·data-group-id="9843283844-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;14.2.5&quot;</span><span·class="p"·data-group-id="9843283844-3">}</span><span·class="p">,</span><span·class="w">414 ·</span><span·class="p"·data-group-id="3912898858-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;14.2.5&quot;</span><span·class="p"·data-group-id="3912898858-3">}</span><span·class="p">,</span><span·class="w">
415 ·</span><span·class="p"·data-group-id="9843283844-4">[</span><span·class="p"·data-group-id="9843283844-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;9.2.4&quot;</span><span·class="p"·data-group-id="9843283844-5">}</span><span·class="p">,</span><span·class="w">415 ·</span><span·class="p"·data-group-id="3912898858-4">[</span><span·class="p"·data-group-id="3912898858-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;9.2.4&quot;</span><span·class="p"·data-group-id="3912898858-5">}</span><span·class="p">,</span><span·class="w">
416 ··</span><span·class="p"·data-group-id="9843283844-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.2.3&quot;</span><span·class="p"·data-group-id="9843283844-6">}</span><span·class="p">,</span><span·class="w">416 ··</span><span·class="p"·data-group-id="3912898858-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.2.3&quot;</span><span·class="p"·data-group-id="3912898858-6">}</span><span·class="p">,</span><span·class="w">
417 ··</span><span·class="p"·data-group-id="9843283844-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.2.1&quot;</span><span·class="p"·data-group-id="9843283844-7">}</span><span·class="p">,</span><span·class="w">417 ··</span><span·class="p"·data-group-id="3912898858-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.2.1&quot;</span><span·class="p"·data-group-id="3912898858-7">}</span><span·class="p">,</span><span·class="w">
418 ··</span><span·class="p"·data-group-id="9843283844-8">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2&quot;</span><span·class="p"·data-group-id="9843283844-8">}</span><span·class="p"·data-group-id="9843283844-4">]</span><span·class="w">418 ··</span><span·class="p"·data-group-id="3912898858-8">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2&quot;</span><span·class="p"·data-group-id="3912898858-8">}</span><span·class="p"·data-group-id="3912898858-4">]</span><span·class="w">
419 </span><span·class="p"·data-group-id="9843283844-1">}</span><span·class="p">.</span></code></pre><p>Now·the·<code·class="inline">relup</code>·file·can·be·generated:</p><pre><code·class="text">1&gt;·systools:make_relup(&quot;ch_rel-2&quot;,·[&quot;ch_rel-1&quot;],·[&quot;ch_rel-1&quot;]).419 </span><span·class="p"·data-group-id="3912898858-1">}</span><span·class="p">.</span></code></pre><p>Now·the·<code·class="inline">relup</code>·file·can·be·generated:</p><pre><code·class="text">1&gt;·systools:make_relup(&quot;ch_rel-2&quot;,·[&quot;ch_rel-1&quot;],·[&quot;ch_rel-1&quot;]).
420 ok</code></pre><p>This·generates·a·<code·class="inline">relup</code>·file·with·instructions·for·how·to·upgrade·from·version420 ok</code></pre><p>This·generates·a·<code·class="inline">relup</code>·file·with·instructions·for·how·to·upgrade·from·version
421 &quot;A&quot;·(&quot;ch_rel-1&quot;)·to·version·&quot;B&quot;·(&quot;ch_rel-2&quot;)·and·how·to·downgrade·from·version421 &quot;A&quot;·(&quot;ch_rel-1&quot;)·to·version·&quot;B&quot;·(&quot;ch_rel-2&quot;)·and·how·to·downgrade·from·version
422 &quot;B&quot;·to·version·&quot;A&quot;.</p><p>Both·the·old·and·new·versions·of·the·<code·class="inline">.app</code>·and·<code·class="inline">.rel</code>·files·must·be·in·the·code422 &quot;B&quot;·to·version·&quot;A&quot;.</p><p>Both·the·old·and·new·versions·of·the·<code·class="inline">.app</code>·and·<code·class="inline">.rel</code>·files·must·be·in·the·code
423 path,·as·well·as·the·<code·class="inline">.appup</code>·and·(new)·<code·class="inline">.beam</code>·files.·The·code·path·can·be423 path,·as·well·as·the·<code·class="inline">.appup</code>·and·(new)·<code·class="inline">.beam</code>·files.·The·code·path·can·be
424 extended·by·using·the·option·<code·class="inline">path</code>:</p><pre><code·class="text">1&gt;·systools:make_relup(&quot;ch_rel-2&quot;,·[&quot;ch_rel-1&quot;],·[&quot;ch_rel-1&quot;],424 extended·by·using·the·option·<code·class="inline">path</code>:</p><pre><code·class="text">1&gt;·systools:make_relup(&quot;ch_rel-2&quot;,·[&quot;ch_rel-1&quot;],·[&quot;ch_rel-1&quot;],
425 [{path,[&quot;../ch_rel-1&quot;,425 [{path,[&quot;../ch_rel-1&quot;,
426 &quot;../ch_rel-1/lib/ch_app-1/ebin&quot;]}]).426 &quot;../ch_rel-1/lib/ch_app-1/ebin&quot;]}]).
Offset 433, 25 lines modifiedOffset 433, 25 lines modified
433 <p>When·you·have·made·a·new·version·of·a·release,·a·release·package·can·be·created433 <p>When·you·have·made·a·new·version·of·a·release,·a·release·package·can·be·created
434 with·this·new·version·and·transferred·to·the·target·environment.</p><p>To·install·the·new·version·of·the·release·in·runtime,·the·<em>release434 with·this·new·version·and·transferred·to·the·target·environment.</p><p>To·install·the·new·version·of·the·release·in·runtime,·the·<em>release
435 handler</em>·is·used.·This·is·a·process·belonging·to·the·SASL·application,435 handler</em>·is·used.·This·is·a·process·belonging·to·the·SASL·application,
Max diff block lines reached; 22466/68954 bytes (32.58%) of diff not shown.
18.1 KB
./usr/share/doc/erlang-doc/html/doc/system/release_structure.html
    
Offset 136, 37 lines modifiedOffset 136, 37 lines modified
136 ··<a·href="#release-resource-file"·class="hover-link">136 ··<a·href="#release-resource-file"·class="hover-link">
137 ····<i·class="ri-link-m"·aria-hidden="true"></i>137 ····<i·class="ri-link-m"·aria-hidden="true"></i>
138 ··</a>138 ··</a>
139 ··<span·class="text">Release·Resource·File</span>139 ··<span·class="text">Release·Resource·File</span>
140 </h2>140 </h2>
141 <p>To·define·a·release,·create·a·<em>release·resource·file</em>,·or·in·short·a·<code·class="inline">.rel</code>141 <p>To·define·a·release,·create·a·<em>release·resource·file</em>,·or·in·short·a·<code·class="inline">.rel</code>
142 file.·In·the·file,·specify·the·name·and·version·of·the·release,·which·ERTS142 file.·In·the·file,·specify·the·name·and·version·of·the·release,·which·ERTS
143 version·it·is·based·on,·and·which·applications·it·consists·of:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6144471126-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6144471126-2">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="n">Vsn</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·273,·SHA:·c87f2329f1fb84cd1370eadc9e96878499762009d6aba641a603b10b60148814·...·]-3">}</span><span·class="p">,</span><span·class="w">143 version·it·is·based·on,·and·which·applications·it·consists·of:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2562416920-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2562416920-2">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="n">Vsn</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·273,·SHA:·22ad62b17aeac90999080687f959c1094a9681157e6f53ce9695ef0981888342·...·]-3">}</span><span·class="p">,</span><span·class="w">
144 ·</span><span·class="p"·data-group-id="6144471126-4">[</span><span·class="p"·data-group-id="6144471126-5">{</span><span·class="n">Application1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn1</span><span·class="p"·data-group-id="6144471126-5">}</span><span·class="p">,</span><span·class="w">144 ·</span><span·class="p"·data-group-id="2562416920-4">[</span><span·class="p"·data-group-id="2562416920-5">{</span><span·class="n">Application1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn1</span><span·class="p"·data-group-id="2562416920-5">}</span><span·class="p">,</span><span·class="w">
145 ···</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">145 ···</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
146 ··</span><span·class="p"·data-group-id="6144471126-6">{</span><span·class="n">ApplicationN</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsnN</span><span·class="p"·data-group-id="6144471126-6">}</span><span·class="p"·data-group-id="6144471126-4">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·437dc7f928da3c4f234476621568a3fb11f62a25d7809ec2576e7a121cfeec3b·...·]-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">Name</code>,·<code·class="inline">Vsn</code>,·<code·class="inline">EVsn</code>,·and·<code·class="inline">AppVsn</code>·are·strings.</p><p>The·file·must·be·named·<code·class="inline">Rel.rel</code>,·where·<code·class="inline">Rel</code>·is·a·unique·name.</p><p>Each·<code·class="inline">Application</code>·(atom)·and·<code·class="inline">AppVsn</code>·is·the·name·and·version·of·an·application146 ··</span><span·class="p"·data-group-id="2562416920-6">{</span><span·class="n">ApplicationN</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsnN</span><span·class="p"·data-group-id="2562416920-6">}</span><span·class="p"·data-group-id="2562416920-4">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·cf4017ba61f29955bf86e91956643cd911cb6fc9577db58c61df8663a78e1fd5·...·]-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">Name</code>,·<code·class="inline">Vsn</code>,·<code·class="inline">EVsn</code>,·and·<code·class="inline">AppVsn</code>·are·strings.</p><p>The·file·must·be·named·<code·class="inline">Rel.rel</code>,·where·<code·class="inline">Rel</code>·is·a·unique·name.</p><p>Each·<code·class="inline">Application</code>·(atom)·and·<code·class="inline">AppVsn</code>·is·the·name·and·version·of·an·application
147 included·in·the·release.·The·minimal·release·based·on·Erlang/OTP·consists·of·the147 included·in·the·release.·The·minimal·release·based·on·Erlang/OTP·consists·of·the
148 Kernel·and·STDLIB·applications,·so·these·applications·must·be·included·in·the148 Kernel·and·STDLIB·applications,·so·these·applications·must·be·included·in·the
149 list.</p><p>If·the·release·is·to·be·upgraded,·it·must·also·include·the·SASL·application.</p><p><a·href=""·id="ch_rel"></a></p><p>Here·is·an·example·showing·the·<code·class="inline">.app</code>·file·for·a·release·of·<code·class="inline">ch_app</code>·from149 list.</p><p>If·the·release·is·to·be·upgraded,·it·must·also·include·the·SASL·application.</p><p><a·href=""·id="ch_rel"></a></p><p>Here·is·an·example·showing·the·<code·class="inline">.app</code>·file·for·a·release·of·<code·class="inline">ch_app</code>·from
150 the·<a·href="applications.html#ch_app">Applications</a>·section:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8949386009-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">150 the·<a·href="applications.html#ch_app">Applications</a>·section:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1192698168-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">
151 ·</span><span·class="p"·data-group-id="8949386009-2">[</span><span·class="p"·data-group-id="8949386009-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="8949386009-3">}</span><span·class="p">,</span><span·class="w">151 ·</span><span·class="p"·data-group-id="1192698168-2">[</span><span·class="p"·data-group-id="1192698168-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Channel·allocator&quot;</span><span·class="p"·data-group-id="1192698168-3">}</span><span·class="p">,</span><span·class="w">
152 ··</span><span·class="p"·data-group-id="8949386009-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="8949386009-4">}</span><span·class="p">,</span><span·class="w">152 ··</span><span·class="p"·data-group-id="1192698168-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="1192698168-4">}</span><span·class="p">,</span><span·class="w">
153 ··</span><span·class="p"·data-group-id="8949386009-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8949386009-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup<[·...·truncated·by·diffoscope;·len:·175,·SHA:·f596748f6c9bfd73e321a94a03768c4d7f6db3ac3d3098b16bc7a9ab02065ac0·...·]-5">}</span><span·class="p">,</span><span·class="w">153 ··</span><span·class="p"·data-group-id="1192698168-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1192698168-6">[</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ch_sup<[·...·truncated·by·diffoscope;·len:·175,·SHA:·d0f946f54aff0dcdcbfc10d31aa8d69eadd7fba0c2f6b789e62496d4fe287031·...·]-5">}</span><span·class="p">,</span><span·class="w">
154 ··</span><span·class="p"·data-group-id="8949386009-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8949386009-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="8949386009-8">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·12e94f9db0e6963bc572e937b2c08989c3b44f93fe25a56ced03351164d6e5b0·...·]-7">}</span><span·class="p">,</span><span·class="w">154 ··</span><span·class="p"·data-group-id="1192698168-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1192698168-8">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="1192698168-8">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·7648981010dbd5b6e90329af2bc0f52ca15cb4c7dee95165a704b01b5468b0f0·...·]-7">}</span><span·class="p">,</span><span·class="w">
155 ··</span><span·class="p"·data-group-id="8949386009-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8949386009-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·183,·SHA:·5171828b6c04d73714ce2cdd3f7f57dcc0a47d75a21c6b1d011e9d10984b9ad5·...·]-9">}</span><span·class="p">,</span><span·class="w">155 ··</span><span·class="p"·data-group-id="1192698168-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1192698168-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·183,·SHA:·5a0a23f4f7cd417f36943ebf4cf993b42a8a1b9b758503ba4af214d5ab5dde98·...·]-9">}</span><span·class="p">,</span><span·class="w">
156 ··</span><span·class="p"·data-group-id="8949386009-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8949386009-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="8949386009-13">[</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·9652dfb097536d5ce3ae8196a12d8e99d716624c2f29d7d880f9b1991bcfd146·...·]-11">}</span><span·class="w">156 ··</span><span·class="p"·data-group-id="1192698168-11">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1192698168-12">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="p"·data-group-id="1192698168-13">[</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·3655c9a372107a2d569f0fdb674a2548f6609b3d7ff77ea59f0459af9134c82c·...·]-11">}</span><span·class="w">
157 ·</span><span·class="p"·data-group-id="8949386009-2">]</span><span·class="p"·data-group-id="8949386009-1">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">.rel</code>·file·must·also·contain·<code·class="inline">kernel</code>,·<code·class="inline">stdlib</code>,·and·<code·class="inline">sasl</code>,·as·these157 ·</span><span·class="p"·data-group-id="1192698168-2">]</span><span·class="p"·data-group-id="1192698168-1">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">.rel</code>·file·must·also·contain·<code·class="inline">kernel</code>,·<code·class="inline">stdlib</code>,·and·<code·class="inline">sasl</code>,·as·these
158 applications·are·required·by·<code·class="inline">ch_app</code>.·The·file·is·called·<code·class="inline">ch_rel-1.rel</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1627349102-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">158 applications·are·required·by·<code·class="inline">ch_app</code>.·The·file·is·called·<code·class="inline">ch_rel-1.rel</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6381360076-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">
159 ·</span><span·class="p"·data-group-id="1627349102-2">{</span><span·class="s">&quot;ch_rel&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;A&quot;</span><span·class="p"·data-group-id="1627349102-2">}</span><span·class="p">,</span><span·class="w">159 ·</span><span·class="p"·data-group-id="6381360076-2">{</span><span·class="s">&quot;ch_rel&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;A&quot;</span><span·class="p"·data-group-id="6381360076-2">}</span><span·class="p">,</span><span·class="w">
160 ·</span><span·class="p"·data-group-id="1627349102-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;14.2.5&quot;</span><span·class="p"·data-group-id="1627349102-3">}</span><span·class="p">,</span><span·class="w">160 ·</span><span·class="p"·data-group-id="6381360076-3">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;14.2.5&quot;</span><span·class="p"·data-group-id="6381360076-3">}</span><span·class="p">,</span><span·class="w">
161 ·</span><span·class="p"·data-group-id="1627349102-4">[</span><span·class="p"·data-group-id="1627349102-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;9.2.4&quot;</span><span·class="p"·data-group-id="1627349102-5">}</span><span·class="p">,</span><span·class="w">161 ·</span><span·class="p"·data-group-id="6381360076-4">[</span><span·class="p"·data-group-id="6381360076-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;9.2.4&quot;</span><span·class="p"·data-group-id="6381360076-5">}</span><span·class="p">,</span><span·class="w">
162 ··</span><span·class="p"·data-group-id="1627349102-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.2.3&quot;</span><span·class="p"·data-group-id="1627349102-6">}</span><span·class="p">,</span><span·class="w">162 ··</span><span·class="p"·data-group-id="6381360076-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.2.3&quot;</span><span·class="p"·data-group-id="6381360076-6">}</span><span·class="p">,</span><span·class="w">
163 ··</span><span·class="p"·data-group-id="1627349102-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.2.1&quot;</span><span·class="p"·data-group-id="1627349102-7">}</span><span·class="p">,</span><span·class="w">163 ··</span><span·class="p"·data-group-id="6381360076-7">{</span><span·class="ss">sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.2.1&quot;</span><span·class="p"·data-group-id="6381360076-7">}</span><span·class="p">,</span><span·class="w">
164 ··</span><span·class="p"·data-group-id="1627349102-8">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="1627349102-8">}</span><span·class="p"·data-group-id="1627349102-4">]</span><span·class="w">164 ··</span><span·class="p"·data-group-id="6381360076-8">{</span><span·class="ss">ch_app</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="6381360076-8">}</span><span·class="p"·data-group-id="6381360076-4">]</span><span·class="w">
165 </span><span·class="p"·data-group-id="1627349102-1">}</span><span·class="p">.</span></code></pre><p><a·href=""·id="boot"></a></p><h2·id="generating-boot-scripts"·class="section-heading">165 </span><span·class="p"·data-group-id="6381360076-1">}</span><span·class="p">.</span></code></pre><p><a·href=""·id="boot"></a></p><h2·id="generating-boot-scripts"·class="section-heading">
166 ··<a·href="#generating-boot-scripts"·class="hover-link">166 ··<a·href="#generating-boot-scripts"·class="hover-link">
167 ····<i·class="ri-link-m"·aria-hidden="true"></i>167 ····<i·class="ri-link-m"·aria-hidden="true"></i>
168 ··</a>168 ··</a>
169 ··<span·class="text">Generating·Boot·Scripts</span>169 ··<span·class="text">Generating·Boot·Scripts</span>
170 </h2>170 </h2>
171 <p><a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·in·the·SASL·application·includes·tools·to·build·and·check171 <p><a·href="../../lib/sasl-4.2.2/doc/html/systools.html"><code·class="inline">systools</code></a>·in·the·SASL·application·includes·tools·to·build·and·check
172 releases.·The·functions·read·the·<code·class="inline">.rel</code>·and·<code·class="inline">.app</code>·files·and·perform172 releases.·The·functions·read·the·<code·class="inline">.rel</code>·and·<code·class="inline">.app</code>·files·and·perform
Offset 190, 17 lines modifiedOffset 190, 17 lines modified
190 ··<a·href="#creating-a-release-package"·class="hover-link">190 ··<a·href="#creating-a-release-package"·class="hover-link">
191 ····<i·class="ri-link-m"·aria-hidden="true"></i>191 ····<i·class="ri-link-m"·aria-hidden="true"></i>
192 ··</a>192 ··</a>
193 ··<span·class="text">Creating·a·Release·Package</span>193 ··<span·class="text">Creating·a·Release·Package</span>
194 </h2>194 </h2>
195 <p>The·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html#make_tar/2"><code·class="inline">systools:make_tar/1,2</code></a>·function·takes·a195 <p>The·<a·href="../../lib/sasl-4.2.2/doc/html/systools.html#make_tar/2"><code·class="inline">systools:make_tar/1,2</code></a>·function·takes·a
196 <code·class="inline">.rel</code>·file·as·input·and·creates·a·zipped·tar·file·with·the·code·for196 <code·class="inline">.rel</code>·file·as·input·and·creates·a·zipped·tar·file·with·the·code·for
197 the·specified·applications,·a·<em>release·package</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">systools</span><span·class="p">:</span><span·class="nf">make_script</span><span·class="p"·data-group-id="9654186722-1">(</span><span·class="s">&quot;ch_rel-1&quot;</span><span·class="p"·data-group-id="9654186722-1">)</span><span·class="p">.</span><span·class="w">197 the·specified·applications,·a·<em>release·package</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">systools</span><span·class="p">:</span><span·class="nf">make_script</span><span·class="p"·data-group-id="6160977232-1">(</span><span·class="s">&quot;ch_rel-1&quot;</span><span·class="p"·data-group-id="6160977232-1">)</span><span·class="p">.</span><span·class="w">
198 </span><span·class="ss">ok</span><span·class="gp·unselectable">198 </span><span·class="ss">ok</span><span·class="gp·unselectable">
199 2&gt;·</span><span·class="nc">systools</span><span·class="p">:</span><span·class="nf">make_tar</span><span·class="p"·data-group-id="9654186722-2">(</span><span·class="s">&quot;ch_rel-1&quot;</span><span·class="p"·data-group-id="9654186722-2">)</span><span·class="p">.</span><span·class="w">199 2&gt;·</span><span·class="nc">systools</span><span·class="p">:</span><span·class="nf">make_tar</span><span·class="p"·data-group-id="6160977232-2">(</span><span·class="s">&quot;ch_rel-1&quot;</span><span·class="p"·data-group-id="6160977232-2">)</span><span·class="p">.</span><span·class="w">
200 </span><span·class="ss">ok</span></code></pre><p>The·release·package·by·default·contains:</p><ul><li>The·<code·class="inline">.app</code>·files</li><li>The·<code·class="inline">.rel</code>·file</li><li>The·object·code·for·all·applications,·structured·according·to·the200 </span><span·class="ss">ok</span></code></pre><p>The·release·package·by·default·contains:</p><ul><li>The·<code·class="inline">.app</code>·files</li><li>The·<code·class="inline">.rel</code>·file</li><li>The·object·code·for·all·applications,·structured·according·to·the
201 <a·href="applications.html#app_dir">application·directory·structure</a></li><li>The·binary·boot·script·renamed·to·<code·class="inline">start.boot</code></li></ul><pre><code·class="text">%·tar·tf·ch_rel-1.tar201 <a·href="applications.html#app_dir">application·directory·structure</a></li><li>The·binary·boot·script·renamed·to·<code·class="inline">start.boot</code></li></ul><pre><code·class="text">%·tar·tf·ch_rel-1.tar
202 lib/kernel-9.2.4/ebin/kernel.app202 lib/kernel-9.2.4/ebin/kernel.app
203 lib/kernel-9.2.4/ebin/application.beam203 lib/kernel-9.2.4/ebin/application.beam
204 ...204 ...
205 lib/stdlib-5.2.3/ebin/stdlib.app205 lib/stdlib-5.2.3/ebin/stdlib.app
206 lib/stdlib-5.2.3/ebin/argparse.beam206 lib/stdlib-5.2.3/ebin/argparse.beam
113 KB
./usr/share/doc/erlang-doc/html/doc/system/robustness.html
    
Offset 128, 68 lines modifiedOffset 128, 68 lines modified
128 </h2>128 </h2>
129 <p>Before·improving·the·messenger·program,·let·us·look·at·some·general·principles,129 <p>Before·improving·the·messenger·program,·let·us·look·at·some·general·principles,
130 using·the·ping·pong·program·as·an·example.·Recall·that·when·&quot;ping&quot;·finishes,·it130 using·the·ping·pong·program·as·an·example.·Recall·that·when·&quot;ping&quot;·finishes,·it
131 tells·&quot;pong&quot;·that·it·has·done·so·by·sending·the·atom·<code·class="inline">finished</code>·as·a·message·to131 tells·&quot;pong&quot;·that·it·has·done·so·by·sending·the·atom·<code·class="inline">finished</code>·as·a·message·to
132 &quot;pong&quot;·so·that·&quot;pong&quot;·can·also·finish.·Another·way·to·let·&quot;pong&quot;·finish·is·to132 &quot;pong&quot;·so·that·&quot;pong&quot;·can·also·finish.·Another·way·to·let·&quot;pong&quot;·finish·is·to
133 make·&quot;pong&quot;·exit·if·it·does·not·receive·a·message·from·ping·within·a·certain133 make·&quot;pong&quot;·exit·if·it·does·not·receive·a·message·from·ping·within·a·certain
134 time.·This·can·be·done·by·adding·a·<em>time-out</em>·to·<code·class="inline">pong</code>·as·shown·in·the134 time.·This·can·be·done·by·adding·a·<em>time-out</em>·to·<code·class="inline">pong</code>·as·shown·in·the
135 following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3603831143-1">(</span><span·class="ss">tut19</span><span·class="p"·data-group-id="3603831143-1">)</span><span·class="p">.</span><span·class="w">135 following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3554062622-1">(</span><span·class="ss">tut19</span><span·class="p"·data-group-id="3554062622-1">)</span><span·class="p">.</span><span·class="w">
136 </span><span·class="w">136 </span><span·class="w">
137 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3603831143-2">(</span><span·class="p"·data-group-id="3603831143-3">[</span><span·class="ss">start_ping</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_pong</span><span·class="p">/[·...·truncated·by·diffoscope;·len:·377,·SHA:·7f3b96477465400724be70fb8c82a9812ffb14ebf9bb726c5d4ab226264e76c7·...·]-2">)</span><span·class="p">.</span><span·class="w">137 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3554062622-2">(</span><span·class="p"·data-group-id="3554062622-3">[</span><span·class="ss">start_ping</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_pong</span><span·class="p">/[·...·truncated·by·diffoscope;·len:·377,·SHA:·f17173cc0fe14ec4a268c368a96a6896a6901ca14ee1b7672b7fee597f000d40·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
138 </span><span·class="nf">ping</span><span·class="p"·data-group-id="3603831143-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3603831143-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 </span><span·class="nf">ping</span><span·class="p"·data-group-id="3554062622-4">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3554062622-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3603831143-5">(</span><span·class="s">&quot;ping·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3603831143-6">[</span><span·class="p"·data-group-id="360383[·...·truncated·by·diffoscope;·len:·57,·SHA:·eecbd3193fc9dc9321787be1369708287eb02b03fbc417c8af26226314606287·...·]-5">)</span><span·class="p">;</span><span·class="w">139 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3554062622-5">(</span><span·class="s">&quot;ping·finished</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3554062622-6">[</span><span·class="p"·data-group-id="355406[·...·truncated·by·diffoscope;·len:·57,·SHA:·143e9746a70f777d33434eecd5a401257e7447f2cd3b41be4a556d11c9c53900·...·]-5">)</span><span·class="p">;</span><span·class="w">
  
140 </span><span·class="nf">ping</span><span·class="p"·data-group-id="3603831143-7">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3603831143-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">140 </span><span·class="nf">ping</span><span·class="p"·data-group-id="3554062622-7">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3554062622-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
141 ····</span><span·class="p"·data-group-id="3603831143-8">{</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3603831143-8">}</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·304,·SHA:·d404626e5a9fe51f126ac35b15ad3202b85458c64a5977e5cc96ca93090e7bc0·...·]-9">}</span><span·class="p">,</span><span·class="w">141 ····</span><span·class="p"·data-group-id="3554062622-8">{</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3554062622-8">}</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·304,·SHA:·df0a6125ad0c5ccc3d5faf5ca4fb3ffdc635221bbe04727ca126629d46b94f74·...·]-9">}</span><span·class="p">,</span><span·class="w">
142 ····</span><span·class="k">receive</span><span·class="w">142 ····</span><span·class="k">receive</span><span·class="w">
143 ········</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">143 ········</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
144 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3603831143-11">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3603831143-12">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·65,·SHA:·9c00f7b9f0d0e959da607dfb336f0dfc88ab4b2cecb996a4942555e98a8f4ce6·...·]-11">)</span><span·class="w">144 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3554062622-11">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3554062622-12">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·65,·SHA:·c95ef3e86a9dbd24188e6a554d1150b3db9c5b03236d9c33573030a2210493a1·...·]-11">)</span><span·class="w">
145 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">145 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
146 ····</span><span·class="nf">ping</span><span·class="p"·data-group-id="3603831143-13">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="36[·...·truncated·by·diffoscope;·len:·8,·SHA:·3ce6f1798a30839141bb4aa790d6ffd352266683391a5349eafc3a20bae316a7·...·]-13">)</span><span·class="p">.</span><span·class="w">146 ····</span><span·class="nf">ping</span><span·class="p"·data-group-id="3554062622-13">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="35[·...·truncated·by·diffoscope;·len:·8,·SHA:·46ca3ca15b43eabd38f50ae2c83f52e85714da56baff5b1867c2379ba74d4206·...·]-13">)</span><span·class="p">.</span><span·class="w">
  
147 </span><span·class="nf">pong</span><span·class="p"·data-group-id="3603831143-14">(</span><span·class="p"·data-group-id="3603831143-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">147 </span><span·class="nf">pong</span><span·class="p"·data-group-id="3554062622-14">(</span><span·class="p"·data-group-id="3554062622-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
148 ····</span><span·class="k">receive</span><span·class="w">148 ····</span><span·class="k">receive</span><span·class="w">
149 ········</span><span·class="p"·data-group-id="3603831143-15">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="3603831143-15">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 ········</span><span·class="p"·data-group-id="3554062622-15">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="3554062622-15">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3603831143-16">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3603831143-17">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·65,·SHA:·2762ed37073e46e6530dade75b03d38f28fdcb3a87cafbc3b551556f7f8579a0·...·]-16">)</span><span·class="p">,</span><span·class="w">150 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3554062622-16">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3554062622-17">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·65,·SHA:·6d02e2e0c82fd2e637b97ea2612d6b788c873dd6a14d162925d80f2bbbaf866a·...·]-16">)</span><span·class="p">,</span><span·class="w">
151 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">151 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">
152 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="3603831143-18">(</span><span·class="p"·data-group-id="3603831143-18">)</span><span·class="w">152 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="3554062622-18">(</span><span·class="p"·data-group-id="3554062622-18">)</span><span·class="w">
153 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">153 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
154 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3603831143-19">(</span><span·class="s">&quot;Pong·timed·out</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3603831143-20">[</span><span·class="p"·data-group-id="360[·...·truncated·by·diffoscope;·len:·61,·SHA:·d227775df05e0fef1b5e2a0025f03a4176d7cc0381fee383592e9968409dd4da·...·]-19">)</span><span·class="w">154 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3554062622-19">(</span><span·class="s">&quot;Pong·timed·out</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3554062622-20">[</span><span·class="p"·data-group-id="355[·...·truncated·by·diffoscope;·len:·61,·SHA:·d133459caa6796b7484165d82e7d4eebca6eae16ac458fd1f5dad46fb0fea887·...·]-19">)</span><span·class="w">
155 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">155 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
156 </span><span·class="nf">start_pong</span><span·class="p"·data-group-id="3603831143-21">(</span><span·class="p"·data-group-id="3603831143-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 </span><span·class="nf">start_pong</span><span·class="p"·data-group-id="3554062622-21">(</span><span·class="p"·data-group-id="3554062622-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="3603831143-22">(</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3603831143-23">(</span><span·class="ss">tut19</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·281,·SHA:·2b77e1946ef5a521c1ddf4d554cd97b822efff1c57f3b329a48a5a6ff128af84·...·]-22">)</span><span·class="p">.</span><span·class="w">157 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="3554062622-22">(</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3554062622-23">(</span><span·class="ss">tut19</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·281,·SHA:·3a3b2e6604f810a2c8672334c1a80f68471883361c1ca158bfd2640d404ee529·...·]-22">)</span><span·class="p">.</span><span·class="w">
  
158 </span><span·class="nf">start_ping</span><span·class="p"·data-group-id="3603831143-25">(</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3603831143-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">158 </span><span·class="nf">start_ping</span><span·class="p"·data-group-id="3554062622-25">(</span><span·class="n">Pong_Node</span><span·class="p"·data-group-id="3554062622-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
159 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3603831143-26">(</span><span·class="ss">tut19</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3603831143-27">[</span><span·class="mi">3</span><s[·...·truncated·by·diffoscope;·len:·173,·SHA:·431bba0b9266f99c95ae0e2ba4bf98baaf39602daf8a389634892e1c92e0be59·...·]-26">)</span><span·class="p">.</span></code></pre><p>After·this·is·compiled·and·the·file·<code·class="inline">tut19.beam</code>·is·copied·to·the·necessary159 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3554062622-26">(</span><span·class="ss">tut19</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3554062622-27">[</span><span·class="mi">3</span><s[·...·truncated·by·diffoscope;·len:·173,·SHA:·0effbf235b3ac4d0be0c08ee03231d0a07cde3047b13e63446b580659d7d451d·...·]-26">)</span><span·class="p">.</span></code></pre><p>After·this·is·compiled·and·the·file·<code·class="inline">tut19.beam</code>·is·copied·to·the·necessary
160 directories,·the·following·is·seen·on·(pong@kosken):</p><pre><code·class="text">(pong@kosken)1&gt;·tut19:start_pong().160 directories,·the·following·is·seen·on·(pong@kosken):</p><pre><code·class="text">(pong@kosken)1&gt;·tut19:start_pong().
161 true161 true
162 Pong·received·ping162 Pong·received·ping
163 Pong·received·ping163 Pong·received·ping
164 Pong·received·ping164 Pong·received·ping
165 Pong·timed·out</code></pre><p>And·the·following·is·seen·on·(ping@gollum):</p><pre><code·class="text">(ping@gollum)1&gt;·tut19:start_ping(pong@kosken).165 Pong·timed·out</code></pre><p>And·the·following·is·seen·on·(ping@gollum):</p><pre><code·class="text">(ping@gollum)1&gt;·tut19:start_ping(pong@kosken).
166 &lt;0.36.0&gt;166 &lt;0.36.0&gt;
167 Ping·received·pong167 Ping·received·pong
168 Ping·received·pong168 Ping·received·pong
169 Ping·received·pong169 Ping·received·pong
170 ping·finished</code></pre><p>The·time-out·is·set·in:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">pong</span><span·class="p"·data-group-id="3996350557-1">(</span><span·class="p"·data-group-id="3996350557-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">170 ping·finished</code></pre><p>The·time-out·is·set·in:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">pong</span><span·class="p"·data-group-id="4518036374-1">(</span><span·class="p"·data-group-id="4518036374-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
171 ····</span><span·class="k">receive</span><span·class="w">171 ····</span><span·class="k">receive</span><span·class="w">
172 ········</span><span·class="p"·data-group-id="3996350557-2">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="3996350557-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 ········</span><span·class="p"·data-group-id="4518036374-2">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="4518036374-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3996350557-3">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3996350557-4">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·8501c090dabcb285b03a00bda1b7b0fcdb9885d18f378605b726cee3fdeec960·...·]-3">)</span><span·class="p">,</span><span·class="w">173 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4518036374-3">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4518036374-4">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·f637b6f6b05f0698bde66b2437ec2bcf930ecf14067d2fd9bbfcc20d605adb01·...·]-3">)</span><span·class="p">,</span><span·class="w">
174 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">174 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">
175 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="3996350557-5">(</span><span·class="p"·data-group-id="3996350557-5">)</span><span·class="w">175 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="4518036374-5">(</span><span·class="p"·data-group-id="4518036374-5">)</span><span·class="w">
176 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3996350557-6">(</span><span·class="s">&quot;Pong·timed·out</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3996350557-7">[</span><span·class="p"·data-group-id="3996[·...·truncated·by·diffoscope;·len:·59,·SHA:·3088aa29cf78e1832418077714407dab01311790ea1799cf0fa93a734e47d872·...·]-6">)</span><span·class="w">177 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4518036374-6">(</span><span·class="s">&quot;Pong·timed·out</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4518036374-7">[</span><span·class="p"·data-group-id="4518[·...·truncated·by·diffoscope;·len:·59,·SHA:·558d7d25d574922027bd1990bad58508ca6e06178d5c2e78115e88f1bc9a8d63·...·]-6">)</span><span·class="w">
178 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·time-out·(<code·class="inline">after·5000</code>)·is·started·when·<code·class="inline">receive</code>·is·entered.·The·time-out178 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·time-out·(<code·class="inline">after·5000</code>)·is·started·when·<code·class="inline">receive</code>·is·entered.·The·time-out
179 is·canceled·if·<code·class="inline">{ping,Ping_PID}</code>·is·received.·If·<code·class="inline">{ping,Ping_PID}</code>·is·not179 is·canceled·if·<code·class="inline">{ping,Ping_PID}</code>·is·received.·If·<code·class="inline">{ping,Ping_PID}</code>·is·not
180 received,·the·actions·following·the·time-out·are·done·after·5000·milliseconds.180 received,·the·actions·following·the·time-out·are·done·after·5000·milliseconds.
181 <code·class="inline">after</code>·must·be·last·in·the·<code·class="inline">receive</code>,·that·is,·preceded·by·all·other·message181 <code·class="inline">after</code>·must·be·last·in·the·<code·class="inline">receive</code>,·that·is,·preceded·by·all·other·message
182 reception·specifications·in·the·<code·class="inline">receive</code>.·It·is·also·possible·to·call·a182 reception·specifications·in·the·<code·class="inline">receive</code>.·It·is·also·possible·to·call·a
183 function·that·returned·an·integer·for·the·time-out:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">after</span><span·class="w">·</span><span·class="nf">pong_timeout</span><span·class="p"·data-group-id="2941255771-1">(</span><span·class="p"·data-group-id="2941255771-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span></code></pre><p>In·general,·there·are·better·ways·than·using·time-outs·to·supervise·parts·of·a183 function·that·returned·an·integer·for·the·time-out:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">after</span><span·class="w">·</span><span·class="nf">pong_timeout</span><span·class="p"·data-group-id="0864817932-1">(</span><span·class="p"·data-group-id="0864817932-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span></code></pre><p>In·general,·there·are·better·ways·than·using·time-outs·to·supervise·parts·of·a
184 distributed·Erlang·system.·Time-outs·are·usually·appropriate·to·supervise184 distributed·Erlang·system.·Time-outs·are·usually·appropriate·to·supervise
185 external·events,·for·example,·if·you·have·expected·a·message·from·some·external185 external·events,·for·example,·if·you·have·expected·a·message·from·some·external
186 system·within·a·specified·time.·For·example,·a·time-out·can·be·used·to·log·a186 system·within·a·specified·time.·For·example,·a·time-out·can·be·used·to·log·a
187 user·out·of·the·messenger·system·if·they·have·not·accessed·it·for,·say,·ten187 user·out·of·the·messenger·system·if·they·have·not·accessed·it·for,·say,·ten
188 minutes.</p><h2·id="error-handling"·class="section-heading">188 minutes.</p><h2·id="error-handling"·class="section-heading">
189 ··<a·href="#error-handling"·class="hover-link">189 ··<a·href="#error-handling"·class="hover-link">
190 ····<i·class="ri-link-m"·aria-hidden="true"></i>190 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 209, 96 lines modifiedOffset 209, 96 lines modified
209 something·called·a·<em>signal</em>·to·all·the·processes·it·has·links·to.</p><p>The·signal·carries·information·about·the·pid·it·was·sent·from·and·the·exit209 something·called·a·<em>signal</em>·to·all·the·processes·it·has·links·to.</p><p>The·signal·carries·information·about·the·pid·it·was·sent·from·and·the·exit
210 reason.</p><p>The·default·behaviour·of·a·process·that·receives·a·normal·exit·is·to·ignore·the210 reason.</p><p>The·default·behaviour·of·a·process·that·receives·a·normal·exit·is·to·ignore·the
211 signal.</p><p>The·default·behaviour·in·the·two·other·cases·(that·is,·abnormal·exit)·above·is211 signal.</p><p>The·default·behaviour·in·the·two·other·cases·(that·is,·abnormal·exit)·above·is
212 to:</p><ul><li>Bypass·all·messages·to·the·receiving·process.</li><li>Kill·the·receiving·process.</li><li>Propagate·the·same·error·signal·to·the·links·of·the·killed·process.</li></ul><p>In·this·way·you·can·connect·all·processes·in·a·transaction·together·using·links.212 to:</p><ul><li>Bypass·all·messages·to·the·receiving·process.</li><li>Kill·the·receiving·process.</li><li>Propagate·the·same·error·signal·to·the·links·of·the·killed·process.</li></ul><p>In·this·way·you·can·connect·all·processes·in·a·transaction·together·using·links.
213 If·one·of·the·processes·exits·abnormally,·all·the·processes·in·the·transaction213 If·one·of·the·processes·exits·abnormally,·all·the·processes·in·the·transaction
214 are·killed.·As·it·is·often·wanted·to·create·a·process·and·link·to·it·at·the·same214 are·killed.·As·it·is·often·wanted·to·create·a·process·and·link·to·it·at·the·same
215 time,·there·is·a·special·BIF,·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_link/1">spawn_link</a>·that·does·the215 time,·there·is·a·special·BIF,·<a·href="../../erts-15.0.1/doc/html/erlang.html#spawn_link/1">spawn_link</a>·that·does·the
216 same·as·<code·class="inline">spawn</code>,·but·also·creates·a·link·to·the·spawned·process.</p><p>Now·an·example·of·the·ping·pong·example·using·links·to·terminate·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3363345170-1">(</span><span·class="ss">tut20</span><span·class="p"·data-group-id="3363345170-1">)</span><span·class="p">.</span><span·class="w">216 same·as·<code·class="inline">spawn</code>,·but·also·creates·a·link·to·the·spawned·process.</p><p>Now·an·example·of·the·ping·pong·example·using·links·to·terminate·&quot;pong&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3371520606-1">(</span><span·class="ss">tut20</span><span·class="p"·data-group-id="3371520606-1">)</span><span·class="p">.</span><span·class="w">
217 </span><span·class="w">217 </span><span·class="w">
218 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3363345170-2">(</span><span·class="p"·data-group-id="3363345170-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">··</span><span·class="ss">ping</span><span·class="p">/</span><spa[·...·truncated·by·diffoscope;·len:·240,·SHA:·6be71ca7844bb3d5816a099ca29d67e760cd36f335fbf07845ac75c61f075cee·...·]-2">)</span><span·class="p">.</span><span·class="w">218 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3371520606-2">(</span><span·class="p"·data-group-id="3371520606-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">··</span><span·class="ss">ping</span><span·class="p">/</span><spa[·...·truncated·by·diffoscope;·len:·240,·SHA:·f6dd4021e8729e83771e89163cd723765870f1297f358e19e8880239404f381d·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
219 </span><span·class="nf">ping</span><span·class="p"·data-group-id="3363345170-4">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3363345170-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 </span><span·class="nf">ping</span><span·class="p"·data-group-id="3371520606-4">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3371520606-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 ····</span><span·class="nf">link</span><span·class="p"·data-group-id="3363345170-5">(</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3363345170-5">)</span><span·class="p">,</span><span·class="w">220 ····</span><span·class="nf">link</span><span·class="p"·data-group-id="3371520606-5">(</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3371520606-5">)</span><span·class="p">,</span><span·class="w">
221 ····</span><span·class="nf">ping1</span><span·class="p"·data-group-id="3363345170-6">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3363345170-6">)</span><span·class="p">.</span><span·class="w">221 ····</span><span·class="nf">ping1</span><span·class="p"·data-group-id="3371520606-6">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3371520606-6">)</span><span·class="p">.</span><span·class="w">
  
222 </span><span·class="nf">ping1</span><span·class="p"·data-group-id="3363345170-7">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="3363345170-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 </span><span·class="nf">ping1</span><span·class="p"·data-group-id="3371520606-7">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="3371520606-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="3363345170-8">(</span><span·class="ss">ping</span><span·class="p"·data-group-id="3363345170-8">)</span><span·class="p">;</span><span·class="w">223 ····</span><span·class="nf">exit</span><span·class="p"·data-group-id="3371520606-8">(</span><span·class="ss">ping</span><span·class="p"·data-group-id="3371520606-8">)</span><span·class="p">;</span><span·class="w">
  
224 </span><span·class="nf">ping1</span><span·class="p"·data-group-id="3363345170-9">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3363345170-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 </span><span·class="nf">ping1</span><span·class="p"·data-group-id="3371520606-9">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3371520606-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 ····</span><span·class="n">Pong_Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3363345170-10">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3363345170-11">(</span><span·class="p"·data-group-id="3363345170-11">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·52e83613251b62fcbb1da923f04f7ee91ff13483306726a3c0b7aa7ff326992e·...·]-10">}</span><span·class="p">,</span><span·class="w">225 ····</span><span·class="n">Pong_Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3371520606-10">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3371520606-11">(</span><span·class="p"·data-group-id="3371520606-11">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·0ae4a47c2b01ca2d016f1fa2010dd2bc4436b5073291185a0b61acf7bf5d70ee·...·]-10">}</span><span·class="p">,</span><span·class="w">
226 ····</span><span·class="k">receive</span><span·class="w">226 ····</span><span·class="k">receive</span><span·class="w">
227 ········</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 ········</span><span·class="ss">pong</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3363345170-12">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3363345170-13">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·05cd1ef0d116ef1a4820a24139f430571ef6b599386710a9d7ae77eab071ee83·...·]-12">)</span><span·class="w">228 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3371520606-12">(</span><span·class="s">&quot;Ping·received·pong</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3371520606-13">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·c4c6d184805b6e07bdb95799859a4bf66afe8d4b6cb57e216f2e609d37d29543·...·]-12">)</span><span·class="w">
229 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">229 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
230 ····</span><span·class="nf">ping1</span><span·class="p"·data-group-id="3363345170-14">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3363[·...·truncated·by·diffoscope;·len:·6,·SHA:·d766b559ab3f3134dd3800c72b115a50020db1a801ac0c57072c035271a73185·...·]-14">)</span><span·class="p">.</span><span·class="w">230 ····</span><span·class="nf">ping1</span><span·class="p"·data-group-id="3371520606-14">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="3371[·...·truncated·by·diffoscope;·len:·6,·SHA:·816089e161af40ba8c62792bb3bf3ffdf402a03df4bedb358e5d5e1f3fd2ffc9·...·]-14">)</span><span·class="p">.</span><span·class="w">
  
231 </span><span·class="nf">pong</span><span·class="p"·data-group-id="3363345170-15">(</span><span·class="p"·data-group-id="3363345170-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 </span><span·class="nf">pong</span><span·class="p"·data-group-id="3371520606-15">(</span><span·class="p"·data-group-id="3371520606-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ····</span><span·class="k">receive</span><span·class="w">232 ····</span><span·class="k">receive</span><span·class="w">
233 ········</span><span·class="p"·data-group-id="3363345170-16">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="3363345170-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">233 ········</span><span·class="p"·data-group-id="3371520606-16">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ping_PID</span><span·class="p"·data-group-id="3371520606-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
234 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3363345170-17">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3363345170-18">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·b4d7e8e523fb579b5532dc015955b4bbc4da888fa1812ebd15699004688cb8cb·...·]-17">)</span><span·class="p">,</span><span·class="w">234 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3371520606-17">(</span><span·class="s">&quot;Pong·received·ping</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3371520606-18">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·b69d027465cbcb9d171b41ca66dc105d8165cb7fc4d8a5153c3d5e4a2f9eb4eb·...·]-17">)</span><span·class="p">,</span><span·class="w">
235 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">235 ············</span><span·class="n">Ping_PID</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">
236 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="3363345170-19">(</span><span·class="p"·data-group-id="3363345170-19">)</span><span·class="w">236 ············</span><span·class="nf">pong</span><span·class="p"·data-group-id="3371520606-19">(</span><span·class="p"·data-group-id="3371520606-19">)</span><span·class="w">
237 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">237 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
238 </span><span·class="nf">start</span><span·class="p"·data-group-id="3363345170-20">(</span><span·class="n">Ping_Node</span><span·class="p"·data-group-id="3363345170-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">238 </span><span·class="nf">start</span><span·class="p"·data-group-id="3371520606-20">(</span><span·class="n">Ping_Node</span><span·class="p"·data-group-id="3371520606-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
239 ····</span><span·class="n">PongPID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3363345170-21">(</span><span·class="ss">tut20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3363345170-22">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·67,·SHA:·5ca8e7dc8fee0785bae989a52d863ab431e1b8965b8d2cc20ab6e873f46c7c5a·...·]-21">)</span><span·class="p">,</span><span·class="w">239 ····</span><span·class="n">PongPID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3371520606-21">(</span><span·class="ss">tut20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3371520606-22">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·67,·SHA:·2fb297d61699155e52a0150b6f710c1965c482c3a514ab7b9ee4a73100d743f2·...·]-21">)</span><span·class="p">,</span><span·class="w">
240 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3363345170-23">(</span><span·class="n">Ping_Node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tut20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·250,·SHA:·fc5237ec90fc02a6c896fa7b8c8424979532c595fe7a677db4c092cc356cc018·...·]-23">)</span><span·class="p">.</span></code></pre><pre><code·class="text">(s1@bill)3&gt;·tut20:start(s2@kosken).240 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3371520606-23">(</span><span·class="n">Ping_Node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tut20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·250,·SHA:·07e7b3486f94810c21103c8e21743938f64f4737964b53ed3a4454dcaefc60ed·...·]-23">)</span><span·class="p">.</span></code></pre><pre><code·class="text">(s1@bill)3&gt;·tut20:start(s2@kosken).
241 Pong·received·ping241 Pong·received·ping
242 &lt;3820.41.0&gt;242 &lt;3820.41.0&gt;
243 Ping·received·pong243 Ping·received·pong
244 Pong·received·ping244 Pong·received·ping
245 Ping·received·pong245 Ping·received·pong
246 Pong·received·ping246 Pong·received·ping
247 Ping·received·pong</code></pre><p>This·is·a·slight·modification·of·the·ping·pong·program·where·both·processes·are247 Ping·received·pong</code></pre><p>This·is·a·slight·modification·of·the·ping·pong·program·where·both·processes·are
248 spawned·from·the·same·<code·class="inline">start/1</code>·function,·and·the·&quot;ping&quot;·process·can·be·spawned248 spawned·from·the·same·<code·class="inline">start/1</code>·function,·and·the·&quot;ping&quot;·process·can·be·spawned
249 on·a·separate·node.·Notice·the·use·of·the·<code·class="inline">link</code>·BIF.·&quot;Ping&quot;·calls249 on·a·separate·node.·Notice·the·use·of·the·<code·class="inline">link</code>·BIF.·&quot;Ping&quot;·calls
250 <a·href="../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit(ping)</code></a>·when·it·finishes·and·this·causes·an·exit·signal·to·be250 <a·href="../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit(ping)</code></a>·when·it·finishes·and·this·causes·an·exit·signal·to·be
251 sent·to·&quot;pong&quot;,·which·also·terminates.</p><p>It·is·possible·to·modify·the·default·behaviour·of·a·process·so·that·it·does·not251 sent·to·&quot;pong&quot;,·which·also·terminates.</p><p>It·is·possible·to·modify·the·default·behaviour·of·a·process·so·that·it·does·not
252 get·killed·when·it·receives·abnormal·exit·signals.·Instead,·all·signals·are252 get·killed·when·it·receives·abnormal·exit·signals.·Instead,·all·signals·are
253 turned·into·normal·messages·on·the·format·<code·class="inline">{'EXIT',FromPID,Reason}</code>·and·added·to253 turned·into·normal·messages·on·the·format·<code·class="inline">{'EXIT',FromPID,Reason}</code>·and·added·to
254 the·end·of·the·receiving·process'·message·queue.·This·behaviour·is·set·by:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">process_flag</span><span·class="p"·data-group-id="6167476572-1">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="6167476572-1">)</span></code></pre><p>There·are·several·other·process·flags,·see·<a·href="../../erts-15.0.1/doc/html/erlang.html#process_flag/2">erlang(3)</a>.254 the·end·of·the·receiving·process'·message·queue.·This·behaviour·is·set·by:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">process_flag</span><span·class="p"·data-group-id="2014342628-1">(</span><span·class="ss">trap_exit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="2014342628-1">)</span></code></pre><p>There·are·several·other·process·flags,·see·<a·href="../../erts-15.0.1/doc/html/erlang.html#process_flag/2">erlang(3)</a>.
255 Changing·the·default·behaviour·of·a·process·in·this·way·is·usually·not·done·in255 Changing·the·default·behaviour·of·a·process·in·this·way·is·usually·not·done·in
256 standard·user·programs,·but·is·left·to·the·supervisory·programs·in·OTP.·However,256 standard·user·programs,·but·is·left·to·the·supervisory·programs·in·OTP.·However,
257 the·ping·pong·program·is·modified·to·illustrate·exit·trapping.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9130505717-1">(</span><span·class="ss">tut21</span><span·class="p"·data-group-id="9130505717-1">)</span><span·class="p">.</span><span·class="w">257 the·ping·pong·program·is·modified·to·illustrate·exit·trapping.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5235397579-1">(</span><span·class="ss">tut21</span><span·class="p"·data-group-id="5235397579-1">)</span><span·class="p">.</span><span·class="w">
258 </span><span·class="w">258 </span><span·class="w">
259 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9130505717-2">(</span><span·class="p"·data-group-id="9130505717-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">··</span><span·class="ss">ping</span><span·class="p">/</span><s[·...·truncated·by·diffoscope;·len:·242,·SHA:·4cfbb28655a29d1e87cd625034768258b9eac25685cb30e0f699f089426ae362·...·]-2">)</span><span·class="p">.</span><span·class="w">259 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5235397579-2">(</span><span·class="p"·data-group-id="5235397579-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">··</span><span·class="ss">ping</span><span·class="p">/</span><s[·...·truncated·by·diffoscope;·len:·242,·SHA:·463cd1adb7501c26e34e7fa88b25f1c2aab0fef5c79320891b6e744f02aa0cfe·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
260 </span><span·class="nf">ping</span><span·class="p"·data-group-id="9130505717-4">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="9130505717-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">260 </span><span·class="nf">ping</span><span·class="p"·data-group-id="5235397579-4">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pong_Pid</span><span·class="p"·data-group-id="5235397579-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 72732/115788 bytes (62.81%) of diff not shown.
426 KB
./usr/share/doc/erlang-doc/html/doc/system/seq_prog.html
    
Offset 136, 293 lines modifiedOffset 136, 293 lines modified
136 </span><span·class="mi">7</span><span·class="gp·unselectable">136 </span><span·class="mi">7</span><span·class="gp·unselectable">
137 2&gt;·</span></code></pre><p>As·shown,·the·Erlang·shell·numbers·the·lines·that·can·be·entered,·(as·1&gt;·2&gt;)·and137 2&gt;·</span></code></pre><p>As·shown,·the·Erlang·shell·numbers·the·lines·that·can·be·entered,·(as·1&gt;·2&gt;)·and
138 that·it·correctly·says·that·2·+·5·is·7.·If·you·make·writing·mistakes·in·the138 that·it·correctly·says·that·2·+·5·is·7.·If·you·make·writing·mistakes·in·the
139 shell,·you·can·delete·with·the·backspace·key,·as·in·most·shells.·There·are·many139 shell,·you·can·delete·with·the·backspace·key,·as·in·most·shells.·There·are·many
140 more·editing·commands·in·the·shell·(see140 more·editing·commands·in·the·shell·(see
141 <a·href="../../erts-15.0.1/doc/html/tty.html">tty·-·A·command·line·interface</a>·in·ERTS·User's·Guide).</p><p>(Notice·that·many·line·numbers·given·by·the·shell·in·the·following·examples·are141 <a·href="../../erts-15.0.1/doc/html/tty.html">tty·-·A·command·line·interface</a>·in·ERTS·User's·Guide).</p><p>(Notice·that·many·line·numbers·given·by·the·shell·in·the·following·examples·are
142 out·of·sequence.·This·is·because·this·tutorial·was·written·and·code-tested·in142 out·of·sequence.·This·is·because·this·tutorial·was·written·and·code-tested·in
143 separate·sessions).</p><p>Here·is·a·bit·more·complex·calculation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="p"·data-group-id="5609795157-1">(</span><span·class="mi">42</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">77</span><span·class="p"·data-group-id="5609795157-1">)</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="mi">66</span><span·class="w">·</span><span·class="o">/</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">.</span><span·class="w">143 separate·sessions).</p><p>Here·is·a·bit·more·complex·calculation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="p"·data-group-id="9267733065-1">(</span><span·class="mi">42</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">77</span><span·class="p"·data-group-id="9267733065-1">)</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="mi">66</span><span·class="w">·</span><span·class="o">/</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">.</span><span·class="w">
144 </span><span·class="mf">2618.0</span></code></pre><p>Notice·the·use·of·brackets,·the·multiplication·operator·<code·class="inline">*</code>,·and·the·division144 </span><span·class="mf">2618.0</span></code></pre><p>Notice·the·use·of·brackets,·the·multiplication·operator·<code·class="inline">*</code>,·and·the·division
145 operator·<code·class="inline">/</code>,·as·in·normal·arithmetic·(see145 operator·<code·class="inline">/</code>,·as·in·normal·arithmetic·(see
146 <a·href="../../doc/system/expressions.html">Expressions</a>).</p><p>Press·Control-C·to·shut·down·the·Erlang·system·and·the·Erlang·shell.</p><p>The·following·output·is·shown:</p><pre><code·class="text">BREAK:·(a)bort·(c)ontinue·(p)roc·info·(i)nfo·(l)oaded146 <a·href="../../doc/system/expressions.html">Expressions</a>).</p><p>Press·Control-C·to·shut·down·the·Erlang·system·and·the·Erlang·shell.</p><p>The·following·output·is·shown:</p><pre><code·class="text">BREAK:·(a)bort·(c)ontinue·(p)roc·info·(i)nfo·(l)oaded
147 ·······(v)ersion·(k)ill·(D)b-tables·(d)istribution147 ·······(v)ersion·(k)ill·(D)b-tables·(d)istribution
148 a148 a
149 $</code></pre><p>Type·<code·class="inline">a</code>·to·leave·the·Erlang·system.</p><p>Another·way·to·shut·down·the·Erlang·system·is·by·entering·<a·href="../../erts-15.0.1/doc/html/erlang.html#halt/0"><code·class="inline">halt/0</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nf">halt</span><span·class="p"·data-group-id="3968708339-1">(</span><span·class="p"·data-group-id="3968708339-1">)</span><span·class="p">.</span><span·class="w">149 $</code></pre><p>Type·<code·class="inline">a</code>·to·leave·the·Erlang·system.</p><p>Another·way·to·shut·down·the·Erlang·system·is·by·entering·<a·href="../../erts-15.0.1/doc/html/erlang.html#halt/0"><code·class="inline">halt/0</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nf">halt</span><span·class="p"·data-group-id="5552398064-1">(</span><span·class="p"·data-group-id="5552398064-1">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="err">$</span></code></pre><h2·id="modules-and-functions"·class="section-heading">150 </span><span·class="err">$</span></code></pre><h2·id="modules-and-functions"·class="section-heading">
151 ··<a·href="#modules-and-functions"·class="hover-link">151 ··<a·href="#modules-and-functions"·class="hover-link">
152 ····<i·class="ri-link-m"·aria-hidden="true"></i>152 ····<i·class="ri-link-m"·aria-hidden="true"></i>
153 ··</a>153 ··</a>
154 ··<span·class="text">Modules·and·Functions</span>154 ··<span·class="text">Modules·and·Functions</span>
155 </h2>155 </h2>
156 <p>A·programming·language·is·not·much·use·if·you·only·can·run·code·from·the·shell.156 <p>A·programming·language·is·not·much·use·if·you·only·can·run·code·from·the·shell.
157 So·here·is·a·small·Erlang·program.·Enter·it·into·a·file·named·<code·class="inline">tut.erl</code>·using·a157 So·here·is·a·small·Erlang·program.·Enter·it·into·a·file·named·<code·class="inline">tut.erl</code>·using·a
158 suitable·text·editor.·The·file·name·<code·class="inline">tut.erl</code>·is·important,·and·also·that·it·is158 suitable·text·editor.·The·file·name·<code·class="inline">tut.erl</code>·is·important,·and·also·that·it·is
159 in·the·same·directory·as·the·one·where·you·started·<code·class="inline">erl</code>).·If·you·are·lucky·your159 in·the·same·directory·as·the·one·where·you·started·<code·class="inline">erl</code>).·If·you·are·lucky·your
160 editor·has·an·Erlang·mode·that·makes·it·easier·for·you·to·enter·and·format·your160 editor·has·an·Erlang·mode·that·makes·it·easier·for·you·to·enter·and·format·your
161 code·nicely·(see·<a·href="../../lib/tools-4.0/doc/html/erlang_mode_chapter.html">The·Erlang·mode·for·Emacs</a>161 code·nicely·(see·<a·href="../../lib/tools-4.0/doc/html/erlang_mode_chapter.html">The·Erlang·mode·for·Emacs</a>
162 in·Tools·User's·Guide),·but·you·can·manage·perfectly·well·without.·Here·is·the162 in·Tools·User's·Guide),·but·you·can·manage·perfectly·well·without.·Here·is·the
163 code·to·enter:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5135736016-1">(</span><span·class="ss">tut</span><span·class="p"·data-group-id="5135736016-1">)</span><span·class="p">.</span><span·class="w"> 
164 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5135736016-2">(</span><span·class="p"·data-group-id="5135736016-3">[</span><span·class="ss">double</span><span·class="p">/</span><span·class="mi">1</span><span·clas[·...·truncated·by·diffoscope;·len:·86,·SHA:·d01fb05ceda02c6d21f41004b3e77de34319ac719b801f7a685ef1b5e9cafc4b·...·]">)</span><span·class="p">.</span><span·class="w">163 code·to·enter:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4489942393-1">(</span><span·class="ss">tut</span><span·class="p"·data-group-id="4489942393-1">)</span><span·class="p">.</span><span·class="w">
 164 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4489942393-2">(</span><span·class="p"·data-group-id="4489942393-3">[</span><span·class="ss">double</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4489942393-3">]</span><span·class="p"·data-group-id="4489942393-2">)</span><span·class="p">.</span><span·class="w">
  
165 </span><span·class="nf">double</span><span·class="p"·data-group-id="5135736016-4">(</span><span·class="n">X</span><span·class="p"·data-group-id="5135736016-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">165 </span><span·class="nf">double</span><span·class="p"·data-group-id="4489942393-4">(</span><span·class="n">X</span><span·class="p"·data-group-id="4489942393-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
166 ····</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="n">X</span><span·class="p">.</span></code></pre><p>It·is·not·hard·to·guess·that·this·program·doubles·the·value·of·numbers.·The166 ····</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="n">X</span><span·class="p">.</span></code></pre><p>It·is·not·hard·to·guess·that·this·program·doubles·the·value·of·numbers.·The
167 first·two·lines·of·the·code·are·described·later.·Let·us·compile·the·program.167 first·two·lines·of·the·code·are·described·later.·Let·us·compile·the·program.
168 This·can·be·done·in·an·Erlang·shell·as·follows,·where·<code·class="inline">c</code>·means·compile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="9914866222-1">(</span><span·class="ss">tut</span><span·class="p"·data-group-id="9914866222-1">)</span><span·class="p">.</span><span·class="w">168 This·can·be·done·in·an·Erlang·shell·as·follows,·where·<code·class="inline">c</code>·means·compile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="6213408633-1">(</span><span·class="ss">tut</span><span·class="p"·data-group-id="6213408633-1">)</span><span·class="p">.</span><span·class="w">
169 </span><span·class="p"·data-group-id="9914866222-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut</span><span·class="p"·data-group-id="9914866222-2">}</span></code></pre><p>The·<code·class="inline">{ok,tut}</code>·means·that·the·compilation·is·OK.·If·it·says·<code·class="inline">error</code>·it·means169 </span><span·class="p"·data-group-id="6213408633-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut</span><span·class="p"·data-group-id="6213408633-2">}</span></code></pre><p>The·<code·class="inline">{ok,tut}</code>·means·that·the·compilation·is·OK.·If·it·says·<code·class="inline">error</code>·it·means
170 that·there·is·some·mistake·in·the·text·that·you·entered.·Additional·error170 that·there·is·some·mistake·in·the·text·that·you·entered.·Additional·error
171 messages·gives·an·idea·to·what·is·wrong·so·you·can·modify·the·text·and·then·try171 messages·gives·an·idea·to·what·is·wrong·so·you·can·modify·the·text·and·then·try
172 to·compile·the·program·again.</p><p>Now·run·the·program:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">tut</span><span·class="p">:</span><span·class="nf">double</span><span·class="p"·data-group-id="3438383394-1">(</span><span·class="mi">10</span><span·class="p"·data-group-id="3438383394-1">)</span><span·class="p">.</span><span·class="w">172 to·compile·the·program·again.</p><p>Now·run·the·program:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">tut</span><span·class="p">:</span><span·class="nf">double</span><span·class="p"·data-group-id="1207503946-1">(</span><span·class="mi">10</span><span·class="p"·data-group-id="1207503946-1">)</span><span·class="p">.</span><span·class="w">
173 </span><span·class="mi">20</span></code></pre><p>As·expected,·double·of·10·is·20.</p><p>Now·let·us·get·back·to·the·first·two·lines·of·the·code.·Erlang·programs·are173 </span><span·class="mi">20</span></code></pre><p>As·expected,·double·of·10·is·20.</p><p>Now·let·us·get·back·to·the·first·two·lines·of·the·code.·Erlang·programs·are
174 written·in·files.·Each·file·contains·an·Erlang·<em>module</em>.·The·first·line·of·code174 written·in·files.·Each·file·contains·an·Erlang·<em>module</em>.·The·first·line·of·code
175 in·the·module·is·the·module·name·(see·<a·href="../../doc/system/modules.html">Modules</a>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3478820692-1">(</span><span·class="ss">tut</span><span·class="p"·data-group-id="3478820692-1">)</span><span·class="p">.</span></code></pre><p>Thus,·the·module·is·called·<em>tut</em>.·Notice·the·full·stop·<code·class="inline">.</code>·at·the·end·of·the175 in·the·module·is·the·module·name·(see·<a·href="../../doc/system/modules.html">Modules</a>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9528961897-1">(</span><span·class="ss">tut</span><span·class="p"·data-group-id="9528961897-1">)</span><span·class="p">.</span></code></pre><p>Thus,·the·module·is·called·<em>tut</em>.·Notice·the·full·stop·<code·class="inline">.</code>·at·the·end·of·the
176 line.·The·files·which·are·used·to·store·the·module·must·have·the·same·name·as176 line.·The·files·which·are·used·to·store·the·module·must·have·the·same·name·as
177 the·module·but·with·the·extension·<code·class="inline">.erl</code>.·In·this·case·the·file·name·is177 the·module·but·with·the·extension·<code·class="inline">.erl</code>.·In·this·case·the·file·name·is
178 <code·class="inline">tut.erl</code>.·When·using·a·function·in·another·module,·the·syntax178 <code·class="inline">tut.erl</code>.·When·using·a·function·in·another·module,·the·syntax
179 <code·class="inline">module_name:function_name(arguments)</code>·is·used.·So·the·following·means·call179 <code·class="inline">module_name:function_name(arguments)</code>·is·used.·So·the·following·means·call
180 function·<code·class="inline">double</code>·in·module·<code·class="inline">tut</code>·with·argument·<code·class="inline">10</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">tut</span><span·class="p">:</span><span·class="nf">double</span><span·class="p"·data-group-id="7309945337-1">(</span><span·class="mi">10</span><span·class="p"·data-group-id="7309945337-1">)</span><span·class="p">.</span></code></pre><p>The·second·line·says·that·the·module·<code·class="inline">tut</code>·contains·a·function·called·<code·class="inline">double</code>,180 function·<code·class="inline">double</code>·in·module·<code·class="inline">tut</code>·with·argument·<code·class="inline">10</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">tut</span><span·class="p">:</span><span·class="nf">double</span><span·class="p"·data-group-id="7914035576-1">(</span><span·class="mi">10</span><span·class="p"·data-group-id="7914035576-1">)</span><span·class="p">.</span></code></pre><p>The·second·line·says·that·the·module·<code·class="inline">tut</code>·contains·a·function·called·<code·class="inline">double</code>,
181 which·takes·one·argument·(<code·class="inline">X</code>·in·our·example):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5163070416-1">(</span><span·class="p"·data-group-id="5163070416-2">[</span><span·class="ss">double</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="5163070416-2">]</span><span·class="p"·data-group-id="5163070416-1">)</span><span·class="p">.</span></code></pre><p>The·second·line·also·says·that·this·function·can·be·called·from·outside·the181 which·takes·one·argument·(<code·class="inline">X</code>·in·our·example):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5825112238-1">(</span><span·class="p"·data-group-id="5825112238-2">[</span><span·class="ss">double</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="5825112238-2">]</span><span·class="p"·data-group-id="5825112238-1">)</span><span·class="p">.</span></code></pre><p>The·second·line·also·says·that·this·function·can·be·called·from·outside·the
182 module·<code·class="inline">tut</code>.·More·about·this·later.·Again,·notice·the·<code·class="inline">.</code>·at·the·end·of·the182 module·<code·class="inline">tut</code>.·More·about·this·later.·Again,·notice·the·<code·class="inline">.</code>·at·the·end·of·the
183 line.</p><p>Now·for·a·more·complicated·example,·the·factorial·of·a·number.·For·example,·the183 line.</p><p>Now·for·a·more·complicated·example,·the·factorial·of·a·number.·For·example,·the
184 factorial·of·4·is·4·<em>·3·</em>·2·*·1,·which·equals·24.</p><p>Enter·the·following·code·in·a·file·named·<code·class="inline">tut1.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2347724868-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="2347724868-1">)</span><span·class="p">.</span><span·class="w">184 factorial·of·4·is·4·<em>·3·</em>·2·*·1,·which·equals·24.</p><p>Enter·the·following·code·in·a·file·named·<code·class="inline">tut1.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1153440370-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="1153440370-1">)</span><span·class="p">.</span><span·class="w">
185 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2347724868-2">(</span><span·class="p"·data-group-id="2347724868-3">[</span><span·class="ss">fac</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="2347724868-3">]</span><span·class="p"·data-group-id="2347724868-2">)</span><span·class="p">.</span><span·class="w">185 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1153440370-2">(</span><span·class="p"·data-group-id="1153440370-3">[</span><span·class="ss">fac</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1153440370-3">]</span><span·class="p"·data-group-id="1153440370-2">)</span><span·class="p">.</span><span·class="w">
  
186 </span><span·class="nf">fac</span><span·class="p"·data-group-id="2347724868-4">(</span><span·class="mi">1</span><span·class="p"·data-group-id="2347724868-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">186 </span><span·class="nf">fac</span><span·class="p"·data-group-id="1153440370-4">(</span><span·class="mi">1</span><span·class="p"·data-group-id="1153440370-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
187 ····</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">187 ····</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
188 </span><span·class="nf">fac</span><span·class="p"·data-group-id="2347724868-5">(</span><span·class="n">N</span><span·class="p"·data-group-id="2347724868-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 </span><span·class="nf">fac</span><span·class="p"·data-group-id="1153440370-5">(</span><span·class="n">N</span><span·class="p"·data-group-id="1153440370-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="2347724868-6">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="2347724868-6">)</span><span·class="p">.</span></code></pre><p>So·this·is·a·module,·called·<code·class="inline">tut1</code>·that·contains·a·function·called·<code·class="inline">fac&gt;</code>,·which189 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="1153440370-6">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1153440370-6">)</span><span·class="p">.</span></code></pre><p>So·this·is·a·module,·called·<code·class="inline">tut1</code>·that·contains·a·function·called·<code·class="inline">fac&gt;</code>,·which
190 takes·one·argument,·<code·class="inline">N</code>.</p><p>The·first·part·says·that·the·factorial·of·1·is·1.:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fac</span><span·class="p"·data-group-id="1641699472-1">(</span><span·class="mi">1</span><span·class="p"·data-group-id="1641699472-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 takes·one·argument,·<code·class="inline">N</code>.</p><p>The·first·part·says·that·the·factorial·of·1·is·1.:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fac</span><span·class="p"·data-group-id="0705264996-1">(</span><span·class="mi">1</span><span·class="p"·data-group-id="0705264996-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ····</span><span·class="mi">1</span><span·class="p">;</span></code></pre><p>Notice·that·this·part·ends·with·a·semicolon·<code·class="inline">;</code>·that·indicates·that·there·is191 ····</span><span·class="mi">1</span><span·class="p">;</span></code></pre><p>Notice·that·this·part·ends·with·a·semicolon·<code·class="inline">;</code>·that·indicates·that·there·is
192 more·of·the·function·<code·class="inline">fac&gt;</code>·to·come.</p><p>The·second·part·says·that·the·factorial·of·N·is·N·multiplied·by·the·factorial·of192 more·of·the·function·<code·class="inline">fac&gt;</code>·to·come.</p><p>The·second·part·says·that·the·factorial·of·N·is·N·multiplied·by·the·factorial·of
193 N·-·1:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fac</span><span·class="p"·data-group-id="4821289849-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="4821289849-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
194 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="4821289849-2">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</sp[·...·truncated·by·diffoscope;·len:·247,·SHA:·51d653518cbf9c1c7c799e889ec29e51a134cedc58019bdf0cb6026fb0814d23·...·]193 N·-·1:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fac</span><span·class="p"·data-group-id="8143951238-1">(</span><span·class="n">N</span><span·class="p"·data-group-id="8143951238-1">)</span><span·class="w">·</span><span·class="p">-[·...·truncated·by·diffoscope;·len:·27,·SHA:·03a9aeebfbab2db7a6dbc90dcdf0b18c17323c435be072b68e53d5e112b59ee6·...·]
 194 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="8143951238-2">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="8143951238-2">)</span><span·class="p">.</span></code></pre><p>Notice·that·this·part·ends·with·a·<code·class="inline">.</code>·saying·that·there·are·no·more·parts·of
195 this·function.</p><p>Compile·the·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="4411673010-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="4411673010-1">)</span><span·class="p">.</span><span·class="w">195 this·function.</p><p>Compile·the·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="1961897519-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="1961897519-1">)</span><span·class="p">.</span><span·class="w">
196 </span><span·class="p"·data-group-id="4411673010-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut1</span><span·class="p"·data-group-id="4411673010-2">}</span></code></pre><p>And·now·calculate·the·factorial·of·4.</p><pre><code·class="makeup·erlang"·translate="no[·...·truncated·by·diffoscope;·len:·243,·SHA:·da4045dea386127c3dc7618e61d5e23a533806a710341cf6c2b9d1684b629c27·...·]-1">)</span><span·class="p">.</span><span·class="w">196 </span><span·class="p"·data-group-id="1961897519-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut1</span><span·class="p"·data-group-id="1961897519-2">}</span></code></pre><p>And·now·calculate·the·factorial·of·4.</p><pre><code·class="makeup·erlang"·translate="no[·...·truncated·by·diffoscope;·len:·243,·SHA:·1adc79ecd7db5e6df18925992c69764934d992d138f878430ccf8ffe6b08a511·...·]-1">)</span><span·class="p">.</span><span·class="w">
197 </span><span·class="mi">24</span></code></pre><p>Here·the·function·<code·class="inline">fac&gt;</code>·in·module·<code·class="inline">tut1</code>·is·called·with·argument·<code·class="inline">4</code>.</p><p>A·function·can·have·many·arguments.·Let·us·expand·the·module·<code·class="inline">tut1</code>·with·the197 </span><span·class="mi">24</span></code></pre><p>Here·the·function·<code·class="inline">fac&gt;</code>·in·module·<code·class="inline">tut1</code>·is·called·with·argument·<code·class="inline">4</code>.</p><p>A·function·can·have·many·arguments.·Let·us·expand·the·module·<code·class="inline">tut1</code>·with·the
198 function·to·multiply·two·numbers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4368500559-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="4368500559-1">)</span><span·class="p">.</span><span·class="w">198 function·to·multiply·two·numbers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2896996176-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="2896996176-1">)</span><span·class="p">.</span><span·class="w">
199 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4368500559-2">(</span><span·class="p"·data-group-id="4368500559-3">[</span><span·class="ss">fac</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mult</span><span·class="p">/</span><span[·...·truncated·by·diffoscope;·len:·114,·SHA:·587b7ca70d0e7b1833b0697e313c8dc3fb5fc81fcdd4036b0c0ce49250c48101·...·]-2">)</span><span·class="p">.</span><span·class="w">199 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2896996176-2">(</span><span·class="p"·data-group-id="2896996176-3">[</span><span·class="ss">fac</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mult</span><span·class="p">/</span><span[·...·truncated·by·diffoscope;·len:·114,·SHA:·839ebf3d1349fce1cd03002038939b413149f3830ec511af8dc3f511700d9744·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
200 </span><span·class="nf">fac</span><span·class="p"·data-group-id="4368500559-4">(</span><span·class="mi">1</span><span·class="p"·data-group-id="4368500559-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 </span><span·class="nf">fac</span><span·class="p"·data-group-id="2896996176-4">(</span><span·class="mi">1</span><span·class="p"·data-group-id="2896996176-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ····</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">201 ····</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
202 </span><span·class="nf">fac</span><span·class="p"·data-group-id="4368500559-5">(</span><span·class="n">N</span><span·class="p"·data-group-id="4368500559-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">202 </span><span·class="nf">fac</span><span·class="p"·data-group-id="2896996176-5">(</span><span·class="n">N</span><span·class="p"·data-group-id="2896996176-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
203 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="4368500559-6">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4368500559-6">)</span><span·class="p">.</span><span·class="w">203 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="2896996176-6">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="2896996176-6">)</span><span·class="p">.</span><span·class="w">
  
204 </span><span·class="nf">mult</span><span·class="p"·data-group-id="4368500559-7">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="4368500559-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">204 </span><span·class="nf">mult</span><span·class="p"·data-group-id="2896996176-7">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="2896996176-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
205 ····</span><span·class="n">X</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Y</span><span·class="p">.</span></code></pre><p>Notice·that·it·is·also·required·to·expand·the·<code·class="inline">-export</code>·line·with·the205 ····</span><span·class="n">X</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Y</span><span·class="p">.</span></code></pre><p>Notice·that·it·is·also·required·to·expand·the·<code·class="inline">-export</code>·line·with·the
206 information·that·there·is·another·function·<code·class="inline">mult</code>·with·two·arguments.</p><p>Compile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="3145419111-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="3145419111-1">)</span><span·class="p">.</span><span·class="w">206 information·that·there·is·another·function·<code·class="inline">mult</code>·with·two·arguments.</p><p>Compile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="9472891808-1">(</span><span·class="ss">tut1</span><span·class="p"·data-group-id="9472891808-1">)</span><span·class="p">.</span><span·class="w">
207 </span><span·class="p"·data-group-id="3145419111-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut1</span><span·class="p"·data-group-id="3145419111-2">}</span></code></pre><p>Try·out·the·new·function·<code·class="inline">mult</code>:</p><pre><code·class="makeup·[·...·truncated·by·diffoscope;·len:·314,·SHA:·70f0891d2179fd8dab1c5908f2cfb41f99057e1e55e61a68ded898a2d1a0981a·...·]-1">)</span><span·class="p">.</span><span·class="w">207 </span><span·class="p"·data-group-id="9472891808-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut1</span><span·class="p"·data-group-id="9472891808-2">}</span></code></pre><p>Try·out·the·new·function·<code·class="inline">mult</code>:</p><pre><code·class="makeup·[·...·truncated·by·diffoscope;·len:·314,·SHA:·443d62816905a6f5da160fa6e13ce5fc1b66b6205142031f2541d6adaad9e255·...·]-1">)</span><span·class="p">.</span><span·class="w">
208 </span><span·class="mi">12</span></code></pre><p>In·this·example·the·numbers·are·integers·and·the·arguments·in·the·functions·in208 </span><span·class="mi">12</span></code></pre><p>In·this·example·the·numbers·are·integers·and·the·arguments·in·the·functions·in
209 the·code·<code·class="inline">N</code>,·<code·class="inline">X</code>,·and·<code·class="inline">Y</code>·are·called·variables.·Variables·must·start·with·a209 the·code·<code·class="inline">N</code>,·<code·class="inline">X</code>,·and·<code·class="inline">Y</code>·are·called·variables.·Variables·must·start·with·a
210 capital·letter·(see·<a·href="../../doc/system/expressions.html">Variables</a>).·Examples·of210 capital·letter·(see·<a·href="../../doc/system/expressions.html">Variables</a>).·Examples·of
211 variables·are·<code·class="inline">Number</code>,·<code·class="inline">ShoeSize</code>,·and·<code·class="inline">Age</code>.</p><h2·id="atoms"·class="section-heading">211 variables·are·<code·class="inline">Number</code>,·<code·class="inline">ShoeSize</code>,·and·<code·class="inline">Age</code>.</p><h2·id="atoms"·class="section-heading">
212 ··<a·href="#atoms"·class="hover-link">212 ··<a·href="#atoms"·class="hover-link">
213 ····<i·class="ri-link-m"·aria-hidden="true"></i>213 ····<i·class="ri-link-m"·aria-hidden="true"></i>
214 ··</a>214 ··</a>
215 ··<span·class="text">Atoms</span>215 ··<span·class="text">Atoms</span>
216 </h2>216 </h2>
217 <p>Atom·is·another·data·type·in·Erlang.·Atoms·start·with·a·small·letter·(see217 <p>Atom·is·another·data·type·in·Erlang.·Atoms·start·with·a·small·letter·(see
218 <a·href="../../doc/system/data_types.html">Atom</a>),·for·example,·<code·class="inline">charles</code>,·<code·class="inline">centimeter</code>,·and218 <a·href="../../doc/system/data_types.html">Atom</a>),·for·example,·<code·class="inline">charles</code>,·<code·class="inline">centimeter</code>,·and
219 <code·class="inline">inch</code>.·Atoms·are·simply·names,·nothing·else.·They·are·not·like·variables,·which219 <code·class="inline">inch</code>.·Atoms·are·simply·names,·nothing·else.·They·are·not·like·variables,·which
220 can·have·a·value.</p><p>Enter·the·next·program·in·a·file·named·<code·class="inline">tut2.erl</code>).·It·can·be·useful·for220 can·have·a·value.</p><p>Enter·the·next·program·in·a·file·named·<code·class="inline">tut2.erl</code>).·It·can·be·useful·for
221 converting·from·inches·to·centimeters·and·conversely:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3193128582-1">(</span><span·class="ss">tut2</span><span·class="p"·data-group-id="3193128582-1">)</span><span·class="p">.</span><span·class="w"> 
222 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3193128582-2">(</span><span·class="p"·data-group-id="3193128582-3">[</span><span·class="ss">convert</span><span·class="p">/</span><span·class="mi">2</span><span·cla[·...·truncated·by·diffoscope;·len:·87,·SHA:·c95ddc9411e8649cec9a68780c683fc8fd11c2766d53efd92eb4ce52db731f0f·...·]">)</span><span·class="p">.</span><span·class="w">221 converting·from·inches·to·centimeters·and·conversely:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8872225986-1">(</span><span·class="ss">tut2</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·27,·SHA:·82c4f3f8a28a8b3093f2ed9bac25c6cf45548b80d0f4e655485d7546bb0a6fd7·...·]">)</span><span·class="p">.</span><span·class="w">
 222 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8872225986-2">(</span><span·class="p"·data-group-id="8872225986-3">[</span><span·class="ss">convert</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="8872225986-3">]</span><span·class="p"·data-group-id="8872225986-2">)</span><span·class="p">.</span><span·class="w">
  
223 </span><span·class="nf">convert</span><span·class="p"·data-group-id="3193128582-4">(</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inch</span><span·class="p"·data-group-id="3193128582-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 </span><span·class="nf">convert</span><span·class="p"·data-group-id="8872225986-4">(</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inch</span><span·class="p"·data-group-id="8872225986-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ····</span><span·class="n">M</span><span·class="w">·</span><span·class="o">/</span><span·class="w">·</span><span·class="mf">2.54</span><span·class="p">;</span><span·class="w">224 ····</span><span·class="n">M</span><span·class="w">·</span><span·class="o">/</span><span·class="w">·</span><span·class="mf">2.54</span><span·class="p">;</span><span·class="w">
  
225 </span><span·class="nf">convert</span><span·class="p"·data-group-id="3193128582-5">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">centimeter</span><span·class="p"·data-group-id="3193128582-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">225 </span><span·class="nf">convert</span><span·class="p"·data-group-id="8872225986-5">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">centimeter</span><span·class="p"·data-group-id="8872225986-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
226 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="mf">2.54</span><span·class="p">.</span></code></pre><p>Compile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="4059034299-1">(</span><span·class="ss">tut2</span><span·class="p"·data-group-id="4059034299-1">)</span><span·class="p">.</span><span·class="w">226 ····</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="mf">2.54</span><span·class="p">.</span></code></pre><p>Compile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="5971120644-1">(</span><span·class="ss">tut2</span><span·class="p"·data-group-id="5971120644-1">)</span><span·class="p">.</span><span·class="w">
227 </span><span·class="p"·data-group-id="4059034299-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut2</span><span·class="p"·data-group-id="4059034299-2">}</span></code></pre><p>Test:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">[·...·truncated·by·diffoscope;·len:·292,·SHA:·bb4d003ad8127802ded2335c08bf3a24bf1cbda8f58ff4aabc3de76aa0296202·...·]-1">)</span><span·class="p">.</span><span·class="w">227 </span><span·class="p"·data-group-id="5971120644-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">tut2</span><span·class="p"·data-group-id="5971120644-2">}</span></code></pre><p>Test:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">[·...·truncated·by·diffoscope;·len:·292,·SHA:·3c44effc42eb4ab5fc5d8ab874151cf4341898a4075bf6e284516b25bf963f53·...·]-1">)</span><span·class="p">.</span><span·class="w">
228 </span><span·class="mf">1.1811023622047243</span><span·class="gp·unselectable">228 </span><span·class="mf">1.1811023622047243</span><span·class="gp·unselectable">
229 11&gt;·</span><span·class="nc">tut2</span><span·class="p">:</span><span·class="nf">convert</span><span·class="p"·data-group-id="2060692477-2">(</span><span·class="mi">7</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">centimeter</span><span·class="p"·data-group-id="2060692477-2">)</span><span·class="p">.</span><span·class="w">229 11&gt;·</span><span·class="nc">tut2</span><span·class="p">:</span><span·class="nf">convert</span><span·class="p"·data-group-id="6223707334-2">(</span><span·class="mi">7</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">centimeter</span><span·class="p"·data-group-id="6223707334-2">)</span><span·class="p">.</span><span·class="w">
230 </span><span·class="mf">17.78</span></code></pre><p>Notice·the·introduction·of·decimals·(floating·point·numbers)·without·any230 </span><span·class="mf">17.78</span></code></pre><p>Notice·the·introduction·of·decimals·(floating·point·numbers)·without·any
231 explanation.·Hopefully·you·can·cope·with·that.</p><p>Let·us·see·what·happens·if·something·other·than·<code·class="inline">centimeter</code>·or·<code·class="inline">inch</code>·is231 explanation.·Hopefully·you·can·cope·with·that.</p><p>Let·us·see·what·happens·if·something·other·than·<code·class="inline">centimeter</code>·or·<code·class="inline">inch</code>·is
232 entered·in·the·<code·class="inline">convert</code>·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">12&gt;·</span><span·class="nc">tut2</span><span·class="p">:</span><span·class="nf">convert</span><span·class="p"·data-group-id="8391140748-1">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">miles</span><span·class="p"·data-group-id="8391140748-1">)</span><span·class="p">.</span><span·class="w">232 entered·in·the·<code·class="inline">convert</code>·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">12&gt;·</span><span·class="nc">tut2</span><span·class="p">:</span><span·class="nf">convert</span><span·class="p"·data-group-id="5235053896-1">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">miles</span><span·class="p"·data-group-id="5235053896-1">)</span><span·class="p">.</span><span·class="w">
233 </span><span·class="gt">**·exception·error:·no·function·clause·matching·tut2:convert(3,miles)·(tut2.erl,·line·4)</span></code></pre><p>The·two·parts·of·the·<code·class="inline">convert</code>·function·are·called·its·clauses.·As·shown,233 </span><span·class="gt">**·exception·error:·no·function·clause·matching·tut2:convert(3,miles)·(tut2.erl,·line·4)</span></code></pre><p>The·two·parts·of·the·<code·class="inline">convert</code>·function·are·called·its·clauses.·As·shown,
234 <code·class="inline">miles</code>·is·not·part·of·either·of·the·clauses.·The·Erlang·system·cannot·<em>match</em>234 <code·class="inline">miles</code>·is·not·part·of·either·of·the·clauses.·The·Erlang·system·cannot·<em>match</em>
235 either·of·the·clauses·so·an·error·message·<code·class="inline">function_clause</code>·is·returned.·The235 either·of·the·clauses·so·an·error·message·<code·class="inline">function_clause</code>·is·returned.·The
236 shell·formats·the·error·message·nicely,·but·the·error·tuple·is·saved·in·the236 shell·formats·the·error·message·nicely,·but·the·error·tuple·is·saved·in·the
237 shell's·history·list·and·can·be·output·by·the·shell·command·<code·class="inline">v/1</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">13&gt;·</span><span·class="nf">v</span><span·class="p"·data-group-id="2330169867-1">(</span><span·class="mi">12</span><span·class="p"·data-group-id="2330169867-1">)</span><span·class="p">.</span><span·class="w">237 shell's·history·list·and·can·be·output·by·the·shell·command·<code·class="inline">v/1</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">13&gt;·</span><span·class="nf">v</span><span·class="p"·data-group-id="1091220816-1">(</span><span·class="mi">12</span><span·class="p"·data-group-id="1091220816-1">)</span><span·class="p">.</span><span·class="w">
238 </span><span·class="p"·data-group-id="2330169867-2">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="2330169867-3">{</span><span·class="ss">function_clause</span><span·class="p">,</span><span·class="p"·data-group-id="2330169867-4">[</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·69301debe01e0fb816dc7ffc025eaf58585f542fb61d989c97dbe9930a66643b·...·]-5">{</span><span·class="ss">tut2</span><span·class="p">,</span><span·class="ss">convert</span><span·class="p">,</span><span·class="w">238 </span><span·class="p"·data-group-id="1091220816-2">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="1091220816-3">{</span><span·class="ss">function_clause</span><span·class="p">,</span><span·class="p"·data-group-id="1091220816-4">[</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·4b391ee5b3d5b7087b4e207387703d506c3f92270a59e4f1db999dc4c1398b8c·...·]-5">{</span><span·class="ss">tut2</span><span·class="p">,</span><span·class="ss">convert</span><span·class="p">,</span><span·class="w">
239 ································</span><span·class="p"·data-group-id="2330169867-6">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">miles</span><span·class="p"·data-group-id="2330169867-6">]</span><span·class="p">,</span><span·class="w">239 ································</span><span·class="p"·data-group-id="1091220816-6">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">miles</span><span·class="p"·data-group-id="1091220816-6">]</span><span·class="p">,</span><span·class="w">
240 ································</span><span·class="p"·data-group-id="2330169867-7">[</span><span·class="p"·data-group-id="2330169867-8">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;tut2.erl&quot;</span><span·class="p"·data-group-id="2330169867-8">}</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·268,·SHA:·f3d61ca27957021a991e34804dc3fa901f0389fccea2a141df426bc698381ff2·...·]-5">}</span><span·class="p">,</span><span·class="w">240 ································</span><span·class="p"·data-group-id="1091220816-7">[</span><span·class="p"·data-group-id="1091220816-8">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;tut2.erl&quot;</span><span·class="p"·data-group-id="1091220816-8">}</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·268,·SHA:·15dece68ed935ba1faeff7ec001fb3b85b4869282fe465effbe85aceecca0d39·...·]-5">}</span><span·class="p">,</span><span·class="w">
241 ··························</span><span·class="p"·data-group-id="2330169867-10">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">241 ··························</span><span·class="p"·data-group-id="1091220816-10">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">
242 ····································</span><span·class="p"·data-group-id="2330169867-11">[</span><span·class="p"·data-group-id="2330169867-12">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;erl_eval.erl&quot;</span><span·class="p"·data-group-id="2330169867-12">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·280,·SHA:·e800570e2e642e373cd71038db8f7cf3e08f78e9b45275b5e6106a76151dcb74·...·]-10">}</span><span·class="p">,</span><span·class="w">242 ····································</span><span·class="p"·data-group-id="1091220816-11">[</span><span·class="p"·data-group-id="1091220816-12">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;erl_eval.erl&quot;</span><span·class="p"·data-group-id="1091220816-12">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·280,·SHA:·844db37bbd7deed7a933dbf034b4f49c159a67ac3aa33b5462b6b3b449f23a71·...·]-10">}</span><span·class="p">,</span><span·class="w">
243 ··························</span><span·class="p"·data-group-id="2330169867-14">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="2330169867-15">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·486,·SHA:·b4b1e5dc05fd12636dd0b31e55473c806a5e06aa736d36674218cd55ddee1b4c·...·]-14">}</span><span·class="p">,</span><span·class="w">243 ··························</span><span·class="p"·data-group-id="1091220816-14">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="1091220816-15">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·486,·SHA:·76d00b331733d926a1e643dbb7619d544dfdf34dded691dd160ddf48e83ac08c·...·]-14">}</span><span·class="p">,</span><span·class="w">
244 ··························</span><span·class="p"·data-group-id="2330169867-18">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="2330169867-19">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·491,·SHA:·1fb3e73ef6d9a4b27718ffe1012017515ed219d7b9662e1a6ed7ae4f77e5ab3e·...·]-18">}</span><span·class="p">,</span><span·class="w">244 ··························</span><span·class="p"·data-group-id="1091220816-18">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="1091220816-19">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·491,·SHA:·bcac970b3db9cd10cc7c133a0f5fa42b15f65f64c8b64343735cc301ccbb8ee2·...·]-18">}</span><span·class="p">,</span><span·class="w">
245 ··························</span><span·class="p"·data-group-id="2330169867-22">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_loop</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">245 ··························</span><span·class="p"·data-group-id="1091220816-22">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_loop</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
246 ·································</span><span·class="p"·data-group-id="2330169867-23">[</span><span·class="p"·data-group-id="2330169867-24">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;shell.erl&quot;</span><span·class="p"·data-group-id="2330169867-24">}</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·437,·SHA:·5db4c85d8b46b64895d7158778eb852ce670d74c6c4b4dd04226457dd69532b1·...·]-2">}</span></code></pre><h2·id="tuples"·class="section-heading">246 ·································</span><span·class="p"·data-group-id="1091220816-23">[</span><span·class="p"·data-group-id="1091220816-24">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;shell.erl&quot;</span><span·class="p"·data-group-id="1091220816-24">}</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·437,·SHA:·518de32a9419a5356eaf88778462b607110cf480f50d9e4015b639ed160834c8·...·]-2">}</span></code></pre><h2·id="tuples"·class="section-heading">
247 ··<a·href="#tuples"·class="hover-link">247 ··<a·href="#tuples"·class="hover-link">
248 ····<i·class="ri-link-m"·aria-hidden="true"></i>248 ····<i·class="ri-link-m"·aria-hidden="true"></i>
249 ··</a>249 ··</a>
250 ··<span·class="text">Tuples</span>250 ··<span·class="text">Tuples</span>
251 </h2>251 </h2>
252 <p>Now·the·<code·class="inline">tut2</code>·program·is·hardly·good·programming·style.·Consider:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">tut2</span><span·class="p">:</span><span·class="nf">convert</span><span·class="p"·data-group-id="1886964072-1">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inch</span><span·class="p"·data-group-id="1886964072-1">)</span><span·class="p">.</span></code></pre><p>Does·this·mean·that·3·is·in·inches?·Or·does·it·mean·that·3·is·in·centimeters·and252 <p>Now·the·<code·class="inline">tut2</code>·program·is·hardly·good·programming·style.·Consider:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">tut2</span><span·class="p">:</span><span·class="nf">convert</span><span·class="p"·data-group-id="0774723944-1">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inch</span><span·class="p"·data-group-id="0774723944-1">)</span><span·class="p">.</span></code></pre><p>Does·this·mean·that·3·is·in·inches?·Or·does·it·mean·that·3·is·in·centimeters·and
253 is·to·be·converted·to·inches?·Erlang·has·a·way·to·group·things·together·to·make253 is·to·be·converted·to·inches?·Erlang·has·a·way·to·group·things·together·to·make
Max diff block lines reached; 386538/436229 bytes (88.61%) of diff not shown.
196 KB
./usr/share/doc/erlang-doc/html/doc/system/spec_proc.html
    
Offset 123, 72 lines modifiedOffset 123, 72 lines modified
123 ··<a·href="#simple-debugging"·class="hover-link">123 ··<a·href="#simple-debugging"·class="hover-link">
124 ····<i·class="ri-link-m"·aria-hidden="true"></i>124 ····<i·class="ri-link-m"·aria-hidden="true"></i>
125 ··</a>125 ··</a>
126 ··<span·class="text">Simple·Debugging</span>126 ··<span·class="text">Simple·Debugging</span>
127 </h2>127 </h2>
128 <p>The·<a·href="../../lib/stdlib-6.0.1/doc/html/sys.html"><code·class="inline">sys</code></a>·module·has·functions·for·simple·debugging·of·processes·implemented128 <p>The·<a·href="../../lib/stdlib-6.0.1/doc/html/sys.html"><code·class="inline">sys</code></a>·module·has·functions·for·simple·debugging·of·processes·implemented
129 using·behaviours.·The·<code·class="inline">code_lock</code>·example·from129 using·behaviours.·The·<code·class="inline">code_lock</code>·example·from
130 <a·href="statem.html#example">gen_statem·Behaviour</a>·is·used·to·illustrate·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">27</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">15.0</span><span·class="p"·data-group-id="2659245264-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-2">[</span><span·class="mi">64</spa[·...·truncated·by·diffoscope;·len:·1073,·SHA:·5ba59aab5ec13781e02a46bd647d6d773b7f95d924e8c556510801b69b450a75·...·]-6">]</span><span·class="w">130 <a·href="statem.html#example">gen_statem·Behaviour</a>·is·used·to·illustrate·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">27</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">15.0</span><span·class="p"·data-group-id="8571044432-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-2">[</span><span·class="mi">64</spa[·...·truncated·by·diffoscope;·len:·1073,·SHA:·0eecc776e9271924ac468bb4964be49c99ac57d29e1d69d1939f1a6c7620b225·...·]-6">]</span><span·class="w">
  
131 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V15</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-7">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·399,·SHA:·b70f64a4be105b439240cc0cb104a8a236251baaefb40788961fd53d763d28f7·...·]-7">)</span><span·class="gp·unselectable">131 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V15</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-7">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·399,·SHA:·19cae7eb1d1ba3f6997046cbda630584f47c543d58243af039baa68213fd7320·...·]-7">)</span><span·class="gp·unselectable">
132 1&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="2659245264-9">(</span><span·class="p"·data-group-id="2659245264-10">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cl[·...·truncated·by·diffoscope;·len:·87,·SHA:·73c1de0d227e39c002f83ce205c2f28a34b65d2ace6735d8646ffbb7d44c2b89·...·]-9">)</span><span·class="p">.</span><span·class="w">132 1&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="8571044432-9">(</span><span·class="p"·data-group-id="8571044432-10">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cl[·...·truncated·by·diffoscope;·len:·87,·SHA:·b89241c85c29a25b37f8871981a182b50956f787b3d1d9d7433845d092b4084a·...·]-9">)</span><span·class="p">.</span><span·class="w">
133 </span><span·class="n">Lock</span><span·class="w">133 </span><span·class="n">Lock</span><span·class="w">
134 </span><span·class="p"·data-group-id="2659245264-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2659245264-11">}</span><span·class="gp·unselectable">134 </span><span·class="p"·data-group-id="8571044432-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8571044432-11">}</span><span·class="gp·unselectable">
135 2&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">statistics</span><span·class="p"·data-group-id="2659245264-12">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="2659245264-12">)</span><span·class="p">.</span><span·class="w">135 2&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">statistics</span><span·class="p"·data-group-id="8571044432-12">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8571044432-12">)</span><span·class="p">.</span><span·class="w">
136 </span><span·class="ss">ok</span><span·class="gp·unselectable">136 </span><span·class="ss">ok</span><span·class="gp·unselectable">
137 3&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="2659245264-13">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="2659245264-13">)</span><span·class="p">.</span><span·class="w">137 3&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="8571044432-13">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8571044432-13">)</span><span·class="p">.</span><span·class="w">
138 </span><span·class="ss">ok</span><span·class="gp·unselectable">138 </span><span·class="ss">ok</span><span·class="gp·unselectable">
139 4&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="2659245264-14">(</span><span·class="mi">1</span><span·class="p"·data-group-id="2659245264-14">)</span><span·class="p">.</span><span·class="w">139 4&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="8571044432-14">(</span><span·class="mi">1</span><span·class="p"·data-group-id="8571044432-14">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-15">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2659245264-15">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">140 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-15">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8571044432-15">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">
141 </span><span·class="ss">ok</span><span·class="w">141 </span><span·class="ss">ok</span><span·class="w">
142 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-16">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2659245264-16">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">142 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-16">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8571044432-16">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">
143 5&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="2659245264-17">(</span><span·class="mi">2</span><span·class="p"·data-group-id="2659245264-17">)</span><span·class="p">.</span><span·class="w">143 5&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="8571044432-17">(</span><span·class="mi">2</span><span·class="p"·data-group-id="8571044432-17">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-18">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2659245264-18">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">144 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-18">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8571044432-18">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">
145 </span><span·class="ss">ok</span><span·class="w">145 </span><span·class="ss">ok</span><span·class="w">
146 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-19">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2659245264-19">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">146 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-19">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8571044432-19">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">
147 6&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="2659245264-20">(</span><span·class="mi">3</span><span·class="p"·data-group-id="2659245264-20">)</span><span·class="p">.</span><span·class="w">147 6&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="8571044432-20">(</span><span·class="mi">3</span><span·class="p"·data-group-id="8571044432-20">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-21">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="2659245264-21">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">148 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-21">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8571044432-21">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">
149 </span><span·class="ss">ok</span><span·class="w">149 </span><span·class="ss">ok</span><span·class="w">
150 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-22">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="2659245264-22">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">150 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-22">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8571044432-22">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">
151 7&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="2659245264-23">(</span><span·class="mi">4</span><span·class="p"·data-group-id="2659245264-23">)</span><span·class="p">.</span><span·class="w">151 7&gt;·</span><span·class="nc">code_lock</span><span·class="p">:</span><span·class="nf">button</span><span·class="p"·data-group-id="8571044432-23">(</span><span·class="mi">4</span><span·class="p"·data-group-id="8571044432-23">)</span><span·class="p">.</span><span·class="w">
152 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-24">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="2659245264-24">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">152 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-24">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="8571044432-24">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">
153 </span><span·class="ss">ok</span><span·class="w">153 </span><span·class="ss">ok</span><span·class="w">
154 </span><span·class="n">Unlock</span><span·class="w">154 </span><span·class="n">Unlock</span><span·class="w">
155 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-25">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="2659245264-25">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">155 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">cast</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-25">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="8571044432-25">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">
156 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="nb">start_timer</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-26">{</span><span·class="ss">state_timeout</span><span·class="p">,</span><span·class="mi">10000</span><span·class="p">,</span><span·class="ss">lock</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-27">[</span><span·class="[·...·truncated·by·diffoscope;·len:·82,·SHA:·80752512278f9a70e1bfb8715e7f24b459091b593b5dab2f47202c298c5e619a·...·]-26">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">156 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="nb">start_timer</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-26">{</span><span·class="ss">state_timeout</span><span·class="p">,</span><span·class="mi">10000</span><span·class="p">,</span><span·class="ss">lock</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-27">[</span><span·class="[·...·truncated·by·diffoscope;·len:·82,·SHA:·88c2d6ab7b2134f5ec990d4729c32d11dd3759a6400d4325180a7e1de9e75d6c·...·]-26">}</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">
157 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">state_timeout</span><span·class="w">·</span><span·class="ss">lock</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">157 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">state_timeout</span><span·class="w">·</span><span·class="ss">lock</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">
158 </span><span·class="n">Lock</span><span·class="w">158 </span><span·class="n">Lock</span><span·class="w">
159 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">state_timeout</span><span·class="w">·</span><span·class="ss">lock</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">159 </span><span·class="o">*</span><span·class="n">DBG</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="w">·</span><span·class="ss">consume</span><span·class="w">·</span><span·class="ss">state_timeout</span><span·class="w">·</span><span·class="ss">lock</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">open</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">locked</span><span·class="gp·unselectable">
160 8&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">statistics</span><span·class="p"·data-group-id="2659245264-28">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">get</span><span·class="p"·data-group-id="2659245264-28">)</span><span·class="p">.</span><span·class="w">160 8&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">statistics</span><span·class="p"·data-group-id="8571044432-28">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">get</span><span·class="p"·data-group-id="8571044432-28">)</span><span·class="p">.</span><span·class="w">
161 </span><span·class="p"·data-group-id="2659245264-29">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-30">[</span><span·class="p"·data-group-id="2659245264-31">{</span><span·class="ss">start_time</span><span·class="p">,</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·622,·SHA:·662801673d721ac15212954ee0da6addebedb5917da0cec0b2ac08d564c887d7·...·]-31">}</span><span·class="p">,</span><span·class="w">161 </span><span·class="p"·data-group-id="8571044432-29">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-30">[</span><span·class="p"·data-group-id="8571044432-31">{</span><span·class="ss">start_time</span><span·class="p">,</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·622,·SHA:·338aa00428e7599e7972efd2c9b99a847246ba90964f665a29c5a22e7c746fa5·...·]-31">}</span><span·class="p">,</span><span·class="w">
162 ·····</span><span·class="p"·data-group-id="2659245264-35">{</span><span·class="ss">current_time</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-36">{</span><span·class="p"·data-group-id="2659245264-37">{</span><span·class="mi">2024</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·467,·SHA:·a4e8777c846cf26e45958e9a2fdb5cd2d0963c8743ba202d6acffc8f991d1e34·...·]-35">}</span><span·class="p">,</span><span·class="w">162 ·····</span><span·class="p"·data-group-id="8571044432-35">{</span><span·class="ss">current_time</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-36">{</span><span·class="p"·data-group-id="8571044432-37">{</span><span·class="mi">2024</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·467,·SHA:·476d29f3714e1db0a2ce78f7dffa40405f7eaf1391db54bfaa0adf8b9bc1b142·...·]-35">}</span><span·class="p">,</span><span·class="w">
163 ·····</span><span·class="p"·data-group-id="2659245264-39">{</span><span·class="ss">reductions</span><span·class="p">,</span><span·class="mi">4098</span><span·class="p"·data-group-id="2659245264-39">}</span><span·class="p">,</span><span·class="w">163 ·····</span><span·class="p"·data-group-id="8571044432-39">{</span><span·class="ss">reductions</span><span·class="p">,</span><span·class="mi">4098</span><span·class="p"·data-group-id="8571044432-39">}</span><span·class="p">,</span><span·class="w">
164 ·····</span><span·class="p"·data-group-id="2659245264-40">{</span><span·class="ss">messages_in</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="2659245264-40">}</span><span·class="p">,</span><span·class="w">164 ·····</span><span·class="p"·data-group-id="8571044432-40">{</span><span·class="ss">messages_in</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="8571044432-40">}</span><span·class="p">,</span><span·class="w">
165 ·····</span><span·class="p"·data-group-id="2659245264-41">{</span><span·class="ss">messages_out</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="2659245264-41">}</span><span·class="p"·data-group-id="2659245264-30">]</span><span·class="p"·data-group-id="265924526[·...·truncated·by·diffoscope;·len:·1,·SHA:·4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a·...·]-29">}</span><span·class="gp·unselectable">165 ·····</span><span·class="p"·data-group-id="8571044432-41">{</span><span·class="ss">messages_out</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="8571044432-41">}</span><span·class="p"·data-group-id="8571044432-30">]</span><span·class="p"·data-group-id="857104443[·...·truncated·by·diffoscope;·len:·1,·SHA:·d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35·...·]-29">}</span><span·class="gp·unselectable">
166 9&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">statistics</span><span·class="p"·data-group-id="2659245264-42">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="2659245264-42">)</span><span·class="p">.</span><span·class="w">166 9&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">statistics</span><span·class="p"·data-group-id="8571044432-42">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8571044432-42">)</span><span·class="p">.</span><span·class="w">
167 </span><span·class="ss">ok</span><span·class="gp·unselectable">167 </span><span·class="ss">ok</span><span·class="gp·unselectable">
168 10&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="2659245264-43">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="2659245264-43">)</span><span·class="p">.</span><span·class="w">168 10&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="8571044432-43">(</span><span·class="ss">code_lock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8571044432-43">)</span><span·class="p">.</span><span·class="w">
169 </span><span·class="ss">ok</span><span·class="gp·unselectable">169 </span><span·class="ss">ok</span><span·class="gp·unselectable">
170 11&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">get_status</span><span·class="p"·data-group-id="2659245264-44">(</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="2659245264-44">)</span><span·class="p">.</span><span·class="w">170 11&gt;·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">get_status</span><span·class="p"·data-group-id="8571044432-44">(</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="8571044432-44">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="p"·data-group-id="2659245264-45">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">171 </span><span·class="p"·data-group-id="8571044432-45">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
172 ········</span><span·class="p"·data-group-id="2659245264-46">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="2659245264-46">}</span><span·class="p">,</span><span·class="w">172 ········</span><span·class="p"·data-group-id="8571044432-46">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="8571044432-46">}</span><span·class="p">,</span><span·class="w">
173 ········</span><span·class="p"·data-group-id="2659245264-47">[</span><span·class="p"·data-group-id="2659245264-48">[</span><span·class="p"·data-group-id="2659245264-49">{</span><span·class="ss">&#39;$initial_call&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-50">{</span>[·...·truncated·by·diffoscope;·len:·229,·SHA:·0b4bf54a46b8464053d879620dd10dfefbd1bb606bb5e000c58c98cead541cc9·...·]-49">}</span><span·class="p">,</span><span·class="w">173 ········</span><span·class="p"·data-group-id="8571044432-47">[</span><span·class="p"·data-group-id="8571044432-48">[</span><span·class="p"·data-group-id="8571044432-49">{</span><span·class="ss">&#39;$initial_call&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-50">{</span>[·...·truncated·by·diffoscope;·len:·229,·SHA:·f5660accdfeba44ba6de194dc65616e941b312493a3d128ee29da600ef571e69·...·]-49">}</span><span·class="p">,</span><span·class="w">
174 ··········</span><span·class="p"·data-group-id="2659245264-51">{</span><span·class="ss">&#39;$ancestors&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-52">[</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.87</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.70</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.65</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.69</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">174 ··········</span><span·class="p"·data-group-id="8571044432-51">{</span><span·class="ss">&#39;$ancestors&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-52">[</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.87</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.70</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.65</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.69</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
175 ·························</span><span·class="o">&lt;</span><span·class="mf">0.64</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">kernel_sup</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.47</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2659245264-52">]</span><span·class="p"·data-group-id="2659245264-51">}</span><span·class="p"·data-group-id="2659245264-48">]</span><span·class="p">,</span><span·class="w">175 ·························</span><span·class="o">&lt;</span><span·class="mf">0.64</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">kernel_sup</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.47</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8571044432-52">]</span><span·class="p"·data-group-id="8571044432-51">}</span><span·class="p"·data-group-id="8571044432-48">]</span><span·class="p">,</span><span·class="w">
176 ·········</span><span·class="ss">running</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-53">[</span><span·class="p"·data-group-id="2659245264-53">]</span><span·class="p">,</span><span·class="w">176 ·········</span><span·class="ss">running</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-53">[</span><span·class="p"·data-group-id="8571044432-53">]</span><span·class="p">,</span><span·class="w">
177 ·········</span><span·class="p"·data-group-id="2659245264-54">[</span><span·class="p"·data-group-id="2659245264-55">{</span><span·class="ss">header</span><span·class="p">,</span><span·class="s">&quot;Status·for·state·machine·code_lock&quot;</span><span·class="p"·data-group-id="2659245264-55">}</span><span·class="p">,</span><span·class="w">177 ·········</span><span·class="p"·data-group-id="8571044432-54">[</span><span·class="p"·data-group-id="8571044432-55">{</span><span·class="ss">header</span><span·class="p">,</span><span·class="s">&quot;Status·for·state·machine·code_lock&quot;</span><span·class="p"·data-group-id="8571044432-55">}</span><span·class="p">,</span><span·class="w">
178 ··········</span><span·class="p"·data-group-id="2659245264-56">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-57">[</span><span·class="p"·data-group-id="2659245264-58">{</span><span·class="s">&quot;Status&quot;</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·64,·SHA:·140b8edd95c7a4b2330517b6010956e827fa586c92c54b8b835d14a812309352·...·]-58">}</span><span·class="p">,</span><span·class="w">178 ··········</span><span·class="p"·data-group-id="8571044432-56">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-57">[</span><span·class="p"·data-group-id="8571044432-58">{</span><span·class="s">&quot;Status&quot;</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·64,·SHA:·68241a5ed4ed7611c7fc3b6d4873e46edf0017778ef44d7db24d388587d9bf4d·...·]-58">}</span><span·class="p">,</span><span·class="w">
179 ·················</span><span·class="p"·data-group-id="2659245264-59">{</span><span·class="s">&quot;Parent&quot;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="265924[·...·truncated·by·diffoscope;·len:·4,·SHA:·408ae596784e336f141c483f9bd28f3a7ab8ab5f79bebb07916b260a6bc339aa·...·]-59">}</span><span·class="p">,</span><span·class="w">179 ·················</span><span·class="p"·data-group-id="8571044432-59">{</span><span·class="s">&quot;Parent&quot;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="857104[·...·truncated·by·diffoscope;·len:·4,·SHA:·c848d8b966371b676698600ad8f542eca1b6aca7b8f4f3aef42e5e59d4c4e880·...·]-59">}</span><span·class="p">,</span><span·class="w">
180 ·················</span><span·class="p"·data-group-id="2659245264-60">{</span><span·class="s">&quot;Modules&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-61">[</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="2659245264-61">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·f8e531ec428cdaa5e0a74d4d44b85ab5a6646f7bb507ac66048851e4cfb2a32e·...·]-60">}</span><span·class="p">,</span><span·class="w">180 ·················</span><span·class="p"·data-group-id="8571044432-60">{</span><span·class="s">&quot;Modules&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-61">[</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="8571044432-61">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·bae9f325ac93c9478c1b4d8260d2ed320b0a5e2dc32cdf07b4a19f44def2f0a1·...·]-60">}</span><span·class="p">,</span><span·class="w">
181 ·················</span><span·class="p"·data-group-id="2659245264-62">{</span><span·class="s">&quot;Time-outs&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-63">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-64">[</span><span·cl[·...·truncated·by·diffoscope;·len:·141,·SHA:·64814ed261190029f5b5792daea7a8abdef5dc1b8b28204d469d3abada78e7c5·...·]-62">}</span><span·class="p">,</span><span·class="w">181 ·················</span><span·class="p"·data-group-id="8571044432-62">{</span><span·class="s">&quot;Time-outs&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-63">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-64">[</span><span·cl[·...·truncated·by·diffoscope;·len:·141,·SHA:·6b01850c5baab2587f8f97d8df30219c5eef1d7580c25e385b480171b98ecb00·...·]-62">}</span><span·class="p">,</span><span·class="w">
182 ·················</span><span·class="p"·data-group-id="2659245264-65">{</span><span·class="s">&quot;Logged·Events&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-66">[</span><span·class="p"·data-group-id="2659245264-66">]</span><span·class="p"·data-group-id="2659245264-65">}</span><span·class="p">,</span><span·class="w"> 
183 ·················</span><span·class="p"·data-group-id="2659245264-67">{</span><span·class="s">&quot;Postponed&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-68">[</span><span·class="p"·data-group-id="2659245264-68">]</span><span·class="p"·data-group-id="2659245264-67">}</span><sp[·...·truncated·by·diffoscope;·len:·95,·SHA:·6d75286484db6797092f4bfe41fdff9b2603b00a56709eaa0273998f4d5469bf·...·]">}</span><span·class="p">,</span><span·class="w">182 ·················</span><span·class="p"·data-group-id="8571044432-65">{</span><span·class="s">&quot;Logged·Events&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-66">[</span><span·class="p"·data-group-id="8571044432-66">]</span><span·class="p"·data-group-id="8571044432-65">}</span><span·class="p">,</span><span·class="w">
 183 ·················</span><span·class="p"·data-group-id="8571044432-67">{</span><span·class="s">&quot;Postponed&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-68">[</span><span·class="p"·data-group-id="8571044432-68">]</span><span·class="p"·data-group-id="8571044432-67">}</span><span·class="p"·data-group-id="8571044432-57">]</span><span·class="p"·data-group-id="8571044432-56">}</span><span·class="p">,</span><span·class="w">
184 ··········</span><span·class="p"·data-group-id="2659245264-69">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-70">[</span><span·class="p"·data-group-id="2659245264-71">{</span><span·class="s">&quot;State&quot;</span><span·class="p">,</span><span·class="w">184 ··········</span><span·class="p"·data-group-id="8571044432-69">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-70">[</span><span·class="p"·data-group-id="8571044432-71">{</span><span·class="s">&quot;State&quot;</span><span·class="p">,</span><span·class="w">
185 ··················</span><span·class="p"·data-group-id="2659245264-72">{</span><span·class="ss">locked</span><span·class="p">,</span><span·class="p"·data-group-id="2659245264-73">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·247,·SHA:·4f8772807bcab2bdced5139f8fb2c0ba4b234f4176986a3dc18ec0c70047cd23·...·]-74">]</span><span·class="p">,</span><span·class="w">185 ··················</span><span·class="p"·data-group-id="8571044432-72">{</span><span·class="ss">locked</span><span·class="p">,</span><span·class="p"·data-group-id="8571044432-73">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·247,·SHA:·5865ef5ffbc6b9a60e291880b69caaeacf97f9eafcfa16aa3c1e209cdc849018·...·]-74">]</span><span·class="p">,</span><span·class="w">
186 ····························</span><span·class="nb">length</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">buttons</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2659245264-75">[</span><span·class="p"·data-group-id="2659245264-75">]</span><span·class="p"·data-group-id="2659245264-73">}</span><span·class="p"·data-group-id="2659245264-72">}</span><span·class="p"·data-group-id="2659245264-71">}</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·240,·SHA:·b2025e81e8bcb11e77bf5e79e582c457c5f4e821580dae15fc27ab966334c345·...·]-45">}</span></code></pre><h2·id="special-processes"·class="section-heading">186 ····························</span><span·class="nb">length</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">buttons</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8571044432-75">[</span><span·class="p"·data-group-id="8571044432-75">]</span><span·class="p"·data-group-id="8571044432-73">}</span><span·class="p"·data-group-id="8571044432-72">}</span><span·class="p"·data-group-id="8571044432-71">}</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·240,·SHA:·7b925057b434a28f3899fc9fe1fc7ac71087634cfed812f4a443ee0e820259f9·...·]-45">}</span></code></pre><h2·id="special-processes"·class="section-heading">
187 ··<a·href="#special-processes"·class="hover-link">187 ··<a·href="#special-processes"·class="hover-link">
188 ····<i·class="ri-link-m"·aria-hidden="true"></i>188 ····<i·class="ri-link-m"·aria-hidden="true"></i>
189 ··</a>189 ··</a>
190 ··<span·class="text">Special·Processes</span>190 ··<span·class="text">Special·Processes</span>
191 </h2>191 </h2>
192 <p>This·section·describes·how·to·write·a·process·that·complies·to·the·OTP·design192 <p>This·section·describes·how·to·write·a·process·that·complies·to·the·OTP·design
193 principles,·without·using·a·standard·behaviour.·Such·a·process·is·to:</p><ul><li>Be·started·in·a·way·that·makes·the·process·fit·into·a·supervision·tree</li><li>Support·the·<code·class="inline">sys</code>·<a·href="spec_proc.html#debug">debug·facilities</a></li><li>Take·care·of·<a·href="spec_proc.html#msg">system·messages</a>.</li></ul><p>System·messages·are·messages·with·a·special·meaning,·used·in·the·supervision193 principles,·without·using·a·standard·behaviour.·Such·a·process·is·to:</p><ul><li>Be·started·in·a·way·that·makes·the·process·fit·into·a·supervision·tree</li><li>Support·the·<code·class="inline">sys</code>·<a·href="spec_proc.html#debug">debug·facilities</a></li><li>Take·care·of·<a·href="spec_proc.html#msg">system·messages</a>.</li></ul><p>System·messages·are·messages·with·a·special·meaning,·used·in·the·supervision
Offset 198, 238 lines modifiedOffset 198, 238 lines modified
198 ··<a·href="#example"·class="hover-link">198 ··<a·href="#example"·class="hover-link">
199 ····<i·class="ri-link-m"·aria-hidden="true"></i>199 ····<i·class="ri-link-m"·aria-hidden="true"></i>
200 ··</a>200 ··</a>
201 ··<span·class="text">Example</span>201 ··<span·class="text">Example</span>
202 </h3>202 </h3>
203 <p>Here·follows·the·simple·server·from203 <p>Here·follows·the·simple·server·from
204 <a·href="design_principles.html#ch1">Overview</a>,204 <a·href="design_principles.html#ch1">Overview</a>,
205 implemented·using·<code·class="inline">sys</code>·and·<code·class="inline">proc_lib</code>·to·fit·into·a·supervision·tree:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4862165384-1">(</span><span·class="ss">ch4</span><span·class="p"·data-group-id="4862165384-1">)</span><span·class="p">.</span><span·class="w">205 implemented·using·<code·class="inline">sys</code>·and·<code·class="inline">proc_lib</code>·to·fit·into·a·supervision·tree:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2688099344-1">(</span><span·class="ss">ch4</span><span·class="p"·data-group-id="2688099344-1">)</span><span·class="p">.</span><span·class="w">
206 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4862165384-2">(</span><span·class="p"·data-group-id="4862165384-3">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4862165384-3">]</span><span·class="p"·data-group-id="4862165384-2">)</span><span·class="p">.</span><span·class="w">206 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2688099344-2">(</span><span·class="p"·data-group-id="2688099344-3">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="2688099344-3">]</span><span·class="p"·data-group-id="2688099344-2">)</span><span·class="p">.</span><span·class="w">
207 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4862165384-4">(</span><span·class="p"·data-group-id="4862165384-5">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·115,·SHA:·95854b5c789b7530215de4e127d55ac07d3f289798b9549db534cd066f990a5c·...·]4-4">)</span><span·class="p">.</span><span·class="w">207 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2688099344-4">(</span><span·class="p"·data-group-id="2688099344-5">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">free</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·115,·SHA:·848c08e05d9cc7df50955897ead203eb17708eb571ec2420400226a7b5ed6b74·...·]4-4">)</span><span·class="p">.</span><span·class="w">
208 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4862165384-6">(</span><span·class="p"·data-group-id="4862165384-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4862165384-7">]</span><span·class="p"·data-group-id="4862165384-6">)</span><span·class="p">.</span><span·class="w">208 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2688099344-6">(</span><span·class="p"·data-group-id="2688099344-7">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="2688099344-7">]</span><span·class="p"·data-group-id="2688099344-6">)</span><span·class="p">.</span><span·class="w">
209 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4862165384-8">(</span><span·class="p"·data-group-id="4862165384-9">[</span><span·class="ss">system_continue</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">system_terminate</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">209 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2688099344-8">(</span><span·class="p"·data-group-id="2688099344-9">[</span><span·class="ss">system_continue</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">system_terminate</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">
210 ·········</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">210 ·········</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
211 ·········</span><span·class="ss">system_get_state</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">system_replace_state</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="4862165384-9">]</span><span·class="p"·data-group-id="4862165384-8">)</span><span·class="p">.</span><span·class="w">211 ·········</span><span·class="ss">system_get_state</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">system_replace_state</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="2688099344-9">]</span><span·class="p"·data-group-id="2688099344-8">)</span><span·class="p">.</span><span·class="w">
  
212 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="4862165384-10">(</span><span·class="p"·data-group-id="4862165384-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">212 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="2688099344-10">(</span><span·class="p"·data-group-id="2688099344-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
213 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4862165384-11">(</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-12">[</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·83f1193908abda4c1cb2f30a1f4917701998e5eb0db4816e6fdee2cf281d9558·...·]4-11">)</span><span·class="p">.</span><span·class="w">213 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="2688099344-11">(</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-12">[</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·e98016b362cf9979a819afa7beefa3bc87bcda3f612449883b1ddde08f0b276f·...·]4-11">)</span><span·class="p">.</span><span·class="w">
  
214 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="4862165384-14">(</span><span·class="p"·data-group-id="4862165384-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="2688099344-14">(</span><span·class="p"·data-group-id="2688099344-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ····</span><span·class="ss">ch4</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-15">{</span><span·class="nf">self</span><span·class="p"·data-group-id="4862165384-16">(</span><span·class="p"·data-group-id="4862165384-16">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·20,·SHA:·30cb4ac3f634c5734c52308580602cd8569450f3290d2b41abae97230100c43f·...·]4-15">}</span><span·class="p">,</span><span·class="w">215 ····</span><span·class="ss">ch4</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-15">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2688099344-16">(</span><span·class="p"·data-group-id="2688099344-16">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·20,·SHA:·c12eb6cd6ceebc7a0a677979400e621ba2c3ab31096216753581610a7e156d3a·...·]4-15">}</span><span·class="p">,</span><span·class="w">
216 ····</span><span·class="k">receive</span><span·class="w">216 ····</span><span·class="k">receive</span><span·class="w">
217 ········</span><span·class="p"·data-group-id="4862165384-17">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="4862165384-17">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">217 ········</span><span·class="p"·data-group-id="2688099344-17">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Res</span><span·class="p"·data-group-id="2688099344-17">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
218 ············</span><span·class="n">Res</span><span·class="w">218 ············</span><span·class="n">Res</span><span·class="w">
219 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">219 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
220 </span><span·class="nf">free</span><span·class="p"·data-group-id="4862165384-18">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="4862165384-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">220 </span><span·class="nf">free</span><span·class="p"·data-group-id="2688099344-18">(</span><span·class="n">Ch</span><span·class="p"·data-group-id="2688099344-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
221 ····</span><span·class="ss">ch4</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-19">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4862165384-19">}</span><span·class="p">,</span><span·class="w">221 ····</span><span·class="ss">ch4</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-19">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="2688099344-19">}</span><span·class="p">,</span><span·class="w">
222 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">222 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
223 </span><span·class="nf">init</span><span·class="p"·data-group-id="4862165384-20">(</span><span·class="n">Parent</span><span·class="p"·data-group-id="4862165384-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 </span><span·class="nf">init</span><span·class="p"·data-group-id="2688099344-20">(</span><span·class="n">Parent</span><span·class="p"·data-group-id="2688099344-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="4862165384-21">(</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="4862165384-22">(</span><span·class="p"·data-group-id="4862165384-22">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·613c95e7e21613ac9a177410e914b18f650f181b7c192d1a41e12b58c5c36cff·...·]4-21">)</span><span·class="p">,</span><span·class="w">224 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="2688099344-21">(</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="2688099344-22">(</span><span·class="p"·data-group-id="2688099344-22">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·5b9309e77eca67486d26afaa4b1bb934bd760188b6147e1acb812ba6315e1889·...·]4-21">)</span><span·class="p">,</span><span·class="w">
225 ····</span><span·class="n">Chs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="4862165384-23">(</span><span·class="p"·data-group-id="4862165384-23">)</span><span·class="p">,</span><span·class="w">225 ····</span><span·class="n">Chs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">channels</span><span·class="p"·data-group-id="2688099344-23">(</span><span·class="p"·data-group-id="2688099344-23">)</span><span·class="p">,</span><span·class="w">
226 ····</span><span·class="n">Deb</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">debug_options</span><span·class="p"·data-group-id="4862165384-24">(</span><span·class="p"·data-group-id="4862165384-25">[</span><span·class="p"·data-group-id="4862165384-25">]</span><span·class="p"·data-group-id="4862165384-24">)</span><span·class="p">,</span><span·class="w">226 ····</span><span·class="n">Deb</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">debug_options</span><span·class="p"·data-group-id="2688099344-24">(</span><span·class="p"·data-group-id="2688099344-25">[</span><span·class="p"·data-group-id="2688099344-25">]</span><span·class="p"·data-group-id="2688099344-24">)</span><span·class="p">,</span><span·class="w">
227 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_ack</span><span·class="p"·data-group-id="4862165384-26">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-27">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·eafab4a527709add6319f29143f7c7406348f12c4dffe8dff43e0c3c4a2aaa74·...·]4-26">)</span><span·class="p">,</span><span·class="w">227 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_ack</span><span·class="p"·data-group-id="2688099344-26">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-27">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·d7df11819ab5a9b45c4ad5f0ce32fd1f72b90bad3a12d9cbfcaeca66a22d5e6c·...·]4-26">)</span><span·class="p">,</span><span·class="w">
228 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="4862165384-29">(</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb</span><span·class="p"·data-group-id="4862165384-29">)</span><span·class="p">.</span><span·class="w">228 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="2688099344-29">(</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb</span><span·class="p"·data-group-id="2688099344-29">)</span><span·class="p">.</span><span·class="w">
  
229 </span><span·class="nf">loop</span><span·class="p"·data-group-id="4862165384-30">(</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb</span><span·class="p"·data-group-id="4862165384-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">229 </span><span·class="nf">loop</span><span·class="p"·data-group-id="2688099344-30">(</span><span·class="n">Chs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb</span><span·class="p"·data-group-id="2688099344-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
230 ····</span><span·class="k">receive</span><span·class="w">230 ····</span><span·class="k">receive</span><span·class="w">
231 ········</span><span·class="p"·data-group-id="4862165384-31">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="4862165384-31">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 ········</span><span·class="p"·data-group-id="2688099344-31">{</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="2688099344-31">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ············</span><span·class="n">Deb2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">handle_debug</span><span·class="p"·data-group-id="4862165384-32">(</span><span·class="n">Deb</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">ch4</span><span·class="p">:</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">232 ············</span><span·class="n">Deb2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">handle_debug</span><span·class="p"·data-group-id="2688099344-32">(</span><span·class="n">Deb</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">ch4</span><span·class="p">:</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
233 ····································</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-33">{</span><span·class="ss">in</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="4862165384-33">}</span><[·...·truncated·by·diffoscope;·len:·39,·SHA:·d6096fe8c609350057e28fc4d0b67993eac62218ce79d7e8acab9d247ec4ed9d·...·]4-32">)</span><span·class="p">,</span><span·class="w">233 ····································</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-33">{</span><span·class="ss">in</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="2688099344-33">}</span><[·...·truncated·by·diffoscope;·len:·39,·SHA:·91a281cda7f5dcbcfa42f963ebff0be9bd9bec613ebeb52088863a4ce2d7157b·...·]4-32">)</span><span·class="p">,</span><span·class="w">
234 ············</span><span·class="p"·data-group-id="4862165384-34">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="4862165384-34">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·142,·SHA:·99eaea16787268277bdea356f485f3f25942fe6dfc6bb311ce11af42d52bda96·...·]4-35">)</span><span·class="p">,</span><span·class="w">234 ············</span><span·class="p"·data-group-id="2688099344-34">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs2</span><span·class="p"·data-group-id="2688099344-34">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·142,·SHA:·c06fb2537a24023c1aab541097a4fc1ce0abbd5f637f7ae813842d10a89c268e·...·]4-35">)</span><span·class="p">,</span><span·class="w">
235 ············</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-36">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4862165384-36">}</span><span·class="p">,</span><span·class="w">235 ············</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-36">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="2688099344-36">}</span><span·class="p">,</span><span·class="w">
236 ············</span><span·class="n">Deb3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">handle_debug</span><span·class="p"·data-group-id="4862165384-37">(</span><span·class="n">Deb2</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">ch4</span><span·class="p">:</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">236 ············</span><span·class="n">Deb3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">handle_debug</span><span·class="p"·data-group-id="2688099344-37">(</span><span·class="n">Deb2</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">ch4</span><span·class="p">:</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
237 ····································</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-38">{</span><span·class="ss">out</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-39">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><spa[·...·truncated·by·diffoscope;·len:·219,·SHA:·947b0a306a8c10aac12d3ec7a79e17850494d8557e68de627478dabd0ec8e1a7·...·]4-37">)</span><span·class="p">,</span><span·class="w">237 ····································</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-38">{</span><span·class="ss">out</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-39">{</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><spa[·...·truncated·by·diffoscope;·len:·219,·SHA:·51ed64411317ce56a7e8a7daf24ee675bb8a442d39ccb7e7df6237d05c3d7aca·...·]4-37">)</span><span·class="p">,</span><span·class="w">
238 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4862165384-40">(</span><span·class="n">Chs2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb3</span><span·class="p"·data-group-id="4862165384-40">)</span><span·class="p">;</span><span·class="w">238 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="2688099344-40">(</span><span·class="n">Chs2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb3</span><span·class="p"·data-group-id="2688099344-40">)</span><span·class="p">;</span><span·class="w">
239 ········</span><span·class="p"·data-group-id="4862165384-41">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="4862165384-41">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">239 ········</span><span·class="p"·data-group-id="2688099344-41">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><span·class="p"·data-group-id="2688099344-41">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
240 ············</span><span·class="n">Deb2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">handle_debug</span><span·class="p"·data-group-id="4862165384-42">(</span><span·class="n">Deb</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">ch4</span><span·class="p">:</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">240 ············</span><span·class="n">Deb2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sys</span><span·class="p">:</span><span·class="nf">handle_debug</span><span·class="p"·data-group-id="2688099344-42">(</span><span·class="n">Deb</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">ch4</span><span·class="p">:</span><span·class="ss">write_debug</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
241 ····································</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-43">{</span><span·class="ss">in</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4862165384-44">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><spa[·...·truncated·by·diffoscope;·len:·144,·SHA:·b715dc1d41969c82d9986f14c33ec615ee7013822dfce598a2d99aff7382dbf7·...·]4-42">)</span><span·class="p">,</span><span·class="w">241 ····································</span><span·class="ss">ch4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-43">{</span><span·class="ss">in</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2688099344-44">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ch</span><spa[·...·truncated·by·diffoscope;·len:·144,·SHA:·e3bbde036cad1ea6fef7d5054f17737f127e3b7051fc2a6459e559e0e780c85d·...·]4-42">)</span><span·class="p">,</span><span·class="w">
242 ············</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="4862165384-45">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="4862165384-45">)</span><span·class="p">,</span><span·class="w">242 ············</span><span·class="n">Chs2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="2688099344-45">(</span><span·class="n">Ch</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Chs</span><span·class="p"·data-group-id="2688099344-45">)</span><span·class="p">,</span><span·class="w">
243 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4862165384-46">(</span><span·class="n">Chs2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb2</span><span·class="p"·data-group-id="4862165384-46">)</span><span·class="p">;</span><span·class="w">243 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="2688099344-46">(</span><span·class="n">Chs2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Deb2</span><span·class="p"·data-group-id="2688099344-46">)</span><span·class="p">;</span><span·class="w">
  
244 ········</span><span·class="p"·data-group-id="4862165384-47">{</span><span·class="ss">system</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p"·data-group-id="4862165384-47">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">244 ········</span><span·class="p"·data-group-id="2688099344-47">{</span><span·class="ss">system</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Request</span><span·class="p"·data-group-id="2688099344-47">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 121650/200912 bytes (60.55%) of diff not shown.
368 KB
./usr/share/doc/erlang-doc/html/doc/system/statem.html
    
Offset 122, 15 lines modifiedOffset 122, 15 lines modified
122 ··<span·class="text">Event-Driven·State·Machines</span>122 ··<span·class="text">Event-Driven·State·Machines</span>
123 </h2>123 </h2>
124 <p>Established·Automata·Theory·does·not·deal·much·with·how·a·<em>state·transition</em>·is124 <p>Established·Automata·Theory·does·not·deal·much·with·how·a·<em>state·transition</em>·is
125 triggered,·but·assumes·that·the·output·is·a·function·of·the·input·(and·the125 triggered,·but·assumes·that·the·output·is·a·function·of·the·input·(and·the
126 state)·and·that·they·are·some·kind·of·values.</p><p>For·an·Event-Driven·State·Machine,·the·input·is·an·event·that·triggers·a·<em>state126 state)·and·that·they·are·some·kind·of·values.</p><p>For·an·Event-Driven·State·Machine,·the·input·is·an·event·that·triggers·a·<em>state
127 transition</em>·and·the·output·is·actions·executed·during·the·<em>state·transition</em>.127 transition</em>·and·the·output·is·actions·executed·during·the·<em>state·transition</em>.
128 Analogously·to·the·mathematical·model·of·a·Finite·State·Machine,·it·can·be128 Analogously·to·the·mathematical·model·of·a·Finite·State·Machine,·it·can·be
129 described·as·a·set·of·relations·of·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">State</span><span·class="p"·data-group-id="4770096987-1">(</span><span·class="n">S</span><span·class="p"·data-group-id="4770096987-1">)</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Event</span><span·class="p"·data-group-id="4770096987-2">(</span><sp[·...·truncated·by·diffoscope;·len:·534,·SHA:·11fdc4abbb3495982f61918a510cf7d9d7bbd0cb87a2667be58358d79c692254·...·]-4">)</span></code></pre><p>These·relations·are·interpreted·as·follows:·if·we·are·in·state·<code·class="inline">S</code>·and·event·<code·class="inline">E</code>129 described·as·a·set·of·relations·of·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">State</span><span·class="p"·data-group-id="1607656999-1">(</span><span·class="n">S</span><span·class="p"·data-group-id="1607656999-1">)</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Event</span><span·class="p"·data-group-id="1607656999-2">(</span><sp[·...·truncated·by·diffoscope;·len:·534,·SHA:·c67218cb76187dec4060c51239b24f577f3bc2bae279ce13f1051f6207110fad·...·]-4">)</span></code></pre><p>These·relations·are·interpreted·as·follows:·if·we·are·in·state·<code·class="inline">S</code>·and·event·<code·class="inline">E</code>
130 occurs,·we·are·to·perform·actions·<code·class="inline">A</code>,·and·make·a·transition·to·state·<code·class="inline">S'</code>.130 occurs,·we·are·to·perform·actions·<code·class="inline">A</code>,·and·make·a·transition·to·state·<code·class="inline">S'</code>.
131 Notice·that·<code·class="inline">S'</code>·can·be·equal·to·<code·class="inline">S</code>,·and·that·<code·class="inline">A</code>·can·be·empty.</p><p>In·<code·class="inline">gen_statem</code>·we·define·a·<em>state·change</em>·as·a·<em>state·transition</em>·in·which·the131 Notice·that·<code·class="inline">S'</code>·can·be·equal·to·<code·class="inline">S</code>,·and·that·<code·class="inline">A</code>·can·be·empty.</p><p>In·<code·class="inline">gen_statem</code>·we·define·a·<em>state·change</em>·as·a·<em>state·transition</em>·in·which·the
132 new·state·<code·class="inline">S'</code>·is·different·from·the·current·state·<code·class="inline">S</code>,·where·&quot;different&quot;·means132 new·state·<code·class="inline">S'</code>·is·different·from·the·current·state·<code·class="inline">S</code>,·where·&quot;different&quot;·means
133 Erlang's·strict·inequality:·<code·class="inline">=/=</code>·also·known·as·&quot;does·not·match&quot;.·<code·class="inline">gen_statem</code>133 Erlang's·strict·inequality:·<code·class="inline">=/=</code>·also·known·as·&quot;does·not·match&quot;.·<code·class="inline">gen_statem</code>
134 does·more·things·during·<em>state·changes</em>·than·during·other·<em>state·transitions</em>.</p><p>As·<code·class="inline">A</code>·and·<code·class="inline">S'</code>·depend·only·on·<code·class="inline">S</code>·and·<code·class="inline">E</code>,·the·kind·of·state·machine·described134 does·more·things·during·<em>state·changes</em>·than·during·other·<em>state·transitions</em>.</p><p>As·<code·class="inline">A</code>·and·<code·class="inline">S'</code>·depend·only·on·<code·class="inline">S</code>·and·<code·class="inline">E</code>,·the·kind·of·state·machine·described
135 here·is·a·Mealy·machine·(see,·for·example,·the·Wikipedia·article135 here·is·a·Mealy·machine·(see,·for·example,·the·Wikipedia·article
136 <a·href="https://en.wikipedia.org/wiki/Mealy_machine">Mealy·machine</a>).</p><p>Similar·to·most·<code·class="inline">gen_</code>·behaviours,·<code·class="inline">gen_statem</code>·keeps·a·server·<code·class="inline">Data</code>136 <a·href="https://en.wikipedia.org/wiki/Mealy_machine">Mealy·machine</a>).</p><p>Similar·to·most·<code·class="inline">gen_</code>·behaviours,·<code·class="inline">gen_statem</code>·keeps·a·server·<code·class="inline">Data</code>
Offset 396, 20 lines modifiedOffset 396, 20 lines modified
396 ··</a>396 ··</a>
397 ··<span·class="text">State·Enter·Calls</span>397 ··<span·class="text">State·Enter·Calls</span>
398 </h2>398 </h2>
399 <p>The·<code·class="inline">gen_statem</code>·behaviour·can·if·this·is·enabled,·regardless·of·<em>callback399 <p>The·<code·class="inline">gen_statem</code>·behaviour·can·if·this·is·enabled,·regardless·of·<em>callback
400 mode</em>,·automatically400 mode</em>,·automatically
401 <a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#t:state_enter/0">call·the·state·callback·</a>with·special·arguments401 <a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#t:state_enter/0">call·the·state·callback·</a>with·special·arguments
402 whenever·the·state·changes·so·you·can·write·state·enter·actions·near·the·rest·of402 whenever·the·state·changes·so·you·can·write·state·enter·actions·near·the·rest·of
403 the·<em>state·transition</em>·rules.·It·typically·looks·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">StateName</span><span·class="p"·data-group-id="5813051162-1">(</span><span·class="ss">enter</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OldState</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="5813051162-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">403 the·<em>state·transition</em>·rules.·It·typically·looks·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">StateName</span><span·class="p"·data-group-id="0349254697-1">(</span><span·class="ss">enter</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OldState</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="0349254697-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
404 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">enter</span><span·class="w">·</span><span·class="ss">actions</span><span·class="w">·</span><span·class="ss">here</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">404 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">state</span><span·class="w">·</span><span·class="ss">enter</span><span·class="w">·</span><span·class="ss">actions</span><span·class="w">·</span><span·class="ss">here</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
405 ····</span><span·class="p"·data-group-id="5813051162-2">{</span><span·class="ss">keep_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewData</span><span·class="p"·data-group-id="5813051162-2">}</span><span·class="p">;</span><span·class="w">405 ····</span><span·class="p"·data-group-id="0349254697-2">{</span><span·class="ss">keep_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewData</span><span·class="p"·data-group-id="0349254697-2">}</span><span·class="p">;</span><span·class="w">
406 </span><span·class="n">StateName</span><span·class="p"·data-group-id="5813051162-3">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="5813051162-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">406 </span><span·class="n">StateName</span><span·class="p"·data-group-id="0349254697-3">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="0349254697-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
407 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">actions</span><span·class="w">·</span><span·class="ss">here</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">407 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">actions</span><span·class="w">·</span><span·class="ss">here</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
408 ····</span><span·class="p"·data-group-id="5813051162-4">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewStateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewData</span><span·class="p"·data-group-id="58130511[·...·truncated·by·diffoscope;·len:·2,·SHA:·81b8a03f97e8787c53fe1a86bda042b6f0de9b0ec9c09357e107c99ba4d6948a·...·]-4">}</span><span·class="p">.</span></code></pre><p>Since·the·<em>state·enter·call</em>·is·not·an·event·there·are·restrictions·on·the408 ····</span><span·class="p"·data-group-id="0349254697-4">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewStateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewData</span><span·class="p"·data-group-id="03492546[·...·truncated·by·diffoscope;·len:·2,·SHA:·d6d824abba4afde81129c71dea75b8100e96338da5f416d2f69088f1960cb091·...·]-4">}</span><span·class="p">.</span></code></pre><p>Since·the·<em>state·enter·call</em>·is·not·an·event·there·are·restrictions·on·the
409 allowed·return·value·and409 allowed·return·value·and
410 <a·href="statem.html#transition-actions">State·Transition·Actions</a>.·You·must·not·change·the410 <a·href="statem.html#transition-actions">State·Transition·Actions</a>.·You·must·not·change·the
411 state,·<a·href="statem.html#postponing-events">postpone</a>·this·non-event,411 state,·<a·href="statem.html#postponing-events">postpone</a>·this·non-event,
412 <a·href="statem.html#inserted-events">insert·any·events</a>,·or·change·the412 <a·href="statem.html#inserted-events">insert·any·events</a>,·or·change·the
413 <a·href="statem.html#callback-module"><em>callback·module</em></a>.</p><p>The·first·state·that·is·entered·will·get·a·<em>state·enter·call</em>·with·<code·class="inline">OldState</code>413 <a·href="statem.html#callback-module"><em>callback·module</em></a>.</p><p>The·first·state·that·is·entered·will·get·a·<em>state·enter·call</em>·with·<code·class="inline">OldState</code>
414 equal·to·the·current·state.</p><p>You·may·repeat·the·<em>state·enter·call</em>·using·the·<code·class="inline">{repeat_state,...}</code>·return414 equal·to·the·current·state.</p><p>You·may·repeat·the·<em>state·enter·call</em>·using·the·<code·class="inline">{repeat_state,...}</code>·return
415 value·from·the·<a·href="statem.html#state-callback">state·callback</a>.·In·this·case415 value·from·the·<a·href="statem.html#state-callback">state·callback</a>.·In·this·case
Offset 492, 72 lines modifiedOffset 492, 72 lines modified
  
492 ····locked······--&gt;·check_code·:·{button, Button}\n* Collect·Buttons492 ····locked······--&gt;·check_code·:·{button, Button}\n* Collect·Buttons
493 ····check_code··--&gt;·locked·····:·Incorrect·code493 ····check_code··--&gt;·locked·····:·Incorrect·code
494 ····check_code··--&gt;·open·······:·Correct·code\n* do_unlock()\n* Clear·Buttons\n* Set·state_timeout·10·s494 ····check_code··--&gt;·open·······:·Correct·code\n* do_unlock()\n* Clear·Buttons\n* Set·state_timeout·10·s
  
495 ····open········--&gt;·open···:·{button, Digit}495 ····open········--&gt;·open···:·{button, Digit}
496 ····open········--&gt;·locked·:·state_timeout\n* do_lock()</code></pre><p>This·code·lock·state·machine·can·be·implemented·using·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html"><code·class="inline">gen_statem</code></a>·with·the496 ····open········--&gt;·locked·:·state_timeout\n* do_lock()</code></pre><p>This·code·lock·state·machine·can·be·implemented·using·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html"><code·class="inline">gen_statem</code></a>·with·the
497 following·<em>callback·module</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4472506288-1">(</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="4472506288-1">)</span><span·class="p">.</span><span·class="w">497 following·<em>callback·module</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3644748938-1">(</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="3644748938-1">)</span><span·class="p">.</span><span·class="w">
498 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="4472506288-2">(</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="4472506288-2">)</span><span·class="p">.</span><span·class="w">498 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="3644748938-2">(</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="3644748938-2">)</span><span·class="p">.</span><span·class="w">
499 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="4472506288-3">(</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="4472506288-3">)</span><span·class="p">.</span><span·class="w">499 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3644748938-3">(</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="3644748938-3">)</span><span·class="p">.</span><span·class="w">
500 </span><span·class="w">500 </span><span·class="w">
501 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4472506288-4">(</span><span·class="p"·data-group-id="4472506288-5">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4472506288-5">]</span><span·class="p"·data-group-id="4472506288-4">)</span><span·class="p">.</span><span·class="w">501 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3644748938-4">(</span><span·class="p"·data-group-id="3644748938-5">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3644748938-5">]</span><span·class="p"·data-group-id="3644748938-4">)</span><span·class="p">.</span><span·class="w">
502 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4472506288-6">(</span><span·class="p"·data-group-id="4472506288-7">[</span><span·class="ss">button</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4472506288-7">]</span><span·class="p"·data-group-id="4472506288-6">)</span><span·class="p">.</span><span·class="w">502 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3644748938-6">(</span><span·class="p"·data-group-id="3644748938-7">[</span><span·class="ss">button</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3644748938-7">]</span><span·class="p"·data-group-id="3644748938-6">)</span><span·class="p">.</span><span·class="w">
503 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4472506288-8">(</span><span·class="p"·data-group-id="4472506288-9">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">callback_mode</span><span·class="p">/</span><span·class="mi">0<[·...·truncated·by·diffoscope;·len:·205,·SHA:·2d77a451876bcc04c7abb0ea0ef39aff5d4bdb03317dddd1d07ec16335aa5dae·...·]8-8">)</span><span·class="p">.</span><span·class="w">503 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3644748938-8">(</span><span·class="p"·data-group-id="3644748938-9">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">callback_mode</span><span·class="p">/</span><span·class="mi">0<[·...·truncated·by·diffoscope;·len:·205,·SHA:·993293a1a434202212e3db541b959cd6ae9287e9c51f6e4548f38cc97afff4db·...·]8-8">)</span><span·class="p">.</span><span·class="w">
504 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4472506288-10">(</span><span·class="p"·data-group-id="4472506288-11">[</span><span·class="ss">locked</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">open</span><span·class="p">/</span><span·class="mi">3</span[·...·truncated·by·diffoscope;·len:·95,·SHA:·79daa25ec4be10bb9e9884e59487c38e5a90a3d8c3b93d0ed4eca2303632fa83·...·]8-10">)</span><span·class="p">.</span><span·class="w">504 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3644748938-10">(</span><span·class="p"·data-group-id="3644748938-11">[</span><span·class="ss">locked</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">open</span><span·class="p">/</span><span·class="mi">3</span[·...·truncated·by·diffoscope;·len:·95,·SHA:·deae0386b12645da610d59d25178a58c424a004d5256b88656acbf9624b5db22·...·]8-10">)</span><span·class="p">.</span><span·class="w">
  
505 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="4472506288-12">(</span><span·class="n">Code</span><span·class="p"·data-group-id="4472506288-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">505 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="3644748938-12">(</span><span·class="n">Code</span><span·class="p"·data-group-id="3644748938-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
506 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4472506288-13">(</span><span·class="p"·data-group-id="4472506288-14">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="4472506288-14">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·351,·SHA:·fa044328589f332d719639824830fc3bbd93da382ecc31320aa95a35a715ac94·...·]8-13">)</span><span·class="p">.</span><span·class="w">506 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="3644748938-13">(</span><span·class="p"·data-group-id="3644748938-14">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="3644748938-14">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·351,·SHA:·be596402ab5f3862273b7677874bd6f4098407df839d122f39ab38a8df5fd446·...·]8-13">)</span><span·class="p">.</span><span·class="w">
  
507 </span><span·class="nf">button</span><span·class="p"·data-group-id="4472506288-16">(</span><span·class="n">Button</span><span·class="p"·data-group-id="4472506288-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">507 </span><span·class="nf">button</span><span·class="p"·data-group-id="3644748938-16">(</span><span·class="n">Button</span><span·class="p"·data-group-id="3644748938-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
508 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="4472506288-17">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4472506288-18">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Button</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·9fff5c379408dcd3e2a5b74d3faf9f7e919b250d8b533b3c22208c44d8ae0379·...·]8-17">)</span><span·class="p">.</span><span·class="w">508 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="3644748938-17">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3644748938-18">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Button</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·1f85f984246fed7d27f8c6199bd6df8295572e14c1f1f56f92dd3edb3d00a1ba·...·]8-17">)</span><span·class="p">.</span><span·class="w">
  
509 </span><span·class="nf">init</span><span·class="p"·data-group-id="4472506288-19">(</span><span·class="n">Code</span><span·class="p"·data-group-id="4472506288-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">509 </span><span·class="nf">init</span><span·class="p"·data-group-id="3644748938-19">(</span><span·class="n">Code</span><span·class="p"·data-group-id="3644748938-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
510 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="4472506288-20">(</span><span·class="p"·data-group-id="4472506288-20">)</span><span·class="p">,</span><span·class="w">510 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="3644748938-20">(</span><span·class="p"·data-group-id="3644748938-20">)</span><span·class="p">,</span><span·class="w">
511 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4472506288-21">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">length</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·521,·SHA:·a4a69af8d0160e8289b1f63c2ed39e13b12c2535cd41238f25c3966d4e296d77·...·]8-21">}</span><span·class="p">,</span><span·class="w">511 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3644748938-21">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">length</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·521,·SHA:·e3d1e25f9fe83661fffd1150c2764aae79b2ca926b8373d30c0890a67e8dfb5b·...·]8-21">}</span><span·class="p">,</span><span·class="w">
512 ····</span><span·class="p"·data-group-id="4472506288-24">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="4472506288-24">}</span><span·class="p">.</span><span·class="w">512 ····</span><span·class="p"·data-group-id="3644748938-24">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3644748938-24">}</span><span·class="p">.</span><span·class="w">
  
513 </span><span·class="nf">callback_mode</span><span·class="p"·data-group-id="4472506288-25">(</span><span·class="p"·data-group-id="4472506288-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">513 </span><span·class="nf">callback_mode</span><span·class="p"·data-group-id="3644748938-25">(</span><span·class="p"·data-group-id="3644748938-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
514 ····</span><span·class="ss">state_functions</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">locked</span><span·class="p"·data-group-id="1742968935-1">(</span><span·class="w">514 ····</span><span·class="ss">state_functions</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">locked</span><span·class="p"·data-group-id="4922185772-1">(</span><span·class="w">
515 ··</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1742968935-2">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Button</span><span·class="p"·data-group-id="1742968935-2">}</span><span·class="p">,</span><span·class="w">515 ··</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4922185772-2">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Button</span><span·class="p"·data-group-id="4922185772-2">}</span><span·class="p">,</span><span·class="w">
516 ··</span><span·class="p"·data-group-id="1742968935-3">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">length</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·450,·SHA:·a11ea2dcd1181b671fadb7fb7d09105539843b63bf6da50fe3241daec79f041c·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">516 ··</span><span·class="p"·data-group-id="4922185772-3">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">length</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·450,·SHA:·0922c4a82d6814eaf8c650df8550a24d1bf16efd445419f760952bbef6841f4c·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
517 ····</span><span·class="n">NewButtons</span><span·class="w">·</span><span·class="o">=</span><span·class="w">517 ····</span><span·class="n">NewButtons</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
518 ········</span><span·class="k">if</span><span·class="w">518 ········</span><span·class="k">if</span><span·class="w">
519 ············</span><span·class="nf">length</span><span·class="p"·data-group-id="1742968935-4">(</span><span·class="n">Buttons</span><span·class="p"·data-group-id="1742968935-4">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="n">Length</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">519 ············</span><span·class="nf">length</span><span·class="p"·data-group-id="4922185772-4">(</span><span·class="n">Buttons</span><span·class="p"·data-group-id="4922185772-4">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="n">Length</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
520 ················</span><span·class="n">Buttons</span><span·class="p">;</span><span·class="w">520 ················</span><span·class="n">Buttons</span><span·class="p">;</span><span·class="w">
521 ············</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">521 ············</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
522 ················</span><span·class="nf">tl</span><span·class="p"·data-group-id="1742968935-5">(</span><span·class="n">Buttons</span><span·class="p"·data-group-id="1742968935-5">)</span><span·class="w">522 ················</span><span·class="nf">tl</span><span·class="p"·data-group-id="4922185772-5">(</span><span·class="n">Buttons</span><span·class="p"·data-group-id="4922185772-5">)</span><span·class="w">
523 ········</span><span·class="k">end</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="1742968935-6">[</span><span·class="n">Button</span><span·class="p"·data-group-id="1742968935-6">]</span><span·class="p">,</span><span·class="w">523 ········</span><span·class="k">end</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="4922185772-6">[</span><span·class="n">Button</span><span·class="p"·data-group-id="4922185772-6">]</span><span·class="p">,</span><span·class="w">
524 ····</span><span·class="k">if</span><span·class="w">524 ····</span><span·class="k">if</span><span·class="w">
525 ········</span><span·class="n">NewButtons</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Code</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="c1">%·Correct</span><span·class="w">525 ········</span><span·class="n">NewButtons</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Code</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="c1">%·Correct</span><span·class="w">
526 »       ····</span><span·class="nf">do_unlock</span><span·class="p"·data-group-id="1742968935-7">(</span><span·class="p"·data-group-id="1742968935-7">)</span><span·class="p">,</span><span·class="w">526 »       ····</span><span·class="nf">do_unlock</span><span·class="p"·data-group-id="4922185772-7">(</span><span·class="p"·data-group-id="4922185772-7">)</span><span·class="p">,</span><span·class="w">
527 ············</span><span·class="p"·data-group-id="1742968935-8">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="1742968935-9">#{</[·...·truncated·by·diffoscope;·len:·258,·SHA:·bf18de1b9d7ca398865290ee3c1c9b9671270370981927926d275cd7ede4dbd6·...·]-9">}</span><span·class="p">,</span><span·class="w">527 ············</span><span·class="p"·data-group-id="4922185772-8">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="4922185772-9">#{</[·...·truncated·by·diffoscope;·len:·258,·SHA:·0b446e6ac088ec2a39c7d4ae090904a38fdb214dbc8d791413331fd4e9058e82·...·]-9">}</span><span·class="p">,</span><span·class="w">
528 ·············</span><span·class="p"·data-group-id="1742968935-11">[</span><span·class="p"·data-group-id="1742968935-12">{</span><span·class="ss">state_timeout</span><span·class="p">,</span><span·class="mi">10</span><span·class="p">_</span><span·class="mi">000</span><span·class="p">,</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·160,·SHA:·c455f3e2000442c4b486b45fe8ab9027a60741e17dfbd38f356a4bb0ba73df37·...·]-8">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·Time·in·milliseconds</span><span·class="w">528 ·············</span><span·class="p"·data-group-id="4922185772-11">[</span><span·class="p"·data-group-id="4922185772-12">{</span><span·class="ss">state_timeout</span><span·class="p">,</span><span·class="mi">10</span><span·class="p">_</span><span·class="mi">000</span><span·class="p">,</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·160,·SHA:·8ee2bd096817bfc8533bdaef6a5ba81cab85f0731f36542ad653f093abd03721·...·]-8">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·Time·in·milliseconds</span><span·class="w">
529 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="c1">%·Incomplete·|·Incorrect</span><span·class="w">529 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="c1">%·Incomplete·|·Incorrect</span><span·class="w">
530 ············</span><span·class="p"·data-group-id="1742968935-13">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="1742968935-14">[·...·truncated·by·diffoscope;·len:·241,·SHA:·16c3a931cf3213125324476054488ab5421e547a2db1f499462f6925cb3c0f00·...·]-13">}</span><span·class="w">530 ············</span><span·class="p"·data-group-id="4922185772-13">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="4922185772-14">[·...·truncated·by·diffoscope;·len:·241,·SHA:·2f06788a82f36200ffcc28573f0513daa367940dbf1a9dbe9ca26e34207138c1·...·]-13">}</span><span·class="w">
531 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">open</span><span·class="p"·data-group-id="7404477961-1">(</span><span·class="ss">state_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">lock</span><span·class="p">,</span><span·class="w">··</span><span·class="n">Data</span><span·class="p"·data-group-id="7404477961-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">531 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">open</span><span·class="p"·data-group-id="9672399945-1">(</span><span·class="ss">state_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">lock</span><span·class="p">,</span><span·class="w">··</span><span·class="n">Data</span><span·class="p"·data-group-id="9672399945-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
532 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="7404477961-2">(</span><span·class="p"·data-group-id="7404477961-2">)</span><span·class="p">,</span><span·class="w">532 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="9672399945-2">(</span><span·class="p"·data-group-id="9672399945-2">)</span><span·class="p">,</span><span·class="w">
533 ····</span><span·class="p"·data-group-id="7404477961-3">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7404477961-3">}</span><span·class="p">;</span><span·class="w">533 ····</span><span·class="p"·data-group-id="9672399945-3">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="9672399945-3">}</span><span·class="p">;</span><span·class="w">
534 </span><span·class="nf">open</span><span·class="p"·data-group-id="7404477961-4">(</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7404477961-5">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·142,·SHA:·cc6a6dc9be1f2b341d368f4a9314cd95da43084454fe3dd88f23b84601d7491b·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">534 </span><span·class="nf">open</span><span·class="p"·data-group-id="9672399945-4">(</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9672399945-5">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·142,·SHA:·6ce21c28fa355dfc89f5377a8d7eda297cafaf7ec5a070adb566616519ec38b7·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
535 ····</span><span·class="p"·data-group-id="7404477961-6">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7404477961-6">}</s[·...·truncated·by·diffoscope;·len:·214,·SHA:·a94e5af9326373cb2e6a83e0016ebf4303e0fde88e92f1bc29ac8a230e30b927·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">535 ····</span><span·class="p"·data-group-id="9672399945-6">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="9672399945-6">}</s[·...·truncated·by·diffoscope;·len:·214,·SHA:·42be87b30ebef799ae607337ebc09d3d21b0e7478bc854609af8bb240f47261e·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
536 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3339944369-2">(</span><span·class="s">&quot;Lock</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3339944369-3">[</span><span·class="p"·data-group-id="3339944369-3">[·...·truncated·by·diffoscope;·len:·49,·SHA:·9fa14904eceb7e54d522f088431f4bfecc8500f3b55d3d8fe4464f94255484ca·...·]-2">)</span><span·class="p">.</span><span·class="w">536 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1542204943-2">(</span><span·class="s">&quot;Lock</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1542204943-3">[</span><span·class="p"·data-group-id="1542204943-3">[·...·truncated·by·diffoscope;·len:·49,·SHA:·a5b16d034b911c43310a6064c22a381ce565eb704f80bf29ed1c08c459bc3dba·...·]-2">)</span><span·class="p">.</span><span·class="w">
537 </span><span·class="nf">do_unlock</span><span·class="p"·data-group-id="3339944369-4">(</span><span·class="p"·data-group-id="3339944369-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">537 </span><span·class="nf">do_unlock</span><span·class="p"·data-group-id="1542204943-4">(</span><span·class="p"·data-group-id="1542204943-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
538 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3339944369-5">(</span><span·class="s">&quot;Unlock</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3339944369-6">[</span><span·class="p"·data-group-id="3339944369-6[·...·truncated·by·diffoscope;·len:·51,·SHA:·5d1c7a3061833ac39fe591949d6987bf5a5a3ad43fcdfef3cde1bd4e188c9c09·...·]-5">)</span><span·class="p">.</span><span·class="w">538 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1542204943-5">(</span><span·class="s">&quot;Unlock</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1542204943-6">[</span><span·class="p"·data-group-id="1542204943-6[·...·truncated·by·diffoscope;·len:·51,·SHA:·8c15434487b6e9ba1664d5da4f4caf4029ac9279e96cef9fa2ea96dbda2eeba2·...·]-5">)</span><span·class="p">.</span><span·class="w">
  
539 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="3339944369-7">(</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Data</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·6906e9cf321b4e89959b65a39a1c21fee85a1a0acab7c0d1066b558ca39133ca·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">539 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="1542204943-7">(</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Data</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·a241406ead0b6a2775aba818662a6e794ce1c7c49835f6fe8bd0bd93cc26c9a6·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
540 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=/=</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">·</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="3339944369-8">(</span><span·class="p"·data-group-id="3339944369-8">)</span><span·class="p">,</span><span·class="w">540 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=/=</span><span·class="w">·</span><span·class="ss">locked</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">·</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="1542204943-8">(</span><span·class="p"·data-group-id="1542204943-8">)</span><span·class="p">,</span><span·class="w">
541 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>The·code·is·explained·in·the·next·sections.</p><h2·id="starting-gen_statem"·class="section-heading">541 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>The·code·is·explained·in·the·next·sections.</p><h2·id="starting-gen_statem"·class="section-heading">
542 ··<a·href="#starting-gen_statem"·class="hover-link">542 ··<a·href="#starting-gen_statem"·class="hover-link">
543 ····<i·class="ri-link-m"·aria-hidden="true"></i>543 ····<i·class="ri-link-m"·aria-hidden="true"></i>
544 ··</a>544 ··</a>
545 ··<span·class="text">Starting·gen_statem</span>545 ··<span·class="text">Starting·gen_statem</span>
546 </h2>546 </h2>
547 <p>In·the·example·in·the·previous·section,·<code·class="inline">gen_statem</code>·is·started·by·calling547 <p>In·the·example·in·the·previous·section,·<code·class="inline">gen_statem</code>·is·started·by·calling
548 <code·class="inline">code_lock:start_link(Code)</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start_link</span><span·class="p"·data-group-id="9568771347-1">(</span><span·class="n">Code</span><span·class="p"·data-group-id="9568771347-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">548 <code·class="inline">code_lock:start_link(Code)</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start_link</span><span·class="p"·data-group-id="0705589045-1">(</span><span·class="n">Code</span><span·class="p"·data-group-id="0705589045-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
549 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="9568771347-2">(</span><span·class="p"·data-group-id="9568771347-3">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="9568771347-3">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·347,·SHA:·08b8f3270719554ee20bafae6d415dcdc714191a8ea66a0b354b4f65a295c343·...·]-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">start_link/1</code>·calls·function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/4"><code·class="inline">gen_statem:start_link/4</code></a>,·which·spawns·and·links·to549 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="0705589045-2">(</span><span·class="p"·data-group-id="0705589045-3">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="0705589045-3">}</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·347,·SHA:·8bb39527a64bbf071fa63002804fb8ed55cb4f6814404abba2d09ee2e4263a69·...·]-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">start_link/1</code>·calls·function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/4"><code·class="inline">gen_statem:start_link/4</code></a>,·which·spawns·and·links·to
550 a·new·process,·a·<code·class="inline">gen_statem</code>.</p><ul><li><p>The·first·argument,·<code·class="inline">{local,?NAME}</code>,·specifies·the·name.·In·this·case,·the550 a·new·process,·a·<code·class="inline">gen_statem</code>.</p><ul><li><p>The·first·argument,·<code·class="inline">{local,?NAME}</code>,·specifies·the·name.·In·this·case,·the
551 <code·class="inline">gen_statem</code>·is·locally·registered·as·<code·class="inline">code_lock</code>·through·the·macro·<code·class="inline">?NAME</code>.</p><p>If·the·name·is·omitted,·the·<code·class="inline">gen_statem</code>·is·not·registered.·Instead·its·pid551 <code·class="inline">gen_statem</code>·is·locally·registered·as·<code·class="inline">code_lock</code>·through·the·macro·<code·class="inline">?NAME</code>.</p><p>If·the·name·is·omitted,·the·<code·class="inline">gen_statem</code>·is·not·registered.·Instead·its·pid
552 must·be·used.·The·name·can·also·be·specified·as·<code·class="inline">{global,Name}</code>,·then·the552 must·be·used.·The·name·can·also·be·specified·as·<code·class="inline">{global,Name}</code>,·then·the
553 <code·class="inline">gen_statem</code>·is·registered·using·<a·href="../../lib/kernel-10.0.1/doc/html/global.html#register_name/2"><code·class="inline">global:register_name/2</code></a>·in·Kernel.</p></li><li><p>The·second·argument,·<code·class="inline">?MODULE</code>,·is·the·name·of·the·<em>callback·module</em>,·that·is,553 <code·class="inline">gen_statem</code>·is·registered·using·<a·href="../../lib/kernel-10.0.1/doc/html/global.html#register_name/2"><code·class="inline">global:register_name/2</code></a>·in·Kernel.</p></li><li><p>The·second·argument,·<code·class="inline">?MODULE</code>,·is·the·name·of·the·<em>callback·module</em>,·that·is,
554 the·module·where·the·callback·functions·are·located,·which·is·this·module.</p><p>The·interface·functions·(<code·class="inline">start_link/1</code>·and·<code·class="inline">button/1</code>)·are·located·in·the554 the·module·where·the·callback·functions·are·located,·which·is·this·module.</p><p>The·interface·functions·(<code·class="inline">start_link/1</code>·and·<code·class="inline">button/1</code>)·are·located·in·the
555 same·module·as·the·callback·functions·(<code·class="inline">init/1</code>,·<code·class="inline">locked/3</code>,·and·<code·class="inline">open/3</code>).·It555 same·module·as·the·callback·functions·(<code·class="inline">init/1</code>,·<code·class="inline">locked/3</code>,·and·<code·class="inline">open/3</code>).·It
556 is·normally·good·programming·practice·to·have·the·client-side·code·and·the556 is·normally·good·programming·practice·to·have·the·client-side·code·and·the
Offset 566, 184 lines modifiedOffset 566, 184 lines modified
566 see·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/3"><code·class="inline">gen_statem:start_link/3</code></a>.</p></li></ul><p>If·name·registration·succeeds,·the·new·<code·class="inline">gen_statem</code>·process·calls·callback566 see·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/3"><code·class="inline">gen_statem:start_link/3</code></a>.</p></li></ul><p>If·name·registration·succeeds,·the·new·<code·class="inline">gen_statem</code>·process·calls·callback
567 function·<code·class="inline">code_lock:init(Code)</code>.·This·function·is·expected·to·return567 function·<code·class="inline">code_lock:init(Code)</code>.·This·function·is·expected·to·return
568 <code·class="inline">{ok,·State,·Data}</code>,·where·<code·class="inline">State</code>·is·the·initial·state·of·the·<code·class="inline">gen_statem</code>,·in568 <code·class="inline">{ok,·State,·Data}</code>,·where·<code·class="inline">State</code>·is·the·initial·state·of·the·<code·class="inline">gen_statem</code>,·in
569 this·case·<code·class="inline">locked</code>;·assuming·that·the·door·is·locked·to·begin·with.·<code·class="inline">Data</code>·is569 this·case·<code·class="inline">locked</code>;·assuming·that·the·door·is·locked·to·begin·with.·<code·class="inline">Data</code>·is
570 the·internal·server·data·of·the·<code·class="inline">gen_statem</code>.·Here·the·server·data·is·a570 the·internal·server·data·of·the·<code·class="inline">gen_statem</code>.·Here·the·server·data·is·a
571 <a·href="../../lib/stdlib-6.0.1/doc/html/maps.html">map</a>·with·key·<code·class="inline">code</code>·that·stores·the·correct·button·sequence,·key571 <a·href="../../lib/stdlib-6.0.1/doc/html/maps.html">map</a>·with·key·<code·class="inline">code</code>·that·stores·the·correct·button·sequence,·key
572 <code·class="inline">length</code>·store·its·length,·and·key·<code·class="inline">buttons</code>·that·stores·the·collected·buttons572 <code·class="inline">length</code>·store·its·length,·and·key·<code·class="inline">buttons</code>·that·stores·the·collected·buttons
573 up·to·the·same·length.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="6304268745-1">(</span><span·class="n">Code</span><span·class="p"·data-group-id="6304268745-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">573 up·to·the·same·length.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="1238608103-1">(</span><span·class="n">Code</span><span·class="p"·data-group-id="1238608103-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
574 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="6304268745-2">(</span><span·class="p"·data-group-id="6304268745-2">)</span><span·class="p">,</span><span·class="w">574 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="1238608103-2">(</span><span·class="p"·data-group-id="1238608103-2">)</span><span·class="p">,</span><span·class="w">
575 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6304268745-3">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">length</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·517,·SHA:·36af7f79ab38f0c0802f61c249a13c3fb19467ab1103d06636cec9c2d1dec58d·...·]-3">}</span><span·class="p">,</span><span·class="w">575 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1238608103-3">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">length</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·517,·SHA:·14941f99f44010d0fbbb285995e4079bfc5f8468e3d7ec7fc9570f78da410c69·...·]-3">}</span><span·class="p">,</span><span·class="w">
576 ····</span><span·class="p"·data-group-id="6304268745-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="6304268745-6">}</span><span·class="p">.</span></code></pre><p>Function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/3"><code·class="inline">gen_statem:start_link/3,4</code></a>·is·synchronous.·It576 ····</span><span·class="p"·data-group-id="1238608103-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="1238608103-6">}</span><span·class="p">.</span></code></pre><p>Function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/3"><code·class="inline">gen_statem:start_link/3,4</code></a>·is·synchronous.·It
577 does·not·return·until·the·<code·class="inline">gen_statem</code>·is·initialized·and·is·ready·to·receive577 does·not·return·until·the·<code·class="inline">gen_statem</code>·is·initialized·and·is·ready·to·receive
578 events.</p><p>Function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/3"><code·class="inline">gen_statem:start_link/3,4</code></a>·must·be·used·if578 events.</p><p>Function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/3"><code·class="inline">gen_statem:start_link/3,4</code></a>·must·be·used·if
579 the·<code·class="inline">gen_statem</code>·is·part·of·a·supervision·tree,·that·is,·started·by·a579 the·<code·class="inline">gen_statem</code>·is·part·of·a·supervision·tree,·that·is,·started·by·a
580 supervisor.·Another·function,·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start/3"><code·class="inline">gen_statem:start/3,4</code></a>·can·be580 supervisor.·Another·function,·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start/3"><code·class="inline">gen_statem:start/3,4</code></a>·can·be
581 used·to·start·a·standalone·<code·class="inline">gen_statem</code>,·meaning·it·is·not·part·of·a·supervision581 used·to·start·a·standalone·<code·class="inline">gen_statem</code>,·meaning·it·is·not·part·of·a·supervision
582 tree.</p><p>Function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#c:callback_mode/0"><code·class="inline">Module:callback_mode/0</code></a>·selects·the582 tree.</p><p>Function·<a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#c:callback_mode/0"><code·class="inline">Module:callback_mode/0</code></a>·selects·the
Max diff block lines reached; 326013/377154 bytes (86.44%) of diff not shown.
63.8 KB
./usr/share/doc/erlang-doc/html/doc/system/sup_princ.html
    
Offset 128, 48 lines modifiedOffset 128, 48 lines modified
128 the·order·specified·by·this·list,·and·are·terminated·in·the·reverse·order.</p><h2·id="example"·class="section-heading">128 the·order·specified·by·this·list,·and·are·terminated·in·the·reverse·order.</p><h2·id="example"·class="section-heading">
129 ··<a·href="#example"·class="hover-link">129 ··<a·href="#example"·class="hover-link">
130 ····<i·class="ri-link-m"·aria-hidden="true"></i>130 ····<i·class="ri-link-m"·aria-hidden="true"></i>
131 ··</a>131 ··</a>
132 ··<span·class="text">Example</span>132 ··<span·class="text">Example</span>
133 </h2>133 </h2>
134 <p>The·callback·module·for·a·supervisor·starting·the·server·from134 <p>The·callback·module·for·a·supervisor·starting·the·server·from
135 <a·href="gen_server_concepts.html#ex">gen_server·Behaviour</a>·can·look·as·follows:</p><p><a·href=""·id="ex"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0750774476-1">(</span><span·class="ss">ch_sup</span><span·class="p"·data-group-id="0750774476-1">)</span><span·class="p">.</span><span·class="w">135 <a·href="gen_server_concepts.html#ex">gen_server·Behaviour</a>·can·look·as·follows:</p><p><a·href=""·id="ex"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8307205902-1">(</span><span·class="ss">ch_sup</span><span·class="p"·data-group-id="8307205902-1">)</span><span·class="p">.</span><span·class="w">
136 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="0750774476-2">(</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="0750774476-2">)</span><span·class="p">.</span><span·class="w">136 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="8307205902-2">(</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="8307205902-2">)</span><span·class="p">.</span><span·class="w">
137 </span><span·class="w">137 </span><span·class="w">
138 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0750774476-3">(</span><span·class="p"·data-group-id="0750774476-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0750774476-4">]</span><span·class="p"·data-group-id="0750774476-3">)</span><span·class="p">.</span><span·class="w"> 
139 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0750774476-5">(</span><span·class="p"·data-group-id="0750774476-6">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="0750774476-6">]</span><span·class="p"·data-group-id="0750774476-5">)</span><span·class="p">.</span><span·class="w">138 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8307205902-3">(</span><span·class="p"·data-group-id="8307205902-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="8307205902-4">]</span><span·class="p"·data-group-id="8307205902-3">)</span><span·class="p">.</span><span·class="w">
 139 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8307205902-5">(</span><span·class="p"·data-group-id="8307205902-6">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="8307205902-6">]</span><span·class="p"·data-group-id="8307205902-5">)</span><span·class="p">.</span><span·class="w">
  
140 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="0750774476-7">(</span><span·class="p"·data-group-id="0750774476-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">140 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="8307205902-7">(</span><span·class="p"·data-group-id="8307205902-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
141 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="0750774476-8">(</span><span·class="ss">ch_sup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-9">[</span><span·class="p"·data-group-id="0750774476-9">]</span><span·class="p"·data-group-id="0750774476-8">)</span><span·class="p">.</span><span·class="w">141 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="8307205902-8">(</span><span·class="ss">ch_sup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-9">[</span><span·class="p"·data-group-id="8307205902-9">]</span><span·class="p"·data-group-id="8307205902-8">)</span><span·class="p">.</span><span·class="w">
  
142 </span><span·class="nf">init</span><span·class="p"·data-group-id="0750774476-10">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="0750774476-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">142 </span><span·class="nf">init</span><span·class="p"·data-group-id="8307205902-10">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="8307205902-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
143 ····</span><span·class="n">SupFlags</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-11">#{</span><span·class="ss">strategy</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">one_for_one</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">intensity</span><span·cl[·...·truncated·by·diffoscope;·len:·313,·SHA:·f5e5d6337978e42fbebc5ed4c58d04a47ad84eeea50564b68dbace80cb88e9ef·...·]-11">}</span><span·class="p">,</span><span·class="w">143 ····</span><span·class="n">SupFlags</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-11">#{</span><span·class="ss">strategy</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">one_for_one</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">intensity</span><span·cl[·...·truncated·by·diffoscope;·len:·313,·SHA:·5b87213c7fdec4fe3fdf63c9e1ede20079e401066b5a85b03b308cceaaf861fc·...·]-11">}</span><span·class="p">,</span><span·class="w">
144 ····</span><span·class="n">ChildSpecs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-12">[</span><span·class="p"·data-group-id="0750774476-13">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">144 ····</span><span·class="n">ChildSpecs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-12">[</span><span·class="p"·data-group-id="8307205902-13">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">
145 ····················</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-14">{</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-15">[</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·73,·SHA:·0448c15b231742eeb8b55e999b5d16dba3bd86d2a3cbd6630aa46ca078350cd5·...·]-14">}</span><span·class="p">,</span><span·class="w">145 ····················</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-14">{</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-15">[</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·73,·SHA:·307b1678e5d6063d881033552a885b243de10103fbd3885d450b3418a06dc107·...·]-14">}</span><span·class="p">,</span><span·class="w">
146 ····················</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">permanent</span><span·class="p">,</span><span·class="w">146 ····················</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">permanent</span><span·class="p">,</span><span·class="w">
147 ····················</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="p">,</span><span·class="w">147 ····················</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="p">,</span><span·class="w">
148 ····················</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">worker</span><span·class="p">,</span><span·class="w">148 ····················</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">worker</span><span·class="p">,</span><span·class="w">
149 ····················</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-16">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="0750774476-16">]</span><span·class="p"·data-group-id="0750774476-13">}</span><span·class="p"·data-group-id="0750774476-12">]</span><span·class="p">,</span><span·class="w">149 ····················</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-16">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="8307205902-16">]</span><span·class="p"·data-group-id="8307205902-13">}</span><span·class="p"·data-group-id="8307205902-12">]</span><span·class="p">,</span><span·class="w">
150 ····</span><span·class="p"·data-group-id="0750774476-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0750774476-18">{</span><span·class="n">SupFlags</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChildSpecs[·...·truncated·by·diffoscope;·len:·102,·SHA:·986a885eeb71a1e7617f050301723e318adb3ab5b6784c86c6f2d540395df190·...·]-17">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">SupFlags</code>·variable·in·the·return·value·from·<code·class="inline">init/1</code>·represents·the150 ····</span><span·class="p"·data-group-id="8307205902-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8307205902-18">{</span><span·class="n">SupFlags</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChildSpecs[·...·truncated·by·diffoscope;·len:·102,·SHA:·67d09b1024c106b9b9b3cffab5df5dc8be37982a1b348b4d6b24854761a7e55a·...·]-17">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">SupFlags</code>·variable·in·the·return·value·from·<code·class="inline">init/1</code>·represents·the
151 <a·href="sup_princ.html#flags">supervisor·flags</a>.</p><p>The·<code·class="inline">ChildSpecs</code>·variable·in·the·return·value·from·<code·class="inline">init/1</code>·is·a·list·of151 <a·href="sup_princ.html#flags">supervisor·flags</a>.</p><p>The·<code·class="inline">ChildSpecs</code>·variable·in·the·return·value·from·<code·class="inline">init/1</code>·is·a·list·of
152 <a·href="sup_princ.html#spec">child·specifications</a>.</p><p><a·href=""·id="flags"></a></p><h2·id="supervisor-flags"·class="section-heading">152 <a·href="sup_princ.html#spec">child·specifications</a>.</p><p><a·href=""·id="flags"></a></p><h2·id="supervisor-flags"·class="section-heading">
153 ··<a·href="#supervisor-flags"·class="hover-link">153 ··<a·href="#supervisor-flags"·class="hover-link">
154 ····<i·class="ri-link-m"·aria-hidden="true"></i>154 ····<i·class="ri-link-m"·aria-hidden="true"></i>
155 ··</a>155 ··</a>
156 ··<span·class="text">Supervisor·Flags</span>156 ··<span·class="text">Supervisor·Flags</span>
157 </h2>157 </h2>
158 <p>This·is·the·type·definition·for·the·supervisor·flags:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sup_flags</span><span·class="p"·data-group-id="5534767514-1">(</span><span·class="p"·data-group-id="5534767514-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5534767514-2">#{</span><span·class="ss">strategy</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">strategy</span><span·class="p"·data-group-id="5534767514-3">(</span><span·class="p"·data-group-id="5534767514-3">)</span><span·class="p">,</span><span·class="w">···········</span><span·class="c1">%·optional</span><span·class="w"> 
159 ················</span><span·class="ss">intensity</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="5534767514-4">(</span><span·class="p"·data-group-id="5534767514-4">)</span><span·class="p">,</span><span·class="w">···</span><span·class="c1">%·optional</span><span·class="w"> 
160 ················</span><span·class="ss">period</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="5534767514-5">(</span><span·class="p"·data-group-id="55347675[·...·truncated·by·diffoscope;·len:·54,·SHA:·2a5e72737a0f953aa36b071af09eb255446150dcc91a7f0c455ae38f7992e43d·...·]··········</span><span·class="c1">%·optional</span><span·class="w">158 <p>This·is·the·type·definition·for·the·supervisor·flags:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sup_flags</span><span·class="p"·data-group-id="5329342002-1">(</span><span·class="p"·data-group-id="5329342002-1">)</span><span·cla[·...·truncated·by·diffoscope;·len:·404,·SHA:·16a7551df5fecb15b8122f239e5f06474d51ebdd8c67555f7eaab484fbea1269·...·]··········</span><span·class="c1">%·optional</span><span·class="w">
 159 ················</span><span·class="ss">intensity</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="5329342002-4">(</span><span·class="p"·data-group-id="5329342002-4">)</span><span·class="p">,</span><span·class="w">···</span><span·class="c1">%·optional</span><span·class="w">
 160 ················</span><span·class="ss">period</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="5329342002-5">(</span><span·class="p"·data-group-id="5329342002-5">)</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·optional</span><span·class="w">
161 ················</span><span·class="ss">auto_shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">auto_shutdown</span><span·class="p"·data-group-id="5534767514-6">(</span><span·class="p"·data-group-id="5534767514-6">)</span><span·class="p"·data-group-id="5534767514-2">}</span><span·class="w">·</span><span·class="c1">%·optional</span><span·class="w">161 ················</span><span·class="ss">auto_shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">auto_shutdown</span><span·class="p"·data-group-id="5329342002-6">(</span><span·class="p"·data-group-id="5329342002-6">)</span><span·class="p"·data-group-id="5329342002-2">}</span><span·class="w">·</span><span·class="c1">%·optional</span><span·class="w">
162 ····</span><span·class="nf">strategy</span><span·class="p"·data-group-id="5534767514-7">(</span><span·class="p"·data-group-id="5534767514-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">one_for_all</span><span·class="w">162 ····</span><span·class="nf">strategy</span><span·class="p"·data-group-id="5329342002-7">(</span><span·class="p"·data-group-id="5329342002-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">one_for_all</span><span·class="w">
163 ···············</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">one_for_one</span><span·class="w">163 ···············</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">one_for_one</span><span·class="w">
164 ···············</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">rest_for_one</span><span·class="w">164 ···············</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">rest_for_one</span><span·class="w">
165 ···············</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">simple_one_for_one</span><span·class="w">165 ···············</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">simple_one_for_one</span><span·class="w">
166 ····</span><span·class="nf">auto_shutdown</span><span·class="p"·data-group-id="5534767514-8">(</span><span·class="p"·data-group-id="5534767514-8">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">never</span><span·class="w">166 ····</span><span·class="nf">auto_shutdown</span><span·class="p"·data-group-id="5329342002-8">(</span><span·class="p"·data-group-id="5329342002-8">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">never</span><span·class="w">
167 ····················</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">any_significant</span><span·class="w">167 ····················</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">any_significant</span><span·class="w">
168 ····················</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">all_significant</span></code></pre><ul><li><code·class="inline">strategy</code>·specifies·the·<a·href="sup_princ.html#strategy">restart·strategy</a>.</li><li><code·class="inline">intensity</code>·and·<code·class="inline">period</code>·specify·the168 ····················</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">all_significant</span></code></pre><ul><li><code·class="inline">strategy</code>·specifies·the·<a·href="sup_princ.html#strategy">restart·strategy</a>.</li><li><code·class="inline">intensity</code>·and·<code·class="inline">period</code>·specify·the
169 <a·href="sup_princ.html#max_intensity">maximum·restart·intensity</a>.</li><li><code·class="inline">auto_shutdown</code>·specifies·whether·and·when·a·supervisor·should169 <a·href="sup_princ.html#max_intensity">maximum·restart·intensity</a>.</li><li><code·class="inline">auto_shutdown</code>·specifies·whether·and·when·a·supervisor·should
170 <a·href="sup_princ.html#automatic-shutdown">automatically·shut·itself·down</a>.</li></ul><p><a·href=""·id="strategy"></a></p><h2·id="restart-strategy"·class="section-heading">170 <a·href="sup_princ.html#automatic-shutdown">automatically·shut·itself·down</a>.</li></ul><p><a·href=""·id="strategy"></a></p><h2·id="restart-strategy"·class="section-heading">
171 ··<a·href="#restart-strategy"·class="hover-link">171 ··<a·href="#restart-strategy"·class="hover-link">
172 ····<i·class="ri-link-m"·aria-hidden="true"></i>172 ····<i·class="ri-link-m"·aria-hidden="true"></i>
173 ··</a>173 ··</a>
Offset 408, 28 lines modifiedOffset 408, 28 lines modified
408 exhaust·the·<a·href="sup_princ.html#max_intensity">Maximum·Restart·Intensity</a>·of·the408 exhaust·the·<a·href="sup_princ.html#max_intensity">Maximum·Restart·Intensity</a>·of·the
409 parent·supervisor.</p></blockquote><p><a·href=""·id="spec"></a></p><h2·id="child-specification"·class="section-heading">409 parent·supervisor.</p></blockquote><p><a·href=""·id="spec"></a></p><h2·id="child-specification"·class="section-heading">
410 ··<a·href="#child-specification"·class="hover-link">410 ··<a·href="#child-specification"·class="hover-link">
411 ····<i·class="ri-link-m"·aria-hidden="true"></i>411 ····<i·class="ri-link-m"·aria-hidden="true"></i>
412 ··</a>412 ··</a>
413 ··<span·class="text">Child·Specification</span>413 ··<span·class="text">Child·Specification</span>
414 </h2>414 </h2>
415 <p>The·type·definition·for·a·child·specification·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">child_spec</span><span·class="p"·data-group-id="5506940261-1">(</span><span·class="p"·data-group-id="5506940261-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5506940261-2">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">child_id</span><span·class="p"·data-group-id="5506940261-3">(</span><span·class="p"·data-group-id="5506940261-3">)</span><span·class="p">,</span><span·class="w">·············</span><span·class="c1">%·mandatory</span><span·class="w"> 
416 ·················</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">mfargs</span><span·class="p"·data-group-id="5506940261-4">(</span><span·class="p"·data-group-id="5506940261-4"[·...·truncated·by·diffoscope;·len:·49,·SHA:·c1348d10958a20c35f38d142a04c14e1c06497b5a79bf818fd20ae814b33f142·...·]············</span><span·class="c1">%·mandatory</span><span·class="w">415 <p>The·type·definition·for·a·child·specification·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">child_spec</span><span·class="p"·data-group-id="8897999746-1">(</span><span·class="p"·data-group-id="8897999746-1">)</span><[·...·truncated·by·diffoscope;·len:·406,·SHA:·5a8b2ace52ee24961d33f2e32a7b3c9bd4bed285fdb3bbc369b259c2bf9fbcdf·...·]············</span><span·class="c1">%·mandatory</span><span·class="w">
 416 ·················</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">mfargs</span><span·class="p"·data-group-id="8897999746-4">(</span><span·class="p"·data-group-id="8897999746-4">)</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·mandatory</span><span·class="w">
417 ·················</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">restart</span><span·class="p"·data-group-id="5506940261-5">(</span><span·class="p"·data-group-id="5506940261-5">)</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·optional</span><span·class="w">417 ·················</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">restart</span><span·class="p"·data-group-id="8897999746-5">(</span><span·class="p"·data-group-id="8897999746-5">)</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·optional</span><span·class="w">
418 ·················</span><span·class="ss">significant</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">significant</span><span·class="p"·data-group-id="5506940261-6">(</span><span·class="p"·data-group-id="5506940261-6">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·optional</span><span·class="w"> 
419 ·················</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="5506940261-7">(</span><span·class="p"·data-group-id="5506940261-7">)</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·optional</span><span·class="w"> 
420 ·················</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">worker</span><span·class="p"·data-group-id="5506940261-8">(</span><span·class="p"·data-group-id="5506940261-8">)</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·19,·SHA:·cdc41c3b86f778a70c395180e042b4243a73269f3386d415d4b2c2ecbdfd1fa7·...·]·</span><span·class="c1">%·optional</span><span·class="w">418 ·················</span><span·class="ss">significant</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">significant</span><span·class="p"·data-group-id="8897999746-6">(</span><span·class="p"·data-group-id="8897999746-6">)</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·19,·SHA:·887e09d9f57385f2929afb80f23f02203796ca6431e1f51107d90a29beb84747·...·]·</span><span·class="c1">%·optional</span><span·class="w">
 419 ·················</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="8897999746-7">(</span><span·class="p"·data-group-id="8897999746-7">)</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·optional</span><span·class="w">
 420 ·················</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">worker</span><span·class="p"·data-group-id="8897999746-8">(</span><span·class="p"·data-group-id="8897999746-8">)</span><span·class="p">,</span><span·class="w">·············</span><span·class="c1">%·optional</span><span·class="w">
421 ·················</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="5506940261-9">(</span><span·class="p"·data-group-id="5506940261-9">)</span><span·class="p"·data-group-id="5506940261-2">}</span><span·class="w">·········</span><span·class="c1">%·optional</span><span·class="w">421 ·················</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="8897999746-9">(</span><span·class="p"·data-group-id="8897999746-9">)</span><span·class="p"·data-group-id="8897999746-2">}</span><span·class="w">·········</span><span·class="c1">%·optional</span><span·class="w">
422 ····</span><span·class="nf">child_id</span><span·class="p"·data-group-id="5506940261-10">(</span><span·class="p"·data-group-id="5506940261-10">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="5506940261-11">(</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·ef8929d4dfec4dcbbf7cf01c75c29341a43b9c185a01d8fa7876a70625c3fdd5·...·]-11">)</span><span·class="w">422 ····</span><span·class="nf">child_id</span><span·class="p"·data-group-id="8897999746-10">(</span><span·class="p"·data-group-id="8897999746-10">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="8897999746-11">(</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·5b1503fc457833867b969d489a3d105bf450444dc0bf1373293d5231f835ce3f·...·]-11">)</span><span·class="w">
423 ····</span><span·class="nf">mfargs</span><span·class="p"·data-group-id="5506940261-12">(</span><span·class="p"·data-group-id="5506940261-12">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5506940261-13">{</span><span·class="n">M</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·962,·SHA:·65f9714a48f2dcf7f1d2de5c3daea7578436690cdc8901d85354139aa2c9e9f4·...·]-13">}</span><span·class="w">423 ····</span><span·class="nf">mfargs</span><span·class="p"·data-group-id="8897999746-12">(</span><span·class="p"·data-group-id="8897999746-12">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8897999746-13">{</span><span·class="n">M</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·962,·SHA:·41798b2e12c4296f5089fd7eaa5b2b6e467c27f4a753b5cc52534cb30321a90a·...·]-13">}</span><span·class="w">
424 ····</span><span·class="nf">modules</span><span·class="p"·data-group-id="5506940261-18">(</span><span·class="p"·data-group-id="5506940261-18">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5506940261-19">[</span><span·class="nf">module</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·126,·SHA:·8c707dcd6b24f646a53ab06343e28d3a363e22d7e6a2f32a90993df86eafd1e7·...·]-19">]</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">dynamic</span><span·class="w">424 ····</span><span·class="nf">modules</span><span·class="p"·data-group-id="8897999746-18">(</span><span·class="p"·data-group-id="8897999746-18">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8897999746-19">[</span><span·class="nf">module</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·126,·SHA:·2b2d48e7f2d419f0d133ae1784f5cce2e24a2fa54d7bec784f33efca8b08cc91·...·]-19">]</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">dynamic</span><span·class="w">
425 ····</span><span·class="nf">restart</span><span·class="p"·data-group-id="5506940261-21">(</span><span·class="p"·data-group-id="5506940261-21">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">permanent</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">transient</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">temporary</span><span·class="w">425 ····</span><span·class="nf">restart</span><span·class="p"·data-group-id="8897999746-21">(</span><span·class="p"·data-group-id="8897999746-21">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">permanent</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">transient</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">temporary</span><span·class="w">
426 ····</span><span·class="nf">significant</span><span·class="p"·data-group-id="5506940261-22">(</span><span·class="p"·data-group-id="5506940261-22">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="5506940261-23">(</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·d00813cfd1ee3bf1f88a52eb2aee2334ca3bfa24f520cc0eb1b1bc0606b7cd7a·...·]-23">)</span><span·class="w">426 ····</span><span·class="nf">significant</span><span·class="p"·data-group-id="8897999746-22">(</span><span·class="p"·data-group-id="8897999746-22">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="8897999746-23">(</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·3212b4b16ab6ea007829a2c5e17a57191ef672ed754a4adceb0eaa36cedd92e8·...·]-23">)</span><span·class="w">
427 ····</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="5506940261-24">(</span><span·class="p"·data-group-id="5506940261-24">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·126,·SHA:·f084b997b98b385314ecfd229c18c4624933af7bbd0ba8de17cd8148040e7529·...·]-25">)</span><span·class="w">427 ····</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="8897999746-24">(</span><span·class="p"·data-group-id="8897999746-24">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·126,·SHA:·b06ca50b7e3a02f4f16286b8404c2f7a5174ccc949c310ca8705a9a775c0701b·...·]-25">)</span><span·class="w">
428 ····</span><span·class="nf">worker</span><span·class="p"·data-group-id="5506940261-26">(</span><span·class="p"·data-group-id="5506940261-26">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">worker</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">supervisor</span></code></pre><ul><li><p><code·class="inline">id</code>·is·used·to·identify·the·child·specification·internally·by·the·supervisor.</p><p>The·<code·class="inline">id</code>·key·is·mandatory.</p><p>Note·that·this·identifier·occasionally·has·been·called·&quot;name&quot;.·As·far·as428 ····</span><span·class="nf">worker</span><span·class="p"·data-group-id="8897999746-26">(</span><span·class="p"·data-group-id="8897999746-26">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">worker</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">supervisor</span></code></pre><ul><li><p><code·class="inline">id</code>·is·used·to·identify·the·child·specification·internally·by·the·supervisor.</p><p>The·<code·class="inline">id</code>·key·is·mandatory.</p><p>Note·that·this·identifier·occasionally·has·been·called·&quot;name&quot;.·As·far·as
429 possible,·the·terms·&quot;identifier&quot;·or·&quot;id&quot;·are·now·used·but·in·order·to·keep429 possible,·the·terms·&quot;identifier&quot;·or·&quot;id&quot;·are·now·used·but·in·order·to·keep
430 backwards·compatibility,·some·occurrences·of·&quot;name&quot;·can·still·be·found,·for430 backwards·compatibility,·some·occurrences·of·&quot;name&quot;·can·still·be·found,·for
431 example·in·error·messages.</p></li><li><p><code·class="inline">start</code>·defines·the·function·call·used·to·start·the·child·process.·It·is·a431 example·in·error·messages.</p></li><li><p><code·class="inline">start</code>·defines·the·function·call·used·to·start·the·child·process.·It·is·a
432 module-function-arguments·tuple·used·as·<a·href="../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,·F,·A)</code></a>.</p><p>It·is·to·be·(or·result·in)·a·call·to·any·of·the·following:</p><ul><li><a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/3"><code·class="inline">supervisor:start_link/2,3</code></a></li><li><a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/3,4</code></a></li><li><a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/4"><code·class="inline">gen_statem:start_link/3,4</code></a></li><li><a·href="../../lib/stdlib-6.0.1/doc/html/gen_event.html#start_link/2"><code·class="inline">gen_event:start_link/0,1,2</code></a></li><li>A·function·compliant·with·these·functions.·For·details,·see432 module-function-arguments·tuple·used·as·<a·href="../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,·F,·A)</code></a>.</p><p>It·is·to·be·(or·result·in)·a·call·to·any·of·the·following:</p><ul><li><a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/3"><code·class="inline">supervisor:start_link/2,3</code></a></li><li><a·href="../../lib/stdlib-6.0.1/doc/html/gen_server.html#start_link/4"><code·class="inline">gen_server:start_link/3,4</code></a></li><li><a·href="../../lib/stdlib-6.0.1/doc/html/gen_statem.html#start_link/4"><code·class="inline">gen_statem:start_link/3,4</code></a></li><li><a·href="../../lib/stdlib-6.0.1/doc/html/gen_event.html#start_link/2"><code·class="inline">gen_event:start_link/0,1,2</code></a></li><li>A·function·compliant·with·these·functions.·For·details,·see
433 <a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html"><code·class="inline">supervisor</code></a>.</li></ul><p>The·<code·class="inline">start</code>·key·is·mandatory.</p></li><li><p><a·href=""·id="restart"></a>·<code·class="inline">restart</code>·defines·when·a·terminated·child·process·is·to·be433 <a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html"><code·class="inline">supervisor</code></a>.</li></ul><p>The·<code·class="inline">start</code>·key·is·mandatory.</p></li><li><p><a·href=""·id="restart"></a>·<code·class="inline">restart</code>·defines·when·a·terminated·child·process·is·to·be
434 restarted.</p><ul><li>A·<code·class="inline">permanent</code>·child·process·is·always·restarted.</li><li>A·<code·class="inline">temporary</code>·child·process·is·never·restarted·(not·even·when·the·supervisor434 restarted.</p><ul><li>A·<code·class="inline">permanent</code>·child·process·is·always·restarted.</li><li>A·<code·class="inline">temporary</code>·child·process·is·never·restarted·(not·even·when·the·supervisor
435 restart·strategy·is·<code·class="inline">rest_for_one</code>·or·<code·class="inline">one_for_all</code>·and·a·sibling·death435 restart·strategy·is·<code·class="inline">rest_for_one</code>·or·<code·class="inline">one_for_all</code>·and·a·sibling·death
Offset 457, 53 lines modifiedOffset 457, 53 lines modified
457 <code·class="inline">supervisor</code>,·the·default·value·<code·class="inline">infinity</code>·will·be·used.</p></li><li><p><code·class="inline">type</code>·specifies·whether·the·child·process·is·a·supervisor·or·a·worker.</p><p>The·<code·class="inline">type</code>·key·is·optional.·If·it·is·not·given,·the·default·value·<code·class="inline">worker</code>457 <code·class="inline">supervisor</code>,·the·default·value·<code·class="inline">infinity</code>·will·be·used.</p></li><li><p><code·class="inline">type</code>·specifies·whether·the·child·process·is·a·supervisor·or·a·worker.</p><p>The·<code·class="inline">type</code>·key·is·optional.·If·it·is·not·given,·the·default·value·<code·class="inline">worker</code>
458 will·be·used.</p></li><li><p><code·class="inline">modules</code>·has·to·be·a·list·consisting·of·a·single·element.·The·value458 will·be·used.</p></li><li><p><code·class="inline">modules</code>·has·to·be·a·list·consisting·of·a·single·element.·The·value
459 of·that·element·depends·on·the·behaviour·of·the·process:</p><ul><li>If·the·child·process·is·a·<code·class="inline">gen_event</code>,·the·element·has·to·be·the·atom459 of·that·element·depends·on·the·behaviour·of·the·process:</p><ul><li>If·the·child·process·is·a·<code·class="inline">gen_event</code>,·the·element·has·to·be·the·atom
460 <code·class="inline">dynamic</code>.</li><li>Otherwise,·the·element·should·be·<code·class="inline">Module</code>,·where·<code·class="inline">Module</code>·is·the460 <code·class="inline">dynamic</code>.</li><li>Otherwise,·the·element·should·be·<code·class="inline">Module</code>,·where·<code·class="inline">Module</code>·is·the
461 name·of·the·callback·module.</li></ul><p>This·information·is·used·by·the·release·handler·during·upgrades·and461 name·of·the·callback·module.</li></ul><p>This·information·is·used·by·the·release·handler·during·upgrades·and
462 downgrades;·see·<a·href="release_handling.html">Release·Handling</a>.</p><p>The·<code·class="inline">modules</code>·key·is·optional.·If·it·is·not·given,·it·defaults·to·<code·class="inline">[M]</code>,·where462 downgrades;·see·<a·href="release_handling.html">Release·Handling</a>.</p><p>The·<code·class="inline">modules</code>·key·is·optional.·If·it·is·not·given,·it·defaults·to·<code·class="inline">[M]</code>,·where
463 <code·class="inline">M</code>·comes·from·the·child's·start·<code·class="inline">{M,F,A}</code>.</p></li></ul><p><em>Example:</em>·The·child·specification·to·start·the·server·<code·class="inline">ch3</code>·in·the·previous463 <code·class="inline">M</code>·comes·from·the·child's·start·<code·class="inline">{M,F,A}</code>.</p></li></ul><p><em>Example:</em>·The·child·specification·to·start·the·server·<code·class="inline">ch3</code>·in·the·previous
464 example·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0500468925-1">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">464 example·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2172253213-1">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">
465 ··</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0500468925-2">{</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0500468925-3">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·667cf396f8aeca018518a013d343f77dd193e44c7b009a056530bab23c9b9d8d·...·]-2">}</span><span·class="p">,</span><span·class="w">465 ··</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2172253213-2">{</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2172253213-3">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·05aa71ab2c01b050eaa7a96e1db4593940beda4cf0d37e77c3dd064fd414c644·...·]-2">}</span><span·class="p">,</span><span·class="w">
466 ··</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">permanent</span><span·class="p">,</span><span·class="w">466 ··</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">permanent</span><span·class="p">,</span><span·class="w">
467 ··</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="p">,</span><span·class="w">467 ··</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">brutal_kill</span><span·class="p">,</span><span·class="w">
468 ··</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">worker</span><span·class="p">,</span><span·class="w">468 ··</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">worker</span><span·class="p">,</span><span·class="w">
469 ··</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0500468925-4">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="0500468925-4">]</span><span·class="p"·data-group-id="0500468925-1">}</span></code></pre><p>or·simplified,·relying·on·the·default·values:</p><pre><code·class="text">#{id·=&gt;·ch3,469 ··</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2172253213-4">[</span><span·class="ss">ch3</span><span·class="p"·data-group-id="2172253213-4">]</span><span·class="p"·data-group-id="2172253213-1">}</span></code></pre><p>or·simplified,·relying·on·the·default·values:</p><pre><code·class="text">#{id·=&gt;·ch3,
470 ··start·=&gt;·{ch3,·start_link,·[]},470 ··start·=&gt;·{ch3,·start_link,·[]},
471 ··shutdown·=&gt;·brutal_kill}</code></pre><p>Example:·A·child·specification·to·start·the·event·manager·from·the·chapter·about471 ··shutdown·=&gt;·brutal_kill}</code></pre><p>Example:·A·child·specification·to·start·the·event·manager·from·the·chapter·about
472 <a·href="events.html#mgr">gen_event</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0930786789-1">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">error_man</span><span·class="p">,</span><span·class="w">472 <a·href="events.html#mgr">gen_event</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6270312920-1">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">error_man</span><span·class="p">,</span><span·class="w">
473 ··</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0930786789-2">{</span><span·class="ss">gen_event</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0930786789-3">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·292,·SHA:·b53565b5ff85f3d65ed79ba5660d44b6081e22796a5fd4400df6bb1cc4bc94cd·...·]-2">}</span><span·class="p">,</span><span·class="w">473 ··</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6270312920-2">{</span><span·class="ss">gen_event</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6270312920-3">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·292,·SHA:·889c289fde21a1c4aaed37e9c01bce29ba988b4620fcd79899776467e291dbc4·...·]-2">}</span><span·class="p">,</span><span·class="w">
474 ··</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">dynamic</span><span·class="p"·data-group-id="0930786789-1">}</span></code></pre><p>Both·server·and·event·manager·are·registered·processes·which·can·be·expected·to474 ··</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">dynamic</span><span·class="p"·data-group-id="6270312920-1">}</span></code></pre><p>Both·server·and·event·manager·are·registered·processes·which·can·be·expected·to
475 be·always·accessible.·Thus·they·are·specified·to·be·<code·class="inline">permanent</code>.</p><p><code·class="inline">ch3</code>·does·not·need·to·do·any·cleaning·up·before·termination.·Thus,·no·shutdown475 be·always·accessible.·Thus·they·are·specified·to·be·<code·class="inline">permanent</code>.</p><p><code·class="inline">ch3</code>·does·not·need·to·do·any·cleaning·up·before·termination.·Thus,·no·shutdown
476 time·is·needed,·but·<code·class="inline">brutal_kill</code>·is·sufficient.·<code·class="inline">error_man</code>·can·need·some·time476 time·is·needed,·but·<code·class="inline">brutal_kill</code>·is·sufficient.·<code·class="inline">error_man</code>·can·need·some·time
477 for·the·event·handlers·to·clean·up,·thus·the·shutdown·time·is·set·to·5000·ms477 for·the·event·handlers·to·clean·up,·thus·the·shutdown·time·is·set·to·5000·ms
478 (which·is·the·default·value).</p><p>Example:·A·child·specification·to·start·another·supervisor:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8535307502-1">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sup</span><span·class="p">,</span><span·class="w">478 (which·is·the·default·value).</p><p>Example:·A·child·specification·to·start·another·supervisor:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4387861634-1">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sup</span><span·class="p">,</span><span·class="w">
479 ··</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8535307502-2">{</span><span·class="ss">sup</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8535307502-3">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·8f6540e538b42125dd22bff67448e1b3e94a9acbd01249f9e31d02cd9db4741d·...·]-2">}</span><span·class="p">,</span><span·class="w">479 ··</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4387861634-2">{</span><span·class="ss">sup</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_link</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4387861634-3">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·ddd9807792c282d45fef27d5cc70fcca85a5d6d6f7d4b1682eb4ee7e3f12ff62·...·]-2">}</span><span·class="p">,</span><span·class="w">
480 ··</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">transient</span><span·class="p">,</span><span·class="w">480 ··</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">transient</span><span·class="p">,</span><span·class="w">
481 ··</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="8535307502-1">}</span><span·class="w">·</span><span·class="c1">%·will·cause·default·shutdown=&gt;infinity</span></code></pre><p><a·href=""·id="super_tree"></a></p><h2·id="starting-a-supervisor"·class="section-heading">481 ··</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">supervisor</span><span·class="p"·data-group-id="4387861634-1">}</span><span·class="w">·</span><span·class="c1">%·will·cause·default·shutdown=&gt;infinity</span></code></pre><p><a·href=""·id="super_tree"></a></p><h2·id="starting-a-supervisor"·class="section-heading">
482 ··<a·href="#starting-a-supervisor"·class="hover-link">482 ··<a·href="#starting-a-supervisor"·class="hover-link">
483 ····<i·class="ri-link-m"·aria-hidden="true"></i>483 ····<i·class="ri-link-m"·aria-hidden="true"></i>
484 ··</a>484 ··</a>
485 ··<span·class="text">Starting·a·Supervisor</span>485 ··<span·class="text">Starting·a·Supervisor</span>
486 </h2>486 </h2>
487 <p>In·the·previous·example,·the·supervisor·is·started·by·calling487 <p>In·the·previous·example,·the·supervisor·is·started·by·calling
488 <code·class="inline">ch_sup:start_link()</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start_link</span><span·class="p"·data-group-id="8905063059-1">(</span><span·class="p"·data-group-id="8905063059-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">488 <code·class="inline">ch_sup:start_link()</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start_link</span><span·class="p"·data-group-id="4940773423-1">(</span><span·class="p"·data-group-id="4940773423-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
489 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="8905063059-2">(</span><span·class="ss">ch_sup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8905063059-3">[</span><span·class="p"·data-group-id="8905063059-3">]</span><span·class="p"·data-group-id="8905063059-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">ch_sup:start_link</code>·calls·function·<a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/2"><code·class="inline">supervisor:start_link/2</code></a>,·which·spawns·and489 ····</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4940773423-2">(</span><span·class="ss">ch_sup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4940773423-3">[</span><span·class="p"·data-group-id="4940773423-3">]</span><span·class="p"·data-group-id="4940773423-2">)</span><span·class="p">.</span></code></pre><p><code·class="inline">ch_sup:start_link</code>·calls·function·<a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/2"><code·class="inline">supervisor:start_link/2</code></a>,·which·spawns·and
490 links·to·a·new·process,·a·supervisor.</p><ul><li>The·first·argument,·<code·class="inline">ch_sup</code>,·is·the·name·of·the·callback·module,·that·is,·the490 links·to·a·new·process,·a·supervisor.</p><ul><li>The·first·argument,·<code·class="inline">ch_sup</code>,·is·the·name·of·the·callback·module,·that·is,·the
491 module·where·the·<code·class="inline">init</code>·callback·function·is·located.</li><li>The·second·argument,·<code·class="inline">[]</code>,·is·a·term·that·is·passed·as·is·to·the·callback491 module·where·the·<code·class="inline">init</code>·callback·function·is·located.</li><li>The·second·argument,·<code·class="inline">[]</code>,·is·a·term·that·is·passed·as·is·to·the·callback
492 function·<code·class="inline">init</code>.·Here,·<code·class="inline">init</code>·does·not·need·any·data·and·ignores·the·argument.</li></ul><p>In·this·case,·the·supervisor·is·not·registered.·Instead·its·pid·must·be·used.·A492 function·<code·class="inline">init</code>.·Here,·<code·class="inline">init</code>·does·not·need·any·data·and·ignores·the·argument.</li></ul><p>In·this·case,·the·supervisor·is·not·registered.·Instead·its·pid·must·be·used.·A
493 name·can·be·specified·by·calling493 name·can·be·specified·by·calling
494 <a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/3"><code·class="inline">supervisor:start_link({local,·Name},·Module,·Args)</code></a>494 <a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/3"><code·class="inline">supervisor:start_link({local,·Name},·Module,·Args)</code></a>
495 or495 or
496 <a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/3"><code·class="inline">supervisor:start_link({global,·Name},·Module,·Args)</code></a>.</p><p>The·new·supervisor·process·calls·the·callback·function·<code·class="inline">ch_sup:init([])</code>.·<code·class="inline">init</code>496 <a·href="../../lib/stdlib-6.0.1/doc/html/supervisor.html#start_link/3"><code·class="inline">supervisor:start_link({global,·Name},·Module,·Args)</code></a>.</p><p>The·new·supervisor·process·calls·the·callback·function·<code·class="inline">ch_sup:init([])</code>.·<code·class="inline">init</code>
497 has·to·return·<code·class="inline">{ok,·{SupFlags,·ChildSpecs}}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="7849338735-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="7849338735-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">497 has·to·return·<code·class="inline">{ok,·{SupFlags,·ChildSpecs}}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init</span><span·class="p"·data-group-id="2489775407-1">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="2489775407-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
498 ····</span><span·class="n">SupFlags</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7849338735-2">#{</span><span·class="p"·data-group-id="7849338735-2">}</span><span·class="p">,</span><span·class="w">498 ····</span><span·class="n">SupFlags</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2489775407-2">#{</span><span·class="p"·data-group-id="2489775407-2">}</span><span·class="p">,</span><span·class="w">
499 ····</span><span·class="n">ChildSpecs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7849338735-3">[</span><span·class="p"·data-group-id="7849338735-4">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">499 ····</span><span·class="n">ChildSpecs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2489775407-3">[</span><span·class="p"·data-group-id="2489775407-4">#{</span><span·class="ss">id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ch3</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 12024/65239 bytes (18.43%) of diff not shown.
70.1 KB
./usr/share/doc/erlang-doc/html/doc/system/tablesdatabases.html
    
Offset 146, 73 lines modifiedOffset 146, 73 lines modified
146 ····<i·class="ri-link-m"·aria-hidden="true"></i>146 ····<i·class="ri-link-m"·aria-hidden="true"></i>
147 ··</a>147 ··</a>
148 ··<span·class="text">Deleting·an·Element</span>148 ··<span·class="text">Deleting·an·Element</span>
149 </h3>149 </h3>
150 <p>The·<code·class="inline">delete</code>·operation·is·considered·successful·if·the·element·was·not·present150 <p>The·<code·class="inline">delete</code>·operation·is·considered·successful·if·the·element·was·not·present
151 in·the·table.·Hence·all·attempts·to·check·that·the·element·is·present·in·the151 in·the·table.·Hence·all·attempts·to·check·that·the·element·is·present·in·the
152 Ets/Mnesia·table·before·deletion·are·unnecessary.·Here·follows·an·example·for152 Ets/Mnesia·table·before·deletion·are·unnecessary.·Here·follows·an·example·for
153 Ets·tables:</p><p><strong>DO</strong></p><pre><code·class="text">ets:delete(Tab,·Key),</code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="8096491807-1">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="8096491807-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">153 Ets·tables:</p><p><strong>DO</strong></p><pre><code·class="text">ets:delete(Tab,·Key),</code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="2620135416-1">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2620135416-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
154 ····</span><span·class="p"·data-group-id="8096491807-2">[</span><span·class="p"·data-group-id="8096491807-2">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">154 ····</span><span·class="p"·data-group-id="2620135416-2">[</span><span·class="p"·data-group-id="2620135416-2">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
155 ········</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">155 ········</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
156 ····</span><span·class="p"·data-group-id="8096491807-3">[</span><span·class="p">_</span><span·class="p">|</span><span·class="p">_</span><span·class="p"·data-group-id="8096491807-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 ····</span><span·class="p"·data-group-id="2620135416-3">[</span><span·class="p">_</span><span·class="p">|</span><span·class="p">_</span><span·class="p"·data-group-id="2620135416-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ········</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="8096491807-4">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="8096491807-4">)</span><span·class="w">157 ········</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="2620135416-4">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2620135416-4">)</span><span·class="w">
158 </span><span·class="k">end</span><span·class="p">,</span></code></pre><h3·id="fetching-data"·class="section-heading">158 </span><span·class="k">end</span><span·class="p">,</span></code></pre><h3·id="fetching-data"·class="section-heading">
159 ··<a·href="#fetching-data"·class="hover-link">159 ··<a·href="#fetching-data"·class="hover-link">
160 ····<i·class="ri-link-m"·aria-hidden="true"></i>160 ····<i·class="ri-link-m"·aria-hidden="true"></i>
161 ··</a>161 ··</a>
162 ··<span·class="text">Fetching·Data</span>162 ··<span·class="text">Fetching·Data</span>
163 </h3>163 </h3>
164 <p>Do·not·fetch·data·that·you·already·have.</p><p>Consider·that·you·have·a·module·that·handles·the·abstract·data·type·<code·class="inline">Person</code>.164 <p>Do·not·fetch·data·that·you·already·have.</p><p>Consider·that·you·have·a·module·that·handles·the·abstract·data·type·<code·class="inline">Person</code>.
165 You·export·the·interface·function·<code·class="inline">print_person/1</code>,·which·uses·the·internal165 You·export·the·interface·function·<code·class="inline">print_person/1</code>,·which·uses·the·internal
166 functions·<code·class="inline">print_name/1</code>,·<code·class="inline">print_age/1</code>,·and·<code·class="inline">print_occupation/1</code>.</p><blockquote><h4·class="info">Note</h4><p>If·the·function·<code·class="inline">print_name/1</code>,·and·so·on,·had·been·interface·functions,·the166 functions·<code·class="inline">print_name/1</code>,·<code·class="inline">print_age/1</code>,·and·<code·class="inline">print_occupation/1</code>.</p><blockquote><h4·class="info">Note</h4><p>If·the·function·<code·class="inline">print_name/1</code>,·and·so·on,·had·been·interface·functions,·the
167 situation·would·have·been·different,·as·you·do·not·want·the·user·of·the167 situation·would·have·been·different,·as·you·do·not·want·the·user·of·the
168 interface·to·know·about·the·internal·data·representation.</p></blockquote><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%·Interface·function</span><span·class="w">168 interface·to·know·about·the·internal·data·representation.</p></blockquote><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%·Interface·function</span><span·class="w">
169 </span><span·class="nf">print_person</span><span·class="p"·data-group-id="6036458495-1">(</span><span·class="n">PersonId</span><span·class="p"·data-group-id="6036458495-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 </span><span·class="nf">print_person</span><span·class="p"·data-group-id="5619756320-1">(</span><span·class="n">PersonId</span><span·class="p"·data-group-id="5619756320-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ····</span><span·class="c1">%%·Look·up·the·person·in·the·named·table·person,</span><span·class="w">170 ····</span><span·class="c1">%%·Look·up·the·person·in·the·named·table·person,</span><span·class="w">
171 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="6036458495-2">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PersonId</span><span·class="p"·data-group-id="6036458495-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">171 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="5619756320-2">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PersonId</span><span·class="p"·data-group-id="5619756320-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
172 ········</span><span·class="p"·data-group-id="6036458495-3">[</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 ········</span><span·class="p"·data-group-id="5619756320-3">[</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ············</span><span·class="nf">print_name</span><span·class="p"·data-group-id="6036458495-4">(</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-4">)</span><span·class="p">,</span><span·class="w">173 ············</span><span·class="nf">print_name</span><span·class="p"·data-group-id="5619756320-4">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-4">)</span><span·class="p">,</span><span·class="w">
174 ············</span><span·class="nf">print_age</span><span·class="p"·data-group-id="6036458495-5">(</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-5">)</span><span·class="p">,</span><span·class="w">174 ············</span><span·class="nf">print_age</span><span·class="p"·data-group-id="5619756320-5">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-5">)</span><span·class="p">,</span><span·class="w">
175 ············</span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="6036458495-6">(</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-6">)</span><span·class="p">;</span><span·class="w">175 ············</span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="5619756320-6">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-6">)</span><span·class="p">;</span><span·class="w">
176 ········</span><span·class="p"·data-group-id="6036458495-7">[</span><span·class="p"·data-group-id="6036458495-7">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 ········</span><span·class="p"·data-group-id="5619756320-7">[</span><span·class="p"·data-group-id="5619756320-7">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6036458495-8">(</span><span·class="s">&quot;No·person·with·ID·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6036458495-9">[</span><sp[·...·truncated·by·diffoscope;·len:·122,·SHA:·f68f4bcedcabf8ce3a96872e7a05feb84e0dc3451b59e6e653d7cd5219700576·...·]-8">)</span><span·class="w">177 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5619756320-8">(</span><span·class="s">&quot;No·person·with·ID·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5619756320-9">[</span><sp[·...·truncated·by·diffoscope;·len:·122,·SHA:·8283b4f3ca84aed77247af145ead5614442fd2e419f0c6bc1bc5ba61a937b340·...·]-8">)</span><span·class="w">
178 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">178 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
179 </span><span·class="c1">%%%·Internal·functions</span><span·class="w">179 </span><span·class="c1">%%%·Internal·functions</span><span·class="w">
180 </span><span·class="nf">print_name</span><span·class="p"·data-group-id="6036458495-10">(</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 </span><span·class="nf">print_name</span><span·class="p"·data-group-id="5619756320-10">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6036458495-11">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6036458495-12">[</span><span·class[·...·truncated·by·diffoscope;·len:·219,·SHA:·36044db421c680a508e48218afaadc5e2a5fd1cdd01259e8e295d2fc481b74ac·...·]-11">)</span><span·class="p">.</span><span·class="w">181 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5619756320-11">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5619756320-12">[</span><span·class[·...·truncated·by·diffoscope;·len:·219,·SHA:·2fbb2b956035f11720dce6ec37e3d48fe112732971569fe3306c0852df6fdfa4·...·]-11">)</span><span·class="p">.</span><span·class="w">
  
182 </span><span·class="nf">print_age</span><span·class="p"·data-group-id="6036458495-13">(</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 </span><span·class="nf">print_age</span><span·class="p"·data-group-id="5619756320-13">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6036458495-14">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6036458495-15">[</span><span·class[·...·truncated·by·diffoscope;·len:·218,·SHA:·7f26f61d98544e635c46ed751ece4c30c73fc76b11a3c623a5d99ff5041e5bf2·...·]-14">)</span><span·class="p">.</span><span·class="w">183 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5619756320-14">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5619756320-15">[</span><span·class[·...·truncated·by·diffoscope;·len:·218,·SHA:·f71cc61ba8e32fe66f5073d3b78278370af15bc50bc2da20ca1cff5497f01391·...·]-14">)</span><span·class="p">.</span><span·class="w">
  
184 </span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="6036458495-16">(</span><span·class="n">Person</span><span·class="p"·data-group-id="6036458495-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 </span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="5619756320-16">(</span><span·class="n">Person</span><span·class="p"·data-group-id="5619756320-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6036458495-17">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6036458495-18">[</span><span·class[·...·truncated·by·diffoscope;·len:·225,·SHA:·8425c585b56b0fbbf85a0debb9574652e416e5c5a06a9bfe65d2758ac1b3b614·...·]-17">)</span><span·class="p">.</span></code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%·Interface·function</span><span·class="w">185 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5619756320-17">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5619756320-18">[</span><span·class[·...·truncated·by·diffoscope;·len:·225,·SHA:·6cd7ac519e2f68b8a516afc19e52ed9310e0dbd41f870e0d06ac32f82017eb1b·...·]-17">)</span><span·class="p">.</span></code></pre><p><strong>DO·NOT</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%·Interface·function</span><span·class="w">
186 </span><span·class="nf">print_person</span><span·class="p"·data-group-id="5770377566-1">(</span><span·class="n">PersonId</span><span·class="p"·data-group-id="5770377566-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">186 </span><span·class="nf">print_person</span><span·class="p"·data-group-id="7740992703-1">(</span><span·class="n">PersonId</span><span·class="p"·data-group-id="7740992703-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
187 ····</span><span·class="c1">%%·Look·up·the·person·in·the·named·table·person,</span><span·class="w">187 ····</span><span·class="c1">%%·Look·up·the·person·in·the·named·table·person,</span><span·class="w">
188 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="5770377566-2">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PersonId</span><span·class="p"·data-group-id="5770377566-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">188 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="7740992703-2">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PersonId</span><span·class="p"·data-group-id="7740992703-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
189 ········</span><span·class="p"·data-group-id="5770377566-3">[</span><span·class="n">Person</span><span·class="p"·data-group-id="5770377566-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 ········</span><span·class="p"·data-group-id="7740992703-3">[</span><span·class="n">Person</span><span·class="p"·data-group-id="7740992703-3">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ············</span><span·class="nf">print_name</span><span·class="p"·data-group-id="5770377566-4">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="5770377566-4">)</span><span·class="p">,</span><span·class="w">190 ············</span><span·class="nf">print_name</span><span·class="p"·data-group-id="7740992703-4">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="7740992703-4">)</span><span·class="p">,</span><span·class="w">
191 ············</span><span·class="nf">print_age</span><span·class="p"·data-group-id="5770377566-5">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="5770377566-5">)</span><span·class="p">,</span><span·class="w">191 ············</span><span·class="nf">print_age</span><span·class="p"·data-group-id="7740992703-5">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="7740992703-5">)</span><span·class="p">,</span><span·class="w">
192 ············</span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="5770377566-6">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="5770377566-6">)</span><span·class="p">;</span><span·class="w">192 ············</span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="7740992703-6">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="7740992703-6">)</span><span·class="p">;</span><span·class="w">
193 ········</span><span·class="p"·data-group-id="5770377566-7">[</span><span·class="p"·data-group-id="5770377566-7">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 ········</span><span·class="p"·data-group-id="7740992703-7">[</span><span·class="p"·data-group-id="7740992703-7">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5770377566-8">(</span><span·class="s">&quot;No·person·with·ID·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5770377566-9">[</span><sp[·...·truncated·by·diffoscope;·len:·122,·SHA:·8e236324e1061df6203f996eb0b6027090f6b95428c8ac3b2b0043856cd7b903·...·]-8">)</span><span·class="w">194 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7740992703-8">(</span><span·class="s">&quot;No·person·with·ID·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7740992703-9">[</span><sp[·...·truncated·by·diffoscope;·len:·122,·SHA:·b2654194a8b3393629f5436d04b469bb54f0079f252dbe6ecf4b6880fe5e1763·...·]-8">)</span><span·class="w">
195 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">195 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="c1">%%%·Internal·functions</span><span·class="w">196 </span><span·class="c1">%%%·Internal·functions</span><span·class="w">
197 </span><span·class="nf">print_name</span><span·class="p"·data-group-id="5770377566-10">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="5770377566-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">197 </span><span·class="nf">print_name</span><span·class="p"·data-group-id="7740992703-10">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="7740992703-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
198 ····</span><span·class="p"·data-group-id="5770377566-11">[</span><span·class="n">Person</span><span·class="p"·data-group-id="5770377566-11">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</sp[·...·truncated·by·diffoscope;·len:·207,·SHA:·8f6275a29566dd016f68a8ae8ae62442a67c9e8b245f33ae4d650a8261ad4d2d·...·]-12">)</span><span·class="p">,</span><span·class="w">198 ····</span><span·class="p"·data-group-id="7740992703-11">[</span><span·class="n">Person</span><span·class="p"·data-group-id="7740992703-11">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</sp[·...·truncated·by·diffoscope;·len:·207,·SHA:·7c183f7206e6a1b1a84f14cd248204db4c5255f6cb013bba081fd2ddf47fb92a·...·]-12">)</span><span·class="p">,</span><span·class="w">
199 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5770377566-13">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5770377566-14">[</span><span·class[·...·truncated·by·diffoscope;·len:·219,·SHA:·2a9ee9e372735bd730267463cdea4baf97b2d1c302bf5217a3ea0671a9c0a4e6·...·]-13">)</span><span·class="p">.</span><span·class="w">199 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7740992703-13">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7740992703-14">[</span><span·class[·...·truncated·by·diffoscope;·len:·219,·SHA:·f83fda0f5add436ef8b88121cf438ba6cd52c7c5d4b45713adfd6c0c76f5eaef·...·]-13">)</span><span·class="p">.</span><span·class="w">
  
200 </span><span·class="nf">print_age</span><span·class="p"·data-group-id="5770377566-15">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="5770377566-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 </span><span·class="nf">print_age</span><span·class="p"·data-group-id="7740992703-15">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="7740992703-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ····</span><span·class="p"·data-group-id="5770377566-16">[</span><span·class="n">Person</span><span·class="p"·data-group-id="5770377566-16">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</sp[·...·truncated·by·diffoscope;·len:·207,·SHA:·3f6f18c5fa2bd3cfc2b6dc0d688ebedf75fcf12792956626459eb617c7cd818f·...·]-17">)</span><span·class="p">,</span><span·class="w">201 ····</span><span·class="p"·data-group-id="7740992703-16">[</span><span·class="n">Person</span><span·class="p"·data-group-id="7740992703-16">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</sp[·...·truncated·by·diffoscope;·len:·207,·SHA:·5414fd3e2d73a029b2fb4c2b67c9d301a070008c306c4472ea9094ed42e74dd4·...·]-17">)</span><span·class="p">,</span><span·class="w">
202 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5770377566-18">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5770377566-19">[</span><span·class[·...·truncated·by·diffoscope;·len:·218,·SHA:·4dd7da72286e88909bd267d85d9e1e26170eeb62a98a4f562ed347807e0520b2·...·]-18">)</span><span·class="p">.</span><span·class="w">202 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7740992703-18">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7740992703-19">[</span><span·class[·...·truncated·by·diffoscope;·len:·218,·SHA:·3f2df2b3cae532bfa1ee060c6bc5128e55ed22e9feaa93510d46e3cc620daa06·...·]-18">)</span><span·class="p">.</span><span·class="w">
  
203 </span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="5770377566-20">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="5770377566-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 </span><span·class="nf">print_occupation</span><span·class="p"·data-group-id="7740992703-20">(</span><span·class="n">PersonID</span><span·class="p"·data-group-id="7740992703-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ····</span><span·class="p"·data-group-id="5770377566-21">[</span><span·class="n">Person</span><span·class="p"·data-group-id="5770377566-21">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</sp[·...·truncated·by·diffoscope;·len:·207,·SHA:·21aadc882654dd0d3bb27d1b0335ec9af72cd5c9b8307b5d7351f7af8a3d03c9·...·]-22">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="p"·data-group-id="7740992703-21">[</span><span·class="n">Person</span><span·class="p"·data-group-id="7740992703-21">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</sp[·...·truncated·by·diffoscope;·len:·207,·SHA:·abb790619d8b8f887bbf53c545f93b228a7a0be603f49987d5751695afb0b066·...·]-22">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5770377566-23">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5770377566-24">[</span><span·class[·...·truncated·by·diffoscope;·len:·225,·SHA:·9b102730b4208002b8b7c7490ed199b7e8b5b9834e80b2eaf479e209edf6b079·...·]-23">)</span><span·class="p">.</span></code></pre><h3·id="non-persistent-database-storage"·class="section-heading">205 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7740992703-23">(</span><span·class="s">&quot;No·person·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7740992703-24">[</span><span·class[·...·truncated·by·diffoscope;·len:·225,·SHA:·875929aa3ff9e153fabd92d75a52a791cec054bf41444db779696f2a4b36fa72·...·]-23">)</span><span·class="p">.</span></code></pre><h3·id="non-persistent-database-storage"·class="section-heading">
206 ··<a·href="#non-persistent-database-storage"·class="hover-link">206 ··<a·href="#non-persistent-database-storage"·class="hover-link">
207 ····<i·class="ri-link-m"·aria-hidden="true"></i>207 ····<i·class="ri-link-m"·aria-hidden="true"></i>
208 ··</a>208 ··</a>
209 ··<span·class="text">Non-Persistent·Database·Storage</span>209 ··<span·class="text">Non-Persistent·Database·Storage</span>
210 </h3>210 </h3>
211 <p>For·non-persistent·database·storage,·prefer·Ets·tables·over·Mnesia211 <p>For·non-persistent·database·storage,·prefer·Ets·tables·over·Mnesia
212 <code·class="inline">local_content</code>·tables.·Even·the·Mnesia·<code·class="inline">dirty_write</code>·operations·carry·a·fixed212 <code·class="inline">local_content</code>·tables.·Even·the·Mnesia·<code·class="inline">dirty_write</code>·operations·carry·a·fixed
Offset 226, 38 lines modifiedOffset 226, 38 lines modified
226 </h3>226 </h3>
227 <p>Assuming·an·Ets·table·that·uses·<code·class="inline">idno</code>·as·key·and·contains·the·following:</p><pre><code·class="text">[#person{idno·=·1,·name·=·&quot;Adam&quot;,··age·=·31,·occupation·=·&quot;mailman&quot;},227 <p>Assuming·an·Ets·table·that·uses·<code·class="inline">idno</code>·as·key·and·contains·the·following:</p><pre><code·class="text">[#person{idno·=·1,·name·=·&quot;Adam&quot;,··age·=·31,·occupation·=·&quot;mailman&quot;},
228 ·#person{idno·=·2,·name·=·&quot;Bryan&quot;,·age·=·31,·occupation·=·&quot;cashier&quot;},228 ·#person{idno·=·2,·name·=·&quot;Bryan&quot;,·age·=·31,·occupation·=·&quot;cashier&quot;},
229 ·#person{idno·=·3,·name·=·&quot;Bryan&quot;,·age·=·35,·occupation·=·&quot;banker&quot;},229 ·#person{idno·=·3,·name·=·&quot;Bryan&quot;,·age·=·35,·occupation·=·&quot;banker&quot;},
230 ·#person{idno·=·4,·name·=·&quot;Carl&quot;,··age·=·25,·occupation·=·&quot;mailman&quot;}]</code></pre><p>If·you·<em>must</em>·return·all·data·stored·in·the·Ets·table,·you·can·use230 ·#person{idno·=·4,·name·=·&quot;Carl&quot;,··age·=·25,·occupation·=·&quot;mailman&quot;}]</code></pre><p>If·you·<em>must</em>·return·all·data·stored·in·the·Ets·table,·you·can·use
231 <a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#tab2list/1"><code·class="inline">ets:tab2list/1</code></a>.·However,·usually·you·are·only·interested·in·a·subset·of·the231 <a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#tab2list/1"><code·class="inline">ets:tab2list/1</code></a>.·However,·usually·you·are·only·interested·in·a·subset·of·the
232 information·in·which·case·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#tab2list/1"><code·class="inline">ets:tab2list/1</code></a>·is·expensive.·If·you·only·want·to232 information·in·which·case·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#tab2list/1"><code·class="inline">ets:tab2list/1</code></a>·is·expensive.·If·you·only·want·to
233 extract·one·field·from·each·record,·for·example,·the·age·of·every·person,·then:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="2787396655-1">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2787396655-2">[</span><span·class="p"·data-group-id="2787396655-3">{</span><span·class="o">#</span><span·class="ss">person</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·1a31d285f582012895a30fc27fcec9e5019c99d5456f3eeb3d085973f7f2e281·...·]-4">{</span><span·class="ss">idno</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">233 extract·one·field·from·each·record,·for·example,·the·age·of·every·person,·then:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="2498089171-1">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2498089171-2">[</span><span·class="p"·data-group-id="2498089171-3">{</span><span·class="o">#</span><span·class="ss">person</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·c85052be4653118c2ec2f9f403038c5620f97e90f1bb693ee9df82a44e2f6e7d·...·]-4">{</span><span·class="ss">idno</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
234 ··························</span><span·class="ss">name</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">234 ··························</span><span·class="ss">name</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
235 ··························</span><span·class="ss">age</span><span·class="o">=</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">235 ··························</span><span·class="ss">age</span><span·class="o">=</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
236 ··························</span><span·class="ss">occupation</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="2787396655-4">}</span><span·class="p">,</span><span·class="w">236 ··························</span><span·class="ss">occupation</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="2498089171-4">}</span><span·class="p">,</span><span·class="w">
237 ················</span><span·class="p"·data-group-id="2787396655-5">[</span><span·class="p"·data-group-id="2787396655-5">]</span><span·class="p">,</span><span·class="w">237 ················</span><span·class="p"·data-group-id="2498089171-5">[</span><span·class="p"·data-group-id="2498089171-5">]</span><span·class="p">,</span><span·class="w">
238 ················</span><span·class="p"·data-group-id="2787396655-6">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="2787396655-6">]</span><span·class="p"·data-group-id="2787396655-3">}</span><span·class="p"·data-group-id="2787396655-2">]</span><span·class="p"·data-group-id="278739665[·...·truncated·by·diffoscope;·len:·433,·SHA:·463967b279fc7e7187c09d976bf9bdfbba052c5fba58ebc9dad5fc61f5f414de·...·]-1">)</span><span·class="p">,</span><span·class="w">238 ················</span><span·class="p"·data-group-id="2498089171-6">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="2498089171-6">]</span><span·class="p"·data-group-id="2498089171-3">}</span><span·class="p"·data-group-id="2498089171-2">]</span><span·class="p"·data-group-id="249808917[·...·truncated·by·diffoscope;·len:·433,·SHA:·a7679d797abaac677d655694cd2236e5fe7f387cc2e3e7987058349e7039be1e·...·]-1">)</span><span·class="p">,</span><span·class="w">
239 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="8476274328-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8476274328-3">(</span><span·class="n">X</span><span·class="p"·data-group-id="8476274328-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·919,·SHA:·c757d655c55967f50d54beb193479720e5f12b2b5e04c0897a0d10bba00da98a·...·]-4">{</span><span·class="ss">idno</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">239 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="1985055477-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1985055477-3">(</span><span·class="n">X</span><span·class="p"·data-group-id="1985055477-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·919,·SHA:·9a0c3c2b90d75602dda2b93155bf3cbc5d75d88cd770be265e30962908e28271·...·]-4">{</span><span·class="ss">idno</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
240 ··························</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Bryan&quot;</span><span·class="p">,</span><span·class="w">240 ··························</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Bryan&quot;</span><span·class="p">,</span><span·class="w">
241 ··························</span><span·class="ss">age</span><span·class="o">=</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">241 ··························</span><span·class="ss">age</span><span·class="o">=</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
242 ··························</span><span·class="ss">occupation</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="1778489660-4">}</span><span·class="p">,</span><span·class="w">242 ··························</span><span·class="ss">occupation</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="3140359515-4">}</span><span·class="p">,</span><span·class="w">
243 ················</span><span·class="p"·data-group-id="1778489660-5">[</span><span·class="p"·data-group-id="1778489660-5">]</span><span·class="p">,</span><span·class="w">243 ················</span><span·class="p"·data-group-id="3140359515-5">[</span><span·class="p"·data-group-id="3140359515-5">]</span><span·class="p">,</span><span·class="w">
244 ················</span><span·class="p"·data-group-id="1778489660-6">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="1778489660-6">]</span><span·class="p"·data-group-id="1778489660-3">}</span><span·class="p"·data-group-id="1778489660-2">]</span><span·class="p"·data-group-id="17784896[·...·truncated·by·diffoscope;·len:·410,·SHA:·4f3458eb3d307fa62cfbe1171e1f9c429709629c870903d4e35bdacfcf3f7867·...·]-1">)</span><span·class="p">,</span><span·class="w">244 ················</span><span·class="p"·data-group-id="3140359515-6">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="3140359515-6">]</span><span·class="p"·data-group-id="3140359515-3">}</span><span·class="p"·data-group-id="3140359515-2">]</span><span·class="p"·data-group-id="31403595[·...·truncated·by·diffoscope;·len:·410,·SHA:·ad241dcd887f2cfb30ad862fc05b0067f9cfdbddb5f22a2d1b541ef6196cfb39·...·]-1">)</span><span·class="p">,</span><span·class="w">
245 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="9676035735-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="9676035735-3">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="9676035735-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="k">case</span><span·class="w">·</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="w">·</span><span·class="k">of</span><span·class="w">245 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="2913105602-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="2913105602-3">(</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="2913105602-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="k">case</span><span·class="w">·</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">name</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
246 ································</span><span·class="s">&quot;Bryan&quot;</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">246 ································</span><span·class="s">&quot;Bryan&quot;</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
247 ····································</span><span·class="p"·data-group-id="9676035735-4">[</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">age</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="9676035735-4">]</span><span·class="p">;</span><span·class="w">247 ····································</span><span·class="p"·data-group-id="2913105602-4">[</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">person</span><span·class="p">.</span><span·class="ss">age</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="2913105602-4">]</span><span·class="p">;</span><span·class="w">
248 ·································</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">248 ·································</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
249 ·····································</span><span·class="n">Acc</span><span·class="w">249 ·····································</span><span·class="n">Acc</span><span·class="w">
250 ···························</span><span·class="k">end</span><span·class="w">250 ···························</span><span·class="k">end</span><span·class="w">
251 ·············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9676035735-5">[</span><span·class="p"·data-group-id="9676035735-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabList</span><span·class="p"·data-group-id="9676035735-2">)</span></code></pre><p>If·you·need·all·information·stored·in·the·Ets·table·about·persons·named·&quot;Bryan&quot;,251 ·············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2913105602-5">[</span><span·class="p"·data-group-id="2913105602-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabList</span><span·class="p"·data-group-id="2913105602-2">)</span></code></pre><p>If·you·need·all·information·stored·in·the·Ets·table·about·persons·named·&quot;Bryan&quot;,
252 then:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="9065755930-1">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9065755930-2">[</span><span·class="p"·data-group-id="9065755930-3">{</span><span·class="o">#</span><span·class="ss">person</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·6e964343ccdb9924d141538a13cb5ea19a2893a5b9baea296f12b4f64c2b6ef0·...·]-4">{</span><span·class="ss">idno</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">252 then:</p><p><strong>DO</strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="5485596818-1">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5485596818-2">[</span><span·class="p"·data-group-id="5485596818-3">{</span><span·class="o">#</span><span·class="ss">person</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·8069b94e83f13de377f190e280fe1ecbcc7d53fa3c5a5ac3647754319fd90af7·...·]-4">{</span><span·class="ss">idno</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
253 ··························</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Bryan&quot;</span><span·class="p">,</span><span·class="w">253 ··························</span><span·class="ss">name</span><span·class="o">=</span><span·class="s">&quot;Bryan&quot;</span><span·class="p">,</span><span·class="w">
254 ··························</span><span·class="ss">age</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">254 ··························</span><span·class="ss">age</span><span·class="o">=</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
255 ··························</span><span·class="ss">occupation</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="9065755930-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9065755930-5">[</span><span·class="p"·data-group-id="9065755930-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9[·...·truncated·by·diffoscope;·len:·689,·SHA:·1acc576f23172f2b2a316b0b137c88079431c98a9a6709b02cb15510e7789f03·...·]-1">)</span><span·class="p">,</span><span·class="w">255 ··························</span><span·class="ss">occupation</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="5485596818-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5485596818-5">[</span><span·class="p"·data-group-id="5485596818-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5[·...·truncated·by·diffoscope;·len:·689,·SHA:·a7a448be5412e188f7704768f01e598ba8c580721ef30d1f73ef8ce2b8d0c18e·...·]-1">)</span><span·class="p">,</span><span·class="w">
256 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="6662613286-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6662613286-3">(</span><span·class="n">X</span><span·class="p"·data-group-id="6662613286-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·411,·SHA:·43946ac8b295e32f3a07f5e4d0fa9d376bc1af0fccf997c4b3e2a0279d840d74·...·]-2">)</span><span·class="p">,</span></code></pre><h3·id="ordered_set-tables"·class="section-heading">256 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="1931140677-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1931140677-3">(</span><span·class="n">X</span><span·class="p"·data-group-id="1931140677-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·411,·SHA:·46c2a6f0de3524aa440bd73b2fab9b7dfb094f04d5732da5980417a488b2d613·...·]-2">)</span><span·class="p">,</span></code></pre><h3·id="ordered_set-tables"·class="section-heading">
257 ··<a·href="#ordered_set-tables"·class="hover-link">257 ··<a·href="#ordered_set-tables"·class="hover-link">
258 ····<i·class="ri-link-m"·aria-hidden="true"></i>258 ····<i·class="ri-link-m"·aria-hidden="true"></i>
259 ··</a>259 ··</a>
260 ··<span·class="text"><code·class="inline">ordered_set</code>·Tables</span>260 ··<span·class="text"><code·class="inline">ordered_set</code>·Tables</span>
261 </h3>261 </h3>
262 <p>If·the·data·in·the·table·is·to·be·accessed·so·that·the·order·of·the·keys·in·the262 <p>If·the·data·in·the·table·is·to·be·accessed·so·that·the·order·of·the·keys·in·the
263 table·is·significant,·the·table·type·<code·class="inline">ordered_set</code>·can·be·used·instead·of·the263 table·is·significant,·the·table·type·<code·class="inline">ordered_set</code>·can·be·used·instead·of·the
Offset 293, 20 lines modifiedOffset 293, 20 lines modified
293 Clearly,·the·second·table·would·have·to·be·kept·consistent·with·the·master293 Clearly,·the·second·table·would·have·to·be·kept·consistent·with·the·master
294 table.·Mnesia·can·do·this·for·you,·but·a·home-brew·index·table·can·be·very294 table.·Mnesia·can·do·this·for·you,·but·a·home-brew·index·table·can·be·very
295 efficient·compared·to·the·overhead·involved·in·using·Mnesia.</p><p>An·index·table·for·the·table·in·the·previous·examples·would·have·to·be·a·bag·(as295 efficient·compared·to·the·overhead·involved·in·using·Mnesia.</p><p>An·index·table·for·the·table·in·the·previous·examples·would·have·to·be·a·bag·(as
296 keys·would·appear·more·than·once)·and·can·have·the·following·contents:</p><pre><code·class="text">[#index_entry{name=&quot;Adam&quot;,·idno=1},296 keys·would·appear·more·than·once)·and·can·have·the·following·contents:</p><pre><code·class="text">[#index_entry{name=&quot;Adam&quot;,·idno=1},
297 ·#index_entry{name=&quot;Bryan&quot;,·idno=2},297 ·#index_entry{name=&quot;Bryan&quot;,·idno=2},
298 ·#index_entry{name=&quot;Bryan&quot;,·idno=3},298 ·#index_entry{name=&quot;Bryan&quot;,·idno=3},
299 ·#index_entry{name=&quot;Carl&quot;,·idno=4}]</code></pre><p>Given·this·index·table,·a·lookup·of·the·<code·class="inline">age</code>·fields·for·all·persons·named299 ·#index_entry{name=&quot;Carl&quot;,·idno=4}]</code></pre><p>Given·this·index·table,·a·lookup·of·the·<code·class="inline">age</code>·fields·for·all·persons·named
300 &quot;Bryan&quot;·can·be·done·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">MatchingIDs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="6245022557-1">(</span><span·class="n">IndexTable</span><span·class="p">,</span><span·class="s">&quot;Bryan&quot;</span><span·class="p"·data-group-id="6245022557-1">)</span><span·class="p">,</span><span·class="w">300 &quot;Bryan&quot;·can·be·done·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">MatchingIDs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="2650009280-1">(</span><span·class="n">IndexTable</span><span·class="p">,</span><span·class="s">&quot;Bryan&quot;</span><span·class="p"·data-group-id="2650009280-1">)</span><span·class="p">,</span><span·class="w">
301 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="6245022557-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6245022557-3">(</span><span·class="o">#</span><span·class="ss">index_entry</span><span·class="p"·data-group-id="6245022557-4">{</span><span·class="ss">idno</span><span·class="w[·...·truncated·by·diffoscope;·len:·177,·SHA:·d7c69a947881c54ecae71dfa4a57b67e2edbb45e0fd9dbf58bb5ed549f24542f·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">301 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="2650009280-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="2650009280-3">(</span><span·class="o">#</span><span·class="ss">index_entry</span><span·class="p"·data-group-id="2650009280-4">{</span><span·class="ss">idno</span><span·class="w[·...·truncated·by·diffoscope;·len:·177,·SHA:·10032edeb7047268498cc789c6a8ad501d13035a367527d284f65af76454cef0·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
302 ·················</span><span·class="p"·data-group-id="6245022557-5">[</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="6245022557-6">{</span><span·class="ss">age</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Age</span><s[·...·truncated·by·diffoscope;·len:·458,·SHA:·dda3970c23f1b46b25b7d6dfa894780a263945d1a6a10ac91ed59cdd18abebac·...·]-7">)</span><span·class="p">,</span><span·class="w">302 ·················</span><span·class="p"·data-group-id="2650009280-5">[</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2650009280-6">{</span><span·class="ss">age</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Age</span><s[·...·truncated·by·diffoscope;·len:·458,·SHA:·cb83db8f04ac1debc93575d73dd410a12bdd2fe296bed3e91804ad7ac5bda45b·...·]-7">)</span><span·class="p">,</span><span·class="w">
303 ·················</span><span·class="n">Age</span><span·class="w">303 ·················</span><span·class="n">Age</span><span·class="w">
304 ··········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">304 ··········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
305 ··········</span><span·class="n">MatchingIDs</span><span·class="p"·data-group-id="6245022557-2">)</span><span·class="p">,</span></code></pre><p>Notice·that·this·code·does·not·use·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#match/2"><code·class="inline">ets:match/2</code></a>,·but·instead·uses·the305 ··········</span><span·class="n">MatchingIDs</span><span·class="p"·data-group-id="2650009280-2">)</span><span·class="p">,</span></code></pre><p>Notice·that·this·code·does·not·use·<a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#match/2"><code·class="inline">ets:match/2</code></a>,·but·instead·uses·the
306 <a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#lookup/2"><code·class="inline">ets:lookup/2</code></a>·call.·The·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#map/2"><code·class="inline">lists:map/2</code></a>·call·is·only·used·to·traverse·the·<code·class="inline">idno</code>s306 <a·href="../../lib/stdlib-6.0.1/doc/html/ets.html#lookup/2"><code·class="inline">ets:lookup/2</code></a>·call.·The·<a·href="../../lib/stdlib-6.0.1/doc/html/lists.html#map/2"><code·class="inline">lists:map/2</code></a>·call·is·only·used·to·traverse·the·<code·class="inline">idno</code>s
Max diff block lines reached; 16275/71628 bytes (22.72%) of diff not shown.
68.4 KB
./usr/share/doc/erlang-doc/html/doc/system/typespec.html
    
Offset 237, 124 lines modifiedOffset 237, 124 lines modified
237 and·optional·<code·class="inline">(=&gt;)</code>·association·types.·If·an·association·type·is·mandatory,·an237 and·optional·<code·class="inline">(=&gt;)</code>·association·types.·If·an·association·type·is·mandatory,·an
238 association·with·that·type·needs·to·be·present.·In·the·case·of·an·optional238 association·with·that·type·needs·to·be·present.·In·the·case·of·an·optional
239 association·type·it·is·not·required·for·the·key·type·to·be·present.</p><p>The·notation·<code·class="inline">#{}</code>·specifies·the·singleton·type·for·the·empty·map.·Note·that239 association·type·it·is·not·required·for·the·key·type·to·be·present.</p><p>The·notation·<code·class="inline">#{}</code>·specifies·the·singleton·type·for·the·empty·map.·Note·that
240 this·notation·is·not·a·shorthand·for·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a>·type.</p><p>For·convenience,·the·following·types·are·also·built-in.·They·can·be·thought·as240 this·notation·is·not·a·shorthand·for·the·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a>·type.</p><p>For·convenience,·the·following·types·are·also·built-in.·They·can·be·thought·as
241 predefined·aliases·for·the·type·unions·also·shown·in·the·table.</p><p><a·href=""·id="builtin_types"></a></p><table><thead><tr><th·style="text-align:·left;"><em>Built-in·type</em></th><th·style="text-align:·left;"><em>Defined·as</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:term/0"><code·class="inline">term/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:any/0"><code·class="inline">any/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:binary/0"><code·class="inline">binary/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:_*8&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_binary/0"><code·class="inline">nonempty_binary/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:8,·_:_*8&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:bitstring/0"><code·class="inline">bitstring/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:_*1&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_bitstring/0"><code·class="inline">nonempty_bitstring/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:1,·_:_*1&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:boolean/0"><code·class="inline">boolean/0</code></a></td><td·style="text-align:·left;"><code·class="inline">'false'</code>·|·<code·class="inline">'true'</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..255</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:char/0"><code·class="inline">char/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..16#10ffff</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nil/0"><code·class="inline">nil/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:number/0"><code·class="inline">number/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>·|·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:float/0"><code·class="inline">float/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[any()]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:maybe_improper_list/0"><code·class="inline">maybe_improper_list/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:maybe_improper_list/2"><code·class="inline">maybe_improper_list(any(),·any())</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_list/0"><code·class="inline">nonempty_list/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_list/1"><code·class="inline">nonempty_list(any())</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:string/0"><code·class="inline">string/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[char()]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_string/0"><code·class="inline">nonempty_string/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[char(),...]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:iodata/0"><code·class="inline">iodata/0</code></a></td><td·style="text-align:·left;"><code·class="inline">iolist()</code>·|·<code·class="inline">binary()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:iolist/0"><code·class="inline">iolist/0</code></a></td><td·style="text-align:·left;"><code·class="inline">maybe_improper_list(byte()</code>·|·<code·class="inline">binary()</code>·|·<code·class="inline">iolist(),·binary()</code>·|·<code·class="inline">[])</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a></td><td·style="text-align:·left;"><code·class="inline">#{any()·=&gt;·any()}</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:function/0"><code·class="inline">function/0</code></a></td><td·style="text-align:·left;"><code·class="inline">fun()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:module/0"><code·class="inline">module/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:atom/0"><code·class="inline">atom/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:mfa/0"><code·class="inline">mfa/0</code></a></td><td·style="text-align:·left;"><code·class="inline">{module(),atom(),arity()}</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:arity/0"><code·class="inline">arity/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..255</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:identifier/0"><code·class="inline">identifier/0</code></a></td><td·style="text-align:·left;"><code·class="inline">pid()</code>·|·<code·class="inline">port()</code>·|·<code·class="inline">reference()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#node/0"><code·class="inline">node/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:atom/0"><code·class="inline">atom/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:timeout/0"><code·class="inline">timeout/0</code></a></td><td·style="text-align:·left;"><code·class="inline">'infinity'</code>·|·<code·class="inline">non_neg_integer()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:no_return/0"><code·class="inline">no_return/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:none/0"><code·class="inline">none/0</code></a></td></tr></tbody></table><p><em>Table:·Built-in·types,·predefined·aliases</em></p><p>In·addition,·the·following·three·built-in·types·exist·and·can·be·thought·as241 predefined·aliases·for·the·type·unions·also·shown·in·the·table.</p><p><a·href=""·id="builtin_types"></a></p><table><thead><tr><th·style="text-align:·left;"><em>Built-in·type</em></th><th·style="text-align:·left;"><em>Defined·as</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:term/0"><code·class="inline">term/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:any/0"><code·class="inline">any/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:binary/0"><code·class="inline">binary/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:_*8&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_binary/0"><code·class="inline">nonempty_binary/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:8,·_:_*8&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:bitstring/0"><code·class="inline">bitstring/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:_*1&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_bitstring/0"><code·class="inline">nonempty_bitstring/0</code></a></td><td·style="text-align:·left;"><code·class="inline">&lt;&lt;_:1,·_:_*1&gt;&gt;</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:boolean/0"><code·class="inline">boolean/0</code></a></td><td·style="text-align:·left;"><code·class="inline">'false'</code>·|·<code·class="inline">'true'</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..255</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:char/0"><code·class="inline">char/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..16#10ffff</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nil/0"><code·class="inline">nil/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:number/0"><code·class="inline">number/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>·|·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:float/0"><code·class="inline">float/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[any()]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:maybe_improper_list/0"><code·class="inline">maybe_improper_list/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:maybe_improper_list/2"><code·class="inline">maybe_improper_list(any(),·any())</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_list/0"><code·class="inline">nonempty_list/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_list/1"><code·class="inline">nonempty_list(any())</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:string/0"><code·class="inline">string/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[char()]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:nonempty_string/0"><code·class="inline">nonempty_string/0</code></a></td><td·style="text-align:·left;"><code·class="inline">[char(),...]</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:iodata/0"><code·class="inline">iodata/0</code></a></td><td·style="text-align:·left;"><code·class="inline">iolist()</code>·|·<code·class="inline">binary()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:iolist/0"><code·class="inline">iolist/0</code></a></td><td·style="text-align:·left;"><code·class="inline">maybe_improper_list(byte()</code>·|·<code·class="inline">binary()</code>·|·<code·class="inline">iolist(),·binary()</code>·|·<code·class="inline">[])</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a></td><td·style="text-align:·left;"><code·class="inline">#{any()·=&gt;·any()}</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:function/0"><code·class="inline">function/0</code></a></td><td·style="text-align:·left;"><code·class="inline">fun()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:module/0"><code·class="inline">module/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:atom/0"><code·class="inline">atom/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:mfa/0"><code·class="inline">mfa/0</code></a></td><td·style="text-align:·left;"><code·class="inline">{module(),atom(),arity()}</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:arity/0"><code·class="inline">arity/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..255</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:identifier/0"><code·class="inline">identifier/0</code></a></td><td·style="text-align:·left;"><code·class="inline">pid()</code>·|·<code·class="inline">port()</code>·|·<code·class="inline">reference()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#node/0"><code·class="inline">node/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:atom/0"><code·class="inline">atom/0</code></a></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:timeout/0"><code·class="inline">timeout/0</code></a></td><td·style="text-align:·left;"><code·class="inline">'infinity'</code>·|·<code·class="inline">non_neg_integer()</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:no_return/0"><code·class="inline">no_return/0</code></a></td><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:none/0"><code·class="inline">none/0</code></a></td></tr></tbody></table><p><em>Table:·Built-in·types,·predefined·aliases</em></p><p>In·addition,·the·following·three·built-in·types·exist·and·can·be·thought·as
242 defined·below,·though·strictly·their·&quot;type·definition&quot;·is·not·valid·syntax242 defined·below,·though·strictly·their·&quot;type·definition&quot;·is·not·valid·syntax
243 according·to·the·type·language·defined·above.</p><table><thead><tr><th·style="text-align:·left;"><em>Built-in·type</em></th><th·style="text-align:·left;"><em>Can·be·thought·defined·by·the·syntax</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:pos_integer/0"><code·class="inline">pos_integer/0</code></a></td><td·style="text-align:·left;"><code·class="inline">1..</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:neg_integer/0"><code·class="inline">neg_integer/0</code></a></td><td·style="text-align:·left;"><code·class="inline">..-1</code></td></tr></tbody></table><p><em>Table:·Additional·built-in·types</em></p><blockquote><h4·class="info">Note</h4><p>The·following·built-in·list·types·also·exist,·but·they·are·expected·to·be243 according·to·the·type·language·defined·above.</p><table><thead><tr><th·style="text-align:·left;"><em>Built-in·type</em></th><th·style="text-align:·left;"><em>Can·be·thought·defined·by·the·syntax</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></td><td·style="text-align:·left;"><code·class="inline">0..</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:pos_integer/0"><code·class="inline">pos_integer/0</code></a></td><td·style="text-align:·left;"><code·class="inline">1..</code></td></tr><tr><td·style="text-align:·left;"><a·href="../../erts-15.0.1/doc/html/erlang.html#t:neg_integer/0"><code·class="inline">neg_integer/0</code></a></td><td·style="text-align:·left;"><code·class="inline">..-1</code></td></tr></tbody></table><p><em>Table:·Additional·built-in·types</em></p><blockquote><h4·class="info">Note</h4><p>The·following·built-in·list·types·also·exist,·but·they·are·expected·to·be
244 rarely·used.·Hence,·they·have·long·names:</p></blockquote><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">nonempty_maybe_improper_list</span><span·class="p"·data-group-id="8552050551-1">(</span><span·class="p"·data-group-id="8552050551-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">nonempty_maybe_improper_list</span><span·class="p"·data-group-id="85[·...·truncated·by·diffoscope;·len:·374,·SHA:·2b5a9a150a74ef52262c083243f61c5e8ea0fdfe3e73a76e487387bac2641246·...·]1-2">)</span><span·class="w">244 rarely·used.·Hence,·they·have·long·names:</p></blockquote><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">nonempty_maybe_improper_list</span><span·class="p"·data-group-id="9361244961-1">(</span><span·class="p"·data-group-id="9361244961-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">nonempty_maybe_improper_list</span><span·class="p"·data-group-id="93[·...·truncated·by·diffoscope;·len:·374,·SHA:·de064970f923762f483027326ba0d5787e849e84cf9017abcc1e876624ed1f66·...·]1-2">)</span><span·class="w">
245 </span><span·class="nf">nonempty_improper_list</span><span·class="p"·data-group-id="8552050551-5">(</span><span·class="n">Type1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type2</span><span·class="p"·data-group-id="8552050551-5">)</span><span·class="w">245 </span><span·class="nf">nonempty_improper_list</span><span·class="p"·data-group-id="9361244961-5">(</span><span·class="n">Type1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type2</span><span·class="p"·data-group-id="9361244961-5">)</span><span·class="w">
246 </span><span·class="nf">nonempty_maybe_improper_list</span><span·class="p"·data-group-id="8552050551-6">(</span><span·class="n">Type1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type2</span><span·class="p"·data-group-id="8552050551-6">)</span></code></pre><p>where·the·last·two·types·define·the·set·of·Erlang·terms·one·would·expect.</p><p>Also·for·convenience,·record·notation·is·allowed·to·be·used.·Records·are246 </span><span·class="nf">nonempty_maybe_improper_list</span><span·class="p"·data-group-id="9361244961-6">(</span><span·class="n">Type1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type2</span><span·class="p"·data-group-id="9361244961-6">)</span></code></pre><p>where·the·last·two·types·define·the·set·of·Erlang·terms·one·would·expect.</p><p>Also·for·convenience,·record·notation·is·allowed·to·be·used.·Records·are
247 shorthands·for·the·corresponding·tuples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Record</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Erlang_Atom</span><span·class="p"·data-group-id="7348913407-1">{</span><span·class="p"·data-group-id="7348913407-1">}</span><span·class="w">247 shorthands·for·the·corresponding·tuples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Record</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Erlang_Atom</span><span·class="p"·data-group-id="9707237850-1">{</span><span·class="p"·data-group-id="9707237850-1">}</span><span·class="w">
248 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Erlang_Atom</span><span·class="p"·data-group-id="7348913407-2">{</span><span·class="n">Fields</span><span·class="p"·data-group-id="7348913407-2">}</span></code></pre><p>Records·are·extended·to·possibly·contain·type·information.·This·is·described·in248 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Erlang_Atom</span><span·class="p"·data-group-id="9707237850-2">{</span><span·class="n">Fields</span><span·class="p"·data-group-id="9707237850-2">}</span></code></pre><p>Records·are·extended·to·possibly·contain·type·information.·This·is·described·in
249 <a·href="typespec.html#typeinrecords">Type·Information·in·Record·Declarations</a>.</p><h3·id="redefining-built-in-types"·class="section-heading">249 <a·href="typespec.html#typeinrecords">Type·Information·in·Record·Declarations</a>.</p><h3·id="redefining-built-in-types"·class="section-heading">
250 ··<a·href="#redefining-built-in-types"·class="hover-link">250 ··<a·href="#redefining-built-in-types"·class="hover-link">
251 ····<i·class="ri-link-m"·aria-hidden="true"></i>251 ····<i·class="ri-link-m"·aria-hidden="true"></i>
252 ··</a>252 ··</a>
253 ··<span·class="text">Redefining·built-in·types</span>253 ··<span·class="text">Redefining·built-in·types</span>
254 </h3>254 </h3>
255 <blockquote><h4·class="info">Change</h4><p>Starting·from·Erlang/OTP·26,·is·is·permitted·to·define·a·type·having·the·same255 <blockquote><h4·class="info">Change</h4><p>Starting·from·Erlang/OTP·26,·is·is·permitted·to·define·a·type·having·the·same
256 name·as·a·built-in·type.</p></blockquote><p>It·is·recommended·to·avoid·deliberately·reusing·built-in·names·because·it·can·be256 name·as·a·built-in·type.</p></blockquote><p>It·is·recommended·to·avoid·deliberately·reusing·built-in·names·because·it·can·be
257 confusing.·However,·when·an·Erlang/OTP·release·introduces·a·new·type,·code·that257 confusing.·However,·when·an·Erlang/OTP·release·introduces·a·new·type,·code·that
258 happened·to·define·its·own·type·having·the·same·name·will·continue·to·work.</p><p>As·an·example,·imagine·that·the·Erlang/OTP·42·release·introduces·a·new·type258 happened·to·define·its·own·type·having·the·same·name·will·continue·to·work.</p><p>As·an·example,·imagine·that·the·Erlang/OTP·42·release·introduces·a·new·type
259 <code·class="inline">gadget()</code>·defined·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">gadget</span><span·class="p"·data-group-id="4610216427-1">(</span><span·class="p"·data-group-id="4610216427-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4610216427-2">{</span><span·class="ss">&#39;gadget&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">reference</span><span·class="p"·data-group-id="4610216427-3">(</span><span·class="p"·data-group-id="4610216427-3">)</span><span·class="p"·data-group-id="4610216427-2">}</span><span·class="p">.</span></code></pre><p>Further·imagine·that·some·code·has·its·own·(different)·definition·of·<code·class="inline">gadget()</code>, 
260 for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">gadget</span><span·class="p"·data-group-id="0357993308-1">(</span><span·class="p"·data-group-id="03[·...·truncated·by·diffoscope;·len:·335,·SHA:·fe02ac70a5d081be6af196673cfdd3d91c2ea435649b1663af8d1d61159f7aab·...·]259 <code·class="inline">gadget()</code>·defined·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">gadget</span><span·class="p"·data-group-id="6363674119-1[·...·truncated·by·diffoscope;·len:·638,·SHA:·aeba5d10c03f67fd141c65c03bfbd457ad7ad3b0df0b324543663e0bc1d35bb6·...·]
 260 for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">gadget</span><span·class="p"·data-group-id="3957270951-1">(</span><span·class="p"·data-group-id="3957270951-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3957270951-2">#{</span><span·class="p"·data-group-id="3957270951-2">}</span><span·class="p">.</span></code></pre><p>Since·redefinitions·are·allowed,·the·code·will·still·compile·(but·with·a
261 warning),·and·Dialyzer·will·not·emit·any·additional·warnings.</p><h2·id="type-declarations-of-user-defined-types"·class="section-heading">261 warning),·and·Dialyzer·will·not·emit·any·additional·warnings.</p><h2·id="type-declarations-of-user-defined-types"·class="section-heading">
262 ··<a·href="#type-declarations-of-user-defined-types"·class="hover-link">262 ··<a·href="#type-declarations-of-user-defined-types"·class="hover-link">
263 ····<i·class="ri-link-m"·aria-hidden="true"></i>263 ····<i·class="ri-link-m"·aria-hidden="true"></i>
264 ··</a>264 ··</a>
265 ··<span·class="text">Type·Declarations·of·User-Defined·Types</span>265 ··<span·class="text">Type·Declarations·of·User-Defined·Types</span>
266 </h2>266 </h2>
267 <p>As·seen,·the·basic·syntax·of·a·type·is·an·atom·followed·by·closed·parentheses.267 <p>As·seen,·the·basic·syntax·of·a·type·is·an·atom·followed·by·closed·parentheses.
268 New·types·are·declared·using·<code·class="inline">-type</code>·and·<code·class="inline">-opaque</code>·attributes·as·in·the268 New·types·are·declared·using·<code·class="inline">-type</code>·and·<code·class="inline">-opaque</code>·attributes·as·in·the
269 following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">my_struct_type</span><span·class="p"·data-group-id="1937266618-1">(</span><span·class="p"·data-group-id="1937266618-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">.</span><span·class="w">269 following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">my_struct_type</span><span·class="p"·data-group-id="6271772233-1">(</span><span·class="p"·data-group-id="6271772233-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">.</span><span·class="w">
270 </span><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">my_opaq_type</span><span·class="p"·data-group-id="1937266618-2">(</span><span·class="p"·data-group-id="1937266618-2">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">.</span></code></pre><p>The·type·name·is·the·atom·<code·class="inline">my_struct_type</code>,·followed·by·parentheses.·<code·class="inline">Type</code>·is·a270 </span><span·class="p">-</span><span·class="na">opaque</span><span·class="w">·</span><span·class="nf">my_opaq_type</span><span·class="p"·data-group-id="6271772233-2">(</span><span·class="p"·data-group-id="6271772233-2">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">.</span></code></pre><p>The·type·name·is·the·atom·<code·class="inline">my_struct_type</code>,·followed·by·parentheses.·<code·class="inline">Type</code>·is·a
271 type·as·defined·in·the·previous·section.·A·current·restriction·is·that·<code·class="inline">Type</code>271 type·as·defined·in·the·previous·section.·A·current·restriction·is·that·<code·class="inline">Type</code>
272 can·contain·only·predefined·types,·or·user-defined·types·which·are·either·of·the272 can·contain·only·predefined·types,·or·user-defined·types·which·are·either·of·the
273 following:</p><ul><li>Module-local·type,·that·is,·with·a·definition·that·is·present·in·the·code·of273 following:</p><ul><li>Module-local·type,·that·is,·with·a·definition·that·is·present·in·the·code·of
274 the·module</li><li>Remote·type,·that·is,·type·defined·in,·and·exported·by,·other·modules;·more274 the·module</li><li>Remote·type,·that·is,·type·defined·in,·and·exported·by,·other·modules;·more
275 about·this·soon.</li></ul><p>For·module-local·types,·the·restriction·that·their·definition·exists·in·the275 about·this·soon.</li></ul><p>For·module-local·types,·the·restriction·that·their·definition·exists·in·the
276 module·is·enforced·by·the·compiler·and·results·in·a·compilation·error.·(A276 module·is·enforced·by·the·compiler·and·results·in·a·compilation·error.·(A
277 similar·restriction·currently·exists·for·records.)</p><p>Type·declarations·can·also·be·parameterized·by·including·type·variables·between277 similar·restriction·currently·exists·for·records.)</p><p>Type·declarations·can·also·be·parameterized·by·including·type·variables·between
278 the·parentheses.·The·syntax·of·type·variables·is·the·same·as·Erlang·variables,278 the·parentheses.·The·syntax·of·type·variables·is·the·same·as·Erlang·variables,
279 that·is,·starts·with·an·upper-case·letter.·These·variables·is·to279 that·is,·starts·with·an·upper-case·letter.·These·variables·is·to
280 appear·on·the·RHS·of·the·definition.·A·concrete·example·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">orddict</span><span·class="p"·data-group-id="9972883248-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="9972883248-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·cla[·...·truncated·by·diffoscope;·len:·314,·SHA:·ff2bf0c5c519ebc5260a90155b10b567c83e99c6c6846826e165e62e59179eea·...·]8-2">]</span><span·class="p">.</span></code></pre><p>A·module·can·export·some·types·to·declare·that·other·modules·are·allowed·to280 appear·on·the·RHS·of·the·definition.·A·concrete·example·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">orddict</span><span·class="p"·data-group-id="6575103998-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="6575103998-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·cla[·...·truncated·by·diffoscope;·len:·314,·SHA:·48612e13dae9946a47fab212efb76630ea148d95f4c1e6b6fffccfb6036787ed·...·]8-2">]</span><span·class="p">.</span></code></pre><p>A·module·can·export·some·types·to·declare·that·other·modules·are·allowed·to
281 refer·to·them·as·<em>remote·types</em>.·This·declaration·has·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">export_type</span><span·class="p"·data-group-id="7193704599-1">(</span><span·class="p"·data-group-id="7193704599-2">[</span><span·class="n">T1</span><span·class="o">/</span><span·class="n">A1</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class[·...·truncated·by·diffoscope;·len:·965,·SHA:·a09baec845e37b9c585fcae30d45df8a4722f3d5cb9aae945967e627a01cdeef·...·]-1">)</span><span·class="p">.</span></code></pre><p>Assuming·that·these·types·are·exported·from·module·<code·class="inline">'mod'</code>,·you·can·refer·to281 refer·to·them·as·<em>remote·types</em>.·This·declaration·has·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">export_type</span><span·class="p"·data-group-id="1310108669-1">(</span><span·class="p"·data-group-id="1310108669-2">[</span><span·class="n">T1</span><span·class="o">/</span><span·class="n">A1</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class[·...·truncated·by·diffoscope;·len:·965,·SHA:·f2bf5881f6527d715f923060fc791dd4a55f75fd174928c62f4213d613c2f6f6·...·]-1">)</span><span·class="p">.</span></code></pre><p>Assuming·that·these·types·are·exported·from·module·<code·class="inline">'mod'</code>,·you·can·refer·to
282 them·from·other·modules·using·remote·type·expressions·like·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mod</span><span·class="p">:</span><span·class="nf">my_struct_type</span><span·class="p"·data-group-id="8045947307-1">(</span><span·class="p"·data-group-id="8045947307-1">)</span><span·class="w">282 them·from·other·modules·using·remote·type·expressions·like·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mod</span><span·class="p">:</span><span·class="nf">my_struct_type</span><span·class="p"·data-group-id="7559656922-1">(</span><span·class="p"·data-group-id="7559656922-1">)</span><span·class="w">
283 </span><span·class="nc">mod</span><span·class="p">:</span><span·class="nf">orddict</span><span·class="p"·data-group-id="8045947307-2">(</span><span·class="nf">atom</span><span·class="p"·data-group-id="8045947307-3">(</span><span·class="p"·data-group-id="8045947307-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·123,·SHA:·2cc024b9eaa1bb97c8341897cef4e42a383c229acf53d97a4e2d401e71097ea8·...·]-2">)</span></code></pre><p>It·is·not·allowed·to·refer·to·types·that·are·not·declared·as·exported.</p><p>Types·declared·as·<code·class="inline">opaque</code>·represent·sets·of·terms·whose·structure·is·not283 </span><span·class="nc">mod</span><span·class="p">:</span><span·class="nf">orddict</span><span·class="p"·data-group-id="7559656922-2">(</span><span·class="nf">atom</span><span·class="p"·data-group-id="7559656922-3">(</span><span·class="p"·data-group-id="7559656922-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·123,·SHA:·9f412dc68bb8a3581441fa148af50dc33425dfb5201f233018ae23e866182e30·...·]-2">)</span></code></pre><p>It·is·not·allowed·to·refer·to·types·that·are·not·declared·as·exported.</p><p>Types·declared·as·<code·class="inline">opaque</code>·represent·sets·of·terms·whose·structure·is·not
284 supposed·to·be·visible·from·outside·of·their·defining·module.·That·is,·only·the284 supposed·to·be·visible·from·outside·of·their·defining·module.·That·is,·only·the
285 module·defining·them·is·allowed·to·depend·on·their·term·structure.·Consequently,285 module·defining·them·is·allowed·to·depend·on·their·term·structure.·Consequently,
286 such·types·do·not·make·much·sense·as·module·local·-·module·local·types·are·not286 such·types·do·not·make·much·sense·as·module·local·-·module·local·types·are·not
287 accessible·by·other·modules·anyway·-·and·is·always·to·be·exported.</p><p>Read·more·on·<a·href="opaques.html">Opaques</a></p><p><a·href=""·id="typeinrecords"></a></p><h2·id="type-information-in-record-declarations"·class="section-heading">287 accessible·by·other·modules·anyway·-·and·is·always·to·be·exported.</p><p>Read·more·on·<a·href="opaques.html">Opaques</a></p><p><a·href=""·id="typeinrecords"></a></p><h2·id="type-information-in-record-declarations"·class="section-heading">
288 ··<a·href="#type-information-in-record-declarations"·class="hover-link">288 ··<a·href="#type-information-in-record-declarations"·class="hover-link">
289 ····<i·class="ri-link-m"·aria-hidden="true"></i>289 ····<i·class="ri-link-m"·aria-hidden="true"></i>
290 ··</a>290 ··</a>
291 ··<span·class="text">Type·Information·in·Record·Declarations</span>291 ··<span·class="text">Type·Information·in·Record·Declarations</span>
292 </h2>292 </h2>
293 <p>The·types·of·record·fields·can·be·specified·in·the·declaration·of·the·record.293 <p>The·types·of·record·fields·can·be·specified·in·the·declaration·of·the·record.
294 The·syntax·for·this·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4141115269-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4141115269-2">{</span><span·class="ss">field1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><spa[·...·truncated·by·diffoscope;·len:·422,·SHA:·f6509a6513f2d89983a0e0ba00b532f0ddec4649bd6e349729f555db36b53378·...·]-1">)</span><span·class="p">.</span></code></pre><p>For·fields·without·type·annotations,·their·type·defaults·to·<code·class="inline">any()</code>.·That·is,·the294 The·syntax·for·this·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7323431305-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7323431305-2">{</span><span·class="ss">field1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><spa[·...·truncated·by·diffoscope;·len:·422,·SHA:·d50c60912cb828e478723aea23a7bd245b6b27ec56c8c44716c248fc4bc6ddcb·...·]-1">)</span><span·class="p">.</span></code></pre><p>For·fields·without·type·annotations,·their·type·defaults·to·<code·class="inline">any()</code>.·That·is,·the
295 previous·example·is·a·shorthand·for·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4535598342-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4535598342-2">{</span><span·class="ss">field1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span[·...·truncated·by·diffoscope;·len:·650,·SHA:·fcc220fa96ab3e69e13e43e2ccaaa2fbfe2ef2e6ae75096590030641d43b32af·...·]-1">)</span><span·class="p">.</span></code></pre><p>In·the·presence·of·initial·values·for·fields,·the·type·must·be·declared·after295 previous·example·is·a·shorthand·for·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4441562125-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4441562125-2">{</span><span·class="ss">field1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span[·...·truncated·by·diffoscope;·len:·650,·SHA:·5611fd19efe975ca93a3b63c328613ab4598caae23d9d7b0b2c9dcdc4ff72771·...·]-1">)</span><span·class="p">.</span></code></pre><p>In·the·presence·of·initial·values·for·fields,·the·type·must·be·declared·after
296 the·initialization,·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4788206923-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4788206923-2">{</span><span·class="ss">field1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·698,·SHA:·89f3788e190b39afea5877a6cf214fea2da299d28857499d4254926b7e61b0de·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·initial·values·for·fields·are·to·be·compatible·with·(that·is,·a·member·of)296 the·initialization,·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7823489547-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7823489547-2">{</span><span·class="ss">field1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·698,·SHA:·5a2b3308a72c3f794ac5750c4ca5ad1510b7a161894d3104cf54e3280234168b·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·initial·values·for·fields·are·to·be·compatible·with·(that·is,·a·member·of)
297 the·corresponding·types.·This·is·checked·by·the·compiler·and·results·in·a297 the·corresponding·types.·This·is·checked·by·the·compiler·and·results·in·a
298 compilation·error·if·a·violation·is·detected.</p><blockquote><h4·class="info">Change</h4><p>Before·Erlang/OTP·19,·for·fields·without·initial·values,·the·singleton·type298 compilation·error·if·a·violation·is·detected.</p><blockquote><h4·class="info">Change</h4><p>Before·Erlang/OTP·19,·for·fields·without·initial·values,·the·singleton·type
299 <code·class="inline">'undefined'</code>·was·added·to·all·declared·types.·In·other·words,·the·following299 <code·class="inline">'undefined'</code>·was·added·to·all·declared·types.·In·other·words,·the·following
300 two·record·declarations·had·identical·effects:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9921473594-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9921473594-2">{</span><span·class="ss">f1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·237,·SHA:·1577825596042f418ad173625d5a6e50ababc0dab5d233d8aa646ca3037b667f·...·]-3">)</span><span·class="p">,</span><span·class="w">300 two·record·declarations·had·identical·effects:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9948587578-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9948587578-2">{</span><span·class="ss">f1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·237,·SHA:·ceea2ff1fe930f45be32336bcfbd4f54cbbdc137b59fe88517060452dfa67337·...·]-3">)</span><span·class="p">,</span><span·class="w">
301 ·············</span><span·class="ss">f2</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">float</span><span·class="p"·data-group-id="9921473594-4">(</span><span·class="p"·data-group-id="9921473594-4">)</span><span·class="p">,</span><span·class="w">301 ·············</span><span·class="ss">f2</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">float</span><span·class="p"·data-group-id="9948587578-4">(</span><span·class="p"·data-group-id="9948587578-4">)</span><span·class="p">,</span><span·class="w">
302 ·············</span><span·class="ss">f3</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="9921473594-2">}</span><span·class="p"·data-group-id="9921473594-1">)</span><span·class="p">.</span><span·class="w">302 ·············</span><span·class="ss">f3</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="9948587578-2">}</span><span·class="p"·data-group-id="9948587578-1">)</span><span·class="p">.</span><span·class="w">
303 </span><span·class="w">303 </span><span·class="w">
304 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9921473594-5">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9921473594-6">{</span><span·class="ss">f1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·237,·SHA:·dc3e9527d2af2ea84d2dbb0c8e2e60eb1ae70fe3c714db31276ed66cdfa2e3fb·...·]-7">)</span><span·class="p">,</span><span·class="w">304 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9948587578-5">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9948587578-6">{</span><span·class="ss">f1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·237,·SHA:·68c92c76b504e07e8127784fdc31e67bf99a259a42bfe8b1a6220288c01a0892·...·]-7">)</span><span·class="p">,</span><span·class="w">
305 ··············</span><span·class="ss">f2</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;undefined&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">float</span><span·class="p"·data-group-id="9921473594-8">(</span><span·class="p"·data-group-id="9921473594-8">)</span><span·class="p">,</span><span·class="w">305 ··············</span><span·class="ss">f2</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;undefined&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">float</span><span·class="p"·data-group-id="9948587578-8">(</span><span·class="p"·data-group-id="9948587578-8">)</span><span·class="p">,</span><span·class="w">
306 ··············</span><span·class="ss">f3</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;undefined&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="9921473594-6">}</span><span·class="p"·data-group-id="9921473594-5">)</span><span·class="p">.</span></code></pre><p>This·is·no·longer·the·case.·If·you·require·<code·class="inline">'undefined'</code>·in·your·record·field306 ··············</span><span·class="ss">f3</span><span·class="w">······</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;undefined&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="9948587578-6">}</span><span·class="p"·data-group-id="9948587578-5">)</span><span·class="p">.</span></code></pre><p>This·is·no·longer·the·case.·If·you·require·<code·class="inline">'undefined'</code>·in·your·record·field
307 type,·you·must·explicitly·add·it·to·the·typespec,·as·in·the·2nd·example.</p></blockquote><p>Any·record,·containing·type·information·or·not,·once·defined,·can·be·used·as·a307 type,·you·must·explicitly·add·it·to·the·typespec,·as·in·the·2nd·example.</p></blockquote><p>Any·record,·containing·type·information·or·not,·once·defined,·can·be·used·as·a
308 type·using·the·following·syntax:</p><pre><code·class="text">#rec{}</code></pre><p>In·addition,·the·record·fields·can·be·further·specified·when·using·a·record·type308 type·using·the·following·syntax:</p><pre><code·class="text">#rec{}</code></pre><p>In·addition,·the·record·fields·can·be·further·specified·when·using·a·record·type
309 by·adding·type·information·about·the·field·as·follows:</p><pre><code·class="text">#rec{some_field·::·Type}</code></pre><p>Any·unspecified·fields·are·assumed·to·have·the·type·in·the·original·record309 by·adding·type·information·about·the·field·as·follows:</p><pre><code·class="text">#rec{some_field·::·Type}</code></pre><p>Any·unspecified·fields·are·assumed·to·have·the·type·in·the·original·record
310 declaration.</p><blockquote><h4·class="info">Note</h4><p>When·records·are·used·to·create·patterns·for·ETS·and·Mnesia·match·functions,310 declaration.</p><blockquote><h4·class="info">Note</h4><p>When·records·are·used·to·create·patterns·for·ETS·and·Mnesia·match·functions,
311 Dialyzer·may·need·some·help·not·to·emit·bad·warnings.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">height</span><span·class="p"·data-group-id="1553748637-1">(</span><span·class="p"·data-group-id="1553748637-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="1553748637-2">(</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·ee470adaba86898dc2c0d7b28f2e1c31dd37d9ae4969567ce5fbd4e0ea9f0e6d·...·]-2">)</span><span·class="p">.</span><span·class="w">311 Dialyzer·may·need·some·help·not·to·emit·bad·warnings.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">height</span><span·class="p"·data-group-id="6327409226-1">(</span><span·class="p"·data-group-id="6327409226-1">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="6327409226-2">(</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·39cef3ccc6ef034bb5d458ddd1aa55265b89577e6668963ac3e5f16662689b2f·...·]-2">)</span><span·class="p">.</span><span·class="w">
312 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1553748637-3">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1553748637-4">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><sp[·...·truncated·by·diffoscope;·len:·561,·SHA:·44d5bf7ff8f4a8ff2baa944424f24453ca439adb021013704c12a000ad2f353f·...·]-3">)</span><span·class="p">.</span><span·class="w">312 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="6327409226-3">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6327409226-4">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><sp[·...·truncated·by·diffoscope;·len:·561,·SHA:·bd3a8a25204e994ccb0e70c3c8ac053591f3c96d92b460569dc18e147b462167·...·]-3">)</span><span·class="p">.</span><span·class="w">
  
313 </span><span·class="nf">lookup</span><span·class="p"·data-group-id="1553748637-7">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="1553748637-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">313 </span><span·class="nf">lookup</span><span·class="p"·data-group-id="6327409226-7">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="6327409226-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
314 ····</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_object</span><span·class="p"·data-group-id="1553748637-8">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="1553748637-9">{</span><span·class="ss">name</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·347,·SHA:·38be4f9a93cb5de2dbb8d92232bd8fa2f52da990c12a098341572b5393c32e71·...·]-8">)</span><span·class="p">.</span></code></pre><p>Dialyzer·will·emit·a·warning·since·<code·class="inline">'_'</code>·is·not·in·the·type·of·record·field314 ····</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_object</span><span·class="p"·data-group-id="6327409226-8">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="6327409226-9">{</span><span·class="ss">name</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·347,·SHA:·14e8566e7787410b5f562514812f2a5cbc277b81dd1a60c979fe235cb9df4b74·...·]-8">)</span><span·class="p">.</span></code></pre><p>Dialyzer·will·emit·a·warning·since·<code·class="inline">'_'</code>·is·not·in·the·type·of·record·field
315 <code·class="inline">height</code>.</p><p>The·recommended·way·of·dealing·with·this·is·to·declare·the·smallest·record315 <code·class="inline">height</code>.</p><p>The·recommended·way·of·dealing·with·this·is·to·declare·the·smallest·record
316 field·types·to·accommodate·all·your·needs,·and·then·create·refinements·as316 field·types·to·accommodate·all·your·needs,·and·then·create·refinements·as
317 needed.·The·modified·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="8304504955-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8304504955-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><sp[·...·truncated·by·diffoscope;·len:·668,·SHA:·2e9c3d9d75f03eed49f1c87de4b49aad4ceedd71e3c3a04b35d2a79bd4d91bc3·...·]-1">)</span><span·class="p">.</span><span·class="w">317 needed.·The·modified·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="3519347007-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3519347007-2">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><sp[·...·truncated·by·diffoscope;·len:·668,·SHA:·34e795d834e65532e0f1998f7b66e9e8b7f0e2dd66814e71db1ef52219b86252·...·]-1">)</span><span·class="p">.</span><span·class="w">
318 </span><span·class="w">318 </span><span·class="w">
319 </span><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">person</span><span·class="p"·data-group-id="8304504955-5">(</span><span·class="p"·data-group-id="8304504955-5">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·325,·SHA:·2d167f5caf519a72a012183810249cf0dc061541faf3d583283c47c06713a5cd·...·]-6">}</span><span·class="p">.</span></code></pre><p>In·specifications·and·type·declarations·the·type·<code·class="inline">person()</code>·is·to·be·preferred319 </span><span·class="p">-</span><span·class="na">type</span><span·class="w">·</span><span·class="nf">person</span><span·class="p"·data-group-id="3519347007-5">(</span><span·class="p"·data-group-id="3519347007-5">)</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·325,·SHA:·b563d723d26cb5b7dab32569b5daa7cb2152831d43777f69e8451f94169c9c72·...·]-6">}</span><span·class="p">.</span></code></pre><p>In·specifications·and·type·declarations·the·type·<code·class="inline">person()</code>·is·to·be·preferred
320 before·<code·class="inline">#person{}</code>.</p></blockquote><h2·id="specifications-for-functions"·class="section-heading">320 before·<code·class="inline">#person{}</code>.</p></blockquote><h2·id="specifications-for-functions"·class="section-heading">
321 ··<a·href="#specifications-for-functions"·class="hover-link">321 ··<a·href="#specifications-for-functions"·class="hover-link">
322 ····<i·class="ri-link-m"·aria-hidden="true"></i>322 ····<i·class="ri-link-m"·aria-hidden="true"></i>
323 ··</a>323 ··</a>
324 ··<span·class="text">Specifications·for·Functions</span>324 ··<span·class="text">Specifications·for·Functions</span>
325 </h2>325 </h2>
326 <p>A·specification·(or·contract)·for·a·function·is·given·using·the·<code·class="inline">-spec</code>326 <p>A·specification·(or·contract)·for·a·function·is·given·using·the·<code·class="inline">-spec</code>
327 attribute.·The·general·format·is·as·follows:</p><pre><code·class="text">-spec·Function(ArgType1,·...,·ArgTypeN)·-&gt;·ReturnType.</code></pre><p>An·implementation·of·the·function·with·the·same·name·<code·class="inline">Function</code>·must·exist·in327 attribute.·The·general·format·is·as·follows:</p><pre><code·class="text">-spec·Function(ArgType1,·...,·ArgTypeN)·-&gt;·ReturnType.</code></pre><p>An·implementation·of·the·function·with·the·same·name·<code·class="inline">Function</code>·must·exist·in
328 the·current·module,·and·the·arity·of·the·function·must·match·the·number·of328 the·current·module,·and·the·arity·of·the·function·must·match·the·number·of
329 arguments,·otherwise·the·compilation·fails.</p><p>The·following·longer·format·with·module·name·is·also·valid·as·long·as·<code·class="inline">Module</code>329 arguments,·otherwise·the·compilation·fails.</p><p>The·following·longer·format·with·module·name·is·also·valid·as·long·as·<code·class="inline">Module</code>
330 is·the·name·of·the·current·module.·This·can·be·useful·for·documentation330 is·the·name·of·the·current·module.·This·can·be·useful·for·documentation
331 purposes.</p><pre><code·class="text">-spec·Module:Function(ArgType1,·...,·ArgTypeN)·-&gt;·ReturnType.</code></pre><p>Also,·for·documentation·purposes,·argument·names·can·be·given:</p><pre><code·class="text">-spec·Function(ArgName1·::·Type1,·...,·ArgNameN·::·TypeN)·-&gt;·RT.</code></pre><p>A·function·specification·can·be·overloaded.·That·is,·it·can·have·several·types,331 purposes.</p><pre><code·class="text">-spec·Module:Function(ArgType1,·...,·ArgTypeN)·-&gt;·ReturnType.</code></pre><p>Also,·for·documentation·purposes,·argument·names·can·be·given:</p><pre><code·class="text">-spec·Function(ArgName1·::·Type1,·...,·ArgNameN·::·TypeN)·-&gt;·RT.</code></pre><p>A·function·specification·can·be·overloaded.·That·is,·it·can·have·several·types,
332 separated·by·a·semicolon·(<code·class="inline">;</code>).·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="3838915876-1">(</span><span·class="n">T1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T2</span><span·class="p"·data-group-id="3838915876-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">T3</span><span·class="p">;</span><span·class="w">332 separated·by·a·semicolon·(<code·class="inline">;</code>).·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="9210972425-1">(</span><span·class="n">T1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T2</span><span·class="p"·data-group-id="9210972425-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">T3</span><span·class="p">;</span><span·class="w">
333 ·········</span><span·class="p"·data-group-id="3838915876-2">(</span><span·class="n">T4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T5</span><span·class="p"·data-group-id="3838915876-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">T6</span><span·class="p">.</span></code></pre><p>A·current·restriction,·which·currently·results·in·a·warning·by·Dialyzer,·is·that333 ·········</span><span·class="p"·data-group-id="9210972425-2">(</span><span·class="n">T4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T5</span><span·class="p"·data-group-id="9210972425-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">T6</span><span·class="p">.</span></code></pre><p>A·current·restriction,·which·currently·results·in·a·warning·by·Dialyzer,·is·that
334 the·domains·of·the·argument·types·cannot·overlap.·For·example,·the·following334 the·domains·of·the·argument·types·cannot·overlap.·For·example,·the·following
335 specification·results·in·a·warning:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="9899927465-1">(</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="9899927465-2">(</span><span·class="p"·data-group-id="9899927465-2">)</span><span·class="p"·data-group-id="9899927465-1">)</span><span·class="w">·</span><span·class="p">[·...·truncated·by·diffoscope;·len:·165,·SHA:·a53bf0a5b33114b68b78f6571ee148424f5e1c4aae90e60f3498c0dafa7f14d1·...·]-3">)</span><span·class="p">;</span><span·class="w">335 specification·results·in·a·warning:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="2644366373-1">(</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="2644366373-2">(</span><span·class="p"·data-group-id="2644366373-2">)</span><span·class="p"·data-group-id="2644366373-1">)</span><span·class="w">·</span><span·class="p">[·...·truncated·by·diffoscope;·len:·165,·SHA:·7501420d82c06f75997d4410d6b22ee6e2cb00ba9f0f8b1853bdab1c7efd8fe1·...·]-3">)</span><span·class="p">;</span><span·class="w">
336 ·········</span><span·class="p"·data-group-id="9899927465-4">(</span><span·class="nf">integer</span><span·class="p"·data-group-id="9899927465-5">(</span><span·class="p"·data-group-id="9899927465-5">)</span><span·class="p"·data-group-id="9899927465-4">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·157,·SHA:·6558e50213dd7d7348d0897b7ed6d932433888e45dd005ef53597022f3176e94·...·]-6">)</span><span·class="p">.</span></code></pre><p>Type·variables·can·be·used·in·specifications·to·specify·relations·for·the·input336 ·········</span><span·class="p"·data-group-id="2644366373-4">(</span><span·class="nf">integer</span><span·class="p"·data-group-id="2644366373-5">(</span><span·class="p"·data-group-id="2644366373-5">)</span><span·class="p"·data-group-id="2644366373-4">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·157,·SHA:·11e2ea26cce77c54deab0dbd054361f967c5238eccf3cdebcff89de1d7a4c926·...·]-6">)</span><span·class="p">.</span></code></pre><p>Type·variables·can·be·used·in·specifications·to·specify·relations·for·the·input
337 and·output·arguments·of·a·function.·For·example,·the·following·specification337 and·output·arguments·of·a·function.·For·example,·the·following·specification
338 defines·the·type·of·a·polymorphic·identity·function:</p><pre><code·class="text">-spec·id(X)·-&gt;·X.</code></pre><p>Notice·that·the·above·specification·does·not·restrict·the·input·and·output·type338 defines·the·type·of·a·polymorphic·identity·function:</p><pre><code·class="text">-spec·id(X)·-&gt;·X.</code></pre><p>Notice·that·the·above·specification·does·not·restrict·the·input·and·output·type
339 in·any·way.·These·types·can·be·constrained·by·guard-like·subtype·constraints·and339 in·any·way.·These·types·can·be·constrained·by·guard-like·subtype·constraints·and
340 provide·bounded·quantification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">id</span><span·class="p"·data-group-id="6889955169-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="6889955169-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="k">when</span><span·[·...·truncated·by·diffoscope;·len:·261,·SHA:·9c0ff6fcd137eb38256733f25af93aad2395b1cf0706225a6b381807991c6e6d·...·]-2">)</span><span·class="p">.</span></code></pre><p>Currently,·the·<code·class="inline">::</code>·constraint·(read·as·&quot;is·a·subtype·of&quot;)·is·the·only·guard340 provide·bounded·quantification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">id</span><span·class="p"·data-group-id="0592148470-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="0592148470-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="k">when</span><span·[·...·truncated·by·diffoscope;·len:·261,·SHA:·e4acf77b6900d82950fe4fef7ae292289809e2c9d9e877076286389190412500·...·]-2">)</span><span·class="p">.</span></code></pre><p>Currently,·the·<code·class="inline">::</code>·constraint·(read·as·&quot;is·a·subtype·of&quot;)·is·the·only·guard
341 constraint·that·can·be·used·in·the·<code·class="inline">when</code>·part·of·a·<code·class="inline">-spec</code>·attribute.</p><blockquote><h4·class="info">Note</h4><p>The·above·function·specification·uses·multiple·occurrences·of·the·same·type341 constraint·that·can·be·used·in·the·<code·class="inline">when</code>·part·of·a·<code·class="inline">-spec</code>·attribute.</p><blockquote><h4·class="info">Note</h4><p>The·above·function·specification·uses·multiple·occurrences·of·the·same·type
342 variable.·That·provides·more·type·information·than·the·following·function342 variable.·That·provides·more·type·information·than·the·following·function
343 specification,·where·the·type·variables·are·missing:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">id</span><span·class="p"·data-group-id="1574483076-1">(</span><span·class="nf">tuple</span><span·class="p"·data-group-id="1574483076-2">(</span><span·class="p"·data-group-id="1574483076-2">)</span><span·class="p"·data-group-id="1574483076-1">)</span><span·class="w">·</span><span·class="p">-&gt;<[·...·truncated·by·diffoscope;·len:·153,·SHA:·2e44e61f164d312e4df1425d86a0545295c6927fe5a92b4124d3cd997b66f582·...·]-3">)</span><span·class="p">.</span></code></pre><p>The·latter·specification·says·that·the·function·takes·some·tuple·and·returns343 specification,·where·the·type·variables·are·missing:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">id</span><span·class="p"·data-group-id="7518107162-1">(</span><span·class="nf">tuple</span><span·class="p"·data-group-id="7518107162-2">(</span><span·class="p"·data-group-id="7518107162-2">)</span><span·class="p"·data-group-id="7518107162-1">)</span><span·class="w">·</span><span·class="p">-&gt;<[·...·truncated·by·diffoscope;·len:·153,·SHA:·8c6df8b3e8ac67ebb9651bf480a3515b6cb1146fc90679eb5920d1922666968c·...·]-3">)</span><span·class="p">.</span></code></pre><p>The·latter·specification·says·that·the·function·takes·some·tuple·and·returns
344 some·tuple.·The·specification·with·the·<code·class="inline">X</code>·type·variable·specifies·that·the344 some·tuple.·The·specification·with·the·<code·class="inline">X</code>·type·variable·specifies·that·the
345 function·takes·a·tuple·and·returns·<em>the·same</em>·tuple.</p><p>However,·it·is·up·to·the·tools·that·process·the·specifications·to·choose345 function·takes·a·tuple·and·returns·<em>the·same</em>·tuple.</p><p>However,·it·is·up·to·the·tools·that·process·the·specifications·to·choose
346 whether·to·take·this·extra·information·into·account·or·not.</p></blockquote><p>The·scope·of·a·<code·class="inline">::</code>·constraint·is·the·<code·class="inline">(...)·-&gt;·RetType</code>·specification·after346 whether·to·take·this·extra·information·into·account·or·not.</p></blockquote><p>The·scope·of·a·<code·class="inline">::</code>·constraint·is·the·<code·class="inline">(...)·-&gt;·RetType</code>·specification·after
347 which·it·appears.·To·avoid·confusion,·it·is·suggested·that·different·variables347 which·it·appears.·To·avoid·confusion,·it·is·suggested·that·different·variables
348 are·used·in·different·constituents·of·an·overloaded·contract,·as·shown·in·the348 are·used·in·different·constituents·of·an·overloaded·contract,·as·shown·in·the
349 following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="4838907755-1">(</span><span·class="p"·data-group-id="4838907755-2">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4838907755-3">(</span><span·class="p"·data-group-id="4838907755-3">)</span><span·class="p"·data-group-id="4838907755-2">}</span><span·class="p"·data-group-id="4838907755-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4838907755-4">(</span><span·class="p"·data-group-id="4838907755-4">)</span><span·class="p">;</span><span·class="w"> 
350 ·········</span><span·class="p"·data-group-id="4838907755-5">(</span><span·class="p"·data-group-id="4838907755-6">[</span><span·class="n">Y</span><span·class="p"·data-group-id="4838907755-6">]</span><span·class="p"·data-group-id="4838907755-5">)</span><spa[·...·truncated·by·diffoscope;·len:·543,·SHA:·c7d0d5a370a787fe3f5daf65582458e4380699192cd5b120458083c8b920361b·...·]349 following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="3029765308-1">(</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·807,·SHA:·fe143e3b0463e09e9368acde6eebb007ce8c7a6b25d013441f6eb20fb6f31bcc·...·]
 350 ·········</span><span·class="p"·data-group-id="3029765308-5">(</span><span·class="p"·data-group-id="3029765308-6">[</span><span·class="n">Y</span><span·class="p"·data-group-id="3029765308-6">]</span><span·class="p"·data-group-id="3029765308-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">number</span><span·class="p"·data-group-id="3029765308-7">(</span><span·class="p"·data-group-id="3029765308-7">)</span><span·class="p">.</span></code></pre><p>Some·functions·in·Erlang·are·not·meant·to·return;·either·because·they·define
351 servers·or·because·they·are·used·to·throw·exceptions,·as·in·the·following351 servers·or·because·they·are·used·to·throw·exceptions,·as·in·the·following
352 function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_error</span><span·class="p"·data-group-id="2470020638-1">(</span><span·class="n">Err</span><span·class="p"·data-group-id="2470020638-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">throw</span><span·class="p"·data-group-id="2470020638-2">(</spa[·...·truncated·by·diffoscope;·len:·252,·SHA:·43e3aabb541213d5438306fe5c88fca3cadb07453a978a39bcb35e6b12fa098a·...·]-2">)</span><span·class="p">.</span></code></pre><p>For·such·functions,·it·is·recommended·to·use·the·special·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:no_return/0"><code·class="inline">no_return/0</code></a>·type352 function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_error</span><span·class="p"·data-group-id="2279455767-1">(</span><span·class="n">Err</span><span·class="p"·data-group-id="2279455767-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">throw</span><span·class="p"·data-group-id="2279455767-2">(</spa[·...·truncated·by·diffoscope;·len:·252,·SHA:·2e743534dceff821badfaff32e0feaa790c0323c56f3a2513d77f7055715890c·...·]-2">)</span><span·class="p">.</span></code></pre><p>For·such·functions,·it·is·recommended·to·use·the·special·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:no_return/0"><code·class="inline">no_return/0</code></a>·type
353 for·their·&quot;return&quot;,·through·a·contract·of·the·following·form:</p><pre><code·class="text">-spec·my_error(term())·-&gt;·no_return().</code></pre><blockquote><h4·class="info">Note</h4><p>Erlang·uses·the·shorthand·version·<code·class="inline">_</code>·as·an·anonymous·type·variable·equivalent353 for·their·&quot;return&quot;,·through·a·contract·of·the·following·form:</p><pre><code·class="text">-spec·my_error(term())·-&gt;·no_return().</code></pre><blockquote><h4·class="info">Note</h4><p>Erlang·uses·the·shorthand·version·<code·class="inline">_</code>·as·an·anonymous·type·variable·equivalent
354 to·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:term/0"><code·class="inline">term/0</code></a>·or·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:any/0"><code·class="inline">any/0</code></a>.·For·example,·the·following·function</p><pre><code·class="text">-spec·Function(string(),·_)·-&gt;·string().</code></pre><p>is·equivalent·to:</p><pre><code·class="text">-spec·Function(string(),·any())·-&gt;·string().</code></pre></blockquote>354 to·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:term/0"><code·class="inline">term/0</code></a>·or·<a·href="../../erts-15.0.1/doc/html/erlang.html#t:any/0"><code·class="inline">any/0</code></a>.·For·example,·the·following·function</p><pre><code·class="text">-spec·Function(string(),·_)·-&gt;·string().</code></pre><p>is·equivalent·to:</p><pre><code·class="text">-spec·Function(string(),·any())·-&gt;·string().</code></pre></blockquote>
355 </div>355 </div>
  
356 <div·class="bottom-actions"·id="bottom-actions">356 <div·class="bottom-actions"·id="bottom-actions">
357 ··<div·class="bottom-actions-item">357 ··<div·class="bottom-actions-item">
  
3.84 KB
./usr/share/doc/erlang-doc/html/doc/system_principles.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>System·Principles··Erlang/OTP·v27.0.1</title>9 ····<title>System·Principles\n\n<script>window.location.replace("../doc/system/system_principles.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/system_principles.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/system_principles.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>System·Principles</span>112 ····<span>System·Principles\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/system_principles.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/system_principles.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="getting_started.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="getting_started.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Getting·Started·With·Erlang122 Getting·Started·With·Erlang\n\n<script>window.location.replace("../doc/system/getting_started.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="design_principles.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="design_principles.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 OTP·Design·Principles132 OTP·Design·Principles\n\n<script>window.location.replace("../doc/system/design_principles.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.29 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 S\x8Sy\x8ys\x8st\x8te\x8em\x8m·P\x8Pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s9 S\x8Sy\x8ys\x8st\x8te\x8em\x8m·P\x8Pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 s\x8sy\x8ys\x8st\x8te\x8em\x8m_\x8_p\x8pr\x8ri\x8in\x8nc\x8ci\x8ip\x8pl\x8le\x8es\x8s.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d_\x8·_\x8W_\x8i_\x8t_\x8h_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8G_\x8e_\x8t_\x8t_\x8i_\x8n_\x8g_\x8·_\x8S_\x8t_\x8a_\x8r_\x8t_\x8e_\x8d_\x8·_\x8W_\x8i_\x8t_\x8h_\x8·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8O_\x8T_\x8P_\x8·_\x8D_\x8e_\x8s_\x8i_\x8g_\x8n_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8O_\x8T_\x8P_\x8·_\x8D_\x8e_\x8s_\x8i_\x8g_\x8n_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.32 KB
./usr/share/doc/erlang-doc/html/doc/tftp.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>tftp··Erlang/OTP·v27.0.1</title>9 ····<title>tftp\n\n<script>window.location.replace("../lib/tftp-1.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/tftp.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/tftp.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>tftp</span>112 ····<span>tftp\n\n&lt;script&gt;window.location.replace(&quot;../lib/tftp-1.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/tftp-1.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="ssl.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="ssl.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 ssl122 ssl\n\n<script>window.location.replace("../lib/ssl-11.2.1/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="wx.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="wx.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 wx132 wx\n\n<script>window.location.replace("../lib/wx-2.4.2/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
990 B
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 t\x8tf\x8ft\x8tp\x8p9 t\x8tf\x8ft\x8tp\x8p\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./t.tf.ft.tp.p-.-1.1...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8s_\x8l11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8s_\x8l_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8w_\x8x12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8w_\x8x_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.51 KB
./usr/share/doc/erlang-doc/html/doc/tools.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>tools··Erlang/OTP·v27.0.1</title>9 ····<title>tools\n\n<script>window.location.replace("../lib/tools-4.0/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/tools.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/tools/tools.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>tools</span>112 ····<span>tools\n\n&lt;script&gt;window.location.replace(&quot;../lib/tools-4.0/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/tools-4.0/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="syntax_tools.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="syntax_tools.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 syntax_tools122 syntax_tools\n\n<script>window.location.replace("../lib/syntax_tools-3.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="common_test.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="common_test.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 common_test132 common_test\n\n<script>window.location.replace("../lib/common_test-1.27/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.08 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 t\x8to\x8oo\x8ol\x8ls\x8s9 t\x8to\x8oo\x8ol\x8ls\x8s\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./t.to.oo.ol.ls.s-.-4.4...0.0/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8y_\x8n_\x8t_\x8a_\x8x_\x8__\x8t_\x8o_\x8o_\x8l_\x8s11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8s_\x8y_\x8n_\x8t_\x8a_\x8x_\x8__\x8t_\x8o_\x8o_\x8l_\x8s_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8c_\x8o_\x8m_\x8m_\x8o_\x8n_\x8__\x8t_\x8e_\x8s_\x8t12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8c_\x8o_\x8m_\x8m_\x8o_\x8n_\x8__\x8t_\x8e_\x8s_\x8t_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.68 KB
./usr/share/doc/erlang-doc/html/doc/tutorial.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>Interoperability·Tutorial··Erlang/OTP·v27.0.1</title>9 ····<title>Interoperability·Tutorial\n\n<script>window.location.replace("../doc/system/tutorial.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/tutorial.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/system/tutorial.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>Interoperability·Tutorial</span>112 ····<span>Interoperability·Tutorial\n\n&lt;script&gt;window.location.replace(&quot;../doc/system/tutorial.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../doc/system/tutorial.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="efficiency_guide.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="efficiency_guide.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 Efficiency·Guide122 Efficiency·Guide\n\n<script>window.location.replace("../doc/system/efficiency_guide.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="oam.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="oam.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 OAM·Principles132 OAM·Principles\n\n<script>window.location.replace("../doc/system/oam.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.21 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 I\x8In\x8nt\x8te\x8er\x8ro\x8op\x8pe\x8er\x8ra\x8ab\x8bi\x8il\x8li\x8it\x8ty\x8y·T\x8Tu\x8ut\x8to\x8or\x8ri\x8ia\x8al\x8l9 I\x8In\x8nt\x8te\x8er\x8ro\x8op\x8pe\x8er\x8ra\x8ab\x8bi\x8il\x8li\x8it\x8ty\x8y·T\x8Tu\x8ut\x8to\x8or\x8ri\x8ia\x8al\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././d.do.oc.c/./s.sy.ys.st.te.em.m/./
 10 t\x8tu\x8ut\x8to\x8or\x8ri\x8ia\x8al\x8l.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8E_\x8f_\x8f_\x8i_\x8c_\x8i_\x8e_\x8n_\x8c_\x8y_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8E_\x8f_\x8f_\x8i_\x8c_\x8i_\x8e_\x8n_\x8c_\x8y_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8O_\x8A_\x8M_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8O_\x8A_\x8M_\x8·_\x8P_\x8r_\x8i_\x8n_\x8c_\x8i_\x8p_\x8l_\x8e_\x8s_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
12.4 KB
./usr/share/doc/erlang-doc/html/doc/upcoming_incompatibilities.html
    
Offset 10, 15 lines modifiedOffset 10, 15 lines modified
  
10 ····<title>Upcoming·Potential·Incompatibilities··Erlang/OTP·v27.0.1</title>10 ····<title>Upcoming·Potential·Incompatibilities··Erlang/OTP·v27.0.1</title>
11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>11 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>12 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>13 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
14 ····<script·src="dist/sidebar_items-35348DA6.js"></script>14 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
15 ····<script·src="docs_config.js"></script>15 ····<script·src="docs_config.js"></script>
16 ····<script·async·src="dist/html-7HPNBV52.js"></script>16 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
17 ··</head>17 ··</head>
18 ··<body·data-type="extras"·class="page-extra">18 ··<body·data-type="extras"·class="page-extra">
19 ····<script>19 ····<script>
  
Offset 166, 28 lines modifiedOffset 166, 28 lines modified
166 <code·class="inline">+0.0</code>·instead·of·<code·class="inline">0.0</code>.</p><p>We·plan·to·introduce·the·same·warning·in·OTP·26.1,·but·by·default·it·will·be166 <code·class="inline">+0.0</code>·instead·of·<code·class="inline">0.0</code>.</p><p>We·plan·to·introduce·the·same·warning·in·OTP·26.1,·but·by·default·it·will·be
167 disabled.</p><p><a·href=""·id="singleton_typevars"></a></p><h3·id="singleton-type-variables-will-become-a-compile-time-error"·class="section-heading">167 disabled.</p><p><a·href=""·id="singleton_typevars"></a></p><h3·id="singleton-type-variables-will-become-a-compile-time-error"·class="section-heading">
168 ··<a·href="#singleton-type-variables-will-become-a-compile-time-error"·class="hover-link">168 ··<a·href="#singleton-type-variables-will-become-a-compile-time-error"·class="hover-link">
169 ····<i·class="ri-link-m"·aria-hidden="true"></i>169 ····<i·class="ri-link-m"·aria-hidden="true"></i>
170 ··</a>170 ··</a>
171 ··<span·class="text">Singleton·type·variables·will·become·a·compile-time·error</span>171 ··<span·class="text">Singleton·type·variables·will·become·a·compile-time·error</span>
172 </h3>172 </h3>
173 <p>Before·Erlang/OTP·26,·the·compiler·would·silenty·accept·the·following·spec:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">f</span><span·class="p"·data-group-id="5254376699-1">(</span><span·class="n">Opts</span><span·class="p"·data-group-id="5254376699-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="5254376699-2">(</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·65390ffe1e7b34d5b516ae1cc378424097b6682fb251012671c62741c7f56067·...·]-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">173 <p>Before·Erlang/OTP·26,·the·compiler·would·silenty·accept·the·following·spec:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">f</span><span·class="p"·data-group-id="2123576804-1">(</span><span·class="n">Opts</span><span·class="p"·data-group-id="2123576804-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="2123576804-2">(</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·cffd91a7cf02e2125d7caa9fc3afc2e81c2bde6cf56289bbc7e89a522a4191e9·...·]-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">
174 ····</span><span·class="n">Opts</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5254376699-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Unknown</span><span·class="p"·data-group-id="5254376699-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·196,·SHA:·b1193ee10ece3980afc289f9162b3e29f16ca74749cce2d0993250750de7f237·...·]-4">}</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="n">Opts</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2123576804-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Unknown</span><span·class="p"·data-group-id="2123576804-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·196,·SHA:·db0aee8d406f3d8a071b0e179f1c3e9e0f67e621834e8e9b4bfc34a164569de6·...·]-4">}</span><span·class="p">.</span><span·class="w">
175 </span><span·class="nf">f</span><span·class="p"·data-group-id="5254376699-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="5254376699-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p>In·OTP·26,·the·compiler·emits·a·warning·pointing·out·that·the·type·variable175 </span><span·class="nf">f</span><span·class="p"·data-group-id="2123576804-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="2123576804-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p>In·OTP·26,·the·compiler·emits·a·warning·pointing·out·that·the·type·variable
176 <code·class="inline">Unknown</code>·is·unbound:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">t</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">6</span><span·class="p">:</span><span·class="mi">18</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><span·class="ss">variable</span><span·class="w">·</span><span·class="ss">&#39;Unknown&#39;</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">only</span><span·class="w">·</span><span·class="ss">used</span><span·class="w">·</span><span·class="nf">once</span><span·class="w">·</span><span·class="p"·data-group-id="8156513187-1">(</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">unbound</span><span·class="p"·data-group-id="8156513187-1">)</span><span·class="w">176 <code·class="inline">Unknown</code>·is·unbound:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">t</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">6</span><span·class="p">:</span><span·class="mi">18</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><span·class="ss">variable</span><span·class="w">·</span><span·class="ss">&#39;Unknown&#39;</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">only</span><span·class="w">·</span><span·class="ss">used</span><span·class="w">·</span><span·class="nf">once</span><span·class="w">·</span><span·class="p"·data-group-id="3436385477-1">(</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">unbound</span><span·class="p"·data-group-id="3436385477-1">)</span><span·class="w">
177 </span><span·class="c1">%····6|·····Opts·::·{ok,·Unknown}·|·{error,·Unknown}.</span><span·class="w">177 </span><span·class="c1">%····6|·····Opts·::·{ok,·Unknown}·|·{error,·Unknown}.</span><span·class="w">
178 </span><span·class="c1">%·····|··················^</span></code></pre><p>In·OTP·27,·that·warning·will·become·an·error.</p><p><a·href=""·id="escripts_will_be_compiled"></a></p><h3·id="escripts-will-be-compiled-by-default"·class="section-heading">178 </span><span·class="c1">%·····|··················^</span></code></pre><p>In·OTP·27,·that·warning·will·become·an·error.</p><p><a·href=""·id="escripts_will_be_compiled"></a></p><h3·id="escripts-will-be-compiled-by-default"·class="section-heading">
179 ··<a·href="#escripts-will-be-compiled-by-default"·class="hover-link">179 ··<a·href="#escripts-will-be-compiled-by-default"·class="hover-link">
180 ····<i·class="ri-link-m"·aria-hidden="true"></i>180 ····<i·class="ri-link-m"·aria-hidden="true"></i>
181 ··</a>181 ··</a>
182 ··<span·class="text">Escripts·will·be·compiled·by·default</span>182 ··<span·class="text">Escripts·will·be·compiled·by·default</span>
183 </h3>183 </h3>
184 <p>Escripts·will·be·compiled·by·default·instead·of·interpreted.·That·means·that·the184 <p>Escripts·will·be·compiled·by·default·instead·of·interpreted.·That·means·that·the
185 <code·class="inline">compiler</code>·application·must·be·available.</p><p>The·old·behavior·of·interpreting·escripts·can·be·restored·by·adding·the185 <code·class="inline">compiler</code>·application·must·be·available.</p><p>The·old·behavior·of·interpreting·escripts·can·be·restored·by·adding·the
186 following·line·to·the·script·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">mode</span><span·class="p"·data-group-id="0634790387-1">(</span><span·class="ss">interpret</span><span·class="p"·data-group-id="0634790387-1">)</span><span·class="p">.</span></code></pre><p>In·OTP·28,·support·for·interpreting·an·escript·will·be·removed.</p><h3·id="code_path_choice-will-default-to-strict"·class="section-heading">186 following·line·to·the·script·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">mode</span><span·class="p"·data-group-id="2306674206-1">(</span><span·class="ss">interpret</span><span·class="p"·data-group-id="2306674206-1">)</span><span·class="p">.</span></code></pre><p>In·OTP·28,·support·for·interpreting·an·escript·will·be·removed.</p><h3·id="code_path_choice-will-default-to-strict"·class="section-heading">
187 ··<a·href="#code_path_choice-will-default-to-strict"·class="hover-link">187 ··<a·href="#code_path_choice-will-default-to-strict"·class="hover-link">
188 ····<i·class="ri-link-m"·aria-hidden="true"></i>188 ····<i·class="ri-link-m"·aria-hidden="true"></i>
189 ··</a>189 ··</a>
190 ··<span·class="text">-code_path_choice·will·default·to·strict</span>190 ··<span·class="text">-code_path_choice·will·default·to·strict</span>
191 </h3>191 </h3>
192 <p>This·command·line·option·controls·if·paths·given·in·the·command·line,·boot192 <p>This·command·line·option·controls·if·paths·given·in·the·command·line,·boot
193 scripts,·and·the·code·server·should·be·interpreted·as·is·strict·or·relaxed.</p><p>OTP·26·and·earlier·defaults·to·<code·class="inline">relaxed</code>,·which·means·<code·class="inline">-pa·myapp/ebin</code>·would193 scripts,·and·the·code·server·should·be·interpreted·as·is·strict·or·relaxed.</p><p>OTP·26·and·earlier·defaults·to·<code·class="inline">relaxed</code>,·which·means·<code·class="inline">-pa·myapp/ebin</code>·would
Offset 231, 18 lines modifiedOffset 231, 18 lines modified
231 &quot;231 &quot;
232 String·Content232 String·Content
233 &quot;233 &quot;
234 %%234 %%
235 %%·In·OTP·27·it·is·instead·interpreted·as·a235 %%·In·OTP·27·it·is·instead·interpreted·as·a
236 %%·Triple-Quoted·String·equivalent·to236 %%·Triple-Quoted·String·equivalent·to
237 &quot;String·Content&quot;</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="s">&quot;&quot;</span><span·class="s">&quot;&quot;</span><span·class="w">237 &quot;String·Content&quot;</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="s">&quot;&quot;</span><span·class="s">&quot;&quot;</span><span·class="w">
238 </span><span·class="o">++</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="6468686014-1">(</span><span·class="p"·data-group-id="6468686014-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">238 </span><span·class="o">++</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="5350129877-1">(</span><span·class="p"·data-group-id="5350129877-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">
239 </span><span·class="s">&quot;&quot;</span><span·class="s">&quot;&quot;</span><span·class="w">239 </span><span·class="s">&quot;&quot;</span><span·class="s">&quot;&quot;</span><span·class="w">
240 </span><span·class="c1">%%·Became</span><span·class="w">240 </span><span·class="c1">%%·Became</span><span·class="w">
241 </span><span·class="s">&quot;&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="6468686014-2">(</span><span·class="p"·data-group-id="6468686014-2">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="w">241 </span><span·class="s">&quot;&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="5350129877-2">(</span><span·class="p"·data-group-id="5350129877-2">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="w">
242 </span><span·class="c1">%%</span><span·class="w">242 </span><span·class="c1">%%</span><span·class="w">
243 </span><span·class="c1">%%·In·OTP·27·it·is·instead·interpreted·as·a</span><span·class="w">243 </span><span·class="c1">%%·In·OTP·27·it·is·instead·interpreted·as·a</span><span·class="w">
244 </span><span·class="c1">%%·Triple-Quoted·String·(triple-or-more)·equivalent·to</span><span·class="w">244 </span><span·class="c1">%%·Triple-Quoted·String·(triple-or-more)·equivalent·to</span><span·class="w">
245 </span><span·class="s">&quot;++·foo()·++&quot;</span></code></pre><p>From·Erlang/OTP·26.1·up·to·27.0·the·compiler·issues·a·warning·for·a·sequence·of245 </span><span·class="s">&quot;++·foo()·++&quot;</span></code></pre><p>From·Erlang/OTP·26.1·up·to·27.0·the·compiler·issues·a·warning·for·a·sequence·of
246 3·or·more·double-quote·characters·since·that·is·almost·certainly·a·mistake·or246 3·or·more·double-quote·characters·since·that·is·almost·certainly·a·mistake·or
247 something·like·a·result·of·bad·automatic·code·generation.·If·a·users·gets·that247 something·like·a·result·of·bad·automatic·code·generation.·If·a·users·gets·that
248 warning,·the·code·should·be·corrected·for·example·by·inserting·appropriate248 warning,·the·code·should·be·corrected·for·example·by·inserting·appropriate
Offset 334, 15 lines modifiedOffset 334, 15 lines modified
334 ··<div·class="bottom-actions-item">334 ··<div·class="bottom-actions-item">
  
335 ······<a·href="installation_guide.html"·class="bottom-actions-button"·rel="next">335 ······<a·href="installation_guide.html"·class="bottom-actions-button"·rel="next">
336 ········<span·class="subheader">336 ········<span·class="subheader">
337 ··········Next·Page·337 ··········Next·Page·
338 ········</span>338 ········</span>
339 ········<span·class="title">339 ········<span·class="title">
340 Installation·Guide340 Installation·Guide\n\n<script>window.location.replace("../doc/system/installation_guide.html")</script>
341 ········</span>341 ········</span>
342 ······</a>342 ······</a>
  
343 ··</div>343 ··</div>
344 </div>344 </div>
345 ····<footer·class="footer">345 ····<footer·class="footer">
346 ······<p>346 ······<p>
951 B
html2text {}
    
Offset 161, 11 lines modifiedOffset 161, 11 lines modified
161 It·is·recommend·to·quote·all·uses·of·the·atom·maybe·as·soon·as·possible.·The161 It·is·recommend·to·quote·all·uses·of·the·atom·maybe·as·soon·as·possible.·The
162 compiler·option·warn_keywords·can·be·used·to·emit·warnings·about·all162 compiler·option·warn_keywords·can·be·used·to·emit·warnings·about·all
163 occurrences·of·maybe·without·quotes.163 occurrences·of·maybe·without·quotes.
164 c\x8cp\x8pr\x8ro\x8of\x8f·a\x8an\x8nd\x8d·e\x8ep\x8pr\x8ro\x8of\x8f·w\x8wi\x8il\x8ll\x8l·b\x8be\x8e·r\x8re\x8ep\x8pl\x8la\x8ac\x8ce\x8ed\x8d·b\x8by\x8y·t\x8tp\x8pr\x8ro\x8of\x8f164 c\x8cp\x8pr\x8ro\x8of\x8f·a\x8an\x8nd\x8d·e\x8ep\x8pr\x8ro\x8of\x8f·w\x8wi\x8il\x8ll\x8l·b\x8be\x8e·r\x8re\x8ep\x8pl\x8la\x8ac\x8ce\x8ed\x8d·b\x8by\x8y·t\x8tp\x8pr\x8ro\x8of\x8f
165 As·of·OTP·29,·the·cprof·and·eprof·will·be·removed·in·favor·of·_\x8t_\x8p_\x8r_\x8o_\x8f·added·in165 As·of·OTP·29,·the·cprof·and·eprof·will·be·removed·in·favor·of·_\x8t_\x8p_\x8r_\x8o_\x8f·added·in
166 OTP·27.166 OTP·27.
167 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8S_\x8c_\x8h_\x8e_\x8d_\x8u_\x8l_\x8e_\x8d_\x8·_\x8f_\x8o_\x8r_\x8·_\x8R_\x8e_\x8m_\x8o_\x8v_\x8a_\x8l167 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8S_\x8c_\x8h_\x8e_\x8d_\x8u_\x8l_\x8e_\x8d_\x8·_\x8f_\x8o_\x8r_\x8·_\x8R_\x8e_\x8m_\x8o_\x8v_\x8a_\x8l
168 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8I_\x8n_\x8s_\x8t_\x8a_\x8l_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e168 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8I_\x8n_\x8s_\x8t_\x8a_\x8l_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8·_\x8G_\x8u_\x8i_\x8d_\x8e_.\_.n_.\_.n
169 Search·HexDocs169 Search·HexDocs
170 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e170 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
171 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B171 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.33 KB
./usr/share/doc/erlang-doc/html/doc/wx.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>wx··Erlang/OTP·v27.0.1</title>9 ····<title>wx\n\n<script>window.location.replace("../lib/wx-2.4.2/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/wx.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/wx.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>wx</span>112 ····<span>wx\n\n&lt;script&gt;window.location.replace(&quot;../lib/wx-2.4.2/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/wx-2.4.2/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="tftp.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="tftp.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 tftp122 tftp\n\n<script>window.location.replace("../lib/tftp-1.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="xmerl.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="xmerl.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 xmerl132 xmerl\n\n<script>window.location.replace("../lib/xmerl-2.0/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1000 B
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 w\x8wx\x8x9 w\x8wx\x8x\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./w.wx.x-.-2.2...4.4...2.2/./d.do.oc.c/./h.ht.tm.ml.l/./i.in.nd.de.ex.x...h.ht.tm.ml.l".").)<.</./
 10 s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8t_\x8f_\x8t_\x8p11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8t_\x8f_\x8t_\x8p_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8x_\x8m_\x8e_\x8r_\x8l12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8x_\x8m_\x8e_\x8r_\x8l_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
3.38 KB
./usr/share/doc/erlang-doc/html/doc/xmerl.html
    
Offset 4, 21 lines modifiedOffset 4, 21 lines modified
4 ····<meta·charset="utf-8">4 ····<meta·charset="utf-8">
5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">5 ····<meta·http-equiv="x-ua-compatible"·content="ie=edge">
6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">6 ····<meta·name="viewport"·content="width=device-width,·initial-scale=1.0">
7 ····<meta·name="generator"·content="ExDoc·v0.34.2">7 ····<meta·name="generator"·content="ExDoc·v0.34.2">
8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">8 ····<meta·name="project"·content="Erlang/OTP·v27.0.1">
  
  
9 ····<title>xmerl··Erlang/OTP·v27.0.1</title>9 ····<title>xmerl\n\n<script>window.location.replace("../lib/xmerl-2.0/doc/html/index.html")</script>··Erlang/OTP·v27.0.1</title>
10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>10 ····<link·rel="stylesheet"·href="dist/html-erlang-G5LYFEUD.css"·/>
  
  
11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>11 ····<script·src="dist/handlebars.runtime-CFQAK6SD.js"></script>
12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>12 ····<script·src="dist/handlebars.templates-K7URE6B4.js"></script>
13 ····<script·src="dist/sidebar_items-35348DA6.js"></script>13 ····<script·src="dist/sidebar_items-D0B3FEFA.js"></script>
14 ····<script·src="docs_config.js"></script>14 ····<script·src="docs_config.js"></script>
15 ····<script·async·src="dist/html-7HPNBV52.js"></script>15 ····<script·async·src="dist/html-7HPNBV52.js"></script>
  
16 ··</head>16 ··</head>
17 ··<body·data-type="extras"·class="page-extra">17 ··<body·data-type="extras"·class="page-extra">
18 ····<script>18 ····<script>
  
Offset 108, 41 lines modifiedOffset 108, 41 lines modified
  
108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/xmerl.md#L1"·title="View·Source"·class="icon-action"·rel="help">108 ······<a·href="https://github.com/erlang/otp/blob/master/system/doc/top/interfaces/xmerl.md#L1"·title="View·Source"·class="icon-action"·rel="help">
109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>109 ········<i·class="ri-code-s-slash-line"·aria-hidden="true"></i>
110 ········<span·class="sr-only">View·Source</span>110 ········<span·class="sr-only">View·Source</span>
111 ······</a>111 ······</a>
  
  
112 ····<span>xmerl</span>112 ····<span>xmerl\n\n&lt;script&gt;window.location.replace(&quot;../lib/xmerl-2.0/doc/html/index.html&quot;)&lt;/script&gt;</span>
113 ··</h1>113 ··</h1>
  
114 <script>window.location.replace("../lib/xmerl-2.0/doc/html/index.html")</script> 
115 </div>114 </div>
  
116 <div·class="bottom-actions"·id="bottom-actions">115 <div·class="bottom-actions"·id="bottom-actions">
117 ··<div·class="bottom-actions-item">116 ··<div·class="bottom-actions-item">
  
118 ······<a·href="wx.html"·class="bottom-actions-button"·rel="prev">117 ······<a·href="wx.html"·class="bottom-actions-button"·rel="prev">
119 ········<span·class="subheader">118 ········<span·class="subheader">
120 ···········Previous·Page119 ···········Previous·Page
121 ········</span>120 ········</span>
122 ········<span·class="title">121 ········<span·class="title">
123 wx122 wx\n\n<script>window.location.replace("../lib/wx-2.4.2/doc/html/index.html")</script>
124 ········</span>123 ········</span>
125 ······</a>124 ······</a>
  
126 ··</div>125 ··</div>
127 ··<div·class="bottom-actions-item">126 ··<div·class="bottom-actions-item">
  
128 ······<a·href="debugger.html"·class="bottom-actions-button"·rel="next">127 ······<a·href="debugger.html"·class="bottom-actions-button"·rel="next">
129 ········<span·class="subheader">128 ········<span·class="subheader">
130 ··········Next·Page·129 ··········Next·Page·
131 ········</span>130 ········</span>
132 ········<span·class="title">131 ········<span·class="title">
133 debugger132 debugger\n\n<script>window.location.replace("../lib/debugger-5.4/doc/html/index.html")</script>
134 ········</span>133 ········</span>
135 ······</a>134 ······</a>
  
136 ··</div>135 ··</div>
137 </div>136 </div>
138 ····<footer·class="footer">137 ····<footer·class="footer">
139 ······<p>138 ······<p>
1.0 KB
html2text {}
    
Offset 1, 13 lines modifiedOffset 1, 15 lines modified
 1 ·Erlang/OTP·v27.0.1
1 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]2 _\x8[_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P_\x8]
2 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P3 _\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8/_\x8O_\x8T_\x8P
3 v27.0.14 v27.0.1
4 ····*·Pages5 ····*·Pages
5 Search·documentation·of·Erlang/OTP[q···················]6 Search·documentation·of·Erlang/OTP[q···················]
6 Settings7 Settings
7 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e8 _\x8V\x8V_\x8i\x8i_\x8e\x8e_\x8w\x8w_\x8·_\x8S\x8S_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8c\x8c_\x8e\x8e
8 x\x8xm\x8me\x8er\x8rl\x8l9 x\x8xm\x8me\x8er\x8rl\x8l\.\n.n\.\n.n<.<s.sc.cr.ri.ip.pt.t>.>w.wi.in.nd.do.ow.w...l.lo.oc.ca.at.ti.io.on.n...r.re.ep.pl.la.ac.ce.e(.(".".....././l.li.ib.b/./x.xm.me.er.rl.l-.-2.2...0.0/./d.do.oc.c/./h.ht.tm.ml.l/./
 10 i\x8in\x8nd\x8de\x8ex\x8x.\x8.h\x8ht\x8tm\x8ml\x8l"\x8")\x8)<\x8</\x8/s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t>\x8>
9 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8w_\x8x11 _\x8←_\x8·_\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8w_\x8x_.\_.n_.\_.n
10 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8d_\x8e_\x8b_\x8u_\x8g_\x8g_\x8e_\x8r12 _\x8N_\x8e_\x8x_\x8t_\x8·_\x8P_\x8a_\x8g_\x8e_\x8·_\x8→_\x8·_\x8d_\x8e_\x8b_\x8u_\x8g_\x8g_\x8e_\x8r_.\_.n_.\_.n
11 Search·HexDocs13 Search·HexDocs
12 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e14 Built·using·_\x8E_\x8x_\x8D_\x8o_\x8c·(v0.34.2)·for·the·_\x8E_\x8r_\x8l_\x8a_\x8n_\x8g_\x8·_\x8p_\x8r_\x8o_\x8g_\x8r_\x8a_\x8m_\x8m_\x8i_\x8n_\x8g_\x8·_\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e
13 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B15 Copyright·©·1996-2024·_\x8E_\x8r_\x8i_\x8c_\x8s_\x8s_\x8o_\x8n_\x8·_\x8A_\x8B
633 B
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/.build
    
Offset 42, 15 lines modifiedOffset 42, 15 lines modified
42 dist/lato-latin-300-normal-YUMVEFOL.woff242 dist/lato-latin-300-normal-YUMVEFOL.woff2
43 dist/lato-latin-400-normal-W7754I4D.woff243 dist/lato-latin-400-normal-W7754I4D.woff2
44 dist/lato-latin-700-normal-2XVSBPG4.woff244 dist/lato-latin-700-normal-2XVSBPG4.woff2
45 dist/lato-latin-ext-300-normal-VPGGJKJL.woff245 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
46 dist/lato-latin-ext-400-normal-N27NCBWW.woff246 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
47 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff247 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
48 dist/remixicon-NKANDIL5.woff248 dist/remixicon-NKANDIL5.woff2
49 dist/search_data-BB699C42.js49 dist/search_data-D123FCA0.js
50 dist/sidebar_items-340A298D.js50 dist/sidebar_items-340A298D.js
51 driver.html51 driver.html
52 driver_entry.html52 driver_entry.html
53 epmd_cmd.html53 epmd_cmd.html
54 erl_cmd.html54 erl_cmd.html
55 erl_dist_protocol.html55 erl_dist_protocol.html
56 erl_driver.html56 erl_driver.html
53.6 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/alt_dist.html
    
Offset 237, 50 lines modifiedOffset 237, 50 lines modified
237 <code·class="inline">uds_dist</code>·example·using·a·port·driver·written·in·C,·<code·class="inline">erl_uds_dist</code>·is·written237 <code·class="inline">uds_dist</code>·example·using·a·port·driver·written·in·C,·<code·class="inline">erl_uds_dist</code>·is·written
238 entirely·in·Erlang.</p><h3·id="exported-callback-functions"·class="section-heading">238 entirely·in·Erlang.</p><h3·id="exported-callback-functions"·class="section-heading">
239 ··<a·href="#exported-callback-functions"·class="hover-link">239 ··<a·href="#exported-callback-functions"·class="hover-link">
240 ····<i·class="ri-link-m"·aria-hidden="true"></i>240 ····<i·class="ri-link-m"·aria-hidden="true"></i>
241 ··</a>241 ··</a>
242 ··<span·class="text">Exported·Callback·Functions</span>242 ··<span·class="text">Exported·Callback·Functions</span>
243 </h3>243 </h3>
244 <p>The·following·functions·are·mandatory:</p><ul><li><pre·id="listen"><code·class="makeup·erlang"·translate="no"><span·class="nf">listen</span><span·class="p"·data-group-id="5764871064-1">(</span><span·class="n">Name</span><span·class="p"·data-group-id="5764871064-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">244 <p>The·following·functions·are·mandatory:</p><ul><li><pre·id="listen"><code·class="makeup·erlang"·translate="no"><span·class="nf">listen</span><span·class="p"·data-group-id="0688646812-1">(</span><span·class="n">Name</span><span·class="p"·data-group-id="0688646812-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
245 </span><span·class="err"> </span><span·class="err"> </span><span·class="p"·data-group-id="5764871064-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5764871064-3">{</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Address</span>[·...·truncated·by·diffoscope;·len:·456,·SHA:·d9487241e5a00f7ef4197f1dcba991c731b123c4da6836b04bc18fa063a6a6dc·...·]-4">}</span><span·class="w">245 </span><span·class="err"> </span><span·class="err"> </span><span·class="p"·data-group-id="0688646812-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0688646812-3">{</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Address</span>[·...·truncated·by·diffoscope;·len:·456,·SHA:·4e9add618062275d74709e104e9ba37a7262e564908c251aa64d4c694dbe5531·...·]-4">}</span><span·class="w">
246 </span><span·class="nf">listen</span><span·class="p"·data-group-id="5764871064-5">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="n">Host</span><span·class="p"·data-group-id="5764871064-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">246 </span><span·class="nf">listen</span><span·class="p"·data-group-id="0688646812-5">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="n">Host</span><span·class="p"·data-group-id="0688646812-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
247 </span><span·class="err"> </span><span·class="err"> </span><span·class="p"·data-group-id="5764871064-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5764871064-7">{</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Address</span>[·...·truncated·by·diffoscope;·len:·456,·SHA:·ed0fb9eac05e17439262c3194392fe30593f537f9e455df11983bf5c502b282f·...·]-8">}</span></code></pre><p><code·class="inline">listen/2</code>·is·called·once·in·order·to·listen·for·incoming·connection·requests.247 </span><span·class="err"> </span><span·class="err"> </span><span·class="p"·data-group-id="0688646812-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0688646812-7">{</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Address</span>[·...·truncated·by·diffoscope;·len:·456,·SHA:·f54c11f4814c7028ea26fa400cc727081e775feacc201a799aef1900b8e4bb93·...·]-8">}</span></code></pre><p><code·class="inline">listen/2</code>·is·called·once·in·order·to·listen·for·incoming·connection·requests.
248 The·call·is·made·when·the·distribution·is·brought·up.·The·argument·<code·class="inline">Name</code>·is248 The·call·is·made·when·the·distribution·is·brought·up.·The·argument·<code·class="inline">Name</code>·is
249 the·part·of·the·node·name·before·the·<code·class="inline">@</code>·sign·in·the·full·node·name.·It·can·be249 the·part·of·the·node·name·before·the·<code·class="inline">@</code>·sign·in·the·full·node·name.·It·can·be
250 either·an·atom·or·a·string.·The·argument·<code·class="inline">Host</code>·is·the·part·of·the·node·name250 either·an·atom·or·a·string.·The·argument·<code·class="inline">Host</code>·is·the·part·of·the·node·name
251 after·the·<code·class="inline">@</code>·sign·in·the·full·node·name.·It·is·always·a·string.</p><p>The·return·value·consists·of·a·<code·class="inline">Listen</code>·handle·(which·is·later·passed·to·the251 after·the·<code·class="inline">@</code>·sign·in·the·full·node·name.·It·is·always·a·string.</p><p>The·return·value·consists·of·a·<code·class="inline">Listen</code>·handle·(which·is·later·passed·to·the
252 <a·href="alt_dist.html#accept"><code·class="inline">accept/1</code></a>·callback),·<code·class="inline">Address</code>·which·is·a252 <a·href="alt_dist.html#accept"><code·class="inline">accept/1</code></a>·callback),·<code·class="inline">Address</code>·which·is·a
253 <code·class="inline">#net_address{}</code>·record·with·information·about·the·address·for·the·node·(the253 <code·class="inline">#net_address{}</code>·record·with·information·about·the·address·for·the·node·(the
254 <code·class="inline">#net_address{}</code>·record·is·defined·in·<code·class="inline">kernel/include/net_address.hrl</code>),·and254 <code·class="inline">#net_address{}</code>·record·is·defined·in·<code·class="inline">kernel/include/net_address.hrl</code>),·and
255 <code·class="inline">Creation</code>·which·(currently)·is·an·integer·<code·class="inline">1</code>,·<code·class="inline">2</code>,·or·<code·class="inline">3</code>.</p><p>If·<a·href="epmd_cmd.html"><code·class="inline">epmd</code></a>·is·to·be·used·for·node·discovery,·you·typically·want255 <code·class="inline">Creation</code>·which·(currently)·is·an·integer·<code·class="inline">1</code>,·<code·class="inline">2</code>,·or·<code·class="inline">3</code>.</p><p>If·<a·href="epmd_cmd.html"><code·class="inline">epmd</code></a>·is·to·be·used·for·node·discovery,·you·typically·want
256 to·use·the·<code·class="inline">erl_epmd</code>·module·(part·of·the·<code·class="inline">kernel</code>·application)·in·order·to256 to·use·the·<code·class="inline">erl_epmd</code>·module·(part·of·the·<code·class="inline">kernel</code>·application)·in·order·to
257 register·the·listen·port·with·<code·class="inline">epmd</code>·and·retrieve·<code·class="inline">Creation</code>·to·use.</p></li><li><pre·id="address"><code·class="makeup·erlang"·translate="no"><span·class="nf">address</span><span·class="p"·data-group-id="6008441347-1">(</span><span·class="p"·data-group-id="6008441347-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">257 register·the·listen·port·with·<code·class="inline">epmd</code>·and·retrieve·<code·class="inline">Creation</code>·to·use.</p></li><li><pre·id="address"><code·class="makeup·erlang"·translate="no"><span·class="nf">address</span><span·class="p"·data-group-id="9439685229-1">(</span><span·class="p"·data-group-id="9439685229-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
258 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">Address</span></code></pre><p><code·class="inline">address/0</code>·is·called·in·order·to·get·the·<code·class="inline">Address</code>·part·of·the258 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">Address</span></code></pre><p><code·class="inline">address/0</code>·is·called·in·order·to·get·the·<code·class="inline">Address</code>·part·of·the
259 <a·href="alt_dist.html#listen"><code·class="inline">listen/2</code></a>·function·without·creating·a·listen·socket.259 <a·href="alt_dist.html#listen"><code·class="inline">listen/2</code></a>·function·without·creating·a·listen·socket.
260 All·fields·except·<code·class="inline">address</code>·have·to·be·set·in·the·returned·record</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">address</span><span·class="p"·data-group-id="1558335353-1">(</span><span·class="p"·data-group-id="1558335353-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">260 All·fields·except·<code·class="inline">address</code>·have·to·be·set·in·the·returned·record</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">address</span><span·class="p"·data-group-id="6479933916-1">(</span><span·class="p"·data-group-id="6479933916-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
261 ····</span><span·class="p"·data-group-id="1558335353-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Host</span><span·class="p"·data-group-id="1558335353-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·173,·SHA:·e0a37b4534cf3760da1819ece44a031a09800ff7b7468a0918349339eafb6ed3·...·]-3">)</span><span·class="p">,</span><span·class="w">261 ····</span><span·class="p"·data-group-id="6479933916-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Host</span><span·class="p"·data-group-id="6479933916-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·173,·SHA:·38ea52efc24fcd955e41504658f4be314e73ec6946ce53256ded00c3098d3201·...·]-3">)</span><span·class="p">,</span><span·class="w">
262 ····</span><span·class="o">#</span><span·class="ss">net_address</span><span·class="p"·data-group-id="1558335353-4">{</span><span·class="w">·</span><span·class="ss">host</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Host</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">protocol</span><sp[·...·truncated·by·diffoscope;·len:·611,·SHA:·322e3569b1723c4a5fc48e28a10d3d4ba82a579510df3afd5c51796af64ff78a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">262 ····</span><span·class="o">#</span><span·class="ss">net_address</span><span·class="p"·data-group-id="6479933916-4">{</span><span·class="w">·</span><span·class="ss">host</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Host</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">protocol</span><sp[·...·truncated·by·diffoscope;·len:·611,·SHA:·ced9fe1caf173592a16f1793b4d679917e689d8e17bc35355762222d624a905e·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
263 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">AcceptorPid</span></code></pre><p><code·class="inline">accept/1</code>·should·spawn·a·process·that·accepts·connections.·This·process263 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">AcceptorPid</span></code></pre><p><code·class="inline">accept/1</code>·should·spawn·a·process·that·accepts·connections.·This·process
264 should·preferably·execute·on·<code·class="inline">max</code>·priority.·The·process·identifier·of·this264 should·preferably·execute·on·<code·class="inline">max</code>·priority.·The·process·identifier·of·this
265 process·should·be·returned.</p><p>The·<code·class="inline">Listen</code>·argument·will·be·the·same·as·the·<code·class="inline">Listen</code>·handle·part·of·the265 process·should·be·returned.</p><p>The·<code·class="inline">Listen</code>·argument·will·be·the·same·as·the·<code·class="inline">Listen</code>·handle·part·of·the
266 return·value·of·the·<a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback·above.266 return·value·of·the·<a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback·above.
267 <code·class="inline">accept/1</code>·is·called·only·once·when·the·distribution·protocol·is·started.</p><p>The·caller·of·this·function·is·a·representative·for·<code·class="inline">net_kernel</code>·(this·may·or267 <code·class="inline">accept/1</code>·is·called·only·once·when·the·distribution·protocol·is·started.</p><p>The·caller·of·this·function·is·a·representative·for·<code·class="inline">net_kernel</code>·(this·may·or
268 may·not·be·the·process·registered·as·<code·class="inline">net_kernel</code>)·and·is·in·this·document268 may·not·be·the·process·registered·as·<code·class="inline">net_kernel</code>)·and·is·in·this·document
269 identified·as·<code·class="inline">Kernel</code>.·When·a·connection·has·been·accepted·by·the·acceptor269 identified·as·<code·class="inline">Kernel</code>.·When·a·connection·has·been·accepted·by·the·acceptor
270 process,·it·needs·to·inform·<code·class="inline">Kernel</code>·about·the·accepted·connection.·This·is270 process,·it·needs·to·inform·<code·class="inline">Kernel</code>·about·the·accepted·connection.·This·is
271 done·by·passing·a·message·on·the·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Kernel</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6675048831-1">{</span><span·class="ss">accept</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AcceptorPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DistController</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·157,·SHA:·4dc472c3d08ba556b5d5131d127f1cf1573b3d225ef44ebefa27446bd5bdc83d·...·]-1">}</span></code></pre><p><code·class="inline">DistController</code>·is·either·the·process·or·port·identifier·of·the·distribution271 done·by·passing·a·message·on·the·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Kernel</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8034466415-1">{</span><span·class="ss">accept</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AcceptorPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DistController</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·157,·SHA:·4b5cac71325b2b547134723ff3bb7381bd8c3f7a361e6c7782d3856e410a00bb·...·]-1">}</span></code></pre><p><code·class="inline">DistController</code>·is·either·the·process·or·port·identifier·of·the·distribution
272 controller·for·the·connection.·The·distribution·controller·should·be·created272 controller·for·the·connection.·The·distribution·controller·should·be·created
273 by·the·acceptor·processes·when·a·new·connection·is·accepted.·Its·job·is·to273 by·the·acceptor·processes·when·a·new·connection·is·accepted.·Its·job·is·to
274 dispatch·traffic·on·the·connection.</p><p><code·class="inline">Kernel</code>·responds·with·one·of·the·following·messages:</p><ul><li><p><strong><code·class="inline">{Kernel,·controller,·SupervisorPid}</code></strong>·-·The·request·was·accepted·and274 dispatch·traffic·on·the·connection.</p><p><code·class="inline">Kernel</code>·responds·with·one·of·the·following·messages:</p><ul><li><p><strong><code·class="inline">{Kernel,·controller,·SupervisorPid}</code></strong>·-·The·request·was·accepted·and
275 <code·class="inline">SupervisorPid</code>·is·the·process·identifier·of·the·connection·supervisor275 <code·class="inline">SupervisorPid</code>·is·the·process·identifier·of·the·connection·supervisor
276 process·(which·is·created·in·the276 process·(which·is·created·in·the
277 <a·href="alt_dist.html#accept_connection"><code·class="inline">accept_connection/5</code></a>·callback).</p></li><li><p><strong><code·class="inline">{Kernel,·unsupported_protocol}</code></strong>·-·The·request·was·rejected.·This·is·a277 <a·href="alt_dist.html#accept_connection"><code·class="inline">accept_connection/5</code></a>·callback).</p></li><li><p><strong><code·class="inline">{Kernel,·unsupported_protocol}</code></strong>·-·The·request·was·rejected.·This·is·a
278 fatal·error.·The·acceptor·process·should·terminate.</p></li></ul><p>When·an·accept·sequence·has·been·completed·the·acceptor·process·is·expected·to278 fatal·error.·The·acceptor·process·should·terminate.</p></li></ul><p>When·an·accept·sequence·has·been·completed·the·acceptor·process·is·expected·to
279 continue·accepting·further·requests.</p></li><li><pre·id="accept_connection"><code·class="makeup·erlang"·translate="no"><span·class="nf">accept_connection</span><span·class="p"·data-group-id="2619498701-1">(</span><span·class="n">AcceptorPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DistCtrl</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyNode</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·155,·SHA:·07aaea0cdce04585d56695f85c5df0e5fa44f0f565a5ca03e44f0c5c76ac2195·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">279 continue·accepting·further·requests.</p></li><li><pre·id="accept_connection"><code·class="makeup·erlang"·translate="no"><span·class="nf">accept_connection</span><span·class="p"·data-group-id="3993938823-1">(</span><span·class="n">AcceptorPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DistCtrl</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyNode</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·155,·SHA:·4a59baf5f20a54036076eb4da9cf269c9ef8284b0edece8d9ce7bead69967f17·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
280 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">ConnectionSupervisorPid</span></code></pre><p><code·class="inline">accept_connection/5</code>·should·spawn·a·process·that·will·perform·the·Erlang280 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">ConnectionSupervisorPid</span></code></pre><p><code·class="inline">accept_connection/5</code>·should·spawn·a·process·that·will·perform·the·Erlang
281 distribution·handshake·for·the·connection.·If·the·handshake·successfully281 distribution·handshake·for·the·connection.·If·the·handshake·successfully
282 completes·it·should·continue·to·function·as·a·connection·supervisor.·This282 completes·it·should·continue·to·function·as·a·connection·supervisor.·This
283 process·should·preferably·execute·on·<code·class="inline">max</code>·priority·and·should·be·linked·to283 process·should·preferably·execute·on·<code·class="inline">max</code>·priority·and·should·be·linked·to
284 the·caller.·The·<code·class="inline">dist_util:net_ticker_spawn_options()</code>·function·can·be·called284 the·caller.·The·<code·class="inline">dist_util:net_ticker_spawn_options()</code>·function·can·be·called
285 to·get·spawn·options·suitable·for·this·process·which·can·be·passed·directly·to285 to·get·spawn·options·suitable·for·this·process·which·can·be·passed·directly·to
286 <a·href="erlang.html#spawn_opt/4"><code·class="inline">erlang:spawn_opt/4</code></a>.·<code·class="inline">dist_util:net_ticker_spawn_options()</code>·will·by·default286 <a·href="erlang.html#spawn_opt/4"><code·class="inline">erlang:spawn_opt/4</code></a>.·<code·class="inline">dist_util:net_ticker_spawn_options()</code>·will·by·default
Offset 294, 15 lines modifiedOffset 294, 15 lines modified
294 <code·class="inline">dist_util:handshake_other_started(HsData)</code>.</p></li><li><p><strong><code·class="inline">Allowed</code></strong>·-·To·be·passed·along·to294 <code·class="inline">dist_util:handshake_other_started(HsData)</code>.</p></li><li><p><strong><code·class="inline">Allowed</code></strong>·-·To·be·passed·along·to
295 <code·class="inline">dist_util:handshake_other_started(HsData)</code>.</p></li><li><p><strong><code·class="inline">SetupTime</code></strong>·-·Time·used·for·creating·a·setup·timer·by·a·call·to295 <code·class="inline">dist_util:handshake_other_started(HsData)</code>.</p></li><li><p><strong><code·class="inline">SetupTime</code></strong>·-·Time·used·for·creating·a·setup·timer·by·a·call·to
296 <code·class="inline">dist_util:start_timer(SetupTime)</code>.·The·timer·should·be·passed·along·to296 <code·class="inline">dist_util:start_timer(SetupTime)</code>.·The·timer·should·be·passed·along·to
297 <code·class="inline">dist_util:handshake_other_started(HsData)</code>.</p></li></ul><p>The·created·process·should·provide·callbacks·and·other·information·needed·for297 <code·class="inline">dist_util:handshake_other_started(HsData)</code>.</p></li></ul><p>The·created·process·should·provide·callbacks·and·other·information·needed·for
298 the·handshake·in·a·<a·href="alt_dist.html#hs_data_record"><code·class="inline">#hs_data{}</code></a>·record·and·call298 the·handshake·in·a·<a·href="alt_dist.html#hs_data_record"><code·class="inline">#hs_data{}</code></a>·record·and·call
299 <code·class="inline">dist_util:handshake_other_started(HsData)</code>·with·this·record.</p><p><code·class="inline">dist_util:handshake_other_started(HsData)</code>·will·perform·the·handshake·and·if299 <code·class="inline">dist_util:handshake_other_started(HsData)</code>·with·this·record.</p><p><code·class="inline">dist_util:handshake_other_started(HsData)</code>·will·perform·the·handshake·and·if
300 the·handshake·successfully·completes·this·process·will·then·continue·in·a300 the·handshake·successfully·completes·this·process·will·then·continue·in·a
301 connection·supervisor·loop·as·long·as·the·connection·is·up.</p></li><li><pre·id="setup"><code·class="makeup·erlang"·translate="no"><span·class="nf">setup</span><span·class="p"·data-group-id="6700348046-1">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyNode</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·153,·SHA:·3cb40eefc93540b99ee207152e8d914fe420e616feaeb102b6d65053e111cae6·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">301 connection·supervisor·loop·as·long·as·the·connection·is·up.</p></li><li><pre·id="setup"><code·class="makeup·erlang"·translate="no"><span·class="nf">setup</span><span·class="p"·data-group-id="2662296093-1">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyNode</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·153,·SHA:·9fd2a83b9a2daa15d65d8e851b7a7d78cc31673d9b361da4523778087a6e294d·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
302 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">ConnectionSupervisorPid</span></code></pre><p><code·class="inline">setup/5</code>·should·spawn·a·process·that·connects·to·<code·class="inline">Node</code>.·When·connection·has302 </span><span·class="err"> </span><span·class="err"> </span><span·class="n">ConnectionSupervisorPid</span></code></pre><p><code·class="inline">setup/5</code>·should·spawn·a·process·that·connects·to·<code·class="inline">Node</code>.·When·connection·has
303 been·established·it·should·perform·the·Erlang·distribution·handshake·for·the303 been·established·it·should·perform·the·Erlang·distribution·handshake·for·the
304 connection.·If·the·handshake·successfully·completes·it·should·continue·to304 connection.·If·the·handshake·successfully·completes·it·should·continue·to
305 function·as·a·connection·supervisor.·This·process·should·preferably·execute·on305 function·as·a·connection·supervisor.·This·process·should·preferably·execute·on
306 <code·class="inline">max</code>·priority·and·should·be·linked·to·the·caller.·The306 <code·class="inline">max</code>·priority·and·should·be·linked·to·the·caller.·The
307 <code·class="inline">dist_util:net_ticker_spawn_options()</code>·function·can·be·called·to·get·spawn307 <code·class="inline">dist_util:net_ticker_spawn_options()</code>·function·can·be·called·to·get·spawn
308 options·suitable·for·this·process·which·can·be·passed·directly·to308 options·suitable·for·this·process·which·can·be·passed·directly·to
Offset 320, 23 lines modifiedOffset 320, 23 lines modified
320 may·not·be·the·process·registered·as·<code·class="inline">net_kernel</code>)·and·is·in·this·document320 may·not·be·the·process·registered·as·<code·class="inline">net_kernel</code>)·and·is·in·this·document
321 identified·as·<code·class="inline">Kernel</code>.</p><p>This·function·should,·besides·spawning·the·connection·supervisor,·also·create321 identified·as·<code·class="inline">Kernel</code>.</p><p>This·function·should,·besides·spawning·the·connection·supervisor,·also·create
322 a·distribution·controller.·The·distribution·controller·is·either·a·process·or322 a·distribution·controller.·The·distribution·controller·is·either·a·process·or
323 a·port·which·is·responsible·for·dispatching·traffic.</p><p>The·created·process·should·provide·callbacks·and·other·information·needed·for323 a·port·which·is·responsible·for·dispatching·traffic.</p><p>The·created·process·should·provide·callbacks·and·other·information·needed·for
324 the·handshake·in·a·<a·href="alt_dist.html#hs_data_record"><code·class="inline">#hs_data{}</code></a>·record·and·call324 the·handshake·in·a·<a·href="alt_dist.html#hs_data_record"><code·class="inline">#hs_data{}</code></a>·record·and·call
325 <code·class="inline">dist_util:handshake_we_started(HsData)</code>·with·this·record.</p><p><code·class="inline">dist_util:handshake_we_started(HsData)</code>·will·perform·the·handshake·and·the325 <code·class="inline">dist_util:handshake_we_started(HsData)</code>·with·this·record.</p><p><code·class="inline">dist_util:handshake_we_started(HsData)</code>·will·perform·the·handshake·and·the
326 handshake·successfully·completes·this·process·will·then·continue·in·a326 handshake·successfully·completes·this·process·will·then·continue·in·a
327 connection·supervisor·loop·as·long·as·the·connection·is·up.</p></li><li><pre·id="close"><code·class="makeup·erlang"·translate="no"><span·class="nf">close</span><span·class="p"·data-group-id="0312781489-1">(</span><span·class="n">Listen</span><span·class="p"·data-group-id="0312781489-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
328 </span><span·class="err"> </span><span·class="err"> </span><span·class="nf">void</span><span·class="p"·data-group-id="0312781489-2">(</span><span·class="p"·data-group-id="0312781489-2">)</span></code></pre><p>Called·in·order·to·close·the·<code·class="inlin[·...·truncated·by·diffoscope;·len:·55,·SHA:·65aabdfe790b66c21dc9004fa284e3bf68434b6c2c5be5ddc985755adb0c8a41·...·]327 connection·supervisor·loop·as·long·as·the·connection·is·up.</p></li><li><pre·id="close"><code·class="makeup·erlang"·translate="no"><span·class="nf">close</span><span·class="p"·data-group-id="7766967055-1">(</span><span·class="n">Listen</span><span·class="p[·...·truncated·by·diffoscope;·len:·107,·SHA:·26eea15c3c7bfba2fa51048985aa6f011f6b0fc609010ccfbdfb10c0b45e9fb7·...·]
 328 </span><span·class="err"> </span><span·class="err"> </span><span·class="nf">void</span><span·class="p"·data-group-id="7766967055-2">(</span><span·class="p"·data-group-id="7766967055-2">)</span></code></pre><p>Called·in·order·to·close·the·<code·class="inline">Listen</code>·handle·that·originally·was·passed·from
329 the·<a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback.</p></li><li><pre·id="select"><code·class="makeup·erlang"·translate="no"><span·class="nf">select</span><span·class="p"·data-group-id="0464086120-1">(</span><span·class="n">NodeName</span><span·class="p"·data-group-id="0464086120-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">329 the·<a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback.</p></li><li><pre·id="select"><code·class="makeup·erlang"·translate="no"><span·class="nf">select</span><span·class="p"·data-group-id="5203314883-1">(</span><span·class="n">NodeName</span><span·class="p"·data-group-id="5203314883-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
330 </span><span·class="err"> </span><span·class="err"> </span><span·class="nf">boolean</span><span·class="p"·data-group-id="0464086120-2">(</span><span·class="p"·data-group-id="0464086120-2">)</span></code></pre><p>Return·<code·class="inline">true</code>·if·the·host·name·part·of·the·<code·class="inline">NodeName</code>·is·valid·for·use·with330 </span><span·class="err"> </span><span·class="err"> </span><span·class="nf">boolean</span><span·class="p"·data-group-id="5203314883-2">(</span><span·class="p"·data-group-id="5203314883-2">)</span></code></pre><p>Return·<code·class="inline">true</code>·if·the·host·name·part·of·the·<code·class="inline">NodeName</code>·is·valid·for·use·with
331 this·protocol;·otherwise,·<code·class="inline">false</code>.</p></li></ul><p>There·are·also·two·optional·functions·that·may·be·exported:</p><ul><li><pre·id="setopts"><code·class="makeup·erlang"·translate="no"><span·class="nf">setopts</span><span·class="p"·data-group-id="2911858210-1">(</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opts</span><span·class="p"·data-group-id="2911858210-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
332 </span><span·class="err"> </span><span·class="err"> </span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="2911858210-2">{</span><span·class="ss">error</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·216,·SHA:·ec514a9e7eeb362fde13f8fd0bfa52c0f6366e09579f106aff7b5c70a4f8c32e·...·]331 this·protocol;·otherwise,·<code·class="inline">false</code>.</p></li></ul><p>There·are·also·two·optional·functions·that·may·be·exported:</p><ul><li><pre·id="setopts"><code·class="makeup·erlang"·translate="no"><span·class="nf">setopts</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·262,·SHA:·50ad4dc949f8a661df8c0fcf3bc307617ccc2dad027c1e88e8ef4b92090a8081·...·]
 332 </span><span·class="err"> </span><span·class="err"> </span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="6635085437-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error</span><span·class="p"·data-group-id="6635085437-2">}</span></code></pre><p>The·argument·<code·class="inline">Listen</code>·is·the·handle·originally·passed·from·the
333 <a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback.·The·argument·<code·class="inline">Opts</code>·is·a·list·of333 <a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback.·The·argument·<code·class="inline">Opts</code>·is·a·list·of
334 options·to·set·on·future·connections.</p></li><li><pre·id="getopts"><code·class="makeup·erlang"·translate="no"><span·class="nf">getopts</span><span·class="p"·data-group-id="6431962933-1">(</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opts</span><span·class="p"·data-group-id="6431962933-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">334 options·to·set·on·future·connections.</p></li><li><pre·id="getopts"><code·class="makeup·erlang"·translate="no"><span·class="nf">getopts</span><span·class="p"·data-group-id="1357128031-1">(</span><span·class="n">Listen</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opts</span><span·class="p"·data-group-id="1357128031-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
335 </span><span·class="err"> </span><span·class="err"> </span><span·class="p"·data-group-id="6431962933-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OptionValues</span><span·class="p"·data-group-id="6431962933-2">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·199,·SHA:·f217d5142e0f962797e6d43725393952728d42119711e652596e30610d7f47e7·...·]-3">}</span></code></pre><p>The·argument·<code·class="inline">Listen</code>·is·the·handle·originally·passed·from·the335 </span><span·class="err"> </span><span·class="err"> </span><span·class="p"·data-group-id="1357128031-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OptionValues</span><span·class="p"·data-group-id="1357128031-2">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·199,·SHA:·b83e27119fd7bed33c156de33391efef8ae2deefbe749b58e7dd1dd2348bbe0e·...·]-3">}</span></code></pre><p>The·argument·<code·class="inline">Listen</code>·is·the·handle·originally·passed·from·the
336 <a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback.·The·argument·<code·class="inline">Opts</code>·is·a·list·of336 <a·href="alt_dist.html#listen"><code·class="inline">listen/1</code></a>·callback.·The·argument·<code·class="inline">Opts</code>·is·a·list·of
337 options·to·read·for·future·connections.</p></li></ul><p><a·href=""·id="hs_data_record"></a></p><h3·id="the-hs_data-record"·class="section-heading">337 options·to·read·for·future·connections.</p></li></ul><p><a·href=""·id="hs_data_record"></a></p><h3·id="the-hs_data-record"·class="section-heading">
338 ··<a·href="#the-hs_data-record"·class="hover-link">338 ··<a·href="#the-hs_data-record"·class="hover-link">
339 ····<i·class="ri-link-m"·aria-hidden="true"></i>339 ····<i·class="ri-link-m"·aria-hidden="true"></i>
340 ··</a>340 ··</a>
341 ··<span·class="text">The·#hs_data{}·Record</span>341 ··<span·class="text">The·#hs_data{}·Record</span>
342 </h3>342 </h3>
Offset 350, 44 lines modifiedOffset 350, 44 lines modified
350 <a·href="alt_dist.html#accept_connection"><code·class="inline">accept_connection/5</code></a>.</p></li><li><p><strong><code·class="inline"·id="hs_data_other_node">other_node</code></strong>·-·Name·of·the·other·node.·This·field350 <a·href="alt_dist.html#accept_connection"><code·class="inline">accept_connection/5</code></a>.</p></li><li><p><strong><code·class="inline"·id="hs_data_other_node">other_node</code></strong>·-·Name·of·the·other·node.·This·field
351 is·only·mandatory·when·this·node·initiates·the·connection.·That·is,·when351 is·only·mandatory·when·this·node·initiates·the·connection.·That·is,·when
352 connection·is·set·up·via·<a·href="alt_dist.html#setup"><code·class="inline">setup/5</code></a>.</p></li><li><p><strong><code·class="inline"·id="hs_data_this_node">this_node</code></strong>·-·The·node·name·of·this·node.</p></li><li><p><strong><code·class="inline"·id="hs_data_socket">socket</code></strong>·-·The·identifier·of·the·distribution352 connection·is·set·up·via·<a·href="alt_dist.html#setup"><code·class="inline">setup/5</code></a>.</p></li><li><p><strong><code·class="inline"·id="hs_data_this_node">this_node</code></strong>·-·The·node·name·of·this·node.</p></li><li><p><strong><code·class="inline"·id="hs_data_socket">socket</code></strong>·-·The·identifier·of·the·distribution
353 controller.</p></li><li><p><strong><code·class="inline"·id="hs_data_timer">timer</code></strong>·-·The·timer·created·using353 controller.</p></li><li><p><strong><code·class="inline"·id="hs_data_timer">timer</code></strong>·-·The·timer·created·using
354 <code·class="inline">dist_util:start_timer/1</code>.</p></li><li><p><strong><code·class="inline"·id="hs_data_allowed">allowed</code></strong>·-·Information·passed·as·<code·class="inline">Allowed</code>·to354 <code·class="inline">dist_util:start_timer/1</code>.</p></li><li><p><strong><code·class="inline"·id="hs_data_allowed">allowed</code></strong>·-·Information·passed·as·<code·class="inline">Allowed</code>·to
355 <code·class="inline">accept_connection/5</code>.·This·field·is·only·mandatory·when·the·remote·node355 <code·class="inline">accept_connection/5</code>.·This·field·is·only·mandatory·when·the·remote·node
356 initiated·the·connection.·That·is,·when·the·connection·is·set·up·via356 initiated·the·connection.·That·is,·when·the·connection·is·set·up·via
357 <a·href="alt_dist.html#accept_connection"><code·class="inline">accept_connection/5</code></a>.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_send">f_send</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3562542128-1">(</span><span·class="n">DistCtrlr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3562542128-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="3562542128-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error</span><span·class="p"·data-group-id="3562542128-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller·and·<code·class="inline">Data</code> 
358 is·io·data·to·pass·to·the·other·side.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_recv">f_recv</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><s[·...·truncated·by·diffoscope;·len:·945,·SHA:·662795c9e18c57c25887bdcdc4a0a1ec31ca22238600d8f59571679d68a29891·...·]357 <a·href="alt_dist.html#accept_connection"><code·class="inline">accept_connection/5</code></a>.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_send">f_send</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·[·...·truncated·by·diffoscope;·len:·809,·SHA:·3dd32bb26e3a5981310d4686edc244a0079a0c4e02dc4e7a22ab48d1525ed92f·...·]
 358 is·io·data·to·pass·to·the·other·side.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_recv">f_recv</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3153113067-1">(</span><span·class="n">DistCtrlr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Length</span><span·class="p"·data-group-id="3153113067-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3153113067-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Packet</span><span·class="p"·data-group-id="3153113067-2">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="3153113067-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="3153113067-3">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·If
359 <code·class="inline">Length</code>·is·<code·class="inline">0</code>,·all·available·bytes·should·be·returned.·If·<code·class="inline">Length·&gt;·0</code>,359 <code·class="inline">Length</code>·is·<code·class="inline">0</code>,·all·available·bytes·should·be·returned.·If·<code·class="inline">Length·&gt;·0</code>,
360 exactly·<code·class="inline">Length</code>·bytes·should·be·returned,·or·an·error;·possibly·discarding360 exactly·<code·class="inline">Length</code>·bytes·should·be·returned,·or·an·error;·possibly·discarding
361 less·than·<code·class="inline">Length</code>·bytes·of·data·when·the·connection·is·closed·from·the·other361 less·than·<code·class="inline">Length</code>·bytes·of·data·when·the·connection·is·closed·from·the·other
362 side.·It·is·used·for·passive·receive·of·data·from·the·other·end.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_setopts_pre_nodeup">f_setopts_pre_nodeup</code></strong>·-·A·fun·with·the362 side.·It·is·used·for·passive·receive·of·data·from·the·other·end.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_setopts_pre_nodeup">f_setopts_pre_nodeup</code></strong>·-·A·fun·with·the
363 following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2620719870-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="2620719870-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span[·...·truncated·by·diffoscope;·len:·224,·SHA:·d1fc0ec92bc574e013cdf85eda10f3ffec03c3a000cf02ad9ca365beb339c6a2·...·]-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·Called363 following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6581357849-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="6581357849-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span[·...·truncated·by·diffoscope;·len:·224,·SHA:·6c04def410f254874bf5348ef02fa2b0ef0cf418ceecf2182819b6e4eb749748·...·]-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·Called
364 just·before·the·distribution·channel·is·taken·up·for·normal·traffic.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_setopts_post_nodeup">f_setopts_post_nodeup</code></strong>·-·A·fun·with364 just·before·the·distribution·channel·is·taken·up·for·normal·traffic.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_setopts_post_nodeup">f_setopts_post_nodeup</code></strong>·-·A·fun·with
365 the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="5223268358-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="5223268358-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span>[·...·truncated·by·diffoscope;·len:·223,·SHA:·3c5b237bfa12031527c94be4c89b50df6fef5b8dcd3ee64b1101fa1bbc1a2033·...·]-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·Called365 the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="5054497564-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="5054497564-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span>[·...·truncated·by·diffoscope;·len:·223,·SHA:·071bbc2f48a045c6d3898b9fcfd19b5d2509229b8d52758d0dd3a1b7a3796fdf·...·]-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·Called
366 just·after·distribution·channel·has·been·taken·up·for·normal·traffic.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_getll">f_getll</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3432611428-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="3432611428-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">ID</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller·and·<code·class="inline">ID</code>·is366 just·after·distribution·channel·has·been·taken·up·for·normal·traffic.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_getll">f_getll</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7612911310-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="7612911310-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">ID</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller·and·<code·class="inline">ID</code>·is
367 the·identifier·of·the·low·level·entity·that·handles·the·connection·(often367 the·identifier·of·the·low·level·entity·that·handles·the·connection·(often
368 <code·class="inline">DistCtrlr</code>·itself).</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_address">f_address</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6896906031-1">(</span><span·class="n">DistCtrlr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="6896906031-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">NetAddress</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller,·<code·class="inline">Node</code>·is368 <code·class="inline">DistCtrlr</code>·itself).</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_f_address">f_address</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="8949840220-1">(</span><span·class="n">DistCtrlr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="8949840220-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">NetAddress</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller,·<code·class="inline">Node</code>·is
369 the·node·name·of·the·node·on·the·other·end,·and·<code·class="inline">NetAddress</code>·is·a369 the·node·name·of·the·node·on·the·other·end,·and·<code·class="inline">NetAddress</code>·is·a
370 <code·class="inline">#net_address{}</code>·record·with·information·about·the·address·for·the·<code·class="inline">Node</code>·on370 <code·class="inline">#net_address{}</code>·record·with·information·about·the·address·for·the·<code·class="inline">Node</code>·on
371 the·other·end·of·the·connection.·The·<code·class="inline">#net_address{}</code>·record·is·defined·in371 the·other·end·of·the·connection.·The·<code·class="inline">#net_address{}</code>·record·is·defined·in
372 <code·class="inline">kernel/include/net_address.hrl</code>.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_mf_tick">mf_tick</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2085943728-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="2085943728-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">void</span><span·class="p"·data-group-id="2085943728-2">[·...·truncated·by·diffoscope;·len:·49,·SHA:·375f05ed590087ec27e7aeeeefc965a0717159ce0f80af03894b987beb7a39dc·...·]-2">)</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·This372 <code·class="inline">kernel/include/net_address.hrl</code>.</p><p>Only·used·during·handshake·phase.</p></li><li><p><strong><code·class="inline"·id="hs_data_mf_tick">mf_tick</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4117121265-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="4117121265-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">void</span><span·class="p"·data-group-id="4117121265-2">[·...·truncated·by·diffoscope;·len:·49,·SHA:·a0c528a6c2296aa3cf1d2e65fa33fd080999e24858a291c2e6d210936bd069c2·...·]-2">)</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller.·This
373 function·should·send·information·over·the·connection·that·is·not·interpreted373 function·should·send·information·over·the·connection·that·is·not·interpreted
374 by·the·other·end·while·increasing·the·statistics·of·received·packets·on·the374 by·the·other·end·while·increasing·the·statistics·of·received·packets·on·the
375 other·end.·This·is·usually·implemented·by·sending·an·empty·packet.</p><blockquote><h4·class="info">Note</h4><p>It·is·of·vital·importance·that·this·operation·does·not·block·the·caller·for375 other·end.·This·is·usually·implemented·by·sending·an·empty·packet.</p><blockquote><h4·class="info">Note</h4><p>It·is·of·vital·importance·that·this·operation·does·not·block·the·caller·for
376 a·long·time.·This·since·it·is·called·from·the·connection·supervisor.</p></blockquote><p>Used·when·connection·is·up.</p></li><li><p><strong><code·class="inline"·id="hs_data_mf_getstat">mf_getstat</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4365451616-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="4365451616-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4365451616-2">{</span><span·class="ss">ok<[·...·truncated·by·diffoscope;·len:·279,·SHA:·3d0ee49725742d560b6ed2c6d53d4d119c35bf52536075312f82ca0697fb77dc·...·]6-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller,·<code·class="inline">Received</code>376 a·long·time.·This·since·it·is·called·from·the·connection·supervisor.</p></blockquote><p>Used·when·connection·is·up.</p></li><li><p><strong><code·class="inline"·id="hs_data_mf_getstat">mf_getstat</code></strong>·-·A·fun·with·the·following·signature:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3100156536-1">(</span><span·class="n">DistCtrlr</span><span·class="p"·data-group-id="3100156536-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3100156536-2">{</span><span·class="ss">ok<[·...·truncated·by·diffoscope;·len:·279,·SHA:·a54fbc710874f69959da7d6b00146910dd05b450ffa567704e34c03630dd0667·...·]6-2">}</span></code></pre><p>where·<code·class="inline">DistCtrlr</code>·is·the·identifier·of·the·distribution·controller,·<code·class="inline">Received</code>
377 is·received·packets,·<code·class="inline">Sent</code>·is·sent·packets,·and·<code·class="inline">PendSend</code>·is·amount·of·data377 is·received·packets,·<code·class="inline">Sent</code>·is·sent·packets,·and·<code·class="inline">PendSend</code>·is·amount·of·data
378 in·queue·to·be·sent·(typically·in·bytes,·but·<code·class="inline">dist_util</code>·only·checks·whether378 in·queue·to·be·sent·(typically·in·bytes,·but·<code·class="inline">dist_util</code>·only·checks·whether
379 the·value·is·non-zero·to·know·there·is·data·in·queue)·or·a·<a·href="erlang.html#t:boolean/0"><code·class="inline">boolean/0</code></a>379 the·value·is·non-zero·to·know·there·is·data·in·queue)·or·a·<a·href="erlang.html#t:boolean/0"><code·class="inline">boolean/0</code></a>
380 indicating·whether·there·are·packets·in·queue·to·be·sent.</p><blockquote><h4·class="info">Note</h4><p>It·is·of·vital·importance·that·this·operation·does·not·block·the·caller·for380 indicating·whether·there·are·packets·in·queue·to·be·sent.</p><blockquote><h4·class="info">Note</h4><p>It·is·of·vital·importance·that·this·operation·does·not·block·the·caller·for
381 a·long·time.·This·since·it·is·called·from·the·connection·supervisor.</p></blockquote><p>Used·when·connection·is·up.</p></li><li><p><strong><code·class="inline"·id="hs_data_request_type">request_type</code></strong>·-·The·request·<code·class="inline">Type</code>·as·passed·to381 a·long·time.·This·since·it·is·called·from·the·connection·supervisor.</p></blockquote><p>Used·when·connection·is·up.</p></li><li><p><strong><code·class="inline"·id="hs_data_request_type">request_type</code></strong>·-·The·request·<code·class="inline">Type</code>·as·passed·to
382 <a·href="alt_dist.html#setup"><code·class="inline">setup/5</code></a>.·This·is·only·mandatory·when·the·connection·has382 <a·href="alt_dist.html#setup"><code·class="inline">setup/5</code></a>.·This·is·only·mandatory·when·the·connection·has
Max diff block lines reached; 2862/54785 bytes (5.22%) of diff not shown.
2.49 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/automaticyieldingofccode.html
    
Offset 209, 17 lines modifiedOffset 209, 17 lines modified
209 they·have·to·follow·certain·restrictions.·The·convention·for·making209 they·have·to·follow·certain·restrictions.·The·convention·for·making
210 this·clear·is·to·have·a·comment·above·the·function·that·explains·that210 this·clear·is·to·have·a·comment·above·the·function·that·explains·that
211 the·function·is·transformed·by·YCF·(see·<code·class="inline">maps_values_1_helper</code>·in211 the·function·is·transformed·by·YCF·(see·<code·class="inline">maps_values_1_helper</code>·in
212 <code·class="inline">erl_map.c</code>·for·an·example).·If·only·the·transformed·version·of·the212 <code·class="inline">erl_map.c</code>·for·an·example).·If·only·the·transformed·version·of·the
213 function·is·used,·the·convention·is·to·&quot;comment·out&quot;·the·source·for·the213 function·is·used,·the·convention·is·to·&quot;comment·out&quot;·the·source·for·the
214 function·by·surrounding·it·with·the·following·<code·class="inline">#ifdef</code>·(this·way,·one214 function·by·surrounding·it·with·the·following·<code·class="inline">#ifdef</code>·(this·way,·one
215 will·not·get·warnings·about·unused·functions):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">#</span><span·class="ss">ifdef</span><span·class="w">·</span><span·class="n">INCLUDE_YCF_TRANSFORMED_ONLY_FUNCTIONS</span><span·class="w">215 will·not·get·warnings·about·unused·functions):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">#</span><span·class="ss">ifdef</span><span·class="w">·</span><span·class="n">INCLUDE_YCF_TRANSFORMED_ONLY_FUNCTIONS</span><span·class="w">
216 </span><span·class="ss">void</span><span·class="w">·</span><span·class="nf">my_fun</span><span·class="p"·data-group-id="4223421678-1">(</span><span·class="p"·data-group-id="4223421678-1">)</span><span·class="w">·</span><span·class="p"·data-group-id="4223421678-2">{</span><span·class="w">216 </span><span·class="ss">void</span><span·class="w">·</span><span·class="nf">my_fun</span><span·class="p"·data-group-id="3503631369-1">(</span><span·class="p"·data-group-id="3503631369-1">)</span><span·class="w">·</span><span·class="p"·data-group-id="3503631369-2">{</span><span·class="w">
217 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">217 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
218 </span><span·class="p"·data-group-id="4223421678-2">}</span><span·class="w">218 </span><span·class="p"·data-group-id="3503631369-2">}</span><span·class="w">
219 </span><span·class="p">#</span><span·class="ss">endif</span><span·class="w">·</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">INCLUDE_YCF_TRANSFORMED_ONLY_FUNCTIONS</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span></code></pre><p>While·editing·the·function·one·can·define219 </span><span·class="p">#</span><span·class="ss">endif</span><span·class="w">·</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">INCLUDE_YCF_TRANSFORMED_ONLY_FUNCTIONS</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span></code></pre><p>While·editing·the·function·one·can·define
220 <code·class="inline">INCLUDE_YCF_TRANSFORMED_ONLY_FUNCTIONS</code>·so·that·one·can·see·errors220 <code·class="inline">INCLUDE_YCF_TRANSFORMED_ONLY_FUNCTIONS</code>·so·that·one·can·see·errors
221 and·warnings·in·the·non-transformed·source.</p><h3·id="where-to-place-ycf-transformed-functions"·class="section-heading">221 and·warnings·in·the·non-transformed·source.</p><h3·id="where-to-place-ycf-transformed-functions"·class="section-heading">
222 ··<a·href="#where-to-place-ycf-transformed-functions"·class="hover-link">222 ··<a·href="#where-to-place-ycf-transformed-functions"·class="hover-link">
223 ····<i·class="ri-link-m"·aria-hidden="true"></i>223 ····<i·class="ri-link-m"·aria-hidden="true"></i>
224 ··</a>224 ··</a>
225 ··<span·class="text">Where·to·Place·YCF·Transformed·Functions</span>225 ··<span·class="text">Where·to·Place·YCF·Transformed·Functions</span>
283 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/beam_makeops.html
    
Offset 151, 17 lines modifiedOffset 151, 17 lines modified
151 The·loader·translates·generic·instructions·to·specific·instructions.151 The·loader·translates·generic·instructions·to·specific·instructions.
152 In·general,·for·each·generic·instruction,·there·exists·a·family·of152 In·general,·for·each·generic·instruction,·there·exists·a·family·of
153 specific·instructions.··The·OTP·20·release·has·389·specific153 specific·instructions.··The·OTP·20·release·has·389·specific
154 instructions.</p></li><li><p>The·implementation·of·specific·instructions·for·the·traditional154 instructions.</p></li><li><p>The·implementation·of·specific·instructions·for·the·traditional
155 BEAM·interpreter.·For·the·<a·href="beamasm.html">BeamAsm·JIT</a>·introduced155 BEAM·interpreter.·For·the·<a·href="beamasm.html">BeamAsm·JIT</a>·introduced
156 in·OTP·24,·the·implementation·of·instructions·are·defined·in·emitter156 in·OTP·24,·the·implementation·of·instructions·are·defined·in·emitter
157 functions·written·in·C++.</p></li></ul><p>Generic·instructions·have·typed·operands.·Here·are·a·few·examples·of157 functions·written·in·C++.</p></li></ul><p>Generic·instructions·have·typed·operands.·Here·are·a·few·examples·of
158 operands·for·<code·class="inline">move/2</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0864778036-1">{</span><span·class="ss">move</span><span·class="p">,</span><span·class="p"·data-group-id="0864778036-2">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="ss">id</span><span·class="p"·data-group-id="0864778036-2">}</spa[·...·truncated·by·diffoscope;·len:·247,·SHA:·1185e0ae7c81768d9628d7b36c17063680e06d515a9da7e4db24d745ecdbb85a·...·]-1">}</span><span·class="p">.</span><span·class="w">158 operands·for·<code·class="inline">move/2</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6370478839-1">{</span><span·class="ss">move</span><span·class="p">,</span><span·class="p"·data-group-id="6370478839-2">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="ss">id</span><span·class="p"·data-group-id="6370478839-2">}</spa[·...·truncated·by·diffoscope;·len:·247,·SHA:·7dac1523fc2a5e4001fa317b65da5a5964f3f24fa42af39a60dafcdf8889b1c0·...·]-1">}</span><span·class="p">.</span><span·class="w">
159 </span><span·class="p"·data-group-id="0864778036-4">{</span><span·class="ss">move</span><span·class="p">,</span><span·class="p"·data-group-id="0864778036-5">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="0864778036-5">}</span><s[·...·truncated·by·diffoscope;·len:·243,·SHA:·923a0ceeb762f438675633ef3435f95ddc180157ed361fbd48ec797c1aca25a7·...·]-4">}</span><span·class="p">.</span><span·class="w">159 </span><span·class="p"·data-group-id="6370478839-4">{</span><span·class="ss">move</span><span·class="p">,</span><span·class="p"·data-group-id="6370478839-5">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="6370478839-5">}</span><s[·...·truncated·by·diffoscope;·len:·243,·SHA:·235477c60744047188d5b4a4195807f5467593a91a5b21f8c6fd40ca2198ccad·...·]-4">}</span><span·class="p">.</span><span·class="w">
160 </span><span·class="p"·data-group-id="0864778036-7">{</span><span·class="ss">move</span><span·class="p">,</span><span·class="p"·data-group-id="0864778036-8">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="0864778036-8">}</span><s[·...·truncated·by·diffoscope;·len:·243,·SHA:·5de21edc66eedb0048d891b22021e8fe992ddd8dbe4be5867ce50a630a29bca7·...·]-7">}</span><span·class="p">.</span></code></pre><p>When·those·instructions·are·loaded,·the·loader·rewrites·them160 </span><span·class="p"·data-group-id="6370478839-7">{</span><span·class="ss">move</span><span·class="p">,</span><span·class="p"·data-group-id="6370478839-8">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="6370478839-8">}</span><s[·...·truncated·by·diffoscope;·len:·243,·SHA:·09392df05ca10f4d2a757d7889905fa56ac2b3591411b352c614c8551060578b·...·]-7">}</span><span·class="p">.</span></code></pre><p>When·those·instructions·are·loaded,·the·loader·rewrites·them
161 to·specific·instructions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">move_cx</span><span·class="w">·</span><span·class="ss">id</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">161 to·specific·instructions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">move_cx</span><span·class="w">·</span><span·class="ss">id</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">
162 </span><span·class="ss">move_xx</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">162 </span><span·class="ss">move_xx</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">
163 </span><span·class="ss">move_xy</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="mi">1</span></code></pre><p>Corresponding·to·each·generic·instruction,·there·is·a·family·of163 </span><span·class="ss">move_xy</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="mi">1</span></code></pre><p>Corresponding·to·each·generic·instruction,·there·is·a·family·of
164 specific·instructions.··The·types·that·an·instance·of·a·specific164 specific·instructions.··The·types·that·an·instance·of·a·specific
165 instruction·can·handle·are·encoded·in·the·instruction·names.··For165 instruction·can·handle·are·encoded·in·the·instruction·names.··For
166 example,·<code·class="inline">move_xy</code>·takes·an·X·register·number·as·the·first·operand·and166 example,·<code·class="inline">move_xy</code>·takes·an·X·register·number·as·the·first·operand·and
167 a·Y·register·number·as·the·second·operand.··<code·class="inline">move_cx</code>·takes·a·tagged167 a·Y·register·number·as·the·second·operand.··<code·class="inline">move_cx</code>·takes·a·tagged
Offset 185, 17 lines modifiedOffset 185, 17 lines modified
185 </span><span·class="ss">move</span><span·class="w">·</span><span·class="ss">c</span><span·class="w">·</span><span·class="ss">x</span></code></pre><p>Each·specific·instructions·is·defined·by·following·the·name·of·the185 </span><span·class="ss">move</span><span·class="w">·</span><span·class="ss">c</span><span·class="w">·</span><span·class="ss">x</span></code></pre><p>Each·specific·instructions·is·defined·by·following·the·name·of·the
186 instruction·with·the·types·for·each·operand.··An·operand·type·is·a186 instruction·with·the·types·for·each·operand.··An·operand·type·is·a
187 single·letter.··For·example,·<code·class="inline">x</code>·means·an·X·register,·<code·class="inline">y</code>187 single·letter.··For·example,·<code·class="inline">x</code>·means·an·X·register,·<code·class="inline">y</code>
188 means·a·Y·register,·and·<code·class="inline">c</code>·is·a·&quot;constant&quot;·(a·tagged·term·such·as188 means·a·Y·register,·and·<code·class="inline">c</code>·is·a·&quot;constant&quot;·(a·tagged·term·such·as
189 an·integer,·an·atom,·or·a·literal).</p><p>Now·let's·look·at·the·implementation·of·the·<code·class="inline">move</code>·instruction.··There189 an·integer,·an·atom,·or·a·literal).</p><p>Now·let's·look·at·the·implementation·of·the·<code·class="inline">move</code>·instruction.··There
190 are·multiple·files·containing·implementations·of·instructions·in·the190 are·multiple·files·containing·implementations·of·instructions·in·the
191 <code·class="inline">erts/emulator/beam/emu</code>·directory.··The·<code·class="inline">move</code>·instruction·is·defined191 <code·class="inline">erts/emulator/beam/emu</code>·directory.··The·<code·class="inline">move</code>·instruction·is·defined
192 in·<code·class="inline">instrs.tab</code>.··It·looks·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">move</span><span·class="p"·data-group-id="8498427327-1">(</span><span·class="n">Src</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dst</span><span·class="p"·data-group-id="8498427327-1">)</span><span·class="w">·</span><span·class="p"·data-group-id="8498427327-2">{</span><span·class="w">192 in·<code·class="inline">instrs.tab</code>.··It·looks·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">move</span><span·class="p"·data-group-id="1847704181-1">(</span><span·class="n">Src</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dst</span><span·class="p"·data-group-id="1847704181-1">)</span><span·class="w">·</span><span·class="p"·data-group-id="1847704181-2">{</span><span·class="w">
193 ····</span><span·class="sc">$D</span><span·class="ss">st</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="sc">$S</span><span·class="ss">rc</span><span·class="p">;</span><span·class="w">193 ····</span><span·class="sc">$D</span><span·class="ss">st</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="sc">$S</span><span·class="ss">rc</span><span·class="p">;</span><span·class="w">
194 </span><span·class="p"·data-group-id="8498427327-2">}</span></code></pre><p>The·implementation·for·an·instruction·largely·follows·the·C·syntax,194 </span><span·class="p"·data-group-id="1847704181-2">}</span></code></pre><p>The·implementation·for·an·instruction·largely·follows·the·C·syntax,
195 except·that·the·variables·in·the·function·head·don't·have·any·types.195 except·that·the·variables·in·the·function·head·don't·have·any·types.
196 The·<code·class="inline">$</code>·before·an·identifier·denotes·a·macro·expansion.··Thus,196 The·<code·class="inline">$</code>·before·an·identifier·denotes·a·macro·expansion.··Thus,
197 <code·class="inline">$Src</code>·will·expand·to·the·code·to·pick·up·the·source·operand·for197 <code·class="inline">$Src</code>·will·expand·to·the·code·to·pick·up·the·source·operand·for
198 the·instruction·and·<code·class="inline">$Dst</code>·to·the·code·for·the·destination·register.</p><p>We·will·look·at·the·code·for·each·specific·instruction·in·turn.··To198 the·instruction·and·<code·class="inline">$Dst</code>·to·the·code·for·the·destination·register.</p><p>We·will·look·at·the·code·for·each·specific·instruction·in·turn.··To
199 make·the·code·easier·to·understand,·let's·first·look·at·the·memory199 make·the·code·easier·to·understand,·let's·first·look·at·the·memory
200 layout·for·the·instruction·<code·class="inline">{move,{atom,id},{x,5}}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·····</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span><span·class="w">200 layout·for·the·instruction·<code·class="inline">{move,{atom,id},{x,5}}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·····</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span><span·class="w">
201 </span><span·class="n">I</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·················</span><span·class="mi">40</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·······</span><span·class="err">&amp;</span><span·class="err">&amp;</span><span·class="ss">lb_move_cx</span><span·class="w">·</span><span·class="p">|</span><span·class="w">201 </span><span·class="n">I</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·················</span><span·class="mi">40</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·······</span><span·class="err">&amp;</span><span·class="err">&amp;</span><span·class="ss">lb_move_cx</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
Offset 204, 61 lines modifiedOffset 204, 61 lines modified
204 ·····</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span></code></pre><p>This·example·and·all·other·examples·in·the·document·assumes·a·64-bit204 ·····</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">+</span></code></pre><p>This·example·and·all·other·examples·in·the·document·assumes·a·64-bit
205 architecture,·and·furthermore·that·pointers·to·C·code·fit·in·32·bits.</p><p><code·class="inline">I</code>·in·the·BEAM·virtual·machine·is·the·instruction·pointer.··When·BEAM205 architecture,·and·furthermore·that·pointers·to·C·code·fit·in·32·bits.</p><p><code·class="inline">I</code>·in·the·BEAM·virtual·machine·is·the·instruction·pointer.··When·BEAM
206 executes·an·instruction,·<code·class="inline">I</code>·points·to·the·first·word·of·the206 executes·an·instruction,·<code·class="inline">I</code>·points·to·the·first·word·of·the
207 instruction.</p><p><code·class="inline">&amp;&amp;lb_move_cx</code>·is·the·address·to·C·code·that·implements·<code·class="inline">move_cx</code>.··It207 instruction.</p><p><code·class="inline">&amp;&amp;lb_move_cx</code>·is·the·address·to·C·code·that·implements·<code·class="inline">move_cx</code>.··It
208 is·stored·in·the·lower·32·bits·of·the·word.··In·the·upper·32·bits·is208 is·stored·in·the·lower·32·bits·of·the·word.··In·the·upper·32·bits·is
209 the·byte·offset·to·the·X·register;·the·register·number·5·has·been209 the·byte·offset·to·the·X·register;·the·register·number·5·has·been
210 multiplied·by·the·word·size·size·8.</p><p>In·the·next·word·the·tagged·atom·<code·class="inline">id</code>·is·stored.</p><p>With·that·background,·we·can·look·at·the·generated·code·for·<code·class="inline">move_cx</code>210 multiplied·by·the·word·size·size·8.</p><p>In·the·next·word·the·tagged·atom·<code·class="inline">id</code>·is·stored.</p><p>With·that·background,·we·can·look·at·the·generated·code·for·<code·class="inline">move_cx</code>
211 in·<code·class="inline">beam_hot.h</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OpCase</span><span·class="p"·data-group-id="8349708440-1">(</span><span·class="ss">move_cx</span><span·class="p"·data-group-id="8349708440-1">)</span><span·class="p">:</span><span·class="w">211 in·<code·class="inline">beam_hot.h</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OpCase</span><span·class="p"·data-group-id="6247245708-1">(</span><span·class="ss">move_cx</span><span·class="p"·data-group-id="6247245708-1">)</span><span·class="p">:</span><span·class="w">
212 </span><span·class="p"·data-group-id="8349708440-2">{</span><span·class="w">212 </span><span·class="p"·data-group-id="6247245708-2">{</span><span·class="w">
213 ··</span><span·class="n">BeamInstr</span><span·class="w">·</span><span·class="ss">next_pf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamCodeAddr</span><span·class="p"·data-group-id="8349708440-3">(</span><span·class="n">I</span><span·class="p"·data-group-id="8349708440-4">[</span><span·class="mi">2</span><span·class="p"·data-group-id="8349708440-4">]</span><span·class="p"·data-group-id="8349708440-3">)</span><span·class="p">;</span><span·class="w">213 ··</span><span·class="n">BeamInstr</span><span·class="w">·</span><span·class="ss">next_pf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamCodeAddr</span><span·class="p"·data-group-id="6247245708-3">(</span><span·class="n">I</span><span·class="p"·data-group-id="6247245708-4">[</span><span·class="mi">2</span><span·class="p"·data-group-id="6247245708-4">]</span><span·class="p"·data-group-id="6247245708-3">)</span><span·class="p">;</span><span·class="w">
214 ··</span><span·class="nf">xb</span><span·class="p"·data-group-id="8349708440-5">(</span><span·class="n">BeamExtraData</span><span·class="p"·data-group-id="8349708440-6">(</span><span·class="n">I</span><span·class="p"·data-group-id="8349708440-7">[</span><span·class="mi">0</span><span·class="p"·data-group-id="8349708440-7[·...·truncated·by·diffoscope;·len:·331,·SHA:·54c528725c03d528a5b3318ab3ed0a39c658b732551d91795f25df1ff1aa2eea·...·]-8">]</span><span·class="p">;</span><span·class="w">214 ··</span><span·class="nf">xb</span><span·class="p"·data-group-id="6247245708-5">(</span><span·class="n">BeamExtraData</span><span·class="p"·data-group-id="6247245708-6">(</span><span·class="n">I</span><span·class="p"·data-group-id="6247245708-7">[</span><span·class="mi">0</span><span·class="p"·data-group-id="6247245708-7[·...·truncated·by·diffoscope;·len:·331,·SHA:·ab3050bffbed1d0ca96ca726e37481c1b94e78bb91a23d67b286521d6921a04b·...·]-8">]</span><span·class="p">;</span><span·class="w">
215 ··</span><span·class="n">I</span><span·class="w">·</span><span·class="o">+</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">215 ··</span><span·class="n">I</span><span·class="w">·</span><span·class="o">+</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">
216 ··</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="8349708440-9">(</span><span·class="n">VALID_INSTR</span><span·class="p"·data-group-id="8349708440-10">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="8349708440-10">)</span><span·class="p"·data-group-id="8349708440-9">)</span><span·class="p">;</span><span·class="w">216 ··</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="6247245708-9">(</span><span·class="n">VALID_INSTR</span><span·class="p"·data-group-id="6247245708-10">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="6247245708-10">)</span><span·class="p"·data-group-id="6247245708-9">)</span><span·class="p">;</span><span·class="w">
217 ··</span><span·class="n">GotoPF</span><span·class="p"·data-group-id="8349708440-11">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="8349708440-11">)</span><span·class="p">;</span><span·class="w">217 ··</span><span·class="n">GotoPF</span><span·class="p"·data-group-id="6247245708-11">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="6247245708-11">)</span><span·class="p">;</span><span·class="w">
218 </span><span·class="p"·data-group-id="8349708440-2">}</span></code></pre><p>We·will·go·through·each·line·in·turn.</p><ul><li><p><code·class="inline">OpCase(move_cx):</code>·defines·a·label·for·the·instruction.··The218 </span><span·class="p"·data-group-id="6247245708-2">}</span></code></pre><p>We·will·go·through·each·line·in·turn.</p><ul><li><p><code·class="inline">OpCase(move_cx):</code>·defines·a·label·for·the·instruction.··The
219 <code·class="inline">OpCase()</code>·macro·is·defined·in·<code·class="inline">beam_emu.c</code>.··It·will·expand·this·line219 <code·class="inline">OpCase()</code>·macro·is·defined·in·<code·class="inline">beam_emu.c</code>.··It·will·expand·this·line
220 to·<code·class="inline">lb_move_cx:</code>.</p></li><li><p><code·class="inline">BeamInstr·next_pf·=·BeamCodeAddr(I[2]);</code>·fetches·the·pointer·to220 to·<code·class="inline">lb_move_cx:</code>.</p></li><li><p><code·class="inline">BeamInstr·next_pf·=·BeamCodeAddr(I[2]);</code>·fetches·the·pointer·to
221 code·for·the·next·instruction·to·be·executed.··The·<code·class="inline">BeamCodeAddr()</code>221 code·for·the·next·instruction·to·be·executed.··The·<code·class="inline">BeamCodeAddr()</code>
222 macro·extracts·the·pointer·from·the·lower·32·bits·of·the·instruction222 macro·extracts·the·pointer·from·the·lower·32·bits·of·the·instruction
223 word.</p></li><li><p><code·class="inline">xb(BeamExtraData(I[0]))·=·I[1];</code>·is·the·expansion·of·<code·class="inline">$Dst·=·$Src</code>.223 word.</p></li><li><p><code·class="inline">xb(BeamExtraData(I[0]))·=·I[1];</code>·is·the·expansion·of·<code·class="inline">$Dst·=·$Src</code>.
224 <code·class="inline">BeamExtraData()</code>·is·a·macro·that·will·extract·the·upper·32·bits·from224 <code·class="inline">BeamExtraData()</code>·is·a·macro·that·will·extract·the·upper·32·bits·from
225 the·instruction·word.··In·this·example,·it·will·return·40·which·is·the225 the·instruction·word.··In·this·example,·it·will·return·40·which·is·the
226 byte·offset·for·X·register·5.··The·<code·class="inline">xb()</code>·macro·will·cast·a·byte226 byte·offset·for·X·register·5.··The·<code·class="inline">xb()</code>·macro·will·cast·a·byte
227 pointer·to·an·<code·class="inline">Eterm</code>·pointer·and·dereference·it.··The·<code·class="inline">I[1]</code>·on227 pointer·to·an·<code·class="inline">Eterm</code>·pointer·and·dereference·it.··The·<code·class="inline">I[1]</code>·on
228 the·right-hand·side·of·the·<code·class="inline">=</code>·fetches·an·Erlang·term·(the·atom·<code·class="inline">id</code>·in228 the·right-hand·side·of·the·<code·class="inline">=</code>·fetches·an·Erlang·term·(the·atom·<code·class="inline">id</code>·in
229 this·case).</p></li><li><p><code·class="inline">I·+=·2</code>·advances·the·instruction·pointer·to·the·next229 this·case).</p></li><li><p><code·class="inline">I·+=·2</code>·advances·the·instruction·pointer·to·the·next
230 instruction.</p></li><li><p>In·a·debug-compiled·emulator,·<code·class="inline">ASSERT(VALID_INSTR(next_pf));</code>·makes230 instruction.</p></li><li><p>In·a·debug-compiled·emulator,·<code·class="inline">ASSERT(VALID_INSTR(next_pf));</code>·makes
231 sure·that·<code·class="inline">next_pf</code>·is·a·valid·instruction·(that·is,·that·it·points231 sure·that·<code·class="inline">next_pf</code>·is·a·valid·instruction·(that·is,·that·it·points
232 within·the·<code·class="inline">process_main()</code>·function·in·<code·class="inline">beam_emu.c</code>).</p></li><li><p><code·class="inline">GotoPF(next_pf);</code>·transfers·control·to·the·next·instruction.</p></li></ul><p>Now·let's·look·at·the·implementation·of·<code·class="inline">move_xx</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OpCase</span><span·class="p"·data-group-id="3294709322-1">(</span><span·class="ss">move_xx</span><span·class="p"·data-group-id="3294709322-1">)</span><span·class="p">:</span><span·class="w">232 within·the·<code·class="inline">process_main()</code>·function·in·<code·class="inline">beam_emu.c</code>).</p></li><li><p><code·class="inline">GotoPF(next_pf);</code>·transfers·control·to·the·next·instruction.</p></li></ul><p>Now·let's·look·at·the·implementation·of·<code·class="inline">move_xx</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OpCase</span><span·class="p"·data-group-id="4226058220-1">(</span><span·class="ss">move_xx</span><span·class="p"·data-group-id="4226058220-1">)</span><span·class="p">:</span><span·class="w">
233 </span><span·class="p"·data-group-id="3294709322-2">{</span><span·class="w">233 </span><span·class="p"·data-group-id="4226058220-2">{</span><span·class="w">
234 ··</span><span·class="n">Eterm</span><span·class="w">·</span><span·class="ss">tmp_packed1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamExtraData</span><span·class="p"·data-group-id="3294709322-3">(</span><span·class="n">I</span><span·class="p"·data-group-id="3294709322-4">[</span><span·class="mi">0</span><span·class="p"·data-group-id="3294709322-4">]</span><span·class="p"·data-group-id="3294709322-3">)</span><span·class="p">;</span><span·class="w">234 ··</span><span·class="n">Eterm</span><span·class="w">·</span><span·class="ss">tmp_packed1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamExtraData</span><span·class="p"·data-group-id="4226058220-3">(</span><span·class="n">I</span><span·class="p"·data-group-id="4226058220-4">[</span><span·class="mi">0</span><span·class="p"·data-group-id="4226058220-4">]</span><span·class="p"·data-group-id="4226058220-3">)</span><span·class="p">;</span><span·class="w">
235 ··</span><span·class="n">BeamInstr</span><span·class="w">·</span><span·class="ss">next_pf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamCodeAddr</span><span·class="p"·data-group-id="3294709322-5">(</span><span·class="n">I</span><span·class="p"·data-group-id="3294709322-6">[</span><span·class="mi">1</span><span·class="p"·data-group-id="3294709322-6">]</span><span·class="p"·data-group-id="3294709322-5">)</span><span·class="p">;</span><span·class="w">235 ··</span><span·class="n">BeamInstr</span><span·class="w">·</span><span·class="ss">next_pf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamCodeAddr</span><span·class="p"·data-group-id="4226058220-5">(</span><span·class="n">I</span><span·class="p"·data-group-id="4226058220-6">[</span><span·class="mi">1</span><span·class="p"·data-group-id="4226058220-6">]</span><span·class="p"·data-group-id="4226058220-5">)</span><span·class="p">;</span><span·class="w">
236 ··</span><span·class="nf">xb</span><span·class="p"·data-group-id="3294709322-7">(</span><span·class="p"·data-group-id="3294709322-8">(</span><span·class="ss">tmp_packed1</span><span·class="p">&gt;&gt;</span><span·class="n">BEAM_TIGHT_SHIFT</span><span·class="p"·data-group-id="3294709322-8">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·325,·SHA:·9a19bc3e6e25349086a8cf1e2e495a3166e1c30e15e2bd7566761661b40fb07d·...·]-9">)</span><span·class="p">;</span><span·class="w">236 ··</span><span·class="nf">xb</span><span·class="p"·data-group-id="4226058220-7">(</span><span·class="p"·data-group-id="4226058220-8">(</span><span·class="ss">tmp_packed1</span><span·class="p">&gt;&gt;</span><span·class="n">BEAM_TIGHT_SHIFT</span><span·class="p"·data-group-id="4226058220-8">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·325,·SHA:·9b161ae9b42315bef0eea0af7f9844047b0fe0d62bc325f69373b2a36a70834d·...·]-9">)</span><span·class="p">;</span><span·class="w">
237 ··</span><span·class="n">I</span><span·class="w">·</span><span·class="o">+</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">237 ··</span><span·class="n">I</span><span·class="w">·</span><span·class="o">+</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
238 ··</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="3294709322-10">(</span><span·class="n">VALID_INSTR</span><span·class="p"·data-group-id="3294709322-11">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="3294709322-11">)</span><span·class="p"·data-group-id="3294709322-10">)</span><span·class="p">;</span><span·class="w">238 ··</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="4226058220-10">(</span><span·class="n">VALID_INSTR</span><span·class="p"·data-group-id="4226058220-11">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="4226058220-11">)</span><span·class="p"·data-group-id="4226058220-10">)</span><span·class="p">;</span><span·class="w">
239 ··</span><span·class="n">GotoPF</span><span·class="p"·data-group-id="3294709322-12">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="3294709322-12">)</span><span·class="p">;</span><span·class="w">239 ··</span><span·class="n">GotoPF</span><span·class="p"·data-group-id="4226058220-12">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="4226058220-12">)</span><span·class="p">;</span><span·class="w">
240 </span><span·class="p"·data-group-id="3294709322-2">}</span></code></pre><p>We·will·go·through·the·lines·that·are·new·or·have·changed·compared·to240 </span><span·class="p"·data-group-id="4226058220-2">}</span></code></pre><p>We·will·go·through·the·lines·that·are·new·or·have·changed·compared·to
241 <code·class="inline">move_cx</code>.</p><ul><li><p><code·class="inline">Eterm·tmp_packed1·=·BeamExtraData(I[0]);</code>·picks·up·both·X·register241 <code·class="inline">move_cx</code>.</p><ul><li><p><code·class="inline">Eterm·tmp_packed1·=·BeamExtraData(I[0]);</code>·picks·up·both·X·register
242 numbers·packed·into·the·upper·32·bits·of·the·instruction·word.</p></li><li><p><code·class="inline">BeamInstr·next_pf·=·BeamCodeAddr(I[1]);</code>·pre-fetches·the·address·of242 numbers·packed·into·the·upper·32·bits·of·the·instruction·word.</p></li><li><p><code·class="inline">BeamInstr·next_pf·=·BeamCodeAddr(I[1]);</code>·pre-fetches·the·address·of
243 the·next·instruction.·Note·that·because·both·X·registers·operands·fits243 the·next·instruction.·Note·that·because·both·X·registers·operands·fits
244 into·the·instruction·word,·the·next·instruction·is·in·the·very·next244 into·the·instruction·word,·the·next·instruction·is·in·the·very·next
245 word.</p></li><li><p><code·class="inline">xb((tmp_packed1&gt;&gt;BEAM_TIGHT_SHIFT))·=·xb(tmp_packed1&amp;BEAM_TIGHT_MASK);</code>245 word.</p></li><li><p><code·class="inline">xb((tmp_packed1&gt;&gt;BEAM_TIGHT_SHIFT))·=·xb(tmp_packed1&amp;BEAM_TIGHT_MASK);</code>
246 copies·the·source·to·the·destination.··(For·a·64-bit·architecture,246 copies·the·source·to·the·destination.··(For·a·64-bit·architecture,
247 <code·class="inline">BEAM_TIGHT_SHIFT</code>·is·16·and·<code·class="inline">BEAM_TIGHT_MASK</code>·is·<code·class="inline">0xFFFF</code>.)</p></li><li><p><code·class="inline">I·+=·1;</code>·advances·the·instruction·pointer·to·the·next·instruction.</p></li></ul><p><code·class="inline">move_xy</code>·is·almost·identical·to·<code·class="inline">move_xx</code>.··The·only·difference·is247 <code·class="inline">BEAM_TIGHT_SHIFT</code>·is·16·and·<code·class="inline">BEAM_TIGHT_MASK</code>·is·<code·class="inline">0xFFFF</code>.)</p></li><li><p><code·class="inline">I·+=·1;</code>·advances·the·instruction·pointer·to·the·next·instruction.</p></li></ul><p><code·class="inline">move_xy</code>·is·almost·identical·to·<code·class="inline">move_xx</code>.··The·only·difference·is
248 the·use·of·the·<code·class="inline">yb()</code>·macro·instead·of·<code·class="inline">xb()</code>·to·reference·the248 the·use·of·the·<code·class="inline">yb()</code>·macro·instead·of·<code·class="inline">xb()</code>·to·reference·the
249 destination·register:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OpCase</span><span·class="p"·data-group-id="8302655168-1">(</span><span·class="ss">move_xy</span><span·class="p"·data-group-id="8302655168-1">)</span><span·class="p">:</span><span·class="w">249 destination·register:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OpCase</span><span·class="p"·data-group-id="2507872523-1">(</span><span·class="ss">move_xy</span><span·class="p"·data-group-id="2507872523-1">)</span><span·class="p">:</span><span·class="w">
250 </span><span·class="p"·data-group-id="8302655168-2">{</span><span·class="w">250 </span><span·class="p"·data-group-id="2507872523-2">{</span><span·class="w">
251 ··</span><span·class="n">Eterm</span><span·class="w">·</span><span·class="ss">tmp_packed1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamExtraData</span><span·class="p"·data-group-id="8302655168-3">(</span><span·class="n">I</span><span·class="p"·data-group-id="8302655168-4">[</span><span·class="mi">0</span><span·class="p"·data-group-id="8302655168-4">]</span><span·class="p"·data-group-id="8302655168-3">)</span><span·class="p">;</span><span·class="w">251 ··</span><span·class="n">Eterm</span><span·class="w">·</span><span·class="ss">tmp_packed1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamExtraData</span><span·class="p"·data-group-id="2507872523-3">(</span><span·class="n">I</span><span·class="p"·data-group-id="2507872523-4">[</span><span·class="mi">0</span><span·class="p"·data-group-id="2507872523-4">]</span><span·class="p"·data-group-id="2507872523-3">)</span><span·class="p">;</span><span·class="w">
252 ··</span><span·class="n">BeamInstr</span><span·class="w">·</span><span·class="ss">next_pf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamCodeAddr</span><span·class="p"·data-group-id="8302655168-5">(</span><span·class="n">I</span><span·class="p"·data-group-id="8302655168-6">[</span><span·class="mi">1</span><span·class="p"·data-group-id="8302655168-6">]</span><span·class="p"·data-group-id="8302655168-5">)</span><span·class="p">;</span><span·class="w">252 ··</span><span·class="n">BeamInstr</span><span·class="w">·</span><span·class="ss">next_pf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">BeamCodeAddr</span><span·class="p"·data-group-id="2507872523-5">(</span><span·class="n">I</span><span·class="p"·data-group-id="2507872523-6">[</span><span·class="mi">1</span><span·class="p"·data-group-id="2507872523-6">]</span><span·class="p"·data-group-id="2507872523-5">)</span><span·class="p">;</span><span·class="w">
253 ··</span><span·class="nf">yb</span><span·class="p"·data-group-id="8302655168-7">(</span><span·class="p"·data-group-id="8302655168-8">(</span><span·class="ss">tmp_packed1</span><span·class="p">&gt;&gt;</span><span·class="n">BEAM_TIGHT_SHIFT</span><span·class="p"·data-group-id="8302655168-8">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·325,·SHA:·c6fac16828c0dccb911697cd8e19985fb2934afabf3bbd37c20cd53025858fa2·...·]-9">)</span><span·class="p">;</span><span·class="w">253 ··</span><span·class="nf">yb</span><span·class="p"·data-group-id="2507872523-7">(</span><span·class="p"·data-group-id="2507872523-8">(</span><span·class="ss">tmp_packed1</span><span·class="p">&gt;&gt;</span><span·class="n">BEAM_TIGHT_SHIFT</span><span·class="p"·data-group-id="2507872523-8">)</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·325,·SHA:·9655bf294115cb514b6b75aafcb7c5f8d6578c0bb6ab232935af3b27e778412b·...·]-9">)</span><span·class="p">;</span><span·class="w">
254 ··</span><span·class="n">I</span><span·class="w">·</span><span·class="o">+</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">254 ··</span><span·class="n">I</span><span·class="w">·</span><span·class="o">+</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
255 ··</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="8302655168-10">(</span><span·class="n">VALID_INSTR</span><span·class="p"·data-group-id="8302655168-11">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="8302655168-11">)</span><span·class="p"·data-group-id="8302655168-10">)</span><span·class="p">;</span><span·class="w">255 ··</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="2507872523-10">(</span><span·class="n">VALID_INSTR</span><span·class="p"·data-group-id="2507872523-11">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="2507872523-11">)</span><span·class="p"·data-group-id="2507872523-10">)</span><span·class="p">;</span><span·class="w">
256 ··</span><span·class="n">GotoPF</span><span·class="p"·data-group-id="8302655168-12">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="8302655168-12">)</span><span·class="p">;</span><span·class="w">256 ··</span><span·class="n">GotoPF</span><span·class="p"·data-group-id="2507872523-12">(</span><span·class="ss">next_pf</span><span·class="p"·data-group-id="2507872523-12">)</span><span·class="p">;</span><span·class="w">
257 </span><span·class="p"·data-group-id="8302655168-2">}</span></code></pre><h3·id="transformation-rules"·class="section-heading">257 </span><span·class="p"·data-group-id="2507872523-2">}</span></code></pre><h3·id="transformation-rules"·class="section-heading">
258 ··<a·href="#transformation-rules"·class="hover-link">258 ··<a·href="#transformation-rules"·class="hover-link">
259 ····<i·class="ri-link-m"·aria-hidden="true"></i>259 ····<i·class="ri-link-m"·aria-hidden="true"></i>
260 ··</a>260 ··</a>
261 ··<span·class="text">Transformation·rules</span>261 ··<span·class="text">Transformation·rules</span>
262 </h3>262 </h3>
263 <p>Next·let's·look·at·how·we·can·do·some·optimizations·using·transformation263 <p>Next·let's·look·at·how·we·can·do·some·optimizations·using·transformation
264 rules.··For·simple·instructions·such·as·<code·class="inline">move/2</code>,·the·instruction·dispatch264 rules.··For·simple·instructions·such·as·<code·class="inline">move/2</code>,·the·instruction·dispatch
Offset 271, 21 lines modifiedOffset 271, 21 lines modified
271 with·an·uppercase·letter·just·as·in·Erlang.··A·pattern·variable·may·be271 with·an·uppercase·letter·just·as·in·Erlang.··A·pattern·variable·may·be
272 followed·<code·class="inline">=</code>·and·one·or·more·type·letters·to·constrain·the·match·to272 followed·<code·class="inline">=</code>·and·one·or·more·type·letters·to·constrain·the·match·to
273 one·of·those·types.··The·variables·that·are·bound·on·the·left-hand·side·can273 one·of·those·types.··The·variables·that·are·bound·on·the·left-hand·side·can
274 be·used·on·the·right-hand·side.</p><p>We·will·also·need·to·define·a·specific·instruction·and·an·implementation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">#</span><span·class="w">·</span><span·class="n">In</span><span·class="w">·</span><span·class="ss">ops</span><span·class="p">.</span><span·class="ss">tab</span><span·class="w">274 be·used·on·the·right-hand·side.</p><p>We·will·also·need·to·define·a·specific·instruction·and·an·implementation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">#</span><span·class="w">·</span><span·class="n">In</span><span·class="w">·</span><span·class="ss">ops</span><span·class="p">.</span><span·class="ss">tab</span><span·class="w">
275 </span><span·class="ss">move2</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="ss">y</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="ss">y</span><span·class="w">275 </span><span·class="ss">move2</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="ss">y</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="ss">y</span><span·class="w">
  
276 </span><span·class="o">/</span><span·class="o">/</span><span·class="w">·</span><span·class="n">In</span><span·class="w">·</span><span·class="ss">instrs</span><span·class="p">.</span><span·class="ss">tab</span><span·class="w">276 </span><span·class="o">/</span><span·class="o">/</span><span·class="w">·</span><span·class="n">In</span><span·class="w">·</span><span·class="ss">instrs</span><span·class="p">.</span><span·class="ss">tab</span><span·class="w">
277 </span><span·class="nf">move2</span><span·class="p"·data-group-id="8797300271-1">(</span><span·class="n">S1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S2</span><span·class="p">,</span><span·class="w">·</span><span·class="n"[·...·truncated·by·diffoscope;·len:·128,·SHA:·956888a4e305c3a6a4fb5535feb48c7f9d89e4aeff867350e1290db835866983·...·]-2">{</span><span·class="w">277 </span><span·class="nf">move2</span><span·class="p"·data-group-id="9656832622-1">(</span><span·class="n">S1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S2</span><span·class="p">,</span><span·class="w">·</span><span·class="n"[·...·truncated·by·diffoscope;·len:·128,·SHA:·7028cae01cb421c2fd0d35dc8773709fcf21929a00f1edfad225af6da0a5469c·...·]-2">{</span><span·class="w">
278 ····</span><span·class="n">Eterm</span><span·class="w">·</span><span·class="n">V1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V2</span><span·class="p">;</span><span·class="w">278 ····</span><span·class="n">Eterm</span><span·class="w">·</span><span·class="n">V1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V2</span><span·class="p">;</span><span·class="w">
279 ····</span><span·class="n">V1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="sc">$S</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">279 ····</span><span·class="n">V1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="sc">$S</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
280 ····</span><span·class="n">V2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="sc">$S</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">280 ····</span><span·class="n">V2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="sc">$S</span><span·class="mi">2</span><span·class="p">;</span><span·class="w">
281 ····</span><span·class="sc">$D</span><span·class="mi">1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">V1</span><span·class="p">;</span><span·class="w">281 ····</span><span·class="sc">$D</span><span·class="mi">1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">V1</span><span·class="p">;</span><span·class="w">
282 ····</span><span·class="sc">$D</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">V2</span><span·class="p">;</span><span·class="w">282 ····</span><span·class="sc">$D</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">V2</span><span·class="p">;</span><span·class="w">
283 </span><span·class="p"·data-group-id="8797300271-2">}</span></code></pre><p>When·the·loader·has·found·a·match·and·replaced·the·matched·instructions,283 </span><span·class="p"·data-group-id="9656832622-2">}</span></code></pre><p>When·the·loader·has·found·a·match·and·replaced·the·matched·instructions,
284 it·will·match·the·new·instructions·against·the·transformation·rules.284 it·will·match·the·new·instructions·against·the·transformation·rules.
285 Because·of·that,·we·can·define·the·rule·for·a·<code·class="inline">move3/6</code>·instruction285 Because·of·that,·we·can·define·the·rule·for·a·<code·class="inline">move3/6</code>·instruction
286 as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">move2</span><span·class="w">·</span><span·class="n">X1</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y1</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="n">X2</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y2</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">move</span><span·class="w">·</span><span·class="n">X3</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y3</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">286 as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">move2</span><span·class="w">·</span><span·class="n">X1</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y1</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="n">X2</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y2</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">move</span><span·class="w">·</span><span·class="n">X3</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y3</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
287 ······</span><span·class="ss">move3</span><span·class="w">·</span><span·class="n">X1</span><span·class="w">·</span><span·class="n">Y1</span><span·class="w">·</span><span·class="n">X2</span><span·class="w">·</span><span·class="n">Y2</span><span·class="w">·</span><span·class="n">X3</span><span·class="w">·</span><span·class="n">Y3</span></code></pre><p>(For·readability,·a·long·transformation·line·can·be·broken·after·<code·class="inline">|</code>287 ······</span><span·class="ss">move3</span><span·class="w">·</span><span·class="n">X1</span><span·class="w">·</span><span·class="n">Y1</span><span·class="w">·</span><span·class="n">X2</span><span·class="w">·</span><span·class="n">Y2</span><span·class="w">·</span><span·class="n">X3</span><span·class="w">·</span><span·class="n">Y3</span></code></pre><p>(For·readability,·a·long·transformation·line·can·be·broken·after·<code·class="inline">|</code>
288 and·<code·class="inline">=&gt;</code>·operators.)</p><p>It·would·also·be·possible·to·define·it·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">move</span><span·class="w">·</span><span·class="n">X1</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y1</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">move</span><span·class="w">·</span><span·class="n">X2</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y2</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">move</span><span·class="w">·</span><span·class="n">X3</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y3</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">288 and·<code·class="inline">=&gt;</code>·operators.)</p><p>It·would·also·be·possible·to·define·it·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">move</span><span·class="w">·</span><span·class="n">X1</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y1</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">move</span><span·class="w">·</span><span·class="n">X2</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y2</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">move</span><span·class="w">·</span><span·class="n">X3</span><span·class="o">=</span><span·class="ss">x</span><span·class="w">·</span><span·class="n">Y3</span><span·class="o">=</span><span·class="ss">y</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
289 ·····</span><span·class="ss">move3</span><span·class="w">·</span><span·class="n">X1</span><span·class="w">·</span><span·class="n">Y1</span><span·class="w">·</span><span·class="n">X2</span><span·class="w">·</span><span·class="n">Y2</span><span·class="w">·</span><span·class="n">X3</span><span·class="w">·</span><span·class="n">Y3</span></code></pre><p>but·in·that·case·it·must·be·defined·before·the·rule·for·<code·class="inline">move2/4</code>289 ·····</span><span·class="ss">move3</span><span·class="w">·</span><span·class="n">X1</span><span·class="w">·</span><span·class="n">Y1</span><span·class="w">·</span><span·class="n">X2</span><span·class="w">·</span><span·class="n">Y2</span><span·class="w">·</span><span·class="n">X3</span><span·class="w">·</span><span·class="n">Y3</span></code></pre><p>but·in·that·case·it·must·be·defined·before·the·rule·for·<code·class="inline">move2/4</code>
290 because·the·first·matching·rule·will·be·applied.</p><p>One·must·be·careful·not·to·create·infinite·loops.··For·example,·if·we290 because·the·first·matching·rule·will·be·applied.</p><p>One·must·be·careful·not·to·create·infinite·loops.··For·example,·if·we
Offset 433, 29 lines modifiedOffset 433, 29 lines modified
433 </span><span·class="ss">i_bs_get_integer_32</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="ss">f</span><span·class="o">?</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">433 </span><span·class="ss">i_bs_get_integer_32</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">·</span><span·class="ss">f</span><span·class="o">?</span><span·class="w">·</span><span·class="ss">x</span><span·class="w">
434 </span><span·class="c1">%endif</span></code></pre><p>The·specific·instruction·<code·class="inline">i_bs_get_integer_32</code>·will·only·be·defined434 </span><span·class="c1">%endif</span></code></pre><p>The·specific·instruction·<code·class="inline">i_bs_get_integer_32</code>·will·only·be·defined
435 on·a·64-bit·machine.</p><p>The·condition·can·be·inverted·by·using·<code·class="inline">%unless</code>·instead·of·<code·class="inline">%if</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%unless·NO_FPE_SIGNALS</span><span·class="w">435 on·a·64-bit·machine.</p><p>The·condition·can·be·inverted·by·using·<code·class="inline">%unless</code>·instead·of·<code·class="inline">%if</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%unless·NO_FPE_SIGNALS</span><span·class="w">
436 </span><span·class="ss">fcheckerror</span><span·class="w">·</span><span·class="ss">p</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">i_fcheckerror</span><span·class="w">436 </span><span·class="ss">fcheckerror</span><span·class="w">·</span><span·class="ss">p</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">i_fcheckerror</span><span·class="w">
437 </span><span·class="ss">i_fcheckerror</span><span·class="w">437 </span><span·class="ss">i_fcheckerror</span><span·class="w">
438 </span><span·class="ss">fclearerror</span><span·class="w">438 </span><span·class="ss">fclearerror</span><span·class="w">
439 </span><span·class="c1">%endif</span></code></pre><p>It·is·also·possible·to·add·an·<code·class="inline">%else</code>·clause:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%if·ARCH_64</span><span·class="w">439 </span><span·class="c1">%endif</span></code></pre><p>It·is·also·possible·to·add·an·<code·class="inline">%else</code>·clause:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%if·ARCH_64</span><span·class="w">
Max diff block lines reached; 248123/289762 bytes (85.63%) of diff not shown.
44.5 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/beamasm.html
    
Offset 145, 26 lines modifiedOffset 145, 26 lines modified
145 </h2>145 </h2>
146 <p>The·code·is·loaded·very·similarly·to·how·it·is·loaded·for·the·interpreter.·Each·beam146 <p>The·code·is·loaded·very·similarly·to·how·it·is·loaded·for·the·interpreter.·Each·beam
147 file·is·parsed·and·then·optimized·through·the·transformations·described·in147 file·is·parsed·and·then·optimized·through·the·transformations·described·in
148 <a·href="beam_makeops.html#defining-transformation-rules">beam_makeops</a>.·The·transformations148 <a·href="beam_makeops.html#defining-transformation-rules">beam_makeops</a>.·The·transformations
149 used·in·BeamAsm·are·much·simpler·than·the·interpreter's,·as·most·of·the149 used·in·BeamAsm·are·much·simpler·than·the·interpreter's,·as·most·of·the
150 transformations·for·the·interpreter·are·done·only·to·eliminate·the·instruction150 transformations·for·the·interpreter·are·done·only·to·eliminate·the·instruction
151 dispatch·overhead.</p><p>Then·each·instruction·is·encoded·using·the·C++·functions·in·the151 dispatch·overhead.</p><p>Then·each·instruction·is·encoded·using·the·C++·functions·in·the
152 <code·class="inline">jit/$ARCH/instr_*.cpp</code>·files.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">void</span><span·class="w">·</span><span·class="n">BeamModuleAssembler</span><span·class="p">:</span><span·class="p">:</span><span·class="nf">emit_is_nonempty_list</span><span·class="p"·data-group-id="0795357600-1">(</span><span·class="ss">const</span><span·class="w">·</span><span·class="n">ArgVal</span><span·class="w">·</span><span·class="err">&amp;</span><span·class="n">Fail</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">const<[·...·truncated·by·diffoscope;·len:·257,·SHA:·2068b852516b9cba55bff4dd76e30fbace45881bf8dc373c5393ba94eca0bbe3·...·]-2">{</span><span·class="w">152 <code·class="inline">jit/$ARCH/instr_*.cpp</code>·files.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">void</span><span·class="w">·</span><span·class="n">BeamModuleAssembler</span><span·class="p">:</span><span·class="p">:</span><span·class="nf">emit_is_nonempty_list</span><span·class="p"·data-group-id="8202224227-1">(</span><span·class="ss">const</span><span·class="w">·</span><span·class="n">ArgVal</span><span·class="w">·</span><span·class="err">&amp;</span><span·class="n">Fail</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">const<[·...·truncated·by·diffoscope;·len:·257,·SHA:·929d8950453c8840f910f3bc710dfbb8f24c41d897a110def7a9f2130b3d631d·...·]-2">{</span><span·class="w">
153 ··</span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">test</span><span·class="p"·data-group-id="0795357600-3">(</span><span·class="nf">getArgRef</span><span·class="p"·data-group-id="0795357600-4">(</span><span·class="n">Src</span><span·class="p"·data-group-id="0795357600-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">imm<[·...·truncated·by·diffoscope;·len:·327,·SHA:·cfbb9481590aca68f544ad5cbaf8d38902651ab6ef21575843140ce9e32244cc·...·]-3">)</span><span·class="p">;</span><span·class="w">153 ··</span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">test</span><span·class="p"·data-group-id="8202224227-3">(</span><span·class="nf">getArgRef</span><span·class="p"·data-group-id="8202224227-4">(</span><span·class="n">Src</span><span·class="p"·data-group-id="8202224227-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">imm<[·...·truncated·by·diffoscope;·len:·327,·SHA:·afdcd1fb27584236960ee3cebcdbb4e9ad6c259ae2945d979dcc7428b088bdcd·...·]-3">)</span><span·class="p">;</span><span·class="w">
154 ··</span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">jne</span><span·class="p"·data-group-id="0795357600-6">(</span><span·class="ss">labels</span><span·class="p"·data-group-id="0795357600-7">[</span><span·class="n">Fail</span><span·class="p">.</span><span·class="nf">getLabel</span><span·class="p"·data-group-id="0795357600-8">(</span><span·class="p"[·...·truncated·by·diffoscope;·len:·132,·SHA:·ff8e3d43fafbfd84b346fa583342b36c1818e7719b3e4dd5817290ad93223e6a·...·]-6">)</span><span·class="p">;</span><span·class="w">154 ··</span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">jne</span><span·class="p"·data-group-id="8202224227-6">(</span><span·class="ss">labels</span><span·class="p"·data-group-id="8202224227-7">[</span><span·class="n">Fail</span><span·class="p">.</span><span·class="nf">getLabel</span><span·class="p"·data-group-id="8202224227-8">(</span><span·class="p"[·...·truncated·by·diffoscope;·len:·132,·SHA:·cd3bea09622bfaae9def513871ec2517d39e033b9dc1ff6b034da50a086873ab·...·]-6">)</span><span·class="p">;</span><span·class="w">
155 </span><span·class="p"·data-group-id="0795357600-2">}</span></code></pre><p><a·href="https://github.com/asmjit/asmjit">asmjit</a>·provides·a·fairly·straightforward155 </span><span·class="p"·data-group-id="8202224227-2">}</span></code></pre><p><a·href="https://github.com/asmjit/asmjit">asmjit</a>·provides·a·fairly·straightforward
156 mapping·from·a·C++·function·call·to·the·x86·assembly·instruction.·The·above156 mapping·from·a·C++·function·call·to·the·x86·assembly·instruction.·The·above
157 instruction·tests·if·the·value·in·the·<code·class="inline">Src</code>·register·is·a·non-empty·list·and·if157 instruction·tests·if·the·value·in·the·<code·class="inline">Src</code>·register·is·a·non-empty·list·and·if
158 it·is·not·then·it·jumps·to·the·fail·label.</p><p>For·comparison,·the·interpreter·has·8·combinations·and·specializations·of158 it·is·not·then·it·jumps·to·the·fail·label.</p><p>For·comparison,·the·interpreter·has·8·combinations·and·specializations·of
159 this·implementation·to·minimize·the·instruction·dispatch·overhead·for159 this·implementation·to·minimize·the·instruction·dispatch·overhead·for
160 common·patterns.</p><p>The·original·register·allocation·done·by·the·Erlang·compiler·is·used·to·manage·the160 common·patterns.</p><p>The·original·register·allocation·done·by·the·Erlang·compiler·is·used·to·manage·the
161 liveness·of·values·and·the·physical·registers·are·statically·allocated·to·keep161 liveness·of·values·and·the·physical·registers·are·statically·allocated·to·keep
162 the·necessary·process·state.·At·the·moment·this·is·the·static·register162 the·necessary·process·state.·At·the·moment·this·is·the·static·register
163 allocation·on·x86-64:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">rbx</span><span·class="p">:</span><span·class="w">·</span><span·class="n">ErtsSchedulerRegisters</span><span·class="w">·</span><span·class="nf">struct</span><span·class="w">·</span><span·class="p"·data-group-id="6215542840-1">(</span><span·class="ss">contains</span><span·class="w">·</span><span·class="ss">x</span><span·class="o">/</span><span·class="nb">float</span><span·class="w">·</span><span·class="ss">registers</span><span·class="w">·</span><span·class="ow">an[·...·truncated·by·diffoscope;·len:·156,·SHA:·3c63806256875ceb25c52a93e73771c9c7cb63e6677f6c082b6124543f350bb6·...·]0-1">)</span><span·class="w">163 allocation·on·x86-64:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">rbx</span><span·class="p">:</span><span·class="w">·</span><span·class="n">ErtsSchedulerRegisters</span><span·class="w">·</span><span·class="nf">struct</span><span·class="w">·</span><span·class="p"·data-group-id="7112980530-1">(</span><span·class="ss">contains</span><span·class="w">·</span><span·class="ss">x</span><span·class="o">/</span><span·class="nb">float</span><span·class="w">·</span><span·class="ss">registers</span><span·class="w">·</span><span·class="ow">an[·...·truncated·by·diffoscope;·len:·156,·SHA:·d6ab7f4f127ff97c26c5da7f52da392093c188c241b67451c326dd7b07e79d3f·...·]0-1">)</span><span·class="w">
164 </span><span·class="nc">rbp</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Current</span><span·class="w">·</span><span·class="ss">frame</span><span·class="w">·</span><span·class="ss">pointer</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="err">`</span><span·class="ss">perf</span><span·class="err">`</span><span·class="w">·</span><span·class="ss">support</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">enabled</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">otherwise</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">164 </span><span·class="nc">rbp</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Current</span><span·class="w">·</span><span·class="ss">frame</span><span·class="w">·</span><span·class="ss">pointer</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="err">`</span><span·class="ss">perf</span><span·class="err">`</span><span·class="w">·</span><span·class="ss">support</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">enabled</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">otherwise</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">
165 ·····</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">an</span><span·class="w">·</span><span·class="ss">optional</span><span·class="w">·</span><span·class="ss">save</span><span·class="w">·</span><span·class="ss">slot</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">stack</span><span·class="w">·</span><span·class="ss">pointer</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="ss">executing</span><span·class="w">·</span><span·class="n">C</span><span·class="w">165 ·····</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">an</span><span·class="w">·</span><span·class="ss">optional</span><span·class="w">·</span><span·class="ss">save</span><span·class="w">·</span><span·class="ss">slot</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">stack</span><span·class="w">·</span><span·class="ss">pointer</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="ss">executing</span><span·class="w">·</span><span·class="n">C</span><span·class="w">
166 ·····</span><span·class="ss">code</span><span·class="p">.</span><span·class="w">166 ·····</span><span·class="ss">code</span><span·class="p">.</span><span·class="w">
167 </span><span·class="nc">r12</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Active</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">index</span><span·class="w">167 </span><span·class="nc">r12</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Active</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">index</span><span·class="w">
168 </span><span·class="nc">r13</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Current</span><span·class="w">·</span><span·class="ss">running</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">168 </span><span·class="nc">r13</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Current</span><span·class="w">·</span><span·class="ss">running</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">
169 </span><span·class="nc">r14</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Remaining</span><span·class="w">·</span><span·class="ss">reductions</span><span·class="w">169 </span><span·class="nc">r14</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Remaining</span><span·class="w">·</span><span·class="ss">reductions</span><span·class="w">
170 </span><span·class="nc">r15</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">heap</span><span·class="w">·</span><span·class="ss">pointer</span></code></pre><p>Note·that·all·of·these·are·callee·save·registers·under·the·System·V·and·Windows170 </span><span·class="nc">r15</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">heap</span><span·class="w">·</span><span·class="ss">pointer</span></code></pre><p>Note·that·all·of·these·are·callee·save·registers·under·the·System·V·and·Windows
Offset 183, 21 lines modifiedOffset 183, 21 lines modified
183 shared·and·only·the·arguments·to·the·instructions·vary.·Using·as·little·memory·as183 shared·and·only·the·arguments·to·the·instructions·vary.·Using·as·little·memory·as
184 possible·has·many·advantages;·less·memory·is·used,·loading·time·decreases,184 possible·has·many·advantages;·less·memory·is·used,·loading·time·decreases,
185 higher·cache·hit-rate.</p><p>In·BeamAsm·we·need·to·achieve·something·similar·since·the·load-time·of·a·module185 higher·cache·hit-rate.</p><p>In·BeamAsm·we·need·to·achieve·something·similar·since·the·load-time·of·a·module
186 scales·almost·linearly·with·the·amount·of·memory·it·uses.·Early·BeamAsm·prototypes186 scales·almost·linearly·with·the·amount·of·memory·it·uses.·Early·BeamAsm·prototypes
187 used·about·double·the·amount·of·memory·for·code·as·the·interpreter,·while·current187 used·about·double·the·amount·of·memory·for·code·as·the·interpreter,·while·current
188 versions·use·about·10%·more.·How·was·this·achieved?</p><p>In·BeamAsm·we·heavily·use·shared·code·fragments·to·try·to·emit·as·much·code·as188 versions·use·about·10%·more.·How·was·this·achieved?</p><p>In·BeamAsm·we·heavily·use·shared·code·fragments·to·try·to·emit·as·much·code·as
189 possible·as·global·shared·fragments·instead·of·duplicating·the·code·unnecessarily.189 possible·as·global·shared·fragments·instead·of·duplicating·the·code·unnecessarily.
190 For·instance,·the·return·instruction·looks·something·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Label</span><span·class="w">·</span><span·class="ss">yield</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">newLabel</span><span·class="p"·data-group-id="3076813147-1">(</span><span·class="p"·data-group-id="3076813147-1">)</span><span·class="p">;</span><span·class="w">190 For·instance,·the·return·instruction·looks·something·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Label</span><span·class="w">·</span><span·class="ss">yield</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">newLabel</span><span·class="p"·data-group-id="9069382550-1">(</span><span·class="p"·data-group-id="9069382550-1">)</span><span·class="p">;</span><span·class="w">
  
191 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Decrement</span><span·class="w">·</span><span·class="ss">reduction</span><span·class="w">·</span><span·class="ss">counter</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">191 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Decrement</span><span·class="w">·</span><span·class="ss">reduction</span><span·class="w">·</span><span·class="ss">counter</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
192 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">dec</span><span·class="p"·data-group-id="3076813147-2">(</span><span·class="n">FCALLS</span><span·class="p"·data-group-id="3076813147-2">)</span><span·class="p">;</span><span·class="w">192 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">dec</span><span·class="p"·data-group-id="9069382550-2">(</span><span·class="n">FCALLS</span><span·class="p"·data-group-id="9069382550-2">)</span><span·class="p">;</span><span·class="w">
193 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">If</span><span·class="w">·</span><span·class="n">FCALLS</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">jump</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">yield</span><span·class="o">-</span><span·class="ss">on</span><span·class="o">-</span><span·class="ss">return</span><span·class="w">·</span><span·class="ss">fragment</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">193 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">If</span><span·class="w">·</span><span·class="n">FCALLS</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">jump</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">yield</span><span·class="o">-</span><span·class="ss">on</span><span·class="o">-</span><span·class="ss">return</span><span·class="w">·</span><span·class="ss">fragment</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
194 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">jl</span><span·class="p"·data-group-id="3076813147-3">(</span><span·class="nf">resolve_fragment</span><span·class="p"·data-group-id="3076813147-4">(</span><span·class="ss">ga</span><span·class="p">-&gt;</span><span·class="nf">get_dispatch_return</span><span·class="p"·data-group-id="3076813147-5"[·...·truncated·by·diffoscope;·len:·156,·SHA:·8a1fe119a581058abf0c8196fff35e1384ed4cdfd06186616cf0170fbfc4955e·...·]-3">)</span><span·class="p">;</span><span·class="w">194 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">jl</span><span·class="p"·data-group-id="9069382550-3">(</span><span·class="nf">resolve_fragment</span><span·class="p"·data-group-id="9069382550-4">(</span><span·class="ss">ga</span><span·class="p">-&gt;</span><span·class="nf">get_dispatch_return</span><span·class="p"·data-group-id="9069382550-5"[·...·truncated·by·diffoscope;·len:·156,·SHA:·1bc42b88e4cd36a17df1b8f72724149baa6d3826a2b735ad14313c9533ac5bc0·...·]-3">)</span><span·class="p">;</span><span·class="w">
195 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">ret</span><span·class="p"·data-group-id="3076813147-6">(</span><span·class="p"·data-group-id="3076813147-6">)</span><span·class="p">;</span></code></pre><p>The·code·above·is·not·exactly·what·is·emitted,·but·close·enough.·The·thing·to·note195 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">ret</span><span·class="p"·data-group-id="9069382550-6">(</span><span·class="p"·data-group-id="9069382550-6">)</span><span·class="p">;</span></code></pre><p>The·code·above·is·not·exactly·what·is·emitted,·but·close·enough.·The·thing·to·note
196 is·that·the·code·for·doing·the·context·switch·is·never·emitted.·Instead,·we·jump196 is·that·the·code·for·doing·the·context·switch·is·never·emitted.·Instead,·we·jump
197 to·a·global·fragment·that·all·return·instructions·share.·This·greatly·reduces197 to·a·global·fragment·that·all·return·instructions·share.·This·greatly·reduces
198 the·amount·of·code·that·has·to·be·emitted·for·each·module.</p><h2·id="running-erlang-code"·class="section-heading">198 the·amount·of·code·that·has·to·be·emitted·for·each·module.</p><h2·id="running-erlang-code"·class="section-heading">
199 ··<a·href="#running-erlang-code"·class="hover-link">199 ··<a·href="#running-erlang-code"·class="hover-link">
200 ····<i·class="ri-link-m"·aria-hidden="true"></i>200 ····<i·class="ri-link-m"·aria-hidden="true"></i>
201 ··</a>201 ··</a>
202 ··<span·class="text">Running·Erlang·code</span>202 ··<span·class="text">Running·Erlang·code</span>
Offset 239, 43 lines modifiedOffset 239, 43 lines modified
239 ··<a·href="#running-c-code"·class="hover-link">239 ··<a·href="#running-c-code"·class="hover-link">
240 ····<i·class="ri-link-m"·aria-hidden="true"></i>240 ····<i·class="ri-link-m"·aria-hidden="true"></i>
241 ··</a>241 ··</a>
242 ··<span·class="text">Running·C·code</span>242 ··<span·class="text">Running·C·code</span>
243 </h2>243 </h2>
244 <p>As·Erlang·stacks·can·be·very·small,·we·have·to·switch·over·to·a·different·stack244 <p>As·Erlang·stacks·can·be·very·small,·we·have·to·switch·over·to·a·different·stack
245 when·we·need·to·execute·C·code·(which·may·expect·a·much·larger·stack).·This·is245 when·we·need·to·execute·C·code·(which·may·expect·a·much·larger·stack).·This·is
246 done·through·<code·class="inline">emit_enter_runtime</code>·and·<code·class="inline">emit_leave_runtime</code>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">mov_arg</span><span·class="p"·data-group-id="6951239024-1">(</span><span·class="n">ARG4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NumFree</span><span·class="p"·data-group-id="6951239024-1">)</span><span·class="p">;</span><span·class="w">246 done·through·<code·class="inline">emit_enter_runtime</code>·and·<code·class="inline">emit_leave_runtime</code>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">mov_arg</span><span·class="p"·data-group-id="5892858871-1">(</span><span·class="n">ARG4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NumFree</span><span·class="p"·data-group-id="5892858871-1">)</span><span·class="p">;</span><span·class="w">
  
247 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Move</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="ss">stack</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="ss">swap</span><span·class="w">·</span><span·class="ss">out</span><span·class="w">·</span><span·class="ss">our</span><span·class="w">·</span><span·class="ss">current</span><span·class="w">·</span><span·class="ss">reductions</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stack</span><span·class="o">-</span><span·class="p">,</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">247 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Move</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="ss">stack</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="ss">swap</span><span·class="w">·</span><span·class="ss">out</span><span·class="w">·</span><span·class="ss">our</span><span·class="w">·</span><span·class="ss">current</span><span·class="w">·</span><span·class="ss">reductions</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stack</span><span·class="o">-</span><span·class="p">,</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">
248 ·</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">heap</span><span·class="w">·</span><span·class="ss">pointer</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">·</span><span·class="ss">structure</span><span·class="p">.</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">248 ·</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">heap</span><span·class="w">·</span><span·class="ss">pointer</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">·</span><span·class="ss">structure</span><span·class="p">.</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
249 </span><span·class="ss">emit_enter_runtime</span><span·class="o">&lt;</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eReductions</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eStack</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eHeap</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6951239024-2">(</span><span·class="p"·data-group-id="6951239024-2">)</span><span·class="p">;</span><span·class="w">249 </span><span·class="ss">emit_enter_runtime</span><span·class="o">&lt;</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eReductions</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eStack</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eHeap</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5892858871-2">(</span><span·class="p"·data-group-id="5892858871-2">)</span><span·class="p">;</span><span·class="w">
  
250 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">mov</span><span·class="p"·data-group-id="6951239024-3">(</span><span·class="n">ARG1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c_p</span><span·class="p"·data-group-id="6951239024-3">)</span><span·class="p">;</span><span·class="w">250 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">mov</span><span·class="p"·data-group-id="5892858871-3">(</span><span·class="n">ARG1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c_p</span><span·class="p"·data-group-id="5892858871-3">)</span><span·class="p">;</span><span·class="w">
251 </span><span·class="nf">load_x_reg_array</span><span·class="p"·data-group-id="6951239024-4">(</span><span·class="n">ARG2</span><span·class="p"·data-group-id="6951239024-4">)</span><span·class="p">;</span><span·class="w">251 </span><span·class="nf">load_x_reg_array</span><span·class="p"·data-group-id="5892858871-4">(</span><span·class="n">ARG2</span><span·class="p"·data-group-id="5892858871-4">)</span><span·class="p">;</span><span·class="w">
252 </span><span·class="nf">make_move_patch</span><span·class="p"·data-group-id="6951239024-5">(</span><span·class="n">ARG3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">lambdas</span><span·class="p"·data-group-id="6951239024-6">[</span><span·class="n">Fun</span><span·class="p">.</span><span·class="nf">getValue[·...·truncated·by·diffoscope;·len:·262,·SHA:·02e46f0b68e9fd2861a0249e0427fac06e22e9516203931216ad833f91d24508·...·]-5">)</span><span·class="p">;</span><span·class="w">252 </span><span·class="nf">make_move_patch</span><span·class="p"·data-group-id="5892858871-5">(</span><span·class="n">ARG3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">lambdas</span><span·class="p"·data-group-id="5892858871-6">[</span><span·class="n">Fun</span><span·class="p">.</span><span·class="nf">getValue[·...·truncated·by·diffoscope;·len:·262,·SHA:·757d46c5dc4e4f02ebb93c091b3987c0e1a747582368a5ead201d3140e93c725·...·]-5">)</span><span·class="p">;</span><span·class="w">
  
253 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Call</span><span·class="w">·</span><span·class="err">`</span><span·class="ss">new_fun</span><span·class="err">`</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">asserting</span><span·class="w">·</span><span·class="ss">that</span><span·class="w">·</span><span·class="ss">we</span><span·class="err">&#39;</span><span·class="ss">re</span><span·class="w">·</span><span·class="ss">on</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="ss">stack</span><span·class="p">.</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">253 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Call</span><span·class="w">·</span><span·class="err">`</span><span·class="ss">new_fun</span><span·class="err">`</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">asserting</span><span·class="w">·</span><span·class="ss">that</span><span·class="w">·</span><span·class="ss">we</span><span·class="err">&#39;</span><span·class="ss">re</span><span·class="w">·</span><span·class="ss">on</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="ss">stack</span><span·class="p">.</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
254 </span><span·class="ss">runtime_call</span><span·class="o">&lt;</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6951239024-8">(</span><span·class="ss">new_fun</span><span·class="p"·data-group-id="6951239024-8">)</span><span·class="p">;</span><span·class="w">254 </span><span·class="ss">runtime_call</span><span·class="o">&lt;</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5892858871-8">(</span><span·class="ss">new_fun</span><span·class="p"·data-group-id="5892858871-8">)</span><span·class="p">;</span><span·class="w">
  
255 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Move</span><span·class="w">·</span><span·class="ss">back</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="ss">stack</span><span·class="p">,</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="ss">read</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">updated</span><span·class="w">·</span><span·class="ss">values</span><span·class="w">·</span><span·class="ss">from</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">255 </span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Move</span><span·class="w">·</span><span·class="ss">back</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">C</span><span·class="w">·</span><span·class="ss">stack</span><span·class="p">,</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="ss">read</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">updated</span><span·class="w">·</span><span·class="ss">values</span><span·class="w">·</span><span·class="ss">from</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">
256 ·</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">structure</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">256 ·</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">structure</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
257 </span><span·class="ss">emit_leave_runtime</span><span·class="o">&lt;</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eReductions</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eStack</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eHeap</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6951239024-9">(</span><span·class="p"·data-group-id="6951239024-9">)</span><span·class="p">;</span><span·class="w">257 </span><span·class="ss">emit_leave_runtime</span><span·class="o">&lt;</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eReductions</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eStack</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Update</span><span·class="p">:</span><span·class="p">:</span><span·class="ss">eHeap</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5892858871-9">(</span><span·class="p"·data-group-id="5892858871-9">)</span><span·class="p">;</span><span·class="w">
  
258 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">mov</span><span·class="p"·data-group-id="6951239024-10">(</span><span·class="nf">getXRef</span><span·class="p"·data-group-id="6951239024-11">(</span><span·class="mi">0</span><span·class="p"·data-group-id="6951239024-11">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RET</[·...·truncated·by·diffoscope;·len:·46,·SHA:·399d7e6e9028ec2e53465ed90d9b190f4129a05520637e6f665e433dad95fe9b·...·]-10">)</span><span·class="p">;</span></code></pre><p>All·combinations·of·the·<code·class="inline">Update</code>·constants·are·legal,·but·the·ones·given·to258 </span><span·class="ss">a</span><span·class="p">.</span><span·class="nf">mov</span><span·class="p"·data-group-id="5892858871-10">(</span><span·class="nf">getXRef</span><span·class="p"·data-group-id="5892858871-11">(</span><span·class="mi">0</span><span·class="p"·data-group-id="5892858871-11">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RET</[·...·truncated·by·diffoscope;·len:·46,·SHA:·5da64a9c1d20f424ce6bb2d71f5a4b9154713dc7427ea6e80641b8d8c3641b66·...·]-10">)</span><span·class="p">;</span></code></pre><p>All·combinations·of·the·<code·class="inline">Update</code>·constants·are·legal,·but·the·ones·given·to
259 <code·class="inline">emit_leave_runtime</code>·<em>must</em>·be·the·same·as·those·given·to·<code·class="inline">emit_enter_runtime</code>.</p><h2·id="tracing-and-nif-loading"·class="section-heading">259 <code·class="inline">emit_leave_runtime</code>·<em>must</em>·be·the·same·as·those·given·to·<code·class="inline">emit_enter_runtime</code>.</p><h2·id="tracing-and-nif-loading"·class="section-heading">
260 ··<a·href="#tracing-and-nif-loading"·class="hover-link">260 ··<a·href="#tracing-and-nif-loading"·class="hover-link">
261 ····<i·class="ri-link-m"·aria-hidden="true"></i>261 ····<i·class="ri-link-m"·aria-hidden="true"></i>
262 ··</a>262 ··</a>
263 ··<span·class="text">Tracing·and·NIF·Loading</span>263 ··<span·class="text">Tracing·and·NIF·Loading</span>
264 </h2>264 </h2>
265 <p>To·make·tracing·and·NIF·loading·work·there·needs·to·be·a·way·to·intercept265 <p>To·make·tracing·and·NIF·loading·work·there·needs·to·be·a·way·to·intercept
266 any·function·call.·In·the·interpreter,·this·is·done·by·rewriting·the·loaded266 any·function·call.·In·the·interpreter,·this·is·done·by·rewriting·the·loaded
267 BEAM·code,·but·this·is·more·complicated·in·BeamAsm·as·we·want·to·have·a·fast267 BEAM·code,·but·this·is·more·complicated·in·BeamAsm·as·we·want·to·have·a·fast
268 and·compact·way·to·do·this.·This·is·solved·by·emitting·the·code·below·at·the268 and·compact·way·to·do·this.·This·is·solved·by·emitting·the·code·below·at·the
269 start·of·each·function·(x86·variant·below):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">0</span><span·class="nc">x0</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">short</span><span·class="w">·</span><span·class="ss">jmp</span><span·class="w">·</span><span·class="mi">6</span><span·class="w">·</span><span·class="p"·data-group-id="6188064906-1">(</span><span·class="ss">address</span><span·class="w">·</span><span·class="mi">0</span><span·class="ss">x8</span><span·class="p"·data-group-id="6188064906-1">)</span><span·class="w">269 start·of·each·function·(x86·variant·below):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">0</span><span·class="nc">x0</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">short</span><span·class="w">·</span><span·class="ss">jmp</span><span·class="w">·</span><span·class="mi">6</span><span·class="w">·</span><span·class="p"·data-group-id="9148141902-1">(</span><span·class="ss">address</span><span·class="w">·</span><span·class="mi">0</span><span·class="ss">x8</span><span·class="p"·data-group-id="9148141902-1">)</span><span·class="w">
270 ··</span><span·class="mi">0</span><span·class="nc">x2</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nop</span><span·class="w">270 ··</span><span·class="mi">0</span><span·class="nc">x2</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nop</span><span·class="w">
271 ··</span><span·class="mi">0</span><span·class="nc">x3</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">relative</span><span·class="w">·</span><span·class="ss">near</span><span·class="w">·</span><span·class="ss">call</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">shared</span><span·class="w">·</span><span·class="ss">breakpoint</span><span·class="w">·</span><span·class="ss">fragment</span><span·class="w">271 ··</span><span·class="mi">0</span><span·class="nc">x3</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">relative</span><span·class="w">·</span><span·class="ss">near</span><span·class="w">·</span><span·class="ss">call</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">shared</span><span·class="w">·</span><span·class="ss">breakpoint</span><span·class="w">·</span><span·class="ss">fragment</span><span·class="w">
272 ··</span><span·class="mi">0</span><span·class="nc">x8</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">actual</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">function</span></code></pre><p>When·code·starts·to·execute·it·will·simply·see·the·<code·class="inline">short·jmp·6</code>·instruction272 ··</span><span·class="mi">0</span><span·class="nc">x8</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">actual</span><span·class="w">·</span><span·class="ss">code</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">function</span></code></pre><p>When·code·starts·to·execute·it·will·simply·see·the·<code·class="inline">short·jmp·6</code>·instruction
273 which·skips·the·prologue·and·starts·to·execute·the·code·directly.</p><p>When·we·want·to·enable·a·certain·breakpoint·we·set·the·jmp·target·to·be·1,273 which·skips·the·prologue·and·starts·to·execute·the·code·directly.</p><p>When·we·want·to·enable·a·certain·breakpoint·we·set·the·jmp·target·to·be·1,
274 which·means·it·will·land·on·the·call·to·the·shared·breakpoint·fragment.·This274 which·means·it·will·land·on·the·call·to·the·shared·breakpoint·fragment.·This
275 fragment·checks·the·current·<code·class="inline">breakpoint_flag</code>·stored·in·the·ErtsCodeInfo·of275 fragment·checks·the·current·<code·class="inline">breakpoint_flag</code>·stored·in·the·ErtsCodeInfo·of
276 this·function,·and·then·calls·<code·class="inline">erts_call_nif_early</code>·and276 this·function,·and·then·calls·<code·class="inline">erts_call_nif_early</code>·and
Offset 289, 31 lines modifiedOffset 289, 31 lines modified
289 ··<span·class="text">Updating·code</span>289 ··<span·class="text">Updating·code</span>
290 </h3>290 </h3>
291 <p>Because·many·environments·enforce·<a·href="https://en.wikipedia.org/wiki/W%5EX"·title="">W^X</a>·it's·not·always·possible·to·write291 <p>Because·many·environments·enforce·<a·href="https://en.wikipedia.org/wiki/W%5EX"·title="">W^X</a>·it's·not·always·possible·to·write
292 directly·to·the·code·pages.·Because·of·this·we·map·code·twice:·once·with·an292 directly·to·the·code·pages.·Because·of·this·we·map·code·twice:·once·with·an
293 executable·page·and·once·with·a·writable·page.·Since·they're·backed·by·the293 executable·page·and·once·with·a·writable·page.·Since·they're·backed·by·the
294 same·memory,·writes·to·the·writable·page·appear·magically·in·the·executable294 same·memory,·writes·to·the·writable·page·appear·magically·in·the·executable
295 one.</p><p>The·<code·class="inline">erts_writable_code_ptr</code>·function·can·be·used·to·get·writable·pointers295 one.</p><p>The·<code·class="inline">erts_writable_code_ptr</code>·function·can·be·used·to·get·writable·pointers
296 given·a·module·instance,·provided·that·it·has·been·unsealed·first:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">for</span><span·class="w">·</span><span·class="p"·data-group-id="3564360055-1">(</span><span·class="ss">i</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">;</span><span·class="w">·</span><span·class="ss">i</span><span·class="w">·</span><span·class="o"[·...·truncated·by·diffoscope;·len:·277,·SHA:·96315ef9158241d012348de51a872fd9fac248b22d047606a7451632e0cbd74d·...·]-2">{</span><span·class="w">296 given·a·module·instance,·provided·that·it·has·been·unsealed·first:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">for</span><span·class="w">·</span><span·class="p"·data-group-id="1741129757-1">(</span><span·class="ss">i</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">;</span><span·class="w">·</span><span·class="ss">i</span><span·class="w">·</span><span·class="o"[·...·truncated·by·diffoscope;·len:·277,·SHA:·5e8ebe9291363135c91d053c989d7ddf3b3add7fa51ea8e31ae07444a23485a5·...·]-2">{</span><span·class="w">
297 ····</span><span·class="ss">const</span><span·class="w">·</span><span·class="n">ErtsCodeInfo</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">ci_exec</span><span·class="p">;</span><span·class="w">297 ····</span><span·class="ss">const</span><span·class="w">·</span><span·class="n">ErtsCodeInfo</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">ci_exec</span><span·class="p">;</span><span·class="w">
298 ····</span><span·class="n">ErtsCodeInfo</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">ci_rw</span><span·class="p">;</span><span·class="w">298 ····</span><span·class="n">ErtsCodeInfo</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">ci_rw</span><span·class="p">;</span><span·class="w">
299 ····</span><span·class="ss">void</span><span·class="w">·</span><span·class="o">*</span><span·class="ss">w_ptr</span><span·class="p">;</span><span·class="w">299 ····</span><span·class="ss">void</span><span·class="w">·</span><span·class="o">*</span><span·class="ss">w_ptr</span><span·class="p">;</span><span·class="w">
  
300 ····</span><span·class="nf">erts_unseal_module</span><span·class="p"·data-group-id="3564360055-3">(</span><span·class="err">&amp;</span><span·class="ss">modp</span><span·class="p">-&gt;</span><span·class="ss">curr</span><span·class="p"·data-group-id="3564360055-3">)</span><span·class="p">;</span><span·class="w">300 ····</span><span·class="nf">erts_unseal_module</span><span·class="p"·data-group-id="1741129757-3">(</span><span·class="err">&amp;</span><span·class="ss">modp</span><span·class="p">-&gt;</span><span·class="ss">curr</span><span·class="p"·data-group-id="1741129757-3">)</span><span·class="p">;</span><span·class="w">
  
301 ····</span><span·class="ss">ci_exec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">code_hdr</span><span·class="p">-&gt;</span><span·class="ss">functions</span><span·class="p"·data-group-id="3564360055-4">[</span><span·class="ss">i</span><span·class="p"·data-group-id="3564360055-4">]</span><span·class="p">;</span><span·class="w">301 ····</span><span·class="ss">ci_exec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">code_hdr</span><span·class="p">-&gt;</span><span·class="ss">functions</span><span·class="p"·data-group-id="1741129757-4">[</span><span·class="ss">i</span><span·class="p"·data-group-id="1741129757-4">]</span><span·class="p">;</span><span·class="w">
302 ····</span><span·class="ss">w_ptr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">erts_writable_code_ptr</span><span·class="p"·data-group-id="3564360055-5">(</span><span·class="err">&amp;</span><span·class="ss">modp</span><span·class="p">-&gt;</span><span·class="ss">curr</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ci_exec</span><span·class="p"·data-group-id="3564360055-5">)</span><span·class="p">;</span><span·class="w">302 ····</span><span·class="ss">w_ptr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">erts_writable_code_ptr</span><span·class="p"·data-group-id="1741129757-5">(</span><span·class="err">&amp;</span><span·class="ss">modp</span><span·class="p">-&gt;</span><span·class="ss">curr</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ci_exec</span><span·class="p"·data-group-id="1741129757-5">)</span><span·class="p">;</span><span·class="w">
303 ····</span><span·class="ss">ci_rw</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3564360055-6">(</span><span·class="n">ErtsCodeInfo</span><span·class="o">*</span><span·class="p"·data-group-id="3564360055-6">)</span><span·class="ss">w_ptr</span><span·class="p">;</span><span·class="w">303 ····</span><span·class="ss">ci_rw</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1741129757-6">(</span><span·class="n">ErtsCodeInfo</span><span·class="o">*</span><span·class="p"·data-group-id="1741129757-6">)</span><span·class="ss">w_ptr</span><span·class="p">;</span><span·class="w">
  
304 ····</span><span·class="nf">uninstall_breakpoint</span><span·class="p"·data-group-id="3564360055-7">(</span><span·class="ss">ci_rw</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ci_exec</span><span·class="p"·data-group-id="3564360055-7">)</span><span·class="p">;</span><span·class="w">304 ····</span><span·class="nf">uninstall_breakpoint</span><span·class="p"·data-group-id="1741129757-7">(</span><span·class="ss">ci_rw</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ci_exec</span><span·class="p"·data-group-id="1741129757-7">)</span><span·class="p">;</span><span·class="w">
305 ····</span><span·class="nf">consolidate_bp_data</span><span·class="p"·data-group-id="3564360055-8">(</span><span·class="ss">modp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ci_rw</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="3564360055-8">)</span><span·class="p">;</span><span·class="w">305 ····</span><span·class="nf">consolidate_bp_data</span><span·class="p"·data-group-id="1741129757-8">(</span><span·class="ss">modp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ci_rw</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1741129757-8">)</span><span·class="p">;</span><span·class="w">
306 ····</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="3564360055-9">(</span><span·class="ss">ci_rw</span><span·class="p">-&gt;</span><span·class="ss">gen_bp</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">NULL</span><span·class="p"·data-group-id="3564360055-9">)</span><span·class="p">;</span><span·class="w">306 ····</span><span·class="n">ASSERT</span><span·class="p"·data-group-id="1741129757-9">(</span><span·class="ss">ci_rw</span><span·class="p">-&gt;</span><span·class="ss">gen_bp</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">NULL</span><span·class="p"·data-group-id="1741129757-9">)</span><span·class="p">;</span><span·class="w">
  
307 ····</span><span·class="nf">erts_seal_module</span><span·class="p"·data-group-id="3564360055-10">(</span><span·class="err">&amp;</span><span·class="ss">modp</span><span·class="p">-&gt;</span><span·class="ss">curr</span><span·class="p"·data-group-id="3564360055-10">)</span><span·class="p">;</span><span·class="w">307 ····</span><span·class="nf">erts_seal_module</span><span·class="p"·data-group-id="1741129757-10">(</span><span·class="err">&amp;</span><span·class="ss">modp</span><span·class="p">-&gt;</span><span·class="ss">curr</span><span·class="p"·data-group-id="1741129757-10">)</span><span·class="p">;</span><span·class="w">
308 </span><span·class="p"·data-group-id="3564360055-2">}</span></code></pre><p>Without·the·module·instance·there's·no·reliable·way·to·figure·out·the·writable308 </span><span·class="p"·data-group-id="1741129757-2">}</span></code></pre><p>Without·the·module·instance·there's·no·reliable·way·to·figure·out·the·writable
309 address·of·a·code·page,·and·we·rely·on·<em>address·space·layout·randomization</em>309 address·of·a·code·page,·and·we·rely·on·<em>address·space·layout·randomization</em>
310 (ASLR)·to·make·it·difficult·to·guess.·On·some·platforms,·security·is·further310 (ASLR)·to·make·it·difficult·to·guess.·On·some·platforms,·security·is·further
311 enhanced·by·protecting·the·writable·area·from·writes·until·the·module·has·been311 enhanced·by·protecting·the·writable·area·from·writes·until·the·module·has·been
312 unsealed·by·<code·class="inline">erts_unseal_module</code>.</p><h3·id="export-tracing"·class="section-heading">312 unsealed·by·<code·class="inline">erts_unseal_module</code>.</p><h3·id="export-tracing"·class="section-heading">
313 ··<a·href="#export-tracing"·class="hover-link">313 ··<a·href="#export-tracing"·class="hover-link">
314 ····<i·class="ri-link-m"·aria-hidden="true"></i>314 ····<i·class="ri-link-m"·aria-hidden="true"></i>
315 ··</a>315 ··</a>
Offset 393, 15 lines modifiedOffset 393, 15 lines modified
393 </span><span·class="ss">perf</span><span·class="w">·</span><span·class="ss">script</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">out</span><span·class="p">.</span><span·class="ss">perf</span><span·class="w">393 </span><span·class="ss">perf</span><span·class="w">·</span><span·class="ss">script</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">out</span><span·class="p">.</span><span·class="ss">perf</span><span·class="w">
394 </span><span·class="p">#</span><span·class="p">#</span><span·class="w">·</span><span·class="ss">run</span><span·class="w">·</span><span·class="ss">stackcollapse</span><span·class="w">394 </span><span·class="p">#</span><span·class="p">#</span><span·class="w">·</span><span·class="ss">run</span><span·class="w">·</span><span·class="ss">stackcollapse</span><span·class="w">
Max diff block lines reached; 5280/45417 bytes (11.63%) of diff not shown.
3.31 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/codeloading.html
    
Offset 163, 16 lines modifiedOffset 163, 16 lines modified
163 only·be·done·by·one·loader·process·at·a·time.·A·second·loader·process163 only·be·done·by·one·loader·process·at·a·time.·A·second·loader·process
164 trying·to·enter·finishing·phase·will·be·suspended·until·the·first164 trying·to·enter·finishing·phase·will·be·suspended·until·the·first
165 loader·is·done.·This·will·only·block·the·process,·the·scheduler·is165 loader·is·done.·This·will·only·block·the·process,·the·scheduler·is
166 free·to·schedule·other·work·while·the·second·loader·is·waiting.·(See166 free·to·schedule·other·work·while·the·second·loader·is·waiting.·(See
167 <code·class="inline">erts_try_seize_code_load_permission</code>·and167 <code·class="inline">erts_try_seize_code_load_permission</code>·and
168 <code·class="inline">erts_release_code_load_permission</code>).</p><p>The·ability·to·prepare·several·modules·in·parallel·is·not·currently168 <code·class="inline">erts_release_code_load_permission</code>).</p><p>The·ability·to·prepare·several·modules·in·parallel·is·not·currently
169 used·as·almost·all·code·loading·is·serialized·by·the·code_server169 used·as·almost·all·code·loading·is·serialized·by·the·code_server
170 process.·The·BIF·interface·is·however·prepared·for·this.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">prepare_loading</span><span·class="p"·data-group-id="2440865847-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Code</span><span·class="p"·data-group-id="2440865847-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">LoaderState</span><span·class="w">170 process.·The·BIF·interface·is·however·prepared·for·this.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">prepare_loading</span><span·class="p"·data-group-id="9362566631-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Code</span><span·class="p"·data-group-id="9362566631-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">LoaderState</span><span·class="w">
171 ··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">finish_loading</span><span·class="p"·data-group-id="2440865847-2">(</span><span·class="p"·data-group-id="2440865847-3">[</span><span·class="n">LoaderState</span><span·class="p"·data-group-id="2440865847-3">]</span><span·class="p"·data-group-id="2440865847-2">)</span></code></pre><p>The·idea·is·that·<code·class="inline">prepare_loading</code>·could·be·called·in·parallel·for171 ··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">finish_loading</span><span·class="p"·data-group-id="9362566631-2">(</span><span·class="p"·data-group-id="9362566631-3">[</span><span·class="n">LoaderState</span><span·class="p"·data-group-id="9362566631-3">]</span><span·class="p"·data-group-id="9362566631-2">)</span></code></pre><p>The·idea·is·that·<code·class="inline">prepare_loading</code>·could·be·called·in·parallel·for
172 different·modules·and·returns·a·&quot;magic·binary&quot;·containing·the·internal172 different·modules·and·returns·a·&quot;magic·binary&quot;·containing·the·internal
173 state·of·each·prepared·module.·Function·<code·class="inline">finish_loading</code>·could·take·a173 state·of·each·prepared·module.·Function·<code·class="inline">finish_loading</code>·could·take·a
174 list·of·such·states·and·do·the·finishing·of·all·of·them·in·one·go.</p><p>Currently·we·use·the·legacy·BIF·<code·class="inline">erlang:load_module</code>·which·is·now174 list·of·such·states·and·do·the·finishing·of·all·of·them·in·one·go.</p><p>Currently·we·use·the·legacy·BIF·<code·class="inline">erlang:load_module</code>·which·is·now
175 implemented·in·Erlang·by·calling·the·above·two·functions·in175 implemented·in·Erlang·by·calling·the·above·two·functions·in
176 sequence.·Function·<code·class="inline">finish_loading</code>·is·limited·to·only·accepts·a·list176 sequence.·Function·<code·class="inline">finish_loading</code>·is·limited·to·only·accepts·a·list
177 with·one·module·state·as·we·do·not·yet·use·the·multi·module·loading177 with·one·module·state·as·we·do·not·yet·use·the·multi·module·loading
178 feature.</p><h2·id="the-finishing-sequence"·class="section-heading">178 feature.</p><h2·id="the-finishing-sequence"·class="section-heading">
10.6 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/crash_dump.html
    
Offset 401, 21 lines modifiedOffset 401, 21 lines modified
401 <a·href="erlang.html#put/2"><code·class="inline">put/2</code></a>·and·<a·href="erlang.html#get/1"><code·class="inline">get/1</code></a>·thing)·is·non-empty.</p><p>The·raw·memory·information·can·be·decoded·by·the·Crashdump·Viewer·tool.·You·can401 <a·href="erlang.html#put/2"><code·class="inline">put/2</code></a>·and·<a·href="erlang.html#get/1"><code·class="inline">get/1</code></a>·thing)·is·non-empty.</p><p>The·raw·memory·information·can·be·decoded·by·the·Crashdump·Viewer·tool.·You·can
402 then·see·the·stack·dump,·the·message·queue·(if·any),·and·the·dictionary·(if402 then·see·the·stack·dump,·the·message·queue·(if·any),·and·the·dictionary·(if
403 any).</p><p>The·stack·dump·is·a·dump·of·the·Erlang·process·stack.·Most·of·the·live·data403 any).</p><p>The·stack·dump·is·a·dump·of·the·Erlang·process·stack.·Most·of·the·live·data
404 (that·is,·variables·currently·in·use)·are·placed·on·the·stack;·thus·this·can·be404 (that·is,·variables·currently·in·use)·are·placed·on·the·stack;·thus·this·can·be
405 interesting.·One·has·to·&quot;guess&quot;·what·is·what,·but·as·the·information·is405 interesting.·One·has·to·&quot;guess&quot;·what·is·what,·but·as·the·information·is
406 symbolic,·thorough·reading·of·this·information·can·be·useful.·As·an·example,·we406 symbolic,·thorough·reading·of·this·information·can·be·useful.·As·an·example,·we
407 can·find·the·state·variable·of·the·Erlang·primitive·loader·online·<code·class="inline">(5)</code>·and407 can·find·the·state·variable·of·the·Erlang·primitive·loader·online·<code·class="inline">(5)</code>·and
408 <code·class="inline">(6)</code>·in·the·following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5725551477-1">(</span><span·class="mi">1</span><span·class="p"·data-group-id="5725551477-1">)</span><span·class="w">··</span><span·class="mi">3</span><span·class="ss">cac44</span><span·class="w">···</span><span·class="n">Return</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·426,·SHA:·bc308149f4b325eaa96fe85220f954865d5624ad48db8ca41064c61f74ed2b00·...·]-2">)</span><span·class="w">408 <code·class="inline">(6)</code>·in·the·following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2859498651-1">(</span><span·class="mi">1</span><span·class="p"·data-group-id="2859498651-1">)</span><span·class="w">··</span><span·class="mi">3</span><span·class="ss">cac44</span><span·class="w">···</span><span·class="n">Return</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·426,·SHA:·df5f8cd06e89a88aaadf1e4cb3b4be5f2b10f9ee8fd05261eb39cfabc4e1e11f·...·]-2">)</span><span·class="w">
409 </span><span·class="p"·data-group-id="5725551477-3">(</span><span·class="mi">2</span><span·class="p"·data-group-id="5725551477-3">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="5725551477-4">(</span><span·class="mi">0</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·94,·SHA:·7267ef88353484f72eb56905e21bd56821ce0dbfc717b15aeee240479bfedbbc·...·]-5">[</span><span·class="s">&quot;/view/siri_r10_dev/clearcase/otp/erts/lib/kernel/ebin&quot;</span><span·class="p">,</span><span·class="w">409 </span><span·class="p"·data-group-id="2859498651-3">(</span><span·class="mi">2</span><span·class="p"·data-group-id="2859498651-3">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="2859498651-4">(</span><span·class="mi">0</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·94,·SHA:·9e0af042c4cf127959b071b90c26f00c82ac71b9922d950da6a4e2c1703e5316·...·]-5">[</span><span·class="s">&quot;/view/siri_r10_dev/clearcase/otp/erts/lib/kernel/ebin&quot;</span><span·class="p">,</span><span·class="w">
410 </span><span·class="p"·data-group-id="5725551477-6">(</span><span·class="mi">3</span><span·class="p"·data-group-id="5725551477-6">)</span><span·class="w">············</span><span·class="s">&quot;/view/siri_r10_dev/clearcase/otp/erts/lib/stdlib/ebin&quot;</span><span·class="p"·data-group-id="57[·...·truncated·by·diffoscope;·len:·8,·SHA:·60e82cc4664ad94ff275967d63c81c818da98b6d63672235bb9c0752d0ce6431·...·]-5">]</span><span·class="w">410 </span><span·class="p"·data-group-id="2859498651-6">(</span><span·class="mi">3</span><span·class="p"·data-group-id="2859498651-6">)</span><span·class="w">············</span><span·class="s">&quot;/view/siri_r10_dev/clearcase/otp/erts/lib/stdlib/ebin&quot;</span><span·class="p"·data-group-id="28[·...·truncated·by·diffoscope;·len:·8,·SHA:·ebca94d0ac5faaee2e03fdf2f39760edf840e3df9a1ae8cb3523987c2e9d5ce3·...·]-5">]</span><span·class="w">
411 </span><span·class="p"·data-group-id="5725551477-7">(</span><span·class="mi">4</span><span·class="p"·data-group-id="5725551477-7">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="5725551477-8">(</span><span·class="mi">1</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·fd49d0e1d1f25a2ad0a3f39e9758cd7686f746bb8bdc70f8d0282d20b14e948e·...·]-8">)</span><span·class="w">·····</span><span·class="o">&lt;</span><span·class="mf">0.1</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">411 </span><span·class="p"·data-group-id="2859498651-7">(</span><span·class="mi">4</span><span·class="p"·data-group-id="2859498651-7">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="2859498651-8">(</span><span·class="mi">1</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·457baab11ffbb7df876b34adfc64faf6f7ab4607a0921a5b8730e60cfbcb9ead·...·]-8">)</span><span·class="w">·····</span><span·class="o">&lt;</span><span·class="mf">0.1</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
412 </span><span·class="p"·data-group-id="5725551477-9">(</span><span·class="mi">5</span><span·class="p"·data-group-id="5725551477-9">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="5725551477-10">(</span><span·class="mi">2</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·257,·SHA:·baa6d75e1edbfb436171a7bf0d4a5963d5cd23e80e1adc3af1c05b7d4d28c298·...·]-12">]</span><span·class="p">,</span><span·class="ss">none</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_prim_loader</span><span·class="p">.</span><span·class="mf">6.7085890</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_prim_loader</span><span·class="p">.</span><span·class="mf">7.9000327</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">412 </span><span·class="p"·data-group-id="2859498651-9">(</span><span·class="mi">5</span><span·class="p"·data-group-id="2859498651-9">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="2859498651-10">(</span><span·class="mi">2</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·257,·SHA:·56bf4fef8c593adc68c4542b6abc69fb6290aed7b63e2bedf8a389dfca5ba2f2·...·]-12">]</span><span·class="p">,</span><span·class="ss">none</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_prim_loader</span><span·class="p">.</span><span·class="mf">6.7085890</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_prim_loader</span><span·class="p">.</span><span·class="mf">7.9000327</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
413 </span><span·class="p"·data-group-id="5725551477-13">(</span><span·class="mi">6</span><span·class="p"·data-group-id="5725551477-13">)</span><span·class="w">············</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_prim_loader</span><sp[·...·truncated·by·diffoscope;·len:·561,·SHA:·a6dfb77cecf4b923ced93f18b9ba3e91201ff80295fccd32cbc438dfe68b28af·...·]-11">}</span><span·class="w">413 </span><span·class="p"·data-group-id="2859498651-13">(</span><span·class="mi">6</span><span·class="p"·data-group-id="2859498651-13">)</span><span·class="w">············</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_prim_loader</span><sp[·...·truncated·by·diffoscope;·len:·561,·SHA:·7b6bdc5cabe9f62861881d84585c8d76b0093e39368d3d295dd5b08c3f97b6d8·...·]-11">}</span><span·class="w">
414 </span><span·class="p"·data-group-id="5725551477-14">(</span><span·class="mi">7</span><span·class="p"·data-group-id="5725551477-14">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="5725551477-15">(</span><span·class="mi">3</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·d66de432e264bd90e91a0ae39372b3c7ff4a4426bec30596c962d0fc9e88e818·...·]-15">)</span><span·class="w">·····</span><span·class="ss">infinity</span></code></pre><p>When·interpreting·the·data·for·a·process,·it·is·helpful·to·know·that·anonymous414 </span><span·class="p"·data-group-id="2859498651-14">(</span><span·class="mi">7</span><span·class="p"·data-group-id="2859498651-14">)</span><span·class="w">··</span><span·class="nf">y</span><span·class="p"·data-group-id="2859498651-15">(</span><span·class="mi">3</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·b72194a911feb954ec21e25044be33ed66353ed559d5b21030000dad1e9510de·...·]-15">)</span><span·class="w">·····</span><span·class="ss">infinity</span></code></pre><p>When·interpreting·the·data·for·a·process,·it·is·helpful·to·know·that·anonymous
415 function·objects·(funs)·are·given·the·following:</p><ul><li>A·name·constructed·from·the·name·of·the·function·in·which·they·are·created</li><li>A·number·(starting·with·0)·indicating·the·number·of·that·fun·within·that415 function·objects·(funs)·are·given·the·following:</p><ul><li>A·name·constructed·from·the·name·of·the·function·in·which·they·are·created</li><li>A·number·(starting·with·0)·indicating·the·number·of·that·fun·within·that
416 function</li></ul><h2·id="atoms"·class="section-heading">416 function</li></ul><h2·id="atoms"·class="section-heading">
417 ··<a·href="#atoms"·class="hover-link">417 ··<a·href="#atoms"·class="hover-link">
418 ····<i·class="ri-link-m"·aria-hidden="true"></i>418 ····<i·class="ri-link-m"·aria-hidden="true"></i>
419 ··</a>419 ··</a>
420 ··<span·class="text">Atoms</span>420 ··<span·class="text">Atoms</span>
421 </h2>421 </h2>
56.7 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/driver.html
    
Offset 364, 41 lines modifiedOffset 364, 41 lines modified
364 <p>Before·a·driver·can·be·called·from·Erlang,·it·must·be·loaded·and·opened.·Loading364 <p>Before·a·driver·can·be·called·from·Erlang,·it·must·be·loaded·and·opened.·Loading
365 is·done·using·the·<a·href="../../../lib/kernel-10.0.1/doc/html/erl_ddll.html"><code·class="inline">erl_ddll</code></a>·module·(the·<a·href="../../../lib/kernel-10.0.1/doc/html/erl_ddll.html"><code·class="inline">erl_ddll</code></a>·driver·that·loads·dynamic365 is·done·using·the·<a·href="../../../lib/kernel-10.0.1/doc/html/erl_ddll.html"><code·class="inline">erl_ddll</code></a>·module·(the·<a·href="../../../lib/kernel-10.0.1/doc/html/erl_ddll.html"><code·class="inline">erl_ddll</code></a>·driver·that·loads·dynamic
366 driver·is·actually·a·driver·itself).·If·loading·is·successful,·the·port·can·be366 driver·is·actually·a·driver·itself).·If·loading·is·successful,·the·port·can·be
367 opened·with·<a·href="erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>.·The·port·name·must·match·the·name·of367 opened·with·<a·href="erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>.·The·port·name·must·match·the·name·of
368 the·shared·library·and·the·name·in·the·driver·entry·structure.</p><p>When·the·port·has·been·opened,·the·driver·can·be·called.·In·the·<code·class="inline">pg_sync</code>368 the·shared·library·and·the·name·in·the·driver·entry·structure.</p><p>When·the·port·has·been·opened,·the·driver·can·be·called.·In·the·<code·class="inline">pg_sync</code>
369 example,·we·do·not·have·any·data·from·the·port,·only·the·return·value·from·the369 example,·we·do·not·have·any·data·from·the·port,·only·the·return·value·from·the
370 <a·href="erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>.</p><p>The·following·code·is·the·Erlang·part·of·the·synchronous·postgres·driver,370 <a·href="erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>.</p><p>The·following·code·is·the·Erlang·part·of·the·synchronous·postgres·driver,
371 <code·class="inline">pg_sync.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2493225375-1">(</span><span·class="ss">pg_sync</span><span·class="p"·data-group-id="2493225375-1">)</span><span·class="p">.</span><span·class="w">371 <code·class="inline">pg_sync.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6717408557-1">(</span><span·class="ss">pg_sync</span><span·class="p"·data-group-id="6717408557-1">)</span><span·class="p">.</span><span·class="w">
372 </span><span·class="w">372 </span><span·class="w">
373 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2493225375-2">(</span><span·class="n">DRV_CONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="2493225375-2">)</span><span·class="p">.</span><span·class="w">373 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6717408557-2">(</span><span·class="n">DRV_CONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="6717408557-2">)</span><span·class="p">.</span><span·class="w">
374 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2493225375-3">(</span><span·class="n">DRV_DISCONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="2493225375-3">)</span><span·class="p">.</span><span·class="w">374 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6717408557-3">(</span><span·class="n">DRV_DISCONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="6717408557-3">)</span><span·class="p">.</span><span·class="w">
375 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2493225375-4">(</span><span·class="n">DRV_SELECT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="2493225375-4">)</span><span·class="p">.</span><span·class="w">375 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6717408557-4">(</span><span·class="n">DRV_SELECT</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="6717408557-4">)</span><span·class="p">.</span><span·class="w">
376 </span><span·class="w">376 </span><span·class="w">
377 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2493225375-5">(</span><span·class="p"·data-group-id="2493225375-6">[</span><span·class="ss">connect</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disconnect</span><span·class="p">/</[·...·truncated·by·diffoscope;·len:·251,·SHA:·abca1f50137f42740d9dd5a47df8d8d409cc2991c0cc6dd6af325bc6decb200c·...·]-5">)</span><span·class="p">.</span><span·class="w">377 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6717408557-5">(</span><span·class="p"·data-group-id="6717408557-6">[</span><span·class="ss">connect</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disconnect</span><span·class="p">/</[·...·truncated·by·diffoscope;·len:·251,·SHA:·181035b9dc9f456aaf8e0e0a86bfd32642fe0413b1137bec0129d571fe71a0e9·...·]-5">)</span><span·class="p">.</span><span·class="w">
  
378 </span><span·class="nf">connect</span><span·class="p"·data-group-id="2493225375-7">(</span><span·class="n">ConnectStr</span><span·class="p"·data-group-id="2493225375-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">378 </span><span·class="nf">connect</span><span·class="p"·data-group-id="6717408557-7">(</span><span·class="n">ConnectStr</span><span·class="p"·data-group-id="6717408557-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
379 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="2493225375-8">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;pg_sync&quot;</span><span·class="p"·data-group-id="2493225375-8">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">379 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="6717408557-8">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;pg_sync&quot;</span><span·class="p"·data-group-id="6717408557-8">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
380 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">380 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
381 ········</span><span·class="p"·data-group-id="2493225375-9">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="2493225375-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">381 ········</span><span·class="p"·data-group-id="6717408557-9">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="6717408557-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
382 ········</span><span·class="n">E</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="2493225375-10">(</span><span·class="p"·data-group-id="2493225375-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="2493225375-11">}</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·9543ed4500cd92b94452aa49744f2b5851479468042b2af39c1aa109f47c1c25·...·]-10">)</span><span·class="w">382 ········</span><span·class="n">E</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="6717408557-10">(</span><span·class="p"·data-group-id="6717408557-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="6717408557-11">}</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·1da602684a306602856708450091ac5ee62544f0fd81e96111bd2feb4f6de979·...·]-10">)</span><span·class="w">
383 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">383 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
384 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="2493225375-12">(</span><span·class="p"·data-group-id="2493225375-13">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p"·data-group-id="2493225375-13">}</[·...·truncated·by·diffoscope;·len:·202,·SHA:·eb5cdd40e6f0c1bb667cbf07ee64422697c1a2f4dcc31e88d6a982feb4190ebd·...·]-12">)</span><span·class="p">,</span><span·class="w">384 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="6717408557-12">(</span><span·class="p"·data-group-id="6717408557-13">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p"·data-group-id="6717408557-13">}</[·...·truncated·by·diffoscope;·len:·202,·SHA:·0aa9973ac9c8b15d3e97245f285571fb5c2516358da66a4101708b95127d3eb3·...·]-12">)</span><span·class="p">,</span><span·class="w">
385 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="2493225375-15">(</span><span·class="nf">port_control</span><span·class="p"·data-group-id="2493225375-16">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_CONNECT</span><span·clas[·...·truncated·by·diffoscope;·len:·166,·SHA:·6475a177e848f5b84a5923b1f40ce474bcd138bc36f56cb26fb6069be30ecedf·...·]-15">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">385 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="6717408557-15">(</span><span·class="nf">port_control</span><span·class="p"·data-group-id="6717408557-16">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_CONNECT</span><span·clas[·...·truncated·by·diffoscope;·len:·166,·SHA:·953f058c8ec31a8ea48cae2e9863545b422015233f513874bedaefa7b4173d76·...·]-15">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
386 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2493225375-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="2493225375-17">}</span><span·class="p">;</span><span·class="w">386 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6717408557-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="6717408557-17">}</span><span·class="p">;</span><span·class="w">
387 ········</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Error</span><span·class="w">387 ········</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Error</span><span·class="w">
388 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">388 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
389 </span><span·class="nf">disconnect</span><span·class="p"·data-group-id="2493225375-18">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2493225375-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">389 </span><span·class="nf">disconnect</span><span·class="p"·data-group-id="6717408557-18">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6717408557-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
390 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="2493225375-19">(</span><span·class="nf">port_control</span><span·class="p"·data-group-id="2493225375-20">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_DISCONNECT</span><span·c[·...·truncated·by·diffoscope;·len:·171,·SHA:·d8052810863dc5c1d0532bdd8583e32d1830b227636da93b2ed66033bf036332·...·]-19">)</span><span·class="p">,</span><span·class="w">390 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="6717408557-19">(</span><span·class="nf">port_control</span><span·class="p"·data-group-id="6717408557-20">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_DISCONNECT</span><span·c[·...·truncated·by·diffoscope;·len:·171,·SHA:·1ef0cb88b10e21bd6dbd8b30825e3b470857fa1a86a4ad4140fae4ba0f529d43·...·]-19">)</span><span·class="p">,</span><span·class="w">
391 ····</span><span·class="nf">port_close</span><span·class="p"·data-group-id="2493225375-21">(</span><span·class="n">Port</span><span·class="p"·data-group-id="2493225375-21">)</span><span·class="p">,</span><span·class="w">391 ····</span><span·class="nf">port_close</span><span·class="p"·data-group-id="6717408557-21">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6717408557-21">)</span><span·class="p">,</span><span·class="w">
392 ····</span><span·class="n">R</span><span·class="p">.</span><span·class="w">392 ····</span><span·class="n">R</span><span·class="p">.</span><span·class="w">
  
393 </span><span·class="nf">select</span><span·class="p"·data-group-id="2493225375-22">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Query</span><span·class="p"·data-group-id="2493225375-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">393 </span><span·class="nf">select</span><span·class="p"·data-group-id="6717408557-22">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Query</span><span·class="p"·data-group-id="6717408557-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
394 ····</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="2493225375-23">(</span><span·class="nf">port_control</span><span·class="p"·data-group-id="2493225375-24">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_SELECT</span><span·class[·...·truncated·by·diffoscope;·len:·160,·SHA:·582c5179c47468df74ee4dec7201dcb94748b4f74b6df288805fa98fa005a96d·...·]-23">)</span><span·class="p">.</span></code></pre><p>The·API·is·simple:</p><ul><li><code·class="inline">connect/1</code>·loads·the·driver,·opens·it,·and·logs·on·to·the·database,·returning394 ····</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="6717408557-23">(</span><span·class="nf">port_control</span><span·class="p"·data-group-id="6717408557-24">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_SELECT</span><span·class[·...·truncated·by·diffoscope;·len:·160,·SHA:·c60a2b45ed20522d2b10c8db823e662aff4c56b62558341a65c7dd247e9e2eb2·...·]-23">)</span><span·class="p">.</span></code></pre><p>The·API·is·simple:</p><ul><li><code·class="inline">connect/1</code>·loads·the·driver,·opens·it,·and·logs·on·to·the·database,·returning
395 the·Erlang·port·if·successful.</li><li><code·class="inline">select/2</code>·sends·a·query·to·the·driver·and·returns·the·result.</li><li><code·class="inline">disconnect/1</code>·closes·the·database·connection·and·the·driver.·(However,·it395 the·Erlang·port·if·successful.</li><li><code·class="inline">select/2</code>·sends·a·query·to·the·driver·and·returns·the·result.</li><li><code·class="inline">disconnect/1</code>·closes·the·database·connection·and·the·driver.·(However,·it
396 does·not·unload·it.)</li></ul><p>The·connection·string·is·to·be·a·connection·string·for·postgres.</p><p>The·driver·is·loaded·with·<a·href="../../../lib/kernel-10.0.1/doc/html/erl_ddll.html#load_driver/2"><code·class="inline">erl_ddll:load_driver/2</code></a>.·If·this·is·successful,·or·if396 does·not·unload·it.)</li></ul><p>The·connection·string·is·to·be·a·connection·string·for·postgres.</p><p>The·driver·is·loaded·with·<a·href="../../../lib/kernel-10.0.1/doc/html/erl_ddll.html#load_driver/2"><code·class="inline">erl_ddll:load_driver/2</code></a>.·If·this·is·successful,·or·if
397 it·is·already·loaded,·it·is·opened.·This·will·call·the·<code·class="inline">start</code>·function·in·the397 it·is·already·loaded,·it·is·opened.·This·will·call·the·<code·class="inline">start</code>·function·in·the
398 driver.</p><p>We·use·the·<a·href="erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>·function·for·all·calls·into·the398 driver.</p><p>We·use·the·<a·href="erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>·function·for·all·calls·into·the
399 driver.·The·result·from·the·driver·is·returned·immediately·and·converted·to399 driver.·The·result·from·the·driver·is·returned·immediately·and·converted·to
400 terms·by·calling·<a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>.·(We·trust·that·the400 terms·by·calling·<a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>.·(We·trust·that·the
401 terms·returned·from·the·driver·are·well-formed,·otherwise·the·<a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>401 terms·returned·from·the·driver·are·well-formed,·otherwise·the·<a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>
Offset 536, 51 lines modifiedOffset 536, 51 lines modified
536 successful,·or·error·if·it·is·not.·If·the·connection·is·not·yet·established,·we536 successful,·or·error·if·it·is·not.·If·the·connection·is·not·yet·established,·we
537 simply·return;·<code·class="inline">ready_io</code>·is·called·again.</p><p>If·we·have·a·result·from·a·connect,·indicated·by·having·data·in·the·<code·class="inline">x</code>·buffer,537 simply·return;·<code·class="inline">ready_io</code>·is·called·again.</p><p>If·we·have·a·result·from·a·connect,·indicated·by·having·data·in·the·<code·class="inline">x</code>·buffer,
538 we·no·longer·need·to·select·on·output·(<a·href="../../../erts-15.0.1/doc/html/driver_entry.html#ready_output"·title=""><code·class="inline">ready_output</code></a>),·so·we·remove·this·by538 we·no·longer·need·to·select·on·output·(<a·href="../../../erts-15.0.1/doc/html/driver_entry.html#ready_output"·title=""><code·class="inline">ready_output</code></a>),·so·we·remove·this·by
539 calling·<a·href="../../../erts-15.0.1/doc/html/erl_driver.html#driver_select"·title=""><code·class="inline">driver_select</code></a>.</p><p>If·we·are·not·connecting,·we·wait·for·results·from·a·<code·class="inline">PQsendQuery</code>,·so·we·get539 calling·<a·href="../../../erts-15.0.1/doc/html/erl_driver.html#driver_select"·title=""><code·class="inline">driver_select</code></a>.</p><p>If·we·are·not·connecting,·we·wait·for·results·from·a·<code·class="inline">PQsendQuery</code>,·so·we·get
540 the·result·and·return·it.·The·encoding·is·done·with·the·same·functions·as·in·the540 the·result·and·return·it.·The·encoding·is·done·with·the·same·functions·as·in·the
541 earlier·example.</p><p>Error·handling·is·to·be·added·here,·for·example,·checking·that·the·socket·is541 earlier·example.</p><p>Error·handling·is·to·be·added·here,·for·example,·checking·that·the·socket·is
542 still·open,·but·this·is·only·a·simple·example.</p><p>The·Erlang·part·of·the·asynchronous·driver·consists·of·the·sample·file542 still·open,·but·this·is·only·a·simple·example.</p><p>The·Erlang·part·of·the·asynchronous·driver·consists·of·the·sample·file
543 <code·class="inline">pg_async.erl</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3057031259-1">(</span><span·class="ss">pg_async</span><span·class="p"·data-group-id="3057031259-1">)</span><span·class="p">.</span><span·class="w">543 <code·class="inline">pg_async.erl</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3524504902-1">(</span><span·class="ss">pg_async</span><span·class="p"·data-group-id="3524504902-1">)</span><span·class="p">.</span><span·class="w">
544 </span><span·class="w">544 </span><span·class="w">
545 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3057031259-2">(</span><span·class="n">DRV_CONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$C</span><span·class="p"·data-group-id="3057031259-2">)</span><span·class="p">.</span><span·class="w">545 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3524504902-2">(</span><span·class="n">DRV_CONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$C</span><span·class="p"·data-group-id="3524504902-2">)</span><span·class="p">.</span><span·class="w">
546 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3057031259-3">(</span><span·class="n">DRV_DISCONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$D</span><span·class="p"·data-group-id="3057031259-3">)</span><span·class="p">.</span><span·class="w">546 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3524504902-3">(</span><span·class="n">DRV_DISCONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$D</span><span·class="p"·data-group-id="3524504902-3">)</span><span·class="p">.</span><span·class="w">
547 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3057031259-4">(</span><span·class="n">DRV_SELECT</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$S</span><span·class="p"·data-group-id="3057031259-4">)</span><span·class="p">.</span><span·class="w">547 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="3524504902-4">(</span><span·class="n">DRV_SELECT</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$S</span><span·class="p"·data-group-id="3524504902-4">)</span><span·class="p">.</span><span·class="w">
548 </span><span·class="w">548 </span><span·class="w">
549 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3057031259-5">(</span><span·class="p"·data-group-id="3057031259-6">[</span><span·class="ss">connect</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disconnect</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·250,·SHA:·a2c951b31c87f1c4d18afd1056c5946d65457b0188ea1b6e8e027fe0fc2b9691·...·]-5">)</span><span·class="p">.</span><span·class="w">549 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3524504902-5">(</span><span·class="p"·data-group-id="3524504902-6">[</span><span·class="ss">connect</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disconnect</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·250,·SHA:·38ed9b01bae6e48fda3e585c30403137c8e4b6a5f4bb83c02a1c78a28ee80661·...·]-5">)</span><span·class="p">.</span><span·class="w">
  
550 </span><span·class="nf">connect</span><span·class="p"·data-group-id="3057031259-7">(</span><span·class="n">ConnectStr</span><span·class="p"·data-group-id="3057031259-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">550 </span><span·class="nf">connect</span><span·class="p"·data-group-id="3524504902-7">(</span><span·class="n">ConnectStr</span><span·class="p"·data-group-id="3524504902-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
551 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="3057031259-8">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;pg_async&quot;</span><span·class="p"·data-group-id="3057031259-8">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">551 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="3524504902-8">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;pg_async&quot;</span><span·class="p"·data-group-id="3524504902-8">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
552 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">552 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
553 ········</span><span·class="p"·data-group-id="3057031259-9">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="3057031259-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">553 ········</span><span·class="p"·data-group-id="3524504902-9">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="3524504902-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
554 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="3057031259-10">(</span><span·class="p"·data-group-id="3057031259-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">could_not_load_driver</span><span·class="p"·data-group-id="3057031259-11">}</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·cab204fb5f0862ee96a833095e18bc0517d6dc0402afd2a7556ae772c3ee42e6·...·]-10">)</span><span·class="w">554 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="3524504902-10">(</span><span·class="p"·data-group-id="3524504902-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">could_not_load_driver</span><span·class="p"·data-group-id="3524504902-11">}</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·6fadc6077b54a8c2d1d4c28526717f0f176917f9c8de7b4c201ab033cfbb384d·...·]-10">)</span><span·class="w">
555 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">555 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
556 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="3057031259-12">(</span><span·class="p"·data-group-id="3057031259-13">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p"·data-group-id="3057031259-13">}</s[·...·truncated·by·diffoscope;·len:·231,·SHA:·52431e5749d1caa6f01a64a7f0eccf13054f99982143864c10a6e212110fa8ed·...·]-12">)</span><span·class="p">,</span><span·class="w">556 ····</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="3524504902-12">(</span><span·class="p"·data-group-id="3524504902-13">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p"·data-group-id="3524504902-13">}</s[·...·truncated·by·diffoscope;·len:·231,·SHA:·fb96a59e31b001b51f67de9b92c8af544990f24b7b86914118b6e01f48740c04·...·]-12">)</span><span·class="p">,</span><span·class="w">
557 ····</span><span·class="nf">port_control</span><span·class="p"·data-group-id="3057031259-15">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_CONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectStr</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·426874bb591cc68bcff940f794f8050c9ed0017bc0258912dea81ff228297461·...·]-15">)</span><span·class="p">,</span><span·class="w">557 ····</span><span·class="nf">port_control</span><span·class="p"·data-group-id="3524504902-15">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_CONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectStr</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·21ed4003099d05311d5f5f29f0823e71ef9ba243d74799f3d39430638ea477c9·...·]-15">)</span><span·class="p">,</span><span·class="w">
558 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3057031259-16">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-16">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">558 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3524504902-16">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-16">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
559 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">559 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
560 ············</span><span·class="p"·data-group-id="3057031259-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-17">}</span><span·class="p">;</span><span·class="w">560 ············</span><span·class="p"·data-group-id="3524504902-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-17">}</span><span·class="p">;</span><span·class="w">
561 ········</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">561 ········</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
562 ············</span><span·class="n">Error</span><span·class="w">562 ············</span><span·class="n">Error</span><span·class="w">
563 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">563 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
564 </span><span·class="nf">disconnect</span><span·class="p"·data-group-id="3057031259-18">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">564 </span><span·class="nf">disconnect</span><span·class="p"·data-group-id="3524504902-18">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
565 ····</span><span·class="nf">port_control</span><span·class="p"·data-group-id="3057031259-19">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_DISCONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·49fa9d0e34dcd62a7c2b431d71c177357198e5e5af0674bc57e5af701f3e79a9·...·]-19">)</span><span·class="p">,</span><span·class="w">565 ····</span><span·class="nf">port_control</span><span·class="p"·data-group-id="3524504902-19">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_DISCONNECT</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·739d0f9af87f53b63fbc6bc303bbed58303b03c68f4806c1fd1344a26b5b9325·...·]-19">)</span><span·class="p">,</span><span·class="w">
566 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3057031259-20">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-20">)</span><span·class="p">,</span><span·class="w"> 
567 ····</span><span·class="nf">port_close</span><span·class="p"·data-group-id="3057031259-21">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-21">)</span><span·class="p">,</span><span·class="w">566 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3524504902-20">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-20">)</span><span·class="p">,</span><span·class="w">
 567 ····</span><span·class="nf">port_close</span><span·class="p"·data-group-id="3524504902-21">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-21">)</span><span·class="p">,</span><span·class="w">
568 ····</span><span·class="n">R</span><span·class="p">.</span><span·class="w">568 ····</span><span·class="n">R</span><span·class="p">.</span><span·class="w">
  
569 </span><span·class="nf">select</span><span·class="p"·data-group-id="3057031259-22">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Query</span><span·class="p"·data-group-id="3057031259-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">569 </span><span·class="nf">select</span><span·class="p"·data-group-id="3524504902-22">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Query</span><span·class="p"·data-group-id="3524504902-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
570 ····</span><span·class="nf">port_control</span><span·class="p"·data-group-id="3057031259-23">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_SELECT</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Query</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·3bf55de5fa1d2702e04460bf850df2bddeff595cc44a9f5fefd658d3dd63130c·...·]-23">)</span><span·class="p">,</span><span·class="w">570 ····</span><span·class="nf">port_control</span><span·class="p"·data-group-id="3524504902-23">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">DRV_SELECT</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Query</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·134cfe24b43b0d27e1808f2bc37057607e63ea213808704f08d3055f5aa56eef·...·]-23">)</span><span·class="p">,</span><span·class="w">
571 ····</span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3057031259-24">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-24">)</span><span·class="p">.</span><span·class="w">571 ····</span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3524504902-24">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-24">)</span><span·class="p">.</span><span·class="w">
  
572 </span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3057031259-25">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3057031259-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">572 </span><span·class="nf">return_port_data</span><span·class="p"·data-group-id="3524504902-25">(</span><span·class="n">Port</span><span·class="p"·data-group-id="3524504902-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
573 ····</span><span·class="k">receive</span><span·class="w">573 ····</span><span·class="k">receive</span><span·class="w">
574 ········</span><span·class="p"·data-group-id="3057031259-26">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3057031259-27">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><s[·...·truncated·by·diffoscope;·len:·93,·SHA:·70d78ae6595fe723ef7243f0ffc07fb5e9265e41bd4e1d6325004e71116182c5·...·]-26">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">574 ········</span><span·class="p"·data-group-id="3524504902-26">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3524504902-27">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><s[·...·truncated·by·diffoscope;·len:·93,·SHA:·030880038a01757559ee006d0d096746b7942af517ecc32c898269e633745181·...·]-26">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
575 ············</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="3057031259-28">(</span><span·class="n">Data</span><span·class="p"·data-group-id="3057031259-28">)</span><span·class="w">575 ············</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="3524504902-28">(</span><span·class="n">Data</span><span·class="p"·data-group-id="3524504902-28">)</span><span·class="w">
576 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·Erlang·code·is·slightly·different,·as·we·do·not·return·the·result576 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·Erlang·code·is·slightly·different,·as·we·do·not·return·the·result
577 synchronously·from·<a·href="erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>,·instead·we·get·it·from·<a·href="../../../erts-15.0.1/doc/html/erl_driver.html#driver_output"·title=""><code·class="inline">driver_output</code></a>·as577 synchronously·from·<a·href="erlang.html#port_control/3"><code·class="inline">port_control/3</code></a>,·instead·we·get·it·from·<a·href="../../../erts-15.0.1/doc/html/erl_driver.html#driver_output"·title=""><code·class="inline">driver_output</code></a>·as
578 data·in·the·message·queue.·The·function·<code·class="inline">return_port_data</code>·above·receives·data578 data·in·the·message·queue.·The·function·<code·class="inline">return_port_data</code>·above·receives·data
579 from·the·port.·As·the·data·is·in·binary·format,·we·use579 from·the·port.·As·the·data·is·in·binary·format,·we·use
580 <a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>·to·convert·it·to·an·Erlang·term.·Notice580 <a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>·to·convert·it·to·an·Erlang·term.·Notice
581 that·the·driver·is·opened·in·binary·mode·(<a·href="erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>·is581 that·the·driver·is·opened·in·binary·mode·(<a·href="erlang.html#open_port/2"><code·class="inline">open_port/2</code></a>·is
582 called·with·option·<code·class="inline">[binary]</code>).·This·means·that·data·sent·from·the·driver·to·the582 called·with·option·<code·class="inline">[binary]</code>).·This·means·that·data·sent·from·the·driver·to·the
Offset 677, 59 lines modifiedOffset 677, 59 lines modified
677 ····*rp++·=·ERL_DRV_LIST;677 ····*rp++·=·ERL_DRV_LIST;
678 ····*rp++·=·n+1;678 ····*rp++·=·n+1;
679 ····driver_output_term(port,·result,·result_n);679 ····driver_output_term(port,·result,·result_n);
680 ····delete[]·result;680 ····delete[]·result;
681 ····delete·d;681 ····delete·d;
682 }</code></pre><p>This·driver·is·called·like·the·others·from·Erlang.·However,·as·we·use682 }</code></pre><p>This·driver·is·called·like·the·others·from·Erlang.·However,·as·we·use
683 <a·href="../../../erts-15.0.1/doc/html/erl_driver.html#driver_output_term"·title=""><code·class="inline">driver_output_term</code></a>,·there·is·no·need·to·call·<a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>.·The·Erlang·code683 <a·href="../../../erts-15.0.1/doc/html/erl_driver.html#driver_output_term"·title=""><code·class="inline">driver_output_term</code></a>,·there·is·no·need·to·call·<a·href="erlang.html#binary_to_term/1"><code·class="inline">binary_to_term/1</code></a>.·The·Erlang·code
684 is·in·the·sample·file·<code·class="inline">next_perm.erl</code>.</p><p>The·input·is·changed·into·a·list·of·integers·and·sent·to·the·driver.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0321997891-1">(</span><span·class="ss">next_perm</span><span·class="p"·data-group-id="0321997891-1">)</span><span·class="p">.</span><span·class="w">684 is·in·the·sample·file·<code·class="inline">next_perm.erl</code>.</p><p>The·input·is·changed·into·a·list·of·integers·and·sent·to·the·driver.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9201317904-1">(</span><span·class="ss">next_perm</span><span·class="p"·data-group-id="9201317904-1">)</span><span·class="p">.</span><span·class="w">
685 </span><span·class="w">685 </span><span·class="w">
686 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0321997891-2">(</span><span·class="p"·data-group-id="0321997891-3">[</span><span·class="ss">next_perm</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prev_perm</span><span·class="p">/<[·...·truncated·by·diffoscope;·len:·379,·SHA:·7acabbcb021c580e4f5eea3b57c6a4ddfa6b1ca640c35423b812125de3153195·...·]-2">)</span><span·class="p">.</span><span·class="w">686 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9201317904-2">(</span><span·class="p"·data-group-id="9201317904-3">[</span><span·class="ss">next_perm</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prev_perm</span><span·class="p">/<[·...·truncated·by·diffoscope;·len:·379,·SHA:·fe54dcbd74fbadefb098fc92c464cad67e8957f0dcef4d533fc179c281256037·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
687 </span><span·class="nf">load</span><span·class="p"·data-group-id="0321997891-4">(</span><span·class="p"·data-group-id="0321997891-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">687 </span><span·class="nf">load</span><span·class="p"·data-group-id="9201317904-4">(</span><span·class="p"·data-group-id="9201317904-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
688 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">whereis</span><span·class="p"·data-group-id="0321997891-5">(</span><span·class="ss">next_perm</span><span·class="p"·data-group-id="0321997891-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">688 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">whereis</span><span·class="p"·data-group-id="9201317904-5">(</span><span·class="ss">next_perm</span><span·class="p"·data-group-id="9201317904-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
689 ········</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">689 ········</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
690 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="0321997891-6">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;next_perm&quot;</span><span·class="p"·data-group-id="0321997891-6">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">690 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">erl_ddll</span><span·class="p">:</span><span·class="nf">load_driver</span><span·class="p"·data-group-id="9201317904-6">(</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;next_perm&quot;</span><span·class="p"·data-group-id="9201317904-6">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
691 ················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">691 ················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
692 ················</span><span·class="p"·data-group-id="0321997891-7">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="0321997891-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">692 ················</span><span·class="p"·data-group-id="9201317904-7">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">already_loaded</span><span·class="p"·data-group-id="9201317904-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
693 ················</span><span·class="n">E</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="0321997891-8">(</span><span·class="n">E</span><span·class="p"·data-group-id="0321997891-8">)</span><span·class="w">693 ················</span><span·class="n">E</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">exit</span><span·class="p"·data-group-id="9201317904-8">(</span><span·class="n">E</span><span·class="p"·data-group-id="9201317904-8">)</span><span·class="w">
694 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">694 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
695 ············</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="0321997891-9">(</span><span·class="p"·data-group-id="0321997891-10">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;next_perm&quot;</span><span·class="p"·data-group-id="0321997891-10">}</span><span[·...·truncated·by·diffoscope;·len:·192,·SHA:·53672e162ed609b19ea79dc636dc1e2e63c4c8daa291577df0f8421f55755c6f·...·]-9">)</span><span·class="p">,</span><span·class="w">695 ············</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">open_port</span><span·class="p"·data-group-id="9201317904-9">(</span><span·class="p"·data-group-id="9201317904-10">{</span><span·class="nb">spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;next_perm&quot;</span><span·class="p"·data-group-id="9201317904-10">}</span><span[·...·truncated·by·diffoscope;·len:·192,·SHA:·beed1a9824e09f72e5ea132e929ac15819bb72d5e91ab62bc9767df02466c116·...·]-9">)</span><span·class="p">,</span><span·class="w">
696 ············</span><span·class="nf">register</span><span·class="p"·data-group-id="0321997891-12">(</span><span·class="ss">next_perm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="0321997891-12">)</span><span·class="p">;</span><span·class="w">696 ············</span><span·class="nf">register</span><span·class="p"·data-group-id="9201317904-12">(</span><span·class="ss">next_perm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="9201317904-12">)</span><span·class="p">;</span><span·class="w">
697 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">697 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
698 ············</span><span·class="ss">ok</span><span·class="w">698 ············</span><span·class="ss">ok</span><span·class="w">
699 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">699 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
700 </span><span·class="nf">list_to_integer_binaries</span><span·class="p"·data-group-id="0321997891-13">(</span><span·class="n">L</span><span·class="p"·data-group-id="0321997891-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">700 </span><span·class="nf">list_to_integer_binaries</span><span·class="p"·data-group-id="9201317904-13">(</span><span·class="n">L</span><span·class="p"·data-group-id="9201317904-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
701 ····</span><span·class="p"·data-group-id="0321997891-14">[</span><span·class="p">&lt;&lt;</span><span·class="n">I</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">integer</span><span·class="o">-</span><span·class="ss">native</span><span·class="p">&gt[·...·truncated·by·diffoscope;·len:·250,·SHA:·a37c3b7a3b51866e11d4b5f80c4a547f82dc6a9d63a223e6575eb8a30bfd0c5c·...·]-14">]</span><span·class="p">.</span><span·class="w">701 ····</span><span·class="p"·data-group-id="9201317904-14">[</span><span·class="p">&lt;&lt;</span><span·class="n">I</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">integer</span><span·class="o">-</span><span·class="ss">native</span><span·class="p">&gt[·...·truncated·by·diffoscope;·len:·250,·SHA:·cd99a180b5891ea68c05e57d1adcb4b118f75969b668c7e2769a1b8d65a9e94f·...·]-14">]</span><span·class="p">.</span><span·class="w">
  
702 </span><span·class="nf">next_perm</span><span·class="p"·data-group-id="0321997891-15">(</span><span·class="n">L</span><span·class="p"·data-group-id="0321997891-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">702 </span><span·class="nf">next_perm</span><span·class="p"·data-group-id="9201317904-15">(</span><span·class="n">L</span><span·class="p"·data-group-id="9201317904-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
703 ····</span><span·class="nf">next_perm</span><span·class="p"·data-group-id="0321997891-16">(</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0321997891-16">)</span><span·class="p">.</span><span·class="w">703 ····</span><span·class="nf">next_perm</span><span·class="p"·data-group-id="9201317904-16">(</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9201317904-16">)</span><span·class="p">.</span><span·class="w">
  
704 </span><span·class="nf">prev_perm</span><span·class="p"·data-group-id="0321997891-17">(</span><span·class="n">L</span><span·class="p"·data-group-id="0321997891-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">704 </span><span·class="nf">prev_perm</span><span·class="p"·data-group-id="9201317904-17">(</span><span·class="n">L</span><span·class="p"·data-group-id="9201317904-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 8410/57945 bytes (14.51%) of diff not shown.
28.4 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erl_cmd.html
    
Offset 143, 26 lines modifiedOffset 143, 26 lines modified
143 runtime·system,·more·specifically·to·the·<code·class="inline">init</code>·system·process,·see·<a·href="init.html"><code·class="inline">init</code></a>.</p><p>The·<code·class="inline">init</code>·process·itself·interprets·some·of·these·flags,·the·<em>init·flags</em>.·It143 runtime·system,·more·specifically·to·the·<code·class="inline">init</code>·system·process,·see·<a·href="init.html"><code·class="inline">init</code></a>.</p><p>The·<code·class="inline">init</code>·process·itself·interprets·some·of·these·flags,·the·<em>init·flags</em>.·It
144 also·stores·any·remaining·flags,·the·<em>user·flags</em>.·The·latter·can·be·retrieved144 also·stores·any·remaining·flags,·the·<em>user·flags</em>.·The·latter·can·be·retrieved
145 by·calling·<a·href="init.html#get_argument/1"><code·class="inline">init:get_argument/1</code></a>.</p><p>A·small·number·of·&quot;-&quot;·flags·exist,·which·now·actually·are·emulator·flags,·see145 by·calling·<a·href="init.html#get_argument/1"><code·class="inline">init:get_argument/1</code></a>.</p><p>A·small·number·of·&quot;-&quot;·flags·exist,·which·now·actually·are·emulator·flags,·see
146 the·description·below.</p></li><li><p>Plain·arguments·are·not·interpreted·in·any·way.·They·are·also·stored·by·the146 the·description·below.</p></li><li><p>Plain·arguments·are·not·interpreted·in·any·way.·They·are·also·stored·by·the
147 <code·class="inline">init</code>·process·and·can·be·retrieved·by·calling·<a·href="init.html#get_plain_arguments/0"><code·class="inline">init:get_plain_arguments/0</code></a>.147 <code·class="inline">init</code>·process·and·can·be·retrieved·by·calling·<a·href="init.html#get_plain_arguments/0"><code·class="inline">init:get_plain_arguments/0</code></a>.
148 Plain·arguments·can·occur·before·the·first·flag,·or·after·a·<code·class="inline">--</code>·flag.·Also,148 Plain·arguments·can·occur·before·the·first·flag,·or·after·a·<code·class="inline">--</code>·flag.·Also,
149 the·<code·class="inline">-extra</code>·flag·causes·everything·that·follows·to·become·plain·arguments.</p></li></ul><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·+W·w·-sname·arnie·+R·9·-s·my_init·-extra·+bertie</span><span·class="gp·unselectable">149 the·<code·class="inline">-extra</code>·flag·causes·everything·that·follows·to·become·plain·arguments.</p></li></ul><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·+W·w·-sname·arnie·+R·9·-s·my_init·-extra·+bertie</span><span·class="gp·unselectable">
150 (arnie@host)1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="8790308965-1">(</span><span·class="ss">sname</span><span·class="p"·data-group-id="8790308965-1">)</span><span·class="p">.</span><span·class="w">150 (arnie@host)1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="2506359195-1">(</span><span·class="ss">sname</span><span·class="p"·data-group-id="2506359195-1">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p"·data-group-id="8790308965-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8790308965-3">[</span><span·class="p"·data-group-id="8790308965-4">[</span><span·class="s">&quot;arnie&quot;</span><span·class="p"·data-group-id="8790308[·...·truncated·by·diffoscope;·len:·108,·SHA:·fd2969ec639d3f8dfa3dbc5e984c89afb4b5d5e2be516481e3188b74a77e27ec·...·]5-2">}</span><span·class="gp·unselectable">151 </span><span·class="p"·data-group-id="2506359195-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2506359195-3">[</span><span·class="p"·data-group-id="2506359195-4">[</span><span·class="s">&quot;arnie&quot;</span><span·class="p"·data-group-id="2506359[·...·truncated·by·diffoscope;·len:·108,·SHA:·70c6b6eca1cebfab51322d5bdd73ee12eed8f0ea35d1e39d2dd81c86f4b9be9b·...·]5-2">}</span><span·class="gp·unselectable">
152 (arnie@host)2&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="8790308965-5">(</span><span·class="p"·data-group-id="8790308965-5">)</span><span·class="p">.</span><span·class="w">152 (arnie@host)2&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="2506359195-5">(</span><span·class="p"·data-group-id="2506359195-5">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p"·data-group-id="8790308965-6">[</span><span·class="s">&quot;+bertie&quot;</span><span·class="p"·data-group-id="8790308965-6">]</span></code></pre><p>Here·<code·class="inline">+W·w</code>·and·<code·class="inline">+R·9</code>·are·emulator·flags.·<code·class="inline">-s·my_init</code>·is·an·init·flag,153 </span><span·class="p"·data-group-id="2506359195-6">[</span><span·class="s">&quot;+bertie&quot;</span><span·class="p"·data-group-id="2506359195-6">]</span></code></pre><p>Here·<code·class="inline">+W·w</code>·and·<code·class="inline">+R·9</code>·are·emulator·flags.·<code·class="inline">-s·my_init</code>·is·an·init·flag,
154 interpreted·by·<code·class="inline">init</code>.·<code·class="inline">-sname·arnie</code>·is·a·user·flag,·stored·by·<code·class="inline">init</code>.·It·is154 interpreted·by·<code·class="inline">init</code>.·<code·class="inline">-sname·arnie</code>·is·a·user·flag,·stored·by·<code·class="inline">init</code>.·It·is
155 read·by·Kernel·and·causes·the·Erlang·runtime·system·to·become·distributed.155 read·by·Kernel·and·causes·the·Erlang·runtime·system·to·become·distributed.
156 Finally,·everything·after·<code·class="inline">-extra</code>·(that·is,·<code·class="inline">+bertie</code>)·is·considered·as·plain156 Finally,·everything·after·<code·class="inline">-extra</code>·(that·is,·<code·class="inline">+bertie</code>)·is·considered·as·plain
157 arguments.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-myflag·1</span><span·class="gp·unselectable">157 arguments.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-myflag·1</span><span·class="gp·unselectable">
158 1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="6670522237-1">(</span><span·class="ss">myflag</span><span·class="p"·data-group-id="6670522237-1">)</span><span·class="p">.</span><span·class="w">158 1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="8776155466-1">(</span><span·class="ss">myflag</span><span·class="p"·data-group-id="8776155466-1">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="p"·data-group-id="6670522237-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6670522237-3">[</span><span·class="p"·data-group-id="6670522237-4">[</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="6670522237-[·...·truncated·by·diffoscope;·len:·105,·SHA:·2579fbfc81c7f424e4c73115eff74cfe91d9a10ce1a7e7859398f5c46613581f·...·]-2">}</span><span·class="gp·unselectable">159 </span><span·class="p"·data-group-id="8776155466-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8776155466-3">[</span><span·class="p"·data-group-id="8776155466-4">[</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="8776155466-[·...·truncated·by·diffoscope;·len:·105,·SHA:·1289407eeeb808e50f6805f8ff60b607da819860e77e39203838f3730fc6e9ff·...·]-2">}</span><span·class="gp·unselectable">
160 2&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="6670522237-5">(</span><span·class="p"·data-group-id="6670522237-5">)</span><span·class="p">.</span><span·class="w">160 2&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="8776155466-5">(</span><span·class="p"·data-group-id="8776155466-5">)</span><span·class="p">.</span><span·class="w">
161 </span><span·class="p"·data-group-id="6670522237-6">[</span><span·class="p"·data-group-id="6670522237-6">]</span></code></pre><p>Here·the·user·flag·<code·class="inline">-myflag·1</code>·is·passed·to·and·stored·by·the·<code·class="inline">init</code>·process.·It161 </span><span·class="p"·data-group-id="8776155466-6">[</span><span·class="p"·data-group-id="8776155466-6">]</span></code></pre><p>Here·the·user·flag·<code·class="inline">-myflag·1</code>·is·passed·to·and·stored·by·the·<code·class="inline">init</code>·process.·It
162 is·a·user-defined·flag,·presumably·used·by·some·user-defined·application.</p><p><a·href=""·id="init_flags"></a></p><h2·id="flags"·class="section-heading">162 is·a·user-defined·flag,·presumably·used·by·some·user-defined·application.</p><p><a·href=""·id="init_flags"></a></p><h2·id="flags"·class="section-heading">
163 ··<a·href="#flags"·class="hover-link">163 ··<a·href="#flags"·class="hover-link">
164 ····<i·class="ri-link-m"·aria-hidden="true"></i>164 ····<i·class="ri-link-m"·aria-hidden="true"></i>
165 ··</a>165 ··</a>
166 ··<span·class="text">Flags</span>166 ··<span·class="text">Flags</span>
167 </h2>167 </h2>
168 <p>In·the·following·list,·init·flags·are·marked·&quot;(init·flag)&quot;.·Unless·otherwise168 <p>In·the·following·list,·init·flags·are·marked·&quot;(init·flag)&quot;.·Unless·otherwise
Offset 709, 30 lines modifiedOffset 709, 30 lines modified
709 node.</li><li><code·class="inline">&lt;LogicalIds&gt;&lt;ThreadIds&gt;&lt;CoreIds&gt;&lt;NodeIds&gt;&lt;ProcessorIds&gt;</code>,·that·is,·thread709 node.</li><li><code·class="inline">&lt;LogicalIds&gt;&lt;ThreadIds&gt;&lt;CoreIds&gt;&lt;NodeIds&gt;&lt;ProcessorIds&gt;</code>,·that·is,·thread
710 is·part·of·a·core·that·is·part·of·a·NUMA·node,·which·is·part·of·a710 is·part·of·a·core·that·is·part·of·a·NUMA·node,·which·is·part·of·a
711 processor.</li></ul><p>A·CPU·topology·can·consist·of·both·processor·external,·and·processor711 processor.</li></ul><p>A·CPU·topology·can·consist·of·both·processor·external,·and·processor
712 internal·NUMA·nodes·as·long·as·each·logical·processor·belongs·to·only·one712 internal·NUMA·nodes·as·long·as·each·logical·processor·belongs·to·only·one
713 NUMA·node.·If·<code·class="inline">&lt;ProcessorIds&gt;</code>·is·omitted,·its·default·position·is·before713 NUMA·node.·If·<code·class="inline">&lt;ProcessorIds&gt;</code>·is·omitted,·its·default·position·is·before
714 <code·class="inline">&lt;NodeIds&gt;</code>.·That·is,·the·default·is·processor·external·NUMA·nodes.</p><p>If·a·list·of·identifiers·is·used·in·an·<code·class="inline">&lt;IdDefs&gt;</code>:</p><ul><li><code·class="inline">&lt;LogicalIds&gt;</code>·must·be·a·list·of·identifiers.</li><li>At·least·one·other·identifier·type·besides·<code·class="inline">&lt;LogicalIds&gt;</code>·must·also·have·a714 <code·class="inline">&lt;NodeIds&gt;</code>.·That·is,·the·default·is·processor·external·NUMA·nodes.</p><p>If·a·list·of·identifiers·is·used·in·an·<code·class="inline">&lt;IdDefs&gt;</code>:</p><ul><li><code·class="inline">&lt;LogicalIds&gt;</code>·must·be·a·list·of·identifiers.</li><li>At·least·one·other·identifier·type·besides·<code·class="inline">&lt;LogicalIds&gt;</code>·must·also·have·a
715 list·of·identifiers.</li><li>All·lists·of·identifiers·must·produce·the·same·number·of·identifiers.</li></ul><p>A·simple·example.·A·single·quad·core·processor·can·be·described·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·+sct·L0-3c0-3</span><span·class="gp·unselectable">715 list·of·identifiers.</li><li>All·lists·of·identifiers·must·produce·the·same·number·of·identifiers.</li></ul><p>A·simple·example.·A·single·quad·core·processor·can·be·described·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·+sct·L0-3c0-3</span><span·class="gp·unselectable">
716 1&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="9617260946-1">(</span><span·class="ss">cpu_topology</span><span·class="p"·data-group-id="9617260946-1">)</span><span·class="p">.</span><span·class="w">716 1&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="5995655458-1">(</span><span·class="ss">cpu_topology</span><span·class="p"·data-group-id="5995655458-1">)</span><span·class="p">.</span><span·class="w">
717 </span><span·class="p"·data-group-id="9617260946-2">[</span><span·class="p"·data-group-id="9617260946-3">{</span><span·class="ss">processor</span><span·class="p">,</span><span·class="p"·data-group-id="9617260946-4">[</span><span·class="p"·data-group-id="9617260946-5">{</span><span·class="ss">c[·...·truncated·by·diffoscope;·len:·261,·SHA:·f7f114b68ae878ae7f86489e54caf6cae4015ab261d41d4d258109652a866b71·...·]-5">}</span><span·class="p">,</span><span·class="w">717 </span><span·class="p"·data-group-id="5995655458-2">[</span><span·class="p"·data-group-id="5995655458-3">{</span><span·class="ss">processor</span><span·class="p">,</span><span·class="p"·data-group-id="5995655458-4">[</span><span·class="p"·data-group-id="5995655458-5">{</span><span·class="ss">c[·...·truncated·by·diffoscope;·len:·261,·SHA:·7821add6a08bbf281c1037efc24a912ce83c52d459040898f32980ed13d8af43·...·]-5">}</span><span·class="p">,</span><span·class="w">
718 ·············</span><span·class="p"·data-group-id="9617260946-7">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="9617260946-8">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="9617260946-8">}</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·8b79eb95dcc8bf9dc10e58a3fb21a4845aabd89aa0f3578ff297e7a4293d5283·...·]-7">}</span><span·class="p">,</span><span·class="w">718 ·············</span><span·class="p"·data-group-id="5995655458-7">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="5995655458-8">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5995655458-8">}</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·69c78702e400671d535752328179c7877433ebe334ca15a120f6af4d6229f1df·...·]-7">}</span><span·class="p">,</span><span·class="w">
719 ·············</span><span·class="p"·data-group-id="9617260946-9">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="9617260946-10">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9617260946-10">}<[·...·truncated·by·diffoscope;·len:·47,·SHA:·44ccf72aeaac664bc441673e095805d0a0dd08b7b099feae669cd5a4ec755a64·...·]-9">}</span><span·class="p">,</span><span·class="w">719 ·············</span><span·class="p"·data-group-id="5995655458-9">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="5995655458-10">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5995655458-10">}<[·...·truncated·by·diffoscope;·len:·47,·SHA:·fec89e9c506ca24b702dd233dcbec76a85a164ebc3320e2aa669ba4d3d11211b·...·]-9">}</span><span·class="p">,</span><span·class="w">
720 ·············</span><span·class="p"·data-group-id="9617260946-11">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="9617260946-12">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="9617260946-12">}[·...·truncated·by·diffoscope;·len:·208,·SHA:·f9eefe3b72fd6f8133ac8cc43070365ea1bd51197ec975fa0238c2a864fbd121·...·]-2">]</span></code></pre><p>A·more·complicated·example·with·two·quad·core·processors,·each·processor·in720 ·············</span><span·class="p"·data-group-id="5995655458-11">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="5995655458-12">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="5995655458-12">}[·...·truncated·by·diffoscope;·len:·208,·SHA:·a34aa568cfe2dfab577703d585422f42eb15832dcfa08597775033879780e6bb·...·]-2">]</span></code></pre><p>A·more·complicated·example·with·two·quad·core·processors,·each·processor·in
721 its·own·NUMA·node.·The·ordering·of·logical·processors·is·a·bit·weird.·This721 its·own·NUMA·node.·The·ordering·of·logical·processors·is·a·bit·weird.·This
722 to·give·a·better·example·of·identifier·lists:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·+sct·L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1</span><span·class="gp·unselectable">722 to·give·a·better·example·of·identifier·lists:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·+sct·L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1</span><span·class="gp·unselectable">
723 1&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="4800858747-1">(</span><span·class="ss">cpu_topology</span><span·class="p"·data-group-id="4800858747-1">)</span><span·class="p">.</span><span·class="w">723 1&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="2748191637-1">(</span><span·class="ss">cpu_topology</span><span·class="p"·data-group-id="2748191637-1">)</span><span·class="p">.</span><span·class="w">
724 </span><span·class="p"·data-group-id="4800858747-2">[</span><span·class="p"·data-group-id="4800858747-3">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-4">[</span><span·class="p"·data-group-id="4800858747-5">{</span><span·class="ss">proces[·...·truncated·by·diffoscope;·len:·418,·SHA:·d53e93212e94f278d824bdf0fb0055906bf9397bcbf854e121503727be0e077f·...·]7-7">}</span><span·class="p">,</span><span·class="w">724 </span><span·class="p"·data-group-id="2748191637-2">[</span><span·class="p"·data-group-id="2748191637-3">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-4">[</span><span·class="p"·data-group-id="2748191637-5">{</span><span·class="ss">proces[·...·truncated·by·diffoscope;·len:·418,·SHA:·2cb369bff03b694fce77f1cd0f13c38795a35d8cbd82f1e6be07e6d88b57a4f0·...·]7-7">}</span><span·class="p">,</span><span·class="w">
725 ····················</span><span·class="p"·data-group-id="4800858747-9">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-10">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4800858747-10">}<[·...·truncated·by·diffoscope;·len:·46,·SHA:·6723b23df255baed82c66d997d800a0f60029122ce268ae0c93b5e386bc8db5e·...·]7-9">}</span><span·class="p">,</span><span·class="w">725 ····················</span><span·class="p"·data-group-id="2748191637-9">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-10">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2748191637-10">}<[·...·truncated·by·diffoscope;·len:·46,·SHA:·9c3f85d819bbf2c16cd23276bd05f693adba21cfdacf079ef782d38df0b1edf3·...·]7-9">}</span><span·class="p">,</span><span·class="w">
726 ····················</span><span·class="p"·data-group-id="4800858747-11">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-12">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="4800858747-12">}[·...·truncated·by·diffoscope;·len:·47,·SHA:·6521d30a71fb396f9c9a711a0b3ad8481f19a322bb838d4a7b7116246255b6ee·...·]7-11">}</span><span·class="p">,</span><span·class="w">726 ····················</span><span·class="p"·data-group-id="2748191637-11">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-12">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="2748191637-12">}[·...·truncated·by·diffoscope;·len:·47,·SHA:·f999a88e399ad1c3e446a348f1041db5b9b5ce63881db1a8628afb97d10111ab·...·]7-11">}</span><span·class="p">,</span><span·class="w">
727 ····················</span><span·class="p"·data-group-id="4800858747-13">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-14">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4800858747-14">}</span><span·class="p"·data-group-id="4800858747-13">}</span><span·class="p"·data-group-id="4800858747-6">]</span><span·class="p"·data-group-id="4800858747-5">}</span><span·class="p"·data-group-id="4800858747-4">]</span><span·class="p"·data-group-id="4800858747-3">}</span><span·class="p">,</span><span·class="w"> 
728 ·</span><span·class="p"·data-group-id="4800858747-15">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-16">[</span><span·class="p"·data-group-id="4800858747-17">{</span><span·class="ss">processor</span><s[·...·truncated·by·diffoscope;·len:·414,·SHA:·ad7dda5508e418100218328724353a8e22d17bd6dbe9ec2b5a99080b70be9b59·...·]">}</span><span·class="p">,</span><span·class="w">727 ····················</span><span·class="p"·data-group-id="2748191637-13">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-14">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·320,·SHA:·39af5220288cb9456cd5f83b5ede5802b0237b4c126ddd223cb80b193a473ae3·...·]">}</span><span·class="p">,</span><span·class="w">
 728 ·</span><span·class="p"·data-group-id="2748191637-15">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-16">[</span><span·class="p"·data-group-id="2748191637-17">{</span><span·class="ss">processor</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-18">[</span><span·class="p"·data-group-id="2748191637-19">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-20">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="2748191637-20">}</span><span·class="p"·data-group-id="2748191637-19">}</span><span·class="p">,</span><span·class="w">
729 ····················</span><span·class="p"·data-group-id="4800858747-21">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-22">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="4800858747-22">}[·...·truncated·by·diffoscope;·len:·47,·SHA:·6521d30a71fb396f9c9a711a0b3ad8481f19a322bb838d4a7b7116246255b6ee·...·]7-21">}</span><span·class="p">,</span><span·class="w">729 ····················</span><span·class="p"·data-group-id="2748191637-21">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-22">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="2748191637-22">}[·...·truncated·by·diffoscope;·len:·47,·SHA:·f999a88e399ad1c3e446a348f1041db5b9b5ce63881db1a8628afb97d10111ab·...·]7-21">}</span><span·class="p">,</span><span·class="w">
730 ····················</span><span·class="p"·data-group-id="4800858747-23">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-24">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="4800858747-24">}[·...·truncated·by·diffoscope;·len:·47,·SHA:·6521d30a71fb396f9c9a711a0b3ad8481f19a322bb838d4a7b7116246255b6ee·...·]7-23">}</span><span·class="p">,</span><span·class="w">730 ····················</span><span·class="p"·data-group-id="2748191637-23">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-24">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="2748191637-24">}[·...·truncated·by·diffoscope;·len:·47,·SHA:·f999a88e399ad1c3e446a348f1041db5b9b5ce63881db1a8628afb97d10111ab·...·]7-23">}</span><span·class="p">,</span><span·class="w">
731 ····················</span><span·class="p"·data-group-id="4800858747-25">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="4800858747-26">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="4800858747-26">}[·...·truncated·by·diffoscope;·len:·317,·SHA:·1bff98daaa16986f052d1de8549bafef95bd1b530c1adb320e546c0c34126c9f·...·]7-2">]</span></code></pre><p>As·long·as·real·identifiers·are·correct,·it·is·OK·to·pass·a·CPU·topology731 ····················</span><span·class="p"·data-group-id="2748191637-25">{</span><span·class="ss">core</span><span·class="p">,</span><span·class="p"·data-group-id="2748191637-26">{</span><span·class="ss">logical</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="2748191637-26">}[·...·truncated·by·diffoscope;·len:·317,·SHA:·5e9e8879cd3708fcb832cdc04ecbe9c90a860d123de41399f27bec1b255d27a5·...·]7-2">]</span></code></pre><p>As·long·as·real·identifiers·are·correct,·it·is·OK·to·pass·a·CPU·topology
732 that·is·not·a·correct·description·of·the·CPU·topology.·When·used·with·care732 that·is·not·a·correct·description·of·the·CPU·topology.·When·used·with·care
733 this·can·be·very·useful.·This·to·trick·the·emulator·to·bind·its·schedulers733 this·can·be·very·useful.·This·to·trick·the·emulator·to·bind·its·schedulers
734 as·you·want.·For·example,·if·you·want·to·run·multiple·Erlang·runtime·systems734 as·you·want.·For·example,·if·you·want·to·run·multiple·Erlang·runtime·systems
735 on·the·same·machine,·you·want·to·reduce·the·number·of·schedulers·used·and735 on·the·same·machine,·you·want·to·reduce·the·number·of·schedulers·used·and
736 manipulate·the·CPU·topology·so·that·they·bind·to·different·logical·CPUs.·An736 manipulate·the·CPU·topology·so·that·they·bind·to·different·logical·CPUs.·An
737 example,·with·two·Erlang·runtime·systems·on·a·quad·core·machine:</p><pre><code·class="text">%·erl·+sct·L0-3c0-3·+sbt·db·+S3:2·-detached·-noinput·-noshell·-sname·one737 example,·with·two·Erlang·runtime·systems·on·a·quad·core·machine:</p><pre><code·class="text">%·erl·+sct·L0-3c0-3·+sbt·db·+S3:2·-detached·-noinput·-noshell·-sname·one
738 %·erl·+sct·L3-0c0-3·+sbt·db·+S3:2·-detached·-noinput·-noshell·-sname·two</code></pre><p>In·this·example,·each·runtime·system·have·two·schedulers·each·online,·and738 %·erl·+sct·L3-0c0-3·+sbt·db·+S3:2·-detached·-noinput·-noshell·-sname·two</code></pre><p>In·this·example,·each·runtime·system·have·two·schedulers·each·online,·and
Offset 899, 18 lines modifiedOffset 899, 18 lines modified
899 </h2>899 </h2>
900 <p>The·standard·Erlang/OTP·system·can·be·reconfigured·to·change·the·default900 <p>The·standard·Erlang/OTP·system·can·be·reconfigured·to·change·the·default
901 behavior·on·startup.</p><ul><li><p><strong>The·<code·class="inline">.erlang</code>·startup·file</strong>·-·When·Erlang/OTP·is·started,·the·system901 behavior·on·startup.</p><ul><li><p><strong>The·<code·class="inline">.erlang</code>·startup·file</strong>·-·When·Erlang/OTP·is·started,·the·system
902 searches·for·a·file·named·<code·class="inline">.erlang</code>·in·the902 searches·for·a·file·named·<code·class="inline">.erlang</code>·in·the
903 <a·href="init.html#home">user's·home·directory</a>·and·then903 <a·href="init.html#home">user's·home·directory</a>·and·then
904 <a·href="../../../lib/stdlib-6.0.1/doc/html/filename.html#user_config"><code·class="inline">filename:basedir(user_config,·&quot;erlang&quot;)</code></a>.</p><p>If·an·<code·class="inline">.erlang</code>·file·is·found,·it·is·assumed·to·contain·valid·Erlang904 <a·href="../../../lib/stdlib-6.0.1/doc/html/filename.html#user_config"><code·class="inline">filename:basedir(user_config,·&quot;erlang&quot;)</code></a>.</p><p>If·an·<code·class="inline">.erlang</code>·file·is·found,·it·is·assumed·to·contain·valid·Erlang
905 expressions.·These·expressions·are·evaluated·as·if·they·were·input·to·the905 expressions.·These·expressions·are·evaluated·as·if·they·were·input·to·the
906 shell.</p><p>A·typical·<code·class="inline">.erlang</code>·file·contains·a·set·of·search·paths,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9926145271-1">(</span><span·class="s">&quot;executing·user·profile·in·$HOME/.erlang\n&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9926145271-2">[</span><span·class="p"·data-group-id="9926145271-2">]</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·9ee9d6e03b2cdcdbcb141d70cc6b6b2d2d5f50ec8ce5a59a9de22a296132e9ca·...·]-1">)</span><span·class="p">.</span><span·class="w">906 shell.</p><p>A·typical·<code·class="inline">.erlang</code>·file·contains·a·set·of·search·paths,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1047537264-1">(</span><span·class="s">&quot;executing·user·profile·in·$HOME/.erlang\n&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1047537264-2">[</span><span·class="p"·data-group-id="1047537264-2">]</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·8a19ae7a9f855522dbc4695208fcb520a9d1328eb5bfd4e6bade120c8b3d12eb·...·]-1">)</span><span·class="p">.</span><span·class="w">
907 </span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">add_path</span><span·class="p"·data-group-id="9926145271-3">(</span><span·class="s">&quot;/home/calvin/test/ebin&quot;</span><span·class="p"·data-group-id="9926145271-3">)</span><span·class="p">.</span><span·class="w">907 </span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">add_path</span><span·class="p"·data-group-id="1047537264-3">(</span><span·class="s">&quot;/home/calvin/test/ebin&quot;</span><span·class="p"·data-group-id="1047537264-3">)</span><span·class="p">.</span><span·class="w">
908 </span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">add_path</span><span·class="p"·data-group-id="9926145271-4">(</span><span·class="s">&quot;/home/hobbes/bigappl-1.2/ebin&quot;</span><span·class="p"·data-group-id="9926145271-4">)</span><span·class="p">.</span><span·class="w">908 </span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">add_path</span><span·class="p"·data-group-id="1047537264-4">(</span><span·class="s">&quot;/home/hobbes/bigappl-1.2/ebin&quot;</span><span·class="p"·data-group-id="1047537264-4">)</span><span·class="p">.</span><span·class="w">
909 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9926145271-5">(</span><span·class="s">&quot;.erlang·rc·finished\n&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9926145271-6">[</span><span·class="p"·data-group-id="9926145271-6">]</span><span·class="p"·data-group-id="9926145271-5">)</span><span·class="p">.</span></code></pre></li><li><p><strong>user_default</strong>·and·<strong>shell_default</strong>·-·Functions·in·the·shell·that·are·not909 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1047537264-5">(</span><span·class="s">&quot;.erlang·rc·finished\n&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1047537264-6">[</span><span·class="p"·data-group-id="1047537264-6">]</span><span·class="p"·data-group-id="1047537264-5">)</span><span·class="p">.</span></code></pre></li><li><p><strong>user_default</strong>·and·<strong>shell_default</strong>·-·Functions·in·the·shell·that·are·not
910 prefixed·by·a·module·name·are·assumed·to·be·functional·objects·(funs),910 prefixed·by·a·module·name·are·assumed·to·be·functional·objects·(funs),
911 built-in·functions·(BIFs),·or·belong·to·the·module·<code·class="inline">user_default</code>·or911 built-in·functions·(BIFs),·or·belong·to·the·module·<code·class="inline">user_default</code>·or
912 <code·class="inline">shell_default</code>.</p><p>To·include·private·shell·commands,·define·them·in·a·module·<code·class="inline">user_default</code>·and912 <code·class="inline">shell_default</code>.</p><p>To·include·private·shell·commands,·define·them·in·a·module·<code·class="inline">user_default</code>·and
913 add·the·following·argument·as·the·first·line·in·the·<code·class="inline">.erlang</code>·file:</p><pre><code·class="text">code:load_abs(&quot;..../user_default&quot;).</code></pre></li><li><p><strong>erl</strong>·-·If·the·contents·of·<code·class="inline">.erlang</code>·are·changed·and·a·private·version·of913 add·the·following·argument·as·the·first·line·in·the·<code·class="inline">.erlang</code>·file:</p><pre><code·class="text">code:load_abs(&quot;..../user_default&quot;).</code></pre></li><li><p><strong>erl</strong>·-·If·the·contents·of·<code·class="inline">.erlang</code>·are·changed·and·a·private·version·of
914 <code·class="inline">user_default</code>·is·defined,·the·Erlang/OTP·environment·can·be·customized.·More914 <code·class="inline">user_default</code>·is·defined,·the·Erlang/OTP·environment·can·be·customized.·More
915 powerful·changes·can·be·made·by·supplying·command-line·arguments·in·the915 powerful·changes·can·be·made·by·supplying·command-line·arguments·in·the
916 startup·script·<code·class="inline">erl</code>.·For·more·information,·see·<a·href="init.html"><code·class="inline">init</code></a>.</p></li></ul><h2·id="see-also"·class="section-heading">916 startup·script·<code·class="inline">erl</code>.·For·more·information,·see·<a·href="init.html"><code·class="inline">init</code></a>.</p></li></ul><h2·id="see-also"·class="section-heading">
27.0 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erl_dist_protocol.html
    
Offset 252, 32 lines modifiedOffset 252, 32 lines modified
252 ---252 ---
253 sequenceDiagram253 sequenceDiagram
254 ····participant·client·as·Client·(or·Node)254 ····participant·client·as·Client·(or·Node)
255 ····participant·EPMD255 ····participant·EPMD
256 ····256 ····
257 ····client·-&gt;&gt;·EPMD:·NAMES_REQ257 ····client·-&gt;&gt;·EPMD:·NAMES_REQ
258 ····EPMD·--&gt;&gt;·client:·NAMES_RESP</code></pre><table><thead><tr><th·style="text-align:·left;">1</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">110</code></td></tr></tbody></table><p><em>Table:·NAMES_REQ·(110)</em></p><p>The·response·for·a·<code·class="inline">NAMES_REQ</code>·is·as·follows:</p><table><thead><tr><th·style="text-align:·left;">4</th><th·style="text-align:·left;"></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">EPMDPortNo</code></td><td·style="text-align:·left;"><code·class="inline">NodeInfo*</code></td></tr></tbody></table><p><em>Table:·NAMES_RESP</em></p><p><code·class="inline">NodeInfo</code>·is·a·string·written·for·each·active·node.·When·all·<code·class="inline">NodeInfo</code>·has258 ····EPMD·--&gt;&gt;·client:·NAMES_RESP</code></pre><table><thead><tr><th·style="text-align:·left;">1</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">110</code></td></tr></tbody></table><p><em>Table:·NAMES_REQ·(110)</em></p><p>The·response·for·a·<code·class="inline">NAMES_REQ</code>·is·as·follows:</p><table><thead><tr><th·style="text-align:·left;">4</th><th·style="text-align:·left;"></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">EPMDPortNo</code></td><td·style="text-align:·left;"><code·class="inline">NodeInfo*</code></td></tr></tbody></table><p><em>Table:·NAMES_RESP</em></p><p><code·class="inline">NodeInfo</code>·is·a·string·written·for·each·active·node.·When·all·<code·class="inline">NodeInfo</code>·has
259 been·written·the·connection·is·closed·by·the·EPMD.</p><p><code·class="inline">NodeInfo</code>·is,·as·expressed·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6876728438-1">(</span><span·class="s">&quot;name·~ts·at·port·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6876728438-2">[</span><span·[·...·truncated·by·diffoscope;·len:·194,·SHA:·d4c9f3b1ba678a7b53c00bfdc19287c63ba98dfb2b5167889571e31b8c8eb194·...·]-1">)</span><span·class="p">.</span></code></pre><h3·id="dump-all-data-from-epmd"·class="section-heading">259 been·written·the·connection·is·closed·by·the·EPMD.</p><p><code·class="inline">NodeInfo</code>·is,·as·expressed·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2067589354-1">(</span><span·class="s">&quot;name·~ts·at·port·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2067589354-2">[</span><span·[·...·truncated·by·diffoscope;·len:·194,·SHA:·961ea10f6d4b430c0017f75d17e64e3676d3853c11088164463c2f9e90ea1a2f·...·]-1">)</span><span·class="p">.</span></code></pre><h3·id="dump-all-data-from-epmd"·class="section-heading">
260 ··<a·href="#dump-all-data-from-epmd"·class="hover-link">260 ··<a·href="#dump-all-data-from-epmd"·class="hover-link">
261 ····<i·class="ri-link-m"·aria-hidden="true"></i>261 ····<i·class="ri-link-m"·aria-hidden="true"></i>
262 ··</a>262 ··</a>
263 ··<span·class="text">Dump·All·Data·from·EPMD</span>263 ··<span·class="text">Dump·All·Data·from·EPMD</span>
264 </h3>264 </h3>
265 <p>This·request·is·not·really·used,·it·is·to·be·regarded·as·a·debug·feature.</p><pre><code·class="mermaid">---265 <p>This·request·is·not·really·used,·it·is·to·be·regarded·as·a·debug·feature.</p><pre><code·class="mermaid">---
266 title:·Dump·All·Data·from·EPMD266 title:·Dump·All·Data·from·EPMD
267 ---267 ---
268 sequenceDiagram268 sequenceDiagram
269 ····participant·client·as·Client·(or·Node)269 ····participant·client·as·Client·(or·Node)
270 ····participant·EPMD270 ····participant·EPMD
271 ····271 ····
272 ····client·-&gt;&gt;·EPMD:·DUMP_REQ272 ····client·-&gt;&gt;·EPMD:·DUMP_REQ
273 ····EPMD·--&gt;&gt;·client:·DUMP_RESP</code></pre><table><thead><tr><th·style="text-align:·left;">1</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">100</code></td></tr></tbody></table><p><em>Table:·DUMP_REQ</em></p><p>The·response·for·a·<code·class="inline">DUMP_REQ</code>·is·as·follows:</p><table><thead><tr><th·style="text-align:·left;">4</th><th·style="text-align:·left;"></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">EPMDPortNo</code></td><td·style="text-align:·left;"><code·class="inline">NodeInfo*</code></td></tr></tbody></table><p><em>Table:·DUMP_RESP</em></p><p><code·class="inline">NodeInfo</code>·is·a·string·written·for·each·node·kept·in·the·EPMD.·When·all273 ····EPMD·--&gt;&gt;·client:·DUMP_RESP</code></pre><table><thead><tr><th·style="text-align:·left;">1</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">100</code></td></tr></tbody></table><p><em>Table:·DUMP_REQ</em></p><p>The·response·for·a·<code·class="inline">DUMP_REQ</code>·is·as·follows:</p><table><thead><tr><th·style="text-align:·left;">4</th><th·style="text-align:·left;"></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">EPMDPortNo</code></td><td·style="text-align:·left;"><code·class="inline">NodeInfo*</code></td></tr></tbody></table><p><em>Table:·DUMP_RESP</em></p><p><code·class="inline">NodeInfo</code>·is·a·string·written·for·each·node·kept·in·the·EPMD.·When·all
274 <code·class="inline">NodeInfo</code>·has·been·written·the·connection·is·closed·by·the·EPMD.</p><p><code·class="inline">NodeInfo</code>·is,·as·expressed·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8850612883-1">(</span><span·class="s">&quot;active·name·····~ts·at·port·</span><span·class="si">~p</span><span·class="s">,·fd·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">274 <code·class="inline">NodeInfo</code>·has·been·written·the·connection·is·closed·by·the·EPMD.</p><p><code·class="inline">NodeInfo</code>·is,·as·expressed·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7278354879-1">(</span><span·class="s">&quot;active·name·····~ts·at·port·</span><span·class="si">~p</span><span·class="s">,·fd·=·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
275 ··········</span><span·class="p"·data-group-id="8850612883-2">[</span><span·class="n">NodeName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="8850612883-2">]</span><s[·...·truncated·by·diffoscope;·len:·266,·SHA:·c8a11564a7f8690504ff95aab0fc63a27a6c250e9f3d3ced67ff87431c6f1189·...·]-1">(</span><span·class="s">&quot;old/unused·name·~ts·at·port·</span><span·class="si">~p</span><span·class="s">,·fd·=·</span><span·class="si">~p</span><span·class="s">·</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">275 ··········</span><span·class="p"·data-group-id="7278354879-2">[</span><span·class="n">NodeName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="7278354879-2">]</span><s[·...·truncated·by·diffoscope;·len:·266,·SHA:·98b0c2668deed7545067a1441e8db1543c25aac846a3d455835815a8b5b89f50·...·]-1">(</span><span·class="s">&quot;old/unused·name·~ts·at·port·</span><span·class="si">~p</span><span·class="s">,·fd·=·</span><span·class="si">~p</span><span·class="s">·</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
276 ··········</span><span·class="p"·data-group-id="0699179353-2">[</span><span·class="n">NodeName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0699179353-2">]</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·3a1528a081183d14afa9776952986a93963cca10ff845c3e1c8e1dc582b3e660·...·]-1">)</span><span·class="p">.</span></code></pre><h3·id="kill-epmd"·class="section-heading">276 ··········</span><span·class="p"·data-group-id="4569782131-2">[</span><span·class="n">NodeName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="4569782131-2">]</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·a15d5d95e3ad5c308b3703a49de0155982cb0f0322acd89406d1ba9180f80774·...·]-1">)</span><span·class="p">.</span></code></pre><h3·id="kill-epmd"·class="section-heading">
277 ··<a·href="#kill-epmd"·class="hover-link">277 ··<a·href="#kill-epmd"·class="hover-link">
278 ····<i·class="ri-link-m"·aria-hidden="true"></i>278 ····<i·class="ri-link-m"·aria-hidden="true"></i>
279 ··</a>279 ··</a>
280 ··<span·class="text">Kill·EPMD</span>280 ··<span·class="text">Kill·EPMD</span>
281 </h3>281 </h3>
282 <p>This·request·kills·the·running·EPMD.·It·is·almost·never·used.</p><pre><code·class="mermaid">---282 <p>This·request·kills·the·running·EPMD.·It·is·almost·never·used.</p><pre><code·class="mermaid">---
283 title:·Kill·EPMD283 title:·Kill·EPMD
Offset 407, 54 lines modifiedOffset 407, 54 lines modified
407 received·from·<code·class="inline">A</code>·is·correct·and·generates·a·digest·from·the·challenge407 received·from·<code·class="inline">A</code>·is·correct·and·generates·a·digest·from·the·challenge
408 received·from·<code·class="inline">A</code>.·The·digest·is·then·sent·to·<code·class="inline">A</code>.·The·message·is·as·follows:</p><table><thead><tr><th·style="text-align:·left;">1</th><th·style="text-align:·left;">16</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">'a'</code></td><td·style="text-align:·left;"><code·class="inline">Digest</code></td></tr></tbody></table><p><em>Table:·The·challenge_ack·message</em></p><p><code·class="inline">Digest</code>·is·the·digest·calculated·by·<code·class="inline">B</code>·for·<code·class="inline">A</code>'s·challenge.</p></li><li><p><strong>7)·check</strong>·-·<code·class="inline">A</code>·checks·the·digest·from·<code·class="inline">B</code>·and·the·connection·is·up.</p></li></ul><h3·id="semigraphic-view"·class="section-heading">408 received·from·<code·class="inline">A</code>.·The·digest·is·then·sent·to·<code·class="inline">A</code>.·The·message·is·as·follows:</p><table><thead><tr><th·style="text-align:·left;">1</th><th·style="text-align:·left;">16</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">'a'</code></td><td·style="text-align:·left;"><code·class="inline">Digest</code></td></tr></tbody></table><p><em>Table:·The·challenge_ack·message</em></p><p><code·class="inline">Digest</code>·is·the·digest·calculated·by·<code·class="inline">B</code>·for·<code·class="inline">A</code>'s·challenge.</p></li><li><p><strong>7)·check</strong>·-·<code·class="inline">A</code>·checks·the·digest·from·<code·class="inline">B</code>·and·the·connection·is·up.</p></li></ul><h3·id="semigraphic-view"·class="section-heading">
409 ··<a·href="#semigraphic-view"·class="hover-link">409 ··<a·href="#semigraphic-view"·class="hover-link">
410 ····<i·class="ri-link-m"·aria-hidden="true"></i>410 ····<i·class="ri-link-m"·aria-hidden="true"></i>
411 ··</a>411 ··</a>
412 ··<span·class="text">Semigraphic·View</span>412 ··<span·class="text">Semigraphic·View</span>
413 </h3>413 </h3>
414 <pre><code·class="makeup·erlang"·translate="no"><span·class="n">A</span><span·class="w">·</span><span·class="p"·data-group-id="4532060308-1">(</span><span·class="ss">initiator</span><span·class="p"·data-group-id="4532060308-1">)</span><span·class="w">······································</span><span·class="n">B</span><span·class="w">·</span><span·class="p"·data-group-id="45320603[·...·truncated·by·diffoscope;·len:·86,·SHA:·28d371b269df1d30c7b185796c4c57988fd5f58455fd58f9b6d3ade2ff598f45·...·]8-2">)</span><span·class="w">414 <pre><code·class="makeup·erlang"·translate="no"><span·class="n">A</span><span·class="w">·</span><span·class="p"·data-group-id="2365469228-1">(</span><span·class="ss">initiator</span><span·class="p"·data-group-id="2365469228-1">)</span><span·class="w">······································</span><span·class="n">B</span><span·class="w">·</span><span·class="p"·data-group-id="23654692[·...·truncated·by·diffoscope;·len:·86,·SHA:·b7146bbe25c609d4771e3d71371ef952dac0e493e4090d20331ef2dadfe692b8·...·]8-2">)</span><span·class="w">
  
415 </span><span·class="n">TCP</span><span·class="w">·</span><span·class="ss">connect</span><span·class="w">·</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">&gt;</span><span·class="w">415 </span><span·class="n">TCP</span><span·class="w">·</span><span·class="ss">connect</span><span·class="w">·</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">&gt;</span><span·class="w">
416 ···················································</span><span·class="n">TCP</span><span·class="w">·</span><span·class="ss">accept</span><span·class="w">416 ···················································</span><span·class="n">TCP</span><span·class="w">·</span><span·class="ss">accept</span><span·class="w">
  
417 </span><span·class="ss">send_name</span><span·class="w">·</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">&gt;</span><span·class="w">417 </span><span·class="ss">send_name</span><span·class="w">·</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">&gt;</span><span·class="w">
418 ···················································</span><span·class="ss">recv_name</span><span·class="w">418 ···················································</span><span·class="ss">recv_name</span><span·class="w">
  
419 ··</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">·</span><span·class="ss">send_status</span><span·class="w">419 ··</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">·</span><span·class="ss">send_status</span><span·class="w">
420 </span><span·class="nf">recv_status</span><span·class="w">420 </span><span·class="nf">recv_status</span><span·class="w">
421 </span><span·class="p"·data-group-id="4532060308-3">(</span><span·class="k">if</span><span·class="w">·</span><span·class="ss">status</span><span·class="w">·</span><span·class="ss">was</span><span·class="w">·</span><span·class="ss">&#39;alive&#39;</span><span·class="w">421 </span><span·class="p"·data-group-id="2365469228-3">(</span><span·class="k">if</span><span·class="w">·</span><span·class="ss">status</span><span·class="w">·</span><span·class="ss">was</span><span·class="w">·</span><span·class="ss">&#39;alive&#39;</span><span·class="w">
422 ·</span><span·class="ss">send_status</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">422 ·</span><span·class="ss">send_status</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
423 ···················································</span><span·class="ss">recv_status</span><span·class="p"·data-group-id="4532060308-3">)</span><span·class="w">423 ···················································</span><span·class="ss">recv_status</span><span·class="p"·data-group-id="2365469228-3">)</span><span·class="w">
  
424 ··························</span><span·class="p"·data-group-id="4532060308-4">(</span><span·class="n">ChB</span><span·class="p"·data-group-id="4532060308-4">)</span><span·class="w">······················</span><span·class="n">ChB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·118,·SHA:·a1230dcc3fe130ebbe9cef125b009a5900990826dec50bfccf2ecf250d77e216·...·]8-5">)</span><span·class="w">424 ··························</span><span·class="p"·data-group-id="2365469228-4">(</span><span·class="n">ChB</span><span·class="p"·data-group-id="2365469228-4">)</span><span·class="w">······················</span><span·class="n">ChB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·118,·SHA:·b62297a1ea3eacf962d461edf7b8b2261b9dee76439c1eb0406ced5540665dd7·...·]8-5">)</span><span·class="w">
425 ··</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">·</span><span·class="ss">send_challenge</span><span·class="w">425 ··</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">·</span><span·class="ss">send_challenge</span><span·class="w">
426 </span><span·class="nf">recv_challenge</span><span·class="w">426 </span><span·class="nf">recv_challenge</span><span·class="w">
  
427 </span><span·class="p"·data-group-id="4532060308-6">(</span><span·class="k">if</span><span·class="w">·</span><span·class="ss">old</span><span·class="w">·</span><span·class="ss">send_name</span><span·class="w">427 </span><span·class="p"·data-group-id="2365469228-6">(</span><span·class="k">if</span><span·class="w">·</span><span·class="ss">old</span><span·class="w">·</span><span·class="ss">send_name</span><span·class="w">
428 ·</span><span·class="ss">send_complement</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">428 ·</span><span·class="ss">send_complement</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
429 ···················································</span><span·class="ss">recv_complement</span><span·class="p"·data-group-id="4532060308-6">)</span><span·class="w">429 ···················································</span><span·class="ss">recv_complement</span><span·class="p"·data-group-id="2365469228-6">)</span><span·class="w">
  
430 </span><span·class="n">ChA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">gen_challenge</span><span·class="p"·data-group-id="4532060308-7">(</span><span·class="p"·data-group-id="4532060308-7">)</span><span·class="p">,</span><span·class="w">430 </span><span·class="n">ChA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">gen_challenge</span><span·class="p"·data-group-id="2365469228-7">(</span><span·class="p"·data-group-id="2365469228-7">)</span><span·class="p">,</span><span·class="w">
431 </span><span·class="n">OCA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">out_cookie</span><span·class="p"·data-group-id="4532060308-8">(</span><span·class="n">B</span><span·class="p"·data-group-id="4532060308-8">)</span><span·class="p">,</span><span·class="w">431 </span><span·class="n">OCA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">out_cookie</span><span·class="p"·data-group-id="2365469228-8">(</span><span·class="n">B</span><span·class="p"·data-group-id="2365469228-8">)</span><span·class="p">,</span><span·class="w">
432 </span><span·class="n">DiA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="p"·data-group-id="4532060308-9">(</span><span·class="n">ChB</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OCA</span><span·class="p"·data-group-id="4532060308-9">)</span><span·class="w">432 </span><span·class="n">DiA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="p"·data-group-id="2365469228-9">(</span><span·class="n">ChB</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OCA</span><span·class="p"·data-group-id="2365469228-9">)</span><span·class="w">
433 ··························</span><span·class="p"·data-group-id="4532060308-10">(</span><span·class="n">ChA</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DiA</span><span·class="p"·data-group-id="4532060308-10">)</span><span·class="w">433 ··························</span><span·class="p"·data-group-id="2365469228-10">(</span><span·class="n">ChA</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DiA</span><span·class="p"·data-group-id="2365469228-10">)</span><span·class="w">
434 </span><span·class="ss">send_challenge_reply</span><span·class="w">·</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">434 </span><span·class="ss">send_challenge_reply</span><span·class="w">·</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">
435 ···················································</span><span·class="ss">recv_challenge_reply</span><span·class="w">435 ···················································</span><span·class="ss">recv_challenge_reply</span><span·class="w">
436 ···················································</span><span·class="n">ICB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">in_cookie</span><span·class="p"·data-group-id="4532060308-11">(</span><span·class="n">A</span><span·class="p"·data-group-id="4532060308-11">)</span><span·class="p">,</span><span·class="w">436 ···················································</span><span·class="n">ICB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">in_cookie</span><span·class="p"·data-group-id="2365469228-11">(</span><span·class="n">A</span><span·class="p"·data-group-id="2365469228-11">)</span><span·class="p">,</span><span·class="w">
437 ···················································</span><span·class="nc">check</span><span·class="p">:</span><span·class="w">437 ···················································</span><span·class="nc">check</span><span·class="p">:</span><span·class="w">
438 ···················································</span><span·class="n">DiA</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="w">·</span><span·class="p"·data-group-id="4532060308-12">(</span><span·class="n">ChB</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ICB</span><span·class="p"·data-group-id="4532060308-12">)</span><span·class="o">?</span><span·class="w">438 ···················································</span><span·class="n">DiA</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="w">·</span><span·class="p"·data-group-id="2365469228-12">(</span><span·class="n">ChB</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ICB</span><span·class="p"·data-group-id="2365469228-12">)</span><span·class="o">?</span><span·class="w">
439 </span><span·class="w">···················································</span><span·class="p">-</span><span·class="w">·</span><span·class="na">if</span><span·class="w">·</span><span·class="n">OK</span><span·class="p">:</span><span·class="w">439 </span><span·class="w">···················································</span><span·class="p">-</span><span·class="w">·</span><span·class="na">if</span><span·class="w">·</span><span·class="n">OK</span><span·class="p">:</span><span·class="w">
440 ····················································</span><span·class="n">OCB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">out_cookie</span><span·class="p"·data-group-id="4532060308-13">(</span><span·class="n">A</span><span·class="p"·data-group-id="4532060308-13">)</span><span·class="p">,</span><span·class="w">440 ····················································</span><span·class="n">OCB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">out_cookie</span><span·class="p"·data-group-id="2365469228-13">(</span><span·class="n">A</span><span·class="p"·data-group-id="2365469228-13">)</span><span·class="p">,</span><span·class="w">
441 ····················································</span><span·class="n">DiB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="w">·</span><span·class="p"·data-group-id="4532060308-14">(</span><span·class="n">ChA</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OCB</span><span·class="p"·data-group-id="4532060308-14">)</span><span·class="w">441 ····················································</span><span·class="n">DiB</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="w">·</span><span·class="p"·data-group-id="2365469228-14">(</span><span·class="n">ChA</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OCB</span><span·class="p"·data-group-id="2365469228-14">)</span><span·class="w">
442 ··························</span><span·class="p"·data-group-id="4532060308-15">(</span><span·class="n">DiB</span><span·class="p"·data-group-id="4532060308-15">)</span><span·class="w">442 ··························</span><span·class="p"·data-group-id="2365469228-15">(</span><span·class="n">DiB</span><span·class="p"·data-group-id="2365469228-15">)</span><span·class="w">
443 ··</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="w">·</span><span·class="ss">send_challenge_ack</span><span·class="w">443 ··</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="w">·</span><span·class="ss">send_challenge_ack</span><span·class="w">
444 </span><span·class="ss">recv_challenge_ack</span><span·class="w">··································</span><span·class="n">DONE</span><span·class="w">444 </span><span·class="ss">recv_challenge_ack</span><span·class="w">··································</span><span·class="n">DONE</span><span·class="w">
445 </span><span·class="n">ICA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">in_cookie</span><span·class="p"·data-group-id="4532060308-16">(</span><span·class="n">B</span><span·class="p"·data-group-id="4532060308-16">)</span><span·class="p">,</span><span·class="w">································</span><span·class="o">-</span><span·class="w">·</span><span·class="nc">else</span><span·class="p">:</span><span·class="w">445 </span><span·class="n">ICA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">in_cookie</span><span·class="p"·data-group-id="2365469228-16">(</span><span·class="n">B</span><span·class="p"·data-group-id="2365469228-16">)</span><span·class="p">,</span><span·class="w">································</span><span·class="o">-</span><span·class="w">·</span><span·class="nc">else</span><span·class="p">:</span><span·class="w">
446 </span><span·class="nc">check</span><span·class="p">:</span><span·class="w">··············································</span><span·class="n">CLOSE</span><span·class="w">446 </span><span·class="nc">check</span><span·class="p">:</span><span·class="w">··············································</span><span·class="n">CLOSE</span><span·class="w">
447 </span><span·class="n">DiB</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="p"·data-group-id="4532060308-17">(</span><span·class="n">ChA</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ICA</span><span·class="p"·data-group-id="4532060308-17">)</span><span·class="o">?</span><span·class="w">447 </span><span·class="n">DiB</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="nf">gen_digest</span><span·class="p"·data-group-id="2365469228-17">(</span><span·class="n">ChA</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ICA</span><span·class="p"·data-group-id="2365469228-17">)</span><span·class="o">?</span><span·class="w">
448 </span><span·class="p">-</span><span·class="w">·</span><span·class="na">if</span><span·class="w">·</span><span·class="n">OK</span><span·class="p">:</span><span·class="w">448 </span><span·class="p">-</span><span·class="w">·</span><span·class="na">if</span><span·class="w">·</span><span·class="n">OK</span><span·class="p">:</span><span·class="w">
449 ·</span><span·class="n">DONE</span><span·class="w">449 ·</span><span·class="n">DONE</span><span·class="w">
450 </span><span·class="p">-</span><span·class="w">·</span><span·class="na">else</span><span·class="p">:</span><span·class="w">450 </span><span·class="p">-</span><span·class="w">·</span><span·class="na">else</span><span·class="p">:</span><span·class="w">
451 ·</span><span·class="n">CLOSE</span></code></pre><p><a·href=""·id="dflags"></a></p><h3·id="distribution-flags"·class="section-heading">451 ·</span><span·class="n">CLOSE</span></code></pre><p><a·href=""·id="dflags"></a></p><h3·id="distribution-flags"·class="section-heading">
452 ··<a·href="#distribution-flags"·class="hover-link">452 ··<a·href="#distribution-flags"·class="hover-link">
453 ····<i·class="ri-link-m"·aria-hidden="true"></i>453 ····<i·class="ri-link-m"·aria-hidden="true"></i>
454 ··</a>454 ··</a>
4.62 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erl_ext_dist.html
    
Offset 436, 15 lines modifiedOffset 436, 15 lines modified
436 ··</a>436 ··</a>
437 ··<span·class="text">SMALL_BIG_EXT</span>437 ··<span·class="text">SMALL_BIG_EXT</span>
438 </h2>438 </h2>
439 <table><thead><tr><th·style="text-align:·left;">1</th><th·style="text-align:·left;">1</th><th·style="text-align:·left;">1</th><th·style="text-align:·left;">n</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">110</code></td><td·style="text-align:·left;"><code·class="inline">n</code></td><td·style="text-align:·left;"><code·class="inline">Sign</code></td><td·style="text-align:·left;"><code·class="inline">d(0)</code>·...·<code·class="inline">d(n-1)</code></td></tr></tbody></table><p>Bignums·are·stored·in·unary·form·with·a·<code·class="inline">Sign</code>·byte,·that·is,·0·if·the·bignum·is439 <table><thead><tr><th·style="text-align:·left;">1</th><th·style="text-align:·left;">1</th><th·style="text-align:·left;">1</th><th·style="text-align:·left;">n</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">110</code></td><td·style="text-align:·left;"><code·class="inline">n</code></td><td·style="text-align:·left;"><code·class="inline">Sign</code></td><td·style="text-align:·left;"><code·class="inline">d(0)</code>·...·<code·class="inline">d(n-1)</code></td></tr></tbody></table><p>Bignums·are·stored·in·unary·form·with·a·<code·class="inline">Sign</code>·byte,·that·is,·0·if·the·bignum·is
440 positive·and·1·if·it·is·negative.·The·digits·are·stored·with·the·least440 positive·and·1·if·it·is·negative.·The·digits·are·stored·with·the·least
441 significant·byte·stored·first.·To·calculate·the·integer,·the·following·formula441 significant·byte·stored·first.·To·calculate·the·integer,·the·following·formula
442 can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">256</span><span·class="w">442 can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">256</span><span·class="w">
443 </span><span·class="p"·data-group-id="2239869339-1">(</span><span·class="ss">d0</span><span·class="o">*</span><span·class="n">B</span><span·class="err">^</span><span·class="mi">0</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="ss">d1</span><span·class[·...·truncated·by·diffoscope;·len:·952,·SHA:·cb4b7a419c69a9eb199afeca325071b45c629d61989d6696f3fc7b0c0b0c7f2c·...·]-1">)</span></code></pre><h2·id="large_big_ext"·class="section-heading">443 </span><span·class="p"·data-group-id="7201632366-1">(</span><span·class="ss">d0</span><span·class="o">*</span><span·class="n">B</span><span·class="err">^</span><span·class="mi">0</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="ss">d1</span><span·class[·...·truncated·by·diffoscope;·len:·952,·SHA:·d69c5c5d47bf6cae845d2faa352df0711fd39dd034bd39cddf94e7ff9450dd84·...·]-1">)</span></code></pre><h2·id="large_big_ext"·class="section-heading">
444 ··<a·href="#large_big_ext"·class="hover-link">444 ··<a·href="#large_big_ext"·class="hover-link">
445 ····<i·class="ri-link-m"·aria-hidden="true"></i>445 ····<i·class="ri-link-m"·aria-hidden="true"></i>
446 ··</a>446 ··</a>
447 ··<span·class="text">LARGE_BIG_EXT</span>447 ··<span·class="text">LARGE_BIG_EXT</span>
448 </h2>448 </h2>
449 <table><thead><tr><th·style="text-align:·left;">1</th><th·style="text-align:·left;">4</th><th·style="text-align:·left;">1</th><th·style="text-align:·left;">n</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">111</code></td><td·style="text-align:·left;"><code·class="inline">n</code></td><td·style="text-align:·left;"><code·class="inline">Sign</code></td><td·style="text-align:·left;"><code·class="inline">d(0)</code>·...·<code·class="inline">d(n-1)</code></td></tr></tbody></table><p>Same·as·<a·href="erl_ext_dist.html#small_big_ext"><code·class="inline">SMALL_BIG_EXT</code></a>·except·that·the·length449 <table><thead><tr><th·style="text-align:·left;">1</th><th·style="text-align:·left;">4</th><th·style="text-align:·left;">1</th><th·style="text-align:·left;">n</th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">111</code></td><td·style="text-align:·left;"><code·class="inline">n</code></td><td·style="text-align:·left;"><code·class="inline">Sign</code></td><td·style="text-align:·left;"><code·class="inline">d(0)</code>·...·<code·class="inline">d(n-1)</code></td></tr></tbody></table><p>Same·as·<a·href="erl_ext_dist.html#small_big_ext"><code·class="inline">SMALL_BIG_EXT</code></a>·except·that·the·length
450 field·is·an·unsigned·4·byte·integer.</p><h2·id="reference_ext-deprecated"·class="section-heading">450 field·is·an·unsigned·4·byte·integer.</p><h2·id="reference_ext-deprecated"·class="section-heading">
6.17 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erl_nif.html
    
Offset 161, 27 lines modifiedOffset 161, 27 lines modified
161 }161 }
  
162 static·ErlNifFunc·nif_funcs[]·=162 static·ErlNifFunc·nif_funcs[]·=
163 {163 {
164 ····{&quot;hello&quot;,·0,·hello}164 ····{&quot;hello&quot;,·0,·hello}
165 };165 };
  
166 ERL_NIF_INIT(niftest,nif_funcs,NULL,NULL,NULL,NULL)</code></pre><p>The·Erlang·module·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6133538312-1">(</span><span·class="ss">niftest</span><span·class="p"·data-group-id="6133538312-1">)</span><span·class="p">.</span><span·class="w">166 ERL_NIF_INIT(niftest,nif_funcs,NULL,NULL,NULL,NULL)</code></pre><p>The·Erlang·module·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7190442624-1">(</span><span·class="ss">niftest</span><span·class="p"·data-group-id="7190442624-1">)</span><span·class="p">.</span><span·class="w">
167 </span><span·class="w">167 </span><span·class="w">
168 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6133538312-2">(</span><span·class="p"·data-group-id="6133538312-3">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hello</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·b937486557eef7cf87660660836281b1e2d3020541c125a9cc7d9f78e8bcc4ab·...·]-2">)</span><span·class="p">.</span><span·class="w">168 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7190442624-2">(</span><span·class="p"·data-group-id="7190442624-3">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hello</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·3f7f38a302d8f2006e0c9a2771a03f3a6d6040940630a42acfac2b03a00f42c3·...·]-2">)</span><span·class="p">.</span><span·class="w">
169 </span><span·class="w">169 </span><span·class="w">
170 </span><span·class="p">-</span><span·class="na">nifs</span><span·class="p"·data-group-id="6133538312-4">(</span><span·class="p"·data-group-id="6133538312-5">[</span><span·class="ss">hello</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6133538312-5">]</span><span·class="p"·data-group-id="6133538312-4">)</span><span·class="p">.</span><span·class="w">170 </span><span·class="p">-</span><span·class="na">nifs</span><span·class="p"·data-group-id="7190442624-4">(</span><span·class="p"·data-group-id="7190442624-5">[</span><span·class="ss">hello</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7190442624-5">]</span><span·class="p"·data-group-id="7190442624-4">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="w">171 </span><span·class="w">
172 </span><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="6133538312-6">(</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6133538312-6">)</span><span·class="p">.</span><span·class="w">172 </span><span·class="p">-</span><span·class="na">on_load</span><span·class="p"·data-group-id="7190442624-6">(</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7190442624-6">)</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="nf">init</span><span·class="p"·data-group-id="6133538312-7">(</span><span·class="p"·data-group-id="6133538312-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">init</span><span·class="p"·data-group-id="7190442624-7">(</span><span·class="p"·data-group-id="7190442624-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ······</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="6133538312-8">(</span><span·class="s">&quot;./niftest&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="6133538312-8">)</span><span·class="p">.</span><span·class="w">174 ······</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="7190442624-8">(</span><span·class="s">&quot;./niftest&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="7190442624-8">)</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="nf">hello</span><span·class="p"·data-group-id="6133538312-9">(</span><span·class="p"·data-group-id="6133538312-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 </span><span·class="nf">hello</span><span·class="p"·data-group-id="7190442624-9">(</span><span·class="p"·data-group-id="7190442624-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ······</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">nif_error</span><span·class="p"·data-group-id="6133538312-10">(</span><span·class="s">&quot;NIF·library·not·loaded&quot;</span><span·class="p"·data-group-id="6133538312-10">)</span><span·class="p">.</span></code></pre><p>Compile·and·test·can·look·as·follows·(on·Linux):</p><pre><code·class="text">$&gt;·gcc·-fPIC·-shared·-o·niftest.so·niftest.c·-I·$ERL_ROOT/usr/include/176 ······</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">nif_error</span><span·class="p"·data-group-id="7190442624-10">(</span><span·class="s">&quot;NIF·library·not·loaded&quot;</span><span·class="p"·data-group-id="7190442624-10">)</span><span·class="p">.</span></code></pre><p>Compile·and·test·can·look·as·follows·(on·Linux):</p><pre><code·class="text">$&gt;·gcc·-fPIC·-shared·-o·niftest.so·niftest.c·-I·$ERL_ROOT/usr/include/
177 $&gt;·erl177 $&gt;·erl
  
178 1&gt;·c(niftest).178 1&gt;·c(niftest).
179 {ok,niftest}179 {ok,niftest}
180 2&gt;·niftest:hello().180 2&gt;·niftest:hello().
181 &quot;Hello·world!&quot;</code></pre><p>In·the·example·above·the·<a·href="../../../doc/system/code_loading.html#on_load"><em><code·class="inline">on_load</code></em></a>181 &quot;Hello·world!&quot;</code></pre><p>In·the·example·above·the·<a·href="../../../doc/system/code_loading.html#on_load"><em><code·class="inline">on_load</code></em></a>
182 directive·is·used·get·function·<code·class="inline">init</code>·called·automatically·when·the·module·is182 directive·is·used·get·function·<code·class="inline">init</code>·called·automatically·when·the·module·is
2.31 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erl_prim_loader.html
    
Offset 408, 15 lines modifiedOffset 408, 15 lines modified
408 ························when·Filename·::·<a·href="erlang.html#t:string/0">string</a>(),·FileInfo·::·<a·href="../../../lib/kernel-10.0.1/doc/html/file.html#t:file_info/0">file:file_info</a>().</pre>408 ························when·Filename·::·<a·href="erlang.html#t:string/0">string</a>(),·FileInfo·::·<a·href="../../../lib/kernel-10.0.1/doc/html/file.html#t:file_info/0">file:file_info</a>().</pre>
  
409 ······</div>409 ······</div>
  
410 <p>Retrieves·information·about·a·file.</p><p>Returns·<code·class="inline">{ok,·FileInfo}</code>·if·successful,·otherwise·<code·class="inline">error</code>.·<code·class="inline">FileInfo</code>·is·a410 <p>Retrieves·information·about·a·file.</p><p>Returns·<code·class="inline">{ok,·FileInfo}</code>·if·successful,·otherwise·<code·class="inline">error</code>.·<code·class="inline">FileInfo</code>·is·a
411 record·<a·href="../../../lib/kernel-10.0.1/doc/html/file.html#t:file_info/0"><code·class="inline">file_info</code></a>,·defined·in·the·Kernel·include·file411 record·<a·href="../../../lib/kernel-10.0.1/doc/html/file.html#t:file_info/0"><code·class="inline">file_info</code></a>,·defined·in·the·Kernel·include·file
412 ·<code·class="inline">file.hrl</code>.·Include·the·following·directive·in·the·module·from·which·the412 ·<code·class="inline">file.hrl</code>.·Include·the·following·directive·in·the·module·from·which·the
413 function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="1136718096-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="1136718096-1">)</span><span·class="p">.</span></code></pre><p>For·more·information·about·the·record·see·<a·href="../../../lib/kernel-10.0.1/doc/html/file.html#read_file_info/2"><code·class="inline">file:read_file_info/2</code></a>.</p><p><code·class="inline">Filename</code>·can·also·be·a·file·in·an·archive,·for·example,413 function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0804971711-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="0804971711-1">)</span><span·class="p">.</span></code></pre><p>For·more·information·about·the·record·see·<a·href="../../../lib/kernel-10.0.1/doc/html/file.html#read_file_info/2"><code·class="inline">file:read_file_info/2</code></a>.</p><p><code·class="inline">Filename</code>·can·also·be·a·file·in·an·archive,·for·example,
414 <code·class="inline">$OTPROOT/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin/mnesia</code>.·For·information414 <code·class="inline">$OTPROOT/lib/mnesia-4.4.7.ez/mnesia-4.4.7/ebin/mnesia</code>.·For·information
415 about·archive·files,·see·<a·href="../../../lib/kernel-10.0.1/doc/html/code.html"><code·class="inline">code</code></a>.</p>415 about·archive·files,·see·<a·href="../../../lib/kernel-10.0.1/doc/html/code.html"><code·class="inline">code</code></a>.</p>
416 ··</section>416 ··</section>
417 </section>417 </section>
418 <section·class="detail"·id="read_link_info/1">418 <section·class="detail"·id="read_link_info/1">
  
419 ··<div·class="detail-header">419 ··<div·class="detail-header">
26.8 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erl_tracer.html
    
Offset 145, 44 lines modifiedOffset 145, 44 lines modified
145 ··<span·class="text">Erl·Tracer·Module·Example</span>145 ··<span·class="text">Erl·Tracer·Module·Example</span>
146 </h2>146 </h2>
147 <p>In·this·example,·a·tracer·module·with·a·NIF·back·end·sends·a·message·for·each147 <p>In·this·example,·a·tracer·module·with·a·NIF·back·end·sends·a·message·for·each
148 <code·class="inline">send</code>·trace·tag·containing·only·the·sender·and·receiver.·Using·this·tracer148 <code·class="inline">send</code>·trace·tag·containing·only·the·sender·and·receiver.·Using·this·tracer
149 module,·a·much·more·lightweight·message·tracer·is·used,·which·only·records·who149 module,·a·much·more·lightweight·message·tracer·is·used,·which·only·records·who
150 sent·messages·to·who.</p><p>The·following·is·an·example·session·using·it·on·Linux:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">gcc</span><span·class="w">·</span><span·class="o">-</span><span·class="n">I</span><span·class="w">·</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">8.0</span><span·class="o">/</span><span·class="ss">include</span><span·class="o">/</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">fPIC</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">shared</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">o</span><span·class="w">·</span><span·class="ss">erl_msg_tracer</span><span·class="p">.</span><span·class="ss">so</span><span·class="w">·</span><span·class="ss">erl_msg_tracer</span><span·class="p">.</span><span·class="ss">c</span><span·class="w">150 sent·messages·to·who.</p><p>The·following·is·an·example·session·using·it·on·Linux:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">gcc</span><span·class="w">·</span><span·class="o">-</span><span·class="n">I</span><span·class="w">·</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">8.0</span><span·class="o">/</span><span·class="ss">include</span><span·class="o">/</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">fPIC</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">shared</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">o</span><span·class="w">·</span><span·class="ss">erl_msg_tracer</span><span·class="p">.</span><span·class="ss">so</span><span·class="w">·</span><span·class="ss">erl_msg_tracer</span><span·class="p">.</span><span·class="ss">c</span><span·class="w">
151 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">151 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">
152 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">19</span><span·class="w">·</span><span·class="p"·data-group-id="3642638932-1">[</span><span·class="n">DEVELOPMENT</span><span·class="p"·data-group-id="3642638932-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="3642638932-2">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">8[·...·truncated·by·diffoscope;·len:·1414,·SHA:·87f156328ff1421b0fdcb48201203d9eab82a625c77a52ea27cff37eb137153e·...·]-8">]</span><span·class="w">152 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">19</span><span·class="w">·</span><span·class="p"·data-group-id="2118648745-1">[</span><span·class="n">DEVELOPMENT</span><span·class="p"·data-group-id="2118648745-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="2118648745-2">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">8[·...·truncated·by·diffoscope;·len:·1414,·SHA:·fb4f6fbb2ac59b31888a9d950f7eab8dff05f6abe61b9db63d4db00e0d39658e·...·]-8">]</span><span·class="w">
  
153 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V8</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="3642638932-9">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="3642638932-9">)</span><span·class="gp·unselectable">153 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V8</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="2118648745-9">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2118648745-9">)</span><span·class="gp·unselectable">
154 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="3642638932-10">(</span><span·class="ss">erl_msg_tracer</span><span·class="p"·data-group-id="3642638932-10">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">erl_msg_tracer</span><span·class="p">:</span><span·class="nf">load</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·5579a664c473d517f8d8748be25baa66704bdaa9d9c1fd6ff323d6c92bc11998·...·]-11">)</span><span·class="p">.</span><span·class="w">154 1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="2118648745-10">(</span><span·class="ss">erl_msg_tracer</span><span·class="p"·data-group-id="2118648745-10">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">erl_msg_tracer</span><span·class="p">:</span><span·class="nf">load</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·9e00d5d9e0027c277e3b382d14cba08040f821b1ac175a5eff71bbcc762cb13e·...·]-11">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="ss">ok</span><span·class="gp·unselectable">155 </span><span·class="ss">ok</span><span·class="gp·unselectable">
156 2&gt;·</span><span·class="n">Tracer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3642638932-12">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="3642638932-13">(</span><span·class="p"·data-group-id="3642638932-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span[·...·truncated·by·diffoscope;·len:·954,·SHA:·6b576c267705c1413d883807a55577e6b01b92d2391e6b09f6876c617d8d53f8·...·]-12">)</span><span·class="p">.</span><span·class="w">156 2&gt;·</span><span·class="n">Tracer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="2118648745-12">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="2118648745-13">(</span><span·class="p"·data-group-id="2118648745-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span[·...·truncated·by·diffoscope;·len:·954,·SHA:·c4b8545ee736e6287dc38ede6bab1f07eb3da1a86df72b599262097f0f1bc55a·...·]-12">)</span><span·class="p">.</span><span·class="w">
157 </span><span·class="o">&lt;</span><span·class="mf">0.37</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">157 </span><span·class="o">&lt;</span><span·class="mf">0.37</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
158 3&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="3642638932-17">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3642638932-18">[</span><span·class="nb">send</span>[·...·truncated·by·diffoscope;·len:·420,·SHA:·0a3db0c75f6b9574b9bd9148d35e6893c02c25c6255b80df438297347f50513d·...·]-17">)</span><span·class="p">.</span><span·class="w">158 3&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="2118648745-17">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2118648745-18">[</span><span·class="nb">send</span>[·...·truncated·by·diffoscope;·len:·420,·SHA:·a1455273fc7bb51be74676d20ed5a60cf7f74d450eb963cf51fa8a8970c16af8·...·]-17">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="mi">0</span><span·class="w">159 </span><span·class="mi">0</span><span·class="w">
160 </span><span·class="p"·data-group-id="3642638932-20">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.39</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·afdbfbfc08bd1e81f18c802b4bc24a8b0d49b7436dfde57b1a6bbdd33454975a·...·]-20">}</span><span·class="gp·unselectable">160 </span><span·class="p"·data-group-id="2118648745-20">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.39</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·f6c0c243dff012c1cbddadacb1e6585a7e62a9c86cc0cc54361f4dc514bf472e·...·]-20">}</span><span·class="gp·unselectable">
161 4&gt;·</span><span·class="p"·data-group-id="3642638932-21">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="3642638932-21">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·375,·SHA:·4676744be9bd2605e615cf0ecaf34e1074db4fc0a7b2a839081657d189de508b·...·]-22">)</span><span·class="p">.</span><span·class="w">161 4&gt;·</span><span·class="p"·data-group-id="2118648745-21">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="2118648745-21">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·375,·SHA:·92f0275a015400f7447bffba76e7848685c92ed77b6e3bcf0d62c50d19473391·...·]-22">)</span><span·class="p">.</span><span·class="w">
162 </span><span·class="p"·data-group-id="3642638932-24">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.486</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·150,·SHA:·0ce36b3676b67234690ce92c6cc2579407f77f1d4d92dc47a83034b752867a09·...·]-24">}</span><span·class="w">162 </span><span·class="p"·data-group-id="2118648745-24">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.486</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·150,·SHA:·368dfded89b94bfc2b1ca6a98ff0c787eb2dcbcca423be2a24d1c41bf08f2eb6·...·]-24">}</span><span·class="w">
163 </span><span·class="p"·data-group-id="3642638932-25">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·577ae21bed1ef6d32f97f203515f123dc435f8c3678adee583a46815d8efb1e4·...·]-25">}</span><span·class="w">163 </span><span·class="p"·data-group-id="2118648745-25">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·e811385502b0aec3fc52a44eb9d628c23846d7783b648dc5b63d0c42c0340136·...·]-25">}</span><span·class="w">
164 </span><span·class="p"·data-group-id="3642638932-26">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.487</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·692c842fe874ef96ccd8e1b4a507ff82a83da83e4c31fa7f2de23f8418b390dc·...·]-26">}</span><span·class="w">164 </span><span·class="p"·data-group-id="2118648745-26">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.487</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·165432561f2ca2a90883d6d0ada55da801970398ccefbb9a0a5a36654a1d8c36·...·]-26">}</span><span·class="w">
165 </span><span·class="p"·data-group-id="3642638932-27">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.488</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·692c842fe874ef96ccd8e1b4a507ff82a83da83e4c31fa7f2de23f8418b390dc·...·]-27">}</span><span·class="w">165 </span><span·class="p"·data-group-id="2118648745-27">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.488</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·165432561f2ca2a90883d6d0ada55da801970398ccefbb9a0a5a36654a1d8c36·...·]-27">}</span><span·class="w">
166 </span><span·class="p"·data-group-id="3642638932-28">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.489</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·692c842fe874ef96ccd8e1b4a507ff82a83da83e4c31fa7f2de23f8418b390dc·...·]-28">}</span><span·class="w">166 </span><span·class="p"·data-group-id="2118648745-28">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.489</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·165432561f2ca2a90883d6d0ada55da801970398ccefbb9a0a5a36654a1d8c36·...·]-28">}</span><span·class="w">
167 </span><span·class="p"·data-group-id="3642638932-29">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.490</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·692c842fe874ef96ccd8e1b4a507ff82a83da83e4c31fa7f2de23f8418b390dc·...·]-29">}</span><span·class="w">167 </span><span·class="p"·data-group-id="2118648745-29">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.490</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</[·...·truncated·by·diffoscope;·len:·149,·SHA:·165432561f2ca2a90883d6d0ada55da801970398ccefbb9a0a5a36654a1d8c36·...·]-29">}</span><span·class="w">
168 </span><span·class="p"·data-group-id="3642638932-30">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="3642638932-30">}</span><span·class="w">168 </span><span·class="p"·data-group-id="2118648745-30">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2118648745-30">}</span><span·class="w">
169 </span><span·class="p"·data-group-id="3642638932-31">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.41</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·afdbfbfc08bd1e81f18c802b4bc24a8b0d49b7436dfde57b1a6bbdd33454975a·...·]-31">}</span><span·class="w">169 </span><span·class="p"·data-group-id="2118648745-31">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.41</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·f6c0c243dff012c1cbddadacb1e6585a7e62a9c86cc0cc54361f4dc514bf472e·...·]-31">}</span><span·class="w">
170 </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p><code·class="inline">erl_msg_tracer.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8217699981-1">(</span><span·class="ss">erl_msg_tracer</span><span·class="p"·data-group-id="8217699981-1">)</span><span·class="p">.</span><span·class="w">170 </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p><code·class="inline">erl_msg_tracer.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0378525061-1">(</span><span·class="ss">erl_msg_tracer</span><span·class="p"·data-group-id="0378525061-1">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="w">171 </span><span·class="w">
172 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8217699981-2">(</span><span·class="p"·data-group-id="8217699981-3">[</span><span·class="ss">enabled</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">trace</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·243,·SHA:·01f51aedaad19e17b7d4343aa0d0ba3de374ed9266d33ed5d7177de8c797a894·...·]1-2">)</span><span·class="p">.</span><span·class="w">172 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0378525061-2">(</span><span·class="p"·data-group-id="0378525061-3">[</span><span·class="ss">enabled</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="nb">trace</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·243,·SHA:·d9bc46e8f58c65a3fd3546d93d842571bc98f0a0aa7381835400dcccfc04984d·...·]1-2">)</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="nf">load</span><span·class="p"·data-group-id="8217699981-4">(</span><span·class="p"·data-group-id="8217699981-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">load</span><span·class="p"·data-group-id="0378525061-4">(</span><span·class="p"·data-group-id="0378525061-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="8217699981-5">(</span><span·class="s">&quot;erl_msg_tracer&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8217699981-6">[</span><span·class="p"·data-group-id="8217699981-6">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·9,·SHA:·c7aa54f23213653f0d1271dfe415a0818d10ffb3d0cbfbfeaf3ceb4474c873fc·...·]1-5">)</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">load_nif</span><span·class="p"·data-group-id="0378525061-5">(</span><span·class="s">&quot;erl_msg_tracer&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0378525061-6">[</span><span·class="p"·data-group-id="0378525061-6">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·9,·SHA:·35b2d2f40835056ebabc95a8358f03550c0943b9e04192d037abd33daf38544d·...·]1-5">)</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="nf">enabled</span><span·class="p"·data-group-id="8217699981-7">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="8217699981-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 </span><span·class="nf">enabled</span><span·class="p"·data-group-id="0378525061-7">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="0378525061-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ····</span><span·class="ss">error</span><span·class="p">.</span><span·class="w">176 ····</span><span·class="ss">error</span><span·class="p">.</span><span·class="w">
  
177 </span><span·class="nf">trace</span><span·class="p"·data-group-id="8217699981-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_<[·...·truncated·by·diffoscope;·len:·118,·SHA:·b374f39aeafba7c7268d485ab147b4e28658fdfac2b066df180ce82d41f54b66·...·]1-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">trace</span><span·class="p"·data-group-id="0378525061-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_<[·...·truncated·by·diffoscope;·len:·118,·SHA:·4d8b2937248fa5a66a246db7a334788a19df40bcfb9259b5039226cb53b5b0dc·...·]1-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ····</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p><code·class="inline">erl_msg_tracer.c</code>:</p><pre><code·class="c">#include·&lt;erl_nif.h&gt;178 ····</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p><code·class="inline">erl_msg_tracer.c</code>:</p><pre><code·class="c">#include·&lt;erl_nif.h&gt;
  
179 /*·NIF·interface·declarations·*/179 /*·NIF·interface·declarations·*/
180 static·int·load(ErlNifEnv*·env,·void**·priv_data,·ERL_NIF_TERM·load_info);180 static·int·load(ErlNifEnv*·env,·void**·priv_data,·ERL_NIF_TERM·load_info);
181 static·int·upgrade(ErlNifEnv*·env,·void**·priv_data,·void**·old_priv_data,·ERL_NIF_TERM·load_info);181 static·int·upgrade(ErlNifEnv*·env,·void**·priv_data,·void**·old_priv_data,·ERL_NIF_TERM·load_info);
182 static·void·unload(ErlNifEnv*·env,·void*·priv_data);182 static·void·unload(ErlNifEnv*·env,·void*·priv_data);
  
596 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/erlang.html
    
Offset 7031, 16 lines modifiedOffset 7031, 16 lines modified
7031 ······<div·class="specs">7031 ······<div·class="specs">
  
7032 ··········<pre·translate="no"><span·class="attribute">-spec</span>·adler32(OldAdler,·Data)·->·<a·href="#t:non_neg_integer/0">non_neg_integer</a>()·when·OldAdler·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),·Data·::·<a·href="#t:iodata/0">iodata</a>().</pre>7032 ··········<pre·translate="no"><span·class="attribute">-spec</span>·adler32(OldAdler,·Data)·->·<a·href="#t:non_neg_integer/0">non_neg_integer</a>()·when·OldAdler·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),·Data·::·<a·href="#t:iodata/0">iodata</a>().</pre>
  
7033 ······</div>7033 ······</div>
  
7034 <p>Continues·computing·the·adler32·checksum·by·combining·the·previous·checksum,7034 <p>Continues·computing·the·adler32·checksum·by·combining·the·previous·checksum,
7035 <code·class="inline">OldAdler</code>,·with·the·checksum·of·<code·class="inline">Data</code>.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="4702762691-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="4702762691-1">)</span><span·class="p">,</span><span·class="w">7035 <code·class="inline">OldAdler</code>,·with·the·checksum·of·<code·class="inline">Data</code>.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="6925041205-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="6925041205-1">)</span><span·class="p">,</span><span·class="w">
7036 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="4702762691-2">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="4702762691-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Y</code>·as·this:<[·...·truncated·by·diffoscope;·len:·512,·SHA:·0aebb6c3a69d2ffa9151b785eaf47bdbfec65aac4e7a4c50f9edaccd838af72e·...·]-1">)</span><span·class="p">.</span></code></pre>7036 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="6925041205-2">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="6925041205-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Y</code>·as·this:<[·...·truncated·by·diffoscope;·len:·512,·SHA:·539130a78ab048e46191813826fd18dff9cb8cb13291fa2dcc8520696d015761·...·]-1">)</span><span·class="p">.</span></code></pre>
7037 ··</section>7037 ··</section>
7038 </section>7038 </section>
7039 <section·class="detail"·id="adler32_combine/3">7039 <section·class="detail"·id="adler32_combine/3">
  
7040 ··<div·class="detail-header">7040 ··<div·class="detail-header">
7041 ····<a·href="#adler32_combine/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">7041 ····<a·href="#adler32_combine/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
7042 ······<i·class="ri-link-m"·aria-hidden="true"></i>7042 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 7065, 18 lines modifiedOffset 7065, 18 lines modified
7065 ·····························FirstAdler·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),7065 ·····························FirstAdler·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),
7066 ·····························SecondAdler·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),7066 ·····························SecondAdler·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),
7067 ·····························SecondSize·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>().</pre>7067 ·····························SecondSize·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>().</pre>
  
7068 ······</div>7068 ······</div>
  
7069 <p>Combines·two·previously·computed·adler32·checksums.</p><p>This·computation·requires·the·size·of·the·data·object·for·the·second·checksum7069 <p>Combines·two·previously·computed·adler32·checksums.</p><p>This·computation·requires·the·size·of·the·data·object·for·the·second·checksum
7070 to·be·known.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="0824875749-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="0824875749-1">)</span><span·class="p">,</span><span·class="w">7070 to·be·known.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="3407478704-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="3407478704-1">)</span><span·class="p">,</span><span·class="w">
7071 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="0824875749-2">(</span><span·class="n">Y</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="0824875749-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Z</code>·as·this:<[·...·truncated·by·diffoscope;·len:·354,·SHA:·73e7419e9d3b3c2043b1f97a2e327781771b163d33fff08e40ff38cb35b38952·...·]-1">)</span><span·class="p">,</span><span·class="w">7071 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="3407478704-2">(</span><span·class="n">Y</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="3407478704-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Z</code>·as·this:<[·...·truncated·by·diffoscope;·len:·354,·SHA:·fdb7479e6335508e2323e68546e024f73f7c013962e8d47fb43ebd448d7a2408·...·]-1">)</span><span·class="p">,</span><span·class="w">
7072 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="6379099503-2">(</span><span·class="n">Data2</span><span·class="p"·data-group-id="6379099503-2">)</span><span·class="p">,</span><span·class="w">7072 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32</span><span·class="p"·data-group-id="7498236355-2">(</span><span·class="n">Data2</span><span·class="p"·data-group-id="7498236355-2">)</span><span·class="p">,</span><span·class="w">
7073 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32_combine</span><span·class="p"·data-group-id="6379099503-3">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">,</span><span·class="nf">iolist_size</span><span·class="p"·data-group-id="6379099503-4">(</span><span·class="n">Data2</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·0e5cdf68c121b566bc165b59e013d74c7ffe618d51c19b7a9973d6d4afe898c4·...·]-3">)</span><span·class="p">.</span></code></pre>7073 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">adler32_combine</span><span·class="p"·data-group-id="7498236355-3">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">,</span><span·class="nf">iolist_size</span><span·class="p"·data-group-id="7498236355-4">(</span><span·class="n">Data2</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·67daadbb104c37ba66749a43fb09f1dc14b7a32d4a5958b2c3871f8b2179cfc8·...·]-3">)</span><span·class="p">.</span></code></pre>
7074 ··</section>7074 ··</section>
7075 </section>7075 </section>
7076 <section·class="detail"·id="crc32/1">7076 <section·class="detail"·id="crc32/1">
  
7077 ··<div·class="detail-header">7077 ··<div·class="detail-header">
7078 ····<a·href="#crc32/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">7078 ····<a·href="#crc32/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
7079 ······<i·class="ri-link-m"·aria-hidden="true"></i>7079 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 7125, 16 lines modifiedOffset 7125, 16 lines modified
7125 ······<div·class="specs">7125 ······<div·class="specs">
  
7126 ··········<pre·translate="no"><span·class="attribute">-spec</span>·crc32(OldCrc,·Data)·->·<a·href="#t:non_neg_integer/0">non_neg_integer</a>()·when·OldCrc·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),·Data·::·<a·href="#t:iodata/0">iodata</a>().</pre>7126 ··········<pre·translate="no"><span·class="attribute">-spec</span>·crc32(OldCrc,·Data)·->·<a·href="#t:non_neg_integer/0">non_neg_integer</a>()·when·OldCrc·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),·Data·::·<a·href="#t:iodata/0">iodata</a>().</pre>
  
7127 ······</div>7127 ······</div>
  
7128 <p>Continues·computing·the·crc32·checksum·by·combining·the·previous·checksum,7128 <p>Continues·computing·the·crc32·checksum·by·combining·the·previous·checksum,
7129 <code·class="inline">OldCrc</code>,·with·the·checksum·of·<code·class="inline">Data</code>.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="1528519952-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="1528519952-1">)</span><span·class="p">,</span><span·class="w">7129 <code·class="inline">OldCrc</code>,·with·the·checksum·of·<code·class="inline">Data</code>.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="1241243478-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="1241243478-1">)</span><span·class="p">,</span><span·class="w">
7130 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="1528519952-2">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="1528519952-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Y</code>·as·this:</[·...·truncated·by·diffoscope;·len:·509,·SHA:·f2694c221ee0b463e7019dc1f5921c9a37c8bbf1d685e2a08f6e66fe4fd1948f·...·]-1">)</span><span·class="p">.</span></code></pre>7130 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="1241243478-2">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="1241243478-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Y</code>·as·this:</[·...·truncated·by·diffoscope;·len:·509,·SHA:·c031a4c220be24fea61cb4b085b3cd170eb6d02a3cf23be2ff78ca9e5e8836e1·...·]-1">)</span><span·class="p">.</span></code></pre>
7131 ··</section>7131 ··</section>
7132 </section>7132 </section>
7133 <section·class="detail"·id="crc32_combine/3">7133 <section·class="detail"·id="crc32_combine/3">
  
7134 ··<div·class="detail-header">7134 ··<div·class="detail-header">
7135 ····<a·href="#crc32_combine/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">7135 ····<a·href="#crc32_combine/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
7136 ······<i·class="ri-link-m"·aria-hidden="true"></i>7136 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 7159, 18 lines modifiedOffset 7159, 18 lines modified
7159 ···························FirstCrc·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),7159 ···························FirstCrc·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),
7160 ···························SecondCrc·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),7160 ···························SecondCrc·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>(),
7161 ···························SecondSize·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>().</pre>7161 ···························SecondSize·::·<a·href="#t:non_neg_integer/0">non_neg_integer</a>().</pre>
  
7162 ······</div>7162 ······</div>
  
7163 <p>Combines·two·previously·computed·crc32·checksums.</p><p>This·computation·requires·the·size·of·the·data·object·for·the·second·checksum7163 <p>Combines·two·previously·computed·crc32·checksums.</p><p>This·computation·requires·the·size·of·the·data·object·for·the·second·checksum
7164 to·be·known.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="0463512739-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="0463512739-1">)</span><span·class="p">,</span><span·class="w">7164 to·be·known.</p><p>The·following·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="8812698622-1">(</span><span·class="n">Data1</span><span·class="p"·data-group-id="8812698622-1">)</span><span·class="p">,</span><span·class="w">
7165 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="0463512739-2">(</span><span·class="n">Y</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="0463512739-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Z</code>·as·this:<[·...·truncated·by·diffoscope;·len:·352,·SHA:·079d4ad56588270d1cbe85305e6164ff8b3a37167e3d70b38b0d67f053bbd9cb·...·]-1">)</span><span·class="p">,</span><span·class="w">7165 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="8812698622-2">(</span><span·class="n">Y</span><span·class="p">,</span><span·class="n">Data2</span><span·class="p"·data-group-id="8812698622-2">)</span><span·class="p">.</span></code></pre><p>assigns·the·same·value·to·<code·class="inline">Z</code>·as·this:<[·...·truncated·by·diffoscope;·len:·352,·SHA:·d6fb9e2208251d1860e32f3e955ec8cd1562288d6d2980a06907122db5a59132·...·]-1">)</span><span·class="p">,</span><span·class="w">
7166 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="1661973259-2">(</span><span·class="n">Data2</span><span·class="p"·data-group-id="1661973259-2">)</span><span·class="p">,</span><span·class="w">7166 </span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32</span><span·class="p"·data-group-id="0854519400-2">(</span><span·class="n">Data2</span><span·class="p"·data-group-id="0854519400-2">)</span><span·class="p">,</span><span·class="w">
7167 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32_combine</span><span·class="p"·data-group-id="1661973259-3">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">,</span><span·class="nf">iolist_size</span><span·class="p"·data-group-id="1661973259-4">(</span><span·class="n">Data2</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·bc91209e57a3c523198da761f67ada7fcc632c82e23fe9252be812d8e7f83b8a·...·]-3">)</span><span·class="p">.</span></code></pre>7167 </span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">crc32_combine</span><span·class="p"·data-group-id="0854519400-3">(</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p">,</span><span·class="nf">iolist_size</span><span·class="p"·data-group-id="0854519400-4">(</span><span·class="n">Data2</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·0dc73405e4316e165bcda327e8bd93fa9d708803939bdbd27954fad14f1509b3·...·]-3">)</span><span·class="p">.</span></code></pre>
7168 ··</section>7168 ··</section>
7169 </section>7169 </section>
7170 <section·class="detail"·id="md5/1">7170 <section·class="detail"·id="md5/1">
  
7171 ··<div·class="detail-header">7171 ··<div·class="detail-header">
7172 ····<a·href="#md5/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">7172 ····<a·href="#md5/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
7173 ······<i·class="ri-link-m"·aria-hidden="true"></i>7173 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 8386, 19 lines modifiedOffset 8386, 19 lines modified
8386 the·<code·class="inline">Info</code>·map·in·the·returned·result·will·contain·the·key·<code·class="inline">node_type</code>8386 the·<code·class="inline">Info</code>·map·in·the·returned·result·will·contain·the·key·<code·class="inline">node_type</code>
8387 associated·with·the·value·<code·class="inline">NodeTypeInfo</code>.·Currently·the·following·node·types8387 associated·with·the·value·<code·class="inline">NodeTypeInfo</code>.·Currently·the·following·node·types
8388 exist:</p><ul><li><p><strong><code·class="inline">visible</code></strong>·-·The·node·is·connected·to·the·node·of·the·calling·process8388 exist:</p><ul><li><p><strong><code·class="inline">visible</code></strong>·-·The·node·is·connected·to·the·node·of·the·calling·process
8389 through·an·ordinary·visible·connection.·That·is,·the·node·name·would·appear8389 through·an·ordinary·visible·connection.·That·is,·the·node·name·would·appear
8390 in·the·result·returned·by·<a·href="#nodes/0"><code·class="inline">nodes/0</code></a>.</p></li><li><p><strong><code·class="inline">hidden</code></strong>·-·The·node·is·connected·to·the·node·of·the·calling·process8390 in·the·result·returned·by·<a·href="#nodes/0"><code·class="inline">nodes/0</code></a>.</p></li><li><p><strong><code·class="inline">hidden</code></strong>·-·The·node·is·connected·to·the·node·of·the·calling·process
8391 through·a·hidden·connection.·That·is,·the·node·name·would·<em>not</em>·appear·in8391 through·a·hidden·connection.·That·is,·the·node·name·would·<em>not</em>·appear·in
8392 the·result·returned·by·<a·href="#nodes/0"><code·class="inline">nodes/0</code></a>.</p></li><li><p><strong><code·class="inline">this</code></strong>·-·This·is·the·node·of·the·calling·process.</p></li><li><p><strong><code·class="inline">known</code></strong>·-·The·node·is·not·connected·but·known·to·the·node·of·the·calling8392 the·result·returned·by·<a·href="#nodes/0"><code·class="inline">nodes/0</code></a>.</p></li><li><p><strong><code·class="inline">this</code></strong>·-·This·is·the·node·of·the·calling·process.</p></li><li><p><strong><code·class="inline">known</code></strong>·-·The·node·is·not·connected·but·known·to·the·node·of·the·calling
8393 process.</p></li></ul></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(a@localhost)1&gt;·</span><span·class="nf">nodes</span><span·class="p"·data-group-id="2933917418-1">(</span><span·class="p"·data-group-id="2933917418-2">[</span><span·class="ss">this</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">connected</span><span·class="p"·data-group-id="2933917418-2">]</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·407,·SHA:·1b6ef8a7630741075823fe0a37b24a4edb3f5519425c3c96261a4f94c45d0f3a·...·]-1">)</span><span·class="p">.</span><span·class="w">8393 process.</p></li></ul></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(a@localhost)1&gt;·</span><span·class="nf">nodes</span><span·class="p"·data-group-id="5134952683-1">(</span><span·class="p"·data-group-id="5134952683-2">[</span><span·class="ss">this</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">connected</span><span·class="p"·data-group-id="5134952683-2">]</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·407,·SHA:·e9a12171047ea59f7d83a47d860d4cf30bb85b27351534c730e380107f9122e1·...·]-1">)</span><span·class="p">.</span><span·class="w">
8394 </span><span·class="p"·data-group-id="2933917418-4">[</span><span·class="p"·data-group-id="2933917418-5">{</span><span·class="ss">c@localhost</span><span·class="p">,</span><span·class="p"·data-group-id="2933917418-6">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·334,·SHA:·d1d8a9c48b8f6403c6e7b37abb62d629e20c77c641d95692a7c72e70d691514e·...·]-5">}</span><span·class="p">,</span><span·class="w">8394 </span><span·class="p"·data-group-id="5134952683-4">[</span><span·class="p"·data-group-id="5134952683-5">{</span><span·class="ss">c@localhost</span><span·class="p">,</span><span·class="p"·data-group-id="5134952683-6">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·334,·SHA:·b607fdb2e49cb5321d633666e72bf5c0f96f97dca30baaa98d31bb08e17d8817·...·]-5">}</span><span·class="p">,</span><span·class="w">
8395 ·</span><span·class="p"·data-group-id="2933917418-7">{</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="p"·data-group-id="2933917418-8">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·281,·SHA:·09d8ebdd0c227d6ca6f4b93313594146076fb7e9d1054851968ee7ef4af82706·...·]-7">}</span><span·class="p">,</span><span·class="w">8395 ·</span><span·class="p"·data-group-id="5134952683-7">{</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="p"·data-group-id="5134952683-8">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·281,·SHA:·0dc10dc47f88cf71c58f0dae5df0244fc9d15c38c12b31d9298fb7e94d2688d2·...·]-7">}</span><span·class="p">,</span><span·class="w">
8396 ·</span><span·class="p"·data-group-id="2933917418-9">{</span><span·class="ss">a@localhost</span><span·class="p">,</span><span·class="p"·data-group-id="2933917418-10">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·335,·SHA:·4f3e1103f543ea31231b825529a66118be6e277b4944d7385d2e6d1bd29d442d·...·]-4">]</span><span·class="w">8396 ·</span><span·class="p"·data-group-id="5134952683-9">{</span><span·class="ss">a@localhost</span><span·class="p">,</span><span·class="p"·data-group-id="5134952683-10">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·335,·SHA:·e1fd37f4fa65c05bad8af86ee532d2437da2468e2b30c0fde16ad243178f46ae·...·]-4">]</span><span·class="w">
8397 </span><span·class="p"·data-group-id="2933917418-11">(</span><span·class="ss">a@localhost</span><span·class="p"·data-group-id="2933917418-11">)</span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre>8397 </span><span·class="p"·data-group-id="5134952683-11">(</span><span·class="ss">a@localhost</span><span·class="p"·data-group-id="5134952683-11">)</span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre>
8398 ··</section>8398 ··</section>
8399 </section>8399 </section>
8400 <section·class="detail"·id="set_cookie/1">8400 <section·class="detail"·id="set_cookie/1">
  
8401 ··<div·class="detail-header">8401 ··<div·class="detail-header">
8402 ····<a·href="#set_cookie/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">8402 ····<a·href="#set_cookie/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
8403 ······<i·class="ri-link-m"·aria-hidden="true"></i>8403 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 8500, 17 lines modifiedOffset 8500, 17 lines modified
  
8500 ··········<pre·translate="no"><span·class="attribute">-spec</span>·abs(Float)·->·<a·href="#t:float/0">float</a>()·when·Float·::·<a·href="#t:float/0">float</a>();8500 ··········<pre·translate="no"><span·class="attribute">-spec</span>·abs(Float)·->·<a·href="#t:float/0">float</a>()·when·Float·::·<a·href="#t:float/0">float</a>();
8501 ·········(Int)·->·<a·href="#t:non_neg_integer/0">non_neg_integer</a>()·when·Int·::·<a·href="#t:integer/0">integer</a>().</pre>8501 ·········(Int)·->·<a·href="#t:non_neg_integer/0">non_neg_integer</a>()·when·Int·::·<a·href="#t:integer/0">integer</a>().</pre>
  
8502 ······</div>8502 ······</div>
  
8503 <p>Returns·an·integer·or·float·that·is·the·arithmetical·absolute·value·of·<code·class="inline">Float</code>8503 <p>Returns·an·integer·or·float·that·is·the·arithmetical·absolute·value·of·<code·class="inline">Float</code>
8504 or·<code·class="inline">Int</code>.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">abs</span><span·class="p"·data-group-id="6776606810-1">(</span><span·class="o">-</span><span·class="mf">3.33</span><span·class="p"·data-group-id="6776606810-1">)</span><span·class="p">.</span><span·class="w">8504 or·<code·class="inline">Int</code>.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">abs</span><span·class="p"·data-group-id="5365574048-1">(</span><span·class="o">-</span><span·class="mf">3.33</span><span·class="p"·data-group-id="5365574048-1">)</span><span·class="p">.</span><span·class="w">
8505 </span><span·class="mf">3.33</span><span·class="gp·unselectable">8505 </span><span·class="mf">3.33</span><span·class="gp·unselectable">
8506 &gt;·</span><span·class="nf">abs</span><span·class="p"·data-group-id="6776606810-2">(</span><span·class="o">-</span><span·class="mi">3</span><span·class="p"·data-group-id="6776606810-2">)</span><span·class="p">.</span><span·class="w">8506 &gt;·</span><span·class="nf">abs</span><span·class="p"·data-group-id="5365574048-2">(</span><span·class="o">-</span><span·class="mi">3</span><span·class="p"·data-group-id="5365574048-2">)</span><span·class="p">.</span><span·class="w">
8507 </span><span·class="mi">3</span></code></pre>8507 </span><span·class="mi">3</span></code></pre>
8508 ··</section>8508 ··</section>
8509 </section>8509 </section>
8510 <section·class="detail"·id="append_element/2">8510 <section·class="detail"·id="append_element/2">
  
8511 ··<div·class="detail-header">8511 ··<div·class="detail-header">
8512 ····<a·href="#append_element/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">8512 ····<a·href="#append_element/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 8534, 16 lines modifiedOffset 8534, 16 lines modified
8534 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append_element(Tuple1,·Term)·->·Tuple2·when·Tuple1·::·<a·href="#t:tuple/0">tuple</a>(),·Tuple2·::·<a·href="#t:tuple/0">tuple</a>(),·Term·::·<a·href="#t:term/0">term</a>().</pre>8534 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append_element(Tuple1,·Term)·->·Tuple2·when·Tuple1·::·<a·href="#t:tuple/0">tuple</a>(),·Tuple2·::·<a·href="#t:tuple/0">tuple</a>(),·Term·::·<a·href="#t:term/0">term</a>().</pre>
  
8535 ······</div>8535 ······</div>
  
8536 <p>Returns·a·new·tuple·that·has·one·element·more·than·<code·class="inline">Tuple1</code>,·and·contains·the8536 <p>Returns·a·new·tuple·that·has·one·element·more·than·<code·class="inline">Tuple1</code>,·and·contains·the
8537 elements·in·<code·class="inline">Tuple1</code>·followed·by·<code·class="inline">Term</code>·as·the·last·element.</p><p>Semantically·equivalent·to8537 elements·in·<code·class="inline">Tuple1</code>·followed·by·<code·class="inline">Term</code>·as·the·last·element.</p><p>Semantically·equivalent·to
8538 <a·href="#list_to_tuple/1"><code·class="inline">list_to_tuple(tuple_to_list(Tuple1)·++·[Term])</code></a>,·but·much8538 <a·href="#list_to_tuple/1"><code·class="inline">list_to_tuple(tuple_to_list(Tuple1)·++·[Term])</code></a>,·but·much
8539 faster.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">append_element</span><span·class="p"·data-group-id="2566214503-1">(</span><span·class="p"·data-group-id="2566214503-2">{</span><span·class="ss">one</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">two</span><span·class="p"·data-group-id="2566214503-2">}</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">three</span><span·class="p"·data-group-id="2566214503-1">)</span><span·class="p">.</span><span·class="w"> 
8540 </span><span·class="p"·data-group-id="2566214503-3">{</span><span·class="ss">one</span><span·class="p">,</span><span·class="ss">two</span><span·class="p">,</span><span·class="ss">three</span><span·class="p"·data-group-id="2566214503-3">}</span></code></pre>8539 faster.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">append_element</span><span·class="p"·data-group-id="9989363443-1"[·...·truncated·by·diffoscope;·len:·386,·SHA:·63bf3c5da5c98282a96a49f58eef837602251589ef79dc4ab2f44d4f82795437·...·]>
 8540 </span><span·class="p"·data-group-id="9989363443-3">{</span><span·class="ss">one</span><span·class="p">,</span><span·class="ss">two</span><span·class="p">,</span><span·class="ss">three</span><span·class="p"·data-group-id="9989363443-3">}</span></code></pre>
8541 ··</section>8541 ··</section>
8542 </section>8542 </section>
8543 <section·class="detail"·id="atom_to_binary/1">8543 <section·class="detail"·id="atom_to_binary/1">
  
8544 ··<div·class="detail-header">8544 ··<div·class="detail-header">
8545 ····<a·href="#atom_to_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">8545 ····<a·href="#atom_to_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
8546 ······<i·class="ri-link-m"·aria-hidden="true"></i>8546 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Max diff block lines reached; 580107/610619 bytes (95.00%) of diff not shown.
16.5 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/escript_cmd.html
    
Offset 127, 45 lines modifiedOffset 127, 45 lines modified
  
127 <p><code·class="inline">escript</code>·provides·support·for·running·short·Erlang·programs·without·having·to127 <p><code·class="inline">escript</code>·provides·support·for·running·short·Erlang·programs·without·having·to
128 compile·them·first,·and·an·easy·way·to·retrieve·the·command-line·arguments.128 compile·them·first,·and·an·easy·way·to·retrieve·the·command-line·arguments.
129 <code·class="inline">escript</code>s·are·created·by·either·writing·them·by·hand·or·using·<a·href="../../../lib/stdlib-6.0.1/doc/html/escript.html#create/2"><code·class="inline">escript:create/2</code></a>.</p><p>escripts·are·run·by·directly·invoking·them·(does·not·work·on·Windows):</p><pre><code·class="text">script-name.escript·[arg1·arg2...]</code></pre><p>or·by·calling·the·<code·class="inline">escript</code>·program·(works·on·all·platforms):</p><pre><code·class="text">escript·[escript-flags]·script-name.escript·[arg1·arg2...]</code></pre><p>For·example:</p><pre><code·class="text">$·chmod·u+x·factorial129 <code·class="inline">escript</code>s·are·created·by·either·writing·them·by·hand·or·using·<a·href="../../../lib/stdlib-6.0.1/doc/html/escript.html#create/2"><code·class="inline">escript:create/2</code></a>.</p><p>escripts·are·run·by·directly·invoking·them·(does·not·work·on·Windows):</p><pre><code·class="text">script-name.escript·[arg1·arg2...]</code></pre><p>or·by·calling·the·<code·class="inline">escript</code>·program·(works·on·all·platforms):</p><pre><code·class="text">escript·[escript-flags]·script-name.escript·[arg1·arg2...]</code></pre><p>For·example:</p><pre><code·class="text">$·chmod·u+x·factorial
130 $·cat·factorial</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="ch">#!/usr/bin/env·escript130 $·cat·factorial</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="ch">#!/usr/bin/env·escript
131 </span><span·class="c1">%%·-*-·erlang·-*-</span><span·class="w">131 </span><span·class="c1">%%·-*-·erlang·-*-</span><span·class="w">
132 </span><span·class="c1">%%!·-sname·factorial·-mnesia·debug·verbose</span><span·class="w">132 </span><span·class="c1">%%!·-sname·factorial·-mnesia·debug·verbose</span><span·class="w">
133 </span><span·class="nf">main</span><span·class="p"·data-group-id="9221511547-1">(</span><span·class="p"·data-group-id="9221511547-2">[</span><span·class="n">String</span><span·class="p"·data-group-id="9221511547-2">]</span><span·class="p"·data-group-id="9221511547-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">133 </span><span·class="nf">main</span><span·class="p"·data-group-id="5565327852-1">(</span><span·class="p"·data-group-id="5565327852-2">[</span><span·class="n">String</span><span·class="p"·data-group-id="5565327852-2">]</span><span·class="p"·data-group-id="5565327852-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
134 ····</span><span·class="k">try</span><span·class="w">134 ····</span><span·class="k">try</span><span·class="w">
135 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list_to_integer</span><span·class="p"·data-group-id="9221511547-3">(</span><span·class="n">String</span><span·class="p"·data-group-id="9221511547-3">)</span><span·class="p">,</span><span·class="w">135 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list_to_integer</span><span·class="p"·data-group-id="5565327852-3">(</span><span·class="n">String</span><span·class="p"·data-group-id="5565327852-3">)</span><span·class="p">,</span><span·class="w">
136 ········</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="9221511547-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="9221511547-4">)</span><span·class="p">,</span><span·class="w">136 ········</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="5565327852-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="5565327852-4">)</span><span·class="p">,</span><span·class="w">
137 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9221511547-5">(</span><span·class="s">&quot;factorial·</span><span·class="si">~w</span><span·class="s">·=·</span><span·class="si">~w</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9221511[·...·truncated·by·diffoscope;·len:·181,·SHA:·8cff0f271ff089b5d8569f656caa5f9dcc3e402b32f9c7ef34ca984bf8634191·...·]-5">)</span><span·class="w">137 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5565327852-5">(</span><span·class="s">&quot;factorial·</span><span·class="si">~w</span><span·class="s">·=·</span><span·class="si">~w</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5565327[·...·truncated·by·diffoscope;·len:·181,·SHA:·adb20b84f9757508a668e29f5269df08b75a0435f5001a1e55483b352774d5c4·...·]-5">)</span><span·class="w">
138 ····</span><span·class="k">catch</span><span·class="w">138 ····</span><span·class="k">catch</span><span·class="w">
139 ········</span><span·class="p">_</span><span·class="p">:</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">139 ········</span><span·class="p">_</span><span·class="p">:</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
140 ············</span><span·class="nf">usage</span><span·class="p"·data-group-id="9221511547-7">(</span><span·class="p"·data-group-id="9221511547-7">)</span><span·class="w">140 ············</span><span·class="nf">usage</span><span·class="p"·data-group-id="5565327852-7">(</span><span·class="p"·data-group-id="5565327852-7">)</span><span·class="w">
141 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">141 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
142 </span><span·class="nf">main</span><span·class="p"·data-group-id="9221511547-8">(</span><span·class="p">_</span><span·class="p"·data-group-id="9221511547-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">142 </span><span·class="nf">main</span><span·class="p"·data-group-id="5565327852-8">(</span><span·class="p">_</span><span·class="p"·data-group-id="5565327852-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
143 ····</span><span·class="nf">usage</span><span·class="p"·data-group-id="9221511547-9">(</span><span·class="p"·data-group-id="9221511547-9">)</span><span·class="p">.</span><span·class="w">143 ····</span><span·class="nf">usage</span><span·class="p"·data-group-id="5565327852-9">(</span><span·class="p"·data-group-id="5565327852-9">)</span><span·class="p">.</span><span·class="w">
  
144 </span><span·class="nf">usage</span><span·class="p"·data-group-id="9221511547-10">(</span><span·class="p"·data-group-id="9221511547-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">144 </span><span·class="nf">usage</span><span·class="p"·data-group-id="5565327852-10">(</span><span·class="p"·data-group-id="5565327852-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
145 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9221511547-11">(</span><span·class="s">&quot;usage:·factorial·integer\n&quot;</span><span·class="p"·data-group-id="9221511547-11">)</span><span·class="p">,</span><span·class="w">145 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5565327852-11">(</span><span·class="s">&quot;usage:·factorial·integer\n&quot;</span><span·class="p"·data-group-id="5565327852-11">)</span><span·class="p">,</span><span·class="w">
146 ····</span><span·class="nf">halt</span><span·class="p"·data-group-id="9221511547-12">(</span><span·class="mi">1</span><span·class="p"·data-group-id="9221511547-12">)</span><span·class="p">.</span><span·class="w">146 ····</span><span·class="nf">halt</span><span·class="p"·data-group-id="5565327852-12">(</span><span·class="mi">1</span><span·class="p"·data-group-id="5565327852-12">)</span><span·class="p">.</span><span·class="w">
  
147 </span><span·class="nf">fac</span><span·class="p"·data-group-id="9221511547-13">(</span><span·class="mi">0</span><span·class="p"·data-group-id="9221511547-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">147 </span><span·class="nf">fac</span><span·class="p"·data-group-id="5565327852-13">(</span><span·class="mi">0</span><span·class="p"·data-group-id="5565327852-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
148 </span><span·class="nf">fac</span><span·class="p"·data-group-id="9221511547-14">(</span><span·class="n">N</span><span·class="p"·data-group-id="9221511547-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·c[·...·truncated·by·diffoscope;·len:·212,·SHA:·dd0dbd1e89c5acc78a37ab303d2418999cbf136c43230e873d6ddf4c48800d4c·...·]-15">)</span><span·class="p">.</span></code></pre><pre><code·class="text">$·./factorial·5148 </span><span·class="nf">fac</span><span·class="p"·data-group-id="5565327852-14">(</span><span·class="n">N</span><span·class="p"·data-group-id="5565327852-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">*</span><span·c[·...·truncated·by·diffoscope;·len:·212,·SHA:·edeaf6c8701896a2e62fee0eb9733dfe23c697f530e95b522161b3ff626ec59c·...·]-15">)</span><span·class="p">.</span></code></pre><pre><code·class="text">$·./factorial·5
149 factorial·5·=·120149 factorial·5·=·120
150 $·./factorial150 $·./factorial
151 usage:·factorial·integer151 usage:·factorial·integer
152 $·./factorial·five152 $·./factorial·five
153 usage:·factorial·integer</code></pre><p>The·header·of·the·Erlang·script·in·the·example·differs·from·a·normal·Erlang153 usage:·factorial·integer</code></pre><p>The·header·of·the·Erlang·script·in·the·example·differs·from·a·normal·Erlang
154 module.·The·first·line·is·intended·to·be·the·interpreter·line,·which·invokes154 module.·The·first·line·is·intended·to·be·the·interpreter·line,·which·invokes
155 <code·class="inline">escript</code>.</p><p>However,·if·you·invoke·the·<code·class="inline">escript</code>·as·follows,·the·contents·of·the·first·line155 <code·class="inline">escript</code>.</p><p>However,·if·you·invoke·the·<code·class="inline">escript</code>·as·follows,·the·contents·of·the·first·line
156 do·not·matter,·but·it·cannot·contain·Erlang·code·as·it·will·be·ignored:</p><pre><code·class="text">$·escript·factorial·5</code></pre><p>The·second·line·in·the·example·contains·an·optional·directive·to·the·<code·class="inline">Emacs</code>156 do·not·matter,·but·it·cannot·contain·Erlang·code·as·it·will·be·ignored:</p><pre><code·class="text">$·escript·factorial·5</code></pre><p>The·second·line·in·the·example·contains·an·optional·directive·to·the·<code·class="inline">Emacs</code>
157 editor,·which·causes·it·to·enter·the·major·mode·for·editing·Erlang·source·files.157 editor,·which·causes·it·to·enter·the·major·mode·for·editing·Erlang·source·files.
158 If·the·directive·is·present,·it·must·be·located·on·the·second·line.</p><p>If·a·comment·selecting·the·<a·href="../../../lib/stdlib-6.0.1/doc/html/epp.html#encoding">encoding</a>·exists,·it·can·be158 If·the·directive·is·present,·it·must·be·located·on·the·second·line.</p><p>If·a·comment·selecting·the·<a·href="../../../lib/stdlib-6.0.1/doc/html/epp.html#encoding">encoding</a>·exists,·it·can·be
159 located·on·the·second·line.</p><blockquote><h4·class="info">Note</h4><p>The·encoding·specified·by·the·above·mentioned·comment·applies·to·the·script159 located·on·the·second·line.</p><blockquote><h4·class="info">Note</h4><p>The·encoding·specified·by·the·above·mentioned·comment·applies·to·the·script
160 itself.·The·encoding·of·the·I/O-server,·however,·must·be·set·explicitly·as160 itself.·The·encoding·of·the·I/O-server,·however,·must·be·set·explicitly·as
161 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">setopts</span><span·class="p"·data-group-id="7230598492-1">(</span><span·class="p"·data-group-id="7230598492-2">[</span><span·class="p"·data-group-id="7230598492-3">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·129,·SHA:·35a3a81a7a96409565d27edfc3b8020c3706d8c8af6e1bcbf4542abd24181235·...·]-1">)</span></code></pre><p>The·default·encoding·of·the·I/O-server·for161 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">setopts</span><span·class="p"·data-group-id="8975596114-1">(</span><span·class="p"·data-group-id="8975596114-2">[</span><span·class="p"·data-group-id="8975596114-3">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·129,·SHA:·bbbe98d1750295a8b0028fd58eb3662072775d66c2fc7ff37691e5dc997ef4ae·...·]-1">)</span></code></pre><p>The·default·encoding·of·the·I/O-server·for
162 <a·href="../../../lib/stdlib-6.0.1/doc/html/io.html#t:standard_io/0"><code·class="inline">standard_io</code></a>·is·<code·class="inline">unicode</code>·if·its·supported.·(see162 <a·href="../../../lib/stdlib-6.0.1/doc/html/io.html#t:standard_io/0"><code·class="inline">standard_io</code></a>·is·<code·class="inline">unicode</code>·if·its·supported.·(see
163 section163 section
164 <a·href="../../../lib/stdlib-6.0.1/doc/html/unicode_usage.html#unicode_options_summary">Summary·of·Options</a>)·in164 <a·href="../../../lib/stdlib-6.0.1/doc/html/unicode_usage.html#unicode_options_summary">Summary·of·Options</a>)·in
165 the·STDLIB·User's·Guide.</p></blockquote><p>On·the·third·line·(or·second·line·depending·on·the·presence·of·the·Emacs165 the·STDLIB·User's·Guide.</p></blockquote><p>On·the·third·line·(or·second·line·depending·on·the·presence·of·the·Emacs
166 directive),·arguments·can·be·specified·to·the·emulator,·for·example:</p><pre><code·class="text">%%!·-sname·factorial·-mnesia·debug·verbose</code></pre><p>Such·an·argument·line·must·start·with·<code·class="inline">%%!</code>·and·the·remaining·line·is166 directive),·arguments·can·be·specified·to·the·emulator,·for·example:</p><pre><code·class="text">%%!·-sname·factorial·-mnesia·debug·verbose</code></pre><p>Such·an·argument·line·must·start·with·<code·class="inline">%%!</code>·and·the·remaining·line·is
167 interpreted·as·arguments·to·the·emulator.</p><p>If·you·know·the·location·of·the·<code·class="inline">escript</code>·executable,·the·first·line·can167 interpreted·as·arguments·to·the·emulator.</p><p>If·you·know·the·location·of·the·<code·class="inline">escript</code>·executable,·the·first·line·can
168 directly·give·the·path·to·<code·class="inline">escript</code>,·for·example:</p><pre><code·class="text">#!/usr/local/bin/escript</code></pre><p>As·any·other·type·of·scripts,·Erlang·scripts·do·not·work·on·Unix·platforms·if168 directly·give·the·path·to·<code·class="inline">escript</code>,·for·example:</p><pre><code·class="text">#!/usr/local/bin/escript</code></pre><p>As·any·other·type·of·scripts,·Erlang·scripts·do·not·work·on·Unix·platforms·if
Offset 176, 23 lines modifiedOffset 176, 23 lines modified
176 arguments·specified·to·the·script·(not·changed·or·interpreted·in·any·way).</p><p>If·the·<code·class="inline">main/1</code>·function·in·the·script·returns·successfully,·the·exit·status·for176 arguments·specified·to·the·script·(not·changed·or·interpreted·in·any·way).</p><p>If·the·<code·class="inline">main/1</code>·function·in·the·script·returns·successfully,·the·exit·status·for
177 the·script·is·<code·class="inline">0</code>.·If·an·exception·is·generated·during·execution,·a·short177 the·script·is·<code·class="inline">0</code>.·If·an·exception·is·generated·during·execution,·a·short
178 message·is·printed·and·the·script·terminates·with·exit·status·<code·class="inline">127</code>.</p><p>To·return·your·own·non-zero·exit·code,·call·<a·href="erlang.html#halt/1"><code·class="inline">halt(ExitCode)</code></a>,·for178 message·is·printed·and·the·script·terminates·with·exit·status·<code·class="inline">127</code>.</p><p>To·return·your·own·non-zero·exit·code,·call·<a·href="erlang.html#halt/1"><code·class="inline">halt(ExitCode)</code></a>,·for
179 example:</p><pre><code·class="text">halt(1).</code></pre><p>To·retrieve·the·pathname·of·the·script,·call·<a·href="../../../lib/stdlib-6.0.1/doc/html/escript.html#script_name/0"><code·class="inline">escript:script_name/0</code></a>·from·your179 example:</p><pre><code·class="text">halt(1).</code></pre><p>To·retrieve·the·pathname·of·the·script,·call·<a·href="../../../lib/stdlib-6.0.1/doc/html/escript.html#script_name/0"><code·class="inline">escript:script_name/0</code></a>·from·your
180 script·(the·pathname·is·usually,·but·not·always,·absolute).</p><p>If·the·file·contains·source·code·(as·in·the·example·above),·it·is·processed·by180 script·(the·pathname·is·usually,·but·not·always,·absolute).</p><p>If·the·file·contains·source·code·(as·in·the·example·above),·it·is·processed·by
181 the·<a·href="../../../lib/stdlib-6.0.1/doc/html/epp.html"><code·class="inline">epp</code></a>·preprocessor.·This·means·that·you,·for·example,·can·use·predefined181 the·<a·href="../../../lib/stdlib-6.0.1/doc/html/epp.html"><code·class="inline">epp</code></a>·preprocessor.·This·means·that·you,·for·example,·can·use·predefined
182 macros·(such·as·<code·class="inline">?MODULE</code>)·and·include·directives·like·the·<code·class="inline">-include_lib</code>182 macros·(such·as·<code·class="inline">?MODULE</code>)·and·include·directives·like·the·<code·class="inline">-include_lib</code>
183 directive.·For·example,·use</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4459192430-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="4459192430-1">)</span><span·class="p">.</span></code></pre><p>to·include·the·record·definitions·for·the·records·used·by·function183 directive.·For·example,·use</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="8513565608-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="8513565608-1">)</span><span·class="p">.</span></code></pre><p>to·include·the·record·definitions·for·the·records·used·by·function
184 <a·href="../../../lib/kernel-10.0.1/doc/html/file.html#read_link_info/1"><code·class="inline">file:read_link_info/1</code></a>.·You·can·also·select·encoding·by·including·an·encoding184 <a·href="../../../lib/kernel-10.0.1/doc/html/file.html#read_link_info/1"><code·class="inline">file:read_link_info/1</code></a>.·You·can·also·select·encoding·by·including·an·encoding
185 comment·here,·but·if·a·valid·encoding·comment·exists·on·the·second·line,·it185 comment·here,·but·if·a·valid·encoding·comment·exists·on·the·second·line,·it
186 takes·precedence.</p><p>The·script·is·checked·for·syntactic·and·semantic·correctness·before·it·is·run.186 takes·precedence.</p><p>The·script·is·checked·for·syntactic·and·semantic·correctness·before·it·is·run.
187 If·there·are·warnings·(such·as·unused·variables),·they·are·printed·and·the187 If·there·are·warnings·(such·as·unused·variables),·they·are·printed·and·the
188 script·will·still·be·run.·If·there·are·errors,·they·are·printed·and·the·script188 script·will·still·be·run.·If·there·are·errors,·they·are·printed·and·the·script
189 will·not·be·run·and·its·exit·status·is·<code·class="inline">127</code>.</p><p>Both·the·module·declaration·and·the·export·declaration·of·the·<code·class="inline">main/1</code>·function189 will·not·be·run·and·its·exit·status·is·<code·class="inline">127</code>.</p><p>Both·the·module·declaration·and·the·export·declaration·of·the·<code·class="inline">main/1</code>·function
190 are·optional.</p><p>By·default,·the·script·will·be·compiled·by·the·Erlang·compiler.</p><p>It·is·possible·to·force·it·to·be·interpreted·by·including·the·following·line190 are·optional.</p><p>By·default,·the·script·will·be·compiled·by·the·Erlang·compiler.</p><p>It·is·possible·to·force·it·to·be·interpreted·by·including·the·following·line
191 somewhere·in·the·script·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">mode</span><span·class="p"·data-group-id="7885465057-1">(</span><span·class="ss">interpret</span><span·class="p"·data-group-id="7885465057-1">)</span><span·class="p">.</span></code></pre><p>Execution·of·interpreted·code·is·slower·than·compiled·code,·and·some·language191 somewhere·in·the·script·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">mode</span><span·class="p"·data-group-id="0936774394-1">(</span><span·class="ss">interpret</span><span·class="p"·data-group-id="0936774394-1">)</span><span·class="p">.</span></code></pre><p>Execution·of·interpreted·code·is·slower·than·compiled·code,·and·some·language
192 constructs·will·not·work,·but·there·is·no·requirement·for·the·Erlang·compiler192 constructs·will·not·work,·but·there·is·no·requirement·for·the·Erlang·compiler
193 application·to·be·available.</p><blockquote><h4·class="info">Change</h4><p>Before·the·Erlang/OTP·27·the·script·would·be·interpreted·by·default.</p></blockquote><h2·id="precompiled-escripts"·class="section-heading">193 application·to·be·available.</p><blockquote><h4·class="info">Change</h4><p>Before·the·Erlang/OTP·27·the·script·would·be·interpreted·by·default.</p></blockquote><h2·id="precompiled-escripts"·class="section-heading">
194 ··<a·href="#precompiled-escripts"·class="hover-link">194 ··<a·href="#precompiled-escripts"·class="hover-link">
195 ····<i·class="ri-link-m"·aria-hidden="true"></i>195 ····<i·class="ri-link-m"·aria-hidden="true"></i>
196 ··</a>196 ··</a>
197 ··<span·class="text">Precompiled·escripts</span>197 ··<span·class="text">Precompiled·escripts</span>
198 </h2>198 </h2>
37.0 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/garbagecollection.html
    
Offset 133, 33 lines modifiedOffset 133, 33 lines modified
133 </h2>133 </h2>
134 <p>Each·Erlang·process·has·its·own·stack·and·heap·which·are·allocated·in·the·same·memory·block·and·grow·towards·each·other.·When·the·stack·and·the·heap·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/beam_emu.c#L387">meet</a>,·the·garbage·collector·is·triggered·and·memory·is·reclaimed.·If·not·enough·memory·was·reclaimed,·the·heap·will·grow.</p><h3·id="creating-data"·class="section-heading">134 <p>Each·Erlang·process·has·its·own·stack·and·heap·which·are·allocated·in·the·same·memory·block·and·grow·towards·each·other.·When·the·stack·and·the·heap·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/beam_emu.c#L387">meet</a>,·the·garbage·collector·is·triggered·and·memory·is·reclaimed.·If·not·enough·memory·was·reclaimed,·the·heap·will·grow.</p><h3·id="creating-data"·class="section-heading">
135 ··<a·href="#creating-data"·class="hover-link">135 ··<a·href="#creating-data"·class="hover-link">
136 ····<i·class="ri-link-m"·aria-hidden="true"></i>136 ····<i·class="ri-link-m"·aria-hidden="true"></i>
137 ··</a>137 ··</a>
138 ··<span·class="text">Creating·Data</span>138 ··<span·class="text">Creating·Data</span>
139 </h3>139 </h3>
140 <p>Terms·are·created·on·the·heap·by·evaluating·expressions.·There·are·two·major·types·of·terms:·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_term.h#L88-L97">immediate·terms</a>·which·require·no·heap·space·(small·integers,·atoms,·pids,·port·ids·etc)·and·cons·or·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_term.h#L106-L120">boxed·terms</a>·(tuple,·big·num,·binaries·etc)·that·do·require·heap·space.·Immediate·terms·do·not·need·any·heap·space·because·they·are·embedded·into·the·containing·structure.</p><p>Let's·look·at·an·example·that·returns·a·tuple·with·the·newly·created·data.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">data</span><span·class="p"·data-group-id="7768446295-1">(</span><span·class="n">Foo</span><span·class="p"·data-group-id="7768446295-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">140 <p>Terms·are·created·on·the·heap·by·evaluating·expressions.·There·are·two·major·types·of·terms:·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_term.h#L88-L97">immediate·terms</a>·which·require·no·heap·space·(small·integers,·atoms,·pids,·port·ids·etc)·and·cons·or·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_term.h#L106-L120">boxed·terms</a>·(tuple,·big·num,·binaries·etc)·that·do·require·heap·space.·Immediate·terms·do·not·need·any·heap·space·because·they·are·embedded·into·the·containing·structure.</p><p>Let's·look·at·an·example·that·returns·a·tuple·with·the·newly·created·data.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">data</span><span·class="p"·data-group-id="4434164444-1">(</span><span·class="n">Foo</span><span·class="p"·data-group-id="4434164444-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
141 ···</span><span·class="n">Cons</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7768446295-2">[</span><span·class="mi">42</span><span·class="p">|</span><span·class="n">Foo</span><span·class="p"·data-group-id="7768446295-2">]</span><span·class="p">,</span><span·class="w">141 ···</span><span·class="n">Cons</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4434164444-2">[</span><span·class="mi">42</span><span·class="p">|</span><span·class="n">Foo</span><span·class="p"·data-group-id="4434164444-2">]</span><span·class="p">,</span><span·class="w">
142 ···</span><span·class="n">Literal</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7768446295-3">{</span><span·class="ss">text</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;hello·world!&quot;</span><span·class="p"·data-group-id="7768446295-3">}</span><span·class="p">,</span><span·class="w">142 ···</span><span·class="n">Literal</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4434164444-3">{</span><span·class="ss">text</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;hello·world!&quot;</span><span·class="p"·data-group-id="4434164444-3">}</span><span·class="p">,</span><span·class="w">
143 ···</span><span·class="p"·data-group-id="7768446295-4">{</span><span·class="ss">tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cons</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Literal</span><span·class="p"·data-group-id="7768446295-4">}</span><span·class="p">.</span></code></pre><p>In·this·example·we·first·create·a·new·cons·cell·with·an·integer·and·a·tuple·with·some·text.·Then·a·tuple·of·size·three·wrapping·the·other·values·with·an·atom·tag·is·created·and·returned.</p><p>On·the·heap·tuples·require·a·word·size·for·each·of·its·elements·as·well·as·for·the·header.·Cons·cells·always·require·two·words.·Adding·these·things·together,·we·get·seven·words·for·the·tuples·and·26·words·for·the·cons·cells.·The·string·<code·class="inline">&quot;hello·world!&quot;</code>·is·a·list·of·cons·cells·and·thus·requires·24·words.·The·atom·<code·class="inline">tag</code>·and·the·integer·<code·class="inline">42</code>·do·not·require·any·additional·heap·memory·since·it·is·an·<em>immediate</em>.·Adding·all·the·terms·together,·the·heap·space·required·in·this·example·should·be·33·words.</p><p>Compiling·this·code·to·beam·assembly·(<code·class="inline">erlc·-S</code>)·shows·exactly·what·is·happening.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">143 ···</span><span·class="p"·data-group-id="4434164444-4">{</span><span·class="ss">tag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cons</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Literal</span><span·class="p"·data-group-id="4434164444-4">}</span><span·class="p">.</span></code></pre><p>In·this·example·we·first·create·a·new·cons·cell·with·an·integer·and·a·tuple·with·some·text.·Then·a·tuple·of·size·three·wrapping·the·other·values·with·an·atom·tag·is·created·and·returned.</p><p>On·the·heap·tuples·require·a·word·size·for·each·of·its·elements·as·well·as·for·the·header.·Cons·cells·always·require·two·words.·Adding·these·things·together,·we·get·seven·words·for·the·tuples·and·26·words·for·the·cons·cells.·The·string·<code·class="inline">&quot;hello·world!&quot;</code>·is·a·list·of·cons·cells·and·thus·requires·24·words.·The·atom·<code·class="inline">tag</code>·and·the·integer·<code·class="inline">42</code>·do·not·require·any·additional·heap·memory·since·it·is·an·<em>immediate</em>.·Adding·all·the·terms·together,·the·heap·space·required·in·this·example·should·be·33·words.</p><p>Compiling·this·code·to·beam·assembly·(<code·class="inline">erlc·-S</code>)·shows·exactly·what·is·happening.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
144 </span><span·class="p"·data-group-id="8264918714-1">{</span><span·class="ss">test_heap</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8264918714-1">}</span><span·class="p">.</span><span·class="w">144 </span><span·class="p"·data-group-id="3496361547-1">{</span><span·class="ss">test_heap</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3496361547-1">}</span><span·class="p">.</span><span·class="w">
145 </span><span·class="p"·data-group-id="8264918714-2">{</span><span·class="ss">put_list</span><span·class="p">,</span><span·class="p"·data-group-id="8264918714-3">{</span><span·class="ss">integer</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="8264918714-3"[·...·truncated·by·diffoscope;·len:·458,·SHA:·41ee6200d639d5894a233dc6f7379f43a4ba157c01107c50d3a29b7fc0ea37ac·...·]-2">}</span><span·class="p">.</span><span·class="w">145 </span><span·class="p"·data-group-id="3496361547-2">{</span><span·class="ss">put_list</span><span·class="p">,</span><span·class="p"·data-group-id="3496361547-3">{</span><span·class="ss">integer</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="3496361547-3"[·...·truncated·by·diffoscope;·len:·458,·SHA:·72562eb1bd57cbb7ec91c13b38aea94bbab37b5236842fd873906ecc0aa06767·...·]-2">}</span><span·class="p">.</span><span·class="w">
146 </span><span·class="p"·data-group-id="8264918714-6">{</span><span·class="ss">put_tuple</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-group-id="8264918714-7">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">0</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·b8dfa311b6a7090923183552014fc0afd3ce867dca11f539271768b83bd13b57·...·]-6">}</span><span·class="p">.</span><span·class="w">146 </span><span·class="p"·data-group-id="3496361547-6">{</span><span·class="ss">put_tuple</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-group-id="3496361547-7">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">0</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·95f2ac0866f8106fe9c97e18f9c9ec175f1f63d5cd0b97fcdba38130f5d31a0c·...·]-6">}</span><span·class="p">.</span><span·class="w">
147 </span><span·class="p"·data-group-id="8264918714-8">{</span><span·class="nb">put</span><span·class="p">,</span><span·class="p"·data-group-id="8264918714-9">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="ss">tag</span><span·class="p"·data-group-id="8264918714-9">}</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·1f82e58a8632ad423d29225db25e9feff8c6c85639ac24ae815474050a522016·...·]-8">}</span><span·class="p">.</span><span·class="w">147 </span><span·class="p"·data-group-id="3496361547-8">{</span><span·class="nb">put</span><span·class="p">,</span><span·class="p"·data-group-id="3496361547-9">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="ss">tag</span><span·class="p"·data-group-id="3496361547-9">}</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·a2414fe03b3afd063f30ad58e16798bb8ad23a1524e4ab6f66d83ac5dae6fde4·...·]-8">}</span><span·class="p">.</span><span·class="w">
148 </span><span·class="p"·data-group-id="8264918714-10">{</span><span·class="nb">put</span><span·class="p">,</span><span·class="p"·data-group-id="8264918714-11">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8264918714-11">}</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·7d477aa8bdb0993a682ff515881705d3b17cca935e3676e49f2ce04970d010e9·...·]-10">}</span><span·class="p">.</span><span·class="w">148 </span><span·class="p"·data-group-id="3496361547-10">{</span><span·class="nb">put</span><span·class="p">,</span><span·class="p"·data-group-id="3496361547-11">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3496361547-11">}</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·11bb88d60f9048461995d46daf6fac771832d23c3595c5fe245d64ed0ca6f897·...·]-10">}</span><span·class="p">.</span><span·class="w">
149 </span><span·class="p"·data-group-id="8264918714-12">{</span><span·class="nb">put</span><span·class="p">,</span><span·class="p"·data-group-id="8264918714-13">{</span><span·class="ss">literal</span><span·class="p">,</span><span·class="p"·data-group-id="8264918714-14">{</span><span·class="ss">te[·...·truncated·by·diffoscope;·len:·229,·SHA:·b612f15ad6fbd9e650c0f71a565ea8e02005747d679496bfa2b03ea6bb44e22c·...·]-12">}</span><span·class="p">.</span><span·class="w">149 </span><span·class="p"·data-group-id="3496361547-12">{</span><span·class="nb">put</span><span·class="p">,</span><span·class="p"·data-group-id="3496361547-13">{</span><span·class="ss">literal</span><span·class="p">,</span><span·class="p"·data-group-id="3496361547-14">{</span><span·class="ss">te[·...·truncated·by·diffoscope;·len:·229,·SHA:·4a2eb615addd71a098558bbf97bedfbedde82407d2b7103f2c7d74f35aff803d·...·]-12">}</span><span·class="p">.</span><span·class="w">
150 </span><span·class="ss">return</span><span·class="p">.</span></code></pre><p>Looking·at·the·assembler·code·we·can·see·three·things:·The·heap·requirement·in·this·function·turns·out·to·be·only·six·words,·as·seen·by·the·<code·class="inline">{test_heap,6,1}</code>·instruction.·All·the·allocations·are·combined·to·a·single·instruction.·The·bulk·of·the·data·<code·class="inline">{text,·&quot;hello·world!&quot;}</code>·is·a·<em>literal</em>.·Literals,·sometimes·referred·to·as·constants,·are·not·allocated·in·the·function·since·they·are·a·part·of·the·module·and·allocated·at·load·time.</p><p>If·there·is·not·enough·space·available·on·the·heap·to·satisfy·the·<code·class="inline">test_heap</code>·instructions·request·for·memory,·then·a·garbage·collection·is·initiated.·It·may·happen·immediately·in·the·<code·class="inline">test_heap</code>·instruction,·or·it·can·be·delayed·until·a·later·time·depending·on·what·state·the·process·is·in.·If·the·garbage·collection·is·delayed,·any·memory·needed·will·be·allocated·in·heap·fragments.·Heap·fragments·are·extra·memory·blocks·that·are·a·part·of·the·young·heap,·but·are·not·allocated·in·the·contiguous·area·where·terms·normally·reside.·See·<a·href="#the-young-heap">The·young·heap</a>·for·more·details.</p><h3·id="the-collector"·class="section-heading">150 </span><span·class="ss">return</span><span·class="p">.</span></code></pre><p>Looking·at·the·assembler·code·we·can·see·three·things:·The·heap·requirement·in·this·function·turns·out·to·be·only·six·words,·as·seen·by·the·<code·class="inline">{test_heap,6,1}</code>·instruction.·All·the·allocations·are·combined·to·a·single·instruction.·The·bulk·of·the·data·<code·class="inline">{text,·&quot;hello·world!&quot;}</code>·is·a·<em>literal</em>.·Literals,·sometimes·referred·to·as·constants,·are·not·allocated·in·the·function·since·they·are·a·part·of·the·module·and·allocated·at·load·time.</p><p>If·there·is·not·enough·space·available·on·the·heap·to·satisfy·the·<code·class="inline">test_heap</code>·instructions·request·for·memory,·then·a·garbage·collection·is·initiated.·It·may·happen·immediately·in·the·<code·class="inline">test_heap</code>·instruction,·or·it·can·be·delayed·until·a·later·time·depending·on·what·state·the·process·is·in.·If·the·garbage·collection·is·delayed,·any·memory·needed·will·be·allocated·in·heap·fragments.·Heap·fragments·are·extra·memory·blocks·that·are·a·part·of·the·young·heap,·but·are·not·allocated·in·the·contiguous·area·where·terms·normally·reside.·See·<a·href="#the-young-heap">The·young·heap</a>·for·more·details.</p><h3·id="the-collector"·class="section-heading">
151 ··<a·href="#the-collector"·class="hover-link">151 ··<a·href="#the-collector"·class="hover-link">
152 ····<i·class="ri-link-m"·aria-hidden="true"></i>152 ····<i·class="ri-link-m"·aria-hidden="true"></i>
153 ··</a>153 ··</a>
154 ··<span·class="text">The·collector</span>154 ··<span·class="text">The·collector</span>
155 </h3>155 </h3>
156 <p>Erlang·has·a·copying·semi-space·garbage·collector.·This·means·that·when·doing·a·garbage·collection,·the·terms·are·copied·from·one·distinct·area,·called·the·<em>from·space</em>,·to·a·new·clean·area,·called·the·<em>to·space</em>.·The·collector·starts·by·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1980">scanning·the·root-set</a>·(stack,·registers,·etc).</p><p><img·src="assets/gc-start.png"·alt="Garbage·collection:·initial·values"/></p><p>It·follows·all·the·pointers·from·the·root-set·to·the·heap·and·copies·each·term·word·by·word·to·the·<em>to·space</em>.</p><p>After·the·header·word·has·been·copied·a·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.h#L45-L46"><em>move·marker</em></a>·is·destructively·placed·in·it·pointing·to·the·term·in·the·<em>to·space</em>.·Any·other·term·that·points·to·the·already·moved·term·will·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1125">see·this·move·marker</a>·and·copy·the·referring·pointer·instead.·For·example,·if·the·have·the·following·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="4637714962-1">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="4637714962-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 <p>Erlang·has·a·copying·semi-space·garbage·collector.·This·means·that·when·doing·a·garbage·collection,·the·terms·are·copied·from·one·distinct·area,·called·the·<em>from·space</em>,·to·a·new·clean·area,·called·the·<em>to·space</em>.·The·collector·starts·by·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1980">scanning·the·root-set</a>·(stack,·registers,·etc).</p><p><img·src="assets/gc-start.png"·alt="Garbage·collection:·initial·values"/></p><p>It·follows·all·the·pointers·from·the·root-set·to·the·heap·and·copies·each·term·word·by·word·to·the·<em>to·space</em>.</p><p>After·the·header·word·has·been·copied·a·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.h#L45-L46"><em>move·marker</em></a>·is·destructively·placed·in·it·pointing·to·the·term·in·the·<em>to·space</em>.·Any·other·term·that·points·to·the·already·moved·term·will·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1125">see·this·move·marker</a>·and·copy·the·referring·pointer·instead.·For·example,·if·the·have·the·following·Erlang·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="0921209511-1">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="0921209511-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ····</span><span·class="n">T</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4637714962-2">{</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arg</span><span·class="p"·data-group-id="4637714962-2">}</span><span·class="p">,</span><span·class="w">157 ····</span><span·class="n">T</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0921209511-2">{</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arg</span><span·class="p"·data-group-id="0921209511-2">}</span><span·class="p">,</span><span·class="w">
158 ····</span><span·class="p"·data-group-id="4637714962-3">{</span><span·class="ss">wrapper</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·54,·SHA:·64af90089e7e55cbd2095e9be377cab455d82ae96d9d6878e0123b33708188b5·...·]-3">}</span><span·class="p">.</span></code></pre><p>Only·one·copy·of·T·exists·on·the·heap·and·during·the·garbage·collection·only·the·first·time·T·is·encountered·will·it·be·copied.</p><p><img·src="assets/gc-rootset-scan.png"·alt="Garbage·collection:·root·set·scan"/></p><p>After·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1089">all·terms</a>·referenced·by·the·root-set·have·been·copied,·the·collector·scans·the·<em>to·space</em>·and·copies·all·terms·that·these·terms·reference.·When·scanning,·the·collector·steps·through·each·term·on·the·<em>to·space</em>·and·any·term·still·referencing·the·<em>from·space</em>·is·copied·over·to·the·<em>to·space</em>.·Some·terms·contain·non-term·data·(the·payload·of·a·on·heap·binary·for·instance).·When·encountered·by·the·collector,·these·values·are·simply·skipped.</p><p><img·src="assets/gc-heap-scan1.png"·alt="Garbage·collection:·heap·scan"/></p><p>Every·term·object·we·can·reach·is·copied·to·the·<em>to·space</em>·and·stored·on·top·off·the·<em>scan·stop</em>·line,·and·then·the·scan·stop·is·moved·to·the·end·of·the·last·object.</p><p><img·src="assets/gc-heap-stop.png"·alt="Garbage·collection:·heap·scan"/></p><p>When·<em>scan·stop</em>·marker·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1103">catches·up</a>·to·the·<em>scan·start</em>·marker,·the·garbage·collection·is·done.·At·this·point·we·can·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1206">deallocate</a>·the·entire·<em>from·space</em>·and·therefore·reclaim·the·entire·young·heap.</p><h2·id="generational-garbage-collection"·class="section-heading">158 ····</span><span·class="p"·data-group-id="0921209511-3">{</span><span·class="ss">wrapper</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·54,·SHA:·6429678d3940d631dd68e06e0316e19fd1d81b84843fc1822889f76fa124d765·...·]-3">}</span><span·class="p">.</span></code></pre><p>Only·one·copy·of·T·exists·on·the·heap·and·during·the·garbage·collection·only·the·first·time·T·is·encountered·will·it·be·copied.</p><p><img·src="assets/gc-rootset-scan.png"·alt="Garbage·collection:·root·set·scan"/></p><p>After·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1089">all·terms</a>·referenced·by·the·root-set·have·been·copied,·the·collector·scans·the·<em>to·space</em>·and·copies·all·terms·that·these·terms·reference.·When·scanning,·the·collector·steps·through·each·term·on·the·<em>to·space</em>·and·any·term·still·referencing·the·<em>from·space</em>·is·copied·over·to·the·<em>to·space</em>.·Some·terms·contain·non-term·data·(the·payload·of·a·on·heap·binary·for·instance).·When·encountered·by·the·collector,·these·values·are·simply·skipped.</p><p><img·src="assets/gc-heap-scan1.png"·alt="Garbage·collection:·heap·scan"/></p><p>Every·term·object·we·can·reach·is·copied·to·the·<em>to·space</em>·and·stored·on·top·off·the·<em>scan·stop</em>·line,·and·then·the·scan·stop·is·moved·to·the·end·of·the·last·object.</p><p><img·src="assets/gc-heap-stop.png"·alt="Garbage·collection:·heap·scan"/></p><p>When·<em>scan·stop</em>·marker·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1103">catches·up</a>·to·the·<em>scan·start</em>·marker,·the·garbage·collection·is·done.·At·this·point·we·can·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1206">deallocate</a>·the·entire·<em>from·space</em>·and·therefore·reclaim·the·entire·young·heap.</p><h2·id="generational-garbage-collection"·class="section-heading">
159 ··<a·href="#generational-garbage-collection"·class="hover-link">159 ··<a·href="#generational-garbage-collection"·class="hover-link">
160 ····<i·class="ri-link-m"·aria-hidden="true"></i>160 ····<i·class="ri-link-m"·aria-hidden="true"></i>
161 ··</a>161 ··</a>
162 ··<span·class="text">Generational·Garbage·Collection</span>162 ··<span·class="text">Generational·Garbage·Collection</span>
163 </h2>163 </h2>
164 <p>In·addition·to·the·collection·algorithm·described·above,·the·Erlang·garbage·collector·also·provides·generational·garbage·collection.·An·additional·heap,·called·the·old·heap,·is·used·where·the·long·lived·data·is·stored.·The·original·heap·is·called·the·young·heap,·or·sometimes·the·allocation·heap.</p><p>With·this·in·mind·we·can·look·at·the·Erlang's·garbage·collection·again.·During·the·copy·stage·anything·that·should·be·copied·to·the·young·<em>to·space</em>·is·instead·copied·to·the·old·<em>to·space</em>·<em>if</em>·it·is·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1127">below·the·<em>high-watermark</em></a>.</p><p><img·src="assets/gc-watermark.png"·alt="Garbage·collection:·heap·scan"/></p><p>The·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_process.h#L1021"><em>high-watermark</em></a>·is·placed·where·the·previous·garbage·collection·(described·in·<a·href="#overview">Overview</a>)·ended·and·we·have·introduced·a·new·area·called·the·old·heap.·When·doing·the·normal·garbage·collection·pass,·any·term·that·is·located·below·the·high-watermark·is·copied·to·the·old·<em>to·space</em>·instead·of·the·young.</p><p><img·src="assets/gc-watermark-2.png"·alt="Garbage·collection:·heap·scan"/></p><p>In·the·next·garbage·collection,·any·pointers·to·the·old·heap·will·be·ignored·and·not·scanned.·This·way·the·garbage·collector·does·not·have·to·scan·the·long-lived·terms.</p><p>Generational·garbage·collection·aims·to·increase·performance·at·the·expense·of·memory.·This·is·achieved·because·only·the·young,·smaller,·heap·is·considered·in·most·garbage·collections.</p><p>The·generational·hypothesis·predicts·that·most·terms·tend·to·die·young·(see·D.·Ungar·in·<a·href="#references">References</a>),·and·for·an·immutable·language·such·as·Erlang,·young·terms·die·even·faster·than·in·other·languages.·So·for·most·usage·patterns·the·data·in·the·new·heap·will·die·very·soon·after·it·is·allocated.·This·is·good·because·it·limits·the·amount·of·data·copied·to·the·old·heap·and·also·because·the·garbage·collection·algorithm·used·is·proportional·to·the·amount·of·live·data·on·the·heap.</p><p>One·critical·issue·to·note·here·is·that·any·term·on·the·young·heap·can·reference·terms·on·the·old·heap·but·<em>no</em>·term·on·the·old·heap·may·refer·to·a·term·on·the·young·heap.·This·is·due·to·the·nature·of·the·copy·algorithm.·Anything·referenced·by·an·old·heap·term·is·not·included·in·the·reference·tree,·root-set·and·its·followers,·and·hence·is·not·copied.·If·it·was,·the·data·would·be·lost,·fire·and·brimstone·would·rise·to·cover·the·earth.·Fortunately,·this·comes·naturally·for·Erlang·because·the·terms·are·immutable·and·thus·there·can·be·no·pointers·modified·on·the·old·heap·to·point·to·the·young·heap.</p><p>To·reclaim·data·from·the·old·heap,·both·young·and·old·heaps·are·included·during·the·collection·and·copied·to·a·common·<em>to·space</em>.·Both·the·<em>from·space</em>·of·the·young·and·old·heap·are·then·deallocated·and·the·procedure·will·start·over·from·the·beginning.·This·type·of·garbage·collection·is·called·a·full·sweep·and·is·triggered·when·the·size·of·the·area·under·the·high-watermark·is·larger·than·the·size·of·the·free·area·of·the·old·heap.·It·can·also·be·triggered·by·doing·a·manual·call·to·<a·href="http://erlang.org/doc/man/erlang.html#garbage_collect-0">erlang:garbage_collect()</a>,·or·by·running·into·the·young·garbage·collection·limit·set·by·[spawn_opt(fun(),<a·href="http://erlang.org/doc/man/erlang.html#spawn_opt-4">{fullsweep_after,·N}])</a>·where·N·is·the·number·of·young·garbage·collections·to·do·before·forcing·a·garbage·collection·of·both·young·and·old·heap.</p><h2·id="the-young-heap"·class="section-heading">164 <p>In·addition·to·the·collection·algorithm·described·above,·the·Erlang·garbage·collector·also·provides·generational·garbage·collection.·An·additional·heap,·called·the·old·heap,·is·used·where·the·long·lived·data·is·stored.·The·original·heap·is·called·the·young·heap,·or·sometimes·the·allocation·heap.</p><p>With·this·in·mind·we·can·look·at·the·Erlang's·garbage·collection·again.·During·the·copy·stage·anything·that·should·be·copied·to·the·young·<em>to·space</em>·is·instead·copied·to·the·old·<em>to·space</em>·<em>if</em>·it·is·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L1127">below·the·<em>high-watermark</em></a>.</p><p><img·src="assets/gc-watermark.png"·alt="Garbage·collection:·heap·scan"/></p><p>The·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_process.h#L1021"><em>high-watermark</em></a>·is·placed·where·the·previous·garbage·collection·(described·in·<a·href="#overview">Overview</a>)·ended·and·we·have·introduced·a·new·area·called·the·old·heap.·When·doing·the·normal·garbage·collection·pass,·any·term·that·is·located·below·the·high-watermark·is·copied·to·the·old·<em>to·space</em>·instead·of·the·young.</p><p><img·src="assets/gc-watermark-2.png"·alt="Garbage·collection:·heap·scan"/></p><p>In·the·next·garbage·collection,·any·pointers·to·the·old·heap·will·be·ignored·and·not·scanned.·This·way·the·garbage·collector·does·not·have·to·scan·the·long-lived·terms.</p><p>Generational·garbage·collection·aims·to·increase·performance·at·the·expense·of·memory.·This·is·achieved·because·only·the·young,·smaller,·heap·is·considered·in·most·garbage·collections.</p><p>The·generational·hypothesis·predicts·that·most·terms·tend·to·die·young·(see·D.·Ungar·in·<a·href="#references">References</a>),·and·for·an·immutable·language·such·as·Erlang,·young·terms·die·even·faster·than·in·other·languages.·So·for·most·usage·patterns·the·data·in·the·new·heap·will·die·very·soon·after·it·is·allocated.·This·is·good·because·it·limits·the·amount·of·data·copied·to·the·old·heap·and·also·because·the·garbage·collection·algorithm·used·is·proportional·to·the·amount·of·live·data·on·the·heap.</p><p>One·critical·issue·to·note·here·is·that·any·term·on·the·young·heap·can·reference·terms·on·the·old·heap·but·<em>no</em>·term·on·the·old·heap·may·refer·to·a·term·on·the·young·heap.·This·is·due·to·the·nature·of·the·copy·algorithm.·Anything·referenced·by·an·old·heap·term·is·not·included·in·the·reference·tree,·root-set·and·its·followers,·and·hence·is·not·copied.·If·it·was,·the·data·would·be·lost,·fire·and·brimstone·would·rise·to·cover·the·earth.·Fortunately,·this·comes·naturally·for·Erlang·because·the·terms·are·immutable·and·thus·there·can·be·no·pointers·modified·on·the·old·heap·to·point·to·the·young·heap.</p><p>To·reclaim·data·from·the·old·heap,·both·young·and·old·heaps·are·included·during·the·collection·and·copied·to·a·common·<em>to·space</em>.·Both·the·<em>from·space</em>·of·the·young·and·old·heap·are·then·deallocated·and·the·procedure·will·start·over·from·the·beginning.·This·type·of·garbage·collection·is·called·a·full·sweep·and·is·triggered·when·the·size·of·the·area·under·the·high-watermark·is·larger·than·the·size·of·the·free·area·of·the·old·heap.·It·can·also·be·triggered·by·doing·a·manual·call·to·<a·href="http://erlang.org/doc/man/erlang.html#garbage_collect-0">erlang:garbage_collect()</a>,·or·by·running·into·the·young·garbage·collection·limit·set·by·[spawn_opt(fun(),<a·href="http://erlang.org/doc/man/erlang.html#spawn_opt-4">{fullsweep_after,·N}])</a>·where·N·is·the·number·of·young·garbage·collections·to·do·before·forcing·a·garbage·collection·of·both·young·and·old·heap.</p><h2·id="the-young-heap"·class="section-heading">
165 ··<a·href="#the-young-heap"·class="hover-link">165 ··<a·href="#the-young-heap"·class="hover-link">
Offset 175, 19 lines modifiedOffset 175, 19 lines modified
175 </h2>175 </h2>
176 <p>As·mentioned·in·the·Overview·the·size·of·the·heap·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L247">grows</a>·to·accommodate·more·data.·Heaps·grow·in·two·stages,·first·a·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L199-L208">variation·of·the·Fibonacci·sequence</a>·is·used·starting·at·233·words.·Then·at·about·1·mega·words·the·heap·only·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L215-L227">grows·in·20%·increments</a>.</p><p>There·are·two·occasions·when·the·young·heap·grows:</p><ul><li>if·the·total·size·of·the·heap·+·message·and·heap·fragments·exceeds·the·current·heap·size.</li><li>if·after·a·fullsweep,·the·total·amount·of·live·objects·is·greater·than·75%.</li></ul><p>There·are·two·occasions·when·the·young·heap·is·shrunk:</p><ul><li>if·after·a·young·collection,·the·total·amount·of·live·objects·is·less·than·25%·of·the·heap·and·the·young·heap·is·&quot;big&quot;</li><li>if·after·a·fullsweep,·the·total·amount·of·live·objects·is·less·than·25%·of·the·heap.</li></ul><p>The·old·heap·is·always·one·step·ahead·in·the·heap·growth·stages·than·the·young·heap.</p><h2·id="literals"·class="section-heading">176 <p>As·mentioned·in·the·Overview·the·size·of·the·heap·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L247">grows</a>·to·accommodate·more·data.·Heaps·grow·in·two·stages,·first·a·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L199-L208">variation·of·the·Fibonacci·sequence</a>·is·used·starting·at·233·words.·Then·at·about·1·mega·words·the·heap·only·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L215-L227">grows·in·20%·increments</a>.</p><p>There·are·two·occasions·when·the·young·heap·grows:</p><ul><li>if·the·total·size·of·the·heap·+·message·and·heap·fragments·exceeds·the·current·heap·size.</li><li>if·after·a·fullsweep,·the·total·amount·of·live·objects·is·greater·than·75%.</li></ul><p>There·are·two·occasions·when·the·young·heap·is·shrunk:</p><ul><li>if·after·a·young·collection,·the·total·amount·of·live·objects·is·less·than·25%·of·the·heap·and·the·young·heap·is·&quot;big&quot;</li><li>if·after·a·fullsweep,·the·total·amount·of·live·objects·is·less·than·25%·of·the·heap.</li></ul><p>The·old·heap·is·always·one·step·ahead·in·the·heap·growth·stages·than·the·young·heap.</p><h2·id="literals"·class="section-heading">
177 ··<a·href="#literals"·class="hover-link">177 ··<a·href="#literals"·class="hover-link">
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Literals</span>180 ··<span·class="text">Literals</span>
181 </h2>181 </h2>
182 <p>When·garbage·collecting·a·heap·(young·or·old)·all·literals·are·left·in·place·and·not·copied.·To·figure·out·if·a·term·should·be·copied·or·not·when·doing·a·garbage·collection·the·following·pseudo·code·is·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">if</span><span·class="w">·</span><span·class="p"·data-group-id="5967123613-1">(</span><span·class="nf">erts_is_literal</span><span·class="p"·data-group-id="5967123613-2">(</span><span·class="ss">ptr</span><span·class="p"·data-group-id="5967123613-2">)</span><span·class="w">·</span><span·class="p">||</span><span·class="[·...·truncated·by·diffoscope;·len:·568,·SHA:·57d9331d2b4e40a54e9598caf7e1998155b0a87542592baa66d733ca6eb7e7ab·...·]-5">{</span><span·class="w">182 <p>When·garbage·collecting·a·heap·(young·or·old)·all·literals·are·left·in·place·and·not·copied.·To·figure·out·if·a·term·should·be·copied·or·not·when·doing·a·garbage·collection·the·following·pseudo·code·is·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">if</span><span·class="w">·</span><span·class="p"·data-group-id="6268169912-1">(</span><span·class="nf">erts_is_literal</span><span·class="p"·data-group-id="6268169912-2">(</span><span·class="ss">ptr</span><span·class="p"·data-group-id="6268169912-2">)</span><span·class="w">·</span><span·class="p">||</span><span·class="[·...·truncated·by·diffoscope;·len:·568,·SHA:·b3fb0ff4ee0c3dc64809675084f281ee2341247958a81a74b98330e2dbaa12fd·...·]-5">{</span><span·class="w">
183 ··</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">literal</span><span·class="w">·</span><span·class="ow">or</span><span·class="w">·</span><span·class="ss">non</span><span·class="w">·</span><span·class="ss">fullsweep</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">copy</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">183 ··</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">literal</span><span·class="w">·</span><span·class="ow">or</span><span·class="w">·</span><span·class="ss">non</span><span·class="w">·</span><span·class="ss">fullsweep</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">copy</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
184 </span><span·class="p"·data-group-id="5967123613-5">}</span><span·class="w">·</span><span·class="k">else</span><span·class="w">·</span><span·class="p"·data-group-id="5967123613-6">{</span><span·class="w">184 </span><span·class="p"·data-group-id="6268169912-5">}</span><span·class="w">·</span><span·class="k">else</span><span·class="w">·</span><span·class="p"·data-group-id="6268169912-6">{</span><span·class="w">
185 ··</span><span·class="nf">copy</span><span·class="p"·data-group-id="5967123613-7">(</span><span·class="ss">ptr</span><span·class="p"·data-group-id="5967123613-7">)</span><span·class="p">;</span><span·class="w">185 ··</span><span·class="nf">copy</span><span·class="p"·data-group-id="6268169912-7">(</span><span·class="ss">ptr</span><span·class="p"·data-group-id="6268169912-7">)</span><span·class="p">;</span><span·class="w">
186 </span><span·class="p"·data-group-id="5967123613-6">}</span></code></pre><p>The·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/global.h#L1452-L1465"><code·class="inline">erts_is_literal</code></a>·check·works·differently·on·different·architectures·and·operating·systems.</p><p>On·64·bit·systems·that·allow·mapping·of·unreserved·virtual·memory·areas·(most·operating·systems·except·Windows),·an·area·of·size·1·GB·(by·default)·is·mapped·and·then·all·literals·are·placed·within·that·area.·Then·all·that·has·to·be·done·to·determine·if·something·is·a·literal·or·not·is·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_alloc.h#L322-L324">two·quick·pointer·checks</a>.·This·system·relies·on·the·fact·that·a·memory·page·that·has·not·been·touched·yet·does·not·take·any·actual·space.·So·even·if·1·GB·of·virtual·memory·is·mapped,·only·the·memory·which·is·actually·needed·for·literals·is·allocated·in·ram.·The·size·of·the·literal·area·is·configurable·through·the·+MIscs·erts_alloc·option.</p><p>On·32·bit·systems,·there·is·not·enough·virtual·memory·space·to·allocate·1·GB·for·just·literals,·so·instead·small·256·KB·sized·literal·regions·are·created·on·demand·and·a·card·mark·bit-array·of·the·entire·32·bit·memory·space·is·then·used·to·determine·if·a·term·is·a·literal·or·not.·Since·the·total·memory·space·is·only·32·bits,·the·card·mark·bit-array·is·only·256·words·large.·On·a·64·bit·system·the·same·bit-array·would·have·to·be·1·tera·words·large,·so·this·technique·is·only·viable·on·32·bit·systems.·Doing·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_alloc.h#L316-L319">lookups·in·the·array</a>·is·a·little·more·expensive·then·just·doing·the·pointer·checks·that·can·be·done·in·64·bit·systems,·but·not·extremely·so.</p><p>On·64·bit·windows,·on·which·erts_alloc·cannot·do·unreserved·virtual·memory·mappings,·a·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_term.h#L59">special·tag</a>·within·the·Erlang·term·object·is·used·to·determine·if·something·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_term.h#L248-L252">is·a·literal·or·not</a>.·This·is·very·cheap,·however,·the·tag·is·only·available·on·64·bit·machines,·and·it·is·possible·to·do·a·great·deal·of·other·nice·optimizations·with·this·tag·in·the·future·(like·for·instance·a·more·compact·list·implementation)·so·it·is·not·used·on·operating·systems·where·it·is·not·needed.</p><p>This·behaviour·is·different·from·how·it·worked·prior·to·Erlang/OTP·19.0.·Before·19.0·the·literal·check·was·done·by·checking·if·the·pointer·pointed·to·the·young·or·old·heap·block.·If·it·did·not,·then·it·was·considered·a·literal.·This·lead·to·considerable·overhead·and·strange·memory·usage·scenarios,·so·it·was·removed·in·19.0.</p><h2·id="binary-heap"·class="section-heading">186 </span><span·class="p"·data-group-id="6268169912-6">}</span></code></pre><p>The·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/global.h#L1452-L1465"><code·class="inline">erts_is_literal</code></a>·check·works·differently·on·different·architectures·and·operating·systems.</p><p>On·64·bit·systems·that·allow·mapping·of·unreserved·virtual·memory·areas·(most·operating·systems·except·Windows),·an·area·of·size·1·GB·(by·default)·is·mapped·and·then·all·literals·are·placed·within·that·area.·Then·all·that·has·to·be·done·to·determine·if·something·is·a·literal·or·not·is·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_alloc.h#L322-L324">two·quick·pointer·checks</a>.·This·system·relies·on·the·fact·that·a·memory·page·that·has·not·been·touched·yet·does·not·take·any·actual·space.·So·even·if·1·GB·of·virtual·memory·is·mapped,·only·the·memory·which·is·actually·needed·for·literals·is·allocated·in·ram.·The·size·of·the·literal·area·is·configurable·through·the·+MIscs·erts_alloc·option.</p><p>On·32·bit·systems,·there·is·not·enough·virtual·memory·space·to·allocate·1·GB·for·just·literals,·so·instead·small·256·KB·sized·literal·regions·are·created·on·demand·and·a·card·mark·bit-array·of·the·entire·32·bit·memory·space·is·then·used·to·determine·if·a·term·is·a·literal·or·not.·Since·the·total·memory·space·is·only·32·bits,·the·card·mark·bit-array·is·only·256·words·large.·On·a·64·bit·system·the·same·bit-array·would·have·to·be·1·tera·words·large,·so·this·technique·is·only·viable·on·32·bit·systems.·Doing·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_alloc.h#L316-L319">lookups·in·the·array</a>·is·a·little·more·expensive·then·just·doing·the·pointer·checks·that·can·be·done·in·64·bit·systems,·but·not·extremely·so.</p><p>On·64·bit·windows,·on·which·erts_alloc·cannot·do·unreserved·virtual·memory·mappings,·a·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_term.h#L59">special·tag</a>·within·the·Erlang·term·object·is·used·to·determine·if·something·<a·href="https://github.com/erlang/otp/blob/OTP-19.0/erts/emulator/beam/erl_term.h#L248-L252">is·a·literal·or·not</a>.·This·is·very·cheap,·however,·the·tag·is·only·available·on·64·bit·machines,·and·it·is·possible·to·do·a·great·deal·of·other·nice·optimizations·with·this·tag·in·the·future·(like·for·instance·a·more·compact·list·implementation)·so·it·is·not·used·on·operating·systems·where·it·is·not·needed.</p><p>This·behaviour·is·different·from·how·it·worked·prior·to·Erlang/OTP·19.0.·Before·19.0·the·literal·check·was·done·by·checking·if·the·pointer·pointed·to·the·young·or·old·heap·block.·If·it·did·not,·then·it·was·considered·a·literal.·This·lead·to·considerable·overhead·and·strange·memory·usage·scenarios,·so·it·was·removed·in·19.0.</p><h2·id="binary-heap"·class="section-heading">
187 ··<a·href="#binary-heap"·class="hover-link">187 ··<a·href="#binary-heap"·class="hover-link">
188 ····<i·class="ri-link-m"·aria-hidden="true"></i>188 ····<i·class="ri-link-m"·aria-hidden="true"></i>
189 ··</a>189 ··</a>
190 ··<span·class="text">Binary·heap</span>190 ··<span·class="text">Binary·heap</span>
191 </h2>191 </h2>
192 <p>The·binary·heap·works·as·a·large·object·space·for·binary·terms·that·are·greater·than·64·bytes·(from·now·on·called·off-heap·binaries).·The·binary·heap·is·<a·href="https://en.wikipedia.org/wiki/Reference_counting">reference·counted</a>·and·a·pointer·to·the·off-heap·binary·is·stored·on·the·process·heap.·To·keep·track·of·when·to·decrement·the·reference·counter·of·the·off-heap·binary,·a·linked·list·(the·MSO·-·mark·and·sweep·object·list)·containing·funs·and·externals·as·well·as·off-heap·binaries·is·woven·through·the·heap.·After·a·garbage·collection·is·done,·the·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2299">MSO·list·is·swept</a>·and·any·off-heap·binary·that·does·not·have·a·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2325">move·marker</a>·written·into·the·header·words·has·its·reference·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2344-L2367">decremented·and·is·potentially·freed</a>.</p><p>All·items·in·the·MSO·list·are·ordered·by·the·time·they·were·added·to·the·process·heap,·so·when·doing·a·minor·garbage·collection,·the·MSO·sweeper·only·has·to·sweep·until·it·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2369">encounters·an·off-heap·binary·that·is·on·the·old·heap</a>.</p><h3·id="virtual-binary-heap"·class="section-heading">192 <p>The·binary·heap·works·as·a·large·object·space·for·binary·terms·that·are·greater·than·64·bytes·(from·now·on·called·off-heap·binaries).·The·binary·heap·is·<a·href="https://en.wikipedia.org/wiki/Reference_counting">reference·counted</a>·and·a·pointer·to·the·off-heap·binary·is·stored·on·the·process·heap.·To·keep·track·of·when·to·decrement·the·reference·counter·of·the·off-heap·binary,·a·linked·list·(the·MSO·-·mark·and·sweep·object·list)·containing·funs·and·externals·as·well·as·off-heap·binaries·is·woven·through·the·heap.·After·a·garbage·collection·is·done,·the·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2299">MSO·list·is·swept</a>·and·any·off-heap·binary·that·does·not·have·a·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2325">move·marker</a>·written·into·the·header·words·has·its·reference·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2344-L2367">decremented·and·is·potentially·freed</a>.</p><p>All·items·in·the·MSO·list·are·ordered·by·the·time·they·were·added·to·the·process·heap,·so·when·doing·a·minor·garbage·collection,·the·MSO·sweeper·only·has·to·sweep·until·it·<a·href="https://github.com/erlang/otp/blob/OTP-18.0/erts/emulator/beam/erl_gc.c#L2369">encounters·an·off-heap·binary·that·is·on·the·old·heap</a>.</p><h3·id="virtual-binary-heap"·class="section-heading">
193 ··<a·href="#virtual-binary-heap"·class="hover-link">193 ··<a·href="#virtual-binary-heap"·class="hover-link">
44.8 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/inet_cfg.html
    
Offset 161, 108 lines modifiedOffset 161, 108 lines modified
161 configuration·files·(or·system·registry):</p><ul><li>Hostnames·and·host·addresses</li><li>Domain·name</li><li>Nameservers</li><li>Search·domains</li><li>Lookup·method</li></ul><p>This·data·can·also·be·specified·explicitly·in·the·user·configuration·file.·This161 configuration·files·(or·system·registry):</p><ul><li>Hostnames·and·host·addresses</li><li>Domain·name</li><li>Nameservers</li><li>Search·domains</li><li>Lookup·method</li></ul><p>This·data·can·also·be·specified·explicitly·in·the·user·configuration·file.·This
162 file·is·to·contain·lines·of·configuration·parameters·(each·terminated·with·a162 file·is·to·contain·lines·of·configuration·parameters·(each·terminated·with·a
163 full·stop).·Some·parameters·add·data·to·the·configuration·(such·as·host·and163 full·stop).·Some·parameters·add·data·to·the·configuration·(such·as·host·and
164 nameserver),·others·overwrite·any·previous·settings·(such·as·domain·and·lookup).164 nameserver),·others·overwrite·any·previous·settings·(such·as·domain·and·lookup).
165 The·user·configuration·file·is·always·examined·last·in·the·configuration165 The·user·configuration·file·is·always·examined·last·in·the·configuration
166 process,·making·it·possible·for·the·user·to·override·any·default·values·or166 process,·making·it·possible·for·the·user·to·override·any·default·values·or
167 previously·made·settings.·Call·<code·class="inline">inet:get_rc()</code>·to·view·the·state·of·the·<code·class="inline">inet</code>167 previously·made·settings.·Call·<code·class="inline">inet:get_rc()</code>·to·view·the·state·of·the·<code·class="inline">inet</code>
168 configuration·database.</p><p>The·valid·configuration·parameters·are·as·follows:</p><ul><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6130187803-1">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Format</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="6130187803-1">}</span><span·class="p">.</span><span·class="w">168 configuration·database.</p><p>The·valid·configuration·parameters·are·as·follows:</p><ul><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8838956286-1">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Format</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="8838956286-1">}</span><span·class="p">.</span><span·class="w">
169 ··</span><span·class="n">Format</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="6130187803-2">(</span><span·class="p"·data-group-id="6130187803-2">)</span><span·class="w">169 ··</span><span·class="n">Format</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8838956286-2">(</span><span·class="p"·data-group-id="8838956286-2">)</span><span·class="w">
170 ··</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="6130187803-3">(</span><span·class="p"·data-group-id="6130187803-3">)</span></code></pre><p>Specify·a·system·file·that·Erlang·is·to·read·configuration·data·from.·<code·class="inline">Format</code>170 ··</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="8838956286-3">(</span><span·class="p"·data-group-id="8838956286-3">)</span></code></pre><p>Specify·a·system·file·that·Erlang·is·to·read·configuration·data·from.·<code·class="inline">Format</code>
171 tells·the·parser·how·the·file·is·to·be·interpreted:</p><ul><li><code·class="inline">resolv</code>·(Unix·resolv.conf)</li><li><code·class="inline">host_conf_freebsd</code>·(FreeBSD·host.conf)</li><li><code·class="inline">host_conf_bsdos</code>·(BSDOS·host.conf)</li><li><code·class="inline">host_conf_linux</code>·(Linux·host.conf)</li><li><code·class="inline">nsswitch_conf</code>·(Unix·nsswitch.conf)</li><li><code·class="inline">hosts</code>·(Unix·hosts)</li></ul><p><code·class="inline">File</code>·is·to·specify·the·filename·with·full·path.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9510885395-1">{</span><span·class="ss">resolv_conf</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="9510885395-1">}</span><span·class="p">.</span><span·class="w">171 tells·the·parser·how·the·file·is·to·be·interpreted:</p><ul><li><code·class="inline">resolv</code>·(Unix·resolv.conf)</li><li><code·class="inline">host_conf_freebsd</code>·(FreeBSD·host.conf)</li><li><code·class="inline">host_conf_bsdos</code>·(BSDOS·host.conf)</li><li><code·class="inline">host_conf_linux</code>·(Linux·host.conf)</li><li><code·class="inline">nsswitch_conf</code>·(Unix·nsswitch.conf)</li><li><code·class="inline">hosts</code>·(Unix·hosts)</li></ul><p><code·class="inline">File</code>·is·to·specify·the·filename·with·full·path.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6386566317-1">{</span><span·class="ss">resolv_conf</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="6386566317-1">}</span><span·class="p">.</span><span·class="w">
172 ··</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="9510885395-2">(</span><span·class="p"·data-group-id="9510885395-2">)</span></code></pre><p>Specify·a·system·file·that·Erlang·is·to·read·resolver·configuration·from·for172 ··</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="6386566317-2">(</span><span·class="p"·data-group-id="6386566317-2">)</span></code></pre><p>Specify·a·system·file·that·Erlang·is·to·read·resolver·configuration·from·for
173 the·internal·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>,·and·monitor·for·changes,·even·if·it·does173 the·internal·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>,·and·monitor·for·changes,·even·if·it·does
174 not·exist.·The·path·must·be·absolute.</p><p>This·can·override·the·configuration·parameters·<code·class="inline">nameserver</code>·and·<code·class="inline">search</code>174 not·exist.·The·path·must·be·absolute.</p><p>This·can·override·the·configuration·parameters·<code·class="inline">nameserver</code>·and·<code·class="inline">search</code>
175 depending·on·the·contents·of·the·specified·file.·They·can·also·change·any·time175 depending·on·the·contents·of·the·specified·file.·They·can·also·change·any·time
176 in·the·future·reflecting·the·file·contents.</p><p>If·the·file·is·specified·as·an·empty·string·<code·class="inline">&quot;&quot;</code>,·no·file·is·read·or·monitored176 in·the·future·reflecting·the·file·contents.</p><p>If·the·file·is·specified·as·an·empty·string·<code·class="inline">&quot;&quot;</code>,·no·file·is·read·or·monitored
177 in·the·future.·This·emulates·the·old·behavior·of·not·configuring·the·DNS177 in·the·future.·This·emulates·the·old·behavior·of·not·configuring·the·DNS
178 client·when·the·node·is·started·in·short·name·distributed·mode.</p><p>If·this·parameter·is·not·specified,·it·defaults·to·<code·class="inline">/etc/resolv.conf</code>·unless178 client·when·the·node·is·started·in·short·name·distributed·mode.</p><p>If·this·parameter·is·not·specified,·it·defaults·to·<code·class="inline">/etc/resolv.conf</code>·unless
179 environment·variable·<code·class="inline">ERL_INET_ETC_DIR</code>·is·set,·which·defines·the·directory179 environment·variable·<code·class="inline">ERL_INET_ETC_DIR</code>·is·set,·which·defines·the·directory
180 for·this·file·to·some·maybe·other·than·<code·class="inline">/etc</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9826187046-1">{</span><span·class="ss">hosts_file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="9826187046-1">}</span><span·class="p">.</span><span·class="w">180 for·this·file·to·some·maybe·other·than·<code·class="inline">/etc</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1313327028-1">{</span><span·class="ss">hosts_file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="1313327028-1">}</span><span·class="p">.</span><span·class="w">
181 ··</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="9826187046-2">(</span><span·class="p"·data-group-id="9826187046-2">)</span></code></pre><p>Specify·a·system·file·that·Erlang·is·to·read·resolver·configuration·from·for181 ··</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="1313327028-2">(</span><span·class="p"·data-group-id="1313327028-2">)</span></code></pre><p>Specify·a·system·file·that·Erlang·is·to·read·resolver·configuration·from·for
182 the·internal·hosts·file·resolver,·and·monitor·for·changes,·even·if·it·does·not182 the·internal·hosts·file·resolver,·and·monitor·for·changes,·even·if·it·does·not
183 exist.·The·path·must·be·absolute.</p><p>These·host·entries·are·searched·after·all·added·with·<code·class="inline">{file,·hosts,·File}</code>183 exist.·The·path·must·be·absolute.</p><p>These·host·entries·are·searched·after·all·added·with·<code·class="inline">{file,·hosts,·File}</code>
184 above·or·<code·class="inline">{host,·IP,·Aliases}</code>·below·when·lookup·option·<code·class="inline">file</code>·is·used.</p><p>If·the·file·is·specified·as·an·empty·string·<code·class="inline">&quot;&quot;</code>,·no·file·is·read·or·monitored184 above·or·<code·class="inline">{host,·IP,·Aliases}</code>·below·when·lookup·option·<code·class="inline">file</code>·is·used.</p><p>If·the·file·is·specified·as·an·empty·string·<code·class="inline">&quot;&quot;</code>,·no·file·is·read·or·monitored
185 in·the·future.·This·emulates·the·old·behavior·of·not·configuring·the·DNS185 in·the·future.·This·emulates·the·old·behavior·of·not·configuring·the·DNS
186 client·when·the·node·is·started·in·short·name·distributed·mode.</p><p>If·this·parameter·is·not·specified,·it·defaults·to·<code·class="inline">/etc/hosts</code>·unless186 client·when·the·node·is·started·in·short·name·distributed·mode.</p><p>If·this·parameter·is·not·specified,·it·defaults·to·<code·class="inline">/etc/hosts</code>·unless
187 environment·variable·<code·class="inline">ERL_INET_ETC_DIR</code>·is·set,·which·defines·the·directory187 environment·variable·<code·class="inline">ERL_INET_ETC_DIR</code>·is·set,·which·defines·the·directory
188 for·this·file·to·some·maybe·other·than·<code·class="inline">/etc</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0293764615-1">{</span><span·class="ss">registry</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="0293764615-1">}</span><span·class="p">.</span><span·class="w">188 for·this·file·to·some·maybe·other·than·<code·class="inline">/etc</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7538016238-1">{</span><span·class="ss">registry</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="7538016238-1">}</span><span·class="p">.</span><span·class="w">
189 ··</span><span·class="n">Type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0293764615-2">(</span><span·class="p"·data-group-id="0293764615-2">)</span></code></pre><p>Specify·a·system·registry·that·Erlang·is·to·read·configuration·data·from.189 ··</span><span·class="n">Type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7538016238-2">(</span><span·class="p"·data-group-id="7538016238-2">)</span></code></pre><p>Specify·a·system·registry·that·Erlang·is·to·read·configuration·data·from.
190 <code·class="inline">win32</code>·is·the·only·valid·option.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3027089364-1">{</span><span·class="ss">host</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Aliases</span><span·class="p"·data-group-id="3027089364-1">}</span><span·class="p">.</span><span·class="w">190 <code·class="inline">win32</code>·is·the·only·valid·option.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7902860202-1">{</span><span·class="ss">host</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Aliases</span><span·class="p"·data-group-id="7902860202-1">}</span><span·class="p">.</span><span·class="w">
191 ··</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tuple</span><span·class="p"·data-group-id="3027089364-2">(</span><span·class="p"·data-group-id="3027089364-2">)</span></code></pre><p><code·class="inline">Aliases·=·[string()]</code></p><p>Add·host·entry·to·the·hosts·table.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9095139624-1">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Domain</span><span·class="p"·data-group-id="9095139624-1">}</span><span·class="p">.</span><span·class="w"> 
192 ··</span><span·class="n">Domain</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="9095139624-2">(</span><span·class="p"·data-group-id="9095139624-2">)</span></code></pre><p>Set·domain·name.</p[·...·truncated·by·diffoscope;·len:·440,·SHA:·f245fdcbdca4d54d3704b66647cb84e60a2c55738645ed3f7e07cefd0465bc0e·...·]-1">}</span><span·class="p">.</span><span·class="w">191 ··</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tuple</span><span·class="p"·data-group-id="7902860202-2">(</span><span·class="p"·data-group-id="7902860202-2">)</span></code></pre><p><code·class="inline">Ali[·...·truncated·by·diffoscope;·len:·327,·SHA:·7e5a910a99b5ba48995cc54f3a63f69838e7ffbe968cff55d4fdba913af2fca7·...·]-1">}</span><span·class="p">.</span><span·class="w">
 192 ··</span><span·class="n">Domain</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2762916459-2">(</span><span·class="p"·data-group-id="2762916459-2">)</span></code></pre><p>Set·domain·name.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2924488672-1">{</span><span·class="ss">nameserver</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IP</span><span·class="w">·</span><span·class="p"·data-group-id="2924488672-2">[</span><span·class="p">,</span><span·class="n">Port</span><span·class="p"·data-group-id="2924488672-2">]</span><span·class="p"·data-group-id="2924488672-1">}</span><span·class="p">.</span><span·class="w">
193 ··</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tuple</span><span·class="p"·data-group-id="8599597041-3">(</span><span·class="p"·data-group-id="8599597041-3">)</span><span·class="w">193 ··</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tuple</span><span·class="p"·data-group-id="2924488672-3">(</span><span·class="p"·data-group-id="2924488672-3">)</span><span·class="w">
194 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8599597041-4">(</span><span·class="p"·data-group-id="8599597041-4">)</span></code></pre><p>Add·address·(and·port,·if·other·than·default)·of·the·primary·nameserver·to·use 
195 for·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1559741379-1">{</span><span·class="ss">alt_nameserver</span[·...·truncated·by·diffoscope;·len:·348,·SHA:·3b4fcbfcbdfb5250de5341ac14fea86a9a5cb68a6db5453b1f3f2d2169203f75·...·]194 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2924488672-4">(</span><span·class="p"·data-group-id="2924488672-4">)</span></code></pr[·...·truncated·by·diffoscope;·len:·83,·SHA:·82eb5ff46b83adcd75ab5fa1d2475d7f9a5af19071ba72fde2679be2a05715ec·...·]
 195 for·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0320292222-1">{</span><span·class="ss">alt_nameserver</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IP</span><span·class="w">·</span><span·class="p"·data-group-id="0320292222-2">[</span><span·class="p">,</span><span·class="n">Port</span><span·class="p"·data-group-id="0320292222-2">]</span><span·class="p"·data-group-id="0320292222-1">}</span><span·class="p">.</span><span·class="w">
196 ··</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tuple</span><span·class="p"·data-group-id="1559741379-3">(</span><span·class="p"·data-group-id="1559741379-3">)</span><span·class="w">196 ··</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tuple</span><span·class="p"·data-group-id="0320292222-3">(</span><span·class="p"·data-group-id="0320292222-3">)</span><span·class="w">
197 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1559741379-4">(</span><span·class="p"·data-group-id="1559741379-4">)</span></code></pre><p>Add·address·(and·port,·if·other·than·default)·of·the·secondary·nameserver·for 
198 <a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8545858086-1">{</span><span·class="ss">search</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Domains</span><span·class="p"·data-group-id="8545858086-1">}</span><span·class="p">.</span><span·class="w"> 
199 ··</span><span·class="n">Domains</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8545858086-2">[</span><span·class="nf">string</span><span·class="p"·data-group-id="8545858086-3">(</span><span·class="p"·data-group-id="8545858086-3">)</span><span·class="p"·data-group-id="8545858086-2">]</span></code></pre><p>Add·search·domains·for·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6189378511-1">{</span><span·class="ss">lookup</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Methods</span><span·class="p"·data-group-id="6189378511-1">}</span><span·class="p">.</span><span·class="w"> 
200 ··</span><span·class="n">Methods</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6189378511-2">[</span><span·class="nf">atom</span><span·class="p"·data-group-id="6189378511-3">(</span><span·class="p"·data-group-id="61893[·...·truncated·by·diffoscope;·len:·162,·SHA:·b4badcff3bf8133130bae75a563145f5dad6701bafc17dca216ecd43e0d413d6·...·]197 ··</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="0320292222-4">(</span><span·class="p"·data-group-id="0320292222-4">)</span></code></pre><p>Add·address·(and·por[·...·truncated·by·diffoscope;·len:·57,·SHA:·af70c18a4da73b5263800f91a52412b5f3b0d70dd3b285bf2ea75ed9d37c8919·...·]
 198 <a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1969368698-1">{</span><span·class="ss">search</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Domains</span><span·class="p"·data-group-id="1969368698-1">}</span><span·class="p">.</span><span·class="w">
 199 ··</span><span·class="n">Domains</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1969368698-2">[</span><span·class="nf">string</span><span·class="p"·data-group-id="1969368698-3">(</span><span·class="p"·data-group-id="1969368698-3">)</span><span·class="p"·data-group-id="1969368698-2">]</span></code></pre><p>Add·search·domains·for·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8154691031-1">{</span><span·class="ss">lookup</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Methods</span><span·class="p"·data-group-id="8154691031-1">}</span><span·class="p">.</span><span·class="w">
 200 ··</span><span·class="n">Methods</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8154691031-2">[</span><span·class="nf">atom</span><span·class="p"·data-group-id="8154691031-3">(</span><span·class="p"·data-group-id="8154691031-3">)</span><span·class="p"·data-group-id="8154691031-2">]</span></code></pre><p>Specify·lookup·methods·and·in·which·order·to·try·them.·The·valid·methods·are
201 as·follows:</p><ul><li><code·class="inline">native</code>·(use·system·calls)</li><li><code·class="inline">file</code>·(use·host·data·retrieved·from·system·configuration·files·and/or·the201 as·follows:</p><ul><li><code·class="inline">native</code>·(use·system·calls)</li><li><code·class="inline">file</code>·(use·host·data·retrieved·from·system·configuration·files·and/or·the
202 user·configuration·file)</li><li><code·class="inline">dns</code>·(use·the·Erlang·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·for·nameserver·queries)</li></ul><p>The·lookup·method·<code·class="inline">string</code>·tries·to·parse·the·hostname·as·an·IPv4·or·IPv6202 user·configuration·file)</li><li><code·class="inline">dns</code>·(use·the·Erlang·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·for·nameserver·queries)</li></ul><p>The·lookup·method·<code·class="inline">string</code>·tries·to·parse·the·hostname·as·an·IPv4·or·IPv6
203 string·and·return·the·resulting·IP·address.·It·is·automatically·tried·first203 string·and·return·the·resulting·IP·address.·It·is·automatically·tried·first
204 when·<code·class="inline">native</code>·is·<em>not</em>·in·the·<code·class="inline">Methods</code>·list.·To·skip·it·in·this·case,·the204 when·<code·class="inline">native</code>·is·<em>not</em>·in·the·<code·class="inline">Methods</code>·list.·To·skip·it·in·this·case,·the
205 pseudo·lookup·method·<code·class="inline">nostring</code>·can·be·inserted·anywhere·in·the·<code·class="inline">Methods</code>205 pseudo·lookup·method·<code·class="inline">nostring</code>·can·be·inserted·anywhere·in·the·<code·class="inline">Methods</code>
206 list.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2336962473-1">{</span><span·class="ss">cache_size</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="2336962473-1">}</span><span·class="p">.</span><span·class="w">206 list.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2652076576-1">{</span><span·class="ss">cache_size</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="2652076576-1">}</span><span·class="p">.</span><span·class="w">
207 ··</span><span·class="n">Size</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2336962473-2">(</span><span·class="p"·data-group-id="2336962473-2">)</span></code></pre><p>Set·the·resolver·cache·size·for·<code·class="inline">dns</code>·lookups.·<code·class="inline">native</code>·lookups·are·not207 ··</span><span·class="n">Size</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2652076576-2">(</span><span·class="p"·data-group-id="2652076576-2">)</span></code></pre><p>Set·the·resolver·cache·size·for·<code·class="inline">dns</code>·lookups.·<code·class="inline">native</code>·lookups·are·not
208 cached.·Defaults·to·100·DNS·records.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7452369163-1">{</span><span·class="ss">cache_refresh</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Time</span><span·class="p"·data-group-id="7452369163-1">}</span><span·class="p">.</span><span·class="w">208 cached.·Defaults·to·100·DNS·records.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6830477475-1">{</span><span·class="ss">cache_refresh</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Time</span><span·class="p"·data-group-id="6830477475-1">}</span><span·class="p">.</span><span·class="w">
209 ··</span><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7452369163-2">(</span><span·class="p"·data-group-id="7452369163-2">)</span></code></pre><p>Set·how·often·(in·milliseconds)·the·resolver·cache·for·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·is209 ··</span><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="6830477475-2">(</span><span·class="p"·data-group-id="6830477475-2">)</span></code></pre><p>Set·how·often·(in·milliseconds)·the·resolver·cache·for·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·is
210 refreshed·(that·is,·expired·DNS·records·are·deleted).·Defaults·to·1·hour.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0034143892-1">{</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Time</span><span·class="p"·data-group-id="0034143892-1">}</span><span·class="p">.</span><span·class="w">210 refreshed·(that·is,·expired·DNS·records·are·deleted).·Defaults·to·1·hour.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1493545312-1">{</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Time</span><span·class="p"·data-group-id="1493545312-1">}</span><span·class="p">.</span><span·class="w">
211 ··</span><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="0034143892-2">(</span><span·class="p"·data-group-id="0034143892-2">)</span></code></pre><p>Set·the·time·to·wait·until·retry·(in·milliseconds)·for·DNS·queries·made·by211 ··</span><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1493545312-2">(</span><span·class="p"·data-group-id="1493545312-2">)</span></code></pre><p>Set·the·time·to·wait·until·retry·(in·milliseconds)·for·DNS·queries·made·by
212 <a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.·Defaults·to·2·seconds.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1748269322-1">{</span><span·class="ss">retry</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="1748269322-1">}</span><span·class="p">.</span><span·class="w">212 <a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>.·Defaults·to·2·seconds.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4819711441-1">{</span><span·class="ss">retry</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="4819711441-1">}</span><span·class="p">.</span><span·class="w">
213 ··</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1748269322-2">(</span><span·class="p"·data-group-id="1748269322-2">)</span></code></pre><p>Set·the·number·of·DNS·queries·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·will·try·before·giving·up.·Defaults213 ··</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4819711441-2">(</span><span·class="p"·data-group-id="4819711441-2">)</span></code></pre><p>Set·the·number·of·DNS·queries·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·will·try·before·giving·up.·Defaults
214 to·3.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3065896331-1">{</span><span·class="ss">servfail_retry_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Time</span><span·class="p"·data-group-id="3065896331-1">}</span><span·class="p">.</span><span·class="w">214 to·3.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2747734338-1">{</span><span·class="ss">servfail_retry_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Time</span><span·class="p"·data-group-id="2747734338-1">}</span><span·class="p">.</span><span·class="w">
215 ··</span><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="3065896331-2">(</span><span·class="p"·data-group-id="3065896331-2">)</span></code></pre><p>After·all·name·servers·have·been·tried,·there·is·a·timeout·before·the·name215 ··</span><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="2747734338-2">(</span><span·class="p"·data-group-id="2747734338-2">)</span></code></pre><p>After·all·name·servers·have·been·tried,·there·is·a·timeout·before·the·name
216 servers·are·tried·again.·This·is·to·prevent·the·server·from·answering·the216 servers·are·tried·again.·This·is·to·prevent·the·server·from·answering·the
217 query·with·what's·in·the·servfail·cache,217 query·with·what's·in·the·servfail·cache,
218 <a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html#servfail_retry_timeout"><code·class="inline">inet_res</code></a>.·Defaults·to·1500·milli218 <a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html#servfail_retry_timeout"><code·class="inline">inet_res</code></a>.·Defaults·to·1500·milli
219 seconds·.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4167351888-1">{</span><span·class="ss">inet6</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bool</span><span·class="p"·data-group-id="4167351888-1">}</span><span·class="p">.</span><span·class="w">219 seconds·.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5432256109-1">{</span><span·class="ss">inet6</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bool</span><span·class="p"·data-group-id="5432256109-1">}</span><span·class="p">.</span><span·class="w">
220 ··</span><span·class="n">Bool</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span></code></pre><p>Tells·the·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·to·look·up·IPv6·addresses.·Defaults·to220 ··</span><span·class="n">Bool</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span></code></pre><p>Tells·the·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·to·look·up·IPv6·addresses.·Defaults·to
221 <code·class="inline">false</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5947892033-1">{</span><span·class="ss">usevc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bool</span><span·class="p"·data-group-id="5947892033-1">}</span><span·class="p">.</span><span·class="w">221 <code·class="inline">false</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5688283884-1">{</span><span·class="ss">usevc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bool</span><span·class="p"·data-group-id="5688283884-1">}</span><span·class="p">.</span><span·class="w">
222 ··</span><span·class="n">Bool</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span></code></pre><p>Tells·the·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·to·use·TCP·(Virtual·Circuit)·instead·of·UDP.222 ··</span><span·class="n">Bool</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span></code></pre><p>Tells·the·DNS·client·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·to·use·TCP·(Virtual·Circuit)·instead·of·UDP.
223 Defaults·to·<code·class="inline">false</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7293071906-1">{</span><span·class="ss">edns</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Version</span><span·class="p"·data-group-id="7293071906-1">}</span><span·class="p">.</span><span·class="w">223 Defaults·to·<code·class="inline">false</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2815630149-1">{</span><span·class="ss">edns</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Version</span><span·class="p"·data-group-id="2815630149-1">}</span><span·class="p">.</span><span·class="w">
224 ··</span><span·class="n">Version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="mi">0</span></code></pre><p>Sets·the·EDNS·version·that·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·will·use.·The·only·allowed·version·is224 ··</span><span·class="n">Version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="mi">0</span></code></pre><p>Sets·the·EDNS·version·that·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·will·use.·The·only·allowed·version·is
225 zero.·Defaults·to·<code·class="inline">false</code>,·which·means·not·to·use·EDNS.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7583457482-1">{</span><span·class="ss">udp_payload_size</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="7583457482-1">}</span><span·class="p">.</span><span·class="w">225 zero.·Defaults·to·<code·class="inline">false</code>,·which·means·not·to·use·EDNS.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6686021467-1">{</span><span·class="ss">udp_payload_size</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="6686021467-1">}</span><span·class="p">.</span><span·class="w">
226 ··</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7583457482-2">(</span><span·class="p"·data-group-id="7583457482-2">)</span></code></pre><p>Sets·the·allowed·UDP·payload·size·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·will·advertise·in·EDNS·queries.226 ··</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="6686021467-2">(</span><span·class="p"·data-group-id="6686021467-2">)</span></code></pre><p>Sets·the·allowed·UDP·payload·size·<a·href="../../../lib/kernel-10.0.1/doc/html/inet_res.html"><code·class="inline">inet_res</code></a>·will·advertise·in·EDNS·queries.
227 Also·sets·the·limit·when·the·DNS·query·will·be·deemed·too·large·for·UDP227 Also·sets·the·limit·when·the·DNS·query·will·be·deemed·too·large·for·UDP
228 forcing·a·TCP·query·instead;·this·is·not·entirely·correct,·as·the·advertised228 forcing·a·TCP·query·instead;·this·is·not·entirely·correct,·as·the·advertised
229 UDP·payload·size·of·the·individual·nameserver·is·what·is·to·be·used,·but·this229 UDP·payload·size·of·the·individual·nameserver·is·what·is·to·be·used,·but·this
230 simple·strategy·will·do·until·a·more·intelligent·(probing,·caching)·algorithm230 simple·strategy·will·do·until·a·more·intelligent·(probing,·caching)·algorithm
231 needs·to·be·implemented.·Default·to·1280,·which·stems·from·the·standard231 needs·to·be·implemented.·Default·to·1280,·which·stems·from·the·standard
232 Ethernet·MTU·size.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3221651735-1">{</span><span·class="ss">udp</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data-group-id="3221651735-1">}</span><span·class="p">.</span><span·class="w"> 
233 ··</span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="3221651735-2">(</span><span·class="p"·data-group-id="3221651735-2">)</span></code></pre[·...·truncated·by·diffoscope;·len:·352,·SHA:·f6b085591cea6d064fa9c611fb54c3b2b8479e0ed5391acf85f6e40d5750ea27·...·]6-1">}</span><span·class="p">.</span><span·class="w">232 Ethernet·MTU·size.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6740609956-1">{</span><span·class="ss">udp</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·20,·SHA:·a647c9be5501829d7a6526816718eca43ddfc15c398076886916e08832d1e671·...·]6-1">}</span><span·class="p">.</span><span·class="w">
 233 ··</span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="6740609956-2">(</span><span·class="p"·data-group-id="6740609956-2">)</span></code></pre><p>Tell·Erlang·to·use·another·primitive·UDP·module·than·<code·class="inline">inet_udp</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4984547737-1">{</span><span·class="ss">tcp</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p"·data-group-id="4984547737-1">}</span><span·class="p">.</span><span·class="w">
234 ··</span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="9064620396-2">(</span><span·class="p"·data-group-id="9064620396-2">)</span></code></pre><p>Tell·Erlang·to·use·another·primitive·TCP·module·than·<code·class="inline">inet_tcp</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">clear_hosts</span><span·class="p">.</span></code></pre><p>Clear·the·hosts·table.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">clear_ns</span><span·class="p">.</span></code></pre><p>Clear·the·list·of·recorded·nameservers·(primary·and·secondary).</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">clear_search</span><span·class="p">.</span></code></pre><p>Clear·the·list·of·search·domains.</p></li></ul><h2·id="user-configuration-example"·class="section-heading">234 ··</span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4984547737-2">(</span><span·class="p"·data-group-id="4984547737-2">)</span></code></pre><p>Tell·Erlang·to·use·another·primitive·TCP·module·than·<code·class="inline">inet_tcp</code>.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">clear_hosts</span><span·class="p">.</span></code></pre><p>Clear·the·hosts·table.</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">clear_ns</span><span·class="p">.</span></code></pre><p>Clear·the·list·of·recorded·nameservers·(primary·and·secondary).</p></li><li><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">clear_search</span><span·class="p">.</span></code></pre><p>Clear·the·list·of·search·domains.</p></li></ul><h2·id="user-configuration-example"·class="section-heading">
235 ··<a·href="#user-configuration-example"·class="hover-link">235 ··<a·href="#user-configuration-example"·class="hover-link">
236 ····<i·class="ri-link-m"·aria-hidden="true"></i>236 ····<i·class="ri-link-m"·aria-hidden="true"></i>
237 ··</a>237 ··</a>
238 ··<span·class="text">User·Configuration·Example</span>238 ··<span·class="text">User·Configuration·Example</span>
239 </h2>239 </h2>
240 <p>Assume·that·a·user·does·not·want·Erlang·to·use·the·native·lookup·method,·but240 <p>Assume·that·a·user·does·not·want·Erlang·to·use·the·native·lookup·method,·but
241 wants·Erlang·to·read·all·information·necessary·from·start·and·use·that·for241 wants·Erlang·to·read·all·information·necessary·from·start·and·use·that·for
242 resolving·names·and·addresses.·If·lookup·fails,·Erlang·is·to·request·the·data242 resolving·names·and·addresses.·If·lookup·fails,·Erlang·is·to·request·the·data
243 from·a·nameserver·(using·the·Erlang·DNS·client,·set·to·use·EDNS·allowing·larger243 from·a·nameserver·(using·the·Erlang·DNS·client,·set·to·use·EDNS·allowing·larger
244 responses).·The·resolver·configuration·is·updated·when·its·configuration·file244 responses).·The·resolver·configuration·is·updated·when·its·configuration·file
245 changes.·Also,·DNS·records·are·never·to·be·cached.·The·user·configuration·file245 changes.·Also,·DNS·records·are·never·to·be·cached.·The·user·configuration·file
246 (in·this·example·named·<code·class="inline">erl_inetrc</code>,·stored·in·directory·<code·class="inline">./cfg_files</code>)·can·then246 (in·this·example·named·<code·class="inline">erl_inetrc</code>,·stored·in·directory·<code·class="inline">./cfg_files</code>)·can·then
247 look·as·follows·(Unix):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·--·ERLANG·INET·CONFIGURATION·FILE·--</span><span·class="w">247 look·as·follows·(Unix):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·--·ERLANG·INET·CONFIGURATION·FILE·--</span><span·class="w">
248 </span><span·class="c1">%%·read·the·hosts·file</span><span·class="w">248 </span><span·class="c1">%%·read·the·hosts·file</span><span·class="w">
249 </span><span·class="p"·data-group-id="3367220170-1">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/etc/hosts&quot;</span><span·class="p"·data-group-id="33672[·...·truncated·by·diffoscope;·len:·5,·SHA:·41a7f68bf892be4bc04e7970edac747b92b1180380af51569c9703af69855b8a·...·]-1">}</span><span·class="p">.</span><span·class="w">249 </span><span·class="p"·data-group-id="7411414831-1">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/etc/hosts&quot;</span><span·class="p"·data-group-id="74114[·...·truncated·by·diffoscope;·len:·5,·SHA:·c3d320b107e4735cdd84ead1134451ba7f54138e4804024e2354eb79ec927600·...·]-1">}</span><span·class="p">.</span><span·class="w">
250 </span><span·class="c1">%%·add·a·particular·host</span><span·class="w">250 </span><span·class="c1">%%·add·a·particular·host</span><span·class="w">
251 </span><span·class="p"·data-group-id="3367220170-2">{</span><span·class="ss">host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3367220170-3">{</span><span·class="mi">134</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·363,·SHA:·cff7f902750ffbb6ea4b8c314650ec2388089381357f78350e21b33867e1c596·...·]-2">}</span><span·class="p">.</span><span·class="w">251 </span><span·class="p"·data-group-id="7411414831-2">{</span><span·class="ss">host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7411414831-3">{</span><span·class="mi">134</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·363,·SHA:·633d3138dcc3b074bdd95d718fd13c58f674a762e8b8bb57cf0c99d15dffcbb1·...·]-2">}</span><span·class="p">.</span><span·class="w">
252 </span><span·class="c1">%%·do·not·monitor·the·hosts·file</span><span·class="w">252 </span><span·class="c1">%%·do·not·monitor·the·hosts·file</span><span·class="w">
253 </span><span·class="p"·data-group-id="3367220170-5">{</span><span·class="ss">hosts_file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="p"·data-group-id="3367220170-5">}</span><span·class="p">.</span><span·class="w">253 </span><span·class="p"·data-group-id="7411414831-5">{</span><span·class="ss">hosts_file</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&quot;</span><span·class="p"·data-group-id="7411414831-5">}</span><span·class="p">.</span><span·class="w">
254 </span><span·class="c1">%%·read·and·monitor·nameserver·config·from·here</span><span·class="w">254 </span><span·class="c1">%%·read·and·monitor·nameserver·config·from·here</span><span·class="w">
255 </span><span·class="p"·data-group-id="3367220170-6">{</span><span·class="ss">resolv_conf</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/usr/local/etc/resolv.conf&quot;</span><span·class="p"·data-group-id="3367220170-6">}</span><span·class="p">.</span><span·class="w">255 </span><span·class="p"·data-group-id="7411414831-6">{</span><span·class="ss">resolv_conf</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/usr/local/etc/resolv.conf&quot;</span><span·class="p"·data-group-id="7411414831-6">}</span><span·class="p">.</span><span·class="w">
256 </span><span·class="c1">%%·enable·EDNS</span><span·class="w">256 </span><span·class="c1">%%·enable·EDNS</span><span·class="w">
257 </span><span·class="p"·data-group-id="3367220170-7">{</span><span·class="ss">edns</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3367220170-7">}</span><span·class="p">.</span><span·class="w">257 </span><span·class="p"·data-group-id="7411414831-7">{</span><span·class="ss">edns</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="7411414831-7">}</span><span·class="p">.</span><span·class="w">
258 </span><span·class="c1">%%·disable·caching</span><span·class="w">258 </span><span·class="c1">%%·disable·caching</span><span·class="w">
259 </span><span·class="p"·data-group-id="3367220170-8">{</span><span·class="ss">cache_size</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="3367220170-8">}</span><span·class="p">.</span><span·class="w">259 </span><span·class="p"·data-group-id="7411414831-8">{</span><span·class="ss">cache_size</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="7411414831-8">}</span><span·class="p">.</span><span·class="w">
260 </span><span·class="c1">%%·specify·lookup·method</span><span·class="w">260 </span><span·class="c1">%%·specify·lookup·method</span><span·class="w">
261 </span><span·class="p"·data-group-id="3367220170-9">{</span><span·class="ss">lookup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3367220170-10">[</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">dns</span[·...·truncated·by·diffoscope;·len:·96,·SHA:·1acb9747d783ff74d7502ff63a05a024e715728403f70eb0c1d6e24670a5336c·...·]-9">}</span><span·class="p">.</span></code></pre><p>And·Erlang·can,·for·example,·be·started·as·follows:</p><pre><code·class="text">%·erl·-sname·my_node·-kernel·inetrc·'&quot;./cfg_files/erl_inetrc&quot;'</code></pre>261 </span><span·class="p"·data-group-id="7411414831-9">{</span><span·class="ss">lookup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7411414831-10">[</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">dns</span[·...·truncated·by·diffoscope;·len:·96,·SHA:·bb1bc288478618d4b936f23dc31ed67c4b9f45aab9e8d4427176dc08b2941ba1·...·]-9">}</span><span·class="p">.</span></code></pre><p>And·Erlang·can,·for·example,·be·started·as·follows:</p><pre><code·class="text">%·erl·-sname·my_node·-kernel·inetrc·'&quot;./cfg_files/erl_inetrc&quot;'</code></pre>
262 </div>262 </div>
  
263 <div·class="bottom-actions"·id="bottom-actions">263 <div·class="bottom-actions"·id="bottom-actions">
264 ··<div·class="bottom-actions-item">264 ··<div·class="bottom-actions-item">
  
265 ······<a·href="driver.html"·class="bottom-actions-button"·rel="prev">265 ······<a·href="driver.html"·class="bottom-actions-button"·rel="prev">
266 ········<span·class="subheader">266 ········<span·class="subheader">
16.1 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/init.html
    
Offset 157, 16 lines modifiedOffset 157, 16 lines modified
157 BF</code></pre><p>If·multiple·<code·class="inline">-eval</code>·expressions·are·specified,·they·are·evaluated·sequentially157 BF</code></pre><p>If·multiple·<code·class="inline">-eval</code>·expressions·are·specified,·they·are·evaluated·sequentially
158 in·the·order·specified.·<code·class="inline">-eval</code>·expressions·are·evaluated·sequentially·with158 in·the·order·specified.·<code·class="inline">-eval</code>·expressions·are·evaluated·sequentially·with
159 <code·class="inline">-s</code>·and·<code·class="inline">-run</code>·function·calls·(this·also·in·the·order·specified).·As·with159 <code·class="inline">-s</code>·and·<code·class="inline">-run</code>·function·calls·(this·also·in·the·order·specified).·As·with
160 <code·class="inline">-s</code>·and·<code·class="inline">-run</code>,·an·evaluation·that·does·not·terminate·blocks·the·system160 <code·class="inline">-s</code>·and·<code·class="inline">-run</code>,·an·evaluation·that·does·not·terminate·blocks·the·system
161 initialization·process.</p></li><li><p><strong><code·class="inline">-extra</code></strong>·-·Everything·following·<code·class="inline">-extra</code>·is·considered·plain·arguments·and161 initialization·process.</p></li><li><p><strong><code·class="inline">-extra</code></strong>·-·Everything·following·<code·class="inline">-extra</code>·is·considered·plain·arguments·and
162 can·be·retrieved·using·<a·href="#get_plain_arguments/0"><code·class="inline">get_plain_arguments/0</code></a>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-extra·+A·1·--</span><span·class="w">162 can·be·retrieved·using·<a·href="#get_plain_arguments/0"><code·class="inline">get_plain_arguments/0</code></a>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-extra·+A·1·--</span><span·class="w">
163 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">163 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
164 1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="5149582979-1">(</span><span·class="p"·data-group-id="5149582979-1">)</span><span·class="p">.</span><span·class="w">164 1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="6689805691-1">(</span><span·class="p"·data-group-id="6689805691-1">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="p"·data-group-id="5149582979-2">[</span><span·class="s">&quot;+A&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="s">&quot;--&quot;</span><span·class="p"·data-group-id="5149582979-2">]</span></code></pre><p>The·<code·class="inline">-extra</code>·flag·can·be·passed·on·the·command·line,·through·<code·class="inline">ERL_*FLAGS</code>·or165 </span><span·class="p"·data-group-id="6689805691-2">[</span><span·class="s">&quot;+A&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="s">&quot;--&quot;</span><span·class="p"·data-group-id="6689805691-2">]</span></code></pre><p>The·<code·class="inline">-extra</code>·flag·can·be·passed·on·the·command·line,·through·<code·class="inline">ERL_*FLAGS</code>·or
166 <code·class="inline">-args_file</code>.·It·only·effects·the·remaining·command-line·flags·in·the·entity166 <code·class="inline">-args_file</code>.·It·only·effects·the·remaining·command-line·flags·in·the·entity
167 in·which·it·is·passed.·If·multiple·<code·class="inline">-extra</code>·flags·are·passed·they·are167 in·which·it·is·passed.·If·multiple·<code·class="inline">-extra</code>·flags·are·passed·they·are
168 concatenated·using·the·same·order·rules·as·<code·class="inline">ERL_*FLAGS</code>·or·<code·class="inline">-args_file</code>·in168 concatenated·using·the·same·order·rules·as·<code·class="inline">ERL_*FLAGS</code>·or·<code·class="inline">-args_file</code>·in
169 which·they·are·given.</p><p>Example:</p><pre><code·class="text">%·ERL_AFLAGS=&quot;-extra·a&quot;·ERL_ZFLAGS=&quot;-extra·d&quot;·erl·-extra·b·-extra·c169 which·they·are·given.</p><p>Example:</p><pre><code·class="text">%·ERL_AFLAGS=&quot;-extra·a&quot;·ERL_ZFLAGS=&quot;-extra·d&quot;·erl·-extra·b·-extra·c
170 ...170 ...
171 1&gt;·init:get_plain_arguments().171 1&gt;·init:get_plain_arguments().
172 [&quot;a&quot;,&quot;b&quot;,&quot;-extra&quot;,&quot;c&quot;,&quot;d&quot;]</code></pre></li><li><p><strong><code·class="inline">-S·Mod·[Func·[Arg1,·Arg2,·...]]</code></strong>·-·Evaluates·the·specified·function·call172 [&quot;a&quot;,&quot;b&quot;,&quot;-extra&quot;,&quot;c&quot;,&quot;d&quot;]</code></pre></li><li><p><strong><code·class="inline">-S·Mod·[Func·[Arg1,·Arg2,·...]]</code></strong>·-·Evaluates·the·specified·function·call
Offset 212, 21 lines modifiedOffset 212, 21 lines modified
212 ····<i·class="ri-link-m"·aria-hidden="true"></i>212 ····<i·class="ri-link-m"·aria-hidden="true"></i>
213 ··</a>213 ··</a>
214 ··<span·class="text">Example</span>214 ··<span·class="text">Example</span>
215 </h2>215 </h2>
216 <pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·--·a·b·-children·thomas·claire·-ages·7·3·--·x·y</span><span·class="w">216 <pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·--·a·b·-children·thomas·claire·-ages·7·3·--·x·y</span><span·class="w">
217 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">217 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
  
218 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="0683941730-1">(</span><span·class="p"·data-group-id="0683941730-1">)</span><span·class="p">.</span><span·class="w">218 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_plain_arguments</span><span·class="p"·data-group-id="4861961565-1">(</span><span·class="p"·data-group-id="4861961565-1">)</span><span·class="p">.</span><span·class="w">
219 </span><span·class="p"·data-group-id="0683941730-2">[</span><span·class="s">&quot;a&quot;</span><span·class="p">,</span><span·class="s">&quot;b&quot;</span><span·class="p">,</span><span·class="s">&quot;x&quot;</span><span·class="p">,</span><span·class="s">&quot;y&quot;</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·2dcbfed7fa0d31beedb1d29909e21e46cc01b2074b97fa2849d24c04a424545f·...·]-2">]</span><span·class="gp·unselectable">219 </span><span·class="p"·data-group-id="4861961565-2">[</span><span·class="s">&quot;a&quot;</span><span·class="p">,</span><span·class="s">&quot;b&quot;</span><span·class="p">,</span><span·class="s">&quot;x&quot;</span><span·class="p">,</span><span·class="s">&quot;y&quot;</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·e0d4de661f19eda64a48337bbee7c0f43c5cb3b71577d932051875b46a234e77·...·]-2">]</span><span·class="gp·unselectable">
220 2&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="0683941730-3">(</span><span·class="ss">children</span><span·class="p"·data-group-id="0683941730-3">)</span><span·class="p">.</span><span·class="w">220 2&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="4861961565-3">(</span><span·class="ss">children</span><span·class="p"·data-group-id="4861961565-3">)</span><span·class="p">.</span><span·class="w">
221 </span><span·class="p"·data-group-id="0683941730-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0683941730-5">[</span><span·class="p"·data-group-id="0683941730-6">[</span><span·class="s">&quot;thomas&quot;</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·175,·SHA:·bcb3e327da897d52dadea7086d8f32be1eda4908e3c66d92df6ec87ec47cf831·...·]-4">}</span><span·class="gp·unselectable">221 </span><span·class="p"·data-group-id="4861961565-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4861961565-5">[</span><span·class="p"·data-group-id="4861961565-6">[</span><span·class="s">&quot;thomas&quot;</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·175,·SHA:·c31512db4a011e90e01db6520a13637b552145812288eb1e9c03af3f98799474·...·]-4">}</span><span·class="gp·unselectable">
222 3&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="0683941730-7">(</span><span·class="ss">ages</span><span·class="p"·data-group-id="0683941730-7">)</span><span·class="p">.</span><span·class="w">222 3&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="4861961565-7">(</span><span·class="ss">ages</span><span·class="p"·data-group-id="4861961565-7">)</span><span·class="p">.</span><span·class="w">
223 </span><span·class="p"·data-group-id="0683941730-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0683941730-9">[</span><span·class="p"·data-group-id="0683941730-10">[</span><span·class="s">&quot;7&quot;</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·191,·SHA:·8bf684ec45f4b8fc91e8d491bf440b8333ca83849af98e0565aa06eb3325b109·...·]-8">}</span><span·class="gp·unselectable">223 </span><span·class="p"·data-group-id="4861961565-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4861961565-9">[</span><span·class="p"·data-group-id="4861961565-10">[</span><span·class="s">&quot;7&quot;</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·191,·SHA:·714d3e08ac3655da3c225e6294e57f816dcdb9853b5b5e174ee934e4b9b40572·...·]-8">}</span><span·class="gp·unselectable">
224 4&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="0683941730-11">(</span><span·class="ss">silly</span><span·class="p"·data-group-id="0683941730-11">)</span><span·class="p">.</span><span·class="w">224 4&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="4861961565-11">(</span><span·class="ss">silly</span><span·class="p"·data-group-id="4861961565-11">)</span><span·class="p">.</span><span·class="w">
225 </span><span·class="ss">error</span></code></pre><h2·id="module-see-also"·class="section-heading">225 </span><span·class="ss">error</span></code></pre><h2·id="module-see-also"·class="section-heading">
226 ··<a·href="#module-see-also"·class="hover-link">226 ··<a·href="#module-see-also"·class="hover-link">
227 ····<i·class="ri-link-m"·aria-hidden="true"></i>227 ····<i·class="ri-link-m"·aria-hidden="true"></i>
228 ··</a>228 ··</a>
229 ··<span·class="text">See·Also</span>229 ··<span·class="text">See·Also</span>
230 </h2>230 </h2>
231 <p><a·href="erl_prim_loader.html"><code·class="inline">erl_prim_loader</code></a>,·<a·href="../../../lib/kernel-10.0.1/doc/html/heart.html"><code·class="inline">heart</code></a></p>231 <p><a·href="erl_prim_loader.html"><code·class="inline">erl_prim_loader</code></a>,·<a·href="../../../lib/kernel-10.0.1/doc/html/heart.html"><code·class="inline">heart</code></a></p>
Offset 520, 20 lines modifiedOffset 520, 20 lines modified
520 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_argument(Flag)·->·{ok,·Arg}·|·error·when·Flag·::·<a·href="erlang.html#t:atom/0">atom</a>(),·Arg·::·[Values·::·[<a·href="erlang.html#t:string/0">string</a>()]].</pre>520 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_argument(Flag)·->·{ok,·Arg}·|·error·when·Flag·::·<a·href="erlang.html#t:atom/0">atom</a>(),·Arg·::·[Values·::·[<a·href="erlang.html#t:string/0">string</a>()]].</pre>
  
521 ······</div>521 ······</div>
  
522 <p>Returns·all·values·associated·with·the·command-line·user·flag·<code·class="inline">Flag</code>.</p><p>If·<code·class="inline">Flag</code>·is·provided·several·times,·each·<code·class="inline">Values</code>·is·returned·in·preserved·order.522 <p>Returns·all·values·associated·with·the·command-line·user·flag·<code·class="inline">Flag</code>.</p><p>If·<code·class="inline">Flag</code>·is·provided·several·times,·each·<code·class="inline">Values</code>·is·returned·in·preserved·order.
523 Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-a·b·c·-a·d</span><span·class="w">523 Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-a·b·c·-a·d</span><span·class="w">
524 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">524 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
525 1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="1879802024-1">(</span><span·class="ss">a</span><span·class="p"·data-group-id="1879802024-1">)</span><span·class="p">.</span><span·class="w">525 1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="0839886767-1">(</span><span·class="ss">a</span><span·class="p"·data-group-id="0839886767-1">)</span><span·class="p">.</span><span·class="w">
526 </span><span·class="p"·data-group-id="1879802024-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1879802024-3">[</span><span·class="p"·data-group-id="1879802024-4">[</span><span·class="s">&quot;b&quot;</span><span·class="p">,</span><span·class="s">&q[·...·truncated·by·diffoscope;·len:·331,·SHA:·0f81d7a4d10cfb5543c920ec940753eb85fb102994ecc8f5fd3a57f591ae57c9·...·]-2">}</span></code></pre><p>The·following·flags·are·defined·automatically·and·can·be·retrieved·using·this526 </span><span·class="p"·data-group-id="0839886767-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0839886767-3">[</span><span·class="p"·data-group-id="0839886767-4">[</span><span·class="s">&quot;b&quot;</span><span·class="p">,</span><span·class="s">&q[·...·truncated·by·diffoscope;·len:·331,·SHA:·9a61c51863d7a9231f7e656a95137b86635111869e2e6df283d0a50ccb348501·...·]-2">}</span></code></pre><p>The·following·flags·are·defined·automatically·and·can·be·retrieved·using·this
527 function:</p><ul><li><p><strong><code·class="inline">root</code></strong>·-·The·installation·directory·of·Erlang/OTP,·<code·class="inline">$ROOT</code>:</p><pre><code·class="text">2&gt;·init:get_argument(root).527 function:</p><ul><li><p><strong><code·class="inline">root</code></strong>·-·The·installation·directory·of·Erlang/OTP,·<code·class="inline">$ROOT</code>:</p><pre><code·class="text">2&gt;·init:get_argument(root).
528 {ok,[[&quot;/usr/local/otp/releases/otp_beam_solaris8_r10b_patched&quot;]]}</code></pre></li><li><p><strong><code·class="inline">progname</code></strong>·-·The·name·of·the·program·which·started·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="6986100795-1">(</span><span·class="ss">progname</span><span·class="p"·data-group-id="6986100795-1">)</span><span·class="p">.</span><span·class="w">528 {ok,[[&quot;/usr/local/otp/releases/otp_beam_solaris8_r10b_patched&quot;]]}</code></pre></li><li><p><strong><code·class="inline">progname</code></strong>·-·The·name·of·the·program·which·started·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="1764509576-1">(</span><span·class="ss">progname</span><span·class="p"·data-group-id="1764509576-1">)</span><span·class="p">.</span><span·class="w">
529 </span><span·class="p"·data-group-id="6986100795-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6986100795-3">[</span><span·class="p"·data-group-id="6986100795-4">[</span><span·class="s">&quot;erl&quot;</span><span·class="p"·data-group-id="6986100795-4">]</span><span·class="p"·data-group-id="6986100795-3">]</span><span·class="p"·data-group-id="6986100795-2">}</span></code></pre></li><li><p><strong><code·class="inline"·id="home">home</code></strong>·-·The·home·directory·(on·Unix,·the·value·of·$HOME):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_argument</span><span·class="p"·data-group-id="2207325109-1">(</span><span·class="ss">home</span><span·class="p"·data-group-id="2207325109-1">)</span><span·class="p">.</span><span·class="w"> 
530 </span><span·class="p"·data-group-id="2207325109-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2207325109-3">[</span><span·class="p"·data-group-id="2207325109-4">[</span><span·class="s">&quot;/home/harry&quot;</span><span·class="p"·data-group-id="2[·...·truncated·by·diffoscope;·len:·262,·SHA:·3a920d42d76153caff3fc3b4a35a500d8bfe5e1cc6cfeeb27a71f57dbc5aae1b·...·]>529 </span><span·class="p"·data-group-id="1764509576-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1764509576-3">[</span><span·class="p"·data-group-id="1764509576-4">[</span><span·class="s">&quot;erl&quot;</span><span·class="p"·data-group-id="176450957[·...·truncated·by·diffoscope;·len:·611,·SHA:·3673803cf0de167e6e282a0126de7d4f9af0e3f0e5adc1332c9a2bdaad5d4a4b·...·]>
 530 </span><span·class="p"·data-group-id="2599563039-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2599563039-3">[</span><span·class="p"·data-group-id="2599563039-4">[</span><span·class="s">&quot;/home/harry&quot;</span><span·class="p"·data-group-id="2599563039-4">]</span><span·class="p"·data-group-id="2599563039-3">]</span><span·class="p"·data-group-id="2599563039-2">}</span></code></pre></li></ul><p>Returns·<code·class="inline">error</code>·if·no·value·is·associated·with·<code·class="inline">Flag</code>.</p>
531 ··</section>531 ··</section>
532 </section>532 </section>
533 <section·class="detail"·id="get_arguments/0">533 <section·class="detail"·id="get_arguments/0">
  
534 ··<div·class="detail-header">534 ··<div·class="detail-header">
535 ····<a·href="#get_arguments/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">535 ····<a·href="#get_arguments/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
536 ······<i·class="ri-link-m"·aria-hidden="true"></i>536 ······<i·class="ri-link-m"·aria-hidden="true"></i>
51.0 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/match_spec.html
    
Offset 362, 78 lines modifiedOffset 362, 78 lines modified
362 language,·that·is,·for·their·side·effects.·Functions·with·side·effects·are·also362 language,·that·is,·for·their·side·effects.·Functions·with·side·effects·are·also
363 allowed·when·tracing.</p><h2·id="tracing-examples"·class="section-heading">363 allowed·when·tracing.</p><h2·id="tracing-examples"·class="section-heading">
364 ··<a·href="#tracing-examples"·class="hover-link">364 ··<a·href="#tracing-examples"·class="hover-link">
365 ····<i·class="ri-link-m"·aria-hidden="true"></i>365 ····<i·class="ri-link-m"·aria-hidden="true"></i>
366 ··</a>366 ··</a>
367 ··<span·class="text">Tracing·Examples</span>367 ··<span·class="text">Tracing·Examples</span>
368 </h2>368 </h2>
369 <p>Match·an·argument·list·of·three,·where·the·first·and·third·arguments·are·equal:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1185559876-1">[</span><span·class="p"·data-group-id="1185559876-2">{</span><span·class="p"·data-group-id="1185559876-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·cla[·...·truncated·by·diffoscope;·len:·116,·SHA:·83408c5a9940eb3cb96e2faba8e20ed22053076acba05b0f2ab10819a4bc49fa·...·]-3">]</span><span·class="p">,</span><span·class="w">369 <p>Match·an·argument·list·of·three,·where·the·first·and·third·arguments·are·equal:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4646889407-1">[</span><span·class="p"·data-group-id="4646889407-2">{</span><span·class="p"·data-group-id="4646889407-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·cla[·...·truncated·by·diffoscope;·len:·116,·SHA:·c7dfaffb4a7922d53a03ae3755f962be2dfe369cceaaa966674d67231dca875d·...·]-3">]</span><span·class="p">,</span><span·class="w">
370 ··</span><span·class="p"·data-group-id="1185559876-4">[</span><span·class="p"·data-group-id="1185559876-4">]</span><span·class="p">,</span><span·class="w">370 ··</span><span·class="p"·data-group-id="4646889407-4">[</span><span·class="p"·data-group-id="4646889407-4">]</span><span·class="p">,</span><span·class="w">
371 ··</span><span·class="p"·data-group-id="1185559876-5">[</span><span·class="p"·data-group-id="1185559876-5">]</span><span·class="p"·data-group-id="1185559876-2">}</span><span·class="p"·data-group-id="1185559876-1">]</span></code></pre><p>Match·an·argument·list·of·three,·where·the·second·argument·[·...·truncated·by·diffoscope;·len:·473,·SHA:·c83093af39d863642e3fb00df304b6dad57f83d457dd53e67ff156863b1c2ae6·...·]-3">]</span><span·class="p">,</span><span·class="w">371 ··</span><span·class="p"·data-group-id="4646889407-5">[</span><span·class="p"·data-group-id="4646889407-5">]</span><span·class="p"·data-group-id="4646889407-2">}</span><span·class="p"·data-group-id="4646889407-1">]</span></code></pre><p>Match·an·argument·list·of·three,·where·the·second·argument·[·...·truncated·by·diffoscope;·len:·473,·SHA:·f6d3104aa9d0c824bb568466b67d748cc0777a7c38539876565cec10d85b4d74·...·]-3">]</span><span·class="p">,</span><span·class="w">
372 ··</span><span·class="p"·data-group-id="9060453441-4">[</span><span·class="p"·data-group-id="9060453441-5">{</span><span·class="w">·</span><span·class="ss">&#39;&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·131,·SHA:·5cbe22dc257d0e26a0399958b00daa6621e8b618b5a741d0fceb574a77c87801·...·]-4">]</span><span·class="p">,</span><span·class="w">372 ··</span><span·class="p"·data-group-id="9163227350-4">[</span><span·class="p"·data-group-id="9163227350-5">{</span><span·class="w">·</span><span·class="ss">&#39;&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·131,·SHA:·f0725fd13846bf706a2d1a53c5eb1708528f296ffb5f8e1aca1d09c391866dd5·...·]-4">]</span><span·class="p">,</span><span·class="w">
373 ··</span><span·class="p"·data-group-id="9060453441-6">[</span><span·class="p"·data-group-id="9060453441-6">]</span><span·class="p"·data-group-id="9060453441-2">}</span><span·class="p"·data-group-id="9060453441-1">]</span></code></pre><p>Match·an·argument·list·of·three,·where·the·third·argument·is·either·a·tuple373 ··</span><span·class="p"·data-group-id="9163227350-6">[</span><span·class="p"·data-group-id="9163227350-6">]</span><span·class="p"·data-group-id="9163227350-2">}</span><span·class="p"·data-group-id="9163227350-1">]</span></code></pre><p>Match·an·argument·list·of·three,·where·the·third·argument·is·either·a·tuple
374 containing·argument·one·and·two,·<em>or</em>·a·list·beginning·with·argument·one·and·two374 containing·argument·one·and·two,·<em>or</em>·a·list·beginning·with·argument·one·and·two
375 (that·is,·<code·class="inline">[a,b,[a,b,c]]</code>·or·<code·class="inline">[a,b,{a,b}]</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8778746125-1">[</span><span·class="p"·data-group-id="8778746125-2">{</span><span·class="p"·data-group-id="8778746125-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·cla[·...·truncated·by·diffoscope;·len:·116,·SHA:·f9dd4f39626241f4aff0937c367c930a8c396d9675f5848f9d4c53593f702779·...·]-3">]</span><span·class="p">,</span><span·class="w">375 (that·is,·<code·class="inline">[a,b,[a,b,c]]</code>·or·<code·class="inline">[a,b,{a,b}]</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8005992238-1">[</span><span·class="p"·data-group-id="8005992238-2">{</span><span·class="p"·data-group-id="8005992238-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·cla[·...·truncated·by·diffoscope;·len:·116,·SHA:·a0386bcf9b361d196d99f42ec324c74e2b8a5d7fcc38529eaf18ee989776bf54·...·]-3">]</span><span·class="p">,</span><span·class="w">
376 ··</span><span·class="p"·data-group-id="8778746125-4">[</span><span·class="p"·data-group-id="8778746125-5">{</span><span·class="ss">&#39;orelse&#39;</span><span·class="p">,</span><span·class="w">376 ··</span><span·class="p"·data-group-id="8005992238-4">[</span><span·class="p"·data-group-id="8005992238-5">{</span><span·class="ss">&#39;orelse&#39;</span><span·class="p">,</span><span·class="w">
377 ······</span><span·class="p"·data-group-id="8778746125-6">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$3&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8778746125-7">{</span><span·class="[·...·truncated·by·diffoscope;·len:·283,·SHA:·4965725f1157c85e06e1d85d84f09228b11f276db184dcf31e91efe827c54579·...·]-6">}</span><span·class="p">,</span><span·class="w">377 ······</span><span·class="p"·data-group-id="8005992238-6">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$3&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8005992238-7">{</span><span·class="[·...·truncated·by·diffoscope;·len:·283,·SHA:·bc8cffcbf2f5ddf69f9b43d7ff27b93240dd9525ff4cb89cf647d2f15cae4a97·...·]-6">}</span><span·class="p">,</span><span·class="w">
378 ······</span><span·class="p"·data-group-id="8778746125-9">{</span><span·class="ss">&#39;and&#39;</span><span·class="p">,</span><span·class="w">378 ······</span><span·class="p"·data-group-id="8005992238-9">{</span><span·class="ss">&#39;and&#39;</span><span·class="p">,</span><span·class="w">
379 ········</span><span·class="p"·data-group-id="8778746125-10">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8778746125-11">{</span><span·class[·...·truncated·by·diffoscope;·len:·194,·SHA:·c92f16544b36432ea8ba1a54a457f0e5a5e95feb718de4e8386d273483335454·...·]-10">}</span><span·class="p">,</span><span·class="w">379 ········</span><span·class="p"·data-group-id="8005992238-10">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8005992238-11">{</span><span·class[·...·truncated·by·diffoscope;·len:·194,·SHA:·281941c868e35ac118879c9a038ec546da0590007b357df9230afa3478ab07d1·...·]-10">}</span><span·class="p">,</span><span·class="w">
380 ········</span><span·class="p"·data-group-id="8778746125-12">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8778746125-13">{</span><span·class[·...·truncated·by·diffoscope;·len:·536,·SHA:·bd4b147ca8554cfa0ca123a11d528998b8dafdd84364491fcf21650eede2973b·...·]-4">]</span><span·class="p">,</span><span·class="w">380 ········</span><span·class="p"·data-group-id="8005992238-12">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8005992238-13">{</span><span·class[·...·truncated·by·diffoscope;·len:·536,·SHA:·69c2a9ebb3c9daf7f1054f8f484e03b365886ad07acd3d5543ba19a659b29195·...·]-4">]</span><span·class="p">,</span><span·class="w">
381 ··</span><span·class="p"·data-group-id="8778746125-15">[</span><span·class="p"·data-group-id="8778746125-15">]</span><span·class="p"·data-group-id="8778746125-2">}</span><span·class="p"·data-group-id="8778746125-1">]</span></code></pre><p>The·above·problem·can·also·be·solved·as·follows:</p><pre><[·...·truncated·by·diffoscope;·len:·410,·SHA:·d2f6ee7ba19e7592637fd4d8c955fdea41ff52f39b097c593ed7d2acee76bde9·...·]-4">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2}],·[],·[]},381 ··</span><span·class="p"·data-group-id="8005992238-15">[</span><span·class="p"·data-group-id="8005992238-15">]</span><span·class="p"·data-group-id="8005992238-2">}</span><span·class="p"·data-group-id="8005992238-1">]</span></code></pre><p>The·above·problem·can·also·be·solved·as·follows:</p><pre><[·...·truncated·by·diffoscope;·len:·410,·SHA:·14769e53ba79c8c1af5d6fb852b5f5b950d1836d8f7a429e2dc95277ca429eb9·...·]-4">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2}],·[],·[]},
382 ·{[&#39;</span><span·class="sc">$1</span><span·class="ss">&#39;,·&#39;</span><span·class="sc">$2</span><span·class="ss">&#39;,·[&#39;</span><span·class="sc">$1</span><span·class="ss">&#39;,·&#39;</span><span·class="sc">$2</span><span·class="ss">&#39;·|·&#39;</span><span·class="p">_</span><span·class="err">&#39;</span><span·class="p">]</span><span·class="p">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3359786943-5">[</span><span·class="p"·data-group-id="3359786943-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3359786943-6">[</span><span·class="p"·data-group-id="3359786943-6">]</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·67,·SHA:·580241afcf553bf96c66fbbc38ea7a85d4bb27900a1b1f1b4394cfa7fbdd3f59·...·]-3">]</span></code></pre><p>Match·two·arguments,·where·the·first·is·a·tuple·beginning·with·a·list·that·in382 ·{[&#39;</span><span·class="sc">$1</span><span·class="ss">&#39;,·&#39;</span><span·class="sc">$2</span><span·class="ss">&#39;,·[&#39;</span><span·class="sc">$1</span><span·class="ss">&#39;,·&#39;</span><span·class="sc">$2</span><span·class="ss">&#39;·|·&#39;</span><span·class="p">_</span><span·class="err">&#39;</span><span·class="p">]</span><span·class="p">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7621328346-5">[</span><span·class="p"·data-group-id="7621328346-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7621328346-6">[</span><span·class="p"·data-group-id="7621328346-6">]</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·67,·SHA:·a1d9ddbe4e8209e03d9812118de0866e600507a77fb7e14f92d30bd883fe36ca·...·]-3">]</span></code></pre><p>Match·two·arguments,·where·the·first·is·a·tuple·beginning·with·a·list·that·in
383 turn·begins·with·the·second·argument·times·two·(that·is,·<code·class="inline">[{[4,x],y},2]</code>·or383 turn·begins·with·the·second·argument·times·two·(that·is,·<code·class="inline">[{[4,x],y},2]</code>·or
384 <code·class="inline">[{[8],·y,·z},4])</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8281481658-1">[</span><span·class="p"·data-group-id="8281481658-2">{</span><span·class="p"·data-group-id="8281481658-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·cl[·...·truncated·by·diffoscope;·len:·1174,·SHA:·8df6b2f28e9332da4a9b468224f42f5bcb8e4897ef3f3a12fd1964e082bcaed0·...·]-4">]</span><span·class="p">,</span><span·class="w">384 <code·class="inline">[{[8],·y,·z},4])</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6925031220-1">[</span><span·class="p"·data-group-id="6925031220-2">{</span><span·class="p"·data-group-id="6925031220-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·cl[·...·truncated·by·diffoscope;·len:·1174,·SHA:·97fb95ba44a938882358b9b7b29984b466c3d7a0dff8aa2e8b636429586cc468·...·]-4">]</span><span·class="p">,</span><span·class="w">
385 ··</span><span·class="p"·data-group-id="8281481658-9">[</span><span·class="p"·data-group-id="8281481658-9">]</span><span·class="p"·data-group-id="8281481658-2">}</span><span·class="p"·data-group-id="8281481658-1">]</span></code></pre><p>Match·three·arguments.·When·all·three·are·equal·and·are·numbers,·append·the385 ··</span><span·class="p"·data-group-id="6925031220-9">[</span><span·class="p"·data-group-id="6925031220-9">]</span><span·class="p"·data-group-id="6925031220-2">}</span><span·class="p"·data-group-id="6925031220-1">]</span></code></pre><p>Match·three·arguments.·When·all·three·are·equal·and·are·numbers,·append·the
386 process·dump·to·the·trace·message,·otherwise·let·the·trace·message·be·&quot;as·is&quot;,386 process·dump·to·the·trace·message,·otherwise·let·the·trace·message·be·&quot;as·is&quot;,
387 but·set·the·sequential·trace·token·label·to·4711:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8051385844-1">[</span><span·class="p"·data-group-id="8051385844-2">{</span><span·class="p"·data-group-id="8051385844-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·cl[·...·truncated·by·diffoscope;·len:·117,·SHA:·79ea852800a96c3bae82f05414e2f2440a0dbd6aa4549320a2ed265be5bbffee·...·]-3">]</span><span·class="p">,</span><span·class="w">387 but·set·the·sequential·trace·token·label·to·4711:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2453865715-1">[</span><span·class="p"·data-group-id="2453865715-2">{</span><span·class="p"·data-group-id="2453865715-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·cl[·...·truncated·by·diffoscope;·len:·117,·SHA:·729abdbdd1f03dcd81f72b09305c1da55a95614db0834e67ea3a40b8d8965974·...·]-3">]</span><span·class="p">,</span><span·class="w">
388 ··</span><span·class="p"·data-group-id="8051385844-4">[</span><span·class="p"·data-group-id="8051385844-5">{</span><span·class="nb">is_number</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="8051385844-5">}</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·ec4ae7c65a33fd7208a8b891ee9620de24d06a115ef61f2558202c65f8421309·...·]-4">]</span><span·class="p">,</span><span·class="w">388 ··</span><span·class="p"·data-group-id="2453865715-4">[</span><span·class="p"·data-group-id="2453865715-5">{</span><span·class="nb">is_number</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="2453865715-5">}</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·d75fdc7d14ba88929d8ef65c06ad3199a836a122a44a292580ddc4de32ab46fe·...·]-4">]</span><span·class="p">,</span><span·class="w">
389 ··</span><span·class="p"·data-group-id="8051385844-6">[</span><span·class="p"·data-group-id="8051385844-7">{</span><span·class="ss">message</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8051385844-8">{</span><span·class="ss">process_dump</span><span·class="[·...·truncated·by·diffoscope;·len:·187,·SHA:·89f560ed4be5cbe88fd91e9c2d7dab19929f2a8a863d348199d6e863f7844dde·...·]-2">}</span><span·class="p">,</span><span·class="w">389 ··</span><span·class="p"·data-group-id="2453865715-6">[</span><span·class="p"·data-group-id="2453865715-7">{</span><span·class="ss">message</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2453865715-8">{</span><span·class="ss">process_dump</span><span·class="[·...·truncated·by·diffoscope;·len:·187,·SHA:·ffd00dbaba1d9f9372f39b9ba8cbb111e0bfa47408307b9daaa08e15f0dad78e·...·]-2">}</span><span·class="p">,</span><span·class="w">
390 ·</span><span·class="p"·data-group-id="8051385844-9">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8051385844-10">[</span><span·class="p"·data-group-id="8051385844-10">]</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·505,·SHA:·9c703fcbe0158fe832d331b4f50c509a434896af2a8c7da19bd91eaa78b2a84b·...·]-1">]</span></code></pre><p>As·can·be·noted·above,·the·parameter·list·can·be·matched·against·a·single390 ·</span><span·class="p"·data-group-id="2453865715-9">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2453865715-10">[</span><span·class="p"·data-group-id="2453865715-10">]</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·505,·SHA:·4776bcfb43052c4a820285c9d48d375184ecc4d0a7562840877cc8b3767f34df·...·]-1">]</span></code></pre><p>As·can·be·noted·above,·the·parameter·list·can·be·matched·against·a·single
391 <code·class="inline">MatchVariable</code>·or·an·<code·class="inline">'_'</code>.·To·replace·the·whole·parameter·list·with·a·single391 <code·class="inline">MatchVariable</code>·or·an·<code·class="inline">'_'</code>.·To·replace·the·whole·parameter·list·with·a·single
392 variable·is·a·special·case.·In·all·other·cases·the·<code·class="inline">MatchHead</code>·must·be·a392 variable·is·a·special·case.·In·all·other·cases·the·<code·class="inline">MatchHead</code>·must·be·a
393 <em>proper</em>·list.</p><p>Generate·a·trace·message·only·if·the·trace·control·word·is·set·to·1:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3099779643-1">[</span><span·class="p"·data-group-id="3099779643-2">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">393 <em>proper</em>·list.</p><p>Generate·a·trace·message·only·if·the·trace·control·word·is·set·to·1:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0787290930-1">[</span><span·class="p"·data-group-id="0787290930-2">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
394 ··</span><span·class="p"·data-group-id="3099779643-3">[</span><span·class="p"·data-group-id="3099779643-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="3099779643-5">{</span><span·class="ss">get_tcw</span><span·class="p"·data-group-id="309977[·...·truncated·by·diffoscope;·len:·342,·SHA:·3a34194043171768668e30735a55b0ef8d4cbb96feefba1c632c480b0117fdfe·...·]-3">]</span><span·class="p">,</span><span·class="w">394 ··</span><span·class="p"·data-group-id="0787290930-3">[</span><span·class="p"·data-group-id="0787290930-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="0787290930-5">{</span><span·class="ss">get_tcw</span><span·class="p"·data-group-id="078729[·...·truncated·by·diffoscope;·len:·342,·SHA:·50681e228300531f2bc141c20e1b629a30abfe9d9c83303fd778c4728aa2d44b·...·]-3">]</span><span·class="p">,</span><span·class="w">
395 ··</span><span·class="p"·data-group-id="3099779643-7">[</span><span·class="p"·data-group-id="3099779643-7">]</span><span·class="p"·data-group-id="3099779643-2">}</span><span·class="p"·data-group-id="3099779643-1">]</span></code></pre><p>Generate·a·trace·message·only·if·there·is·a·<code·class="in[·...·truncated·by·diffoscope;·len:·175,·SHA:·11f5e9d12fb7597eefca7a7b41b5aab5d8a27e0dd2866c299aede5cf3b77d422·...·]-2">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">395 ··</span><span·class="p"·data-group-id="0787290930-7">[</span><span·class="p"·data-group-id="0787290930-7">]</span><span·class="p"·data-group-id="0787290930-2">}</span><span·class="p"·data-group-id="0787290930-1">]</span></code></pre><p>Generate·a·trace·message·only·if·there·is·a·<code·class="in[·...·truncated·by·diffoscope;·len:·175,·SHA:·d7d713053b049e2a6a4970d11c68551fa8c2eedb1c5befc416903f8c710ca1cd·...·]-2">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">
396 ··</span><span·class="p"·data-group-id="7445870593-3">[</span><span·class="p"·data-group-id="7445870593-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7445870593-5">{</span><span·class="ss">is_seq_trace</span><span·class="p"·data-group-id="7445870593-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="7445870593-6">{</span><span·class="ss">const</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="7445870593-6">}</span><span·class="p"·data-group-id="7445870593-4">}</span><span·class="p"·data-group-id="7445870593-3">]</span><span·class="p">,</span><span·class="w"> 
397 ··</span><span·class="p"·data-group-id="7445870593-7">[</span><span·class="p"·data-group-id="7445870593-7">]</span><span·class="p"·data-group-id="7445870593-2">}</span><span·class="p"·data-group-id="7445870593-1">]</span></code></pre><p>Remove·the·<code·class="inline">'silent'</code>·trace·flag·[·...·truncated·by·diffoscope;·len:·73,·SHA:·1d0ce4d7e6c1157d0f96d007d7ffcfbdaad817ac5d1db9e129886d5c923c76a7·...·]396 ··</span><span·class="p"·data-group-id="0358252767-3">[</span><span·class="p"·data-group-id="0358252767-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="0358252767-5">{</span><span·class="ss">is_seq_trace</span><span·class="p"·data-group-id="0[·...·truncated·by·diffoscope;·len:·399,·SHA:·5e2a066d7e579b519b621dda6cb02ceca23171cb477862577dfdb1ac6cb64411·...·]
 397 ··</span><span·class="p"·data-group-id="0358252767-7">[</span><span·class="p"·data-group-id="0358252767-7">]</span><span·class="p"·data-group-id="0358252767-2">}</span><span·class="p"·data-group-id="0358252767-1">]</span></code></pre><p>Remove·the·<code·class="inline">'silent'</code>·trace·flag·when·the·first·argument·is·<code·class="inline">'verbose'</code>,·and·add
398 it·when·it·is·<code·class="inline">'silent':</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8484771331-1">[</span><span·class="p"·data-group-id="8484771331-2">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">398 it·when·it·is·<code·class="inline">'silent':</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1739878170-1">[</span><span·class="p"·data-group-id="1739878170-2">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
399 ··</span><span·class="p"·data-group-id="8484771331-3">[</span><span·class="p"·data-group-id="8484771331-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="8484771331-5">{</span><span·class="nb">hd</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·244,·SHA:·af9e83d09161c6ca3b142c987eb7202516675eaf9075ccc5c8e7734373ee4112·...·]-3">]</span><span·class="p">,</span><span·class="w">399 ··</span><span·class="p"·data-group-id="1739878170-3">[</span><span·class="p"·data-group-id="1739878170-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="1739878170-5">{</span><span·class="nb">hd</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·244,·SHA:·d784371a751e64fd4e17c8c87223e9ffc9d38bc8dd9772fb83aeda5417ee8309·...·]-3">]</span><span·class="p">,</span><span·class="w">
400 ··</span><span·class="p"·data-group-id="8484771331-6">[</span><span·class="p"·data-group-id="8484771331-7">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8484771331-8">[</span><span·class="ss">silent</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·309,·SHA:·d4b20844b09d45ab7a971fca65aeb93104a77e9e7d1e48eba31493461edc8111·...·]-2">}</span><span·class="p">,</span><span·class="w">400 ··</span><span·class="p"·data-group-id="1739878170-6">[</span><span·class="p"·data-group-id="1739878170-7">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1739878170-8">[</span><span·class="ss">silent</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·309,·SHA:·09943cb0517a85eae69c92f597b40d91bd2c48074557845af1773dacf9b4da6f·...·]-2">}</span><span·class="p">,</span><span·class="w">
401 ·</span><span·class="p"·data-group-id="8484771331-10">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">401 ·</span><span·class="p"·data-group-id="1739878170-10">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
402 ··</span><span·class="p"·data-group-id="8484771331-11">[</span><span·class="p"·data-group-id="8484771331-12">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="8484771331-13">{</span><span·class="nb">hd</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·248,·SHA:·50d22e41ade22d3f78c38e7925f313fc956215450f59dc08222792f61ac00b51·...·]-11">]</span><span·class="p">,</span><span·class="w">402 ··</span><span·class="p"·data-group-id="1739878170-11">[</span><span·class="p"·data-group-id="1739878170-12">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="1739878170-13">{</span><span·class="nb">hd</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·248,·SHA:·69b371ce3b36d791ebaea85dcbec53235301314dac553bff0084aa878d1a0fc7·...·]-11">]</span><span·class="p">,</span><span·class="w">
403 ··</span><span·class="p"·data-group-id="8484771331-14">[</span><span·class="p"·data-group-id="8484771331-15">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8484771331-16">[</span><span·class="p"·data-group-id="8484771331-16">]<[·...·truncated·by·diffoscope;·len:·630,·SHA:·fb1be53c22062648c950c25a1d4f810351026422ea10d1ae1c0c764b4c0475bd·...·]-2">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">403 ··</span><span·class="p"·data-group-id="1739878170-14">[</span><span·class="p"·data-group-id="1739878170-15">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1739878170-16">[</span><span·class="p"·data-group-id="1739878170-16">]<[·...·truncated·by·diffoscope;·len:·630,·SHA:·684e0737c91eaa2b42fec580bc9e4b7b824c7547f138d7da0d1f77804ec93d39·...·]-2">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
404 ··</span><span·class="p"·data-group-id="4078492866-3">[</span><span·class="p"·data-group-id="4078492866-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="4078492866-5">{</span><span·class="nb">length</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·242,·SHA:·7473f98ea4381a37cfc7c4a7976af64fecffd351ba0c485664924cd9357ed289·...·]-3">]</span><span·class="p">,</span><span·class="w">404 ··</span><span·class="p"·data-group-id="0922228460-3">[</span><span·class="p"·data-group-id="0922228460-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="0922228460-5">{</span><span·class="nb">length</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·242,·SHA:·5380b4add6aa509c169c182605fadaf416f6d1086e5c0845b7c31895b8a687a3·...·]-3">]</span><span·class="p">,</span><span·class="w">
405 ··</span><span·class="p"·data-group-id="4078492866-6">[</span><span·class="p"·data-group-id="4078492866-7">{</span><span·class="ss">return_trace</span><span·class="p"·data-group-id="4078492866-7">}</span><span·class="p"·data-group-id="4078492866-6">]</span><span·class="p"·data-group-id="40784928[·...·truncated·by·diffoscope;·len:·2,·SHA:·3ada92f28b4ceda38562ebf047c6ff05400d4c572352a1142eedfef67d21e662·...·]-2">}</span><span·class="p">,</span><span·class="w">405 ··</span><span·class="p"·data-group-id="0922228460-6">[</span><span·class="p"·data-group-id="0922228460-7">{</span><span·class="ss">return_trace</span><span·class="p"·data-group-id="0922228460-7">}</span><span·class="p"·data-group-id="0922228460-6">]</span><span·class="p"·data-group-id="09222284[·...·truncated·by·diffoscope;·len:·2,·SHA:·39fa9ec190eee7b6f4dff1100d6343e10918d044c75eac8f9e9a2596173f80c9·...·]-2">}</span><span·class="p">,</span><span·class="w">
406 ·</span><span·class="p"·data-group-id="4078492866-8">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="4078492866-9">[</span><span·class="p"·data-group-id="4078492866-9">]</span><span·class="p">,</span><span·class="p"·data-group-id="4078492866-10"[·...·truncated·by·diffoscope;·len:·157,·SHA:·f7a462a842b3a37aa484796cf399ee2008d6e64e19217f07bb280fb3bbca8242·...·]-1">]</span></code></pre><p>Generate·a·trace·message·only·if·the·function·is·of·arity·3·and·the·first406 ·</span><span·class="p"·data-group-id="0922228460-8">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="0922228460-9">[</span><span·class="p"·data-group-id="0922228460-9">]</span><span·class="p">,</span><span·class="p"·data-group-id="0922228460-10"[·...·truncated·by·diffoscope;·len:·157,·SHA:·59e814ee9d4dbf40e027f60d192b89bc06f9c064b00d0b258673a0a79d617b1f·...·]-1">]</span></code></pre><p>Generate·a·trace·message·only·if·the·function·is·of·arity·3·and·the·first
407 argument·is·<code·class="inline">'trace'</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1526073912-1">[</span><span·class="p"·data-group-id="1526073912-2">{</span><span·class="p"·data-group-id="1526073912-3">[</span><span·class="ss">&#39;trace&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·72,·SHA:·eb8bb1b2e5cb89abe0902b11856ba718a1bfbfaf78db61469831dc388edfee30·...·]-3">]</span><span·class="p">,</span><span·class="w">407 argument·is·<code·class="inline">'trace'</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0738811911-1">[</span><span·class="p"·data-group-id="0738811911-2">{</span><span·class="p"·data-group-id="0738811911-3">[</span><span·class="ss">&#39;trace&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·72,·SHA:·cdae8582553e2418de52aa9425443a55587bd345af1519fc40489ebb093456a9·...·]-3">]</span><span·class="p">,</span><span·class="w">
408 ··</span><span·class="p"·data-group-id="1526073912-4">[</span><span·class="p"·data-group-id="1526073912-4">]</span><span·class="p">,</span><span·class="w">408 ··</span><span·class="p"·data-group-id="0738811911-4">[</span><span·class="p"·data-group-id="0738811911-4">]</span><span·class="p">,</span><span·class="w">
409 ··</span><span·class="p"·data-group-id="1526073912-5">[</span><span·class="p"·data-group-id="1526073912-5">]</span><span·class="p"·data-group-id="1526073912-2">}</span><span·class="p">,</span><span·class="w">409 ··</span><span·class="p"·data-group-id="0738811911-5">[</span><span·class="p"·data-group-id="0738811911-5">]</span><span·class="p"·data-group-id="0738811911-2">}</span><span·class="p">,</span><span·class="w">
410 ·</span><span·class="p"·data-group-id="1526073912-6">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="1526073912-7">[</span><span·class="p"·data-group-id="1526073912-7">]</span><span·class="p">,</span><span·class="p"·data-group-id="1526073912-8">[·...·truncated·by·diffoscope;·len:·155,·SHA:·0d079782d2b08224d04c04df9a7f8d4f1e4c9af2a77e66193a1a0e73b7c8f526·...·]-1">]</span></code></pre><h2·id="ets-examples"·class="section-heading">410 ·</span><span·class="p"·data-group-id="0738811911-6">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="0738811911-7">[</span><span·class="p"·data-group-id="0738811911-7">]</span><span·class="p">,</span><span·class="p"·data-group-id="0738811911-8">[·...·truncated·by·diffoscope;·len:·155,·SHA:·e4287556d3730d2501a5218a428c49f904edbd9eda69b901649b5d4d0298a7dc·...·]-1">]</span></code></pre><h2·id="ets-examples"·class="section-heading">
411 ··<a·href="#ets-examples"·class="hover-link">411 ··<a·href="#ets-examples"·class="hover-link">
412 ····<i·class="ri-link-m"·aria-hidden="true"></i>412 ····<i·class="ri-link-m"·aria-hidden="true"></i>
413 ··</a>413 ··</a>
414 ··<span·class="text">ETS·Examples</span>414 ··<span·class="text">ETS·Examples</span>
415 </h2>415 </h2>
416 <p>Match·all·objects·in·an·ETS·table,·where·the·first·element·is·the·atom416 <p>Match·all·objects·in·an·ETS·table,·where·the·first·element·is·the·atom
417 <code·class="inline">'strider'</code>·and·the·tuple·arity·is·3,·and·return·the·whole·object:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5948385095-1">[</span><span·class="p"·data-group-id="5948385095-2">{</span><span·class="p"·data-group-id="5948385095-3">{</span><span·class="ss">strider</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="s[·...·truncated·by·diffoscope;·len:·62,·SHA:·ce23ba44bf304293876770933c4423d5cbf953480a9c3708d0264934ea17e43c·...·]-3">}</span><span·class="p">,</span><span·class="w">417 <code·class="inline">'strider'</code>·and·the·tuple·arity·is·3,·and·return·the·whole·object:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8840904836-1">[</span><span·class="p"·data-group-id="8840904836-2">{</span><span·class="p"·data-group-id="8840904836-3">{</span><span·class="ss">strider</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="s[·...·truncated·by·diffoscope;·len:·62,·SHA:·88a0ad491ae3385552b357c23fc9bb193f0ddaf0e321a21bcbb545e4a597107c·...·]-3">}</span><span·class="p">,</span><span·class="w">
418 ··</span><span·class="p"·data-group-id="5948385095-4">[</span><span·class="p"·data-group-id="5948385095-4">]</span><span·class="p">,</span><span·class="w">418 ··</span><span·class="p"·data-group-id="8840904836-4">[</span><span·class="p"·data-group-id="8840904836-4">]</span><span·class="p">,</span><span·class="w">
419 ··</span><span·class="p"·data-group-id="5948385095-5">[</span><span·class="ss">&#39;$_&#39;</span><span·class="p"·data-group-id="5948385095-5">]</span><span·class="p"·data-group-id="5948385095-2">}</span><span·class="p"·data-group-id="5948385095-1">]</span></code></pre><p>Match·all·objects·in·an·ETS·table·with·arity·&gt;·1·and·the·first·element·is419 ··</span><span·class="p"·data-group-id="8840904836-5">[</span><span·class="ss">&#39;$_&#39;</span><span·class="p"·data-group-id="8840904836-5">]</span><span·class="p"·data-group-id="8840904836-2">}</span><span·class="p"·data-group-id="8840904836-1">]</span></code></pre><p>Match·all·objects·in·an·ETS·table·with·arity·&gt;·1·and·the·first·element·is
420 'gandalf',·and·return·element·2:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9639737051-1">[</span><span·class="p"·data-group-id="9639737051-2">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">420 'gandalf',·and·return·element·2:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9533542088-1">[</span><span·class="p"·data-group-id="9533542088-2">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
421 ··</span><span·class="p"·data-group-id="9639737051-3">[</span><span·class="p"·data-group-id="9639737051-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">gandalf</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·829,·SHA:·31ad04a7150084cdc8897f5c060a4c2a099707d0c90bb4634bab04bb64bd8156·...·]-3">]</span><span·class="p">,</span><span·class="w">421 ··</span><span·class="p"·data-group-id="9533542088-3">[</span><span·class="p"·data-group-id="9533542088-4">{</span><span·class="ss">&#39;==&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">gandalf</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·829,·SHA:·c3b24eaf1ddf7ea949fcf6290a8722fed91de1cca5e2e011ea99c7f6a2a65d3c·...·]-3">]</span><span·class="p">,</span><span·class="w">
422 ··</span><span·class="p"·data-group-id="9639737051-8">[</span><span·class="p"·data-group-id="9639737051-9">{</span><span·class="nb">element</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="9639737051-[·...·truncated·by·diffoscope;·len:·158,·SHA:·39f389d000edba72c3f7d2508b48ff01082fb7044bca4ea25a77ec16c810b8b6·...·]-1">]</span></code></pre><p>In·this·example,·if·the·first·element·had·been·the·key,·it·is·much·more422 ··</span><span·class="p"·data-group-id="9533542088-8">[</span><span·class="p"·data-group-id="9533542088-9">{</span><span·class="nb">element</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="9533542088-[·...·truncated·by·diffoscope;·len:·158,·SHA:·f70e5482951fd7c5a0b341524df4c97e84cb0059e840fa7e1ac1b55242be559e·...·]-1">]</span></code></pre><p>In·this·example,·if·the·first·element·had·been·the·key,·it·is·much·more
423 efficient·to·match·that·key·in·the·<code·class="inline">MatchHead</code>·part·than·in·the423 efficient·to·match·that·key·in·the·<code·class="inline">MatchHead</code>·part·than·in·the
424 <code·class="inline">MatchConditions</code>·part.·The·search·space·of·the·tables·is·restricted·with424 <code·class="inline">MatchConditions</code>·part.·The·search·space·of·the·tables·is·restricted·with
425 regards·to·the·<code·class="inline">MatchHead</code>·so·that·only·objects·with·the·matching·key·are425 regards·to·the·<code·class="inline">MatchHead</code>·so·that·only·objects·with·the·matching·key·are
426 searched.</p><p>Match·tuples·of·three·elements,·where·the·second·element·is·either·<code·class="inline">'merry'</code>·or426 searched.</p><p>Match·tuples·of·three·elements,·where·the·second·element·is·either·<code·class="inline">'merry'</code>·or
427 <code·class="inline">'pippin'</code>,·and·return·the·whole·objects:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9811997496-1">[</span><span·class="p"·data-group-id="9811997496-2">{</span><span·class="p"·data-group-id="9811997496-3">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">merry</span><span·class="p">,</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·60,·SHA:·2e7f027e922f319ebcc22b43d85ebdcd5fc28f4b31beda22ba7d9d42a4314980·...·]-3">}</span><span·class="p">,</span><span·class="w">427 <code·class="inline">'pippin'</code>,·and·return·the·whole·objects:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8871909039-1">[</span><span·class="p"·data-group-id="8871909039-2">{</span><span·class="p"·data-group-id="8871909039-3">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">merry</span><span·class="p">,</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·60,·SHA:·70efcd3a03d715ce2926e13e6807fe8301d8bb634904f425ac8d696374e59840·...·]-3">}</span><span·class="p">,</span><span·class="w">
428 ··</span><span·class="p"·data-group-id="9811997496-4">[</span><span·class="p"·data-group-id="9811997496-4">]</span><span·class="p">,</span><span·class="w">428 ··</span><span·class="p"·data-group-id="8871909039-4">[</span><span·class="p"·data-group-id="8871909039-4">]</span><span·class="p">,</span><span·class="w">
429 ··</span><span·class="p"·data-group-id="9811997496-5">[</span><span·class="ss">&#39;$_&#39;</span><span·class="p"·data-group-id="9811997496-5">]</span><span·class="p"·data-group-id="9811997496-2">}</span><span·class="p">,</span><span·class="w">429 ··</span><span·class="p"·data-group-id="8871909039-5">[</span><span·class="ss">&#39;$_&#39;</span><span·class="p"·data-group-id="8871909039-5">]</span><span·class="p"·data-group-id="8871909039-2">}</span><span·class="p">,</span><span·class="w">
430 ·</span><span·class="p"·data-group-id="9811997496-6">{</span><span·class="p"·data-group-id="9811997496-7">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">pippin</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="98[·...·truncated·by·diffoscope;·len:·8,·SHA:·f06cedec14ae72d47881fbb93948fe0c2677c02de614cee479959f129db61881·...·]-7">}</span><span·class="p">,</span><span·class="w">430 ·</span><span·class="p"·data-group-id="8871909039-6">{</span><span·class="p"·data-group-id="8871909039-7">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">pippin</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="88[·...·truncated·by·diffoscope;·len:·8,·SHA:·2d6cdcf7a8bb65a8abe9ac27ba66dbabb204f9488ea4c799effe63f2011f0563·...·]-7">}</span><span·class="p">,</span><span·class="w">
431 ··</span><span·class="p"·data-group-id="9811997496-8">[</span><span·class="p"·data-group-id="9811997496-8">]</span><span·class="p">,</span><span·class="w">431 ··</span><span·class="p"·data-group-id="8871909039-8">[</span><span·class="p"·data-group-id="8871909039-8">]</span><span·class="p">,</span><span·class="w">
432 ··</span><span·class="p"·data-group-id="9811997496-9">[</span><span·class="ss">&#39;$_&#39;</span><span·class="p"·data-group-id="9811997496-9">]</span><span·class="p"·data-group-id="9811997496-6">}</span><span·class="p"·data-group-id="9811997496-1">]</span></code></pre><p>Function·<a·href="../../../lib/stdlib-6.0.1/doc/html/ets.html#test_ms/2"><code·class="inline">ets:test_ms/2</code></a>·can·be·useful·for·testing·complicated·ETS·matches.</p>432 ··</span><span·class="p"·data-group-id="8871909039-9">[</span><span·class="ss">&#39;$_&#39;</span><span·class="p"·data-group-id="8871909039-9">]</span><span·class="p"·data-group-id="8871909039-6">}</span><span·class="p"·data-group-id="8871909039-1">]</span></code></pre><p>Function·<a·href="../../../lib/stdlib-6.0.1/doc/html/ets.html#test_ms/2"><code·class="inline">ets:test_ms/2</code></a>·can·be·useful·for·testing·complicated·ETS·matches.</p>
433 </div>433 </div>
  
434 <div·class="bottom-actions"·id="bottom-actions">434 <div·class="bottom-actions"·id="bottom-actions">
435 ··<div·class="bottom-actions-item">435 ··<div·class="bottom-actions-item">
  
436 ······<a·href="time_correction.html"·class="bottom-actions-button"·rel="prev">436 ······<a·href="time_correction.html"·class="bottom-actions-button"·rel="prev">
437 ········<span·class="subheader">437 ········<span·class="subheader">
39.7 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/notes.html
    
Offset 151, 25 lines modifiedOffset 151, 25 lines modified
151 </h3>151 </h3>
152 <ul><li><p>Bugs·in·how·<code·class="inline">erl·-extra</code>·interacts·with·passing·flags·via·ERL_*FLAGS·or·<code·class="inline">-args_file</code>·have·been·fixed.</p><p>Own·Id:·OTP-18766·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7639"·title="">PR-7639</a></p></li><li><p>Fixed·a·bug·that·prevented·the·emulator·from·building·on·recent·versions·of·Yocto·Linux.</p><p>Own·Id:·OTP-18918·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7952"·title="">PR-7952</a></p></li><li><p>Fixed·spectre·mitigation·configure·test·to·work·with·GCC·patches·to·always·add·<code·class="inline">-fcf-protection=full</code>.</p><p>Own·Id:·OTP-18928·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8006"·title="">PR-8006</a></p></li><li><p>A··call·to·<code·class="inline">socket:[recv|recvfrom|recvmsg]/*</code>·with·Timeout·=·0·on·Windows·could·cause·a·(case·clause)·crash·if·data·is·immediately·available.</p><p>Own·Id:·OTP-19063·Aux·Id:·OTP-18835</p></li><li><p>Fix·bug·on·Windows·where·<code·class="inline">exit_status</code>·would·not·be·sent·when·a·port·exits·after·the·stdin/stdout·handles·have·been·closed.</p><p>Own·Id:·OTP-19077·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8324"·title="">PR-8324</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">152 <ul><li><p>Bugs·in·how·<code·class="inline">erl·-extra</code>·interacts·with·passing·flags·via·ERL_*FLAGS·or·<code·class="inline">-args_file</code>·have·been·fixed.</p><p>Own·Id:·OTP-18766·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7639"·title="">PR-7639</a></p></li><li><p>Fixed·a·bug·that·prevented·the·emulator·from·building·on·recent·versions·of·Yocto·Linux.</p><p>Own·Id:·OTP-18918·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7952"·title="">PR-7952</a></p></li><li><p>Fixed·spectre·mitigation·configure·test·to·work·with·GCC·patches·to·always·add·<code·class="inline">-fcf-protection=full</code>.</p><p>Own·Id:·OTP-18928·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8006"·title="">PR-8006</a></p></li><li><p>A··call·to·<code·class="inline">socket:[recv|recvfrom|recvmsg]/*</code>·with·Timeout·=·0·on·Windows·could·cause·a·(case·clause)·crash·if·data·is·immediately·available.</p><p>Own·Id:·OTP-19063·Aux·Id:·OTP-18835</p></li><li><p>Fix·bug·on·Windows·where·<code·class="inline">exit_status</code>·would·not·be·sent·when·a·port·exits·after·the·stdin/stdout·handles·have·been·closed.</p><p>Own·Id:·OTP-19077·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8324"·title="">PR-8324</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">
153 ··<a·href="#improvements-and-new-features"·class="hover-link">153 ··<a·href="#improvements-and-new-features"·class="hover-link">
154 ····<i·class="ri-link-m"·aria-hidden="true"></i>154 ····<i·class="ri-link-m"·aria-hidden="true"></i>
155 ··</a>155 ··</a>
156 ··<span·class="text">Improvements·and·New·Features</span>156 ··<span·class="text">Improvements·and·New·Features</span>
157 </h3>157 </h3>
158 <ul><li><p>Refactored·how·the·JIT·handles·POSIX·signals·and·how·they·affect·thread·stacks,·allowing·us·to·use·the·native·stack·register·for·Erlang·stacks·on·more·platforms.</p><p>Notably,·containers·built·on·64-bit·x86·Alpine·Linux·images·will·now·perform·much·better·in·sequential·code.·As·an·example,·running·<code·class="inline">dialyzer</code>·over·the·OTP·code·base·finishes·about·15%·quicker.</p><p>Own·Id:·OTP-18568·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7174"·title="">PR-7174</a></p></li><li><p>The·<a·href="../../../lib/runtime_tools-2.1/doc/html/instrument.html"><code·class="inline">instrument</code></a>·module·can·now·track·allocations·on·a·per-process·or·per-port·basis.</p><p>Own·Id:·OTP-18577·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7236"·title="">PR-7236</a></p></li><li><p>The·<code·class="inline">pid</code>·field·returned·from·<a·href="erlang.html#fun_info/2"><code·class="inline">erlang:fun_info/1,2</code></a>·is·now·always·the·pid·for·the·<code·class="inline">init</code>·process·of·the·local·node,·not·the·pid·for·the·actual·process·that·created·the·fun.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18594·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7274"·title="">PR-7274</a></p></li><li><p>By·default,·escripts·will·now·be·compiled·instead·of·interpreted.·That·means·that·the·<code·class="inline">compiler</code>·application·must·be·installed.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18639·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7348"·title="">PR-7348</a></p></li><li><p>A·binary·returned·from·the·<a·href="../../../lib/kernel-10.0.1/doc/html/socket.html"><code·class="inline">socket</code></a>·receive·functions·is·no·longer·created·as·a·sub·binary·of·an·often·large·receive·buffer·binary·(socket·option·<code·class="inline">{otp,rcvbuf}</code>).··This·avoids·space·waste,·trusting·the·allocators·to·implement·reallocation·efficiently.</p><p>Own·Id:·OTP-18642·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/6152"·title="">GH-6152</a>,·<a·href="https://github.com/erlang/otp/pull/7465"·title="">PR-7465</a></p></li><li><p>The·default·process·limit·has·been·raised·to·<code·class="inline">1048576</code>·processes.</p><p>Own·Id:·OTP-18699·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7388"·title="">PR-7388</a></p></li><li><p>The·<a·href="erlang.html#system_monitor/2"><code·class="inline">erlang:system_monitor/2</code></a>·functionality·is·now·able·to·monitor·long·message·queues·in·the·system.</p><p>Own·Id:·OTP-18709·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7651"·title="">PR-7651</a></p></li><li><p>The·<code·class="inline">erl</code>·command·now·supports·the·<code·class="inline">-S</code>·flag,·which·is·similar·to·the·<code·class="inline">-run</code>·flag,·except·that·it·will·pass·all·arguments·up·to·end·of·the·command·line·to·the·called·function.·(The·<code·class="inline">-run</code>·flag·will·not·pass·arguments·beginning·with·a·hyphen.)·Another·difference·is·that·<code·class="inline">-S</code>·will·always·call·a·function·with·one·argument,·passing·an·empty·list·if·no·arguments·were·given.</p><p>Own·Id:·OTP-18744·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7470"·title="">PR-7470</a></p></li><li><p>When·implementing·an·alternative·carrier·for·the·Erlang·distribution,·a·separate·input·handler·process·may·now·be·registered,·using·<a·href="erlang.html#dist_ctrl_input_handler/2"><code·class="inline">erlang:dist_ctrl_input_handler/2</code></a>,·also·in·the·case·when·the·distribution·controller·is·a·port.</p><p>Own·Id:·OTP-18774·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7110"·title="">PR-7110</a></p></li><li><p>The·call·stack·trace·has·now·been·added·to·the·error·reported·by·<a·href="erlang.html#process_flag/2"><code·class="inline">erlang:process_flag/2</code></a>·when·<code·class="inline">max_heap_size</code>·limit·has·been·exceeded.</p><p>Own·Id:·OTP-18779·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7592"·title="">PR-7592</a></p></li><li><p><code·class="inline">-callback</code>·attributes·have·been·added·to·<a·href="erl_tracer.html"><code·class="inline">erl_tracer</code></a>.</p><p>Own·Id:·OTP-18794·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7703"·title="">PR-7703</a></p></li><li><p>For·<code·class="inline">inet_backend·=·socket</code>,·setting·the·<code·class="inline">active</code>·socket·option·alone,·to·<code·class="inline">once</code>,·<code·class="inline">true</code>·or·<code·class="inline">N</code>·has·been·optimized,·as·well·as·the·corresponding·data·delivery.</p><p>Own·Id:·OTP-18835</p></li><li><p>New·functions·<code·class="inline">socket:sendv/*</code>·for·sending·I/O·vectors·have·been·added.</p><p>Own·Id:·OTP-18845</p></li><li><p>Socket·options·that·take·string·now·also·accept·binaries.</p><p>Own·Id:·OTP-18849·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/6510"·title="">PR-6510</a></p></li><li><p>Native·coverage·support·has·been·implemented·in·the·JIT.·It·will··automatically·be·used·by·the·<a·href="../../../lib/tools-4.0/doc/html/cover.html"><code·class="inline">cover</code></a>·tool·to·reduce·the·execution·overhead·when·running·cover-compiled·code.</p><p>There·are·also·new·APIs·to·support·native·coverage·without·using·the·<code·class="inline">cover</code>·tool.</p><p>To·instrument·code·for·native·coverage·it·must·be·compiled·with·the·<a·href="../../../lib/compiler-8.5.1/doc/html/compile.html#line_coverage"><code·class="inline">line_coverage</code></a>·option.</p><p>To·enable·native·coverage·in·the·runtime·system,·start·it·like·so:</p><pre><code·class="text">$·erl·+JPcover·true</code></pre><p>There·are·also·the·following·new·functions·for·supporting·native·coverage:</p><ul><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#coverage_support/0"><code·class="inline">code:coverage_support/0</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage/2"><code·class="inline">code:get_coverage/2</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#reset_coverage/1"><code·class="inline">code:reset_coverage/1</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/0"><code·class="inline">code:get_coverage_mode/0</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/1"><code·class="inline">code:get_coverage_mode/1</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#set_coverage_mode/1"><code·class="inline">code:set_coverage_mode/1</code></a></li></ul><p>Own·Id:·OTP-18856·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7856"·title="">PR-7856</a></p></li><li><p>Changed·the·default·value·of·the·command·line·flag·<code·class="inline">-code_path_choice</code>·to·<code·class="inline">strict</code>.·</p><p>Note·that·for·application·systems·using·archives,·it·is·necessary·to·add·the·<code·class="inline">code_path_choice·relaxed</code>·to·the·command·line·that·invokes·<code·class="inline">erl</code>.</p><p>Own·Id:·OTP-18894·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7243"·title="">PR-7243</a></p></li><li><p>Added·module·loading·to·<code·class="inline">erl·-init_debug</code>·printouts.</p><p>Own·Id:·OTP-18929·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8004"·title="">PR-8004</a></p></li><li><p>When·the·runtime·system·halts,·it·performs·various·flush·operations·before·terminating.·By·default·there·is·no·limit·on·how·much·time·the·flush·operations·are·allowed·to·take.·A·new·<em>halt·flush·timeout</em>·functionality·has·been·introduced·which·can·be·used·for·limiting·the·amount·of·time·that·the·flushing·operations·are·allowed·to·take.·For·more·information·see·the·documentation·of·the·<a·href="erlang.html#halt_flush_timeout"><code·class="inline">flush_timeout</code></a>·option·of·the·<a·href="erlang.html#halt/2"><code·class="inline">erlang:halt/2</code></a>·BIF·and·the·documentation·of·the·<code·class="inline">erl</code>·<a·href="erl_cmd.html#+zhft"><code·class="inline">+zhft·&lt;Timeout&gt;</code></a>·command·line·flag.</p><p>Own·Id:·OTP-18938·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8035"·title="">PR-8035</a>,·<a·href="https://github.com/erlang/otp/issues/7438"·title="">GH-7438</a></p></li><li><p>Optimized·code·loading·by·moving·certain·operations·from·the·code·server·to·the·caller.</p><p>Own·Id:·OTP-18941·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7981"·title="">PR-7981</a></p></li><li><p>Updated·asmjit·to·version·a465fe71ab3d0e224b2b4bd0fac69ae68ab9239d</p><p>Own·Id:·OTP-18942</p></li><li><p>The·deprecated·functions·in·<a·href="zlib.html"><code·class="inline">zlib</code></a>·have·been·removed.·That·includes·<code·class="inline">inflateChunk/{1,2}</code>,·<code·class="inline">getBufSize/1</code>,·<code·class="inline">setBufSize/2</code>,·the·CRC32·functions,·and·the·Adler·checksum·functions.</p><p>Own·Id:·OTP-18950</p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>Safe·destructive·update·of·tuples·has·been·implemented·in·the·compiler·and·runtime·system.·This·allows·the·VM·to·update·tuples·in-place·when·it·is·safe·to·do·so,·thus·improving·performance·by·doing·less·copying·but·also·by·producing·less·garbage.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1156489748-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1156489748-2">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·111,·SHA:·850b25f85d0460d2ba089cc325c1e39215b72721475fed14f168ffceea34ce05·...·]-1">)</span><span·class="p">.</span><span·class="w">158 <ul><li><p>Refactored·how·the·JIT·handles·POSIX·signals·and·how·they·affect·thread·stacks,·allowing·us·to·use·the·native·stack·register·for·Erlang·stacks·on·more·platforms.</p><p>Notably,·containers·built·on·64-bit·x86·Alpine·Linux·images·will·now·perform·much·better·in·sequential·code.·As·an·example,·running·<code·class="inline">dialyzer</code>·over·the·OTP·code·base·finishes·about·15%·quicker.</p><p>Own·Id:·OTP-18568·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7174"·title="">PR-7174</a></p></li><li><p>The·<a·href="../../../lib/runtime_tools-2.1/doc/html/instrument.html"><code·class="inline">instrument</code></a>·module·can·now·track·allocations·on·a·per-process·or·per-port·basis.</p><p>Own·Id:·OTP-18577·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7236"·title="">PR-7236</a></p></li><li><p>The·<code·class="inline">pid</code>·field·returned·from·<a·href="erlang.html#fun_info/2"><code·class="inline">erlang:fun_info/1,2</code></a>·is·now·always·the·pid·for·the·<code·class="inline">init</code>·process·of·the·local·node,·not·the·pid·for·the·actual·process·that·created·the·fun.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18594·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7274"·title="">PR-7274</a></p></li><li><p>By·default,·escripts·will·now·be·compiled·instead·of·interpreted.·That·means·that·the·<code·class="inline">compiler</code>·application·must·be·installed.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18639·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7348"·title="">PR-7348</a></p></li><li><p>A·binary·returned·from·the·<a·href="../../../lib/kernel-10.0.1/doc/html/socket.html"><code·class="inline">socket</code></a>·receive·functions·is·no·longer·created·as·a·sub·binary·of·an·often·large·receive·buffer·binary·(socket·option·<code·class="inline">{otp,rcvbuf}</code>).··This·avoids·space·waste,·trusting·the·allocators·to·implement·reallocation·efficiently.</p><p>Own·Id:·OTP-18642·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/6152"·title="">GH-6152</a>,·<a·href="https://github.com/erlang/otp/pull/7465"·title="">PR-7465</a></p></li><li><p>The·default·process·limit·has·been·raised·to·<code·class="inline">1048576</code>·processes.</p><p>Own·Id:·OTP-18699·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7388"·title="">PR-7388</a></p></li><li><p>The·<a·href="erlang.html#system_monitor/2"><code·class="inline">erlang:system_monitor/2</code></a>·functionality·is·now·able·to·monitor·long·message·queues·in·the·system.</p><p>Own·Id:·OTP-18709·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7651"·title="">PR-7651</a></p></li><li><p>The·<code·class="inline">erl</code>·command·now·supports·the·<code·class="inline">-S</code>·flag,·which·is·similar·to·the·<code·class="inline">-run</code>·flag,·except·that·it·will·pass·all·arguments·up·to·end·of·the·command·line·to·the·called·function.·(The·<code·class="inline">-run</code>·flag·will·not·pass·arguments·beginning·with·a·hyphen.)·Another·difference·is·that·<code·class="inline">-S</code>·will·always·call·a·function·with·one·argument,·passing·an·empty·list·if·no·arguments·were·given.</p><p>Own·Id:·OTP-18744·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7470"·title="">PR-7470</a></p></li><li><p>When·implementing·an·alternative·carrier·for·the·Erlang·distribution,·a·separate·input·handler·process·may·now·be·registered,·using·<a·href="erlang.html#dist_ctrl_input_handler/2"><code·class="inline">erlang:dist_ctrl_input_handler/2</code></a>,·also·in·the·case·when·the·distribution·controller·is·a·port.</p><p>Own·Id:·OTP-18774·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7110"·title="">PR-7110</a></p></li><li><p>The·call·stack·trace·has·now·been·added·to·the·error·reported·by·<a·href="erlang.html#process_flag/2"><code·class="inline">erlang:process_flag/2</code></a>·when·<code·class="inline">max_heap_size</code>·limit·has·been·exceeded.</p><p>Own·Id:·OTP-18779·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7592"·title="">PR-7592</a></p></li><li><p><code·class="inline">-callback</code>·attributes·have·been·added·to·<a·href="erl_tracer.html"><code·class="inline">erl_tracer</code></a>.</p><p>Own·Id:·OTP-18794·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7703"·title="">PR-7703</a></p></li><li><p>For·<code·class="inline">inet_backend·=·socket</code>,·setting·the·<code·class="inline">active</code>·socket·option·alone,·to·<code·class="inline">once</code>,·<code·class="inline">true</code>·or·<code·class="inline">N</code>·has·been·optimized,·as·well·as·the·corresponding·data·delivery.</p><p>Own·Id:·OTP-18835</p></li><li><p>New·functions·<code·class="inline">socket:sendv/*</code>·for·sending·I/O·vectors·have·been·added.</p><p>Own·Id:·OTP-18845</p></li><li><p>Socket·options·that·take·string·now·also·accept·binaries.</p><p>Own·Id:·OTP-18849·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/6510"·title="">PR-6510</a></p></li><li><p>Native·coverage·support·has·been·implemented·in·the·JIT.·It·will··automatically·be·used·by·the·<a·href="../../../lib/tools-4.0/doc/html/cover.html"><code·class="inline">cover</code></a>·tool·to·reduce·the·execution·overhead·when·running·cover-compiled·code.</p><p>There·are·also·new·APIs·to·support·native·coverage·without·using·the·<code·class="inline">cover</code>·tool.</p><p>To·instrument·code·for·native·coverage·it·must·be·compiled·with·the·<a·href="../../../lib/compiler-8.5.1/doc/html/compile.html#line_coverage"><code·class="inline">line_coverage</code></a>·option.</p><p>To·enable·native·coverage·in·the·runtime·system,·start·it·like·so:</p><pre><code·class="text">$·erl·+JPcover·true</code></pre><p>There·are·also·the·following·new·functions·for·supporting·native·coverage:</p><ul><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#coverage_support/0"><code·class="inline">code:coverage_support/0</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage/2"><code·class="inline">code:get_coverage/2</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#reset_coverage/1"><code·class="inline">code:reset_coverage/1</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/0"><code·class="inline">code:get_coverage_mode/0</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/1"><code·class="inline">code:get_coverage_mode/1</code></a></li><li><a·href="../../../lib/kernel-10.0.1/doc/html/code.html#set_coverage_mode/1"><code·class="inline">code:set_coverage_mode/1</code></a></li></ul><p>Own·Id:·OTP-18856·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7856"·title="">PR-7856</a></p></li><li><p>Changed·the·default·value·of·the·command·line·flag·<code·class="inline">-code_path_choice</code>·to·<code·class="inline">strict</code>.·</p><p>Note·that·for·application·systems·using·archives,·it·is·necessary·to·add·the·<code·class="inline">code_path_choice·relaxed</code>·to·the·command·line·that·invokes·<code·class="inline">erl</code>.</p><p>Own·Id:·OTP-18894·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7243"·title="">PR-7243</a></p></li><li><p>Added·module·loading·to·<code·class="inline">erl·-init_debug</code>·printouts.</p><p>Own·Id:·OTP-18929·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8004"·title="">PR-8004</a></p></li><li><p>When·the·runtime·system·halts,·it·performs·various·flush·operations·before·terminating.·By·default·there·is·no·limit·on·how·much·time·the·flush·operations·are·allowed·to·take.·A·new·<em>halt·flush·timeout</em>·functionality·has·been·introduced·which·can·be·used·for·limiting·the·amount·of·time·that·the·flushing·operations·are·allowed·to·take.·For·more·information·see·the·documentation·of·the·<a·href="erlang.html#halt_flush_timeout"><code·class="inline">flush_timeout</code></a>·option·of·the·<a·href="erlang.html#halt/2"><code·class="inline">erlang:halt/2</code></a>·BIF·and·the·documentation·of·the·<code·class="inline">erl</code>·<a·href="erl_cmd.html#+zhft"><code·class="inline">+zhft·&lt;Timeout&gt;</code></a>·command·line·flag.</p><p>Own·Id:·OTP-18938·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8035"·title="">PR-8035</a>,·<a·href="https://github.com/erlang/otp/issues/7438"·title="">GH-7438</a></p></li><li><p>Optimized·code·loading·by·moving·certain·operations·from·the·code·server·to·the·caller.</p><p>Own·Id:·OTP-18941·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7981"·title="">PR-7981</a></p></li><li><p>Updated·asmjit·to·version·a465fe71ab3d0e224b2b4bd0fac69ae68ab9239d</p><p>Own·Id:·OTP-18942</p></li><li><p>The·deprecated·functions·in·<a·href="zlib.html"><code·class="inline">zlib</code></a>·have·been·removed.·That·includes·<code·class="inline">inflateChunk/{1,2}</code>,·<code·class="inline">getBufSize/1</code>,·<code·class="inline">setBufSize/2</code>,·the·CRC32·functions,·and·the·Adler·checksum·functions.</p><p>Own·Id:·OTP-18950</p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>Safe·destructive·update·of·tuples·has·been·implemented·in·the·compiler·and·runtime·system.·This·allows·the·VM·to·update·tuples·in-place·when·it·is·safe·to·do·so,·thus·improving·performance·by·doing·less·copying·but·also·by·producing·less·garbage.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9947052481-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9947052481-2">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·111,·SHA:·83337f59d45ee7cb893842aada4ce7f1e766410afdc9f19a1b7c39d69fea9768·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
159 </span><span·class="nf">update</span><span·class="p"·data-group-id="1156489748-3">(</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1156489748-4">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">needs_update</span><span·class="p">,</span><span·class="ss">b</s[·...·truncated·by·diffoscope;·len:·195,·SHA:·bdf26cc173cd1f69eb8200a9b1c4825a9b5d2d6b869df4f9403edda401c3d3a1·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 </span><span·class="nf">update</span><span·class="p"·data-group-id="9947052481-3">(</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9947052481-4">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">needs_update</span><span·class="p">,</span><span·class="ss">b</s[·...·truncated·by·diffoscope;·len:·195,·SHA:·4d11a81b35dd041a768692ec1da2d29d7d93540e60b769fd1b12f41695f0ca90·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R0</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1156489748-5">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">up_to_date</span><span·class="p"·data-group-id="1156489748-5">}</span><span·class="p">,</span><span·class="w">160 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R0</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9947052481-5">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">up_to_date</span><span·class="p"·data-group-id="9947052481-5">}</span><span·class="p">,</span><span·class="w">
161 ····</span><span·class="k">if</span><span·class="w">161 ····</span><span·class="k">if</span><span·class="w">
162 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">162 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
163 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1156489748-6">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">negative</span><span·class="p"·data-group-id="1156489748-6">}</span><span·class="p">;</span><span·class="w">163 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9947052481-6">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">negative</span><span·class="p"·data-group-id="9947052481-6">}</span><span·class="p">;</span><span·class="w">
164 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">164 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
165 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1156489748-7">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">zero</span><span·class="p"·data-group-id="1156489748-7">}</span><span·class="p">;</span><span·class="w">165 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9947052481-7">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">zero</span><span·class="p"·data-group-id="9947052481-7">}</span><span·class="p">;</span><span·class="w">
166 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">166 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
167 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1156489748-8">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">positive</span><span·class="p"·data-group-id="1156489748-8">}</span><span·class="w">167 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9947052481-8">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">positive</span><span·class="p"·data-group-id="9947052481-8">}</span><span·class="w">
168 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·record·updates·in·each·of·the·three·clauses·of·the·<code·class="inline">if</code>·can·safely·be·done·in-place,·because·variable·<code·class="inline">R</code>·is·not·used·again.</p><p>Own·Id:·OTP-18972·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8090"·title="">PR-8090</a></p></li><li><p>The·obsolete·and·undocumented·support·for·opening·a·port·to·an·external168 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·record·updates·in·each·of·the·three·clauses·of·the·<code·class="inline">if</code>·can·safely·be·done·in-place,·because·variable·<code·class="inline">R</code>·is·not·used·again.</p><p>Own·Id:·OTP-18972·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8090"·title="">PR-8090</a></p></li><li><p>The·obsolete·and·undocumented·support·for·opening·a·port·to·an·external
169 resource·by·passing·an·atom·(or·a·string)·as·first·argument·to169 resource·by·passing·an·atom·(or·a·string)·as·first·argument·to
170 <a·href="erlang.html#open_port/2"><code·class="inline">open_port()</code></a>,·implemented·by·the·vanilla·driver,170 <a·href="erlang.html#open_port/2"><code·class="inline">open_port()</code></a>,·implemented·by·the·vanilla·driver,
171 has·been·removed.·This·feature·has·been·scheduled·for·removal·in·OTP·27171 has·been·removed.·This·feature·has·been·scheduled·for·removal·in·OTP·27
172 since·the·release·of·OTP·26.</p><p>Own·Id:·OTP-18976·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7125"·title="">PR-7125</a></p></li><li><p>An·optional·NIF·callback·<code·class="inline">ERL_NIF_OPT_ON_UNLOAD_THREAD</code>·to·be·called·by·all·scheduler·threads·when·a·NIF·library·is·unloaded.·Used·for·releasing·thread·specific·data.·Can·be·set·with·function·<code·class="inline">enif_set_option</code>.</p><p>Own·Id:·OTP-18977·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7809"·title="">PR-7809</a></p></li><li><p>There·is·a·new·module·<a·href="../../../lib/kernel-10.0.1/doc/html/trace.html"><code·class="inline">trace</code></a>·in·Kernel·providing·the·same·trace·functionality·as·<a·href="erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·and·<a·href="erlang.html#trace_pattern/3"><code·class="inline">erlang:trace_pattern/3</code></a>,·but·with·the·addition·of·<strong>dynamic·isolated·trace·sessions</strong>.</p><p>Own·Id:·OTP-18980</p></li><li><p>Added·the·<code·class="inline">+MMlp·on|off</code>·emulator·option·to·let·the·<code·class="inline">mseg</code>·allocator·use·&quot;large·pages&quot;·(sometimes·known·as·&quot;huge·pages&quot;·or·&quot;super·pages&quot;).·This·currently·only·affects·super-carrier·allocations,·but·may·be·extended·in·the·future.</p><p>Own·Id:·OTP-18984·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7977"·title="">PR-7977</a></p></li><li><p><code·class="inline">inet_backend·=·socket</code>·has·been·optimized·and·reworked·to·be·more·compatible·with·the·original·<code·class="inline">inet_backend·=·inet</code>.</p><p>Own·Id:·OTP-19004·Aux·Id:·OTP-18835</p></li><li><p>The·<code·class="inline">socket</code>·documentation·has·been·reworked,·and·due·to172 since·the·release·of·OTP·26.</p><p>Own·Id:·OTP-18976·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7125"·title="">PR-7125</a></p></li><li><p>An·optional·NIF·callback·<code·class="inline">ERL_NIF_OPT_ON_UNLOAD_THREAD</code>·to·be·called·by·all·scheduler·threads·when·a·NIF·library·is·unloaded.·Used·for·releasing·thread·specific·data.·Can·be·set·with·function·<code·class="inline">enif_set_option</code>.</p><p>Own·Id:·OTP-18977·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7809"·title="">PR-7809</a></p></li><li><p>There·is·a·new·module·<a·href="../../../lib/kernel-10.0.1/doc/html/trace.html"><code·class="inline">trace</code></a>·in·Kernel·providing·the·same·trace·functionality·as·<a·href="erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·and·<a·href="erlang.html#trace_pattern/3"><code·class="inline">erlang:trace_pattern/3</code></a>,·but·with·the·addition·of·<strong>dynamic·isolated·trace·sessions</strong>.</p><p>Own·Id:·OTP-18980</p></li><li><p>Added·the·<code·class="inline">+MMlp·on|off</code>·emulator·option·to·let·the·<code·class="inline">mseg</code>·allocator·use·&quot;large·pages&quot;·(sometimes·known·as·&quot;huge·pages&quot;·or·&quot;super·pages&quot;).·This·currently·only·affects·super-carrier·allocations,·but·may·be·extended·in·the·future.</p><p>Own·Id:·OTP-18984·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7977"·title="">PR-7977</a></p></li><li><p><code·class="inline">inet_backend·=·socket</code>·has·been·optimized·and·reworked·to·be·more·compatible·with·the·original·<code·class="inline">inet_backend·=·inet</code>.</p><p>Own·Id:·OTP-19004·Aux·Id:·OTP-18835</p></li><li><p>The·<code·class="inline">socket</code>·documentation·has·been·reworked,·and·due·to
173 that·a·few·details·were·fixed:</p><ul><li><a·href="../../../lib/kernel-10.0.1/doc/html/socket.html#is_supported/1"><code·class="inline">socket:is_supported/1</code></a>·now·returns·<code·class="inline">true</code>·for·example·for·<code·class="inline">protocols</code>173 that·a·few·details·were·fixed:</p><ul><li><a·href="../../../lib/kernel-10.0.1/doc/html/socket.html#is_supported/1"><code·class="inline">socket:is_supported/1</code></a>·now·returns·<code·class="inline">true</code>·for·example·for·<code·class="inline">protocols</code>
174 that·is·a·&quot;category&quot;,·not·an·item.</li><li><a·href="../../../lib/kernel-10.0.1/doc/html/socket.html#cancel_monitor/1"><code·class="inline">socket:cancel_monitor/1</code></a>·no·longer·badargs·for·a·monitor·that·was·set·by174 that·is·a·&quot;category&quot;,·not·an·item.</li><li><a·href="../../../lib/kernel-10.0.1/doc/html/socket.html#cancel_monitor/1"><code·class="inline">socket:cancel_monitor/1</code></a>·no·longer·badargs·for·a·monitor·that·was·set·by
Offset 2951, 17 lines modifiedOffset 2951, 17 lines modified
2951 markedly·so·when·the·maximum·number·of·file·descriptors·has·been·tuned·to·a2951 markedly·so·when·the·maximum·number·of·file·descriptors·has·been·tuned·to·a
2952 large·number.</p><p>Instead,·in·erl_child_setup,·walk·the·open·descriptors·under·<code·class="inline">/dev/fd</code>·and2952 large·number.</p><p>Instead,·in·erl_child_setup,·walk·the·open·descriptors·under·<code·class="inline">/dev/fd</code>·and
2953 close·only·those·which·are·open.</p><p>This·optimization·affects·the·CPU·usage·of·starting·a·new·Erlang·instance.</p><p>Own·Id:·OTP-16270</p></li><li><p>Optimized·<a·href="../../../lib/stdlib-6.0.1/doc/html/maps.html#merge/2"><code·class="inline">maps:merge/2</code></a>·for·trivial·cases·of·an·empty·map(s)·or·same·map.</p><p>Own·Id:·OTP-16283·Aux·Id:·PR-2441</p></li><li><p>The·new·experimental·<code·class="inline">socket</code>·module·has·been·moved·to·the·Kernel·application.</p><p>Own·Id:·OTP-16312</p></li><li><p>Improved·the·presentation·of·allocations·and·carriers·in·the·<code·class="inline">instrument</code>2953 close·only·those·which·are·open.</p><p>This·optimization·affects·the·CPU·usage·of·starting·a·new·Erlang·instance.</p><p>Own·Id:·OTP-16270</p></li><li><p>Optimized·<a·href="../../../lib/stdlib-6.0.1/doc/html/maps.html#merge/2"><code·class="inline">maps:merge/2</code></a>·for·trivial·cases·of·an·empty·map(s)·or·same·map.</p><p>Own·Id:·OTP-16283·Aux·Id:·PR-2441</p></li><li><p>The·new·experimental·<code·class="inline">socket</code>·module·has·been·moved·to·the·Kernel·application.</p><p>Own·Id:·OTP-16312</p></li><li><p>Improved·the·presentation·of·allocations·and·carriers·in·the·<code·class="inline">instrument</code>
2954 module.</p><p>Own·Id:·OTP-16327</p></li><li><p>As·announced·in·OTP·22.0,·the·previously·existing·limited·support·for·VxWorks2954 module.</p><p>Own·Id:·OTP-16327</p></li><li><p>As·announced·in·OTP·22.0,·the·previously·existing·limited·support·for·VxWorks
2955 has·now·been·removed.</p><p>*<strong>·POTENTIAL·INCOMPATIBILITY·*</strong></p><p>Own·Id:·OTP-16329·Aux·Id:·OTP-15621</p></li><li><p>The·return·value·when·using·the·<code·class="inline">httph</code>·and·<code·class="inline">httph_bin</code>·option·to2955 has·now·been·removed.</p><p>*<strong>·POTENTIAL·INCOMPATIBILITY·*</strong></p><p>Own·Id:·OTP-16329·Aux·Id:·OTP-15621</p></li><li><p>The·return·value·when·using·the·<code·class="inline">httph</code>·and·<code·class="inline">httph_bin</code>·option·to
2956 <a·href="erlang.html#decode_packet/3"><code·class="inline">erlang:decode_packet/3</code></a>·and·<a·href="../../../lib/kernel-10.0.1/doc/html/inet.html#setopts/2"><code·class="inline">inet:setopts/2</code></a>·has·been·changed·to·also·include2956 <a·href="erlang.html#decode_packet/3"><code·class="inline">erlang:decode_packet/3</code></a>·and·<a·href="../../../lib/kernel-10.0.1/doc/html/inet.html#setopts/2"><code·class="inline">inet:setopts/2</code></a>·has·been·changed·to·also·include
2957 the·original·header·unmodified.·See·<a·href="erlang.html#decode_packet/3"><code·class="inline">erlang:decode_packet/3</code></a>.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">2957 the·original·header·unmodified.·See·<a·href="erlang.html#decode_packet/3"><code·class="inline">erlang:decode_packet/3</code></a>.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">
2958 ······</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">decode_packet</span><span·class="p"·data-group-id="9447404094-1">(</span><span·class="ss">httph_bin</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;HELLO:2958 ······</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">decode_packet</span><span·class="p"·data-group-id="5707014184-1">(</span><span·class="ss">httph_bin</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;HELLO:
2959 ······hi\r\n\r\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="9447404094-2">[</span><span·class="p"·data-group-id="9447404094-2">]</span><span·class="p"·data-group-id="9447404094-1">)</span><span·class="p">.</span><span·class="w">2959 ······hi\r\n\r\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="5707014184-2">[</span><span·class="p"·data-group-id="5707014184-2">]</span><span·class="p"·data-group-id="5707014184-1">)</span><span·class="p">.</span><span·class="w">
2960 ······</span><span·class="p"·data-group-id="9447404094-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9447404094-4">{</span><span·class="ss">http_header</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">&lt;&lt[·...·truncated·by·diffoscope;·len:·546,·SHA:·3e881664c1a27a84dc04a461d25939a1a6a09d5e9c663c74fd7524506bf6db88·...·]4-3">}</span></code></pre><p>Own·Id:·OTP-16347·Aux·Id:·PR-2466</p></li><li><p>Ensure·<a·href="../../../lib/kernel-10.0.1/doc/html/net_kernel.html#monitor_nodes/1"><code·class="inline">net_kernel:monitor_nodes/1</code></a>·sends·<code·class="inline">nodedown</code>·messages·of·a·failed2960 ······</span><span·class="p"·data-group-id="5707014184-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5707014184-4">{</span><span·class="ss">http_header</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">&lt;&lt[·...·truncated·by·diffoscope;·len:·546,·SHA:·7abd7cc984f1daf44235d82fa27b752f4d3e368d6b4008060deb1136e3029d2e·...·]4-3">}</span></code></pre><p>Own·Id:·OTP-16347·Aux·Id:·PR-2466</p></li><li><p>Ensure·<a·href="../../../lib/kernel-10.0.1/doc/html/net_kernel.html#monitor_nodes/1"><code·class="inline">net_kernel:monitor_nodes/1</code></a>·sends·<code·class="inline">nodedown</code>·messages·of·a·failed
2961 connection·before·<code·class="inline">nodeup</code>·messages·of·a·reestablished·connection·toward·the2961 connection·before·<code·class="inline">nodeup</code>·messages·of·a·reestablished·connection·toward·the
2962 same·node.</p><p>Own·Id:·OTP-16362</p></li><li><p>Update·of·<a·href="../../../lib/kernel-10.0.1/doc/html/seq_trace.html#whatis">sequential·tracing</a>·to·also·support·other2962 same·node.</p><p>Own·Id:·OTP-16362</p></li><li><p>Update·of·<a·href="../../../lib/kernel-10.0.1/doc/html/seq_trace.html#whatis">sequential·tracing</a>·to·also·support·other
2963 information·transfers·than·message·passing.</p><p>Own·Id:·OTP-16370·Aux·Id:·OTP-15251,·OTP-15232</p></li><li><p>socket:·It·is·now·possible·to·create·a·socket·from·an·already·existing·file2963 information·transfers·than·message·passing.</p><p>Own·Id:·OTP-16370·Aux·Id:·OTP-15251,·OTP-15232</p></li><li><p>socket:·It·is·now·possible·to·create·a·socket·from·an·already·existing·file
2964 descriptor.</p><p>Own·Id:·OTP-16398·Aux·Id:·ERL-1154</p></li><li><p>socket:·The·socket:supports/1·function·now·also·report·if·netns·is·supported2964 descriptor.</p><p>Own·Id:·OTP-16398·Aux·Id:·ERL-1154</p></li><li><p>socket:·The·socket:supports/1·function·now·also·report·if·netns·is·supported
2965 or·not.</p><p>Own·Id:·OTP-16432</p></li><li><p><code·class="inline">=:=</code>·has·been·optimized·to·return·<code·class="inline">false</code>·immediately·when·comparing·two·maps2965 or·not.</p><p>Own·Id:·OTP-16432</p></li><li><p><code·class="inline">=:=</code>·has·been·optimized·to·return·<code·class="inline">false</code>·immediately·when·comparing·two·maps
2966 of·different·sizes.</p><p>Own·Id:·OTP-16454</p></li><li><p>Changed·the·behaviour·of·passing·the·<code·class="inline">erl</code>·command·line·argument2966 of·different·sizes.</p><p>Own·Id:·OTP-16454</p></li><li><p>Changed·the·behaviour·of·passing·the·<code·class="inline">erl</code>·command·line·argument
2967 <a·href="erl_cmd.html#async_thread_pool_size"><code·class="inline">+A·0</code></a>·to·silently·imply·<code·class="inline">+A·1</code>.·That·is,2967 <a·href="erl_cmd.html#async_thread_pool_size"><code·class="inline">+A·0</code></a>·to·silently·imply·<code·class="inline">+A·1</code>.·That·is,
Offset 10668, 20 lines modifiedOffset 10668, 20 lines modified
10668 <ul><li><p>Previously·<a·href="erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·behaved10668 <ul><li><p>Previously·<a·href="erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·behaved
10669 completely·asynchronous.·This·had·one·undesirable·effect,·though.·You·could10669 completely·asynchronous.·This·had·one·undesirable·effect,·though.·You·could
10670 never·know·when·you·were·guaranteed·<em>not</em>·to·be·affected·by·a·link·that·you10670 never·know·when·you·were·guaranteed·<em>not</em>·to·be·affected·by·a·link·that·you
10671 had·unlinked·or·a·monitor·that·you·had·demonitored.</p><p>The·new·behavior·of·<a·href="erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·can·be10671 had·unlinked·or·a·monitor·that·you·had·demonitored.</p><p>The·new·behavior·of·<a·href="erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·can·be
10672 viewed·as·two·operations·performed·atomically.·Asynchronously·send·an·unlink10672 viewed·as·two·operations·performed·atomically.·Asynchronously·send·an·unlink
10673 signal·or·a·demonitor·signal,·and·ignore·any·future·results·of·the·link·or10673 signal·or·a·demonitor·signal,·and·ignore·any·future·results·of·the·link·or
10674 monitor.</p><p><em>NOTE</em>:·This·change·can·cause·some·obscure·code·to·fail·which·previously·did10674 monitor.</p><p><em>NOTE</em>:·This·change·can·cause·some·obscure·code·to·fail·which·previously·did
10675 not.·For·example,·the·following·code·might·hang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">············</span><span·class="n">Mon</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monitor</span><span·class="p"·data-group-id="7810952399-1">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="7810952399-1">)</span><span·class="p">,</span><span·class="w">10675 not.·For·example,·the·following·code·might·hang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">············</span><span·class="n">Mon</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monitor</span><span·class="p"·data-group-id="6176376686-1">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="6176376686-1">)</span><span·class="p">,</span><span·class="w">
10676 ············</span><span·class="c1">%%·...</span><span·class="w">10676 ············</span><span·class="c1">%%·...</span><span·class="w">
10677 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="7810952399-2">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bang</span><span·class="p"·data-group-id="7810952399-2">)</span><span·class="p">,</span><span·class="w">10677 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="6176376686-2">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bang</span><span·class="p"·data-group-id="6176376686-2">)</span><span·class="p">,</span><span·class="w">
10678 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="7810952399-3">(</span><span·class="n">Mon</span><span·class="p"·data-group-id="7810952399-3">)</span><span·class="p">,</span><span·class="w">10678 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="6176376686-3">(</span><span·class="n">Mon</span><span·class="p"·data-group-id="6176376686-3">)</span><span·class="p">,</span><span·class="w">
10679 ············</span><span·class="k">receive</span><span·class="w">10679 ············</span><span·class="k">receive</span><span·class="w">
10680 ················</span><span·class="p"·data-group-id="7810952399-4">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mon</span><span·class="w">·</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·168,·SHA:·88e68f8eba537a8a1c2c0fca12e5c858b5ac09bde5f2506af3ececdc89ff6352·...·]-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">10680 ················</span><span·class="p"·data-group-id="6176376686-4">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mon</span><span·class="w">·</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·168,·SHA:·455bb7351a4fe7e5149f32eccf98aece5c750753c43c6ed2e925917f5ffef31a·...·]-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">
10681 ············</span><span·class="c1">%%·We·were·previously·guaranteed·to·get·a·down·message</span><span·class="w">10681 ············</span><span·class="c1">%%·We·were·previously·guaranteed·to·get·a·down·message</span><span·class="w">
10682 ············</span><span·class="c1">%%·(since·we·exited·the·process·ourself),·so·we·could</span><span·class="w">10682 ············</span><span·class="c1">%%·(since·we·exited·the·process·ourself),·so·we·could</span><span·class="w">
10683 ············</span><span·class="c1">%%·in·this·case·leave·out:</span><span·class="w">10683 ············</span><span·class="c1">%%·in·this·case·leave·out:</span><span·class="w">
10684 ············</span><span·class="c1">%%·after·0·-&gt;·ok</span><span·class="w">10684 ············</span><span·class="c1">%%·after·0·-&gt;·ok</span><span·class="w">
10685 ············</span><span·class="k">end</span><span·class="p">,</span></code></pre><p>*<strong>·POTENTIAL·INCOMPATIBILITY·*</strong></p><p>Own·Id:·OTP-5772</p></li><li><p>Two·bugs·fixed:·If·the·environment·variable·<code·class="inline">ERL_FLAGS</code>·was·set,·its·contents10685 ············</span><span·class="k">end</span><span·class="p">,</span></code></pre><p>*<strong>·POTENTIAL·INCOMPATIBILITY·*</strong></p><p>Own·Id:·OTP-5772</p></li><li><p>Two·bugs·fixed:·If·the·environment·variable·<code·class="inline">ERL_FLAGS</code>·was·set,·its·contents
10686 would·be·appended·to·the·end·of·the·command·line·even·if·the·command·line·had10686 would·be·appended·to·the·end·of·the·command·line·even·if·the·command·line·had
10687 an·<code·class="inline">-extra</code>·options.·Changed·to·place·the·options·from·<code·class="inline">ERL_FLAGS</code>·just·before10687 an·<code·class="inline">-extra</code>·options.·Changed·to·place·the·options·from·<code·class="inline">ERL_FLAGS</code>·just·before
3.54 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/persistent_term.html
    
Offset 196, 17 lines modifiedOffset 196, 17 lines modified
196 ····<i·class="ri-link-m"·aria-hidden="true"></i>196 ····<i·class="ri-link-m"·aria-hidden="true"></i>
197 ··</a>197 ··</a>
198 ··<span·class="text">Example</span>198 ··<span·class="text">Example</span>
199 </h2>199 </h2>
200 <p>The·following·example·shows·how·lock·contention·for·ETS·tables·can·be·minimized200 <p>The·following·example·shows·how·lock·contention·for·ETS·tables·can·be·minimized
201 by·having·one·ETS·table·for·each·scheduler.·The·table·identifiers·for·the·ETS201 by·having·one·ETS·table·for·each·scheduler.·The·table·identifiers·for·the·ETS
202 tables·are·stored·as·a·single·persistent·term:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="c1">%%·There·is·one·ETS·table·for·each·scheduler.</span><span·class="w">202 tables·are·stored·as·a·single·persistent·term:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="c1">%%·There·is·one·ETS·table·for·each·scheduler.</span><span·class="w">
203 ····</span><span·class="n">Sid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="2690520388-1">(</span><span·class="ss">scheduler_id</span><span·class="p"·data-group-id="2690520388-1">)</span><span·class="p">,</span><span·class="w">203 ····</span><span·class="n">Sid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="1920161424-1">(</span><span·class="ss">scheduler_id</span><span·class="p"·data-group-id="1920161424-1">)</span><span·class="p">,</span><span·class="w">
204 ····</span><span·class="n">Tid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="2690520388-2">(</span><span·class="n">Sid</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">persistent_term</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="2690520388-3">(</span><span·class="o">?[·...·truncated·by·diffoscope;·len:·130,·SHA:·759ae0f280f8134603fd01bef96b04309355817c497771a1f1f04272d2425f9d·...·]-2">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="n">Tid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="1920161424-2">(</span><span·class="n">Sid</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">persistent_term</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="1920161424-3">(</span><span·class="o">?[·...·truncated·by·diffoscope;·len:·130,·SHA:·b684b1b2f6434f7b40bb8be4fde4313a2aaf860e84efedaca917d7c5463ca869·...·]-2">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">update_counter</span><span·class="p"·data-group-id="2690520388-4">(</span><span·class="n">Tid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="2690520388-4">)</span><span·class="p">.</span></code></pre>205 ····</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">update_counter</span><span·class="p"·data-group-id="1920161424-4">(</span><span·class="n">Tid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1920161424-4">)</span><span·class="p">.</span></code></pre>
206 ····</section>206 ····</section>
  
207 </div>207 </div>
  
208 ··<section·id="summary"·class="details-list">208 ··<section·id="summary"·class="details-list">
209 ····<h1·class="section-heading">209 ····<h1·class="section-heading">
210 ······<a·class="hover-link"·href="#summary">210 ······<a·class="hover-link"·href="#summary">
620 B
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-BB699C42.js"></script>124 <script·src="dist/search_data-D123FCA0.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
3.72 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/supercarrier.html
    
Offset 225, 20 lines modifiedOffset 225, 20 lines modified
225 (alloc_util·and·the·different·strategies).·However,·that·would·not·be225 (alloc_util·and·the·different·strategies).·However,·that·would·not·be
226 as·straight·forward·as·one·can·think·and·can·also·waste·quite·a·lot·of226 as·straight·forward·as·one·can·think·and·can·also·waste·quite·a·lot·of
227 memory·as·it·uses·prepended·block·headers.·The·granularity·of·the227 memory·as·it·uses·prepended·block·headers.·The·granularity·of·the
228 super·carrier·is·one·memory·page·(usually·4kb).·We·want·to·allocate228 super·carrier·is·one·memory·page·(usually·4kb).·We·want·to·allocate
229 and·free·entire·pages·and·we·don't·want·to·waste·an·entire·page·just229 and·free·entire·pages·and·we·don't·want·to·waste·an·entire·page·just
230 to·hold·the·block·header·of·the·following·pages.</p><p>Instead·we·store·the·meta·information·about·all·the·free·segments·in·a230 to·hold·the·block·header·of·the·following·pages.</p><p>Instead·we·store·the·meta·information·about·all·the·free·segments·in·a
231 dedicated·area·apart·from·the·<code·class="inline">sa</code>·and·<code·class="inline">sua</code>·areas.·Every·free·segment·is231 dedicated·area·apart·from·the·<code·class="inline">sa</code>·and·<code·class="inline">sua</code>·areas.·Every·free·segment·is
232 represented·by·a·descriptor·struct·(<code·class="inline">ErtsFreeSegDesc</code>).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">typedef</span><span·class="w">·</span><span·class="ss">struct</span><span·class="w">·</span><span·class="p"·data-group-id="8286921194-1">{</span><span·class="w">232 represented·by·a·descriptor·struct·(<code·class="inline">ErtsFreeSegDesc</code>).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">typedef</span><span·class="w">·</span><span·class="ss">struct</span><span·class="w">·</span><span·class="p"·data-group-id="7830039468-1">{</span><span·class="w">
233 ····</span><span·class="n">RBTNode</span><span·class="w">·</span><span·class="ss">snode</span><span·class="p">;</span><span·class="w">······</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="nb">node</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">&#39;stree&#39;</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">233 ····</span><span·class="n">RBTNode</span><span·class="w">·</span><span·class="ss">snode</span><span·class="p">;</span><span·class="w">······</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="nb">node</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">&#39;stree&#39;</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
234 ····</span><span·class="n">RBTNode</span><span·class="w">·</span><span·class="ss">anode</span><span·class="p">;</span><span·class="w">······</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="nb">node</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">&#39;atree&#39;</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">234 ····</span><span·class="n">RBTNode</span><span·class="w">·</span><span·class="ss">anode</span><span·class="p">;</span><span·class="w">······</span><span·class="o">/</span><span·class="o">*</span><span·class="w">·</span><span·class="nb">node</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">&#39;atree&#39;</span><span·class="w">·</span><span·class="o">*</span><span·class="o">/</span><span·class="w">
235 ····</span><span·class="ss">char</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">start</span><span·class="p">;</span><span·class="w">235 ····</span><span·class="ss">char</span><span·class="o">*</span><span·class="w">·</span><span·class="ss">start</span><span·class="p">;</span><span·class="w">
236 ····</span><span·class="ss">char</span><span·class="o">*</span><span·class="w">·</span><span·class="k">end</span><span·class="p">;</span><span·class="w">236 ····</span><span·class="ss">char</span><span·class="o">*</span><span·class="w">·</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
237 </span><span·class="p"·data-group-id="8286921194-1">}</span><span·class="n">ErtsFreeSegDesc</span><span·class="p">;</span></code></pre><p>To·find·the·smallest·free·segment·that·will·satisfy·a·carrier·allocation237 </span><span·class="p"·data-group-id="7830039468-1">}</span><span·class="n">ErtsFreeSegDesc</span><span·class="p">;</span></code></pre><p>To·find·the·smallest·free·segment·that·will·satisfy·a·carrier·allocation
238 (best·fit),·the·free·segments·are·organized·in·a·tree·sorted·by238 (best·fit),·the·free·segments·are·organized·in·a·tree·sorted·by
239 size·(<code·class="inline">stree</code>).·We·search·in·this·tree·at·allocation.·If·no·free·segment·of239 size·(<code·class="inline">stree</code>).·We·search·in·this·tree·at·allocation.·If·no·free·segment·of
240 sufficient·size·was·found,·the·area·(<code·class="inline">sa</code>·or·<code·class="inline">sua</code>)·is·instead·expanded.240 sufficient·size·was·found,·the·area·(<code·class="inline">sa</code>·or·<code·class="inline">sua</code>)·is·instead·expanded.
241 If·two·or·more·free·segments·with·equal·size·exist,·the·one·at·lowest241 If·two·or·more·free·segments·with·equal·size·exist,·the·one·at·lowest
242 address·is·chosen·for·<code·class="inline">sa</code>·and·highest·address·for·<code·class="inline">sua</code>.</p><p>At·carrier·deallocation,·we·want·to·coalesce·with·any·adjacent·free242 address·is·chosen·for·<code·class="inline">sa</code>·and·highest·address·for·<code·class="inline">sua</code>.</p><p>At·carrier·deallocation,·we·want·to·coalesce·with·any·adjacent·free
243 segments,·to·form·one·large·free·segment.·To·do·that,·all·free243 segments,·to·form·one·large·free·segment.·To·do·that,·all·free
244 segments·are·also·organized·in·a·tree·sorted·in·address·order·(<code·class="inline">atree</code>).</p><p>So,·in·total·we·keep·four·trees·of·free·descriptors·for·the·super244 segments·are·also·organized·in·a·tree·sorted·in·address·order·(<code·class="inline">atree</code>).</p><p>So,·in·total·we·keep·four·trees·of·free·descriptors·for·the·super
4.24 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/time_correction.html
    
Offset 543, 17 lines modifiedOffset 543, 17 lines modified
543 the·event·occurs.</p></blockquote><blockquote><h4·class="tip">Do</h4><p>Determine·the·order·of·events·by·saving·the·integer·returned·by543 the·event·occurs.</p></blockquote><blockquote><h4·class="tip">Do</h4><p>Determine·the·order·of·events·by·saving·the·integer·returned·by
544 <a·href="erlang.html#unique_integer/1"><code·class="inline">erlang:unique_integer([monotonic])</code></a>·when·the544 <a·href="erlang.html#unique_integer/1"><code·class="inline">erlang:unique_integer([monotonic])</code></a>·when·the
545 event·occurs.·These·integers·are·strictly·monotonically·ordered·on·current545 event·occurs.·These·integers·are·strictly·monotonically·ordered·on·current
546 runtime·system·instance·corresponding·to·creation·time.</p></blockquote><h4>Determine·Order·of·Events·with·Time·of·the·Event</h4><blockquote><h4·class="error">Dont</h4><p>Determine·the·order·of·events·by·saving·a·time·stamp·with·<a·href="erlang.html#now/0"><code·class="inline">erlang:now/0</code></a>·when546 runtime·system·instance·corresponding·to·creation·time.</p></blockquote><h4>Determine·Order·of·Events·with·Time·of·the·Event</h4><blockquote><h4·class="error">Dont</h4><p>Determine·the·order·of·events·by·saving·a·time·stamp·with·<a·href="erlang.html#now/0"><code·class="inline">erlang:now/0</code></a>·when
547 the·event·occurs.</p></blockquote><blockquote><h4·class="tip">Do</h4><p>Determine·the·order·of·events·by·saving·a·tuple·containing547 the·event·occurs.</p></blockquote><blockquote><h4·class="tip">Do</h4><p>Determine·the·order·of·events·by·saving·a·tuple·containing
548 <a·href="erlang.html#monotonic_time/0">monotonic·time</a>·and·a548 <a·href="erlang.html#monotonic_time/0">monotonic·time</a>·and·a
549 <a·href="erlang.html#unique_integer/1">strictly·monotonically·increasing·integer</a>·as549 <a·href="erlang.html#unique_integer/1">strictly·monotonically·increasing·integer</a>·as
550 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="6275410396-1">(</span><span·class="p"·data-group-id="6275410396-1">)</span><span·class="p">,</span><span·class="w">550 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Time</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="3924485848-1">(</span><span·class="p"·data-group-id="3924485848-1">)</span><span·class="p">,</span><span·class="w">
551 </span><span·class="n">UMI</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">unique_integer</span><span·class="p"·data-group-id="6275410396-2">(</span><span·class="p"·data-group-id="6275410396-3">[</span><span·class="ss">monotonic</span><span·class="p"·data-group-id="6275410396-3">]</span><span·class="p"·data-group-id="6275410396-2">)</span><span·class="p">,</span><span·class="w">551 </span><span·class="n">UMI</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">unique_integer</span><span·class="p"·data-group-id="3924485848-2">(</span><span·class="p"·data-group-id="3924485848-3">[</span><span·class="ss">monotonic</span><span·class="p"·data-group-id="3924485848-3">]</span><span·class="p"·data-group-id="3924485848-2">)</span><span·class="p">,</span><span·class="w">
552 </span><span·class="n">EventTag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6275410396-4">{</span><span·class="n">Time</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UMI</span><span·class="p"·data-group-id="6275410396-4">}</span></code></pre><p>These·tuples·are·strictly·monotonically·ordered·on·the·current·runtime·system552 </span><span·class="n">EventTag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3924485848-4">{</span><span·class="n">Time</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UMI</span><span·class="p"·data-group-id="3924485848-4">}</span></code></pre><p>These·tuples·are·strictly·monotonically·ordered·on·the·current·runtime·system
553 instance·according·to·creation·time.·It·is·important·that·the·monotonic·time553 instance·according·to·creation·time.·It·is·important·that·the·monotonic·time
554 is·in·the·first·element·(the·most·significant·element·when·comparing554 is·in·the·first·element·(the·most·significant·element·when·comparing
555 two-tuples).·Using·the·monotonic·time·in·the·tuples,·you·can·calculate·time555 two-tuples).·Using·the·monotonic·time·in·the·tuples,·you·can·calculate·time
556 between·events.</p><p>If·you·are·interested·in·Erlang·system·time·at·the·time·when·the·event556 between·events.</p><p>If·you·are·interested·in·Erlang·system·time·at·the·time·when·the·event
557 occurred,·you·can·also·save·the·time·offset·before·or·after·saving·the·events557 occurred,·you·can·also·save·the·time·offset·before·or·after·saving·the·events
558 using·<a·href="erlang.html#time_offset/0"><code·class="inline">erlang:time_offset/0</code></a>.·Erlang·monotonic·time·added·with·the·time·offset558 using·<a·href="erlang.html#time_offset/0"><code·class="inline">erlang:time_offset/0</code></a>.·Erlang·monotonic·time·added·with·the·time·offset
559 corresponds·to·Erlang·system·time.</p><p>If·you·are·executing·in·a·mode·where·time·offset·can·change,·and·you·want·to559 corresponds·to·Erlang·system·time.</p><p>If·you·are·executing·in·a·mode·where·time·offset·can·change,·and·you·want·to
6.3 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/tracing.html
    
Offset 145, 31 lines modifiedOffset 145, 31 lines modified
145 on·functions·that·never·return,·as·each·call·pushes·a·frame·that·will145 on·functions·that·never·return,·as·each·call·pushes·a·frame·that·will
146 never·be·removed.</p><p>Another·limitation·is·that·since·the·breakpoint·is·in·the·<em>callee</em>·and·not146 never·be·removed.</p><p>Another·limitation·is·that·since·the·breakpoint·is·in·the·<em>callee</em>·and·not
147 the·<em>caller</em>,·we're·limited·to·the·information·we·have·on·function·ingress.147 the·<em>caller</em>,·we're·limited·to·the·information·we·have·on·function·ingress.
148 This·means·that·we·can't·actually·tell·who·called·us:·since·we're·limited148 This·means·that·we·can't·actually·tell·who·called·us:·since·we're·limited
149 to·inspecting·the·stack·we·can·only·say·where·we're·<em>going·to·return·to</em>,149 to·inspecting·the·stack·we·can·only·say·where·we're·<em>going·to·return·to</em>,
150 which·is·not·quite·the·same·thing.</p><p>As·an·illustration,·when·the·<code·class="inline">caller</code>·option·is·enabled·all·trace·messages150 which·is·not·quite·the·same·thing.</p><p>As·an·illustration,·when·the·<code·class="inline">caller</code>·option·is·enabled·all·trace·messages
151 from·<code·class="inline">bar/1</code>··will·say·that·they·were·called·from·<code·class="inline">foo/0</code>,·even·though·it151 from·<code·class="inline">bar/1</code>··will·say·that·they·were·called·from·<code·class="inline">foo/0</code>,·even·though·it
152 went·through·a·bunch·of·other·functions·on·the·way:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="5879161752-1">(</span><span·class="p"·data-group-id="5879161752-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">152 went·through·a·bunch·of·other·functions·on·the·way:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">foo</span><span·class="p"·data-group-id="5496633213-1">(</span><span·class="p"·data-group-id="5496633213-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
153 ····</span><span·class="nf">lots</span><span·class="p"·data-group-id="5879161752-2">(</span><span·class="p"·data-group-id="5879161752-2">)</span><span·class="p">,</span><span·class="w">153 ····</span><span·class="nf">lots</span><span·class="p"·data-group-id="5496633213-2">(</span><span·class="p"·data-group-id="5496633213-2">)</span><span·class="p">,</span><span·class="w">
154 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">154 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
155 </span><span·class="nf">lots</span><span·class="p"·data-group-id="5879161752-3">(</span><span·class="p"·data-group-id="5879161752-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">155 </span><span·class="nf">lots</span><span·class="p"·data-group-id="5496633213-3">(</span><span·class="p"·data-group-id="5496633213-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
156 ····</span><span·class="nf">&#39;of&#39;</span><span·class="p"·data-group-id="5879161752-4">(</span><span·class="p"·data-group-id="5879161752-4">)</span><span·class="p">.</span><span·class="w">156 ····</span><span·class="nf">&#39;of&#39;</span><span·class="p"·data-group-id="5496633213-4">(</span><span·class="p"·data-group-id="5496633213-4">)</span><span·class="p">.</span><span·class="w">
  
157 </span><span·class="nf">&#39;of&#39;</span><span·class="p"·data-group-id="5879161752-5">(</span><span·class="p"·data-group-id="5879161752-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">&#39;of&#39;</span><span·class="p"·data-group-id="5496633213-5">(</span><span·class="p"·data-group-id="5496633213-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="nf">indirections</span><span·class="p"·data-group-id="5879161752-6">(</span><span·class="p"·data-group-id="5879161752-6">)</span><span·class="p">.</span><span·class="w">158 ····</span><span·class="nf">indirections</span><span·class="p"·data-group-id="5496633213-6">(</span><span·class="p"·data-group-id="5496633213-6">)</span><span·class="p">.</span><span·class="w">
  
159 </span><span·class="nf">indirections</span><span·class="p"·data-group-id="5879161752-7">(</span><span·class="p"·data-group-id="5879161752-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 </span><span·class="nf">indirections</span><span·class="p"·data-group-id="5496633213-7">(</span><span·class="p"·data-group-id="5496633213-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ····</span><span·class="nf">bar</span><span·class="p"·data-group-id="5879161752-8">(</span><span·class="mi">10</span><span·class="p"·data-group-id="5879161752-8">)</span><span·class="p">.</span><span·class="w">160 ····</span><span·class="nf">bar</span><span·class="p"·data-group-id="5496633213-8">(</span><span·class="mi">10</span><span·class="p"·data-group-id="5496633213-8">)</span><span·class="p">.</span><span·class="w">
  
161 </span><span·class="nf">bar</span><span·class="p"·data-group-id="5879161752-9">(</span><span·class="mi">0</span><span·class="p"·data-group-id="5879161752-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 </span><span·class="nf">bar</span><span·class="p"·data-group-id="5496633213-9">(</span><span·class="mi">0</span><span·class="p"·data-group-id="5496633213-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="ss">done</span><span·class="p">;</span><span·class="w">162 ····</span><span·class="ss">done</span><span·class="p">;</span><span·class="w">
163 </span><span·class="nf">bar</span><span·class="p"·data-group-id="5879161752-10">(</span><span·class="n">N</span><span·class="p"·data-group-id="5879161752-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">163 </span><span·class="nf">bar</span><span·class="p"·data-group-id="5496633213-10">(</span><span·class="n">N</span><span·class="p"·data-group-id="5496633213-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
164 ····</span><span·class="nf">bar</span><span·class="p"·data-group-id="5879161752-11">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="5879161752-11">)</span><span·class="p">.</span></code></pre><h3·id="export-tracing"·class="section-heading">164 ····</span><span·class="nf">bar</span><span·class="p"·data-group-id="5496633213-11">(</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="5496633213-11">)</span><span·class="p">.</span></code></pre><h3·id="export-tracing"·class="section-heading">
165 ··<a·href="#export-tracing"·class="hover-link">165 ··<a·href="#export-tracing"·class="hover-link">
166 ····<i·class="ri-link-m"·aria-hidden="true"></i>166 ····<i·class="ri-link-m"·aria-hidden="true"></i>
167 ··</a>167 ··</a>
168 ··<span·class="text">Export·tracing</span>168 ··<span·class="text">Export·tracing</span>
169 </h3>169 </h3>
170 <p>In·the·interpreter,·breakpoints·are·set·inside·the·code·trampoline·for170 <p>In·the·interpreter,·breakpoints·are·set·inside·the·code·trampoline·for
171 export·entries,·and·their·address·vector·is·updated·to·point·to·them.171 export·entries,·and·their·address·vector·is·updated·to·point·to·them.
38.0 KB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/zlib.html
    
Offset 129, 26 lines modifiedOffset 129, 26 lines modified
  
129 ····<section·id="moduledoc">129 ····<section·id="moduledoc">
130 <p>zlib·compression·interface.</p><p>This·module·provides·an·API·for·the·zlib·library130 <p>zlib·compression·interface.</p><p>This·module·provides·an·API·for·the·zlib·library
131 (<a·href="http://www.zlib.net">www.zlib.net</a>).·It·is·used·to·compress·and·decompress131 (<a·href="http://www.zlib.net">www.zlib.net</a>).·It·is·used·to·compress·and·decompress
132 data.·The·data·format·is·described·by132 data.·The·data·format·is·described·by
133 <a·href="https://www.ietf.org/rfc/rfc1950.txt">RFC·1950</a>,133 <a·href="https://www.ietf.org/rfc/rfc1950.txt">RFC·1950</a>,
134 <a·href="https://www.ietf.org/rfc/rfc1951.txt">RFC·1951</a>,·and134 <a·href="https://www.ietf.org/rfc/rfc1951.txt">RFC·1951</a>,·and
135 <a·href="https://www.ietf.org/rfc/rfc1952.txt">RFC·1952</a>.</p><p>A·typical·(compress)·usage·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="1998121564-1">(</span><span·class="p"·data-group-id="1998121564-1">)</span><span·class="p">,</span><span·class="w">135 <a·href="https://www.ietf.org/rfc/rfc1952.txt">RFC·1952</a>.</p><p>A·typical·(compress)·usage·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="7486076399-1">(</span><span·class="p"·data-group-id="7486076399-1">)</span><span·class="p">,</span><span·class="w">
136 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateInit</span><span·class="p"·data-group-id="1998121564-2">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="ss">default</span><span·class="p"·data-group-id="1998121564-2">)</span><span·class="p">,</span><span·class="w">136 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateInit</span><span·class="p"·data-group-id="7486076399-2">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="ss">default</span><span·class="p"·data-group-id="7486076399-2">)</span><span·class="p">,</span><span·class="w">
  
137 </span><span·class="n">Compress</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1998121564-3">(</span><span·class="ss">end_of_data</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Cont</span><span·class="p"·data-group-id="1998121564-3">)</span><span·class="w">·</span><span·class="p">-&gt;</[·...·truncated·by·diffoscope;·len:·123,·SHA:·3735e99f76e0ae3e9bb8a4f4a0c820584227d232d30e60196e6406fe36831fa7·...·]-4">]</span><span·class="p">;</span><span·class="w">137 </span><span·class="n">Compress</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7486076399-3">(</span><span·class="ss">end_of_data</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Cont</span><span·class="p"·data-group-id="7486076399-3">)</span><span·class="w">·</span><span·class="p">-&gt;</[·...·truncated·by·diffoscope;·len:·123,·SHA:·9e4c3aa44ef195dc3f3db215888458f2c5b62707b6069db211cb50a06dc62282·...·]-4">]</span><span·class="p">;</span><span·class="w">
138 ··············</span><span·class="p"·data-group-id="1998121564-5">(</span><span·class="n">Data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cont</span><span·class="p"·data-group-id="1998121564-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 ··············</span><span·class="p"·data-group-id="7486076399-5">(</span><span·class="n">Data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cont</span><span·class="p"·data-group-id="7486076399-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ·················</span><span·class="p"·data-group-id="1998121564-6">[</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="1998121564-7">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span[·...·truncated·by·diffoscope;·len:·436,·SHA:·e33cb20810f093a97e198e3f6e963ff110f4a36ed3d177906e5443b59a9a4077·...·]-6">]</span><span·class="w">139 ·················</span><span·class="p"·data-group-id="7486076399-6">[</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="7486076399-7">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span[·...·truncated·by·diffoscope;·len:·436,·SHA:·fbcad48002cd8317783dc580f0b0ee3246813637265f96f9fb258cb069eb3154·...·]-6">]</span><span·class="w">
140 ···········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">140 ···········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
141 </span><span·class="n">Compressed</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Compress</span><span·class="p"·data-group-id="1998121564-10">(</span><span·class="n">Read</span><span·class="p"·data-group-id="1998121564-11">(</span><span·class="p"·data-group-id="1998121564-11">)</span><span·class="p">,</span><span·class="n">Compress</span><span·class="p"·data-group-id="1998121564-10">)</span><span·class="p">,</span><span·class="w">141 </span><span·class="n">Compressed</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Compress</span><span·class="p"·data-group-id="7486076399-10">(</span><span·class="n">Read</span><span·class="p"·data-group-id="7486076399-11">(</span><span·class="p"·data-group-id="7486076399-11">)</span><span·class="p">,</span><span·class="n">Compress</span><span·class="p"·data-group-id="7486076399-10">)</span><span·class="p">,</span><span·class="w">
142 </span><span·class="n">Last</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="1998121564-12">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1998121564-13">[</span><span·class="p"·data-group-id="1998121564-13">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·66,·SHA:·203615c38eb3bdeb77c71f8e51bea94f8230331bf59a7c0a5ee7a70a017d7d35·...·]-12">)</span><span·class="p">,</span><span·class="w">142 </span><span·class="n">Last</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="7486076399-12">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7486076399-13">[</span><span·class="p"·data-group-id="7486076399-13">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·66,·SHA:·1e896a62b6e82d1c1df7b4f5ca9298c5a2ab40816f2f19f383d771d55dfafde4·...·]-12">)</span><span·class="p">,</span><span·class="w">
143 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateEnd</span><span·class="p"·data-group-id="1998121564-14">(</span><span·class="n">Z</span><span·class="p"·data-group-id="1998121564-14">)</span><span·class="p">,</span><span·class="w">143 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateEnd</span><span·class="p"·data-group-id="7486076399-14">(</span><span·class="n">Z</span><span·class="p"·data-group-id="7486076399-14">)</span><span·class="p">,</span><span·class="w">
144 </span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1998121564-15">(</span><span·class="n">Z</span><span·class="p"·data-group-id="1998121564-15">)</span><span·class="p">,</span><span·class="w">144 </span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="7486076399-15">(</span><span·class="n">Z</span><span·class="p"·data-group-id="7486076399-15">)</span><span·class="p">,</span><span·class="w">
145 </span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="1998121564-16">(</span><span·class="p"·data-group-id="1998121564-17">[</span><span·class="n">Compressed</span><span·class="p">|</span><span·class="n">Last</span><span·class="p"·data-group-id="1998121564-17">]</span><span·class="p"·data-group-id="1998121564-16">)</span></code></pre><p>In·all·functions·errors,·<code·class="inline">{'EXIT',{Reason,Backtrace}}</code>,·can·be·thrown,·where145 </span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="7486076399-16">(</span><span·class="p"·data-group-id="7486076399-17">[</span><span·class="n">Compressed</span><span·class="p">|</span><span·class="n">Last</span><span·class="p"·data-group-id="7486076399-17">]</span><span·class="p"·data-group-id="7486076399-16">)</span></code></pre><p>In·all·functions·errors,·<code·class="inline">{'EXIT',{Reason,Backtrace}}</code>,·can·be·thrown,·where
146 <code·class="inline">Reason</code>·describes·the·error.</p><p>Typical·<code·class="inline">Reason</code>s:</p><ul><li><p><strong><code·class="inline">badarg</code></strong>·-·Bad·argument.</p></li><li><p><strong><code·class="inline">not_initialized</code></strong>·-·The·stream·hasn't·been·initialized,·eg.·if146 <code·class="inline">Reason</code>·describes·the·error.</p><p>Typical·<code·class="inline">Reason</code>s:</p><ul><li><p><strong><code·class="inline">badarg</code></strong>·-·Bad·argument.</p></li><li><p><strong><code·class="inline">not_initialized</code></strong>·-·The·stream·hasn't·been·initialized,·eg.·if
147 <a·href="#inflateInit/1"><code·class="inline">inflateInit/1</code></a>·wasn't·called·prior·to·a·call·to·<a·href="#inflate/2"><code·class="inline">inflate/2</code></a>.</p></li><li><p><strong><code·class="inline">not_on_controlling_process</code></strong>·-·The·stream·was·used·by·a·process·that147 <a·href="#inflateInit/1"><code·class="inline">inflateInit/1</code></a>·wasn't·called·prior·to·a·call·to·<a·href="#inflate/2"><code·class="inline">inflate/2</code></a>.</p></li><li><p><strong><code·class="inline">not_on_controlling_process</code></strong>·-·The·stream·was·used·by·a·process·that
148 doesn't·control·it.·Use·<a·href="#set_controlling_process/2"><code·class="inline">set_controlling_process/2</code></a>·if·you·need·to·transfer·a148 doesn't·control·it.·Use·<a·href="#set_controlling_process/2"><code·class="inline">set_controlling_process/2</code></a>·if·you·need·to·transfer·a
149 stream·to·a·different·process.</p></li><li><p><strong><code·class="inline">data_error</code></strong>·-·The·data·contains·errors.</p></li><li><p><strong><code·class="inline">stream_error</code></strong>·-·Inconsistent·stream·state.</p></li><li><p><strong><code·class="inline">{need_dictionary,Adler32}</code></strong>·-·See·<a·href="#inflate/2"><code·class="inline">inflate/2</code></a>.</p></li></ul>149 stream·to·a·different·process.</p></li><li><p><strong><code·class="inline">data_error</code></strong>·-·The·data·contains·errors.</p></li><li><p><strong><code·class="inline">stream_error</code></strong>·-·Inconsistent·stream·state.</p></li><li><p><strong><code·class="inline">{need_dictionary,Adler32}</code></strong>·-·See·<a·href="#inflate/2"><code·class="inline">inflate/2</code></a>.</p></li></ul>
150 ····</section>150 ····</section>
  
151 </div>151 </div>
Offset 849, 19 lines modifiedOffset 849, 19 lines modified
849 all·input·data·available·so·far.·Flushing·can·degrade·compression·for·some849 all·input·data·available·so·far.·Flushing·can·degrade·compression·for·some
850 compression·algorithms;·thus,·use·it·only·when·necessary.</p><p>If·<code·class="inline">Flush</code>·is·set·to·<code·class="inline">full</code>,·all·output·is·flushed·as·with·<code·class="inline">sync</code>,·and·the850 compression·algorithms;·thus,·use·it·only·when·necessary.</p><p>If·<code·class="inline">Flush</code>·is·set·to·<code·class="inline">full</code>,·all·output·is·flushed·as·with·<code·class="inline">sync</code>,·and·the
851 compression·state·is·reset·so·that·decompression·can·restart·from·this·point·if851 compression·state·is·reset·so·that·decompression·can·restart·from·this·point·if
852 previous·compressed·data·has·been·damaged·or·if·random·access·is·desired.·Using852 previous·compressed·data·has·been·damaged·or·if·random·access·is·desired.·Using
853 <code·class="inline">full</code>·too·often·can·seriously·degrade·the·compression.</p><p>If·<code·class="inline">Flush</code>·is·set·to·<code·class="inline">finish</code>,·pending·input·is·processed,·pending·output·is853 <code·class="inline">full</code>·too·often·can·seriously·degrade·the·compression.</p><p>If·<code·class="inline">Flush</code>·is·set·to·<code·class="inline">finish</code>,·pending·input·is·processed,·pending·output·is
854 flushed,·and·<a·href="#deflate/3"><code·class="inline">deflate/3</code></a>·returns.·Afterwards·the·only·possible854 flushed,·and·<a·href="#deflate/3"><code·class="inline">deflate/3</code></a>·returns.·Afterwards·the·only·possible
855 operations·on·the·stream·are·<a·href="#deflateReset/1"><code·class="inline">deflateReset/1</code></a>·or·<a·href="#deflateEnd/1"><code·class="inline">deflateEnd/1</code></a>.</p><p><code·class="inline">Flush</code>·can·be·set·to·<code·class="inline">finish</code>·immediately·after855 operations·on·the·stream·are·<a·href="#deflateReset/1"><code·class="inline">deflateReset/1</code></a>·or·<a·href="#deflateEnd/1"><code·class="inline">deflateEnd/1</code></a>.</p><p><code·class="inline">Flush</code>·can·be·set·to·<code·class="inline">finish</code>·immediately·after
856 <a·href="#deflateInit/1"><code·class="inline">deflateInit</code></a>·if·all·compression·is·to·be·done·in·one·step.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateInit</span><span·class="p"·data-group-id="9265425535-1">(</span><span·class="n">Z</span><span·class="p"·data-group-id="9265425535-1">)</span><span·class="p">,</span><span·class="w">856 <a·href="#deflateInit/1"><code·class="inline">deflateInit</code></a>·if·all·compression·is·to·be·done·in·one·step.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateInit</span><span·class="p"·data-group-id="5952373538-1">(</span><span·class="n">Z</span><span·class="p"·data-group-id="5952373538-1">)</span><span·class="p">,</span><span·class="w">
857 </span><span·class="n">B1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="9265425535-2">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="9265425535-2">)</span><span·class="p">,</span><span·class="w">857 </span><span·class="n">B1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="5952373538-2">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="5952373538-2">)</span><span·class="p">,</span><span·class="w">
858 </span><span·class="n">B2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="9265425535-3">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="w">·</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="ss">finish</span><span·class="p"·data-group-id="9265425535-3">)</span><span·class="p">,</span><span·class="w">858 </span><span·class="n">B2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflate</span><span·class="p"·data-group-id="5952373538-3">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="w">·</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="ss">finish</span><span·class="p"·data-group-id="5952373538-3">)</span><span·class="p">,</span><span·class="w">
859 </span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateEnd</span><span·class="p"·data-group-id="9265425535-4">(</span><span·class="n">Z</span><span·class="p"·data-group-id="9265425535-4">)</span><span·class="p">,</span><span·class="w">859 </span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">deflateEnd</span><span·class="p"·data-group-id="5952373538-4">(</span><span·class="n">Z</span><span·class="p"·data-group-id="5952373538-4">)</span><span·class="p">,</span><span·class="w">
860 </span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="9265425535-5">(</span><span·class="p"·data-group-id="9265425535-6">[</span><span·class="n">B1</span><span·class="p">,</span><span·class="n">B2</span><span·class="p"·data-group-id="9265425535-6">]</span><span·class="p"·data-group-id="9265425535-5">)</span></code></pre>860 </span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="5952373538-5">(</span><span·class="p"·data-group-id="5952373538-6">[</span><span·class="n">B1</span><span·class="p">,</span><span·class="n">B2</span><span·class="p"·data-group-id="5952373538-6">]</span><span·class="p"·data-group-id="5952373538-5">)</span></code></pre>
861 ··</section>861 ··</section>
862 </section>862 </section>
863 <section·class="detail"·id="deflateEnd/1">863 <section·class="detail"·id="deflateEnd/1">
  
864 ··<div·class="detail-header">864 ··<div·class="detail-header">
865 ····<a·href="#deflateEnd/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">865 ····<a·href="#deflateEnd/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
866 ······<i·class="ri-link-m"·aria-hidden="true"></i>866 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1405, 28 lines modifiedOffset 1405, 28 lines modified
1405 <p>Initializes·the·decompression·dictionary·from·the·specified·uncompressed·byte1405 <p>Initializes·the·decompression·dictionary·from·the·specified·uncompressed·byte
1406 sequence.</p><p>This·function·must·be·called·as·a·response·to·an·inflate·operation1406 sequence.</p><p>This·function·must·be·called·as·a·response·to·an·inflate·operation
1407 (eg.·<a·href="#safeInflate/2"><code·class="inline">safeInflate/2</code></a>)·returning·<code·class="inline">{need_dictionary,Adler,Output}</code>·or·in·the·case1407 (eg.·<a·href="#safeInflate/2"><code·class="inline">safeInflate/2</code></a>)·returning·<code·class="inline">{need_dictionary,Adler,Output}</code>·or·in·the·case
1408 of·deprecated·functions,·throwing·an1408 of·deprecated·functions,·throwing·an
1409 <code·class="inline">{'EXIT',{{need_dictionary,Adler},_StackTrace}}</code>·exception.</p><p>The·dictionary·chosen·by·the·compressor·can·be·determined·from·the·Adler·value1409 <code·class="inline">{'EXIT',{{need_dictionary,Adler},_StackTrace}}</code>·exception.</p><p>The·dictionary·chosen·by·the·compressor·can·be·determined·from·the·Adler·value
1410 returned·or·thrown·by·the·call·to·the·inflate·function.·The·compressor·and1410 returned·or·thrown·by·the·call·to·the·inflate·function.·The·compressor·and
1411 decompressor·must·use·the·same·dictionary·(See·<a·href="#deflateSetDictionary/2"><code·class="inline">deflateSetDictionary/2</code></a>).</p><p>After·setting·the·dictionary·the·inflate·operation·should·be·retried·without·new1411 decompressor·must·use·the·same·dictionary·(See·<a·href="#deflateSetDictionary/2"><code·class="inline">deflateSetDictionary/2</code></a>).</p><p>After·setting·the·dictionary·the·inflate·operation·should·be·retried·without·new
1412 input.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">deprecated_unpack</span><span·class="p"·data-group-id="7190570052-1">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7190570052-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1412 input.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">deprecated_unpack</span><span·class="p"·data-group-id="7714283741-1">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7714283741-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1413 ·····</span><span·class="k">case</span><span·class="w">·</span><span·class="k">catch</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7190570052-2">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p"·data-group-id="7190570052-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1413 ·····</span><span·class="k">case</span><span·class="w">·</span><span·class="k">catch</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7714283741-2">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p"·data-group-id="7714283741-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1414 ··········</span><span·class="p"·data-group-id="7190570052-3">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7190570052-4">{</span><span·class="p"·data-group-id="7190570052-5">{</span><span·class="ss">need_dictionary</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·244,·SHA:·4d8372b7b215e87ba9d633a7d447f17dbc67bba4a253ef63cde955915b48c4cc·...·]-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1414 ··········</span><span·class="p"·data-group-id="7714283741-3">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7714283741-4">{</span><span·class="p"·data-group-id="7714283741-5">{</span><span·class="ss">need_dictionary</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·244,·SHA:·cb47117dfd2b0ee165e4371637c02e8e654c0584c2166f8f65f65099df3cfd2f·...·]-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1415 ·················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateSetDictionary</span><span·class="p"·data-group-id="7190570052-6">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7190570052-6">)</span><span·class="p">,</span><span·class="w">1415 ·················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateSetDictionary</span><span·class="p"·data-group-id="7714283741-6">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7714283741-6">)</span><span·class="p">,</span><span·class="w">
1416 ·················</span><span·class="n">Uncompressed</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7190570052-7">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7190570052-8">[</span><span·class="p"·data-group-id="7190570052-8">]</span><span·class="p"·data-group-id="7190570052-7">)</span><span·class="p">;</span><span·class="w">1416 ·················</span><span·class="n">Uncompressed</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7714283741-7">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7714283741-8">[</span><span·class="p"·data-group-id="7714283741-8">]</span><span·class="p"·data-group-id="7714283741-7">)</span><span·class="p">;</span><span·class="w">
1417 ··········</span><span·class="n">Uncompressed</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1417 ··········</span><span·class="n">Uncompressed</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1418 ·················</span><span·class="n">Uncompressed</span><span·class="w">1418 ·················</span><span·class="n">Uncompressed</span><span·class="w">
1419 ·····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">1419 ·····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
1420 </span><span·class="nf">new_unpack</span><span·class="p"·data-group-id="7190570052-9">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7190570052-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1420 </span><span·class="nf">new_unpack</span><span·class="p"·data-group-id="7714283741-9">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7714283741-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1421 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7190570052-10">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7190570052-11">[</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·299,·SHA:·6de8255871830525ff3cd1bfeea16bf3efcae57a01f9e40e638a31601aaf2fed·...·]-10">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1421 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7714283741-10">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7714283741-11">[</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·299,·SHA:·c69c1c0f0ef9d009982d07a8c7b310eeb394de37df67e3e30e7705b91b7bf709·...·]-10">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1422 ········</span><span·class="p"·data-group-id="7190570052-13">{</span><span·class="ss">need_dictionary</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">DictId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Output</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·85d98e93c667c5fd2b162059b48ef91d26e62b9d438dabe37d1cf7cbbb246dc8·...·]-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1422 ········</span><span·class="p"·data-group-id="7714283741-13">{</span><span·class="ss">need_dictionary</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">DictId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Output</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·c70365c38c8da3ec3cf57ce0fb4f3dddebb066721f132fe5ac3d6a7c747b4baa·...·]-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1423 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateSetDictionary</span><span·class="p"·data-group-id="7190570052-14">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7190570052-14">)</span><span·class="p">,</span><span·class="w">1423 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateSetDictionary</span><span·class="p"·data-group-id="7714283741-14">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dict</span><span·class="p"·data-group-id="7714283741-14">)</span><span·class="p">,</span><span·class="w">
1424 ············</span><span·class="p"·data-group-id="7190570052-15">[</span><span·class="n">Output</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7190570052-16">(</s[·...·truncated·by·diffoscope;·len:·279,·SHA:·50f949a35ccc10a37afc0936dd06bea0272664ec10a4d87d7c8aefb3869c92f9·...·]-15">]</span><span·class="p">;</span><span·class="w">1424 ············</span><span·class="p"·data-group-id="7714283741-15">[</span><span·class="n">Output</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflate</span><span·class="p"·data-group-id="7714283741-16">(</s[·...·truncated·by·diffoscope;·len:·279,·SHA:·fa622a833cd1c3b2f70450f777f236f4ee67c15378fcb5fbd83230b31acdd1f8·...·]-15">]</span><span·class="p">;</span><span·class="w">
1425 ········</span><span·class="n">Uncompressed</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1425 ········</span><span·class="n">Uncompressed</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1426 ············</span><span·class="n">Uncompressed</span><span·class="w">1426 ············</span><span·class="n">Uncompressed</span><span·class="w">
1427 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre>1427 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre>
1428 ··</section>1428 ··</section>
1429 </section>1429 </section>
1430 <section·class="detail"·id="open/0">1430 <section·class="detail"·id="open/0">
  
Offset 1494, 26 lines modifiedOffset 1494, 26 lines modified
1494 implementation-defined·threshold.·It's·useful·when·decompressing·untrusted·input1494 implementation-defined·threshold.·It's·useful·when·decompressing·untrusted·input
1495 which·could·have·been·maliciously·crafted·to·expand·until·the·system·runs·out·of1495 which·could·have·been·maliciously·crafted·to·expand·until·the·system·runs·out·of
1496 memory.</p><p>This·function·returns·<code·class="inline">{continue·|·finished,·Output}</code>,·where·Output·is·the·data1496 memory.</p><p>This·function·returns·<code·class="inline">{continue·|·finished,·Output}</code>,·where·Output·is·the·data
1497 that·was·decompressed·in·this·call.·New·input·can·be·queued·up·on·each·call·if1497 that·was·decompressed·in·this·call.·New·input·can·be·queued·up·on·each·call·if
1498 desired,·and·the·function·will·return·<code·class="inline">{finished,·Output}</code>·once·all·queued·data1498 desired,·and·the·function·will·return·<code·class="inline">{finished,·Output}</code>·once·all·queued·data
1499 has·been·decompressed.</p><p>This·function·can·introduce·some·output·latency·(reading·input·without·producing1499 has·been·decompressed.</p><p>This·function·can·introduce·some·output·latency·(reading·input·without·producing
1500 any·output).</p><p>If·a·preset·dictionary·is·required·for·further·decompression,·this·function1500 any·output).</p><p>If·a·preset·dictionary·is·required·for·further·decompression,·this·function
1501 returns·a·<code·class="inline">need_dictionary</code>·tuple.·See·<a·href="#inflateSetDictionary/2"><code·class="inline">inflateSetDictionary/2</code></a>)·for·details.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">walk</span><span·class="p"·data-group-id="5322550705-1">(</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p"·data-group-id="5322550705-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1501 returns·a·<code·class="inline">need_dictionary</code>·tuple.·See·<a·href="#inflateSetDictionary/2"><code·class="inline">inflateSetDictionary/2</code></a>)·for·details.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">walk</span><span·class="p"·data-group-id="1778441472-1">(</span><span·class="n">Compressed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p"·data-group-id="1778441472-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1502 ····</span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="5322550705-2">(</span><span·class="p"·data-group-id="5322550705-2">)</span><span·class="p">,</span><span·class="w">1502 ····</span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="1778441472-2">(</span><span·class="p"·data-group-id="1778441472-2">)</span><span·class="p">,</span><span·class="w">
1503 ····</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateInit</span><span·class="p"·data-group-id="5322550705-3">(</span><span·class="n">Z</span><span·class="p"·data-group-id="5322550705-3">)</span><span·class="p">,</span><span·class="w">1503 ····</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateInit</span><span·class="p"·data-group-id="1778441472-3">(</span><span·class="n">Z</span><span·class="p"·data-group-id="1778441472-3">)</span><span·class="p">,</span><span·class="w">
1504 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="5322550705-4">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">safeInflate</sp[·...·truncated·by·diffoscope;·len:·255,·SHA:·d2b8624f459c0f812bf3ceeffb7d45a1be7b06dba0eeeddd483dfd26f59055fa·...·]-4">)</span><span·class="p">,</span><span·class="w">1504 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="1778441472-4">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">safeInflate</sp[·...·truncated·by·diffoscope;·len:·255,·SHA:·066a7cf5d703e74a37b6057772c84ac4b7c4f2d8164ec133f5cb114bb35e4876·...·]-4">)</span><span·class="p">,</span><span·class="w">
1505 ····</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateEnd</span><span·class="p"·data-group-id="5322550705-6">(</span><span·class="n">Z</span><span·class="p"·data-group-id="5322550705-6">)</span><span·class="p">,</span><span·class="w">1505 ····</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">inflateEnd</span><span·class="p"·data-group-id="1778441472-6">(</span><span·class="n">Z</span><span·class="p"·data-group-id="1778441472-6">)</span><span·class="p">,</span><span·class="w">
1506 ····</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5322550705-7">(</span><span·class="n">Z</span><span·class="p"·data-group-id="5322550705-7">)</span><span·class="p">.</span><span·class="w">1506 ····</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1778441472-7">(</span><span·class="n">Z</span><span·class="p"·data-group-id="1778441472-7">)</span><span·class="p">.</span><span·class="w">
  
1507 </span><span·class="nf">loop</span><span·class="p"·data-group-id="5322550705-8">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5322550705-9">{</span><span·class="ss">continue</span[·...·truncated·by·diffoscope;·len:·172,·SHA:·7f6883f568f7e64efc0ba0e3027c865da56de28261bc792fbe26360dedaad823·...·]-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1507 </span><span·class="nf">loop</span><span·class="p"·data-group-id="1778441472-8">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1778441472-9">{</span><span·class="ss">continue</span[·...·truncated·by·diffoscope;·len:·172,·SHA:·6c0a038b9f21012920f8cad7f64adfc14fb3bd8dad7d724db8c13bbfa631a32d·...·]-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1508 ····</span><span·class="n">Handler</span><span·class="p"·data-group-id="5322550705-10">(</span><span·class="n">Output</span><span·class="p"·data-group-id="5322550705-10">)</span><span·class="p">,</span><span·class="w">1508 ····</span><span·class="n">Handler</span><span·class="p"·data-group-id="1778441472-10">(</span><span·class="n">Output</span><span·class="p"·data-group-id="1778441472-10">)</span><span·class="p">,</span><span·class="w">
1509 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="5322550705-11">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">safeInflate</s[·...·truncated·by·diffoscope;·len:·333,·SHA:·8d0dc0aa9cb718ce21e4afa50e964f0319fa9abe772b5f670fa274606eedeca8·...·]-11">)</span><span·class="p">;</span><span·class="w">1509 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="1778441472-11">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">zlib</span><span·class="p">:</span><span·class="nf">safeInflate</s[·...·truncated·by·diffoscope;·len:·333,·SHA:·89f9955a80f29371da1fb5a3c262a40f88a9cc8fc471e1c2071f7d479a2b0130·...·]-11">)</span><span·class="p">;</span><span·class="w">
1510 </span><span·class="nf">loop</span><span·class="p"·data-group-id="5322550705-14">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5322550705-15">{</span><span·class="ss">finished</sp[·...·truncated·by·diffoscope;·len:·175,·SHA:·3ff502f5c7e282b002d684f35628d286519c2007e1cc0b1ded9fbc29f51d9e96·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1510 </span><span·class="nf">loop</span><span·class="p"·data-group-id="1778441472-14">(</span><span·class="n">Z</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handler</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1778441472-15">{</span><span·class="ss">finished</sp[·...·truncated·by·diffoscope;·len:·175,·SHA:·12bcc748775f2b600e3942af82024614b8879eeca5e61529d280e410e8d498b6·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1511 ····</span><span·class="n">Handler</span><span·class="p"·data-group-id="5322550705-16">(</span><span·class="n">Output</span><span·class="p"·data-group-id="5322550705-16">)</span><span·class="p">.</span></code></pre>1511 ····</span><span·class="n">Handler</span><span·class="p"·data-group-id="1778441472-16">(</span><span·class="n">Output</span><span·class="p"·data-group-id="1778441472-16">)</span><span·class="p">.</span></code></pre>
1512 ··</section>1512 ··</section>
1513 </section>1513 </section>
1514 <section·class="detail"·id="set_controlling_process/2">1514 <section·class="detail"·id="set_controlling_process/2">
  
1515 ··<div·class="detail-header">1515 ··<div·class="detail-header">
1516 ····<a·href="#set_controlling_process/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1516 ····<a·href="#set_controlling_process/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1517 ······<i·class="ri-link-m"·aria-hidden="true"></i>1517 ······<i·class="ri-link-m"·aria-hidden="true"></i>
570 B
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/.build
    
Offset 23, 12 lines modifiedOffset 23, 12 lines modified
23 dist/lato-latin-300-normal-YUMVEFOL.woff223 dist/lato-latin-300-normal-YUMVEFOL.woff2
24 dist/lato-latin-400-normal-W7754I4D.woff224 dist/lato-latin-400-normal-W7754I4D.woff2
25 dist/lato-latin-700-normal-2XVSBPG4.woff225 dist/lato-latin-700-normal-2XVSBPG4.woff2
26 dist/lato-latin-ext-300-normal-VPGGJKJL.woff226 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
27 dist/lato-latin-ext-400-normal-N27NCBWW.woff227 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
28 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff228 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
29 dist/remixicon-NKANDIL5.woff229 dist/remixicon-NKANDIL5.woff2
30 dist/search_data-614FD7B8.js30 dist/search_data-29151339.js
31 dist/sidebar_items-C28B0719.js31 dist/sidebar_items-C28B0719.js
32 index.html32 index.html
33 notes.html33 notes.html
34 search.html34 search.html
329 KB
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/asn1.epub
3.09 KB
zipinfo {}
    
Offset 1, 20 lines modifiedOffset 1, 20 lines modified
1 Zip·file·size:·93969·bytes,·number·of·entries:·181 Zip·file·size:·93948·bytes,·number·of·entries:·18
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:18·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:57·mimetype
3 ?rw-r--r--··2.0·unx······708·b-·defN·24-Oct-11·20:18·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······708·b-·defN·24-Oct-11·20:57·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····87105·b-·defN·24-Oct-11·20:18·OEBPS/notes.xhtml4 ?rw-r--r--··2.0·unx····87105·b-·defN·24-Oct-11·20:57·OEBPS/notes.xhtml
5 ?rw-r--r--··2.0·unx·····1269·b-·defN·24-Oct-11·20:18·OEBPS/nav.xhtml5 ?rw-r--r--··2.0·unx·····1269·b-·defN·24-Oct-11·20:57·OEBPS/nav.xhtml
6 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-erlang-2EWSTWER.css6 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-erlang-2EWSTWER.css
7 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-CB7BJMUW.js7 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-CB7BJMUW.js
8 ?rw-r--r--··2.0·unx·····2278·b-·defN·24-Oct-11·20:18·OEBPS/content.opf8 ?rw-r--r--··2.0·unx·····2278·b-·defN·24-Oct-11·20:57·OEBPS/content.opf
9 ?rw-r--r--··2.0·unx·····2920·b-·stor·24-Oct-11·20:18·OEBPS/assets/selective_Window2.gif9 ?rw-r--r--··2.0·unx·····2920·b-·stor·24-Oct-11·20:57·OEBPS/assets/selective_Window2.gif
10 ?rw-r--r--··2.0·unx·····4465·b-·stor·24-Oct-11·20:18·OEBPS/assets/selective_TypeList.gif10 ?rw-r--r--··2.0·unx·····4465·b-·stor·24-Oct-11·20:57·OEBPS/assets/selective_TypeList.gif
11 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:18·OEBPS/assets/logo.png11 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:57·OEBPS/assets/logo.png
12 ?rw-r--r--··2.0·unx·····1340·b-·stor·24-Oct-11·20:18·OEBPS/assets/exclusive_Win_But.gif12 ?rw-r--r--··2.0·unx·····1340·b-·stor·24-Oct-11·20:57·OEBPS/assets/exclusive_Win_But.gif
13 ?rw-r--r--··2.0·unx····30053·b-·defN·24-Oct-11·20:18·OEBPS/asn1ct.xhtml13 ?rw-r--r--··2.0·unx····30053·b-·defN·24-Oct-11·20:57·OEBPS/asn1ct.xhtml
14 ?rw-r--r--··2.0·unx····71900·b-·defN·24-Oct-11·20:18·OEBPS/asn1_spec.xhtml14 ?rw-r--r--··2.0·unx····71900·b-·defN·24-Oct-11·20:57·OEBPS/asn1_spec.xhtml
15 ?rw-r--r--··2.0·unx·····1401·b-·defN·24-Oct-11·20:18·OEBPS/asn1_overview.xhtml15 ?rw-r--r--··2.0·unx·····1401·b-·defN·24-Oct-11·20:57·OEBPS/asn1_overview.xhtml
16 ?rw-r--r--··2.0·unx·····3294·b-·defN·24-Oct-11·20:18·OEBPS/asn1_introduction.xhtml16 ?rw-r--r--··2.0·unx·····3294·b-·defN·24-Oct-11·20:57·OEBPS/asn1_introduction.xhtml
17 ?rw-r--r--··2.0·unx···127003·b-·defN·24-Oct-11·20:18·OEBPS/asn1_getting_started.xhtml17 ?rw-r--r--··2.0·unx···127003·b-·defN·24-Oct-11·20:57·OEBPS/asn1_getting_started.xhtml
18 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:18·META-INF/container.xml18 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:57·META-INF/container.xml
19 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:18·META-INF/com.apple.ibooks.display-options.xml19 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:57·META-INF/com.apple.ibooks.display-options.xml
20 18·files,·356904·bytes·uncompressed,·91675·bytes·compressed:··74.3%20 18·files,·356904·bytes·uncompressed,·91654·bytes·compressed:··74.3%
47.2 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
2.32 KB
OEBPS/content.opf
2.28 KB
OEBPS/content.opf
Max HTML report size reached
6.3 KB
OEBPS/asn1ct.xhtml
Max HTML report size reached
107 KB
OEBPS/asn1_spec.xhtml
Max HTML report size reached
163 KB
OEBPS/asn1_getting_started.xhtml
Max HTML report size reached
163 KB
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/asn1_getting_started.html
    
Offset 139, 45 lines modifiedOffset 139, 45 lines modified
139 ····location·INTEGER·{home(0),field(1),roving(2)},139 ····location·INTEGER·{home(0),field(1),roving(2)},
140 ····age·INTEGER·OPTIONAL140 ····age·INTEGER·OPTIONAL
141 ··}141 ··}
142 END</code></pre><p>This·file·must·be·compiled·before·it·can·be·used.·The·ASN.1·compiler·checks·that142 END</code></pre><p>This·file·must·be·compiled·before·it·can·be·used.·The·ASN.1·compiler·checks·that
143 the·syntax·is·correct·and·that·the·text·represents·proper·ASN.1·code·before143 the·syntax·is·correct·and·that·the·text·represents·proper·ASN.1·code·before
144 generating·an·abstract·syntax·tree.·The·code·generator·then·uses·the·abstract144 generating·an·abstract·syntax·tree.·The·code·generator·then·uses·the·abstract
145 syntax·tree·to·generate·code.</p><p>The·generated·Erlang·files·are·placed·in·the·current·directory·or·in·the145 syntax·tree·to·generate·code.</p><p>The·generated·Erlang·files·are·placed·in·the·current·directory·or·in·the
146 directory·specified·with·option·<code·class="inline">{outdir,Dir}</code>.</p><p>The·compiler·can·be·called·from·the·Erlang·shell·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">asn1ct</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="1331473068-1">(</span><span·class="s">&quot;People&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1331473068-2">[</span><span·class="ss">ber</span><span·class="p"·data-group-id="1331473068-2">]</span><span·class=[·...·truncated·by·diffoscope;·len:·28,·SHA:·d816ac16eb101e96b5f5aa01e0e9557791efd963ed842b40ce3a8e259e46d579·...·]8-1">)</span><span·class="p">.</span><span·class="w">146 directory·specified·with·option·<code·class="inline">{outdir,Dir}</code>.</p><p>The·compiler·can·be·called·from·the·Erlang·shell·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">asn1ct</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="4636761078-1">(</span><span·class="s">&quot;People&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4636761078-2">[</span><span·class="ss">ber</span><span·class="p"·data-group-id="4636761078-2">]</span><span·class=[·...·truncated·by·diffoscope;·len:·28,·SHA:·b5c7491879d39fd4870f5b96faa030a9589cd0b2e63747f9c7b41deeae3ef0d5·...·]8-1">)</span><span·class="p">.</span><span·class="w">
147 </span><span·class="ss">ok</span></code></pre><p>Option·<code·class="inline">verbose</code>·can·be·added·to·get·information·about·the·generated·files:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">asn1ct</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="0955793484-1">(</span><span·class="s">&quot;People&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0955793484-2">[</span><span·class="ss">ber</span><span·class="p">,</span><span·class="ss">verbose</span><span·clas[·...·truncated·by·diffoscope;·len:·84,·SHA:·8a722029b18029b4b32f6842bf2f9c70536c59647eacdecea05e5c2100974616·...·]-1">)</span><span·class="p">.</span><span·class="w">147 </span><span·class="ss">ok</span></code></pre><p>Option·<code·class="inline">verbose</code>·can·be·added·to·get·information·about·the·generated·files:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">asn1ct</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="7262712112-1">(</span><span·class="s">&quot;People&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7262712112-2">[</span><span·class="ss">ber</span><span·class="p">,</span><span·class="ss">verbose</span><span·clas[·...·truncated·by·diffoscope;·len:·84,·SHA:·cb43b6a050b2a82e512647417b16e29652200bdf6589594bb83ce4243f20f8ed·...·]-1">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">ASN</span><span·class="p">.</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">compiling</span><span·class="w">·</span><span·class="s">&quot;People.asn&quot;</span><span·class="w">148 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">ASN</span><span·class="p">.</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">compiling</span><span·class="w">·</span><span·class="s">&quot;People.asn&quot;</span><span·class="w">
149 </span><span·class="o">--</span><span·class="p"·data-group-id="0955793484-3">{</span><span·class="ss">generated</span><span·class="p">,</span><span·class="s">&quot;People.asn1db&quot;</span><span·class="p"·data-group-id="0955793484-3">}</span><span·class="o">--</span><span·class="w">149 </span><span·class="o">--</span><span·class="p"·data-group-id="7262712112-3">{</span><span·class="ss">generated</span><span·class="p">,</span><span·class="s">&quot;People.asn1db&quot;</span><span·class="p"·data-group-id="7262712112-3">}</span><span·class="o">--</span><span·class="w">
150 </span><span·class="o">--</span><span·class="p"·data-group-id="0955793484-4">{</span><span·class="ss">generated</span><span·class="p">,</span><span·class="s">&quot;People.hrl&quot;</span><span·class="p"·data-group-id="0955793484-4">}</span><span·class="o">--</span><span·class="w">150 </span><span·class="o">--</span><span·class="p"·data-group-id="7262712112-4">{</span><span·class="ss">generated</span><span·class="p">,</span><span·class="s">&quot;People.hrl&quot;</span><span·class="p"·data-group-id="7262712112-4">}</span><span·class="o">--</span><span·class="w">
151 </span><span·class="o">--</span><span·class="p"·data-group-id="0955793484-5">{</span><span·class="ss">generated</span><span·class="p">,</span><span·class="s">&quot;People.erl&quot;</span><span·class="p"·data-group-id="0955793484-5">}</span><span·class="o">--</span><span·class="w">151 </span><span·class="o">--</span><span·class="p"·data-group-id="7262712112-5">{</span><span·class="ss">generated</span><span·class="p">,</span><span·class="s">&quot;People.erl&quot;</span><span·class="p"·data-group-id="7262712112-5">}</span><span·class="o">--</span><span·class="w">
152 </span><span·class="ss">ok</span></code></pre><p>ASN.1·module·<code·class="inline">People</code>·is·now·accepted·and·the·abstract·syntax·tree·is·saved·in152 </span><span·class="ss">ok</span></code></pre><p>ASN.1·module·<code·class="inline">People</code>·is·now·accepted·and·the·abstract·syntax·tree·is·saved·in
153 file·<code·class="inline">People.asn1db</code>.·The·generated·Erlang·code·is·compiled·using·the·Erlang153 file·<code·class="inline">People.asn1db</code>.·The·generated·Erlang·code·is·compiled·using·the·Erlang
154 compiler·and·loaded·into·the·Erlang·runtime·system.·There·is·now·an·API·for154 compiler·and·loaded·into·the·Erlang·runtime·system.·There·is·now·an·API·for
155 <code·class="inline">encode/2</code>·and·<code·class="inline">decode/2</code>·in·module·<code·class="inline">People</code>,·which·is·called·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">&#39;People&#39;</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="5199599304-1">(</span><span·class="o">&lt;</span><span·class="n">Type</span><span·class="w">·</span><span·class="ss">name</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Value</spa[·...·truncated·by·diffoscope;·len:·604,·SHA:·994856019d11386b7d9516d1b7d573e779c1042d374456022ab10a8b55b48278·...·]-1">)</span></code></pre><p>Assume·that·there·is·a·network·application·that·receives·instances·of·the·ASN.1155 <code·class="inline">encode/2</code>·and·<code·class="inline">decode/2</code>·in·module·<code·class="inline">People</code>,·which·is·called·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">&#39;People&#39;</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="1363079086-1">(</span><span·class="o">&lt;</span><span·class="n">Type</span><span·class="w">·</span><span·class="ss">name</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Value</spa[·...·truncated·by·diffoscope;·len:·604,·SHA:·6afbd2cba7920b68dc1758c74f99f6d180d2537c3041b22cb8de51520b325af0·...·]-1">)</span></code></pre><p>Assume·that·there·is·a·network·application·that·receives·instances·of·the·ASN.1
156 defined·type·<code·class="inline">Person</code>,·modifies,·and·sends·them·back·again:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">156 defined·type·<code·class="inline">Person</code>,·modifies,·and·sends·them·back·again:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">receive</span><span·class="w">
157 ···</span><span·class="p"·data-group-id="2066899759-1">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="p"·data-group-id="2066899759-2">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="2066899759-2">}</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·2b443ef788b2fe1f1dde6acd3724de231620551d177ce31b6c2c9f224999e6ff·...·]-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 ···</span><span·class="p"·data-group-id="8947071887-1">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="p"·data-group-id="8947071887-2">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="8947071887-2">}</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·dedef55f49b54b17d1b04d9825d0fab9bffe259973510a7c7dcda2f1c1f2e362·...·]-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ·······</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">&#39;People&#39;</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="2066899759-3">(</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="2066899759-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">158 ·······</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">&#39;People&#39;</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="8947071887-3">(</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="8947071887-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
159 ···········</span><span·class="p"·data-group-id="2066899759-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">P</span><span·class="p"·data-group-id="2066899759-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 ···········</span><span·class="p"·data-group-id="8947071887-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">P</span><span·class="p"·data-group-id="8947071887-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ···············</span><span·class="p"·data-group-id="2066899759-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Answer</span><span·class="p"·data-group-id="2066899759-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;People&#[·...·truncated·by·diffoscope;·len:·385,·SHA:·bb301f93f8fbc1eb417dd2ab534a7c144f17f03b244654fc07ceb726db6a54c0·...·]-6">)</span><span·class="p">,</span><span·class="w">160 ···············</span><span·class="p"·data-group-id="8947071887-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Answer</span><span·class="p"·data-group-id="8947071887-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;People&#[·...·truncated·by·diffoscope;·len:·385,·SHA:·a33e149f8ce8d6a262527348a565e011408e727dc3399a9e2839f0eb77925ae6·...·]-6">)</span><span·class="p">,</span><span·class="w">
161 ···············</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2066899759-8">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2066899759-9">(</span><span·class="p"·data-group-id="2066899759-9">)</span><span·class="p">,</span><span·class="p"·data-group-id="2066899759-10">{</span><span·class="ss">comma[·...·truncated·by·diffoscope;·len:·157,·SHA:·e1b0767b131589906edbb01a1d587ced4c34cafcd924175276f0ceb94593e672·...·]-8">}</span><span·class="p">;</span><span·class="w">161 ···············</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="8947071887-8">{</span><span·class="nf">self</span><span·class="p"·data-group-id="8947071887-9">(</span><span·class="p"·data-group-id="8947071887-9">)</span><span·class="p">,</span><span·class="p"·data-group-id="8947071887-10">{</span><span·class="ss">comma[·...·truncated·by·diffoscope;·len:·157,·SHA:·787c7f1506a3f901aaa41a08bf6eff8b726c033fe5c087260cbb3a0da3dfb831·...·]-8">}</span><span·class="p">;</span><span·class="w">
162 ···········</span><span·class="p"·data-group-id="2066899759-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="2066899759-11">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">162 ···········</span><span·class="p"·data-group-id="8947071887-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="8947071887-11">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
163 ···············</span><span·class="nf">exit</span><span·class="p"·data-group-id="2066899759-12">(</span><span·class="p"·data-group-id="2066899759-13">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="2066899759-13">}</span><span·class="p"·data-group-id="2066899759-12">)</span><span·class="w">163 ···············</span><span·class="nf">exit</span><span·class="p"·data-group-id="8947071887-12">(</span><span·class="p"·data-group-id="8947071887-13">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="8947071887-13">}</span><span·class="p"·data-group-id="8947071887-12">)</span><span·class="w">
164 ·······</span><span·class="k">end</span><span·class="w">164 ·······</span><span·class="k">end</span><span·class="w">
165 ····</span><span·class="k">end</span><span·class="p">,</span></code></pre><p>In·this·example,·a·series·of·bytes·is·received·from·an·external·source·and·the165 ····</span><span·class="k">end</span><span·class="p">,</span></code></pre><p>In·this·example,·a·series·of·bytes·is·received·from·an·external·source·and·the
166 bytes·are·then·decoded·into·a·valid·Erlang·term.·This·was·achieved·with·the·call166 bytes·are·then·decoded·into·a·valid·Erlang·term.·This·was·achieved·with·the·call
167 <code·class="inline">'People':decode('Person',Bytes)</code>,·which·returned·an·Erlang·value·of·the·ASN.1167 <code·class="inline">'People':decode('Person',Bytes)</code>,·which·returned·an·Erlang·value·of·the·ASN.1
168 type·<code·class="inline">Person</code>.·Then·an·answer·was·constructed·and·encoded·using168 type·<code·class="inline">Person</code>.·Then·an·answer·was·constructed·and·encoded·using
169 <code·class="inline">'People':encode('Person',Answer)</code>,·which·takes·an·instance·of·a·defined·ASN.1169 <code·class="inline">'People':encode('Person',Answer)</code>,·which·takes·an·instance·of·a·defined·ASN.1
170 type·and·transforms·it·to·a·binary·according·to·the·BER·or·PER·encoding·rules.</p><p>The·encoder·and·decoder·can·also·be·run·from·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">Rockstar</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8481318120-1">{</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="s">&quot;Some·Name&quot;</span><span·class="p">,</span><span·class="ss">roving</span><span·class="p">,</span><span·class="mi">50</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·01142c49a4f2dea0543517eaf7249c757edac11f5dd2666a50d092c661312b64·...·]-1">}</span><span·class="p">.</span><span·class="w">170 type·and·transforms·it·to·a·binary·according·to·the·BER·or·PER·encoding·rules.</p><p>The·encoder·and·decoder·can·also·be·run·from·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">Rockstar</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4901522977-1">{</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="s">&quot;Some·Name&quot;</span><span·class="p">,</span><span·class="ss">roving</span><span·class="p">,</span><span·class="mi">50</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·b300b6a70f9c98fb13ba601e99a4cdf1a40297d846121af8e03a0c011052cfd8·...·]-1">}</span><span·class="p">.</span><span·class="w">
171 </span><span·class="p"·data-group-id="8481318120-2">{</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="s">&quot;Some·Name&quot;</span><span·class="p">,</span><span·class="ss">roving</span><span·class="p">,</span><span·class="mi">50</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·01142c49a4f2dea0543517eaf7249c757edac11f5dd2666a50d092c661312b64·...·]-2">}</span><span·class="gp·unselectable">171 </span><span·class="p"·data-group-id="4901522977-2">{</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="s">&quot;Some·Name&quot;</span><span·class="p">,</span><span·class="ss">roving</span><span·class="p">,</span><span·class="mi">50</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·b300b6a70f9c98fb13ba601e99a4cdf1a40297d846121af8e03a0c011052cfd8·...·]-2">}</span><span·class="gp·unselectable">
172 3&gt;·</span><span·class="p"·data-group-id="8481318120-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Bin</span><span·class="p"·data-group-id="8481318120-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;People&#39;[·...·truncated·by·diffoscope;·len:·250,·SHA:·c61b9cd3e570dfb0058beb68740fbae73d7271ce25fb7551ce8ffe9833b21716·...·]-4">)</span><span·class="p">.</span><span·class="w">172 3&gt;·</span><span·class="p"·data-group-id="4901522977-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Bin</span><span·class="p"·data-group-id="4901522977-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;People&#39;[·...·truncated·by·diffoscope;·len:·250,·SHA:·199e6e2248f07d418174a3b1d2aa81c18819d487017d85620739c8a1cb274f99·...·]-4">)</span><span·class="p">.</span><span·class="w">
173 </span><span·class="p"·data-group-id="8481318120-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">243</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">,</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">78</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">173 </span><span·class="p"·data-group-id="4901522977-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">243</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">,</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">78</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
174 ······</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">50</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8481318120-5">}</span><span·class="gp·unselectable">174 ······</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">50</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4901522977-5">}</span><span·class="gp·unselectable">
175 4&gt;·</span><span·class="p"·data-group-id="8481318120-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Person</span><span·class="p"·data-group-id="8481318120-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;People&#[·...·truncated·by·diffoscope;·len:·248,·SHA:·5ae100721977349616eb8b585fe9d50ea2580acc71197c15c4e6c32c525bbdbd·...·]-7">)</span><span·class="p">.</span><span·class="w">175 4&gt;·</span><span·class="p"·data-group-id="4901522977-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Person</span><span·class="p"·data-group-id="4901522977-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;People&#[·...·truncated·by·diffoscope;·len:·248,·SHA:·bac7e793a82e247fe037323a76c7d30796c02d279fd63276116cd244a6f2bc9e·...·]-7">)</span><span·class="p">.</span><span·class="w">
176 </span><span·class="p"·data-group-id="8481318120-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8481318120-9">{</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="s">&quot;Some·Name&quot;</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·175,·SHA:·bbd102acbb348c6724ea108313e2df9419dae12c1b197f063ad9b442fb3034ef·...·]-8">}</span></code></pre><h3·id="module-dependencies"·class="section-heading">176 </span><span·class="p"·data-group-id="4901522977-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4901522977-9">{</span><span·class="ss">&#39;Person&#39;</span><span·class="p">,</span><span·class="s">&quot;Some·Name&quot;</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·175,·SHA:·b6eb998fa73f9d6475663d00d3bbe8be3ea26d41feed81480cbfc4850a851d69·...·]-8">}</span></code></pre><h3·id="module-dependencies"·class="section-heading">
177 ··<a·href="#module-dependencies"·class="hover-link">177 ··<a·href="#module-dependencies"·class="hover-link">
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Module·Dependencies</span>180 ··<span·class="text">Module·Dependencies</span>
181 </h3>181 </h3>
182 <p>It·is·common·that·ASN.1·modules·import·defined·types,·values,·and·other·entities182 <p>It·is·common·that·ASN.1·modules·import·defined·types,·values,·and·other·entities
183 from·another·ASN.1·module.</p><p>Earlier·versions·of·the·ASN.1·compiler·required·that·modules·that·were·imported183 from·another·ASN.1·module.</p><p>Earlier·versions·of·the·ASN.1·compiler·required·that·modules·that·were·imported
Offset 267, 35 lines modifiedOffset 267, 35 lines modified
267 ··</a>267 ··</a>
268 ··<span·class="text">Note·about·tags</span>268 ··<span·class="text">Note·about·tags</span>
269 </h2>269 </h2>
270 <p>Tags·used·to·be·important·for·all·users·of·ASN.1,·because·it·was·necessary·to270 <p>Tags·used·to·be·important·for·all·users·of·ASN.1,·because·it·was·necessary·to
271 to·manually·add·tags·to·certain·constructs·in·order·for·the·ASN.1·specification·to271 to·manually·add·tags·to·certain·constructs·in·order·for·the·ASN.1·specification·to
272 be·valid.·Example·of·an·old-style·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Tags</span><span·class="w">·</span><span·class="n">DEFINITIONS</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">272 be·valid.·Example·of·an·old-style·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Tags</span><span·class="w">·</span><span·class="n">DEFINITIONS</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">
273 </span><span·class="n">BEGIN</span><span·class="w">273 </span><span·class="n">BEGIN</span><span·class="w">
274 ··</span><span·class="n">Afters</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">CHOICE</span><span·class="w">·</span><span·class="p"·data-group-id="2122579711-1">{</span><span·class="w">·</span><span·class="ss">cheese</span><span·class="w">·</span><span·class="p"·data-group-id="2122579711-2">[</span><span·class="mi">0</span><span·class="p"·data-group-id="2122579711-2">]</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="p">,</span><span·class="w">274 ··</span><span·class="n">Afters</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">CHOICE</span><span·class="w">·</span><span·class="p"·data-group-id="9099180020-1">{</span><span·class="w">·</span><span·class="ss">cheese</span><span·class="w">·</span><span·class="p"·data-group-id="9099180020-2">[</span><span·class="mi">0</span><span·class="p"·data-group-id="9099180020-2">]</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="p">,</span><span·class="w">
275 ······················</span><span·class="ss">dessert</span><span·class="w">·</span><span·class="p"·data-group-id="2122579711-3">[</span><span·class="mi">1</span><span·class="p"·data-group-id="2122579711-3">]</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="w">·</span><span·class="p"·data-group-id="2122579711-1">}</span><span·class="w">275 ······················</span><span·class="ss">dessert</span><span·class="w">·</span><span·class="p"·data-group-id="9099180020-3">[</span><span·class="mi">1</span><span·class="p"·data-group-id="9099180020-3">]</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="w">·</span><span·class="p"·data-group-id="9099180020-1">}</span><span·class="w">
276 </span><span·class="n">END</span></code></pre><p>Without·the·tags·(the·numbers·in·square·brackets)·the·ASN.1·compiler·refused·to276 </span><span·class="n">END</span></code></pre><p>Without·the·tags·(the·numbers·in·square·brackets)·the·ASN.1·compiler·refused·to
277 compile·the·file.</p><p>In·1994·the·global·tagging·mode·<code·class="inline">AUTOMATIC·TAGS</code>·was·introduced.·By·putting277 compile·the·file.</p><p>In·1994·the·global·tagging·mode·<code·class="inline">AUTOMATIC·TAGS</code>·was·introduced.·By·putting
278 <code·class="inline">AUTOMATIC·TAGS</code>·in·the·module·header,·the·ASN.1·compiler·automatically·adds278 <code·class="inline">AUTOMATIC·TAGS</code>·in·the·module·header,·the·ASN.1·compiler·automatically·adds
279 tags·when·needed.·The·following·is·the·same·specification·in·<code·class="inline">AUTOMATIC·TAGS</code>279 tags·when·needed.·The·following·is·the·same·specification·in·<code·class="inline">AUTOMATIC·TAGS</code>
280 mode:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Tags</span><span·class="w">·</span><span·class="n">DEFINITIONS</span><span·class="w">·</span><span·class="n">AUTOMATIC</span><span·class="w">·</span><span·class="n">TAGS</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">280 mode:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Tags</span><span·class="w">·</span><span·class="n">DEFINITIONS</span><span·class="w">·</span><span·class="n">AUTOMATIC</span><span·class="w">·</span><span·class="n">TAGS</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">
281 </span><span·class="n">BEGIN</span><span·class="w">281 </span><span·class="n">BEGIN</span><span·class="w">
282 ··</span><span·class="n">Afters</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">CHOICE</span><span·class="w">·</span><span·class="p"·data-group-id="8898174225-1">{</span><span·class="w">·</span><span·class="ss">cheese</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="p">,</span><span·class="w">282 ··</span><span·class="n">Afters</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">CHOICE</span><span·class="w">·</span><span·class="p"·data-group-id="5389819482-1">{</span><span·class="w">·</span><span·class="ss">cheese</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="p">,</span><span·class="w">
283 ······················</span><span·class="ss">dessert</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="w">·</span><span·class="p"·data-group-id="8898174225-1">}</span><span·class="w">283 ······················</span><span·class="ss">dessert</span><span·class="w">·</span><span·class="n">IA5String</span><span·class="w">·</span><span·class="p"·data-group-id="5389819482-1">}</span><span·class="w">
284 </span><span·class="n">END</span></code></pre><p><a·href=""·id="ASN1Types"></a></p><h2·id="asn-1-types"·class="section-heading">284 </span><span·class="n">END</span></code></pre><p><a·href=""·id="ASN1Types"></a></p><h2·id="asn-1-types"·class="section-heading">
285 ··<a·href="#asn-1-types"·class="hover-link">285 ··<a·href="#asn-1-types"·class="hover-link">
286 ····<i·class="ri-link-m"·aria-hidden="true"></i>286 ····<i·class="ri-link-m"·aria-hidden="true"></i>
287 ··</a>287 ··</a>
288 ··<span·class="text">ASN.1·Types</span>288 ··<span·class="text">ASN.1·Types</span>
289 </h2>289 </h2>
290 <p>This·section·describes·the·ASN.1·types·including·their·functionality,·purpose,290 <p>This·section·describes·the·ASN.1·types·including·their·functionality,·purpose,
291 and·how·values·are·assigned·in·Erlang.</p><p>ASN.1·has·both·primitive·and·constructed·types:</p><table><thead><tr><th·style="text-align:·left;"><em>Primitive·Types</em></th><th·style="text-align:·left;"><em>Constructed·Types</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#boolean">BOOLEAN</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#sequence">SEQUENCE</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#integer">INTEGER</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#set">SET</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#real">REAL</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#choice">CHOICE</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#null">NULL</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#SOF">SET·OF·and·SEQUENCE·OF</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#enumerated">ENUMERATED</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#ANY">ANY</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#bit-string">BIT·STRING</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#ANY">ANY·DEFINED·BY</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#octet-string">OCTET·STRING</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#NegotiationTypes">EXTERNAL</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#character-strings">Character·Strings</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#NegotiationTypes">EMBEDDED·PDV</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#object-identifier">OBJECT·IDENTIFIER</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#NegotiationTypes">CHARACTER·STRING</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#object-descriptor">Object·Descriptor</a></td><td·style="text-align:·left;"></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#The-TIME-types">TIME·Types</a></td><td·style="text-align:·left;"></td></tr></tbody></table><p><em>Table:·Supported·ASN.1·Types</em></p><p><a·href=""·id="TypeNameValue"></a></p><blockquote><h4·class="info">Note</h4><p>The·values·of·each·ASN.1·type·have·their·own·representation·in·Erlang,·as291 and·how·values·are·assigned·in·Erlang.</p><p>ASN.1·has·both·primitive·and·constructed·types:</p><table><thead><tr><th·style="text-align:·left;"><em>Primitive·Types</em></th><th·style="text-align:·left;"><em>Constructed·Types</em></th></tr></thead><tbody><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#boolean">BOOLEAN</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#sequence">SEQUENCE</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#integer">INTEGER</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#set">SET</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#real">REAL</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#choice">CHOICE</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#null">NULL</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#SOF">SET·OF·and·SEQUENCE·OF</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#enumerated">ENUMERATED</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#ANY">ANY</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#bit-string">BIT·STRING</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#ANY">ANY·DEFINED·BY</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#octet-string">OCTET·STRING</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#NegotiationTypes">EXTERNAL</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#character-strings">Character·Strings</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#NegotiationTypes">EMBEDDED·PDV</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#object-identifier">OBJECT·IDENTIFIER</a></td><td·style="text-align:·left;"><a·href="asn1_getting_started.html#NegotiationTypes">CHARACTER·STRING</a></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#object-descriptor">Object·Descriptor</a></td><td·style="text-align:·left;"></td></tr><tr><td·style="text-align:·left;"><a·href="asn1_getting_started.html#The-TIME-types">TIME·Types</a></td><td·style="text-align:·left;"></td></tr></tbody></table><p><em>Table:·Supported·ASN.1·Types</em></p><p><a·href=""·id="TypeNameValue"></a></p><blockquote><h4·class="info">Note</h4><p>The·values·of·each·ASN.1·type·have·their·own·representation·in·Erlang,·as
292 described·in·the·following·sections.·Users·must·provide·these·values·for292 described·in·the·following·sections.·Users·must·provide·these·values·for
293 encoding·according·to·the·representation,·as·shown·in·the·following·example:</p></blockquote><pre><code·class="text">Operational·::=·BOOLEAN·--ASN.1·definition</code></pre><p>In·Erlang·code·it·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">293 encoding·according·to·the·representation,·as·shown·in·the·following·example:</p></blockquote><pre><code·class="text">Operational·::=·BOOLEAN·--ASN.1·definition</code></pre><p>In·Erlang·code·it·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">
294 </span><span·class="p"·data-group-id="6385785104-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="6385785104-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">MyModule</span>[·...·truncated·by·diffoscope;·len:·267,·SHA:·f9c80fa03686ae3fd1cffc4b5c6cbfcf043dd5183412844f29ddb9fc5606eae8·...·]-2">)</span><span·class="p">,</span></code></pre><h3·id="boolean"·class="section-heading">294 </span><span·class="p"·data-group-id="8325517393-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Bytes</span><span·class="p"·data-group-id="8325517393-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">MyModule</span>[·...·truncated·by·diffoscope;·len:·267,·SHA:·a73c7b0afaac3ba8a0147b85571ddd88215aaa24d3109efb2097741caf09ff71·...·]-2">)</span><span·class="p">,</span></code></pre><h3·id="boolean"·class="section-heading">
295 ··<a·href="#boolean"·class="hover-link">295 ··<a·href="#boolean"·class="hover-link">
296 ····<i·class="ri-link-m"·aria-hidden="true"></i>296 ····<i·class="ri-link-m"·aria-hidden="true"></i>
297 ··</a>297 ··</a>
298 ··<span·class="text">BOOLEAN</span>298 ··<span·class="text">BOOLEAN</span>
299 </h3>299 </h3>
300 <p>Booleans·in·ASN.1·express·values·that·can·be·either·<code·class="inline">TRUE</code>·or·<code·class="inline">FALSE</code>.·The300 <p>Booleans·in·ASN.1·express·values·that·can·be·either·<code·class="inline">TRUE</code>·or·<code·class="inline">FALSE</code>.·The
301 meanings·assigned·to·<code·class="inline">TRUE</code>·and·<code·class="inline">FALSE</code>·are·outside·the·scope·of·this·text.</p><p>In·ASN.1·it·is·possible·to·have:</p><pre><code·class="text">Operational·::=·BOOLEAN</code></pre><p>Assigning·a·value·to·type·<code·class="inline">Operational</code>·in·Erlang·is·possible·by·using·the301 meanings·assigned·to·<code·class="inline">TRUE</code>·and·<code·class="inline">FALSE</code>·are·outside·the·scope·of·this·text.</p><p>In·ASN.1·it·is·possible·to·have:</p><pre><code·class="text">Operational·::=·BOOLEAN</code></pre><p>Assigning·a·value·to·type·<code·class="inline">Operational</code>·in·Erlang·is·possible·by·using·the
Offset 304, 19 lines modifiedOffset 304, 19 lines modified
304 ····<i·class="ri-link-m"·aria-hidden="true"></i>304 ····<i·class="ri-link-m"·aria-hidden="true"></i>
305 ··</a>305 ··</a>
306 ··<span·class="text">INTEGER</span>306 ··<span·class="text">INTEGER</span>
307 </h3>307 </h3>
308 <p>An·ASN.1·INTEGER·is·represented·by·an·integer·in·Erlang.</p><p>The·concept·of·subtyping·can·be·applied·to·integers·and·to·other·ASN.1·types.308 <p>An·ASN.1·INTEGER·is·represented·by·an·integer·in·Erlang.</p><p>The·concept·of·subtyping·can·be·applied·to·integers·and·to·other·ASN.1·types.
309 The·details·of·subtyping·are·not·explained·here;·for·more·information,·see309 The·details·of·subtyping·are·not·explained·here;·for·more·information,·see
310 X.680.·Various·syntaxes·are·allowed·when·defining·a·type·as·an·integer:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">310 X.680.·Various·syntaxes·are·allowed·when·defining·a·type·as·an·integer:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">
311 </span><span·class="n">T2</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="2155370894-1">(</span><span·class="o">-</span><span·class="mi">2</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">7</span><span·class="p"·data-group-id="2155370894-1">)</span><span·class="w">311 </span><span·class="n">T2</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="9110154388-1">(</span><span·class="o">-</span><span·class="mi">2</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">7</span><span·class="p"·data-group-id="9110154388-1">)</span><span·class="w">
312 </span><span·class="n">T3</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="2155370894-2">(</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="n">MAX</span><span·class="p"·data-group-id="2155370894-2">)</span><span·class="w">312 </span><span·class="n">T3</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="9110154388-2">(</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="n">MAX</span><span·class="p"·data-group-id="9110154388-2">)</span><span·class="w">
313 </span><span·class="n">T4</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="2155370894-3">(</span><span·class="mi">0</span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="n">MAX</span><span·class="p"·data-group-id="2155370894-3">)</span><span·class="w">313 </span><span·class="n">T4</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="9110154388-3">(</span><span·class="mi">0</span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="n">MAX</span><span·class="p"·data-group-id="9110154388-3">)</span><span·class="w">
314 </span><span·class="n">T5</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="2155370894-4">(</span><span·class="n">MIN</span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="o">-</span><span·class="mi">99</span><span·class="p"·data-group-id="2155370894-4">)</span><span·class="w">314 </span><span·class="n">T5</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="9110154388-4">(</span><span·class="n">MIN</span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="o">-</span><span·class="mi">99</span><span·class="p"·data-group-id="9110154388-4">)</span><span·class="w">
315 </span><span·class="n">T6</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="2155370894-5">{</span><span·class="nf">red</span><span·class="p"·data-group-id="2155370894-6">(</span><span·class="mi">0</span><span·class="p"·data-group-id="2155370894-6">)</span><span·class="p">,</span><span·class="nf">blue</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·332,·SHA:·96da3a50a3dd97c2bbcfb1e3cf15544b8948a4040f67983d61c5c141815ff0b8·...·]-5">}</span></code></pre><p>The·Erlang·representation·of·an·ASN.1·<code·class="inline">INTEGER</code>·is·an·integer·or·an·atom·if·a315 </span><span·class="n">T6</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">INTEGER</span><span·class="w">·</span><span·class="p"·data-group-id="9110154388-5">{</span><span·class="nf">red</span><span·class="p"·data-group-id="9110154388-6">(</span><span·class="mi">0</span><span·class="p"·data-group-id="9110154388-6">)</span><span·class="p">,</span><span·class="nf">blue</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·332,·SHA:·230d4d34fba818753d0b134da78db1dcfd96499b127386ba3677f430b0cda46b·...·]-5">}</span></code></pre><p>The·Erlang·representation·of·an·ASN.1·<code·class="inline">INTEGER</code>·is·an·integer·or·an·atom·if·a
316 <code·class="inline">Named·Number·List</code>·(see·<code·class="inline">T6</code>·in·the·previous·list)·is·specified.</p><p>The·following·is·an·example·of·Erlang·code·that·assigns·values·for·the·types·in316 <code·class="inline">Named·Number·List</code>·(see·<code·class="inline">T6</code>·in·the·previous·list)·is·specified.</p><p>The·following·is·an·example·of·Erlang·code·that·assigns·values·for·the·types·in
317 the·previous·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T1value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">317 the·previous·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T1value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
318 </span><span·class="n">T2value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">318 </span><span·class="n">T2value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">
319 </span><span·class="n">T6value1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">blue</span><span·class="p">,</span><span·class="w">319 </span><span·class="n">T6value1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">blue</span><span·class="p">,</span><span·class="w">
320 </span><span·class="n">T6value2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">320 </span><span·class="n">T6value2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
321 </span><span·class="n">T6value3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">white</span></code></pre><p>These·Erlang·variables·are·now·bound·to·valid·instances·of·ASN.1·defined·types.321 </span><span·class="n">T6value3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">white</span></code></pre><p>These·Erlang·variables·are·now·bound·to·valid·instances·of·ASN.1·defined·types.
322 This·style·of·value·can·be·passed·directly·to·the·encoder·for·transformation322 This·style·of·value·can·be·passed·directly·to·the·encoder·for·transformation
Offset 355, 15 lines modifiedOffset 355, 15 lines modified
355 ····<i·class="ri-link-m"·aria-hidden="true"></i>355 ····<i·class="ri-link-m"·aria-hidden="true"></i>
356 ··</a>356 ··</a>
357 ··<span·class="text">BIT·STRING</span>357 ··<span·class="text">BIT·STRING</span>
358 </h3>358 </h3>
359 <p>The·type·<code·class="inline">BIT·STRING</code>·can·be·used·to·model·information·that·is·made·up·of359 <p>The·type·<code·class="inline">BIT·STRING</code>·can·be·used·to·model·information·that·is·made·up·of
360 arbitrary·length·series·of·bits.·It·is·intended·to·be·used·for·selection·of360 arbitrary·length·series·of·bits.·It·is·intended·to·be·used·for·selection·of
361 flags,·not·for·binary·files.</p><p>In·ASN.1,·<code·class="inline">BIT·STRING</code>·definitions·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Bits1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">BIT</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">361 flags,·not·for·binary·files.</p><p>In·ASN.1,·<code·class="inline">BIT·STRING</code>·definitions·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Bits1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">BIT</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">
362 </span><span·class="n">Bits2</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">BIT</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">·</span><span·class="p"·data-group-id="2466087159-1">{</span><span·class="nf">foo</span><span·class="p"·data-group-id="2466087159-2">(</span><span·class="mi">0</span><span·class="p"·data-group-id="2466087159-2">)</span><span·class="p">,</span><span·class="nf">bar</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·697,·SHA:·5954de4d79211bbc286b028c15c671a58a2301d99ced96ef20ae06540c4d387b·...·]-1">}</span></code></pre><p>The·following·two·notations·are·available·for·representation·of·<code·class="inline">BIT·STRING</code>362 </span><span·class="n">Bits2</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">BIT</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">·</span><span·class="p"·data-group-id="3907711887-1">{</span><span·class="nf">foo</span><span·class="p"·data-group-id="3907711887-2">(</span><span·class="mi">0</span><span·class="p"·data-group-id="3907711887-2">)</span><span·class="p">,</span><span·class="nf">bar</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·697,·SHA:·e4ea30632148e40a9332991d797858ced4a986fb2e939fb60173af2f47f44088·...·]-1">}</span></code></pre><p>The·following·two·notations·are·available·for·representation·of·<code·class="inline">BIT·STRING</code>
363 values·in·Erlang·and·as·input·to·the·encode·functions:</p><ol><li>A·bitstring.·By·default,·a·<code·class="inline">BIT·STRING</code>·with·no·symbolic·names·is·decoded·to363 values·in·Erlang·and·as·input·to·the·encode·functions:</p><ol><li>A·bitstring.·By·default,·a·<code·class="inline">BIT·STRING</code>·with·no·symbolic·names·is·decoded·to
364 an·Erlang·bitstring.</li><li>A·list·of·atoms·corresponding·to·atoms·in·the·<code·class="inline">NamedBitList</code>·in·the364 an·Erlang·bitstring.</li><li>A·list·of·atoms·corresponding·to·atoms·in·the·<code·class="inline">NamedBitList</code>·in·the
365 <code·class="inline">BIT·STRING</code>·definition.·A·<code·class="inline">BIT·STRING</code>·with·symbolic·names·is·always·decoded365 <code·class="inline">BIT·STRING</code>·definition.·A·<code·class="inline">BIT·STRING</code>·with·symbolic·names·is·always·decoded
366 to·the·format·shown·in·the·following·example:</li></ol><pre><code·class="text">Bits1Val1·=·&lt;&lt;0:1,1:1,0:1,1:1,1:1&gt;&gt;,366 to·the·format·shown·in·the·following·example:</li></ol><pre><code·class="text">Bits1Val1·=·&lt;&lt;0:1,1:1,0:1,1:1,1:1&gt;&gt;,
367 Bits2Val1·=·[gnu,punk],367 Bits2Val1·=·[gnu,punk],
368 Bits2Val2·=·&lt;&lt;2#1110:4&gt;&gt;,368 Bits2Val2·=·&lt;&lt;2#1110:4&gt;&gt;,
369 Bits2Val3·=·[bar,gnu,gnome],</code></pre><p><code·class="inline">Bits2Val2</code>·and·<code·class="inline">Bits2Val3</code>·denote·the·same·value.</p><p><code·class="inline">Bits2Val1</code>·is·assigned·symbolic·values.·The·assignment·means·that·the·bits369 Bits2Val3·=·[bar,gnu,gnome],</code></pre><p><code·class="inline">Bits2Val2</code>·and·<code·class="inline">Bits2Val3</code>·denote·the·same·value.</p><p><code·class="inline">Bits2Val1</code>·is·assigned·symbolic·values.·The·assignment·means·that·the·bits
Offset 383, 15 lines modifiedOffset 383, 15 lines modified
383 ····<i·class="ri-link-m"·aria-hidden="true"></i>383 ····<i·class="ri-link-m"·aria-hidden="true"></i>
384 ··</a>384 ··</a>
385 ··<span·class="text">OCTET·STRING</span>385 ··<span·class="text">OCTET·STRING</span>
386 </h3>386 </h3>
387 <p><code·class="inline">OCTET·STRING</code>·is·the·simplest·of·all·ASN.1·types.·<code·class="inline">OCTET·STRING</code>·only·moves·or387 <p><code·class="inline">OCTET·STRING</code>·is·the·simplest·of·all·ASN.1·types.·<code·class="inline">OCTET·STRING</code>·only·moves·or
388 transfers,·for·example,·binary·files·or·other·unstructured·information·complying388 transfers,·for·example,·binary·files·or·other·unstructured·information·complying
389 with·two·rules:·the·bytes·consist·of·octets·and·encoding·is·not·required.</p><p>It·is·possible·to·have·the·following·ASN.1·type·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">O1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">OCTET</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">389 with·two·rules:·the·bytes·consist·of·octets·and·encoding·is·not·required.</p><p>It·is·possible·to·have·the·following·ASN.1·type·definitions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">O1</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">OCTET</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">
390 </span><span·class="n">O2</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">OCTET</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">·</span><span·class="p"·data-group-id="9013019468-1">(</span><span·class="n">SIZE</span><span·class="p"·data-group-id="9013019468-2">(</span><span·class="mi">28</span><span·class="p"·data-group-id="9013019468-2">)</span><span·class="p"·data-group-id="9013019468-1">)</span></code></pre><p>With·the·following·example·assignments·in·Erlang:</p><pre><code·class="text">O1Val·=·&lt;&lt;17,13,19,20,0,0,255,254&gt;&gt;,390 </span><span·class="n">O2</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">OCTET</span><span·class="w">·</span><span·class="n">STRING</span><span·class="w">·</span><span·class="p"·data-group-id="4803328588-1">(</span><span·class="n">SIZE</span><span·class="p"·data-group-id="4803328588-2">(</span><span·class="mi">28</span><span·class="p"·data-group-id="4803328588-2">)</span><span·class="p"·data-group-id="4803328588-1">)</span></code></pre><p>With·the·following·example·assignments·in·Erlang:</p><pre><code·class="text">O1Val·=·&lt;&lt;17,13,19,20,0,0,255,254&gt;&gt;,
391 O2Val·=·&lt;&lt;&quot;must·be·exactly·28·chars....&quot;&gt;&gt;,</code></pre><p>By·default,·an·<code·class="inline">OCTET·STRING</code>·is·always·represented·as·an·Erlang·binary.·If·the391 O2Val·=·&lt;&lt;&quot;must·be·exactly·28·chars....&quot;&gt;&gt;,</code></pre><p>By·default,·an·<code·class="inline">OCTET·STRING</code>·is·always·represented·as·an·Erlang·binary.·If·the
Max diff block lines reached; 119423/166828 bytes (71.58%) of diff not shown.
107 KB
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/asn1_spec.html
    
Offset 161, 45 lines modifiedOffset 161, 45 lines modified
161 </h3>161 </h3>
162 <p>The·runtime·user·interface·for·exclusive·decode·comprises·the·following·two162 <p>The·runtime·user·interface·for·exclusive·decode·comprises·the·following·two
163 functions:</p><ul><li>A·function·for·an·exclusive·decode,·whose·name·the·user·decides·in·the163 functions:</p><ul><li>A·function·for·an·exclusive·decode,·whose·name·the·user·decides·in·the
164 configuration·file</li><li>A·<code·class="inline">decode_part/2</code>·function·generated·by·the·ASN.1·compiler·when164 configuration·file</li><li>A·<code·class="inline">decode_part/2</code>·function·generated·by·the·ASN.1·compiler·when
165 exclusive·decode·is·enabled.·This·function·decodes·the·parts·that165 exclusive·decode·is·enabled.·This·function·decodes·the·parts·that
166 were·left·undecoded·during·the·exclusive·decode.</li></ul><p>Both·functions·are·described·in·the·following.</p><p>If·the·exclusive·decode·function·has,·for·example,·the·name·<code·class="inline">decode_exclusive</code>166 were·left·undecoded·during·the·exclusive·decode.</li></ul><p>Both·functions·are·described·in·the·following.</p><p>If·the·exclusive·decode·function·has,·for·example,·the·name·<code·class="inline">decode_exclusive</code>
167 and·an·ASN.1·encoded·message·<code·class="inline">Bin</code>·is·to·be·exclusive·decoded,·the·call·is·as167 and·an·ASN.1·encoded·message·<code·class="inline">Bin</code>·is·to·be·exclusive·decoded,·the·call·is·as
168 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3010669611-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">ExclMessage</span><span·class="p"·data-group-id="3010669611-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;MyM[·...·truncated·by·diffoscope;·len:·201,·SHA:·fae4cfdce5ed7c839b7eded4dfb6020b884f0bbe3490c5e16eb3f7519b3d4e92·...·]-2">)</span></code></pre><p><a·href=""·id="UndecodedPart"></a>·The·result·<code·class="inline">ExclMessage</code>·has·the·same·structure·as·a168 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1948971303-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">ExclMessage</span><span·class="p"·data-group-id="1948971303-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;MyM[·...·truncated·by·diffoscope;·len:·201,·SHA:·12246e71122e6151bfd07bb2e014ef00eb8be79c21d85a69997943e817c2eafe·...·]-2">)</span></code></pre><p><a·href=""·id="UndecodedPart"></a>·The·result·<code·class="inline">ExclMessage</code>·has·the·same·structure·as·a
169 complete·decode·would·have,·except·for·the·parts·of·the·top·type·that·were·not169 complete·decode·would·have,·except·for·the·parts·of·the·top·type·that·were·not
170 decoded.·The·undecoded·parts·are·on·their·places·in·the·structure·on·format170 decoded.·The·undecoded·parts·are·on·their·places·in·the·structure·on·format
171 <code·class="inline">{TypeKey,UndecodedValue}</code>.</p><p>Each·undecoded·part·that·is·to·be·decoded·must·be·fed·into·function171 <code·class="inline">{TypeKey,UndecodedValue}</code>.</p><p>Each·undecoded·part·that·is·to·be·decoded·must·be·fed·into·function
172 <code·class="inline">decode_part/2</code>·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9012137899-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">PartMessage</span><span·class="p"·data-group-id="9012137899-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;MyM[·...·truncated·by·diffoscope;·len:·285,·SHA:·956893501cafbc25230bb2e1dcccda4e61358f059169ce5f4fa7e5b0c8844b01·...·]-2">)</span></code></pre><p><a·href=""·id="Exclusive-Instruction"></a></p><h3·id="writing-an-exclusive-decode-instruction"·class="section-heading">172 <code·class="inline">decode_part/2</code>·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5597061515-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">PartMessage</span><span·class="p"·data-group-id="5597061515-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;MyM[·...·truncated·by·diffoscope;·len:·285,·SHA:·ec4512e678f1f1f51c7200f93962e24a81faa750998291898e16a70ef37d4005·...·]-2">)</span></code></pre><p><a·href=""·id="Exclusive-Instruction"></a></p><h3·id="writing-an-exclusive-decode-instruction"·class="section-heading">
173 ··<a·href="#writing-an-exclusive-decode-instruction"·class="hover-link">173 ··<a·href="#writing-an-exclusive-decode-instruction"·class="hover-link">
174 ····<i·class="ri-link-m"·aria-hidden="true"></i>174 ····<i·class="ri-link-m"·aria-hidden="true"></i>
175 ··</a>175 ··</a>
176 ··<span·class="text">Writing·an·Exclusive·Decode·Instruction</span>176 ··<span·class="text">Writing·an·Exclusive·Decode·Instruction</span>
177 </h3>177 </h3>
178 <p>This·instruction·is·written·in·the·configuration·file·in·the·following·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">ExclusiveDecodeInstruction</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7942531188-1">{</span><span·class="ss">exclusive_decode</span><span·class="p">,</span><span·class="p"·data-group-id="7942531188-2">{</span><span·class="n">ModuleName</span><span·class="p">,</span><span·class="n">DecodeInstructions</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·75,·SHA:·2cb8466b7e90dc6570029d5ea115a18724115281b321004f7346419fb589894b·...·]-1">}</span><span·class="p">.</span><span·class="w">178 <p>This·instruction·is·written·in·the·configuration·file·in·the·following·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">ExclusiveDecodeInstruction</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0627093540-1">{</span><span·class="ss">exclusive_decode</span><span·class="p">,</span><span·class="p"·data-group-id="0627093540-2">{</span><span·class="n">ModuleName</span><span·class="p">,</span><span·class="n">DecodeInstructions</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·75,·SHA:·3761f085da91a271c06d4cc203d91e182e4ca366f8d084c58ea4720e12542010·...·]-1">}</span><span·class="p">.</span><span·class="w">
  
179 </span><span·class="n">ModuleName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7942531188-3">(</span><span·class="p"·data-group-id="7942531188-3">)</span><span·class="w">179 </span><span·class="n">ModuleName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0627093540-3">(</span><span·class="p"·data-group-id="0627093540-3">)</span><span·class="w">
  
180 </span><span·class="n">DecodeInstructions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7942531188-4">[</span><span·class="n">DecodeInstruction</span><span·class="p"·data-group-id="7942531188-4">]</span><span·class="o">+</span><span·class="w">180 </span><span·class="n">DecodeInstructions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0627093540-4">[</span><span·class="n">DecodeInstruction</span><span·class="p"·data-group-id="0627093540-4">]</span><span·class="o">+</span><span·class="w">
  
181 </span><span·class="n">DecodeInstruction</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7942531188-5">{</span><span·class="n">ExclusiveDecodeFunctionName</span><span·class="p">,</span><span·class="n">TypeList</span><span·class="p"·data-group-id="7942531188-5">}</span><span·class="w">181 </span><span·class="n">DecodeInstruction</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0627093540-5">{</span><span·class="n">ExclusiveDecodeFunctionName</span><span·class="p">,</span><span·class="n">TypeList</span><span·class="p"·data-group-id="0627093540-5">}</span><span·class="w">
  
182 </span><span·class="n">ExclusiveDecodeFunctionName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7942531188-6">(</span><span·class="p"·data-group-id="7942531188-6">)</span><span·class="w">182 </span><span·class="n">ExclusiveDecodeFunctionName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0627093540-6">(</span><span·class="p"·data-group-id="0627093540-6">)</span><span·class="w">
  
183 </span><span·class="n">TypeList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7942531188-7">[</span><span·class="n">TopType</span><span·class="p">,</span><span·class="n">ElementList</span><span·class="p"·data-group-id="7942531188-7">]</span><span·class="w">183 </span><span·class="n">TypeList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0627093540-7">[</span><span·class="n">TopType</span><span·class="p">,</span><span·class="n">ElementList</span><span·class="p"·data-group-id="0627093540-7">]</span><span·class="w">
  
184 </span><span·class="n">ElementList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7942531188-8">[</span><span·class="n">Element</span><span·class="p"·data-group-id="7942531188-8">]</span><span·class="o">+</span><span·class="w">184 </span><span·class="n">ElementList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0627093540-8">[</span><span·class="n">Element</span><span·class="p"·data-group-id="0627093540-8">]</span><span·class="o">+</span><span·class="w">
  
185 </span><span·class="n">Element</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7942531188-9">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="ss">parts</span><span·class="p"·data-group-id="7942531188-9">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">185 </span><span·class="n">Element</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0627093540-9">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="ss">parts</span><span·class="p"·data-group-id="0627093540-9">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
186 ··········</span><span·class="p"·data-group-id="7942531188-10">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="ss">undecoded</span><span·class="p"·data-group-id="7942531188-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">186 ··········</span><span·class="p"·data-group-id="0627093540-10">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="ss">undecoded</span><span·class="p"·data-group-id="0627093540-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
187 ··········</span><span·class="p"·data-group-id="7942531188-11">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="n">ElementList</span><span·class="p"·data-group-id="7942531188-11">}</span><span·class="w">187 ··········</span><span·class="p"·data-group-id="0627093540-11">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="n">ElementList</span><span·class="p"·data-group-id="0627093540-11">}</span><span·class="w">
  
188 </span><span·class="n">TopType</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7942531188-12">(</span><span·class="p"·data-group-id="7942531188-12">)</span><span·class="w">188 </span><span·class="n">TopType</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0627093540-12">(</span><span·class="p"·data-group-id="0627093540-12">)</span><span·class="w">
  
189 </span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7942531188-13">(</span><span·class="p"·data-group-id="7942531188-13">)</span></code></pre><p>The·instruction·must·be·a·valid·Erlang·term·terminated·by·a·dot.</p><p>In·<code·class="inline">TypeList</code>·the·path·from·the·top·type·to·each·undecoded·subcomponent·is189 </span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0627093540-13">(</span><span·class="p"·data-group-id="0627093540-13">)</span></code></pre><p>The·instruction·must·be·a·valid·Erlang·term·terminated·by·a·dot.</p><p>In·<code·class="inline">TypeList</code>·the·path·from·the·top·type·to·each·undecoded·subcomponent·is
190 described.·<code·class="inline">TopType</code>·is·the·name·of·a·top-level·type·in·the·ASN.1·specification.190 described.·<code·class="inline">TopType</code>·is·the·name·of·a·top-level·type·in·the·ASN.1·specification.
191 The·action·for·each·component·in·<code·class="inline">ElementList</code>·is·described·by·one·of:</p><ul><li><code·class="inline">{Name,parts}</code></li><li><code·class="inline">{Name,undecoded}</code></li><li><code·class="inline">{Name,ElementList}</code></li></ul><p>The·use·and·effect·of·the·actions·are·as·follows:</p><ul><li><p><strong><code·class="inline">{Name,undecoded}</code></strong>·-·Leaves·the·element·undecoded.·The·type·of·<code·class="inline">Name</code>·can191 The·action·for·each·component·in·<code·class="inline">ElementList</code>·is·described·by·one·of:</p><ul><li><code·class="inline">{Name,parts}</code></li><li><code·class="inline">{Name,undecoded}</code></li><li><code·class="inline">{Name,ElementList}</code></li></ul><p>The·use·and·effect·of·the·actions·are·as·follows:</p><ul><li><p><strong><code·class="inline">{Name,undecoded}</code></strong>·-·Leaves·the·element·undecoded.·The·type·of·<code·class="inline">Name</code>·can
192 be·any·ASN.1·type.·The·value·of·element·<code·class="inline">Name</code>·is·returned·as·a·tuple·(as192 be·any·ASN.1·type.·The·value·of·element·<code·class="inline">Name</code>·is·returned·as·a·tuple·(as
193 mentioned·in·the·previous·section)·in·the·value·structure·of·the·top·type.</p></li><li><p><strong><code·class="inline">{Name,parts}</code></strong>·-·The·type·of·<code·class="inline">Name</code>·must·be·either·<code·class="inline">SEQUENCE·OF</code>·or193 mentioned·in·the·previous·section)·in·the·value·structure·of·the·top·type.</p></li><li><p><strong><code·class="inline">{Name,parts}</code></strong>·-·The·type·of·<code·class="inline">Name</code>·must·be·either·<code·class="inline">SEQUENCE·OF</code>·or
194 <code·class="inline">SET·OF</code>.·The·action·implies·that·the·different·components·of·<code·class="inline">Name</code>·are·left194 <code·class="inline">SET·OF</code>.·The·action·implies·that·the·different·components·of·<code·class="inline">Name</code>·are·left
195 undecoded.·The·value·of·<code·class="inline">Name</code>·is·returned·as·a·tuple·(as·mentioned·in·the195 undecoded.·The·value·of·<code·class="inline">Name</code>·is·returned·as·a·tuple·(as·mentioned·in·the
196 previous·section)·where·the·second·element·is·a·list·of·binaries.·This·is196 previous·section)·where·the·second·element·is·a·list·of·binaries.·This·is
Offset 257, 86 lines modifiedOffset 257, 86 lines modified
257 ·{'GUI',257 ·{'GUI',
258 ··[{decode_Window_exclusive,258 ··[{decode_Window_exclusive,
259 ····['Window',[{status,[{buttonList,parts},{actions,undecoded}]}]]},259 ····['Window',[{status,[{buttonList,parts},{actions,undecoded}]}]]},
260 ···{decode_Button_exclusive,260 ···{decode_Button_exclusive,
261 ····['Button',[{number,undecoded}]]}]}}.</code></pre><p>The·following·figure·shows·the·bytes·of·a·<code·class="inline">Window:status</code>·message.·The261 ····['Button',[{number,undecoded}]]}]}}.</code></pre><p>The·following·figure·shows·the·bytes·of·a·<code·class="inline">Window:status</code>·message.·The
262 components·<code·class="inline">buttonList</code>·and·<code·class="inline">actions</code>·are·excluded·from·decode.·Only·<code·class="inline">state</code>·and262 components·<code·class="inline">buttonList</code>·and·<code·class="inline">actions</code>·are·excluded·from·decode.·Only·<code·class="inline">state</code>·and
263 <code·class="inline">enabled</code>·are·decoded·when·<code·class="inline">decode__Window_exclusive</code>·is·called.</p><p><img·src="assets/exclusive_Win_But.gif"·alt="Bytes·of·a·Window:status·Message"·title="Bytes·of·a·Window:status·Message"/></p><p>Here·follows·an·example·of·how·the·module.·Note·that·option·<code·class="inline">no_ok_wrapper</code>·is263 <code·class="inline">enabled</code>·are·decoded·when·<code·class="inline">decode__Window_exclusive</code>·is·called.</p><p><img·src="assets/exclusive_Win_But.gif"·alt="Bytes·of·a·Window:status·Message"·title="Bytes·of·a·Window:status·Message"/></p><p>Here·follows·an·example·of·how·the·module.·Note·that·option·<code·class="inline">no_ok_wrapper</code>·is
264 used·to·make·the·example·more·concise.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">asn1ct</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="9235720312-1">(</span><span·class="ss">&#39;GUI&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-2">[</span><span·class="ss">ber</span><span·class="p">,</span><span·class="ss">asn1config</span><span·class[·...·truncated·by·diffoscope;·len:·144,·SHA:·2e11825103088769ed6b9177aa712908c7ab6887dd8c317babb74752485d7e73·...·]-1">)</span><span·class="p">.</span><span·class="w">264 used·to·make·the·example·more·concise.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">asn1ct</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="6457425137-1">(</span><span·class="ss">&#39;GUI&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-2">[</span><span·class="ss">ber</span><span·class="p">,</span><span·class="ss">asn1config</span><span·class[·...·truncated·by·diffoscope;·len:·144,·SHA:·73fce72a57df5a4e097d56185fce9346acbe34fc46d4b533bd3f0612813e0a17·...·]-1">)</span><span·class="p">.</span><span·class="w">
265 </span><span·class="ss">ok</span><span·class="gp·unselectable">265 </span><span·class="ss">ok</span><span·class="gp·unselectable">
266 2&gt;·</span><span·class="nf">rr</span><span·class="p"·data-group-id="9235720312-3">(</span><span·class="ss">&#39;GUI&#39;</span><span·class="p"·data-group-id="9235720312-3">)</span><span·class="p">.</span><span·class="w">266 2&gt;·</span><span·class="nf">rr</span><span·class="p"·data-group-id="6457425137-3">(</span><span·class="ss">&#39;GUI&#39;</span><span·class="p"·data-group-id="6457425137-3">)</span><span·class="p">.</span><span·class="w">
267 </span><span·class="p"·data-group-id="9235720312-4">[</span><span·class="ss">&#39;Action&#39;</span><span·class="p">,</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="9235720312-4">]</span><span·class="gp·unselectable">267 </span><span·class="p"·data-group-id="6457425137-4">[</span><span·class="ss">&#39;Action&#39;</span><span·class="p">,</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="6457425137-4">]</span><span·class="gp·unselectable">
268 3&gt;·</span><span·class="n">ButtonMsg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-5">{</span><span·class="ss">number</span><span·class="o">=</span><span·class="mi">123</span><span·class="p">,</span><span·class="ss">on</span><span·class="o">=</span><span·class="ss">true</span><span·class="p"·data-group-id="9235720312-5">}</span><span·class="p">.</span><span·class="w">268 3&gt;·</span><span·class="n">ButtonMsg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-5">{</span><span·class="ss">number</span><span·class="o">=</span><span·class="mi">123</span><span·class="p">,</span><span·class="ss">on</span><span·class="o">=</span><span·class="ss">true</span><span·class="p"·data-group-id="6457425137-5">}</span><span·class="p">.</span><span·class="w">
269 </span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-6">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">123</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·86,·SHA:·6cbae7fc01574985ed6ea6451043587485343493b95527cf81286142df92c51c·...·]-6">}</span><span·class="gp·unselectable">269 </span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-6">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">123</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·86,·SHA:·aa46d199908a5d207254404ec9e808977a0e5b344f51149ec386e969e580857f·...·]-6">}</span><span·class="gp·unselectable">
270 4&gt;·</span><span·class="n">ButtonBytes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="9235720312-7">(</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ButtonMsg</span><span·class="p"·data-group-id="9235720312-7">)</span><span·class="p">.</span><span·class="w">270 4&gt;·</span><span·class="n">ButtonBytes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="6457425137-7">(</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ButtonMsg</span><span·class="p"·data-group-id="6457425137-7">)</span><span·class="p">.</span><span·class="w">
271 </span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">123</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">271 </span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">123</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
272 5&gt;·</span><span·class="n">ExclusiveMsgButton</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_Button_exclusive</span><span·class="p"·data-group-id="9235720312-8">(</span><span·class="n">ButtonBytes</span><span·class="p"·data-group-id="9235720312-8">)</span><span·class="p">.</span><span·class="w">272 5&gt;·</span><span·class="n">ExclusiveMsgButton</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_Button_exclusive</span><span·class="p"·data-group-id="6457425137-8">(</span><span·class="n">ButtonBytes</span><span·class="p"·data-group-id="6457425137-8">)</span><span·class="p">.</span><span·class="w">
273 </span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-9">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-10">{</span><span·class="ss">&#39;Button_number&#39;</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·223,·SHA:·702ee69d9c7352675e99c81d8069aa5c07bf682a7944f09a3df7d5862d815ae2·...·]-10">}</span><span·class="p">,</span><span·class="w">273 </span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-9">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-10">{</span><span·class="ss">&#39;Button_number&#39;</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·223,·SHA:·2c252a328378a270f07bb69633b5e6559809c2b1d20bb0b78aeedd6d149d6a85·...·]-10">}</span><span·class="p">,</span><span·class="w">
274 ··········</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="9235720312-9">}</span><span·class="gp·unselectable">274 ··········</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="6457425137-9">}</span><span·class="gp·unselectable">
275 6&gt;·</span><span·class="p"·data-group-id="9235720312-11">{</span><span·class="n">UndecKey</span><span·class="p">,</span><span·class="n">UndecBytes</span><span·class="p"·data-group-id="9235720312-11">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ExclusiveMsgButton</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p">.</span><span·class="ss">number</span><span·class="p">.</span><span·class="w">275 6&gt;·</span><span·class="p"·data-group-id="6457425137-11">{</span><span·class="n">UndecKey</span><span·class="p">,</span><span·class="n">UndecBytes</span><span·class="p"·data-group-id="6457425137-11">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ExclusiveMsgButton</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p">.</span><span·class="ss">number</span><span·class="p">.</span><span·class="w">
276 </span><span·class="p"·data-group-id="9235720312-12">{</span><span·class="ss">&#39;Button_number&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">123</span><spa[·...·truncated·by·diffoscope;·len:·68,·SHA:·abaa97f4f5be37b41e80ba27bdb8d618f784f0006df56d22049a29d2aaf02af4·...·]-12">}</span><span·class="gp·unselectable">276 </span><span·class="p"·data-group-id="6457425137-12">{</span><span·class="ss">&#39;Button_number&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">123</span><spa[·...·truncated·by·diffoscope;·len:·68,·SHA:·b2f25834900b4a6d6051732ba977805caf5cc5227c71cf3c021d436d3fc5df7c·...·]-12">}</span><span·class="gp·unselectable">
277 7&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="9235720312-13">(</span><span·class="n">UndecKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UndecBytes</span><span·class="p"·data-group-id="9235720312-13">)</span><span·class="p">.</span><span·class="w">277 7&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="6457425137-13">(</span><span·class="n">UndecKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UndecBytes</span><span·class="p"·data-group-id="6457425137-13">)</span><span·class="p">.</span><span·class="w">
278 </span><span·class="mi">123</span><span·class="gp·unselectable">278 </span><span·class="mi">123</span><span·class="gp·unselectable">
279 8&gt;·</span><span·class="n">WindowMsg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">279 8&gt;·</span><span·class="n">WindowMsg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
280 </span><span·class="p"·data-group-id="9235720312-14">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="p"·data-group-id="9235720312-15">{</span><span·class="ss">&#39;Status&#39;</span><span·class="p">,</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">280 </span><span·class="p"·data-group-id="6457425137-14">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="p"·data-group-id="6457425137-15">{</span><span·class="ss">&#39;Status&#39;</span><span·class="p">,</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">
281 ···</span><span·class="p"·data-group-id="9235720312-16">[</span><span·class="p"·data-group-id="9235720312-17">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9235720[·...·truncated·by·diffoscope;·len:·3,·SHA:·865736a1c30a82dc67aba820360a01b1d9d0da5643234cd07c4d60b06eb530c5·...·]-17">}</span><span·class="p">,</span><span·class="w">281 ···</span><span·class="p"·data-group-id="6457425137-16">[</span><span·class="p"·data-group-id="6457425137-17">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6457425[·...·truncated·by·diffoscope;·len:·3,·SHA:·d80eae6e96d148b3b2abbbc6760077b66c4ea071f847dab573d507a32c4d99a5·...·]-17">}</span><span·class="p">,</span><span·class="w">
282 ····</span><span·class="p"·data-group-id="9235720312-18">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="9235720312-18">}</span><span·class="p">,</span><span·class="w">282 ····</span><span·class="p"·data-group-id="6457425137-18">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="6457425137-18">}</span><span·class="p">,</span><span·class="w">
283 ····</span><span·class="p"·data-group-id="9235720312-19">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9235720312-19">}</span><span·class="p">,</span><span·class="w">283 ····</span><span·class="p"·data-group-id="6457425137-19">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6457425137-19">}</span><span·class="p">,</span><span·class="w">
284 ····</span><span·class="p"·data-group-id="9235720312-20">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9235720312-20">}</span><span·class="p">,</span><span·class="w">284 ····</span><span·class="p"·data-group-id="6457425137-20">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6457425137-20">}</span><span·class="p">,</span><span·class="w">
285 ····</span><span·class="p"·data-group-id="9235720312-21">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="9235720312-21">}</span><span·class="p"·data-group-id="923572[·...·truncated·by·diffoscope;·len:·4,·SHA:·49df9bcdc4525530de9dbd9e677fe9e4897a1fe9b32e42ef1f9da60501739a00·...·]-16">]</span><span·class="p">,</span><span·class="w">285 ····</span><span·class="p"·data-group-id="6457425137-21">{</span><span·class="ss">&#39;Button&#39;</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="6457425137-21">}</span><span·class="p"·data-group-id="645742[·...·truncated·by·diffoscope;·len:·4,·SHA:·d4126e09beeb6dbf189ab07feafea0a0bac85bad37c4b415d378512d0502d66a·...·]-16">]</span><span·class="p">,</span><span·class="w">
286 ···</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">286 ···</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
287 ···</span><span·class="p"·data-group-id="9235720312-22">{</span><span·class="ss">possibleActions</span><span·class="p">,</span><span·class="p"·data-group-id="9235720312-23">[</span><span·class="p"·data-group-id="9235720312-24">{</span><span·class="ss">&#39;Action&#39;</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·559,·SHA:·dfe9563e71c3865b3c4d9a45f631159e990fbcdda33934f8dd9a63fc12b48ea9·...·]-14">}</span><span·class="p">.</span><span·class="w">287 ···</span><span·class="p"·data-group-id="6457425137-22">{</span><span·class="ss">possibleActions</span><span·class="p">,</span><span·class="p"·data-group-id="6457425137-23">[</span><span·class="p"·data-group-id="6457425137-24">{</span><span·class="ss">&#39;Action&#39;</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·559,·SHA:·279fc42e92f3f229d93943e918ee0b6e564a69c8755959023cb7653565949218·...·]-14">}</span><span·class="p">.</span><span·class="w">
288 </span><span·class="p"·data-group-id="9235720312-26">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="9235720312-27">{</span><span·class="ss">state</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">288 </span><span·class="p"·data-group-id="6457425137-26">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="6457425137-27">{</span><span·class="ss">state</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">
289 ········</span><span·class="ss">buttonList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-28">[</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-29">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·203,·SHA:·0b9a4c1b5f1977ab939bfac20268bae5e37d5d76c7e72933f4bcd226bb4a7875·...·]-29">}</span><span·class="p">,</span><span·class="w">289 ········</span><span·class="ss">buttonList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-28">[</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-29">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·203,·SHA:·a37bc8624515a12481c118eda41f171e416bd48bba12b71d0a246f082a8d5c2c·...·]-29">}</span><span·class="p">,</span><span·class="w">
290 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-30">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·e09b80a8cf675758fa8cd66ea7c6ef9ef360039fa055cfec2bca47c7283c190a·...·]-30">}</span><span·class="p">,</span><span·class="w">290 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-30">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·7c0911e133df87fcf456609b5d30e274003e6572e0fd9a6241bdc24455389a6f·...·]-30">}</span><span·class="p">,</span><span·class="w">
291 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-31">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·44efb71d69a3d7aa423d7f43a2b456f05d3ce910c2ba935f8e7a470a9ff3cd32·...·]-31">}</span><span·class="p">,</span><span·class="w">291 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-31">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·726cbeb69e4aaa3f0d448e360971ec4a46b9b046d80df2dd09ca5f4425dc20e0·...·]-31">}</span><span·class="p">,</span><span·class="w">
292 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-32">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·44efb71d69a3d7aa423d7f43a2b456f05d3ce910c2ba935f8e7a470a9ff3cd32·...·]-32">}</span><span·class="p">,</span><span·class="w">292 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-32">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·726cbeb69e4aaa3f0d448e360971ec4a46b9b046d80df2dd09ca5f4425dc20e0·...·]-32">}</span><span·class="p">,</span><span·class="w">
293 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-33">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">7</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·140,·SHA:·37b4a58d58b4151a17b3ca0368bba29aaa9a3556ad63e27ca4049dc91077d06d·...·]-28">]</span><span·class="p">,</span><span·class="w">293 ······················</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-33">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">7</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·140,·SHA:·f2750e1696e27ebc32958eccac6af189ad1e0bcbb104060b455951b6c8c2a910·...·]-28">]</span><span·class="p">,</span><span·class="w">
294 ········</span><span·class="ss">enabled</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">294 ········</span><span·class="ss">enabled</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
295 ········</span><span·class="ss">actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-34">{</span><span·class="ss">possibleActions</span><span·class="p">,</span><span·class="p"·data-group-id="9235720312-35">[</span><span·class="o">#</span><span·class="ss">&#39;Action&#39;</span><span·class="p"·data-group-id="9235720312-36">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">295 ········</span><span·class="ss">actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-34">{</span><span·class="ss">possibleActions</span><span·class="p">,</span><span·class="p"·data-group-id="6457425137-35">[</span><span·class="o">#</span><span·class="ss">&#39;Action&#39;</span><span·class="p"·data-group-id="6457425137-36">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">
296 ··············································</span><span·class="ss">handle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-37">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">17</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·356,·SHA:·bc5f84f6c34c57086306657e90a48f9b6b590c2f0a045c615eb787eed52fa278·...·]-26">}</span><span·class="gp·unselectable">296 ··············································</span><span·class="ss">handle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-37">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">17</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·356,·SHA:·8f29b5325c8a361a363ccfc4d1d008a3fad9342aa7e2c1d5246a4a13056e1bf4·...·]-26">}</span><span·class="gp·unselectable">
297 9&gt;·</span><span·class="n">WindowBytes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="9235720312-38">(</span><span·class="ss">&#39;Window&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">WindowMsg</span><span·class="p"·data-group-id="9235720312-38">)</span><span·class="p">.</span><span·class="w">297 9&gt;·</span><span·class="n">WindowBytes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="6457425137-38">(</span><span·class="ss">&#39;Window&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">WindowMsg</span><span·class="p"·data-group-id="6457425137-38">)</span><span·class="p">.</span><span·class="w">
298 </span><span·class="p">&lt;&lt;</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">35</span><span·class="p">,</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">40</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">298 </span><span·class="p">&lt;&lt;</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">35</span><span·class="p">,</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">40</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">
299 ··</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">299 ··</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
300 10&gt;·</span><span·class="p"·data-group-id="9235720312-39">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="9235720312-40">{</span><span·class="ss">buttonList</span><span·class="o">=</span><sp[·...·truncated·by·diffoscope;·len:·300,·SHA:·4cb26a76e408155e5a3dc1f6e2a9b9086c9ff744087834a852314121f0faf7b5·...·]-39">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">300 10&gt;·</span><span·class="p"·data-group-id="6457425137-39">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="6457425137-40">{</span><span·class="ss">buttonList</span><span·class="o">=</span><sp[·...·truncated·by·diffoscope;·len:·300,·SHA:·c9fbf4267c0e8f28824f2e7a64c27fb7f9663fdd363f3574a32dbd0f146120c1·...·]-39">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
301 </span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_Window_exclusive</span><span·class="p"·data-group-id="9235720312-42">(</span><span·class="n">WindowBytes</span><span·class="p"·data-group-id="9235720312-42">)</span><span·class="p">.</span><span·class="w">301 </span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_Window_exclusive</span><span·class="p"·data-group-id="6457425137-42">(</span><span·class="n">WindowBytes</span><span·class="p"·data-group-id="6457425137-42">)</span><span·class="p">.</span><span·class="w">
302 </span><span·class="p"·data-group-id="9235720312-43">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="9235720312-44">{</span><span·class="ss">state</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">302 </span><span·class="p"·data-group-id="6457425137-43">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="6457425137-44">{</span><span·class="ss">state</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">
303 ··················</span><span·class="ss">buttonList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-45">{</span><span·class="ss">&#39;Status_buttonList&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="9235720312-46">[</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">303 ··················</span><span·class="ss">buttonList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-45">{</span><span·class="ss">&#39;Status_buttonList&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="6457425137-46">[</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
304 ·······················································</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">304 ·······················································</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
305 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">305 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
306 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">306 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
307 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">307 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
308 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9235720312-46">]</span><span·class="p"·data-group-id="9235720312-45">}</span><span·class="p">,</span><span·class="w">308 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6457425137-46">]</span><span·class="p"·data-group-id="6457425137-45">}</span><span·class="p">,</span><span·class="w">
309 ··················</span><span·class="ss">enabled</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">309 ··················</span><span·class="ss">enabled</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
310 ··················</span><span·class="ss">actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-47">{</span><span·class="ss">&#39;Status_actions&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">163</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">310 ··················</span><span·class="ss">actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-47">{</span><span·class="ss">&#39;Status_actions&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">163</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">
311 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="w">311 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="w">
312 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9235720312-47">}</span><span·class="p"·data-group-id="9235720312-44">}</span><span·class="p"·data-group-id="9235720312-43">}</span><span·class="gp·unselectable">312 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6457425137-47">}</span><span·class="p"·data-group-id="6457425137-44">}</span><span·class="p"·data-group-id="6457425137-43">}</span><span·class="gp·unselectable">
313 11&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="9235720312-48">(</span><span·class="n">UndecWindowKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UndecWindowParts</span><span·class="p"·data-group-id="9235720312-48">)</span><span·class="p">.</span><span·class="w">313 11&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="6457425137-48">(</span><span·class="n">UndecWindowKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UndecWindowParts</span><span·class="p"·data-group-id="6457425137-48">)</span><span·class="p">.</span><span·class="w">
314 </span><span·class="p"·data-group-id="9235720312-49">[</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-50">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·203,·SHA:·0b9a4c1b5f1977ab939bfac20268bae5e37d5d76c7e72933f4bcd226bb4a7875·...·]-50">}</span><span·class="p">,</span><span·class="w">314 </span><span·class="p"·data-group-id="6457425137-49">[</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-50">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·203,·SHA:·a37bc8624515a12481c118eda41f171e416bd48bba12b71d0a246f082a8d5c2c·...·]-50">}</span><span·class="p">,</span><span·class="w">
315 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-51">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·e09b80a8cf675758fa8cd66ea7c6ef9ef360039fa055cfec2bca47c7283c190a·...·]-51">}</span><span·class="p">,</span><span·class="w">315 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-51">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·7c0911e133df87fcf456609b5d30e274003e6572e0fd9a6241bdc24455389a6f·...·]-51">}</span><span·class="p">,</span><span·class="w">
316 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-52">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·44efb71d69a3d7aa423d7f43a2b456f05d3ce910c2ba935f8e7a470a9ff3cd32·...·]-52">}</span><span·class="p">,</span><span·class="w">316 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-52">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·726cbeb69e4aaa3f0d448e360971ec4a46b9b046d80df2dd09ca5f4425dc20e0·...·]-52">}</span><span·class="p">,</span><span·class="w">
317 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-53">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·44efb71d69a3d7aa423d7f43a2b456f05d3ce910c2ba935f8e7a470a9ff3cd32·...·]-53">}</span><span·class="p">,</span><span·class="w">317 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-53">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·726cbeb69e4aaa3f0d448e360971ec4a46b9b046d80df2dd09ca5f4425dc20e0·...·]-53">}</span><span·class="p">,</span><span·class="w">
318 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-54">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">7</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·140,·SHA:·2263458a1e149100cb7f5cd682f91cf1bb81cc044303145d0c487e64ed4de1bc·...·]-49">]</span><span·class="gp·unselectable">318 ·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-54">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">7</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·140,·SHA:·05a2ef9e9e784929e5d3633778961ff0467019bab10e7287dd82525ed2993b6f·...·]-49">]</span><span·class="gp·unselectable">
319 12&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="9235720312-55">(</span><span·class="n">UndecWindowKey</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">hd</span><span·class="p"·data-group-id="9235720312-56">(</span><span·class="n">UndecWindowParts</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·bec0108468fcfebe7eed773856ec53e757e08b13a1a69c79a8355e1bf9ff6c4b·...·]-55">)</span><span·class="p">.</span><span·class="w">319 12&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="6457425137-55">(</span><span·class="n">UndecWindowKey</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">hd</span><span·class="p"·data-group-id="6457425137-56">(</span><span·class="n">UndecWindowParts</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·8bb0bdd16607db59b62dcf945f57f226afe8a0461f4c84daa152a07e6e8af810·...·]-55">)</span><span·class="p">.</span><span·class="w">
320 </span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-57">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·44efb71d69a3d7aa423d7f43a2b456f05d3ce910c2ba935f8e7a470a9ff3cd32·...·]-57">}</span><span·class="gp·unselectable">320 </span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-57">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·85,·SHA:·726cbeb69e4aaa3f0d448e360971ec4a46b9b046d80df2dd09ca5f4425dc20e0·...·]-57">}</span><span·class="gp·unselectable">
321 13&gt;·</span><span·class="p"·data-group-id="9235720312-58">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="9235720312-59">{</span><span·class="ss">actions</span><span·class="o">=</span><span·[·...·truncated·by·diffoscope;·len:·518,·SHA:·2de8e2e7acf3344afad9594d95810ad54156f3cdb3e654785dde081ca1016448·...·]-61">)</span><span·class="p">.</span><span·class="w">321 13&gt;·</span><span·class="p"·data-group-id="6457425137-58">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="6457425137-59">{</span><span·class="ss">actions</span><span·class="o">=</span><span·[·...·truncated·by·diffoscope;·len:·518,·SHA:·e5c00402c7e177cbe6328ca5bf7e3c32a6f4fa7dbd429a61970d9c998640f40f·...·]-61">)</span><span·class="p">.</span><span·class="w">
322 </span><span·class="p"·data-group-id="9235720312-62">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="9235720312-63">{</span><span·class="ss">state</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">322 </span><span·class="p"·data-group-id="6457425137-62">{</span><span·class="ss">status</span><span·class="p">,</span><span·class="o">#</span><span·class="ss">&#39;Status&#39;</span><span·class="p"·data-group-id="6457425137-63">{</span><span·class="ss">state</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">35</span><span·class="p">,</span><span·class="w">
323 ··················</span><span·class="ss">buttonList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-64">{</span><span·class="ss">&#39;Status_buttonList&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="9235720312-65">[</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">323 ··················</span><span·class="ss">buttonList</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-64">{</span><span·class="ss">&#39;Status_buttonList&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="6457425137-65">[</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
324 ·······················································</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">324 ·······················································</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
325 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">325 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
326 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">326 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
327 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">327 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
328 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9235720312-65">]</span><span·class="p"·data-group-id="9235720312-64">}</span><span·class="p">,</span><span·class="w">328 ·····················································</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6457425137-65">]</span><span·class="p"·data-group-id="6457425137-64">}</span><span·class="p">,</span><span·class="w">
329 ··················</span><span·class="ss">enabled</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">329 ··················</span><span·class="ss">enabled</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
330 ··················</span><span·class="ss">actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9235720312-66">{</span><span·class="ss">&#39;Status_actions&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">163</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">330 ··················</span><span·class="ss">actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6457425137-66">{</span><span·class="ss">&#39;Status_actions&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">163</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">
331 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="w">331 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">161</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">17</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="w">
332 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9235720312-66">}</span><span·class="p"·data-group-id="9235720312-63">}</span><span·class="p"·data-group-id="9235720312-62">}</span><span·class="gp·unselectable">332 ················································</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6457425137-66">}</span><span·class="p"·data-group-id="6457425137-63">}</span><span·class="p"·data-group-id="6457425137-62">}</span><span·class="gp·unselectable">
333 14&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="9235720312-67">(</span><span·class="n">ChoiceKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChoiceUndec</span><span·class="p"·data-group-id="9235720312-67">)</span><span·class="p">.</span><span·class="w">333 14&gt;·</span><span·class="nc">&#39;GUI&#39;</span><span·class="p">:</span><span·class="nf">decode_part</span><span·class="p"·data-group-id="6457425137-67">(</span><span·class="n">ChoiceKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChoiceUndec</span><span·class="p"·data-group-id="6457425137-67">)</span><span·class="p">.</span><span·class="w">
334 </span><span·class="p"·data-group-id="9235720312-68">{</span><span·class="ss">possibleActions</span><span·class="p">,</span><span·class="p"·data-group-id="9235720312-69">[</span><span·class="o">#</span><span·class="ss">&#39;Action&#39;</span><span·class="p"·data-group-id="9235720312-70">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">334 </span><span·class="p"·data-group-id="6457425137-68">{</span><span·class="ss">possibleActions</span><span·class="p">,</span><span·class="p"·data-group-id="6457425137-69">[</span><span·class="o">#</span><span·class="ss">&#39;Action&#39;</span><span·class="p"·data-group-id="6457425137-70">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">,</span><span·class="w">
335 ····························</span><span·class="ss">handle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="9235720312-71">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">17</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·248,·SHA:·b018f82ef37d91fe0e29896760c10e983b248e9c352bdcbf9ebef2d20f6689f0·...·]-68">}</span></code></pre><h2·id="selective-decode"·class="section-heading">335 ····························</span><span·class="ss">handle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Button&#39;</span><span·class="p"·data-group-id="6457425137-71">{</span><span·class="ss">number</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">17</span><span·class="p">,</span><span·class="ss">on</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·248,·SHA:·23af4a33bb1b2c2317fcbb2859fc49c272ba8c403248c83df947c5a48ed2ba0e·...·]-68">}</span></code></pre><h2·id="selective-decode"·class="section-heading">
336 ··<a·href="#selective-decode"·class="hover-link">336 ··<a·href="#selective-decode"·class="hover-link">
337 ····<i·class="ri-link-m"·aria-hidden="true"></i>337 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Max diff block lines reached; 34537/109181 bytes (31.63%) of diff not shown.
6.4 KB
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/asn1ct.html
    
Offset 491, 17 lines modifiedOffset 491, 17 lines modified
  
491 <p>Performs·a·test·of·encode·and·decode·of·types·in·<code·class="inline">Module</code>.</p><p>The·generated·functions·are·called·by·this·function.·This·function·is491 <p>Performs·a·test·of·encode·and·decode·of·types·in·<code·class="inline">Module</code>.</p><p>The·generated·functions·are·called·by·this·function.·This·function·is
492 useful·for·testing·to·ensure·that·the·generated·encode·and·decode492 useful·for·testing·to·ensure·that·the·generated·encode·and·decode
493 functions·as·well·as·the·general·runtime·support·work·as·expected.</p><blockquote><h4·class="info">Note</h4><p>Currently,·the·<code·class="inline">test</code>·functions·have·many·limitations.·Essentially,·they·will493 functions·as·well·as·the·general·runtime·support·work·as·expected.</p><blockquote><h4·class="info">Note</h4><p>Currently,·the·<code·class="inline">test</code>·functions·have·many·limitations.·Essentially,·they·will
494 mostly·work·for·old·specifications·based·on·the·1997·standard·for·ASN.1,·but494 mostly·work·for·old·specifications·based·on·the·1997·standard·for·ASN.1,·but
495 not·for·most·modern-style·applications.·Another·limitation·is·that·the·<code·class="inline">test</code>495 not·for·most·modern-style·applications.·Another·limitation·is·that·the·<code·class="inline">test</code>
496 functions·may·not·work·if·options·that·change·code·generations·strategies·such496 functions·may·not·work·if·options·that·change·code·generations·strategies·such
497 as·the·options·<code·class="inline">macro_name_prefix</code>·and·<code·class="inline">record_name_prefix</code>·have·been·used.</p></blockquote><ul><li><a·href="#test/1"><code·class="inline">test/1</code></a>·iterates·over·all·types·in·<code·class="inline">Module</code>.</li><li><a·href="#test/2"><code·class="inline">test/2</code></a>·tests·type·<code·class="inline">Type</code>·with·a·random·value.</li><li><a·href="#test/3"><code·class="inline">test/3</code></a>·tests·type·<code·class="inline">Type</code>·with·<code·class="inline">Value</code>.</li></ul><p>Schematically,·the·following·occurs·for·each·type·in·the·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4121823263-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="4121823263-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·274,·SHA:·b29c6dc72855f2dad9e78e60970b0aa5bc445c77c95dae6d419f37dc4b56ae70·...·]-2">)</span><span·class="p">,</span><span·class="w">497 as·the·options·<code·class="inline">macro_name_prefix</code>·and·<code·class="inline">record_name_prefix</code>·have·been·used.</p></blockquote><ul><li><a·href="#test/1"><code·class="inline">test/1</code></a>·iterates·over·all·types·in·<code·class="inline">Module</code>.</li><li><a·href="#test/2"><code·class="inline">test/2</code></a>·tests·type·<code·class="inline">Type</code>·with·a·random·value.</li><li><a·href="#test/3"><code·class="inline">test/3</code></a>·tests·type·<code·class="inline">Type</code>·with·<code·class="inline">Value</code>.</li></ul><p>Schematically,·the·following·occurs·for·each·type·in·the·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6945364997-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="6945364997-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·274,·SHA:·d4acfd7b5597b52dbf4e6f8029885e61030ab02a9cf6bbce8d8e55c8e9c063a2·...·]-2">)</span><span·class="p">,</span><span·class="w">
498 </span><span·class="p"·data-group-id="4121823263-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bytes</span><span·class="p"·data-group-id="4121823263-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·273,·SHA:·373c975fd261d583320e4e69ee86d18136da93f467f9949a6c766bc0eef8b550·...·]-4">)</span><span·class="p">,</span><span·class="w">498 </span><span·class="p"·data-group-id="6945364997-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bytes</span><span·class="p"·data-group-id="6945364997-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·273,·SHA:·71deac6d351d85a6225ccc35cf6aa10efdf28a4066ac845f9d6ffe75e61c940b·...·]-4">)</span><span·class="p">,</span><span·class="w">
499 </span><span·class="p"·data-group-id="4121823263-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="4121823263-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·273,·SHA:·2ba3a6f32fc1194fbe0a0197832500fa1384be48d47869d556a3c018886dcc6e·...·]-6">)</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">test</code>·functions·use·the·<code·class="inline">*.asn1db</code>·files·for·all·included·modules.·If·they499 </span><span·class="p"·data-group-id="6945364997-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="6945364997-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·273,·SHA:·36062e7e862c05cc4eb6e261546b44664502f24650807e95b7ddbcaa545b0915·...·]-6">)</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">test</code>·functions·use·the·<code·class="inline">*.asn1db</code>·files·for·all·included·modules.·If·they
500 are·located·in·a·different·directory·than·the·current·working·directory,·use·the500 are·located·in·a·different·directory·than·the·current·working·directory,·use·the
501 <code·class="inline">include</code>·option·to·add·paths.·This·is·only·needed·when·automatically·generating501 <code·class="inline">include</code>·option·to·add·paths.·This·is·only·needed·when·automatically·generating
502 values.·For·static·values·using·<code·class="inline">Value</code>·no·options·are·needed.</p>502 values.·For·static·values·using·<code·class="inline">Value</code>·no·options·are·needed.</p>
503 ··</section>503 ··</section>
504 </section>504 </section>
505 <section·class="detail"·id="value/2">505 <section·class="detail"·id="value/2">
  
622 B
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-614FD7B8.js"></script>124 <script·src="dist/search_data-29151339.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
10.3 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/basics_chapter.html
    
Offset 211, 23 lines modifiedOffset 211, 23 lines modified
211 <a·href="write_test_chapter.html#intro">Writing·Test·Suites</a>.</p><p>A·test·case·is·considered·successful·if·it·returns·to·the·caller,·no·matter·what211 <a·href="write_test_chapter.html#intro">Writing·Test·Suites</a>.</p><p>A·test·case·is·considered·successful·if·it·returns·to·the·caller,·no·matter·what
212 the·returned·value·is.·However,·a·few·return·values·have·special·meaning·as212 the·returned·value·is.·However,·a·few·return·values·have·special·meaning·as
213 follows:</p><ul><li><code·class="inline">{skip,Reason}</code>·indicates·that·the·test·case·is·skipped.</li><li><code·class="inline">{comment,Comment}</code>·prints·a·comment·in·the·log·for·the·test·case.</li><li><code·class="inline">{save_config,Config}</code>·makes·the·<code·class="inline">Common·Test</code>·test·server·pass·<code·class="inline">Config</code>·to213 follows:</p><ul><li><code·class="inline">{skip,Reason}</code>·indicates·that·the·test·case·is·skipped.</li><li><code·class="inline">{comment,Comment}</code>·prints·a·comment·in·the·log·for·the·test·case.</li><li><code·class="inline">{save_config,Config}</code>·makes·the·<code·class="inline">Common·Test</code>·test·server·pass·<code·class="inline">Config</code>·to
214 the·next·test·case.</li></ul><p>A·test·case·failure·is·specified·as·a·runtime·error·(a·crash),·no·matter·what214 the·next·test·case.</li></ul><p>A·test·case·failure·is·specified·as·a·runtime·error·(a·crash),·no·matter·what
215 the·reason·for·termination·is.·If·you·use·Erlang·pattern·matching·effectively,215 the·reason·for·termination·is.·If·you·use·Erlang·pattern·matching·effectively,
216 you·can·take·advantage·of·this·property.·The·result·is·concise·and·readable·test216 you·can·take·advantage·of·this·property.·The·result·is·concise·and·readable·test
217 case·functions·that·look·much·more·like·scripts·than·actual·programs.·A·simple217 case·functions·that·look·much·more·like·scripts·than·actual·programs.·A·simple
218 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">session</span><span·class="p"·data-group-id="9913958844-1">(</span><span·class="p">_</span><span·class="n">Config</span><span·class="p"·data-group-id="9913958844-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">218 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">session</span><span·class="p"·data-group-id="1964582823-1">(</span><span·class="p">_</span><span·class="n">Config</span><span·class="p"·data-group-id="1964582823-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
219 ····</span><span·class="p"·data-group-id="9913958844-2">{</span><span·class="ss">started</span><span·class="p">,</span><span·class="n">ServerId</span><span·class="p"·data-group-id="9913958844-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_ser[·...·truncated·by·diffoscope;·len:·157,·SHA:·4121b1c3f8d2a72f998c5a828a6cf25c1aa95c9a5c3f3eb7f69664b7a70491f6·...·]-3">)</span><span·class="p">,</span><span·class="w">219 ····</span><span·class="p"·data-group-id="1964582823-2">{</span><span·class="ss">started</span><span·class="p">,</span><span·class="n">ServerId</span><span·class="p"·data-group-id="1964582823-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_ser[·...·truncated·by·diffoscope;·len:·157,·SHA:·8b68398bb8e68de0f3811bb497a373103792118bfec5371763acdc7e8c7a9981·...·]-3">)</span><span·class="p">,</span><span·class="w">
220 ····</span><span·class="p"·data-group-id="9913958844-4">{</span><span·class="ss">clients</span><span·class="p">,</span><span·class="p"·data-group-id="9913958844-5">[</span><span·class="p"·data-group-id="9913958844-5">]</span><span·class="p"·data-group-id="9913958844-4">}</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·269,·SHA:·5b71034613cbdca31fc4f2641491bc719afb5345b9d5622af587997cb9575c5d·...·]-6">)</span><span·class="p">,</span><span·class="w">220 ····</span><span·class="p"·data-group-id="1964582823-4">{</span><span·class="ss">clients</span><span·class="p">,</span><span·class="p"·data-group-id="1964582823-5">[</span><span·class="p"·data-group-id="1964582823-5">]</span><span·class="p"·data-group-id="1964582823-4">}</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·269,·SHA:·8c6c82b80d924f9450ed0ea09daf949ae7d249576739a643f18156d939b89bc6·...·]-6">)</span><span·class="p">,</span><span·class="w">
221 ····</span><span·class="n">MyId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="9913958844-7">(</span><span·class="p"·data-group-id="9913958844-7">)</span><span·class="p">,</span><span·class="w">221 ····</span><span·class="n">MyId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1964582823-7">(</span><span·class="p"·data-group-id="1964582823-7">)</span><span·class="p">,</span><span·class="w">
222 ····</span><span·class="ss">connected</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="9913958844-8">(</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyId</span><span·class="p"·data-group-id="9913958844-8">)</span><span·class="p">,</span><span·class="w">222 ····</span><span·class="ss">connected</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="1964582823-8">(</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyId</span><span·class="p"·data-group-id="1964582823-8">)</span><span·class="p">,</span><span·class="w">
223 ····</span><span·class="p"·data-group-id="9913958844-9">{</span><span·class="ss">clients</span><span·class="p">,</span><span·class="p"·data-group-id="9913958844-10">[</span><span·class="n">MyId</span><span·class="p"·data-group-id="9913958844-10">]</span><span·class="p"·data-group-id="9913958844-9"[·...·truncated·by·diffoscope;·len:·299,·SHA:·a8a28d7e095bfbc38a1f0bd91ce3213ece3bb3c15082eb8fd501054f84b04434·...·]-11">)</span><span·class="p">,</span><span·class="w">223 ····</span><span·class="p"·data-group-id="1964582823-9">{</span><span·class="ss">clients</span><span·class="p">,</span><span·class="p"·data-group-id="1964582823-10">[</span><span·class="n">MyId</span><span·class="p"·data-group-id="1964582823-10">]</span><span·class="p"·data-group-id="1964582823-9"[·...·truncated·by·diffoscope;·len:·299,·SHA:·567c541983e9c250381d63634be6fe478087969cde227e34ba57c5b14623dd46·...·]-11">)</span><span·class="p">,</span><span·class="w">
224 ····</span><span·class="ss">disconnected</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="9913958844-12">(</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyId</span><span·class="p"·data-group-id="9913958844-12">)</span><span·class="p">,</span><span·class="w">224 ····</span><span·class="ss">disconnected</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="1964582823-12">(</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyId</span><span·class="p"·data-group-id="1964582823-12">)</span><span·class="p">,</span><span·class="w">
225 ····</span><span·class="p"·data-group-id="9913958844-13">{</span><span·class="ss">clients</span><span·class="p">,</span><span·class="p"·data-group-id="9913958844-14">[</span><span·class="p"·data-group-id="9913958844-14">]</span><span·class="p"·data-group-id="9913958844-13">}</span><span·class="w">[·...·truncated·by·diffoscope;·len:·274,·SHA:·f8032ebb7ebdff9659b3e3694b540e8d46126e4665095e0dba7815a257ad8dfd·...·]-15">)</span><span·class="p">,</span><span·class="w">225 ····</span><span·class="p"·data-group-id="1964582823-13">{</span><span·class="ss">clients</span><span·class="p">,</span><span·class="p"·data-group-id="1964582823-14">[</span><span·class="p"·data-group-id="1964582823-14">]</span><span·class="p"·data-group-id="1964582823-13">}</span><span·class="w">[·...·truncated·by·diffoscope;·len:·274,·SHA:·f2dbc231ba1ceb75ad4fd303f117b7b86b66d607287a1359678e36556860c578·...·]-15">)</span><span·class="p">,</span><span·class="w">
226 ····</span><span·class="ss">stopped</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="9913958844-16">(</span><span·class="n">ServerId</span><span·class="p"·data-group-id="9913958844-16">)</span><span·class="p">.</span></code></pre><p>As·a·test·suite·runs,·all·information·(including·output·to·<code·class="inline">stdout</code>)·is·recorded226 ····</span><span·class="ss">stopped</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="1964582823-16">(</span><span·class="n">ServerId</span><span·class="p"·data-group-id="1964582823-16">)</span><span·class="p">.</span></code></pre><p>As·a·test·suite·runs,·all·information·(including·output·to·<code·class="inline">stdout</code>)·is·recorded
227 in·many·different·log·files.·A·minimum·of·information·is·displayed·in·the·user227 in·many·different·log·files.·A·minimum·of·information·is·displayed·in·the·user
228 console·(only·start·and·stop·information,·plus·a·note·for·each·failed·test228 console·(only·start·and·stop·information,·plus·a·note·for·each·failed·test
229 case).</p><p>The·result·from·each·test·case·is·recorded·in·a·dedicated·HTML·log·file,·created229 case).</p><p>The·result·from·each·test·case·is·recorded·in·a·dedicated·HTML·log·file,·created
230 for·the·particular·test·run.·An·overview·page·displays·each·test·case230 for·the·particular·test·run.·An·overview·page·displays·each·test·case
231 represented·by·a·table·row·showing·total·execution·time,·if·the·case·was231 represented·by·a·table·row·showing·total·execution·time,·if·the·case·was
232 successful,·failed,·or·skipped,·plus·an·optional·user·comment.·For·a·failed·test232 successful,·failed,·or·skipped,·plus·an·optional·user·comment.·For·a·failed·test
233 case,·the·reason·for·termination·is·also·printed·in·the·comment·field.·The233 case,·the·reason·for·termination·is·also·printed·in·the·comment·field.·The
988 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/common_test.epub
7.43 KB
zipinfo {}
Max HTML report size reached
123 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
109 KB
OEBPS/write_test_chapter.xhtml
Max HTML report size reached
8.3 KB
OEBPS/unix_telnet.xhtml
Max HTML report size reached
199 KB
OEBPS/run_test_chapter.xhtml
Max HTML report size reached
25.0 KB
OEBPS/getting_started_chapter.xhtml
Max HTML report size reached
77.3 KB
OEBPS/example_chapter.xhtml
Max HTML report size reached
10.1 KB
OEBPS/event_handler_chapter.xhtml
Max HTML report size reached
55.8 KB
OEBPS/dependencies_chapter.xhtml
Max HTML report size reached
32.0 KB
OEBPS/ct_telnet.xhtml
Max HTML report size reached
5.65 KB
OEBPS/ct_ssh.xhtml
Max HTML report size reached
9.73 KB
OEBPS/ct_snmp.xhtml
Max HTML report size reached
4.48 KB
OEBPS/ct_run_cmd.xhtml
Max HTML report size reached
21.6 KB
OEBPS/ct_property_test_chapter.xhtml
Max HTML report size reached
23.5 KB
OEBPS/ct_property_test.xhtml
Max HTML report size reached
27.4 KB
OEBPS/ct_netconfc.xhtml
Max HTML report size reached
34.2 KB
OEBPS/ct_master_chapter.xhtml
Max HTML report size reached
2.2 KB
OEBPS/ct_master.xhtml
    
Offset 321, 15 lines modifiedOffset 321, 15 lines modified
321 ······<div·class="specs">321 ······<div·class="specs">
  
322 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_event_mgr_ref()·->·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:atom/0">atom</a>().</pre>322 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_event_mgr_ref()·->·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:atom/0">atom</a>().</pre>
  
323 ······</div>323 ······</div>
  
324 <p>Gets·a·reference·to·the·<code·class="inline">Common·Test</code>·master·event·manager.·The·reference·can·be324 <p>Gets·a·reference·to·the·<code·class="inline">Common·Test</code>·master·event·manager.·The·reference·can·be
325 used·to,·for·example,·add·a·user-specific·event·handler·while·tests·are·running.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nc">gen_event</samp><samp·class="p">:</samp><samp·class="nf">add_handler</samp><samp·class="p"·data-group-id="3937654724-1">(</samp><samp·class="nc">ct_master</samp><samp·class="p">:</samp><samp·class="nf">get_event_mgr_ref</samp><samp·class="p"·data-group-id="3937654724-2">(</samp><samp·class="p"·data-group-id="3937654724-2">)</samp><samp·class="p">,</samp><samp·[·...·truncated·by·diffoscope;·len:·244,·SHA:·550d4e3a92d3d3179772d3a028183132503a521084e6c798c101e5f42b526851·...·]-1">)</samp></code></pre>325 used·to,·for·example,·add·a·user-specific·event·handler·while·tests·are·running.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nc">gen_event</samp><samp·class="p">:</samp><samp·class="nf">add_handler</samp><samp·class="p"·data-group-id="1986608329-1">(</samp><samp·class="nc">ct_master</samp><samp·class="p">:</samp><samp·class="nf">get_event_mgr_ref</samp><samp·class="p"·data-group-id="1986608329-2">(</samp><samp·class="p"·data-group-id="1986608329-2">)</samp><samp·class="p">,</samp><samp·[·...·truncated·by·diffoscope;·len:·244,·SHA:·c0983f77563a5882c2ddca59f69043419b22d1619d711f5c6eb76d7420869441·...·]-1">)</samp></code></pre>
326 ··</section>326 ··</section>
327 </section>327 </section>
328 <section·class="detail"·id="progress/0">328 <section·class="detail"·id="progress/0">
  
329 ··<div·class="detail-header">329 ··<div·class="detail-header">
330 ····<a·href="#progress/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">330 ····<a·href="#progress/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
331 ······<i·class="ri-link-m"·aria-hidden="true"></i>331 ······<i·class="ri-link-m"·aria-hidden="true"></i>
59.9 KB
OEBPS/ct_hooks_chapter.xhtml
Max HTML report size reached
4.63 KB
OEBPS/ct_ftp.xhtml
Max HTML report size reached
39.5 KB
OEBPS/ct.xhtml
Max HTML report size reached
15.2 KB
OEBPS/cover_chapter.xhtml
Max HTML report size reached
2.53 KB
OEBPS/content.opf
2.5 KB
OEBPS/content.opf
Max HTML report size reached
80.1 KB
OEBPS/config_file_chapter.xhtml
Max HTML report size reached
10.2 KB
OEBPS/basics_chapter.xhtml
Max HTML report size reached
80.2 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/config_file_chapter.html
    
Offset 138, 16 lines modifiedOffset 138, 16 lines modified
138 properties·without·modifying·the·test·suites·using·the·data.·Examples·of138 properties·without·modifying·the·test·suites·using·the·data.·Examples·of
139 configuration·data·follows:</p><ul><li>Addresses·to·the·test·plant·or·other·instruments</li><li>User·login·information</li><li>Names·of·files·needed·by·the·test</li><li>Names·of·programs·to·be·executed·during·the·test</li><li>Any·other·variable·needed·by·the·test</li></ul><h2·id="syntax"·class="section-heading">139 configuration·data·follows:</p><ul><li>Addresses·to·the·test·plant·or·other·instruments</li><li>User·login·information</li><li>Names·of·files·needed·by·the·test</li><li>Names·of·programs·to·be·executed·during·the·test</li><li>Any·other·variable·needed·by·the·test</li></ul><h2·id="syntax"·class="section-heading">
140 ··<a·href="#syntax"·class="hover-link">140 ··<a·href="#syntax"·class="hover-link">
141 ····<i·class="ri-link-m"·aria-hidden="true"></i>141 ····<i·class="ri-link-m"·aria-hidden="true"></i>
142 ··</a>142 ··</a>
143 ··<span·class="text">Syntax</span>143 ··<span·class="text">Syntax</span>
144 </h2>144 </h2>
145 <p>A·configuration·file·can·contain·any·number·of·elements·of·the·type:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5753932095-1">{</span><span·class="n">CfgVarName</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="5753932095-1">}</span><span·class="p">.</span></code></pre><p>where</p><pre><code·class="makeup·erlang"·translate="no"[·...·truncated·by·diffoscope;·len:·227,·SHA:·740bcfb16f9ba62d1d34912b19880708cd7aa1472a0e152d0f629c074abda087·...·]6-1">)</span><span·class="w">145 <p>A·configuration·file·can·contain·any·number·of·elements·of·the·type:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1077932097-1">{</span><span·class="n">CfgVarName</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="1077932097-1">}</span><span·class="p">.</span></code></pre><p>where</p><pre><code·class="makeup·erlang"·translate="no"[·...·truncated·by·diffoscope;·len:·227,·SHA:·679719b585f708f4251817283ed68e960091d104f1d9dd083cb6757a13c4368d·...·]6-1">)</span><span·class="w">
146 </span><span·class="n">Value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="0775756786-2">(</span><span·class="p"·data-group-id="0775756786-2">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="0775756786-3">[</span><span·class="p"·data-group-id="0775756786-4">{</span><sp[·...·truncated·by·diffoscope;·len:·175,·SHA:·7d50681595a5c3382c7cfa068fc89b0cb1881c1acaed8464fe43837be918755a·...·]6-3">]</span></code></pre><h2·id="requiring-and-reading-configuration-data"·class="section-heading">146 </span><span·class="n">Value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4034143546-2">(</span><span·class="p"·data-group-id="4034143546-2">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4034143546-3">[</span><span·class="p"·data-group-id="4034143546-4">{</span><sp[·...·truncated·by·diffoscope;·len:·175,·SHA:·718876cc06095555764fc5ea8b9636559cb28b80194c35106edfe9435784925f·...·]6-3">]</span></code></pre><h2·id="requiring-and-reading-configuration-data"·class="section-heading">
147 ··<a·href="#requiring-and-reading-configuration-data"·class="hover-link">147 ··<a·href="#requiring-and-reading-configuration-data"·class="hover-link">
148 ····<i·class="ri-link-m"·aria-hidden="true"></i>148 ····<i·class="ri-link-m"·aria-hidden="true"></i>
149 ··</a>149 ··</a>
150 ··<span·class="text">Requiring·and·Reading·Configuration·Data</span>150 ··<span·class="text">Requiring·and·Reading·Configuration·Data</span>
151 </h2>151 </h2>
152 <p><a·href=""·id="require_config_data"></a></p><p>In·a·test·suite,·one·must·<em>require</em>·that·a·configuration·variable·(<code·class="inline">CfgVarName</code>152 <p><a·href=""·id="require_config_data"></a></p><p>In·a·test·suite,·one·must·<em>require</em>·that·a·configuration·variable·(<code·class="inline">CfgVarName</code>
153 in·the·previous·definition)·exists·before·attempting·to·read·the·associated153 in·the·previous·definition)·exists·before·attempting·to·read·the·associated
Offset 166, 21 lines modifiedOffset 166, 21 lines modified
166 <code·class="inline">{require,AliasName,CfgVarName}</code>.·The·arguments·<code·class="inline">AliasName</code>·and·<code·class="inline">CfgVarName</code>·are166 <code·class="inline">{require,AliasName,CfgVarName}</code>.·The·arguments·<code·class="inline">AliasName</code>·and·<code·class="inline">CfgVarName</code>·are
167 the·same·as·the·arguments·to·<a·href="ct.html#require/1"><code·class="inline">ct:require/1,2</code></a>.·<code·class="inline">AliasName</code>167 the·same·as·the·arguments·to·<a·href="ct.html#require/1"><code·class="inline">ct:require/1,2</code></a>.·<code·class="inline">AliasName</code>
168 becomes·an·alias·for·the·configuration·variable,·and·can·be·used·as·reference·to168 becomes·an·alias·for·the·configuration·variable,·and·can·be·used·as·reference·to
169 the·configuration·data·value.·The·configuration·variable·can·be·associated·with169 the·configuration·data·value.·The·configuration·variable·can·be·associated·with
170 any·number·of·alias·names,·but·each·name·must·be·unique·within·the·same·test170 any·number·of·alias·names,·but·each·name·must·be·unique·within·the·same·test
171 suite.·The·two·main·uses·for·alias·names·follows:</p><ul><li>To·identify·connections·(described·later).</li><li>To·help·adapt·configuration·data·to·a·test·suite·(or·test·case)·and·improve171 suite.·The·two·main·uses·for·alias·names·follows:</p><ul><li>To·identify·connections·(described·later).</li><li>To·help·adapt·configuration·data·to·a·test·suite·(or·test·case)·and·improve
172 readability.</li></ul><p>To·read·the·value·of·a·configuration·variable,·use·function172 readability.</li></ul><p>To·read·the·value·of·a·configuration·variable,·use·function
173 <a·href="ct.html#get_config/1"><code·class="inline">get_config/1,2,3</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="5851038937-1">(</span><span·class="p"·data-group-id="5851038937-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 <a·href="ct.html#get_config/1"><code·class="inline">get_config/1,2,3</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="6693634751-1">(</span><span·class="p"·data-group-id="6693634751-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="p"·data-group-id="5851038937-2">[</span><span·class="p"·data-group-id="5851038937-3">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;CO[·...·truncated·by·diffoscope;·len:·124,·SHA:·1ff336b8eb81b81717702bd816ffd0d136f9121ea8ee7c8af3385eb555c77dfe·...·]-2">]</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="p"·data-group-id="6693634751-2">[</span><span·class="p"·data-group-id="6693634751-3">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;CO[·...·truncated·by·diffoscope;·len:·124,·SHA:·f4e8d722e5f9a2bd3d2db6e4d7ff736ee6792903ebd581b40c91bb2e30ba0560·...·]-2">]</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">175 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
  
176 </span><span·class="nf">testcase</span><span·class="p"·data-group-id="5851038937-4">(</span><span·class="n">Config</span><span·class="p"·data-group-id="5851038937-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 </span><span·class="nf">testcase</span><span·class="p"·data-group-id="6693634751-4">(</span><span·class="n">Config</span><span·class="p"·data-group-id="6693634751-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ····</span><span·class="n">Domain</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="5851038937-5">(</span><span·class="ss">domain</span><span·class="p"·data-group-id="5851038937-5">)</span><span·class="p">,</span><span·class="w">177 ····</span><span·class="n">Domain</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="6693634751-5">(</span><span·class="ss">domain</span><span·class="p"·data-group-id="6693634751-5">)</span><span·class="p">,</span><span·class="w">
178 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="using-configuration-variables-defined-in-multiple-files"·class="section-heading">178 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="using-configuration-variables-defined-in-multiple-files"·class="section-heading">
179 ··<a·href="#using-configuration-variables-defined-in-multiple-files"·class="hover-link">179 ··<a·href="#using-configuration-variables-defined-in-multiple-files"·class="hover-link">
180 ····<i·class="ri-link-m"·aria-hidden="true"></i>180 ····<i·class="ri-link-m"·aria-hidden="true"></i>
181 ··</a>181 ··</a>
182 ··<span·class="text">Using·Configuration·Variables·Defined·in·Multiple·Files</span>182 ··<span·class="text">Using·Configuration·Variables·Defined·in·Multiple·Files</span>
183 </h2>183 </h2>
184 <p>If·a·configuration·variable·is·defined·in·multiple·files·and·you·want·to·access184 <p>If·a·configuration·variable·is·defined·in·multiple·files·and·you·want·to·access
Offset 257, 19 lines modifiedOffset 257, 19 lines modified
257 ···&lt;ftp_host&gt;257 ···&lt;ftp_host&gt;
258 ·······&lt;ftp&gt;&quot;targethost&quot;&lt;/ftp&gt;258 ·······&lt;ftp&gt;&quot;targethost&quot;&lt;/ftp&gt;
259 ·······&lt;username&gt;&quot;tester&quot;&lt;/username&gt;259 ·······&lt;username&gt;&quot;tester&quot;&lt;/username&gt;
260 ·······&lt;password&gt;&quot;letmein&quot;&lt;/password&gt;260 ·······&lt;password&gt;&quot;letmein&quot;&lt;/password&gt;
261 ···&lt;/ftp_host&gt;261 ···&lt;/ftp_host&gt;
262 ···&lt;lm_directory&gt;&quot;/test/loadmodules&quot;&lt;/lm_directory&gt;262 ···&lt;lm_directory&gt;&quot;/test/loadmodules&quot;&lt;/lm_directory&gt;
263 &lt;/config&gt;</code></pre><p>Once·read,·this·file·produces·the·same·configuration·variables·as·the·following263 &lt;/config&gt;</code></pre><p>Once·read,·this·file·produces·the·same·configuration·variables·as·the·following
264 text·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2957690056-1">{</span><span·class="ss">ftp_host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2957690056-2">[</span><span·class="p"·data-group-id="2957690056-3">{</span><span·class="ss">ftp</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·89,·SHA:·1aeaf81fdc1d89620e3f5a1be4b0b8bebfbca7aeb5eb24c162fb4f7f5073148a·...·]-3">}</span><span·class="p">,</span><span·class="w">264 text·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6365970777-1">{</span><span·class="ss">ftp_host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6365970777-2">[</span><span·class="p"·data-group-id="6365970777-3">{</span><span·class="ss">ftp</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·89,·SHA:·d23127fcabf47f63cf3fd764384aaa45f697fcc795f03938312dbf5edbe91212·...·]-3">}</span><span·class="p">,</span><span·class="w">
265 ············</span><span·class="p"·data-group-id="2957690056-4">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="s">&quot;tester&quot;</span><span·class="p"·data-group-id="2957690056-4">}</span><span·class="p">,</span><span·class="w">265 ············</span><span·class="p"·data-group-id="6365970777-4">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="s">&quot;tester&quot;</span><span·class="p"·data-group-id="6365970777-4">}</span><span·class="p">,</span><span·class="w">
266 ············</span><span·class="p"·data-group-id="2957690056-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="s">&quot;letmein&quot;</span><span·class="p"·data-group-id="2957690056-5">}</span><span·class="p"·data-group-id="2957690056-2">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·b1d6bb64085581ccb56fae036bc160e5bfb32abc9e71ca05ca795d95e9d6df0c·...·]-1">}</span><span·class="p">.</span><span·class="w">266 ············</span><span·class="p"·data-group-id="6365970777-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="s">&quot;letmein&quot;</span><span·class="p"·data-group-id="6365970777-5">}</span><span·class="p"·data-group-id="6365970777-2">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·96cc0979b8840a1e0d7767f15f5a33ddd9699a7ec4a4a94e922f4e34643e5020·...·]-1">}</span><span·class="p">.</span><span·class="w">
  
267 </span><span·class="p"·data-group-id="2957690056-6">{</span><span·class="ss">lm_directory</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/test/loadmodules&quot;</span><span·class="p"·data-group-id="2957690056-6">}</span><span·class="p">.</span></code></pre><h3·id="implement-a-user-specific-handler"·class="section-heading">267 </span><span·class="p"·data-group-id="6365970777-6">{</span><span·class="ss">lm_directory</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/test/loadmodules&quot;</span><span·class="p"·data-group-id="6365970777-6">}</span><span·class="p">.</span></code></pre><h3·id="implement-a-user-specific-handler"·class="section-heading">
268 ··<a·href="#implement-a-user-specific-handler"·class="hover-link">268 ··<a·href="#implement-a-user-specific-handler"·class="hover-link">
269 ····<i·class="ri-link-m"·aria-hidden="true"></i>269 ····<i·class="ri-link-m"·aria-hidden="true"></i>
270 ··</a>270 ··</a>
271 ··<span·class="text">Implement·a·User-Specific·Handler</span>271 ··<span·class="text">Implement·a·User-Specific·Handler</span>
272 </h3>272 </h3>
273 <p>The·user-specific·handler·can·be·written·to·handle·special·configuration·file273 <p>The·user-specific·handler·can·be·written·to·handle·special·configuration·file
274 formats.·The·parameter·can·be·either·file·names·or·configuration·strings·(the274 formats.·The·parameter·can·be·either·file·names·or·configuration·strings·(the
Offset 280, 150 lines modifiedOffset 280, 150 lines modified
280 specified·configuration·parameter·is·valid:</p><ul><li><code·class="inline">{ok,·{file,·FileName}}</code>·-·the·parameter·is·a·file·name·and·the·file·exists.</li><li><code·class="inline">{ok,·{config,·ConfigString}}</code>·-·the·parameter·is·a·configuration·string·and280 specified·configuration·parameter·is·valid:</p><ul><li><code·class="inline">{ok,·{file,·FileName}}</code>·-·the·parameter·is·a·file·name·and·the·file·exists.</li><li><code·class="inline">{ok,·{config,·ConfigString}}</code>·-·the·parameter·is·a·configuration·string·and
281 it·is·correct.</li><li><code·class="inline">{error,·{nofile,·FileName}}</code>·-·there·is·no·file·with·the·specified·name·in281 it·is·correct.</li><li><code·class="inline">{error,·{nofile,·FileName}}</code>·-·there·is·no·file·with·the·specified·name·in
282 the·current·directory.</li><li><code·class="inline">{error,·{wrong_config,·ConfigString}}</code>·-·the·configuration·string·is·wrong.</li></ul><p>The·function·<code·class="inline">Callback:read_config/1</code>·is·to·be·exported·from·the·callback·module282 the·current·directory.</li><li><code·class="inline">{error,·{wrong_config,·ConfigString}}</code>·-·the·configuration·string·is·wrong.</li></ul><p>The·function·<code·class="inline">Callback:read_config/1</code>·is·to·be·exported·from·the·callback·module
283 to·read·configuration·data,·initially·before·the·tests·start,·or·as·a·result·of283 to·read·configuration·data,·initially·before·the·tests·start,·or·as·a·result·of
284 data·being·reloaded·during·test·execution.·The·input·argument·is·the·same·as·for284 data·being·reloaded·during·test·execution.·The·input·argument·is·the·same·as·for
285 function·<code·class="inline">check_parameter/1</code>.</p><p>The·return·value·is·to·be·either·of·the·following:</p><ul><li><code·class="inline">{ok,·Config}</code>·-·if·the·configuration·variables·are·read·successfully.</li><li><code·class="inline">{error,·{Error,·ErrorDetails}}</code>·-·if·the·callback·module·fails·to·proceed285 function·<code·class="inline">check_parameter/1</code>.</p><p>The·return·value·is·to·be·either·of·the·following:</p><ul><li><code·class="inline">{ok,·Config}</code>·-·if·the·configuration·variables·are·read·successfully.</li><li><code·class="inline">{error,·{Error,·ErrorDetails}}</code>·-·if·the·callback·module·fails·to·proceed
286 with·the·specified·configuration·parameters.</li></ul><p><code·class="inline">Config</code>·is·the·proper·Erlang·key-value·list,·with·possible·key-value·sublists286 with·the·specified·configuration·parameters.</li></ul><p><code·class="inline">Config</code>·is·the·proper·Erlang·key-value·list,·with·possible·key-value·sublists
287 as·values,·like·the·earlier·configuration·file·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3565115908-1">[</span><span·class="p"·data-group-id="3565115908-2">{</span><span·class="ss">ftp_host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3565115908-3">[</span><span·class="p"·data-group-id="3565115908-4">{</[·...·truncated·by·diffoscope;·len:·823,·SHA:·e5aa212f1226f89f9ee8c40982ba6bf7c0e5cf4919a0e486b7a66d379bc4efdb·...·]-2">}</span><span·class="p">,</span><span·class="w">287 as·values,·like·the·earlier·configuration·file·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5592667851-1">[</span><span·class="p"·data-group-id="5592667851-2">{</span><span·class="ss">ftp_host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5592667851-3">[</span><span·class="p"·data-group-id="5592667851-4">{</[·...·truncated·by·diffoscope;·len:·823,·SHA:·f1a320fa000e61a912185875f2b57d9a750a7ee2b2e2aa7f2bf8fe3c39bcb53e·...·]-2">}</span><span·class="p">,</span><span·class="w">
288 ·</span><span·class="p"·data-group-id="3565115908-7">{</span><span·class="ss">lm_directory</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/test/loadmodules&quot;</span><span·class="p"·data-group-id="3565115908-7">}</span><span·class="p"·data-group-id="3565115908-1">]</span></code></pre><h2·id="examples-of-configuration-data-handling"·class="section-heading">288 ·</span><span·class="p"·data-group-id="5592667851-7">{</span><span·class="ss">lm_directory</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/test/loadmodules&quot;</span><span·class="p"·data-group-id="5592667851-7">}</span><span·class="p"·data-group-id="5592667851-1">]</span></code></pre><h2·id="examples-of-configuration-data-handling"·class="section-heading">
289 ··<a·href="#examples-of-configuration-data-handling"·class="hover-link">289 ··<a·href="#examples-of-configuration-data-handling"·class="hover-link">
290 ····<i·class="ri-link-m"·aria-hidden="true"></i>290 ····<i·class="ri-link-m"·aria-hidden="true"></i>
291 ··</a>291 ··</a>
292 ··<span·class="text">Examples·of·Configuration·Data·Handling</span>292 ··<span·class="text">Examples·of·Configuration·Data·Handling</span>
293 </h2>293 </h2>
294 <p>A·configuration·file·for·using·the·FTP·client·to·access·files·on·a·remote·host294 <p>A·configuration·file·for·using·the·FTP·client·to·access·files·on·a·remote·host
295 can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2204019409-1">{</span><span·class="ss">ftp_host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2204019409-2">[</span><span·class="p"·data-group-id="2204019409-3">{</span><span·class="ss">ftp</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·89,·SHA:·0fc70d500cf66a74a1db63e1e6b58aab87c0e42825d4ac0d51a705a2707bbce1·...·]-3">}</span><span·class="p">,</span><span·class="w">295 can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4874944361-1">{</span><span·class="ss">ftp_host</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4874944361-2">[</span><span·class="p"·data-group-id="4874944361-3">{</span><span·class="ss">ftp</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·89,·SHA:·aedec4af298d6ffc5304dda88b5e8b9d4d2a9474b8f04eb3d756832358854847·...·]-3">}</span><span·class="p">,</span><span·class="w">
296 ············</span><span·class="p"·data-group-id="2204019409-4">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="s">&quot;tester&quot;</span><span·class="p"·data-group-id="2204019409-4">}</span><span·class="p">,</span><span·class="w">296 ············</span><span·class="p"·data-group-id="4874944361-4">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="s">&quot;tester&quot;</span><span·class="p"·data-group-id="4874944361-4">}</span><span·class="p">,</span><span·class="w">
297 ············</span><span·class="p"·data-group-id="2204019409-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="s">&quot;letmein&quot;</span><span·class="p"·data-group-id="2204019409-5">}</span><span·class="p"·data-group-id="2204019409-2">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·b5b9432418ecc3df092a77047ba68bd171137ba76971deda41d29d4bef8cfd3a·...·]-1">}</span><span·class="p">.</span><span·class="w">297 ············</span><span·class="p"·data-group-id="4874944361-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="s">&quot;letmein&quot;</span><span·class="p"·data-group-id="4874944361-5">}</span><span·class="p"·data-group-id="4874944361-2">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·d9fcfb495b4f82cc15a1a204a4efe0e08bc2f01e6c293b2a994c794d7e8e1c34·...·]-1">}</span><span·class="p">.</span><span·class="w">
  
298 </span><span·class="p"·data-group-id="2204019409-6">{</span><span·class="ss">lm_directory</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/test/loadmodules&quot;</span><span·class="p"·data-group-id="2204019409-6">}</span><span·class="p">.</span></code></pre><p>The·XML·version·shown·earlier·can·also·be·used,·but·it·is·to·be·explicitly298 </span><span·class="p"·data-group-id="4874944361-6">{</span><span·class="ss">lm_directory</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/test/loadmodules&quot;</span><span·class="p"·data-group-id="4874944361-6">}</span><span·class="p">.</span></code></pre><p>The·XML·version·shown·earlier·can·also·be·used,·but·it·is·to·be·explicitly
299 specified·that·the·<code·class="inline">ct_config_xml</code>·callback·module·is·to·be·used·by299 specified·that·the·<code·class="inline">ct_config_xml</code>·callback·module·is·to·be·used·by
300 <code·class="inline">Common·Test</code>.</p><p>The·following·is·an·example·of·how·to·assert·that·the·configuration·data·is300 <code·class="inline">Common·Test</code>.</p><p>The·following·is·an·example·of·how·to·assert·that·the·configuration·data·is
301 available·and·can·be·used·for·an·FTP·session:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2222058703-1">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2222058703-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">301 available·and·can·be·used·for·an·FTP·session:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2433539812-1">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2433539812-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
302 ····</span><span·class="p"·data-group-id="2222058703-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="2222058703-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span><span·[·...·truncated·by·diffoscope;·len:·167,·SHA:·5b00768e2ee12fd2fc05f9bb3ea6dc237c7044850d2c1f53c1ee9c145de5eb4e·...·]-3">)</span><span·class="p">,</span><span·class="w">302 ····</span><span·class="p"·data-group-id="2433539812-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="2433539812-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span><span·[·...·truncated·by·diffoscope;·len:·167,·SHA:·5b2666457e944de531bc5e8fc12151a302f8ca2ee43203eabae7b6a095c79f17·...·]-3">)</span><span·class="p">,</span><span·class="w">
303 ····</span><span·class="n">Config</span><span·class="p">.</span><span·class="w">303 ····</span><span·class="n">Config</span><span·class="p">.</span><span·class="w">
  
304 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="2222058703-4">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Config</span><span·class="p"·data-group-id="2222058703-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">304 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="2433539812-4">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Config</span><span·class="p"·data-group-id="2433539812-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
305 ····</span><span·class="nc">ct_ftp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="2222058703-5">(</span><span·class="ss">ftp</span><span·class="p"·data-group-id="2222058703-5">)</span><span·class="p">.</span><span·class="w">305 ····</span><span·class="nc">ct_ftp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="2433539812-5">(</span><span·class="ss">ftp</span><span·class="p"·data-group-id="2433539812-5">)</span><span·class="p">.</span><span·class="w">
  
306 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="2222058703-6">(</span><span·class="p"·data-group-id="2222058703-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">306 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="2433539812-6">(</span><span·class="p"·data-group-id="2433539812-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
307 ····</span><span·class="p"·data-group-id="2222058703-7">[</span><span·class="p"·data-group-id="2222058703-8">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="ss">ftp_host</span><span·class="p"·data-group-id="2222058703-8">}</span><span·class="p">,</span><span·class="w">307 ····</span><span·class="p"·data-group-id="2433539812-7">[</span><span·class="p"·data-group-id="2433539812-8">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="ss">ftp_host</span><span·class="p"·data-group-id="2433539812-8">}</span><span·class="p">,</span><span·class="w">
308 ·····</span><span·class="p"·data-group-id="2222058703-9">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="2222058703-9">}</span><span·class="p"·data-group-id="2222058703-7">]</span><span·class="p">.</span><span·class="w">308 ·····</span><span·class="p"·data-group-id="2433539812-9">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="2433539812-9">}</span><span·class="p"·data-group-id="2433539812-7">]</span><span·class="p">.</span><span·class="w">
  
309 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="2222058703-10">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2222058703-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">309 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="2433539812-10">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2433539812-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
310 ····</span><span·class="n">Remote</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2222058703-11">(</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="2222058703-12">(</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="2222058703-12">)</span><span·[·...·truncated·by·diffoscope;·len:·126,·SHA:·3f990df967df1aa41558e136682e416b5d0652873bf2478cfaa90d74b679a242·...·]-11">)</span><span·class="p">,</span><span·class="w">310 ····</span><span·class="n">Remote</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2433539812-11">(</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="2433539812-12">(</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="2433539812-12">)</span><span·[·...·truncated·by·diffoscope;·len:·126,·SHA:·3d2cdc1df87c958092c88a22b38950f77151388a938d843b2e77101935d952a4·...·]-11">)</span><span·class="p">,</span><span·class="w">
311 ····</span><span·class="n">Local</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2222058703-13">(</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2222058703-14">(</span><span·class="ss">priv_dir</span><span·class="p">,</span><span·class="n">Config</span><span[·...·truncated·by·diffoscope;·len:·183,·SHA:·abe4ef7b9385e5d3664fe01675867f5895891262a64265fae6eaada0d25a7f01·...·]-13">)</span><span·class="p">,</span><span·class="w">311 ····</span><span·class="n">Local</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2433539812-13">(</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2433539812-14">(</span><span·class="ss">priv_dir</span><span·class="p">,</span><span·class="n">Config</span><span[·...·truncated·by·diffoscope;·len:·183,·SHA:·82c7954e0080f34068c6ae4092fc1f15bdeb19ae3e7d228c61558aa40781bf76·...·]-13">)</span><span·class="p">,</span><span·class="w">
312 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="2222058703-15">(</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Remote</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Local</span><span·class="p"·data-group-id="2222058703-15">)</span><span·class="p">,</span><span·class="w">312 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="2433539812-15">(</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Remote</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Local</span><span·class="p"·data-group-id="2433539812-15">)</span><span·class="p">,</span><span·class="w">
313 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>The·following·is·an·example·of·how·the·functions·in·the·previous·example·can·be313 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>The·following·is·an·example·of·how·the·functions·in·the·previous·example·can·be
314 rewritten·if·it·is·necessary·to·open·multiple·connections·to·the·FTP·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="5358030848-1">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="5358030848-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">314 rewritten·if·it·is·necessary·to·open·multiple·connections·to·the·FTP·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="1382745543-1">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="1382745543-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
315 ····</span><span·class="p"·data-group-id="5358030848-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Handle1</span><span·class="p"·data-group-id="5358030848-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span[·...·truncated·by·diffoscope;·len:·179,·SHA:·e1d80b54032fc9df24ee6b5b8bde925ebc9cb5714e1837bfd073c33f8e439065·...·]-3">)</span><span·class="p">,</span><span·class="w">315 ····</span><span·class="p"·data-group-id="1382745543-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Handle1</span><span·class="p"·data-group-id="1382745543-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span[·...·truncated·by·diffoscope;·len:·179,·SHA:·3004bcb0d21b6b16731d3e97ca4020e5971b488460d373cdd9ef1d66b53c3de0·...·]-3">)</span><span·class="p">,</span><span·class="w">
316 ····</span><span·class="p"·data-group-id="5358030848-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Handle2</span><span·class="p"·data-group-id="5358030848-4">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span[·...·truncated·by·diffoscope;·len:·179,·SHA:·fca3a1d9943b80042137b3e2ea791b6086349905818340b7cf276e5c7a95ae49·...·]-5">)</span><span·class="p">,</span><span·class="w">316 ····</span><span·class="p"·data-group-id="1382745543-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Handle2</span><span·class="p"·data-group-id="1382745543-4">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span[·...·truncated·by·diffoscope;·len:·179,·SHA:·ab2570d22e3df486765151efc7fe13b74fcb35acfe709e6b08ebc1ba0e717e7b·...·]-5">)</span><span·class="p">,</span><span·class="w">
317 ····</span><span·class="p"·data-group-id="5358030848-6">[</span><span·class="p"·data-group-id="5358030848-7">{</span><span·class="ss">ftp_handles</span><span·class="p">,</span><span·class="p"·data-group-id="5358030848-8">[</span><span·class="n">Handle1</span><span·class="p">,</span><span·class="n"[·...·truncated·by·diffoscope;·len:·263,·SHA:·a3f801c78e80e84ad5c322edde29ce2215c57d39feb8b62d8d3fb84fadfd650c·...·]-6">]</span><span·class="p">.</span><span·class="w">317 ····</span><span·class="p"·data-group-id="1382745543-6">[</span><span·class="p"·data-group-id="1382745543-7">{</span><span·class="ss">ftp_handles</span><span·class="p">,</span><span·class="p"·data-group-id="1382745543-8">[</span><span·class="n">Handle1</span><span·class="p">,</span><span·class="n"[·...·truncated·by·diffoscope;·len:·263,·SHA:·3f1d06eb9a94a776d8265f4b566d54849c2eb59b03fef02662770ecd75796706·...·]-6">]</span><span·class="p">.</span><span·class="w">
  
318 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="5358030848-9">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="5358030848-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">318 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="1382745543-9">(</span><span·class="ss">ftptest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="1382745543-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
319 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foreach</span><span·class="p"·data-group-id="5358030848-10">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5358030848-11">(</span><span·class="n">Handle</span><span·class="p"·data-group-id="5358030848-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·214,·SHA:·04d264bae0435187f8155df997f1dcf6350bdd72853bd5559ee52814ea053734·...·]-12">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">319 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foreach</span><span·class="p"·data-group-id="1382745543-10">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1382745543-11">(</span><span·class="n">Handle</span><span·class="p"·data-group-id="1382745543-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·214,·SHA:·e8f3d388f67fe1f64ef2b488c04da5439603aa0fbe048c608a2bf8d269d0e94f·...·]-12">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
320 ··················</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="5358030848-13">(</span><span·class="ss">ftp_handles</span><span·class="p">,</span><span·class="n">Config</span><span·class="p"·data-group-id="5358030848-13">)</span><span·class="p"·data-group-id="5358030848-10">)</span><span·class="p">.</span><span·class="w">320 ··················</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="1382745543-13">(</span><span·class="ss">ftp_handles</span><span·class="p">,</span><span·class="n">Config</span><span·class="p"·data-group-id="1382745543-13">)</span><span·class="p"·data-group-id="1382745543-10">)</span><span·class="p">.</span><span·class="w">
  
321 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="5358030848-14">(</span><span·class="p"·data-group-id="5358030848-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">321 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="1382745543-14">(</span><span·class="p"·data-group-id="1382745543-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
322 ····</span><span·class="p"·data-group-id="5358030848-15">[</span><span·class="p"·data-group-id="5358030848-16">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">ftp_host</span><span·class="p"·data-group-id="5358030848-16">}</span><span·class="p">,</span><span·class="w">322 ····</span><span·class="p"·data-group-id="1382745543-15">[</span><span·class="p"·data-group-id="1382745543-16">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">ftp_host</span><span·class="p"·data-group-id="1382745543-16">}</span><span·class="p">,</span><span·class="w">
323 ·····</span><span·class="p"·data-group-id="5358030848-17">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="5358030848-17">}</span><span·class="p"·data-group-id="5358030848-15">]</span><span·class="p">.</span><span·class="w">323 ·····</span><span·class="p"·data-group-id="1382745543-17">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="1382745543-17">}</span><span·class="p"·data-group-id="1382745543-15">]</span><span·class="p">.</span><span·class="w">
  
324 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="5358030848-18">(</span><span·class="n">Config</span><span·class="p"·data-group-id="5358030848-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">324 </span><span·class="nf">ftptest</span><span·class="p"·data-group-id="1382745543-18">(</span><span·class="n">Config</span><span·class="p"·data-group-id="1382745543-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
325 ····</span><span·class="n">Remote</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="5358030848-19">(</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="5358030848-20">(</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="5358030848-20">)</span><span[·...·truncated·by·diffoscope;·len:·127,·SHA:·ee51de411644cdcdf373717f6f6d39203062b2942a578402be5cc7d74ba88d0b·...·]-19">)</span><span·class="p">,</span><span·class="w">325 ····</span><span·class="n">Remote</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="1382745543-19">(</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="1382745543-20">(</span><span·class="ss">lm_directory</span><span·class="p"·data-group-id="1382745543-20">)</span><span[·...·truncated·by·diffoscope;·len:·127,·SHA:·504bb4f7751aaf002d6af99bdddb67cd47a43a3c86a1da6c6f6c681f093f12af·...·]-19">)</span><span·class="p">,</span><span·class="w">
326 ····</span><span·class="n">Local</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="5358030848-21">(</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="5358030848-22">(</span><span·class="ss">priv_dir</span><span·class="p">,</span><span·class="n">Config</span><spa[·...·truncated·by·diffoscope;·len:·184,·SHA:·a81eec4c6a3aaa7b4c90a8595de91e0f0a7a3d76c1f851794331998c61c20869·...·]-21">)</span><span·class="p">,</span><span·class="w">326 ····</span><span·class="n">Local</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="1382745543-21">(</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="1382745543-22">(</span><span·class="ss">priv_dir</span><span·class="p">,</span><span·class="n">Config</span><spa[·...·truncated·by·diffoscope;·len:·184,·SHA:·baa39e7493c266e42c97ec540ae475bd4d2e41063ee41183e5d9558093d4c827·...·]-21">)</span><span·class="p">,</span><span·class="w">
327 ····</span><span·class="p"·data-group-id="5358030848-23">[</span><span·class="n">Handle</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">MoreHandles</span><span·class="p"·data-group-id="5358030848-23">]</span><span·class="w">·</span><span·class="o">=</s[·...·truncated·by·diffoscope;·len:·301,·SHA:·444c11185a599becf4296cf111984e06891290ee73fe63487656bc606f9e5f1f·...·]-24">)</span><span·class="p">,</span><span·class="w">327 ····</span><span·class="p"·data-group-id="1382745543-23">[</span><span·class="n">Handle</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">MoreHandles</span><span·class="p"·data-group-id="1382745543-23">]</span><span·class="w">·</span><span·class="o">=</s[·...·truncated·by·diffoscope;·len:·301,·SHA:·946d40a85a39f64ebe52c0d8037f53bff143a42f908f64c70c818182417c3f6b·...·]-24">)</span><span·class="p">,</span><span·class="w">
328 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="5358030848-25">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Remote</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Local</span><span·class="p"·data-group-id="5358030848-25">)</span><span·class="p">,</span><span·class="w">328 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct_ftp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="1382745543-25">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Remote</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Local</span><span·class="p"·data-group-id="1382745543-25">)</span><span·class="p">,</span><span·class="w">
329 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="example-of-user-specific-configuration-handler"·class="section-heading">329 ····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="example-of-user-specific-configuration-handler"·class="section-heading">
330 ··<a·href="#example-of-user-specific-configuration-handler"·class="hover-link">330 ··<a·href="#example-of-user-specific-configuration-handler"·class="hover-link">
331 ····<i·class="ri-link-m"·aria-hidden="true"></i>331 ····<i·class="ri-link-m"·aria-hidden="true"></i>
332 ··</a>332 ··</a>
333 ··<span·class="text">Example·of·User-Specific·Configuration·Handler</span>333 ··<span·class="text">Example·of·User-Specific·Configuration·Handler</span>
334 </h2>334 </h2>
335 <p>A·simple·configuration·handling·driver,·asking·an·external·server·for335 <p>A·simple·configuration·handling·driver,·asking·an·external·server·for
336 configuration·data,·can·be·implemented·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6721864699-1">(</span><span·class="ss">config_driver</span><span·class="p"·data-group-id="6721864699-1">)</span><span·class="p">.</span><span·class="w">336 configuration·data,·can·be·implemented·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5277967066-1">(</span><span·class="ss">config_driver</span><span·class="p"·data-group-id="5277967066-1">)</span><span·class="p">.</span><span·class="w">
337 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6721864699-2">(</span><span·class="p"·data-group-id="6721864699-3">[</span><span·class="ss">read_config</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">check_parameter</span><span·clas[·...·truncated·by·diffoscope;·len:·133,·SHA:·de2eb6a23f07235e1619ca263106d5e1c9efecb752c51976820a2e0c73b7b92d·...·]-2">)</span><span·class="p">.</span><span·class="w">337 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5277967066-2">(</span><span·class="p"·data-group-id="5277967066-3">[</span><span·class="ss">read_config</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">check_parameter</span><span·clas[·...·truncated·by·diffoscope;·len:·133,·SHA:·083ced5e57e715d272e32fcd01dec3fb1af0fa039c3df4c4b488b1220c1bbf93·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
338 </span><span·class="nf">read_config</span><span·class="p"·data-group-id="6721864699-4">(</span><span·class="n">ServerName</span><span·class="p"·data-group-id="6721864699-4">)</span><span·class="p">-&gt;</span><span·class="w">338 </span><span·class="nf">read_config</span><span·class="p"·data-group-id="5277967066-4">(</span><span·class="n">ServerName</span><span·class="p"·data-group-id="5277967066-4">)</span><span·class="p">-&gt;</span><span·class="w">
339 ····</span><span·class="n">ServerModule</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list_to_atom</span><span·class="p"·data-group-id="6721864699-5">(</span><span·class="n">ServerName</span><span·class="p"·data-group-id="6721864699-5">)</span><span·class="p">,</span><span·class="w">339 ····</span><span·class="n">ServerModule</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list_to_atom</span><span·class="p"·data-group-id="5277967066-5">(</span><span·class="n">ServerName</span><span·class="p"·data-group-id="5277967066-5">)</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 30301/81934 bytes (36.98%) of diff not shown.
15.3 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/cover_chapter.html
    
Offset 197, 67 lines modifiedOffset 197, 67 lines modified
197 ····<i·class="ri-link-m"·aria-hidden="true"></i>197 ····<i·class="ri-link-m"·aria-hidden="true"></i>
198 ··</a>198 ··</a>
199 ··<span·class="text">General·Config</span>199 ··<span·class="text">General·Config</span>
200 </h3>200 </h3>
201 <p>Here·follows·the·general·configuration·terms·that·are·allowed·in·a·cover201 <p>Here·follows·the·general·configuration·terms·that·are·allowed·in·a·cover
202 specification·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·List·of·Nodes·on·which·cover·will·be·active·during·test.</span><span·class="w">202 specification·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·List·of·Nodes·on·which·cover·will·be·active·during·test.</span><span·class="w">
203 </span><span·class="c1">%%·Nodes·=·[atom()]</span><span·class="w">203 </span><span·class="c1">%%·Nodes·=·[atom()]</span><span·class="w">
204 </span><span·class="p"·data-group-id="2755386835-1">{</span><span·class="nb">nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Nodes</span><span·class="p"·data-group-id="2755386835-1">}</span><span·class="p">.</span><span·class="w">204 </span><span·class="p"·data-group-id="4940326647-1">{</span><span·class="nb">nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Nodes</span><span·class="p"·data-group-id="4940326647-1">}</span><span·class="p">.</span><span·class="w">
  
205 </span><span·class="c1">%%·Files·with·previously·exported·cover·data·to·include·in·analysis.</span><span·class="w">205 </span><span·class="c1">%%·Files·with·previously·exported·cover·data·to·include·in·analysis.</span><span·class="w">
206 </span><span·class="c1">%%·CoverDataFiles·=·[string()]</span><span·class="w">206 </span><span·class="c1">%%·CoverDataFiles·=·[string()]</span><span·class="w">
207 </span><span·class="p"·data-group-id="2755386835-2">{</span><span·class="ss">import</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CoverDataFiles</span><span·class="p"·data-group-id="2755386835-2">}</span><span·class="p">.</span><span·class="w">207 </span><span·class="p"·data-group-id="4940326647-2">{</span><span·class="ss">import</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CoverDataFiles</span><span·class="p"·data-group-id="4940326647-2">}</span><span·class="p">.</span><span·class="w">
  
208 </span><span·class="c1">%%·Cover·data·file·to·export·from·this·session.</span><span·class="w">208 </span><span·class="c1">%%·Cover·data·file·to·export·from·this·session.</span><span·class="w">
209 </span><span·class="c1">%%·CoverDataFile·=·string()</span><span·class="w">209 </span><span·class="c1">%%·CoverDataFile·=·string()</span><span·class="w">
210 </span><span·class="p"·data-group-id="2755386835-3">{</span><span·class="ss">export</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CoverDataFile</span><span·class="p"·data-group-id="2755386835-3">}</span><span·class="p">.</span><span·class="w">210 </span><span·class="p"·data-group-id="4940326647-3">{</span><span·class="ss">export</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CoverDataFile</span><span·class="p"·data-group-id="4940326647-3">}</span><span·class="p">.</span><span·class="w">
  
211 </span><span·class="c1">%%·Cover·analysis·level.</span><span·class="w">211 </span><span·class="c1">%%·Cover·analysis·level.</span><span·class="w">
212 </span><span·class="c1">%%·Level·=·details·|·overview</span><span·class="w">212 </span><span·class="c1">%%·Level·=·details·|·overview</span><span·class="w">
213 </span><span·class="p"·data-group-id="2755386835-4">{</span><span·class="ss">level</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Level</span><span·class="p"·data-group-id="2755386835-4">}</span><span·class="p">.</span><span·class="w">213 </span><span·class="p"·data-group-id="4940326647-4">{</span><span·class="ss">level</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Level</span><span·class="p"·data-group-id="4940326647-4">}</span><span·class="p">.</span><span·class="w">
  
214 </span><span·class="c1">%%·Directories·to·include·in·cover.</span><span·class="w">214 </span><span·class="c1">%%·Directories·to·include·in·cover.</span><span·class="w">
215 </span><span·class="c1">%%·Dirs·=·[string()]</span><span·class="w">215 </span><span·class="c1">%%·Dirs·=·[string()]</span><span·class="w">
216 </span><span·class="p"·data-group-id="2755386835-5">{</span><span·class="ss">incl_dirs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="2755386835-5">}</span><span·class="p">.</span><span·class="w">216 </span><span·class="p"·data-group-id="4940326647-5">{</span><span·class="ss">incl_dirs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="4940326647-5">}</span><span·class="p">.</span><span·class="w">
  
217 </span><span·class="c1">%%·Directories,·including·subdirectories,·to·include.</span><span·class="w">217 </span><span·class="c1">%%·Directories,·including·subdirectories,·to·include.</span><span·class="w">
218 </span><span·class="p"·data-group-id="2755386835-6">{</span><span·class="ss">incl_dirs_r</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="2755386835-6">}</span><span·class="p">.</span><span·class="w">218 </span><span·class="p"·data-group-id="4940326647-6">{</span><span·class="ss">incl_dirs_r</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="4940326647-6">}</span><span·class="p">.</span><span·class="w">
  
219 </span><span·class="c1">%%·Specific·modules·to·include·in·cover.</span><span·class="w">219 </span><span·class="c1">%%·Specific·modules·to·include·in·cover.</span><span·class="w">
220 </span><span·class="c1">%%·Mods·=·[atom()]</span><span·class="w">220 </span><span·class="c1">%%·Mods·=·[atom()]</span><span·class="w">
221 </span><span·class="p"·data-group-id="2755386835-7">{</span><span·class="ss">incl_mods</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mods</span><span·class="p"·data-group-id="2755386835-7">}</span><span·class="p">.</span><span·class="w">221 </span><span·class="p"·data-group-id="4940326647-7">{</span><span·class="ss">incl_mods</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mods</span><span·class="p"·data-group-id="4940326647-7">}</span><span·class="p">.</span><span·class="w">
  
222 </span><span·class="c1">%%·Directories·to·exclude·in·cover.</span><span·class="w">222 </span><span·class="c1">%%·Directories·to·exclude·in·cover.</span><span·class="w">
223 </span><span·class="p"·data-group-id="2755386835-8">{</span><span·class="ss">excl_dirs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="2755386835-8">}</span><span·class="p">.</span><span·class="w">223 </span><span·class="p"·data-group-id="4940326647-8">{</span><span·class="ss">excl_dirs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="4940326647-8">}</span><span·class="p">.</span><span·class="w">
  
224 </span><span·class="c1">%%·Directories,·including·subdirectories,·to·exclude.</span><span·class="w">224 </span><span·class="c1">%%·Directories,·including·subdirectories,·to·exclude.</span><span·class="w">
225 </span><span·class="p"·data-group-id="2755386835-9">{</span><span·class="ss">excl_dirs_r</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="2755386835-9">}</span><span·class="p">.</span><span·class="w">225 </span><span·class="p"·data-group-id="4940326647-9">{</span><span·class="ss">excl_dirs_r</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dirs</span><span·class="p"·data-group-id="4940326647-9">}</span><span·class="p">.</span><span·class="w">
  
226 </span><span·class="c1">%%·Specific·modules·to·exclude·in·cover.</span><span·class="w">226 </span><span·class="c1">%%·Specific·modules·to·exclude·in·cover.</span><span·class="w">
227 </span><span·class="p"·data-group-id="2755386835-10">{</span><span·class="ss">excl_mods</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mods</span><span·class="p"·data-group-id="2755386835-10">}</span><span·class="p">.</span><span·class="w">227 </span><span·class="p"·data-group-id="4940326647-10">{</span><span·class="ss">excl_mods</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mods</span><span·class="p"·data-group-id="4940326647-10">}</span><span·class="p">.</span><span·class="w">
  
228 </span><span·class="c1">%%·Cross·cover·compilation</span><span·class="w">228 </span><span·class="c1">%%·Cross·cover·compilation</span><span·class="w">
229 </span><span·class="c1">%%·Tag·=·atom(),·an·identifier·for·a·test·run</span><span·class="w">229 </span><span·class="c1">%%·Tag·=·atom(),·an·identifier·for·a·test·run</span><span·class="w">
230 </span><span·class="c1">%%·Mod·=·[atom()],·modules·to·compile·for·accumulated·analysis</span><span·class="w">230 </span><span·class="c1">%%·Mod·=·[atom()],·modules·to·compile·for·accumulated·analysis</span><span·class="w">
231 </span><span·class="p"·data-group-id="2755386835-11">{</span><span·class="ss">cross</span><span·class="p">,</span><span·class="p"·data-group-id="2755386835-12">[</span><span·class="p"·data-group-id="2755386835-13">{</span><span·class="n">Tag</span><span·class="p">,</span><span·class="n">Mods</[·...·truncated·by·diffoscope;·len:·154,·SHA:·0f0626443e1884176f6b5d57ada8830102e1b700c7267fa1fc90ec4204b48db8·...·]-11">}</span><span·class="p">.</span></code></pre><p>The·terms·<code·class="inline">incl_dirs_r</code>·and·<code·class="inline">excl_dirs_r</code>·tell·<code·class="inline">Common·Test</code>·to·search·the231 </span><span·class="p"·data-group-id="4940326647-11">{</span><span·class="ss">cross</span><span·class="p">,</span><span·class="p"·data-group-id="4940326647-12">[</span><span·class="p"·data-group-id="4940326647-13">{</span><span·class="n">Tag</span><span·class="p">,</span><span·class="n">Mods</[·...·truncated·by·diffoscope;·len:·154,·SHA:·c13a8510b91fa0db3b014121c58138afe4c2f798bf120fb8cc414a953655c1bb·...·]-11">}</span><span·class="p">.</span></code></pre><p>The·terms·<code·class="inline">incl_dirs_r</code>·and·<code·class="inline">excl_dirs_r</code>·tell·<code·class="inline">Common·Test</code>·to·search·the
232 specified·directories·recursively·and·include·or·exclude·any·module·found·during232 specified·directories·recursively·and·include·or·exclude·any·module·found·during
233 the·search.·The·terms·<code·class="inline">incl_dirs</code>·and·<code·class="inline">excl_dirs</code>·result·in·a·non-recursive233 the·search.·The·terms·<code·class="inline">incl_dirs</code>·and·<code·class="inline">excl_dirs</code>·result·in·a·non-recursive
234 search·for·modules·(that·is,·only·modules·found·in·the·specified·directories·are234 search·for·modules·(that·is,·only·modules·found·in·the·specified·directories·are
235 included·or·excluded).</p><blockquote><h4·class="info">Note</h4><p>Directories·containing·Erlang·modules·to·be·included·in·a·code·coverage·test235 included·or·excluded).</p><blockquote><h4·class="info">Note</h4><p>Directories·containing·Erlang·modules·to·be·included·in·a·code·coverage·test
236 must·exist·in·the·code·server·path.·Otherwise,·the·Cover·tool·fails·to236 must·exist·in·the·code·server·path.·Otherwise,·the·Cover·tool·fails·to
237 recompile·the·modules.·It·is·not·sufficient·to·specify·these·directories·in237 recompile·the·modules.·It·is·not·sufficient·to·specify·these·directories·in
238 the·cover·specification·file·for·<code·class="inline">Common·Test</code>.</p></blockquote><h3·id="otp-application-config"·class="section-heading">238 the·cover·specification·file·for·<code·class="inline">Common·Test</code>.</p></blockquote><h3·id="otp-application-config"·class="section-heading">
239 ··<a·href="#otp-application-config"·class="hover-link">239 ··<a·href="#otp-application-config"·class="hover-link">
240 ····<i·class="ri-link-m"·aria-hidden="true"></i>240 ····<i·class="ri-link-m"·aria-hidden="true"></i>
241 ··</a>241 ··</a>
242 ··<span·class="text">OTP·application·Config</span>242 ··<span·class="text">OTP·application·Config</span>
243 </h3>243 </h3>
244 <p>When·using·a·cover·specification·in·the·testing·of·an·OTP·application·itself,244 <p>When·using·a·cover·specification·in·the·testing·of·an·OTP·application·itself,
245 there·is·a·special·incl_app·directive·that·includes·the·applications·modules·for245 there·is·a·special·incl_app·directive·that·includes·the·applications·modules·for
246 the·cover·compilation.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4077453961-1">{</span><span·class="ss">incl_app</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cover</span><span·class="w">·</span><span·class="p">:</span>[·...·truncated·by·diffoscope;·len:·224,·SHA:·fc04d83447d5f96f866647c746f4f867ec2602bb48504ab86464c502b80d596d·...·]-1">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>If·you·desire·to·also·use·some·other·general·cover·configuration·together·with246 the·cover·compilation.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3368508574-1">{</span><span·class="ss">incl_app</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cover</span><span·class="w">·</span><span·class="p">:</span>[·...·truncated·by·diffoscope;·len:·224,·SHA:·12614db45a17eff0bbacc5e6e4bbd088573e320b776f654d33d846241376ae79·...·]-1">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>If·you·desire·to·also·use·some·other·general·cover·configuration·together·with
247 this·option·you·should·insert·the·AppName·in·between·the·option·and·its·value247 this·option·you·should·insert·the·AppName·in·between·the·option·and·its·value
248 creating·a·three·tuple.</p></blockquote><p><a·href=""·id="cross_cover"></a></p><h2·id="cross-cover-analysis"·class="section-heading">248 creating·a·three·tuple.</p></blockquote><p><a·href=""·id="cross_cover"></a></p><h2·id="cross-cover-analysis"·class="section-heading">
249 ··<a·href="#cross-cover-analysis"·class="hover-link">249 ··<a·href="#cross-cover-analysis"·class="hover-link">
250 ····<i·class="ri-link-m"·aria-hidden="true"></i>250 ····<i·class="ri-link-m"·aria-hidden="true"></i>
251 ··</a>251 ··</a>
252 ··<span·class="text">Cross·Cover·Analysis</span>252 ··<span·class="text">Cross·Cover·Analysis</span>
253 </h2>253 </h2>
Offset 276, 15 lines modifiedOffset 276, 15 lines modified
276 ··{incl_mods,[m1]}.</code></pre><p>This·gives·an·entry·for·<code·class="inline">m1</code>·also·in·the·cover·log·for·test·run·<code·class="inline">s2</code>.·The276 ··{incl_mods,[m1]}.</code></pre><p>This·gives·an·entry·for·<code·class="inline">m1</code>·also·in·the·cover·log·for·test·run·<code·class="inline">s2</code>.·The
277 problem·is·that·this·only·reflects·the·coverage·by·<code·class="inline">s2</code>·tests,·not·the277 problem·is·that·this·only·reflects·the·coverage·by·<code·class="inline">s2</code>·tests,·not·the
278 accumulated·result·over·<code·class="inline">s1</code>·and·<code·class="inline">s2</code>.·This·is·where·the·cross·cover·mechanism278 accumulated·result·over·<code·class="inline">s1</code>·and·<code·class="inline">s2</code>.·This·is·where·the·cross·cover·mechanism
279 comes·in·handy.</p><p>If·instead·the·cover·specification·for·<code·class="inline">s2</code>·is·like·the·following:</p><pre><code·class="text">s2.cover:279 comes·in·handy.</p><p>If·instead·the·cover·specification·for·<code·class="inline">s2</code>·is·like·the·following:</p><pre><code·class="text">s2.cover:
280 ··{cross,[{s1,[m1]}]}.</code></pre><p>Then·<code·class="inline">m1</code>·is·cover·compiled·in·test·run·<code·class="inline">s2</code>,·but·not·shown·in·the·coverage·log.280 ··{cross,[{s1,[m1]}]}.</code></pre><p>Then·<code·class="inline">m1</code>·is·cover·compiled·in·test·run·<code·class="inline">s2</code>,·but·not·shown·in·the·coverage·log.
281 Instead,·if·<a·href="ct_cover.html#cross_cover_analyse/2"><code·class="inline">ct_cover:cross_cover_analyse/2</code></a>·is·called·after·both·<code·class="inline">s1</code>·and·<code·class="inline">s2</code>281 Instead,·if·<a·href="ct_cover.html#cross_cover_analyse/2"><code·class="inline">ct_cover:cross_cover_analyse/2</code></a>·is·called·after·both·<code·class="inline">s1</code>·and·<code·class="inline">s2</code>
282 test·runs·are·completed,·the·accumulated·result·for·<code·class="inline">m1</code>·is·available·in·the282 test·runs·are·completed,·the·accumulated·result·for·<code·class="inline">m1</code>·is·available·in·the
283 cross·cover·log·for·test·run·<code·class="inline">s1</code>.</p><p>The·call·to·the·analyze·function·must·be·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct_cover</span><span·class="p">:</span><span·class="nf">cross_cover_analyse</span><span·class="p"·data-group-id="9302079856-1">(</span><span·class="n">Level</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9302079856-2">[</span><span·class="p"·data-group-id="9302079856-3">{</span><span·class="ss">s1</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·387,·SHA:·cdef3ec885c5f0cd55666180c79218634285528e2bc6f68c1fb1b662e7e9a542·...·]-1">)</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">S1LogDir</code>·and·<code·class="inline">S2LogDir</code>·are·the·directories·named·<code·class="inline">&lt;TestName&gt;.logs</code>·for283 cross·cover·log·for·test·run·<code·class="inline">s1</code>.</p><p>The·call·to·the·analyze·function·must·be·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct_cover</span><span·class="p">:</span><span·class="nf">cross_cover_analyse</span><span·class="p"·data-group-id="3965722170-1">(</span><span·class="n">Level</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3965722170-2">[</span><span·class="p"·data-group-id="3965722170-3">{</span><span·class="ss">s1</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·387,·SHA:·5a408673665cc72a8b34682162e17ccec6870c7cea541a6f2311b78061fe658e·...·]-1">)</span><span·class="p">.</span></code></pre><p>Here,·<code·class="inline">S1LogDir</code>·and·<code·class="inline">S2LogDir</code>·are·the·directories·named·<code·class="inline">&lt;TestName&gt;.logs</code>·for
284 each·test·respectively.</p><p>Notice·the·tags·<code·class="inline">s1</code>·and·<code·class="inline">s2</code>,·which·are·used·in·the·cover·specification·file284 each·test·respectively.</p><p>Notice·the·tags·<code·class="inline">s1</code>·and·<code·class="inline">s2</code>,·which·are·used·in·the·cover·specification·file
285 and·in·the·call·to·<a·href="ct_cover.html#cross_cover_analyse/2"><code·class="inline">ct_cover:cross_cover_analyse/2</code></a>.·The·purpose·of·these·is285 and·in·the·call·to·<a·href="ct_cover.html#cross_cover_analyse/2"><code·class="inline">ct_cover:cross_cover_analyse/2</code></a>.·The·purpose·of·these·is
286 only·to·map·the·modules·specified·in·the·cover·specification·to·the·log286 only·to·map·the·modules·specified·in·the·cover·specification·to·the·log
287 directory·specified·in·the·call·to·the·analyze·function.·The·tag·name·has·no287 directory·specified·in·the·call·to·the·analyze·function.·The·tag·name·has·no
288 meaning·beyond·this.</p><h2·id="logging"·class="section-heading">288 meaning·beyond·this.</p><h2·id="logging"·class="section-heading">
289 ··<a·href="#logging"·class="hover-link">289 ··<a·href="#logging"·class="hover-link">
290 ····<i·class="ri-link-m"·aria-hidden="true"></i>290 ····<i·class="ri-link-m"·aria-hidden="true"></i>
39.6 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct.html
    
Offset 1974, 25 lines modifiedOffset 1974, 25 lines modified
1974 ························Opt·::·element·|·all,1974 ························Opt·::·element·|·all,
1975 ························ValueOrElement·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()·|·Default.</pre>1975 ························ValueOrElement·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()·|·Default.</pre>
  
1976 ······</div>1976 ······</div>
  
1977 <p>Reads·configuration·data·values.</p><p>Returns·the·matching·values·or·configuration·elements,·given·a·configuration1977 <p>Reads·configuration·data·values.</p><p>Returns·the·matching·values·or·configuration·elements,·given·a·configuration
1978 variable·key·or·its·associated·name·(if·one·has·been·specified·with1978 variable·key·or·its·associated·name·(if·one·has·been·specified·with
1979 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>·or·a·<code·class="inline">require</code>·statement).</p><p><em>Example:</em></p><p>Given·the·following·configuration·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8811772817-1">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="p"·data-group-id="8811772817-2">[</span><span·class="p"·data-group-id="8811772817-3">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="n">IpAddr<[·...·truncated·by·diffoscope;·len:·47,·SHA:·f7b1740d79dc8545e095843a112b9c47ccf8d104a4e697ff7ac5202f39f5e0b6·...·]-3">}</span><span·class="p">,</span><span·class="w">1979 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>·or·a·<code·class="inline">require</code>·statement).</p><p><em>Example:</em></p><p>Given·the·following·configuration·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8730283978-1">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="p"·data-group-id="8730283978-2">[</span><span·class="p"·data-group-id="8730283978-3">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="n">IpAddr<[·...·truncated·by·diffoscope;·len:·47,·SHA:·568348dc65dd1f33c489cc0ca0553316e54a62a30baa7a4c2e920dac32dff8a1·...·]-3">}</span><span·class="p">,</span><span·class="w">
1980 ·······</span><span·class="p"·data-group-id="8811772817-4">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="p"·data-group-id="8811772817-5">[</span><span·class="p"·data-group-id="8811772817-6">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">Usern[·...·truncated·by·diffoscope;·len:·51,·SHA:·3ed7b1c6a36988a8de0d6626135b58f46bded59563dfacbc2ec28ce035a63159·...·]-6">}</span><span·class="p">,</span><span·class="w">1980 ·······</span><span·class="p"·data-group-id="8730283978-4">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="p"·data-group-id="8730283978-5">[</span><span·class="p"·data-group-id="8730283978-6">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">Usern[·...·truncated·by·diffoscope;·len:·51,·SHA:·5328d25362ba4e614a774aacc0d4299e6e3e42d135284af00916b588881f801b·...·]-6">}</span><span·class="p">,</span><span·class="w">
1981 ··············</span><span·class="p"·data-group-id="8811772817-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="8811772817-7">}</span><span·class="p"·data-group-id="8811772817-5">]</span><span·class="p"·data-group-id="8811772817-4">}</span><span·class="p"·data-group-id="8811772817-2">]</span><span·class="p"·data-group-id="8811772817-1">}</span><span·class="p">.</span></code></pre><p>Then:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="8632044758-1">(</span><span·class="ss">unix</span><span·class="p">,</span><span·class="n">Default</span><span·class="p"·data-group-id="8632044758-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8632044758-2">[</span><span·class="p"·data-group-id="8632044758-3">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="n">IpAddr</span><span·class="p"·data-group-id="8632044758-3">}</span><span·class="p">,</span><span·class="w"> 
1982 ·</span><span·class="p"·data-group-id="8632044758-4">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8632044758-5">[</span><span·class="p"·data-group-id="8632044758-6">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·519,·SHA:·c65c3af4ff0eeab695ad933d8ef64823c329eaaf2d7e5bfda49cd80058e605ee·...·]</span><span·class="w">1981 ··············</span><span·class="p"·data-group-id="8730283978-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="8730283978-7">}</span><span·class="p"·data-group-id="8730283978-5[·...·truncated·by·diffoscope;·len:·873,·SHA:·4210d99297fee8ca59c14989fc323083ed983ded8e188b85239b24d4aaf230b8·...·]</span><span·class="w">
 1982 ·</span><span·class="p"·data-group-id="7219687550-4">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7219687550-5">[</span><span·class="p"·data-group-id="7219687550-6">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">Username</span><span·class="p"·data-group-id="7219687550-6">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7219687550-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="7219687550-7">}</span><span·class="p"·data-group-id="7219687550-5">]</span><span·class="p"·data-group-id="7219687550-4">}</span><span·class="p"·data-group-id="7219687550-2">]</span><span·class="w">
1983 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="8632044758-8">(</span><span·class="p"·data-group-id="8632044758-9">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">telnet</span><span·class="p"·data-group-id="8632044758-9">}</span><span·class="p">,</span><span·class="n">Defaul[·...·truncated·by·diffoscope;·len:·49,·SHA:·2287f5637bb3dd4c5dc07910e39ad3731a0957836f5543ae8849912069545be7·...·]-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">IpAddr</span><span·class="w">1983 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="7219687550-8">(</span><span·class="p"·data-group-id="7219687550-9">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">telnet</span><span·class="p"·data-group-id="7219687550-9">}</span><span·class="p">,</span><span·class="n">Defaul[·...·truncated·by·diffoscope;·len:·49,·SHA:·041c9a1894c04236af3d657dc7d7cfd9281f389c792b5b18fa15f9bb75314900·...·]-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">IpAddr</span><span·class="w">
1984 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="8632044758-10">(</span><span·class="p"·data-group-id="8632044758-11">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">user</span><span·class="p">,</span><span·class="ss">username</span><span·class="p"·data-group-id="8632044758-1[·...·truncated·by·diffoscope;·len:·106,·SHA:·222a27e7be4465b67f4a1c3d8aec23e9ecd43291eb901e815dc7dfc820a3b012·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Username</span><span·class="w">1984 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="7219687550-10">(</span><span·class="p"·data-group-id="7219687550-11">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">user</span><span·class="p">,</span><span·class="ss">username</span><span·class="p"·data-group-id="7219687550-1[·...·truncated·by·diffoscope;·len:·106,·SHA:·f8124fac57b1d9be2eed6e54d2e4612142a145f067688e8f5feef3fe594b5619·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Username</span><span·class="w">
1985 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="8632044758-12">(</span><span·class="p"·data-group-id="8632044758-13">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">ftp</span><span·class="p"·data-group-id="8632044758-13">}</span><span·class="p">,</span><span·class="n">Defaul[·...·truncated·by·diffoscope;·len:·49,·SHA:·2287f5637bb3dd4c5dc07910e39ad3731a0957836f5543ae8849912069545be7·...·]-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Default</span><span·class="w">1985 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="7219687550-12">(</span><span·class="p"·data-group-id="7219687550-13">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">ftp</span><span·class="p"·data-group-id="7219687550-13">}</span><span·class="p">,</span><span·class="n">Defaul[·...·truncated·by·diffoscope;·len:·49,·SHA:·041c9a1894c04236af3d657dc7d7cfd9281f389c792b5b18fa15f9bb75314900·...·]-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Default</span><span·class="w">
1986 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="8632044758-14">(</span><span·class="ss">unknownkey</span><span·class="p">,</span><span·class="n">Default</span><span·class="p"·data-group-id="8632044758-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Default</span></code></pre><p>If·a·configuration·variable·key·has·been·associated·with·a·name·(by1986 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="7219687550-14">(</span><span·class="ss">unknownkey</span><span·class="p">,</span><span·class="n">Default</span><span·class="p"·data-group-id="7219687550-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Default</span></code></pre><p>If·a·configuration·variable·key·has·been·associated·with·a·name·(by
1987 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>·or·a·<code·class="inline">require</code>·statement),·the·name·can·be·used1987 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>·or·a·<code·class="inline">require</code>·statement),·the·name·can·be·used
1988 instead·of·the·key·to·read·the·value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="0481592434-1">(</span><span·class="ss">myuser</span><span·class="p">,</span><span·class="p"·data-group-id="0481592434-2">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">user</span><span·class="p"·data-group-id="0481592434-2">}<[·...·truncated·by·diffoscope;·len:·46,·SHA:·1637aed82234b37ffa7317c0924bbd7971726e621a4756514636e764c145e158·...·]4-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">1988 instead·of·the·key·to·read·the·value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="8710601074-1">(</span><span·class="ss">myuser</span><span·class="p">,</span><span·class="p"·data-group-id="8710601074-2">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="ss">user</span><span·class="p"·data-group-id="8710601074-2">}<[·...·truncated·by·diffoscope;·len:·46,·SHA:·3576ade37d0e71a513b4d489c3c8d9c241b4c1f4a37dee90856b459a1c75f990·...·]4-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
1989 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="0481592434-3">(</span><span·class="ss">myuser</span><span·class="p">,</span><span·class="n">Default</span><span·class="p"·data-group-id="0481592434-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·506,·SHA:·964221d318cc0de1032d6469cfa554fda0ad7d944a1a05e0bf0b48aa62e8bf8b·...·]4-4">]</span></code></pre><p>If·a·configuration·variable·is·defined·in·multiple·files,·use·option·<code·class="inline">all</code>·to1989 </span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="8710601074-3">(</span><span·class="ss">myuser</span><span·class="p">,</span><span·class="n">Default</span><span·class="p"·data-group-id="8710601074-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·506,·SHA:·bc96fc49b227b1a9fb163cbb236351ce56bcf595822e3ad07feaa0f382adeb33·...·]4-4">]</span></code></pre><p>If·a·configuration·variable·is·defined·in·multiple·files,·use·option·<code·class="inline">all</code>·to
1990 access·all·possible·values.·The·values·are·returned·in·a·list.·The·order·of·the1990 access·all·possible·values.·The·values·are·returned·in·a·list.·The·order·of·the
1991 elements·corresponds·to·the·order·that·the·configuration·files·were·specified·at1991 elements·corresponds·to·the·order·that·the·configuration·files·were·specified·at
1992 startup.</p><p>If·configuration·elements·(key-value·tuples)·are·to·be·returned·as·result1992 startup.</p><p>If·configuration·elements·(key-value·tuples)·are·to·be·returned·as·result
1993 instead·of·values,·use·option·<code·class="inline">element</code>.·The·returned·elements·are·then·on·the1993 instead·of·values,·use·option·<code·class="inline">element</code>.·The·returned·elements·are·then·on·the
1994 form·<code·class="inline">{Required,Value}</code>.</p><p>See·also·<a·href="#get_config/1"><code·class="inline">ct:get_config/1</code></a>,1994 form·<code·class="inline">{Required,Value}</code>.</p><p>See·also·<a·href="#get_config/1"><code·class="inline">ct:get_config/1</code></a>,
1995 <a·href="#get_config/2"><code·class="inline">ct:get_config/2</code></a>,·<a·href="#require/1"><code·class="inline">ct:require/1</code></a>,1995 <a·href="#get_config/2"><code·class="inline">ct:get_config/2</code></a>,·<a·href="#require/1"><code·class="inline">ct:require/1</code></a>,
1996 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>.</p>1996 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>.</p>
Offset 2022, 15 lines modifiedOffset 2022, 15 lines modified
2022 ······<div·class="specs">2022 ······<div·class="specs">
  
2023 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_event_mgr_ref()·->·EvMgrRef·when·EvMgrRef·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>().</pre>2023 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_event_mgr_ref()·->·EvMgrRef·when·EvMgrRef·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>().</pre>
  
2024 ······</div>2024 ······</div>
  
2025 <p>Gets·a·reference·to·the·<code·class="inline">Common·Test</code>·event·manager.·The·reference·can·be·used2025 <p>Gets·a·reference·to·the·<code·class="inline">Common·Test</code>·event·manager.·The·reference·can·be·used
2026 to,·for·example,·add·a·user-specific·event·handler·while·tests·are·running.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="6314048363-1">(</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_event_mgr_ref</span><span·class="p"·data-group-id="6314048363-2">(</span><span·class="p"·data-group-id="6314048363-2">)</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·237,·SHA:·b64625a84c111ea3e34285fddaadbfbbc87a302154c84994096d3c9cced821d2·...·]-1">)</span></code></pre>2026 to,·for·example,·add·a·user-specific·event·handler·while·tests·are·running.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="4806579538-1">(</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_event_mgr_ref</span><span·class="p"·data-group-id="4806579538-2">(</span><span·class="p"·data-group-id="4806579538-2">)</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·237,·SHA:·97851cf3158dc6abb619ae42aa7d69fbc10c789abaeaf7f10459729016c5e008·...·]-1">)</span></code></pre>
2027 ··</section>2027 ··</section>
2028 </section>2028 </section>
2029 <section·class="detail"·id="get_progname/0">2029 <section·class="detail"·id="get_progname/0">
  
2030 ··<div·class="detail-header">2030 ··<div·class="detail-header">
2031 ····<a·href="#get_progname/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2031 ····<a·href="#get_progname/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2032 ······<i·class="ri-link-m"·aria-hidden="true"></i>2032 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 2311, 15 lines modifiedOffset 2311, 15 lines modified
2311 ·····················KeyOrFile·::·{key,·Key}·|·{file,·KeyFile},2311 ·····················KeyOrFile·::·{key,·Key}·|·{file,·KeyFile},
2312 ·····················Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),2312 ·····················Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
2313 ·····················KeyFile·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),2313 ·····················KeyFile·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
2314 ·····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>2314 ·····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
2315 ······</div>2315 ······</div>
  
2316 <p>Installs·configuration·files·and·event·handlers.</p><p>Run·this·function·once·before·the·first·test.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">install</span><span·class="p"·data-group-id="8665041474-1">(</span><span·class="p"·data-group-id="8665041474-2">[</span><span·class="p"·data-group-id="8665041474-3">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="p"·data-group-id="8665041474-4">[</span><span·class="s">&quot[·...·truncated·by·diffoscope;·len:·303,·SHA:·92576f256fa65fb3997216f3393237bebe28e499e55792817a43b960aa512f3e·...·]-1">)</span></code></pre><p>This·function·is·automatically·run·by·program·<code·class="inline">ct_run</code>.</p>2316 <p>Installs·configuration·files·and·event·handlers.</p><p>Run·this·function·once·before·the·first·test.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">install</span><span·class="p"·data-group-id="5385910099-1">(</span><span·class="p"·data-group-id="5385910099-2">[</span><span·class="p"·data-group-id="5385910099-3">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="p"·data-group-id="5385910099-4">[</span><span·class="s">&quot[·...·truncated·by·diffoscope;·len:·303,·SHA:·35b0454d2470bbcf189a990a07c309107e727e20afe1b6d7bdfe675ec204fc6a·...·]-1">)</span></code></pre><p>This·function·is·automatically·run·by·program·<code·class="inline">ct_run</code>.</p>
2317 ··</section>2317 ··</section>
2318 </section>2318 </section>
2319 <section·class="detail"·id="listenv/1">2319 <section·class="detail"·id="listenv/1">
  
2320 ··<div·class="detail-header">2320 ··<div·class="detail-header">
2321 ····<a·href="#listenv/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2321 ····<a·href="#listenv/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2322 ······<i·class="ri-link-m"·aria-hidden="true"></i>2322 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 3148, 15 lines modifiedOffset 3148, 15 lines modified
3148 ·····················SubKey·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),3148 ·····················SubKey·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),
3149 ·····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>3149 ·····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3150 ······</div>3150 ······</div>
  
3151 <p>Checks·if·the·required·configuration·is·available.·Arbitrarily·deep·tuples·can3151 <p>Checks·if·the·required·configuration·is·available.·Arbitrarily·deep·tuples·can
3152 be·specified·as·<code·class="inline">Required</code>.·Only·the·last·element·of·the·tuple·can·be·a·list·of3152 be·specified·as·<code·class="inline">Required</code>.·Only·the·last·element·of·the·tuple·can·be·a·list·of
3153 <code·class="inline">SubKey</code>s.</p><p><em>Example·1.</em>·Require·the·variable·<code·class="inline">myvar</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="2175127830-1">(</span><span·class="ss">myvar</span><span·class="p"·data-group-id="2175127830-1">)</span><span·class="p">.</span></code></pre><p>In·this·case·the·configuration·file·must·at·least·contain:</p><pre><code·class="makeup·erlang"·translate="no"><s[·...·truncated·by·diffoscope;·len:·3488,·SHA:·89849d98558c0503ebc9fb1e48a50a63b1114727a9f1567ceac09e5d72b17c05·...·]-1">}</span><span·class="p">.</span></code></pre><p>See·also·<a·href="#get_config/1"><code·class="inline">ct:get_config/1</code></a>,3153 <code·class="inline">SubKey</code>s.</p><p><em>Example·1.</em>·Require·the·variable·<code·class="inline">myvar</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="3099916285-1">(</span><span·class="ss">myvar</span><span·class="p"·data-group-id="3099916285-1">)</span><span·class="p">.</span></code></pre><p>In·this·case·the·configuration·file·must·at·least·contain:</p><pre><code·class="makeup·erlang"·translate="no"><s[·...·truncated·by·diffoscope;·len:·3488,·SHA:·83ec3e7a965337ff0f0f16ec89c69223da53b65e0857b42fd58863f967f293bf·...·]-1">}</span><span·class="p">.</span></code></pre><p>See·also·<a·href="#get_config/1"><code·class="inline">ct:get_config/1</code></a>,
3154 <a·href="#get_config/2"><code·class="inline">ct:get_config/2</code></a>,·<a·href="#get_config/3"><code·class="inline">ct:get_config/3</code></a>,3154 <a·href="#get_config/2"><code·class="inline">ct:get_config/2</code></a>,·<a·href="#get_config/3"><code·class="inline">ct:get_config/3</code></a>,
3155 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>.</p>3155 <a·href="#require/2"><code·class="inline">ct:require/2</code></a>.</p>
3156 ··</section>3156 ··</section>
3157 </section>3157 </section>
3158 <section·class="detail"·id="require/2">3158 <section·class="detail"·id="require/2">
  
3159 ··<div·class="detail-header">3159 ··<div·class="detail-header">
Offset 3190, 16 lines modifiedOffset 3190, 16 lines modified
  
3190 <p>Checks·if·the·required·configuration·is·available·and·gives·it·a·name.·The3190 <p>Checks·if·the·required·configuration·is·available·and·gives·it·a·name.·The
3191 semantics·for·<code·class="inline">Required</code>·is·the·same·as·in·<a·href="#require/1"><code·class="inline">ct:require/1</code></a>·except3191 semantics·for·<code·class="inline">Required</code>·is·the·same·as·in·<a·href="#require/1"><code·class="inline">ct:require/1</code></a>·except
3192 that·a·list·of·<code·class="inline">SubKey</code>s·cannot·be·specified.</p><p>If·the·requested·data·is·available,·the·subentry·is·associated·with·<code·class="inline">Name</code>·so3192 that·a·list·of·<code·class="inline">SubKey</code>s·cannot·be·specified.</p><p>If·the·requested·data·is·available,·the·subentry·is·associated·with·<code·class="inline">Name</code>·so
3193 that·the·value·of·the·element·can·be·read·with3193 that·the·value·of·the·element·can·be·read·with
3194 <a·href="#get_config/1"><code·class="inline">ct:get_config/1,2</code></a>·provided·<code·class="inline">Name</code>·is·used·instead·of·the3194 <a·href="#get_config/1"><code·class="inline">ct:get_config/1,2</code></a>·provided·<code·class="inline">Name</code>·is·used·instead·of·the
3195 whole·<code·class="inline">Required</code>·term.</p><p><em>Example:</em></p><p>Require·one·node·with·a·Telnet·connection·and·an·FTP·connection.·Name·the·node3195 whole·<code·class="inline">Required</code>·term.</p><p><em>Example:</em></p><p>Require·one·node·with·a·Telnet·connection·and·an·FTP·connection.·Name·the·node
3196 <code·class="inline">a</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="3617388857-1">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="p"·data-group-id="3617388857-2">{</span><span·class="ss">machine</span><span·class="p">,</span><span·class="nb">node</span><span·class="p"·data-group-id="3617388857-2">}</span><span·class="p"·data-group-id="3617388857-1">)</span><span·class="p">.</span></code></pre><p>All·references·to·this·node·can·then·use·the·node·name.·For·example,·a·file·over 
3197 FTP·is·fetched·like·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">ftp_get</sp[·...·truncated·by·diffoscope;·len:·1510,·SHA:·19cb312c191d7a6040cd383f59a33a6f517d0d1c6a5ca9ec96c382f144a36eda·...·]3196 <code·class="inline">a</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</[·...·truncated·by·diffoscope;·len:·469,·SHA:·ad0a760c5845fc00e54cb0819d3829be08a4ba39187796bc33566a1339b0c4c5·...·]
 3197 FTP·is·fetched·like·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">ftp_get</span><span·class="p"·data-group-id="7292361781-1">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="n">RemoteFile</span><span·class="p">,</span><span·class="n">LocalFile</span><span·class="p"·data-group-id="7292361781-1">)</span><span·class="p">.</span></code></pre><p>For·this·to·work,·the·configuration·file·must·at·least·contain:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3185095018-1">{</span><span·class="ss">machine</span><span·class="p">,</span><span·class="p"·data-group-id="3185095018-2">[</span><span·class="p"·data-group-id="3185095018-3">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="3185095018-4">[</span><span·class="p"·data-group-id="3185095018-5">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="n">IpAddr</span><span·class="p"·data-group-id="3185095018-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="3185095018-6">{</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="n">IpAddr</span><span·class="p"·data-group-id="3185095018-6">}</span><span·class="p"·data-group-id="3185095018-4">]</span><span·class="p"·data-group-id="3185095018-3">}</span><span·class="p"·data-group-id="3185095018-2">]</span><span·class="p"·data-group-id="3185095018-1">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>The·behavior·of·this·function·changed·radically·in·<code·class="inline">Common·Test</code>·1.6.2.·To
3198 keep·some·backwards·compatibility,·it·is·still·possible·to·do:3198 keep·some·backwards·compatibility,·it·is·still·possible·to·do:
3199 <code·class="inline">ct:require(a,{node,[telnet,ftp]}).</code>·This·associates·the·name·<code·class="inline">a</code>·with·the3199 <code·class="inline">ct:require(a,{node,[telnet,ftp]}).</code>·This·associates·the·name·<code·class="inline">a</code>·with·the
3200 top-level·<code·class="inline">node</code>·entry.·For·this·to·work,·the·configuration·file·must·at·least3200 top-level·<code·class="inline">node</code>·entry.·For·this·to·work,·the·configuration·file·must·at·least
3201 contain:·<code·class="inline">{node,[{telnet,IpAddr},{ftp,IpAddr}]}.</code></p></blockquote><p>See·also·<a·href="#get_config/1"><code·class="inline">ct:get_config/1</code></a>,3201 contain:·<code·class="inline">{node,[{telnet,IpAddr},{ftp,IpAddr}]}.</code></p></blockquote><p>See·also·<a·href="#get_config/1"><code·class="inline">ct:get_config/1</code></a>,
3202 <a·href="#get_config/2"><code·class="inline">ct:get_config/2</code></a>,·<a·href="#get_config/3"><code·class="inline">ct:get_config/3</code></a>,3202 <a·href="#get_config/2"><code·class="inline">ct:get_config/2</code></a>,·<a·href="#get_config/3"><code·class="inline">ct:get_config/3</code></a>,
3203 <a·href="#require/1"><code·class="inline">ct:require/1</code></a>.</p>3203 <a·href="#require/1"><code·class="inline">ct:require/1</code></a>.</p>
3204 ··</section>3204 ··</section>
Offset 3566, 20 lines modifiedOffset 3566, 20 lines modified
  
3566 ······</div>3566 ······</div>
  
3567 <p>Starts·<code·class="inline">Common·Test</code>·in·interactive·mode.</p><p>From·this·mode,·all·test·case·support·functions·can·be·executed·directly·from3567 <p>Starts·<code·class="inline">Common·Test</code>·in·interactive·mode.</p><p>From·this·mode,·all·test·case·support·functions·can·be·executed·directly·from
3568 the·Erlang·shell.·The·interactive·mode·can·also·be·started·from·the·OS·command3568 the·Erlang·shell.·The·interactive·mode·can·also·be·started·from·the·OS·command
3569 line·with·<code·class="inline">ct_run·-shell·[-config·File...]</code>.</p><p>If·any·functions·(for·example,·Telnet·or·FTP)·using·&quot;required·configuration3569 line·with·<code·class="inline">ct_run·-shell·[-config·File...]</code>.</p><p>If·any·functions·(for·example,·Telnet·or·FTP)·using·&quot;required·configuration
3570 data&quot;·are·to·be·called·from·the·Erlang·shell,·configuration·data·must·first·be3570 data&quot;·are·to·be·called·from·the·Erlang·shell,·configuration·data·must·first·be
3571 required·with·<a·href="#require/2"><code·class="inline">ct:require/2</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="5252854524-1">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p"·data-group-id="5252854524-1">)</span><span·class="p">.</span><span·class="w">3571 required·with·<a·href="#require/2"><code·class="inline">ct:require/2</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="9644703761-1">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p"·data-group-id="9644703761-1">)</span><span·class="p">.</span><span·class="w">
3572 </span><span·class="ss">ok</span><span·class="gp·unselectable">3572 </span><span·class="ss">ok</span><span·class="gp·unselectable">
3573 &gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="5252854524-2">(</span><span·class="ss">unix_telnet</span><span·class="p"·data-group-id="5252854524-2">)</span><span·class="p">.</span><span·class="w">3573 &gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="9644703761-2">(</span><span·class="ss">unix_telnet</span><span·class="p"·data-group-id="9644703761-2">)</span><span·class="p">.</span><span·class="w">
3574 </span><span·class="p"·data-group-id="5252854524-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.105</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5252854524-3">}</span><span·class="gp·unselectable">3574 </span><span·class="p"·data-group-id="9644703761-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.105</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9644703761-3">}</span><span·class="gp·unselectable">
3575 &gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="5252854524-4">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ls·.&quot;</span><span·class="p"·data-group-id="5252854524-4">)</span><span·class="p">.</span><span·class="w">3575 &gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="9644703761-4">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ls·.&quot;</span><span·class="p"·data-group-id="9644703761-4">)</span><span·class="p">.</span><span·class="w">
3576 </span><span·class="p"·data-group-id="5252854524-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5252854524-6">[</span><span·class="s">&quot;ls&quot;</span><span·class="p">,</span><span·class="s">&quot;file1··...&quot;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·165,·SHA:·8026c70dc9158464b37a4503d23fc097ad5fe96d74e39a80cc99f499fc7fdbc6·...·]-5">}</span></code></pre>3576 </span><span·class="p"·data-group-id="9644703761-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9644703761-6">[</span><span·class="s">&quot;ls&quot;</span><span·class="p">,</span><span·class="s">&quot;file1··...&quot;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·165,·SHA:·c2697d225855ce4c2a2a9e1a3fd8df66be73b9fdd1a666200c047526b0676de4·...·]-5">}</span></code></pre>
3577 ··</section>3577 ··</section>
3578 </section>3578 </section>
3579 <section·class="detail"·id="step/3">3579 <section·class="detail"·id="step/3">
  
3580 ··<div·class="detail-header">3580 ··<div·class="detail-header">
3581 ····<a·href="#step/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3581 ····<a·href="#step/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3582 ······<i·class="ri-link-m"·aria-hidden="true"></i>3582 ······<i·class="ri-link-m"·aria-hidden="true"></i>
4.75 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_ftp.html
    
Offset 585, 18 lines modifiedOffset 585, 18 lines modified
585 ·················LocalFile·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename/0">file:filename</a>(),585 ·················LocalFile·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename/0">file:filename</a>(),
586 ·················RemoteFile·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename/0">file:filename</a>(),586 ·················RemoteFile·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename/0">file:filename</a>(),
587 ·················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>587 ·················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
588 ······</div>588 ······</div>
  
589 <p>Opens·an·FTP·connection·and·sends·a·file·to·the·remote·host.</p><p><code·class="inline">LocalFile</code>·and·<code·class="inline">RemoteFile</code>·must·be·absolute·paths.</p><p>For·<code·class="inline">target_name</code>,·see·module·<a·href="ct.html"><code·class="inline">ct</code></a>.</p><p>If·the·target·host·is·a·&quot;special&quot;·node,·the·FTP·address·must·be·specified·in·the589 <p>Opens·an·FTP·connection·and·sends·a·file·to·the·remote·host.</p><p><code·class="inline">LocalFile</code>·and·<code·class="inline">RemoteFile</code>·must·be·absolute·paths.</p><p>For·<code·class="inline">target_name</code>,·see·module·<a·href="ct.html"><code·class="inline">ct</code></a>.</p><p>If·the·target·host·is·a·&quot;special&quot;·node,·the·FTP·address·must·be·specified·in·the
590 configuration·file·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2353351736-1">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="2353351736-2">[</span><span·class="p"·data-group-id="2353351736-3">{</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="n">IpAddr</span><span·class="p"·data-group-id="2353351736-3">}</span><span·class="p"·data-group-id="2353351736-2">]</span><span·class="p"·data-group-id="2353351736-1">}</span><span·class="p">.</span></code></pre><p>If·the·target·host·is·something·else,·for·example,·a·UNIX·host,·the 
591 configuration·file·must·also·include·the·username·and·password·(both·strings):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5102579510-1">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="p"·data-group-id="510257951[·...·truncated·by·diffoscope;·len:·239,·SHA:·46fbb642cbb6f99d2b8a8e3272f838890c3fb1469105239ddf5327d4d9c3b5e0·...·]590 configuration·file·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2875265399-1">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="p"·data-group-id="2875265399-2">[</span><span·class="p"·data-group-id="2875[·...·truncated·by·diffoscope;·len:·364,·SHA:·be06074739c86f7ab30709c9fa3bc5924b159118222da626ddba8b064cf84b49·...·]
 591 configuration·file·must·also·include·the·username·and·password·(both·strings):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9368766139-1">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="p"·data-group-id="9368766139-2">[</span><span·class="p"·data-group-id="9368766139-3">{</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="n">IpAddr</span><span·class="p"·data-group-id="9368766139-3">}</span><span·class="p">,</span><span·class="w">
592 ·······</span><span·class="p"·data-group-id="5102579510-4">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">Username</span><span·class="p"·data-group-id="5102579510-4">}</span><span·class="p">,</span><span·class="w">592 ·······</span><span·class="p"·data-group-id="9368766139-4">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">Username</span><span·class="p"·data-group-id="9368766139-4">}</span><span·class="p">,</span><span·class="w">
593 ·······</span><span·class="p"·data-group-id="5102579510-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="5102579510-5">}</span><span·class="p"·data-group-id="5102579510-2">]</span><span·class="p"·data-group-id="5102579510-1">}</span><span·class="p">.</span></code></pre><p>See·also·<a·href="ct.html#require/2"><code·class="inline">ct:require/2</code></a>.</p>593 ·······</span><span·class="p"·data-group-id="9368766139-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="9368766139-5">}</span><span·class="p"·data-group-id="9368766139-2">]</span><span·class="p"·data-group-id="9368766139-1">}</span><span·class="p">.</span></code></pre><p>See·also·<a·href="ct.html#require/2"><code·class="inline">ct:require/2</code></a>.</p>
594 ··</section>594 ··</section>
595 </section>595 </section>
596 <section·class="detail"·id="recv/2">596 <section·class="detail"·id="recv/2">
  
597 ··<div·class="detail-header">597 ··<div·class="detail-header">
598 ····<a·href="#recv/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">598 ····<a·href="#recv/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
599 ······<i·class="ri-link-m"·aria-hidden="true"></i>599 ······<i·class="ri-link-m"·aria-hidden="true"></i>
60.0 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_hooks_chapter.html
    
Offset 249, 20 lines modifiedOffset 249, 20 lines modified
249 </h3>249 </h3>
250 <p>In·a·CTH,·the·behavior·can·be·hooked·in·before·the·following·functions:</p><ul><li><a·href="ct_suite.html#c:init_per_suite/1"><code·class="inline">init_per_suite</code></a></li><li><a·href="ct_suite.html#c:init_per_group/2"><code·class="inline">init_per_group</code></a></li><li><a·href="ct_suite.html#c:init_per_testcase/2"><code·class="inline">init_per_testcase</code></a></li><li><a·href="ct_suite.html#c:end_per_testcase/2"><code·class="inline">end_per_testcase</code></a></li><li><a·href="ct_suite.html#c:end_per_group/2"><code·class="inline">end_per_group</code></a></li><li><a·href="ct_suite.html#c:end_per_suite/1"><code·class="inline">end_per_suite</code></a></li></ul><p>This·is·done·in·the·CTH·functions·called·<code·class="inline">pre_&lt;name·of·function&gt;</code>.·These250 <p>In·a·CTH,·the·behavior·can·be·hooked·in·before·the·following·functions:</p><ul><li><a·href="ct_suite.html#c:init_per_suite/1"><code·class="inline">init_per_suite</code></a></li><li><a·href="ct_suite.html#c:init_per_group/2"><code·class="inline">init_per_group</code></a></li><li><a·href="ct_suite.html#c:init_per_testcase/2"><code·class="inline">init_per_testcase</code></a></li><li><a·href="ct_suite.html#c:end_per_testcase/2"><code·class="inline">end_per_testcase</code></a></li><li><a·href="ct_suite.html#c:end_per_group/2"><code·class="inline">end_per_group</code></a></li><li><a·href="ct_suite.html#c:end_per_suite/1"><code·class="inline">end_per_suite</code></a></li></ul><p>This·is·done·in·the·CTH·functions·called·<code·class="inline">pre_&lt;name·of·function&gt;</code>.·These
251 functions·take·the·arguments·<code·class="inline">SuiteName</code>,·<code·class="inline">Name</code>·(group·or·test·case·name,·if251 functions·take·the·arguments·<code·class="inline">SuiteName</code>,·<code·class="inline">Name</code>·(group·or·test·case·name,·if
252 applicable),·<code·class="inline">Config</code>,·and·<code·class="inline">CTHState</code>.·The·return·value·of·the·CTH·function·is252 applicable),·<code·class="inline">Config</code>,·and·<code·class="inline">CTHState</code>.·The·return·value·of·the·CTH·function·is
253 always·a·combination·of·a·result·for·the·suite/group/test·and·an·updated253 always·a·combination·of·a·result·for·the·suite/group/test·and·an·updated
254 <code·class="inline">CTHState</code>.</p><p>To·let·the·test·suite·continue·on·executing,·return·the·configuration·list·that254 <code·class="inline">CTHState</code>.</p><p>To·let·the·test·suite·continue·on·executing,·return·the·configuration·list·that
255 you·want·the·test·to·use·as·the·result.</p><p>All·pre·hooks,·except·<code·class="inline">pre_end_per_testcase/4</code>,·can·skip·or·fail·the·test·by255 you·want·the·test·to·use·as·the·result.</p><p>All·pre·hooks,·except·<code·class="inline">pre_end_per_testcase/4</code>,·can·skip·or·fail·the·test·by
256 returning·a·tuple·with·<code·class="inline">skip</code>·or·<code·class="inline">fail</code>,·and·a·reason·as·the·result.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">pre_init_per_suite</span><span·class="p"·data-group-id="1826582057-1">(</span><span·class="n">SuiteName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CTHState</span><span·class="p"·data-group-id="1826582057-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">256 returning·a·tuple·with·<code·class="inline">skip</code>·or·<code·class="inline">fail</code>,·and·a·reason·as·the·result.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">pre_init_per_suite</span><span·class="p"·data-group-id="1255286689-1">(</span><span·class="n">SuiteName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CTHState</span><span·class="p"·data-group-id="1255286689-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
257 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="1826582057-2">(</span><span·class="p"·data-group-id="1826582057-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">257 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="1255286689-2">(</span><span·class="p"·data-group-id="1255286689-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
258 ····</span><span·class="p"·data-group-id="1826582057-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p"·data-group-id="1826582057-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">258 ····</span><span·class="p"·data-group-id="1255286689-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p"·data-group-id="1255286689-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
259 ······</span><span·class="p"·data-group-id="1826582057-4">{</span><span·class="p"·data-group-id="1826582057-5">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Could·not·connect·to·DB&quot;</span><span·class="p"·data-group-id="1826582057-5">}</[·...·truncated·by·diffoscope;·len:·125,·SHA:·0651420c7a3da0589dd6d21a99e56f1666b29591f7c0ff40eaa2dcb1def15d19·...·]-4">}</span><span·class="p">;</span><span·class="w">259 ······</span><span·class="p"·data-group-id="1255286689-4">{</span><span·class="p"·data-group-id="1255286689-5">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Could·not·connect·to·DB&quot;</span><span·class="p"·data-group-id="1255286689-5">}</[·...·truncated·by·diffoscope;·len:·125,·SHA:·27dc0393ff18af65fea54704c1dceaa036108bec6b822daec32a9ab482024f8a·...·]-4">}</span><span·class="p">;</span><span·class="w">
260 ····</span><span·class="p"·data-group-id="1826582057-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handle</span><span·class="p"·data-group-id="1826582057-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">260 ····</span><span·class="p"·data-group-id="1255286689-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handle</span><span·class="p"·data-group-id="1255286689-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
261 ······</span><span·class="p"·data-group-id="1826582057-7">{</span><span·class="p"·data-group-id="1826582057-8">[</span><span·class="p"·data-group-id="1826582057-9">{</span><span·class="ss">db_handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handle</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·648,·SHA:·9744ca432647f970dd036768a910b43b28782b87d854d7ffd77674580f575764·...·]-7">}</span><span·class="w">261 ······</span><span·class="p"·data-group-id="1255286689-7">{</span><span·class="p"·data-group-id="1255286689-8">[</span><span·class="p"·data-group-id="1255286689-9">{</span><span·class="ss">db_handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handle</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·648,·SHA:·835f8582e03d2030ce5b5bafe7969a560aab2af29eb27db58e0de144913853ca·...·]-7">}</span><span·class="w">
262 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>If·you·use·multiple·CTHs,·the·first·part·of·the·return·tuple·is·used·as·input262 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>If·you·use·multiple·CTHs,·the·first·part·of·the·return·tuple·is·used·as·input
263 for·the·next·CTH.·So·in·the·previous·example·the·next·CTH·can·get263 for·the·next·CTH.·So·in·the·previous·example·the·next·CTH·can·get
264 <code·class="inline">{fail,Reason}</code>·as·the·second·parameter.·If·you·have·many·CTHs·interacting,·do264 <code·class="inline">{fail,Reason}</code>·as·the·second·parameter.·If·you·have·many·CTHs·interacting,·do
265 not·let·each·CTH·return·<code·class="inline">fail</code>·or·<code·class="inline">skip</code>.·Instead,·return·that·an·action·is·to265 not·let·each·CTH·return·<code·class="inline">fail</code>·or·<code·class="inline">skip</code>.·Instead,·return·that·an·action·is·to
266 be·taken·through·the·<code·class="inline">Config</code>·list·and·implement·a·CTH·that,·at·the·end,·takes266 be·taken·through·the·<code·class="inline">Config</code>·list·and·implement·a·CTH·that,·at·the·end,·takes
267 the·correct·action.</p></blockquote><p><a·href=""·id="post"></a></p><h3·id="post-hooks"·class="section-heading">267 the·correct·action.</p></blockquote><p><a·href=""·id="post"></a></p><h3·id="post-hooks"·class="section-heading">
268 ··<a·href="#post-hooks"·class="hover-link">268 ··<a·href="#post-hooks"·class="hover-link">
Offset 276, 26 lines modifiedOffset 276, 26 lines modified
276 same·<code·class="inline">Config</code>·as·the·testcase·is·called·with.·<code·class="inline">Return</code>·is·the·value·returned·by276 same·<code·class="inline">Config</code>·as·the·testcase·is·called·with.·<code·class="inline">Return</code>·is·the·value·returned·by
277 the·testcase.·If·the·testcase·fails·by·crashing,·<code·class="inline">Return</code>·is277 the·testcase.·If·the·testcase·fails·by·crashing,·<code·class="inline">Return</code>·is
278 <code·class="inline">{'EXIT',{{Error,Reason},Stacktrace}}</code>.</p><p>The·return·value·of·the·CTH·function·is·always·a·combination·of·a·result·for·the278 <code·class="inline">{'EXIT',{{Error,Reason},Stacktrace}}</code>.</p><p>The·return·value·of·the·CTH·function·is·always·a·combination·of·a·result·for·the
279 suite/group/test·and·an·updated·<code·class="inline">CTHState</code>.·If·you·do·not·want·the·callback·to279 suite/group/test·and·an·updated·<code·class="inline">CTHState</code>.·If·you·do·not·want·the·callback·to
280 affect·the·outcome·of·the·test,·return·the·<code·class="inline">Return</code>·data·as·it·is·given·to·the280 affect·the·outcome·of·the·test,·return·the·<code·class="inline">Return</code>·data·as·it·is·given·to·the
281 CTH.·You·can·also·modify·the·test·result.·By·returning·the·<code·class="inline">Config</code>·list·with281 CTH.·You·can·also·modify·the·test·result.·By·returning·the·<code·class="inline">Config</code>·list·with
282 element·<code·class="inline">tc_status</code>·removed,·you·can·recover·from·a·test·failure.·As·in·all·the282 element·<code·class="inline">tc_status</code>·removed,·you·can·recover·from·a·test·failure.·As·in·all·the
283 pre·hooks,·it·is·also·possible·to·fail/skip·the·test·case·in·the·post·hook.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">post_end_per_testcase</span><span·class="p"·data-group-id="6814018847-1">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·cl[·...·truncated·by·diffoscope;·len:·506,·SHA:·3a8f228de8d78aa4ab831a02c021b5b8ee297e718c3f6ddcddedf1429593a909·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">283 pre·hooks,·it·is·also·possible·to·fail/skip·the·test·case·in·the·post·hook.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">post_end_per_testcase</span><span·class="p"·data-group-id="0564861135-1">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·cl[·...·truncated·by·diffoscope;·len:·506,·SHA:·fd16a6a88d43ba9c624405a2e841e6318ab0cf9ec559c4075e7f50b9f8f870a7·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
284 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">check_consistency</span><span·class="p"·data-group-id="6814018847-4">(</span><span·class="p"·data-group-id="6814018847-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">284 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">check_consistency</span><span·class="p"·data-group-id="0564861135-4">(</span><span·class="p"·data-group-id="0564861135-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
285 ····</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">285 ····</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
286 ······</span><span·class="c1">%%·DB·is·good,·pass·the·test.</span><span·class="w">286 ······</span><span·class="c1">%%·DB·is·good,·pass·the·test.</span><span·class="w">
287 ······</span><span·class="p"·data-group-id="6814018847-5">{</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="6814018847-6">(</span><span·class="ss">tc_status</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·189,·SHA:·2d1e16ee9dcda7315127f041de65b0d6942cce8408f752c9b8b99a151ae270a2·...·]-5">}</span><span·class="p">;</span><span·class="w">287 ······</span><span·class="p"·data-group-id="0564861135-5">{</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="0564861135-6">(</span><span·class="ss">tc_status</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·189,·SHA:·d2113206e0cccc2dc11e8cbe49cfe70a32e12126d1591bfe17486c062743227a·...·]-5">}</span><span·class="p">;</span><span·class="w">
288 ····</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">288 ····</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
289 ······</span><span·class="c1">%%·DB·is·not·good,·mark·as·skipped·instead·of·failing</span><span·class="w">289 ······</span><span·class="c1">%%·DB·is·not·good,·mark·as·skipped·instead·of·failing</span><span·class="w">
290 ······</span><span·class="p"·data-group-id="6814018847-7">{</span><span·class="p"·data-group-id="6814018847-8">{</span><span·class="ss">skip</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;DB·is·inconsistent!&quot;</span><span·class="p"·data-group-id="6814018847-8">}</spa[·...·truncated·by·diffoscope;·len:·122,·SHA:·cee25b0946e0ba1feb3593ce76d1c19b0bde4817f47ca30f711886b297f59f52·...·]-7">}</span><span·class="w">290 ······</span><span·class="p"·data-group-id="0564861135-7">{</span><span·class="p"·data-group-id="0564861135-8">{</span><span·class="ss">skip</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;DB·is·inconsistent!&quot;</span><span·class="p"·data-group-id="0564861135-8">}</spa[·...·truncated·by·diffoscope;·len:·122,·SHA:·ba3f7e8b1753faf876f232f9672cbd11cd187b2617b9b640acf16a81ab107f18·...·]-7">}</span><span·class="w">
291 ··</span><span·class="k">end</span><span·class="p">;</span><span·class="w">291 ··</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
292 </span><span·class="nf">post_end_per_testcase</span><span·class="p"·data-group-id="6814018847-9">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·cl[·...·truncated·by·diffoscope;·len:·189,·SHA:·8ed12d065a72fc032ac2b553b4f54cee1a248e09e76da3f74bc08bed5727441c·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">292 </span><span·class="nf">post_end_per_testcase</span><span·class="p"·data-group-id="0564861135-9">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·cl[·...·truncated·by·diffoscope;·len:·189,·SHA:·a6e2c01b7561f1865d7a92b47e076e08d378f626eccda07e7ed1a4a699fe35e1·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
293 ··</span><span·class="c1">%%·Do·nothing·if·tc·does·not·crash.</span><span·class="w">293 ··</span><span·class="c1">%%·Do·nothing·if·tc·does·not·crash.</span><span·class="w">
294 ··</span><span·class="p"·data-group-id="6814018847-10">{</span><span·class="n">Return</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CTHState</span><span·class="p"·data-group-id="6814018847-10">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>Do·recover·from·a·testcase·failure·using·CTHs·only·a·last·resort.·If·used294 ··</span><span·class="p"·data-group-id="0564861135-10">{</span><span·class="n">Return</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CTHState</span><span·class="p"·data-group-id="0564861135-10">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>Do·recover·from·a·testcase·failure·using·CTHs·only·a·last·resort.·If·used
295 wrongly,·it·can·be·very·difficult·to·determine·which·tests·that·pass·or·fail295 wrongly,·it·can·be·very·difficult·to·determine·which·tests·that·pass·or·fail
296 in·a·test·run.</p></blockquote><h3·id="skip-and-fail-hooks"·class="section-heading">296 in·a·test·run.</p></blockquote><h3·id="skip-and-fail-hooks"·class="section-heading">
297 ··<a·href="#skip-and-fail-hooks"·class="hover-link">297 ··<a·href="#skip-and-fail-hooks"·class="hover-link">
298 ····<i·class="ri-link-m"·aria-hidden="true"></i>298 ····<i·class="ri-link-m"·aria-hidden="true"></i>
299 ··</a>299 ··</a>
300 ··<span·class="text">Skip·and·Fail·Hooks</span>300 ··<span·class="text">Skip·and·Fail·Hooks</span>
301 </h3>301 </h3>
Offset 336, 88 lines modifiedOffset 336, 88 lines modified
336 <p>The·following·CTH·logs·information·about·a·test·run·into·a·format·parseable·by336 <p>The·following·CTH·logs·information·about·a·test·run·into·a·format·parseable·by
337 <a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#consult/1"><code·class="inline">file:consult/1</code></a>·(in·Kernel):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%·Common·Test·Example·Common·Test·Hook·module.</span><span·class="w">337 <a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#consult/1"><code·class="inline">file:consult/1</code></a>·(in·Kernel):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%%·Common·Test·Example·Common·Test·Hook·module.</span><span·class="w">
338 </span><span·class="c1">%%%</span><span·class="w">338 </span><span·class="c1">%%%</span><span·class="w">
339 </span><span·class="c1">%%%·To·use·this·hook,·on·the·command·line:</span><span·class="w">339 </span><span·class="c1">%%%·To·use·this·hook,·on·the·command·line:</span><span·class="w">
340 </span><span·class="c1">%%%·····ct_run·-suite·example_SUITE·-pa·.·-ct_hooks·example_cth</span><span·class="w">340 </span><span·class="c1">%%%·····ct_run·-suite·example_SUITE·-pa·.·-ct_hooks·example_cth</span><span·class="w">
341 </span><span·class="c1">%%%</span><span·class="w">341 </span><span·class="c1">%%%</span><span·class="w">
342 </span><span·class="c1">%%%·Note·`-pa·.`:·the·hook·beam·file·must·be·in·the·code·path·when·installing.</span><span·class="w">342 </span><span·class="c1">%%%·Note·`-pa·.`:·the·hook·beam·file·must·be·in·the·code·path·when·installing.</span><span·class="w">
343 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5772279949-1">(</span><span·class="ss">example_cth</span><span·class="p"·data-group-id="5772279949-1">)</span><span·class="p">.</span><span·class="w">343 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4295707933-1">(</span><span·class="ss">example_cth</span><span·class="p"·data-group-id="4295707933-1">)</span><span·class="p">.</span><span·class="w">
  
344 </span><span·class="c1">%%·Mandatory·Callbacks</span><span·class="w">344 </span><span·class="c1">%%·Mandatory·Callbacks</span><span·class="w">
345 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-2">(</span><span·class="p"·data-group-id="5772279949-3">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="5772279949-3">]</span><span·class="p"·data-group-id="5772279949-2">)</span><span·class="p">.</span><span·class="w">345 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-2">(</span><span·class="p"·data-group-id="4295707933-3">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="4295707933-3">]</span><span·class="p"·data-group-id="4295707933-2">)</span><span·class="p">.</span><span·class="w">
  
346 </span><span·class="c1">%%·Optional·Callbacks</span><span·class="w">346 </span><span·class="c1">%%·Optional·Callbacks</span><span·class="w">
347 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-4">(</span><span·class="p"·data-group-id="5772279949-5">[</span><span·class="ss">id</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="5772279949-5">]</span><span·class="p"·data-group-id="5772279949-4">)</span><span·class="p">.</span><span·class="w">347 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-4">(</span><span·class="p"·data-group-id="4295707933-5">[</span><span·class="ss">id</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4295707933-5">]</span><span·class="p"·data-group-id="4295707933-4">)</span><span·class="p">.</span><span·class="w">
348 </span><span·class="w">348 </span><span·class="w">
349 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-6">(</span><span·class="p"·data-group-id="5772279949-7">[</span><span·class="ss">pre_init_per_suite</span><span·class="p">/</span><span·class="mi">3</span><span·class="p"·data-group-id="5772279949-7">]</span><span·class="p"·data-group-id="577227[·...·truncated·by·diffoscope;·len:·4,·SHA:·2d193f61f2f7ab9b4bc37d6cf299989d2d346156ef2aa51c5aa0e15368776ff1·...·]-6">)</span><span·class="p">.</span><span·class="w">349 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-6">(</span><span·class="p"·data-group-id="4295707933-7">[</span><span·class="ss">pre_init_per_suite</span><span·class="p">/</span><span·class="mi">3</span><span·class="p"·data-group-id="4295707933-7">]</span><span·class="p"·data-group-id="429570[·...·truncated·by·diffoscope;·len:·4,·SHA:·cbc565903562bee976dc481a275231af347a86d41bff7e65e4df2a517a34762b·...·]-6">)</span><span·class="p">.</span><span·class="w">
350 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-8">(</span><span·class="p"·data-group-id="5772279949-9">[</span><span·class="ss">post_end_per_suite</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="5772279949-9">]</span><span·class="p"·data-group-id="577227[·...·truncated·by·diffoscope;·len:·4,·SHA:·2d193f61f2f7ab9b4bc37d6cf299989d2d346156ef2aa51c5aa0e15368776ff1·...·]-8">)</span><span·class="p">.</span><span·class="w">350 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-8">(</span><span·class="p"·data-group-id="4295707933-9">[</span><span·class="ss">post_end_per_suite</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="4295707933-9">]</span><span·class="p"·data-group-id="429570[·...·truncated·by·diffoscope;·len:·4,·SHA:·cbc565903562bee976dc481a275231af347a86d41bff7e65e4df2a517a34762b·...·]-8">)</span><span·class="p">.</span><span·class="w">
351 </span><span·class="w">351 </span><span·class="w">
352 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-10">(</span><span·class="p"·data-group-id="5772279949-11">[</span><span·class="ss">pre_init_per_testcase</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="5772279949-11">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·f61229c8afa04cce5d684ff41ccf299c166eb01267e59ada92b99ed470d0c267·...·]-10">)</span><span·class="p">.</span><span·class="w">352 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-10">(</span><span·class="p"·data-group-id="4295707933-11">[</span><span·class="ss">pre_init_per_testcase</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="4295707933-11">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·bc0a0e86fa635b8c1ed77b9ac6e79cca4db6a58d57c0b4dead3e3a888abda0a4·...·]-10">)</span><span·class="p">.</span><span·class="w">
353 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-12">(</span><span·class="p"·data-group-id="5772279949-13">[</span><span·class="ss">post_end_per_testcase</span><span·class="p">/</span><span·class="mi">5</span><span·class="p"·data-group-id="5772279949-13">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·f61229c8afa04cce5d684ff41ccf299c166eb01267e59ada92b99ed470d0c267·...·]-12">)</span><span·class="p">.</span><span·class="w">353 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-12">(</span><span·class="p"·data-group-id="4295707933-13">[</span><span·class="ss">post_end_per_testcase</span><span·class="p">/</span><span·class="mi">5</span><span·class="p"·data-group-id="4295707933-13">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·bc0a0e86fa635b8c1ed77b9ac6e79cca4db6a58d57c0b4dead3e3a888abda0a4·...·]-12">)</span><span·class="p">.</span><span·class="w">
354 </span><span·class="w">354 </span><span·class="w">
355 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-14">(</span><span·class="p"·data-group-id="5772279949-15">[</span><span·class="ss">on_tc_skip</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="5772279949-15">]</span><span·class="p"·data-group-id="5772279949-14">)</span><span·class="p">.</span><span·class="w">355 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-14">(</span><span·class="p"·data-group-id="4295707933-15">[</span><span·class="ss">on_tc_skip</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="4295707933-15">]</span><span·class="p"·data-group-id="4295707933-14">)</span><span·class="p">.</span><span·class="w">
356 </span><span·class="w">356 </span><span·class="w">
357 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5772279949-16">(</span><span·class="p"·data-group-id="5772279949-17">[</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="5772279949-17">]</span><span·class="p"·data-group-id="5772279949-16">)</span><span·class="p">.</span><span·class="w">357 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4295707933-16">(</span><span·class="p"·data-group-id="4295707933-17">[</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4295707933-17">]</span><span·class="p"·data-group-id="4295707933-16">)</span><span·class="p">.</span><span·class="w">
  
358 </span><span·class="c1">%%·This·hook·state·is·threaded·through·all·the·callbacks.</span><span·class="w">358 </span><span·class="c1">%%·This·hook·state·is·threaded·through·all·the·callbacks.</span><span·class="w">
359 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5772279949-18">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5772279949-19">{</span><span·class="ss">filename</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">total[·...·truncated·by·diffoscope;·len:·489,·SHA:·ade49c3bd46d5cda827faf15fa871ca71ac2d327292b1d5ccbd49f845ea64e97·...·]-18">)</span><span·class="p">.</span><span·class="w">359 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4295707933-18">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4295707933-19">{</span><span·class="ss">filename</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">total[·...·truncated·by·diffoscope;·len:·489,·SHA:·99e3f670e4b4be4b945b2de5ac60638230f19a19e47a37ea04215005834243d7·...·]-18">)</span><span·class="p">.</span><span·class="w">
360 </span><span·class="c1">%%·This·example·hook·prints·its·results·to·a·file,·see·terminate/1.</span><span·class="w">360 </span><span·class="c1">%%·This·example·hook·prints·its·results·to·a·file,·see·terminate/1.</span><span·class="w">
361 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5772279949-20">(</span><span·class="ss">test_run</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5772279949-21">{</span><span·class="ss">total</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">skipp[·...·truncated·by·diffoscope;·len:·182,·SHA:·71a70d775684780f608a891abc69781e199708ba690ee65c6b4679ad98af5b5e·...·]-20">)</span><span·class="p">.</span><span·class="w">361 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4295707933-20">(</span><span·class="ss">test_run</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4295707933-21">{</span><span·class="ss">total</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">skipp[·...·truncated·by·diffoscope;·len:·182,·SHA:·360888e2123da8def61802ef2979df7c23426cd84b66fef208e6a83aeffebf8a·...·]-20">)</span><span·class="p">.</span><span·class="w">
  
362 </span><span·class="c1">%%·Return·a·unique·id·for·this·CTH.</span><span·class="w">362 </span><span·class="c1">%%·Return·a·unique·id·for·this·CTH.</span><span·class="w">
363 </span><span·class="c1">%%·Using·the·filename·means·the·hook·can·be·used·with·different</span><span·class="w">363 </span><span·class="c1">%%·Using·the·filename·means·the·hook·can·be·used·with·different</span><span·class="w">
364 </span><span·class="c1">%%·log·files·to·separate·timing·data·within·the·same·test·run.</span><span·class="w">364 </span><span·class="c1">%%·log·files·to·separate·timing·data·within·the·same·test·run.</span><span·class="w">
365 </span><span·class="c1">%%·See·Installing·a·CTH·for·more·information.</span><span·class="w">365 </span><span·class="c1">%%·See·Installing·a·CTH·for·more·information.</span><span·class="w">
366 </span><span·class="nf">id</span><span·class="p"·data-group-id="5772279949-22">(</span><span·class="n">Opts</span><span·class="p"·data-group-id="5772279949-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">366 </span><span·class="nf">id</span><span·class="p"·data-group-id="4295707933-22">(</span><span·class="n">Opts</span><span·class="p"·data-group-id="4295707933-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
367 ····</span><span·class="c1">%%·the·path·is·relative·to·the·test·run·directory</span><span·class="w">367 ····</span><span·class="c1">%%·the·path·is·relative·to·the·test·run·directory</span><span·class="w">
368 ····</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="5772279949-23">(</span><span·class="ss">filename</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;example_cth.log&quot;</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·a0c4f0ec0569f63f68589e6a0984da683a91cd18d45a16e91b5ed728f46f6ff3·...·]-23">)</span><span·class="p">.</span><span·class="w">368 ····</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="4295707933-23">(</span><span·class="ss">filename</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opts</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;example_cth.log&quot;</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·72f7113e5380e18392ca9daa47acc379199846ac05de0b61b50a25202f89d13c·...·]-23">)</span><span·class="p">.</span><span·class="w">
  
369 </span><span·class="c1">%%·Always·called·before·any·other·callback·function.·Use·this·to·initiate</span><span·class="w">369 </span><span·class="c1">%%·Always·called·before·any·other·callback·function.·Use·this·to·initiate</span><span·class="w">
370 </span><span·class="c1">%%·any·common·state.</span><span·class="w">370 </span><span·class="c1">%%·any·common·state.</span><span·class="w">
371 </span><span·class="nf">init</span><span·class="p"·data-group-id="5772279949-24">(</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Opts</span><span·class="p"·data-group-id="5772279949-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">371 </span><span·class="nf">init</span><span·class="p"·data-group-id="4295707933-24">(</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Opts</span><span·class="p"·data-group-id="4295707933-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
372 ····</span><span·class="p"·data-group-id="5772279949-25">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5772279949-26">{</span><span·class="ss">filename</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·602,·SHA:·2207a8d5cec53d4971675927c850c952e691477c431841819b3bc7cec4264d45·...·]-25">}</span><span·class="p">.</span><span·class="w">372 ····</span><span·class="p"·data-group-id="4295707933-25">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4295707933-26">{</span><span·class="ss">filename</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·602,·SHA:·2f16da0d9402cee7e8118004d85eb9ef5b3a6da144fbffb0709865e468abdad8·...·]-25">}</span><span·class="p">.</span><span·class="w">
  
373 </span><span·class="c1">%%·Called·before·init_per_suite·is·called.</span><span·class="w">373 </span><span·class="c1">%%·Called·before·init_per_suite·is·called.</span><span·class="w">
374 </span><span·class="nf">pre_init_per_suite</span><span·class="p"·data-group-id="5772279949-28">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="5772279949-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">374 </span><span·class="nf">pre_init_per_suite</span><span·class="p"·data-group-id="4295707933-28">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="4295707933-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
375 ····</span><span·class="p"·data-group-id="5772279949-29">{</span><span·class="n">Config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5772279949-30">{</span><span·class="ss">suit[·...·truncated·by·diffoscope;·len:·461,·SHA:·855511930c7dd544f7dc033f9682f63201ede383405164b536ec3b638efcc046·...·]-29">}</span><span·class="p">.</span><span·class="w">375 ····</span><span·class="p"·data-group-id="4295707933-29">{</span><span·class="n">Config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4295707933-30">{</span><span·class="ss">suit[·...·truncated·by·diffoscope;·len:·461,·SHA:·d4c57f3ef33baef3a0bde8570cb23e32aa2991f839c69b0f304f441feb4a58eb·...·]-29">}</span><span·class="p">.</span><span·class="w">
  
376 </span><span·class="c1">%%·Called·after·end_per_suite.</span><span·class="w">376 </span><span·class="c1">%%·Called·after·end_per_suite.</span><span·class="w">
377 </span><span·class="nf">post_end_per_suite</span><span·class="p"·data-group-id="5772279949-32">(</span><span·class="n">Suite</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">Return</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·bae21fbe30950f78418a63e6bb425eb906187c678357d7c1938bd474de084017·...·]-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">377 </span><span·class="nf">post_end_per_suite</span><span·class="p"·data-group-id="4295707933-32">(</span><span·class="n">Suite</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">Return</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·24143936676496409fcf961abef60dcc1f47c72035d2fa2b8cb9041d673f2094·...·]-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
378 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5772279949-33">{</span><span·class="ss">suites</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">suite_total</span><span·class="p">,</span><span·class="w">378 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4295707933-33">{</span><span·class="ss">suites</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">suite_total</span><span·class="p">,</span><span·class="w">
379 ············</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="5772279949-34">(</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">tcs</span><span·class="p"·data-group-id="5772279949-34">)</span><span·class="p"·data-group-id="5772279949-33">}</span><span·class="p">,</span><span·class="w">379 ············</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="4295707933-34">(</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">tcs</span><span·class="p"·data-group-id="4295707933-34">)</span><span·class="p"·data-group-id="4295707933-33">}</span><span·class="p">,</span><span·class="w">
380 ····</span><span·class="p"·data-group-id="5772279949-35">{</span><span·class="n">Return</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5772279949-36">{</span><span·class="ss">data[·...·truncated·by·diffoscope;·len:·406,·SHA:·4bfbbdf735967cd548648e203ee493c8094f02046da8f8ac0f74b8650d81b40e·...·]-37">]</span><span·class="p">,</span><span·class="w">380 ····</span><span·class="p"·data-group-id="4295707933-35">{</span><span·class="n">Return</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4295707933-36">{</span><span·class="ss">data[·...·truncated·by·diffoscope;·len:·406,·SHA:·c2972900a053afb5ba76fe2987c44aca23f1fd8489284f6d87f0108999eae02c·...·]-37">]</span><span·class="p">,</span><span·class="w">
381 ·························</span><span·class="ss">total</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">total</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">suite_total</span><span·class="p"·data-group-id="5772279949-36">}</span><span·class="p"·data-group-id="5772279949-35">}</span><span·class="p">.</span><span·class="w">381 ·························</span><span·class="ss">total</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">total</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">suite_total</span><span·class="p"·data-group-id="4295707933-36">}</span><span·class="p"·data-group-id="4295707933-35">}</span><span·class="p">.</span><span·class="w">
  
382 </span><span·class="c1">%%·Called·before·each·init_per_testcase.</span><span·class="w">382 </span><span·class="c1">%%·Called·before·each·init_per_testcase.</span><span·class="w">
383 </span><span·class="nf">pre_init_per_testcase</span><span·class="p"·data-group-id="5772279949-38">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">State</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·1d258eb1421b030d44d10d66a9af2922131a61737846ea2f09a0ee2dc9e55fa4·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">383 </span><span·class="nf">pre_init_per_testcase</span><span·class="p"·data-group-id="4295707933-38">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">State</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·3af8e930c5fe79fc1e6e240bc0e7c675f92341c7e2aaecd848dd42acc3a5b302·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
384 ····</span><span·class="n">Now</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="5772279949-39">(</span><span·class="ss">microsecond</span><span·class="p"·data-group-id="5772279949-39">)</span><span·class="p">,</span><span·class="w">384 ····</span><span·class="n">Now</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="4295707933-39">(</span><span·class="ss">microsecond</span><span·class="p"·data-group-id="4295707933-39">)</span><span·class="p">,</span><span·class="w">
385 ····</span><span·class="p"·data-group-id="5772279949-40">{</span><span·class="n">Config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5772279949-41">{</span><span·class="ss">ts</[·...·truncated·by·diffoscope;·len:·590,·SHA:·0bfadce45e95bad72ffe1d2b27586b8ac4681e68795d6ccbcbcd4dabfcbdca1c·...·]-40">}</span><span·class="p">.</span><span·class="w">385 ····</span><span·class="p"·data-group-id="4295707933-40">{</span><span·class="n">Config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4295707933-41">{</span><span·class="ss">ts</[·...·truncated·by·diffoscope;·len:·590,·SHA:·0f8744b043ee45225e83fb9006e193042e2e1ad65e33056fd06f13af5deec7af·...·]-40">}</span><span·class="p">.</span><span·class="w">
  
386 </span><span·class="c1">%%·Called·after·each·end_per_testcase.</span><span·class="w">386 </span><span·class="c1">%%·Called·after·each·end_per_testcase.</span><span·class="w">
387 </span><span·class="nf">post_end_per_testcase</span><span·class="p"·data-group-id="5772279949-42">(</span><span·class="n">Suite</span><span·class="p">,</span><span·class="n">TC</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">Return</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·67,·SHA:·84b0658a9be85bda2c5eeb13d1685d9778eb38345f19ccb1988bb0cb6882e36b·...·]-42">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">387 </span><span·class="nf">post_end_per_testcase</span><span·class="p"·data-group-id="4295707933-42">(</span><span·class="n">Suite</span><span·class="p">,</span><span·class="n">TC</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Config</span><span·class="p">,</span><span·class="n">Return</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·67,·SHA:·bfc7f506acd6d94afcbf9b2d54daea29d5d2c53787ad3d3418e258120014f584·...·]-42">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
388 ····</span><span·class="n">Now</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="5772279949-43">(</span><span·class="ss">microsecond</span><span·class="p"·data-group-id="5772279949-43">)</span><span·class="p">,</span><span·class="w">388 ····</span><span·class="n">Now</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="4295707933-43">(</span><span·class="ss">microsecond</span><span·class="p"·data-group-id="4295707933-43">)</span><span·class="p">,</span><span·class="w">
389 ····</span><span·class="n">TCInfo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5772279949-44">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·343,·SHA:·75659a5e205755051278ba91e65f5b5153a850f89bca5566de30f25367c10e14·...·]-44">}</span><span·class="p">,</span><span·class="w">389 ····</span><span·class="n">TCInfo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4295707933-44">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·343,·SHA:·61ccd96f1368c495ef170cc7b56a27e9d75a4757ede0e8be86c78852ea600211·...·]-44">}</span><span·class="p">,</span><span·class="w">
390 ····</span><span·class="p"·data-group-id="5772279949-45">{</span><span·class="n">Return</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5772279949-46">{</span><span·class="ss">ts</[·...·truncated·by·diffoscope;·len:·693,·SHA:·aae7e8575fb307586cec889ed2dd698ae4d639a9a835f14be65d3718112cdac8·...·]-45">}</span><span·class="p">.</span><span·class="w">390 ····</span><span·class="p"·data-group-id="4295707933-45">{</span><span·class="n">Return</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4295707933-46">{</span><span·class="ss">ts</[·...·truncated·by·diffoscope;·len:·693,·SHA:·65c02004fabfc542eba596bbef09829084b95a1fa06120a10491d38393a2e154·...·]-45">}</span><span·class="p">.</span><span·class="w">
  
391 </span><span·class="c1">%%·Called·when·a·test·case·is·skipped·by·either·user·action</span><span·class="w">391 </span><span·class="c1">%%·Called·when·a·test·case·is·skipped·by·either·user·action</span><span·class="w">
392 </span><span·class="c1">%%·or·due·to·an·init·function·failing.</span><span·class="w">392 </span><span·class="c1">%%·or·due·to·an·init·function·failing.</span><span·class="w">
393 </span><span·class="nf">on_tc_skip</span><span·class="p"·data-group-id="5772279949-48">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class=[·...·truncated·by·diffoscope;·len:·134,·SHA:·fd16045cee24c3aba5ccbd97ec1bdfa2bcc3f20e3ddf66a84fb1414f4250d061·...·]-48">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">393 </span><span·class="nf">on_tc_skip</span><span·class="p"·data-group-id="4295707933-48">(</span><span·class="p">_</span><span·class="n">Suite</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">TC</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class=[·...·truncated·by·diffoscope;·len:·134,·SHA:·4b4756378b6b5e1825811a94a19a13978bd7a1b94901996ca2e8c54734c2d9d8·...·]-48">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
394 ····</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="5772279949-49">{</span><span·class="ss">skipped</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">skipped<[·...·truncated·by·diffoscope;·len:·144,·SHA:·c75a31374adf2861a77fb9dc9cc424c42e6acafa6d8f7760a3eb95e34372555e·...·]-49">}</span><span·class="p">.</span><span·class="w">394 ····</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p"·data-group-id="4295707933-49">{</span><span·class="ss">skipped</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">skipped<[·...·truncated·by·diffoscope;·len:·144,·SHA:·5b6a6c7bc54ca04cefb86f55436f95e3561bfe2c831efa004359a1570b2e1fe9·...·]-49">}</span><span·class="p">.</span><span·class="w">
  
395 </span><span·class="c1">%%·Called·when·the·scope·of·the·CTH·is·done.</span><span·class="w">395 </span><span·class="c1">%%·Called·when·the·scope·of·the·CTH·is·done.</span><span·class="w">
396 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="5772279949-50">(</span><span·class="n">State</span><span·class="p"·data-group-id="5772279949-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">396 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="4295707933-50">(</span><span·class="n">State</span><span·class="p"·data-group-id="4295707933-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
397 ····</span><span·class="c1">%%·use·append·to·avoid·data·loss·if·the·path·is·reused</span><span·class="w">397 ····</span><span·class="c1">%%·use·append·to·avoid·data·loss·if·the·path·is·reused</span><span·class="w">
398 ····</span><span·class="p"·data-group-id="5772279949-51">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="5772279949-51">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·569,·SHA:·38448728756df40f5a29bff0747df624d60a58216526d4c46a5debab541a0575·...·]-52">)</span><span·class="p">,</span><span·class="w">398 ····</span><span·class="p"·data-group-id="4295707933-51">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="4295707933-51">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·569,·SHA:·5502f2a7052675b40782785a764e7889b1b95d834c88a9181f83f0f33573f077·...·]-52">)</span><span·class="p">,</span><span·class="w">
399 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5772279949-54">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">.</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·340,·SHA:·ef29f4d2b1f37e914fd28fa9ff0337c12e0b312a9b5c37d6792b056f2e5fc6c4·...·]-54">)</span><span·class="p">,</span><span·class="w">399 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4295707933-54">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">.</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·340,·SHA:·a448356e333806e3eb18c8ed4e62546bad45171f596b778787ed240e7a4e8670·...·]-54">)</span><span·class="p">,</span><span·class="w">
400 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5772279949-57">(</span><span·class="n">File</span><span·class="p"·data-group-id="5772279949-57">)</span><span·class="p">,</span><span·class="w">400 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="4295707933-57">(</span><span·class="n">File</span><span·class="p"·data-group-id="4295707933-57">)</span><span·class="p">,</span><span·class="w">
401 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">401 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
402 </span><span·class="nf">results</span><span·class="p"·data-group-id="5772279949-58">(</span><span·class="n">State</span><span·class="p"·data-group-id="5772279949-58">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">402 </span><span·class="nf">results</span><span·class="p"·data-group-id="4295707933-58">(</span><span·class="n">State</span><span·class="p"·data-group-id="4295707933-58">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 294/61254 bytes (0.48%) of diff not shown.
2.31 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_master.html
    
Offset 442, 15 lines modifiedOffset 442, 15 lines modified
442 ······<div·class="specs">442 ······<div·class="specs">
  
443 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_event_mgr_ref()·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>().</pre>443 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get_event_mgr_ref()·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>().</pre>
  
444 ······</div>444 ······</div>
  
445 <p>Gets·a·reference·to·the·<code·class="inline">Common·Test</code>·master·event·manager.·The·reference·can·be445 <p>Gets·a·reference·to·the·<code·class="inline">Common·Test</code>·master·event·manager.·The·reference·can·be
446 used·to,·for·example,·add·a·user-specific·event·handler·while·tests·are·running.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="4253050992-1">(</span><span·class="nc">ct_master</span><span·class="p">:</span><span·class="nf">get_event_mgr_ref</span><span·class="p"·data-group-id="4253050992-2">(</span><span·class="p"·data-group-id="4253050992-2">)</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·244,·SHA:·ccdf9c4af7ba0265854ab5fea5172564e8fe0dd2774324c57b729e52b2792d48·...·]-1">)</span></code></pre>446 used·to,·for·example,·add·a·user-specific·event·handler·while·tests·are·running.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gen_event</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="0571435508-1">(</span><span·class="nc">ct_master</span><span·class="p">:</span><span·class="nf">get_event_mgr_ref</span><span·class="p"·data-group-id="0571435508-2">(</span><span·class="p"·data-group-id="0571435508-2">)</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·244,·SHA:·3ca20601cc7bf4e7ea78a3ee0a789c906f71d0400e79a8cd5185c0c19e51255f·...·]-1">)</span></code></pre>
447 ··</section>447 ··</section>
448 </section>448 </section>
449 <section·class="detail"·id="progress/0">449 <section·class="detail"·id="progress/0">
  
450 ··<div·class="detail-header">450 ··<div·class="detail-header">
451 ····<a·href="#progress/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">451 ····<a·href="#progress/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
452 ······<i·class="ri-link-m"·aria-hidden="true"></i>452 ······<i·class="ri-link-m"·aria-hidden="true"></i>
34.3 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_master_chapter.html
    
Offset 152, 15 lines modifiedOffset 152, 15 lines modified
152 a·common·file·system.·<code·class="inline">Common·Test</code>·Master·cannot·start·test·nodes152 a·common·file·system.·<code·class="inline">Common·Test</code>·Master·cannot·start·test·nodes
153 automatically.·The·nodes·must·be·started·in·advance·for·<code·class="inline">Common·Test</code>·Master·to153 automatically.·The·nodes·must·be·started·in·advance·for·<code·class="inline">Common·Test</code>·Master·to
154 be·able·to·start·test·sessions·on·them.</p><p>Tests·are·started·by·calling·<a·href="ct_master.html#run/1"><code·class="inline">ct_master:run(TestSpecs)</code></a>·or154 be·able·to·start·test·sessions·on·them.</p><p>Tests·are·started·by·calling·<a·href="ct_master.html#run/1"><code·class="inline">ct_master:run(TestSpecs)</code></a>·or
155 <a·href="ct_master.html#run/3"><code·class="inline">ct_master:run(TestSpecs,·InclNodes,·ExclNodes)</code></a></p><p><code·class="inline">TestSpecs</code>·is·either·the·name·of·a·test·specification·file·(string)·or·a·list155 <a·href="ct_master.html#run/3"><code·class="inline">ct_master:run(TestSpecs,·InclNodes,·ExclNodes)</code></a></p><p><code·class="inline">TestSpecs</code>·is·either·the·name·of·a·test·specification·file·(string)·or·a·list
156 of·test·specifications.·If·it·is·a·list,·the·specifications·are·handled·(and·the156 of·test·specifications.·If·it·is·a·list,·the·specifications·are·handled·(and·the
157 corresponding·tests·executed)·in·sequence.·An·element·in·a·<code·class="inline">TestSpecs</code>·list·can157 corresponding·tests·executed)·in·sequence.·An·element·in·a·<code·class="inline">TestSpecs</code>·list·can
158 also·be·list·of·test·specifications.·The·specifications·in·such·a·list·are158 also·be·list·of·test·specifications.·The·specifications·in·such·a·list·are
159 merged·into·one·combined·specification·before·test·execution.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct_master</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="8770597320-1">(</span><span·class="p"·data-group-id="8770597320-2">[</span><span·class="s">&quot;ts1&quot;</span><span·class="p">,</span><span·class="s">&quot;ts2&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8770597320-3">[</span><spa[·...·truncated·by·diffoscope;·len:·243,·SHA:·f0f7b86cf535ce6f8d7e4fd91a5d327c04796639c932c8732ffb5b02531774b0·...·]-1">)</span></code></pre><p>Here,·the·tests·specified·by·&quot;ts1&quot;·run·first,·then·the·tests·specified·by·&quot;ts2&quot;,159 merged·into·one·combined·specification·before·test·execution.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ct_master</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="1549130649-1">(</span><span·class="p"·data-group-id="1549130649-2">[</span><span·class="s">&quot;ts1&quot;</span><span·class="p">,</span><span·class="s">&quot;ts2&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1549130649-3">[</span><spa[·...·truncated·by·diffoscope;·len:·243,·SHA:·fafe300ca833f3bdde0ea996783a269200369ab6e871c41b49a687bfdce2ec1a·...·]-1">)</span></code></pre><p>Here,·the·tests·specified·by·&quot;ts1&quot;·run·first,·then·the·tests·specified·by·&quot;ts2&quot;,
160 and·finally·the·tests·specified·by·both·&quot;ts3&quot;·and·&quot;ts4&quot;.</p><p>The·<code·class="inline">InclNodes</code>·argument·to·<code·class="inline">run/3</code>·is·a·list·of·node·names.·Function·<code·class="inline">run/3</code>160 and·finally·the·tests·specified·by·both·&quot;ts3&quot;·and·&quot;ts4&quot;.</p><p>The·<code·class="inline">InclNodes</code>·argument·to·<code·class="inline">run/3</code>·is·a·list·of·node·names.·Function·<code·class="inline">run/3</code>
161 runs·the·tests·in·<code·class="inline">TestSpecs</code>·just·like·<code·class="inline">run/1</code>,·but·also·takes·any·test·in161 runs·the·tests·in·<code·class="inline">TestSpecs</code>·just·like·<code·class="inline">run/1</code>,·but·also·takes·any·test·in
162 <code·class="inline">TestSpecs</code>,·which·is·not·explicitly·tagged·with·a·particular·node·name,·and162 <code·class="inline">TestSpecs</code>,·which·is·not·explicitly·tagged·with·a·particular·node·name,·and
163 execute·it·on·the·nodes·listed·in·<code·class="inline">InclNodes</code>.·By·using·<code·class="inline">run/3</code>·this·way,·any163 execute·it·on·the·nodes·listed·in·<code·class="inline">InclNodes</code>.·By·using·<code·class="inline">run/3</code>·this·way,·any
164 test·specification·can·be·used,·with·or·without·node·information,·in·a164 test·specification·can·be·used,·with·or·without·node·information,·in·a
165 large-scale·test·environment.</p><p><code·class="inline">ExclNodes</code>·is·a·list·of·nodes·to·be·excluded·from·the·test.·That·is,·tests·that165 large-scale·test·environment.</p><p><code·class="inline">ExclNodes</code>·is·a·list·of·nodes·to·be·excluded·from·the·test.·That·is,·tests·that
166 are·specified·in·the·test·specification·to·run·on·a·particular·node·are·not166 are·specified·in·the·test·specification·to·run·on·a·particular·node·are·not
Offset 192, 40 lines modifiedOffset 192, 40 lines modified
192 achieved·using·constants).·The·alias·is·declared·with·a·<code·class="inline">node</code>·term·as·follows:</p><p><code·class="inline">{node,·NodeAlias,·NodeName}</code></p><p>If·<code·class="inline">NodeRefs</code>·has·the·value·<code·class="inline">all_nodes</code>,·the·operation·or·test·is·performed·on192 achieved·using·constants).·The·alias·is·declared·with·a·<code·class="inline">node</code>·term·as·follows:</p><p><code·class="inline">{node,·NodeAlias,·NodeName}</code></p><p>If·<code·class="inline">NodeRefs</code>·has·the·value·<code·class="inline">all_nodes</code>,·the·operation·or·test·is·performed·on
193 all·specified·test·nodes.·(Declaring·a·term·without·a·<code·class="inline">NodeRefs</code>·element·has·the193 all·specified·test·nodes.·(Declaring·a·term·without·a·<code·class="inline">NodeRefs</code>·element·has·the
194 same·effect).·If·<code·class="inline">NodeRefs</code>·has·the·value·<code·class="inline">master</code>,·the·operation·is·only194 same·effect).·If·<code·class="inline">NodeRefs</code>·has·the·value·<code·class="inline">master</code>,·the·operation·is·only
195 performed·on·the·<code·class="inline">Common·Test</code>·Master·node·(namely·set·the·log·directory·or195 performed·on·the·<code·class="inline">Common·Test</code>·Master·node·(namely·set·the·log·directory·or
196 install·an·event·handler).</p><p>Consider·the·example·in·section196 install·an·event·handler).</p><p>Consider·the·example·in·section
197 <a·href="run_test_chapter.html#test_specifications">Test·Specifications</a>·in·section197 <a·href="run_test_chapter.html#test_specifications">Test·Specifications</a>·in·section
198 Running·Tests·and·Analysing·Results,·now·extended·with·node·information·and198 Running·Tests·and·Analysing·Results,·now·extended·with·node·information·and
199 intended·to·be·executed·by·<code·class="inline">Common·Test</code>·Master:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3353817245-1">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Top&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/test&quot;</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·5a6838d9ba7b2ebb48c524b988b5476e13fdd32f75e0216f1fef05fd02fd8386·...·]-1">}</span><span·class="p">.</span><span·class="w">199 intended·to·be·executed·by·<code·class="inline">Common·Test</code>·Master:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2045453449-1">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Top&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/test&quot;</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·a1435e6a32791f9b9e86843572dd69b1ec318140c7c24ebbd92f5e0a79d0f6b8·...·]-1">}</span><span·class="p">.</span><span·class="w">
200 </span><span·class="p"·data-group-id="3353817245-2">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/t1&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·4027ff9230b32300b35c38112d0d3b4237982d384e3fdb4cfbec706d98673597·...·]-2">}</span><span·class="p">.</span><span·class="w">200 </span><span·class="p"·data-group-id="2045453449-2">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/t1&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·3b39a4374a6aff5a527fc7730b47ac219a1aa797dfa6b6c14618831ed1757201·...·]-2">}</span><span·class="p">.</span><span·class="w">
201 </span><span·class="p"·data-group-id="3353817245-3">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/t2&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·4027ff9230b32300b35c38112d0d3b4237982d384e3fdb4cfbec706d98673597·...·]-3">}</span><span·class="p">.</span><span·class="w">201 </span><span·class="p"·data-group-id="2045453449-3">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/t2&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·3b39a4374a6aff5a527fc7730b47ac219a1aa797dfa6b6c14618831ed1757201·...·]-3">}</span><span·class="p">.</span><span·class="w">
202 </span><span·class="p"·data-group-id="3353817245-4">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T3&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/t3&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·4027ff9230b32300b35c38112d0d3b4237982d384e3fdb4cfbec706d98673597·...·]-4">}</span><span·class="p">.</span><span·class="w">202 </span><span·class="p"·data-group-id="2045453449-4">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T3&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/t3&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·3b39a4374a6aff5a527fc7730b47ac219a1aa797dfa6b6c14618831ed1757201·...·]-4">}</span><span·class="p">.</span><span·class="w">
203 </span><span·class="p"·data-group-id="3353817245-5">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;CfgFile&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;config.cfg&quot;</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·3b27f64d8a2078e9a0a237096c63732ed4721b25ad7f7eed6863e7c6093b757e·...·]-5">}</span><span·class="p">.</span><span·class="w">203 </span><span·class="p"·data-group-id="2045453449-5">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;CfgFile&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;config.cfg&quot;</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·e24fec83b57ceab7cae46b6650747028c08a048011db378df8a111edbff1e35d·...·]-5">}</span><span·class="p">.</span><span·class="w">
204 </span><span·class="p"·data-group-id="3353817245-6">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Node&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ct_node</span><span·class="p"·data-group-id="33538172[·...·truncated·by·diffoscope;·len:·2,·SHA:·811786ad1ae74adfdd20dd0372abaaebc6246e343aebd01da0bfc4c02bf0106c·...·]-6">}</span><span·class="p">.</span><span·class="w">204 </span><span·class="p"·data-group-id="2045453449-6">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Node&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ct_node</span><span·class="p"·data-group-id="20454534[·...·truncated·by·diffoscope;·len:·2,·SHA:·0e17daca5f3e175f448bacace3bc0da47d0655a74c8dd0dc497a3afbdad95f1f·...·]-6">}</span><span·class="p">.</span><span·class="w">
  
205 </span><span·class="p"·data-group-id="3353817245-7">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Node@host_x&#39;</span><span·class="p"·data-group-id="33538[·...·truncated·by·diffoscope;·len:·5,·SHA:·579eb0891ac6c75d410ac0384b8535a3ae36b6abe3290e223f6578303b2ed038·...·]-7">}</span><span·class="p">.</span><span·class="w">205 </span><span·class="p"·data-group-id="2045453449-7">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Node@host_x&#39;</span><span·class="p"·data-group-id="20454[·...·truncated·by·diffoscope;·len:·5,·SHA:·356a653ee19265938086eb28fd3c94de5344dc009b101c99bcc6068813a97c89·...·]-7">}</span><span·class="p">.</span><span·class="w">
206 </span><span·class="p"·data-group-id="3353817245-8">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Node@host_y&#39;</span><span·class="p"·data-group-id="33538[·...·truncated·by·diffoscope;·len:·5,·SHA:·579eb0891ac6c75d410ac0384b8535a3ae36b6abe3290e223f6578303b2ed038·...·]-8">}</span><span·class="p">.</span><span·class="w">206 </span><span·class="p"·data-group-id="2045453449-8">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Node@host_y&#39;</span><span·class="p"·data-group-id="20454[·...·truncated·by·diffoscope;·len:·5,·SHA:·356a653ee19265938086eb28fd3c94de5344dc009b101c99bcc6068813a97c89·...·]-8">}</span><span·class="p">.</span><span·class="w">
  
207 </span><span·class="p"·data-group-id="3353817245-9">{</span><span·class="ss">logdir</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">master</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/master_logs&quot;</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·d0b8a843c687a0a6b30474bc7202ca01af3746b46c22ee72f2ac1fe9e3a56210·...·]-9">}</span><span·class="p">.</span><span·class="w">207 </span><span·class="p"·data-group-id="2045453449-9">{</span><span·class="ss">logdir</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">master</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/master_logs&quot;</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·bb66e366b29adc9527df743333cb4bd68b35a207c08aa4c314c7ef691a33ce44·...·]-9">}</span><span·class="p">.</span><span·class="w">
208 </span><span·class="p"·data-group-id="3353817245-10">{</span><span·class="ss">logdir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/logs&quot;</span><span·class="p"·data-group-id="3353817245-10">}</span><span·class="p">.</span><span·class="w">208 </span><span·class="p"·data-group-id="2045453449-10">{</span><span·class="ss">logdir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;Top&#39;/logs&quot;</span><span·class="p"·data-group-id="2045453449-10">}</span><span·class="p">.</span><span·class="w">
  
209 </span><span·class="p"·data-group-id="3353817245-11">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;T1&#39;/&#39;CfgFile&#39;&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·eeb2fc5bb625c3eb34e04da45b7478fd6de7db5362ad76fd9aa7ad6c17783266·...·]-11">}</span><span·class="p">.</span><span·class="w">209 </span><span·class="p"·data-group-id="2045453449-11">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;T1&#39;/&#39;CfgFile&#39;&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·b238ba092ff30d46d10da363adc1af9953c5a45c61ea64713c89e401a9a36a3e·...·]-11">}</span><span·class="p">.</span><span·class="w">
210 </span><span·class="p"·data-group-id="3353817245-12">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;T2&#39;/&#39;CfgFile&#39;&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·eeb2fc5bb625c3eb34e04da45b7478fd6de7db5362ad76fd9aa7ad6c17783266·...·]-12">}</span><span·class="p">.</span><span·class="w">210 </span><span·class="p"·data-group-id="2045453449-12">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;T2&#39;/&#39;CfgFile&#39;&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·b238ba092ff30d46d10da363adc1af9953c5a45c61ea64713c89e401a9a36a3e·...·]-12">}</span><span·class="p">.</span><span·class="w">
211 </span><span·class="p"·data-group-id="3353817245-13">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;T3&#39;/&#39;CfgFile&#39;&quot;</span><span·class="p"·data-group-id="3353817245-13">}</span><span·class="p">.</span><span·class="w">211 </span><span·class="p"·data-group-id="2045453449-13">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&#39;T3&#39;/&#39;CfgFile&#39;&quot;</span><span·class="p"·data-group-id="2045453449-13">}</span><span·class="p">.</span><span·class="w">
  
212 </span><span·class="p"·data-group-id="3353817245-14">{</span><span·class="ss">suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·74,·SHA:·9c7a4d940febea1c0d695982c9e122e9b0be1481b2630cebfa974abba6da2d19·...·]-14">}</span><span·class="p">.</span><span·class="w">212 </span><span·class="p"·data-group-id="2045453449-14">{</span><span·class="ss">suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·74,·SHA:·52d85d0c621f371a048e982b6247c73b1a93fa0b7b84a39aacab74337ad39d16·...·]-14">}</span><span·class="p">.</span><span·class="w">
213 </span><span·class="p"·data-group-id="3353817245-15">{</span><span·class="ss">skip_suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·348,·SHA:·b102eebd901f875a34889d8a835fc7406b2cab84a6a2dbbc3bf68a73f40c7d46·...·]-15">}</span><span·class="p">.</span><span·class="w">213 </span><span·class="p"·data-group-id="2045453449-15">{</span><span·class="ss">skip_suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·348,·SHA:·8ac4c19f6785223043d68af73fe35c642f8f66f0f18cc3d6fa22707a71bf4366·...·]-15">}</span><span·class="p">.</span><span·class="w">
214 </span><span·class="p"·data-group-id="3353817245-17">{</span><span·class="ss">skip_cases</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·415,·SHA:·0d3b99d091af95a983aa636892682e7ae486127e9b0acbb0975fafbde7de9a95·...·]-17">}</span><span·class="p">.</span><span·class="w">214 </span><span·class="p"·data-group-id="2045453449-17">{</span><span·class="ss">skip_cases</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·415,·SHA:·6309f8ca43273d77c50594ba3c6710e6fd0614d3f92db29da408459c460beb3c·...·]-17">}</span><span·class="p">.</span><span·class="w">
215 </span><span·class="p"·data-group-id="3353817245-19">{</span><span·class="ss">skip_cases</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·358,·SHA:·9b5fef55a429acbc7915c346780b4c39276d1e4fbc8f54a9238efaa7d5f8a30f·...·]-19">}</span><span·class="p">.</span><span·class="w">215 </span><span·class="p"·data-group-id="2045453449-19">{</span><span·class="ss">skip_cases</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T1&#39;</span><span·class="p">,</span><span·class="w[·...·truncated·by·diffoscope;·len:·358,·SHA:·fa620426e280bfef5ac3a7e35040ca92eac2834f96584105caa50e428438fe54·...·]-19">}</span><span·class="p">.</span><span·class="w">
  
216 </span><span·class="p"·data-group-id="3353817245-21">{</span><span·class="ss">suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T2&#39;</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·245,·SHA:·5344eb86a63197a364fc90e3d31a30c5f9a4dcad62741641f51dd5c786742e7d·...·]-21">}</span><span·class="p">.</span><span·class="w">216 </span><span·class="p"·data-group-id="2045453449-21">{</span><span·class="ss">suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T2&#39;</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·245,·SHA:·2259a088889c91903f98ebff63f07b898860d796971c0a17278c8c0dd24f2b64·...·]-21">}</span><span·class="p">.</span><span·class="w">
217 </span><span·class="p"·data-group-id="3353817245-23">{</span><span·class="ss">cases</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T2&#39;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·370,·SHA:·976f36d4aa1060b27fec167173a51e71a3cf329fc9ed01f6aef308a944842779·...·]-23">}</span><span·class="p">.</span><span·class="w">217 </span><span·class="p"·data-group-id="2045453449-23">{</span><span·class="ss">cases</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T2&#39;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·370,·SHA:·58e4de2933d6d079d673d73cc11a4296759a524f9e593cbfdb1fcf44c08af0b5·...·]-23">}</span><span·class="p">.</span><span·class="w">
  
218 </span><span·class="p"·data-group-id="3353817245-25">{</span><span·class="ss">skip_suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T3&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·100,·SHA:·151131ff9d1c055e2b463bfd93a39c3addc52d6d7531c0a16c76c52a4bedfc55·...·]-25">}</span><span·class="p">.</span></code></pre><p>This·example·specifies·the·same·tests·as·the·original·example.·But·now·if218 </span><span·class="p"·data-group-id="2045453449-25">{</span><span·class="ss">skip_suites</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;T3&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·100,·SHA:·a5a0ab684c46d72846f15b08e04a2b55724674ab1341fc163c34e3860c80f81d·...·]-25">}</span><span·class="p">.</span></code></pre><p>This·example·specifies·the·same·tests·as·the·original·example.·But·now·if
219 started·with·a·call·to·<code·class="inline">ct_master:run(TestSpecName)</code>,·test·<code·class="inline">t1</code>·is·executed·on219 started·with·a·call·to·<code·class="inline">ct_master:run(TestSpecName)</code>,·test·<code·class="inline">t1</code>·is·executed·on
220 node·<code·class="inline">ct_node@host_x</code>·(<code·class="inline">node1</code>),·test·<code·class="inline">t2</code>·on·<code·class="inline">ct_node@host_y</code>·(<code·class="inline">node2</code>)·and220 node·<code·class="inline">ct_node@host_x</code>·(<code·class="inline">node1</code>),·test·<code·class="inline">t2</code>·on·<code·class="inline">ct_node@host_y</code>·(<code·class="inline">node2</code>)·and
221 test·<code·class="inline">t3</code>·on·both·<code·class="inline">node1</code>·and·<code·class="inline">node2</code>.·Configuration·file·<code·class="inline">t1</code>·is·only·read·on221 test·<code·class="inline">t3</code>·on·both·<code·class="inline">node1</code>·and·<code·class="inline">node2</code>.·Configuration·file·<code·class="inline">t1</code>·is·only·read·on
222 <code·class="inline">node1</code>·and·configuration·file·<code·class="inline">t2</code>·only·on·<code·class="inline">node2</code>,·while·the·configuration222 <code·class="inline">node1</code>·and·configuration·file·<code·class="inline">t2</code>·only·on·<code·class="inline">node2</code>,·while·the·configuration
223 file·<code·class="inline">t3</code>·is·read·on·both·<code·class="inline">node1</code>·and·<code·class="inline">node2</code>.·Both·test·nodes·write·log·files223 file·<code·class="inline">t3</code>·is·read·on·both·<code·class="inline">node1</code>·and·<code·class="inline">node2</code>.·Both·test·nodes·write·log·files
224 to·the·same·directory.·(However,·the·<code·class="inline">Common·Test</code>·Master·node·uses·a·different224 to·the·same·directory.·(However,·the·<code·class="inline">Common·Test</code>·Master·node·uses·a·different
225 log·directory·than·the·test·nodes.)</p><p>If·the·test·session·is·instead·started·with·a·call·to225 log·directory·than·the·test·nodes.)</p><p>If·the·test·session·is·instead·started·with·a·call·to
Offset 240, 21 lines modifiedOffset 240, 21 lines modified
240 always·performed·too,·of·course.</p><h2·id="automatic-startup-of-test-target-nodes"·class="section-heading">240 always·performed·too,·of·course.</p><h2·id="automatic-startup-of-test-target-nodes"·class="section-heading">
241 ··<a·href="#automatic-startup-of-test-target-nodes"·class="hover-link">241 ··<a·href="#automatic-startup-of-test-target-nodes"·class="hover-link">
242 ····<i·class="ri-link-m"·aria-hidden="true"></i>242 ····<i·class="ri-link-m"·aria-hidden="true"></i>
243 ··</a>243 ··</a>
244 ··<span·class="text">Automatic·Startup·of·Test·Target·Nodes</span>244 ··<span·class="text">Automatic·Startup·of·Test·Target·Nodes</span>
245 </h2>245 </h2>
246 <p><a·href=""·id="ct_slave"></a></p><p>Initial·actions·can·be·started·and·performed·automatically·on·test·target·nodes246 <p><a·href=""·id="ct_slave"></a></p><p>Initial·actions·can·be·started·and·performed·automatically·on·test·target·nodes
247 using·test·specification·term·<code·class="inline">init</code>.</p><p>Two·subterms·are·supported,·<code·class="inline">node_start</code>·and·<code·class="inline">eval</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1311917205-1">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1@host1</span><span·class="p"·data-group-id="1311917205-1">}</span><span·class="p">.</span><span·class="w">247 using·test·specification·term·<code·class="inline">init</code>.</p><p>Two·subterms·are·supported,·<code·class="inline">node_start</code>·and·<code·class="inline">eval</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0280785909-1">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1@host1</span><span·class="p"·data-group-id="0280785909-1">}</span><span·class="p">.</span><span·class="w">
248 </span><span·class="p"·data-group-id="1311917205-2">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1@host2</span><span·class="p"·data-group-id="1311917205-2">}</span><span·class="p">.</span><span·class="w">248 </span><span·class="p"·data-group-id="0280785909-2">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1@host2</span><span·class="p"·data-group-id="0280785909-2">}</span><span·class="p">.</span><span·class="w">
249 </span><span·class="p"·data-group-id="1311917205-3">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2@host2</span><span·class="p"·data-group-id="1311917205-3">}</span><span·class="p">.</span><span·class="w">249 </span><span·class="p"·data-group-id="0280785909-3">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node2@host2</span><span·class="p"·data-group-id="0280785909-3">}</span><span·class="p">.</span><span·class="w">
250 </span><span·class="p"·data-group-id="1311917205-4">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1@host3</span><span·class="p"·data-group-id="1311917205-4">}</span><span·class="p">.</span><span·class="w">250 </span><span·class="p"·data-group-id="0280785909-4">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1@host3</span><span·class="p"·data-group-id="0280785909-4">}</span><span·class="p">.</span><span·class="w">
251 </span><span·class="p"·data-group-id="1311917205-5">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1311917205-6">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·594,·SHA:·812855c740a634e6a20c496d358caf10bc31d5805c2525451b68bcf09f882795·...·]-5">}</span><span·class="p">.</span><span·class="w">251 </span><span·class="p"·data-group-id="0280785909-5">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0280785909-6">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·594,·SHA:·5b8ba54bf14fe85bc9e8a99be5089e47c717a970b62a8683eae18e3b5444a097·...·]-5">}</span><span·class="p">.</span><span·class="w">
252 </span><span·class="p"·data-group-id="1311917205-10">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1311917205-11">[</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node3</span><span·class="p"·data-group-id="1311917205-11">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1311917205-12">{</span><span·class="ss">node_start</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1311917205-13">[</span><span·class="p"·data-group-id="1311917205-14">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ct_user&quot;</span><span·class="p"·data-group-id="1311917205-14">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1311917205-15">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ct_password&quot;</span><span·class="p"·data-group-id="1311917205-15">}</span><span·class="p"·data-group-id="1311917205-13">]</span><span·class="p"·data-group-id="1311917205-12">}</span><span·class="p"·data-group-id="1311917205-10">}</span><span·class="p">.</span><span·class="w"> 
253 </span><span·class="p"·data-group-id="1311917205-16">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1311917205-17">{</span><span·class="ss">eval</spa[·...·truncated·by·diffoscope;·len:·676,·SHA:·d902daabaf4152b1d41603a93efac852aba3b9cf098bc810bd8192837f27e046·...·]252 </span><span·class="p"·data-group-id="0280785909-10">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0280785909-11">[</span><span·class="ss">node2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node3</sp[·...·truncated·by·diffoscope;·len:·1009,·SHA:·6080737ec2326c46c149f91324286742197dfb55e52cc92dbc899bbe50eb257a·...·]
 253 </span><span·class="p"·data-group-id="0280785909-16">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0280785909-17">{</span><span·class="ss">eval</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0280785909-18">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">function</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0280785909-19">[</span><span·class="p"·data-group-id="0280785909-19">]</span><span·class="p"·data-group-id="0280785909-18">}</span><span·class="p"·data-group-id="0280785909-17">}</span><span·class="p"·data-group-id="0280785909-16">}</span><span·class="p">.</span></code></pre><p>This·test·specification·declares·that·<code·class="inline">node1@host1</code>·is·to·be·started·using·the
254 user·callback·function·<code·class="inline">callback_module:my_slave_callback/0</code>,·and·nodes254 user·callback·function·<code·class="inline">callback_module:my_slave_callback/0</code>,·and·nodes
255 <code·class="inline">node1@host2</code>·and·<code·class="inline">node2@host2</code>·are·to·be·started·with·the·default·callback255 <code·class="inline">node1@host2</code>·and·<code·class="inline">node2@host2</code>·are·to·be·started·with·the·default·callback
256 module·<code·class="inline">ct_slave</code>.·The·specified·username·and·password·are·used·to·log·on·to256 module·<code·class="inline">ct_slave</code>.·The·specified·username·and·password·are·used·to·log·on·to
257 remote·host·<code·class="inline">host2</code>.·Also,·function·<code·class="inline">module:function/0</code>·is·evaluated·on257 remote·host·<code·class="inline">host2</code>.·Also,·function·<code·class="inline">module:function/0</code>·is·evaluated·on
258 <code·class="inline">node1@host3</code>,·and·the·result·of·this·call·is·printed·to·the·log.</p><p>The·default·callback·module·<a·href="ct_slave.html"><code·class="inline">ct_slave</code></a>,·has·the·following·features:</p><ul><li>Starting·Erlang·target·nodes·on·local·or·remote·hosts·(application·<code·class="inline">SSH</code>·is258 <code·class="inline">node1@host3</code>,·and·the·result·of·this·call·is·printed·to·the·log.</p><p>The·default·callback·module·<a·href="ct_slave.html"><code·class="inline">ct_slave</code></a>,·has·the·following·features:</p><ul><li>Starting·Erlang·target·nodes·on·local·or·remote·hosts·(application·<code·class="inline">SSH</code>·is
259 used·for·communication).</li><li>Ability·to·start·an·Erlang·emulator·with·more·flags·(any·flags·supported·by259 used·for·communication).</li><li>Ability·to·start·an·Erlang·emulator·with·more·flags·(any·flags·supported·by
260 <code·class="inline">erl</code>·are·supported).</li><li>Supervision·of·a·node·being·started·using·internal·callback·functions.·Used·to260 <code·class="inline">erl</code>·are·supported).</li><li>Supervision·of·a·node·being·started·using·internal·callback·functions.·Used·to
27.5 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_netconfc.html
    
Offset 133, 50 lines modifiedOffset 133, 50 lines modified
133 and·with·support·for·RFC·5277,·NETCONF·Event·Notifications.</p><p><a·href=""·id="Connecting"></a></p><p><em>Connecting·to·a·NETCONF·server</em></p><p>Call·<a·href="#connect/1"><code·class="inline">connect/1,2</code></a>·to·establish·a·connection·to·a·server,·then133 and·with·support·for·RFC·5277,·NETCONF·Event·Notifications.</p><p><a·href=""·id="Connecting"></a></p><p><em>Connecting·to·a·NETCONF·server</em></p><p>Call·<a·href="#connect/1"><code·class="inline">connect/1,2</code></a>·to·establish·a·connection·to·a·server,·then
134 pass·the·returned·handle·to·<a·href="#session/1"><code·class="inline">session/1-3</code></a>·to·establish·a·NETCONF134 pass·the·returned·handle·to·<a·href="#session/1"><code·class="inline">session/1-3</code></a>·to·establish·a·NETCONF
135 session·on·a·new·SSH·channel.·Each·call·to·<a·href="#session/1"><code·class="inline">session/1-3</code></a>135 session·on·a·new·SSH·channel.·Each·call·to·<a·href="#session/1"><code·class="inline">session/1-3</code></a>
136 establishes·a·new·session·on·the·same·connection,·and·results·in·a·hello·message136 establishes·a·new·session·on·the·same·connection,·and·results·in·a·hello·message
137 to·the·server.</p><p>Alternately,·<a·href="#open/1"><code·class="inline">open/1,2</code></a>·can·be·used·to·establish·a·single·session·on137 to·the·server.</p><p>Alternately,·<a·href="#open/1"><code·class="inline">open/1,2</code></a>·can·be·used·to·establish·a·single·session·on
138 a·dedicated·connection.·(Or,·equivalently,·<a·href="#only_open/1"><code·class="inline">only_open/1,2</code></a>138 a·dedicated·connection.·(Or,·equivalently,·<a·href="#only_open/1"><code·class="inline">only_open/1,2</code></a>
139 followed·by·<a·href="#hello/1"><code·class="inline">hello/1-3</code></a>.)</p><p>Connect/session·options·can·be·specified·in·a·configuration·file·with·entries139 followed·by·<a·href="#hello/1"><code·class="inline">hello/1-3</code></a>.)</p><p>Connect/session·options·can·be·specified·in·a·configuration·file·with·entries
140 like·the·following.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9229517786-1">{</span><span·class="nf">server_id</span><span·class="p"·data-group-id="9229517786-2">(</span><span·class="p"·data-group-id="9229517786-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9229517786-3">[<[·...·truncated·by·diffoscope;·len:·236,·SHA:·4bc9957faa60c4e23e0fdc6719319a7de86750ea99748c6a84553f0106fe0478·...·]-1">}</span><span·class="p">.</span></code></pre><p>The·<a·href="#t:server_id/0"><code·class="inline">server_id/0</code></a>·or·an·associated·<a·href="ct.html#t:target_name/0"><code·class="inline">ct:target_name/0</code></a>·can·then·be·passed·to140 like·the·following.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8631849622-1">{</span><span·class="nf">server_id</span><span·class="p"·data-group-id="8631849622-2">(</span><span·class="p"·data-group-id="8631849622-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8631849622-3">[<[·...·truncated·by·diffoscope;·len:·236,·SHA:·d9152074d25d3f5f1cff9b17cd2eef4d2385c10e2e97a0c1d43672543eb64d3b·...·]-1">}</span><span·class="p">.</span></code></pre><p>The·<a·href="#t:server_id/0"><code·class="inline">server_id/0</code></a>·or·an·associated·<a·href="ct.html#t:target_name/0"><code·class="inline">ct:target_name/0</code></a>·can·then·be·passed·to
141 the·aforementioned·functions·to·use·the·referenced·configuration.</p><p><a·href=""·id="Signaling"></a></p><p><em>Signaling</em></p><p>Protocol·operations·in·the·NETCONF·protocol·are·realized·as·remote·procedure141 the·aforementioned·functions·to·use·the·referenced·configuration.</p><p><a·href=""·id="Signaling"></a></p><p><em>Signaling</em></p><p>Protocol·operations·in·the·NETCONF·protocol·are·realized·as·remote·procedure
142 calls·(RPCs)·from·client·to·server·and·a·corresponding·reply·from·server·to142 calls·(RPCs)·from·client·to·server·and·a·corresponding·reply·from·server·to
143 client.·RPCs·are·sent·using·like-named·functions·(eg.143 client.·RPCs·are·sent·using·like-named·functions·(eg.
144 <a·href="#edit_config/3"><code·class="inline">edit_config/3-5</code></a>·to·send·an·edit-config·RPC),·with·the144 <a·href="#edit_config/3"><code·class="inline">edit_config/3-5</code></a>·to·send·an·edit-config·RPC),·with·the
145 server·reply·as·return·value.·There·are·functions·for·each·RPC·defined·in·RFC145 server·reply·as·return·value.·There·are·functions·for·each·RPC·defined·in·RFC
146 6241·and·the·create-subscription·RPC·from·RFC·5277,·all·of·which·are·wrappers·on146 6241·and·the·create-subscription·RPC·from·RFC·5277,·all·of·which·are·wrappers·on
147 <a·href="#send_rpc/2"><code·class="inline">send_rpc/2,3</code></a>,·that·can·be·used·to·send·an·arbitrary·RPC·not147 <a·href="#send_rpc/2"><code·class="inline">send_rpc/2,3</code></a>,·that·can·be·used·to·send·an·arbitrary·RPC·not
148 defined·in·RFC·6241·or·RFC·5277.</p><p>All·of·the·signaling·functions·have·one·variant·with·a·<code·class="inline">Timeout</code>·argument·and148 defined·in·RFC·6241·or·RFC·5277.</p><p>All·of·the·signaling·functions·have·one·variant·with·a·<code·class="inline">Timeout</code>·argument·and
149 one·without,·corresponding·to·an·infinite·timeout.·The·latter·is·inappropriate149 one·without,·corresponding·to·an·infinite·timeout.·The·latter·is·inappropriate
150 in·most·cases·since·a·non-response·by·the·server·or·a·missing·message-id·causes150 in·most·cases·since·a·non-response·by·the·server·or·a·missing·message-id·causes
151 the·call·to·hang·indefinitely.</p><p><a·href=""·id="Logging"></a></p><p><em>Logging</em></p><p>The·NETCONF·server·uses·<code·class="inline">error_logger</code>·for·logging·of·NETCONF·traffic.·A·special151 the·call·to·hang·indefinitely.</p><p><a·href=""·id="Logging"></a></p><p><em>Logging</em></p><p>The·NETCONF·server·uses·<code·class="inline">error_logger</code>·for·logging·of·NETCONF·traffic.·A·special
152 purpose·error·handler·is·implemented·in·<code·class="inline">ct_conn_log_h</code>.·To·use·this·error152 purpose·error·handler·is·implemented·in·<code·class="inline">ct_conn_log_h</code>.·To·use·this·error
153 handler,·add·the·<code·class="inline">cth_conn_log</code>·hook·in·the·test·suite,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="5850715299-1">(</span><span·class="p"·data-group-id="5850715299-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">153 handler,·add·the·<code·class="inline">cth_conn_log</code>·hook·in·the·test·suite,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="0802398532-1">(</span><span·class="p"·data-group-id="0802398532-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
154 ····</span><span·class="p"·data-group-id="5850715299-2">[</span><span·class="p"·data-group-id="5850715299-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5850715299-4">[</span><span·class="p"·data-group-id="5850715299-5">{</[·...·truncated·by·diffoscope;·len:·937,·SHA:·360cc0dd428a270b1ac913d0006afedf5a253c6e632debbcac085b5af9c11b96·...·]-2">]</span><span·class="p">.</span></code></pre><p><code·class="inline">conn_log_mod()</code>·is·the·name·of·the·<code·class="inline">Common·Test</code>·module·implementing·the154 ····</span><span·class="p"·data-group-id="0802398532-2">[</span><span·class="p"·data-group-id="0802398532-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0802398532-4">[</span><span·class="p"·data-group-id="0802398532-5">{</[·...·truncated·by·diffoscope;·len:·937,·SHA:·45320e7d164e9e05e27c28a7606107011a952ed5c3df67dd9ef3d153899c880e·...·]-2">]</span><span·class="p">.</span></code></pre><p><code·class="inline">conn_log_mod()</code>·is·the·name·of·the·<code·class="inline">Common·Test</code>·module·implementing·the
155 connection·protocol,·for·example,·<code·class="inline">ct_netconfc</code>.</p><p>Hook·option·<code·class="inline">log_type</code>·specifies·the·type·of·logging:</p><ul><li><p><strong><code·class="inline">raw</code></strong>·-·The·sent·and·received·NETCONF·data·is·logged·to·a·separate·text155 connection·protocol,·for·example,·<code·class="inline">ct_netconfc</code>.</p><p>Hook·option·<code·class="inline">log_type</code>·specifies·the·type·of·logging:</p><ul><li><p><strong><code·class="inline">raw</code></strong>·-·The·sent·and·received·NETCONF·data·is·logged·to·a·separate·text
156 file·&quot;as·is&quot;·without·any·formatting.·A·link·to·the·file·is·added·to·the·test156 file·&quot;as·is&quot;·without·any·formatting.·A·link·to·the·file·is·added·to·the·test
157 case·HTML·log.</p></li><li><p><strong><code·class="inline">pretty</code></strong>·-·The·sent·and·received·NETCONF·data·is·logged·to·a·separate·text157 case·HTML·log.</p></li><li><p><strong><code·class="inline">pretty</code></strong>·-·The·sent·and·received·NETCONF·data·is·logged·to·a·separate·text
158 file·with·XML·data·nicely·indented.·A·link·to·the·file·is·added·to·the·test158 file·with·XML·data·nicely·indented.·A·link·to·the·file·is·added·to·the·test
159 case·HTML·log.</p></li><li><p><strong><code·class="inline">html·(default)</code></strong>·-·The·sent·and·received·NETCONF·traffic·is·pretty·printed159 case·HTML·log.</p></li><li><p><strong><code·class="inline">html·(default)</code></strong>·-·The·sent·and·received·NETCONF·traffic·is·pretty·printed
160 directly·in·the·test·case·HTML·log.</p></li><li><p><strong><code·class="inline">silent</code></strong>·-·NETCONF·traffic·is·not·logged.</p></li></ul><p>By·default,·all·NETCONF·traffic·is·logged·in·one·single·log·file.·However,160 directly·in·the·test·case·HTML·log.</p></li><li><p><strong><code·class="inline">silent</code></strong>·-·NETCONF·traffic·is·not·logged.</p></li></ul><p>By·default,·all·NETCONF·traffic·is·logged·in·one·single·log·file.·However,
161 different·connections·can·be·logged·in·separate·files.·To·do·this,·use·hook161 different·connections·can·be·logged·in·separate·files.·To·do·this,·use·hook
162 option·<code·class="inline">hosts</code>·and·list·the·names·of·the·servers/connections·to·be·used·in·the162 option·<code·class="inline">hosts</code>·and·list·the·names·of·the·servers/connections·to·be·used·in·the
163 suite.·The·connections·must·be·named·for·this·to·work,·that·is,·they·must·be163 suite.·The·connections·must·be·named·for·this·to·work,·that·is,·they·must·be
164 opened·with·<a·href="#open/2"><code·class="inline">open/2</code></a>.</p><p>Option·<code·class="inline">hosts</code>·has·no·effect·if·<code·class="inline">log_type</code>·is·set·to·<code·class="inline">html</code>·or·<code·class="inline">silent</code>.</p><p>The·hook·options·can·also·be·specified·in·a·configuration·file·with164 opened·with·<a·href="#open/2"><code·class="inline">open/2</code></a>.</p><p>Option·<code·class="inline">hosts</code>·has·no·effect·if·<code·class="inline">log_type</code>·is·set·to·<code·class="inline">html</code>·or·<code·class="inline">silent</code>.</p><p>The·hook·options·can·also·be·specified·in·a·configuration·file·with
165 configuration·variable·<code·class="inline">ct_conn_log</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8441924835-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="p"·data-group-id="8441924835-2">[</span><span·class="p"·data-group-id="8441924835-3">{</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">co[·...·truncated·by·diffoscope;·len:·1140,·SHA:·c9a78dd99560cb5321223b1f331237b35451bf3193d2a54bec4ab5f1a583dc6a·...·]-5">}</span><span·class="p">,</span><span·class="w">165 configuration·variable·<code·class="inline">ct_conn_log</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1641573302-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="p"·data-group-id="1641573302-2">[</span><span·class="p"·data-group-id="1641573302-3">{</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">co[·...·truncated·by·diffoscope;·len:·1140,·SHA:·8d7f55f8f50e47bf4606cfaff1590778f680c2c08e8ba357661b4611bd159801·...·]-5">}</span><span·class="p">,</span><span·class="w">
166 ····························</span><span·class="p"·data-group-id="8885029208-6">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="8885029208-7">[</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">key_or_name</span><span·class="p"·data-group-id="8885029208-8[·...·truncated·by·diffoscope;·len:·369,·SHA:·4b088ed80ffee7ff30d20c159c3c49c8192ab30d027a68e20341517df3554a13·...·]-1">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>Hook·options·specified·in·a·configuration·file·overwrite·the·hard-coded·hook166 ····························</span><span·class="p"·data-group-id="3700102100-6">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="3700102100-7">[</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">key_or_name</span><span·class="p"·data-group-id="3700102100-8[·...·truncated·by·diffoscope;·len:·369,·SHA:·45f1162570aee304c4f3202bf66fe86bf27411d97b2e47e7e0c21dd33b902afd·...·]-1">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>Hook·options·specified·in·a·configuration·file·overwrite·the·hard-coded·hook
167 options·in·the·test·suite.</p></blockquote><p><em>Logging·Example·1:</em></p><p><a·href=""·id="Logging_example_1"></a></p><p>The·following·<code·class="inline">ct_hooks</code>·statement·causes·pretty·printing·of·NETCONF·traffic·to167 options·in·the·test·suite.</p></blockquote><p><em>Logging·Example·1:</em></p><p><a·href=""·id="Logging_example_1"></a></p><p>The·following·<code·class="inline">ct_hooks</code>·statement·causes·pretty·printing·of·NETCONF·traffic·to
168 separate·logs·for·the·connections·named·<code·class="inline">nc_server1</code>·and·<code·class="inline">nc_server2</code>.·Any·other168 separate·logs·for·the·connections·named·<code·class="inline">nc_server1</code>·and·<code·class="inline">nc_server2</code>.·Any·other
169 connections·are·logged·to·default·NETCONF·log.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="9787878602-1">(</span><span·class="p"·data-group-id="9787878602-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 connections·are·logged·to·default·NETCONF·log.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="4268611139-1">(</span><span·class="p"·data-group-id="4268611139-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ···</span><span·class="p"·data-group-id="9787878602-2">[</span><span·class="p"·data-group-id="9787878602-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9787878602-4">[</span><span·class="p"·data-group-id="9787878602-5">{</span><span·class="ss">cth_conn_log</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9787878602-6">[</span><span·class="p"·data-group-id="9787878602-7">{</span><span·class="ss">ct_netconfc</span><span·class="p">,</span><span·class="p"·data-group-id="9787878602-8">[</span><span·class="p"·data-group-id="9787878602-9">{</span><span·class="ss">log_type</span><span·class="p">,</span><span·class="ss">pretty</span><span·class="p"·data-group-id="9787878602-9">}</span><span·class="p">}</span><span·class="p">,</span><span·class="w"> 
171 ··············································</span><span·class="p"·data-group-id="9787878602-10">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="9787878602-11">[</span><span·class="ss">nc_server1</span><span·class="p">,</span><span·class="ss">nc_server2</span><span·class="p"·data-group-id="9787878602-11">]</span><span·class="p"·data-group-id="9787878602-10">}</span><span·class="p"·data-group-id="9787878602-8">]</span><span·class="p"·data-group-id="9787878602-7">}</span><span·class="w"> 
172 ·······························</span><span·class="p"·data-group-id="9787878602-6">]</span><span·class="p"·data-group-id="9787878602-5">}</span><span·class="p"·data-group-id="9787878602-4">]</span><span·class="p"·data-group-id="9787878602-3">}</span><span·class="p"·data-group-id="9787878602-2">]</span><span·class="p">.</span></code></pre><p>Connections·must·be·opened·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">open</span><span·class="p"·data-group-id="1297785685-1">(</span><span·class="ss">nc_server1</span><span·class="p">,</span><span·class="p"·data-group-id="1297785685-2">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="1297785685-2">]</span><span·class="p"·data-group-id="1297785685-1">)</span><span·class="p">,</span><span·class="w"> 
173 </span><span·class="nf">open</span><span·class="p"·data-group-id="1297785685-3">(</span><span·class="ss">nc_server2</span><span·class="p">,</span><span·class="p"·data-group-id="1297785685-4">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="1297785685-4">]</span><span·class="p"·data-group-id="1297785685-3">)</span><span·class="p">.</span></code></pre><p><em>Logging·Example·2:</em></p><p><a·href=""·id="Logging_example_2"></a></p><p>The·following·configuration·file·causes·raw·logging·of·all·NETCONF·traffic·in·to 
174 one·single·text·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2915723740-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="p"·data-group-id="2915723740-2">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·892,·SHA:·f1357c7e66120cd4c585e0bd3834486a7e22cdff345a69ecab6f0270f994c546·...·]</span><span·class="w">170 ···</span><span·class="p"·data-group-id="4268611139-2">[</span><span·class="p"·data-group-id="4268611139-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4268611139-4">[</span><span·c[·...·truncated·by·diffoscope;·len:·581,·SHA:·cfb9cb75d4743d5427d2f1e2262bf32a2b3e4d2e010c5c9edf83955dd837f1e3·...·]</span><span·class="w">
 171 ··············································</span><span·class="p"·data-group-id="4268611139-10">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="4268611139-11">[</span><span·class="ss">nc_server1</span><span·class="p">,</span><span·class="ss">nc_server2</span><span·class="p"·data-group-id="4268611139-11">]</span><span·class="p"·data-group-id="4268611139-10">}</span><span·class="p"·data-group-id="4268611139-8">]</span><span·class="p"·data-group-id="4268611139-7">}</span><span·class="w">
 172 ·······························</span><span·class="p"·data-group-id="4268611139-6">]</span><span·class="p"·data-group-id="4268611139-5">}</span><span·class="p"·data-group-id="4268611139-4">]</span><span·class="p"·data-group-id="4268611139-3">}</span><span·class="p"·data-group-id="4268611139-2">]</span><span·class="p">.</span></code></pre><p>Connections·must·be·opened·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">open</span><span·class="p"·data-group-id="7915003258-1">(</span><span·class="ss">nc_server1</span><span·class="p">,</span><span·class="p"·data-group-id="7915003258-2">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="7915003258-2">]</span><span·class="p"·data-group-id="7915003258-1">)</span><span·class="p">,</span><span·class="w">
 173 </span><span·class="nf">open</span><span·class="p"·data-group-id="7915003258-3">(</span><span·class="ss">nc_server2</span><span·class="p">,</span><span·class="p"·data-group-id="7915003258-4">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="7915003258-4">]</span><span·class="p"·data-group-id="7915003258-3">)</span><span·class="p">.</span></code></pre><p><em>Logging·Example·2:</em></p><p><a·href=""·id="Logging_example_2"></a></p><p>The·following·configuration·file·causes·raw·logging·of·all·NETCONF·traffic·in·to
 174 one·single·text·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1844922190-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="p"·data-group-id="1844922190-2">[</span><span·class="p"·data-group-id="1844922190-3">{</span><span·class="ss">ct_netconfc</span><span·class="p">,</span><span·class="p"·data-group-id="1844922190-4">[</span><span·class="p"·data-group-id="1844922190-5">{</span><span·class="ss">log_type</span><span·class="p">,</span><span·class="ss">raw</span><span·class="p"·data-group-id="1844922190-5">}</span><span·class="p"·data-group-id="1844922190-4">]</span><span·class="p"·data-group-id="1844922190-3">}</span><span·class="p"·data-group-id="1844922190-2">]</span><span·class="p"·data-group-id="1844922190-1">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">ct_hooks</code>·statement·must·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="2322973462-1">(</span><span·class="p"·data-group-id="2322973462-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
175 ····</span><span·class="p"·data-group-id="4927040602-2">[</span><span·class="p"·data-group-id="4927040602-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4927040602-4">[</span><span·class="p"·data-group-id="4927040602-5">{</[·...·truncated·by·diffoscope;·len:·394,·SHA:·2b8c5509ea152e1e35fc4725846bc51e8d8011a071d423cd088b77438ae08570·...·]2-2">]</span><span·class="p">.</span></code></pre><p>The·same·<code·class="inline">ct_hooks</code>·statement·without·the·configuration·file·would·cause·HTML175 ····</span><span·class="p"·data-group-id="2322973462-2">[</span><span·class="p"·data-group-id="2322973462-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2322973462-4">[</span><span·class="p"·data-group-id="2322973462-5">{</[·...·truncated·by·diffoscope;·len:·394,·SHA:·c0da3df925fcf41d1f0060ec1374b1db66a9fb2fb3cfcb45f488ca9c52751163·...·]2-2">]</span><span·class="p">.</span></code></pre><p>The·same·<code·class="inline">ct_hooks</code>·statement·without·the·configuration·file·would·cause·HTML
176 logging·of·all·NETCONF·connections·in·to·the·test·case·HTML·log.</p>176 logging·of·all·NETCONF·connections·in·to·the·test·case·HTML·log.</p>
177 ····</section>177 ····</section>
  
178 </div>178 </div>
  
179 ··<section·id="summary"·class="details-list">179 ··<section·id="summary"·class="details-list">
180 ····<h1·class="section-heading">180 ····<h1·class="section-heading">
Offset 2169, 16 lines modifiedOffset 2169, 16 lines modified
2169 ·························Result·::·ok·|·{error,·<a·href="#t:error_reason/0">error_reason</a>()}.</pre>2169 ·························Result·::·ok·|·{error,·<a·href="#t:error_reason/0">error_reason</a>()}.</pre>
  
2170 ······</div>2170 ······</div>
  
2171 <p>Edits·configuration·data.</p><p>By·default·only·the·running·target·is·available,·unless·the·server·includes2171 <p>Edits·configuration·data.</p><p>By·default·only·the·running·target·is·available,·unless·the·server·includes
2172 <code·class="inline">:candidate</code>·or·<code·class="inline">:startup</code>·in·its·list·of·capabilities.</p><p><code·class="inline">OptParams</code>·can·be·used·for·specifying·optional·parameters·(<code·class="inline">default-operation</code>,2172 <code·class="inline">:candidate</code>·or·<code·class="inline">:startup</code>·in·its·list·of·capabilities.</p><p><code·class="inline">OptParams</code>·can·be·used·for·specifying·optional·parameters·(<code·class="inline">default-operation</code>,
2173 <code·class="inline">test-option</code>,·or·<code·class="inline">error-option</code>)·to·be·added·to·the·<code·class="inline">edit-config</code>·request.·The2173 <code·class="inline">test-option</code>,·or·<code·class="inline">error-option</code>)·to·be·added·to·the·<code·class="inline">edit-config</code>·request.·The
2174 value·must·be·a·list·containing·valid·simple·XML,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2906317937-1">[</span><span·class="p"·data-group-id="2906317937-2">{</span><span·class="ss">&#39;default-operation&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2906317937-3">[</span><span·class="s">&quot;none&qu[·...·truncated·by·diffoscope;·len:·103,·SHA:·4a24c0475f5f73bb5c611396aab0441ce35f8c5e73027efd1756d1f97cff232b·...·]7-2">}</span><span·class="p">,</span><span·class="w">2174 value·must·be·a·list·containing·valid·simple·XML,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9336700947-1">[</span><span·class="p"·data-group-id="9336700947-2">{</span><span·class="ss">&#39;default-operation&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9336700947-3">[</span><span·class="s">&quot;none&qu[·...·truncated·by·diffoscope;·len:·103,·SHA:·33ec7ba95ac714567a252b241c54c54d9384b0278122f116d648b80a4ff74eed·...·]7-2">}</span><span·class="p">,</span><span·class="w">
2175 ·</span><span·class="p"·data-group-id="2906317937-4">{</span><span·class="ss">&#39;error-option&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2906317937-5">[</span><span·class="s">&quot;rollback-on-error&quot;</span><span·class="p"·data-group-id="2906[·...·truncated·by·diffoscope;·len:·111,·SHA:·1429c5a88bd22712e4d2a0f49ce5481b967c94bbaede0164fdce0beecce619f2·...·]7-1">]</span></code></pre><p>If·<code·class="inline">OptParams</code>·is·not·given,·the·default·value·<code·class="inline">[]</code>·is·used.</p>2175 ·</span><span·class="p"·data-group-id="9336700947-4">{</span><span·class="ss">&#39;error-option&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9336700947-5">[</span><span·class="s">&quot;rollback-on-error&quot;</span><span·class="p"·data-group-id="9336[·...·truncated·by·diffoscope;·len:·111,·SHA:·c9f853960afe7e77c66d1ab3c9a67f5120c03225047336af5f3a00a22541bb99·...·]7-1">]</span></code></pre><p>If·<code·class="inline">OptParams</code>·is·not·given,·the·default·value·<code·class="inline">[]</code>·is·used.</p>
2176 ··</section>2176 ··</section>
2177 </section>2177 </section>
2178 <section·class="detail"·id="get/2">2178 <section·class="detail"·id="get/2">
  
2179 ··<div·class="detail-header">2179 ··<div·class="detail-header">
2180 ····<a·href="#get/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2180 ····<a·href="#get/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2181 ······<i·class="ri-link-m"·aria-hidden="true"></i>2181 ······<i·class="ri-link-m"·aria-hidden="true"></i>
23.6 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_property_test.html
    
Offset 131, 38 lines modifiedOffset 131, 38 lines modified
131 <p>Support·in·Common·Test·for·running·property-based·tests.</p><p>This·module·helps·running·property-based·tests·in·the·<code·class="inline">Common·Test</code>·framework.131 <p>Support·in·Common·Test·for·running·property-based·tests.</p><p>This·module·helps·running·property-based·tests·in·the·<code·class="inline">Common·Test</code>·framework.
132 One·(or·more)·of·the·property·testing·tools</p><ul><li><a·href="http://www.quviq.com">QuickCheck</a>,</li><li><a·href="https://proper-testing.github.io">PropEr</a>·or</li><li><a·href="https://github.com/krestenkrab/triq">Triq</a></li></ul><p>is·assumed·to·be·installed.</p><p>The·idea·with·this·module·is·to·have·a·<code·class="inline">Common·Test</code>·test·suite·calling·a132 One·(or·more)·of·the·property·testing·tools</p><ul><li><a·href="http://www.quviq.com">QuickCheck</a>,</li><li><a·href="https://proper-testing.github.io">PropEr</a>·or</li><li><a·href="https://github.com/krestenkrab/triq">Triq</a></li></ul><p>is·assumed·to·be·installed.</p><p>The·idea·with·this·module·is·to·have·a·<code·class="inline">Common·Test</code>·test·suite·calling·a
133 property·testing·tool·with·special·property·test·suites·as·defined·by·that·tool.133 property·testing·tool·with·special·property·test·suites·as·defined·by·that·tool.
134 The·tests·are·collected·in·the·<code·class="inline">test</code>·directory·of·the·application.·The·<code·class="inline">test</code>134 The·tests·are·collected·in·the·<code·class="inline">test</code>·directory·of·the·application.·The·<code·class="inline">test</code>
135 directory·has·a·subdirectory·<code·class="inline">property_test</code>,·where·everything·needed·for·the135 directory·has·a·subdirectory·<code·class="inline">property_test</code>,·where·everything·needed·for·the
136 property·tests·are·collected.·The·usual·Erlang·application·directory·structure136 property·tests·are·collected.·The·usual·Erlang·application·directory·structure
137 is·assumed.</p><p>A·typical·<code·class="inline">Common·Test</code>·test·suite·using·<code·class="inline">ct_property_test</code>·is·organized·as137 is·assumed.</p><p>A·typical·<code·class="inline">Common·Test</code>·test·suite·using·<code·class="inline">ct_property_test</code>·is·organized·as
138 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4535042455-1">(</span><span·class="ss">my_prop_test_SUITE</span><span·class="p"·data-group-id="4535042455-1">)</span><span·class="p">.</span><span·class="w">138 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1906115508-1">(</span><span·class="ss">my_prop_test_SUITE</span><span·class="p"·data-group-id="1906115508-1">)</span><span·class="p">.</span><span·class="w">
139 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="4535042455-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="4535042455-2">)</span><span·class="p">.</span><span·class="w">139 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="1906115508-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="1906115508-2">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="w">140 </span><span·class="w">
141 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4535042455-3">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="4535042455-3">)</span><span·class="p">.</span><span·class="w">141 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="1906115508-3">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="1906115508-3">)</span><span·class="p">.</span><span·class="w">
  
142 </span><span·class="nf">all</span><span·class="p"·data-group-id="4535042455-4">(</span><span·class="p"·data-group-id="4535042455-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4535042455-5">[</span><span·class="ss">prop_ftp_case</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·28650f1b3818a2d15ecf35fdfa276658a7e5fd7c37c0079cdd7fc13dff9dd2ee·...·]-5">]</span><span·class="p">.</span><span·class="w">142 </span><span·class="nf">all</span><span·class="p"·data-group-id="1906115508-4">(</span><span·class="p"·data-group-id="1906115508-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1906115508-5">[</span><span·class="ss">prop_ftp_case</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·2dda85faa574be18f109d367bd2ff0ee3f9739f79dcf5b8ecbea81f711fa4c0a·...·]-5">]</span><span·class="p">.</span><span·class="w">
  
143 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="4535042455-6">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4535042455-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">143 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="1906115508-6">(</span><span·class="n">Config</span><span·class="p"·data-group-id="1906115508-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
144 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="4535042455-7">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4535042455-7">)</span><span·class="p">.</span><span·class="w">144 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="1906115508-7">(</span><span·class="n">Config</span><span·class="p"·data-group-id="1906115508-7">)</span><span·class="p">.</span><span·class="w">
  
145 </span><span·class="c1">%%%----·test·case</span><span·class="w">145 </span><span·class="c1">%%%----·test·case</span><span·class="w">
146 </span><span·class="nf">prop_ftp_case</span><span·class="p"·data-group-id="4535042455-8">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4535042455-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">146 </span><span·class="nf">prop_ftp_case</span><span·class="p"·data-group-id="1906115508-8">(</span><span·class="n">Config</span><span·class="p"·data-group-id="1906115508-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
147 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">quickcheck</span><span·class="p"·data-group-id="4535042455-9">(</span><span·class="w">147 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">quickcheck</span><span·class="p"·data-group-id="1906115508-9">(</span><span·class="w">
148 ······</span><span·class="nc">ftp_simple_client_server</span><span·class="p">:</span><span·class="nf">prop_ftp</span><span·class="p"·data-group-id="4535042455-10">(</span><span·class="p"·data-group-id="4535042455-10">)</span><span·class="p">,</span><span·class="w">148 ······</span><span·class="nc">ftp_simple_client_server</span><span·class="p">:</span><span·class="nf">prop_ftp</span><span·class="p"·data-group-id="1906115508-10">(</span><span·class="p"·data-group-id="1906115508-10">)</span><span·class="p">,</span><span·class="w">
149 ······</span><span·class="n">Config</span><span·class="w">149 ······</span><span·class="n">Config</span><span·class="w">
150 ·····</span><span·class="p"·data-group-id="4535042455-9">)</span><span·class="p">.</span></code></pre><p>and·the·the·property·test·module·(in·this·example150 ·····</span><span·class="p"·data-group-id="1906115508-9">)</span><span·class="p">.</span></code></pre><p>and·the·the·property·test·module·(in·this·example
151 <code·class="inline">ftp_simple_client_server.erl</code>)·as·almost·a·usual·property·testing·module·(More151 <code·class="inline">ftp_simple_client_server.erl</code>)·as·almost·a·usual·property·testing·module·(More
152 examples·are·in·<a·href="ct_property_test_chapter.html">the·User's·Guide</a>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2913956267-1">(</span><span·class="ss">ftp_simple_client_server</span><span·class="p"·data-group-id="2913956267-1">)</span><span·class="p">.</span><span·class="w">152 examples·are·in·<a·href="ct_property_test_chapter.html">the·User's·Guide</a>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6644236328-1">(</span><span·class="ss">ftp_simple_client_server</span><span·class="p"·data-group-id="6644236328-1">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2913956267-2">(</span><span·class="p"·data-group-id="2913956267-3">[</span><span·class="ss">prop_ftp</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·c526960d33d51a4c4981bd9c421a4a56cfd3bd9f3e5cd58f1dfc9c9c05c8b9f2·...·]-2">)</span><span·class="p">.</span><span·class="w">153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6644236328-2">(</span><span·class="p"·data-group-id="6644236328-3">[</span><span·class="ss">prop_ftp</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·66,·SHA:·205654f1533d97ca5494ca3513e84d29f3a9738b86bcc11da6b61e2ea98164a9·...·]-2">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="w">154 </span><span·class="w">
155 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2913956267-4">(</span><span·class="s">&quot;common_test/include/ct_property_test.hrl&quot;</span><span·class="p"·data-group-id="2913956267-4">)</span><span·class="p">.</span><span·class="w">155 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6644236328-4">(</span><span·class="s">&quot;common_test/include/ct_property_test.hrl&quot;</span><span·class="p"·data-group-id="6644236328-4">)</span><span·class="p">.</span><span·class="w">
  
156 </span><span·class="nf">prop_ftp</span><span·class="p"·data-group-id="2913956267-5">(</span><span·class="p"·data-group-id="2913956267-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 </span><span·class="nf">prop_ftp</span><span·class="p"·data-group-id="6644236328-5">(</span><span·class="p"·data-group-id="6644236328-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ····</span><span·class="o">?</span><span·class="n">FORALL</span><span·class="p"·data-group-id="2913956267-6">(</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>157 ····</span><span·class="o">?</span><span·class="n">FORALL</span><span·class="p"·data-group-id="6644236328-6">(</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>
158 ····</section>158 ····</section>
  
159 </div>159 </div>
  
160 ··<section·id="summary"·class="details-list">160 ··<section·id="summary"·class="details-list">
161 ····<h1·class="section-heading">161 ····<h1·class="section-heading">
162 ······<a·class="hover-link"·href="#summary">162 ······<a·class="hover-link"·href="#summary">
Offset 489, 15 lines modifiedOffset 489, 15 lines modified
489 <code·class="inline">{fail,·Explanation}</code>.</p><p>If·support·is·found,·the·option·<code·class="inline">{property_test_tool,ToolModule}</code>·with·the489 <code·class="inline">{fail,·Explanation}</code>.</p><p>If·support·is·found,·the·option·<code·class="inline">{property_test_tool,ToolModule}</code>·with·the
490 selected·tool·main·module·name·(<code·class="inline">eqc</code>,·<code·class="inline">proper</code>·or·<code·class="inline">triq</code>)·is·added·to·the·list490 selected·tool·main·module·name·(<code·class="inline">eqc</code>,·<code·class="inline">proper</code>·or·<code·class="inline">triq</code>)·is·added·to·the·list
491 <code·class="inline">Config</code>·which·then·is·returned.</p><p>The·property·tests·are·assumed·to·be·in·a·subdirectory·named·<code·class="inline">property_test</code>.491 <code·class="inline">Config</code>·which·then·is·returned.</p><p>The·property·tests·are·assumed·to·be·in·a·subdirectory·named·<code·class="inline">property_test</code>.
492 All·found·Erlang·files·in·that·directory·are·compiled·with·one·of·the·macros492 All·found·Erlang·files·in·that·directory·are·compiled·with·one·of·the·macros
493 <code·class="inline">'EQC'</code>,·<code·class="inline">'PROPER'</code>·or·<code·class="inline">'TRIQ'</code>·set,·depending·on·which·tool·that·is·first493 <code·class="inline">'EQC'</code>,·<code·class="inline">'PROPER'</code>·or·<code·class="inline">'TRIQ'</code>·set,·depending·on·which·tool·that·is·first
494 found.·This·could·make·parts·of·the·Erlang·property·tests·code·to·be·included·or494 found.·This·could·make·parts·of·the·Erlang·property·tests·code·to·be·included·or
495 excluded·with·the·macro·directives·<code·class="inline">-ifdef(Macro).</code>·or·<code·class="inline">-ifndef(Macro).</code>.</p><p>The·file(s)·in·the·<code·class="inline">property_test</code>·subdirectory·could,·or·should,·include·the495 excluded·with·the·macro·directives·<code·class="inline">-ifdef(Macro).</code>·or·<code·class="inline">-ifndef(Macro).</code>.</p><p>The·file(s)·in·the·<code·class="inline">property_test</code>·subdirectory·could,·or·should,·include·the
496 ct_property_test·include·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0138532163-1">(</span><span·class="s">&quot;common_test/include/ct_property_test.hrl&quot;</span><span·class="p"·data-group-id="0138532163-1">)</span><span·class="p">.</span></code></pre><p>This·included·file·will:</p><ul><li>Include·the·correct·tool's·include·file</li><li>Set·the·macro·<code·class="inline">'MOD_eqc'</code>·to·the·correct·module·name·for·the·selected·tool.496 ct_property_test·include·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2254713474-1">(</span><span·class="s">&quot;common_test/include/ct_property_test.hrl&quot;</span><span·class="p"·data-group-id="2254713474-1">)</span><span·class="p">.</span></code></pre><p>This·included·file·will:</p><ul><li>Include·the·correct·tool's·include·file</li><li>Set·the·macro·<code·class="inline">'MOD_eqc'</code>·to·the·correct·module·name·for·the·selected·tool.
497 That·is,·the·macro·<code·class="inline">'MOD_eqc'</code>·is·set·to·either·<code·class="inline">eqc</code>,·<code·class="inline">proper</code>·or·<code·class="inline">triq</code>.</li></ul>497 That·is,·the·macro·<code·class="inline">'MOD_eqc'</code>·is·set·to·either·<code·class="inline">eqc</code>,·<code·class="inline">proper</code>·or·<code·class="inline">triq</code>.</li></ul>
498 ··</section>498 ··</section>
499 </section>499 </section>
500 <section·class="detail"·id="present_result/4">500 <section·class="detail"·id="present_result/4">
  
501 ··<div·class="detail-header">501 ··<div·class="detail-header">
502 ····<a·href="#present_result/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">502 ····<a·href="#present_result/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 569, 34 lines modifiedOffset 569, 34 lines modified
569 ····························Config·::·<a·href="../../../../lib/stdlib-6.0.1/doc/html/proplists.html#t:proplist/0">proplists:proplist</a>(),569 ····························Config·::·<a·href="../../../../lib/stdlib-6.0.1/doc/html/proplists.html#t:proplist/0">proplists:proplist</a>(),
570 ····························Options0·::·<a·href="../../../../lib/stdlib-6.0.1/doc/html/proplists.html#t:proplist/0">proplists:proplist</a>().</pre>570 ····························Options0·::·<a·href="../../../../lib/stdlib-6.0.1/doc/html/proplists.html#t:proplist/0">proplists:proplist</a>().</pre>
  
571 ······</div>571 ······</div>
  
572 <p>Presents·the·result·of·<em>stateful·(statem)·property·testing</em>·using·the·aggregate572 <p>Presents·the·result·of·<em>stateful·(statem)·property·testing</em>·using·the·aggregate
573 function·in·PropEr,·QuickCheck·or·other·similar·property·testing·tool.</p><p>It·is·assumed·to·be·called·inside·the·property·called·by·<a·href="#quickcheck/2"><code·class="inline">quickcheck/2</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">573 function·in·PropEr,·QuickCheck·or·other·similar·property·testing·tool.</p><p>It·is·assumed·to·be·called·inside·the·property·called·by·<a·href="#quickcheck/2"><code·class="inline">quickcheck/2</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
574 </span><span·class="n">RunResult</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">run_parallel_commands</span><span·class="p"·data-group-id="4130879103-1">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p"·data-group-id="4130879103-1">)</span><span·class="p">,</span><span·class="w">574 </span><span·class="n">RunResult</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">run_parallel_commands</span><span·class="p"·data-group-id="7285155463-1">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p"·data-group-id="7285155463-1">)</span><span·class="p">,</span><span·class="w">
575 </span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">present_result</span><span·class="p"·data-group-id="4130879103-2">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RunResult</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·91,·SHA:·68687c77c5206a8c0ea35e20337d22fd9ef7641c6249ce9eda355b86aff63403·...·]3-2">)</span><span·class="w">575 </span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">present_result</span><span·class="p"·data-group-id="7285155463-2">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RunResult</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·91,·SHA:·838795b31d5161e00362aea0c2134b3e7504c6c5e36269a1a141310aba2c082e·...·]3-2">)</span><span·class="w">
576 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>See·the·<a·href="ct_property_test_chapter.html#stateful1">User's·Guide</a>·for·an·example·of576 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>See·the·<a·href="ct_property_test_chapter.html#stateful1">User's·Guide</a>·for·an·example·of
577 the·usage·and·of·the·default·printout.</p><p>The·<code·class="inline">StatisticsSpec</code>·is·a·list·of·the·tuples:</p><ul><li><code·class="inline">{Title::string(),·CollectFun::fun/1}</code></li><li><code·class="inline">{Title::string(),·FrequencyFun::/0,·CollectFun::fun/1}</code></li></ul><p>Each·tuple·will·produce·one·table·in·the·order·of·their·places·in·the·list.</p><ul><li><p><code·class="inline">Title</code>·will·be·the·title·of·one·result·table</p></li><li><p><code·class="inline">CollectFun</code>·is·called·with·one·argument:·the·<code·class="inline">Cmds</code>.·It·should·return·a·list577 the·usage·and·of·the·default·printout.</p><p>The·<code·class="inline">StatisticsSpec</code>·is·a·list·of·the·tuples:</p><ul><li><code·class="inline">{Title::string(),·CollectFun::fun/1}</code></li><li><code·class="inline">{Title::string(),·FrequencyFun::/0,·CollectFun::fun/1}</code></li></ul><p>Each·tuple·will·produce·one·table·in·the·order·of·their·places·in·the·list.</p><ul><li><p><code·class="inline">Title</code>·will·be·the·title·of·one·result·table</p></li><li><p><code·class="inline">CollectFun</code>·is·called·with·one·argument:·the·<code·class="inline">Cmds</code>.·It·should·return·a·list
578 of·the·values·to·be·counted.·The·following·pre-defined·functions·exist:</p><ul><li><code·class="inline">ct_property_test:cmnd_names/1</code>·returns·a·list·of·commands·(function·calls)578 of·the·values·to·be·counted.·The·following·pre-defined·functions·exist:</p><ul><li><code·class="inline">ct_property_test:cmnd_names/1</code>·returns·a·list·of·commands·(function·calls)
579 generated·in·the·<code·class="inline">Cmnd</code>·sequence,·without·Module,·Arguments·and·other579 generated·in·the·<code·class="inline">Cmnd</code>·sequence,·without·Module,·Arguments·and·other
580 details.</li><li><code·class="inline">ct_property_test:num_calls/1</code>·returns·a·list·of·the·length·of·commands580 details.</li><li><code·class="inline">ct_property_test:num_calls/1</code>·returns·a·list·of·the·length·of·commands
581 lists</li><li><code·class="inline">ct_property_test:sequential_parallel/1</code>·returns·a·list·with·information581 lists</li><li><code·class="inline">ct_property_test:sequential_parallel/1</code>·returns·a·list·with·information
582 about·sequential·and·parallel·parts·from·<code·class="inline">Tool:parallel_commands/1,2</code></li></ul></li><li><p><code·class="inline">FrequencyFun/0</code>·returns·a·fun/1·which·is·supposed·to·take·a·list·of·items·as582 about·sequential·and·parallel·parts·from·<code·class="inline">Tool:parallel_commands/1,2</code></li></ul></li><li><p><code·class="inline">FrequencyFun/0</code>·returns·a·fun/1·which·is·supposed·to·take·a·list·of·items·as
583 input,·and·return·an·iolist·which·will·be·printed·as·the·table.·Per·default,583 input,·and·return·an·iolist·which·will·be·printed·as·the·table.·Per·default,
584 the·number·of·each·item·is·counted·and·the·percentage·is·printed·for·each.·The584 the·number·of·each·item·is·counted·and·the·percentage·is·printed·for·each.·The
585 list·[a,b,a,a,c]·could·for·example·return</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3983242730-1">[</span><span·class="s">&quot;a·60%\n&quot;</span><span·class="p">,</span><span·class="s">&quot;b·20%\n&quot;</span><span·class="p">,</span><span·class="s">&quot;c·20%\n&quot;</span><span·class="p"·data-group-id="3983242730-1">]</span></code></pre><p>which·will·be·printed·by·the·<code·class="inline">print_fun</code>.·The·default·<code·class="inline">print_fun</code>·will·print585 list·[a,b,a,a,c]·could·for·example·return</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4404084286-1">[</span><span·class="s">&quot;a·60%\n&quot;</span><span·class="p">,</span><span·class="s">&quot;b·20%\n&quot;</span><span·class="p">,</span><span·class="s">&quot;c·20%\n&quot;</span><span·class="p"·data-group-id="4404084286-1">]</span></code></pre><p>which·will·be·printed·by·the·<code·class="inline">print_fun</code>.·The·default·<code·class="inline">print_fun</code>·will·print
586 it·as:</p><pre><code·class="text">a·60%586 it·as:</p><pre><code·class="text">a·60%
587 b·20%587 b·20%
588 c·20%</code></pre></li></ul><p>The·default·<code·class="inline">StatisticsSpec</code>·is:</p><ul><li><p>For·sequential·commands:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8918068617-1">[</span><span·class="p"·data-group-id="8918068617-2">{</span><span·class="s">&quot;Function·calls&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">cmnd_names</span>[·...·truncated·by·diffoscope;·len:·90,·SHA:·f493f7884bc1439afa5afea769ac8867e2fb43488cb71b854b5d56b2752c8dc6·...·]-2">}</span><span·class="p">,</span><span·class="w">588 c·20%</code></pre></li></ul><p>The·default·<code·class="inline">StatisticsSpec</code>·is:</p><ul><li><p>For·sequential·commands:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3664003968-1">[</span><span·class="p"·data-group-id="3664003968-2">{</span><span·class="s">&quot;Function·calls&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">cmnd_names</span>[·...·truncated·by·diffoscope;·len:·90,·SHA:·d2bfc70aa96f63eb647cb44a1e7c44a52df2026eac8f990a30e3fce5c3d83d76·...·]-2">}</span><span·class="p">,</span><span·class="w">
589 ·</span><span·class="p"·data-group-id="8918068617-3">{</span><span·class="s">&quot;Length·of·command·sequences&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">print_frequency_ranges</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">589 ·</span><span·class="p"·data-group-id="3664003968-3">{</span><span·class="s">&quot;Length·of·command·sequences&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">print_frequency_ranges</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
590 ··················································</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">num_calls</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="8918068617-3">}</span><span·class="p"·data-group-id="8918068617-1">]</span></code></pre></li><li><p>For·parallel·commands:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5147169369-1">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·322,·SHA:·a6f642d124a0ea32fd3644cb7f061e49de6470917a9222ae365842912ffc2989·...·]-2">}</span><span·class="p">,</span><span·class="w">590 ··················································</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">num_calls</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3664003968-3">}</span><span·class="p"·data-group-id="3664003968-1">]</span></code></pre></li><li><p>For·parallel·commands:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5058338648-1">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·322,·SHA:·0b2ee1b3286234902df5687267c2cbf0ed7a60d43934e7072787b8131019cd3b·...·]-2">}</span><span·class="p">,</span><span·class="w">
591 ·</span><span·class="p"·data-group-id="5147169369-3">{</span><span·class="s">&quot;Function·calls&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">cmnd_names</span><span·class="p">/</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·2e502250a946787d983bec4b982a06719e2b63ac61cd91eb47367e3427c9923b·...·]-3">}</span><span·class="p">,</span><span·class="w">591 ·</span><span·class="p"·data-group-id="5058338648-3">{</span><span·class="s">&quot;Function·calls&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">cmnd_names</span><span·class="p">/</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·683f4e83607b0dade0af8387e160cf9011ed007abe96ca034263222321b8fab9·...·]-3">}</span><span·class="p">,</span><span·class="w">
592 ·</span><span·class="p"·data-group-id="5147169369-4">{</span><span·class="s">&quot;Length·of·command·sequences&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">print_frequency_ranges</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">592 ·</span><span·class="p"·data-group-id="5058338648-4">{</span><span·class="s">&quot;Length·of·command·sequences&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">print_frequency_ranges</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
593 ··················································</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">num_calls</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="5147169369-4">}</span><span·class="p"·data-group-id="5147169369-1">]</span></code></pre></li></ul>593 ··················································</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">num_calls</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="5058338648-4">}</span><span·class="p"·data-group-id="5058338648-1">]</span></code></pre></li></ul>
594 ··</section>594 ··</section>
595 </section>595 </section>
596 <section·class="detail"·id="quickcheck/2">596 <section·class="detail"·id="quickcheck/2">
  
597 ··<div·class="detail-header">597 ··<div·class="detail-header">
598 ····<a·href="#quickcheck/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">598 ····<a·href="#quickcheck/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
599 ······<i·class="ri-link-m"·aria-hidden="true"></i>599 ······<i·class="ri-link-m"·aria-hidden="true"></i>
21.7 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_property_test_chapter.html
    
Offset 143, 59 lines modifiedOffset 143, 59 lines modified
143 <p>The·<a·href="ct_property_test.html#">ct_property_test</a>·module·does·the·following:</p><ul><li>Compiles·the·files·with·property·tests·in·the·subdirectory·<code·class="inline">property_test</code></li><li>Tests·properties·in·those·files·using·the·first·found·Property·Testing·Tool.</li><li>Saves·the·results·-·that·is·the·printouts·-·in·the·usual·Common·Test·Log</li></ul><h2·id="introductory-example"·class="section-heading">143 <p>The·<a·href="ct_property_test.html#">ct_property_test</a>·module·does·the·following:</p><ul><li>Compiles·the·files·with·property·tests·in·the·subdirectory·<code·class="inline">property_test</code></li><li>Tests·properties·in·those·files·using·the·first·found·Property·Testing·Tool.</li><li>Saves·the·results·-·that·is·the·printouts·-·in·the·usual·Common·Test·Log</li></ul><h2·id="introductory-example"·class="section-heading">
144 ··<a·href="#introductory-example"·class="hover-link">144 ··<a·href="#introductory-example"·class="hover-link">
145 ····<i·class="ri-link-m"·aria-hidden="true"></i>145 ····<i·class="ri-link-m"·aria-hidden="true"></i>
146 ··</a>146 ··</a>
147 ··<span·class="text">Introductory·Example</span>147 ··<span·class="text">Introductory·Example</span>
148 </h2>148 </h2>
149 <p>Assume·that·we·want·to·test·the·lists:sort/1·function.</p><p>We·need·a·property·to·test·the·function.·In·normal·way,·we·create149 <p>Assume·that·we·want·to·test·the·lists:sort/1·function.</p><p>We·need·a·property·to·test·the·function.·In·normal·way,·we·create
150 <code·class="inline">property_test/ct_prop.erl</code>·module·in·the·<code·class="inline">test</code>·directory·in·our·application:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6924066013-1">(</span><span·class="ss">ct_prop</span><span·class="p"·data-group-id="6924066013-1">)</span><span·class="p">.</span><span·class="w">150 <code·class="inline">property_test/ct_prop.erl</code>·module·in·the·<code·class="inline">test</code>·directory·in·our·application:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1888700572-1">(</span><span·class="ss">ct_prop</span><span·class="p"·data-group-id="1888700572-1">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6924066013-2">(</span><span·class="p"·data-group-id="6924066013-3">[</span><span·class="ss">prop_sort</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6924066013-3">]</span><span·class="p"·data-group-id="6924066013-2">)</span><span·class="p">.</span><span·class="w">151 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1888700572-2">(</span><span·class="p"·data-group-id="1888700572-3">[</span><span·class="ss">prop_sort</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1888700572-3">]</span><span·class="p"·data-group-id="1888700572-2">)</span><span·class="p">.</span><span·class="w">
  
152 </span><span·class="c1">%%%·This·will·include·the·.hrl·file·for·the·installed·testing·tool:</span><span·class="w">152 </span><span·class="c1">%%%·This·will·include·the·.hrl·file·for·the·installed·testing·tool:</span><span·class="w">
153 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6924066013-4">(</span><span·class="s">&quot;common_test/include/ct_property_test.hrl&quot;</span><span·class="p"·data-group-id="6924066013-4">)</span><span·class="p">.</span><span·class="w">153 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="1888700572-4">(</span><span·class="s">&quot;common_test/include/ct_property_test.hrl&quot;</span><span·class="p"·data-group-id="1888700572-4">)</span><span·class="p">.</span><span·class="w">
  
154 </span><span·class="c1">%%%·The·property·we·want·to·check:</span><span·class="w">154 </span><span·class="c1">%%%·The·property·we·want·to·check:</span><span·class="w">
155 </span><span·class="c1">%%%···For·all·possibly·unsorted·lists,</span><span·class="w">155 </span><span·class="c1">%%%···For·all·possibly·unsorted·lists,</span><span·class="w">
156 </span><span·class="c1">%%%···the·result·of·lists:sort/1·is·sorted.</span><span·class="w">156 </span><span·class="c1">%%%···the·result·of·lists:sort/1·is·sorted.</span><span·class="w">
157 </span><span·class="nf">prop_sort</span><span·class="p"·data-group-id="6924066013-5">(</span><span·class="p"·data-group-id="6924066013-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">prop_sort</span><span·class="p"·data-group-id="1888700572-5">(</span><span·class="p"·data-group-id="1888700572-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="o">?</span><span·class="n">FORALL</span><span·class="p"·data-group-id="6924066013-6">(</span><span·class="n">UnSorted</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="6924066013-7">(</span><span·class="p"·data-group-id="6924066013-7">)</span><span·class="p">,</span><span·class="w">158 ····</span><span·class="o">?</span><span·class="n">FORALL</span><span·class="p"·data-group-id="1888700572-6">(</span><span·class="n">UnSorted</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="1888700572-7">(</span><span·class="p"·data-group-id="1888700572-7">)</span><span·class="p">,</span><span·class="w">
159 ············</span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="6924066013-8">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="6924066013-9">(</span><span·class="n">UnSorted</span><span·class="p"·data-group-id="6924066013-9">)</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·15da001fa83d7ddeb360d1c62378349269386ebb6a5c6836e9fb99aa9174b8c8·...·]-8">)</span><span·class="w">159 ············</span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="1888700572-8">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="1888700572-9">(</span><span·class="n">UnSorted</span><span·class="p"·data-group-id="1888700572-9">)</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·099dc23063514186a15a67b9924e12ea343d3e9a5354a17727c6426bd4d00894·...·]-8">)</span><span·class="w">
160 ···········</span><span·class="p"·data-group-id="6924066013-6">)</span><span·class="p">.</span><span·class="w">160 ···········</span><span·class="p"·data-group-id="1888700572-6">)</span><span·class="p">.</span><span·class="w">
  
161 </span><span·class="c1">%%%·Function·to·check·that·a·list·is·sorted:</span><span·class="w">161 </span><span·class="c1">%%%·Function·to·check·that·a·list·is·sorted:</span><span·class="w">
162 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="6924066013-10">(</span><span·class="p"·data-group-id="6924066013-11">[</span><span·class="p"·data-group-id="6924066013-11">]</span><span·class="p"·data-group-id="6924066013-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">162 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="1888700572-10">(</span><span·class="p"·data-group-id="1888700572-11">[</span><span·class="p"·data-group-id="1888700572-11">]</span><span·class="p"·data-group-id="1888700572-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
163 ····</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">163 ····</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
164 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="6924066013-12">(</span><span·class="p"·data-group-id="6924066013-13">[</span><span·class="p">_</span><span·class="p"·data-group-id="6924066013-13">]</span><span·class="p"·data-group-id="6924066013-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">164 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="1888700572-12">(</span><span·class="p"·data-group-id="1888700572-13">[</span><span·class="p">_</span><span·class="p"·data-group-id="1888700572-13">]</span><span·class="p"·data-group-id="1888700572-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
165 ····</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">165 ····</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
166 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="6924066013-14">(</span><span·class="p"·data-group-id="6924066013-15">[</span><span·class="n">H1</span><span·class="p">,</span><span·class="n">H2</span><span·class="p">|</span><span·class="n">SortedTail</span><span·class="p"·data-group-id="6924066013-15">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·0a6d2e621fa843609bfb663552472ab9437c2d8d87e95cd7f1d23e589b380b78·...·]-14">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">H1</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="n">H2</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">166 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="1888700572-14">(</span><span·class="p"·data-group-id="1888700572-15">[</span><span·class="n">H1</span><span·class="p">,</span><span·class="n">H2</span><span·class="p">|</span><span·class="n">SortedTail</span><span·class="p"·data-group-id="1888700572-15">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·42a8037b835558fb36e4fb535eb77a02e62886e312603669c8b93f42d118c4ee·...·]-14">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">H1</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="n">H2</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
167 ····</span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="6924066013-16">(</span><span·class="p"·data-group-id="6924066013-17">[</span><span·class="n">H2</span><span·class="p">|</span><span·class="n">SortedTail</span><span·class="p"·data-group-id="6924066013-17">]</span><span·class="p"·data-group-id="6924066013-16">)</span><span·class="p">;</span><span·class="w">167 ····</span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="1888700572-16">(</span><span·class="p"·data-group-id="1888700572-17">[</span><span·class="n">H2</span><span·class="p">|</span><span·class="n">SortedTail</span><span·class="p"·data-group-id="1888700572-17">]</span><span·class="p"·data-group-id="1888700572-16">)</span><span·class="p">;</span><span·class="w">
168 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="6924066013-18">(</span><span·class="p">_</span><span·class="p"·data-group-id="6924066013-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">168 </span><span·class="nf">is_sorted</span><span·class="p"·data-group-id="1888700572-18">(</span><span·class="p">_</span><span·class="p"·data-group-id="1888700572-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
169 ····</span><span·class="ss">false</span><span·class="p">.</span></code></pre><p>We·also·need·a·CommonTest·test·suite:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5974540264-1">(</span><span·class="ss">ct_property_test_SUITE</span><span·class="p"·data-group-id="5974540264-1">)</span><span·class="p">.</span><span·class="w">169 ····</span><span·class="ss">false</span><span·class="p">.</span></code></pre><p>We·also·need·a·CommonTest·test·suite:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0895911716-1">(</span><span·class="ss">ct_property_test_SUITE</span><span·class="p"·data-group-id="0895911716-1">)</span><span·class="p">.</span><span·class="w">
170 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="5974540264-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="5974540264-2">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Only·in·tests!</span><span·class="w">170 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="0895911716-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="0895911716-2">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Only·in·tests!</span><span·class="w">
171 </span><span·class="w">171 </span><span·class="w">
172 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="5974540264-3">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="5974540264-3">)</span><span·class="p">.</span><span·class="w">172 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0895911716-3">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="0895911716-3">)</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="nf">all</span><span·class="p"·data-group-id="5974540264-4">(</span><span·class="p"·data-group-id="5974540264-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5974540264-5">[</span><span·class="ss">prop_sort</span><span·class="w">173 </span><span·class="nf">all</span><span·class="p"·data-group-id="0895911716-4">(</span><span·class="p"·data-group-id="0895911716-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0895911716-5">[</span><span·class="ss">prop_sort</span><span·class="w">
174 ·········</span><span·class="p"·data-group-id="5974540264-5">]</span><span·class="p">.</span><span·class="w">174 ·········</span><span·class="p"·data-group-id="0895911716-5">]</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="c1">%%%·First·prepare·Config·and·compile·the·property·tests·for·the·found·tool:</span><span·class="w">175 </span><span·class="c1">%%%·First·prepare·Config·and·compile·the·property·tests·for·the·found·tool:</span><span·class="w">
176 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="5974540264-6">(</span><span·class="n">Config</span><span·class="p"·data-group-id="5974540264-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="0895911716-6">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0895911716-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="5974540264-7">(</span><span·class="n">Config</span><span·class="p"·data-group-id="5974540264-7">)</span><span·class="p">.</span><span·class="w">177 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="0895911716-7">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0895911716-7">)</span><span·class="p">.</span><span·class="w">
  
178 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="5974540264-8">(</span><span·class="n">Config</span><span·class="p"·data-group-id="5974540264-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="0895911716-8">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0895911716-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="n">Config</span><span·class="p">.</span><span·class="w">179 ····</span><span·class="n">Config</span><span·class="p">.</span><span·class="w">
  
180 </span><span·class="c1">%%%================================================================</span><span·class="w">180 </span><span·class="c1">%%%================================================================</span><span·class="w">
181 </span><span·class="c1">%%%·Test·suites</span><span·class="w">181 </span><span·class="c1">%%%·Test·suites</span><span·class="w">
182 </span><span·class="c1">%%%</span><span·class="w">182 </span><span·class="c1">%%%</span><span·class="w">
183 </span><span·class="nf">prop_sort</span><span·class="p"·data-group-id="5974540264-9">(</span><span·class="n">Config</span><span·class="p"·data-group-id="5974540264-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">183 </span><span·class="nf">prop_sort</span><span·class="p"·data-group-id="0895911716-9">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0895911716-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
184 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">quickcheck</span><span·class="p"·data-group-id="5974540264-10">(</span><span·class="w">184 ····</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">quickcheck</span><span·class="p"·data-group-id="0895911716-10">(</span><span·class="w">
185 ······</span><span·class="nc">ct_prop</span><span·class="p">:</span><span·class="nf">prop_sort</span><span·class="p"·data-group-id="5974540264-11">(</span><span·class="p"·data-group-id="5974540264-11">)</span><span·class="p">,</span><span·class="w">185 ······</span><span·class="nc">ct_prop</span><span·class="p">:</span><span·class="nf">prop_sort</span><span·class="p"·data-group-id="0895911716-11">(</span><span·class="p"·data-group-id="0895911716-11">)</span><span·class="p">,</span><span·class="w">
186 ······</span><span·class="n">Config</span><span·class="w">186 ······</span><span·class="n">Config</span><span·class="w">
187 ·····</span><span·class="p"·data-group-id="5974540264-10">)</span><span·class="p">.</span></code></pre><p>We·run·it·as·usual,·for·example·with·ct_run·in·the·OS·shell:</p><pre><code·class="text">..../test$·ct_run·-suite·ct_property_test_SUITE187 ·····</span><span·class="p"·data-group-id="0895911716-10">)</span><span·class="p">.</span></code></pre><p>We·run·it·as·usual,·for·example·with·ct_run·in·the·OS·shell:</p><pre><code·class="text">..../test$·ct_run·-suite·ct_property_test_SUITE
188 .....188 .....
189 Common·Test:·Running·make·in·test·directories...189 Common·Test:·Running·make·in·test·directories...
  
190 TEST·INFO:·1·test(s),·1·case(s)·in·1·suite(s)190 TEST·INFO:·1·test(s),·1·case(s)·in·1·suite(s)
  
191 Testing·lib.common_test.ct_property_test_SUITE:·Starting·test,·1·test·cases191 Testing·lib.common_test.ct_property_test_SUITE:·Starting·test,·1·test·cases
  
Offset 217, 21 lines modifiedOffset 217, 21 lines modified
217 ....</code></pre><p><a·href=""·id="stateful1"></a></p><h2·id="a-stateful-testing-example"·class="section-heading">217 ....</code></pre><p><a·href=""·id="stateful1"></a></p><h2·id="a-stateful-testing-example"·class="section-heading">
218 ··<a·href="#a-stateful-testing-example"·class="hover-link">218 ··<a·href="#a-stateful-testing-example"·class="hover-link">
219 ····<i·class="ri-link-m"·aria-hidden="true"></i>219 ····<i·class="ri-link-m"·aria-hidden="true"></i>
220 ··</a>220 ··</a>
221 ··<span·class="text">A·stateful·testing·example</span>221 ··<span·class="text">A·stateful·testing·example</span>
222 </h2>222 </h2>
223 <p>Assume·a·test·that·generates·some·parallel·stateful·commands,·and·runs·300223 <p>Assume·a·test·that·generates·some·parallel·stateful·commands,·and·runs·300
224 tests:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">prop_parallel</span><span·class="p"·data-group-id="4223081285-1">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4223081285-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 tests:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">prop_parallel</span><span·class="p"·data-group-id="6182444528-1">(</span><span·class="n">Config</span><span·class="p"·data-group-id="6182444528-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 ····</span><span·class="nf">numtests</span><span·class="p"·data-group-id="4223081285-2">(</span><span·class="mi">300</span><span·class="p">,</span><span·class="w">225 ····</span><span·class="nf">numtests</span><span·class="p"·data-group-id="6182444528-2">(</span><span·class="mi">300</span><span·class="p">,</span><span·class="w">
226 ·············</span><span·class="o">?</span><span·class="n">FORALL</span><span·class="p"·data-group-id="4223081285-3">(</span><span·class="n">Cmds</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">parallel_commands</span><span·class="p"·data-group-id="4223081285-4">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·0b7d6a9d690ec2a60f4e25816c8686a87cdbcacb846424676c8fc9745f41d264·...·]-4">)</span><span·class="p">,</span><span·class="w">226 ·············</span><span·class="o">?</span><span·class="n">FORALL</span><span·class="p"·data-group-id="6182444528-3">(</span><span·class="n">Cmds</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">parallel_commands</span><span·class="p"·data-group-id="6182444528-4">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·c4aa70e9a33339d792eda612b8d501a4b4bee7b7f8fb26f0c294420e51b55114·...·]-4">)</span><span·class="p">,</span><span·class="w">
227 ·····················</span><span·class="k">begin</span><span·class="w">227 ·····················</span><span·class="k">begin</span><span·class="w">
228 ·························</span><span·class="n">RunResult</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">run_parallel_commands</span><span·class="p"·data-group-id="4223081285-5">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p"·data-group-id="4223081285-5">)</span><span·class="p">,</span><span·class="w">228 ·························</span><span·class="n">RunResult</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">run_parallel_commands</span><span·class="p"·data-group-id="6182444528-5">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p"·data-group-id="6182444528-5">)</span><span·class="p">,</span><span·class="w">
229 ·························</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">present_result</span><span·class="p"·data-group-id="4223081285-6">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RunResult</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·11c21870b862242cc8dd6e1bc6568153a836e1b4d5d16820f81e7b7c72e1e88e·...·]-6">)</span><span·class="w">229 ·························</span><span·class="nc">ct_property_test</span><span·class="p">:</span><span·class="nf">present_result</span><span·class="p"·data-group-id="6182444528-6">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cmds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RunResult</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·f07eb9081843775b1318f72b75f9a7302a30eabc581369af41078f648dae12f7·...·]-6">)</span><span·class="w">
230 ·····················</span><span·class="k">end</span><span·class="p"·data-group-id="4223081285-3">)</span><span·class="p"·data-group-id="4223081285-2">)</span><span·class="p">.</span></code></pre><p>The·<a·href="ct_property_test.html#present_result/4"><code·class="inline">ct_property_test:present_result/4</code></a>·is·a·help·function·for·printing·some230 ·····················</span><span·class="k">end</span><span·class="p"·data-group-id="6182444528-3">)</span><span·class="p"·data-group-id="6182444528-2">)</span><span·class="p">.</span></code></pre><p>The·<a·href="ct_property_test.html#present_result/4"><code·class="inline">ct_property_test:present_result/4</code></a>·is·a·help·function·for·printing·some
231 statistics·in·the·CommonTest·log·file.</p><p>Our·example·test·could·for·example·be·a·simple·test·of·an·ftp·server,·where·we231 statistics·in·the·CommonTest·log·file.</p><p>Our·example·test·could·for·example·be·a·simple·test·of·an·ftp·server,·where·we
232 perform·get,·put·and·delete·requests,·some·of·them·in·parallel.·Per·default,·the232 perform·get,·put·and·delete·requests,·some·of·them·in·parallel.·Per·default,·the
233 result·has·three·sections:</p><pre><code·class="text">***·User·2019-12-11·13:28:17.504·***233 result·has·three·sections:</p><pre><code·class="text">***·User·2019-12-11·13:28:17.504·***
  
234 Distribution·sequential/parallel234 Distribution·sequential/parallel
  
235 ·57.7%·sequential235 ·57.7%·sequential
4.58 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_run_cmd.html
    
Offset 247, 18 lines modifiedOffset 247, 18 lines modified
247 ··[-keep_logs·all·|·NLogs]</code></pre><h2·id="run-common-test-in-interactive-mode"·class="section-heading">247 ··[-keep_logs·all·|·NLogs]</code></pre><h2·id="run-common-test-in-interactive-mode"·class="section-heading">
248 ··<a·href="#run-common-test-in-interactive-mode"·class="hover-link">248 ··<a·href="#run-common-test-in-interactive-mode"·class="hover-link">
249 ····<i·class="ri-link-m"·aria-hidden="true"></i>249 ····<i·class="ri-link-m"·aria-hidden="true"></i>
250 ··</a>250 ··</a>
251 ··<span·class="text">Run·Common·Test·in·Interactive·Mode</span>251 ··<span·class="text">Run·Common·Test·in·Interactive·Mode</span>
252 </h2>252 </h2>
253 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="ss">ct_run</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">shell</span><span·class="w">253 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="ss">ct_run</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">shell</span><span·class="w">
254 ··</span><span·class="p"·data-group-id="8672563292-1">[</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="n">ConfigFile1</span><span·class="w">·</span><span·class="n">ConfigFile2</span><span·class="w">·</span><span·class="p">.</span><span·class="p">[·...·truncated·by·diffoscope;·len:·131,·SHA:·8178530339491f5b4d2c8daa204df8773a8758beffd2e4973c762d1368d8cf81·...·]-1">]</span><span·class="w">254 ··</span><span·class="p"·data-group-id="4276193935-1">[</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="n">ConfigFile1</span><span·class="w">·</span><span·class="n">ConfigFile2</span><span·class="w">·</span><span·class="p">.</span><span·class="p">[·...·truncated·by·diffoscope;·len:·131,·SHA:·8872900f0517b17f3a00205a2d4594d025fe5599628244cd3fed3e704156e920·...·]-1">]</span><span·class="w">
255 ··</span><span·class="p"·data-group-id="8672563292-2">[</span><span·class="o">-</span><span·class="ss">userconfig</span><span·class="w">·</span><span·class="n">CallbackModule1</span><span·class="w">·</span><span·class="n">ConfigString1</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="n">CallbackModule2</span><span·class="w">255 ··</span><span·class="p"·data-group-id="4276193935-2">[</span><span·class="o">-</span><span·class="ss">userconfig</span><span·class="w">·</span><span·class="n">CallbackModule1</span><span·class="w">·</span><span·class="n">ConfigString1</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="n">CallbackModule2</span><span·class="w">
256 ···</span><span·class="n">ConfigString2</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="n">CallbackModuleN</span><span·class="w">·</span><span·class="n">ConfigStringN</span><span·class="p"·data-group-id="8672563292-2">]</span><span·class="w">256 ···</span><span·class="n">ConfigString2</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="n">CallbackModuleN</span><span·class="w">·</span><span·class="n">ConfigStringN</span><span·class="p"·data-group-id="4276193935-2">]</span><span·class="w">
257 ··</span><span·class="p"·data-group-id="8672563292-3">[</span><span·class="o">-</span><span·class="ss">decrypt_key</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="8672563292-3">]</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·208,·SHA:·9af378ee1e6bedaa1bc8c5301f708912413078542a160a7db221261f98af3daf·...·]-4">]</span></code></pre><h2·id="start-a-common-test-master-node"·class="section-heading">257 ··</span><span·class="p"·data-group-id="4276193935-3">[</span><span·class="o">-</span><span·class="ss">decrypt_key</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="4276193935-3">]</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·208,·SHA:·39038d288679f7f7f913a62199ede49b5618a4d528241d8123acf030a84d4c7a·...·]-4">]</span></code></pre><h2·id="start-a-common-test-master-node"·class="section-heading">
258 ··<a·href="#start-a-common-test-master-node"·class="hover-link">258 ··<a·href="#start-a-common-test-master-node"·class="hover-link">
259 ····<i·class="ri-link-m"·aria-hidden="true"></i>259 ····<i·class="ri-link-m"·aria-hidden="true"></i>
260 ··</a>260 ··</a>
261 ··<span·class="text">Start·a·Common·Test·Master·Node</span>261 ··<span·class="text">Start·a·Common·Test·Master·Node</span>
262 </h2>262 </h2>
263 <pre><code·class="text">·ct_run·-ctmaster</code></pre><h2·id="see-also"·class="section-heading">263 <pre><code·class="text">·ct_run·-ctmaster</code></pre><h2·id="see-also"·class="section-heading">
264 ··<a·href="#see-also"·class="hover-link">264 ··<a·href="#see-also"·class="hover-link">
9.85 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_snmp.html
    
Offset 146, 23 lines modifiedOffset 146, 23 lines modified
146 configuration·files·have·default·values·set·by·the·<code·class="inline">SNMP</code>·application.·These146 configuration·files·have·default·values·set·by·the·<code·class="inline">SNMP</code>·application.·These
147 values·can·be·overridden·by·suppling·a·list·of·valid·configuration·values·or·a147 values·can·be·overridden·by·suppling·a·list·of·valid·configuration·values·or·a
148 file·located·in·the·test·suites·data·directory,·which·can·produce·a·list·of148 file·located·in·the·test·suites·data·directory,·which·can·produce·a·list·of
149 valid·configuration·values·if·you·apply·function·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#consult/1"><code·class="inline">file:consult/1</code></a>·to·the·file.</p><ul><li><p><strong><code·class="inline">{agent_contexts,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_community,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_sysinfo,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_vacm,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_usm,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_notify_def,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_target_address_def,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-149 valid·configuration·values·if·you·apply·function·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#consult/1"><code·class="inline">file:consult/1</code></a>·to·the·file.</p><ul><li><p><strong><code·class="inline">{agent_contexts,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_community,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_sysinfo,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_vacm,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_usm,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_notify_def,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-·Optional.</p></li><li><p><strong><code·class="inline">{agent_target_address_def,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-
150 Optional.</p></li><li><p><strong><code·class="inline">{agent_target_param_def,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-150 Optional.</p></li><li><p><strong><code·class="inline">{agent_target_param_def,·[term()]·|·{data_dir_file,·rel_path()}}</code></strong>·-
151 Optional.</p></li></ul><p>Parameter·<code·class="inline">MgrAgentConfName</code>·in·the·functions·is·to·be·a·name·you·allocate·in151 Optional.</p></li></ul><p>Parameter·<code·class="inline">MgrAgentConfName</code>·in·the·functions·is·to·be·a·name·you·allocate·in
152 your·test·suite·using·a·<code·class="inline">require</code>·statement.·Example·(where152 your·test·suite·using·a·<code·class="inline">require</code>·statement.·Example·(where
153 <code·class="inline">MgrAgentConfName·=·snmp_mgr_agent</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="2761107931-1">(</span><span·class="p"·data-group-id="2761107931-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2761107931-2">[</span><span·class="p"·data-group-id="2761107931-3">{</span[·...·truncated·by·diffoscope;·len:·683,·SHA:·b03ff329bc231a367e00ce99dafbe002c78d9132e6a661d4a73d5c305f228357·...·]-1">)</span><span·class="p">.</span></code></pre><p>Notice·that·USM·users·are·needed·for·SNMPv3·configuration·and·are·not·to·be153 <code·class="inline">MgrAgentConfName·=·snmp_mgr_agent</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="1585805629-1">(</span><span·class="p"·data-group-id="1585805629-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1585805629-2">[</span><span·class="p"·data-group-id="1585805629-3">{</span[·...·truncated·by·diffoscope;·len:·683,·SHA:·f69e5d72b5c58c790ac091de51603caf209bf86896d78e970559b6845f849f5d·...·]-1">)</span><span·class="p">.</span></code></pre><p>Notice·that·USM·users·are·needed·for·SNMPv3·configuration·and·are·not·to·be
154 confused·with·users.</p><p>SNMP·traps,·inform,·and·report·messages·are·handled·by·the·user·callback·module.154 confused·with·users.</p><p>SNMP·traps,·inform,·and·report·messages·are·handled·by·the·user·callback·module.
155 For·details,·see·the·<a·href="../../../../lib/snmp-5.16/doc/html/index.html"><code·class="inline">SNMP</code></a>·application.</p><p>It·is·recommended·to·use·the·<code·class="inline">.hrl</code>·files·created·by·the·Erlang/OTP·MIB·compiler155 For·details,·see·the·<a·href="../../../../lib/snmp-5.16/doc/html/index.html"><code·class="inline">SNMP</code></a>·application.</p><p>It·is·recommended·to·use·the·<code·class="inline">.hrl</code>·files·created·by·the·Erlang/OTP·MIB·compiler
156 to·define·the·Object·Identifiers·(OIDs).·For·example,·to·get·the·Erlang·node156 to·define·the·Object·Identifiers·(OIDs).·For·example,·to·get·the·Erlang·node
157 name·from·<code·class="inline">erlNodeTable</code>·in·the·OTP-MIB:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Oid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">erlNodeEntry</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="1985707158-1">[</span><span·class="o">?</span><span·class="ss">erlNodeName</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1985707158-1">]</span></code></pre><p>Furthermore,·values·can·be·set·for·<code·class="inline">SNMP</code>·application·configuration·parameters,157 name·from·<code·class="inline">erlNodeTable</code>·in·the·OTP-MIB:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Oid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">erlNodeEntry</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="3474613333-1">[</span><span·class="o">?</span><span·class="ss">erlNodeName</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="3474613333-1">]</span></code></pre><p>Furthermore,·values·can·be·set·for·<code·class="inline">SNMP</code>·application·configuration·parameters,
158 <code·class="inline">config</code>,·<code·class="inline">server</code>,·<code·class="inline">net_if</code>,·and·so·on·(for·a·list·of·valid·parameters·and158 <code·class="inline">config</code>,·<code·class="inline">server</code>,·<code·class="inline">net_if</code>,·and·so·on·(for·a·list·of·valid·parameters·and
159 types,·see·the·<a·href="../../../../lib/snmp-5.16/doc/html/index.html"><code·class="inline">User's·Guide·for·the·SNMP·application</code></a>).159 types,·see·the·<a·href="../../../../lib/snmp-5.16/doc/html/index.html"><code·class="inline">User's·Guide·for·the·SNMP·application</code></a>).
160 This·is·done·by·defining·a·configuration·data·variable·on·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1640652685-1">{</span><span·class="ss">snmp_app</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1640652685-2">[</span><span·class="p"·data-group-id="1640652685-3">{</span><span·class="ss">manager</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·331,·SHA:·fe2b7ae7035e625921d4304766df035124f1769f1fa74b51102e805d8951b8df·...·]-3">}</span><span·class="p">,</span><span·class="w">160 This·is·done·by·defining·a·configuration·data·variable·on·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2258781222-1">{</span><span·class="ss">snmp_app</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2258781222-2">[</span><span·class="p"·data-group-id="2258781222-3">{</span><span·class="ss">manager</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·331,·SHA:·2c125ec03d8cd304d1f3a4a9bbcf6642f5cedc17553978e58a94de42dd0bfb73·...·]-3">}</span><span·class="p">,</span><span·class="w">
161 ············</span><span·class="p"·data-group-id="1640652685-6">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1640652685-7">[</span><span·class="nf">snmp_app_agent_params</span><span·class="p"·data-group-id="1640652685-8">(</span><span·[·...·truncated·by·diffoscope;·len:·247,·SHA:·dcc1ee8b58d0c6f7282a5ff9f26e7ca5c258952ae6b38556a816168cc2cac236·...·]-1">}</span><span·class="p">.</span></code></pre><p>A·name·for·the·data·must·be·allocated·in·the·suite·using·<code·class="inline">require</code>·(see·the161 ············</span><span·class="p"·data-group-id="2258781222-6">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2258781222-7">[</span><span·class="nf">snmp_app_agent_params</span><span·class="p"·data-group-id="2258781222-8">(</span><span·[·...·truncated·by·diffoscope;·len:·247,·SHA:·e0f0954f285159771decfc8c99f4b553450c7d3d3bdb72d079f1509734f4232f·...·]-1">}</span><span·class="p">.</span></code></pre><p>A·name·for·the·data·must·be·allocated·in·the·suite·using·<code·class="inline">require</code>·(see·the
162 example·above).·Pass·this·name·as·argument·<code·class="inline">SnmpAppConfName</code>·to162 example·above).·Pass·this·name·as·argument·<code·class="inline">SnmpAppConfName</code>·to
163 <a·href="#start/3"><code·class="inline">ct_snmp:start/3</code></a>.·<code·class="inline">ct_snmp</code>·specifies·default·values·for·some163 <a·href="#start/3"><code·class="inline">ct_snmp:start/3</code></a>.·<code·class="inline">ct_snmp</code>·specifies·default·values·for·some
164 <code·class="inline">SNMP</code>·application·configuration·parameters·(such·as·<code·class="inline">{verbosity,trace}</code>·for164 <code·class="inline">SNMP</code>·application·configuration·parameters·(such·as·<code·class="inline">{verbosity,trace}</code>·for
165 parameter·<code·class="inline">config</code>).·This·set·of·defaults·is·merged·with·the·parameters165 parameter·<code·class="inline">config</code>).·This·set·of·defaults·is·merged·with·the·parameters
166 specified·by·the·user.·The·user·values·override·<code·class="inline">ct_snmp</code>·defaults.</p>166 specified·by·the·user.·The·user·values·override·<code·class="inline">ct_snmp</code>·defaults.</p>
167 ····</section>167 ····</section>
  
5.74 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_ssh.html
    
Offset 129, 22 lines modifiedOffset 129, 22 lines modified
  
129 ····<section·id="moduledoc">129 ····<section·id="moduledoc">
130 <p>SSH/SFTP·client·module.</p><p>This·module·uses·application·<code·class="inline">SSH</code>,·which·provides·detailed·information·about,130 <p>SSH/SFTP·client·module.</p><p>This·module·uses·application·<code·class="inline">SSH</code>,·which·provides·detailed·information·about,
131 for·example,·functions,·types,·and·options.</p><p>Argument·<code·class="inline">Server</code>·in·the·SFTP·functions·is·only·to·be·used·for·SFTP·sessions131 for·example,·functions,·types,·and·options.</p><p>Argument·<code·class="inline">Server</code>·in·the·SFTP·functions·is·only·to·be·used·for·SFTP·sessions
132 that·have·been·started·on·existing·SSH·connections·(that·is,·when·the·original132 that·have·been·started·on·existing·SSH·connections·(that·is,·when·the·original
133 connection·type·is·<code·class="inline">ssh</code>).·Whenever·the·connection·type·is·<code·class="inline">sftp</code>,·use·the·SSH133 connection·type·is·<code·class="inline">ssh</code>).·Whenever·the·connection·type·is·<code·class="inline">sftp</code>,·use·the·SSH
134 connection·reference·only.</p><p>The·following·options·are·valid·for·specifying·an·SSH/SFTP·connection·(that·is,134 connection·reference·only.</p><p>The·following·options·are·valid·for·specifying·an·SSH/SFTP·connection·(that·is,
135 can·be·used·as·configuration·elements):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5219784345-1">[</span><span·class="p"·data-group-id="5219784345-2">{</span><span·class="n">ConnType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p"·data-group-id="5219784345-2">}</span><span·class="p">,</span><span·class="w">135 can·be·used·as·configuration·elements):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3245313352-1">[</span><span·class="p"·data-group-id="3245313352-2">{</span><span·class="n">ConnType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p"·data-group-id="3245313352-2">}</span><span·class="p">,</span><span·class="w">
136 ·</span><span·class="p"·data-group-id="5219784345-3">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="5219784345-3">}</span><span·class="p">,</span><span·class="w">136 ·</span><span·class="p"·data-group-id="3245313352-3">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="3245313352-3">}</span><span·class="p">,</span><span·class="w">
137 ·</span><span·class="p"·data-group-id="5219784345-4">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserName</span><span·class="p"·data-group-id="5219784345-4">}</span><span·class="w">137 ·</span><span·class="p"·data-group-id="3245313352-4">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserName</span><span·class="p"·data-group-id="3245313352-4">}</span><span·class="w">
138 ·</span><span·class="p"·data-group-id="5219784345-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pwd</span><span·class="p"·data-group-id="5219784345-5">}</span><span·class="w">138 ·</span><span·class="p"·data-group-id="3245313352-5">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pwd</span><span·class="p"·data-group-id="3245313352-5">}</span><span·class="w">
139 ·</span><span·class="p"·data-group-id="5219784345-6">{</span><span·class="ss">user_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="n">String</span><span·class="p"·data-group-id="5219784345-6">}</span><span·class="w">139 ·</span><span·class="p"·data-group-id="3245313352-6">{</span><span·class="ss">user_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="n">String</span><span·class="p"·data-group-id="3245313352-6">}</span><span·class="w">
140 ·</span><span·class="p"·data-group-id="5219784345-7">{</span><span·class="ss">public_key_alg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PubKeyAlg</span><span·class="p"·data-group-id="5219784345-7">}</span><span·class="w">140 ·</span><span·class="p"·data-group-id="3245313352-7">{</span><span·class="ss">public_key_alg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PubKeyAlg</span><span·class="p"·data-group-id="3245313352-7">}</span><span·class="w">
141 ·</span><span·class="p"·data-group-id="5219784345-8">{</span><span·class="ss">connect_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Timeout</span><span·class="p"·data-group-id="5219784345-8">}</span><span·class="w">141 ·</span><span·class="p"·data-group-id="3245313352-8">{</span><span·class="ss">connect_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Timeout</span><span·class="p"·data-group-id="3245313352-8">}</span><span·class="w">
142 ·</span><span·class="p"·data-group-id="5219784345-9">{</span><span·class="ss">key_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="n">KeyCallbackMod</span><span·class="p"·data-group-id="5219784345-9">}</span><span·class="p"·data-group-id="5219784345-1">]</span></code></pre><p><code·class="inline">ConnType·=·ssh·|·sftp</code>.</p><p>For·other·types,·see·<a·href="../../../../lib/ssh-5.2.1/doc/html/ssh.html"><code·class="inline">ssh</code></a>.</p><p>All·time-out·parameters·in·<code·class="inline">ct_ssh</code>·functions·are·values·in·milliseconds.</p>142 ·</span><span·class="p"·data-group-id="3245313352-9">{</span><span·class="ss">key_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="n">KeyCallbackMod</span><span·class="p"·data-group-id="3245313352-9">}</span><span·class="p"·data-group-id="3245313352-1">]</span></code></pre><p><code·class="inline">ConnType·=·ssh·|·sftp</code>.</p><p>For·other·types,·see·<a·href="../../../../lib/ssh-5.2.1/doc/html/ssh.html"><code·class="inline">ssh</code></a>.</p><p>All·time-out·parameters·in·<code·class="inline">ct_ssh</code>·functions·are·values·in·milliseconds.</p>
143 ····</section>143 ····</section>
  
144 </div>144 </div>
  
145 ··<section·id="summary"·class="details-list">145 ··<section·id="summary"·class="details-list">
146 ····<h1·class="section-heading">146 ····<h1·class="section-heading">
147 ······<a·class="hover-link"·href="#summary">147 ······<a·class="hover-link"·href="#summary">
32.1 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/ct_telnet.html
    
Offset 132, 59 lines modifiedOffset 132, 59 lines modified
132 matching·on·the·result.·For·information·about·how·to·use·<code·class="inline">ct_telnet</code>·and132 matching·on·the·result.·For·information·about·how·to·use·<code·class="inline">ct_telnet</code>·and
133 configure·connections,·specifically·for·UNIX·hosts,·see·the·<a·href="unix_telnet.html"><code·class="inline">unix_telnet</code></a>133 configure·connections,·specifically·for·UNIX·hosts,·see·the·<a·href="unix_telnet.html"><code·class="inline">unix_telnet</code></a>
134 manual·page.</p><p>Default·values·defined·in·<code·class="inline">ct_telnet</code>:</p><p><a·href=""·id="Default_values"></a></p><ul><li>Connection·timeout·(time·to·wait·for·connection)·=·10·seconds</li><li>Command·timeout·(time·to·wait·for·a·command·to·return)·=·10·seconds</li><li>Max·number·of·reconnection·attempts·=·3</li><li>Reconnection·interval·(time·to·wait·in·between·reconnection·attempts)·=·5134 manual·page.</p><p>Default·values·defined·in·<code·class="inline">ct_telnet</code>:</p><p><a·href=""·id="Default_values"></a></p><ul><li>Connection·timeout·(time·to·wait·for·connection)·=·10·seconds</li><li>Command·timeout·(time·to·wait·for·a·command·to·return)·=·10·seconds</li><li>Max·number·of·reconnection·attempts·=·3</li><li>Reconnection·interval·(time·to·wait·in·between·reconnection·attempts)·=·5
135 seconds</li><li>Keep·alive·(sends·NOP·to·the·server·every·8·sec·if·connection·is·idle)·=135 seconds</li><li>Keep·alive·(sends·NOP·to·the·server·every·8·sec·if·connection·is·idle)·=
136 <code·class="inline">true</code></li><li>Polling·limit·(max·number·of·times·to·poll·to·get·a·remaining·string136 <code·class="inline">true</code></li><li>Polling·limit·(max·number·of·times·to·poll·to·get·a·remaining·string
137 terminated)·=·0</li><li>Polling·interval·(sleep·time·between·polls)·=·1·second</li><li>The·TCP_NODELAY·option·for·the·telnet·socket·is·disabled·(set·to·<code·class="inline">false</code>)·per137 terminated)·=·0</li><li>Polling·interval·(sleep·time·between·polls)·=·1·second</li><li>The·TCP_NODELAY·option·for·the·telnet·socket·is·disabled·(set·to·<code·class="inline">false</code>)·per
138 default</li></ul><p>These·parameters·can·be·modified·by·the·user·with·the·following·configuration138 default</li></ul><p>These·parameters·can·be·modified·by·the·user·with·the·following·configuration
139 term:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1026364729-1">{</span><span·class="ss">telnet_settings</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1026364729-2">[</span><span·class="p"·data-group-id="1026364729-3">{</span><span·class="ss">connect_timeout</span><s[·...·truncated·by·diffoscope;·len:·94,·SHA:·097bbcab9951fb62abe575341ae2214b93e1e5bb81a8c6796b8aa5e4a4c83256·...·]-3">}</span><span·class="p">,</span><span·class="w">139 term:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2045014634-1">{</span><span·class="ss">telnet_settings</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2045014634-2">[</span><span·class="p"·data-group-id="2045014634-3">{</span><span·class="ss">connect_timeout</span><s[·...·truncated·by·diffoscope;·len:·94,·SHA:·52d80246e57097a80d1637f2d8e74c45d4fc2f8b389072232d77f5810dcfe380·...·]-3">}</span><span·class="p">,</span><span·class="w">
140 ···················</span><span·class="p"·data-group-id="1026364729-4">{</span><span·class="ss">command_timeout</span><span·class="p">,</span><span·class="n">Millisec</span><span·class="p"·data-group-id="1026364729-4">}</span><span·class="p">,</span><span·class="w">140 ···················</span><span·class="p"·data-group-id="2045014634-4">{</span><span·class="ss">command_timeout</span><span·class="p">,</span><span·class="n">Millisec</span><span·class="p"·data-group-id="2045014634-4">}</span><span·class="p">,</span><span·class="w">
141 ···················</span><span·class="p"·data-group-id="1026364729-5">{</span><span·class="ss">reconnection_attempts</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="1026364729-5">}</span><span·class="p">,</span><span·class="w">141 ···················</span><span·class="p"·data-group-id="2045014634-5">{</span><span·class="ss">reconnection_attempts</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="2045014634-5">}</span><span·class="p">,</span><span·class="w">
142 ···················</span><span·class="p"·data-group-id="1026364729-6">{</span><span·class="ss">reconnection_interval</span><span·class="p">,</span><span·class="n">Millisec</span><span·class="p"·data-group-id="1026364729-6">}</span><span·class="p">,</span><span·class="w">142 ···················</span><span·class="p"·data-group-id="2045014634-6">{</span><span·class="ss">reconnection_interval</span><span·class="p">,</span><span·class="n">Millisec</span><span·class="p"·data-group-id="2045014634-6">}</span><span·class="p">,</span><span·class="w">
143 ···················</span><span·class="p"·data-group-id="1026364729-7">{</span><span·class="ss">keep_alive</span><span·class="p">,</span><span·class="n">Bool</span><span·class="p"·data-group-id="1026364729-7">}</span><span·class="p">,</span><span·class="w">143 ···················</span><span·class="p"·data-group-id="2045014634-7">{</span><span·class="ss">keep_alive</span><span·class="p">,</span><span·class="n">Bool</span><span·class="p"·data-group-id="2045014634-7">}</span><span·class="p">,</span><span·class="w">
144 ···················</span><span·class="p"·data-group-id="1026364729-8">{</span><span·class="ss">poll_limit</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="1026364729-8">}</span><span·class="p">,</span><span·class="w">144 ···················</span><span·class="p"·data-group-id="2045014634-8">{</span><span·class="ss">poll_limit</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="2045014634-8">}</span><span·class="p">,</span><span·class="w">
145 ···················</span><span·class="p"·data-group-id="1026364729-9">{</span><span·class="ss">poll_interval</span><span·class="p">,</span><span·class="n">Millisec</span><span·class="p"·data-group-id="1026364729-9">}</span><span·class="p">,</span><span·class="w">145 ···················</span><span·class="p"·data-group-id="2045014634-9">{</span><span·class="ss">poll_interval</span><span·class="p">,</span><span·class="n">Millisec</span><span·class="p"·data-group-id="2045014634-9">}</span><span·class="p">,</span><span·class="w">
146 ···················</span><span·class="p"·data-group-id="1026364729-10">{</span><span·class="ss">tcp_nodelay</span><span·class="p">,</span><span·class="n">Bool</span><span·class="p"·data-group-id="1026364729-10">}</span><span·class="p"·data-group-id="1026364729-2">]</span><span·class="p"·data-group-id="102636472[·...·truncated·by·diffoscope;·len:·1,·SHA:·19581e27de7ced00ff1ce50b2047e7a567c76b1cbaebabe5ef03f7c3017bb5b7·...·]-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">Millisec·=·integer(),·N·=·integer()</code></p><p>Enter·the·<code·class="inline">telnet_settings</code>·term·in·a·configuration·file·included·in·the·test146 ···················</span><span·class="p"·data-group-id="2045014634-10">{</span><span·class="ss">tcp_nodelay</span><span·class="p">,</span><span·class="n">Bool</span><span·class="p"·data-group-id="2045014634-10">}</span><span·class="p"·data-group-id="2045014634-2">]</span><span·class="p"·data-group-id="204501463[·...·truncated·by·diffoscope;·len:·1,·SHA:·4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a·...·]-1">}</span><span·class="p">.</span></code></pre><p><code·class="inline">Millisec·=·integer(),·N·=·integer()</code></p><p>Enter·the·<code·class="inline">telnet_settings</code>·term·in·a·configuration·file·included·in·the·test
147 and·<code·class="inline">ct_telnet</code>·retrieves·the·information·automatically.</p><p><code·class="inline">keep_alive</code>·can·be·specified·per·connection,·if·necessary.·For·details,·see147 and·<code·class="inline">ct_telnet</code>·retrieves·the·information·automatically.</p><p><code·class="inline">keep_alive</code>·can·be·specified·per·connection,·if·necessary.·For·details,·see
148 <a·href="unix_telnet.html"><code·class="inline">unix_telnet</code></a>.</p><h2·id="module-logging"·class="section-heading">148 <a·href="unix_telnet.html"><code·class="inline">unix_telnet</code></a>.</p><h2·id="module-logging"·class="section-heading">
149 ··<a·href="#module-logging"·class="hover-link">149 ··<a·href="#module-logging"·class="hover-link">
150 ····<i·class="ri-link-m"·aria-hidden="true"></i>150 ····<i·class="ri-link-m"·aria-hidden="true"></i>
151 ··</a>151 ··</a>
152 ··<span·class="text">Logging</span>152 ··<span·class="text">Logging</span>
153 </h2>153 </h2>
154 <p><a·href=""·id="Logging"></a></p><p>The·default·logging·behavior·of·<code·class="inline">ct_telnet</code>·is·to·print·information·about154 <p><a·href=""·id="Logging"></a></p><p>The·default·logging·behavior·of·<code·class="inline">ct_telnet</code>·is·to·print·information·about
155 performed·operations,·commands,·and·their·corresponding·results·to·the·test·case155 performed·operations,·commands,·and·their·corresponding·results·to·the·test·case
156 HTML·log.·The·following·is·not·printed·to·the·HTML·log:·text·strings·sent·from156 HTML·log.·The·following·is·not·printed·to·the·HTML·log:·text·strings·sent·from
157 the·Telnet·server·that·are·not·explicitly·received·by·a·<code·class="inline">ct_telnet</code>·function,157 the·Telnet·server·that·are·not·explicitly·received·by·a·<code·class="inline">ct_telnet</code>·function,
158 such·as·<a·href="#expect/3"><code·class="inline">expect/3</code></a>.·However,·<code·class="inline">ct_telnet</code>·can·be·configured·to·use158 such·as·<a·href="#expect/3"><code·class="inline">expect/3</code></a>.·However,·<code·class="inline">ct_telnet</code>·can·be·configured·to·use
159 a·special·purpose·event·handler,·implemented·in·<code·class="inline">ct_conn_log_h</code>,·for·logging159 a·special·purpose·event·handler,·implemented·in·<code·class="inline">ct_conn_log_h</code>,·for·logging
160 <em>all</em>·Telnet·traffic.·To·use·this·handler,·install·a·<code·class="inline">Common·Test</code>·hook·named160 <em>all</em>·Telnet·traffic.·To·use·this·handler,·install·a·<code·class="inline">Common·Test</code>·hook·named
161 <code·class="inline">cth_conn_log</code>.·Example·(using·the·test·suite·information·function):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="0420705717-1">(</span><span·class="p"·data-group-id="0420705717-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 <code·class="inline">cth_conn_log</code>.·Example·(using·the·test·suite·information·function):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="3486463399-1">(</span><span·class="p"·data-group-id="3486463399-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="p"·data-group-id="0420705717-2">[</span><span·class="p"·data-group-id="0420705717-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0420705717-4">[</span><span·class="p"·data-group-id="0420705717-5">{</[·...·truncated·by·diffoscope;·len:·805,·SHA:·27a3fdf91ed5b1bfbf821cffd5bf924723b4deba9304c2b3121283fa9a55135f·...·]-2">]</span><span·class="p">.</span></code></pre><p><code·class="inline">conn_mod()</code>·is·the·name·of·the·<code·class="inline">Common·Test</code>·module·implementing·the·connection162 ····</span><span·class="p"·data-group-id="3486463399-2">[</span><span·class="p"·data-group-id="3486463399-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3486463399-4">[</span><span·class="p"·data-group-id="3486463399-5">{</[·...·truncated·by·diffoscope;·len:·805,·SHA:·f9c93c1f3e77abb80980018ec564bdce30fa45b914ce3e0a84fcfb508cac2f25·...·]-2">]</span><span·class="p">.</span></code></pre><p><code·class="inline">conn_mod()</code>·is·the·name·of·the·<code·class="inline">Common·Test</code>·module·implementing·the·connection
163 protocol,·that·is,·<code·class="inline">ct_telnet</code>.</p><p>The·<code·class="inline">cth_conn_log</code>·hook·performs·unformatted·logging·of·Telnet·data·to·a163 protocol,·that·is,·<code·class="inline">ct_telnet</code>.</p><p>The·<code·class="inline">cth_conn_log</code>·hook·performs·unformatted·logging·of·Telnet·data·to·a
164 separate·text·file.·All·Telnet·communication·is·captured·and·printed,·including164 separate·text·file.·All·Telnet·communication·is·captured·and·printed,·including
165 any·data·sent·from·the·server.·The·link·to·this·text·file·is·located·at·the·top165 any·data·sent·from·the·server.·The·link·to·this·text·file·is·located·at·the·top
166 of·the·test·case·HTML·log.</p><p>By·default,·data·for·all·Telnet·connections·is·logged·in·one·common·file·(named166 of·the·test·case·HTML·log.</p><p>By·default,·data·for·all·Telnet·connections·is·logged·in·one·common·file·(named
167 <code·class="inline">default</code>),·which·can·get·messy,·for·example,·if·multiple·Telnet·sessions·are167 <code·class="inline">default</code>),·which·can·get·messy,·for·example,·if·multiple·Telnet·sessions·are
168 running·in·parallel.·Therefore·a·separate·log·file·can·be·created·for·each168 running·in·parallel.·Therefore·a·separate·log·file·can·be·created·for·each
169 connection.·To·configure·this,·use·hook·option·<code·class="inline">hosts</code>·and·list·the·names·of·the169 connection.·To·configure·this,·use·hook·option·<code·class="inline">hosts</code>·and·list·the·names·of·the
170 servers/connections·to·be·used·in·the·suite.·The·connections·must·be·named·for170 servers/connections·to·be·used·in·the·suite.·The·connections·must·be·named·for
171 this·to·work·(see·<a·href="#open/1"><code·class="inline">ct_telnet:open/1,2,3,4</code></a>).</p><p>Hook·option·<code·class="inline">log_type</code>·can·be·used·to·change·the·<code·class="inline">cth_conn_log</code>·behavior.·The171 this·to·work·(see·<a·href="#open/1"><code·class="inline">ct_telnet:open/1,2,3,4</code></a>).</p><p>Hook·option·<code·class="inline">log_type</code>·can·be·used·to·change·the·<code·class="inline">cth_conn_log</code>·behavior.·The
172 default·value·of·this·option·is·<code·class="inline">raw</code>,·which·results·in·the·behavior·described172 default·value·of·this·option·is·<code·class="inline">raw</code>,·which·results·in·the·behavior·described
173 above.·If·the·value·is·set·to·<code·class="inline">html</code>,·all·Telnet·communication·is·printed·to·the173 above.·If·the·value·is·set·to·<code·class="inline">html</code>,·all·Telnet·communication·is·printed·to·the
174 test·case·HTML·log·instead.</p><p>All·<code·class="inline">cth_conn_log</code>·hook·options·described·can·also·be·specified·in·a174 test·case·HTML·log·instead.</p><p>All·<code·class="inline">cth_conn_log</code>·hook·options·described·can·also·be·specified·in·a
175 configuration·file·with·configuration·variable·<code·class="inline">ct_conn_log</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5734879102-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5734879102-2">[</span><span·class="p"·data-group-id="5734879102-3">{</span><span·class="ss">ct_telnet</span><span·class="p">,</span><span·class="p"·data-group-id="5734879102-4">[</span><span·class="p"·data-group-id="5734879102-5">{</span><span·class="ss">log_type</span><span·class="p">,</span><span·class="ss">raw</span><span·class="p"·data-group-id="5734879102-5">}</span><span·class="p">,</span><span·class="w"> 
176 ···························</span><span·class="p"·data-group-id="5734879102-6">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="5734879102-7">[</span><span·class="nf">key_or_name</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·526,·SHA:·68ed1a2c6593023ee3ce21c626eed48a188a0d1927cd98920b5f4cc7354b89b8·...·]175 configuration·file·with·configuration·variable·<code·class="inline">ct_conn_log</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9854472591-1">{</span><span·class="ss">ct_conn_log</span><span[·...·truncated·by·diffoscope;·len:·488,·SHA:·7b97ea1daa0b3e32bf9baedf1f7feaafc8fb054bdb515b9d0d682437b11663ad·...·]
 176 ···························</span><span·class="p"·data-group-id="9854472591-6">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="9854472591-7">[</span><span·class="nf">key_or_name</span><span·class="p"·data-group-id="9854472591-8">(</span><span·class="p"·data-group-id="9854472591-8">)</span><span·class="p"·data-group-id="9854472591-7">]</span><span·class="p"·data-group-id="9854472591-6">}</span><span·class="p"·data-group-id="9854472591-4">]</span><span·class="p"·data-group-id="9854472591-3">}</span><span·class="p"·data-group-id="9854472591-2">]</span><span·class="p"·data-group-id="9854472591-1">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>Hook·options·specified·in·a·configuration·file·overwrite·any·hard-coded·hook
177 options·in·the·test·suite.</p></blockquote><p><a·href=""·id="Logging_example"></a></p><p><em>Logging·Example:</em></p><p>The·following·<code·class="inline">ct_hooks</code>·statement·causes·printing·of·Telnet·traffic·to·separate177 options·in·the·test·suite.</p></blockquote><p><a·href=""·id="Logging_example"></a></p><p><em>Logging·Example:</em></p><p>The·following·<code·class="inline">ct_hooks</code>·statement·causes·printing·of·Telnet·traffic·to·separate
178 logs·for·the·connections·<code·class="inline">server1</code>·and·<code·class="inline">server2</code>.·Traffic·for·any·other178 logs·for·the·connections·<code·class="inline">server1</code>·and·<code·class="inline">server2</code>.·Traffic·for·any·other
179 connections·is·logged·in·the·default·Telnet·log.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="1325709210-1">(</span><span·class="p"·data-group-id="1325709210-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">179 connections·is·logged·in·the·default·Telnet·log.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="5930995671-1">(</span><span·class="p"·data-group-id="5930995671-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
180 ····</span><span·class="p"·data-group-id="1325709210-2">[</span><span·class="p"·data-group-id="1325709210-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">180 ····</span><span·class="p"·data-group-id="5930995671-2">[</span><span·class="p"·data-group-id="5930995671-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">
181 ······</span><span·class="p"·data-group-id="1325709210-4">[</span><span·class="p"·data-group-id="1325709210-5">{</span><span·class="ss">cth_conn_log</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1325709210-6">[</span><span·class="p"·data-group-id="1325709210-7">{</span><span·class="ss">ct_telnet</span><span·class="p">,</span><span·class="p"·data-group-id="1325709210-8">[</span><span·class="p"·data-group-id="1325709210-9">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="1325709210-10">[</span><span·class="ss">server1</span><span·class="p">,</span><span·class="ss">server2</span><span·class="p"·data-group-id="1325709210-10">]</span><span·class="p"·data-group-id="1325709210-9">}</span><span·class="p"·data-group-id="1325709210-8">]</span><span·class="p"·data-group-id="1325709210-7">}</span><span·class="p"·data-group-id="1325709210-6">]</span><span·class="p"·data-group-id="1325709210-5">}</span><span·class="p"·data-group-id="1325709210-4">]</span><span·class="p"·data-group-id="1325709210-3">}</span><span·class="p"·data-group-id="1325709210-2">]</span><span·class="p">.</span></code></pre><p>As·previously·explained,·this·specification·can·also·be·provided·by·an·entry 
182 like·the·following·in·a·configuration·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3998009763-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·1151,·SHA:·822100ef2e41a65672a723e7093ed4c3e3582a2fafd2de164713f56d7a78c4c2·...·]181 ······</span><span·class="p"·data-group-id="5930995671-4">[</span><span·class="p"·data-group-id="5930995671-5">{</span><span·class="ss">cth_conn_log</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5930995671-6">[</span>[·...·truncated·by·diffoscope;·len:·1003,·SHA:·d26874f7bba7d4dcc0d019edeb8f3fcbf83e92d313e442c9bc5da8339c25430e·...·]
 182 like·the·following·in·a·configuration·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1894231223-1">{</span><span·class="ss">ct_conn_log</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1894231223-2">[</span><span·class="p"·data-group-id="1894231223-3">{</span><span·class="ss">ct_telnet</span><span·class="p">,</span><span·class="p"·data-group-id="1894231223-4">[</span><span·class="p"·data-group-id="1894231223-5">{</span><span·class="ss">hosts</span><span·class="p">,</span><span·class="p"·data-group-id="1894231223-6">[</span><span·class="ss">server1</span><span·class="p">,</span><span·class="ss">server2</span><span·class="p"·data-group-id="1894231223-6">]</span><span·class="p"·data-group-id="1894231223-5">}</span><span·class="p"·data-group-id="1894231223-4">]</span><span·class="p"·data-group-id="1894231223-3">}</span><span·class="p"·data-group-id="1894231223-2">]</span><span·class="p"·data-group-id="1894231223-1">}</span><span·class="p">.</span></code></pre><p>In·this·case·the·<code·class="inline">ct_hooks</code>·statement·in·the·test·suite·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="4473095680-1">(</span><span·class="p"·data-group-id="4473095680-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ····</span><span·class="p"·data-group-id="1550602825-2">[</span><span·class="p"·data-group-id="1550602825-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1550602825-4">[</span><span·class="p"·data-group-id="1550602825-5">{</[·...·truncated·by·diffoscope;·len:·395,·SHA:·1e7834be967f5a565affb2effb357c04d3fe806e72a80c455739f1acd91782c7·...·]-2">]</span><span·class="p">.</span></code></pre><h2·id="module-see-also"·class="section-heading">183 ····</span><span·class="p"·data-group-id="4473095680-2">[</span><span·class="p"·data-group-id="4473095680-3">{</span><span·class="ss">ct_hooks</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4473095680-4">[</span><span·class="p"·data-group-id="4473095680-5">{</[·...·truncated·by·diffoscope;·len:·395,·SHA:·5c4d512a1192d7a5a0db51da4ddf8164145025ffc9e413627f82cbea1509c87e·...·]-2">]</span><span·class="p">.</span></code></pre><h2·id="module-see-also"·class="section-heading">
184 ··<a·href="#module-see-also"·class="hover-link">184 ··<a·href="#module-see-also"·class="hover-link">
185 ····<i·class="ri-link-m"·aria-hidden="true"></i>185 ····<i·class="ri-link-m"·aria-hidden="true"></i>
186 ··</a>186 ··</a>
187 ··<span·class="text">See·Also</span>187 ··<span·class="text">See·Also</span>
188 </h2>188 </h2>
189 <p><a·href="unix_telnet.html"><code·class="inline">unix_telnet</code></a></p>189 <p><a·href="unix_telnet.html"><code·class="inline">unix_telnet</code></a></p>
190 ····</section>190 ····</section>
Offset 881, 17 lines modifiedOffset 881, 17 lines modified
881 of·waiting·for·prompt.</p></li><li><p><strong><code·class="inline">repeat·|·repeat,·N</code></strong>·-·The·pattern(s)·must·be·matched·multiple·times.·If881 of·waiting·for·prompt.</p></li><li><p><strong><code·class="inline">repeat·|·repeat,·N</code></strong>·-·The·pattern(s)·must·be·matched·multiple·times.·If
882 <code·class="inline">N</code>·is·specified,·the·pattern(s)·are·matched·<code·class="inline">N</code>·times,·and·the·function882 <code·class="inline">N</code>·is·specified,·the·pattern(s)·are·matched·<code·class="inline">N</code>·times,·and·the·function
883 returns·<code·class="inline">HaltReason·=·done</code>.·This·option·can·be·interrupted·by·one·or·more883 returns·<code·class="inline">HaltReason·=·done</code>.·This·option·can·be·interrupted·by·one·or·more
884 <code·class="inline">HaltPatterns</code>.·<code·class="inline">MatchList</code>·is·always·returned,·that·is,·a·list·of·<code·class="inline">Match</code>884 <code·class="inline">HaltPatterns</code>.·<code·class="inline">MatchList</code>·is·always·returned,·that·is,·a·list·of·<code·class="inline">Match</code>
885 instead·of·only·one·<code·class="inline">Match</code>.·Also·<code·class="inline">HaltReason</code>·is·returned.</p></li><li><p><strong><code·class="inline">sequence</code></strong>·-·All·patterns·must·be·matched·in·a·sequence.·A·match·is·not885 instead·of·only·one·<code·class="inline">Match</code>.·Also·<code·class="inline">HaltReason</code>·is·returned.</p></li><li><p><strong><code·class="inline">sequence</code></strong>·-·All·patterns·must·be·matched·in·a·sequence.·A·match·is·not
886 concluded·until·all·patterns·are·matched.·This·option·can·be·interrupted·by886 concluded·until·all·patterns·are·matched.·This·option·can·be·interrupted·by
887 one·or·more·<code·class="inline">HaltPatterns</code>.·<code·class="inline">MatchList</code>·is·always·returned,·that·is,·a·list·of887 one·or·more·<code·class="inline">HaltPatterns</code>.·<code·class="inline">MatchList</code>·is·always·returned,·that·is,·a·list·of
888 <code·class="inline">Match</code>·instead·of·only·one·<code·class="inline">Match</code>.·Also·<code·class="inline">HaltReason</code>·is·returned.</p></li></ul><p><em>Example·1:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expect</span><span·class="p"·data-group-id="9693192917-1">(</span><span·class="n">Connection</span><span·class="p">,</span><span·class="p"·data-group-id="9693192917-2">[</span><span·class="p"·data-group-id="9693192917-3">{</span><span·class="ss">abc</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·1029,·SHA:·e31112750763951cc36b686f8e5759936b38044f4d54c78dfb024203ccdde037·...·]-1">)</span></code></pre><p>First·this·tries·to·match·<code·class="inline">&quot;ABC&quot;</code>,·and·then·<code·class="inline">&quot;XYZ&quot;</code>,·but·if·<code·class="inline">&quot;NNN&quot;</code>·appears,·the888 <code·class="inline">Match</code>·instead·of·only·one·<code·class="inline">Match</code>.·Also·<code·class="inline">HaltReason</code>·is·returned.</p></li></ul><p><em>Example·1:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expect</span><span·class="p"·data-group-id="4140458263-1">(</span><span·class="n">Connection</span><span·class="p">,</span><span·class="p"·data-group-id="4140458263-2">[</span><span·class="p"·data-group-id="4140458263-3">{</span><span·class="ss">abc</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·1029,·SHA:·c29695373e69d7fe339c4a7bd95ee0a51899037293f7d9224fd5988174c31f4c·...·]-1">)</span></code></pre><p>First·this·tries·to·match·<code·class="inline">&quot;ABC&quot;</code>,·and·then·<code·class="inline">&quot;XYZ&quot;</code>,·but·if·<code·class="inline">&quot;NNN&quot;</code>·appears,·the
889 function·returns·<code·class="inline">{error,{nnn,[&quot;NNN&quot;]}}</code>.·If·both·<code·class="inline">&quot;ABC&quot;</code>·and·<code·class="inline">&quot;XYZ&quot;</code>·are889 function·returns·<code·class="inline">{error,{nnn,[&quot;NNN&quot;]}}</code>.·If·both·<code·class="inline">&quot;ABC&quot;</code>·and·<code·class="inline">&quot;XYZ&quot;</code>·are
890 matched,·the·function·returns·<code·class="inline">{ok,[AbcMatch,XyzMatch]}</code>.</p><p><em>Example·2:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expect</span><span·class="p"·data-group-id="6229109875-1">(</span><span·class="n">Connection</span><span·class="p">,</span><span·class="p"·data-group-id="6229109875-2">[</span><span·class="p"·data-group-id="6229109875-3">{</span><span·class="ss">abc</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·1182,·SHA:·1fb9f5b318c6a7dc2f544e2c3863a333a1bd2fc2b4c4d589ee518c66f54b1edc·...·]-1">)</span></code></pre><p>This·tries·to·match·<code·class="inline">&quot;ABC&quot;</code>·or·<code·class="inline">&quot;XYZ&quot;</code>·twice.·If·<code·class="inline">&quot;NNN&quot;</code>·appears,·the·function890 matched,·the·function·returns·<code·class="inline">{ok,[AbcMatch,XyzMatch]}</code>.</p><p><em>Example·2:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expect</span><span·class="p"·data-group-id="3866818607-1">(</span><span·class="n">Connection</span><span·class="p">,</span><span·class="p"·data-group-id="3866818607-2">[</span><span·class="p"·data-group-id="3866818607-3">{</span><span·class="ss">abc</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·1182,·SHA:·364e525851b95b5dfd828fe4535c287b6581969d76b671060edcea27d7b19394·...·]-1">)</span></code></pre><p>This·tries·to·match·<code·class="inline">&quot;ABC&quot;</code>·or·<code·class="inline">&quot;XYZ&quot;</code>·twice.·If·<code·class="inline">&quot;NNN&quot;</code>·appears,·the·function
891 returns·<code·class="inline">HaltReason·=·{nnn,[&quot;NNN&quot;]}</code>.</p><p>Options·<code·class="inline">repeat</code>·and·<code·class="inline">sequence</code>·can·be·combined·to·match·a·sequence·multiple891 returns·<code·class="inline">HaltReason·=·{nnn,[&quot;NNN&quot;]}</code>.</p><p>Options·<code·class="inline">repeat</code>·and·<code·class="inline">sequence</code>·can·be·combined·to·match·a·sequence·multiple
892 times.</p>892 times.</p>
893 ··</section>893 ··</section>
894 </section>894 </section>
895 <section·class="detail"·id="get_data/1">895 <section·class="detail"·id="get_data/1">
  
896 ··<div·class="detail-header">896 ··<div·class="detail-header">
56.0 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/dependencies_chapter.html
    
Offset 157, 73 lines modifiedOffset 157, 73 lines modified
157 between·the·cases·and·therefore·introduce·dependencies·between·them.</p><p>To·avoid·this,·we·can·consider·starting·and·stopping·the·server·for·every·test.157 between·the·cases·and·therefore·introduce·dependencies·between·them.</p><p>To·avoid·this,·we·can·consider·starting·and·stopping·the·server·for·every·test.
158 We·can·thus·implement·the·start·and·stop·action·as·common·functions·to·be·called158 We·can·thus·implement·the·start·and·stop·action·as·common·functions·to·be·called
159 from·<a·href="ct_suite.html#c:init_per_testcase/2"><code·class="inline">init_per_testcase</code></a>·and159 from·<a·href="ct_suite.html#c:init_per_testcase/2"><code·class="inline">init_per_testcase</code></a>·and
160 <a·href="ct_suite.html#c:end_per_testcase/2"><code·class="inline">end_per_testcase</code></a>.·(Remember·to·test·the160 <a·href="ct_suite.html#c:end_per_testcase/2"><code·class="inline">end_per_testcase</code></a>.·(Remember·to·test·the
161 start·and·stop·functionality·separately.)·The·configuration·can·also·be161 start·and·stop·functionality·separately.)·The·configuration·can·also·be
162 implemented·as·a·common·function,·maybe·grouped·with·the·start·function.162 implemented·as·a·common·function,·maybe·grouped·with·the·start·function.
163 Finally,·the·testing·of·connecting·and·disconnecting·a·client·can·be·grouped163 Finally,·the·testing·of·connecting·and·disconnecting·a·client·can·be·grouped
164 into·one·test·case.·The·resulting·suite·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4116849861-1">(</span><span·class="ss">my_server_SUITE</span><span·class="p"·data-group-id="4116849861-1">)</span><span·class="p">.</span><span·class="w">164 into·one·test·case.·The·resulting·suite·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2780038690-1">(</span><span·class="ss">my_server_SUITE</span><span·class="p"·data-group-id="2780038690-1">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="4116849861-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="4116849861-2">)</span><span·class="p">.</span><span·class="w">165 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="2780038690-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="2780038690-2">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4116849861-3">(</span><span·class="s">&quot;ct.hrl&quot;</span><span·class="p"·data-group-id="4116849861-3">)</span><span·class="p">.</span><span·class="w">166 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2780038690-3">(</span><span·class="s">&quot;ct.hrl&quot;</span><span·class="p"·data-group-id="2780038690-3">)</span><span·class="p">.</span><span·class="w">
  
167 </span><span·class="c1">%%%·init·and·end·functions...</span><span·class="w">167 </span><span·class="c1">%%%·init·and·end·functions...</span><span·class="w">
  
168 </span><span·class="nf">suite</span><span·class="p"·data-group-id="4116849861-4">(</span><span·class="p"·data-group-id="4116849861-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4116849861-5">[</span><span·class="p"·data-group-id="4116849861-6">{</span[·...·truncated·by·diffoscope;·len:·187,·SHA:·c20aa04837e8c3f0cf623e418eb0de0631ed966f79be511c8ee6fd9a7a620c23·...·]-5">]</span><span·class="p">.</span><span·class="w">168 </span><span·class="nf">suite</span><span·class="p"·data-group-id="2780038690-4">(</span><span·class="p"·data-group-id="2780038690-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2780038690-5">[</span><span·class="p"·data-group-id="2780038690-6">{</span[·...·truncated·by·diffoscope;·len:·187,·SHA:·2398e3cd6fb82f0a1830e2aa16dec5fd1b508b8ea872a1e792f5ab7ed583ddce·...·]-5">]</span><span·class="p">.</span><span·class="w">
  
169 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="4116849861-7">(</span><span·class="ss">start_and_stop</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2780038690-7">(</span><span·class="ss">start_and_stop</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ····</span><span·class="n">Config</span><span·class="p">;</span><span·class="w">170 ····</span><span·class="n">Config</span><span·class="p">;</span><span·class="w">
  
171 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="4116849861-8">(</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2780038690-8">(</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ····</span><span·class="p"·data-group-id="4116849861-9">[</span><span·class="p"·data-group-id="4116849861-10">{</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="nf">start_server</span><span·class="p"·data-group-id="4116849861-11">(</span><span·class="p"·data-group-id="4[·...·truncated·by·diffoscope;·len:·218,·SHA:·51cb6892b4be9b3c06019a99bb612e61444cf62a312f133dba650ca48cb2daf7·...·]-9">]</span><span·class="p">;</span><span·class="w">172 ····</span><span·class="p"·data-group-id="2780038690-9">[</span><span·class="p"·data-group-id="2780038690-10">{</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="nf">start_server</span><span·class="p"·data-group-id="2780038690-11">(</span><span·class="p"·data-group-id="2[·...·truncated·by·diffoscope;·len:·218,·SHA:·42f8e8ebfc2685c1a4d9ccd9676bac14a3359d820b76a8283d37a4e72aee2554·...·]-9">]</span><span·class="p">;</span><span·class="w">
  
173 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="4116849861-12">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2780038690-12">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_server</span><span·class="p"·data-group-id="4116849861-13">(</span><span·class="p"·data-group-id="4116849861-13">)</span><span·class="p">,</span><span·class="w">174 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_server</span><span·class="p"·data-group-id="2780038690-13">(</span><span·class="p"·data-group-id="2780038690-13">)</span><span·class="p">,</span><span·class="w">
175 ····</span><span·class="nf">configure_server</span><span·class="p"·data-group-id="4116849861-14">(</span><span·class="p"·data-group-id="4116849861-14">)</span><span·class="p">,</span><span·class="w">175 ····</span><span·class="nf">configure_server</span><span·class="p"·data-group-id="2780038690-14">(</span><span·class="p"·data-group-id="2780038690-14">)</span><span·class="p">,</span><span·class="w">
176 ····</span><span·class="p"·data-group-id="4116849861-15">[</span><span·class="p"·data-group-id="4116849861-16">{</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-16">}</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·107,·SHA:·afc324d21aa3d5c997d7c15bb9169c36eda4483118e24125fb20e44b1457b81d·...·]-15">]</span><span·class="p">.</span><span·class="w">176 ····</span><span·class="p"·data-group-id="2780038690-15">[</span><span·class="p"·data-group-id="2780038690-16">{</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-16">}</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·107,·SHA:·8d7b282896830f4b5046d7b4b78c5e0e21aa049f4b3fc1c70de44295e7a96749·...·]-15">]</span><span·class="p">.</span><span·class="w">
  
177 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="4116849861-17">(</span><span·class="ss">start_and_stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="4116849861-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="2780038690-17">(</span><span·class="ss">start_and_stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="2780038690-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">178 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
  
179 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="4116849861-18">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">179 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="2780038690-18">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
180 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="4116849861-19">(</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-19">)</span><span·class="p">,</span><span·class="w">180 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2780038690-19">(</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-19">)</span><span·class="p">,</span><span·class="w">
181 ····</span><span·class="nf">stop_server</span><span·class="p"·data-group-id="4116849861-20">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-20">)</span><span·class="p">.</span><span·class="w">181 ····</span><span·class="nf">stop_server</span><span·class="p"·data-group-id="2780038690-20">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-20">)</span><span·class="p">.</span><span·class="w">
  
182 </span><span·class="c1">%%%·test·cases...</span><span·class="w">182 </span><span·class="c1">%%%·test·cases...</span><span·class="w">
  
183 </span><span·class="nf">all</span><span·class="p"·data-group-id="4116849861-21">(</span><span·class="p"·data-group-id="4116849861-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4116849861-22">[</span><span·class="ss">start_and_stop</span><span·class[·...·truncated·by·diffoscope;·len:·202,·SHA:·f0d8d722621aa35c17fde74e726b4577b86e29690c7b32da6a1dc9416682b58d·...·]-22">]</span><span·class="p">.</span><span·class="w">183 </span><span·class="nf">all</span><span·class="p"·data-group-id="2780038690-21">(</span><span·class="p"·data-group-id="2780038690-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2780038690-22">[</span><span·class="ss">start_and_stop</span><span·class[·...·truncated·by·diffoscope;·len:·202,·SHA:·e8de32d556467c7d45d3ebb860bf7c7fcc20bbbe10c5231e609134f0a9efdaab·...·]-22">]</span><span·class="p">.</span><span·class="w">
  
184 </span><span·class="c1">%%·test·that·starting·and·stopping·works</span><span·class="w">184 </span><span·class="c1">%%·test·that·starting·and·stopping·works</span><span·class="w">
185 </span><span·class="nf">start_and_stop</span><span·class="p"·data-group-id="4116849861-23">(</span><span·class="p">_</span><span·class="p"·data-group-id="4116849861-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">185 </span><span·class="nf">start_and_stop</span><span·class="p"·data-group-id="2780038690-23">(</span><span·class="p">_</span><span·class="p"·data-group-id="2780038690-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
186 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_server</span><span·class="p"·data-group-id="4116849861-24">(</span><span·class="p"·data-group-id="4116849861-24">)</span><span·class="p">,</span><span·class="w">186 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_server</span><span·class="p"·data-group-id="2780038690-24">(</span><span·class="p"·data-group-id="2780038690-24">)</span><span·class="p">,</span><span·class="w">
187 ····</span><span·class="nf">stop_server</span><span·class="p"·data-group-id="4116849861-25">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-25">)</span><span·class="p">.</span><span·class="w">187 ····</span><span·class="nf">stop_server</span><span·class="p"·data-group-id="2780038690-25">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-25">)</span><span·class="p">.</span><span·class="w">
  
188 </span><span·class="c1">%%·configuration·test</span><span·class="w">188 </span><span·class="c1">%%·configuration·test</span><span·class="w">
189 </span><span·class="nf">config</span><span·class="p"·data-group-id="4116849861-26">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 </span><span·class="nf">config</span><span·class="p"·data-group-id="2780038690-26">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="4116849861-27">(</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-27">)</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2780038690-27">(</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-27">)</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="nf">configure_server</span><span·class="p"·data-group-id="4116849861-28">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-28">)</span><span·class="p">.</span><span·class="w">191 ····</span><span·class="nf">configure_server</span><span·class="p"·data-group-id="2780038690-28">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-28">)</span><span·class="p">.</span><span·class="w">
  
192 </span><span·class="c1">%%·test·connecting·and·disconnecting·client</span><span·class="w">192 </span><span·class="c1">%%·test·connecting·and·disconnecting·client</span><span·class="w">
193 </span><span·class="nf">connect_and_disconnect</span><span·class="p"·data-group-id="4116849861-29">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 </span><span·class="nf">connect_and_disconnect</span><span·class="p"·data-group-id="2780038690-29">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="4116849861-30">(</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4116849861-30">)</span><span·class="p">,</span><span·class="w">194 ····</span><span·class="n">ServerPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2780038690-30">(</span><span·class="ss">server_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2780038690-30">)</span><span·class="p">,</span><span·class="w">
195 ····</span><span·class="p"·data-group-id="4116849861-31">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="4116849861-31">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_serve[·...·truncated·by·diffoscope;·len:·190,·SHA:·60d3665e8a7ee367b9c78ae580bac195937aa1c9a0bdc976c6a9212087f53169·...·]-32">)</span><span·class="p">,</span><span·class="w">195 ····</span><span·class="p"·data-group-id="2780038690-31">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="2780038690-31">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_serve[·...·truncated·by·diffoscope;·len:·190,·SHA:·1cf07cf200f6d21634af9b4ebb61acb87b58a1262e54be05b209683c8cedf007·...·]-32">)</span><span·class="p">,</span><span·class="w">
196 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="4116849861-33">(</span><span·class="n">ServerPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SessionId</span><span·class="p"·data-group-id="4116849861-33">)</span><span·class="p">.</span><span·class="w">196 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="2780038690-33">(</span><span·class="n">ServerPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SessionId</span><span·class="p"·data-group-id="2780038690-33">)</span><span·class="p">.</span><span·class="w">
  
197 </span><span·class="c1">%%%·common·functions...</span><span·class="w">197 </span><span·class="c1">%%%·common·functions...</span><span·class="w">
  
198 </span><span·class="nf">start_server</span><span·class="p"·data-group-id="4116849861-34">(</span><span·class="p"·data-group-id="4116849861-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 </span><span·class="nf">start_server</span><span·class="p"·data-group-id="2780038690-34">(</span><span·class="p"·data-group-id="2780038690-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ····</span><span·class="p"·data-group-id="4116849861-35">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-35">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_serve[·...·truncated·by·diffoscope;·len:·156,·SHA:·47a8cb8e832f7e2a4f5e716c16ba2cc9b28e59241d88b79afc65053f7779ab6c·...·]-36">)</span><span·class="p">,</span><span·class="w">199 ····</span><span·class="p"·data-group-id="2780038690-35">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-35">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_serve[·...·truncated·by·diffoscope;·len:·156,·SHA:·34ef4b213769ffee7506760a374e2401b83ad7adfa5de4d0b78e60d5297a332b·...·]-36">)</span><span·class="p">,</span><span·class="w">
200 ····</span><span·class="n">ServerPid</span><span·class="p">.</span><span·class="w">200 ····</span><span·class="n">ServerPid</span><span·class="p">.</span><span·class="w">
  
201 </span><span·class="nf">stop_server</span><span·class="p"·data-group-id="4116849861-37">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 </span><span·class="nf">stop_server</span><span·class="p"·data-group-id="2780038690-37">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="4116849861-38">(</span><span·class="p"·data-group-id="4116849861-38">)</span><span·class="p">,</span><span·class="w">202 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="2780038690-38">(</span><span·class="p"·data-group-id="2780038690-38">)</span><span·class="p">,</span><span·class="w">
203 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">203 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
204 </span><span·class="nf">configure_server</span><span·class="p"·data-group-id="4116849861-39">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="4116849861-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">204 </span><span·class="nf">configure_server</span><span·class="p"·data-group-id="2780038690-39">(</span><span·class="n">ServerPid</span><span·class="p"·data-group-id="2780038690-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
205 ····</span><span·class="n">ServerCfgData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="4116849861-40">(</span><span·class="ss">my_server_cfg</span><span·class="p"·data-group-id="4116849861-40">)</span><span·class="p">,</span><span·class="w">205 ····</span><span·class="n">ServerCfgData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="2780038690-40">(</span><span·class="ss">my_server_cfg</span><span·class="p"·data-group-id="2780038690-40">)</span><span·class="p">,</span><span·class="w">
206 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">configure</span><span·class="p"·data-group-id="4116849861-41">(</span><span·class="n">ServerPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ServerCfgData</span><span·class="p"·data-group-id="4116849861-41">)</span><span·class="p">,</span><span·class="w">206 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">my_server</span><span·class="p">:</span><span·class="nf">configure</span><span·class="p"·data-group-id="2780038690-41">(</span><span·class="n">ServerPid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ServerCfgData</span><span·class="p"·data-group-id="2780038690-41">)</span><span·class="p">,</span><span·class="w">
207 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p><a·href=""·id="save_config"></a></p><h2·id="saving-configuration-data"·class="section-heading">207 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p><a·href=""·id="save_config"></a></p><h2·id="saving-configuration-data"·class="section-heading">
208 ··<a·href="#saving-configuration-data"·class="hover-link">208 ··<a·href="#saving-configuration-data"·class="hover-link">
209 ····<i·class="ri-link-m"·aria-hidden="true"></i>209 ····<i·class="ri-link-m"·aria-hidden="true"></i>
210 ··</a>210 ··</a>
211 ··<span·class="text">Saving·Configuration·Data</span>211 ··<span·class="text">Saving·Configuration·Data</span>
212 </h2>212 </h2>
213 <p>Sometimes·it·is·impossible,·or·infeasible,·to·implement·independent·test·cases.213 <p>Sometimes·it·is·impossible,·or·infeasible,·to·implement·independent·test·cases.
Offset 243, 48 lines modifiedOffset 243, 48 lines modified
243 <code·class="inline">Saver</code>·is·always·matched·to·the·expected·name·of·the·saving·test·case.·This243 <code·class="inline">Saver</code>·is·always·matched·to·the·expected·name·of·the·saving·test·case.·This
244 way,·problems·because·of·restructuring·of·the·test·suite·can·be·avoided.·Also,244 way,·problems·because·of·restructuring·of·the·test·suite·can·be·avoided.·Also,
245 it·makes·the·dependency·more·explicit·and·the·test·suite·easier·to·read·and245 it·makes·the·dependency·more·explicit·and·the·test·suite·easier·to·read·and
246 maintain.</p><p>To·pass·data·from·one·test·suite·to·another,·the·same·mechanism·is·used.·The246 maintain.</p><p>To·pass·data·from·one·test·suite·to·another,·the·same·mechanism·is·used.·The
247 data·is·to·be·saved·by·finction·<a·href="ct_suite.html#c:end_per_suite/1"><code·class="inline">end_per_suite</code></a>247 data·is·to·be·saved·by·finction·<a·href="ct_suite.html#c:end_per_suite/1"><code·class="inline">end_per_suite</code></a>
248 and·read·by·function·<a·href="ct_suite.html#c:init_per_suite/1"><code·class="inline">init_per_suite</code></a>·in·the248 and·read·by·function·<a·href="ct_suite.html#c:init_per_suite/1"><code·class="inline">init_per_suite</code></a>·in·the
249 suite·that·follows.·When·passing·data·between·suites,·<code·class="inline">Saver</code>·carries·the·name249 suite·that·follows.·When·passing·data·between·suites,·<code·class="inline">Saver</code>·carries·the·name
250 of·the·test·suite.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6830163517-1">(</span><span·class="ss">server_b_SUITE</span><span·class="p"·data-group-id="6830163517-1">)</span><span·class="p">.</span><span·class="w">250 of·the·test·suite.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4097584449-1">(</span><span·class="ss">server_b_SUITE</span><span·class="p"·data-group-id="4097584449-1">)</span><span·class="p">.</span><span·class="w">
251 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="6830163517-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="6830163517-2">)</span><span·class="p">.</span><span·class="w">251 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="4097584449-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="4097584449-2">)</span><span·class="p">.</span><span·class="w">
252 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6830163517-3">(</span><span·class="s">&quot;ct.hrl&quot;</span><span·class="p"·data-group-id="6830163517-3">)</span><span·class="p">.</span><span·class="w">252 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4097584449-3">(</span><span·class="s">&quot;ct.hrl&quot;</span><span·class="p"·data-group-id="4097584449-3">)</span><span·class="p">.</span><span·class="w">
  
253 </span><span·class="c1">%%%·init·and·end·functions...</span><span·class="w">253 </span><span·class="c1">%%%·init·and·end·functions...</span><span·class="w">
  
254 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="6830163517-4">(</span><span·class="n">Config</span><span·class="p"·data-group-id="6830163517-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">254 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="4097584449-4">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4097584449-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
255 ····</span><span·class="c1">%%·read·config·saved·by·previous·test·suite</span><span·class="w">255 ····</span><span·class="c1">%%·read·config·saved·by·previous·test·suite</span><span·class="w">
256 ····</span><span·class="p"·data-group-id="6830163517-5">{</span><span·class="ss">server_a_SUITE</span><span·class="p">,</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="6830163517-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc[·...·truncated·by·diffoscope;·len:·282,·SHA:·b565f92544e037b6171f4c3ff5a59a737d9f5e208bd28122fbeb4d74b7d8cff5·...·]-6">)</span><span·class="p">,</span><span·class="w">256 ····</span><span·class="p"·data-group-id="4097584449-5">{</span><span·class="ss">server_a_SUITE</span><span·class="p">,</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="4097584449-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc[·...·truncated·by·diffoscope;·len:·282,·SHA:·00b399265949937dd45c670b9fe149d8882bcf5563caabf9d3e804c394f4bf1b·...·]-6">)</span><span·class="p">,</span><span·class="w">
257 ····</span><span·class="c1">%%·extract·server·identity·(comes·from·server_a_SUITE)</span><span·class="w">257 ····</span><span·class="c1">%%·extract·server·identity·(comes·from·server_a_SUITE)</span><span·class="w">
258 ····</span><span·class="n">ServerId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="6830163517-7">(</span><span·class="ss">server_id</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="6830163517-7">)</span><span·class="p">,</span><span·class="w">258 ····</span><span·class="n">ServerId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="4097584449-7">(</span><span·class="ss">server_id</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="4097584449-7">)</span><span·class="p">,</span><span·class="w">
259 ····</span><span·class="n">SessionId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">connect_to_server</span><span·class="p"·data-group-id="6830163517-8">(</span><span·class="n">ServerId</span><span·class="p"·data-group-id="6830163517-8">)</span><span·class="p">,</span><span·class="w"> 
260 ····</span><span·class="p"·data-group-id="6830163517-9">[</span><span·class="p"·data-group-id="6830163517-10">{</span><span·class="ss">ids</span><span·class="p">,</span><span·class="p"·data-group-id="6830163517-11">{</span><span·class="n">ServerId</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·309,·SHA:·2635baecc3a776de8736f009ff5ef0b059a0032da98d757b1ca999a5aa75e255·...·]</span><span·class="w">259 ····</span><span·class="n">SessionId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">connect_to_server</span><span·class="p"·data-group-id="4097584449-8">(</span><span·class="n">ServerId</span><span·class="p"·data-group-id="409758444[·...·truncated·by·diffoscope;·len:·30,·SHA:·16c6c3dafadf3210dbedfa41b4afdae7382612c26eadf757c7f6475a22be646d·...·]</span><span·class="w">
 260 ····</span><span·class="p"·data-group-id="4097584449-9">[</span><span·class="p"·data-group-id="4097584449-10">{</span><span·class="ss">ids</span><span·class="p">,</span><span·class="p"·data-group-id="4097584449-11">{</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="4097584449-11">}</span><span·class="p"·data-group-id="4097584449-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="4097584449-9">]</span><span·class="p">.</span><span·class="w">
  
261 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="6830163517-12">(</span><span·class="n">Config</span><span·class="p"·data-group-id="6830163517-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">261 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="4097584449-12">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4097584449-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
262 ····</span><span·class="c1">%%·save·config·for·server_c_SUITE·(session_id·and·server_id)</span><span·class="w">262 ····</span><span·class="c1">%%·save·config·for·server_c_SUITE·(session_id·and·server_id)</span><span·class="w">
263 ····</span><span·class="p"·data-group-id="6830163517-13">{</span><span·class="ss">save_config</span><span·class="p">,</span><span·class="n">Config</span><span·class="p"·data-group-id="6830163517-13">}</span><span·class="w">263 ····</span><span·class="p"·data-group-id="4097584449-13">{</span><span·class="ss">save_config</span><span·class="p">,</span><span·class="n">Config</span><span·class="p"·data-group-id="4097584449-13">}</span><span·class="w">
  
264 </span><span·class="c1">%%%·test·cases...</span><span·class="w">264 </span><span·class="c1">%%%·test·cases...</span><span·class="w">
  
265 </span><span·class="nf">all</span><span·class="p"·data-group-id="6830163517-14">(</span><span·class="p"·data-group-id="6830163517-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6830163517-15">[</span><span·class="ss">allocate</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·106,·SHA:·7b8054dcb23d9880df70c6e576b5ddffc78f4ad16be8616d804e95d6b802675f·...·]-15">]</span><span·class="p">.</span><span·class="w">265 </span><span·class="nf">all</span><span·class="p"·data-group-id="4097584449-14">(</span><span·class="p"·data-group-id="4097584449-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4097584449-15">[</span><span·class="ss">allocate</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·106,·SHA:·955c4780d2b8bcb2205e2c804fe8768ee8df95d8c34b0ec0a0576e164d8e2068·...·]-15">]</span><span·class="p">.</span><span·class="w">
  
266 </span><span·class="nf">allocate</span><span·class="p"·data-group-id="6830163517-16">(</span><span·class="n">Config</span><span·class="p"·data-group-id="6830163517-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">266 </span><span·class="nf">allocate</span><span·class="p"·data-group-id="4097584449-16">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4097584449-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
267 ····</span><span·class="p"·data-group-id="6830163517-17">{</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="6830163517-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">pro[·...·truncated·by·diffoscope;·len:·269,·SHA:·eab408d9ce85648b1d9b62a9582b8e4cd3c54b05771b1671e2c6dfa0969ef0ae·...·]-18">)</span><span·class="p">,</span><span·class="w">267 ····</span><span·class="p"·data-group-id="4097584449-17">{</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="4097584449-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">pro[·...·truncated·by·diffoscope;·len:·269,·SHA:·a44c8ea426b24bcf9818adafd0b5817d2d8bd04abec64ac90fd4443558817ec7·...·]-18">)</span><span·class="p">,</span><span·class="w">
268 ····</span><span·class="p"·data-group-id="6830163517-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Handle</span><span·class="p"·data-group-id="6830163517-19">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">allocate_re[·...·truncated·by·diffoscope;·len:·219,·SHA:·71846ed1af69515d6635b459b89912936f9a7abd863bf7f7a56a598ee87af62e·...·]-20">)</span><span·class="p">,</span><span·class="w">268 ····</span><span·class="p"·data-group-id="4097584449-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Handle</span><span·class="p"·data-group-id="4097584449-19">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">allocate_re[·...·truncated·by·diffoscope;·len:·219,·SHA:·e850ec19535d3b57d4936ebe79c375c72e97c46cd0aaa1532bc9f76b58446156·...·]-20">)</span><span·class="p">,</span><span·class="w">
269 ····</span><span·class="c1">%%·save·handle·for·deallocation·test</span><span·class="w">269 ····</span><span·class="c1">%%·save·handle·for·deallocation·test</span><span·class="w">
270 ····</span><span·class="n">NewConfig</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6830163517-21">[</span><span·class="p"·data-group-id="6830163517-22">{</span><span·class="ss">handle</span><span·class="p">,</span><span·class="n">Handle</span><span·class="p"·data-group-id="6830163517-22">}</span><span·class="p"·data-group-id="6830163517-21">]</span><span·class="p">,</span><span·class="w">270 ····</span><span·class="n">NewConfig</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4097584449-21">[</span><span·class="p"·data-group-id="4097584449-22">{</span><span·class="ss">handle</span><span·class="p">,</span><span·class="n">Handle</span><span·class="p"·data-group-id="4097584449-22">}</span><span·class="p"·data-group-id="4097584449-21">]</span><span·class="p">,</span><span·class="w">
271 ····</span><span·class="p"·data-group-id="6830163517-23">{</span><span·class="ss">save_config</span><span·class="p">,</span><span·class="n">NewConfig</span><span·class="p"·data-group-id="6830163517-23">}</span><span·class="p">.</span><span·class="w">271 ····</span><span·class="p"·data-group-id="4097584449-23">{</span><span·class="ss">save_config</span><span·class="p">,</span><span·class="n">NewConfig</span><span·class="p"·data-group-id="4097584449-23">}</span><span·class="p">.</span><span·class="w">
  
272 </span><span·class="nf">deallocate</span><span·class="p"·data-group-id="6830163517-24">(</span><span·class="n">Config</span><span·class="p"·data-group-id="6830163517-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">272 </span><span·class="nf">deallocate</span><span·class="p"·data-group-id="4097584449-24">(</span><span·class="n">Config</span><span·class="p"·data-group-id="4097584449-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
273 ····</span><span·class="p"·data-group-id="6830163517-25">{</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="6830163517-25">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">pro[·...·truncated·by·diffoscope;·len:·269,·SHA:·5d4b4de28e4da4952d2c371cbf7d50114e255db3b493409acad3198f97922129·...·]-26">)</span><span·class="p">,</span><span·class="w">273 ····</span><span·class="p"·data-group-id="4097584449-25">{</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="n">SessionId</span><span·class="p"·data-group-id="4097584449-25">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">pro[·...·truncated·by·diffoscope;·len:·269,·SHA:·a43ce3241c278dcdd723c5a3e72d9153aeb24cb77b94083df297fc996f70141a·...·]-26">)</span><span·class="p">,</span><span·class="w">
274 ····</span><span·class="p"·data-group-id="6830163517-27">{</span><span·class="ss">allocate</span><span·class="p">,</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="6830163517-27">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">pr[·...·truncated·by·diffoscope;·len:·279,·SHA:·2c7401032c3ac92b0f5196985b47b5a98502a7658baba5d32dd5e3042b1aa636·...·]-28">)</span><span·class="p">,</span><span·class="w">274 ····</span><span·class="p"·data-group-id="4097584449-27">{</span><span·class="ss">allocate</span><span·class="p">,</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="4097584449-27">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">pr[·...·truncated·by·diffoscope;·len:·279,·SHA:·143320ef710c94b6f0c12a5389ee41d89ec498102597939213c7cd6c70bf3268·...·]-28">)</span><span·class="p">,</span><span·class="w">
275 ····</span><span·class="n">Handle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="6830163517-29">(</span><span·class="ss">handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="6830163517-29">)</span><span·class="p">,</span><span·class="w">275 ····</span><span·class="n">Handle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="4097584449-29">(</span><span·class="ss">handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OldConfig</span><span·class="p"·data-group-id="4097584449-29">)</span><span·class="p">,</span><span·class="w">
276 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">deallocate_resource</span><span·class="p"·data-group-id="6830163517-30">(</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SessionId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handle</span><span·class="p"·data-group-id="6830163517-30">)</span><span·class="p">.</span></code></pre><p>To·save·<code·class="inline">Config</code>·data·from·a·test·case·that·is·to·be·skipped,·return·tuple276 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">deallocate_resource</span><span·class="p"·data-group-id="4097584449-30">(</span><span·class="n">ServerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SessionId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Handle</span><span·class="p"·data-group-id="4097584449-30">)</span><span·class="p">.</span></code></pre><p>To·save·<code·class="inline">Config</code>·data·from·a·test·case·that·is·to·be·skipped,·return·tuple
277 <code·class="inline">{skip_and_save,Reason,ConfigList}</code>.</p><p>The·result·is·that·the·test·case·is·skipped·with·<code·class="inline">Reason</code>·printed·to·the·log277 <code·class="inline">{skip_and_save,Reason,ConfigList}</code>.</p><p>The·result·is·that·the·test·case·is·skipped·with·<code·class="inline">Reason</code>·printed·to·the·log
278 file·(as·described·earlier)·and·<code·class="inline">ConfigList</code>·is·saved·for·the·next·test·case.278 file·(as·described·earlier)·and·<code·class="inline">ConfigList</code>·is·saved·for·the·next·test·case.
279 <code·class="inline">ConfigList</code>·can·be·read·using·<code·class="inline">proplists:get_value(saved_config,·Config)</code>,·as279 <code·class="inline">ConfigList</code>·can·be·read·using·<code·class="inline">proplists:get_value(saved_config,·Config)</code>,·as
280 described·earlier.·<code·class="inline">skip_and_save</code>·can·also·be·returned·from·<code·class="inline">init_per_suite</code>.280 described·earlier.·<code·class="inline">skip_and_save</code>·can·also·be·returned·from·<code·class="inline">init_per_suite</code>.
281 In·this·case,·the·saved·data·can·be·read·by·<code·class="inline">init_per_suite</code>·in·the·suite·that281 In·this·case,·the·saved·data·can·be·read·by·<code·class="inline">init_per_suite</code>·in·the·suite·that
282 follows.</p><h2·id="sequences"·class="section-heading">282 follows.</p><h2·id="sequences"·class="section-heading">
283 ··<a·href="#sequences"·class="hover-link">283 ··<a·href="#sequences"·class="hover-link">
Offset 296, 30 lines modifiedOffset 296, 30 lines modified
296 following·tests·are·not·to·be·executed.·Typically,·if·the·<code·class="inline">save_config</code>·facility296 following·tests·are·not·to·be·executed.·Typically,·if·the·<code·class="inline">save_config</code>·facility
297 is·used·and·a·test·case·that·is·expected·to·save·data·crashes,·the·following297 is·used·and·a·test·case·that·is·expected·to·save·data·crashes,·the·following
298 case·cannot·run.·<code·class="inline">Common·Test</code>·offers·a·way·to·declare·such·dependencies,·called298 case·cannot·run.·<code·class="inline">Common·Test</code>·offers·a·way·to·declare·such·dependencies,·called
Max diff block lines reached; 11566/57121 bytes (20.25%) of diff not shown.
10.2 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/event_handler_chapter.html
    
Offset 164, 20 lines modifiedOffset 164, 20 lines modified
164 </h2>164 </h2>
165 <p>Event·handlers·can·be·installed·by·an·<code·class="inline">event_handler</code>·start·flag165 <p>Event·handlers·can·be·installed·by·an·<code·class="inline">event_handler</code>·start·flag
166 (<a·href="ct_run_cmd.html"><code·class="inline">ct_run</code></a>)·or·option·<a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>,·where·the·argument166 (<a·href="ct_run_cmd.html"><code·class="inline">ct_run</code></a>)·or·option·<a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>,·where·the·argument
167 specifies·the·names·of·one·or·more·event·handler·modules.</p><p><em>Example:</em></p><p><code·class="inline">$·ct_run·-suite·test/my_SUITE·-event_handler·handlers/my_evh1·handlers/my_evh2·-pa·$PWD/handlers</code></p><p>To·pass·start·arguments·to·the·event·handler·init·function,·use·option167 specifies·the·names·of·one·or·more·event·handler·modules.</p><p><em>Example:</em></p><p><code·class="inline">$·ct_run·-suite·test/my_SUITE·-event_handler·handlers/my_evh1·handlers/my_evh2·-pa·$PWD/handlers</code></p><p>To·pass·start·arguments·to·the·event·handler·init·function,·use·option
168 <code·class="inline">ct_run·-event_handler_init</code>·instead·of·<code·class="inline">-event_handler</code>.</p><blockquote><h4·class="info">Note</h4><p>All·event·handler·modules·must·have·<code·class="inline">gen_event</code>·behavior.·These·modules·must168 <code·class="inline">ct_run·-event_handler_init</code>·instead·of·<code·class="inline">-event_handler</code>.</p><blockquote><h4·class="info">Note</h4><p>All·event·handler·modules·must·have·<code·class="inline">gen_event</code>·behavior.·These·modules·must
169 be·precompiled·and·their·locations·must·be·added·explicitly·to·the·Erlang·code169 be·precompiled·and·their·locations·must·be·added·explicitly·to·the·Erlang·code
170 server·search·path·(as·in·the·previous·example).</p></blockquote><p>An·event_handler·tuple·in·argument·<code·class="inline">Opts</code>·has·the·following·definition·(see170 server·search·path·(as·in·the·previous·example).</p></blockquote><p>An·event_handler·tuple·in·argument·<code·class="inline">Opts</code>·has·the·following·definition·(see
171 <a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6516455180-1">{</span><span·class="ss">event_handler</span><span·class="p">,</span><span·class="n">EventHandlers</span><span·class="p"·data-group-id="6516455180-1">}</span><span·class="w">171 <a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9966048634-1">{</span><span·class="ss">event_handler</span><span·class="p">,</span><span·class="n">EventHandlers</span><span·class="p"·data-group-id="9966048634-1">}</span><span·class="w">
  
172 </span><span·class="n">EventHandlers</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">EH</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="6516455180-2">[</span><span·class="n">EH</span><span·class="p"·data-group-id="6516455180-2">]</span><span·class="w">172 </span><span·class="n">EventHandlers</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">EH</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="9966048634-2">[</span><span·class="n">EH</span><span·class="p"·data-group-id="9966048634-2">]</span><span·class="w">
173 </span><span·class="n">EH</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="6516455180-3">(</span><span·class="p"·data-group-id="6516455180-3">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="6516455180-4">{</span><span·class="nf">atom</span><span·class="p"·data-group-id="6516455180-5">(</span><span·class="p"·data-group-id="6516455180-5">)</span><span·class="p">,</span><span·class="n">InitArgs</span><span·class="p"·data-group-id="6516455180-4">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="6516455180-6">{</span><span·class="p"·data-group-id="6516455180-7">[</span><span·class="nf">atom</span><span·class="p"·data-group-id="6516455180-8">(</span><span·class="p"·data-group-id="6516455180-8">)</span><span·class="p"·data-group-id="6516455180-7">]</span><span·class="p">,</span><span·class="n">InitArgs</span><span·class="p"·data-group-id="6516455180-6">}</span><span·class="w"> 
174 </span><span·class="n">InitArgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6516455180-9">[</span><span·class="nf">term</span><span·class="p"·data-group-id="6516455180-10">(</span><span·class="p"·data-group-id="6516455180-10">)</span><span·class="p"·data-group-id="6516455180-9">]</span></code></pre><p>In·the·following·example,·two·event·handlers·for·the·<code·class="inline">my_SUITE</code>·test·are 
175 installed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="2927823429-1">(</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·1273,·SHA:·f7072ab0bdc8ae96d88948b4e3a8b21939cbba4c3f7a033e7d6c2126cf563dd4·...·]173 </span><span·class="n">EH</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="9966048634-3">(</span><span·class="p"·data-group-id="9966048634-3">)</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·838,·SHA:·c0c403834766597e6f3b13857e862c7940c0c2216bca48b12a28940fef0bce9f·...·]
 174 </span><span·class="n">InitArgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9966048634-9">[</span><span·class="nf">term</span><span·class="p"·data-group-id="9966048634-10">(</span><span·class="p"·data-group-id="9966048634-10">)</span><span·class="p"·data-group-id="9966048634-9">]</span></code></pre><p>In·the·following·example,·two·event·handlers·for·the·<code·class="inline">my_SUITE</code>·test·are
 175 installed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="8233561613-1">(</span><span·class="p"·data-group-id="8233561613-2">[</span><span·class="p"·data-group-id="8233561613-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;test/my_SUITE&quot;</span><span·class="p"·data-group-id="8233561613-3">}</span><span·class="p">,</span><span·class="p"·data-group-id="8233561613-4">{</span><span·class="ss">event_handler</span><span·class="p">,</span><span·class="p"·data-group-id="8233561613-5">[</span><span·class="ss">my_evh1</span><span·class="p">,</span><span·class="p"·data-group-id="8233561613-6">{</span><span·class="ss">my_evh2</span><span·class="p">,</span><span·class="p"·data-group-id="8233561613-7">[</span><span·class="nf">node</span><span·class="p"·data-group-id="8233561613-8">(</span><span·class="p"·data-group-id="8233561613-8">)</span><span·class="p"·data-group-id="8233561613-7">]</span><span·class="p"·data-group-id="8233561613-6">}</span><span·class="p"·data-group-id="8233561613-5">]</span><span·class="p"·data-group-id="8233561613-4">}</span><span·class="p"·data-group-id="8233561613-2">]</span><span·class="p"·data-group-id="8233561613-1">)</span><span·class="p">.</span></code></pre><p>Event·handler·<code·class="inline">my_evh1</code>·is·started·with·<code·class="inline">[]</code>·as·argument·to·the·init·function.
176 Event·handler·<code·class="inline">my_evh2</code>·is·started·with·the·name·of·the·current·node·in·the·init176 Event·handler·<code·class="inline">my_evh2</code>·is·started·with·the·name·of·the·current·node·in·the·init
177 argument·list.</p><p>Event·handlers·can·also·be·plugged·in·using·one·of·the·following177 argument·list.</p><p>Event·handlers·can·also·be·plugged·in·using·one·of·the·following
178 <a·href="run_test_chapter.html#test_specifications">test·specification</a>·terms:</p><ul><li><code·class="inline">{event_handler,·EventHandlers}</code></li><li><code·class="inline">{event_handler,·EventHandlers,·InitArgs}</code></li><li><code·class="inline">{event_handler,·NodeRefs,·EventHandlers}</code></li><li><code·class="inline">{event_handler,·NodeRefs,·EventHandlers,·InitArgs}</code></li></ul><p><code·class="inline">EventHandlers</code>·is·a·list·of·module·names.·Before·a·test·session·starts,·the178 <a·href="run_test_chapter.html#test_specifications">test·specification</a>·terms:</p><ul><li><code·class="inline">{event_handler,·EventHandlers}</code></li><li><code·class="inline">{event_handler,·EventHandlers,·InitArgs}</code></li><li><code·class="inline">{event_handler,·NodeRefs,·EventHandlers}</code></li><li><code·class="inline">{event_handler,·NodeRefs,·EventHandlers,·InitArgs}</code></li></ul><p><code·class="inline">EventHandlers</code>·is·a·list·of·module·names.·Before·a·test·session·starts,·the
179 init·function·of·each·plugged·in·event·handler·is·called·(with·the·<code·class="inline">InitArgs</code>179 init·function·of·each·plugged·in·event·handler·is·called·(with·the·<code·class="inline">InitArgs</code>
180 list·as·argument·or·<code·class="inline">[]</code>·if·no·start·arguments·are·specified).</p><p>To·plug·in·a·handler·to·the·<code·class="inline">Common·Test</code>·Master·event·manager,·specify·<code·class="inline">master</code>180 list·as·argument·or·<code·class="inline">[]</code>·if·no·start·arguments·are·specified).</p><p>To·plug·in·a·handler·to·the·<code·class="inline">Common·Test</code>·Master·event·manager,·specify·<code·class="inline">master</code>
181 as·the·node·in·<code·class="inline">NodeRefs</code>.</p><p>To·be·able·to·match·on·events,·the·event·handler·module·must·include·the·header181 as·the·node·in·<code·class="inline">NodeRefs</code>.</p><p>To·be·able·to·match·on·events,·the·event·handler·module·must·include·the·header
182 file·<code·class="inline">ct_event.hrl</code>.·An·event·is·a·record·with·the·following·definition:</p><p><code·class="inline">#event{name,·node,·data}</code></p><ul><li><p><strong><code·class="inline">name</code></strong>·-·Label·(type)·of·the·event.</p></li><li><p><strong><code·class="inline">node</code></strong>·-·Name·of·the·node·that·the·event·originated·from·(only·relevant182 file·<code·class="inline">ct_event.hrl</code>.·An·event·is·a·record·with·the·following·definition:</p><p><code·class="inline">#event{name,·node,·data}</code></p><ul><li><p><strong><code·class="inline">name</code></strong>·-·Label·(type)·of·the·event.</p></li><li><p><strong><code·class="inline">node</code></strong>·-·Name·of·the·node·that·the·event·originated·from·(only·relevant
77.6 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/example_chapter.html
    
Offset 127, 136 lines modifiedOffset 127, 136 lines modified
  
127 <p><a·href=""·id="top"></a></p><h2·id="test-suite-example"·class="section-heading">127 <p><a·href=""·id="top"></a></p><h2·id="test-suite-example"·class="section-heading">
128 ··<a·href="#test-suite-example"·class="hover-link">128 ··<a·href="#test-suite-example"·class="hover-link">
129 ····<i·class="ri-link-m"·aria-hidden="true"></i>129 ····<i·class="ri-link-m"·aria-hidden="true"></i>
130 ··</a>130 ··</a>
131 ··<span·class="text">Test·Suite·Example</span>131 ··<span·class="text">Test·Suite·Example</span>
132 </h2>132 </h2>
133 <p>The·following·example·test·suite·shows·some·tests·of·a·database·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2860892419-1">(</span><span·class="ss">db_data_type_SUITE</span><span·class="p"·data-group-id="2860892419-1">)</span><span·class="p">.</span><span·class="w">133 <p>The·following·example·test·suite·shows·some·tests·of·a·database·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2686980821-1">(</span><span·class="ss">db_data_type_SUITE</span><span·class="p"·data-group-id="2686980821-1">)</span><span·class="p">.</span><span·class="w">
134 </span><span·class="w">134 </span><span·class="w">
135 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2860892419-2">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="2860892419-2">)</span><span·class="p">.</span><span·class="w">135 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2686980821-2">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="2686980821-2">)</span><span·class="p">.</span><span·class="w">
  
136 </span><span·class="c1">%%·Test·server·callbacks</span><span·class="w">136 </span><span·class="c1">%%·Test·server·callbacks</span><span·class="w">
137 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2860892419-3">(</span><span·class="p"·data-group-id="2860892419-4">[</span><span·class="ss">suite</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">137 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2686980821-3">(</span><span·class="p"·data-group-id="2686980821-4">[</span><span·class="ss">suite</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
138 ·········</span><span·class="ss">init_per_suite</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_per_suite</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">138 ·········</span><span·class="ss">init_per_suite</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_per_suite</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
139 ·········</span><span·class="ss">init_per_testcase</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_per_testcase</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="2860892419-4">]</span><span·class="p"·data-group-id="2860892419-3">)</span><span·class="p">.</span><span·class="w">139 ·········</span><span·class="ss">init_per_testcase</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_per_testcase</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="2686980821-4">]</span><span·class="p"·data-group-id="2686980821-3">)</span><span·class="p">.</span><span·class="w">
  
140 </span><span·class="c1">%%·Test·cases</span><span·class="w">140 </span><span·class="c1">%%·Test·cases</span><span·class="w">
141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2860892419-5">(</span><span·class="p"·data-group-id="2860892419-6">[</span><span·class="ss">string</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">integer</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·119,·SHA:·1a6aea67bfb9e5b677441a91c97787981525b8061da44a4125b97d0389f1c77c·...·]-5">)</span><span·class="p">.</span><span·class="w">141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2686980821-5">(</span><span·class="p"·data-group-id="2686980821-6">[</span><span·class="ss">string</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">integer</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·119,·SHA:·906f6b37c77cb461458de1dd51d581e67ed3868fe07c0e8dd01b685ef93f3f11·...·]-5">)</span><span·class="p">.</span><span·class="w">
142 </span><span·class="w">142 </span><span·class="w">
143 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2860892419-7">(</span><span·class="n">CONNECT_STR</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;DSN=sqlserver;UID=alladin;PWD=sesame&quot;</span><span·class="p"·data-group-id="2860892419-7">)</span><span·class="p">.</span><span·class="w">143 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2686980821-7">(</span><span·class="n">CONNECT_STR</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;DSN=sqlserver;UID=alladin;PWD=sesame&quot;</span><span·class="p"·data-group-id="2686980821-7">)</span><span·class="p">.</span><span·class="w">
  
144 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">144 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
145 </span><span·class="c1">%%·COMMON·TEST·CALLBACK·FUNCTIONS</span><span·class="w">145 </span><span·class="c1">%%·COMMON·TEST·CALLBACK·FUNCTIONS</span><span·class="w">
146 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">146 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
  
147 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">147 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
148 </span><span·class="c1">%%·Function:·suite()·-&gt;·Info</span><span·class="w">148 </span><span·class="c1">%%·Function:·suite()·-&gt;·Info</span><span·class="w">
149 </span><span·class="c1">%%</span><span·class="w">149 </span><span·class="c1">%%</span><span·class="w">
150 </span><span·class="c1">%%·Info·=·[tuple()]</span><span·class="w">150 </span><span·class="c1">%%·Info·=·[tuple()]</span><span·class="w">
151 </span><span·class="c1">%%···List·of·key/value·pairs.</span><span·class="w">151 </span><span·class="c1">%%···List·of·key/value·pairs.</span><span·class="w">
152 </span><span·class="c1">%%</span><span·class="w">152 </span><span·class="c1">%%</span><span·class="w">
153 </span><span·class="c1">%%·Description:·Returns·list·of·tuples·to·set·default·properties</span><span·class="w">153 </span><span·class="c1">%%·Description:·Returns·list·of·tuples·to·set·default·properties</span><span·class="w">
154 </span><span·class="c1">%%··············for·the·suite.</span><span·class="w">154 </span><span·class="c1">%%··············for·the·suite.</span><span·class="w">
155 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">155 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
156 </span><span·class="nf">suite</span><span·class="p"·data-group-id="2860892419-8">(</span><span·class="p"·data-group-id="2860892419-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 </span><span·class="nf">suite</span><span·class="p"·data-group-id="2686980821-8">(</span><span·class="p"·data-group-id="2686980821-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ····</span><span·class="p"·data-group-id="2860892419-9">[</span><span·class="p"·data-group-id="2860892419-10">{</span><span·class="ss">timetrap</span><span·class="p">,</span><span·class="p"·data-group-id="2860892419-11">{</span><span·class="ss">minutes</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·158,·SHA:·9220295abc5c390a30ba96294ef15d7c651d61f515116b4906fb0a121aa09ef1·...·]-9">]</span><span·class="p">.</span><span·class="w">157 ····</span><span·class="p"·data-group-id="2686980821-9">[</span><span·class="p"·data-group-id="2686980821-10">{</span><span·class="ss">timetrap</span><span·class="p">,</span><span·class="p"·data-group-id="2686980821-11">{</span><span·class="ss">minutes</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·158,·SHA:·1f6584845527a8d70aa23740d768568d243fbe346c9ab6a3ebd2895c2c139c31·...·]-9">]</span><span·class="p">.</span><span·class="w">
  
158 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">158 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
159 </span><span·class="c1">%%·Function:·init_per_suite(Config0)·-&gt;·Config1</span><span·class="w">159 </span><span·class="c1">%%·Function:·init_per_suite(Config0)·-&gt;·Config1</span><span·class="w">
160 </span><span·class="c1">%%</span><span·class="w">160 </span><span·class="c1">%%</span><span·class="w">
161 </span><span·class="c1">%%·Config0·=·Config1·=·[tuple()]</span><span·class="w">161 </span><span·class="c1">%%·Config0·=·Config1·=·[tuple()]</span><span·class="w">
162 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">162 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">
163 </span><span·class="c1">%%</span><span·class="w">163 </span><span·class="c1">%%</span><span·class="w">
164 </span><span·class="c1">%%·Description:·Initialization·before·the·suite.</span><span·class="w">164 </span><span·class="c1">%%·Description:·Initialization·before·the·suite.</span><span·class="w">
165 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">165 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
166 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="2860892419-12">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">166 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="2686980821-12">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
167 ····</span><span·class="p"·data-group-id="2860892419-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ref</span><span·class="p"·data-group-id="2860892419-13">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·382,·SHA:·d75d76840f8103dac7de578c7e2f34c6837b80c770818eecf4fc6195d4381193·...·]-14">)</span><span·class="p">,</span><span·class="w">167 ····</span><span·class="p"·data-group-id="2686980821-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ref</span><span·class="p"·data-group-id="2686980821-13">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·382,·SHA:·b2663166bd8399808798b4b54438c51c7489c3d47813422d47cf60b8080e0a21·...·]-14">)</span><span·class="p">,</span><span·class="w">
168 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db_lib</span><span·class="p">:</span><span·class="nf">unique_table_name</span><span·class="p"·data-group-id="2860892419-16">(</span><span·class="p"·data-group-id="2860892419-16">)</span><span·class="p">,</span><span·class="w">168 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db_lib</span><span·class="p">:</span><span·class="nf">unique_table_name</span><span·class="p"·data-group-id="2686980821-16">(</span><span·class="p"·data-group-id="2686980821-16">)</span><span·class="p">,</span><span·class="w">
169 ····</span><span·class="p"·data-group-id="2860892419-17">[</span><span·class="p"·data-group-id="2860892419-18">{</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ref</span><span·class="w">·</span><span·class="p"·data-group-id="2860892419-18">}</sp[·...·truncated·by·diffoscope;·len:·367,·SHA:·bda463587f0312df933bd2d4916179af1a752756010e57cefcd1a641f21b99cf·...·]-17">]</span><span·class="p">.</span><span·class="w">169 ····</span><span·class="p"·data-group-id="2686980821-17">[</span><span·class="p"·data-group-id="2686980821-18">{</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ref</span><span·class="w">·</span><span·class="p"·data-group-id="2686980821-18">}</sp[·...·truncated·by·diffoscope;·len:·367,·SHA:·4ddcf96b28aac407443375b36a0b45de185ac8246c0c4c3cb883c0942dcec2b0·...·]-17">]</span><span·class="p">.</span><span·class="w">
  
170 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">170 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
171 </span><span·class="c1">%%·Function:·end_per_suite(Config)·-&gt;·term()</span><span·class="w">171 </span><span·class="c1">%%·Function:·end_per_suite(Config)·-&gt;·term()</span><span·class="w">
172 </span><span·class="c1">%%</span><span·class="w">172 </span><span·class="c1">%%</span><span·class="w">
173 </span><span·class="c1">%%·Config·=·[tuple()]</span><span·class="w">173 </span><span·class="c1">%%·Config·=·[tuple()]</span><span·class="w">
174 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">174 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">
175 </span><span·class="c1">%%</span><span·class="w">175 </span><span·class="c1">%%</span><span·class="w">
176 </span><span·class="c1">%%·Description:·Cleanup·after·the·suite.</span><span·class="w">176 </span><span·class="c1">%%·Description:·Cleanup·after·the·suite.</span><span·class="w">
177 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">177 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
178 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="2860892419-20">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="2686980821-20">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-21">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-21">)</span><span·class="p">,</span><span·class="w">179 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-21">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-21">)</span><span·class="p">,</span><span·class="w">
180 ····</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="2860892419-22">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="2860892419-22">)</span><span·class="p">,</span><span·class="w">180 ····</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="2686980821-22">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="2686980821-22">)</span><span·class="p">,</span><span·class="w">
181 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">181 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
182 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">182 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
183 </span><span·class="c1">%%·Function:·init_per_testcase(TestCase,·Config0)·-&gt;·Config1</span><span·class="w">183 </span><span·class="c1">%%·Function:·init_per_testcase(TestCase,·Config0)·-&gt;·Config1</span><span·class="w">
184 </span><span·class="c1">%%</span><span·class="w">184 </span><span·class="c1">%%</span><span·class="w">
185 </span><span·class="c1">%%·TestCase·=·atom()</span><span·class="w">185 </span><span·class="c1">%%·TestCase·=·atom()</span><span·class="w">
186 </span><span·class="c1">%%···Name·of·the·test·case·that·is·about·to·run.</span><span·class="w">186 </span><span·class="c1">%%···Name·of·the·test·case·that·is·about·to·run.</span><span·class="w">
187 </span><span·class="c1">%%·Config0·=·Config1·=·[tuple()]</span><span·class="w">187 </span><span·class="c1">%%·Config0·=·Config1·=·[tuple()]</span><span·class="w">
188 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">188 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">
189 </span><span·class="c1">%%</span><span·class="w">189 </span><span·class="c1">%%</span><span·class="w">
190 </span><span·class="c1">%%·Description:·Initialization·before·each·test·case.</span><span·class="w">190 </span><span·class="c1">%%·Description:·Initialization·before·each·test·case.</span><span·class="w">
191 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">191 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
192 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2860892419-23">(</span><span·class="n">Case</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 </span><span·class="nf">init_per_testcase</span><span·class="p"·data-group-id="2686980821-23">(</span><span·class="n">Case</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-24">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-24">)</span><span·class="p">,</span><span·class="w">193 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-24">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-24">)</span><span·class="p">,</span><span·class="w">
194 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-25">(</span><span·class="ss">table_name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-25">)</span><span·class="p">,</span><span·class="w">194 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-25">(</span><span·class="ss">table_name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-25">)</span><span·class="p">,</span><span·class="w">
195 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="2860892419-26">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TableName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">table_type</span><span·class="p"·data-group-id="2860892419-27">[·...·truncated·by·diffoscope;·len:·130,·SHA:·a0649e1f7d36041d0165f34b48330699d1547697f052888bb7ec9699a98b6b78·...·]-26">)</span><span·class="p">,</span><span·class="w">195 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="2686980821-26">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TableName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">table_type</span><span·class="p"·data-group-id="2686980821-27">[·...·truncated·by·diffoscope;·len:·130,·SHA:·b2add05c7d7b1fa95b1acd99d7de94b27c1c4195893523bfcb836658443b4122·...·]-26">)</span><span·class="p">,</span><span·class="w">
196 ····</span><span·class="n">Config</span><span·class="p">.</span><span·class="w">196 ····</span><span·class="n">Config</span><span·class="p">.</span><span·class="w">
  
197 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">197 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
198 </span><span·class="c1">%%·Function:·end_per_testcase(TestCase,·Config)·-&gt;·term()</span><span·class="w">198 </span><span·class="c1">%%·Function:·end_per_testcase(TestCase,·Config)·-&gt;·term()</span><span·class="w">
199 </span><span·class="c1">%%</span><span·class="w">199 </span><span·class="c1">%%</span><span·class="w">
200 </span><span·class="c1">%%·TestCase·=·atom()</span><span·class="w">200 </span><span·class="c1">%%·TestCase·=·atom()</span><span·class="w">
201 </span><span·class="c1">%%···Name·of·the·test·case·that·is·finished.</span><span·class="w">201 </span><span·class="c1">%%···Name·of·the·test·case·that·is·finished.</span><span·class="w">
202 </span><span·class="c1">%%·Config·=·[tuple()]</span><span·class="w">202 </span><span·class="c1">%%·Config·=·[tuple()]</span><span·class="w">
203 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">203 </span><span·class="c1">%%···A·list·of·key/value·pairs,·holding·the·test·case·configuration.</span><span·class="w">
204 </span><span·class="c1">%%</span><span·class="w">204 </span><span·class="c1">%%</span><span·class="w">
205 </span><span·class="c1">%%·Description:·Cleanup·after·each·test·case.</span><span·class="w">205 </span><span·class="c1">%%·Description:·Cleanup·after·each·test·case.</span><span·class="w">
206 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">206 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
207 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="2860892419-28">(</span><span·class="p">_</span><span·class="n">Case</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">207 </span><span·class="nf">end_per_testcase</span><span·class="p"·data-group-id="2686980821-28">(</span><span·class="p">_</span><span·class="n">Case</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
208 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-29">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-29">)</span><span·class="p">,</span><span·class="w">208 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-29">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-29">)</span><span·class="p">,</span><span·class="w">
209 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-30">(</span><span·class="ss">table_name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-30">)</span><span·class="p">,</span><span·class="w">209 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-30">(</span><span·class="ss">table_name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-30">)</span><span·class="p">,</span><span·class="w">
210 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">delete_table</span><span·class="p"·data-group-id="2860892419-31">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TableName</span><span·class="p"·data-group-id="2860892419-31">)</span><span·class="p">,</span><span·class="w">210 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">delete_table</span><span·class="p"·data-group-id="2686980821-31">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TableName</span><span·class="p"·data-group-id="2686980821-31">)</span><span·class="p">,</span><span·class="w">
211 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">211 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
212 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">212 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
213 </span><span·class="c1">%%·Function:·all()·-&gt;·GroupsAndTestCases</span><span·class="w">213 </span><span·class="c1">%%·Function:·all()·-&gt;·GroupsAndTestCases</span><span·class="w">
214 </span><span·class="c1">%%</span><span·class="w">214 </span><span·class="c1">%%</span><span·class="w">
215 </span><span·class="c1">%%·GroupsAndTestCases·=·[{group,GroupName}·|·TestCase]</span><span·class="w">215 </span><span·class="c1">%%·GroupsAndTestCases·=·[{group,GroupName}·|·TestCase]</span><span·class="w">
216 </span><span·class="c1">%%·GroupName·=·atom()</span><span·class="w">216 </span><span·class="c1">%%·GroupName·=·atom()</span><span·class="w">
217 </span><span·class="c1">%%···Name·of·a·test·case·group.</span><span·class="w">217 </span><span·class="c1">%%···Name·of·a·test·case·group.</span><span·class="w">
218 </span><span·class="c1">%%·TestCase·=·atom()</span><span·class="w">218 </span><span·class="c1">%%·TestCase·=·atom()</span><span·class="w">
219 </span><span·class="c1">%%···Name·of·a·test·case.</span><span·class="w">219 </span><span·class="c1">%%···Name·of·a·test·case.</span><span·class="w">
220 </span><span·class="c1">%%</span><span·class="w">220 </span><span·class="c1">%%</span><span·class="w">
221 </span><span·class="c1">%%·Description:·Returns·the·list·of·groups·and·test·cases·that</span><span·class="w">221 </span><span·class="c1">%%·Description:·Returns·the·list·of·groups·and·test·cases·that</span><span·class="w">
222 </span><span·class="c1">%%··············are·to·be·executed.</span><span·class="w">222 </span><span·class="c1">%%··············are·to·be·executed.</span><span·class="w">
223 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">223 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
224 </span><span·class="nf">all</span><span·class="p"·data-group-id="2860892419-32">(</span><span·class="p"·data-group-id="2860892419-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 </span><span·class="nf">all</span><span·class="p"·data-group-id="2686980821-32">(</span><span·class="p"·data-group-id="2686980821-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 ····</span><span·class="p"·data-group-id="2860892419-33">[</span><span·class="ss">string</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">integer</span><span·class="p"·data-group-id="2860892419-33">]</span><span·class="p">.</span><span·class="w">225 ····</span><span·class="p"·data-group-id="2686980821-33">[</span><span·class="ss">string</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">integer</span><span·class="p"·data-group-id="2686980821-33">]</span><span·class="p">.</span><span·class="w">
  
  
226 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">226 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
227 </span><span·class="c1">%%·TEST·CASES</span><span·class="w">227 </span><span·class="c1">%%·TEST·CASES</span><span·class="w">
228 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">228 </span><span·class="c1">%%--------------------------------------------------------------------</span><span·class="w">
  
229 </span><span·class="nf">string</span><span·class="p"·data-group-id="2860892419-34">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">229 </span><span·class="nf">string</span><span·class="p"·data-group-id="2686980821-34">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
230 ····</span><span·class="nf">insert_and_lookup</span><span·class="p"·data-group-id="2860892419-35">(</span><span·class="ss">dummy_key</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Dummy·string&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·650e3e3e60662ca10e0bec439c5a6ebe9e7fc450940b4eeab2f201188c9f8b6e·...·]-35">)</span><span·class="p">.</span><span·class="w">230 ····</span><span·class="nf">insert_and_lookup</span><span·class="p"·data-group-id="2686980821-35">(</span><span·class="ss">dummy_key</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Dummy·string&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·797f2d2e2dc60d8bb678c37970ee25071c5f6c19ca7eb9c900d7dcac8a57eb9a·...·]-35">)</span><span·class="p">.</span><span·class="w">
  
231 </span><span·class="nf">integer</span><span·class="p"·data-group-id="2860892419-36">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 </span><span·class="nf">integer</span><span·class="p"·data-group-id="2686980821-36">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ····</span><span·class="nf">insert_and_lookup</span><span·class="p"·data-group-id="2860892419-37">(</span><span·class="ss">dummy_key</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-37">)</span><span·class="p">.</span><span·class="w">232 ····</span><span·class="nf">insert_and_lookup</span><span·class="p"·data-group-id="2686980821-37">(</span><span·class="ss">dummy_key</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-37">)</span><span·class="p">.</span><span·class="w">
  
  
233 </span><span·class="nf">insert_and_lookup</span><span·class="p"·data-group-id="2860892419-38">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">233 </span><span·class="nf">insert_and_lookup</span><span·class="p"·data-group-id="2686980821-38">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
234 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-39">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-39">)</span><span·class="p">,</span><span·class="w">234 ····</span><span·class="n">Ref</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-39">(</span><span·class="ss">con_ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-39">)</span><span·class="p">,</span><span·class="w">
235 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2860892419-40">(</span><span·class="ss">table_name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2860892419-40">)</span><span·class="p">,</span><span·class="w">235 ····</span><span·class="n">TableName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2686980821-40">(</span><span·class="ss">table_name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2686980821-40">)</span><span·class="p">,</span><span·class="w">
236 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="2860892419-41">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TableName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·63,·SHA:·8fca6c1fe4f857053b2ed026b22f8b0760f56736a092a39889d53596788529ff·...·]-41">)</span><span·class="p">,</span><span·class="w">236 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="2686980821-41">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TableName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·63,·SHA:·ac81b9e75d591634443b9723b809fed1659c3319e55be806035dc5191a28d099·...·]-41">)</span><span·class="p">,</span><span·class="w">
237 ····</span><span·class="p"·data-group-id="2860892419-42">[</span><span·class="n">Value</span><span·class="p"·data-group-id="2860892419-42">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">lookup</span>[·...·truncated·by·diffoscope;·len:·275,·SHA:·6dc83d7ebebb8887c488d86972247c08a119edd18dc24648e67bd1dc494afb25·...·]-43">)</span><span·class="p">,</span><span·class="w">237 ····</span><span·class="p"·data-group-id="2686980821-42">[</span><span·class="n">Value</span><span·class="p"·data-group-id="2686980821-42">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">db</span><span·class="p">:</span><span·class="nf">lookup</span>[·...·truncated·by·diffoscope;·len:·275,·SHA:·e38bb10199ab2aa14f8f9edf5b35b9791ef55dfa70a5429eab9543307ddaf6e8·...·]-43">)</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 42114/79284 bytes (53.12%) of diff not shown.
25.1 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/getting_started_chapter.html
    
Offset 165, 61 lines modifiedOffset 165, 61 lines modified
165 ··</a>165 ··</a>
166 ··<span·class="text">A·Simple·Test·Suite</span>166 ··<span·class="text">A·Simple·Test·Suite</span>
167 </h2>167 </h2>
168 <p>As·shown·in·section·<a·href="basics_chapter.html#External_Interfaces">Common·Test·Basics</a>,168 <p>As·shown·in·section·<a·href="basics_chapter.html#External_Interfaces">Common·Test·Basics</a>,
169 the·test·suite·module·implements·<a·href="ct_suite.html">callback·functions</a>·(mandatory169 the·test·suite·module·implements·<a·href="ct_suite.html">callback·functions</a>·(mandatory
170 or·optional)·for·various·purposes,·for·example:</p><ul><li>Init/end·configuration·function·for·the·test·suite</li><li>Init/end·configuration·function·for·a·test·case</li><li>Init/end·configuration·function·for·a·test·case·group</li><li>Test·cases</li></ul><p>The·configuration·functions·are·optional.·The·following·example·is·a·test·suite170 or·optional)·for·various·purposes,·for·example:</p><ul><li>Init/end·configuration·function·for·the·test·suite</li><li>Init/end·configuration·function·for·a·test·case</li><li>Init/end·configuration·function·for·a·test·case·group</li><li>Test·cases</li></ul><p>The·configuration·functions·are·optional.·The·following·example·is·a·test·suite
171 without·configuration·functions,·including·one·simple·test·case,·to·check·that171 without·configuration·functions,·including·one·simple·test·case,·to·check·that
172 module·<code·class="inline">mymod</code>·exists·(that·is,·can·be·successfully·loaded·by·the·code·server):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3444423398-1">(</span><span·class="ss">my1st_SUITE</span><span·class="p"·data-group-id="3444423398-1">)</span><span·class="p">.</span><span·class="w">172 module·<code·class="inline">mymod</code>·exists·(that·is,·can·be·successfully·loaded·by·the·code·server):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3114427869-1">(</span><span·class="ss">my1st_SUITE</span><span·class="p"·data-group-id="3114427869-1">)</span><span·class="p">.</span><span·class="w">
173 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="3444423398-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="3444423398-2">)</span><span·class="p">.</span><span·class="w">173 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="3114427869-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="3114427869-2">)</span><span·class="p">.</span><span·class="w">
  
174 </span><span·class="nf">all</span><span·class="p"·data-group-id="3444423398-3">(</span><span·class="p"·data-group-id="3444423398-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">174 </span><span·class="nf">all</span><span·class="p"·data-group-id="3114427869-3">(</span><span·class="p"·data-group-id="3114427869-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
175 ····</span><span·class="p"·data-group-id="3444423398-4">[</span><span·class="ss">mod_exists</span><span·class="p"·data-group-id="3444423398-4">]</span><span·class="p">.</span><span·class="w">175 ····</span><span·class="p"·data-group-id="3114427869-4">[</span><span·class="ss">mod_exists</span><span·class="p"·data-group-id="3114427869-4">]</span><span·class="p">.</span><span·class="w">
  
176 </span><span·class="nf">mod_exists</span><span·class="p"·data-group-id="3444423398-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="3444423398-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 </span><span·class="nf">mod_exists</span><span·class="p"·data-group-id="3114427869-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="3114427869-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ····</span><span·class="p"·data-group-id="3444423398-6">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">mymod</span><span·class="p"·data-group-id="3444423398-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span[·...·truncated·by·diffoscope;·len:·181,·SHA:·a5a201baba9e4f33fdc20e5f45b87b2e5a06ab6391775c5d69d3ea91e72e8e12·...·]-7">)</span><span·class="p">.</span></code></pre><p>If·the·operation·fails,·a·bad·match·error·occurs·that·terminates·the·test·case.</p><h2·id="a-test-suite-with-configuration-functions"·class="section-heading">177 ····</span><span·class="p"·data-group-id="3114427869-6">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">mymod</span><span·class="p"·data-group-id="3114427869-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span[·...·truncated·by·diffoscope;·len:·181,·SHA:·6b807865ddd9fb506e55d2f6e43b93547988719d1a99165174f76bf72434c4e7·...·]-7">)</span><span·class="p">.</span></code></pre><p>If·the·operation·fails,·a·bad·match·error·occurs·that·terminates·the·test·case.</p><h2·id="a-test-suite-with-configuration-functions"·class="section-heading">
178 ··<a·href="#a-test-suite-with-configuration-functions"·class="hover-link">178 ··<a·href="#a-test-suite-with-configuration-functions"·class="hover-link">
179 ····<i·class="ri-link-m"·aria-hidden="true"></i>179 ····<i·class="ri-link-m"·aria-hidden="true"></i>
180 ··</a>180 ··</a>
181 ··<span·class="text">A·Test·Suite·with·Configuration·Functions</span>181 ··<span·class="text">A·Test·Suite·with·Configuration·Functions</span>
182 </h2>182 </h2>
183 <p>If·you·need·to·perform·configuration·operations·to·run·your·test,·you·can183 <p>If·you·need·to·perform·configuration·operations·to·run·your·test,·you·can
184 implement·configuration·functions·in·your·suite.·The·result·from·a·configuration184 implement·configuration·functions·in·your·suite.·The·result·from·a·configuration
185 function·is·configuration·data,·or·<code·class="inline">Config</code>.·This·is·a·list·of·key-value·tuples185 function·is·configuration·data,·or·<code·class="inline">Config</code>.·This·is·a·list·of·key-value·tuples
186 that·get·passed·from·the·configuration·function·to·the·test·cases·(possibly186 that·get·passed·from·the·configuration·function·to·the·test·cases·(possibly
187 through·configuration·functions·on·&quot;lower·level&quot;).·The·data·flow·looks·as187 through·configuration·functions·on·&quot;lower·level&quot;).·The·data·flow·looks·as
188 follows:</p><p><img·src="assets/config.gif"·alt="Configuration·Data·Flow·in·a·Suite"·title="Configuration·Data·Flow·in·a·Suite"/></p><p>The·following·example·shows·a·test·suite·that·uses·configuration·functions·to188 follows:</p><p><img·src="assets/config.gif"·alt="Configuration·Data·Flow·in·a·Suite"·title="Configuration·Data·Flow·in·a·Suite"/></p><p>The·following·example·shows·a·test·suite·that·uses·configuration·functions·to
189 open·and·close·a·log·file·for·the·test·cases·(an·operation·that·is·unnecessary189 open·and·close·a·log·file·for·the·test·cases·(an·operation·that·is·unnecessary
190 and·irrelevant·to·perform·by·each·test·case):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2312631676-1">(</span><span·class="ss">check_log_SUITE</span><span·class="p"·data-group-id="2312631676-1">)</span><span·class="p">.</span><span·class="w">190 and·irrelevant·to·perform·by·each·test·case):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6471161719-1">(</span><span·class="ss">check_log_SUITE</span><span·class="p"·data-group-id="6471161719-1">)</span><span·class="p">.</span><span·class="w">
191 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2312631676-2">(</span><span·class="p"·data-group-id="2312631676-3">[</span><span·class="ss">all</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init_per_suite</span><span·class="p">/</[·...·truncated·by·diffoscope;·len:·258,·SHA:·16a7d9f527a0b034aba6288ab6df716490fbe2fbe2b1ab7fdac56c69c50ab245·...·]-2">)</span><span·class="p">.</span><span·class="w">191 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6471161719-2">(</span><span·class="p"·data-group-id="6471161719-3">[</span><span·class="ss">all</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init_per_suite</span><span·class="p">/</[·...·truncated·by·diffoscope;·len:·258,·SHA:·26d3cb280e4bd707db7882b9be7dc24b4a8d74e279cd91a40b72696f8656412b·...·]-2">)</span><span·class="p">.</span><span·class="w">
192 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2312631676-4">(</span><span·class="p"·data-group-id="2312631676-5">[</span><span·class="ss">check_restart_result</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">check_no_errors</span><[·...·truncated·by·diffoscope;·len:·142,·SHA:·a7c9e8d1068c47ea7e44f10ba55e678e4bffee3c1df3d7d5f3880673a82f15d9·...·]-4">)</span><span·class="p">.</span><span·class="w">192 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6471161719-4">(</span><span·class="p"·data-group-id="6471161719-5">[</span><span·class="ss">check_restart_result</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">check_no_errors</span><[·...·truncated·by·diffoscope;·len:·142,·SHA:·651326a1ec6d73c114a797553ed88d4d99c5e6450729f3853e550ee6ec992f9b·...·]-4">)</span><span·class="p">.</span><span·class="w">
193 </span><span·class="w">193 </span><span·class="w">
194 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2312631676-6">(</span><span·class="nf">value</span><span·class="p"·data-group-id="2312631676-7">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="n">Config</span><span·class="p"·data-group-id="2312631676-7">)</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·344,·SHA:·48740406f144681c2855e7b7e23c686b9978154a5d14d80e47199d41338b1684·...·]-6">)</span><span·class="p">.</span><span·class="w">194 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6471161719-6">(</span><span·class="nf">value</span><span·class="p"·data-group-id="6471161719-7">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="n">Config</span><span·class="p"·data-group-id="6471161719-7">)</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·344,·SHA:·dc14803866176941c65b506093260584696726dd384777cb8cb77fbdfadb1b44·...·]-6">)</span><span·class="p">.</span><span·class="w">
  
195 </span><span·class="nf">all</span><span·class="p"·data-group-id="2312631676-9">(</span><span·class="p"·data-group-id="2312631676-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2312631676-10">[</span><span·class="ss">check_restart_result</span><span·c[·...·truncated·by·diffoscope;·len:·121,·SHA:·a9baf02cc0f651d6fd932347719bf5620d58e9c8a316b1ab1892c4a6f2c85c45·...·]-10">]</span><span·class="p">.</span><span·class="w">195 </span><span·class="nf">all</span><span·class="p"·data-group-id="6471161719-9">(</span><span·class="p"·data-group-id="6471161719-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6471161719-10">[</span><span·class="ss">check_restart_result</span><span·c[·...·truncated·by·diffoscope;·len:·121,·SHA:·bfae43efb9de8d6a6c3f9bce17084bd89d9e22172a71f90a22cd500cee6ffd2f·...·]-10">]</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="2312631676-11">(</span><span·class="n">InitConfigData</span><span·class="p"·data-group-id="2312631676-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">196 </span><span·class="nf">init_per_suite</span><span·class="p"·data-group-id="6471161719-11">(</span><span·class="n">InitConfigData</span><span·class="p"·data-group-id="6471161719-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
197 ····</span><span·class="p"·data-group-id="2312631676-12">[</span><span·class="p"·data-group-id="2312631676-13">{</span><span·class="ss">logref</span><span·class="p">,</span><span·class="nf">open_log</span><span·class="p"·data-group-id="2312631676-14">(</span><span·class="p"·data-group-id="23126316[·...·truncated·by·diffoscope;·len:·219,·SHA:·b26b9f5f5a1521ca1b9baa53a3b39ec271e9298213f0cd9603bfacd2b7d14f51·...·]-12">]</span><span·class="p">.</span><span·class="w">197 ····</span><span·class="p"·data-group-id="6471161719-12">[</span><span·class="p"·data-group-id="6471161719-13">{</span><span·class="ss">logref</span><span·class="p">,</span><span·class="nf">open_log</span><span·class="p"·data-group-id="6471161719-14">(</span><span·class="p"·data-group-id="64711617[·...·truncated·by·diffoscope;·len:·219,·SHA:·c52cc5c1250edbbb1b7dfab82e093cc2cd5a8145a769f652f61f9011dc98e6aa·...·]-12">]</span><span·class="p">.</span><span·class="w">
  
198 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="2312631676-15">(</span><span·class="n">ConfigData</span><span·class="p"·data-group-id="2312631676-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 </span><span·class="nf">end_per_suite</span><span·class="p"·data-group-id="6471161719-15">(</span><span·class="n">ConfigData</span><span·class="p"·data-group-id="6471161719-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ····</span><span·class="nf">close_log</span><span·class="p"·data-group-id="2312631676-16">(</span><span·class="o">?</span><span·class="nf">value</span><span·class="p"·data-group-id="2312631676-17">(</span><span·class="ss">logref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConfigData</span><span·class="p"[·...·truncated·by·diffoscope;·len:·80,·SHA:·3f86c8d7257813fb4e15b02ef34ed74a03fbbcede57fd1d25969219158730959·...·]-16">)</span><span·class="p">.</span><span·class="w">199 ····</span><span·class="nf">close_log</span><span·class="p"·data-group-id="6471161719-16">(</span><span·class="o">?</span><span·class="nf">value</span><span·class="p"·data-group-id="6471161719-17">(</span><span·class="ss">logref</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConfigData</span><span·class="p"[·...·truncated·by·diffoscope;·len:·80,·SHA:·20b8dd2902b7ca58031c4209a109b37a21a08793422632e509fe70681239635d·...·]-16">)</span><span·class="p">.</span><span·class="w">
  
200 </span><span·class="nf">check_restart_result</span><span·class="p"·data-group-id="2312631676-18">(</span><span·class="n">ConfigData</span><span·class="p"·data-group-id="2312631676-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 </span><span·class="nf">check_restart_result</span><span·class="p"·data-group-id="6471161719-18">(</span><span·class="n">ConfigData</span><span·class="p"·data-group-id="6471161719-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ····</span><span·class="n">TestData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">read_log</span><span·class="p"·data-group-id="2312631676-19">(</span><span·class="ss">restart</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="nf">value</span><span·class="p"·data-group-id="2312631676-20">(</span><span·class="ss">logref</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·159,·SHA:·7867fe62e795100d2e40d3797d6ecb3e586c9ae9ef02de16c651562c58ffb37a·...·]-19">)</span><span·class="p">,</span><span·class="w">201 ····</span><span·class="n">TestData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">read_log</span><span·class="p"·data-group-id="6471161719-19">(</span><span·class="ss">restart</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="nf">value</span><span·class="p"·data-group-id="6471161719-20">(</span><span·class="ss">logref</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·159,·SHA:·97c43dfb58d1d709efb7f52100f5534872a7ae7baaf1b92402330f17dcb01676·...·]-19">)</span><span·class="p">,</span><span·class="w">
202 ····</span><span·class="p"·data-group-id="2312631676-21">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Line</span><span·class="p"·data-group-id="2312631676-21">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·258,·SHA:·0489d4073a3bf1f7f0701896ff43b41e1b8a0cb2a20cea9415470133b4eef54e·...·]-22">)</span><span·class="p">.</span><span·class="w">202 ····</span><span·class="p"·data-group-id="6471161719-21">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p">_</span><span·class="n">Line</span><span·class="p"·data-group-id="6471161719-21">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·258,·SHA:·ee44f0456edc4589491891de60c38a568297a3ebb6f0f5071aeace8bde2406ab·...·]-22">)</span><span·class="p">.</span><span·class="w">
  
203 </span><span·class="nf">check_no_errors</span><span·class="p"·data-group-id="2312631676-23">(</span><span·class="n">ConfigData</span><span·class="p"·data-group-id="2312631676-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 </span><span·class="nf">check_no_errors</span><span·class="p"·data-group-id="6471161719-23">(</span><span·class="n">ConfigData</span><span·class="p"·data-group-id="6471161719-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ····</span><span·class="n">TestData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">read_log</span><span·class="p"·data-group-id="2312631676-24">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="nf">value</span><span·class="p"·data-group-id="2312631676-25">(</span><span·class="ss">logref</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·155,·SHA:·73e5e70e36d5a8cfdde2a22aae3ac6d9b8f90031adeab1cc20cfd7078ab844d5·...·]-24">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="n">TestData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">read_log</span><span·class="p"·data-group-id="6471161719-24">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="nf">value</span><span·class="p"·data-group-id="6471161719-25">(</span><span·class="ss">logref</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·155,·SHA:·c83460a75cbcdbe9e79cf3dc8826c4c0e9be2be07c0cd4933ede63a16da5f4f2·...·]-24">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">search_for</span><span·class="p"·data-group-id="2312631676-26">(</span><span·class="s">&quot;error&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TestData</span><span·class="p"·data-group-id="2312631676-26">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">205 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">search_for</span><span·class="p"·data-group-id="6471161719-26">(</span><span·class="s">&quot;error&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TestData</span><span·class="p"·data-group-id="6471161719-26">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
206 ········</span><span·class="p"·data-group-id="2312631676-27">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="n">Line</span><span·class="p"·data-group-id="2312631676-27">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">ct</sp[·...·truncated·by·diffoscope;·len:·351,·SHA:·2b8a999c510b1cdaf8e4e8a8b5b625fcc379f0506a25a5a14fdfc215438f8359·...·]-28">)</span><span·class="p">;</span><span·class="w">206 ········</span><span·class="p"·data-group-id="6471161719-27">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="n">Line</span><span·class="p"·data-group-id="6471161719-27">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">ct</sp[·...·truncated·by·diffoscope;·len:·351,·SHA:·17496b69723ef4670f1303047761b1734e5daced58acff2e206e3a68194c45d7·...·]-28">)</span><span·class="p">;</span><span·class="w">
207 ········</span><span·class="ss">nomatch</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">207 ········</span><span·class="ss">nomatch</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">
208 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·test·cases·verify,·by·parsing·a·log·file,·that·our·SUT·has·performed·a208 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·test·cases·verify,·by·parsing·a·log·file,·that·our·SUT·has·performed·a
209 successful·restart·and·that·no·unexpected·errors·are·printed.</p><p>To·execute·the·test·cases·in·the·recent·test·suite,·type·the·following·on·the209 successful·restart·and·that·no·unexpected·errors·are·printed.</p><p>To·execute·the·test·cases·in·the·recent·test·suite,·type·the·following·on·the
210 UNIX/Linux·command·line·(assuming·that·the·suite·module·is·in·the·current210 UNIX/Linux·command·line·(assuming·that·the·suite·module·is·in·the·current
211 working·directory):</p><pre><code·class="text">$·ct_run·-dir·.</code></pre><p>or:</p><pre><code·class="text">$·ct_run·-suite·check_log_SUITE</code></pre><p>To·use·the·Erlang·shell·to·run·our·test,·you·can·evaluate·the·following·call:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="4079196412-1">(</span><span·class="p"·data-group-id="4079196412-2">[</span><span·class="p"·data-group-id="4079196412-3">{</span><span·class="ss">dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.&quot;</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·795,·SHA:·2d721ee9c4c15ab3f902e4c53fa6e9e338aad4c86630fa36cfe3dd9326fe3a31·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·result·from·running·the·test·is·printed·in·log·files·in·HTML·format·(stored211 working·directory):</p><pre><code·class="text">$·ct_run·-dir·.</code></pre><p>or:</p><pre><code·class="text">$·ct_run·-suite·check_log_SUITE</code></pre><p>To·use·the·Erlang·shell·to·run·our·test,·you·can·evaluate·the·following·call:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="2875310931-1">(</span><span·class="p"·data-group-id="2875310931-2">[</span><span·class="p"·data-group-id="2875310931-3">{</span><span·class="ss">dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.&quot;</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·795,·SHA:·d8a97f18f378c1be82e99b8295aa8fa0c51903f6badc4bb02729e20b4b139697·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·result·from·running·the·test·is·printed·in·log·files·in·HTML·format·(stored
212 in·unique·log·directories·on·a·different·level).·The·following·illustration212 in·unique·log·directories·on·a·different·level).·The·following·illustration
213 shows·the·log·file·structure:</p><p><img·src="assets/html_logs.gif"·alt="HTML·Log·File·Structure"·title="HTML·Log·File·Structure"/></p><h2·id="questions-and-answers"·class="section-heading">213 shows·the·log·file·structure:</p><p><img·src="assets/html_logs.gif"·alt="HTML·Log·File·Structure"·title="HTML·Log·File·Structure"/></p><h2·id="questions-and-answers"·class="section-heading">
214 ··<a·href="#questions-and-answers"·class="hover-link">214 ··<a·href="#questions-and-answers"·class="hover-link">
215 ····<i·class="ri-link-m"·aria-hidden="true"></i>215 ····<i·class="ri-link-m"·aria-hidden="true"></i>
216 ··</a>216 ··</a>
217 ··<span·class="text">Questions·and·Answers</span>217 ··<span·class="text">Questions·and·Answers</span>
218 </h2>218 </h2>
199 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/run_test_chapter.html
    
Offset 275, 15 lines modifiedOffset 275, 15 lines modified
275 ··<a·href="#test-case-group-execution"·class="hover-link">275 ··<a·href="#test-case-group-execution"·class="hover-link">
276 ····<i·class="ri-link-m"·aria-hidden="true"></i>276 ····<i·class="ri-link-m"·aria-hidden="true"></i>
277 ··</a>277 ··</a>
278 ··<span·class="text">Test·Case·Group·Execution</span>278 ··<span·class="text">Test·Case·Group·Execution</span>
279 </h2>279 </h2>
280 <p>With·the·<code·class="inline">ct_run</code>·flag,·or·<a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>·option·<code·class="inline">group</code>,·one·or·more·test·case280 <p>With·the·<code·class="inline">ct_run</code>·flag,·or·<a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>·option·<code·class="inline">group</code>,·one·or·more·test·case
281 groups·can·be·specified,·optionally·in·combination·with·specific·test·cases.·The281 groups·can·be·specified,·optionally·in·combination·with·specific·test·cases.·The
282 syntax·for·specifying·groups·on·the·command·line·is·as·follows:</p><pre><code·class="text">$·ct_run·-group·&lt;group_names_or_paths&gt;·[-case·&lt;cases&gt;]</code></pre><p>The·syntax·in·the·Erlang·shell·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="1236999458-1">(</span><span·class="p"·data-group-id="1236999458-2">[</span><span·class="p"·data-group-id="1236999458-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="n">GroupsNamesOrPaths</span><span·class="p"·data-group-id="123[·...·truncated·by·diffoscope;·len:·346,·SHA:·5f4b2cf28d17e38ff85aa5d1d297ec2cd2855eafc880cc39789c4af53b45f6e2·...·]-1">)</span><span·class="p">.</span></code></pre><p>Parameter·<code·class="inline">group_names_or_paths</code>·specifies·one·or·more·group·names·and/or·one·or282 syntax·for·specifying·groups·on·the·command·line·is·as·follows:</p><pre><code·class="text">$·ct_run·-group·&lt;group_names_or_paths&gt;·[-case·&lt;cases&gt;]</code></pre><p>The·syntax·in·the·Erlang·shell·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="8950167366-1">(</span><span·class="p"·data-group-id="8950167366-2">[</span><span·class="p"·data-group-id="8950167366-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="n">GroupsNamesOrPaths</span><span·class="p"·data-group-id="895[·...·truncated·by·diffoscope;·len:·346,·SHA:·c2b8f3b17e05c2be120dacdff046d2e1777acf3c323cba897fe20f3f1dba457a·...·]-1">)</span><span·class="p">.</span></code></pre><p>Parameter·<code·class="inline">group_names_or_paths</code>·specifies·one·or·more·group·names·and/or·one·or
283 more·group·paths.·At·startup,·<code·class="inline">Common·Test</code>·searches·for·matching·groups·in·the283 more·group·paths.·At·startup,·<code·class="inline">Common·Test</code>·searches·for·matching·groups·in·the
284 group·definitions·tree·(that·is,·the·list·returned·from·<code·class="inline">Suite:groups/0</code>;·for284 group·definitions·tree·(that·is,·the·list·returned·from·<code·class="inline">Suite:groups/0</code>;·for
285 details,·see·section·<a·href="write_test_chapter.html#test_case_groups">Test·Case·Groups</a>.</p><p>Given·a·group·name,·say·<code·class="inline">g</code>,·<code·class="inline">Common·Test</code>·searches·for·all·paths·leading·to285 details,·see·section·<a·href="write_test_chapter.html#test_case_groups">Test·Case·Groups</a>.</p><p>Given·a·group·name,·say·<code·class="inline">g</code>,·<code·class="inline">Common·Test</code>·searches·for·all·paths·leading·to
286 <code·class="inline">g</code>.·By·path·is·meant·a·sequence·of·nested·groups,·which·must·be·followed·to·get286 <code·class="inline">g</code>.·By·path·is·meant·a·sequence·of·nested·groups,·which·must·be·followed·to·get
287 from·the·top-level·group·to·<code·class="inline">g</code>.·To·execute·the·test·cases·in·group·<code·class="inline">g</code>,287 from·the·top-level·group·to·<code·class="inline">g</code>.·To·execute·the·test·cases·in·group·<code·class="inline">g</code>,
288 <code·class="inline">Common·Test</code>·must·call·the·<code·class="inline">init_per_group/2</code>·function·for·each·group·in·the288 <code·class="inline">Common·Test</code>·must·call·the·<code·class="inline">init_per_group/2</code>·function·for·each·group·in·the
289 path·to·<code·class="inline">g</code>,·and·all·corresponding·<code·class="inline">end_per_group/2</code>·functions·afterwards.·This289 path·to·<code·class="inline">g</code>,·and·all·corresponding·<code·class="inline">end_per_group/2</code>·functions·afterwards.·This
Offset 307, 38 lines modifiedOffset 307, 38 lines modified
307 all·<code·class="inline">init</code>·configuration·functions·in·the·path·to·<code·class="inline">g4</code>,·that·is,·<code·class="inline">g1..g3..g4</code>.307 all·<code·class="inline">init</code>·configuration·functions·in·the·path·to·<code·class="inline">g4</code>,·that·is,·<code·class="inline">g1..g3..g4</code>.
308 It·then·calls·test·cases·<code·class="inline">tc1</code>·and·<code·class="inline">tc5</code>·in·<code·class="inline">g4</code>,·and·finally·all·<code·class="inline">end</code>308 It·then·calls·test·cases·<code·class="inline">tc1</code>·and·<code·class="inline">tc5</code>·in·<code·class="inline">g4</code>,·and·finally·all·<code·class="inline">end</code>
309 configuration·functions·in·order·<code·class="inline">g4..g3..g1</code>.</p><blockquote><h4·class="info">Note</h4><p>The·group·path·specification·does·not·necessarily·have·to·include·<em>all</em>·groups309 configuration·functions·in·order·<code·class="inline">g4..g3..g1</code>.</p><blockquote><h4·class="info">Note</h4><p>The·group·path·specification·does·not·necessarily·have·to·include·<em>all</em>·groups
310 in·the·path·to·the·terminating·group.·<code·class="inline">Common·Test</code>·searches·for·all·matching310 in·the·path·to·the·terminating·group.·<code·class="inline">Common·Test</code>·searches·for·all·matching
311 paths·if·an·incomplete·group·path·is·specified.</p></blockquote><blockquote><h4·class="info">Note</h4><p>Group·names·and·group·paths·can·be·combined·with·parameter311 paths·if·an·incomplete·group·path·is·specified.</p></blockquote><blockquote><h4·class="info">Note</h4><p>Group·names·and·group·paths·can·be·combined·with·parameter
312 <code·class="inline">group_names_or_paths</code>.·Each·element·is·treated·as·an·individual·specification312 <code·class="inline">group_names_or_paths</code>.·Each·element·is·treated·as·an·individual·specification
313 in·combination·with·parameter·<code·class="inline">cases</code>.·The·following·examples·illustrates313 in·combination·with·parameter·<code·class="inline">cases</code>.·The·following·examples·illustrates
314 this.</p></blockquote><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3044643380-1">(</span><span·class="ss">x_SUITE</span><span·class="p"·data-group-id="3044643380-1">)</span><span·class="p">.</span><span·class="w">314 this.</p></blockquote><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1072133129-1">(</span><span·class="ss">x_SUITE</span><span·class="p"·data-group-id="1072133129-1">)</span><span·class="p">.</span><span·class="w">
315 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">315 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
316 </span><span·class="c1">%%·The·group·definitions:</span><span·class="w">316 </span><span·class="c1">%%·The·group·definitions:</span><span·class="w">
317 </span><span·class="nf">groups</span><span·class="p"·data-group-id="3044643380-2">(</span><span·class="p"·data-group-id="3044643380-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">317 </span><span·class="nf">groups</span><span·class="p"·data-group-id="1072133129-2">(</span><span·class="p"·data-group-id="1072133129-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
318 ··</span><span·class="p"·data-group-id="3044643380-3">[</span><span·class="p"·data-group-id="3044643380-4">{</span><span·class="ss">top1</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-5">[</span><span·class="p"·data-group-id="3044643380-5">]</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·fb158aee16b1a7f4ceb34bbb809f277ac09d0489c82706d52461d57c1befd60c·...·]-6">[</span><span·class="ss">tc11</span><span·class="p">,</span><span·class="ss">tc12</span><span·class="p">,</span><span·class="w">318 ··</span><span·class="p"·data-group-id="1072133129-3">[</span><span·class="p"·data-group-id="1072133129-4">{</span><span·class="ss">top1</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-5">[</span><span·class="p"·data-group-id="1072133129-5">]</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·635d0f408936f10aef715a315c7ceb9ea357766ce3ee8eb8ae2a5516b5e8ed2d·...·]-6">[</span><span·class="ss">tc11</span><span·class="p">,</span><span·class="ss">tc12</span><span·class="p">,</span><span·class="w">
319 ·············</span><span·class="p"·data-group-id="3044643380-7">{</span><span·class="ss">sub11</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-8">[</span><span·class="p"·data-group-id="3044643380-8">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-9">[</spa[·...·truncated·by·diffoscope;·len:·176,·SHA:·96c696c83d5027f3ba3177c014031e7b51a5ed58ff49d2b4eb63ef7b85150821·...·]-7">}</span><span·class="p">,</span><span·class="w">319 ·············</span><span·class="p"·data-group-id="1072133129-7">{</span><span·class="ss">sub11</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-8">[</span><span·class="p"·data-group-id="1072133129-8">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-9">[</spa[·...·truncated·by·diffoscope;·len:·176,·SHA:·812c7c9448a329025bc86f614073c5b9700c9cfe7b80449f5c7aea5b2b256245·...·]-7">}</span><span·class="p">,</span><span·class="w">
320 ·············</span><span·class="p"·data-group-id="3044643380-10">{</span><span·class="ss">sub12</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-11">[</span><span·class="p"·data-group-id="3044643380-11">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-12">[</span><span·class="ss">tc14</span><span·class="p">,</span><span·class="ss">tc15</span><span·class="p">,</span><span·class="w">320 ·············</span><span·class="p"·data-group-id="1072133129-10">{</span><span·class="ss">sub12</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-11">[</span><span·class="p"·data-group-id="1072133129-11">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-12">[</span><span·class="ss">tc14</span><span·class="p">,</span><span·class="ss">tc15</span><span·class="p">,</span><span·class="w">
321 ·······»       »       ·</span><span·class="p"·data-group-id="3044643380-13">{</span><span·class="ss">sub121</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-14">[</span><span·class="p"·data-group-id="3044643380-14">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-15">[[·...·truncated·by·diffoscope;·len:·397,·SHA:·bf13fa7af6f98502d54d0fdce9f844d08b8409da5c8b6b5945198cfed8b93072·...·]-4">}</span><span·class="p">,</span><span·class="w">321 ·······»       »       ·</span><span·class="p"·data-group-id="1072133129-13">{</span><span·class="ss">sub121</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-14">[</span><span·class="p"·data-group-id="1072133129-14">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-15">[[·...·truncated·by·diffoscope;·len:·397,·SHA:·962dd5d7442e930ecc0de9a96f1a06b8c45a1e508b32e3630387526c30dea9c9·...·]-4">}</span><span·class="p">,</span><span·class="w">
  
322 ···</span><span·class="p"·data-group-id="3044643380-16">{</span><span·class="ss">top2</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-17">[</span><span·class="p"·data-group-id="3044643380-17">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-18">[</span><span·class="p"·data-group-id="3044643380-19">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">sub21</span><span·class="p"·data-group-id="3044643380-19">}</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-20">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">sub22</span><span·class="p"·data-group-id="3044643380-20">}</span><span·class="p"·data-group-id="3044643380-18">]</span><span·class="p"·data-group-id="3044643380-16">}</span><span·class="p">,</span><span·class="w"> 
323 ···</span><span·class="p"·data-group-id="3044643380-21">{</span><span·class="ss">sub21</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-22">[</span><span·class="p"·data-group-id="3044643380-22">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-23">[</span><span·class="ss">tc21</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-24">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">sub2X2</span><span·class="p"·data-group-id="3044643380-24">}</span><span·class="p"·data-group-id="3044643380-23">]</span><span·class="p"·data-group-id="3044643380-21">}</span><span·class="p">,</span><span·class="w"> 
324 ···</span><span·class="p"·data-group-id="3044643380-25">{</span><span·class="ss">sub22</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-26">[</span><span·class="p"·data-group-id="3044643380-26">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-27">[<[·...·truncated·by·diffoscope;·len:·614,·SHA:·93de105b396746070bc250743d30b3a36a88ff4572adaef7bdd837bd6ccfda8c·...·]">}</span><span·class="p">,</span><span·class="w">322 ···</span><span·class="p"·data-group-id="1072133129-16">{</span><span·class="ss">top2</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-17">[</span><span·class="p"·data-group-id="1072133129-17">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-18">[</[·...·truncated·by·diffoscope;·len:·507,·SHA:·5d5d68d77460cb284777c4377740a0d313486e473f5bbc8515df16ac2e7aa290·...·]">}</span><span·class="p">,</span><span·class="w">
 323 ···</span><span·class="p"·data-group-id="1072133129-21">{</span><span·class="ss">sub21</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-22">[</span><span·class="p"·data-group-id="1072133129-22">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-23">[</span><span·class="ss">tc21</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-24">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">sub2X2</span><span·class="p"·data-group-id="1072133129-24">}</span><span·class="p"·data-group-id="1072133129-23">]</span><span·class="p"·data-group-id="1072133129-21">}</span><span·class="p">,</span><span·class="w">
 324 ···</span><span·class="p"·data-group-id="1072133129-25">{</span><span·class="ss">sub22</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-26">[</span><span·class="p"·data-group-id="1072133129-26">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-27">[</span><span·class="p"·data-group-id="1072133129-28">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">sub221</span><span·class="p"·data-group-id="1072133129-28">}</span><span·class="p">,</span><span·class="ss">tc21</span><span·class="p">,</span><span·class="ss">tc22</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-29">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">sub2X2</span><span·class="p"·data-group-id="1072133129-29">}</span><span·class="p"·data-group-id="1072133129-27">]</span><span·class="p"·data-group-id="1072133129-25">}</span><span·class="p">,</span><span·class="w">
325 ···</span><span·class="p"·data-group-id="3044643380-30">{</span><span·class="ss">sub221</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-31">[</span><span·class="p"·data-group-id="3044643380-31">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-32">[[·...·truncated·by·diffoscope;·len:·182,·SHA:·27d53906aea2f7684e91ededf9fc5b6a05c3c9eb06adaf27482a45c131dd27a2·...·]-30">}</span><span·class="p">,</span><span·class="w">325 ···</span><span·class="p"·data-group-id="1072133129-30">{</span><span·class="ss">sub221</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-31">[</span><span·class="p"·data-group-id="1072133129-31">]</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-32">[[·...·truncated·by·diffoscope;·len:·182,·SHA:·ba783099fb1cec930d21784588a5004ed3a8663b31462ea74a56debfbba6d4d2·...·]-30">}</span><span·class="p">,</span><span·class="w">
326 ···</span><span·class="p"·data-group-id="3044643380-33">{</span><span·class="ss">sub2X2</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-34">[</span><span·class="p"·data-group-id="3044643380-34">]</span><span·class="p">,</span><span·class="p"·data-group-id="3044643380-35">[</span><span·class="ss">tc21</span><span·class="p">,</span><span·class="ss">tc24</span><span·class="p"·data-group-id="3044643380-35">]</span><span·class="p"·data-group-id="3044643380-33">}</span><span·class="p"·data-group-id="3044643380-3">]</span><span·class="p">.</span></code></pre><p>The·following·executes·two·tests,·one·for·all·cases·and·all·subgroups·under 
327 <code·class="inline">top1</code>,·and·one·for·all·under·<code·class="inline">top2</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·all</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="5581007876-1">(</span><span·class="p"·data-group-id="5581007876-2">[</span><span·class="p"·data-group-id="5581007876-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="5581007876-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5581007876-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">all</span><span·class="p"·data-group-id="5581007876-4">}</span><span·class="p"·data-group-id="5581007876-2">]</span><span·class="p"·data-group-id="5581007876-1">)</span><span·class="p">.</span></code></pre><p>Using·<code·class="inline">-group·top1·top2</code>,·or·<code·class="inline">{group,[top1,top2]}</code>·gives·the·same·result.</p><p>The·following·executes·one·test·for·all·cases·and·subgroups·under·<code·class="inline">top1</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·top1</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="0721088471-1">(</span><span·class="p"·data-group-id="0721088471-2">[</span><span·class="p"·data-group-id="0721088471-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="0721088471-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0721088471-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="0721088471-5">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="0721088471-5">]</span><span·class="p"·data-group-id="0721088471-4">}</span><span·class="p"·data-group-id="0721088471-2">]</span><span·class="p"·data-group-id="0721088471-1">)</span><span·class="p">.</span></code></pre><p>The·following·runs·a·test·executing·<code·class="inline">tc12</code>·in·<code·class="inline">top1</code>·and·any·subgroup·under 
328 <code·class="inline">top1</code>·where·it·can·be·found·(<code·class="inline">sub11</code>·and·<code·class="inline">sub121</code>):</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·top1·-case·tc12</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="7220775490-1">(</span><span·class="p"·data-group-id="7220775490-2">[</span><span·class="p"·data-group-id="7220775490-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="7220775490-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7220775490-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="7220775490-5">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="7220775490-5">]</span><span·class="p"·data-group-id="7220775490-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7220775490-6">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="p"·data-group-id="7220775490-7">[</span><span·class="ss">tc12</span><span·class="p"·data-group-id="7220775490-7">]</span><span·class="p"·data-group-id="7220775490-6">}</span><span·class="p"·data-group-id="7220775490-2">]</span><span·class="p"·data-group-id="7220775490-1">)</span><span·class="p">.</span></code></pre><p>The·following·executes·<code·class="inline">tc12</code>·<em>only</em>·in·group·<code·class="inline">top1</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·[top1]·-case·tc12</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="3851226750-1">(</span><span·class="p"·data-group-id="3851226750-2">[</span><span·class="p"·data-group-id="3851226750-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="3851226750-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3851226750-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="3851226750-5">[</span><span·class="p"·data-group-id="3851226750-6">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="3851226750-6">]</span><span·class="p"·data-group-id="3851226750-5">]</span><span·class="p"·data-group-id="3851226750-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3851226750-7">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="p"·data-group-id="3851226750-8">[</span><span·class="ss">tc12</span><span·class="p"·data-group-id="3851226750-8">]</span><span·class="p"·data-group-id="3851226750-7">}</span><span·class="p"·data-group-id="3851226750-2">]</span><span·class="p"·data-group-id="3851226750-1">)</span><span·class="p">.</span></code></pre><p>The·following·searches·<code·class="inline">top1</code>·and·all·its·subgroups·for·<code·class="inline">tc16</code>·resulting·in·that 
329 this·test·case·executes·in·group·<code·class="inline">sub121</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·top1·-case·tc16</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</spa[·...·truncated·by·diffoscope;·len:·1354,·SHA:·31549dc9df4aa976b161cb1bbbbf1691c70bf82632a6217fa6009fcf0ad08cc2·...·]326 ···</span><span·class="p"·data-group-id="1072133129-33">{</span><span·class="ss">sub2X2</span><span·class="p">,</span><span·class="p"·data-group-id="1072133129-34">[</span><span·class="p"·data-group-id="1072133129-34">]</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·404,·SHA:·64bf45db5529ac2cd2572544de34a18c89e50e6ac1f05bc0e3018a505ea0472b·...·]
 327 <code·class="inline">top1</code>,·and·one·for·all·under·<code·class="inline">top2</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·all</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="6918243268-1">(</span><span·class="p"·data-group-id="6918243268-2">[</span><span·class="p"·data-group-id="6918243268-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="6918243268-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6918243268-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="ss">all</span><span·class="p"·data-group-id="6918243268-4">}</span><span·class="p"·data-group-id="6918243268-2">]</span><span·class="p"·data-group-id="6918243268-1">)</span><span·class="p">.</span></code></pre><p>Using·<code·class="inline">-group·top1·top2</code>,·or·<code·class="inline">{group,[top1,top2]}</code>·gives·the·same·result.</p><p>The·following·executes·one·test·for·all·cases·and·subgroups·under·<code·class="inline">top1</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·top1</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="7431464389-1">(</span><span·class="p"·data-group-id="7431464389-2">[</span><span·class="p"·data-group-id="7431464389-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="7431464389-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7431464389-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="7431464389-5">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="7431464389-5">]</span><span·class="p"·data-group-id="7431464389-4">}</span><span·class="p"·data-group-id="7431464389-2">]</span><span·class="p"·data-group-id="7431464389-1">)</span><span·class="p">.</span></code></pre><p>The·following·runs·a·test·executing·<code·class="inline">tc12</code>·in·<code·class="inline">top1</code>·and·any·subgroup·under
 328 <code·class="inline">top1</code>·where·it·can·be·found·(<code·class="inline">sub11</code>·and·<code·class="inline">sub121</code>):</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·top1·-case·tc12</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="9457110182-1">(</span><span·class="p"·data-group-id="9457110182-2">[</span><span·class="p"·data-group-id="9457110182-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="9457110182-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9457110182-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="9457110182-5">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="9457110182-5">]</span><span·class="p"·data-group-id="9457110182-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9457110182-6">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="p"·data-group-id="9457110182-7">[</span><span·class="ss">tc12</span><span·class="p"·data-group-id="9457110182-7">]</span><span·class="p"·data-group-id="9457110182-6">}</span><span·class="p"·data-group-id="9457110182-2">]</span><span·class="p"·data-group-id="9457110182-1">)</span><span·class="p">.</span></code></pre><p>The·following·executes·<code·class="inline">tc12</code>·<em>only</em>·in·group·<code·class="inline">top1</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·[top1]·-case·tc12</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="4545616439-1">(</span><span·class="p"·data-group-id="4545616439-2">[</span><span·class="p"·data-group-id="4545616439-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="4545616439-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4545616439-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="4545616439-5">[</span><span·class="p"·data-group-id="4545616439-6">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="4545616439-6">]</span><span·class="p"·data-group-id="4545616439-5">]</span><span·class="p"·data-group-id="4545616439-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4545616439-7">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="p"·data-group-id="4545616439-8">[</span><span·class="ss">tc12</span><span·class="p"·data-group-id="4545616439-8">]</span><span·class="p"·data-group-id="4545616439-7">}</span><span·class="p"·data-group-id="4545616439-2">]</span><span·class="p"·data-group-id="4545616439-1">)</span><span·class="p">.</span></code></pre><p>The·following·searches·<code·class="inline">top1</code>·and·all·its·subgroups·for·<code·class="inline">tc16</code>·resulting·in·that
 329 this·test·case·executes·in·group·<code·class="inline">sub121</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·top1·-case·tc16</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="6660018768-1">(</span><span·class="p"·data-group-id="6660018768-2">[</span><span·class="p"·data-group-id="6660018768-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="6660018768-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6660018768-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="6660018768-5">[</span><span·class="ss">top1</span><span·class="p"·data-group-id="6660018768-5">]</span><span·class="p"·data-group-id="6660018768-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6660018768-6">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="p"·data-group-id="6660018768-7">[</span><span·class="ss">tc16</span><span·class="p"·data-group-id="6660018768-7">]</span><span·class="p"·data-group-id="6660018768-6">}</span><span·class="p"·data-group-id="6660018768-2">]</span><span·class="p"·data-group-id="6660018768-1">)</span><span·class="p">.</span></code></pre><p>Using·the·specific·path·<code·class="inline">-group·[sub121]</code>·or·<code·class="inline">{group,[[sub121]]}</code>·gives·the·same
330 result·in·this·example.</p><p>The·following·executes·two·tests,·one·including·all·cases·and·subgroups·under330 result·in·this·example.</p><p>The·following·executes·two·tests,·one·including·all·cases·and·subgroups·under
331 <code·class="inline">sub12</code>,·and·one·with·<em>only</em>·the·test·cases·in·<code·class="inline">sub12</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·sub12·[sub12]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="5329401711-1">(</span><span·class="p"·data-group-id="5329401711-2">[</span><span·class="p"·data-group-id="5329401711-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="53[·...·truncated·by·diffoscope;·len:·615,·SHA:·1624a314a252dcc13de5a6334d752491c0f8b4df8aa33ce8dfff72ce5adfa50a·...·]-1">)</span><span·class="p">.</span></code></pre><p>In·the·following·example,·<code·class="inline">Common·Test</code>·finds·and·executes·two·tests,·one·for331 <code·class="inline">sub12</code>,·and·one·with·<em>only</em>·the·test·cases·in·<code·class="inline">sub12</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·sub12·[sub12]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="4028104926-1">(</span><span·class="p"·data-group-id="4028104926-2">[</span><span·class="p"·data-group-id="4028104926-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="40[·...·truncated·by·diffoscope;·len:·615,·SHA:·9cab11bc32590685157ce1f39bef1802f7e116dae39df89f4f7f290c1ab20016·...·]-1">)</span><span·class="p">.</span></code></pre><p>In·the·following·example,·<code·class="inline">Common·Test</code>·finds·and·executes·two·tests,·one·for
332 the·path·from·<code·class="inline">top2</code>·to·<code·class="inline">sub2X2</code>·through·<code·class="inline">sub21</code>,·and·one·from·<code·class="inline">top2</code>·to332 the·path·from·<code·class="inline">top2</code>·to·<code·class="inline">sub2X2</code>·through·<code·class="inline">sub21</code>,·and·one·from·<code·class="inline">top2</code>·to
333 <code·class="inline">sub2X2</code>·through·<code·class="inline">sub22</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·sub2X2</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="4114071378-1">(</span><span·class="p"·data-group-id="4114071378-2">[</span><span·class="p"·data-group-id="4114071378-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="41[·...·truncated·by·diffoscope;·len:·457,·SHA:·cd2e599665f24cb9e9db632d5f44351c3e18ea425e3bd2bc93d865a4a94a4c41·...·]-1">)</span><span·class="p">.</span></code></pre><p>In·the·following·example,·by·specifying·the·unique·path333 <code·class="inline">sub2X2</code>·through·<code·class="inline">sub22</code>:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·sub2X2</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="7989916619-1">(</span><span·class="p"·data-group-id="7989916619-2">[</span><span·class="p"·data-group-id="7989916619-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="79[·...·truncated·by·diffoscope;·len:·457,·SHA:·6f633805a2009be6dedf25f6585674563a2cef8c86af09a226046e4a2e402061·...·]-1">)</span><span·class="p">.</span></code></pre><p>In·the·following·example,·by·specifying·the·unique·path
334 <code·class="inline">top2·-&gt;·sub21·-&gt;·sub2X2</code>,·only·one·test·is·executed.·The·second·possible·path,334 <code·class="inline">top2·-&gt;·sub21·-&gt;·sub2X2</code>,·only·one·test·is·executed.·The·second·possible·path,
335 from·<code·class="inline">top2</code>·to·<code·class="inline">sub2X2</code>·(from·the·former·example)·is·discarded:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·[sub21,sub2X2]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="3385082018-1">(</span><span·class="p"·data-group-id="3385082018-2">[</span><span·class="p"·data-group-id="3385082018-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="3385082018-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3385082018-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="3385082018-5">[</span><span·class="p"·data-group-id="3385082018-6">[</span><span·class="ss">sub21</span><span·class="p">,</span><span·class="ss">sub2X2</span><span·class="p"·data-group-id="3385082018-6">]</span><span·class="p"·data-group-id="3385082018-5">]</span><span·class="p"·data-group-id="3385082018-4">}</span><span·class="p"·data-group-id="3385082018-2">]</span><span·class="p"·data-group-id="3385082018-1">)</span><span·class="p">.</span></code></pre><p>The·following·executes·only·the·test·cases·for·<code·class="inline">sub22</code>·and·in·reverse·order 
336 compared·to·the·group·definition:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·[sub22]·-case·tc22·tc21</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span[·...·truncated·by·diffoscope;·len:·1428,·SHA:·c99af0e58013db51dda0c3cbf0f9173e93ac6043a6cbdd5c1440e25a077f4320·...·]335 from·<code·class="inline">top2</code>·to·<code·class="inline">sub2X2</code>·(from·the·former·example)·is·discarded:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·[sub21,sub2X2]</code></pre><pre><code·class="makeup·erlang"·translate=[·...·truncated·by·diffoscope;·len:·1186,·SHA:·7c12134a1fbab22ff222f7a26c487140256b348e30dac5f830f9cc54c51d9eff·...·]
 336 compared·to·the·group·definition:</p><pre><code·class="text">$·ct_run·-suite·&quot;x_SUITE&quot;·-group·[sub22]·-case·tc22·tc21</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">run_test</span><span·class="p"·data-group-id="1324121574-1">(</span><span·class="p"·data-group-id="1324121574-2">[</span><span·class="p"·data-group-id="1324121574-3">{</span><span·class="ss">suite</span><span·class="p">,</span><span·class="s">&quot;x_SUITE&quot;</span><span·class="p"·data-group-id="1324121574-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1324121574-4">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="p"·data-group-id="1324121574-5">[</span><span·class="p"·data-group-id="1324121574-6">[</span><span·class="ss">sub22</span><span·class="p"·data-group-id="1324121574-6">]</span><span·class="p"·data-group-id="1324121574-5">]</span><span·class="p"·data-group-id="1324121574-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1324121574-7">{</span><span·class="ss">testcase</span><span·class="p">,</span><span·class="p"·data-group-id="1324121574-8">[</span><span·class="ss">tc22</span><span·class="p">,</span><span·class="ss">tc21</span><span·class="p"·data-group-id="1324121574-8">]</span><span·class="p"·data-group-id="1324121574-7">}</span><span·class="p"·data-group-id="1324121574-2">]</span><span·class="p"·data-group-id="1324121574-1">)</span><span·class="p">.</span></code></pre><p>If·a·test·case·belonging·to·a·group·(according·to·the·group·definition)·is
337 executed·without·a·group·specification,·that·is,·simply·by·(using·the·command337 executed·without·a·group·specification,·that·is,·simply·by·(using·the·command
338 line):</p><p><code·class="inline">$·ct_run·-suite·&quot;my_SUITE&quot;·-case·my_tc</code></p><p>or·(using·the·Erlang·shell):</p><p><code·class="inline">1&gt;·ct:run_test([{suite,&quot;my_SUITE&quot;},·{testcase,my_tc}]).</code></p><p>then·<code·class="inline">Common·Test</code>·ignores·the·group·definition·and·executes·the·test·case·in338 line):</p><p><code·class="inline">$·ct_run·-suite·&quot;my_SUITE&quot;·-case·my_tc</code></p><p>or·(using·the·Erlang·shell):</p><p><code·class="inline">1&gt;·ct:run_test([{suite,&quot;my_SUITE&quot;},·{testcase,my_tc}]).</code></p><p>then·<code·class="inline">Common·Test</code>·ignores·the·group·definition·and·executes·the·test·case·in
339 the·scope·of·the·test·suite·only·(no·group·configuration·functions·are·called).</p><p>The·group·specification·feature,·as·presented·in·this·section,·can·also·be·used339 the·scope·of·the·test·suite·only·(no·group·configuration·functions·are·called).</p><p>The·group·specification·feature,·as·presented·in·this·section,·can·also·be·used
340 in·<a·href="run_test_chapter.html#test_specifications">Test·Specifications</a>·(with·some340 in·<a·href="run_test_chapter.html#test_specifications">Test·Specifications</a>·(with·some
341 extra·features·added).</p><h2·id="running-the-interactive-shell-mode"·class="section-heading">341 extra·features·added).</p><h2·id="running-the-interactive-shell-mode"·class="section-heading">
342 ··<a·href="#running-the-interactive-shell-mode"·class="hover-link">342 ··<a·href="#running-the-interactive-shell-mode"·class="hover-link">
343 ····<i·class="ri-link-m"·aria-hidden="true"></i>343 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 358, 20 lines modifiedOffset 358, 20 lines modified
358 displayed.·If·<code·class="inline">Common·Test</code>·has·been·run·from·the·same·directory·earlier,·the358 displayed.·If·<code·class="inline">Common·Test</code>·has·been·run·from·the·same·directory·earlier,·the
359 same·configuration·file(s)·are·used·again.·If·<code·class="inline">Common·Test</code>·has·not·been·run359 same·configuration·file(s)·are·used·again.·If·<code·class="inline">Common·Test</code>·has·not·been·run
360 from·this·directory·before,·no·configuration·files·are·available.</p><p>If·any·functions·using·&quot;required·configuration·data&quot;·(for·example,·functions360 from·this·directory·before,·no·configuration·files·are·available.</p><p>If·any·functions·using·&quot;required·configuration·data&quot;·(for·example,·functions
361 <code·class="inline">ct_telnet</code>·or·<code·class="inline">ct_ftp</code>)·are·to·be·called·from·the·Erlang·shell,·first·require361 <code·class="inline">ct_telnet</code>·or·<code·class="inline">ct_ftp</code>)·are·to·be·called·from·the·Erlang·shell,·first·require
362 configuration·data·with·<a·href="ct.html#require/1"><code·class="inline">ct:require/1,2</code></a>.·This·is·equivalent362 configuration·data·with·<a·href="ct.html#require/1"><code·class="inline">ct:require/1,2</code></a>.·This·is·equivalent
363 to·a·<code·class="inline">require</code>·statement·in·the363 to·a·<code·class="inline">require</code>·statement·in·the
364 <a·href="write_test_chapter.html#suite">Test·Suite·Information·Function</a>·or·in·the364 <a·href="write_test_chapter.html#suite">Test·Suite·Information·Function</a>·or·in·the
365 <a·href="write_test_chapter.html#info_function">Test·Case·Information·Function</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="3384259335-1">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p"·data-group-id="3384259335-1">)</span><span·class="p">.</span><span·class="w">365 <a·href="write_test_chapter.html#info_function">Test·Case·Information·Function</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ct</span><span·class="p">:</span><span·class="nf">require</span><span·class="p"·data-group-id="6962297725-1">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p"·data-group-id="6962297725-1">)</span><span·class="p">.</span><span·class="w">
366 </span><span·class="ss">ok</span><span·class="gp·unselectable">366 </span><span·class="ss">ok</span><span·class="gp·unselectable">
367 2&gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="3384259335-2">(</span><span·class="ss">unix_telnet</span><span·class="p"·data-group-id="3384259335-2">)</span><span·class="p">.</span><span·class="w">367 2&gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="6962297725-2">(</span><span·class="ss">unix_telnet</span><span·class="p"·data-group-id="6962297725-2">)</span><span·class="p">.</span><span·class="w">
368 </span><span·class="p"·data-group-id="3384259335-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.105</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="3384259335-3">}</span><span·class="gp·unselectable">368 </span><span·class="p"·data-group-id="6962297725-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.105</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6962297725-3">}</span><span·class="gp·unselectable">
369 4&gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="3384259335-4">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ls·.&quot;</span><span·class="p"·data-group-id="3384259335-4">)</span><span·class="p">.</span><span·class="w">369 4&gt;·</span><span·class="nc">ct_telnet</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="6962297725-4">(</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ls·.&quot;</span><span·class="p"·data-group-id="6962297725-4">)</span><span·class="p">.</span><span·class="w">
370 </span><span·class="p"·data-group-id="3384259335-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3384259335-6">[</span><span·class="s">&quot;ls·.&quot;</span><span·class="p">,</span><span·class="s">&quot;file1··...&quot;</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·166,·SHA:·0e02876c73c35d1e79b835122a53d63610ce00061cfcf1bc12140795ae149d96·...·]5-5">}</span></code></pre><p>Everything·that·<code·class="inline">Common·Test</code>·normally·prints·in·the·test·case·logs,·are·in·the370 </span><span·class="p"·data-group-id="6962297725-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6962297725-6">[</span><span·class="s">&quot;ls·.&quot;</span><span·class="p">,</span><span·class="s">&quot;file1··...&quot;</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·166,·SHA:·b82fa0e9b3d53783b241e7c544c4aa21098bf26bcf7d1c90186faef3a2efd9f5·...·]5-5">}</span></code></pre><p>Everything·that·<code·class="inline">Common·Test</code>·normally·prints·in·the·test·case·logs,·are·in·the
371 interactive·mode·written·to·a·log·named·<code·class="inline">ctlog.html</code>·in·directory371 interactive·mode·written·to·a·log·named·<code·class="inline">ctlog.html</code>·in·directory
372 <code·class="inline">ct_run.&lt;timestamp&gt;</code>.·A·link·to·this·file·is·available·in·the·file·named372 <code·class="inline">ct_run.&lt;timestamp&gt;</code>.·A·link·to·this·file·is·available·in·the·file·named
373 <code·class="inline">last_interactive.html</code>·in·the·directory·from·which·you·execute·<code·class="inline">ct_run</code>.373 <code·class="inline">last_interactive.html</code>·in·the·directory·from·which·you·execute·<code·class="inline">ct_run</code>.
374 Specifying·a·different·root·directory·for·the·logs·than·the·current·working374 Specifying·a·different·root·directory·for·the·logs·than·the·current·working
375 directory·is·not·supported.</p><p>If·you·wish·to·exit·the·interactive·mode·(for·example,·to·start·an·automated375 directory·is·not·supported.</p><p>If·you·wish·to·exit·the·interactive·mode·(for·example,·to·start·an·automated
376 test·run·with·<a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>),·call·function·<a·href="ct.html#stop_interactive/0"><code·class="inline">ct:stop_interactive/0</code></a>.·This376 test·run·with·<a·href="ct.html#run_test/1"><code·class="inline">ct:run_test/1</code></a>),·call·function·<a·href="ct.html#stop_interactive/0"><code·class="inline">ct:stop_interactive/0</code></a>.·This
377 shuts·down·the·running·<code·class="inline">ct</code>·application.·Associations·between·configuration377 shuts·down·the·running·<code·class="inline">ct</code>·application.·Associations·between·configuration
Offset 450, 16 lines modifiedOffset 450, 16 lines modified
450 ··</a>450 ··</a>
451 ··<span·class="text">Test·Specification·File·Inclusion</span>451 ··<span·class="text">Test·Specification·File·Inclusion</span>
452 </h3>452 </h3>
453 <p>With·the·term·<code·class="inline">specs</code>,·a·test·specification·can·include·other·specifications.·An453 <p>With·the·term·<code·class="inline">specs</code>,·a·test·specification·can·include·other·specifications.·An
454 included·specification·can·either·be·joined·with·the·source·specification·or454 included·specification·can·either·be·joined·with·the·source·specification·or
455 used·to·produce·a·separate·test·run·(as·with·start·flag/option·<code·class="inline">join_specs</code>455 used·to·produce·a·separate·test·run·(as·with·start·flag/option·<code·class="inline">join_specs</code>
456 above).</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·In·specification·file·&quot;a.spec&quot;</span><span·class="w">456 above).</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·In·specification·file·&quot;a.spec&quot;</span><span·class="w">
457 </span><span·class="p"·data-group-id="5879232083-1">{</span><span·class="ss">specs</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">join</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5879232083-2">[</span><span·class="s">&quot;b.spec[·...·truncated·by·diffoscope;·len:·196,·SHA:·c11c18a0e73dbb12bc0961c6a5b7ccb8f1e08fbc8c57791aba93cc293ccbef40·...·]-1">}</span><span·class="p">.</span><span·class="w">457 </span><span·class="p"·data-group-id="0686808827-1">{</span><span·class="ss">specs</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">join</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0686808827-2">[</span><span·class="s">&quot;b.spec[·...·truncated·by·diffoscope;·len:·196,·SHA:·d91eaa4b5e3a1162dd7160fe431a5a7a932db0ef6e67fc9864aedeb706cd0885·...·]-1">}</span><span·class="p">.</span><span·class="w">
458 </span><span·class="p"·data-group-id="5879232083-3">{</span><span·class="ss">specs</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">separate</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5879232083-4">[</span><span·class="s">&quot;d.[·...·truncated·by·diffoscope;·len:·200,·SHA:·93231704cfb1d18e6ae013d124701a95847220c62c098cdc1d591d3e867ece54·...·]-3">}</span><span·class="p">.</span><span·class="w">458 </span><span·class="p"·data-group-id="0686808827-3">{</span><span·class="ss">specs</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">separate</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0686808827-4">[</span><span·class="s">&quot;d.[·...·truncated·by·diffoscope;·len:·200,·SHA:·71afa91701f8e452dbcce29983cdb44da1da74a7e2d23abeb7964fffef2ebedd·...·]-3">}</span><span·class="p">.</span><span·class="w">
459 </span><span·class="c1">%%·Config·and·test·terms·follow</span><span·class="w">459 </span><span·class="c1">%%·Config·and·test·terms·follow</span><span·class="w">
460 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>In·this·example,·the·test·terms·defined·in·files·&quot;b.spec&quot;·and·&quot;c.spec&quot;·are460 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>In·this·example,·the·test·terms·defined·in·files·&quot;b.spec&quot;·and·&quot;c.spec&quot;·are
461 joined·with·the·terms·in·source·specification·&quot;a.spec&quot;·(if·any).·The·inclusion461 joined·with·the·terms·in·source·specification·&quot;a.spec&quot;·(if·any).·The·inclusion
462 of·specifications·&quot;d.spec&quot;·and·&quot;e.spec&quot;·results·in·two·separate,·and462 of·specifications·&quot;d.spec&quot;·and·&quot;e.spec&quot;·results·in·two·separate,·and
463 independent,·test·runs·(one·for·each·included·specification).</p><p>Option·<code·class="inline">join</code>·does·not·imply·that·the·test·terms·are·merged,·only·that·all·tests463 independent,·test·runs·(one·for·each·included·specification).</p><p>Option·<code·class="inline">join</code>·does·not·imply·that·the·test·terms·are·merged,·only·that·all·tests
464 are·executed·in·one·single·test·run.</p><p>Joined·specifications·share·common·configuration·settings,·such·as·the·list·of464 are·executed·in·one·single·test·run.</p><p>Joined·specifications·share·common·configuration·settings,·such·as·the·list·of
465 <code·class="inline">config</code>·files·or·<code·class="inline">include</code>·directories.·For·configurations·that·cannot·be465 <code·class="inline">config</code>·files·or·<code·class="inline">include</code>·directories.·For·configurations·that·cannot·be
Offset 513, 162 lines modifiedOffset 513, 162 lines modified
513 Testing).·The·node·parameters·in·term·<code·class="inline">init</code>·are·only·relevant·in·the·latter513 Testing).·The·node·parameters·in·term·<code·class="inline">init</code>·are·only·relevant·in·the·latter
514 (see·section·<a·href="ct_master_chapter.html#test_specifications">Test·Specifications</a>·in514 (see·section·<a·href="ct_master_chapter.html#test_specifications">Test·Specifications</a>·in
515 Large·Scale·Testing).·For·details·about·the·various·terms,·see·the·corresponding515 Large·Scale·Testing).·For·details·about·the·various·terms,·see·the·corresponding
516 sections·in·the·User's·Guide,·for·example,·the·following:</p><ul><li>The·<a·href="run_test_chapter.html#ct_run"><code·class="inline">ct_run</code>·program</a>·for·an·overview·of516 sections·in·the·User's·Guide,·for·example,·the·following:</p><ul><li>The·<a·href="run_test_chapter.html#ct_run"><code·class="inline">ct_run</code>·program</a>·for·an·overview·of
517 available·start·flags·(as·most·flags·have·a·corresponding·configuration·term)</li><li><a·href="write_test_chapter.html#logging">Logging</a>·(for·terms·<code·class="inline">verbosity</code>,·<code·class="inline">stylesheet</code>,517 available·start·flags·(as·most·flags·have·a·corresponding·configuration·term)</li><li><a·href="write_test_chapter.html#logging">Logging</a>·(for·terms·<code·class="inline">verbosity</code>,·<code·class="inline">stylesheet</code>,
518 <code·class="inline">basic_html</code>·and·<code·class="inline">esc_chars</code>)</li><li><a·href="config_file_chapter.html#top">External·Configuration·Data</a>·(for·terms·<code·class="inline">config</code>518 <code·class="inline">basic_html</code>·and·<code·class="inline">esc_chars</code>)</li><li><a·href="config_file_chapter.html#top">External·Configuration·Data</a>·(for·terms·<code·class="inline">config</code>
519 and·<code·class="inline">userconfig</code>)</li><li><a·href="event_handler_chapter.html#event_handling">Event·Handling</a>·(for·the519 and·<code·class="inline">userconfig</code>)</li><li><a·href="event_handler_chapter.html#event_handling">Event·Handling</a>·(for·the
520 <code·class="inline">event_handler</code>·term)</li><li><a·href="ct_hooks_chapter.html#installing">Common·Test·Hooks</a>·(for·term·<code·class="inline">ct_hooks</code>)</li></ul><p><em>Configuration·terms:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4969705299-1">{</span><span·class="ss">merge_tests</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bool</span><span·class="p"·data-group-id="4969705299-1">}</span><span·class="p">.</span><span·class="w">520 <code·class="inline">event_handler</code>·term)</li><li><a·href="ct_hooks_chapter.html#installing">Common·Test·Hooks</a>·(for·term·<code·class="inline">ct_hooks</code>)</li></ul><p><em>Configuration·terms:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5217284193-1">{</span><span·class="ss">merge_tests</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bool</span><span·class="p"·data-group-id="5217284193-1">}</span><span·class="p">.</span><span·class="w">
  
521 </span><span·class="p"·data-group-id="4969705299-2">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Constant</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="4969705299-2">}</span><span·class="p">.</span><span·class="w">521 </span><span·class="p"·data-group-id="5217284193-2">{</span><span·class="ss">define</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Constant</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p"·data-group-id="5217284193-2">}</span><span·class="p">.</span><span·class="w">
  
522 </span><span·class="p"·data-group-id="4969705299-3">{</span><span·class="ss">specs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InclSpecsOption</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TestSpecs</span><span·class="p"·data-group-id="49697052[·...·truncated·by·diffoscope;·len:·2,·SHA:·8c1f1046219ddd216a023f792356ddf127fce372a72ec9b4cdac989ee5b0b455·...·]-3">}</span><span·class="p">.</span><span·class="w">522 </span><span·class="p"·data-group-id="5217284193-3">{</span><span·class="ss">specs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InclSpecsOption</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TestSpecs</span><span·class="p"·data-group-id="52172841[·...·truncated·by·diffoscope;·len:·2,·SHA:·6e4001871c0cf27c7634ef1dc478408f642410fd3a444e2a88e301f5c4a35a4d·...·]-3">}</span><span·class="p">.</span><span·class="w">
  
523 </span><span·class="p"·data-group-id="4969705299-4">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeAlias</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="4969705299-4">}</span><span·class="p">.</span><span·class="w">523 </span><span·class="p"·data-group-id="5217284193-4">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeAlias</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="5217284193-4">}</span><span·class="p">.</span><span·class="w">
  
524 </span><span·class="p"·data-group-id="4969705299-5">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InitOptions</span><span·class="p"·data-group-id="4969705299-5">}</span><span·class="p">.</span><span·class="w">524 </span><span·class="p"·data-group-id="5217284193-5">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InitOptions</span><span·class="p"·data-group-id="5217284193-5">}</span><span·class="p">.</span><span·class="w">
525 </span><span·class="p"·data-group-id="4969705299-6">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4969705299-7">[</span><span·class="n">NodeAlias</span><span·class="p"·data-group-id="4969705299-7">]</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·103,·SHA:·2eb67a9e2e64f439eae8de2ec51e8ef74860b55d2d25e456e08a03db0c8d4ba9·...·]-6">}</span><span·class="p">.</span><span·class="w">525 </span><span·class="p"·data-group-id="5217284193-6">{</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5217284193-7">[</span><span·class="n">NodeAlias</span><span·class="p"·data-group-id="5217284193-7">]</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·103,·SHA:·e960b4046c3946fd732776a450ee5b7506e2cd4501d6181501b3750a0b85d4a3·...·]-6">}</span><span·class="p">.</span><span·class="w">
  
526 </span><span·class="p"·data-group-id="4969705299-8">{</span><span·class="ss">label</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Label</span><span·class="p"·data-group-id="4969705299-8">}</span><span·class="p">.</span><span·class="w">526 </span><span·class="p"·data-group-id="5217284193-8">{</span><span·class="ss">label</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Label</span><span·class="p"·data-group-id="5217284193-8">}</span><span·class="p">.</span><span·class="w">
527 </span><span·class="p"·data-group-id="4969705299-9">{</span><span·class="ss">label</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeRefs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Label</span><span·class="p"·data-group-id="4969705299-9">}</span><span·class="p">.</span><span·class="w">527 </span><span·class="p"·data-group-id="5217284193-9">{</span><span·class="ss">label</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeRefs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Label</span><span·class="p"·data-group-id="5217284193-9">}</span><span·class="p">.</span><span·class="w">
  
528 </span><span·class="p"·data-group-id="4969705299-10">{</span><span·class="ss">verbosity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">VerbosityLevels</span><span·class="p"·data-group-id="4969705299-10">}</span><span·class="p">.</span><span·class="w">528 </span><span·class="p"·data-group-id="5217284193-10">{</span><span·class="ss">verbosity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">VerbosityLevels</span><span·class="p"·data-group-id="5217284193-10">}</span><span·class="p">.</span><span·class="w">
529 </span><span·class="p"·data-group-id="4969705299-11">{</span><span·class="ss">verbosity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeRefs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">VerbosityLevels</span><span·class="p"·data-group-id="4969[·...·truncated·by·diffoscope;·len:·6,·SHA:·a38399c5cc8f146403dec3cd650f04246efb90671602a74d53267c265dae22cd·...·]-11">}</span><span·class="p">.</span><span·class="w">529 </span><span·class="p"·data-group-id="5217284193-11">{</span><span·class="ss">verbosity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeRefs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">VerbosityLevels</span><span·class="p"·data-group-id="5217[·...·truncated·by·diffoscope;·len:·6,·SHA:·e21e32af6a3068e4f980827f96c4dfd3db3db35b730e78d7ff8696f4f2413595·...·]-11">}</span><span·class="p">.</span><span·class="w">
  
530 </span><span·class="p"·data-group-id="4969705299-12">{</span><span·class="ss">stylesheet</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CSSFile</span><span·class="p"·data-group-id="4969705299-12">}</span><span·class="p">.</span><span·class="w">530 </span><span·class="p"·data-group-id="5217284193-12">{</span><span·class="ss">stylesheet</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CSSFile</span><span·class="p"·data-group-id="5217284193-12">}</span><span·class="p">.</span><span·class="w">
531 </span><span·class="p"·data-group-id="4969705299-13">{</span><span·class="ss">stylesheet</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeRefs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CSSFile</span><span·class="p"·data-group-id="4969705299-13">}</span><span·class="p">.</span><span·class="w">531 </span><span·class="p"·data-group-id="5217284193-13">{</span><span·class="ss">stylesheet</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NodeRefs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CSSFile</span><span·class="p"·data-group-id="5217284193-13">}</span><span·class="p">.</span><span·class="w">
  
532 </span><span·class="p"·data-group-id="4969705299-14">{</span><span·class="ss">silent_connections</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnTypes</span><span·class="p"·data-group-id="4969705299-14">}</span><span·class="p">.</span><span·class="w">532 </span><span·class="p"·data-group-id="5217284193-14">{</span><span·class="ss">silent_connections</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnTypes</span><span·class="p"·data-group-id="5217284193-14">}</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 137808/203368 bytes (67.76%) of diff not shown.
8.42 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/unix_telnet.html
    
Offset 125, 22 lines modifiedOffset 125, 22 lines modified
125 ····<small·class="app-vsn"·translate="no">(common_test·v1.27)</small>125 ····<small·class="app-vsn"·translate="no">(common_test·v1.27)</small>
  
126 ··</h1>126 ··</h1>
  
  
127 ····<section·id="moduledoc">127 ····<section·id="moduledoc">
128 <p>Callback·module·for·ct_telnet,·for·connecting·to·a·Telnet·server·on·a·UNIX·host.</p><p>Callback·module·for·<a·href="ct_telnet.html"><code·class="inline">ct_telnet</code></a>,·for·connecting·to·a·Telnet·server·on·a·UNIX128 <p>Callback·module·for·ct_telnet,·for·connecting·to·a·Telnet·server·on·a·UNIX·host.</p><p>Callback·module·for·<a·href="ct_telnet.html"><code·class="inline">ct_telnet</code></a>,·for·connecting·to·a·Telnet·server·on·a·UNIX
129 host.</p><p>It·requires·the·following·entry·in·the·configuration·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4953169915-1">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="p"·data-group-id="4953169915-2">[</span><span·class="p"·data-group-id="4953169915-3">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="n">HostNameOrIpAddress</span><span·class="p"·data-group-id="4953169915-3">}</span><span·class="p">,</span><span·class="w"> 
130 ·······</span><span·class="p"·data-group-id="4953169915-4">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="n">PortNum</span><span·class="p"·data-group-id="4953169915-4">}</span><span·class="p">,</span><span·class="w">··············[·...·truncated·by·diffoscope;·len:·37,·SHA:·896a8775962438d09ec4b496c4b9822b3bc7e4bc0b7dd4f37d47c5b9c71c9ed0·...·]</span><span·class="w">129 host.</p><p>It·requires·the·following·entry·in·the·configuration·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0385172623-1">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·243,·SHA:·a6f8ba9cac5f5a6877a8271e8c2131510100b8fc788b613ced65eb5a1c00792b·...·]</span><span·class="w">
 130 ·······</span><span·class="p"·data-group-id="0385172623-4">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="n">PortNum</span><span·class="p"·data-group-id="0385172623-4">}</span><span·class="p">,</span><span·class="w">·················</span><span·class="c1">%·optional</span><span·class="w">
131 ·······</span><span·class="p"·data-group-id="4953169915-5">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">UserName</span><span·class="p"·data-group-id="4953169915-5">}</span><span·class="p">,</span><span·class="w">131 ·······</span><span·class="p"·data-group-id="0385172623-5">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="n">UserName</span><span·class="p"·data-group-id="0385172623-5">}</span><span·class="p">,</span><span·class="w">
132 ·······</span><span·class="p"·data-group-id="4953169915-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="4953169915-6">}</span><span·class="p">,</span><span·class="w"> 
133 ·······</span><span·class="p"·data-group-id="4953169915-7">{</span><span·class="ss">keep_alive</span><span·class="p">,</span><span·class="n">Bool</span><span·class="p"·data-group-id="4953169915-7">}</span><span·class="p"·data-group-id="4953169915-2">]</span><span·class="p"·data-group-id="4953169915-1[·...·truncated·by·diffoscope;·len:·222,·SHA:·67878fdbd1e304a1346f863eba7ee32a4a28313966a3fd87470af519a65c4b5e·...·]132 ·······</span><span·class="p"·data-group-id="0385172623-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="0385172623-6">}</span><span·class="p">,</span><span·class="w">
 133 ·······</span><span·class="p"·data-group-id="0385172623-7">{</span><span·class="ss">keep_alive</span><span·class="p">,</span><span·class="n">Bool</span><span·class="p"·data-group-id="0385172623-7">}</span><span·class="p"·data-group-id="0385172623-2">]</span><span·class="p"·data-group-id="0385172623-1">}</span><span·class="p">.</span><span·class="w">············</span><span·class="c1">%·optional</span></code></pre><p>To·communicate·through·Telnet·to·the·host·specified·by·<code·class="inline">HostNameOrIpAddress</code>,
134 use·the·interface·functions·in·<a·href="ct_telnet.html"><code·class="inline">ct_telnet</code></a>,·for·example,·<code·class="inline">open(Name)</code>·and134 use·the·interface·functions·in·<a·href="ct_telnet.html"><code·class="inline">ct_telnet</code></a>,·for·example,·<code·class="inline">open(Name)</code>·and
135 <code·class="inline">cmd(Name,Cmd)</code>.</p><p><code·class="inline">Name</code>·is·the·name·you·allocated·to·the·Unix·host·in·your·<code·class="inline">require</code>·statement,135 <code·class="inline">cmd(Name,Cmd)</code>.</p><p><code·class="inline">Name</code>·is·the·name·you·allocated·to·the·Unix·host·in·your·<code·class="inline">require</code>·statement,
136 for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="7233047948-1">(</span><span·class="p"·data-group-id="7233047948-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7233047948-2">[</span><span·class="p"·data-group-id="7233047948-3">{</span>[·...·truncated·by·diffoscope;·len:·1120,·SHA:·d65411ea88e1b47022b0042b55de4219fa832afb596fa69b7190154d30a9583e·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·&quot;keep·alive&quot;·activity·(that·is,·that·<code·class="inline">Common·Test</code>·sends·NOP·to·the·server136 for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="7496863699-1">(</span><span·class="p"·data-group-id="7496863699-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7496863699-2">[</span><span·class="p"·data-group-id="7496863699-3">{</span>[·...·truncated·by·diffoscope;·len:·1120,·SHA:·0312d02979156c32691a32dd66f061e0a4e06c44fab19bced3df5eaa4a7747a5·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·&quot;keep·alive&quot;·activity·(that·is,·that·<code·class="inline">Common·Test</code>·sends·NOP·to·the·server
137 every·10·seconds·if·the·connection·is·idle)·can·be·enabled·or·disabled·for·one137 every·10·seconds·if·the·connection·is·idle)·can·be·enabled·or·disabled·for·one
138 particular·connection·as·described·here.·It·can·be·disabled·for·all·connections138 particular·connection·as·described·here.·It·can·be·disabled·for·all·connections
139 using·<code·class="inline">telnet_settings</code>·(see·<a·href="ct_telnet.html"><code·class="inline">ct_telnet</code></a>).</p><p>The·<code·class="inline">{port,PortNum}</code>·tuple·is·optional·and·if·omitted,·default·Telnet·port·23·is139 using·<code·class="inline">telnet_settings</code>·(see·<a·href="ct_telnet.html"><code·class="inline">ct_telnet</code></a>).</p><p>The·<code·class="inline">{port,PortNum}</code>·tuple·is·optional·and·if·omitted,·default·Telnet·port·23·is
140 used.·Also·the·<code·class="inline">keep_alive</code>·tuple·is·optional,·and·the·value·default·to·<code·class="inline">true</code>140 used.·Also·the·<code·class="inline">keep_alive</code>·tuple·is·optional,·and·the·value·default·to·<code·class="inline">true</code>
141 (enabled).</p><h2·id="module-see-also"·class="section-heading">141 (enabled).</p><h2·id="module-see-also"·class="section-heading">
142 ··<a·href="#module-see-also"·class="hover-link">142 ··<a·href="#module-see-also"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
109 KB
./usr/share/doc/erlang-doc/html/lib/common_test-1.27/doc/html/write_test_chapter.html
    
Offset 262, 58 lines modifiedOffset 262, 58 lines modified
262 <a·href="write_test_chapter.html#timetraps">Timetrap·Time-Outs</a>.</p></li><li><p><strong><code·class="inline">userdata</code></strong>·-·Specifies·any·data·related·to·the·test·case.·This·data·can·be262 <a·href="write_test_chapter.html#timetraps">Timetrap·Time-Outs</a>.</p></li><li><p><strong><code·class="inline">userdata</code></strong>·-·Specifies·any·data·related·to·the·test·case.·This·data·can·be
263 retrieved·at·any·time·using·the·<a·href="ct.html#userdata/3"><code·class="inline">ct:userdata/3</code></a>·utility·function.</p></li><li><p><strong><code·class="inline">silent_connections</code></strong>·-·For·details,·see·section263 retrieved·at·any·time·using·the·<a·href="ct.html#userdata/3"><code·class="inline">ct:userdata/3</code></a>·utility·function.</p></li><li><p><strong><code·class="inline">silent_connections</code></strong>·-·For·details,·see·section
264 <a·href="run_test_chapter.html#silent_connections">Silent·Connections</a>.</p></li><li><p><strong><code·class="inline">require</code></strong>·-·Specifies·configuration·variables·required·by·the·test·case.264 <a·href="run_test_chapter.html#silent_connections">Silent·Connections</a>.</p></li><li><p><strong><code·class="inline">require</code></strong>·-·Specifies·configuration·variables·required·by·the·test·case.
265 If·the·required·configuration·variables·are·not·found·in·any·of·the·test265 If·the·required·configuration·variables·are·not·found·in·any·of·the·test
266 system·configuration·files,·the·test·case·is·skipped.</p><p>A·required·variable·can·also·be·given·a·default·value·to·be·used·if·the266 system·configuration·files,·the·test·case·is·skipped.</p><p>A·required·variable·can·also·be·given·a·default·value·to·be·used·if·the
267 variable·is·not·found·in·any·configuration·file.·To·specify·a·default·value,267 variable·is·not·found·in·any·configuration·file.·To·specify·a·default·value,
268 add·a·tuple·on·the·form·<code·class="inline">{default_config,ConfigVariableName,Value}</code>·to·the268 add·a·tuple·on·the·form·<code·class="inline">{default_config,ConfigVariableName,Value}</code>·to·the
269 test·case·information·list·(the·position·in·the·list·is·irrelevant).</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">testcase1</span><span·class="p"·data-group-id="7607535163-1">(</span><span·class="p"·data-group-id="7607535163-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">269 test·case·information·list·(the·position·in·the·list·is·irrelevant).</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">testcase1</span><span·class="p"·data-group-id="2788379477-1">(</span><span·class="p"·data-group-id="2788379477-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
270 ····</span><span·class="p"·data-group-id="7607535163-2">[</span><span·class="p"·data-group-id="7607535163-3">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ftp</span><span·class="p"·data-group-id="7607535163-3">}</span><span·class="p">,</span><span·class="w">270 ····</span><span·class="p"·data-group-id="2788379477-2">[</span><span·class="p"·data-group-id="2788379477-3">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ftp</span><span·class="p"·data-group-id="2788379477-3">}</span><span·class="p">,</span><span·class="w">
271 ·····</span><span·class="p"·data-group-id="7607535163-4">{</span><span·class="ss">default_config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7607535163-5">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·195,·SHA:·ad71670ae0e9301649e81f53958dac928dee21677537db4f33f47ae757606b49·...·]-6">}</span><span·class="p">,</span><span·class="w">271 ·····</span><span·class="p"·data-group-id="2788379477-4">{</span><span·class="ss">default_config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ftp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2788379477-5">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·195,·SHA:·464817273b46f10580b668771e07d990ab44a577120d0d5cf2fb205ab043ad92·...·]-6">}</span><span·class="p">,</span><span·class="w">
 272 ····························</span><span·class="p"·data-group-id="2788379477-7">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;aladdin&quot;</span><span·class="p"·data-group-id="2788379477-7">}</span><span·class="p">,</span><span·class="w">
 273 ····························</span><span·class="p"·data-group-id="2788379477-8">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;sesame&quot;</span><span·class="p"·data-group-id="2788379477-8">}</span><span·class="p"·data-group-id="2788379477-5">]</span><span·class="p"·data-group-id="2788379477-4">}</span><span·class="p">}</span><span·class="p"·data-group-id="2788379477-2">]</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">testcase2</span><span·class="p"·data-group-id="9636215352-1">(</span><span·class="p"·data-group-id="9636215352-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
 274 ····</span><span·class="p"·data-group-id="9636215352-2">[</span><span·class="p"·data-group-id="9636215352-3">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p"·data-group-id="9636215352-3">}</span><span·class="p">,</span><span·class="w">
 275 ·····</span><span·class="p"·data-group-id="9636215352-4">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9636215352-5">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9636215352-6">[</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">password</span><span·class="p"·data-group-id="9636215352-6">]</span><span·class="p"·data-group-id="9636215352-5">}</span><span·class="p"·data-group-id="9636215352-4">}</span><span·class="p">,</span><span·class="w">
 276 ·····</span><span·class="p"·data-group-id="9636215352-7">{</span><span·class="ss">default_config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9636215352-8">[</span><span·class="p"·data-group-id="9636215352-9">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_telnet_host&quot;</span><span·class="p"·data-group-id="9636215352-9">}</span><span·class="p">,</span><span·class="w">
272 ····························</span><span·class="p"·data-group-id="7607535163-7">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;aladdin&quot;</span><span·class="p"·data-group-id="7607535163-7">}</span><span·class="p">,</span><span·class="w">277 ·····························</span><span·class="p"·data-group-id="9636215352-10">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;aladdin&quot;</span><span·class="p"·data-group-id="9636215352-10">}</span><span·class="p">,</span><span·class="w">
 278 ·····························</span><span·class="p"·data-group-id="9636215352-11">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;sesame&quot;</span><span·class="p"·data-group-id="9636215352-11">}</span><span·class="p"·data-group-id="9636215352-8">]</span><span·class="p"·data-group-id="9636215352-7">}</span><span·class="p">}</span><span·class="p"·data-group-id="9636215352-2">]</span><span·class="p">.</span></code></pre></li></ul><p>For·more·information·about·<code·class="inline">require</code>,·see·section
273 ····························</span><span·class="p"·data-group-id="7607535163-8">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;sesame&quot;</span><span·class="p"·data-group-id="7607535163-8">}</span><span·class="p"·data-group-id="7607535163-5">]</span><span·class="p"·data-group-id="7607535163-4">}</span><span·class="p">}</span><span·class="p"·data-group-id="7607535163-2">]</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">testcase2</span><span·class="p"·data-group-id="0074709751-1">(</span><span·class="p"·data-group-id="0074709751-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
274 ····</span><span·class="p"·data-group-id="0074709751-2">[</span><span·class="p"·data-group-id="0074709751-3">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix_telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p"·data-group-id="0074709751-3">}</span><span·class="p">,</span><span·class="w"> 
275 ·····</span><span·class="p"·data-group-id="0074709751-4">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0074709751-5">{</span><span·class="ss">unix</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0074709751-6">[</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">password</span><span·class="p"·data-group-id="0074709751-6">]</span><span·class="p"·data-group-id="0074709751-5">}</span><span·class="p"·data-group-id="0074709751-4">}</span><span·class="p">,</span><span·class="w"> 
276 ·····</span><span·class="p"·data-group-id="0074709751-7">{</span><span·class="ss">default_config</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unix</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0074709751-8">[</span><span·class="p"·data-group-id="0074709751-9">{</span><span·class="ss">telnet</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_telnet_host&quot;</span><span·class="p"·data-group-id="0074709751-9">}</span><span·class="p">,</span><span·class="w"> 
277 ·····························</span><span·class="p"·data-group-id="0074709751-10">{</span><span·class="ss">username</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;aladdin&quot;</span><span·class="p"·data-group-id="0074709751-10">}</span><span·class="p">,</span><span·class="w"> 
278 ·····························</span><span·class="p"·data-group-id="0074709751-11">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;sesame&quot;</span><span·class="p"·data-group-id="0074709751-11">}</span><span·class="p"·data-group-id="0074709751-8">]</span><span·class="p"·data-group-id="0074709751-7">}</span><span·class="p">}</span><span·class="p"·data-group-id="0074709751-2">]</span><span·class="p">.</span></code></pre></li></ul><p>For·more·information·about·<code·class="inline">require</code>,·see·section 
279 <a·href="config_file_chapter.html#require_config_data">Requiring·and·Reading·Configuration·Data</a>279 <a·href="config_file_chapter.html#require_config_data">Requiring·and·Reading·Configuration·Data</a>
280 in·section·External·Configuration·Data·and·function280 in·section·External·Configuration·Data·and·function
281 <a·href="ct.html#require/1"><code·class="inline">ct:require/1/2</code></a>.</p><blockquote><h4·class="info">Note</h4><p>Specifying·a·default·value·for·a·required·variable·can·result·in·a·test·case281 <a·href="ct.html#require/1"><code·class="inline">ct:require/1/2</code></a>.</p><blockquote><h4·class="info">Note</h4><p>Specifying·a·default·value·for·a·required·variable·can·result·in·a·test·case
282 always·getting·executed.·This·might·not·be·a·desired·behavior.</p></blockquote><p>If·<code·class="inline">timetrap</code>·or·<code·class="inline">require</code>,·or·both,·is·not·set·specifically·for·a·particular282 always·getting·executed.·This·might·not·be·a·desired·behavior.</p></blockquote><p>If·<code·class="inline">timetrap</code>·or·<code·class="inline">require</code>,·or·both,·is·not·set·specifically·for·a·particular
283 test·case,·default·values·specified·by·function283 test·case,·default·values·specified·by·function
284 <a·href="ct_suite.html#c:suite/0"><code·class="inline">suite/0</code></a>·are·used.</p><p>Tags·other·than·the·earlier·mentioned·are·ignored·by·the·test·server.</p><p>An·example·of·a·test·case·information·function·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">reboot_node</span><span·class="p"·data-group-id="8101094468-1">(</span><span·class="p"·data-group-id="8101094468-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">284 <a·href="ct_suite.html#c:suite/0"><code·class="inline">suite/0</code></a>·are·used.</p><p>Tags·other·than·the·earlier·mentioned·are·ignored·by·the·test·server.</p><p>An·example·of·a·test·case·information·function·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">reboot_node</span><span·class="p"·data-group-id="5569920400-1">(</span><span·class="p"·data-group-id="5569920400-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
285 ····</span><span·class="p"·data-group-id="8101094468-2">[</span><span·class="w">285 ····</span><span·class="p"·data-group-id="5569920400-2">[</span><span·class="w">
286 ·····</span><span·class="p"·data-group-id="8101094468-3">{</span><span·class="ss">timetrap</span><span·class="p">,</span><span·class="p"·data-group-id="8101094468-4">{</span><span·class="ss">seconds</span><span·class="p">,</span><span·class="mi">60</span><span·class="p"·data-group-id="8101094468-4"[·...·truncated·by·diffoscope;·len:·50,·SHA:·880f54f1ebc76502eca1eae87c04338cc74828e348f9a2f2c87dd90fc6534f45·...·]-3">}</span><span·class="p">,</span><span·class="w">286 ·····</span><span·class="p"·data-group-id="5569920400-3">{</span><span·class="ss">timetrap</span><span·class="p">,</span><span·class="p"·data-group-id="5569920400-4">{</span><span·class="ss">seconds</span><span·class="p">,</span><span·class="mi">60</span><span·class="p"·data-group-id="5569920400-4"[·...·truncated·by·diffoscope;·len:·50,·SHA:·9ebf216e8f003421df164c7ae816b9f80038f7db9ee2250b2a16fc2cd48f8629·...·]-3">}</span><span·class="p">,</span><span·class="w">
287 ·····</span><span·class="p"·data-group-id="8101094468-5">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">interfaces</span><span·class="p"·data-group-id="8101094468-5">}</span><span·class="p">,</span><span·class="w">287 ·····</span><span·class="p"·data-group-id="5569920400-5">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">interfaces</span><span·class="p"·data-group-id="5569920400-5">}</span><span·class="p">,</span><span·class="w">
288 ·····</span><span·class="p"·data-group-id="8101094468-6">{</span><span·class="ss">userdata</span><span·class="p">,</span><span·class="w">288 ·····</span><span·class="p"·data-group-id="5569920400-6">{</span><span·class="ss">userdata</span><span·class="p">,</span><span·class="w">
289 ·········</span><span·class="p"·data-group-id="8101094468-7">[</span><span·class="p"·data-group-id="8101094468-8">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="s">&quot;System·Upgrade:·RpuAddition·Normal·RebootNode&quot;</span><span·class="p"·data-group-id="8101094468-8">}</span><span·class="p">,</span><span·class="w">289 ·········</span><span·class="p"·data-group-id="5569920400-7">[</span><span·class="p"·data-group-id="5569920400-8">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="s">&quot;System·Upgrade:·RpuAddition·Normal·RebootNode&quot;</span><span·class="p"·data-group-id="5569920400-8">}</span><span·class="p">,</span><span·class="w">
290 ··········</span><span·class="p"·data-group-id="8101094468-9">{</span><span·class="ss">fts</span><span·class="p">,</span><span·class="s">&quot;http://someserver.ericsson.se/test_doc4711.pdf&quot;</span><span·class="p"·data-group-id="8101094468-9">}</span><span·class="p"·data-group-id="8101094468-7">]</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·1f3362ab875634cac8e64416812d196ec1a24ac3210334d8aff8893836f70932·...·]-6">}</span><span·class="w">290 ··········</span><span·class="p"·data-group-id="5569920400-9">{</span><span·class="ss">fts</span><span·class="p">,</span><span·class="s">&quot;http://someserver.ericsson.se/test_doc4711.pdf&quot;</span><span·class="p"·data-group-id="5569920400-9">}</span><span·class="p"·data-group-id="5569920400-7">]</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·2801369b41c38843e49837abb1b0d6ac705b6b87538a1ce873829969d91dce76·...·]-6">}</span><span·class="w">
291 ····</span><span·class="p"·data-group-id="8101094468-2">]</span><span·class="p">.</span></code></pre><p><a·href=""·id="suite"></a></p><h2·id="test-suite-information-function"·class="section-heading">291 ····</span><span·class="p"·data-group-id="5569920400-2">]</span><span·class="p">.</span></code></pre><p><a·href=""·id="suite"></a></p><h2·id="test-suite-information-function"·class="section-heading">
292 ··<a·href="#test-suite-information-function"·class="hover-link">292 ··<a·href="#test-suite-information-function"·class="hover-link">
293 ····<i·class="ri-link-m"·aria-hidden="true"></i>293 ····<i·class="ri-link-m"·aria-hidden="true"></i>
294 ··</a>294 ··</a>
295 ··<span·class="text">Test·Suite·Information·Function</span>295 ··<span·class="text">Test·Suite·Information·Function</span>
296 </h2>296 </h2>
297 <p>Function·<a·href="ct_suite.html#c:suite/0"><code·class="inline">suite/0</code></a>·can,·for·example,·be·used·in·a·test297 <p>Function·<a·href="ct_suite.html#c:suite/0"><code·class="inline">suite/0</code></a>·can,·for·example,·be·used·in·a·test
298 suite·module·to·set·a·default·<code·class="inline">timetrap</code>·value·and·to·<code·class="inline">require</code>·external298 suite·module·to·set·a·default·<code·class="inline">timetrap</code>·value·and·to·<code·class="inline">require</code>·external
299 configuration·data.·If·a·test·case,·or·a·group·information·function·also299 configuration·data.·If·a·test·case,·or·a·group·information·function·also
300 specifies·any·of·the·information·tags,·it·overrides·the·default·values·set·by300 specifies·any·of·the·information·tags,·it·overrides·the·default·values·set·by
301 <code·class="inline">suite/0</code>.·For·details,·see301 <code·class="inline">suite/0</code>.·For·details,·see
302 <a·href="write_test_chapter.html#info_function">Test·Case·Information·Function</a>·and302 <a·href="write_test_chapter.html#info_function">Test·Case·Information·Function</a>·and
303 <a·href="write_test_chapter.html#test_case_groups">Test·Case·Groups</a>.</p><p>The·following·options·can·also·be·specified·with·the·suite·information·list:</p><ul><li><code·class="inline">stylesheet</code>,·see·<a·href="run_test_chapter.html#html_stylesheet">HTML·Style·Sheets</a></li><li><code·class="inline">userdata</code>,·see303 <a·href="write_test_chapter.html#test_case_groups">Test·Case·Groups</a>.</p><p>The·following·options·can·also·be·specified·with·the·suite·information·list:</p><ul><li><code·class="inline">stylesheet</code>,·see·<a·href="run_test_chapter.html#html_stylesheet">HTML·Style·Sheets</a></li><li><code·class="inline">userdata</code>,·see
304 <a·href="write_test_chapter.html#info_function">Test·Case·Information·Function</a></li><li><code·class="inline">silent_connections</code>,·see304 <a·href="write_test_chapter.html#info_function">Test·Case·Information·Function</a></li><li><code·class="inline">silent_connections</code>,·see
305 <a·href="run_test_chapter.html#silent_connections">Silent·Connections</a></li></ul><p>An·example·of·the·suite·information·function·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="8997725571-1">(</span><span·class="p"·data-group-id="8997725571-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">305 <a·href="run_test_chapter.html#silent_connections">Silent·Connections</a></li></ul><p>An·example·of·the·suite·information·function·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">suite</span><span·class="p"·data-group-id="0861782554-1">(</span><span·class="p"·data-group-id="0861782554-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
306 ····</span><span·class="p"·data-group-id="8997725571-2">[</span><span·class="w">306 ····</span><span·class="p"·data-group-id="0861782554-2">[</span><span·class="w">
307 ·····</span><span·class="p"·data-group-id="8997725571-3">{</span><span·class="ss">timetrap</span><span·class="p">,</span><span·class="p"·data-group-id="8997725571-4">{</span><span·class="ss">minutes</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="8997725571-4"[·...·truncated·by·diffoscope;·len:·50,·SHA:·c4cf5485193ee7959fcecfd55b84d55a6a3fd8e231774d578dcc29bccedf0554·...·]-3">}</span><span·class="p">,</span><span·class="w">307 ·····</span><span·class="p"·data-group-id="0861782554-3">{</span><span·class="ss">timetrap</span><span·class="p">,</span><span·class="p"·data-group-id="0861782554-4">{</span><span·class="ss">minutes</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="0861782554-4"[·...·truncated·by·diffoscope;·len:·50,·SHA:·0f364e26d0c558d3ba71449839fff52ad8b37c763f500ea7de3041113e56bafe·...·]-3">}</span><span·class="p">,</span><span·class="w">
308 ·····</span><span·class="p"·data-group-id="8997725571-5">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">global_names</span><span·class="p"·data-group-id="8997725571-5">}</span><span·class="p">,</span><span·class="w">308 ·····</span><span·class="p"·data-group-id="0861782554-5">{</span><span·class="ss">require</span><span·class="p">,</span><span·class="ss">global_names</span><span·class="p"·data-group-id="0861782554-5">}</span><span·class="p">,</span><span·class="w">
309 ·····</span><span·class="p"·data-group-id="8997725571-6">{</span><span·class="ss">userdata</span><span·class="p">,</span><span·class="p"·data-group-id="8997725571-7">[</span><span·class="p"·data-group-id="8997725571-8">{</span><span·class="ss">info</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·201,·SHA:·16b4680bae27089ed2d68c06db7471f5f313c6f741398f7a2a1c5c747a171a90·...·]-6">}</span><span·class="p">,</span><span·class="w">309 ·····</span><span·class="p"·data-group-id="0861782554-6">{</span><span·class="ss">userdata</span><span·class="p">,</span><span·class="p"·data-group-id="0861782554-7">[</span><span·class="p"·data-group-id="0861782554-8">{</span><span·class="ss">info</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·201,·SHA:·bcc44a5a0a138bf508177732d92dd94b03b81e3fadd7831a096f0baae28057e6·...·]-6">}</span><span·class="p">,</span><span·class="w">
310 ·····</span><span·class="p"·data-group-id="8997725571-9">{</span><span·class="ss">silent_connections</span><span·class="p">,</span><span·class="p"·data-group-id="8997725571-10">[</span><span·class="ss">telnet</span><span·class="p"·data-group-id="8997725571-10">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·8a5230ad709ae1f7183cbd5e11add47d7321d220348d252153988b4cba3ec17a·...·]-9">}</span><span·class="p">,</span><span·class="w">310 ·····</span><span·class="p"·data-group-id="0861782554-9">{</span><span·class="ss">silent_connections</span><span·class="p">,</span><span·class="p"·data-group-id="0861782554-10">[</span><span·class="ss">telnet</span><span·class="p"·data-group-id="0861782554-10">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·64fcd9d7944c57e0959040daca7bfc91534ff7a9c8f2ef46acde1dbc3fad6186·...·]-9">}</span><span·class="p">,</span><span·class="w">
311 ·····</span><span·class="p"·data-group-id="8997725571-11">{</span><span·class="ss">stylesheet</span><span·class="p">,</span><span·class="s">&quot;db_testing.css&quot;</span><span·class="p"·data-group-id="8997725571-11">}</span><span·class="w">311 ·····</span><span·class="p"·data-group-id="0861782554-11">{</span><span·class="ss">stylesheet</span><span·class="p">,</span><span·class="s">&quot;db_testing.css&quot;</span><span·class="p"·data-group-id="0861782554-11">}</span><span·class="w">
312 ····</span><span·class="p"·data-group-id="8997725571-2">]</span><span·class="p">.</span></code></pre><p><a·href=""·id="test_case_groups"></a></p><h2·id="test-case-groups"·class="section-heading">312 ····</span><span·class="p"·data-group-id="0861782554-2">]</span><span·class="p">.</span></code></pre><p><a·href=""·id="test_case_groups"></a></p><h2·id="test-case-groups"·class="section-heading">
313 ··<a·href="#test-case-groups"·class="hover-link">313 ··<a·href="#test-case-groups"·class="hover-link">
314 ····<i·class="ri-link-m"·aria-hidden="true"></i>314 ····<i·class="ri-link-m"·aria-hidden="true"></i>
315 ··</a>315 ··</a>
316 ··<span·class="text">Test·Case·Groups</span>316 ··<span·class="text">Test·Case·Groups</span>
317 </h2>317 </h2>
318 <p>A·test·case·group·is·a·set·of·test·cases·sharing·configuration·functions·and318 <p>A·test·case·group·is·a·set·of·test·cases·sharing·configuration·functions·and
319 execution·properties.·Test·case·groups·are·defined·by·function319 execution·properties.·Test·case·groups·are·defined·by·function
Offset 327, 63 lines modifiedOffset 327, 63 lines modified
327 GroupName·=·atom()327 GroupName·=·atom()
328 GroupsAndTestCases·=·[GroupDef·|·{group,GroupName}·|·TestCase·|328 GroupsAndTestCases·=·[GroupDef·|·{group,GroupName}·|·TestCase·|
329 ·····················{testcase,TestCase,TCRepeatProps}]329 ·····················{testcase,TestCase,TCRepeatProps}]
330 TestCase·=·atom()330 TestCase·=·atom()
331 TCRepeatProps·=·[{repeat,N}·|·{repeat_until_ok,N}·|·{repeat_until_fail,N}]</code></pre><p><code·class="inline">GroupName</code>·is·the·name·of·the·group·and·must·be·unique·within·the·test·suite331 TCRepeatProps·=·[{repeat,N}·|·{repeat_until_ok,N}·|·{repeat_until_fail,N}]</code></pre><p><code·class="inline">GroupName</code>·is·the·name·of·the·group·and·must·be·unique·within·the·test·suite
332 module.·Groups·can·be·nested,·by·including·a·group·definition·within·the332 module.·Groups·can·be·nested,·by·including·a·group·definition·within·the
333 <code·class="inline">GroupsAndTestCases</code>·list·of·another·group.·<code·class="inline">Properties</code>·is·the·list·of333 <code·class="inline">GroupsAndTestCases</code>·list·of·another·group.·<code·class="inline">Properties</code>·is·the·list·of
334 execution·properties·for·the·group.·The·possible·values·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Properties</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1636904789-1">[</span><span·class="ss">parallel</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">sequence</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Shuffle</s[·...·truncated·by·diffoscope;·len:·309,·SHA:·a809fd2dd2dd73e1bbe86ff710ec3d72ddb83f283a9c203cfc015eb877dcdabc·...·]-1">]</span><span·class="w">334 execution·properties·for·the·group.·The·possible·values·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Properties</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6318315227-1">[</span><span·class="ss">parallel</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">sequence</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Shuffle</s[·...·truncated·by·diffoscope;·len:·309,·SHA:·ecae3ebeefa954af48b49526c553ab44a790d4666eb7f105692b4d042fc34059·...·]-1">]</span><span·class="w">
335 </span><span·class="n">Shuffle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">shuffle</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="1636904789-3">{</span><span·class="ss">shuffle</span><span·class="p">,</span><span·class="n">Seed</span><span·class="p"·data-group-id="1636904789-3">}</span><span·class="w">335 </span><span·class="n">Shuffle</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">shuffle</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="6318315227-3">{</span><span·class="ss">shuffle</span><span·class="p">,</span><span·class="n">Seed</span><span·class="p"·data-group-id="6318315227-3">}</span><span·class="w">
336 </span><span·class="n">Seed</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1636904789-4">{</span><span·class="nf">integer</span><span·class="p"·data-group-id="1636904789-5">(</span><span·class="p"·data-group-id="1636904789-5">)</span><span·class="p">,</span><span·class="nf">integer</span><span·class="p"·data-group-id="1636904789-[·...·truncated·by·diffoscope;·len:·266,·SHA:·e1ff39231bf32de18c1ee82940d54c8e572c591cd1d2acaf21601d10b0086e7b·...·]-4">}</span><span·class="w">336 </span><span·class="n">Seed</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6318315227-4">{</span><span·class="nf">integer</span><span·class="p"·data-group-id="6318315227-5">(</span><span·class="p"·data-group-id="6318315227-5">)</span><span·class="p">,</span><span·class="nf">integer</span><span·class="p"·data-group-id="6318315227-[·...·truncated·by·diffoscope;·len:·266,·SHA:·2dbd9b40b7f53f731c81f284413dfcf353c446901d45bd87580a0aedab1149f2·...·]-4">}</span><span·class="w">
337 </span><span·class="n">GroupRepeatType</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">repeat</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">repeat_until_all_ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">repeat_until_all_fail</span><span·class="w">·</span><span·class="p">|</span><span·class="w">337 </span><span·class="n">GroupRepeatType</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">repeat</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">repeat_until_all_ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">repeat_until_all_fail</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
338 ··················</span><span·class="ss">repeat_until_any_ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">repeat_until_any_fail</span><span·class="w">338 ··················</span><span·class="ss">repeat_until_any_ok</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">repeat_until_any_fail</span><span·class="w">
339 </span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1636904789-8">(</span><span·class="p"·data-group-id="1636904789-8">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">forever</span></code></pre><p><em>Explanations:</em></p><ul><li><p><strong><code·class="inline">parallel</code></strong>·-·<code·class="inline">Common·Test</code>·executes·all·test·cases·in·the·group·in339 </span><span·class="n">N</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="6318315227-8">(</span><span·class="p"·data-group-id="6318315227-8">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">forever</span></code></pre><p><em>Explanations:</em></p><ul><li><p><strong><code·class="inline">parallel</code></strong>·-·<code·class="inline">Common·Test</code>·executes·all·test·cases·in·the·group·in
340 parallel.</p></li><li><p><strong><code·class="inline">sequence</code></strong>·-·The·cases·are·executed·in·a·sequence·as·described·in·section340 parallel.</p></li><li><p><strong><code·class="inline">sequence</code></strong>·-·The·cases·are·executed·in·a·sequence·as·described·in·section
341 <a·href="dependencies_chapter.html#sequences">Sequences</a>·in·section·Dependencies·Between341 <a·href="dependencies_chapter.html#sequences">Sequences</a>·in·section·Dependencies·Between
342 Test·Cases·and·Suites.</p></li><li><p><strong><code·class="inline">shuffle</code></strong>·-·The·cases·in·the·group·are·executed·in·random·order.</p></li><li><p><strong><code·class="inline">repeat,·repeat_until_*</code></strong>·-·Orders·<code·class="inline">Common·Test</code>·to·repeat·execution·of·all342 Test·Cases·and·Suites.</p></li><li><p><strong><code·class="inline">shuffle</code></strong>·-·The·cases·in·the·group·are·executed·in·random·order.</p></li><li><p><strong><code·class="inline">repeat,·repeat_until_*</code></strong>·-·Orders·<code·class="inline">Common·Test</code>·to·repeat·execution·of·all
343 the·cases·in·the·group·a·given·number·of·times,·or·until·any,·or·all,·cases343 the·cases·in·the·group·a·given·number·of·times,·or·until·any,·or·all,·cases
344 fail·or·succeed.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">groups</span><span·class="p"·data-group-id="6804745464-1">(</span><span·class="p"·data-group-id="6804745464-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6804745464-2">[</span><span·class="p"·data-group-id="6804745464-3">{</span><span·class="ss">group1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6804745464-4">[</span><span·class="ss">parallel</span><span·class="p"·data-group-id="6804745464-4">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6804745464-5">[</span><span·class="ss">test1a</span><span·class="p">,</span><span·class="ss">test1b</span><span·class="p"·data-group-id="6804745464-5">]</span><span·class="p"·data-group-id="6804745464-3">}</span><span·class="p">,</span><span·class="w"> 
345 ·············</span><span·class="p"·data-group-id="6804745464-6">{</span><span·class="ss">group2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6804745464-7">[</span><span·class="ss">shuffle</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·604,·SHA:·0a0180db078692d32b5f4f7a37f80c9c88a077b0c1d2ea8e5a466c59a21769c1·...·]344 fail·or·succeed.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">groups</span><span·class="p"·data-group-id="8178902381-1">(</span><span·class="p"·data-group-id="8178902381-1">)</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·711,·SHA:·fb323e0c849f339e1b4712420af54a2864a768a4d9af32932f49e0b6d61978ce·...·]
 345 ·············</span><span·class="p"·data-group-id="8178902381-6">{</span><span·class="ss">group2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8178902381-7">[</span><span·class="ss">shuffle</span><span·class="p">,</span><span·class="ss">sequence</span><span·class="p"·data-group-id="8178902381-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8178902381-8">[</span><span·class="ss">test2a</span><span·class="p">,</span><span·class="ss">test2b</span><span·class="p">,</span><span·class="ss">test2c</span><span·class="p"·data-group-id="8178902381-8">]</span><span·class="p"·data-group-id="8178902381-6">}</span><span·class="p"·data-group-id="8178902381-2">]</span><span·class="p">.</span></code></pre><p>To·specify·in·which·order·groups·are·to·be·executed·(also·with·respect·to·test
346 cases·that·are·not·part·of·any·group),·add·tuples·on·the·form346 cases·that·are·not·part·of·any·group),·add·tuples·on·the·form
347 <code·class="inline">{group,GroupName}</code>·to·the·<code·class="inline">all/0</code>·list.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="8718447914-1">(</span><span·class="p"·data-group-id="8718447914-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8718447914-2">[</span><span·class="ss">testcase1</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·1055,·SHA:·7eb33973eb14959d0fd2482ac87cd16589fdf7a94d38ac3eeb7d0ff6e6383c15·...·]-2">]</span><span·class="p">.</span></code></pre><p>Execution·properties·with·a·group·tuple·in·<code·class="inline">all/0</code>:347 <code·class="inline">{group,GroupName}</code>·to·the·<code·class="inline">all/0</code>·list.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="6681954461-1">(</span><span·class="p"·data-group-id="6681954461-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6681954461-2">[</span><span·class="ss">testcase1</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·1055,·SHA:·83588a2ef594387fb6acc313d91b2e6ab37e3ef27fd18176293c25d60c39e413·...·]-2">]</span><span·class="p">.</span></code></pre><p>Execution·properties·with·a·group·tuple·in·<code·class="inline">all/0</code>:
348 <code·class="inline">{group,GroupName,Properties}</code>·can·also·be·specified.·These·properties·override348 <code·class="inline">{group,GroupName,Properties}</code>·can·also·be·specified.·These·properties·override
349 those·specified·in·the·group·definition·(see·<code·class="inline">groups/0</code>·earlier).·This·way,·the349 those·specified·in·the·group·definition·(see·<code·class="inline">groups/0</code>·earlier).·This·way,·the
350 same·set·of·tests·can·be·run,·but·with·different·properties,·without·having·to350 same·set·of·tests·can·be·run,·but·with·different·properties,·without·having·to
351 make·copies·of·the·group·definition·in·question.</p><p>If·a·group·contains·subgroups,·the·execution·properties·for·these·can·also·be351 make·copies·of·the·group·definition·in·question.</p><p>If·a·group·contains·subgroups,·the·execution·properties·for·these·can·also·be
352 specified·in·the·group·tuple:·<code·class="inline">{group,GroupName,Properties,SubGroups}</code>·Where,352 specified·in·the·group·tuple:·<code·class="inline">{group,GroupName,Properties,SubGroups}</code>·Where,
353 <code·class="inline">SubGroups</code>·is·a·list·of·tuples,·<code·class="inline">{GroupName,Properties}</code>·or353 <code·class="inline">SubGroups</code>·is·a·list·of·tuples,·<code·class="inline">{GroupName,Properties}</code>·or
354 <code·class="inline">{GroupName,Properties,SubGroups}</code>·representing·the·subgroups.·Any·subgroups354 <code·class="inline">{GroupName,Properties,SubGroups}</code>·representing·the·subgroups.·Any·subgroups
355 defined·in·<code·class="inline">groups/0</code>·for·a·group,·that·are·not·specified·in·the·<code·class="inline">SubGroups</code>355 defined·in·<code·class="inline">groups/0</code>·for·a·group,·that·are·not·specified·in·the·<code·class="inline">SubGroups</code>
356 list,·executes·with·their·predefined·properties.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">groups</span><span·class="p"·data-group-id="6285920018-1">(</span><span·class="p"·data-group-id="6285920018-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6285920018-2">[</span><span·class="p"·data-group-id="6285920018-3">{</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6285920018-4">[</span><span·class="p"·data-group-id="6285920018-4">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6285920018-5">[</span><span·class="p"·data-group-id="6285920018-6">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6285920018-7">[</span><span·class="p"·data-group-id="6285920018-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6285920018-8">[</span><span·class="ss">t2a</span><span·class="p">,</span><span·class="ss">t2b</span><span·class="p"·data-group-id="6285920018-8">]</span><span·class="p"·data-group-id="6285920018-6">}</span><span·class="p">,</span><span·class="w"> 
357 ··························</span><span·class="p"·data-group-id="6285920018-9">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6285920018-10">[</span><span·class="p"·data-group-id="6285920[·...·truncated·by·diffoscope;·len:·629,·SHA:·1f33653ae19b53e815818919f9dd844b9d9a5fd5e9d569f79cd3c477ea82a08c·...·]356 list,·executes·with·their·predefined·properties.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">groups</span><span·class="p"·data-group-id="4763880629-1">(</span><span·class="p"·data-group-id="4763880629-1">)</s[·...·truncated·by·diffoscope;·len:·1033,·SHA:·dfffb84a02ae7a6748d5a826a5c5f2ca8d95f9434bd9ddeedbc99949b2c49cd9·...·]
 357 ··························</span><span·class="p"·data-group-id="4763880629-9">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4763880629-10">[</span><span·class="p"·data-group-id="4763880629-10">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4763880629-11">[</span><span·class="ss">t31</span><span·class="p">,</span><span·class="ss">t3b</span><span·class="p"·data-group-id="4763880629-11">]</span><span·class="p"·data-group-id="4763880629-9">}</span><span·class="p"·data-group-id="4763880629-5">]</span><span·class="p"·data-group-id="4763880629-3">}</span><span·class="p"·data-group-id="4763880629-2">]</span><span·class="p">.</span></code></pre><p>To·execute·group·<code·class="inline">tests1</code>·twice·with·different·properties·for·<code·class="inline">tests2</code>·each
358 time:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="3698460360-1">(</span><span·class="p"·data-group-id="3698460360-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">358 time:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="1770412965-1">(</span><span·class="p"·data-group-id="1770412965-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
359 ···</span><span·class="p"·data-group-id="3698460360-2">[</span><span·class="p"·data-group-id="3698460360-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3698460360-4">[</span><span·class="p"·data-group-id="3698460360-5">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3698460360-6">[</span><span·class="ss">parallel</span><span·class="p"·data-group-id="3698460360-6">]</span><span·class="p"·data-group-id="3698460360-5">}</span><span·class="p"·data-group-id="3698460360-4">]</span><span·class="p"·data-group-id="3698460360-3">}</span><span·class="p">,</span><span·class="w"> 
360 ····</span><span·class="p"·data-group-id="3698460360-7">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·cla[·...·truncated·by·diffoscope;·len:·1106,·SHA:·c93a249b404ed338b9edfc3c5a66acb3d18e94aadabcccc60b2ba2ed83e5cd74·...·]</span><span·class="w">359 ···</span><span·class="p"·data-group-id="1770412965-2">[</span><span·class="p"·data-group-id="1770412965-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·589,·SHA:·6983007db6139d426edaf52ebab5d3d98c0926788dfabb7253457407a30b9754·...·]</span><span·class="w">
 360 ····</span><span·class="p"·data-group-id="1770412965-7">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1770412965-8">[</span><span·class="p"·data-group-id="1770412965-9">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1770412965-10">[</span><span·class="ss">shuffle</span><span·class="p">,</span><span·class="p"·data-group-id="1770412965-11">{</span><span·class="ss">repeat</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="1770412965-11">}</span><span·class="p"·data-group-id="1770412965-10">]</span><span·class="p"·data-group-id="1770412965-9">}</span><span·class="p"·data-group-id="1770412965-8">]</span><span·class="p"·data-group-id="1770412965-7">}</span><span·class="p"·data-group-id="1770412965-2">]</span><span·class="p">.</span></code></pre><p>This·is·equivalent·to·the·following·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="7972009057-1">(</span><span·class="p"·data-group-id="7972009057-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
361 ···</span><span·class="p"·data-group-id="4307298975-2">[</span><span·class="p"·data-group-id="4307298975-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</[·...·truncated·by·diffoscope;·len:·416,·SHA:·0b30aa82d4207d6c91bca0803fe9a2fbff3e617d1b5fcf4eca198322d9de082c·...·]-5">}</span><span·class="p">,</span><span·class="w">361 ···</span><span·class="p"·data-group-id="7972009057-2">[</span><span·class="p"·data-group-id="7972009057-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</[·...·truncated·by·diffoscope;·len:·416,·SHA:·71bf29535b39861d3b1fe218e9a35b3b80b110aab01393295fcd486a59999dcb·...·]-5">}</span><span·class="p">,</span><span·class="w">
362 ······························</span><span·class="p"·data-group-id="4307298975-7">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p"·data-group-id="4307298975-7">}</span><span·class="p"·data-group-id="4307298975-4">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·dd39faf0786195c7e66fc040732694b2c8b41f64c78314324c8960a56f6b3f2a·...·]-3">}</span><span·class="p">,</span><span·class="w">362 ······························</span><span·class="p"·data-group-id="7972009057-7">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p"·data-group-id="7972009057-7">}</span><span·class="p"·data-group-id="7972009057-4">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·3031f48a1922e718bad82b72f88021735054a08a7a3c7b88788ead9192456323·...·]-3">}</span><span·class="p">,</span><span·class="w">
363 ····</span><span·class="p"·data-group-id="4307298975-8">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·577,·SHA:·860c45f48e873e345bacb627f417dfaca1b91db8416abe4c2a3334c724506b54·...·]-10">}</span><span·class="p">,</span><span·class="w">363 ····</span><span·class="p"·data-group-id="7972009057-8">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·577,·SHA:·7cdfe29e2cd4e037d7474fea1d98a93370b1d88f5c21c4729ec56610536abb07·...·]-10">}</span><span·class="p">,</span><span·class="w">
364 ······························</span><span·class="p"·data-group-id="4307298975-13">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p"·data-group-id="4307298975-13">}</span><span·class="p"·data-group-id="4307298975-9">]</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·77,·SHA:·9440a6f9cac825a100b2b7a410d69a51194d33c2e2702d5f763f1b73d7ad72c9·...·]-2">]</span><span·class="p">.</span></code></pre><p>Value·<code·class="inline">default</code>·states·that·the·predefined·properties·are·to·be·used.</p><p>The·following·example·shows·how·to·override·properties·in·a·scenario·with·deeply364 ······························</span><span·class="p"·data-group-id="7972009057-13">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p"·data-group-id="7972009057-13">}</span><span·class="p"·data-group-id="7972009057-9">]</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·77,·SHA:·2cdf80f9f2ee762873985b4ebaf456a60746cdc0e60b7c9c43700911811821e7·...·]-2">]</span><span·class="p">.</span></code></pre><p>Value·<code·class="inline">default</code>·states·that·the·predefined·properties·are·to·be·used.</p><p>The·following·example·shows·how·to·override·properties·in·a·scenario·with·deeply
365 nested·groups:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">groups</span><span·class="p"·data-group-id="2531840134-1">(</span><span·class="p"·data-group-id="2531840134-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">365 nested·groups:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">groups</span><span·class="p"·data-group-id="2808689890-1">(</span><span·class="p"·data-group-id="2808689890-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
366 ···</span><span·class="p"·data-group-id="2531840134-2">[</span><span·class="p"·data-group-id="2531840134-3">{</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2531840134-4">[</span><span·class="p"·data-group-id="2531840134-4">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2531840134-5">[</span><span·class="p"·data-group-id="2531840134-6">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests2</span><span·class="p"·data-group-id="2531840134-6">}</span><span·class="p"·data-group-id="2531840134-5">]</span><span·class="p"·data-group-id="2531840134-3">}</span><span·class="p">,</span><span·class="w"> 
367 ····</span><span·class="p"·data-group-id="2531840134-7">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2531840134-8">[</span><span·class="p"·data-group-id="2531840134-8">]</span><span·class[·...·truncated·by·diffoscope;·len:·401,·SHA:·4a1f0f6f066aec2bb595853d94c02330073600e18489f5eb232f56b095393615·...·]">}</span><span·class="p">,</span><span·class="w">366 ···</span><span·class="p"·data-group-id="2808689890-2">[</span><span·class="p"·data-group-id="2808689890-3">{</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2808689890-4">[</span><span·class=[·...·truncated·by·diffoscope;·len:·451,·SHA:·681d88781bafa9483954c01f3662d2d0120bae554b8d642f9038fcc394e00c3f·...·]">}</span><span·class="p">,</span><span·class="w">
 367 ····</span><span·class="p"·data-group-id="2808689890-7">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2808689890-8">[</span><span·class="p"·data-group-id="2808689890-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2808689890-9">[</span><span·class="p"·data-group-id="2808689890-10">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests3</span><span·class="p"·data-group-id="2808689890-10">}</span><span·class="p"·data-group-id="2808689890-9">]</span><span·class="p"·data-group-id="2808689890-7">}</span><span·class="p">,</span><span·class="w">
368 ····</span><span·class="p"·data-group-id="2531840134-11">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2531840134-12">[</span><span·class="p"·data-group-id="2531840134-13">{</span><span·class="ss">repeat</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·519,·SHA:·532b19a4d2ebec267ef9c1748a2508d81a19b6822b8b03de2ec3eedc2dc26319·...·]-2">]</span><span·class="p">.</span><span·class="w">368 ····</span><span·class="p"·data-group-id="2808689890-11">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2808689890-12">[</span><span·class="p"·data-group-id="2808689890-13">{</span><span·class="ss">repeat</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·519,·SHA:·f55099c58eb88c126cb2fb5e6122ef2a4d03e411a2d25ca5ce022f65e17055e2·...·]-2">]</span><span·class="p">.</span><span·class="w">
  
369 </span><span·class="nf">all</span><span·class="p"·data-group-id="2531840134-15">(</span><span·class="p"·data-group-id="2531840134-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">369 </span><span·class="nf">all</span><span·class="p"·data-group-id="2808689890-15">(</span><span·class="p"·data-group-id="2808689890-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
370 ···</span><span·class="p"·data-group-id="2531840134-16">[</span><span·class="p"·data-group-id="2531840134-17">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">370 ···</span><span·class="p"·data-group-id="2808689890-16">[</span><span·class="p"·data-group-id="2808689890-17">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">
371 ·····</span><span·class="p"·data-group-id="2531840134-18">[</span><span·class="p"·data-group-id="2531840134-19">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">371 ·····</span><span·class="p"·data-group-id="2808689890-18">[</span><span·class="p"·data-group-id="2808689890-19">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">
372 ·······</span><span·class="p"·data-group-id="2531840134-20">[</span><span·class="p"·data-group-id="2531840134-21">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2531840134-22">[</span><span·class="ss">parallel</span><span·class="p">[·...·truncated·by·diffoscope;·len:·562,·SHA:·893ee770a63c06a4238146047c38c0c9904cb687d4b7b90d0a6dba047700d653·...·]-16">]</span><span·class="p">.</span></code></pre><p>For·ease·of·readability,·all·syntax·definitions·can·be·replaced·by·a·function372 ·······</span><span·class="p"·data-group-id="2808689890-20">[</span><span·class="p"·data-group-id="2808689890-21">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2808689890-22">[</span><span·class="ss">parallel</span><span·class="p">[·...·truncated·by·diffoscope;·len:·562,·SHA:·5aef50992d2722efe21447eb321edabc0c183a7704dcbb03abe594975d735b65·...·]-16">]</span><span·class="p">.</span></code></pre><p>For·ease·of·readability,·all·syntax·definitions·can·be·replaced·by·a·function
373 call·whose·return·value·should·match·the·expected·syntax·case.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="3175422066-1">(</span><span·class="p"·data-group-id="3175422066-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">373 call·whose·return·value·should·match·the·expected·syntax·case.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">all</span><span·class="p"·data-group-id="7563178016-1">(</span><span·class="p"·data-group-id="7563178016-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
374 ···</span><span·class="p"·data-group-id="3175422066-2">[</span><span·class="p"·data-group-id="3175422066-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</[·...·truncated·by·diffoscope;·len:·233,·SHA:·aa3fe6f765cfc6e2ca87ac48363efa4a8aa60a424308c45d1152b98e882fb14a·...·]6-3">}</span><span·class="p">,</span><span·class="w">374 ···</span><span·class="p"·data-group-id="7563178016-2">[</span><span·class="p"·data-group-id="7563178016-3">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</[·...·truncated·by·diffoscope;·len:·233,·SHA:·97fbe7b27a0643f7a70b60c1d39448f5759d06bc4cdbcb581a1a8e947d7e22eb·...·]6-3">}</span><span·class="p">,</span><span·class="w">
375 ····</span><span·class="p"·data-group-id="3175422066-5">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·182,·SHA:·638325ee254a29aba1e0fd5b981e153a958cec87233c906e58f87d327396c46a·...·]6-7">)</span><span·class="p">,</span><span·class="w">375 ····</span><span·class="p"·data-group-id="7563178016-5">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tests1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·182,·SHA:·ac84bcae4324e98da9ac6b56bb4085302aa6d46fea8c173494698c1462a3cdab·...·]6-7">)</span><span·class="p">,</span><span·class="w">
376 ······························</span><span·class="p"·data-group-id="3175422066-8">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p"·data-group-id="3175422066-8">}</span><span·class="p"·data-group-id="3175422066-6">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·74,·SHA:·926b50cd78cbf5ec2ee47891271317f30cb5f49776872d75acc3d2422d1d0627·...·]6-2">]</span><span·class="p">.</span><span·class="w">376 ······························</span><span·class="p"·data-group-id="7563178016-8">{</span><span·class="ss">tests3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p"·data-group-id="7563178016-8">}</span><span·class="p"·data-group-id="7563178016-6">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·74,·SHA:·3282034c9002ae35a24a18e643fdf937b3d1d46fb511668c9d31cf650d1d8da0·...·]6-2">]</span><span·class="p">.</span><span·class="w">
377 </span><span·class="nf">test_cases</span><span·class="p"·data-group-id="3175422066-9">(</span><span·class="p"·data-group-id="3175422066-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">377 </span><span·class="nf">test_cases</span><span·class="p"·data-group-id="7563178016-9">(</span><span·class="p"·data-group-id="7563178016-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
378 ···</span><span·class="p"·data-group-id="3175422066-10">[</span><span·class="p"·data-group-id="3175422066-11">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3175422066-12">[</span><span·class="ss">parallel</span><span·class="p"[·...·truncated·by·diffoscope;·len:·398,·SHA:·51d7c9c7117fe7d0796f3f53d6422812bc34fb768d12e6aaa1c4a56f0e35c200·...·]6-10">]</span><span·class="p">.</span><span·class="w">378 ···</span><span·class="p"·data-group-id="7563178016-10">[</span><span·class="p"·data-group-id="7563178016-11">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7563178016-12">[</span><span·class="ss">parallel</span><span·class="p"[·...·truncated·by·diffoscope;·len:·398,·SHA:·dc48baac7963cfb5ee8de21cc41bf5129e00c46f11b313234f1caaa67e67c221·...·]6-10">]</span><span·class="p">.</span><span·class="w">
  
379 </span><span·class="nf">shuffle_test</span><span·class="p"·data-group-id="3175422066-14">(</span><span·class="p"·data-group-id="3175422066-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">379 </span><span·class="nf">shuffle_test</span><span·class="p"·data-group-id="7563178016-14">(</span><span·class="p"·data-group-id="7563178016-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
380 ···</span><span·class="p"·data-group-id="3175422066-15">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3175422066-16">[</span><span·class="ss">shuffle</span><span·class="p">,</span><span·class="p"·data-group-id="3175422066-17">[·...·truncated·by·diffoscope;·len:·236,·SHA:·f837a01965b4e2f6d30e1b76f1c6bbdf26db6d0091fa3c23b05234267f358083·...·]6-15">}</span><span·class="p">.</span></code></pre><p>The·described·syntax·can·also·be·used·in·test·specifications·to·change·group380 ···</span><span·class="p"·data-group-id="7563178016-15">{</span><span·class="ss">tests2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7563178016-16">[</span><span·class="ss">shuffle</span><span·class="p">,</span><span·class="p"·data-group-id="7563178016-17">[·...·truncated·by·diffoscope;·len:·236,·SHA:·9713beb591f5b5d40bbec55260fefda15035b57fbf80dc5784cbe0d44abe48ef·...·]6-15">}</span><span·class="p">.</span></code></pre><p>The·described·syntax·can·also·be·used·in·test·specifications·to·change·group
381 properties·at·the·time·of·execution,·without·having·to·edit·the·test·suite.·For381 properties·at·the·time·of·execution,·without·having·to·edit·the·test·suite.·For
382 more·information,·see·section382 more·information,·see·section
Max diff block lines reached; 43062/111728 bytes (38.54%) of diff not shown.
5.84 KB
./usr/share/doc/erlang-doc/html/lib/compiler-8.5.1/doc/html/beam_ssa.html
    
Offset 184, 16 lines modifiedOffset 184, 16 lines modified
  
184 </span><span·class="nc">landing_pad_block</span><span·class="p">:</span><span·class="w">184 </span><span·class="nc">landing_pad_block</span><span·class="p">:</span><span·class="w">
185 ···</span><span·class="p">@</span><span·class="ss">aggregate</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">landingpad</span><span·class="w">·</span><span·class="k">catch</span><span·class="p">,</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">tag</span><span·class="w">185 ···</span><span·class="p">@</span><span·class="ss">aggregate</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">landingpad</span><span·class="w">·</span><span·class="k">catch</span><span·class="p">,</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">tag</span><span·class="w">
186 ···</span><span·class="p">@</span><span·class="ss">catched_val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">extract</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">ssa_agg</span><span·class="p">,</span><span·class="w">·</span><span·class="err">`</span><span·class="mi">0</span><span·class="err">`</span><span·class="w">186 ···</span><span·class="p">@</span><span·class="ss">catched_val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">extract</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">ssa_agg</span><span·class="p">,</span><span·class="w">·</span><span·class="err">`</span><span·class="mi">0</span><span·class="err">`</span><span·class="w">
187 ···</span><span·class="ss">br</span><span·class="w">·</span><span·class="err">^</span><span·class="ss">common_end_of_catch</span><span·class="w">187 ···</span><span·class="ss">br</span><span·class="w">·</span><span·class="err">^</span><span·class="ss">common_end_of_catch</span><span·class="w">
  
188 </span><span·class="nc">common_end_of_catch</span><span·class="p">:</span><span·class="w">188 </span><span·class="nc">common_end_of_catch</span><span·class="p">:</span><span·class="w">
189 ··</span><span·class="p">@</span><span·class="ss">tmp</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">phi</span><span·class="w">·</span><span·class="p"·data-group-id="6346181133-1">{</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">catched_val</span><span·class="p">,</span><span·class="w">·</span><span·class="err">^</span><span·class="ss">landing_pad_block</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·f11fc64dc13342058bf3ba59deb58169010176872e5f627280fda7a7215db884·...·]-1">}</span><span·class="p">,</span><span·class="w">189 ··</span><span·class="p">@</span><span·class="ss">tmp</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">phi</span><span·class="w">·</span><span·class="p"·data-group-id="2220182945-1">{</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">catched_val</span><span·class="p">,</span><span·class="w">·</span><span·class="err">^</span><span·class="ss">landing_pad_block</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·54ea1cb6d34eea2724e3edbb5fdcb368d1cfc48ff589941256360e0a968fb759·...·]-1">}</span><span·class="p">,</span><span·class="w">
190 ·············</span><span·class="p"·data-group-id="6346181133-2">{</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">successful_result</span><span·class="p">,</span><span·class="w">·</span><span·class="err">^</span><span·class="ss">protected_blockN</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·b4eeef347f52210899fed1f52644d7312adde181dcb05989da8162e699973f97·...·]-2">}</span><span·class="w">190 ·············</span><span·class="p"·data-group-id="2220182945-2">{</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">successful_result</span><span·class="p">,</span><span·class="w">·</span><span·class="err">^</span><span·class="ss">protected_blockN</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·16485488d9cfbcbba0fb9f77bdc9c68449a5bb27a50fefd343848e1ad05fbb3d·...·]-2">}</span><span·class="w">
191 ··</span><span·class="p">@</span><span·class="ss">result_of_catch_expr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">catch_end</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">tag</span><span·class="p">,</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">tmp</span></code></pre><p>Just·as·for·a·<code·class="inline">try</code>-<code·class="inline">catch</code>·expression·all·code·that·can·cause·an191 ··</span><span·class="p">@</span><span·class="ss">result_of_catch_expr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">catch_end</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">tag</span><span·class="p">,</span><span·class="w">·</span><span·class="p">@</span><span·class="ss">tmp</span></code></pre><p>Just·as·for·a·<code·class="inline">try</code>-<code·class="inline">catch</code>·expression·all·code·that·can·cause·an
192 exception·in·one·of·the·protected·blocks·must·have·explicit·control192 exception·in·one·of·the·protected·blocks·must·have·explicit·control
193 flow·edges·to·the·landing·pad·block.</p><h2·id="exception-re-issuing"·class="section-heading">193 flow·edges·to·the·landing·pad·block.</p><h2·id="exception-re-issuing"·class="section-heading">
194 ··<a·href="#exception-re-issuing"·class="hover-link">194 ··<a·href="#exception-re-issuing"·class="hover-link">
195 ····<i·class="ri-link-m"·aria-hidden="true"></i>195 ····<i·class="ri-link-m"·aria-hidden="true"></i>
196 ··</a>196 ··</a>
197 ··<span·class="text">Exception·Re-issuing</span>197 ··<span·class="text">Exception·Re-issuing</span>
Offset 230, 15 lines modifiedOffset 230, 15 lines modified
230 proven·to·always·succeed·or·fail.</p></li></ul><h2·id="variable-naming"·class="section-heading">230 proven·to·always·succeed·or·fail.</p></li></ul><h2·id="variable-naming"·class="section-heading">
231 ··<a·href="#variable-naming"·class="hover-link">231 ··<a·href="#variable-naming"·class="hover-link">
232 ····<i·class="ri-link-m"·aria-hidden="true"></i>232 ····<i·class="ri-link-m"·aria-hidden="true"></i>
233 ··</a>233 ··</a>
234 ··<span·class="text">Variable·Naming</span>234 ··<span·class="text">Variable·Naming</span>
235 </h2>235 </h2>
236 <p>A·variable·name·in·BEAM·SSA·is·either·an·atom·or·a·non-negative236 <p>A·variable·name·in·BEAM·SSA·is·either·an·atom·or·a·non-negative
237 integer:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">atom</span><span·class="p"·data-group-id="4498659991-1">(</span><span·class="p"·data-group-id="4498659991-1">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="4498659991-2">(</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·c0a9c73c8d35513c7ee1ab6b3b76ca8896f7d0711b8764dcd7a3a6ecb4716813·...·]-2">)</span></code></pre><p>In·order·to·generate·fresh·unused·variable·names,·all·compiler237 integer:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">atom</span><span·class="p"·data-group-id="2317300160-1">(</span><span·class="p"·data-group-id="2317300160-1">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="2317300160-2">(</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·83f3d280097b419548b7ee12cb871e1c82fa99ea2784aa5de5daf3c36e874437·...·]-2">)</span></code></pre><p>In·order·to·generate·fresh·unused·variable·names,·all·compiler
238 transforms·maintain·a·counter,·the·<code·class="inline">cnt</code>-field·in·the·<code·class="inline">b_function</code>·and238 transforms·maintain·a·counter,·the·<code·class="inline">cnt</code>-field·in·the·<code·class="inline">b_function</code>·and
239 <code·class="inline">opt_st</code>·records,·which·is·incremented·each·time·a·new·variable·or239 <code·class="inline">opt_st</code>·records,·which·is·incremented·each·time·a·new·variable·or
240 label·is·created.·In·the·following·description·the·value·of·the240 label·is·created.·In·the·following·description·the·value·of·the
241 <code·class="inline">cnt</code>-field·is·called·<code·class="inline">Cnt</code>.·The·<code·class="inline">Cnt</code>·value·is·guaranteed·to·never241 <code·class="inline">cnt</code>-field·is·called·<code·class="inline">Cnt</code>.·The·<code·class="inline">Cnt</code>·value·is·guaranteed·to·never
242 clash·with·a·previously·defined·variable·name.·Therefore,·value·of242 clash·with·a·previously·defined·variable·name.·Therefore,·value·of
243 <code·class="inline">Cnt</code>·can·directly·be·used·as·a·variable·name·in·the·SSA·passes.</p><p>Note·that·the·rules·were·more·complicated·before·Erlang/OTP·27,·because243 <code·class="inline">Cnt</code>·can·directly·be·used·as·a·variable·name·in·the·SSA·passes.</p><p>Note·that·the·rules·were·more·complicated·before·Erlang/OTP·27,·because
244 the·<code·class="inline">Cnt</code>·value·could·clash·with·other·variables.</p>244 the·<code·class="inline">Cnt</code>·value·could·clash·with·other·variables.</p>
15.2 KB
./usr/share/doc/erlang-doc/html/lib/compiler-8.5.1/doc/html/compile.html
    
Offset 149, 15 lines modifiedOffset 149, 15 lines modified
149 ····<i·class="ri-link-m"·aria-hidden="true"></i>149 ····<i·class="ri-link-m"·aria-hidden="true"></i>
150 ··</a>150 ··</a>
151 ··<span·class="text">Order·of·Compiler·Options</span>151 ··<span·class="text">Order·of·Compiler·Options</span>
152 </h2>152 </h2>
153 <p>Options·given·in·the·<code·class="inline">compile()</code>·attribute·in·the·source·code·take153 <p>Options·given·in·the·<code·class="inline">compile()</code>·attribute·in·the·source·code·take
154 precedence·over·options·given·to·the·compiler,·which·in·turn·take154 precedence·over·options·given·to·the·compiler,·which·in·turn·take
155 precedence·over·options·given·in·the·environment.</p><p>A·later·compiler·option·takes·precedence·over·an·earlier·one·in·the155 precedence·over·options·given·in·the·environment.</p><p>A·later·compiler·option·takes·precedence·over·an·earlier·one·in·the
156 option·list.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="5602669963-1">(</span><span·class="ss">something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5602669963-2">[</span><span·class="ss">nowarn_missing_spec</span><span·class="p">,</span><span·class="ss">warn_missing_spe[·...·truncated·by·diffoscope;·len:·102,·SHA:·8ecc74f3249a9418e2d8aae2883e2c20969fe9dd5967ef2130dbfd1b6e1a2329·...·]-1">)</span><span·class="p">.</span></code></pre><p>Warnings·will·be·emitted·for·functions·without·specifications,·unless156 option·list.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="4787745121-1">(</span><span·class="ss">something</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4787745121-2">[</span><span·class="ss">nowarn_missing_spec</span><span·class="p">,</span><span·class="ss">warn_missing_spe[·...·truncated·by·diffoscope;·len:·102,·SHA:·67a523404e5342e620498f15504f770e63986425bc613dd5b03f9a40eee144e6·...·]-1">)</span><span·class="p">.</span></code></pre><p>Warnings·will·be·emitted·for·functions·without·specifications,·unless
157 the·source·code·for·module·<code·class="inline">something</code>·contains·a·<code·class="inline">compile(nowarn_missing_spec)</code>157 the·source·code·for·module·<code·class="inline">something</code>·contains·a·<code·class="inline">compile(nowarn_missing_spec)</code>
158 attribute.</p><blockquote><h4·class="info">Change</h4><p>In·Erlang/OTP·26·and·earlier,·the·option·order·was·the·opposite·of·what158 attribute.</p><blockquote><h4·class="info">Change</h4><p>In·Erlang/OTP·26·and·earlier,·the·option·order·was·the·opposite·of·what
159 is·described·here.</p></blockquote><h2·id="module-inlining"·class="section-heading">159 is·described·here.</p></blockquote><h2·id="module-inlining"·class="section-heading">
160 ··<a·href="#module-inlining"·class="hover-link">160 ··<a·href="#module-inlining"·class="hover-link">
161 ····<i·class="ri-link-m"·aria-hidden="true"></i>161 ····<i·class="ri-link-m"·aria-hidden="true"></i>
162 ··</a>162 ··</a>
163 ··<span·class="text">Inlining</span>163 ··<span·class="text">Inlining</span>
Offset 173, 22 lines modifiedOffset 173, 22 lines modified
173 all·calls·to·the·function·are·inlined.</p><p>Inlining·does·not·necessarily·improve·running·time.·For·example,·inlining·can173 all·calls·to·the·function·are·inlined.</p><p>Inlining·does·not·necessarily·improve·running·time.·For·example,·inlining·can
174 increase·Beam·stack·use,·which·probably·is·detrimental·to·performance·for174 increase·Beam·stack·use,·which·probably·is·detrimental·to·performance·for
175 recursive·functions.</p><p>Inlining·is·never·default.·It·must·be·explicitly·enabled·with·a·compiler·option175 recursive·functions.</p><p>Inlining·is·never·default.·It·must·be·explicitly·enabled·with·a·compiler·option
176 or·a·<code·class="inline">-compile()</code>·attribute·in·the·source·module.</p><p>To·enable·inlining,·either·use·the·option·<code·class="inline">inline</code>·to·let·the·compiler·decide176 or·a·<code·class="inline">-compile()</code>·attribute·in·the·source·module.</p><p>To·enable·inlining,·either·use·the·option·<code·class="inline">inline</code>·to·let·the·compiler·decide
177 which·functions·to·inline,·or·<code·class="inline">{inline,[{Name,Arity},...]}</code>·to·have·the·compiler177 which·functions·to·inline,·or·<code·class="inline">{inline,[{Name,Arity},...]}</code>·to·have·the·compiler
178 inline·all·calls·to·the·given·functions.·If·the·option·is·given·inside·a178 inline·all·calls·to·the·given·functions.·If·the·option·is·given·inside·a
179 <code·class="inline">compile</code>·directive·in·an·Erlang·module,·<code·class="inline">{Name,Arity}</code>·can·be·written·as179 <code·class="inline">compile</code>·directive·in·an·Erlang·module,·<code·class="inline">{Name,Arity}</code>·can·be·written·as
180 <code·class="inline">Name/Arity</code>.</p><p>Example·of·explicit·inlining:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="1004793316-1">(</span><span·class="p"·data-group-id="1004793316-2">{</span><span·class="ss">inline</span><span·class="p">,</span><span·class="p"·data-group-id="1004793316-3">[</span><span·class="ss">pi</span><span·class="p">/</span><span·class="mi">0</span[·...·truncated·by·diffoscope;·len:·148,·SHA:·a80027b1b35d4598d43f957a5acf5ccbc26c755358ffb2e4e1cb304cf3ee02bd·...·]-1">)</span><span·class="p">.</span><span·class="w">180 <code·class="inline">Name/Arity</code>.</p><p>Example·of·explicit·inlining:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="3240674482-1">(</span><span·class="p"·data-group-id="3240674482-2">{</span><span·class="ss">inline</span><span·class="p">,</span><span·class="p"·data-group-id="3240674482-3">[</span><span·class="ss">pi</span><span·class="p">/</span><span·class="mi">0</span[·...·truncated·by·diffoscope;·len:·148,·SHA:·cbb92f3ff8113ebdf870aefd51f5abda282174d6f641a05f3a2568b0ffe3ca0b·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
181 </span><span·class="nf">pi</span><span·class="p"·data-group-id="1004793316-4">(</span><span·class="p"·data-group-id="1004793316-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mf">3.1416</span><span·class="p">.</span></code></pre><p>Example·of·implicit·inlining:</p><pre><code·class="text">-compile(inline).</code></pre><p>The·option·<code·class="inline">{inline_size,Size}</code>·controls·how·large·functions·that·are·allowed·to181 </span><span·class="nf">pi</span><span·class="p"·data-group-id="3240674482-4">(</span><span·class="p"·data-group-id="3240674482-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mf">3.1416</span><span·class="p">.</span></code></pre><p>Example·of·implicit·inlining:</p><pre><code·class="text">-compile(inline).</code></pre><p>The·option·<code·class="inline">{inline_size,Size}</code>·controls·how·large·functions·that·are·allowed·to
182 be·inlined.·Default·is·<code·class="inline">24</code>,·which·keeps·the·size·of·the·inlined·code·roughly182 be·inlined.·Default·is·<code·class="inline">24</code>,·which·keeps·the·size·of·the·inlined·code·roughly
183 the·same·as·the·un-inlined·version·(only·relatively·small·functions·are183 the·same·as·the·un-inlined·version·(only·relatively·small·functions·are
184 inlined).</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Aggressive·inlining·-·will·increase·code·size.</span><span·class="w">184 inlined).</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Aggressive·inlining·-·will·increase·code·size.</span><span·class="w">
185 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="6031600809-1">(</span><span·class="ss">inline</span><span·class="p"·data-group-id="6031600809-1">)</span><span·class="p">.</span><span·class="w">185 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="8822927185-1">(</span><span·class="ss">inline</span><span·class="p"·data-group-id="8822927185-1">)</span><span·class="p">.</span><span·class="w">
186 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="6031600809-2">(</span><span·class="p"·data-group-id="6031600809-3">{</span><span·class="ss">inline_size</span><span·class="p">,</span><span·class="mi">100</span><span·class="p"·data-group-id="6031600809-3">}</span><span·class="p"·data-group-id="6031600809-2">)</span><span·class="p">.</span></code></pre><h2·id="module-inlining-of-list-functions"·class="section-heading">186 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="8822927185-2">(</span><span·class="p"·data-group-id="8822927185-3">{</span><span·class="ss">inline_size</span><span·class="p">,</span><span·class="mi">100</span><span·class="p"·data-group-id="8822927185-3">}</span><span·class="p"·data-group-id="8822927185-2">)</span><span·class="p">.</span></code></pre><h2·id="module-inlining-of-list-functions"·class="section-heading">
187 ··<a·href="#module-inlining-of-list-functions"·class="hover-link">187 ··<a·href="#module-inlining-of-list-functions"·class="hover-link">
188 ····<i·class="ri-link-m"·aria-hidden="true"></i>188 ····<i·class="ri-link-m"·aria-hidden="true"></i>
189 ··</a>189 ··</a>
190 ··<span·class="text">Inlining·of·List·Functions</span>190 ··<span·class="text">Inlining·of·List·Functions</span>
191 </h2>191 </h2>
192 <p>The·compiler·can·also·inline·various·list·manipulation·functions·from·the·module192 <p>The·compiler·can·also·inline·various·list·manipulation·functions·from·the·module
193 <code·class="inline">list</code>·in·STDLIB.</p><p>This·feature·must·be·explicitly·enabled·with·a·compiler·option·or·a·<code·class="inline">-compile()</code>193 <code·class="inline">list</code>·in·STDLIB.</p><p>This·feature·must·be·explicitly·enabled·with·a·compiler·option·or·a·<code·class="inline">-compile()</code>
Offset 928, 18 lines modifiedOffset 928, 18 lines modified
928 features.</p><blockquote><h4·class="info">Note</h4><p>This·option·has·no·effect·when·used·in·a·<code·class="inline">-compile(..)</code>·attribute.·Instead,928 features.</p><blockquote><h4·class="info">Note</h4><p>This·option·has·no·effect·when·used·in·a·<code·class="inline">-compile(..)</code>·attribute.·Instead,
929 the·<code·class="inline">-feature(..)</code>·directive·(described·next)·should·be·used.</p><p><a·href=""·id="feature-directive"></a>·A·feature·can·also·be·enabled·(disabled)·using929 the·<code·class="inline">-feature(..)</code>·directive·(described·next)·should·be·used.</p><p><a·href=""·id="feature-directive"></a>·A·feature·can·also·be·enabled·(disabled)·using
930 the·<code·class="inline">-feature(Feature,·enable·|·disable).</code>·module·directive.·Note·that·this930 the·<code·class="inline">-feature(Feature,·enable·|·disable).</code>·module·directive.·Note·that·this
931 directive·can·only·be·present·in·a·prefix·of·the·file,·before·exports·and931 directive·can·only·be·present·in·a·prefix·of·the·file,·before·exports·and
932 function·definitions.·This·is·the·preferred·method·of·enabling·and·disabling932 function·definitions.·This·is·the·preferred·method·of·enabling·and·disabling
933 features,·since·it·is·a·local·property·of·a·module.</p></blockquote></li><li><p><strong><code·class="inline">makedep</code></strong>·-·Produces·a·Makefile·rule·to·track·headers·dependencies.·No933 features,·since·it·is·a·local·property·of·a·module.</p></blockquote></li><li><p><strong><code·class="inline">makedep</code></strong>·-·Produces·a·Makefile·rule·to·track·headers·dependencies.·No
934 object·file·is·produced.</p><p>By·default,·this·rule·is·written·to·<code·class="inline">&lt;File&gt;.Pbeam</code>.·However,·if·option934 object·file·is·produced.</p><p>By·default,·this·rule·is·written·to·<code·class="inline">&lt;File&gt;.Pbeam</code>.·However,·if·option
935 <code·class="inline">binary</code>·is·set,·nothing·is·written·and·the·rule·is·returned·in·<code·class="inline">Binary</code>.</p><p>The·output·will·be·encoded·in·UTF-8.</p><p>For·example,·if·you·have·the·following·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6698076916-1">(</span><span·class="ss">module</span><span·class="p"·data-group-id="6698076916-1">)</span><span·class="p">.</span><span·class="w">935 <code·class="inline">binary</code>·is·set,·nothing·is·written·and·the·rule·is·returned·in·<code·class="inline">Binary</code>.</p><p>The·output·will·be·encoded·in·UTF-8.</p><p>For·example,·if·you·have·the·following·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8580434103-1">(</span><span·class="ss">module</span><span·class="p"·data-group-id="8580434103-1">)</span><span·class="p">.</span><span·class="w">
936 </span><span·class="w">936 </span><span·class="w">
937 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6698076916-2">(</span><span·class="s">&quot;eunit/include/eunit.hrl&quot;</span><span·class="p"·data-group-id="6698076916-2">)</span><span·class="p">.</span><span·class="w">937 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="8580434103-2">(</span><span·class="s">&quot;eunit/include/eunit.hrl&quot;</span><span·class="p"·data-group-id="8580434103-2">)</span><span·class="p">.</span><span·class="w">
938 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="6698076916-3">(</span><span·class="s">&quot;header.hrl&quot;</span><span·class="p"·data-group-id="6698076916-3">)</span><span·class="p">.</span></code></pre><p>The·Makefile·rule·generated·by·this·option·looks·as·follows:</p><pre><code·class="text">module.beam:·module.erl·\938 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="8580434103-3">(</span><span·class="s">&quot;header.hrl&quot;</span><span·class="p"·data-group-id="8580434103-3">)</span><span·class="p">.</span></code></pre><p>The·Makefile·rule·generated·by·this·option·looks·as·follows:</p><pre><code·class="text">module.beam:·module.erl·\
939 ··/usr/local/lib/erlang/lib/eunit/include/eunit.hrl·\939 ··/usr/local/lib/erlang/lib/eunit/include/eunit.hrl·\
940 ··header.hrl</code></pre></li><li><p><strong><code·class="inline">makedep_side_effect</code></strong>·-·The·dependencies·are·created·as·a·side·effect·to940 ··header.hrl</code></pre></li><li><p><strong><code·class="inline">makedep_side_effect</code></strong>·-·The·dependencies·are·created·as·a·side·effect·to
941 the·normal·compilation·process.·This·means·that·the·object·file·will·also·be941 the·normal·compilation·process.·This·means·that·the·object·file·will·also·be
942 produced.·This·option·override·the·<code·class="inline">makedep</code>·option.</p></li><li><p><strong><code·class="inline">{makedep_output,·Output}</code></strong>·-·Writes·generated·rules·to·<code·class="inline">Output</code>·instead·of942 produced.·This·option·override·the·<code·class="inline">makedep</code>·option.</p></li><li><p><strong><code·class="inline">{makedep_output,·Output}</code></strong>·-·Writes·generated·rules·to·<code·class="inline">Output</code>·instead·of
943 the·default·<code·class="inline">&lt;File&gt;.Pbeam</code>.·<code·class="inline">Output</code>·can·be·a·filename·or·an·<code·class="inline">io_device()</code>.·To943 the·default·<code·class="inline">&lt;File&gt;.Pbeam</code>.·<code·class="inline">Output</code>·can·be·a·filename·or·an·<code·class="inline">io_device()</code>.·To
944 write·to·stdout,·use·<code·class="inline">standard_io</code>.·However,·if·<code·class="inline">binary</code>·is·set,·nothing·is944 write·to·stdout,·use·<code·class="inline">standard_io</code>.·However,·if·<code·class="inline">binary</code>·is·set,·nothing·is
945 written·to·<code·class="inline">Output</code>·and·the·result·is·returned·to·the·caller·with945 written·to·<code·class="inline">Output</code>·and·the·result·is·returned·to·the·caller·with
Offset 997, 15 lines modifiedOffset 997, 15 lines modified
997 that·verification·(there·will·not·even·be·a·warning·if·there·is·a997 that·verification·(there·will·not·even·be·a·warning·if·there·is·a
998 mismatch).</p></li><li><p><strong><code·class="inline">{no_auto_import,[{F,A},·...]}</code></strong>·-·Makes·the·function·<code·class="inline">F/A</code>·no·longer·being998 mismatch).</p></li><li><p><strong><code·class="inline">{no_auto_import,[{F,A},·...]}</code></strong>·-·Makes·the·function·<code·class="inline">F/A</code>·no·longer·being
999 auto-imported·from·the·<code·class="inline">erlang</code>·module,·which·resolves·BIF·name·clashes.·This999 auto-imported·from·the·<code·class="inline">erlang</code>·module,·which·resolves·BIF·name·clashes.·This
1000 option·must·be·used·to·resolve·name·clashes·with·auto-imported·BIFs·that·existed1000 option·must·be·used·to·resolve·name·clashes·with·auto-imported·BIFs·that·existed
1001 before·Erlang/OTP·R14A··when·calling·a·local·function·with·the·same·name1001 before·Erlang/OTP·R14A··when·calling·a·local·function·with·the·same·name
1002 as·an·auto-imported·BIF·without·module·prefix.</p><p>If·the·BIF·is·to·be·called,·use·the·<code·class="inline">erlang</code>·module·prefix1002 as·an·auto-imported·BIF·without·module·prefix.</p><p>If·the·BIF·is·to·be·called,·use·the·<code·class="inline">erlang</code>·module·prefix
1003 in·the·call,·not·<code·class="inline">{no_auto_import,[{F,A},·...]}</code>.</p><p>If·this·option·is·written·in·the·source·code,·as·a·<code·class="inline">-compile</code>·directive,·the1003 in·the·call,·not·<code·class="inline">{no_auto_import,[{F,A},·...]}</code>.</p><p>If·this·option·is·written·in·the·source·code,·as·a·<code·class="inline">-compile</code>·directive,·the
1004 syntax·<code·class="inline">F/A</code>·can·be·used·instead·of·<code·class="inline">{F,A}</code>.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="5535999455-1">(</span><span·class="p"·data-group-id="5535999455-2">{</span><span·class="ss">no_auto_import</span><span·class="p">,</span><span·class="p"·data-group-id="5535999455-3">[</span><span·class="ss">error</span><span·class="p">/</span><span·class="[·...·truncated·by·diffoscope;·len:·159,·SHA:·6e84939e91504d414f546475097f20c076b13f4955d6e76edbc1a4c971f19523·...·]-1">)</span><span·class="p">.</span></code></pre></li><li><p><strong><code·class="inline">no_auto_import</code></strong>·-·Do·not·auto-import·any·functions·from·<code·class="inline">erlang</code>·module.</p></li><li><p><strong><code·class="inline">no_line_info</code></strong>·-·Omits·line·number·information·to·produce·a·slightly1004 syntax·<code·class="inline">F/A</code>·can·be·used·instead·of·<code·class="inline">{F,A}</code>.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="3126306750-1">(</span><span·class="p"·data-group-id="3126306750-2">{</span><span·class="ss">no_auto_import</span><span·class="p">,</span><span·class="p"·data-group-id="3126306750-3">[</span><span·class="ss">error</span><span·class="p">/</span><span·class="[·...·truncated·by·diffoscope;·len:·159,·SHA:·2fae16a7860dcda23d067ab1eddc7f7f12cc3f0957b9e16556895e10d80823af·...·]-1">)</span><span·class="p">.</span></code></pre></li><li><p><strong><code·class="inline">no_auto_import</code></strong>·-·Do·not·auto-import·any·functions·from·<code·class="inline">erlang</code>·module.</p></li><li><p><strong><code·class="inline">no_line_info</code></strong>·-·Omits·line·number·information·to·produce·a·slightly
1005 smaller·output·file.</p></li><li><p><strong><code·class="inline">no_lint</code></strong>·-·Skips·the·pass·that·checks·for·errors·and·warnings.·Only1005 smaller·output·file.</p></li><li><p><strong><code·class="inline">no_lint</code></strong>·-·Skips·the·pass·that·checks·for·errors·and·warnings.·Only
1006 applicable·together·with·the·<code·class="inline">from_abstr</code>·option.·This·is·mainly·for1006 applicable·together·with·the·<code·class="inline">from_abstr</code>·option.·This·is·mainly·for
1007 implementations·of·other·languages·on·top·of·Erlang,·which·have·already·done1007 implementations·of·other·languages·on·top·of·Erlang,·which·have·already·done
1008 their·own·checks·to·guarantee·correctness·of·the·code.</p><p>Caveat:·When·this·option·is·used,·there·are·no·guarantees·that·the·code·output1008 their·own·checks·to·guarantee·correctness·of·the·code.</p><p>Caveat:·When·this·option·is·used,·there·are·no·guarantees·that·the·code·output
1009 by·the·compiler·is·correct·and·safe·to·use.·The·responsibility·for·correctness1009 by·the·compiler·is·correct·and·safe·to·use.·The·responsibility·for·correctness
1010 lies·on·the·code·or·person·generating·the·abstract·format.·If·the·code1010 lies·on·the·code·or·person·generating·the·abstract·format.·If·the·code
1011 contains·errors,·the·compiler·may·crash·or·produce·unsafe·code.</p></li><li><p><strong><code·class="inline">{extra_chunks,·[{binary(),·binary()}]}</code></strong>·-·Pass·extra·chunks·to·be·stored1011 contains·errors,·the·compiler·may·crash·or·produce·unsafe·code.</p></li><li><p><strong><code·class="inline">{extra_chunks,·[{binary(),·binary()}]}</code></strong>·-·Pass·extra·chunks·to·be·stored
130 KB
./usr/share/doc/erlang-doc/html/lib/compiler-8.5.1/doc/html/compiler.epub
2.67 KB
zipinfo {}
    
Offset 1, 18 lines modifiedOffset 1, 18 lines modified
1 Zip·file·size:·182831·bytes,·number·of·entries:·161 Zip·file·size:·182830·bytes,·number·of·entries:·16
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:17·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:57·mimetype
3 ?rw-r--r--··2.0·unx······720·b-·defN·24-Oct-11·20:17·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······720·b-·defN·24-Oct-11·20:57·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····12180·b-·defN·24-Oct-11·20:17·OEBPS/ssa_checks.xhtml4 ?rw-r--r--··2.0·unx····12180·b-·defN·24-Oct-11·20:57·OEBPS/ssa_checks.xhtml
5 ?rw-r--r--··2.0·unx···242290·b-·defN·24-Oct-11·20:17·OEBPS/notes.xhtml5 ?rw-r--r--··2.0·unx···242290·b-·defN·24-Oct-11·20:57·OEBPS/notes.xhtml
6 ?rw-r--r--··2.0·unx·····1421·b-·defN·24-Oct-11·20:17·OEBPS/nav.xhtml6 ?rw-r--r--··2.0·unx·····1421·b-·defN·24-Oct-11·20:57·OEBPS/nav.xhtml
7 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:17·OEBPS/dist/epub-erlang-2EWSTWER.css7 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-erlang-2EWSTWER.css
8 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:17·OEBPS/dist/epub-CB7BJMUW.js8 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-CB7BJMUW.js
9 ?rw-r--r--··2.0·unx·····2064·b-·defN·24-Oct-11·20:17·OEBPS/content.opf9 ?rw-r--r--··2.0·unx·····2064·b-·defN·24-Oct-11·20:57·OEBPS/content.opf
10 ?rw-r--r--··2.0·unx····79939·b-·defN·24-Oct-11·20:17·OEBPS/compile.xhtml10 ?rw-r--r--··2.0·unx····79939·b-·defN·24-Oct-11·20:57·OEBPS/compile.xhtml
11 ?rw-r--r--··2.0·unx····24229·b-·defN·24-Oct-11·20:17·OEBPS/cerl_trees.xhtml11 ?rw-r--r--··2.0·unx····24229·b-·defN·24-Oct-11·20:57·OEBPS/cerl_trees.xhtml
12 ?rw-r--r--··2.0·unx····23772·b-·defN·24-Oct-11·20:17·OEBPS/cerl_clauses.xhtml12 ?rw-r--r--··2.0·unx····23772·b-·defN·24-Oct-11·20:57·OEBPS/cerl_clauses.xhtml
13 ?rw-r--r--··2.0·unx···471476·b-·defN·24-Oct-11·20:17·OEBPS/cerl.xhtml13 ?rw-r--r--··2.0·unx···471476·b-·defN·24-Oct-11·20:57·OEBPS/cerl.xhtml
14 ?rw-r--r--··2.0·unx····18166·b-·defN·24-Oct-11·20:17·OEBPS/beam_ssa.xhtml14 ?rw-r--r--··2.0·unx····18166·b-·defN·24-Oct-11·20:57·OEBPS/beam_ssa.xhtml
15 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:17·OEBPS/assets/logo.png15 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:57·OEBPS/assets/logo.png
16 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:17·META-INF/container.xml16 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:57·META-INF/container.xml
17 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:17·META-INF/com.apple.ibooks.display-options.xml17 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:57·META-INF/com.apple.ibooks.display-options.xml
18 16·files,·899425·bytes·uncompressed,·180899·bytes·compressed:··79.9%18 16·files,·899425·bytes·uncompressed,·180898·bytes·compressed:··79.9%
41.3 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
15.8 KB
OEBPS/ssa_checks.xhtml
Max HTML report size reached
47.9 KB
OEBPS/notes.xhtml
Max HTML report size reached
1.22 KB
OEBPS/content.opf
1.19 KB
OEBPS/content.opf
Max HTML report size reached
15.1 KB
OEBPS/compile.xhtml
Max HTML report size reached
5.74 KB
OEBPS/beam_ssa.xhtml
Max HTML report size reached
36.6 KB
./usr/share/doc/erlang-doc/html/lib/compiler-8.5.1/doc/html/notes.html
    
Offset 145, 61 lines modifiedOffset 145, 61 lines modified
145 </h2>145 </h2>
146 <h3·id="fixed-bugs-and-malfunctions-1"·class="section-heading">146 <h3·id="fixed-bugs-and-malfunctions-1"·class="section-heading">
147 ··<a·href="#fixed-bugs-and-malfunctions-1"·class="hover-link">147 ··<a·href="#fixed-bugs-and-malfunctions-1"·class="hover-link">
148 ····<i·class="ri-link-m"·aria-hidden="true"></i>148 ····<i·class="ri-link-m"·aria-hidden="true"></i>
149 ··</a>149 ··</a>
150 ··<span·class="text">Fixed·Bugs·and·Malfunctions</span>150 ··<span·class="text">Fixed·Bugs·and·Malfunctions</span>
151 </h3>151 </h3>
152 <ul><li><p>Generators·for·binary·comprehensions·could·be·evaluated·before·it·was·known·that·they·would·be·needed.·That·could·result·in·a·binary·comprehensions·failing·if·a·generator·that·should·not·be·evaluated·until·later·failed.</p><p>As·an·example,·consider·this·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0501939330-1">(</span><span·class="ss">t</span><span·class="p"·data-group-id="0501939330-1">)</span><span·class="p">.</span><span·class="w">152 <ul><li><p>Generators·for·binary·comprehensions·could·be·evaluated·before·it·was·known·that·they·would·be·needed.·That·could·result·in·a·binary·comprehensions·failing·if·a·generator·that·should·not·be·evaluated·until·later·failed.</p><p>As·an·example,·consider·this·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2246794497-1">(</span><span·class="ss">t</span><span·class="p"·data-group-id="2246794497-1">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0501939330-2">(</span><span·class="p"·data-group-id="0501939330-3">[</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0501939330-3">]</span><span·class="p"·data-group-id="0501939330-2">)</span><span·class="p">.</span><span·class="w">153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2246794497-2">(</span><span·class="p"·data-group-id="2246794497-3">[</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="2246794497-3">]</span><span·class="p"·data-group-id="2246794497-2">)</span><span·class="p">.</span><span·class="w">
  
154 </span><span·class="nf">f</span><span·class="p"·data-group-id="0501939330-4">(</span><span·class="p"·data-group-id="0501939330-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">154 </span><span·class="nf">f</span><span·class="p"·data-group-id="2246794497-4">(</span><span·class="p"·data-group-id="2246794497-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
155 ····</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="0501939330-5">[</span><span·class="p"·data-group-id="0501939330-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="ss">ok</span><span·c[·...·truncated·by·diffoscope;·len:·442,·SHA:·4b56e4a99c892258e87dfd813a5338c208a362b8ba59199ed5ff6760718f85f3·...·]9-1">)</span><span·class="p">.</span><span·class="w">155 ····</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="2246794497-5">[</span><span·class="p"·data-group-id="2246794497-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="ss">ok</span><span·c[·...·truncated·by·diffoscope;·len:·442,·SHA:·631d336d27ada4ee39a26aeb1b84405026721042fda6aa16b4437b9e965a00bc·...·]9-1">)</span><span·class="p">.</span><span·class="w">
156 </span><span·class="gt">**·exception·error:·bad·generator·ok156 </span><span·class="gt">**·exception·error:·bad·generator·ok
157 ·····in·function··t:f/0·(t.erl,·line·6)</span></code></pre><p>In·Erlang/OTP·27·it·returns·an·empty·binary:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">t</span><span·class="p">:</span><span·class="nf">f</span><span·class="p"·data-group-id="0640460747-1">(</span><span·class="p"·data-group-id="0640460747-1">)</span><span·class="p">.</span><span·class="w">157 ·····in·function··t:f/0·(t.erl,·line·6)</span></code></pre><p>In·Erlang/OTP·27·it·returns·an·empty·binary:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">t</span><span·class="p">:</span><span·class="nf">f</span><span·class="p"·data-group-id="7105197540-1">(</span><span·class="p"·data-group-id="7105197540-1">)</span><span·class="p">.</span><span·class="w">
158 </span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span></code></pre><p>Own·Id:·OTP-18703·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/7494"·title="">GH-7494</a>,·<a·href="https://github.com/erlang/otp/pull/7538"·title="">PR-7538</a></p></li><li><p>The·documentation·for·the·preprocessor·now·mentions·that·<code·class="inline">defined(Name)</code>·can·be·called·in·the·condition·for·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·directive·to·test·whether·<code·class="inline">Name</code>·is·the·name·of·a·defined·macro.·(This·feature·was·implemented·in·OTP·21.)</p><p>If·a·function·call·in·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·with·a·name·that·is·not·the·name·of·a·guard·BIF,·there·would·not·be·a·compilation·error,·but·would·instead·cause·the·lines·following·the·directive·to·be·skipped.·This·has·now·been·changed·to·be·a·compilation·error.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18784·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/7706"·title="">GH-7706</a>,·<a·href="https://github.com/erlang/otp/pull/7726"·title="">PR-7726</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">158 </span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span></code></pre><p>Own·Id:·OTP-18703·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/7494"·title="">GH-7494</a>,·<a·href="https://github.com/erlang/otp/pull/7538"·title="">PR-7538</a></p></li><li><p>The·documentation·for·the·preprocessor·now·mentions·that·<code·class="inline">defined(Name)</code>·can·be·called·in·the·condition·for·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·directive·to·test·whether·<code·class="inline">Name</code>·is·the·name·of·a·defined·macro.·(This·feature·was·implemented·in·OTP·21.)</p><p>If·a·function·call·in·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·with·a·name·that·is·not·the·name·of·a·guard·BIF,·there·would·not·be·a·compilation·error,·but·would·instead·cause·the·lines·following·the·directive·to·be·skipped.·This·has·now·been·changed·to·be·a·compilation·error.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18784·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/7706"·title="">GH-7706</a>,·<a·href="https://github.com/erlang/otp/pull/7726"·title="">PR-7726</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">
159 ··<a·href="#improvements-and-new-features"·class="hover-link">159 ··<a·href="#improvements-and-new-features"·class="hover-link">
160 ····<i·class="ri-link-m"·aria-hidden="true"></i>160 ····<i·class="ri-link-m"·aria-hidden="true"></i>
161 ··</a>161 ··</a>
162 ··<span·class="text">Improvements·and·New·Features</span>162 ··<span·class="text">Improvements·and·New·Features</span>
163 </h3>163 </h3>
164 <ul><li><p>The·compiler·now·emits·nicer·error·message·for·function·head·mismatches.164 <ul><li><p>The·compiler·now·emits·nicer·error·message·for·function·head·mismatches.
165 For·example,·given:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">a</span><span·class="p"·data-group-id="4185808015-1">(</span><span·class="p"·data-group-id="4185808015-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">165 For·example,·given:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">a</span><span·class="p"·data-group-id="2432094011-1">(</span><span·class="p"·data-group-id="2432094011-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
166 </span><span·class="nf">a</span><span·class="p"·data-group-id="4185808015-2">(</span><span·class="p">_</span><span·class="p"·data-group-id="4185808015-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p>Erlang/OTP·26·and·earlier·would·emit·a·diagnostic·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch166 </span><span·class="nf">a</span><span·class="p"·data-group-id="2432094011-2">(</span><span·class="p">_</span><span·class="p"·data-group-id="2432094011-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p>Erlang/OTP·26·and·earlier·would·emit·a·diagnostic·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch
167 %····6|·a(_)·-&gt;·error.167 %····6|·a(_)·-&gt;·error.
168 %·····|·^</code></pre><p>while·in·Erlang/OTP·27·the·diagnostic·is·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch:·function·a·with·arities·0·and·1·is·regarded·as·two·distinct·functions.·Is·the·number·of·arguments·incorrect·or·is·the·semicolon·in·a/0·unwanted?168 %·····|·^</code></pre><p>while·in·Erlang/OTP·27·the·diagnostic·is·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch:·function·a·with·arities·0·and·1·is·regarded·as·two·distinct·functions.·Is·the·number·of·arguments·incorrect·or·is·the·semicolon·in·a/0·unwanted?
169 %····6|·a(_)·-&gt;·error.169 %····6|·a(_)·-&gt;·error.
170 %·····|·^</code></pre><p>Own·Id:·OTP-18648·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7383"·title="">PR-7383</a></p></li><li><p>The·compiler·now·optimizes·creation·of·binaries·that·are·known·to·be·constant.</p><p>Consider·this·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bin</span><span·class="p"·data-group-id="1096577723-1">(</span><span·class="p"·data-group-id="1096577723-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">170 %·····|·^</code></pre><p>Own·Id:·OTP-18648·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7383"·title="">PR-7383</a></p></li><li><p>The·compiler·now·optimizes·creation·of·binaries·that·are·known·to·be·constant.</p><p>Consider·this·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bin</span><span·class="p"·data-group-id="0869071806-1">(</span><span·class="p"·data-group-id="0869071806-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
171 ····</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">char</span><span·class="p"·data-group-id="1096577723-2">(</span><span·class="p"·data-group-id="1096577723-2">)</span><span·class="p">,</span><span·class="w">171 ····</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">char</span><span·class="p"·data-group-id="0869071806-2">(</span><span·class="p"·data-group-id="0869071806-2">)</span><span·class="p">,</span><span·class="w">
172 ····</span><span·class="p">&lt;&lt;</span><span·class="n">C</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">172 ····</span><span·class="p">&lt;&lt;</span><span·class="n">C</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="nf">char</span><span·class="p"·data-group-id="1096577723-3">(</span><span·class="p"·data-group-id="1096577723-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="sc">$*</span><span·class="p">.</span></code></pre><p>Essentially,·the·compiler·rewrites·the·[·...·truncated·by·diffoscope;·len:·212,·SHA:·8d12c0ad18f330008a239d027e4b92dcffa54a79387326d903c0fd9e609eec13·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">char</span><span·class="p"·data-group-id="0869071806-3">(</span><span·class="p"·data-group-id="0869071806-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="sc">$*</span><span·class="p">.</span></code></pre><p>Essentially,·the·compiler·rewrites·the·[·...·truncated·by·diffoscope;·len:·212,·SHA:·226b4a48cc2c4e81a167af9f390b6a64bbfcc4bf41bea7a3ab1af4f8da85871f·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">char</span><span·class="p"·data-group-id="0460435187-2">(</span><span·class="p"·data-group-id="0460435187-2">)</span><span·class="p">,</span><span·class="w">174 ····</span><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">char</span><span·class="p"·data-group-id="4444566336-2">(</span><span·class="p"·data-group-id="4444566336-2">)</span><span·class="p">,</span><span·class="w">
175 ····</span><span·class="p">&lt;&lt;</span><span·class="sc">$*</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">175 ····</span><span·class="p">&lt;&lt;</span><span·class="sc">$*</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
  
176 </span><span·class="nf">char</span><span·class="p"·data-group-id="0460435187-3">(</span><span·class="p"·data-group-id="0460435187-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="sc">$*</span><span·class="p">.</span></code></pre><p>Own·Id:·OTP-18673·Aux·Id:·<a·href="http[·...·truncated·by·diffoscope;·len:·818,·SHA:·e6c7483ae9516d14690b786d7a0dccb0ff5ce88087e8d64ad81aa077e4bdfd77·...·]-1">)</span><span·class="p">.</span><span·class="w">176 </span><span·class="nf">char</span><span·class="p"·data-group-id="4444566336-3">(</span><span·class="p"·data-group-id="4444566336-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="sc">$*</span><span·class="p">.</span></code></pre><p>Own·Id:·OTP-18673·Aux·Id:·<a·href="http[·...·truncated·by·diffoscope;·len:·818,·SHA:·fe68035750594829f098d8ff9f64e4bd6999e164fab0f92b415aef653e969059·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
177 </span><span·class="nf">update</span><span·class="p"·data-group-id="4084918135-3">(</span><span·class="n">Value</span><span·class="p"·data-group-id="4084918135-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">update</span><span·class="p"·data-group-id="1461165006-3">(</span><span·class="n">Value</span><span·class="p"·data-group-id="1461165006-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ····</span><span·class="n">R0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="4084918135-4">{</span><span·class="p"·data-group-id="4084918135-4">}</span><span·class="p">,</span><span·class="w">178 ····</span><span·class="n">R0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="1461165006-4">{</span><span·class="p"·data-group-id="1461165006-4">}</span><span·class="p">,</span><span·class="w">
179 ····</span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R0</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="4084918135-5">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="n">Value</span><span·class="p"·data-group-id="4084918135-5">}</span><span·class="p">,</span><span·class="w">179 ····</span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R0</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="1461165006-5">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="n">Value</span><span·class="p"·data-group-id="1461165006-5">}</span><span·class="p">,</span><span·class="w">
180 ····</span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R1</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="4084918135-6">{</span><span·class="ss">b</span><span·class="o">=</span><span·class="mi">2</span><span·class="p"·data-group-id="4084918135-6">}</span><span·class="p">,</span><span·class="w">180 ····</span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R1</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="1461165006-6">{</span><span·class="ss">b</span><span·class="o">=</span><span·class="mi">2</span><span·class="p"·data-group-id="1461165006-6">}</span><span·class="p">,</span><span·class="w">
181 ····</span><span·class="n">R2</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="4084918135-7">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="mi">3</span><span·class="p"·data-group-id="4084918135-7">}</span><span·class="p">.</span></code></pre><p>Own·Id:·OTP-18680·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7491"·title="">PR-7491</a>,·<a·href="https://github.com/erlang/otp/pull/8086"·title="">PR-8086</a>,·ERIERL-967</p></li><li><p>Improved·the·performance·of·the·alias·analysis·pass.</p><p>Own·Id:·OTP-18714·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7528"·title="">PR-7528</a>,·<a·href="https://github.com/erlang/otp/issues/7432"·title="">GH-7432</a></p></li><li><p><code·class="inline">-spec</code>·attributes·are·now·used·for·documentation.</p><p>Own·Id:·OTP-18801·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7739"·title="">PR-7739</a></p></li><li><p>Native·coverage·support·has·been·implemented·in·the·JIT.·It·will··automatically·be·used·by·the·<a·href="../../../../lib/tools-4.0/doc/html/cover.html"><code·class="inline">cover</code></a>·tool·to·reduce·the·execution·overhead·when·running·cover-compiled·code.</p><p>There·are·also·new·APIs·to·support·native·coverage·without·using·the·<code·class="inline">cover</code>·tool.</p><p>To·instrument·code·for·native·coverage·it·must·be·compiled·with·the·<a·href="compile.html#line_coverage"><code·class="inline">line_coverage</code></a>·option.</p><p>To·enable·native·coverage·in·the·runtime·system,·start·it·like·so:</p><pre><code·class="text">$·erl·+JPcover·true</code></pre><p>There·are·also·the·following·new·functions·for·supporting·native·coverage:</p><ul><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#coverage_support/0"><code·class="inline">code:coverage_support/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage/2"><code·class="inline">code:get_coverage/2</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#reset_coverage/1"><code·class="inline">code:reset_coverage/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/0"><code·class="inline">code:get_coverage_mode/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/1"><code·class="inline">code:get_coverage_mode/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#set_coverage_mode/1"><code·class="inline">code:set_coverage_mode/1</code></a></li></ul><p>Own·Id:·OTP-18856·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7856"·title="">PR-7856</a></p></li><li><p><a·href="https://www.erlang.org/eeps/eep-0059">EEP-59·-·Documentation·Attributes</a>·has·been·implemented.</p><p>Documentation·attributes·can·be·used·to·document·functions,·types,·callbacks,·and·modules.181 ····</span><span·class="n">R2</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="1461165006-7">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="mi">3</span><span·class="p"·data-group-id="1461165006-7">}</span><span·class="p">.</span></code></pre><p>Own·Id:·OTP-18680·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7491"·title="">PR-7491</a>,·<a·href="https://github.com/erlang/otp/pull/8086"·title="">PR-8086</a>,·ERIERL-967</p></li><li><p>Improved·the·performance·of·the·alias·analysis·pass.</p><p>Own·Id:·OTP-18714·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7528"·title="">PR-7528</a>,·<a·href="https://github.com/erlang/otp/issues/7432"·title="">GH-7432</a></p></li><li><p><code·class="inline">-spec</code>·attributes·are·now·used·for·documentation.</p><p>Own·Id:·OTP-18801·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7739"·title="">PR-7739</a></p></li><li><p>Native·coverage·support·has·been·implemented·in·the·JIT.·It·will··automatically·be·used·by·the·<a·href="../../../../lib/tools-4.0/doc/html/cover.html"><code·class="inline">cover</code></a>·tool·to·reduce·the·execution·overhead·when·running·cover-compiled·code.</p><p>There·are·also·new·APIs·to·support·native·coverage·without·using·the·<code·class="inline">cover</code>·tool.</p><p>To·instrument·code·for·native·coverage·it·must·be·compiled·with·the·<a·href="compile.html#line_coverage"><code·class="inline">line_coverage</code></a>·option.</p><p>To·enable·native·coverage·in·the·runtime·system,·start·it·like·so:</p><pre><code·class="text">$·erl·+JPcover·true</code></pre><p>There·are·also·the·following·new·functions·for·supporting·native·coverage:</p><ul><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#coverage_support/0"><code·class="inline">code:coverage_support/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage/2"><code·class="inline">code:get_coverage/2</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#reset_coverage/1"><code·class="inline">code:reset_coverage/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/0"><code·class="inline">code:get_coverage_mode/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/1"><code·class="inline">code:get_coverage_mode/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#set_coverage_mode/1"><code·class="inline">code:set_coverage_mode/1</code></a></li></ul><p>Own·Id:·OTP-18856·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7856"·title="">PR-7856</a></p></li><li><p><a·href="https://www.erlang.org/eeps/eep-0059">EEP-59·-·Documentation·Attributes</a>·has·been·implemented.</p><p>Documentation·attributes·can·be·used·to·document·functions,·types,·callbacks,·and·modules.
182 The·keyword·<code·class="inline">-moduledoc·&quot;Documentation·here&quot;.</code>·is·used·to·document·modules,·while·<code·class="inline">-doc·&quot;Documentation·here&quot;.</code>·can·be·used·on·top·of·functions,·types,·and·callbacks·to·document·them,·respectively.</p><ul><li><p>Types,·callbacks,·and·function·documentation·can·be·set·to·<code·class="inline">hidden</code>·either·via·<code·class="inline">-doc·false</code>·or·<code·class="inline">-doc·hidden</code>.·When·documentation·attributes·mark·a·type·as·hidden,·they·will·not·be·part·of·the·documentation.</p></li><li><p>The·documentation·from·<code·class="inline">moduledoc</code>·and·<code·class="inline">doc</code>·gets·added·by·default·to·the·binary·beam·file,·following·the·format·of·<a·href="https://www.erlang.org/eeps/eep-0048">EEP-48</a>.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_doc</code>·will·raise·a·warning·when182 The·keyword·<code·class="inline">-moduledoc·&quot;Documentation·here&quot;.</code>·is·used·to·document·modules,·while·<code·class="inline">-doc·&quot;Documentation·here&quot;.</code>·can·be·used·on·top·of·functions,·types,·and·callbacks·to·document·them,·respectively.</p><ul><li><p>Types,·callbacks,·and·function·documentation·can·be·set·to·<code·class="inline">hidden</code>·either·via·<code·class="inline">-doc·false</code>·or·<code·class="inline">-doc·hidden</code>.·When·documentation·attributes·mark·a·type·as·hidden,·they·will·not·be·part·of·the·documentation.</p></li><li><p>The·documentation·from·<code·class="inline">moduledoc</code>·and·<code·class="inline">doc</code>·gets·added·by·default·to·the·binary·beam·file,·following·the·format·of·<a·href="https://www.erlang.org/eeps/eep-0048">EEP-48</a>.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_doc</code>·will·raise·a·warning·when
183 <code·class="inline">-doc</code>·attributes·are·missing·in·exported·functions,·types,·and·callbacks.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_spec_documented</code>·will·raise·a·warning·when183 <code·class="inline">-doc</code>·attributes·are·missing·in·exported·functions,·types,·and·callbacks.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_spec_documented</code>·will·raise·a·warning·when
184 spec·attributes·are·missing·in·documented·functions,·types,·and·callbacks.</p></li><li><p><code·class="inline">moduledoc</code>s·and·<code·class="inline">doc</code>s·may·refer·to·external·files·to·be·embedded,·such·as·<code·class="inline">-doc·{file,·&quot;README.md&quot;}.</code>,·which·refers·to·the·file·<code·class="inline">README.md</code>·found·in·the·current·working·directory.</p></li><li><p>The·compiler·warns·about·exported·functions·whose·specs·refer·to·hidden·types.·Thus,·there·will·be·warnings·when·a·hidden·type·(meaning,·the·type·is·not·part·of·the·documentation)·gets·used·in·an·exported·function.</p></li></ul><p>Own·Id:·OTP-18916·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7936"·title="">PR-7936</a></p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>The·order·in·which·the·compiler·looks·up·options·has·changed.</p><p>When·there·is·a·conflict·in·the·compiler·options·given·in·the·<code·class="inline">-compile()</code>·attribute·and·options·given·to·the·compiler,·the·options·given·in·the·<code·class="inline">-compile()</code>·attribute·overrides·the·option·given·to·the·compiler,·which·in·turn·overrides·options·given·in·the·<code·class="inline">ERL_COMPILER_OPTIONS</code>·environment·variable.</p><p>Example:</p><p>If··<code·class="inline">some_module.erl</code>·has·the·following·attribute:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="5474613896-1">(</span><span·class="p"·data-group-id="5474613896-2">[</span><span·class="ss">nowarn_missing_spec</span><span·class="p"·data-group-id="5474613896-2">]</span><span·class="p"·data-group-id="5474613896-1">)</span><span·class="p">.</span></code><[·...·truncated·by·diffoscope;·len:·1214,·SHA:·335919cab38bbadd2c13c59c6d81d7be80bdb06402188c509d03eeea2b79265c·...·]9-1">)</span><span·class="p">.</span><span·class="w">184 spec·attributes·are·missing·in·documented·functions,·types,·and·callbacks.</p></li><li><p><code·class="inline">moduledoc</code>s·and·<code·class="inline">doc</code>s·may·refer·to·external·files·to·be·embedded,·such·as·<code·class="inline">-doc·{file,·&quot;README.md&quot;}.</code>,·which·refers·to·the·file·<code·class="inline">README.md</code>·found·in·the·current·working·directory.</p></li><li><p>The·compiler·warns·about·exported·functions·whose·specs·refer·to·hidden·types.·Thus,·there·will·be·warnings·when·a·hidden·type·(meaning,·the·type·is·not·part·of·the·documentation)·gets·used·in·an·exported·function.</p></li></ul><p>Own·Id:·OTP-18916·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7936"·title="">PR-7936</a></p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>The·order·in·which·the·compiler·looks·up·options·has·changed.</p><p>When·there·is·a·conflict·in·the·compiler·options·given·in·the·<code·class="inline">-compile()</code>·attribute·and·options·given·to·the·compiler,·the·options·given·in·the·<code·class="inline">-compile()</code>·attribute·overrides·the·option·given·to·the·compiler,·which·in·turn·overrides·options·given·in·the·<code·class="inline">ERL_COMPILER_OPTIONS</code>·environment·variable.</p><p>Example:</p><p>If··<code·class="inline">some_module.erl</code>·has·the·following·attribute:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="7543760111-1">(</span><span·class="p"·data-group-id="7543760111-2">[</span><span·class="ss">nowarn_missing_spec</span><span·class="p"·data-group-id="7543760111-2">]</span><span·class="p"·data-group-id="7543760111-1">)</span><span·class="p">.</span></code><[·...·truncated·by·diffoscope;·len:·1214,·SHA:·c9f0386182c3bd7fbae94a4c196f0e2c9640802fc65d6db33b73fc4775f60fbf·...·]9-1">)</span><span·class="p">.</span><span·class="w">
  
185 </span><span·class="nf">update</span><span·class="p"·data-group-id="7874739659-3">(</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="7874739659-4">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">needs_update</span><span·class="p">,</span><span·class="ss">b</s[·...·truncated·by·diffoscope;·len:·194,·SHA:·d74df8b43fe345c7722bfc3d91f31d9888c89c4e5a9ce1a35577470d624a3d94·...·]9-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">185 </span><span·class="nf">update</span><span·class="p"·data-group-id="9504848119-3">(</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9504848119-4">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">needs_update</span><span·class="p">,</span><span·class="ss">b</s[·...·truncated·by·diffoscope;·len:·194,·SHA:·39474d44781a799c32ab7d1f9a8789db6a4171c4f39be164b30ea6a5b98b57a6·...·]9-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
186 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R0</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="7874739659-5">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">up_to_date</span><span·class="p"·data-group-id="7874739659-5">}</span><span·class="p">,</span><span·class="w">186 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">R0</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9504848119-5">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="ss">up_to_date</span><span·class="p"·data-group-id="9504848119-5">}</span><span·class="p">,</span><span·class="w">
187 ····</span><span·class="k">if</span><span·class="w">187 ····</span><span·class="k">if</span><span·class="w">
188 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="7874739659-6">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">negative</span><span·class="p"·data-group-id="7874739659-6">}</span><span·class="p">;</span><span·class="w">189 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9504848119-6">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">negative</span><span·class="p"·data-group-id="9504848119-6">}</span><span·class="p">;</span><span·class="w">
190 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="7874739659-7">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">zero</span><span·class="p"·data-group-id="7874739659-7">}</span><span·class="p">;</span><span·class="w">191 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9504848119-7">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">zero</span><span·class="p"·data-group-id="9504848119-7">}</span><span·class="p">;</span><span·class="w">
192 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 ········</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="7874739659-8">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">positive</span><span·class="p"·data-group-id="7874739659-8">}</span><span·class="w">193 ············</span><span·class="n">R</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9504848119-8">{</span><span·class="ss">c</span><span·class="o">=</span><span·class="ss">positive</span><span·class="p"·data-group-id="9504848119-8">}</span><span·class="w">
194 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·record·updates·in·each·of·the·three·clauses·of·the·<code·class="inline">if</code>·can·safely·be·done·in-place,·because·variable·<code·class="inline">R</code>·is·not·used·again.</p><p>Own·Id:·OTP-18972·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8090"·title="">PR-8090</a></p></li><li><p>Improved·the·match·context·reuse·optimization·slightly,·allowing·match·contexts·to·be·passed·as-is·to·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#bit_size/1"><code·class="inline">bit_size/1</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#byte_size/1"><code·class="inline">byte_size/1</code></a>.</p><p>Own·Id:·OTP-18987</p></li><li><p><a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_lint.html"><code·class="inline">erl_lint</code></a>·(and·by·extension·the·<a·href="compile.html"><code·class="inline">compiler</code></a>)·will·now·warn·for·code·using·deprecated·callbacks.</p><p>The·only·callback·currenly·deprecated·is·<code·class="inline">format_status/2</code>·in·<a·href="../../../../lib/stdlib-6.0.1/doc/html/gen_server.html#c:format_status/2"><code·class="inline">gen_server</code></a>,·<a·href="../../../../lib/stdlib-6.0.1/doc/html/gen_event.html#c:format_status/2"><code·class="inline">gen_event</code></a>·and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/gen_server.html#c:format_status/2"><code·class="inline">gen_statem</code></a>.</p><p>You·can·use·<code·class="inline">nowarn_deprecated_callback</code>·to·silence·the·warning.</p><p>Own·Id:·OTP-19010·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8205"·title="">PR-8205</a></p></li></ul><h2·id="compiler-8-4-3"·class="section-heading">194 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·record·updates·in·each·of·the·three·clauses·of·the·<code·class="inline">if</code>·can·safely·be·done·in-place,·because·variable·<code·class="inline">R</code>·is·not·used·again.</p><p>Own·Id:·OTP-18972·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8090"·title="">PR-8090</a></p></li><li><p>Improved·the·match·context·reuse·optimization·slightly,·allowing·match·contexts·to·be·passed·as-is·to·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#bit_size/1"><code·class="inline">bit_size/1</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#byte_size/1"><code·class="inline">byte_size/1</code></a>.</p><p>Own·Id:·OTP-18987</p></li><li><p><a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_lint.html"><code·class="inline">erl_lint</code></a>·(and·by·extension·the·<a·href="compile.html"><code·class="inline">compiler</code></a>)·will·now·warn·for·code·using·deprecated·callbacks.</p><p>The·only·callback·currenly·deprecated·is·<code·class="inline">format_status/2</code>·in·<a·href="../../../../lib/stdlib-6.0.1/doc/html/gen_server.html#c:format_status/2"><code·class="inline">gen_server</code></a>,·<a·href="../../../../lib/stdlib-6.0.1/doc/html/gen_event.html#c:format_status/2"><code·class="inline">gen_event</code></a>·and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/gen_server.html#c:format_status/2"><code·class="inline">gen_statem</code></a>.</p><p>You·can·use·<code·class="inline">nowarn_deprecated_callback</code>·to·silence·the·warning.</p><p>Own·Id:·OTP-19010·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8205"·title="">PR-8205</a></p></li></ul><h2·id="compiler-8-4-3"·class="section-heading">
195 ··<a·href="#compiler-8-4-3"·class="hover-link">195 ··<a·href="#compiler-8-4-3"·class="hover-link">
196 ····<i·class="ri-link-m"·aria-hidden="true"></i>196 ····<i·class="ri-link-m"·aria-hidden="true"></i>
197 ··</a>197 ··</a>
198 ··<span·class="text">Compiler·8.4.3</span>198 ··<span·class="text">Compiler·8.4.3</span>
199 </h2>199 </h2>
200 <h3·id="fixed-bugs-and-malfunctions-2"·class="section-heading">200 <h3·id="fixed-bugs-and-malfunctions-2"·class="section-heading">
15.9 KB
./usr/share/doc/erlang-doc/html/lib/compiler-8.5.1/doc/html/ssa_checks.html
    
Offset 138, 50 lines modifiedOffset 138, 50 lines modified
138 ····<i·class="ri-link-m"·aria-hidden="true"></i>138 ····<i·class="ri-link-m"·aria-hidden="true"></i>
139 ··</a>139 ··</a>
140 ··<span·class="text">Syntax</span>140 ··<span·class="text">Syntax</span>
141 </h2>141 </h2>
142 <p>SSA·checks·are·embedded·in·the·source·code·as·comments·starting·with142 <p>SSA·checks·are·embedded·in·the·source·code·as·comments·starting·with
143 with·one·of·<code·class="inline">%ssa%</code>,·<code·class="inline">%%ssa%</code>·or·<code·class="inline">%%%ssa%</code>.·This·is·a·short143 with·one·of·<code·class="inline">%ssa%</code>,·<code·class="inline">%%ssa%</code>·or·<code·class="inline">%%%ssa%</code>.·This·is·a·short
144 introduction·the·syntax,·for·the·full·syntax·please·refer·to·the144 introduction·the·syntax,·for·the·full·syntax·please·refer·to·the
145 <code·class="inline">ssa_check_when_clause</code>·production·in·<code·class="inline">erl_parse.yrl</code>.</p><p>SSA·checks·can·be·placed·inside·any·Erlang·function,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t0</span><span·class="p"·data-group-id="8107967915-1">(</span><span·class="p"·data-group-id="8107967915-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">145 <code·class="inline">ssa_check_when_clause</code>·production·in·<code·class="inline">erl_parse.yrl</code>.</p><p>SSA·checks·can·be·placed·inside·any·Erlang·function,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t0</span><span·class="p"·data-group-id="4598109865-1">(</span><span·class="p"·data-group-id="4598109865-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
146 </span><span·class="c1">%ssa%·()·when·post_ssa_opt·-&gt;</span><span·class="w">146 </span><span·class="c1">%ssa%·()·when·post_ssa_opt·-&gt;</span><span·class="w">
147 </span><span·class="c1">%ssa%···ret(#{}).</span><span·class="w">147 </span><span·class="c1">%ssa%···ret(#{}).</span><span·class="w">
148 ··</span><span·class="p"·data-group-id="8107967915-2">#{</span><span·class="p"·data-group-id="8107967915-2">}</span><span·class="p">.</span></code></pre><p>will·check·that·<code·class="inline">t0/0</code>·returns·the·literal·<code·class="inline">#{}</code>.·If·we·want·to·check148 ··</span><span·class="p"·data-group-id="4598109865-2">#{</span><span·class="p"·data-group-id="4598109865-2">}</span><span·class="p">.</span></code></pre><p>will·check·that·<code·class="inline">t0/0</code>·returns·the·literal·<code·class="inline">#{}</code>.·If·we·want·to·check
149 that·a·function·returns·its·first·formal·parameter,·we·can·write:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t1</span><span·class="p"·data-group-id="6024970853-1">(</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">B</span><span·class="p"·data-group-id="6024970853-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 that·a·function·returns·its·first·formal·parameter,·we·can·write:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t1</span><span·class="p"·data-group-id="3766367475-1">(</span><span·class="n">A</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">B</span><span·class="p"·data-group-id="3766367475-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 </span><span·class="c1">%ssa%·(X,·_)·when·post_ssa_opt·-&gt;</span><span·class="w">150 </span><span·class="c1">%ssa%·(X,·_)·when·post_ssa_opt·-&gt;</span><span·class="w">
151 </span><span·class="c1">%ssa%···ret(X).</span><span·class="w">151 </span><span·class="c1">%ssa%···ret(X).</span><span·class="w">
152 ··</span><span·class="n">A</span><span·class="p">.</span></code></pre><p>Note·how·we·match·the·first·formal·parameter·using·<code·class="inline">X</code>.·The·reason·for152 ··</span><span·class="n">A</span><span·class="p">.</span></code></pre><p>Note·how·we·match·the·first·formal·parameter·using·<code·class="inline">X</code>.·The·reason·for
153 having·our·own·formal·parameters·for·the·SSA·check,·is·that·we·don't153 having·our·own·formal·parameters·for·the·SSA·check,·is·that·we·don't
154 want·to·introduce·new·identifiers·at·the·Erlang·level·to·support154 want·to·introduce·new·identifiers·at·the·Erlang·level·to·support
155 SSA-level·checks.·Consider·if·<code·class="inline">t1/2</code>·had·been·defined·as·<code·class="inline">t1([A|As],·B)</code>·we·would·have·had·to·introduce·a·new·identifier·for·the·aggregate155 SSA-level·checks.·Consider·if·<code·class="inline">t1/2</code>·had·been·defined·as·<code·class="inline">t1([A|As],·B)</code>·we·would·have·had·to·introduce·a·new·identifier·for·the·aggregate
156 value·<code·class="inline">[A|As]</code>.</p><p>The·full·syntax·for·a·SSA·check·clause·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="ss">expected</span><span·class="o">-</span><span·class="ss">result</span><span·class="o">&gt;</span><span·class="o">?</span><span·class="w">·</span><span·class="p"·data-group-id="5324434212-1">(</span><span·class="o">&lt;</span><span·class="ss">formals</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5324434212-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">pipeline</span><span·class="o">-</span><span·class="ss">location</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">checks</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">&#39;.&#39;</span></code></pre><p>where·<code·class="inline">&lt;expected-result&gt;</code>·can·be·one·of·<code·class="inline">pass</code>·(the·check·must156 value·<code·class="inline">[A|As]</code>.</p><p>The·full·syntax·for·a·SSA·check·clause·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="ss">expected</span><span·class="o">-</span><span·class="ss">result</span><span·class="o">&gt;</span><span·class="o">?</span><span·class="w">·</span><span·class="p"·data-group-id="9035797671-1">(</span><span·class="o">&lt;</span><span·class="ss">formals</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9035797671-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">pipeline</span><span·class="o">-</span><span·class="ss">location</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">checks</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">&#39;.&#39;</span></code></pre><p>where·<code·class="inline">&lt;expected-result&gt;</code>·can·be·one·of·<code·class="inline">pass</code>·(the·check·must
157 succeed),·<code·class="inline">fail</code>·and·<code·class="inline">xfail</code>·(the·check·must·fail).·Omitting157 succeed),·<code·class="inline">fail</code>·and·<code·class="inline">xfail</code>·(the·check·must·fail).·Omitting
158 <code·class="inline">&lt;expected-result&gt;</code>·is·parsed·as·an·implicit·<code·class="inline">pass</code>.</p><p><code·class="inline">&lt;formals&gt;</code>·is·a·comma-separated·list·of·variables.</p><p><code·class="inline">&lt;pipeline-location&gt;</code>·specifies·when·in·the·compiler·pipeline·to·run158 <code·class="inline">&lt;expected-result&gt;</code>·is·parsed·as·an·implicit·<code·class="inline">pass</code>.</p><p><code·class="inline">&lt;formals&gt;</code>·is·a·comma-separated·list·of·variables.</p><p><code·class="inline">&lt;pipeline-location&gt;</code>·specifies·when·in·the·compiler·pipeline·to·run
159 the·checks.·For·now·the·only·supported·value·for·<code·class="inline">&lt;pipeline-location&gt;</code>159 the·checks.·For·now·the·only·supported·value·for·<code·class="inline">&lt;pipeline-location&gt;</code>
160 is·<code·class="inline">post_ssa_opt</code>·which·runs·the·checks·after·the·<code·class="inline">ssa_opt</code>·pass.</p><p><code·class="inline">&lt;checks&gt;</code>·is·a·comma-separated·list·of·matches·against·the·BEAM·SSA160 is·<code·class="inline">post_ssa_opt</code>·which·runs·the·checks·after·the·<code·class="inline">ssa_opt</code>·pass.</p><p><code·class="inline">&lt;checks&gt;</code>·is·a·comma-separated·list·of·matches·against·the·BEAM·SSA
161 code.·For·non-flow-control·operations·the·syntax·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="ss">variable</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">operation</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4682499142-1">(</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">arguments</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4682499142-1">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">annotation</span><span·class="o">&gt;</span><span·class="o">?</span></code></pre><p>where·<code·class="inline">&lt;operation&gt;</code>·is·the·<code·class="inline">#b_set.op</code>·field·from·the·internal·SSA161 code.·For·non-flow-control·operations·the·syntax·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="ss">variable</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">operation</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8951876845-1">(</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">arguments</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8951876845-1">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">annotation</span><span·class="o">&gt;</span><span·class="o">?</span></code></pre><p>where·<code·class="inline">&lt;operation&gt;</code>·is·the·<code·class="inline">#b_set.op</code>·field·from·the·internal·SSA
162 representation.·BIFs·are·written·as·<code·class="inline">bif:&lt;atom&gt;</code>.</p><p><code·class="inline">&lt;arguments&gt;</code>·is·a·comma-separated·list·of·variables·or·literals.</p><p>For·flow·control·operations·and·labels,·the·syntax·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">br</span><span·class="p"·data-group-id="8165986253-1">(</span><span·class="o">&lt;</span><span·class="ss">bool</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">true</span><span·class="o">-</span><span·class="ss">label</sp[·...·truncated·by·diffoscope;·len:·255,·SHA:·6a21ee3dcc2ecd5291723260c68c44d152fc33f7a04e558a329d6383bd3624f5·...·]-1">)</span><span·class="w">162 representation.·BIFs·are·written·as·<code·class="inline">bif:&lt;atom&gt;</code>.</p><p><code·class="inline">&lt;arguments&gt;</code>·is·a·comma-separated·list·of·variables·or·literals.</p><p>For·flow·control·operations·and·labels,·the·syntax·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">br</span><span·class="p"·data-group-id="8318587482-1">(</span><span·class="o">&lt;</span><span·class="ss">bool</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">true</span><span·class="o">-</span><span·class="ss">label</sp[·...·truncated·by·diffoscope;·len:·255,·SHA:·ad455254ca5948385772da76f6835f3e21ef3594aee8804c300e21769da3b75d·...·]-1">)</span><span·class="w">
  
163 </span><span·class="nf">switch</span><span·class="p"·data-group-id="8165986253-2">(</span><span·class="o">&lt;</span><span·class="ss">value</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">fail</span><span·class="o">-</span><span·class="ss">label</s[·...·truncated·by·diffoscope;·len:·618,·SHA:·a9bb77cbdfa1a40521dddf3e771dc91dee059cde7e48f3632a783fd50eeb57ff·...·]-2">)</span><span·class="w">163 </span><span·class="nf">switch</span><span·class="p"·data-group-id="8318587482-2">(</span><span·class="o">&lt;</span><span·class="ss">value</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">fail</span><span·class="o">-</span><span·class="ss">label</s[·...·truncated·by·diffoscope;·len:·618,·SHA:·49329ffc2edf56150d36620da174aef7c4312b059a1b1aca6a155bb7a92a6af7·...·]-2">)</span><span·class="w">
  
164 </span><span·class="nf">ret</span><span·class="p"·data-group-id="8165986253-5">(</span><span·class="o">&lt;</span><span·class="ss">value</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8165986253-5">)</span><span·class="w">164 </span><span·class="nf">ret</span><span·class="p"·data-group-id="8318587482-5">(</span><span·class="o">&lt;</span><span·class="ss">value</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8318587482-5">)</span><span·class="w">
  
165 </span><span·class="ss">label</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">value</span><span·class="o">&gt;</span></code></pre><p>where·<code·class="inline">&lt;value&gt;</code>·is·a·literal·or·a·variable.</p><p>A·check·can·also·include·an·assertion·on·operation·annotations.·The165 </span><span·class="ss">label</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="ss">value</span><span·class="o">&gt;</span></code></pre><p>where·<code·class="inline">&lt;value&gt;</code>·is·a·literal·or·a·variable.</p><p>A·check·can·also·include·an·assertion·on·operation·annotations.·The
166 assertion·is·written·as·a·map-like·pattern·following·the·argument166 assertion·is·written·as·a·map-like·pattern·following·the·argument
167 list,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t0</span><span·class="p"·data-group-id="9019530238-1">(</span><span·class="p"·data-group-id="9019530238-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 list,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t0</span><span·class="p"·data-group-id="4423231331-1">(</span><span·class="p"·data-group-id="4423231331-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 </span><span·class="c1">%ssa%·()·when·post_ssa_opt·-&gt;</span><span·class="w">168 </span><span·class="c1">%ssa%·()·when·post_ssa_opt·-&gt;</span><span·class="w">
169 </span><span·class="c1">%ssa%·_·=·call(fun·return_int/0)·{·result_type·=&gt;·{t_integer,{17,17}},</span><span·class="w">169 </span><span·class="c1">%ssa%·_·=·call(fun·return_int/0)·{·result_type·=&gt;·{t_integer,{17,17}},</span><span·class="w">
170 </span><span·class="c1">%ssa%······························location·=&gt;·{_,32}·},</span><span·class="w">170 </span><span·class="c1">%ssa%······························location·=&gt;·{_,32}·},</span><span·class="w">
171 </span><span·class="c1">%ssa%·_·=·call(fun·return_tuple/0)·{</span><span·class="w">171 </span><span·class="c1">%ssa%·_·=·call(fun·return_tuple/0)·{</span><span·class="w">
172 </span><span·class="c1">%ssa%····result_type·=&gt;·{t_tuple,2,true,#{1·=&gt;·{t_integer,{1,1}},</span><span·class="w">172 </span><span·class="c1">%ssa%····result_type·=&gt;·{t_tuple,2,true,#{1·=&gt;·{t_integer,{1,1}},</span><span·class="w">
173 </span><span·class="c1">%ssa%·····································2·=&gt;·{t_integer,{2,2}}}}</span><span·class="w">173 </span><span·class="c1">%ssa%·····································2·=&gt;·{t_integer,{2,2}}}}</span><span·class="w">
174 </span><span·class="c1">%ssa%·}.</span><span·class="w">174 </span><span·class="c1">%ssa%·}.</span><span·class="w">
175 ····</span><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">return_int</span><span·class="p"·data-group-id="9019530238-2">(</span><span·class="p"·data-group-id="9019530238-2">)</span><span·class="p">,</span><span·class="w">175 ····</span><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">return_int</span><span·class="p"·data-group-id="4423231331-2">(</span><span·class="p"·data-group-id="4423231331-2">)</span><span·class="p">,</span><span·class="w">
176 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">return_tuple</span><span·class="p"·data-group-id="9019530238-3">(</span><span·class="p"·data-group-id="9019530238-3">)</span><span·class="p">,</span><span·class="w">176 ····</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">return_tuple</span><span·class="p"·data-group-id="4423231331-3">(</span><span·class="p"·data-group-id="4423231331-3">)</span><span·class="p">,</span><span·class="w">
177 ····</span><span·class="p"·data-group-id="9019530238-4">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="9019530238-4">}</span><span·class="p">.</span></code></pre><h2·id="semantics"·class="section-heading">177 ····</span><span·class="p"·data-group-id="4423231331-4">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Y</span><span·class="p"·data-group-id="4423231331-4">}</span><span·class="p">.</span></code></pre><h2·id="semantics"·class="section-heading">
178 ··<a·href="#semantics"·class="hover-link">178 ··<a·href="#semantics"·class="hover-link">
179 ····<i·class="ri-link-m"·aria-hidden="true"></i>179 ····<i·class="ri-link-m"·aria-hidden="true"></i>
180 ··</a>180 ··</a>
181 ··<span·class="text">Semantics</span>181 ··<span·class="text">Semantics</span>
182 </h2>182 </h2>
183 <p>When·an·SSA·assertion·is·matched·against·the·BEAM·SSA·for·a·function,183 <p>When·an·SSA·assertion·is·matched·against·the·BEAM·SSA·for·a·function,
184 patterns·are·applied·sequentially.·If·the·current·pattern·doesn't184 patterns·are·applied·sequentially.·If·the·current·pattern·doesn't
169 KB
./usr/share/doc/erlang-doc/html/lib/crypto-5.5/doc/html/crypto.epub
2.98 KB
zipinfo {}
    
Offset 1, 20 lines modifiedOffset 1, 20 lines modified
1 Zip·file·size:·125896·bytes,·number·of·entries:·181 Zip·file·size:·125906·bytes,·number·of·entries:·18
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:20·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······712·b-·defN·24-Oct-11·20:20·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······712·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx···135631·b-·defN·24-Oct-11·20:20·OEBPS/notes.xhtml4 ?rw-r--r--··2.0·unx···135631·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
5 ?rw-r--r--··2.0·unx····46151·b-·defN·24-Oct-11·20:20·OEBPS/new_api.xhtml5 ?rw-r--r--··2.0·unx····46151·b-·defN·24-Oct-11·20:59·OEBPS/new_api.xhtml
6 ?rw-r--r--··2.0·unx·····1441·b-·defN·24-Oct-11·20:20·OEBPS/nav.xhtml6 ?rw-r--r--··2.0·unx·····1441·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
7 ?rw-r--r--··2.0·unx·····7063·b-·defN·24-Oct-11·20:20·OEBPS/licenses.xhtml7 ?rw-r--r--··2.0·unx·····7063·b-·defN·24-Oct-11·20:59·OEBPS/licenses.xhtml
8 ?rw-r--r--··2.0·unx·····9514·b-·defN·24-Oct-11·20:20·OEBPS/fips.xhtml8 ?rw-r--r--··2.0·unx·····9514·b-·defN·24-Oct-11·20:59·OEBPS/fips.xhtml
9 ?rw-r--r--··2.0·unx····13802·b-·defN·24-Oct-11·20:20·OEBPS/engine_load.xhtml9 ?rw-r--r--··2.0·unx····13802·b-·defN·24-Oct-11·20:59·OEBPS/engine_load.xhtml
10 ?rw-r--r--··2.0·unx····13463·b-·defN·24-Oct-11·20:20·OEBPS/engine_keys.xhtml10 ?rw-r--r--··2.0·unx····13463·b-·defN·24-Oct-11·20:59·OEBPS/engine_keys.xhtml
11 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-erlang-2EWSTWER.css11 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
12 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-CB7BJMUW.js12 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
13 ?rw-r--r--··2.0·unx·····3968·b-·defN·24-Oct-11·20:20·OEBPS/crypto_app.xhtml13 ?rw-r--r--··2.0·unx·····3968·b-·defN·24-Oct-11·20:59·OEBPS/crypto_app.xhtml
14 ?rw-r--r--··2.0·unx···299101·b-·defN·24-Oct-11·20:20·OEBPS/crypto.xhtml14 ?rw-r--r--··2.0·unx···299101·b-·defN·24-Oct-11·20:59·OEBPS/crypto.xhtml
15 ?rw-r--r--··2.0·unx·····2363·b-·defN·24-Oct-11·20:20·OEBPS/content.opf15 ?rw-r--r--··2.0·unx·····2363·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
16 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:20·OEBPS/assets/logo.png16 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
17 ?rw-r--r--··2.0·unx····29069·b-·defN·24-Oct-11·20:20·OEBPS/algorithm_details.xhtml17 ?rw-r--r--··2.0·unx····29069·b-·defN·24-Oct-11·20:59·OEBPS/algorithm_details.xhtml
18 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:20·META-INF/container.xml18 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
19 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:20·META-INF/com.apple.ibooks.display-options.xml19 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
20 18·files,·585446·bytes·uncompressed,·123718·bytes·compressed:··78.9%20 18·files,·585446·bytes·uncompressed,·123728·bytes·compressed:··78.9%
49.1 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
51.5 KB
OEBPS/new_api.xhtml
Max HTML report size reached
21.7 KB
OEBPS/engine_load.xhtml
Max HTML report size reached
15.6 KB
OEBPS/engine_keys.xhtml
Max HTML report size reached
26.8 KB
OEBPS/crypto.xhtml
Max HTML report size reached
1.21 KB
OEBPS/content.opf
1.18 KB
OEBPS/content.opf
Max HTML report size reached
26.9 KB
./usr/share/doc/erlang-doc/html/lib/crypto-5.5/doc/html/crypto.html
    
Offset 591, 15 lines modifiedOffset 591, 15 lines modified
  
591 ····<div·class="summary-row">591 ····<div·class="summary-row">
592 ······<div·class="summary-signature">592 ······<div·class="summary-signature">
593 ········<a·href="#t:rsa_params/0"·data-no-tooltip·translate="no">rsa_params()</a>593 ········<a·href="#t:rsa_params/0"·data-no-tooltip·translate="no">rsa_params()</a>
  
594 ······</div>594 ······</div>
  
595 ········<div·class="summary-synopsis"><pre><code·class="text">rsa_public()·=·[E,·N]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rsa_private</span><span·class="p"·data-group-id="6828588691-1">(</span><span·class="p"·data-group-id="6828588691-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6828588691-2">[</span><span·class="n">E</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·863,·SHA:·0c203f4920b85a2b6cb6588c100526068031adf83d49b1f7103c66f25e0c44b5·...·]-3">]</span></code></pre><p>Where·E·is·the·public·exponent,·N·is·public·modulus·and·D·is·the·private595 ········<div·class="summary-synopsis"><pre><code·class="text">rsa_public()·=·[E,·N]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rsa_private</span><span·class="p"·data-group-id="1460365880-1">(</span><span·class="p"·data-group-id="1460365880-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1460365880-2">[</span><span·class="n">E</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·863,·SHA:·4a079a0740c740517f6b3d5bf183e1a4118b4e6bdeda1aeaf96e20b46cee593b·...·]-3">]</span></code></pre><p>Where·E·is·the·public·exponent,·N·is·public·modulus·and·D·is·the·private
596 exponent.·The·longer·key·format·contains·redundant·information·that·will·make596 exponent.·The·longer·key·format·contains·redundant·information·that·will·make
597 the·calculation·faster.·P1·and·P2·are·first·and·second·prime·factors.·E1·and·E2597 the·calculation·faster.·P1·and·P2·are·first·and·second·prime·factors.·E1·and·E2
598 are·first·and·second·exponents.·C·is·the·CRT·coefficient.·The·terminology·is598 are·first·and·second·exponents.·C·is·the·CRT·coefficient.·The·terminology·is
599 taken·from·<a·href="http://www.ietf.org/rfc/rfc3447.txt">RFC·3447</a>.</p></div>599 taken·from·<a·href="http://www.ietf.org/rfc/rfc3447.txt">RFC·3447</a>.</p></div>
  
600 ····</div>600 ····</div>
  
Offset 3123, 15 lines modifiedOffset 3123, 15 lines modified
  
3123 ······<div·class="specs">3123 ······<div·class="specs">
  
3124 ··········<pre·translate="no"><span·class="attribute">-type</span>·rsa_params()·::·{ModulusSizeInBits·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·PublicExponent·::·<a·href="#t:key_integer/0">key_integer</a>()}.</pre>3124 ··········<pre·translate="no"><span·class="attribute">-type</span>·rsa_params()·::·{ModulusSizeInBits·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·PublicExponent·::·<a·href="#t:key_integer/0">key_integer</a>()}.</pre>
  
3125 ······</div>3125 ······</div>
  
3126 <pre><code·class="text">rsa_public()·=·[E,·N]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rsa_private</span><span·class="p"·data-group-id="6828588691-1">(</span><span·class="p"·data-group-id="6828588691-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6828588691-2">[</span><span·class="n">E</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·863,·SHA:·0c203f4920b85a2b6cb6588c100526068031adf83d49b1f7103c66f25e0c44b5·...·]-3">]</span></code></pre><p>Where·E·is·the·public·exponent,·N·is·public·modulus·and·D·is·the·private3126 <pre><code·class="text">rsa_public()·=·[E,·N]</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">rsa_private</span><span·class="p"·data-group-id="1460365880-1">(</span><span·class="p"·data-group-id="1460365880-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1460365880-2">[</span><span·class="n">E</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·863,·SHA:·4a079a0740c740517f6b3d5bf183e1a4118b4e6bdeda1aeaf96e20b46cee593b·...·]-3">]</span></code></pre><p>Where·E·is·the·public·exponent,·N·is·public·modulus·and·D·is·the·private
3127 exponent.·The·longer·key·format·contains·redundant·information·that·will·make3127 exponent.·The·longer·key·format·contains·redundant·information·that·will·make
3128 the·calculation·faster.·P1·and·P2·are·first·and·second·prime·factors.·E1·and·E23128 the·calculation·faster.·P1·and·P2·are·first·and·second·prime·factors.·E1·and·E2
3129 are·first·and·second·exponents.·C·is·the·CRT·coefficient.·The·terminology·is3129 are·first·and·second·exponents.·C·is·the·CRT·coefficient.·The·terminology·is
3130 taken·from·<a·href="http://www.ietf.org/rfc/rfc3447.txt">RFC·3447</a>.</p>3130 taken·from·<a·href="http://www.ietf.org/rfc/rfc3447.txt">RFC·3447</a>.</p>
3131 ··</section>3131 ··</section>
3132 </section>3132 </section>
3133 <section·class="detail"·id="t:rsa_private/0">3133 <section·class="detail"·id="t:rsa_private/0">
Offset 5542, 17 lines modifiedOffset 5542, 17 lines modified
5542 ······</div>5542 ······</div>
  
5543 <p>Create·a·state·object·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html">random·number·generation</a>,·in·order·to5543 <p>Create·a·state·object·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html">random·number·generation</a>,·in·order·to
5544 generate·cryptographically·strong·random·numbers·(based·on·OpenSSL's5544 generate·cryptographically·strong·random·numbers·(based·on·OpenSSL's
5545 <code·class="inline">BN_rand_range</code>).</p><p>Saves·the·state·in·the·process·dictionary·before·returning·it·as5545 <code·class="inline">BN_rand_range</code>).</p><p>Saves·the·state·in·the·process·dictionary·before·returning·it·as
5546 well.·See·also·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html#seed/1"><code·class="inline">rand:seed/1</code></a>·and·<a·href="#rand_seed_s/0"><code·class="inline">rand_seed_s/0</code></a>.</p><p>When·using·the·state·object·from·this·function·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html"><code·class="inline">rand</code></a>·functions·using·it5546 well.·See·also·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html#seed/1"><code·class="inline">rand:seed/1</code></a>·and·<a·href="#rand_seed_s/0"><code·class="inline">rand_seed_s/0</code></a>.</p><p>When·using·the·state·object·from·this·function·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html"><code·class="inline">rand</code></a>·functions·using·it
5547 may·raise·exception·<code·class="inline">error:low_entropy</code>·in·case·the·random·generator·failed·due5547 may·raise·exception·<code·class="inline">error:low_entropy</code>·in·case·the·random·generator·failed·due
5548 to·lack·of·secure·&quot;randomness&quot;.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed</span><span·class="p"·data-group-id="2462422382-1">(</span><span·class="p"·data-group-id="2462422382-1">)</span><span·class="p">,</span><span·class="w">5548 to·lack·of·secure·&quot;randomness&quot;.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed</span><span·class="p"·data-group-id="2052029252-1">(</span><span·class="p"·data-group-id="2052029252-1">)</span><span·class="p">,</span><span·class="w">
5549 </span><span·class="p">_</span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="2462422382-2">(</span><span·class="mi">42</span><span·class="p"·data-group-id="2462422382-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·[1;·42]</span><span·class="w">5549 </span><span·class="p">_</span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="2052029252-2">(</span><span·class="mi">42</span><span·class="p"·data-group-id="2052029252-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·[1;·42]</span><span·class="w">
5550 </span><span·class="p">_</span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="2462422382-3">(</span><span·class="p"·data-group-id="2462422382-3">)</span><span·class="p">.</span><span·class="w">·····</span><span·class="c1">%·[0.0;·1.0[</span></code></pre>5550 </span><span·class="p">_</span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="2052029252-3">(</span><span·class="p"·data-group-id="2052029252-3">)</span><span·class="p">.</span><span·class="w">·····</span><span·class="c1">%·[0.0;·1.0[</span></code></pre>
5551 ··</section>5551 ··</section>
5552 </section>5552 </section>
5553 <section·class="detail"·id="rand_seed/1">5553 <section·class="detail"·id="rand_seed/1">
  
5554 ··<div·class="detail-header">5554 ··<div·class="detail-header">
5555 ····<a·href="#rand_seed/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">5555 ····<a·href="#rand_seed/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
5556 ······<i·class="ri-link-m"·aria-hidden="true"></i>5556 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 5610, 17 lines modifiedOffset 5610, 17 lines modified
  
5610 ······</div>5610 ······</div>
  
5611 <p>Create·a·state·object·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html">random·number·generation</a>,·in·order·to5611 <p>Create·a·state·object·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html">random·number·generation</a>,·in·order·to
5612 generate·cryptographically·strong·random·numbers.</p><p>Saves·the·state·in·the·process·dictionary·before·returning·it·as·well.·See·also5612 generate·cryptographically·strong·random·numbers.</p><p>Saves·the·state·in·the·process·dictionary·before·returning·it·as·well.·See·also
5613 <a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html#seed/1"><code·class="inline">rand:seed/1</code></a>·and·<a·href="#rand_seed_alg_s/1"><code·class="inline">rand_seed_alg_s/1</code></a>.</p><p>When·using·the·state·object·from·this·function·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html"><code·class="inline">rand</code></a>·functions·using·it5613 <a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html#seed/1"><code·class="inline">rand:seed/1</code></a>·and·<a·href="#rand_seed_alg_s/1"><code·class="inline">rand_seed_alg_s/1</code></a>.</p><p>When·using·the·state·object·from·this·function·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html"><code·class="inline">rand</code></a>·functions·using·it
5614 may·raise·exception·<code·class="inline">error:low_entropy</code>·in·case·the·random·generator·failed·due5614 may·raise·exception·<code·class="inline">error:low_entropy</code>·in·case·the·random·generator·failed·due
5615 to·lack·of·secure·&quot;randomness&quot;.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed_alg</span><span·class="p"·data-group-id="1272319752-1">(</span><span·class="ss">crypto_cache</span><span·class="p"·data-group-id="1272319752-1">)</span><span·class="p">,</span><span·class="w">5615 to·lack·of·secure·&quot;randomness&quot;.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed_alg</span><span·class="p"·data-group-id="1137126864-1">(</span><span·class="ss">crypto_cache</span><span·class="p"·data-group-id="1137126864-1">)</span><span·class="p">,</span><span·class="w">
5616 </span><span·class="p">_</span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="1272319752-2">(</span><span·class="mi">42</span><span·class="p"·data-group-id="1272319752-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·[1;·42]</span><span·class="w">5616 </span><span·class="p">_</span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="1137126864-2">(</span><span·class="mi">42</span><span·class="p"·data-group-id="1137126864-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·[1;·42]</span><span·class="w">
5617 </span><span·class="p">_</span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="1272319752-3">(</span><span·class="p"·data-group-id="1272319752-3">)</span><span·class="p">.</span><span·class="w">·····</span><span·class="c1">%·[0.0;·1.0[</span></code></pre>5617 </span><span·class="p">_</span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="1137126864-3">(</span><span·class="p"·data-group-id="1137126864-3">)</span><span·class="p">.</span><span·class="w">·····</span><span·class="c1">%·[0.0;·1.0[</span></code></pre>
5618 ··</section>5618 ··</section>
5619 </section>5619 </section>
5620 <section·class="detail"·id="rand_seed_alg/2">5620 <section·class="detail"·id="rand_seed_alg/2">
  
5621 ··<div·class="detail-header">5621 ··<div·class="detail-header">
5622 ····<a·href="#rand_seed_alg/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">5622 ····<a·href="#rand_seed_alg/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
5623 ······<i·class="ri-link-m"·aria-hidden="true"></i>5623 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 5644, 20 lines modifiedOffset 5644, 20 lines modified
  
5644 ··········<pre·translate="no"><span·class="attribute">-spec</span>·rand_seed_alg(Alg·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),·Seed·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·{<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html#t:alg_handler/0">rand:alg_handler</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>()·|·<a·href="#t:rand_cache_seed/0">rand_cache_seed</a>()}.</pre>5644 ··········<pre·translate="no"><span·class="attribute">-spec</span>·rand_seed_alg(Alg·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),·Seed·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·{<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html#t:alg_handler/0">rand:alg_handler</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>()·|·<a·href="#t:rand_cache_seed/0">rand_cache_seed</a>()}.</pre>
  
5645 ······</div>5645 ······</div>
  
5646 <p>Creates·a·state·object·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html">random·number·generation</a>,·in·order·to5646 <p>Creates·a·state·object·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/rand.html">random·number·generation</a>,·in·order·to
5647 generate·cryptographically·unpredictable·random·numbers.</p><p>Saves·the·state·in·the·process·dictionary·before·returning·it·as·well.·See·also5647 generate·cryptographically·unpredictable·random·numbers.</p><p>Saves·the·state·in·the·process·dictionary·before·returning·it·as·well.·See·also
5648 <a·href="#rand_seed_alg_s/2"><code·class="inline">rand_seed_alg_s/2</code></a>.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed_alg</span><span·class="p"·data-group-id="3539438923-1">(</span><span·class="ss">crypto_aes</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my·seed&quot;</span><span·class="p"·data-group-id="3539438923-1">)</span><span·class="p">,</span><span·class="w">5648 <a·href="#rand_seed_alg_s/2"><code·class="inline">rand_seed_alg_s/2</code></a>.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed_alg</span><span·class="p"·data-group-id="5242734882-1">(</span><span·class="ss">crypto_aes</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my·seed&quot;</span><span·class="p"·data-group-id="5242734882-1">)</span><span·class="p">,</span><span·class="w">
5649 </span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="3539438923-2">(</span><span·class="mi">42</span><span·class="p"·data-group-id="3539438923-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·[1;·42]</span><span·class="w">5649 </span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5242734882-2">(</span><span·class="mi">42</span><span·class="p"·data-group-id="5242734882-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·[1;·42]</span><span·class="w">
5650 </span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="3539438923-3">(</span><span·class="p"·data-group-id="3539438923-3">)</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%·[0.0;·1.0[</span><span·class="w">5650 </span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5242734882-3">(</span><span·class="p"·data-group-id="5242734882-3">)</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%·[0.0;·1.0[</span><span·class="w">
5651 </span><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed_alg</span><span·class="p"·data-group-id="3539438923-4">(</span><span·class="ss">crypto_aes</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my·seed&quot;</span><span·class="p"·data-group-id="3539438923-4">)</span><span·class="p">,</span><span·class="w">5651 </span><span·class="p">_</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">rand_seed_alg</span><span·class="p"·data-group-id="5242734882-4">(</span><span·class="ss">crypto_aes</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my·seed&quot;</span><span·class="p"·data-group-id="5242734882-4">)</span><span·class="p">,</span><span·class="w">
5652 </span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="3539438923-5">(</span><span·class="mi">42</span><span·class="p"·data-group-id="3539438923-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Same·values</span><span·class="w">5652 </span><span·class="n">IntegerValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5242734882-5">(</span><span·class="mi">42</span><span·class="p"·data-group-id="5242734882-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Same·values</span><span·class="w">
5653 </span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="3539438923-6">(</span><span·class="p"·data-group-id="3539438923-6">)</span><span·class="p">.</span><span·class="w">·····</span><span·class="c1">%·again</span></code></pre>5653 </span><span·class="n">FloatValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5242734882-6">(</span><span·class="p"·data-group-id="5242734882-6">)</span><span·class="p">.</span><span·class="w">·····</span><span·class="c1">%·again</span></code></pre>
5654 ··</section>5654 ··</section>
5655 </section>5655 </section>
5656 <section·class="detail"·id="rand_seed_alg_s/1">5656 <section·class="detail"·id="rand_seed_alg_s/1">
  
5657 ··<div·class="detail-header">5657 ··<div·class="detail-header">
5658 ····<a·href="#rand_seed_alg_s/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">5658 ····<a·href="#rand_seed_alg_s/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
5659 ······<i·class="ri-link-m"·aria-hidden="true"></i>5659 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 6146, 20 lines modifiedOffset 6146, 20 lines modified
6146 ················cryptolib_version_compiled·=>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·undefined,6146 ················cryptolib_version_compiled·=>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·undefined,
6147 ················cryptolib_version_linked·:=·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),6147 ················cryptolib_version_linked·:=·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
6148 ················link_type·:=·dynamic·|·static,6148 ················link_type·:=·dynamic·|·static,
6149 ················otp_crypto_version·:=·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()}.</pre>6149 ················otp_crypto_version·:=·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()}.</pre>
  
6150 ······</div>6150 ······</div>
  
6151 <p>Get·information·about·crypto·and·the·OpenSSL·backend.</p><p>Returns·a·map·with·information·about·the·compilation·and·linking·of·crypto.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="6301008498-1">(</span><span·class="p"·data-group-id="6301008498-1">)</span><span·class="p">.</span><span·class="w">6151 <p>Get·information·about·crypto·and·the·OpenSSL·backend.</p><p>Returns·a·map·with·information·about·the·compilation·and·linking·of·crypto.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="9649352346-1">(</span><span·class="p"·data-group-id="9649352346-1">)</span><span·class="p">.</span><span·class="w">
6152 </span><span·class="p"·data-group-id="6301008498-2">#{</span><span·class="ss">compile_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">6152 </span><span·class="p"·data-group-id="9649352346-2">#{</span><span·class="ss">compile_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">
6153 ··</span><span·class="ss">cryptolib_version_compiled</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;OpenSSL·3.0.0·7·sep·2021&quot;</span><span·class="p">,</span><span·class="w">6153 ··</span><span·class="ss">cryptolib_version_compiled</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;OpenSSL·3.0.0·7·sep·2021&quot;</span><span·class="p">,</span><span·class="w">
6154 ··</span><span·class="ss">cryptolib_version_linked</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;OpenSSL·3.0.0·7·sep·2021&quot;</span><span·class="p">,</span><span·class="w">6154 ··</span><span·class="ss">cryptolib_version_linked</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;OpenSSL·3.0.0·7·sep·2021&quot;</span><span·class="p">,</span><span·class="w">
6155 ··</span><span·class="ss">link_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">dynamic</span><span·class="p">,</span><span·class="w">6155 ··</span><span·class="ss">link_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">dynamic</span><span·class="p">,</span><span·class="w">
6156 ··</span><span·class="ss">otp_crypto_version</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;5.0.2&quot;</span><span·class="p"·data-group-id="6301008498-2">}</span><span·class="w">6156 ··</span><span·class="ss">otp_crypto_version</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;5.0.2&quot;</span><span·class="p"·data-group-id="9649352346-2">}</span><span·class="w">
6157 </span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>More·association·types·than·documented·may·be·present·in·the·map.</p>6157 </span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>More·association·types·than·documented·may·be·present·in·the·map.</p>
6158 ··</section>6158 ··</section>
6159 </section>6159 </section>
6160 <section·class="detail"·id="info_fips/0">6160 <section·class="detail"·id="info_fips/0">
  
6161 ··<div·class="detail-header">6161 ··<div·class="detail-header">
6162 ····<a·href="#info_fips/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">6162 ····<a·href="#info_fips/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 6218, 16 lines modifiedOffset 6218, 16 lines modified
6218 ··········<pre·translate="no"><span·class="attribute">-spec</span>·info_lib()·->·[{Name,·VerNum,·VerStr}]6218 ··········<pre·translate="no"><span·class="attribute">-spec</span>·info_lib()·->·[{Name,·VerNum,·VerStr}]
6219 ··················when·Name·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·VerNum·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·VerStr·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>6219 ··················when·Name·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·VerNum·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·VerStr·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>
  
6220 ······</div>6220 ······</div>
  
6221 <p>Get·the·name·and·version·of·the·libraries·used·by·crypto.</p><p><code·class="inline">Name</code>·is·the·name·of·the·library.·<code·class="inline">VerNum</code>·is·the·numeric·version·according·to6221 <p>Get·the·name·and·version·of·the·libraries·used·by·crypto.</p><p><code·class="inline">Name</code>·is·the·name·of·the·library.·<code·class="inline">VerNum</code>·is·the·numeric·version·according·to
6222 the·library's·own·versioning·scheme.·<code·class="inline">VerStr</code>·contains·a·text·variant·of·the6222 the·library's·own·versioning·scheme.·<code·class="inline">VerStr</code>·contains·a·text·variant·of·the
6223 version.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">info_lib</span><span·class="p"·data-group-id="7000588306-1">(</span><span·class="p"·data-group-id="7000588306-1">)</span><span·class="p">.</span><span·class="w">6223 version.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">info_lib</span><span·class="p"·data-group-id="2635121752-1">(</span><span·class="p"·data-group-id="2635121752-1">)</span><span·class="p">.</span><span·class="w">
6224 </span><span·class="p"·data-group-id="7000588306-2">[</span><span·class="p"·data-group-id="7000588306-3">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;OpenSSL&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="mi">269484095</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·251,·SHA:·4a8aed8f94f852bbb3dbbc1986d83c8f7ae7608b7f68391fd975f70d59692535·...·]-2">]</span></code></pre><blockquote><h4·class="info">Note</h4><p>From·OTP·R16·the·<em>numeric·version</em>·represents·the·version·of·the·OpenSSL6224 </span><span·class="p"·data-group-id="2635121752-2">[</span><span·class="p"·data-group-id="2635121752-3">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;OpenSSL&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="mi">269484095</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·251,·SHA:·ab5eadc6d912c469b85f006e32d14d10d6a04d976cb3e35dad26ed48ed39457f·...·]-2">]</span></code></pre><blockquote><h4·class="info">Note</h4><p>From·OTP·R16·the·<em>numeric·version</em>·represents·the·version·of·the·OpenSSL
6225 <em>header·files</em>·(<code·class="inline">openssl/opensslv.h</code>)·used·when·crypto·was·compiled.·The·text6225 <em>header·files</em>·(<code·class="inline">openssl/opensslv.h</code>)·used·when·crypto·was·compiled.·The·text
6226 variant·represents·the·libcrypto·library·used·at·runtime.·In·earlier·OTP6226 variant·represents·the·libcrypto·library·used·at·runtime.·In·earlier·OTP
6227 versions·both·numeric·and·text·was·taken·from·the·library.</p></blockquote>6227 versions·both·numeric·and·text·was·taken·from·the·library.</p></blockquote>
6228 ··</section>6228 ··</section>
6229 </section>6229 </section>
6230 <section·class="detail"·id="mod_pow/3">6230 <section·class="detail"·id="mod_pow/3">
  
15.7 KB
./usr/share/doc/erlang-doc/html/lib/crypto-5.5/doc/html/engine_keys.html
    
Offset 157, 47 lines modifiedOffset 157, 47 lines modified
157 <h3·id="sign-with-an-engine-stored-private-key"·class="section-heading">157 <h3·id="sign-with-an-engine-stored-private-key"·class="section-heading">
158 ··<a·href="#sign-with-an-engine-stored-private-key"·class="hover-link">158 ··<a·href="#sign-with-an-engine-stored-private-key"·class="hover-link">
159 ····<i·class="ri-link-m"·aria-hidden="true"></i>159 ····<i·class="ri-link-m"·aria-hidden="true"></i>
160 ··</a>160 ··</a>
161 ··<span·class="text">Sign·with·an·engine·stored·private·key</span>161 ··<span·class="text">Sign·with·an·engine·stored·private·key</span>
162 </h3>162 </h3>
163 <p>This·example·shows·how·to·construct·a·key·reference·that·is·used·in·a·sign163 <p>This·example·shows·how·to·construct·a·key·reference·that·is·used·in·a·sign
164 operation.·The·actual·key·is·stored·in·the·engine·that·is·loaded·at·prompt·1.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="2484965218-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p"·data-group-id="2484965218-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·276,·SHA:·7b2263294dce6659ff604749b35c0bcbca28266abc8ab0db733b32b02a48a0ef·...·]-2">)</span><span·class="p">.</span><span·class="w">164 operation.·The·actual·key·is·stored·in·the·engine·that·is·loaded·at·prompt·1.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="6315508266-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p"·data-group-id="6315508266-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·276,·SHA:·2fec24248856f4960ae5cc3937ef4c2bc2f0e3216a5b5d6182e0f49424a18a78·...·]-2">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">165 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
166 </span><span·class="p"·data-group-id="2484965218-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2399045421</span><span·class="p">.</span><span·class="mf">3028942852.173962</span><span·[·...·truncated·by·diffoscope;·len:·62,·SHA:·59642802b0a0521e38317cd9da25e843bfd3a10e275feddf600ab97974defcf2·...·]-3">}</span><span·class="gp·unselectable">166 </span><span·class="p"·data-group-id="6315508266-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2399045421</span><span·class="p">.</span><span·class="mf">3028942852.173962</span><span·[·...·truncated·by·diffoscope;·len:·62,·SHA:·424ae17385b9591e625b0522d46405f269844a29dcfc296f0432902648b55826·...·]-3">}</span><span·class="gp·unselectable">
167 2&gt;·</span><span·class="n">PrivKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2484965218-4">#{</span><span·class="ss">engine</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p">,</span><span·class="w">167 2&gt;·</span><span·class="n">PrivKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6315508266-4">#{</span><span·class="ss">engine</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p">,</span><span·class="w">
168 ···············</span><span·class="ss">key_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;id·of·the·private·key·in·Engine&quot;</span><span·class="p"·data-group-id="2484965218-4">}</span><span·class="p">.</span><span·class="w">168 ···············</span><span·class="ss">key_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;id·of·the·private·key·in·Engine&quot;</span><span·class="p"·data-group-id="6315508266-4">}</span><span·class="p">.</span><span·class="w">
169 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">169 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
170 3&gt;·</span><span·class="n">Signature</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">sign</span><span·class="p"·data-group-id="2484965218-5">(</span><span·class="ss">rsa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;The·message&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·143,·SHA:·c1c1e2f89f2628d890406e7d29c66833923d4980f7f312d6c352cf1ada1a329f·...·]-5">)</span><span·class="p">.</span><span·class="w">170 3&gt;·</span><span·class="n">Signature</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">sign</span><span·class="p"·data-group-id="6315508266-5">(</span><span·class="ss">rsa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;The·message&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·143,·SHA:·22b500cdc8b190c80f489e7561e861061a5871837904ad7850a072ca3902eae9·...·]-5">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="p">&lt;&lt;</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">125</span><span·class="p">,</span><span·class="mi">254</span><span·class="p">,</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">233</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">63</span><span·class="p">,</span><span·class="mi">168</span><span·class="p">,</span><span·class="mi">28</span><span·class="p">,</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">121</span><span·class="p">,</span><span·class="mi">76</span><span·class="p">,</span><span·class="w">171 </span><span·class="p">&lt;&lt;</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">125</span><span·class="p">,</span><span·class="mi">254</span><span·class="p">,</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">233</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">63</span><span·class="p">,</span><span·class="mi">168</span><span·class="p">,</span><span·class="mi">28</span><span·class="p">,</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">121</span><span·class="p">,</span><span·class="mi">76</span><span·class="p">,</span><span·class="w">
172 ··</span><span·class="mi">207</span><span·class="p">,</span><span·class="mi">177</span><span·class="p">,</span><span·class="mi">124</span><span·class="p">,</span><span·class="mi">183</span><span·class="p">,</span><span·class="mi">156</span><span·class="p">,</span><span·class="mi">185</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">243</span><span·class="p">,</span><span·class="mi">36</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">125</span><span·class="p">,</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">231</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span></code></pre><h3·id="verify-with-an-engine-stored-public-key"·class="section-heading">172 ··</span><span·class="mi">207</span><span·class="p">,</span><span·class="mi">177</span><span·class="p">,</span><span·class="mi">124</span><span·class="p">,</span><span·class="mi">183</span><span·class="p">,</span><span·class="mi">156</span><span·class="p">,</span><span·class="mi">185</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">243</span><span·class="p">,</span><span·class="mi">36</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">125</span><span·class="p">,</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">231</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span></code></pre><h3·id="verify-with-an-engine-stored-public-key"·class="section-heading">
173 ··<a·href="#verify-with-an-engine-stored-public-key"·class="hover-link">173 ··<a·href="#verify-with-an-engine-stored-public-key"·class="hover-link">
174 ····<i·class="ri-link-m"·aria-hidden="true"></i>174 ····<i·class="ri-link-m"·aria-hidden="true"></i>
175 ··</a>175 ··</a>
176 ··<span·class="text">Verify·with·an·engine·stored·public·key</span>176 ··<span·class="text">Verify·with·an·engine·stored·public·key</span>
177 </h3>177 </h3>
178 <p>Here·the·signature·and·message·in·the·last·example·is·verifyed·using·the·public178 <p>Here·the·signature·and·message·in·the·last·example·is·verifyed·using·the·public
179 key.·The·public·key·is·stored·in·an·engine,·only·to·exemplify·that·it·is179 key.·The·public·key·is·stored·in·an·engine,·only·to·exemplify·that·it·is
180 possible.·The·public·key·could·of·course·be·handled·openly·as·usual.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="n">PublicKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0438269542-1">#{</span><span·class="ss">engine</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p">,</span><span·class="w">180 possible.·The·public·key·could·of·course·be·handled·openly·as·usual.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="n">PublicKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2287430769-1">#{</span><span·class="ss">engine</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p">,</span><span·class="w">
181 ·················</span><span·class="ss">key_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;id·of·the·public·key·in·Engine&quot;</span><span·class="p"·data-group-id="0438269542-1">}</span><span·class="p">.</span><span·class="w">181 ·················</span><span·class="ss">key_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;id·of·the·public·key·in·Engine&quot;</span><span·class="p"·data-group-id="2287430769-1">}</span><span·class="p">.</span><span·class="w">
182 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">182 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
183 5&gt;·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">verify</span><span·class="p"·data-group-id="0438269542-2">(</span><span·class="ss">rsa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;The·message&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·225,·SHA:·42c5c5f35e05a483370ca3ac269d981e9e766dc4da9a9c1b2eef05c81956c8bf·...·]-2">)</span><span·class="p">.</span><span·class="w">183 5&gt;·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">verify</span><span·class="p"·data-group-id="2287430769-2">(</span><span·class="ss">rsa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;The·message&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·225,·SHA:·5939de9948a7067c1b0366ce80aaa2c5da1c1aaecfda8645721fe023e111548a·...·]-2">)</span><span·class="p">.</span><span·class="w">
184 </span><span·class="ss">true</span><span·class="w">184 </span><span·class="ss">true</span><span·class="w">
185 </span><span·class="mi">6</span><span·class="o">&gt;</span></code></pre><h3·id="using-a-password-protected-private-key"·class="section-heading">185 </span><span·class="mi">6</span><span·class="o">&gt;</span></code></pre><h3·id="using-a-password-protected-private-key"·class="section-heading">
186 ··<a·href="#using-a-password-protected-private-key"·class="hover-link">186 ··<a·href="#using-a-password-protected-private-key"·class="hover-link">
187 ····<i·class="ri-link-m"·aria-hidden="true"></i>187 ····<i·class="ri-link-m"·aria-hidden="true"></i>
188 ··</a>188 ··</a>
189 ··<span·class="text">Using·a·password·protected·private·key</span>189 ··<span·class="text">Using·a·password·protected·private·key</span>
190 </h3>190 </h3>
191 <p>The·same·example·as·the·first·sign·example,·except·that·a·password·protects·the191 <p>The·same·example·as·the·first·sign·example,·except·that·a·password·protects·the
192 key·down·in·the·Engine.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="n">PrivKeyPwd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0546403731-1">#{</span><span·class="ss">engine</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p">,</span><span·class="w">192 key·down·in·the·Engine.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="n">PrivKeyPwd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8675247462-1">#{</span><span·class="ss">engine</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">EngineRef</span><span·class="p">,</span><span·class="w">
193 ··················</span><span·class="ss">key_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;id·of·the·pwd·protected·private·key·in·Engine&quot;</span><span·class="p">,</span><span·class="w">193 ··················</span><span·class="ss">key_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;id·of·the·pwd·protected·private·key·in·Engine&quot;</span><span·class="p">,</span><span·class="w">
194 »       »       ··</span><span·class="ss">password</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;password&quot;</span><span·class="p"·data-group-id="0546403731-1">}</span><span·class="p">.</span><span·class="w">194 »       »       ··</span><span·class="ss">password</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;password&quot;</span><span·class="p"·data-group-id="8675247462-1">}</span><span·class="p">.</span><span·class="w">
195 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">195 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
196 7&gt;·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">sign</span><span·class="p"·data-group-id="0546403731-2">(</span><span·class="ss">rsa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;The·message&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·146,·SHA:·66e1c6cb698e2e7792b6d094a0131b829c1c9f334d2aa45b87a44efc21ed85c2·...·]-2">)</span><span·class="p">.</span><span·class="w">196 7&gt;·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">sign</span><span·class="p"·data-group-id="8675247462-2">(</span><span·class="ss">rsa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;The·message&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·146,·SHA:·2b8b9075af20004560f52b23b20c28a3eacf8eb9bfcbac8e01655b4238af6e2a·...·]-2">)</span><span·class="p">.</span><span·class="w">
197 </span><span·class="p">&lt;&lt;</span><span·class="mi">140</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">168</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="mi">211</span><span·class="p">,</span><span·class="mi">146</span><span·class="p">,</span><span·class="mi">183</span><span·class="p">,</span><span·class="mi">231</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">85</span><span·class="p">,</span><span·class="mi">163</span><span·class="p">,</span><span·class="w">197 </span><span·class="p">&lt;&lt;</span><span·class="mi">140</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">168</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="mi">211</span><span·class="p">,</span><span·class="mi">146</span><span·class="p">,</span><span·class="mi">183</span><span·class="p">,</span><span·class="mi">231</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">85</span><span·class="p">,</span><span·class="mi">163</span><span·class="p">,</span><span·class="w">
198 ··</span><span·class="mi">175</span><span·class="p">,</span><span·class="mi">106</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">241</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">120</span><span·class="p">,</span><span·class="mi">72</span><span·class="p">,</span><span·class="mi">149</span><span·class="p">,</span><span·class="mi">181</span><span·class="p">,</span><span·class="mi">181</span><span·class="p">,</span><span·class="mi">194</span><span·class="p">,</span><span·class="mi">154</span><span·class="p">,</span><span·class="mi">175</span><span·class="p">,</span><span·class="mi">76</span><span·class="p">,</span><span·class="w">198 ··</span><span·class="mi">175</span><span·class="p">,</span><span·class="mi">106</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">241</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">120</span><span·class="p">,</span><span·class="mi">72</span><span·class="p">,</span><span·class="mi">149</span><span·class="p">,</span><span·class="mi">181</span><span·class="p">,</span><span·class="mi">181</span><span·class="p">,</span><span·class="mi">194</span><span·class="p">,</span><span·class="mi">154</span><span·class="p">,</span><span·class="mi">175</span><span·class="p">,</span><span·class="mi">76</span><span·class="p">,</span><span·class="w">
199 ··</span><span·class="mi">223</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="w">199 ··</span><span·class="mi">223</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="w">
200 </span><span·class="mi">8</span><span·class="o">&gt;</span></code></pre>200 </span><span·class="mi">8</span><span·class="o">&gt;</span></code></pre>
201 </div>201 </div>
  
202 <div·class="bottom-actions"·id="bottom-actions">202 <div·class="bottom-actions"·id="bottom-actions">
22.0 KB
./usr/share/doc/erlang-doc/html/lib/crypto-5.5/doc/html/engine_load.html
    
Offset 148, 64 lines modifiedOffset 148, 64 lines modified
148 <h3·id="dynamically-load-an-engine-from-default-directory"·class="section-heading">148 <h3·id="dynamically-load-an-engine-from-default-directory"·class="section-heading">
149 ··<a·href="#dynamically-load-an-engine-from-default-directory"·class="hover-link">149 ··<a·href="#dynamically-load-an-engine-from-default-directory"·class="hover-link">
150 ····<i·class="ri-link-m"·aria-hidden="true"></i>150 ····<i·class="ri-link-m"·aria-hidden="true"></i>
151 ··</a>151 ··</a>
152 ··<span·class="text">Dynamically·load·an·engine·from·default·directory</span>152 ··<span·class="text">Dynamically·load·an·engine·from·default·directory</span>
153 </h3>153 </h3>
154 <p>If·the·engine·is·located·in·the·OpenSSL/LibreSSL·installation·<code·class="inline">engines</code>154 <p>If·the·engine·is·located·in·the·OpenSSL/LibreSSL·installation·<code·class="inline">engines</code>
155 directory.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="8329317410-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="8329317410-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·597,·SHA:·bd63c35706a19c18aa5d9088ab7669b5fa1954fd392955d74960c5f74a2c0959·...·]-2">)</span><span·class="p">.</span><span·class="w">155 directory.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="1253061068-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="1253061068-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·597,·SHA:·50916250f7a753ac344a05048e95143929185f4367b98ce452af2263a746e414·...·]-2">)</span><span·class="p">.</span><span·class="w">
156 ·</span><span·class="p"·data-group-id="8329317410-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="8329317410-5">}</span></code></pre><h3·id="load-an-engine-with-the-dynamic-engine"·class="section-heading">156 ·</span><span·class="p"·data-group-id="1253061068-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="1253061068-5">}</span></code></pre><h3·id="load-an-engine-with-the-dynamic-engine"·class="section-heading">
157 ··<a·href="#load-an-engine-with-the-dynamic-engine"·class="hover-link">157 ··<a·href="#load-an-engine-with-the-dynamic-engine"·class="hover-link">
158 ····<i·class="ri-link-m"·aria-hidden="true"></i>158 ····<i·class="ri-link-m"·aria-hidden="true"></i>
159 ··</a>159 ··</a>
160 ··<span·class="text">Load·an·engine·with·the·dynamic·engine</span>160 ··<span·class="text">Load·an·engine·with·the·dynamic·engine</span>
161 </h3>161 </h3>
162 <p>Load·an·engine·with·the·help·of·the·dynamic·engine·by·giving·the·path·to·the162 <p>Load·an·engine·with·the·help·of·the·dynamic·engine·by·giving·the·path·to·the
163 library.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7353667770-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="7353667770-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·124,·SHA:·90306d20321581c010846c7c5575d78782d192b8d1655745623575d3b035e85c·...·]-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;dynamic&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">163 library.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9820824045-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="9820824045-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·124,·SHA:·756f90e87b75f4470e89a7dfa3975f32be26f9f12b830a690c0c141204503de6·...·]-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;dynamic&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
164 ······································</span><span·class="p"·data-group-id="7353667770-3">[</span><span·class="p"·data-group-id="7353667770-4">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;SO_PATH&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">164 ······································</span><span·class="p"·data-group-id="9820824045-3">[</span><span·class="p"·data-group-id="9820824045-4">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;SO_PATH&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
165 ········································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/some/path/otp_test_engine.so&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7353667770-4">}</span><span·class="p">,</span><span·class="w">165 ········································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/some/path/otp_test_engine.so&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9820824045-4">}</span><span·class="p">,</span><span·class="w">
166 ·······································</span><span·class="p"·data-group-id="7353667770-5">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ID&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="p">&g[·...·truncated·by·diffoscope;·len:·54,·SHA:·862cc1ec7aff8a4083890d8aaec795bc6fc3831bfbbd121a919c99d55c51b68e·...·]-5">}</span><span·class="p">,</span><span·class="w">166 ·······································</span><span·class="p"·data-group-id="9820824045-5">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ID&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="p">&g[·...·truncated·by·diffoscope;·len:·54,·SHA:·31246b27c5c142bd2e5fca52aa4ffe970f4e66d740e2de1008e56746d1b6a148·...·]-5">}</span><span·class="p">,</span><span·class="w">
167 ·······································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;LOAD&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7353667770-3">]</span><span·class="p">,</span><span·class="w">167 ·······································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;LOAD&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9820824045-3">]</span><span·class="p">,</span><span·class="w">
168 ······································</span><span·class="p"·data-group-id="7353667770-6">[</span><span·class="p"·data-group-id="7353667770-6">]</span><span·class="p"·data-group-id="7353667770-2">)</span><span·class="p">.</span><span·class="w">168 ······································</span><span·class="p"·data-group-id="9820824045-6">[</span><span·class="p"·data-group-id="9820824045-6">]</span><span·class="p"·data-group-id="9820824045-2">)</span><span·class="p">.</span><span·class="w">
169 ·</span><span·class="p"·data-group-id="7353667770-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="7353667770-7">}</span></code></pre><h3·id="load-an-engine-and-replace-some-methods"·class="section-heading">169 ·</span><span·class="p"·data-group-id="9820824045-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="9820824045-7">}</span></code></pre><h3·id="load-an-engine-and-replace-some-methods"·class="section-heading">
170 ··<a·href="#load-an-engine-and-replace-some-methods"·class="hover-link">170 ··<a·href="#load-an-engine-and-replace-some-methods"·class="hover-link">
171 ····<i·class="ri-link-m"·aria-hidden="true"></i>171 ····<i·class="ri-link-m"·aria-hidden="true"></i>
172 ··</a>172 ··</a>
173 ··<span·class="text">Load·an·engine·and·replace·some·methods</span>173 ··<span·class="text">Load·an·engine·and·replace·some·methods</span>
174 </h3>174 </h3>
175 <p>Load·an·engine·with·the·help·of·the·dynamic·engine·and·just·replace·some·engine175 <p>Load·an·engine·with·the·help·of·the·dynamic·engine·and·just·replace·some·engine
176 methods.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1987047399-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="1987047399-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·124,·SHA:·7e04b79b91b62b5e040414a61b4daa331302840843095d8aaecc954870e86159·...·]-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;dynamic&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">176 methods.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2721554778-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="2721554778-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·124,·SHA:·79d22304df5f66715ac8c66c939767c0df1a84828032752945e94af08ec5224c·...·]-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;dynamic&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
177 ······································</span><span·class="p"·data-group-id="1987047399-3">[</span><span·class="p"·data-group-id="1987047399-4">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;SO_PATH&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">177 ······································</span><span·class="p"·data-group-id="2721554778-3">[</span><span·class="p"·data-group-id="2721554778-4">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;SO_PATH&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
178 ········································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/some/path/otp_test_engine.so&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1987047399-4">}</span><span·class="p">,</span><span·class="w">178 ········································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/some/path/otp_test_engine.so&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2721554778-4">}</span><span·class="p">,</span><span·class="w">
179 ·······································</span><span·class="p"·data-group-id="1987047399-5">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ID&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="p">&g[·...·truncated·by·diffoscope;·len:·54,·SHA:·4d181f0ff9ab9190a8e91be49d27f384c1def0ed11c1164635dc0029d4b6bedb·...·]-5">}</span><span·class="p">,</span><span·class="w">179 ·······································</span><span·class="p"·data-group-id="2721554778-5">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ID&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="p">&g[·...·truncated·by·diffoscope;·len:·54,·SHA:·04bf8108d9711dec7138b93ad98fad1a7b5fd8ddfab9cfef751dc0769c65d2e0·...·]-5">}</span><span·class="p">,</span><span·class="w">
180 ·······································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;LOAD&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1987047399-3">]</span><span·class="p">,</span><span·class="w">180 ·······································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;LOAD&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2721554778-3">]</span><span·class="p">,</span><span·class="w">
181 ······································</span><span·class="p"·data-group-id="1987047399-6">[</span><span·class="p"·data-group-id="1987047399-6">]</span><span·class="p"·data-group-id="1987047399-2">)</span><span·class="p">.</span><span·class="w">181 ······································</span><span·class="p"·data-group-id="2721554778-6">[</span><span·class="p"·data-group-id="2721554778-6">]</span><span·class="p"·data-group-id="2721554778-2">)</span><span·class="p">.</span><span·class="w">
182 </span><span·class="p"·data-group-id="1987047399-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="1987047399-7">}</span><span·class="gp·unselectable">182 </span><span·class="p"·data-group-id="2721554778-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="2721554778-7">}</span><span·class="gp·unselectable">
183 4&gt;·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">engine_register</span><span·class="p"·data-group-id="1987047399-8">(</span><span·class="n">Engine</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1987047399-9">[</span><span·class="ss">engine_method_digests</span><span·class="p"·data-group-id="1987047399-9">]</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·b44b818ada214a751be53e8ab508fb893caa38f3dc2240e944068a2a35fc5ff8·...·]-8">)</span><span·class="p">.</span><span·class="w">183 4&gt;·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">engine_register</span><span·class="p"·data-group-id="2721554778-8">(</span><span·class="n">Engine</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2721554778-9">[</span><span·class="ss">engine_method_digests</span><span·class="p"·data-group-id="2721554778-9">]</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·ffee59e9d0c6eafd3a72d512a8e3d294c861e4750047d89451800206a97589fb·...·]-8">)</span><span·class="p">.</span><span·class="w">
184 </span><span·class="ss">ok</span></code></pre><h3·id="load-with-the-ensure-loaded-function"·class="section-heading">184 </span><span·class="ss">ok</span></code></pre><h3·id="load-with-the-ensure-loaded-function"·class="section-heading">
185 ··<a·href="#load-with-the-ensure-loaded-function"·class="hover-link">185 ··<a·href="#load-with-the-ensure-loaded-function"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">Load·with·the·ensure·loaded·function</span>188 ··<span·class="text">Load·with·the·ensure·loaded·function</span>
189 </h3>189 </h3>
190 <p>This·function·makes·sure·the·engine·is·loaded·just·once·and·the·ID·is·added·to190 <p>This·function·makes·sure·the·engine·is·loaded·just·once·and·the·ID·is·added·to
191 the·internal·engine·list·of·OpenSSL.·The·following·calls·to·the·function·will191 the·internal·engine·list·of·OpenSSL.·The·following·calls·to·the·function·will
192 check·if·the·ID·is·loaded·and·then·just·get·a·new·reference·to·the·engine.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4669361684-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="4669361684-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·132,·SHA:·f345b08ae62a3f0e3dbaf50ba8ee69c15c190a563d705040eae5a877902e3f48·...·]4-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">192 check·if·the·ID·is·loaded·and·then·just·get·a·new·reference·to·the·engine.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0884387014-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Engine</span><span·class="p"·data-group-id="0884387014-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·132,·SHA:·c08ca0344d219d92d0d9a2d9a7404227f590079d451e769cccac96851d9788a3·...·]4-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
193 ···············································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/some/path/otp_test_engine.so&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4669361684-2">)</span><span·class="p">.</span><span·class="w">193 ···············································</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/some/path/otp_test_engine.so&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0884387014-2">)</span><span·class="p">.</span><span·class="w">
194 ·</span><span·class="p"·data-group-id="4669361684-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="4669361684-3">}</span></code></pre><p>To·remove·the·tag·from·the·OpenSSL·engine[·...·truncated·by·diffoscope;·len:·468,·SHA:·f1ce2dda5321158de74b1d9fc4aae5bfc5af2275193828753c1d1b094911a2cb·...·]8-1">)</span><span·class="p">.</span><span·class="w">194 ·</span><span·class="p"·data-group-id="0884387014-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Ref</span><span·class="p"·data-group-id="0884387014-3">}</span></code></pre><p>To·remove·the·tag·from·the·OpenSSL·engine[·...·truncated·by·diffoscope;·len:·468,·SHA:·d5665c83f91d1afd53f065adce3fa439085006af99e35a1ec4d0d8a32204b7d0·...·]8-1">)</span><span·class="p">.</span><span·class="w">
195 ·</span><span·class="ss">ok</span></code></pre><p>To·unload·it·use·<a·href="crypto.html#engine_unload/1"><code·class="inline">crypto:engine_unload/1</code></a>·which·removes·the·references·to·the195 ·</span><span·class="ss">ok</span></code></pre><p>To·unload·it·use·<a·href="crypto.html#engine_unload/1"><code·class="inline">crypto:engine_unload/1</code></a>·which·removes·the·references·to·the
196 engine.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">engine_unload</span><span·class="p"·data-group-id="1267727202-1">(</span><span·class="n">Engine</span><span·class="p"·data-group-id="1267727202-1">)</span><span·class="p">.</span><span·class="w">196 engine.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">engine_unload</span><span·class="p"·data-group-id="7818419562-1">(</span><span·class="n">Engine</span><span·class="p"·data-group-id="7818419562-1">)</span><span·class="p">.</span><span·class="w">
197 ·</span><span·class="ss">ok</span></code></pre><h3·id="list-all-engines-currently-loaded"·class="section-heading">197 ·</span><span·class="ss">ok</span></code></pre><h3·id="list-all-engines-currently-loaded"·class="section-heading">
198 ··<a·href="#list-all-engines-currently-loaded"·class="hover-link">198 ··<a·href="#list-all-engines-currently-loaded"·class="hover-link">
199 ····<i·class="ri-link-m"·aria-hidden="true"></i>199 ····<i·class="ri-link-m"·aria-hidden="true"></i>
200 ··</a>200 ··</a>
201 ··<span·class="text">List·all·engines·currently·loaded</span>201 ··<span·class="text">List·all·engines·currently·loaded</span>
202 </h3>202 </h3>
203 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">engine_list</span><span·class="p"·data-group-id="7784303599-1">(</span><span·class="p"·data-group-id="7784303599-1">)</span><span·class="p">.</span><span·class="w">203 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">engine_list</span><span·class="p"·data-group-id="0723515454-1">(</span><span·class="p"·data-group-id="0723515454-1">)</span><span·class="p">.</span><span·class="w">
204 </span><span·class="p"·data-group-id="7784303599-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;dynamic&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·59,·SHA:·e607b46f6f4ace9d1a09d5ac91cbef34f06182fadf2527ab20adee46bc79110f·...·]-2">]</span></code></pre>204 </span><span·class="p"·data-group-id="0723515454-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;dynamic&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;MD5&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·59,·SHA:·284e31c9f8c22bbedd0e3d45d168fa35cd5c92db224d4ea4fdca1c0d408d7925·...·]-2">]</span></code></pre>
205 </div>205 </div>
  
206 <div·class="bottom-actions"·id="bottom-actions">206 <div·class="bottom-actions"·id="bottom-actions">
207 ··<div·class="bottom-actions-item">207 ··<div·class="bottom-actions-item">
  
208 ······<a·href="fips.html"·class="bottom-actions-button"·rel="prev">208 ······<a·href="fips.html"·class="bottom-actions-button"·rel="prev">
209 ········<span·class="subheader">209 ········<span·class="subheader">
51.6 KB
./usr/share/doc/erlang-doc/html/lib/crypto-5.5/doc/html/new_api.html
    
Offset 188, 64 lines modifiedOffset 188, 64 lines modified
188 </h3>188 </h3>
189 <p>The·functions·<a·href="crypto.html#crypto_init/4">crypto_init/4</a>·and189 <p>The·functions·<a·href="crypto.html#crypto_init/4">crypto_init/4</a>·and
190 <a·href="crypto.html#crypto_update/2">crypto_update/2</a>·are·intended·to·be·used·for190 <a·href="crypto.html#crypto_update/2">crypto_update/2</a>·are·intended·to·be·used·for
191 encrypting·or·decrypting·a·sequence·of·blocks.·First·one·call·of·<code·class="inline">crypto_init/4</code>191 encrypting·or·decrypting·a·sequence·of·blocks.·First·one·call·of·<code·class="inline">crypto_init/4</code>
192 initialises·the·crypto·context.·One·or·more·calls·<code·class="inline">crypto_update/2</code>·does·the192 initialises·the·crypto·context.·One·or·more·calls·<code·class="inline">crypto_update/2</code>·does·the
193 actual·encryption·or·decryption·for·each·block.</p><p>This·example·shows·first·the·encryption·of·two·blocks·and·then·decryptions·of193 actual·encryption·or·decryption·for·each·block.</p><p>This·example·shows·first·the·encryption·of·two·blocks·and·then·decryptions·of
194 the·cipher·text,·but·divided·into·three·blocks·just·to·show·that·it·is·possible194 the·cipher·text,·but·divided·into·three·blocks·just·to·show·that·it·is·possible
195 to·divide·the·plain·text·and·cipher·text·differently·for·some·ciphers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»    </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7225376058-1">(</span><span·class="p"·data-group-id="7225376058-1">)</span><span·class="p">.</span><span·class="w">195 to·divide·the·plain·text·and·cipher·text·differently·for·some·ciphers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»    </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5564314744-1">(</span><span·class="p"·data-group-id="5564314744-1">)</span><span·class="p">.</span><span·class="w">
196 »       </span><span·class="ss">ok</span><span·class="w">196 »       </span><span·class="ss">ok</span><span·class="w">
197 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">197 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
198 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">198 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">
199 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">IV</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">199 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">IV</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
200 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="w">200 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="w">
201 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">StateEnc</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_init</span><span·class="p"·data-group-id="7225376058-2">(</span><span·class="ss">aes_128_ctr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·65,·SHA:·abc238d9a66b037b7b3cf938e4c7dfdde4f22650d2d2365c613b3f95c17abd46·...·]-2">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·encrypt·-&gt;·true</span><span·class="w">201 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">StateEnc</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_init</span><span·class="p"·data-group-id="5564314744-2">(</span><span·class="ss">aes_128_ctr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·65,·SHA:·1f63112fd6e25bcbe118450fae83399e76f96e24bc2a235cb504ed2f3281a2c0·...·]-2">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·encrypt·-&gt;·true</span><span·class="w">
202 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.3768901617</span><span·class="p">.</span><span·class="mf">1128660993.124047</span><span·class="o">&gt;</span><span·class="w">202 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.3768901617</span><span·class="p">.</span><span·class="mf">1128660993.124047</span><span·class="o">&gt;</span><span·class="w">
203 »       </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="7225376058-3">(</span><span·class="n">StateEnc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7225376058-3">)</span><span·class="p">.</span><span·class="w">203 »       </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="5564314744-3">(</span><span·class="n">StateEnc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5564314744-3">)</span><span·class="p">.</span><span·class="w">
204 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">44</span><span·class="p">,</span><span·class="mi">216</span><span·class="p">,</span><span·class="mi">166</span><span·class="p">,</span><span·class="mi">25</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">203</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">162</span><span·class="p">&gt;&gt;</span><span·class="w">204 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">44</span><span·class="p">,</span><span·class="mi">216</span><span·class="p">,</span><span·class="mi">166</span><span·class="p">,</span><span·class="mi">25</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">203</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">162</span><span·class="p">&gt;&gt;</span><span·class="w">
205 »       </span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="7225376058-4">(</span><span·class="n">StateEnc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7225376058-4">)</span><span·class="p">.</span><span·class="w">205 »       </span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="5564314744-4">(</span><span·class="n">StateEnc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5564314744-4">)</span><span·class="p">.</span><span·class="w">
206 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">253</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">151</span><span·class="p">,</span><span·class="mi">41</span><span·class="p">&gt;&gt;</span><span·class="w">206 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">253</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">151</span><span·class="p">,</span><span·class="mi">41</span><span·class="p">&gt;&gt;</span><span·class="w">
207 »       </span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">207 »       </span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">
208 »       </span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">StateDec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_init</span><span·class="p"·data-group-id="7225376058-5">(</span><span·class="ss">aes_128_ctr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·66,·SHA:·5702894834e6c2eafbfdcf4d0c3e0247c975a7e58a6c12c7975a28033cb6c8f9·...·]-5">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·decrypt·-&gt;·false</span><span·class="w">208 »       </span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">StateDec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_init</span><span·class="p"·data-group-id="5564314744-5">(</span><span·class="ss">aes_128_ctr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·66,·SHA:·c2569a415a2026d77917da56af9e7087a0080a2d8f187b3ff9bb74c27447de4d·...·]-5">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·decrypt·-&gt;·false</span><span·class="w">
209 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.3768901617</span><span·class="p">.</span><span·class="mf">1128660994.124255</span><span·class="o">&gt;</span><span·class="w">209 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.3768901617</span><span·class="p">.</span><span·class="mf">1128660994.124255</span><span·class="o">&gt;</span><span·class="w">
210 »       </span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="7225376058-6">(</span><span·class="n">StateDec</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">44</span><span·class="p">,</span><span·class="mi">216</sp[·...·truncated·by·diffoscope;·len:·278,·SHA:·7234eaccbe6fbf22ebcd569e3aef5bd2740725b4272350f6ae0ce8be3f3a535f·...·]-6">)</span><span·class="p">.</span><span·class="w">210 »       </span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="5564314744-6">(</span><span·class="n">StateDec</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">44</span><span·class="p">,</span><span·class="mi">216</sp[·...·truncated·by·diffoscope;·len:·278,·SHA:·e9bcc02b2f15e5e3605a7e82b65444172625cb8a39d11fbd20187e7eaf4d23e0·...·]-6">)</span><span·class="p">.</span><span·class="w">
211 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·b&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">211 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·b&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">
212 »       </span><span·class="mi">9</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="7225376058-7">(</span><span·class="n">StateDec</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">162</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="w">212 »       </span><span·class="mi">9</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="5564314744-7">(</span><span·class="n">StateDec</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">162</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="w">
213 ········</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">253</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">151</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7225376058-7">)</span><span·class="p">.</span><span·class="w">213 ········</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">253</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">151</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5564314744-7">)</span><span·class="p">.</span><span·class="w">
214 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ytesSecond·byte&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">214 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ytesSecond·byte&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">
215 »       </span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="7225376058-8">(</span><span·class="n">StateDec</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">41</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7225376058-8">)</span><span·class="p">.</span><span·class="w">215 »       </span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="5564314744-8">(</span><span·class="n">StateDec</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">41</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5564314744-8">)</span><span·class="p">.</span><span·class="w">
216 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;s&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">216 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;s&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">
217 »       </span><span·class="mi">11</span><span·class="o">&gt;</span></code></pre><p>Note·that·the·internal·data·that·the·<code·class="inline">StateEnc</code>·and·<code·class="inline">StateDec</code>·references·are217 »       </span><span·class="mi">11</span><span·class="o">&gt;</span></code></pre><p>Note·that·the·internal·data·that·the·<code·class="inline">StateEnc</code>·and·<code·class="inline">StateDec</code>·references·are
218 destructivly·updated·by·the·calls·to218 destructivly·updated·by·the·calls·to
219 <a·href="crypto.html#crypto_update/2">crypto_update/2</a>.·This·is·to·gain·time·in·the·calls219 <a·href="crypto.html#crypto_update/2">crypto_update/2</a>.·This·is·to·gain·time·in·the·calls
220 of·the·nifs·interfacing·the·cryptolib.·In·a·loop·where·the·state·is·saved·in·the220 of·the·nifs·interfacing·the·cryptolib.·In·a·loop·where·the·state·is·saved·in·the
221 loop's·state,·it·also·saves·one·update·of·the·loop·state·per·crypto·operation.</p><p>For·example,·a·simple·server·receiving·text·parts·to·encrypt·and·send·the·result221 loop's·state,·it·also·saves·one·update·of·the·loop·state·per·crypto·operation.</p><p>For·example,·a·simple·server·receiving·text·parts·to·encrypt·and·send·the·result
222 back·to·the·one·who·sent·them·(the·<code·class="inline">Requester</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»      </span><span·class="nf">encode</span><span·class="p"·data-group-id="2685845269-1">(</span><span·class="n">Crypto</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p"·data-group-id="2685845269-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 back·to·the·one·who·sent·them·(the·<code·class="inline">Requester</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»      </span><span·class="nf">encode</span><span·class="p"·data-group-id="5724851079-1">(</span><span·class="n">Crypto</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p"·data-group-id="5724851079-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 »       </span><span·class="nf">crypto_loop</span><span·class="p"·data-group-id="2685845269-2">(</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_init</span><span·class="p"·data-group-id="2685845269-3">(</span><span·class="n">Crypto</span><span·class="p">,</span><span·class="w">·</span><span·class="n"[·...·truncated·by·diffoscope;·len:·253,·SHA:·9eb574aa70c6038d562f57bb7483f3aa38574d0005e8182d9fc6ebba9e9ce006·...·]9-2">)</span><span·class="p">.</span><span·class="w">223 »       </span><span·class="nf">crypto_loop</span><span·class="p"·data-group-id="5724851079-2">(</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_init</span><span·class="p"·data-group-id="5724851079-3">(</span><span·class="n">Crypto</span><span·class="p">,</span><span·class="w">·</span><span·class="n"[·...·truncated·by·diffoscope;·len:·253,·SHA:·e213ef8a14174d61a67b48a7673b5472405ec9258332403f6e90398cf5bcb1c6·...·]9-2">)</span><span·class="p">.</span><span·class="w">
  
224 »       </span><span·class="nf">crypto_loop</span><span·class="p"·data-group-id="2685845269-4">(</span><span·class="n">State</span><span·class="p"·data-group-id="2685845269-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 »       </span><span·class="nf">crypto_loop</span><span·class="p"·data-group-id="5724851079-4">(</span><span·class="n">State</span><span·class="p"·data-group-id="5724851079-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 »       </span><span·class="k">receive</span><span·class="w">225 »       </span><span·class="k">receive</span><span·class="w">
226 ········</span><span·class="p"·data-group-id="2685845269-5">{</span><span·class="n">Text</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Requester</span><span·class="p"·data-group-id="2685845269-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">226 ········</span><span·class="p"·data-group-id="5724851079-5">{</span><span·class="n">Text</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Requester</span><span·class="p"·data-group-id="5724851079-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
227 ········</span><span·class="n">Requester</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="2685845269-6">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Text</span><span·class="p"·data-group-id="2685845269-6">)</span><span·class="p">,</span><span·class="w">227 ········</span><span·class="n">Requester</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_update</span><span·class="p"·data-group-id="5724851079-6">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Text</span><span·class="p"·data-group-id="5724851079-6">)</span><span·class="p">,</span><span·class="w">
228 »       </span><span·class="nf">loop</span><span·class="p"·data-group-id="2685845269-7">(</span><span·class="n">State</span><span·class="p"·data-group-id="2685845269-7">)</span><span·class="w">228 »       </span><span·class="nf">loop</span><span·class="p"·data-group-id="5724851079-7">(</span><span·class="n">State</span><span·class="p"·data-group-id="5724851079-7">)</span><span·class="w">
229 »       </span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="example-of-crypto_one_time-5"·class="section-heading">229 »       </span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="example-of-crypto_one_time-5"·class="section-heading">
230 ··<a·href="#example-of-crypto_one_time-5"·class="hover-link">230 ··<a·href="#example-of-crypto_one_time-5"·class="hover-link">
231 ····<i·class="ri-link-m"·aria-hidden="true"></i>231 ····<i·class="ri-link-m"·aria-hidden="true"></i>
232 ··</a>232 ··</a>
233 ··<span·class="text">Example·of·crypto_one_time/5</span>233 ··<span·class="text">Example·of·crypto_one_time/5</span>
234 </h3>234 </h3>
235 <p>The·same·example·as·in·the235 <p>The·same·example·as·in·the
236 <a·href="new_api.html#examples-of-crypto_init-4-and-crypto_update-2">previous·section</a>,236 <a·href="new_api.html#examples-of-crypto_init-4-and-crypto_update-2">previous·section</a>,
237 but·now·with·one·call·to·<a·href="crypto.html#crypto_one_time/5">crypto_one_time/5</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»       </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">237 but·now·with·one·call·to·<a·href="crypto.html#crypto_one_time/5">crypto_one_time/5</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»       </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
238 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">238 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">
239 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">IV</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">239 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">IV</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
240 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="w">240 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="w">
241 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Txt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8217731483-1">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;<[·...·truncated·by·diffoscope;·len:·47,·SHA:·26243c6fb960d2ab6620dfb07f6560c162e127b312fca508a9d97bd360c041a2·...·]-1">]</span><span·class="p">.</span><span·class="w">241 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Txt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8828304626-1">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;<[·...·truncated·by·diffoscope;·len:·47,·SHA:·8526c393ea2f676a8f9160bf69f0c8fd82aa1539d66a1a688ad99d516fa7a5a2·...·]-1">]</span><span·class="p">.</span><span·class="w">
242 »       </span><span·class="p"·data-group-id="8217731483-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;<[·...·truncated·by·diffoscope;·len:·47,·SHA:·26243c6fb960d2ab6620dfb07f6560c162e127b312fca508a9d97bd360c041a2·...·]-2">]</span><span·class="w">242 »       </span><span·class="p"·data-group-id="8828304626-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;<[·...·truncated·by·diffoscope;·len:·47,·SHA:·8526c393ea2f676a8f9160bf69f0c8fd82aa1539d66a1a688ad99d516fa7a5a2·...·]-2">]</span><span·class="w">
243 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_one_time</span><span·class="p"·data-group-id="8217731483-3">(</span><span·class="ss">aes_128_ctr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·138,·SHA:·3055eaf2e265103cdbd1477f308ea170a3da265bd8371a68d71bc19a050671cd·...·]-3">)</span><span·class="p">.</span><span·class="w">243 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_one_time</span><span·class="p"·data-group-id="8828304626-3">(</span><span·class="ss">aes_128_ctr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·138,·SHA:·57eb459d7a4b725521a24b4f6ba89b760e7c615762480e29f3e8409089598ca9·...·]-3">)</span><span·class="p">.</span><span·class="w">
244 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">44</span><span·class="p">,</span><span·class="mi">216</span><span·class="p">,</span><span·class="mi">166</span><span·class="p">,</span><span·class="mi">25</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">203</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">162</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="w">244 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">44</span><span·class="p">,</span><span·class="mi">216</span><span·class="p">,</span><span·class="mi">166</span><span·class="p">,</span><span·class="mi">25</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">203</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">162</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">234</span><span·class="p">,</span><span·class="w">
245 »       </span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">253</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">151</span><span·class="p">,</span><span·class="mi">41</span><span·class="p">&gt;&gt;</span><span·class="w">245 »       </span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">94</span><span·class="p">,</span><span·class="mi">253</span><span·class="p">,</span><span·class="mi">16</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">151</span><span·class="p">,</span><span·class="mi">41</span><span·class="p">&gt;&gt;</span><span·class="w">
246 »       </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p>The·<code·class="inline">[&lt;&lt;&quot;First·bytes&quot;&gt;&gt;,&lt;&lt;&quot;Second·bytes&quot;&gt;&gt;]</code>·could·of·course·have·been·one246 »       </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p>The·<code·class="inline">[&lt;&lt;&quot;First·bytes&quot;&gt;&gt;,&lt;&lt;&quot;Second·bytes&quot;&gt;&gt;]</code>·could·of·course·have·been·one
247 single·binary:·<code·class="inline">&lt;&lt;&quot;First·bytesSecond·bytes&quot;&gt;&gt;</code>.</p><h3·id="example-of-crypto_one_time_aead-6"·class="section-heading">247 single·binary:·<code·class="inline">&lt;&lt;&quot;First·bytesSecond·bytes&quot;&gt;&gt;</code>.</p><h3·id="example-of-crypto_one_time_aead-6"·class="section-heading">
248 ··<a·href="#example-of-crypto_one_time_aead-6"·class="hover-link">248 ··<a·href="#example-of-crypto_one_time_aead-6"·class="hover-link">
249 ····<i·class="ri-link-m"·aria-hidden="true"></i>249 ····<i·class="ri-link-m"·aria-hidden="true"></i>
250 ··</a>250 ··</a>
Offset 253, 46 lines modifiedOffset 253, 46 lines modified
253 </h3>253 </h3>
254 <p>The·same·example·as·in·the254 <p>The·same·example·as·in·the
255 <a·href="new_api.html#example-of-crypto_one_time-5">previous·section</a>,·but·now·with·one255 <a·href="new_api.html#example-of-crypto_one_time-5">previous·section</a>,·but·now·with·one
256 call·to·<a·href="crypto.html#crypto_one_time_aead/6">crypto_one_time_aead/6</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»  </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">256 call·to·<a·href="crypto.html#crypto_one_time_aead/6">crypto_one_time_aead/6</a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»  </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
257 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">257 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">
258 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">IV</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">258 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">IV</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
259 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="w">259 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="w">
260 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Txt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6311735466-1">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;[·...·truncated·by·diffoscope;·len:·48,·SHA:·10fe170039e2d7b2de303731dc675674de522da910e44ad6b47e380c1ad99651·...·]-1">]</span><span·class="p">.</span><span·class="w">260 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Txt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9554574259-1">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;[·...·truncated·by·diffoscope;·len:·48,·SHA:·fb427a21d35490970ddc332212ce909d451618c1924cd3415cfbc43b5a1cd59e·...·]-1">]</span><span·class="p">.</span><span·class="w">
261 »       </span><span·class="p"·data-group-id="6311735466-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;[·...·truncated·by·diffoscope;·len:·48,·SHA:·10fe170039e2d7b2de303731dc675674de522da910e44ad6b47e380c1ad99651·...·]-2">]</span><span·class="w">261 »       </span><span·class="p"·data-group-id="9554574259-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Second·bytes&quot;</span><span·class="p">&gt;&gt;[·...·truncated·by·diffoscope;·len:·48,·SHA:·fb427a21d35490970ddc332212ce909d451618c1924cd3415cfbc43b5a1cd59e·...·]-2">]</span><span·class="w">
262 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">AAD</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Some·additional·auth·data&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">262 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">AAD</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Some·additional·auth·data&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
263 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Some·additional·auth·data&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">263 »       </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Some·additional·auth·data&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">
264 »       </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_one_time_aead</span><span·class="p"·data-group-id="6311735466-3">(</span><span·class="ss">aes_128_gcm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·213,·SHA:·e9e5cf53753580e9ef50d6eeffdb0a5710eb272cc58d66453a2a897e04fd7094·...·]-3">)</span><span·class="p">.</span><span·class="w">264 »       </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">crypto_one_time_aead</span><span·class="p"·data-group-id="9554574259-3">(</span><span·class="ss">aes_128_gcm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IV</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·213,·SHA:·7f2e2b91c816fdb90c47cdfe90751887fe2e6a9c6b1584fd4bcb0bbd31347375·...·]-3">)</span><span·class="p">.</span><span·class="w">
265 »       </span><span·class="p"·data-group-id="6311735466-4">{</span><span·class="p">&lt;&lt;</span><span·class="mi">240</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">38</span><span·class="p">,</span><span·class="mi">96</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">241</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">52</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">179</span><span·class="p">,</span><span·class="mi">213</span><span·class="p">,</span><span·class="mi">132</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">72</span><span·class="p">,</span><span·class="w">265 »       </span><span·class="p"·data-group-id="9554574259-4">{</span><span·class="p">&lt;&lt;</span><span·class="mi">240</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">38</span><span·class="p">,</span><span·class="mi">96</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">241</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">52</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">179</span><span·class="p">,</span><span·class="mi">213</span><span·class="p">,</span><span·class="mi">132</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">72</span><span·class="p">,</span><span·class="w">
266 »       </span><span·class="mi">192</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">176</span><span·class="p">,</span><span·class="mi">90</span><span·class="p">,</span><span·class="mi">104</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">71</span><span·class="p">,</span><span·class="mi">158</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">266 »       </span><span·class="mi">192</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">176</span><span·class="p">,</span><span·class="mi">90</span><span·class="p">,</span><span·class="mi">104</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">71</span><span·class="p">,</span><span·class="mi">158</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
267 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">131</span><span·class="p">,</span><span·class="mi">47</span><span·class="p">,</span><span·class="mi">45</span><span·class="p">,</span><span·class="mi">91</span><span·class="p">,</span><span·class="mi">142</span><span·class="p">,</span><span·class="mi">85</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">244</span><span·class="p">,</span><span·class="mi">21</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">71</span><span·class="p">,</span><span·class="mi">31</span><span·class="p">,</span><span·class="mi">135</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">155</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6311735466-4">}</span><span·class="w">267 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">131</span><span·class="p">,</span><span·class="mi">47</span><span·class="p">,</span><span·class="mi">45</span><span·class="p">,</span><span·class="mi">91</span><span·class="p">,</span><span·class="mi">142</span><span·class="p">,</span><span·class="mi">85</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">244</span><span·class="p">,</span><span·class="mi">21</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">71</span><span·class="p">,</span><span·class="mi">31</span><span·class="p">,</span><span·class="mi">135</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">155</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9554574259-4">}</span><span·class="w">
268 »       </span><span·class="mi">6</span><span·class="o">&gt;</span></code></pre><p>The·<code·class="inline">[&lt;&lt;&quot;First·bytes&quot;&gt;&gt;,&lt;&lt;&quot;Second·bytes&quot;&gt;&gt;]</code>·could·of·course·have·been·one268 »       </span><span·class="mi">6</span><span·class="o">&gt;</span></code></pre><p>The·<code·class="inline">[&lt;&lt;&quot;First·bytes&quot;&gt;&gt;,&lt;&lt;&quot;Second·bytes&quot;&gt;&gt;]</code>·could·of·course·have·been·one
269 single·binary:·<code·class="inline">&lt;&lt;&quot;First·bytesSecond·bytes&quot;&gt;&gt;</code>.</p><h3·id="example-of-mac_init-mac_update-and-mac_final"·class="section-heading">269 single·binary:·<code·class="inline">&lt;&lt;&quot;First·bytesSecond·bytes&quot;&gt;&gt;</code>.</p><h3·id="example-of-mac_init-mac_update-and-mac_final"·class="section-heading">
270 ··<a·href="#example-of-mac_init-mac_update-and-mac_final"·class="hover-link">270 ··<a·href="#example-of-mac_init-mac_update-and-mac_final"·class="hover-link">
271 ····<i·class="ri-link-m"·aria-hidden="true"></i>271 ····<i·class="ri-link-m"·aria-hidden="true"></i>
272 ··</a>272 ··</a>
273 ··<span·class="text">Example·of·mac_init·mac_update·and·mac_final</span>273 ··<span·class="text">Example·of·mac_init·mac_update·and·mac_final</span>
274 </h3>274 </h3>
275 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">»   </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">275 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">»   </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">:</span><span·class="mi">128</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
276 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">276 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">&gt;&gt;</span><span·class="w">
277 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">StateMac</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_init</span><span·class="p"·data-group-id="8344373302-1">(</span><span·class="ss">cmac</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="8344373302-1">)</span><span·class="p">.</span><span·class="w">277 »       </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">StateMac</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_init</span><span·class="p"·data-group-id="0498373088-1">(</span><span·class="ss">cmac</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="0498373088-1">)</span><span·class="p">.</span><span·class="w">
278 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">278 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">
279 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_update</span><span·class="p"·data-group-id="8344373302-2">(</span><span·class="n">StateMac</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8344373302-2">)</span><span·class="p">.</span><span·class="w">279 »       </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_update</span><span·class="p"·data-group-id="0498373088-2">(</span><span·class="n">StateMac</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;First·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0498373088-2">)</span><span·class="p">.</span><span·class="w">
280 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">280 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">
281 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_update</span><span·class="p"·data-group-id="8344373302-3">(</span><span·class="n">StateMac</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;·&quot;</span><span·class="p"·data-group-id="8344373302-3">)</span><span·class="p">.</span><span·class="w">281 »       </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_update</span><span·class="p"·data-group-id="0498373088-3">(</span><span·class="n">StateMac</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;·&quot;</span><span·class="p"·data-group-id="0498373088-3">)</span><span·class="p">.</span><span·class="w">
282 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">282 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">
283 »       </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_update</span><span·class="p"·data-group-id="8344373302-4">(</span><span·class="n">StateMac</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;last·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8344373302-4">)</span><span·class="p">.</span><span·class="w">283 »       </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_update</span><span·class="p"·data-group-id="0498373088-4">(</span><span·class="n">StateMac</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;last·bytes&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0498373088-4">)</span><span·class="p">.</span><span·class="w">
284 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">284 »       </span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.2424664121</span><span·class="p">.</span><span·class="mf">2781478916.232610</span><span·class="o">&gt;</span><span·class="w">
285 »       </span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_final</span><span·class="p"·data-group-id="8344373302-5">(</span><span·class="n">StateMac</span><span·class="p"·data-group-id="8344373302-5">)</span><span·class="p">.</span><span·class="w">285 »       </span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac_final</span><span·class="p"·data-group-id="0498373088-5">(</span><span·class="n">StateMac</span><span·class="p"·data-group-id="0498373088-5">)</span><span·class="p">.</span><span·class="w">
286 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">68</span><span·class="p">,</span><span·class="mi">191</span><span·class="p">,</span><span·class="mi">219</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">193</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">238</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="w">286 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">68</span><span·class="p">,</span><span·class="mi">191</span><span·class="p">,</span><span·class="mi">219</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">193</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">238</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="w">
287 »       </span><span·class="mi">249</span><span·class="p">&gt;&gt;</span><span·class="w">287 »       </span><span·class="mi">249</span><span·class="p">&gt;&gt;</span><span·class="w">
288 »       </span><span·class="mi">7</span><span·class="o">&gt;</span></code></pre><p>and·compare·the·result·with·a·single·calculation·just·for·this·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»  </span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac</span><span·class="p"·data-group-id="9118290871-1">(</span><span·class="ss">cmac</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·97,·SHA:·431c33763fde57ad175ce0b6999812798bf594845affd4527e6ae75a48848839·...·]-1">)</span><span·class="p">.</span><span·class="w">288 »       </span><span·class="mi">7</span><span·class="o">&gt;</span></code></pre><p>and·compare·the·result·with·a·single·calculation·just·for·this·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»  </span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">crypto</span><span·class="p">:</span><span·class="nf">mac</span><span·class="p"·data-group-id="6928957006-1">(</span><span·class="ss">cmac</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·97,·SHA:·4c0b3f639b659c6c3259514210b2bb4c444a0da97c8105771bba0f282221adaf·...·]-1">)</span><span·class="p">.</span><span·class="w">
289 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">68</span><span·class="p">,</span><span·class="mi">191</span><span·class="p">,</span><span·class="mi">219</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">193</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">238</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="w">289 »       </span><span·class="p">&lt;&lt;</span><span·class="mi">68</span><span·class="p">,</span><span·class="mi">191</span><span·class="p">,</span><span·class="mi">219</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">193</span><span·class="p">,</span><span·class="mi">197</span><span·class="p">,</span><span·class="mi">238</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="w">
290 »       </span><span·class="mi">249</span><span·class="p">&gt;&gt;</span><span·class="w">290 »       </span><span·class="mi">249</span><span·class="p">&gt;&gt;</span><span·class="w">
291 »       </span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">v</span><span·class="p"·data-group-id="9118290871-2">(</span><span·class="mi">7</span><span·class="p"·data-group-id="9118290871-2">)</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="nf">v</span><span·class="p"·data-group-id="9118290871-3">(</span><span[·...·truncated·by·diffoscope;·len:·61,·SHA:·45652a0eeb64330e9bfb7e4db3dc2479b2650088294225f958056ed31434fa1e·...·]-3">)</span><span·class="p">.</span><span·class="w">291 »       </span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">v</span><span·class="p"·data-group-id="6928957006-2">(</span><span·class="mi">7</span><span·class="p"·data-group-id="6928957006-2">)</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="nf">v</span><span·class="p"·data-group-id="6928957006-3">(</span><span[·...·truncated·by·diffoscope;·len:·61,·SHA:·216818bfe95ec24fd2f8da1e78b77feb544d3740a9c2a7f6ed8409b22638b6de·...·]-3">)</span><span·class="p">.</span><span·class="w">
292 »       </span><span·class="ss">true</span><span·class="w">292 »       </span><span·class="ss">true</span><span·class="w">
293 »       </span><span·class="mi">9</span><span·class="o">&gt;</span></code></pre><h2·id="retired-cipher-names"·class="section-heading">293 »       </span><span·class="mi">9</span><span·class="o">&gt;</span></code></pre><h2·id="retired-cipher-names"·class="section-heading">
294 ··<a·href="#retired-cipher-names"·class="hover-link">294 ··<a·href="#retired-cipher-names"·class="hover-link">
295 ····<i·class="ri-link-m"·aria-hidden="true"></i>295 ····<i·class="ri-link-m"·aria-hidden="true"></i>
296 ··</a>296 ··</a>
297 ··<span·class="text">Retired·cipher·names</span>297 ··<span·class="text">Retired·cipher·names</span>
298 </h2>298 </h2>
71.1 KB
./usr/share/doc/erlang-doc/html/lib/debugger-5.4/doc/html/debugger.epub
3.54 KB
zipinfo {}
Max HTML report size reached
33.5 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
2.79 KB
OEBPS/int.xhtml
    
Offset 566, 15 lines modifiedOffset 566, 15 lines modified
566 ·························Args·::·[<a·href="../../../../lib/../erts/doc/html/erlang.html#t:term/0">term</a>()].</pre>566 ·························Args·::·[<a·href="../../../../lib/../erts/doc/html/erlang.html#t:term/0">term</a>()].</pre>
  
567 ······</div>567 ······</div>
  
568 <p>Sets·when·and·how·to·attach·automatically·to·a·process·executing·code568 <p>Sets·when·and·how·to·attach·automatically·to·a·process·executing·code
569 in·interpreted·modules.</p><p>By·default·when·the·interpreter·is·started,·automatic·attach·is·disabled.</p><p>If·<code·class="inline">Flags</code>·is·an·empty·list,·automatic·attach·is·disabled.</p><p>Otherwise·<code·class="inline">Flags</code>·should·be·a·list·containing··at·least·one·of·the·following569 in·interpreted·modules.</p><p>By·default·when·the·interpreter·is·started,·automatic·attach·is·disabled.</p><p>If·<code·class="inline">Flags</code>·is·an·empty·list,·automatic·attach·is·disabled.</p><p>Otherwise·<code·class="inline">Flags</code>·should·be·a·list·containing··at·least·one·of·the·following
570 flags:</p><ul><li><code·class="inline">init</code>·-·Attach·when·a·process·for·the·first·time·calls·an·interpreted570 flags:</p><ul><li><code·class="inline">init</code>·-·Attach·when·a·process·for·the·first·time·calls·an·interpreted
571 function.</li><li><code·class="inline">break</code>·-·Attach·whenever·a·process·reaches·a·breakpoint.</li><li><code·class="inline">exit</code>·-·Attach·when·a·process·terminates.</li></ul><p>When·the·specified·event·occurs,·the·function·<code·class="inline">Function</code>·is·called·as:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nf">spawn</samp><samp·class="p"·data-group-id="8188265160-1">(</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Name</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="8188265160-2">[</samp><samp·class="n">Pid</samp><sa[·...·truncated·by·diffoscope;·len:·190,·SHA:·e0d97ae4bdcc8fefc9c054588ecd5cc18c9327b72017aaa15b7d0a9cb15f5f92·...·]-1">)</samp></code></pre><p><code·class="inline">Pid</code>·is·the·pid·of·the·process·executing·interpreted·code.</p>571 function.</li><li><code·class="inline">break</code>·-·Attach·whenever·a·process·reaches·a·breakpoint.</li><li><code·class="inline">exit</code>·-·Attach·when·a·process·terminates.</li></ul><p>When·the·specified·event·occurs,·the·function·<code·class="inline">Function</code>·is·called·as:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nf">spawn</samp><samp·class="p"·data-group-id="6042090971-1">(</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Name</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="6042090971-2">[</samp><samp·class="n">Pid</samp><sa[·...·truncated·by·diffoscope;·len:·190,·SHA:·3403980ddb4707c4cbdb944f314b52148c234a3bd790254fdb2efd222acb6c2b·...·]-1">)</samp></code></pre><p><code·class="inline">Pid</code>·is·the·pid·of·the·process·executing·interpreted·code.</p>
572 ··</section>572 ··</section>
573 </section>573 </section>
574 <section·class="detail"·id="break/2">574 <section·class="detail"·id="break/2">
  
575 ··<div·class="detail-header">575 ··<div·class="detail-header">
576 ····<a·href="#break/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">576 ····<a·href="#break/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
577 ······<i·class="ri-link-m"·aria-hidden="true"></i>577 ······<i·class="ri-link-m"·aria-hidden="true"></i>
2.8 KB
OEBPS/i.xhtml
    
Offset 25, 17 lines modifiedOffset 25, 17 lines modified
25 ······<section·id="moduledoc"·class="docstring">25 ······<section·id="moduledoc"·class="docstring">
26 <p>Debugger/Interpreter·Interface.</p><p>The·<code·class="inline">i</code>·module·provides·short·forms·for·some·of·the·functions·used·by·the26 <p>Debugger/Interpreter·Interface.</p><p>The·<code·class="inline">i</code>·module·provides·short·forms·for·some·of·the·functions·used·by·the
27 graphical·Debugger·and·some·of·the·functions·in·module·<a·href="int.xhtml"><code·class="inline">int</code></a>,·the·Erlang27 graphical·Debugger·and·some·of·the·functions·in·module·<a·href="int.xhtml"><code·class="inline">int</code></a>,·the·Erlang
28 interpreter.</p><p>This·module·also·provides·facilities·for·displaying·status·information·about28 interpreter.</p><p>This·module·also·provides·facilities·for·displaying·status·information·about
29 interpreted·processes·and·break·points.</p><p>It·is·possible·to·attach·to·interpreted·processes·by·only·giving·the·corresponding29 interpreted·processes·and·break·points.</p><p>It·is·possible·to·attach·to·interpreted·processes·by·only·giving·the·corresponding
30 process·identity.·By·default,·an·attachment·window·is·displayed.·Processes30 process·identity.·By·default,·an·attachment·window·is·displayed.·Processes
31 at·other·Erlang·nodes·can·be·attached·manually·or·automatically.</p><p>The·functions·in·this·module·are·defined·in·the·Erlang·shell.·That·is,31 at·other·Erlang·nodes·can·be·attached·manually·or·automatically.</p><p>The·functions·in·this·module·are·defined·in·the·Erlang·shell.·That·is,
32 they·can·be·called·without·the·<code·class="inline">i:</code>·prefix.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">1&gt;·</samp><samp·class="nf">ii</samp><samp·class="p"·data-group-id="9029269095-1">(</samp><samp·class="ss">t</samp><samp·class="p"·data-group-id="9029269095-1">)</samp><samp·class="p">.</samp><samp·class="w">32 they·can·be·called·without·the·<code·class="inline">i:</code>·prefix.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">1&gt;·</samp><samp·class="nf">ii</samp><samp·class="p"·data-group-id="5501167207-1">(</samp><samp·class="ss">t</samp><samp·class="p"·data-group-id="5501167207-1">)</samp><samp·class="p">.</samp><samp·class="w">
33 </samp><samp·class="p"·data-group-id="9029269095-2">{</samp><samp·class="ss">module</samp><samp·class="p">,</samp><samp·class="ss">t</samp><samp·class="p"·data-group-id="9029269095-2">}</samp><samp·class="gp·unselectable">33 </samp><samp·class="p"·data-group-id="5501167207-2">{</samp><samp·class="ss">module</samp><samp·class="p">,</samp><samp·class="ss">t</samp><samp·class="p"·data-group-id="5501167207-2">}</samp><samp·class="gp·unselectable">
34 2&gt;·</samp><samp·class="nf">iaa</samp><samp·class="p"·data-group-id="9029269095-3">(</samp><samp·class="p"·data-group-id="9029269095-4">[</samp><samp·class="ss">init</samp><samp·class="p"·data-group-id="9029269095-4">]</samp><samp·class="p"·data-group-id="9029269095-3">)</samp><samp·class="p">.</samp><samp·class="w">34 2&gt;·</samp><samp·class="nf">iaa</samp><samp·class="p"·data-group-id="5501167207-3">(</samp><samp·class="p"·data-group-id="5501167207-4">[</samp><samp·class="ss">init</samp><samp·class="p"·data-group-id="5501167207-4">]</samp><samp·class="p"·data-group-id="5501167207-3">)</samp><samp·class="p">.</samp><samp·class="w">
35 </samp><samp·class="ss">true</samp></code></pre>35 </samp><samp·class="ss">true</samp></code></pre>
36 ······</section>36 ······</section>
  
  
37 ······<section·id="summary"·class="details-list">37 ······<section·id="summary"·class="details-list">
38 ········<h1·class="section-heading">Summary</h1>38 ········<h1·class="section-heading">Summary</h1>
39 <div·class="summary-functions·summary">39 <div·class="summary-functions·summary">
25.5 KB
OEBPS/debugger_chapter.xhtml
Max HTML report size reached
2.84 KB
OEBPS/content.opf
2.81 KB
OEBPS/content.opf
Max HTML report size reached
25.6 KB
./usr/share/doc/erlang-doc/html/lib/debugger-5.4/doc/html/debugger_chapter.html
    
Offset 160, 20 lines modifiedOffset 160, 20 lines modified
160 ····<i·class="ri-link-m"·aria-hidden="true"></i>160 ····<i·class="ri-link-m"·aria-hidden="true"></i>
161 ··</a>161 ··</a>
162 ··<span·class="text">Executable·Lines</span>162 ··<span·class="text">Executable·Lines</span>
163 </h3>163 </h3>
164 <p>To·have·an·effect,·a·breakpoint·must·be·set·at·an·<em>executable·line</em>,·which·is·a164 <p>To·have·an·effect,·a·breakpoint·must·be·set·at·an·<em>executable·line</em>,·which·is·a
165 line·of·code·containing·an·executable·expression·such·as·a·matching·or·a165 line·of·code·containing·an·executable·expression·such·as·a·matching·or·a
166 function·call.·A·blank·line·or·a·line·containing·a·comment,·function·head,·or166 function·call.·A·blank·line·or·a·line·containing·a·comment,·function·head,·or
167 pattern·in·a·<code·class="inline">case</code>·statement·or·<code·class="inline">receive</code>·statement·is·not·executable.</p><p>In·the·following·example,·lines·2,·4,·6,·8,·and·11·are·executable·lines:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">is_loaded</span><span·class="p"·data-group-id="3539950913-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="n">Compiled</span><span·class="p"·data-group-id="3539950913-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 pattern·in·a·<code·class="inline">case</code>·statement·or·<code·class="inline">receive</code>·statement·is·not·executable.</p><p>In·the·following·example,·lines·2,·4,·6,·8,·and·11·are·executable·lines:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">is_loaded</span><span·class="p"·data-group-id="6681062328-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="n">Compiled</span><span·class="p"·data-group-id="6681062328-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 </span><span·class="mi">2</span><span·class="p">:</span><span·class="w">···</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_file</span><span·class="p"·data-group-id="3539950913-2">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="n">Compiled</span><span·class="p"·data-group-id="3539950913-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">168 </span><span·class="mi">2</span><span·class="p">:</span><span·class="w">···</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_file</span><span·class="p"·data-group-id="6681062328-2">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="n">Compiled</span><span·class="p"·data-group-id="6681062328-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
169 </span><span·class="mi">3</span><span·class="p">:</span><span·class="w">·····</span><span·class="p"·data-group-id="3539950913-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">File</span><span·class="p"·data-group-id="3539950913-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 </span><span·class="mi">3</span><span·class="p">:</span><span·class="w">·····</span><span·class="p"·data-group-id="6681062328-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">File</span><span·class="p"·data-group-id="6681062328-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 </span><span·class="mi">4</span><span·class="p">:</span><span·class="w">·······</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">which</span><span·class="p"·data-group-id="3539950913-4">(</span><span·class="n">Module</span><span·class="p"·data-group-id="3539950913-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">170 </span><span·class="mi">4</span><span·class="p">:</span><span·class="w">·······</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">which</span><span·class="p"·data-group-id="6681062328-4">(</span><span·class="n">Module</span><span·class="p"·data-group-id="6681062328-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
171 </span><span·class="mi">5</span><span·class="p">:</span><span·class="w">·········</span><span·class="o">?</span><span·class="n">TAG</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 </span><span·class="mi">5</span><span·class="p">:</span><span·class="w">·········</span><span·class="o">?</span><span·class="n">TAG</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 </span><span·class="mi">6</span><span·class="p">:</span><span·class="w">···········</span><span·class="p"·data-group-id="3539950913-5">{</span><span·class="ss">loaded</span><span·class="p">,</span><span·class="n">File</span><span·class="p"·data-group-id="3539950913-5">}</span><span·class="p">;</span><span·class="w">172 </span><span·class="mi">6</span><span·class="p">:</span><span·class="w">···········</span><span·class="p"·data-group-id="6681062328-5">{</span><span·class="ss">loaded</span><span·class="p">,</span><span·class="n">File</span><span·class="p"·data-group-id="6681062328-5">}</span><span·class="p">;</span><span·class="w">
173 </span><span·class="mi">7</span><span·class="p">:</span><span·class="w">·········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="mi">7</span><span·class="p">:</span><span·class="w">·········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 </span><span·class="mi">8</span><span·class="p">:</span><span·class="w">···········</span><span·class="ss">unloaded</span><span·class="w">174 </span><span·class="mi">8</span><span·class="p">:</span><span·class="w">···········</span><span·class="ss">unloaded</span><span·class="w">
175 </span><span·class="mi">9</span><span·class="p">:</span><span·class="w">·······</span><span·class="k">end</span><span·class="p">;</span><span·class="w">175 </span><span·class="mi">9</span><span·class="p">:</span><span·class="w">·······</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
176 </span><span·class="mi">10</span><span·class="p">:</span><span·class="w">····</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 </span><span·class="mi">10</span><span·class="p">:</span><span·class="w">····</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 </span><span·class="mi">11</span><span·class="p">:</span><span·class="w">······</span><span·class="ss">false</span><span·class="w">177 </span><span·class="mi">11</span><span·class="p">:</span><span·class="w">······</span><span·class="ss">false</span><span·class="w">
178 </span><span·class="mi">12</span><span·class="p">:</span><span·class="w">··</span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="status-and-trigger-action"·class="section-heading">178 </span><span·class="mi">12</span><span·class="p">:</span><span·class="w">··</span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="status-and-trigger-action"·class="section-heading">
179 ··<a·href="#status-and-trigger-action"·class="hover-link">179 ··<a·href="#status-and-trigger-action"·class="hover-link">
Offset 204, 21 lines modifiedOffset 204, 21 lines modified
204 returns·<code·class="inline">true</code>,·the·process·stops.·If·the·function·call·returns·<code·class="inline">false</code>,·the204 returns·<code·class="inline">true</code>,·the·process·stops.·If·the·function·call·returns·<code·class="inline">false</code>,·the
205 breakpoint·is·silently·ignored.</p><p><code·class="inline">Bindings</code>·is·a·list·of·variable·bindings.·To·retrieve·the·value·of·<code·class="inline">Variable</code>205 breakpoint·is·silently·ignored.</p><p><code·class="inline">Bindings</code>·is·a·list·of·variable·bindings.·To·retrieve·the·value·of·<code·class="inline">Variable</code>
206 (given·as·an·atom),·use·function206 (given·as·an·atom),·use·function
207 <a·href="int.html#get_binding/2"><code·class="inline">int:get_binding(Variable,·Bindings)</code></a>.·The·function207 <a·href="int.html#get_binding/2"><code·class="inline">int:get_binding(Variable,·Bindings)</code></a>.·The·function
208 returns·<code·class="inline">unbound</code>·or·<code·class="inline">{value,Value}</code>.</p><p><img·src="assets/cond_break_dialog.jpg"·alt="Conditional·Break·Dialog·Window"·title="Conditional·Break·Dialog·Window"/></p><p>Right-click·the·<em>Module</em>·entry·to·open·a·popup·menu·from·which·the·appropriate208 returns·<code·class="inline">unbound</code>·or·<code·class="inline">{value,Value}</code>.</p><p><img·src="assets/cond_break_dialog.jpg"·alt="Conditional·Break·Dialog·Window"·title="Conditional·Break·Dialog·Window"/></p><p>Right-click·the·<em>Module</em>·entry·to·open·a·popup·menu·from·which·the·appropriate
209 module·can·be·selected.</p><p><em>Example:</em></p><p>A·conditional·breakpoint·calling·<code·class="inline">c_test:c_break/1</code>·is·added·at·line·6·in·module209 module·can·be·selected.</p><p><em>Example:</em></p><p>A·conditional·breakpoint·calling·<code·class="inline">c_test:c_break/1</code>·is·added·at·line·6·in·module
210 <code·class="inline">fact</code>.·Each·time·the·breakpoint·is·reached,·the·function·is·called.·When·<code·class="inline">N</code>·is210 <code·class="inline">fact</code>.·Each·time·the·breakpoint·is·reached,·the·function·is·called.·When·<code·class="inline">N</code>·is
211 equal·to·3,·the·function·returns·<code·class="inline">true</code>·and·the·process·stops.</p><p>Extract·from·<code·class="inline">fact.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="p">.</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="5205407548-1">(</span><span·class="mi">0</span><span·class="p"·data-group-id="5205407548-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">211 equal·to·3,·the·function·returns·<code·class="inline">true</code>·and·the·process·stops.</p><p>Extract·from·<code·class="inline">fact.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="p">.</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="6282683314-1">(</span><span·class="mi">0</span><span·class="p"·data-group-id="6282683314-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
212 </span><span·class="mi">6</span><span·class="p">.</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="5205407548-2">(</span><span·class="n">N</span><span·class="p"·data-group-id="5205407548-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·961,·SHA:·1ddb06ef86a306b5c5ed9e47b79e3fb4de9253453fd78494503cf68f16383fad·...·]-1">)</span><span·class="p">.</span><span·class="w">212 </span><span·class="mi">6</span><span·class="p">.</span><span·class="w">·</span><span·class="nf">fac</span><span·class="p"·data-group-id="6282683314-2">(</span><span·class="n">N</span><span·class="p"·data-group-id="6282683314-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·961,·SHA:·c3f0b4e7bb4ae26eb923b1a53cce17079845d39a704a84d95986e23d7779a0f7·...·]-1">)</span><span·class="p">.</span><span·class="w">
213 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3847409092-2">(</span><span·class="p"·data-group-id="3847409092-3">[</span><span·class="ss">c_break</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3847409092-3">]</span><span·class="p"·data-group-id="3847409092-2">)</span><span·class="p">.</span><span·class="w">213 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4997938188-2">(</span><span·class="p"·data-group-id="4997938188-3">[</span><span·class="ss">c_break</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4997938188-3">]</span><span·class="p"·data-group-id="4997938188-2">)</span><span·class="p">.</span><span·class="w">
  
214 </span><span·class="nf">c_break</span><span·class="p"·data-group-id="3847409092-4">(</span><span·class="n">Bindings</span><span·class="p"·data-group-id="3847409092-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 </span><span·class="nf">c_break</span><span·class="p"·data-group-id="4997938188-4">(</span><span·class="n">Bindings</span><span·class="p"·data-group-id="4997938188-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">int</span><span·class="p">:</span><span·class="nf">get_binding</span><span·class="p"·data-group-id="3847409092-5">(</span><span·class="ss">&#39;N&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bindings</span><span·class="p"·data-group-id="3847409092-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">215 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">int</span><span·class="p">:</span><span·class="nf">get_binding</span><span·class="p"·data-group-id="4997938188-5">(</span><span·class="ss">&#39;N&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bindings</span><span·class="p"·data-group-id="4997938188-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
216 ········</span><span·class="p"·data-group-id="3847409092-6">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="3847409092-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 ········</span><span·class="p"·data-group-id="4997938188-6">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="4997938188-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ············</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">217 ············</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
218 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">218 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
219 ············</span><span·class="ss">false</span><span·class="w">219 ············</span><span·class="ss">false</span><span·class="w">
220 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="function-breakpoints"·class="section-heading">220 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><h3·id="function-breakpoints"·class="section-heading">
221 ··<a·href="#function-breakpoints"·class="hover-link">221 ··<a·href="#function-breakpoints"·class="hover-link">
222 ····<i·class="ri-link-m"·aria-hidden="true"></i>222 ····<i·class="ri-link-m"·aria-hidden="true"></i>
223 ··</a>223 ··</a>
Offset 231, 20 lines modifiedOffset 231, 20 lines modified
231 ··<a·href="#stack-trace"·class="hover-link">231 ··<a·href="#stack-trace"·class="hover-link">
232 ····<i·class="ri-link-m"·aria-hidden="true"></i>232 ····<i·class="ri-link-m"·aria-hidden="true"></i>
233 ··</a>233 ··</a>
234 ··<span·class="text">Stack·Trace</span>234 ··<span·class="text">Stack·Trace</span>
235 </h2>235 </h2>
236 <p>The·Erlang·emulator·keeps·track·of·a·<em>stack·trace</em>,·information·about·recent236 <p>The·Erlang·emulator·keeps·track·of·a·<em>stack·trace</em>,·information·about·recent
237 function·calls.·This·information·is·used·if·an·error·occurs,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="k">catch</span><span·class="w">·</span><span·class="ss">a</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">237 function·calls.·This·information·is·used·if·an·error·occurs,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="k">catch</span><span·class="w">·</span><span·class="ss">a</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">
238 </span><span·class="p"·data-group-id="9304470161-1">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-2">{</span><span·class="ss">badarith</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-3">[</span><span·clas[·...·truncated·by·diffoscope;·len:·507,·SHA:·9010735d7772c95120d98c1a2265c522079c991efb4014b66e69365ac3c60477·...·]-4">}</span><span·class="p">,</span><span·class="w">238 </span><span·class="p"·data-group-id="0574610223-1">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-2">{</span><span·class="ss">badarith</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-3">[</span><span·clas[·...·truncated·by·diffoscope;·len:·507,·SHA:·7958b4aa84b8d8592fdcf1737194df013c8d29ab0f8a2ccd29e58c9cac7ca204·...·]-4">}</span><span·class="p">,</span><span·class="w">
239 ···················</span><span·class="p"·data-group-id="9304470161-7">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-8">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·490,·SHA:·670628482eb7b2a40219dc3354d654912374faa112c7355703f020ee4b3e8b02·...·]-7">}</span><span·class="p">,</span><span·class="w">239 ···················</span><span·class="p"·data-group-id="0574610223-7">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">do_apply</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-8">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·490,·SHA:·e82c27a1bdfa5fc2cfa5dcbfa76b904cc2d1ff5676117c57de1e9ce6b81e807a·...·]-7">}</span><span·class="p">,</span><span·class="w">
240 ···················</span><span·class="p"·data-group-id="9304470161-11">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">expr</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-12">[</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·491,·SHA:·4bd5fc386d7239e8e1c5db221b1138bb6a1786b6fe606f0bccc823c627991185·...·]-11">}</span><span·class="p">,</span><span·class="w">240 ···················</span><span·class="p"·data-group-id="0574610223-11">{</span><span·class="ss">erl_eval</span><span·class="p">,</span><span·class="ss">expr</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-12">[</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·491,·SHA:·ae2d8f550dd1c31e862ef8ea21fcb8a99f7915deea008ce03b0438c04eb9099d·...·]-11">}</span><span·class="p">,</span><span·class="w">
241 ···················</span><span·class="p"·data-group-id="9304470161-15">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-16">[</span><span·class="p"·data-group-id="9304470161-17">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;shell.erl&quot;</span><span·class="p"·data-group-id="9304470161-17">}</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-18">{</span><span·class="ss">line</span><span·class="p">,</span><span·class="mi">674</span><span·class="p"·data-group-id="9304470161-18">}</span><span·class="p"·data-group-id="9304470161-16">]</span><span·class="p"·data-group-id="9304470161-15">}</span><span·class="p">,</span><span·class="w"> 
242 ···················</span><span·class="p"·data-group-id="9304470161-19">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-20">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·494,·SHA:·d33fbb9a6d65a8727683aa569f0b19331af746c29566e08a36421ccf44c3cfe8·...·]">}</span><span·class="p">,</span><span·class="w">241 ···················</span><span·class="p"·data-group-id="0574610223-15">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-16">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·489,·SHA:·6c31767dd36d4d36300e936cdd8b3d2d15b1d8fc5561d7ece79230999d44be9c·...·]">}</span><span·class="p">,</span><span·class="w">
 242 ···················</span><span·class="p"·data-group-id="0574610223-19">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-20">[</span><span·class="p"·data-group-id="0574610223-21">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;shell.erl&quot;</span><span·class="p"·data-group-id="0574610223-21">}</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-22">{</span><span·class="ss">line</span><span·class="p">,</span><span·class="mi">629</span><span·class="p"·data-group-id="0574610223-22">}</span><span·class="p"·data-group-id="0574610223-20">]</span><span·class="p"·data-group-id="0574610223-19">}</span><span·class="p">,</span><span·class="w">
243 ···················</span><span·class="p"·data-group-id="9304470161-23">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_loop</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-group-id="9304470161-24">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·650,·SHA:·59fc11262d2b46d6e16d97731bd5013ca403b45c47c1b3c1eff99c60d4d3336f·...·]-1">}</span></code></pre><p>For·details·about·the·stack·trace,·see·section243 ···················</span><span·class="p"·data-group-id="0574610223-23">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">eval_loop</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-group-id="0574610223-24">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·650,·SHA:·ea067ed359f78659cd09645da82167244581eebc2a636e9a57d698c0bd598e27·...·]-1">}</span></code></pre><p>For·details·about·the·stack·trace,·see·section
244 <a·href="../../../../doc/system/errors.html">Errors·and·Error·Handling</a>·in·the·Erlang·Reference244 <a·href="../../../../doc/system/errors.html">Errors·and·Error·Handling</a>·in·the·Erlang·Reference
245 Manual.</p><p>Debugger·emulates·the·stack·trace·by·keeping·track·of·recently·called245 Manual.</p><p>Debugger·emulates·the·stack·trace·by·keeping·track·of·recently·called
246 interpreted·functions.·(The·real·stack·trace·cannot·be·used,·as·it·shows·which246 interpreted·functions.·(The·real·stack·trace·cannot·be·used,·as·it·shows·which
247 functions·of·Debugger·have·been·called,·rather·than·which·interpreted247 functions·of·Debugger·have·been·called,·rather·than·which·interpreted
248 functions.)</p><p>This·information·can·be·used·to·traverse·the·chain·of·function·calls,·using·the248 functions.)</p><p>This·information·can·be·used·to·traverse·the·chain·of·function·calls,·using·the
249 <em>Up</em>·and·<em>Down</em>·buttons·in·the249 <em>Up</em>·and·<em>Down</em>·buttons·in·the
250 <a·href="debugger_chapter.html#attach">Attach·Process·window</a>.</p><p>By·default,·Debugger·only·saves·information·about·recursive·function·calls,·that250 <a·href="debugger_chapter.html#attach">Attach·Process·window</a>.</p><p>By·default,·Debugger·only·saves·information·about·recursive·function·calls,·that
2.83 KB
./usr/share/doc/erlang-doc/html/lib/debugger-5.4/doc/html/i.html
    
Offset 130, 17 lines modifiedOffset 130, 17 lines modified
130 ····<section·id="moduledoc">130 ····<section·id="moduledoc">
131 <p>Debugger/Interpreter·Interface.</p><p>The·<code·class="inline">i</code>·module·provides·short·forms·for·some·of·the·functions·used·by·the131 <p>Debugger/Interpreter·Interface.</p><p>The·<code·class="inline">i</code>·module·provides·short·forms·for·some·of·the·functions·used·by·the
132 graphical·Debugger·and·some·of·the·functions·in·module·<a·href="int.html"><code·class="inline">int</code></a>,·the·Erlang132 graphical·Debugger·and·some·of·the·functions·in·module·<a·href="int.html"><code·class="inline">int</code></a>,·the·Erlang
133 interpreter.</p><p>This·module·also·provides·facilities·for·displaying·status·information·about133 interpreter.</p><p>This·module·also·provides·facilities·for·displaying·status·information·about
134 interpreted·processes·and·break·points.</p><p>It·is·possible·to·attach·to·interpreted·processes·by·only·giving·the·corresponding134 interpreted·processes·and·break·points.</p><p>It·is·possible·to·attach·to·interpreted·processes·by·only·giving·the·corresponding
135 process·identity.·By·default,·an·attachment·window·is·displayed.·Processes135 process·identity.·By·default,·an·attachment·window·is·displayed.·Processes
136 at·other·Erlang·nodes·can·be·attached·manually·or·automatically.</p><p>The·functions·in·this·module·are·defined·in·the·Erlang·shell.·That·is,136 at·other·Erlang·nodes·can·be·attached·manually·or·automatically.</p><p>The·functions·in·this·module·are·defined·in·the·Erlang·shell.·That·is,
137 they·can·be·called·without·the·<code·class="inline">i:</code>·prefix.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">ii</span><span·class="p"·data-group-id="7378205880-1">(</span><span·class="ss">t</span><span·class="p"·data-group-id="7378205880-1">)</span><span·class="p">.</span><span·class="w">137 they·can·be·called·without·the·<code·class="inline">i:</code>·prefix.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">ii</span><span·class="p"·data-group-id="2571698458-1">(</span><span·class="ss">t</span><span·class="p"·data-group-id="2571698458-1">)</span><span·class="p">.</span><span·class="w">
138 </span><span·class="p"·data-group-id="7378205880-2">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">t</span><span·class="p"·data-group-id="7378205880-2">}</span><span·class="gp·unselectable">138 </span><span·class="p"·data-group-id="2571698458-2">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">t</span><span·class="p"·data-group-id="2571698458-2">}</span><span·class="gp·unselectable">
139 2&gt;·</span><span·class="nf">iaa</span><span·class="p"·data-group-id="7378205880-3">(</span><span·class="p"·data-group-id="7378205880-4">[</span><span·class="ss">init</span><span·class="p"·data-group-id="7378205880-4">]</span><span·class="p"·data-group-id="7378205880-3">)</span><span·class="p">.</span><span·class="w">139 2&gt;·</span><span·class="nf">iaa</span><span·class="p"·data-group-id="2571698458-3">(</span><span·class="p"·data-group-id="2571698458-4">[</span><span·class="ss">init</span><span·class="p"·data-group-id="2571698458-4">]</span><span·class="p"·data-group-id="2571698458-3">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="ss">true</span></code></pre>140 </span><span·class="ss">true</span></code></pre>
141 ····</section>141 ····</section>
  
142 </div>142 </div>
  
143 ··<section·id="summary"·class="details-list">143 ··<section·id="summary"·class="details-list">
144 ····<h1·class="section-heading">144 ····<h1·class="section-heading">
2.88 KB
./usr/share/doc/erlang-doc/html/lib/debugger-5.4/doc/html/int.html
    
Offset 682, 15 lines modifiedOffset 682, 15 lines modified
682 ·························Args·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>682 ·························Args·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>
  
683 ······</div>683 ······</div>
  
684 <p>Sets·when·and·how·to·attach·automatically·to·a·process·executing·code684 <p>Sets·when·and·how·to·attach·automatically·to·a·process·executing·code
685 in·interpreted·modules.</p><p>By·default·when·the·interpreter·is·started,·automatic·attach·is·disabled.</p><p>If·<code·class="inline">Flags</code>·is·an·empty·list,·automatic·attach·is·disabled.</p><p>Otherwise·<code·class="inline">Flags</code>·should·be·a·list·containing··at·least·one·of·the·following685 in·interpreted·modules.</p><p>By·default·when·the·interpreter·is·started,·automatic·attach·is·disabled.</p><p>If·<code·class="inline">Flags</code>·is·an·empty·list,·automatic·attach·is·disabled.</p><p>Otherwise·<code·class="inline">Flags</code>·should·be·a·list·containing··at·least·one·of·the·following
686 flags:</p><ul><li><code·class="inline">init</code>·-·Attach·when·a·process·for·the·first·time·calls·an·interpreted686 flags:</p><ul><li><code·class="inline">init</code>·-·Attach·when·a·process·for·the·first·time·calls·an·interpreted
687 function.</li><li><code·class="inline">break</code>·-·Attach·whenever·a·process·reaches·a·breakpoint.</li><li><code·class="inline">exit</code>·-·Attach·when·a·process·terminates.</li></ul><p>When·the·specified·event·occurs,·the·function·<code·class="inline">Function</code>·is·called·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="8785681642-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8785681642-2">[</span><span·class="n">Pid</span><sp[·...·truncated·by·diffoscope;·len:·190,·SHA:·780d43707068951554b961c21a40f9d7ff50a7a01c84633fda685250f678cd7a·...·]-1">)</span></code></pre><p><code·class="inline">Pid</code>·is·the·pid·of·the·process·executing·interpreted·code.</p>687 function.</li><li><code·class="inline">break</code>·-·Attach·whenever·a·process·reaches·a·breakpoint.</li><li><code·class="inline">exit</code>·-·Attach·when·a·process·terminates.</li></ul><p>When·the·specified·event·occurs,·the·function·<code·class="inline">Function</code>·is·called·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">spawn</span><span·class="p"·data-group-id="3586906315-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3586906315-2">[</span><span·class="n">Pid</span><sp[·...·truncated·by·diffoscope;·len:·190,·SHA:·c923003492a1abe45f979079f2d4321b6a68f599d1ed15bc65aafbf4888bda95·...·]-1">)</span></code></pre><p><code·class="inline">Pid</code>·is·the·pid·of·the·process·executing·interpreted·code.</p>
688 ··</section>688 ··</section>
689 </section>689 </section>
690 <section·class="detail"·id="break/2">690 <section·class="detail"·id="break/2">
  
691 ··<div·class="detail-header">691 ··<div·class="detail-header">
692 ····<a·href="#break/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">692 ····<a·href="#break/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
693 ······<i·class="ri-link-m"·aria-hidden="true"></i>693 ······<i·class="ri-link-m"·aria-hidden="true"></i>
594 B
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/.build
    
Offset 16, 13 lines modifiedOffset 16, 13 lines modified
16 dist/lato-latin-300-normal-YUMVEFOL.woff216 dist/lato-latin-300-normal-YUMVEFOL.woff2
17 dist/lato-latin-400-normal-W7754I4D.woff217 dist/lato-latin-400-normal-W7754I4D.woff2
18 dist/lato-latin-700-normal-2XVSBPG4.woff218 dist/lato-latin-700-normal-2XVSBPG4.woff2
19 dist/lato-latin-ext-300-normal-VPGGJKJL.woff219 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
20 dist/lato-latin-ext-400-normal-N27NCBWW.woff220 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
21 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff221 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
22 dist/remixicon-NKANDIL5.woff222 dist/remixicon-NKANDIL5.woff2
23 dist/search_data-009BAE67.js23 dist/search_data-1DB1C954.js
24 dist/sidebar_items-D08FD193.js24 dist/sidebar_items-D08FD193.js
25 index.html25 index.html
26 notes.html26 notes.html
27 search.html27 search.html
28 typer_cmd.html28 typer_cmd.html
69.4 KB
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/dialyzer.epub
2.24 KB
zipinfo {}
    
Offset 1, 15 lines modifiedOffset 1, 15 lines modified
1 Zip·file·size:·65486·bytes,·number·of·entries:·131 Zip·file·size:·65492·bytes,·number·of·entries:·13
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:21·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx·····4990·b-·defN·24-Oct-11·20:21·OEBPS/typer_cmd.xhtml3 ?rw-r--r--··2.0·unx·····4990·b-·defN·24-Oct-11·20:59·OEBPS/typer_cmd.xhtml
4 ?rw-r--r--··2.0·unx······716·b-·defN·24-Oct-11·20:21·OEBPS/title.xhtml4 ?rw-r--r--··2.0·unx······716·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
5 ?rw-r--r--··2.0·unx···122269·b-·defN·24-Oct-11·20:21·OEBPS/notes.xhtml5 ?rw-r--r--··2.0·unx···122269·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
6 ?rw-r--r--··2.0·unx·····1212·b-·defN·24-Oct-11·20:21·OEBPS/nav.xhtml6 ?rw-r--r--··2.0·unx·····1212·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
7 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-erlang-2EWSTWER.css7 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
8 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-CB7BJMUW.js8 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
9 ?rw-r--r--··2.0·unx····19671·b-·defN·24-Oct-11·20:21·OEBPS/dialyzer_chapter.xhtml9 ?rw-r--r--··2.0·unx····19671·b-·defN·24-Oct-11·20:59·OEBPS/dialyzer_chapter.xhtml
10 ?rw-r--r--··2.0·unx····48517·b-·defN·24-Oct-11·20:21·OEBPS/dialyzer.xhtml10 ?rw-r--r--··2.0·unx····48517·b-·defN·24-Oct-11·20:59·OEBPS/dialyzer.xhtml
11 ?rw-r--r--··2.0·unx·····1651·b-·defN·24-Oct-11·20:21·OEBPS/content.opf11 ?rw-r--r--··2.0·unx·····1651·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
12 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:21·OEBPS/assets/logo.png12 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
13 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:21·META-INF/container.xml13 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
14 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:21·META-INF/com.apple.ibooks.display-options.xml14 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
15 13·files,·222194·bytes·uncompressed,·63890·bytes·compressed:··71.2%15 13·files,·222194·bytes·uncompressed,·63896·bytes·compressed:··71.2%
32.5 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
18.4 KB
OEBPS/dialyzer_chapter.xhtml
Max HTML report size reached
14.8 KB
OEBPS/dialyzer.xhtml
Max HTML report size reached
1.23 KB
OEBPS/content.opf
1.2 KB
OEBPS/content.opf
Max HTML report size reached
14.9 KB
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/dialyzer.html
    
Offset 266, 35 lines modifiedOffset 266, 35 lines modified
266 the·value·is·a·list,·it·is·used·as·is.·If·it·is·not·a·list,·it·is·put·into·a266 the·value·is·a·list,·it·is·used·as·is.·If·it·is·not·a·list,·it·is·put·into·a
267 list.</p><p>The·list·is·appended·to·any·options·given·to·<a·href="#run/1"><code·class="inline">run/1</code></a>·or·on·the·command·line.</p><p>The·list·can·be·retrieved·with·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html#env_compiler_options/0"><code·class="inline">compile:env_compiler_options/0</code></a>.</p><p>Currently·the·only·option·used·is·the267 list.</p><p>The·list·is·appended·to·any·options·given·to·<a·href="#run/1"><code·class="inline">run/1</code></a>·or·on·the·command·line.</p><p>The·list·can·be·retrieved·with·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html#env_compiler_options/0"><code·class="inline">compile:env_compiler_options/0</code></a>.</p><p>Currently·the·only·option·used·is·the
268 <a·href="dialyzer.html#error_location"><code·class="inline">error_location</code></a>·option.</p><p><em>Dialyzer·configuration·file:</em></p><p>Dialyzer's·configuration·file·may·also·be·used·to·augment·the·default·options268 <a·href="dialyzer.html#error_location"><code·class="inline">error_location</code></a>·option.</p><p><em>Dialyzer·configuration·file:</em></p><p>Dialyzer's·configuration·file·may·also·be·used·to·augment·the·default·options
269 and·those·given·directly·to·the·Dialyzer·command.·It·is·commonly·used·to·avoid269 and·those·given·directly·to·the·Dialyzer·command.·It·is·commonly·used·to·avoid
270 repeating·options·which·would·otherwise·need·to·be·given·explicitly·to·Dialyzer270 repeating·options·which·would·otherwise·need·to·be·given·explicitly·to·Dialyzer
271 on·every·invocation.</p><p>The·location·of·the·configuration·file·can·be·set·via·the·<code·class="inline">DIALYZER_CONFIG</code>271 on·every·invocation.</p><p>The·location·of·the·configuration·file·can·be·set·via·the·<code·class="inline">DIALYZER_CONFIG</code>
272 environment·variable,·and·defaults·to·within·the·<code·class="inline">user_config</code>·from272 environment·variable,·and·defaults·to·within·the·<code·class="inline">user_config</code>·from
273 <a·href="../../../../lib/stdlib-6.0.1/doc/html/filename.html#basedir/3"><code·class="inline">filename:basedir/3</code></a>.</p><p>An·example·configuration·file's·contents·might·be:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="7289046802-1">{</span><span·class="ss">incremental</span><span·class="p">,</span><span·class="w">273 <a·href="../../../../lib/stdlib-6.0.1/doc/html/filename.html#basedir/3"><code·class="inline">filename:basedir/3</code></a>.</p><p>An·example·configuration·file's·contents·might·be:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="2217815574-1">{</span><span·class="ss">incremental</span><span·class="p">,</span><span·class="w">
274 ········</span><span·class="p"·data-group-id="7289046802-2">{</span><span·class="ss">default_apps</span><span·class="p">,</span><span·class="p"·data-group-id="7289046802-3">[</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·109,·SHA:·b47fba1e1da55eec2acb3959a3777f3529392f9c2c9b5824e8287b77bff00d5e·...·]-2">}</span><span·class="p">,</span><span·class="w">274 ········</span><span·class="p"·data-group-id="2217815574-2">{</span><span·class="ss">default_apps</span><span·class="p">,</span><span·class="p"·data-group-id="2217815574-3">[</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·109,·SHA:·c47e0f73af59e1a8c7e94e86e7aae73e037a8fa6853f8c68903e665c3bc76e5a·...·]-2">}</span><span·class="p">,</span><span·class="w">
275 ········</span><span·class="p"·data-group-id="7289046802-4">{</span><span·class="ss">default_warning_apps</span><span·class="p">,</span><span·class="p"·data-group-id="7289046802-5">[</span><span·class="ss">stdlib</span><span·class="p"·data-group-id="7289046802-5">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·d5e2ea952b2257285a97e449a21b2cf11b544fdc77f0e803f4ac95adb3317225·...·]-4">}</span><span·class="w">275 ········</span><span·class="p"·data-group-id="2217815574-4">{</span><span·class="ss">default_warning_apps</span><span·class="p">,</span><span·class="p"·data-group-id="2217815574-5">[</span><span·class="ss">stdlib</span><span·class="p"·data-group-id="2217815574-5">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·cf1e26aea14148508455e51b76930544c45eba6ca990c3111d026ccd7a84c2e9·...·]-4">}</span><span·class="w">
276 ······</span><span·class="p"·data-group-id="7289046802-1">}</span><span·class="p">.</span><span·class="w">276 ······</span><span·class="p"·data-group-id="2217815574-1">}</span><span·class="p">.</span><span·class="w">
277 ······</span><span·class="p"·data-group-id="7289046802-6">{</span><span·class="ss">warnings</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7289046802-7">[</span><span·class="ss">no_improper_lists</span><span·class="p"·data-group-id="7289046802-7">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·e6625d8dff24780efb898df7f6633995ad1af89571c17666c517237b3cc7cd50·...·]-6">}</span><span·class="p">.</span><span·class="w">277 ······</span><span·class="p"·data-group-id="2217815574-6">{</span><span·class="ss">warnings</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2217815574-7">[</span><span·class="ss">no_improper_lists</span><span·class="p"·data-group-id="2217815574-7">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·e5532f39ca53d62a1ae36f827cb9e4cf0f2f05bee8a5bea7044155695530e0a6·...·]-6">}</span><span·class="p">.</span><span·class="w">
278 ······</span><span·class="p"·data-group-id="7289046802-8">{</span><span·class="ss">add_pathsa</span><span·class="p">,</span><span·class="p"·data-group-id="7289046802-9">[</span><span·class="s">&quot;/users/samwise/potatoes/ebin&quot;</span><span·class="p"·data-group-id="7289046802-9">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·e6625d8dff24780efb898df7f6633995ad1af89571c17666c517237b3cc7cd50·...·]-8">}</span><span·class="p">.</span><span·class="w">278 ······</span><span·class="p"·data-group-id="2217815574-8">{</span><span·class="ss">add_pathsa</span><span·class="p">,</span><span·class="p"·data-group-id="2217815574-9">[</span><span·class="s">&quot;/users/samwise/potatoes/ebin&quot;</span><span·class="p"·data-group-id="2217815574-9">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·e5532f39ca53d62a1ae36f827cb9e4cf0f2f05bee8a5bea7044155695530e0a6·...·]-8">}</span><span·class="p">.</span><span·class="w">
279 ······</span><span·class="p"·data-group-id="7289046802-10">{</span><span·class="ss">add_pathsz</span><span·class="p">,</span><span·class="p"·data-group-id="7289046802-11">[</span><span·class="s">&quot;/users/smeagol/fish/ebin&quot;</span><span·class="p"·data-group-id="7289046802-11">]</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·977e45bcf4ccfd3a67cf86bcafa1a133c0ee3a65de152705334544b8ddd40011·...·]-10">}</span><span·class="p">.</span></code></pre><p><a·href=""·id="suppression"></a></p><h2·id="module-requesting-or-suppressing-warnings-in-source-files"·class="section-heading">279 ······</span><span·class="p"·data-group-id="2217815574-10">{</span><span·class="ss">add_pathsz</span><span·class="p">,</span><span·class="p"·data-group-id="2217815574-11">[</span><span·class="s">&quot;/users/smeagol/fish/ebin&quot;</span><span·class="p"·data-group-id="2217815574-11">]</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·a0095fa1d4253cb6bc589070abe514b3212be38760cbfc24dbd9d37ec05891d7·...·]-10">}</span><span·class="p">.</span></code></pre><p><a·href=""·id="suppression"></a></p><h2·id="module-requesting-or-suppressing-warnings-in-source-files"·class="section-heading">
280 ··<a·href="#module-requesting-or-suppressing-warnings-in-source-files"·class="hover-link">280 ··<a·href="#module-requesting-or-suppressing-warnings-in-source-files"·class="hover-link">
281 ····<i·class="ri-link-m"·aria-hidden="true"></i>281 ····<i·class="ri-link-m"·aria-hidden="true"></i>
282 ··</a>282 ··</a>
283 ··<span·class="text">Requesting·or·Suppressing·Warnings·in·Source·Files</span>283 ··<span·class="text">Requesting·or·Suppressing·Warnings·in·Source·Files</span>
284 </h2>284 </h2>
285 <p>Attribute·<code·class="inline">-dialyzer()</code>·can·be·used·for·turning·off·warnings·in·a·module·by285 <p>Attribute·<code·class="inline">-dialyzer()</code>·can·be·used·for·turning·off·warnings·in·a·module·by
286 specifying·functions·or·warning·options.·For·example,·to·turn·off·all·warnings286 specifying·functions·or·warning·options.·For·example,·to·turn·off·all·warnings
287 for·the·function·<code·class="inline">f/0</code>,·include·the·following·line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">dialyzer</span><span·class="p"·data-group-id="5307509206-1">(</span><span·class="p"·data-group-id="5307509206-2">{</span><span·class="ss">nowarn_function</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·74,·SHA:·855a95b6cdfef3872f99f652aae2af730c953f7b6a20e3801846b01878e5ceac·...·]-1">)</span><span·class="p">.</span></code></pre><p>To·turn·off·warnings·for·improper·lists,·add·the·following·line·to·the·source287 for·the·function·<code·class="inline">f/0</code>,·include·the·following·line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">dialyzer</span><span·class="p"·data-group-id="1863539910-1">(</span><span·class="p"·data-group-id="1863539910-2">{</span><span·class="ss">nowarn_function</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·74,·SHA:·e23bd40a39f9f7162a23b612fbe3a6b7db6e5d9c31abeee47f8e7ae3602e4a65·...·]-1">)</span><span·class="p">.</span></code></pre><p>To·turn·off·warnings·for·improper·lists,·add·the·following·line·to·the·source
288 file:</p><pre><code·class="text">-dialyzer(no_improper_lists).</code></pre><p>Attribute·<code·class="inline">-dialyzer()</code>·is·allowed·after·function·declarations.·Lists·of·warning288 file:</p><pre><code·class="text">-dialyzer(no_improper_lists).</code></pre><p>Attribute·<code·class="inline">-dialyzer()</code>·is·allowed·after·function·declarations.·Lists·of·warning
289 options·or·functions·are·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">dialyzer</span><span·class="p"·data-group-id="1089820048-1">(</span><span·class="p"·data-group-id="1089820048-2">[</span><span·class="p"·data-group-id="1089820048-3">{</span><span·class="ss">nowarn_function</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1089820048[·...·truncated·by·diffoscope;·len:·1867,·SHA:·ffe221819defb1fdf788d6c8cafa1c856ea63cd748a7863721a188a3d796c4c6·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·warning·option·for·underspecified·functions,·<code·class="inline">-Wunderspecs</code>,·can·result·in289 options·or·functions·are·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">dialyzer</span><span·class="p"·data-group-id="9253523377-1">(</span><span·class="p"·data-group-id="9253523377-2">[</span><span·class="p"·data-group-id="9253523377-3">{</span><span·class="ss">nowarn_function</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9253523377[·...·truncated·by·diffoscope;·len:·1867,·SHA:·4e1343098e027536264cdda0c2a9d073fb84d9d3ec6ec7baaf00091e64e727f6·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·warning·option·for·underspecified·functions,·<code·class="inline">-Wunderspecs</code>,·can·result·in
290 useful·warnings,·but·often·functions·with·specifications·that·are·strictly·more290 useful·warnings,·but·often·functions·with·specifications·that·are·strictly·more
291 allowing·than·the·success·typing·cannot·easily·be·modified·to·be·less·allowing.291 allowing·than·the·success·typing·cannot·easily·be·modified·to·be·less·allowing.
292 To·turn·off·the·warning·for·underspecified·function·<code·class="inline">f/0</code>,·include·the·following292 To·turn·off·the·warning·for·underspecified·function·<code·class="inline">f/0</code>,·include·the·following
293 line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">dialyzer</span><span·class="p"·data-group-id="3608093861-1">(</span><span·class="p"·data-group-id="3608093861-2">{</span><span·class="ss">no_underspecs</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·8d9bb54845bfdae057820ce57469693fc5b2ac09ed4df23c7de0b1d994f9154b·...·]-1">)</span><span·class="p">.</span></code></pre><p>For·help·on·the·warning·options,·use·<code·class="inline">dialyzer·-Whelp</code>.·The·options·are·also293 line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">dialyzer</span><span·class="p"·data-group-id="4840427387-1">(</span><span·class="p"·data-group-id="4840427387-2">{</span><span·class="ss">no_underspecs</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·6ba921300c071ac38ed80539e05b448f37f44f24d9fa6d408f9dd83534ab64d8·...·]-1">)</span><span·class="p">.</span></code></pre><p>For·help·on·the·warning·options,·use·<code·class="inline">dialyzer·-Whelp</code>.·The·options·are·also
294 enumerated,·see·type·<a·href="#t:warn_option/0"><code·class="inline">warn_option/0</code></a>.</p><p>Attribute·<code·class="inline">-dialyzer()</code>·can·also·be·used·for·turning·on·warnings.·For·example,294 enumerated,·see·type·<a·href="#t:warn_option/0"><code·class="inline">warn_option/0</code></a>.</p><p>Attribute·<code·class="inline">-dialyzer()</code>·can·also·be·used·for·turning·on·warnings.·For·example,
295 if·a·module·has·been·fixed·regarding·unmatched·returns,·adding·the·following295 if·a·module·has·been·fixed·regarding·unmatched·returns,·adding·the·following
296 line·can·help·in·assuring·that·no·new·unmatched·return·warnings·are·introduced:</p><pre><code·class="text">-dialyzer(unmatched_returns).</code></pre>296 line·can·help·in·assuring·that·no·new·unmatched·return·warnings·are·introduced:</p><pre><code·class="text">-dialyzer(unmatched_returns).</code></pre>
297 ····</section>297 ····</section>
  
298 </div>298 </div>
  
18.5 KB
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/dialyzer_chapter.html
    
Offset 205, 37 lines modifiedOffset 205, 37 lines modified
205 spec·is·invalid·with·respect·to·the·implementation.·However,·if·they·do·overlap,205 spec·is·invalid·with·respect·to·the·implementation.·However,·if·they·do·overlap,
206 Dialyzer·will·proceed·under·the·assumption·that·the·correct·type·for·the·given206 Dialyzer·will·proceed·under·the·assumption·that·the·correct·type·for·the·given
207 function·is·the·intersection·of·the·inferred·type·and·the·specified·type·(the207 function·is·the·intersection·of·the·inferred·type·and·the·specified·type·(the
208 rationale·being·that·the·user·may·know·something·that·Dialyzer·itself·cannot208 rationale·being·that·the·user·may·know·something·that·Dialyzer·itself·cannot
209 deduce).·One·implication·of·this·is·that·if·the·user·gives·a·spec·for·a·function209 deduce).·One·implication·of·this·is·that·if·the·user·gives·a·spec·for·a·function
210 which·overlaps·with·Dialyzer's·inferred·type,·but·is·more·restrictive,·Dialyzer210 which·overlaps·with·Dialyzer's·inferred·type,·but·is·more·restrictive,·Dialyzer
211 will·trust·those·restrictions.·This·may·then·generate·an·error·elsewhere·that211 will·trust·those·restrictions.·This·may·then·generate·an·error·elsewhere·that
212 follows·from·the·erroneously·restricted·spec.</p><p><em>Examples:</em></p><p>Non-overlapping·argument:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="7421049778-1">(</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7421049778-2">(</span><span·class="p"·data-group-id="7421049778-2">)</span><span·class="p"·data-group-id="7421049778-1">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·156,·SHA:·db7225421e3788a565aaa3d419dfcd15c9d6ebe07959e983ba99e585c86b9076·...·]-3">)</span><span·class="p">.</span><span·class="w">212 follows·from·the·erroneously·restricted·spec.</p><p><em>Examples:</em></p><p>Non-overlapping·argument:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="8842988446-1">(</span><span·class="nf">boolean</span><span·class="p"·data-group-id="8842988446-2">(</span><span·class="p"·data-group-id="8842988446-2">)</span><span·class="p"·data-group-id="8842988446-1">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·156,·SHA:·d1963a1c72ecf671a7eb670b6ec76ea7ff1ed840e36b43a14f8b6a65adfe10cd·...·]-3">)</span><span·class="p">.</span><span·class="w">
213 </span><span·class="c1">%%·Dialyzer·will·infer:·foo(integer())·-&gt;·string().</span><span·class="w">213 </span><span·class="c1">%%·Dialyzer·will·infer:·foo(integer())·-&gt;·string().</span><span·class="w">
214 </span><span·class="nf">foo</span><span·class="p"·data-group-id="7421049778-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="7421049778-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 </span><span·class="nf">foo</span><span·class="p"·data-group-id="8842988446-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="8842988446-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ····</span><span·class="nf">integer_to_list</span><span·class="p"·data-group-id="7421049778-5">(</span><span·class="n">N</span><span·class="p"·data-group-id="7421049778-5">)</span><span·class="p">.</span></code></pre><p>Since·the·type·of·the·argument·in·the·spec·is·different·from·the·type·that215 ····</span><span·class="nf">integer_to_list</span><span·class="p"·data-group-id="8842988446-5">(</span><span·class="n">N</span><span·class="p"·data-group-id="8842988446-5">)</span><span·class="p">.</span></code></pre><p>Since·the·type·of·the·argument·in·the·spec·is·different·from·the·type·that
216 Dialyzer·inferred,·Dialyzer·will·generate·the·following·warning:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">some_module</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">7</span><span·class="p">:</span><span·class="mi">2</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Invalid</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><span·class="ss">specification</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">216 Dialyzer·inferred,·Dialyzer·will·generate·the·following·warning:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">some_module</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">7</span><span·class="p">:</span><span·class="mi">2</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Invalid</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><span·class="ss">specification</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="ss">foo</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">
217 ·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">success</span><span·class="w">·</span><span·class="ss">typing</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">foo</span><span·class="w">217 ·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">success</span><span·class="w">·</span><span·class="ss">typing</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">foo</span><span·class="w">
218 ··········</span><span·class="p"·data-group-id="4722910811-1">(</span><span·class="nf">integer</span><span·class="p"·data-group-id="4722910811-2">(</span><span·class="p"·data-group-id="4722910811-2">)</span><span·class="p"·data-group-id="4722910811-1">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·156,·SHA:·64bf7e4a5b4d6476a6b6afc3bb4609aff19e58cd5b491f0c0abdbf30ae3887b4·...·]-3">)</span><span·class="w">218 ··········</span><span·class="p"·data-group-id="5406671094-1">(</span><span·class="nf">integer</span><span·class="p"·data-group-id="5406671094-2">(</span><span·class="p"·data-group-id="5406671094-2">)</span><span·class="p"·data-group-id="5406671094-1">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·156,·SHA:·406443833dd6f4272e709a03dff076c3ce8b22b86c9d7b825a0c2f4538c0e958·...·]-3">)</span><span·class="w">
219 ·</span><span·class="n">But</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">spec</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">foo</span><span·class="w">219 ·</span><span·class="n">But</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">spec</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">foo</span><span·class="w">
220 ··········</span><span·class="p"·data-group-id="4722910811-4">(</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4722910811-5">(</span><span·class="p"·data-group-id="4722910811-5">)</span><span·class="p"·data-group-id="4722910811-4">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·156,·SHA:·4c9e631d6861276718dca61b1dc90bfe20d79568018bf22cb5ece10e17e55634·...·]-6">)</span><span·class="w">220 ··········</span><span·class="p"·data-group-id="5406671094-4">(</span><span·class="nf">boolean</span><span·class="p"·data-group-id="5406671094-5">(</span><span·class="p"·data-group-id="5406671094-5">)</span><span·class="p"·data-group-id="5406671094-4">)</span><span·class="w">·</span><span·class="p">-&gt[·...·truncated·by·diffoscope;·len:·156,·SHA:·d1248a647192c61c990b5ea9e16a3a67433e31dc3611b513959d9429d15ced41·...·]-6">)</span><span·class="w">
221 ·</span><span·class="n">They</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">overlap</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="mi">1</span><span·class="ss">st</span><span·class="w">·</span><span·class="ss">argument</span></code></pre><p>Non-overlapping·return:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">bar</span><span·class="p"·data-group-id="6063570019-1">(</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="6063570019-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·139,·SHA:·9431213efa2407c12a1ae8587a0a33ab6b618d53966d5ba82bc85280ffddb41e·...·]-2">)</span><span·class="p">.</span><span·class="w">221 ·</span><span·class="n">They</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">overlap</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="mi">1</span><span·class="ss">st</span><span·class="w">·</span><span·class="ss">argument</span></code></pre><p>Non-overlapping·return:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">bar</span><span·class="p"·data-group-id="4670898144-1">(</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="4670898144-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·139,·SHA:·4ffc670b7f325f464b49d194da65eb58841f14edecbe583644cd9e63b02f67e2·...·]-2">)</span><span·class="p">.</span><span·class="w">
222 </span><span·class="c1">%%·Dialyzer·will·infer:·bar(a·|·b)·-&gt;·binary().</span><span·class="w">222 </span><span·class="c1">%%·Dialyzer·will·infer:·bar(a·|·b)·-&gt;·binary().</span><span·class="w">
223 </span><span·class="nf">bar</span><span·class="p"·data-group-id="6063570019-3">(</span><span·class="ss">a</span><span·class="p"·data-group-id="6063570019-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">;</span><span·class="w">223 </span><span·class="nf">bar</span><span·class="p"·data-group-id="4670898144-3">(</span><span·class="ss">a</span><span·class="p"·data-group-id="4670898144-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">;</span><span·class="w">
224 </span><span·class="nf">bar</span><span·class="p"·data-group-id="6063570019-4">(</span><span·class="ss">b</span><span·class="p"·data-group-id="6063570019-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;b&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span></code></pre><p>Since·the·return·value·in·the·spec·and·the·return·value·inferred·by·Dialyzer·are224 </span><span·class="nf">bar</span><span·class="p"·data-group-id="4670898144-4">(</span><span·class="ss">b</span><span·class="p"·data-group-id="4670898144-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;b&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">.</span></code></pre><p>Since·the·return·value·in·the·spec·and·the·return·value·inferred·by·Dialyzer·are
225 different,·Dialyzer·will·generate·the·following·warning:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">some_module</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">11</span><span·class="p">:</span><span·class="mi">2</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Invalid</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><span·class="ss">specification</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="ss">bar</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">225 different,·Dialyzer·will·generate·the·following·warning:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">some_module</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">11</span><span·class="p">:</span><span·class="mi">2</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Invalid</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><span·class="ss">specification</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="ss">bar</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">
226 ·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">success</span><span·class="w">·</span><span·class="ss">typing</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">bar</span><span·class="w">226 ·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">success</span><span·class="w">·</span><span·class="ss">typing</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">bar</span><span·class="w">
227 ··········</span><span·class="p"·data-group-id="1732424101-1">(</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="1732424101-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span><span·class="w">227 ··········</span><span·class="p"·data-group-id="8335649375-1">(</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="8335649375-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">:</span><span·class="mi">8</span><span·class="p">&gt;&gt;</span><span·class="w">
228 ·</span><span·class="n">But</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">spec</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">bar</span><span·class="w">228 ·</span><span·class="n">But</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">spec</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="nc">some_module</span><span·class="p">:</span><span·class="nf">bar</span><span·class="w">
229 ··········</span><span·class="p"·data-group-id="1732424101-2">(</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="1732424101-2">)</span><span·class="w">·</span><span·class="p"[·...·truncated·by·diffoscope;·len:·159,·SHA:·de22d8164142ca317fdb43df872daf3883fae74763697c777ce308ebc2d5bc65·...·]-3">)</span><span·class="w">229 ··········</span><span·class="p"·data-group-id="8335649375-2">(</span><span·class="ss">&#39;a&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;b&#39;</span><span·class="p"·data-group-id="8335649375-2">)</span><span·class="w">·</span><span·class="p"[·...·truncated·by·diffoscope;·len:·159,·SHA:·e56914fd0a4f23b643b2e7f28d68e74eb7895635ef9b941a23af76b0d90feff3·...·]-3">)</span><span·class="w">
230 ·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">return</span><span·class="w">·</span><span·class="ss">types</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">overlap</span></code></pre><p>Overlapping·spec·and·inferred·type:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">baz</span><span·class="p"·data-group-id="1356804901-1">(</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="1356804901-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·150,·SHA:·dcc218f248db8ede34788c726603d2caf746570bb460aae4831881539576850f·...·]-2">)</span><span·class="p">.</span><span·class="w">230 ·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">return</span><span·class="w">·</span><span·class="ss">types</span><span·class="w">·</span><span·class="ss">do</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">overlap</span></code></pre><p>Overlapping·spec·and·inferred·type:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">baz</span><span·class="p"·data-group-id="4714412229-1">(</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="4714412229-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·150,·SHA:·03defe2a787b4f744522ed35a2c0fe1623e073cec5f4a7b3945d820563ce6050·...·]-2">)</span><span·class="p">.</span><span·class="w">
231 </span><span·class="c1">%%·Dialyzer·will·infer:·baz(b·|·c·|·d)·-&gt;·-1·|·0·|·1.</span><span·class="w">231 </span><span·class="c1">%%·Dialyzer·will·infer:·baz(b·|·c·|·d)·-&gt;·-1·|·0·|·1.</span><span·class="w">
232 </span><span·class="nf">baz</span><span·class="p"·data-group-id="1356804901-3">(</span><span·class="ss">b</span><span·class="p"·data-group-id="1356804901-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">232 </span><span·class="nf">baz</span><span·class="p"·data-group-id="4714412229-3">(</span><span·class="ss">b</span><span·class="p"·data-group-id="4714412229-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
233 </span><span·class="nf">baz</span><span·class="p"·data-group-id="1356804901-4">(</span><span·class="ss">c</span><span·class="p"·data-group-id="1356804901-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">;</span><span·class="w">233 </span><span·class="nf">baz</span><span·class="p"·data-group-id="4714412229-4">(</span><span·class="ss">c</span><span·class="p"·data-group-id="4714412229-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">;</span><span·class="w">
234 </span><span·class="nf">baz</span><span·class="p"·data-group-id="1356804901-5">(</span><span·class="ss">d</span><span·class="p"·data-group-id="1356804901-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span></code></pre><p>Dialyzer·will·&quot;trust&quot;·the·spec·and·using·the·intersection·of·the·spec·and234 </span><span·class="nf">baz</span><span·class="p"·data-group-id="4714412229-5">(</span><span·class="ss">d</span><span·class="p"·data-group-id="4714412229-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span></code></pre><p>Dialyzer·will·&quot;trust&quot;·the·spec·and·using·the·intersection·of·the·spec·and
235 inferred·type:</p><pre><code·class="text">baz(b)·-&gt;·0·|·1.</code></pre><p>Notice·how·the·<code·class="inline">c</code>·and·<code·class="inline">d</code>·from·the·argument·to·<code·class="inline">baz/1</code>·and·the·<code·class="inline">-1</code>·in·the235 inferred·type:</p><pre><code·class="text">baz(b)·-&gt;·0·|·1.</code></pre><p>Notice·how·the·<code·class="inline">c</code>·and·<code·class="inline">d</code>·from·the·argument·to·<code·class="inline">baz/1</code>·and·the·<code·class="inline">-1</code>·in·the
236 return·from·the·inferred·type·were·dropped·once·the·spec·and·inferred·type·were236 return·from·the·inferred·type·were·dropped·once·the·spec·and·inferred·type·were
237 intersected.·This·could·result·in·warnings·being·emitted·for·later·functions.</p><p>For·example,·if·<code·class="inline">baz/1</code>·is·called·like·this:</p><pre><code·class="text">call_baz1(A)·-&gt;237 intersected.·This·could·result·in·warnings·being·emitted·for·later·functions.</p><p>For·example,·if·<code·class="inline">baz/1</code>·is·called·like·this:</p><pre><code·class="text">call_baz1(A)·-&gt;
238 ····case·baz(A)·of238 ····case·baz(A)·of
239 ········-1·-&gt;·negative;239 ········-1·-&gt;·negative;
240 ········0·-&gt;·zero;240 ········0·-&gt;·zero;
241 ········1·-&gt;·positive241 ········1·-&gt;·positive
630 B
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-009BAE67.js"></script>124 <script·src="dist/search_data-1DB1C954.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
571 KB
./usr/share/doc/erlang-doc/html/lib/diameter-2.4/doc/html/diameter.epub
3.83 KB
zipinfo {}
Max HTML report size reached
57.2 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
17.4 KB
OEBPS/diameter_dict.xhtml
Max HTML report size reached
2.26 KB
OEBPS/diameter_codec.xhtml
    
Offset 30, 15 lines modifiedOffset 30, 15 lines modified
30 encode/decode.</p><blockquote><h4·class="warning">Warning</h4><p>The·diameter·user·does·not·need·to·call·functions·here·explicitly·when·sending30 encode/decode.</p><blockquote><h4·class="warning">Warning</h4><p>The·diameter·user·does·not·need·to·call·functions·here·explicitly·when·sending
31 and·receiving·messages·using·<a·href="diameter.xhtml#call/4"><code·class="inline">diameter:call/4</code></a>·and·the·callback·interface31 and·receiving·messages·using·<a·href="diameter.xhtml#call/4"><code·class="inline">diameter:call/4</code></a>·and·the·callback·interface
32 documented·in·<a·href="diameter_app.xhtml"><code·class="inline">diameter_app</code></a>:·diameter·itself·provides·encode/decode·as·a32 documented·in·<a·href="diameter_app.xhtml"><code·class="inline">diameter_app</code></a>:·diameter·itself·provides·encode/decode·as·a
33 consequence·of·configuration·passed·to·<a·href="diameter.xhtml#start_service/2"><code·class="inline">diameter:start_service/2</code></a>,·and·the33 consequence·of·configuration·passed·to·<a·href="diameter.xhtml#start_service/2"><code·class="inline">diameter:start_service/2</code></a>,·and·the
34 results·may·differ·from·those·returned·by·the·functions·documented·here,34 results·may·differ·from·those·returned·by·the·functions·documented·here,
35 depending·on·configuration.</p></blockquote><p>The·<a·href="diameter_codec.xhtml#header">header()</a>·and35 depending·on·configuration.</p></blockquote><p>The·<a·href="diameter_codec.xhtml#header">header()</a>·and
36 <a·href="diameter_codec.xhtml#packet">packet()</a>·records·below·are·defined·in·diameter.hrl,36 <a·href="diameter_codec.xhtml#packet">packet()</a>·records·below·are·defined·in·diameter.hrl,
37 which·can·be·included·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p">-</samp><samp·class="na">include_lib</samp><samp·class="p"·data-group-id="3527521692-1">(</samp><samp·class="s">&quot;diameter/include/diameter.hrl&quot;</samp><samp·class="p"·data-group-id="3527521692-1">)</samp><samp·class="p">.</samp></code></pre><p>Application-specific·records·are·defined·in·the·hrl·files·resulting·from37 which·can·be·included·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p">-</samp><samp·class="na">include_lib</samp><samp·class="p"·data-group-id="8584688839-1">(</samp><samp·class="s">&quot;diameter/include/diameter.hrl&quot;</samp><samp·class="p"·data-group-id="8584688839-1">)</samp><samp·class="p">.</samp></code></pre><p>Application-specific·records·are·defined·in·the·hrl·files·resulting·from
38 dictionary·file·compilation.</p><h2·id="module-data-types"·class="section-heading">38 dictionary·file·compilation.</p><h2·id="module-data-types"·class="section-heading">
39 ··<a·href="#module-data-types"·class="hover-link">39 ··<a·href="#module-data-types"·class="hover-link">
40 ····<i·class="ri-link-m"·aria-hidden="true"></i>40 ····<i·class="ri-link-m"·aria-hidden="true"></i>
41 ··</a>41 ··</a>
42 ··<span·class="text">DATA·TYPES</span>42 ··<span·class="text">DATA·TYPES</span>
43 </h2>43 </h2>
44 <ul><li><p><strong><code·class="inline"·id="integers">uint8() ·=·0..255</code></strong></p></li><li><p><strong><code·class="inline">uint24()·=·0..16777215</code></strong></p></li><li><p><strong><code·class="inline">uint32()·=·0..4294967295</code></strong>·-·8-bit,·24-bit·and·32-bit·integers·occurring44 <ul><li><p><strong><code·class="inline"·id="integers">uint8() ·=·0..255</code></strong></p></li><li><p><strong><code·class="inline">uint24()·=·0..16777215</code></strong></p></li><li><p><strong><code·class="inline">uint32()·=·0..4294967295</code></strong>·-·8-bit,·24-bit·and·32-bit·integers·occurring
7.47 KB
OEBPS/diameter_app.xhtml
Max HTML report size reached
482 KB
OEBPS/diameter.xhtml
Max HTML report size reached
1.24 KB
OEBPS/content.opf
1.2 KB
OEBPS/content.opf
Max HTML report size reached
198 KB
./usr/share/doc/erlang-doc/html/lib/diameter-2.4/doc/html/diameter.html
    
Offset 225, 22 lines modifiedOffset 225, 22 lines modified
225 not·setting·a·value,·as·documented·in·RFC·6733.·The·function225 not·setting·a·value,·as·documented·in·RFC·6733.·The·function
226 <a·href="#origin_state_id/0"><code·class="inline">origin_state_id/0</code></a>·can·be·used·as·to·retrieve·a·value·that·is·computed·when226 <a·href="#origin_state_id/0"><code·class="inline">origin_state_id/0</code></a>·can·be·used·as·to·retrieve·a·value·that·is·computed·when
227 the·diameter·application·is·started.</p></li><li><p><strong><code·class="inline">{'Supported-Vendor-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Auth-Application-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Inband-Security-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong>·-227 the·diameter·application·is·started.</p></li><li><p><strong><code·class="inline">{'Supported-Vendor-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Auth-Application-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Inband-Security-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong>·-
228 Inband-Security-Id·defaults·to·the·empty·list,·which·is·equivalent·to·a·list228 Inband-Security-Id·defaults·to·the·empty·list,·which·is·equivalent·to·a·list
229 containing·only·0·(NO_INBAND_SECURITY).·If·1·(TLS)·is·specified·then·TLS·is229 containing·only·0·(NO_INBAND_SECURITY).·If·1·(TLS)·is·specified·then·TLS·is
230 selected·if·the·CER/CEA·received·from·the·peer·offers·it.</p></li><li><p><strong><code·class="inline">{'Acct-Application-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Vendor-Specific-Application-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Grouped()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Firmware-Revision',</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">}</code></strong></p></li></ul><p>Note·that·each·tuple·communicates·one·or·more·AVP·values.·It·is·an·error·to230 selected·if·the·CER/CEA·received·from·the·peer·offers·it.</p></li><li><p><strong><code·class="inline">{'Acct-Application-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Vendor-Specific-Application-Id',·[</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Grouped()</code></a><code·class="inline">]}</code></strong></p></li><li><p><strong><code·class="inline">{'Firmware-Revision',</code><a·href="diameter_dict.html#DATA_TYPES"><code·class="inline">Unsigned32()</code></a><code·class="inline">}</code></strong></p></li></ul><p>Note·that·each·tuple·communicates·one·or·more·AVP·values.·It·is·an·error·to
231 specify·duplicate·tuples.</p><p><a·href=""·id="eval"></a></p></li><li><p><strong><code·class="inline">eval()·=·{M,F,A}·|·fun()·|·[eval()·|·A]</code></strong>·-·An·expression·that·can·be231 specify·duplicate·tuples.</p><p><a·href=""·id="eval"></a></p></li><li><p><strong><code·class="inline">eval()·=·{M,F,A}·|·fun()·|·[eval()·|·A]</code></strong>·-·An·expression·that·can·be
232 evaluated·as·a·function·in·the·following·sense.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">eval</span><span·class="p"·data-group-id="9788718774-1">(</span><span·class="p"·data-group-id="9788718774-2">[</span><span·class="p"·data-group-id="9788718774-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="n">A</span><span·cla[·...·truncated·by·diffoscope;·len:·234,·SHA:·c992497dbc3ec94fe0856ba2ea326430df260a2cf7d6b6d3c76e9c8f85c0dd6a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">232 evaluated·as·a·function·in·the·following·sense.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">eval</span><span·class="p"·data-group-id="9832164515-1">(</span><span·class="p"·data-group-id="9832164515-2">[</span><span·class="p"·data-group-id="9832164515-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="n">A</span><span·cla[·...·truncated·by·diffoscope;·len:·234,·SHA:·e8cf610b6c40f67dde2e2cf4dd647e4f524a8438ab53e08ef957ac3d6c87fe9d·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
233 ····</span><span·class="nf">apply</span><span·class="p"·data-group-id="9788718774-4">(</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·71,·SHA:·05e80df7c5c0846ba23cada93b529cefea49393a09436b3f1dc72b68229fa478·...·]-4">)</span><span·class="p">;</span><span·class="w">233 ····</span><span·class="nf">apply</span><span·class="p"·data-group-id="9832164515-4">(</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·71,·SHA:·65f08ad14991f7ea8774b475378731e0dd9d143717d9eb890ef9067c0c4ad919·...·]-4">)</span><span·class="p">;</span><span·class="w">
234 </span><span·class="nf">eval</span><span·class="p"·data-group-id="9788718774-5">(</span><span·class="p"·data-group-id="9788718774-6">[</span><span·class="p"·data-group-id="9788718774-7">[</span><span·class="n">F</span><span·class="p">|</span><span·class="n">A</span><span·class="p"·data-group-id="9788718774-7">]</span><spa[·...·truncated·by·diffoscope;·len:·186,·SHA:·9d9b4b5ee69c187595a53d21442561d9a5e062ea64edc4ece4ab5776570ff269·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">234 </span><span·class="nf">eval</span><span·class="p"·data-group-id="9832164515-5">(</span><span·class="p"·data-group-id="9832164515-6">[</span><span·class="p"·data-group-id="9832164515-7">[</span><span·class="n">F</span><span·class="p">|</span><span·class="n">A</span><span·class="p"·data-group-id="9832164515-7">]</span><spa[·...·truncated·by·diffoscope;·len:·186,·SHA:·ad88a3c5fe651bac5ecab65ba84fbf0bfb7bf09f4d1a51acdef4d0fd080a320f·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
235 ····</span><span·class="nf">eval</span><span·class="p"·data-group-id="9788718774-8">(</span><span·class="p"·data-group-id="9788718774-9">[</span><span·class="n">F</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">++</span><span·class="[·...·truncated·by·diffoscope;·len:·129,·SHA:·0a27e0c85a551fd786f9e912178efa74b167a061b356cf9d34f3715ece8803cd·...·]-8">)</span><span·class="p">;</span><span·class="w">235 ····</span><span·class="nf">eval</span><span·class="p"·data-group-id="9832164515-8">(</span><span·class="p"·data-group-id="9832164515-9">[</span><span·class="n">F</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">++</span><span·class="[·...·truncated·by·diffoscope;·len:·129,·SHA:·d93ebae72a7915b359a0068b9bf1a510994b2f0b757120ed924d367230733d9c·...·]-8">)</span><span·class="p">;</span><span·class="w">
236 </span><span·class="nf">eval</span><span·class="p"·data-group-id="9788718774-10">(</span><span·class="p"·data-group-id="9788718774-11">[</span><span·class="n">F</span><span·class="p">|</span><span·class="n">A</span><span·class="p"·data-group-id="9788718774-11">]</span><span·class="p"·data-group-id="9788718774-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">236 </span><span·class="nf">eval</span><span·class="p"·data-group-id="9832164515-10">(</span><span·class="p"·data-group-id="9832164515-11">[</span><span·class="n">F</span><span·class="p">|</span><span·class="n">A</span><span·class="p"·data-group-id="9832164515-11">]</span><span·class="p"·data-group-id="9832164515-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
237 ····</span><span·class="nf">apply</span><span·class="p"·data-group-id="9788718774-12">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="9788718774-12">)</span><span·class="p">;</span><span·class="w">237 ····</span><span·class="nf">apply</span><span·class="p"·data-group-id="9832164515-12">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="9832164515-12">)</span><span·class="p">;</span><span·class="w">
238 </span><span·class="nf">eval</span><span·class="p"·data-group-id="9788718774-13">(</span><span·class="n">F</span><span·class="p"·data-group-id="9788718774-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">238 </span><span·class="nf">eval</span><span·class="p"·data-group-id="9832164515-13">(</span><span·class="n">F</span><span·class="p"·data-group-id="9832164515-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
239 ····</span><span·class="nf">eval</span><span·class="p"·data-group-id="9788718774-14">(</span><span·class="p"·data-group-id="9788718774-15">[</span><span·class="n">F</span><span·class="p"·data-group-id="9788718774-15">]</span><span·class="p"·data-group-id="9788718774-14">)</span><span·class="p">.</span></code></pre><p>Applying·an·<a·href="diameter.html#eval"><code·class="inline">eval()</code></a>·<code·class="inline">E</code>·to·an·argument·list·<code·class="inline">A</code>·is·meant239 ····</span><span·class="nf">eval</span><span·class="p"·data-group-id="9832164515-14">(</span><span·class="p"·data-group-id="9832164515-15">[</span><span·class="n">F</span><span·class="p"·data-group-id="9832164515-15">]</span><span·class="p"·data-group-id="9832164515-14">)</span><span·class="p">.</span></code></pre><p>Applying·an·<a·href="diameter.html#eval"><code·class="inline">eval()</code></a>·<code·class="inline">E</code>·to·an·argument·list·<code·class="inline">A</code>·is·meant
240 in·the·sense·of·<code·class="inline">eval([E|A])</code>.</p><blockquote><h4·class="warning">Warning</h4><p>Beware·of·using·fun·expressions·of·the·form·<code·class="inline">fun·Name/Arity</code>·in·situations240 in·the·sense·of·<code·class="inline">eval([E|A])</code>.</p><blockquote><h4·class="warning">Warning</h4><p>Beware·of·using·fun·expressions·of·the·form·<code·class="inline">fun·Name/Arity</code>·in·situations
241 in·which·the·fun·is·not·short-lived·and·code·is·to·be·upgraded·at·runtime241 in·which·the·fun·is·not·short-lived·and·code·is·to·be·upgraded·at·runtime
242 since·any·processes·retaining·such·a·fun·will·have·a·reference·to·old·code.242 since·any·processes·retaining·such·a·fun·will·have·a·reference·to·old·code.
243 In·particular,·such·a·value·is·typically·inappropriate·in·configuration243 In·particular,·such·a·value·is·typically·inappropriate·in·configuration
244 passed·to·<a·href="#start_service/2"><code·class="inline">start_service/2</code></a>·or·<a·href="#add_transport/2"><code·class="inline">add_transport/2</code></a>.</p></blockquote><p><a·href=""·id="peer_filter"></a></p></li><li><p><strong><code·class="inline">peer_filter()·=·term()</code></strong>·-·Filter·passed·to·<a·href="#call/4"><code·class="inline">call/4</code></a>·in·order·to·select244 passed·to·<a·href="#start_service/2"><code·class="inline">start_service/2</code></a>·or·<a·href="#add_transport/2"><code·class="inline">add_transport/2</code></a>.</p></blockquote><p><a·href=""·id="peer_filter"></a></p></li><li><p><strong><code·class="inline">peer_filter()·=·term()</code></strong>·-·Filter·passed·to·<a·href="#call/4"><code·class="inline">call/4</code></a>·in·order·to·select
245 candidate·peers·for·a·<a·href="diameter_app.html#c:pick_peer/4">pick_peer/4</a>·callback.245 candidate·peers·for·a·<a·href="diameter_app.html#c:pick_peer/4">pick_peer/4</a>·callback.
246 Has·one·of·the·following·types.</p><ul><li><p><strong><code·class="inline">none</code></strong>·-·Matches·any·peer.·This·is·a·convenience·that·provides·a·filter246 Has·one·of·the·following·types.</p><ul><li><p><strong><code·class="inline">none</code></strong>·-·Matches·any·peer.·This·is·a·convenience·that·provides·a·filter
Offset 304, 18 lines modifiedOffset 304, 18 lines modified
304 peer·respectively.·<code·class="inline">Pkt</code>·contains·the·CER·in·question.·In·the·case·of304 peer·respectively.·<code·class="inline">Pkt</code>·contains·the·CER·in·question.·In·the·case·of
305 rejection·by·a·capabilities·callback,·the·tuple·contains·the·rejecting305 rejection·by·a·capabilities·callback,·the·tuple·contains·the·rejecting
306 callback.</p></li><li><p><strong><code·class="inline">{'CER',·Caps,·{ResultCode,·Pkt}}</code></strong></p><pre><code·class="text">ResultCode·=·integer()306 callback.</p></li><li><p><strong><code·class="inline">{'CER',·Caps,·{ResultCode,·Pkt}}</code></strong></p><pre><code·class="text">ResultCode·=·integer()
307 Caps·=·#diameter_caps{}307 Caps·=·#diameter_caps{}
308 Pkt··=·#diameter_packet{}</code></pre><p>An·incoming·CER·contained·errors·and·has·been·answered·with·the·indicated308 Pkt··=·#diameter_packet{}</code></pre><p>An·incoming·CER·contained·errors·and·has·been·answered·with·the·indicated
309 result·code.·<code·class="inline">Caps</code>·contains·values·for·the·local·node·only.·<code·class="inline">Pkt</code>309 result·code.·<code·class="inline">Caps</code>·contains·values·for·the·local·node·only.·<code·class="inline">Pkt</code>
310 contains·the·CER·in·question.</p></li><li><p><strong><code·class="inline">{'CER',·timeout}</code></strong>·-·An·expected·CER·was·not·received·within310 contains·the·CER·in·question.</p></li><li><p><strong><code·class="inline">{'CER',·timeout}</code></strong>·-·An·expected·CER·was·not·received·within
311 <a·href="diameter.html#capx_timeout">capx_timeout</a>·of·connection·establishment.</p></li><li><p><strong><code·class="inline">{'CEA',·Result,·Caps,·Pkt}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ResultCode</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="2341547804-1">(</span><span·class="p"·data-group-id="2341547804-1">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="2341547804-2">{</span><span·class="ss">capabilities_cb</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·232,·SHA:·3948fe2d8b932683fd946fce2118fc573c7bfa30d12f7488a7d3524df41abcfc·...·]4-2">}</span><span·class="w">311 <a·href="diameter.html#capx_timeout">capx_timeout</a>·of·connection·establishment.</p></li><li><p><strong><code·class="inline">{'CEA',·Result,·Caps,·Pkt}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ResultCode</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="5028739974-1">(</span><span·class="p"·data-group-id="5028739974-1">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="5028739974-2">{</span><span·class="ss">capabilities_cb</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·232,·SHA:·b81f9f2d31bc75b5833aea9132e455e95a6e2aeb8a3ff5a40209af9482f9687c·...·]4-2">}</span><span·class="w">
312 </span><span·class="n">Caps</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">diameter_caps</span><span·class="p"·data-group-id="2341547804-3">{</span><span·class="p"·data-group-id="2341547804-3">}</span><span·class="w">312 </span><span·class="n">Caps</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">diameter_caps</span><span·class="p"·data-group-id="5028739974-3">{</span><span·class="p"·data-group-id="5028739974-3">}</span><span·class="w">
313 </span><span·class="n">Pkt</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">diameter_packet</span><span·class="p"·data-group-id="2341547804-4">{</span><span·class="p"·data-group-id="2341547804-4">}</span><span·class="w">313 </span><span·class="n">Pkt</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">diameter_packet</span><span·class="p"·data-group-id="5028739974-4">{</span><span·class="p"·data-group-id="5028739974-4">}</span><span·class="w">
314 </span><span·class="n">ResultCode</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2341547804-5">(</span><span·class="p"·data-group-id="2341547804-5">)</span></code></pre><p>An·incoming·CEA·has·been·rejected·for·the·indicated·reason.·An314 </span><span·class="n">ResultCode</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5028739974-5">(</span><span·class="p"·data-group-id="5028739974-5">)</span></code></pre><p>An·incoming·CEA·has·been·rejected·for·the·indicated·reason.·An
315 integer-valued·<code·class="inline">Result</code>·indicates·the·result·code·sent·by·the·peer.·<code·class="inline">Caps</code>315 integer-valued·<code·class="inline">Result</code>·indicates·the·result·code·sent·by·the·peer.·<code·class="inline">Caps</code>
316 contains·pairs·of·values·for·the·local·node·and·remote·peer.·<code·class="inline">Pkt</code>316 contains·pairs·of·values·for·the·local·node·and·remote·peer.·<code·class="inline">Pkt</code>
317 contains·the·CEA·in·question.·In·the·case·of·rejection·by·a·capabilities317 contains·the·CEA·in·question.·In·the·case·of·rejection·by·a·capabilities
318 callback,·the·tuple·contains·the·rejecting·callback.</p></li><li><p><strong><code·class="inline">{'CEA',·Caps,·Pkt}</code></strong></p><pre><code·class="text">Caps·=·#diameter_caps{}318 callback,·the·tuple·contains·the·rejecting·callback.</p></li><li><p><strong><code·class="inline">{'CEA',·Caps,·Pkt}</code></strong></p><pre><code·class="text">Caps·=·#diameter_caps{}
319 Pkt··=·#diameter_packet{}</code></pre><p>An·incoming·CEA·contained·errors·and·has·been·rejected.·<code·class="inline">Caps</code>·contains319 Pkt··=·#diameter_packet{}</code></pre><p>An·incoming·CEA·contained·errors·and·has·been·rejected.·<code·class="inline">Caps</code>·contains
320 only·values·for·the·local·node.·<code·class="inline">Pkt</code>·contains·the·CEA·in·question.</p></li><li><p><strong><code·class="inline">{'CEA',·timeout}</code></strong>·-·An·expected·CEA·was·not·received·within320 only·values·for·the·local·node.·<code·class="inline">Pkt</code>·contains·the·CEA·in·question.</p></li><li><p><strong><code·class="inline">{'CEA',·timeout}</code></strong>·-·An·expected·CEA·was·not·received·within
321 <a·href="diameter.html#capx_timeout">capx_timeout</a>·of·connection·establishment.</p></li></ul></li><li><p><strong><code·class="inline">{watchdog,·Ref,·PeerRef,·{From,·To},·Config}</code></strong></p><pre><code·class="c">Ref·=·transport_ref()321 <a·href="diameter.html#capx_timeout">capx_timeout</a>·of·connection·establishment.</p></li></ul></li><li><p><strong><code·class="inline">{watchdog,·Ref,·PeerRef,·{From,·To},·Config}</code></strong></p><pre><code·class="c">Ref·=·transport_ref()
Offset 565, 18 lines modifiedOffset 565, 18 lines modified
565 Term·passed·as·the·third·argument·to·the565 Term·passed·as·the·third·argument·to·the
566 <a·href="diameter_transport.html#c:start/3">start/3</a>·function·of·the·relevant566 <a·href="diameter_transport.html#c:start/3">start/3</a>·function·of·the·relevant
567 <a·href="diameter_transport.html">transport·module</a>·in·order·to·start·a·transport567 <a·href="diameter_transport.html">transport·module</a>·in·order·to·start·a·transport
568 process.·Defaults·to·the·empty·list.</p><p>The·3-tuple·form·additionally·specifies·an·interval,·in·milliseconds,·after568 process.·Defaults·to·the·empty·list.</p><p>The·3-tuple·form·additionally·specifies·an·interval,·in·milliseconds,·after
569 which·a·started·transport·process·should·be·terminated·if·it·has·not·yet569 which·a·started·transport·process·should·be·terminated·if·it·has·not·yet
570 established·a·connection.·For·example,·the·following·options·on·a·connecting570 established·a·connection.·For·example,·the·following·options·on·a·connecting
571 transport·request·a·connection·with·one·peer·over·SCTP·or·another·(typically571 transport·request·a·connection·with·one·peer·over·SCTP·or·another·(typically
572 the·same)·over·TCP.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6904095700-1">{</span><span·class="ss">transport_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">diameter_sctp</span><span·class="p"·data-group-id="6904095700-1">}</span><span·class="w">572 the·same)·over·TCP.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1961738626-1">{</span><span·class="ss">transport_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">diameter_sctp</span><span·class="p"·data-group-id="1961738626-1">}</span><span·class="w">
573 </span><span·class="p"·data-group-id="6904095700-2">{</span><span·class="ss">transport_config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SctpOpts</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5000</span><span·class="p"·data-group-id="69040957[·...·truncated·by·diffoscope;·len:·2,·SHA:·f1534392279bddbf9d43dde8701cb5be14b82f76ec6607bf8d6ad557f60f304e·...·]-2">}</span><span·class="w">573 </span><span·class="p"·data-group-id="1961738626-2">{</span><span·class="ss">transport_config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SctpOpts</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5000</span><span·class="p"·data-group-id="19617386[·...·truncated·by·diffoscope;·len:·2,·SHA:·5f9c4ab08cac7457e9111a30e4664920607ea2c115a1433d7be98e97e64244ca·...·]-2">}</span><span·class="w">
574 </span><span·class="p"·data-group-id="6904095700-3">{</span><span·class="ss">transport_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">diameter_tcp</span><span·class="p"·data-group-id="6904095700-3">}</span><span·class="w">574 </span><span·class="p"·data-group-id="1961738626-3">{</span><span·class="ss">transport_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">diameter_tcp</span><span·class="p"·data-group-id="1961738626-3">}</span><span·class="w">
575 </span><span·class="p"·data-group-id="6904095700-4">{</span><span·class="ss">transport_config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TcpOpts</span><span·class="p"·data-group-id="6904095700-4">}</span></code></pre><p>To·listen·on·both·SCTP·and·TCP,·define·one·transport·for·each.</p></li><li><p><strong><code·class="inline"·id="transport_module">{transport_module,·atom()}</code></strong>·-·Module·implementing575 </span><span·class="p"·data-group-id="1961738626-4">{</span><span·class="ss">transport_config</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TcpOpts</span><span·class="p"·data-group-id="1961738626-4">}</span></code></pre><p>To·listen·on·both·SCTP·and·TCP,·define·one·transport·for·each.</p></li><li><p><strong><code·class="inline"·id="transport_module">{transport_module,·atom()}</code></strong>·-·Module·implementing
576 a·transport·process·as·defined·in·<a·href="diameter_transport.html"><code·class="inline">diameter_transport</code></a>.·Defaults·to576 a·transport·process·as·defined·in·<a·href="diameter_transport.html"><code·class="inline">diameter_transport</code></a>.·Defaults·to
577 <code·class="inline">diameter_tcp</code>.</p><p>Multiple·<code·class="inline">transport_module</code>·and577 <code·class="inline">diameter_tcp</code>.</p><p>Multiple·<code·class="inline">transport_module</code>·and
578 <a·href="diameter.html#transport_config">transport_config</a>·options·are·allowed.·The578 <a·href="diameter.html#transport_config">transport_config</a>·options·are·allowed.·The
579 order·of·these·is·significant·in·this·case·(and·only·in·this·case),·a579 order·of·these·is·significant·in·this·case·(and·only·in·this·case),·a
580 <code·class="inline">transport_module</code>·being·paired·with·the·first580 <code·class="inline">transport_module</code>·being·paired·with·the·first
581 <a·href="diameter.html#transport_config">transport_config</a>·following·it·in·the581 <a·href="diameter.html#transport_config">transport_config</a>·following·it·in·the
582 options·list,·or·the·default·value·for·trailing·modules.·Transport·starts582 options·list,·or·the·default·value·for·trailing·modules.·Transport·starts
Offset 2537, 21 lines modifiedOffset 2537, 21 lines modified
2537 ··········<pre·translate="no"><span·class="attribute">-spec</span>·remove_transport(<a·href="#t:service_name/0">service_name</a>(),·<a·href="#t:transport_pred/0">transport_pred</a>())·->·ok·|·{error,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}.</pre>2537 ··········<pre·translate="no"><span·class="attribute">-spec</span>·remove_transport(<a·href="#t:service_name/0">service_name</a>(),·<a·href="#t:transport_pred/0">transport_pred</a>())·->·ok·|·{error,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}.</pre>
  
2538 ······</div>2538 ······</div>
  
2539 <p>remove_transport(SvcName,·Pred)·-&gt;·ok·|·{error,·Reason}</p><p>Remove·previously·added·transports.</p><p><code·class="inline">Pred</code>·determines·which·transports·to·remove.·An·arity-3-valued·<code·class="inline">Pred</code>·removes2539 <p>remove_transport(SvcName,·Pred)·-&gt;·ok·|·{error,·Reason}</p><p>Remove·previously·added·transports.</p><p><code·class="inline">Pred</code>·determines·which·transports·to·remove.·An·arity-3-valued·<code·class="inline">Pred</code>·removes
2540 all·transports·for·which·<code·class="inline">Pred(Ref,·Type,·Opts)</code>·returns·<code·class="inline">true</code>,·where·<code·class="inline">Type</code>2540 all·transports·for·which·<code·class="inline">Pred(Ref,·Type,·Opts)</code>·returns·<code·class="inline">true</code>,·where·<code·class="inline">Type</code>
2541 and·<code·class="inline">Opts</code>·are·as·passed·to·<a·href="#add_transport/2"><code·class="inline">add_transport/2</code></a>·and·<code·class="inline">Ref</code>·is·as·returned·by·it.2541 and·<code·class="inline">Opts</code>·are·as·passed·to·<a·href="#add_transport/2"><code·class="inline">add_transport/2</code></a>·and·<code·class="inline">Ref</code>·is·as·returned·by·it.
2542 The·remaining·forms·are·equivalent·to·an·arity-3·fun·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6366442091-1">(</span><span·class="nf">transport_ref</span><span·class="p"·data-group-id="6366442091-2">(</span><span·class="p"·data-group-id="6366442091-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"[·...·truncated·by·diffoscope;·len:·797,·SHA:·d6c1d57d55d90bf0f67d4d9adc4e8f71917a344829df4b2346cab4a5b6050a3f·...·]-5">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">2542 The·remaining·forms·are·equivalent·to·an·arity-3·fun·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2588913507-1">(</span><span·class="nf">transport_ref</span><span·class="p"·data-group-id="2588913507-2">(</span><span·class="p"·data-group-id="2588913507-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"[·...·truncated·by·diffoscope;·len:·797,·SHA:·3c6991539c4014a26208a263bf23bd814a1f04ec4a00fa2afe488bc95d5b6b6a·...·]-5">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
2543 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6366442091-6">(</span><span·class="nf">list</span><span·class="p"·data-group-id="6366442091-7">(</span><span·class="p"·data-group-id="6366442091-7">)</span><span·class="p"·data-group-id="6366442091-6">)</span><span·class="p">:</span><span·class="w">·······[·...·truncated·by·diffoscope;·len:·547,·SHA:·da4a8b938f28d8096b9be01fbf8de2ef2deae70ccaca40493659856ee6c8ac66·...·]-9">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">2543 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2588913507-6">(</span><span·class="nf">list</span><span·class="p"·data-group-id="2588913507-7">(</span><span·class="p"·data-group-id="2588913507-7">)</span><span·class="p"·data-group-id="2588913507-6">)</span><span·class="p">:</span><span·class="w">·······[·...·truncated·by·diffoscope;·len:·547,·SHA:·62342e3196486b7ead785a2f4bf19209fe6ae9214d366149d16186c622f71bf5·...·]-9">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
2544 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">transport_ref</span><span·class="p"·data-group-id="6366442091-10">(</span><span·class="p"·data-group-id="6366442091-10">)</span><span·class="p">:</span><span·class="w">···············</span><span·class="nf">fun</span><span·class="p"·data-group-id="6366442091-11">(</span><span·class="n">Ref</span><span·clas[·...·truncated·by·diffoscope;·len:·175,·SHA:·805c1ed6faf4a346eb7b3ce739cff91326b40fa034fad4cc1db1915c80d47076·...·]-11">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">Ref</span><span·class="w">·</span><span·class="k">end</span><span·class="w">2544 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">transport_ref</span><span·class="p"·data-group-id="2588913507-10">(</span><span·class="p"·data-group-id="2588913507-10">)</span><span·class="p">:</span><span·class="w">···············</span><span·class="nf">fun</span><span·class="p"·data-group-id="2588913507-11">(</span><span·class="n">Ref</span><span·clas[·...·truncated·by·diffoscope;·len:·175,·SHA:·b9cc874d7d7c06a64e412b6ef51482e3a8038634275e1e2d709ee809162928bb·...·]-11">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">Ref</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
2545 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="6366442091-12">(</span><span·class="p"·data-group-id="6366442091-12">)</span><span·class="p">:</span><span·class="w">························</span><span·class="nf">fun</span><span·class="p"·data-group-id="6366442091-13">(</span><span·class="p">_</span><sp[·...·truncated·by·diffoscope;·len:·369,·SHA:·b918ae1ce7479705fafbf778e5148b555dc7058f5c61fc6a3acd72e6fce6c482·...·]-14">]</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">--</span><span·class="w">·</span><span·class="n">Opts</span><span·class="w">·</span><span·class="k">end</span><span·class="w">2545 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="2588913507-12">(</span><span·class="p"·data-group-id="2588913507-12">)</span><span·class="p">:</span><span·class="w">························</span><span·class="nf">fun</span><span·class="p"·data-group-id="2588913507-13">(</span><span·class="p">_</span><sp[·...·truncated·by·diffoscope;·len:·369,·SHA:·f3d75e5345ccb15f1d318874bc6aa19369d608c1f5bc182f748842eb9b064870·...·]-14">]</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">--</span><span·class="w">·</span><span·class="n">Opts</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
2546 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">true</span><span·class="p">:</span><span·class="w">··························</span><span·class="nf">fun</span><span·class="p"·data-group-id="6366442091-15">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="6366442091-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="k">end</span><span·class="w">2546 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">true</span><span·class="p">:</span><span·class="w">··························</span><span·class="nf">fun</span><span·class="p"·data-group-id="2588913507-15">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="2588913507-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
2547 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">false</span><span·class="p">:</span><span·class="w">·························</span><span·class="nf">fun</span><span·class="p"·data-group-id="6366442091-16">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="6366442091-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">·</span><span·class="k">end</span><span·class="w">2547 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">false</span><span·class="p">:</span><span·class="w">·························</span><span·class="nf">fun</span><span·class="p"·data-group-id="2588913507-16">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="2588913507-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
2548 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6366442091-17">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="n">A</span><span·class="p"·data-group-id="6366442091-17">}</span><span·class="p">:</span><span·class="w">··</span><span·clas[·...·truncated·by·diffoscope;·len:·1025,·SHA:·1f5607058a07dc2a32ee9c75fe123020b0fe3fb53721cb11fe69fe13de3179fb·...·]-19">)</span><span·class="w">·</span><span·class="k">end</span></code></pre><p>Removing·a·transport·causes·the·corresponding·transport·processes·to·be2548 </span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2588913507-17">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="n">A</span><span·class="p"·data-group-id="2588913507-17">}</span><span·class="p">:</span><span·class="w">··</span><span·clas[·...·truncated·by·diffoscope;·len:·1025,·SHA:·fd11565b23c3d221f971e0d7993ea03a4a458b9147c66439e52be5f8e7818c01·...·]-19">)</span><span·class="w">·</span><span·class="k">end</span></code></pre><p>Removing·a·transport·causes·the·corresponding·transport·processes·to·be
2549 terminated.·Whether·or·not·a·DPR·message·is·sent·to·a·peer·is·controlled·by2549 terminated.·Whether·or·not·a·DPR·message·is·sent·to·a·peer·is·controlled·by
2550 value·of·<a·href="diameter.html#disconnect_cb">disconnect_cb</a>·configured·on·the2550 value·of·<a·href="diameter.html#disconnect_cb">disconnect_cb</a>·configured·on·the
2551 transport.</p>2551 transport.</p>
2552 ··</section>2552 ··</section>
2553 </section>2553 </section>
2554 <section·class="detail"·id="service_info/2">2554 <section·class="detail"·id="service_info/2">
  
Offset 2586, 60 lines modifiedOffset 2586, 60 lines modified
2586 <a·href="#start_service/2"><code·class="inline">start_service/2</code></a>.</p></li><li><p><strong><code·class="inline">applications</code></strong>·-·Return·the·list·of·applications·as·configured·with2586 <a·href="#start_service/2"><code·class="inline">start_service/2</code></a>.</p></li><li><p><strong><code·class="inline">applications</code></strong>·-·Return·the·list·of·applications·as·configured·with
2587 <a·href="#start_service/2"><code·class="inline">start_service/2</code></a>.</p></li><li><p><strong><code·class="inline">capabilities</code></strong>·-·Return·a·tagged·list·of·all·capabilities·values·as2587 <a·href="#start_service/2"><code·class="inline">start_service/2</code></a>.</p></li><li><p><strong><code·class="inline">capabilities</code></strong>·-·Return·a·tagged·list·of·all·capabilities·values·as
2588 configured·with·<a·href="#start_service/2"><code·class="inline">start_service/2</code></a>.</p></li><li><p><strong><code·class="inline">transport</code></strong>·-·Return·a·list·containing·one·entry·for·each·of·the·service's2588 configured·with·<a·href="#start_service/2"><code·class="inline">start_service/2</code></a>.</p></li><li><p><strong><code·class="inline">transport</code></strong>·-·Return·a·list·containing·one·entry·for·each·of·the·service's
2589 transport·as·configured·with·<a·href="#add_transport/2"><code·class="inline">add_transport/2</code></a>.·Each·entry·is·a·tagged·list2589 transport·as·configured·with·<a·href="#add_transport/2"><code·class="inline">add_transport/2</code></a>.·Each·entry·is·a·tagged·list
2590 containing·both·configuration·and·information·about·established·peer2590 containing·both·configuration·and·information·about·established·peer
2591 connections.·An·example·return·value·with·for·a·client·service·with2591 connections.·An·example·return·value·with·for·a·client·service·with
2592 Origin-Host·&quot;client.example.com&quot;·configured·with·a·single·transport·connected2592 Origin-Host·&quot;client.example.com&quot;·configured·with·a·single·transport·connected
2593 to·&quot;server.example.com&quot;·might·look·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5992097078-1">[</span><span·class="p"·data-group-id="5992097078-2">[</span><span·class="p"·data-group-id="5992097078-3">{</span><span·class="ss">ref</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span>[·...·truncated·by·diffoscope;·len:·147,·SHA:·22064e764ade85c76ac7ff0e2142504c517f733f8b90b51c38d98c90f2493164·...·]-3">}</span><span·class="p">,</span><span·class="w">2593 to·&quot;server.example.com&quot;·might·look·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6162507640-1">[</span><span·class="p"·data-group-id="6162507640-2">[</span><span·class="p"·data-group-id="6162507640-3">{</span><span·class="ss">ref</span><span·class="p">,</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span>[·...·truncated·by·diffoscope;·len:·147,·SHA:·2681c1a250b168534d867a3f5a3d0920b156d66fc3bdaa83e99b4780e8f32feb·...·]-3">}</span><span·class="p">,</span><span·class="w">
2594 ··</span><span·class="p"·data-group-id="5992097078-4">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="ss">connect</span><span·class="p"·data-group-id="5992097078-4">}</span><span·class="p">,</span><span·class="w">2594 ··</span><span·class="p"·data-group-id="6162507640-4">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="ss">connect</span><span·class="p"·data-group-id="6162507640-4">}</span><span·class="p">,</span><span·class="w">
2595 ··</span><span·class="p"·data-group-id="5992097078-5">{</span><span·class="ss">options</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-6">[</span><span·class="p"·data-group-id="5992097078-7">{</span><span·class="ss">transport_module</span><span·class="p">,</span><span·class="ss">diameter_tcp</span><span·class="p"·data-group-id="5992097078-7">}</span><span·class="p">,</span><span·class="w"> 
2596 ············</span><span·class="p"·data-group-id="5992097078-8">{</span><span·class="ss">transport_config</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-9">[</span><span·class="p"·data-group-id="5992097078-10">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·361,·SHA:·ea39c5f3db0494bc0b9ca2f79542060baf7d8ce22090b2dfe76a5c5b5757fd6e·...·]">}</span><span·class="p">,</span><span·class="w">2595 ··</span><span·class="p"·data-group-id="6162507640-5">{</span><span·class="ss">options</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-6">[</span><span·class="p"·data-group-id="6162507640-7">{</span><span·class="ss">transport_module</[·...·truncated·by·diffoscope;·len:·108,·SHA:·c6994c8622b0e21f51fe2745a91ac37e2da07f096e9289529891e3d81d7dd132·...·]">}</span><span·class="p">,</span><span·class="w">
 2596 ············</span><span·class="p"·data-group-id="6162507640-8">{</span><span·class="ss">transport_config</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-9">[</span><span·class="p"·data-group-id="6162507640-10">{</span><span·class="ss">ip</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-11">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6162507640-11">}</span><span·class="p"·data-group-id="6162507640-10">}</span><span·class="p">,</span><span·class="w">
2597 ·······························</span><span·class="p"·data-group-id="5992097078-12">{</span><span·class="ss">raddr</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-13">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><[·...·truncated·by·diffoscope;·len:·143,·SHA:·19cebab1f250eedc54e36abca34f00f1b86e322ea664bf5fa32a3a7499dbaa69·...·]-12">}</span><span·class="p">,</span><span·class="w">2597 ·······························</span><span·class="p"·data-group-id="6162507640-12">{</span><span·class="ss">raddr</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-13">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><[·...·truncated·by·diffoscope;·len:·143,·SHA:·b02dea7cabe8a28cae5a78a9c6e5b5e0a8b2336ca70229189f79612ebc00cfd1·...·]-12">}</span><span·class="p">,</span><span·class="w">
2598 ·······························</span><span·class="p"·data-group-id="5992097078-14">{</span><span·class="ss">rport</span><span·class="p">,</span><span·class="mi">3868</span><span·class="p"·data-group-id="5992097078-14">}</span><span·class="p">,</span><span·class="w">2598 ·······························</span><span·class="p"·data-group-id="6162507640-14">{</span><span·class="ss">rport</span><span·class="p">,</span><span·class="mi">3868</span><span·class="p"·data-group-id="6162507640-14">}</span><span·class="p">,</span><span·class="w">
2599 ·······························</span><span·class="p"·data-group-id="5992097078-15">{</span><span·class="ss">reuseaddr</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="5992097078-15">}</span><span·class="p"·data-group-id="5992097078-9">]</span><span·class="p"·data-group-id="5992097078[·...·truncated·by·diffoscope;·len:·106,·SHA:·2b37eb0ff69c5c27cf15c1644cb9c422aa699c1722a7dd1c0180895d7e0f78c6·...·]-5">}</span><span·class="p">,</span><span·class="w">2599 ·······························</span><span·class="p"·data-group-id="6162507640-15">{</span><span·class="ss">reuseaddr</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6162507640-15">}</span><span·class="p"·data-group-id="6162507640-9">]</span><span·class="p"·data-group-id="6162507640[·...·truncated·by·diffoscope;·len:·106,·SHA:·66ece1f32df061b37fce58f9ff4a6345760da973801904f57a1fa7c0f4463587·...·]-5">}</span><span·class="p">,</span><span·class="w">
2600 ··</span><span·class="p"·data-group-id="5992097078-16">{</span><span·class="ss">watchdog</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-17">{</span><span·class="o">&lt;</span><span·class="mf">0.66</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt[·...·truncated·by·diffoscope;·len:·245,·SHA:·87b29c2d2fa87a03d24dd3899d24e0c90cb3d8b0fb349218679186deec365c8f·...·]-16">}</span><span·class="p">,</span><span·class="w">2600 ··</span><span·class="p"·data-group-id="6162507640-16">{</span><span·class="ss">watchdog</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-17">{</span><span·class="o">&lt;</span><span·class="mf">0.66</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt[·...·truncated·by·diffoscope;·len:·245,·SHA:·1287b0df35f1b759770447b921e1d1206f83ac182bd00755263eb3d49e05279e·...·]-16">}</span><span·class="p">,</span><span·class="w">
2601 ··</span><span·class="p"·data-group-id="5992097078-18">{</span><span·class="ss">peer</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-19">{</span><span·class="o">&lt;</span><span·class="mf">0.67</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</s[·...·truncated·by·diffoscope;·len:·189,·SHA:·f8a520a2c5f3455d2dc9316ef2e6edfa10a3d1d35a19bb7cb8786fd8b1023a37·...·]-18">}</span><span·class="p">,</span><span·class="w">2601 ··</span><span·class="p"·data-group-id="6162507640-18">{</span><span·class="ss">peer</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-19">{</span><span·class="o">&lt;</span><span·class="mf">0.67</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</s[·...·truncated·by·diffoscope;·len:·189,·SHA:·24ea72a7d26525025b13571ff4175593588f4dc4a0b810522abc79e1d554cdc6·...·]-18">}</span><span·class="p">,</span><span·class="w">
2602 ··</span><span·class="p"·data-group-id="5992097078-20">{</span><span·class="ss">apps</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-21">[</span><span·class="p"·data-group-id="5992097078-22">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">common<[·...·truncated·by·diffoscope;·len:·155,·SHA:·e4e46c295f298b9ba2a701a20348dd34425f34df2192a558cc09cfcfd733e33a·...·]-20">}</span><span·class="p">,</span><span·class="w">2602 ··</span><span·class="p"·data-group-id="6162507640-20">{</span><span·class="ss">apps</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-21">[</span><span·class="p"·data-group-id="6162507640-22">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">common<[·...·truncated·by·diffoscope;·len:·155,·SHA:·ce5890d72d34551b84c4178e5cd646e2ac7575908f14dfd888b84770b39eeb55·...·]-20">}</span><span·class="p">,</span><span·class="w">
2603 ··</span><span·class="p"·data-group-id="5992097078-23">{</span><span·class="ss">caps</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-24">[</span><span·class="p"·data-group-id="5992097078-25">{</span><span·class="ss">origin_host</span><span·class="p">,</span><span·class="p[·...·truncated·by·diffoscope;·len:·265,·SHA:·0ac126d98002d19f797d0e9d57f386fed26681b5c51346d6bfad853eaa94cf35·...·]-25">}</span><span·class="p">,</span><span·class="w">2603 ··</span><span·class="p"·data-group-id="6162507640-23">{</span><span·class="ss">caps</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-24">[</span><span·class="p"·data-group-id="6162507640-25">{</span><span·class="ss">origin_host</span><span·class="p">,</span><span·class="p[·...·truncated·by·diffoscope;·len:·265,·SHA:·3d355a4284c9a7363cd2f605bd782348fe895a032a78ad5f4cd5b1c517f10375·...·]-25">}</span><span·class="p">,</span><span·class="w">
2604 ·········</span><span·class="p"·data-group-id="5992097078-27">{</span><span·class="ss">origin_realm</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-28">{</span><span·class="s">&quot;example.com&quot;</span><span·class="p">,</span><span·class="s">&quot;example.com&quot;</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·dde483c3cde95a6abc1f6da85a45e613d8f85c81236116a9075534388bdf5d44·...·]-27">}</span><span·class="p">,</span><span·class="w">2604 ·········</span><span·class="p"·data-group-id="6162507640-27">{</span><span·class="ss">origin_realm</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-28">{</span><span·class="s">&quot;example.com&quot;</span><span·class="p">,</span><span·class="s">&quot;example.com&quot;</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·1f2f4e7dd95f03ecd420fbcab52f1a84c6ea82959983b206b668c702a523db9f·...·]-27">}</span><span·class="p">,</span><span·class="w">
2605 ·········</span><span·class="p"·data-group-id="5992097078-29">{</span><span·class="ss">host_ip_address</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-30">{</span><span·class="p"·data-group-id="5992097078-31">[</span><span·class="p"·data-group-id="5992097078-32">{</span><span·cl[·...·truncated·by·diffoscope;·len:·783,·SHA:·8e4052cf8220f1b9c81242c10d9ff6d54fb27bba448acdf5d181b014d711840c·...·]-29">}</span><span·class="p">,</span><span·class="w">2605 ·········</span><span·class="p"·data-group-id="6162507640-29">{</span><span·class="ss">host_ip_address</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-30">{</span><span·class="p"·data-group-id="6162507640-31">[</span><span·class="p"·data-group-id="6162507640-32">{</span><span·cl[·...·truncated·by·diffoscope;·len:·783,·SHA:·e3b7786827dae91b4491afd6d518c4cb82864e5e66a9e0e57b942217f649690a·...·]-29">}</span><span·class="p">,</span><span·class="w">
2606 ·········</span><span·class="p"·data-group-id="5992097078-35">{</span><span·class="ss">vendor_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-36">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">193</span><span·class="p"·data-group-id="5992097078-36">[·...·truncated·by·diffoscope;·len:·49,·SHA:·2cd321711927d9d5bc4309e8343fb1431873fa5944ab8d8860c6f358979a9d8b·...·]-35">}</span><span·class="p">,</span><span·class="w">2606 ·········</span><span·class="p"·data-group-id="6162507640-35">{</span><span·class="ss">vendor_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-36">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">193</span><span·class="p"·data-group-id="6162507640-36">[·...·truncated·by·diffoscope;·len:·49,·SHA:·c79fe47f1943eebc715824a946c36cf89be8ca9f63e7c1d6ef7d455d01508ed6·...·]-35">}</span><span·class="p">,</span><span·class="w">
2607 ·········</span><span·class="p"·data-group-id="5992097078-37">{</span><span·class="ss">product_name</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-38">{</span><span·class="s">&quot;Client&quot;</span><span·class="p">,</span><span·class="s">&quot;Server&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·82,·SHA:·4f9769e46b108f0bb3265383bbe6e60f84b8cde0c3afd5a165e10ad376a41648·...·]-37">}</span><span·class="p">,</span><span·class="w">2607 ·········</span><span·class="p"·data-group-id="6162507640-37">{</span><span·class="ss">product_name</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-38">{</span><span·class="s">&quot;Client&quot;</span><span·class="p">,</span><span·class="s">&quot;Server&quot;</span><span·class="[·...·truncated·by·diffoscope;·len:·82,·SHA:·31e2aefcabe137b36658cd6894d2a918e4a60823b39f9059824560fc5d2eb8c0·...·]-37">}</span><span·class="p">,</span><span·class="w">
2608 ·········</span><span·class="p"·data-group-id="5992097078-39">{</span><span·class="ss">origin_state_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-40">{</span><span·class="p"·data-group-id="5992097078-41">[</span><span·class="p"·data-group-id="5992097078-41">]</span><span·cl[·...·truncated·by·diffoscope;·len:·219,·SHA:·8a8590e9ba3c773bddf6508c04cdea9d89ba5e336ddcf4c14bc808181a08a794·...·]-39">}</span><span·class="p">,</span><span·class="w">2608 ·········</span><span·class="p"·data-group-id="6162507640-39">{</span><span·class="ss">origin_state_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-40">{</span><span·class="p"·data-group-id="6162507640-41">[</span><span·class="p"·data-group-id="6162507640-41">]</span><span·cl[·...·truncated·by·diffoscope;·len:·219,·SHA:·148015bb05bc37e8b8bed1ba3aec3c6b1ac68591537c1ff957e3df000ba2bfc4·...·]-39">}</span><span·class="p">,</span><span·class="w">
2609 ·········</span><span·class="p"·data-group-id="5992097078-43">{</span><span·class="ss">supported_vendor_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-44">{</span><span·class="p"·data-group-id="5992097078-45">[</span><span·class="p"·data-group-id="5992097078-45">]</span><spa[·...·truncated·by·diffoscope;·len:·223,·SHA:·95a31cd6fd059977b1b5caa9389efc2259dca7db1bcc12cebcda6d23a1e43f17·...·]-43">}</span><span·class="p">,</span><span·class="w">2609 ·········</span><span·class="p"·data-group-id="6162507640-43">{</span><span·class="ss">supported_vendor_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-44">{</span><span·class="p"·data-group-id="6162507640-45">[</span><span·class="p"·data-group-id="6162507640-45">]</span><spa[·...·truncated·by·diffoscope;·len:·223,·SHA:·57cb51c9170295f266cdb28af2b97982e065952a71a8f39acf8df108c2a31293·...·]-43">}</span><span·class="p">,</span><span·class="w">
2610 ·········</span><span·class="p"·data-group-id="5992097078-47">{</span><span·class="ss">auth_application_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-48">{</span><span·class="p"·data-group-id="5992097078-49">[</span><span·class="mi">0</span><span·class="p"·data-group-id="59[·...·truncated·by·diffoscope;·len:·273,·SHA:·43cccb13b45bc2bf115bb16e72695109c1565fcaeb91273e00f3cc56d686d396·...·]-47">}</span><span·class="p">,</span><span·class="w">2610 ·········</span><span·class="p"·data-group-id="6162507640-47">{</span><span·class="ss">auth_application_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-48">{</span><span·class="p"·data-group-id="6162507640-49">[</span><span·class="mi">0</span><span·class="p"·data-group-id="61[·...·truncated·by·diffoscope;·len:·273,·SHA:·28215744a2d195d08032d6eb1822c18d09a8cdd4a78ac2f5713300a037aa1f8f·...·]-47">}</span><span·class="p">,</span><span·class="w">
2611 ·········</span><span·class="p"·data-group-id="5992097078-51">{</span><span·class="ss">inband_security_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-52">{</span><span·class="p"·data-group-id="5992097078-53">[</span><span·class="p"·data-group-id="5992097078-53">]</span><span[·...·truncated·by·diffoscope;·len:·247,·SHA:·1d41c81dddc070d1549df8787bb7ebc1a396516e73929c8d992beaa0f6f35509·...·]-51">}</span><span·class="p">,</span><span·class="w">2611 ·········</span><span·class="p"·data-group-id="6162507640-51">{</span><span·class="ss">inband_security_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-52">{</span><span·class="p"·data-group-id="6162507640-53">[</span><span·class="p"·data-group-id="6162507640-53">]</span><span[·...·truncated·by·diffoscope;·len:·247,·SHA:·61c1e6ff18185b8f30beaabac4084e7725503fc76e47793a17bd9c3ee853be29·...·]-51">}</span><span·class="p">,</span><span·class="w">
2612 ·········</span><span·class="p"·data-group-id="5992097078-55">{</span><span·class="ss">acct_application_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-56">{</span><span·class="p"·data-group-id="5992097078-57">[</span><span·class="p"·data-group-id="5992097078-57">]</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-58">[</span><span·class="p"·data-group-id="5992097078-58">]</span><span·class="p"·data-group-id="5992097078-56">}</span><span·class="p"·data-group-id="5992097078-55">}</span><span·class="p">,</span><span·class="w"> 
2613 ·········</span><span·class="p"·data-group-id="5992097078-59">{</span><span·class="ss">vendor_specific_application_id</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-60">{</span><span·class="p"·data-group-id="5992097078-61">[</span><span·class="p"·data-group-id="5992097078-61">][·...·truncated·by·diffoscope;·len:·237,·SHA:·0bac5812d6f00821712e342a1eedbe3e7b5878a0e061f917e0ca972505d25fa2·...·]">}</span><span·class="p">,</span><span·class="w">2612 ·········</span><span·class="p"·data-group-id="6162507640-55">{</span><span·class="ss">acct_application_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-56">{</span><span·class="p"·data-group-id="6162507640-57">[</span><span·class="p"·data-group-id="6162507640-57">]</span><spa[·...·truncated·by·diffoscope;·len:·226,·SHA:·ccfa01bb355fceac75209f3b9a2c73d0c002251fd8737d900965236c0b1f8a78·...·]">}</span><span·class="p">,</span><span·class="w">
 2613 ·········</span><span·class="p"·data-group-id="6162507640-59">{</span><span·class="ss">vendor_specific_application_id</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-60">{</span><span·class="p"·data-group-id="6162507640-61">[</span><span·class="p"·data-group-id="6162507640-61">]</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-62">[</span><span·class="p"·data-group-id="6162507640-62">]</span><span·class="p"·data-group-id="6162507640-60">}</span><span·class="p"·data-group-id="6162507640-59">}</span><span·class="p">,</span><span·class="w">
2614 ·········</span><span·class="p"·data-group-id="5992097078-63">{</span><span·class="ss">firmware_revision</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-64">{</span><span·class="p"·data-group-id="5992097078-65">[</span><span·class="p"·data-group-id="5992097078-65">]</span><span·[·...·truncated·by·diffoscope;·len:·221,·SHA:·3789690afa4e07ff6c09d14eaae09ad551451b948018639cf942a2d7cfaa6c38·...·]-63">}</span><span·class="p">,</span><span·class="w">2614 ·········</span><span·class="p"·data-group-id="6162507640-63">{</span><span·class="ss">firmware_revision</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-64">{</span><span·class="p"·data-group-id="6162507640-65">[</span><span·class="p"·data-group-id="6162507640-65">]</span><span·[·...·truncated·by·diffoscope;·len:·221,·SHA:·660bcf2976aa7e2150c1d07e617afccc5f824cb0febed9a792792c00a26ebd3f·...·]-63">}</span><span·class="p">,</span><span·class="w">
2615 ·········</span><span·class="p"·data-group-id="5992097078-67">{</span><span·class="ss">avp</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-68">{</span><span·class="p"·data-group-id="5992097078-69">[</span><span·class="p"·data-group-id="5992097078-69">]</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·315,·SHA:·b843a2339b01a243306a2c2902f059c113fcbc32c5c94cb41ab5aafbf03108e5·...·]-23">}</span><span·class="p">,</span><span·class="w">2615 ·········</span><span·class="p"·data-group-id="6162507640-67">{</span><span·class="ss">avp</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-68">{</span><span·class="p"·data-group-id="6162507640-69">[</span><span·class="p"·data-group-id="6162507640-69">]</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·315,·SHA:·da0c6b6b21dfff53b77ba0172a17bfa656cba29ab140707bcb9a3381c05ce8d5·...·]-23">}</span><span·class="p">,</span><span·class="w">
2616 ··</span><span·class="p"·data-group-id="5992097078-71">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-72">[</span><span·class="p"·data-group-id="5992097078-73">{</span><span·class="ss">owner</span><span·class="p">,</span><span·class="o">&lt;[·...·truncated·by·diffoscope;·len:·152,·SHA:·56f075f002137a665dd0c63dfc1d98611e12681492d6ee9934750f969f62f61f·...·]-73">}</span><span·class="p">,</span><span·class="w">2616 ··</span><span·class="p"·data-group-id="6162507640-71">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-72">[</span><span·class="p"·data-group-id="6162507640-73">{</span><span·class="ss">owner</span><span·class="p">,</span><span·class="o">&lt;[·...·truncated·by·diffoscope;·len:·152,·SHA:·c08dbeeb6c70baf71460641dc8dcc16a2483bcb62563ae194a7e22e9cdd9a1e4·...·]-73">}</span><span·class="p">,</span><span·class="w">
2617 ·········</span><span·class="p"·data-group-id="5992097078-74">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">diameter_tcp</span><span·class="p"·data-group-id="5992097078-74">}</span><span·class="p">,</span><span·class="w">2617 ·········</span><span·class="p"·data-group-id="6162507640-74">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">diameter_tcp</span><span·class="p"·data-group-id="6162507640-74">}</span><span·class="p">,</span><span·class="w">
2618 ·········</span><span·class="p"·data-group-id="5992097078-75">{</span><span·class="ss">socket</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-76">{</span><span·class="p"·data-group-id="5992097078-77">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</[·...·truncated·by·diffoscope;·len:·305,·SHA:·1736dde847ab3ba0d3ffc76b2be866bbd939bfe52fd76cdf3fa990225275744f·...·]-75">}</span><span·class="p">,</span><span·class="w">2618 ·········</span><span·class="p"·data-group-id="6162507640-75">{</span><span·class="ss">socket</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-76">{</span><span·class="p"·data-group-id="6162507640-77">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</[·...·truncated·by·diffoscope;·len:·305,·SHA:·9a55e92a646ff537110fe186994cf2f3049b6ec1f32b5ea9b21a70c67f18ab16·...·]-75">}</span><span·class="p">,</span><span·class="w">
2619 ·········</span><span·class="p"·data-group-id="5992097078-78">{</span><span·class="ss">peer</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-79">{</span><span·class="p"·data-group-id="5992097078-80">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</sp[·...·truncated·by·diffoscope;·len:·302,·SHA:·e75871b7f3fe8fb8263d6cb356038416e6ead4b399bd0b6addb006fb7f381498·...·]-78">}</span><span·class="p">,</span><span·class="w">2619 ·········</span><span·class="p"·data-group-id="6162507640-78">{</span><span·class="ss">peer</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-79">{</span><span·class="p"·data-group-id="6162507640-80">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</sp[·...·truncated·by·diffoscope;·len:·302,·SHA:·d1a6e6a8b572114996a23c3505579b8a58cb265680df2293d2519cfa656efb8c·...·]-78">}</span><span·class="p">,</span><span·class="w">
2620 ·········</span><span·class="p"·data-group-id="5992097078-81">{</span><span·class="nb">statistics</span><span·class="p">,</span><span·class="p"·data-group-id="5992097078-82">[</span><span·class="p"·data-group-id="5992097078-83">{</span><span·class="ss">recv_oct</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·57,·SHA:·777ac65c7a43210376e4942329582c524961609905e6dbf3644b7d0a88844ba5·...·]-83">}</span><span·class="p">,</span><span·class="w">2620 ·········</span><span·class="p"·data-group-id="6162507640-81">{</span><span·class="nb">statistics</span><span·class="p">,</span><span·class="p"·data-group-id="6162507640-82">[</span><span·class="p"·data-group-id="6162507640-83">{</span><span·class="ss">recv_oct</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·57,·SHA:·b245d57bfb21570f82beb9e65f596c5b1209fd8d0c7e197f0aa03d1953ab17f8·...·]-83">}</span><span·class="p">,</span><span·class="w">
2621 ······················</span><span·class="p"·data-group-id="5992097078-84">{</span><span·class="ss">recv_cnt</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="5992097078-84">}</span><span·class="p">,</span><span·class="w">2621 ······················</span><span·class="p"·data-group-id="6162507640-84">{</span><span·class="ss">recv_cnt</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="6162507640-84">}</span><span·class="p">,</span><span·class="w">
2622 ······················</span><span·class="p"·data-group-id="5992097078-85">{</span><span·class="ss">recv_max</span><span·class="p">,</span><span·class="mi">148</span><span·class="p"·data-group-id="5992097078-85">}</span><span·class="p">,</span><span·class="w">2622 ······················</span><span·class="p"·data-group-id="6162507640-85">{</span><span·class="ss">recv_max</span><span·class="p">,</span><span·class="mi">148</span><span·class="p"·data-group-id="6162507640-85">}</span><span·class="p">,</span><span·class="w">
2623 ······················</span><span·class="p"·data-group-id="5992097078-86">{</span><span·class="ss">recv_avg</span><span·class="p">,</span><span·class="mi">109</span><span·class="p"·data-group-id="5992097078-86">}</span><span·class="p">,</span><span·class="w">2623 ······················</span><span·class="p"·data-group-id="6162507640-86">{</span><span·class="ss">recv_avg</span><span·class="p">,</span><span·class="mi">109</span><span·class="p"·data-group-id="6162507640-86">}</span><span·class="p">,</span><span·class="w">
2624 ······················</span><span·class="p"·data-group-id="5992097078-87">{</span><span·class="ss">recv_dvi</span><span·class="p">,</span><span·class="mi">19</span><span·class="p"·data-group-id="5992097078-87">}</span><span·class="p">,</span><span·class="w">2624 ······················</span><span·class="p"·data-group-id="6162507640-87">{</span><span·class="ss">recv_dvi</span><span·class="p">,</span><span·class="mi">19</span><span·class="p"·data-group-id="6162507640-87">}</span><span·class="p">,</span><span·class="w">
2625 ······················</span><span·class="p"·data-group-id="5992097078-88">{</span><span·class="ss">send_oct</span><span·class="p">,</span><span·class="mi">836</span><span·class="p"·data-group-id="5992097078-88">}</span><span·class="p">,</span><span·class="w">2625 ······················</span><span·class="p"·data-group-id="6162507640-88">{</span><span·class="ss">send_oct</span><span·class="p">,</span><span·class="mi">836</span><span·class="p"·data-group-id="6162507640-88">}</span><span·class="p">,</span><span·class="w">
2626 ······················</span><span·class="p"·data-group-id="5992097078-89">{</span><span·class="ss">send_cnt</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="5992097078-89">}</span><span·class="p">,</span><span·class="w">2626 ······················</span><span·class="p"·data-group-id="6162507640-89">{</span><span·class="ss">send_cnt</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="6162507640-89">}</span><span·class="p">,</span><span·class="w">
2627 ······················</span><span·class="p"·data-group-id="5992097078-90">{</span><span·class="ss">send_max</span><span·class="p">,</span><span·class="mi">184</span><span·class="p"·data-group-id="5992097078-90">}</span><span·class="p">,</span><span·class="w">2627 ······················</span><span·class="p"·data-group-id="6162507640-90">{</span><span·class="ss">send_max</span><span·class="p">,</span><span·class="mi">184</span><span·class="p"·data-group-id="6162507640-90">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 116434/202527 bytes (57.49%) of diff not shown.
7.56 KB
./usr/share/doc/erlang-doc/html/lib/diameter-2.4/doc/html/diameter_app.html
    
Offset 715, 20 lines modifiedOffset 715, 20 lines modified
715 ······</div>715 ······</div>
  
716 <p>Invoked·when·a·request·message·is·received·from·a·peer.·The·application·in·which716 <p>Invoked·when·a·request·message·is·received·from·a·peer.·The·application·in·which
717 the·callback·takes·place·(that·is,·the·callback·module·as·configured·with717 the·callback·takes·place·(that·is,·the·callback·module·as·configured·with
718 <a·href="diameter.html#start_service/2"><code·class="inline">diameter:start_service/2</code></a>)·is·determined·by·the·Application·Identifier·in·the718 <a·href="diameter.html#start_service/2"><code·class="inline">diameter:start_service/2</code></a>)·is·determined·by·the·Application·Identifier·in·the
719 header·of·the·incoming·request·message,·the·selected·module·being·the·one·whose719 header·of·the·incoming·request·message,·the·selected·module·being·the·one·whose
720 corresponding·dictionary·declares·itself·as·defining·either·the·application·in720 corresponding·dictionary·declares·itself·as·defining·either·the·application·in
721 question·or·the·Relay·application.</p><p>The·argument·<a·href="#t:packet/0">packet()</a>·has·the·following·signature.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">diameter_packet</span><span·class="p"·data-group-id="7475539921-1">{</span><span·class="ss">header</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">diameter_header</span><span·class="p"·data-group-id="7475539921-2">{</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·9cd39fb071e6f6e3f9a40307e7566da5a777000ee8f430523eec4e0b0371cdca·...·]-2">}</span><span·class="p">,</span><span·class="w">721 question·or·the·Relay·application.</p><p>The·argument·<a·href="#t:packet/0">packet()</a>·has·the·following·signature.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">diameter_packet</span><span·class="p"·data-group-id="8168666755-1">{</span><span·class="ss">header</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">diameter_header</span><span·class="p"·data-group-id="8168666755-2">{</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·55eef14531aace8c8872bfce42a8a40a9ec3d9e21ad6252fabbcfbf76a48caea·...·]-2">}</span><span·class="p">,</span><span·class="w">
722 ·················</span><span·class="ss">avps</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7475539921-3">[</span><span·class="o">#</span><span·class="ss">diameter_avp</span><span·class="p"·data-group-id="7475539921-4">{</span><span·class="p"·data-group-id="7475539921-4">}</span><span·class="p"·data-group-id="7475539921-3">]</span><span·class="p">,</span><span·class="w">722 ·················</span><span·class="ss">avps</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8168666755-3">[</span><span·class="o">#</span><span·class="ss">diameter_avp</span><span·class="p"·data-group-id="8168666755-4">{</span><span·class="p"·data-group-id="8168666755-4">}</span><span·class="p"·data-group-id="8168666755-3">]</span><span·class="p">,</span><span·class="w">
723 ·················</span><span·class="ss">msg</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record</span><span·class="p"·data-group-id="7475539921-5">(</span><span·class="p"·data-group-id="7475539921-5">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="w">723 ·················</span><span·class="ss">msg</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record</span><span·class="p"·data-group-id="8168666755-5">(</span><span·class="p"·data-group-id="8168666755-5">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="w">
724 ·················</span><span·class="ss">errors</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7475539921-6">[</span><span·class="n">Unsigned32</span><span·class="p"·data-group-id="7475539921-7">(</span><span·class="p"·data-group-id="7475539921-7">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·479,·SHA:·5d09eabbb78b3511b6285cf77f1673457cceadd54f14f26a8cee20ccb24f49c0·...·]-6">]</span><span·class="p">,</span><span·class="w">724 ·················</span><span·class="ss">errors</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8168666755-6">[</span><span·class="n">Unsigned32</span><span·class="p"·data-group-id="8168666755-7">(</span><span·class="p"·data-group-id="8168666755-7">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·479,·SHA:·e34b62e00cdd551e61a16a5a214f3ab32122ce227beace372781bad2c8148c72·...·]-6">]</span><span·class="p">,</span><span·class="w">
725 ·················</span><span·class="ss">bin</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="7475539921-11">(</span><span·class="p"·data-group-id="7475539921-11">)</span><span·class="p">,</span><span·class="w">725 ·················</span><span·class="ss">bin</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="8168666755-11">(</span><span·class="p"·data-group-id="8168666755-11">)</span><span·class="p">,</span><span·class="w">
726 ·················</span><span·class="ss">transport_data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="7475539921-12">(</span><span·class="p"·data-group-id="7475539921-12">)</span><span·class="p"·data-group-id="7475539921-1">}</span></code></pre><p>The·<code·class="inline">msg</code>·field·will·be·<code·class="inline">undefined</code>·in·case·the·request·has·been·received·in·the726 ·················</span><span·class="ss">transport_data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="8168666755-12">(</span><span·class="p"·data-group-id="8168666755-12">)</span><span·class="p"·data-group-id="8168666755-1">}</span></code></pre><p>The·<code·class="inline">msg</code>·field·will·be·<code·class="inline">undefined</code>·in·case·the·request·has·been·received·in·the
727 relay·application.·Otherwise·it·contains·the·record·representing·the·request·as727 relay·application.·Otherwise·it·contains·the·record·representing·the·request·as
728 outlined·in·<a·href="diameter_dict.html#MESSAGE_RECORDS">diameter_dict(4)</a>.</p><p>The·<code·class="inline">errors</code>·field·specifies·any·results·codes·identifying·errors·found·while728 outlined·in·<a·href="diameter_dict.html#MESSAGE_RECORDS">diameter_dict(4)</a>.</p><p>The·<code·class="inline">errors</code>·field·specifies·any·results·codes·identifying·errors·found·while
729 decoding·the·request.·This·is·used·to·set·Result-Code·and/or·Failed-AVP·in·a729 decoding·the·request.·This·is·used·to·set·Result-Code·and/or·Failed-AVP·in·a
730 returned·answer·unless·the·callback·returns·a·<code·class="inline">#diameter_packet{}</code>·whose730 returned·answer·unless·the·callback·returns·a·<code·class="inline">#diameter_packet{}</code>·whose
731 <code·class="inline">errors</code>·field·is·set·to·either·a·non-empty·list·of·its·own,·in·which·case·this731 <code·class="inline">errors</code>·field·is·set·to·either·a·non-empty·list·of·its·own,·in·which·case·this
732 list·is·used·instead,·or·the·atom·<code·class="inline">false</code>·to·disable·any·setting·of·Result-Code732 list·is·used·instead,·or·the·atom·<code·class="inline">false</code>·to·disable·any·setting·of·Result-Code
733 and·Failed-AVP.·Note·that·the·errors·detected·by·diameter·are·of·the·3xxx·and733 and·Failed-AVP.·Note·that·the·errors·detected·by·diameter·are·of·the·3xxx·and
2.35 KB
./usr/share/doc/erlang-doc/html/lib/diameter-2.4/doc/html/diameter_codec.html
    
Offset 135, 15 lines modifiedOffset 135, 15 lines modified
135 encode/decode.</p><blockquote><h4·class="warning">Warning</h4><p>The·diameter·user·does·not·need·to·call·functions·here·explicitly·when·sending135 encode/decode.</p><blockquote><h4·class="warning">Warning</h4><p>The·diameter·user·does·not·need·to·call·functions·here·explicitly·when·sending
136 and·receiving·messages·using·<a·href="diameter.html#call/4"><code·class="inline">diameter:call/4</code></a>·and·the·callback·interface136 and·receiving·messages·using·<a·href="diameter.html#call/4"><code·class="inline">diameter:call/4</code></a>·and·the·callback·interface
137 documented·in·<a·href="diameter_app.html"><code·class="inline">diameter_app</code></a>:·diameter·itself·provides·encode/decode·as·a137 documented·in·<a·href="diameter_app.html"><code·class="inline">diameter_app</code></a>:·diameter·itself·provides·encode/decode·as·a
138 consequence·of·configuration·passed·to·<a·href="diameter.html#start_service/2"><code·class="inline">diameter:start_service/2</code></a>,·and·the138 consequence·of·configuration·passed·to·<a·href="diameter.html#start_service/2"><code·class="inline">diameter:start_service/2</code></a>,·and·the
139 results·may·differ·from·those·returned·by·the·functions·documented·here,139 results·may·differ·from·those·returned·by·the·functions·documented·here,
140 depending·on·configuration.</p></blockquote><p>The·<a·href="diameter_codec.html#header">header()</a>·and140 depending·on·configuration.</p></blockquote><p>The·<a·href="diameter_codec.html#header">header()</a>·and
141 <a·href="diameter_codec.html#packet">packet()</a>·records·below·are·defined·in·diameter.hrl,141 <a·href="diameter_codec.html#packet">packet()</a>·records·below·are·defined·in·diameter.hrl,
142 which·can·be·included·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="1115062700-1">(</span><span·class="s">&quot;diameter/include/diameter.hrl&quot;</span><span·class="p"·data-group-id="1115062700-1">)</span><span·class="p">.</span></code></pre><p>Application-specific·records·are·defined·in·the·hrl·files·resulting·from142 which·can·be·included·as·follows.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2513817463-1">(</span><span·class="s">&quot;diameter/include/diameter.hrl&quot;</span><span·class="p"·data-group-id="2513817463-1">)</span><span·class="p">.</span></code></pre><p>Application-specific·records·are·defined·in·the·hrl·files·resulting·from
143 dictionary·file·compilation.</p><h2·id="module-data-types"·class="section-heading">143 dictionary·file·compilation.</p><h2·id="module-data-types"·class="section-heading">
144 ··<a·href="#module-data-types"·class="hover-link">144 ··<a·href="#module-data-types"·class="hover-link">
145 ····<i·class="ri-link-m"·aria-hidden="true"></i>145 ····<i·class="ri-link-m"·aria-hidden="true"></i>
146 ··</a>146 ··</a>
147 ··<span·class="text">DATA·TYPES</span>147 ··<span·class="text">DATA·TYPES</span>
148 </h2>148 </h2>
149 <ul><li><p><strong><code·class="inline"·id="integers">uint8() ·=·0..255</code></strong></p></li><li><p><strong><code·class="inline">uint24()·=·0..16777215</code></strong></p></li><li><p><strong><code·class="inline">uint32()·=·0..4294967295</code></strong>·-·8-bit,·24-bit·and·32-bit·integers·occurring149 <ul><li><p><strong><code·class="inline"·id="integers">uint8() ·=·0..255</code></strong></p></li><li><p><strong><code·class="inline">uint24()·=·0..16777215</code></strong></p></li><li><p><strong><code·class="inline">uint32()·=·0..4294967295</code></strong>·-·8-bit,·24-bit·and·32-bit·integers·occurring
17.5 KB
./usr/share/doc/erlang-doc/html/lib/diameter-2.4/doc/html/diameter_dict.html
    
Offset 305, 37 lines modifiedOffset 305, 37 lines modified
305 (&quot;Derived·AVP·Data·Formats&quot;)·of·RFC·6733·are·encoded·as·values·of·the·types305 (&quot;Derived·AVP·Data·Formats&quot;)·of·RFC·6733·are·encoded·as·values·of·the·types
306 defined·here.·Values·are·passed·to·<a·href="diameter.html#call/4"><code·class="inline">diameter:call/4</code></a>·in·a·request·record·when306 defined·here.·Values·are·passed·to·<a·href="diameter.html#call/4"><code·class="inline">diameter:call/4</code></a>·in·a·request·record·when
307 sending·a·request,·returned·in·a·resulting·answer·record·and·passed·to·a307 sending·a·request,·returned·in·a·resulting·answer·record·and·passed·to·a
308 <a·href="diameter_app.html#c:handle_request/3">handle_request/3</a>·callback·upon·reception·of308 <a·href="diameter_app.html#c:handle_request/3">handle_request/3</a>·callback·upon·reception·of
309 an·incoming·request.</p><p>In·cases·in·which·there·is·a·choice·between·string()·and·binary()·types·for309 an·incoming·request.</p><p>In·cases·in·which·there·is·a·choice·between·string()·and·binary()·types·for
310 OctetString()·and·derived·types,·the·representation·is·determined·by·the·value310 OctetString()·and·derived·types,·the·representation·is·determined·by·the·value
311 of·<a·href="diameter.html#service_opt">diameter:service_opt()</a>311 of·<a·href="diameter.html#service_opt">diameter:service_opt()</a>
312 <a·href="diameter.html#string_decode">string_decode</a>.</p><p><em>Basic·AVP·Data·Formats</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OctetString</span><span·class="p"·data-group-id="9009701968-1">(</span><span·class="p"·data-group-id="9009701968-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="9009701968-2">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·223,·SHA:·8354f673746e5b62e7012dbcebb131b4e3c9654ffc694ee4a67c448065e1b94c·...·]-3">)</span><span·class="w">312 <a·href="diameter.html#string_decode">string_decode</a>.</p><p><em>Basic·AVP·Data·Formats</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OctetString</span><span·class="p"·data-group-id="0154550473-1">(</span><span·class="p"·data-group-id="0154550473-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="0154550473-2">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·223,·SHA:·47acac11d74db637457bdcf4460772f269a12544cc2c99825db01240f4d18af8·...·]-3">)</span><span·class="w">
313 </span><span·class="n">Integer32</span><span·class="p"·data-group-id="9009701968-4">(</span><span·class="p"·data-group-id="9009701968-4">)</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">2147483647</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">2147483647</span><span·class="w">313 </span><span·class="n">Integer32</span><span·class="p"·data-group-id="0154550473-4">(</span><span·class="p"·data-group-id="0154550473-4">)</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">2147483647</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">2147483647</span><span·class="w">
314 </span><span·class="n">Integer64</span><span·class="p"·data-group-id="9009701968-5">(</span><span·class="p"·data-group-id="9009701968-5">)</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">9223372036854775807</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">9223372036854775807</span><span·class="w">314 </span><span·class="n">Integer64</span><span·class="p"·data-group-id="0154550473-5">(</span><span·class="p"·data-group-id="0154550473-5">)</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">9223372036854775807</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">9223372036854775807</span><span·class="w">
315 </span><span·class="n">Unsigned32</span><span·class="p"·data-group-id="9009701968-6">(</span><span·class="p"·data-group-id="9009701968-6">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">4294967295</span><span·class="w">315 </span><span·class="n">Unsigned32</span><span·class="p"·data-group-id="0154550473-6">(</span><span·class="p"·data-group-id="0154550473-6">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">4294967295</span><span·class="w">
316 </span><span·class="n">Unsigned64</span><span·class="p"·data-group-id="9009701968-7">(</span><span·class="p"·data-group-id="9009701968-7">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">18446744073709551615</span><span·class="w">316 </span><span·class="n">Unsigned64</span><span·class="p"·data-group-id="0154550473-7">(</span><span·class="p"·data-group-id="0154550473-7">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">18446744073709551615</span><span·class="w">
317 </span><span·class="n">Float32</span><span·class="p"·data-group-id="9009701968-8">(</span><span·class="p"·data-group-id="9009701968-8">)</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;-infinity&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w[·...·truncated·by·diffoscope;·len:·133,·SHA:·e3c73f6771b7b6b85831933901245a3fc58e96f541660ce93c3255b697b404cc·...·]-9">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="w">317 </span><span·class="n">Float32</span><span·class="p"·data-group-id="0154550473-8">(</span><span·class="p"·data-group-id="0154550473-8">)</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;-infinity&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w[·...·truncated·by·diffoscope;·len:·133,·SHA:·3d0dc86392eaea9fbb4eca347f369bdfa1df05f421701b9d27ec963b3b5bc42f·...·]-9">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="w">
318 </span><span·class="n">Float64</span><span·class="p"·data-group-id="9009701968-10">(</span><span·class="p"·data-group-id="9009701968-10">)</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;-infinity&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class=[·...·truncated·by·diffoscope;·len:·136,·SHA:·346595f677037b117849b6376091856bd206c6905ab545692c32c4e1938e65fe·...·]-11">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="w">318 </span><span·class="n">Float64</span><span·class="p"·data-group-id="0154550473-10">(</span><span·class="p"·data-group-id="0154550473-10">)</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;-infinity&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class=[·...·truncated·by·diffoscope;·len:·136,·SHA:·12d0cd69f592179e1390b2ba522d7f897f7d6c5f56fa025341cdcc69ed65d1ad·...·]-11">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="w">
319 </span><span·class="n">Grouped</span><span·class="p"·data-group-id="9009701968-12">(</span><span·class="p"·data-group-id="9009701968-12">)</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record</span><span·class="p"·data-group-id="9009701968-13">(</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·58e54366c5d866af0b649fb24f31fa345c39b416d19ef6fb3373df7a9b0de5d9·...·]-13">)</span></code></pre><p>On·encode,·an·OctetString()·can·be·specified·as·an·iolist(),·excessively·large319 </span><span·class="n">Grouped</span><span·class="p"·data-group-id="0154550473-12">(</span><span·class="p"·data-group-id="0154550473-12">)</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record</span><span·class="p"·data-group-id="0154550473-13">(</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·7b0f3dbcd450d18fa81b227923f584ab4c9527f8a0c0b3beb142464bf7ed89c1·...·]-13">)</span></code></pre><p>On·encode,·an·OctetString()·can·be·specified·as·an·iolist(),·excessively·large
320 floats·(in·absolute·value)·are·equivalent·to·<code·class="inline">infinity</code>·or·<code·class="inline">'-infinity'</code>·and320 floats·(in·absolute·value)·are·equivalent·to·<code·class="inline">infinity</code>·or·<code·class="inline">'-infinity'</code>·and
321 excessively·large·integers·result·in·encode·failure.·The·records·for·grouped321 excessively·large·integers·result·in·encode·failure.·The·records·for·grouped
322 AVPs·are·as·discussed·in·the·previous·section.</p><p><em>Derived·AVP·Data·Formats</em></p><p><a·href=""·id="Address"></a></p><pre><code·class="text">Address()·=·OctetString()322 AVPs·are·as·discussed·in·the·previous·section.</p><p><em>Derived·AVP·Data·Formats</em></p><p><a·href=""·id="Address"></a></p><pre><code·class="text">Address()·=·OctetString()
323 ··········|·tuple()</code></pre><p>On·encode,·an·OctetString()·IPv4·address·is·parsed·in·the·usual·x.x.x.x·format323 ··········|·tuple()</code></pre><p>On·encode,·an·OctetString()·IPv4·address·is·parsed·in·the·usual·x.x.x.x·format
324 while·an·IPv6·address·is·parsed·in·any·of·the·formats·specified·by·section·2.2324 while·an·IPv6·address·is·parsed·in·any·of·the·formats·specified·by·section·2.2
325 of·RFC·2373,·&quot;Text·Representation·of·Addresses&quot;.·An·IPv4·tuple()·has·length·4325 of·RFC·2373,·&quot;Text·Representation·of·Addresses&quot;.·An·IPv4·tuple()·has·length·4
326 and·contains·values·of·type·0..255.·An·IPv6·tuple()·has·length·8·and·contains326 and·contains·values·of·type·0..255.·An·IPv6·tuple()·has·length·8·and·contains
327 values·of·type·0..65535.·The·tuple·representation·is·used·on·decode.</p><p><a·href=""·id="Time"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Time</span><span·class="p"·data-group-id="8552945589-1">(</span><span·class="p"·data-group-id="8552945589-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8552945589-2">{</span><span·class="nf">date</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·301,·SHA:·5836a86ed60f214df2e79b77c9679c7bdf36f917365982f0f5b4d61bfe0eacf7·...·]-2">}</span><span·class="w">327 values·of·type·0..65535.·The·tuple·representation·is·used·on·decode.</p><p><a·href=""·id="Time"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Time</span><span·class="p"·data-group-id="9966613578-1">(</span><span·class="p"·data-group-id="9966613578-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9966613578-2">{</span><span·class="nf">date</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·301,·SHA:·422735e94dd685168855a98bee038e7a7d35850cb3733ab83e579b7a21462a7b·...·]-2">}</span><span·class="w">
  
328 </span><span·class="ss">where</span><span·class="w">328 </span><span·class="ss">where</span><span·class="w">
  
329 ··</span><span·class="nf">date</span><span·class="p"·data-group-id="8552945589-5">(</span><span·class="p"·data-group-id="8552945589-5">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8552945589-6">{</span><span·class="n">Year</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·162,·SHA:·8d3b2c79bbcfa4811ab9bd150c1ed61a46bbed951c21d7897b85fc30c3f9412b·...·]-6">}</span><span·class="w">329 ··</span><span·class="nf">date</span><span·class="p"·data-group-id="9966613578-5">(</span><span·class="p"·data-group-id="9966613578-5">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9966613578-6">{</span><span·class="n">Year</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·162,·SHA:·a1f1064f6c4f85f23e9c4eecc02f7ff05b4b5172f5e4f7c393918aaa192d1442·...·]-6">}</span><span·class="w">
330 ··</span><span·class="nf">time</span><span·class="p"·data-group-id="8552945589-7">(</span><span·class="p"·data-group-id="8552945589-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8552945589-8">{</span><span·class="n">Hour</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·166,·SHA:·d6c559541b74856cccd4d54ae69262621a037ce97c9d5b12610c4811463ff94a·...·]-8">}</span><span·class="w">330 ··</span><span·class="nf">time</span><span·class="p"·data-group-id="9966613578-7">(</span><span·class="p"·data-group-id="9966613578-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9966613578-8">{</span><span·class="n">Hour</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·166,·SHA:·8124fb04c9348dcb9fbc177a742ab1a5bdbcb93fdff8e8919821c710632c0ffd·...·]-8">}</span><span·class="w">
  
331 ··</span><span·class="n">Year</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8552945589-9">(</span><span·class="p"·data-group-id="8552945589-9">)</span><span·class="w">331 ··</span><span·class="n">Year</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="9966613578-9">(</span><span·class="p"·data-group-id="9966613578-9">)</span><span·class="w">
332 ··</span><span·class="n">Month</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">12</span><span·class="w">332 ··</span><span·class="n">Month</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">12</span><span·class="w">
333 ··</span><span·class="n">Day</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">31</span><span·class="w">333 ··</span><span·class="n">Day</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">31</span><span·class="w">
334 ··</span><span·class="n">Hour</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">23</span><span·class="w">334 ··</span><span·class="n">Hour</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">23</span><span·class="w">
335 ··</span><span·class="n">Minute</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">59</span><span·class="w">335 ··</span><span·class="n">Minute</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">59</span><span·class="w">
336 ··</span><span·class="n">Second</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">59</span></code></pre><p>Additionally,·values·that·can·be·encoded·are·limited·by·way·of·their·encoding·as336 ··</span><span·class="n">Second</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">59</span></code></pre><p>Additionally,·values·that·can·be·encoded·are·limited·by·way·of·their·encoding·as
337 four·octets·as·required·by·RFC·6733·with·the·required·extension·from·RFC·2030.337 four·octets·as·required·by·RFC·6733·with·the·required·extension·from·RFC·2030.
338 In·particular,·only·values·between·<code·class="inline">{{1968,1,20},{3,14,8}}</code>·and338 In·particular,·only·values·between·<code·class="inline">{{1968,1,20},{3,14,8}}</code>·and
Offset 355, 16 lines modifiedOffset 355, 16 lines modified
355 ··FQDN·=·OctetString()355 ··FQDN·=·OctetString()
356 ··Port·=·integer()356 ··Port·=·integer()
357 ··Transport·=·sctp·|·tcp357 ··Transport·=·sctp·|·tcp
358 ··Protocol··=·diameter·|·radius·|·'tacacs+'</code></pre><p>On·encode,·fields·port,·transport·and·protocol·default·to·3868,·sctp·and358 ··Protocol··=·diameter·|·radius·|·'tacacs+'</code></pre><p>On·encode,·fields·port,·transport·and·protocol·default·to·3868,·sctp·and
359 diameter·respectively.·The·grammar·of·an·OctetString-valued·DiameterURI()·is·as359 diameter·respectively.·The·grammar·of·an·OctetString-valued·DiameterURI()·is·as
360 specified·in·section·4.3·of·RFC·6733.·The·record·representation·is·used·on360 specified·in·section·4.3·of·RFC·6733.·The·record·representation·is·used·on
361 decode.</p><p><a·href=""·id="Enumerated"></a></p><pre><code·class="text">Enumerated()·=·Integer32()</code></pre><p>On·encode,·values·can·be·specified·using·the·macros·defined·in·a·dictionary's361 decode.</p><p><a·href=""·id="Enumerated"></a></p><pre><code·class="text">Enumerated()·=·Integer32()</code></pre><p>On·encode,·values·can·be·specified·using·the·macros·defined·in·a·dictionary's
362 hrl·file.</p><p><a·href=""·id="IPFilterRule"></a>·<a·href=""·id="QoSFilterRule"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">IPFilterRule</span><span·class="p"·data-group-id="8015165539-1">(</span><span·class="p"·data-group-id="8015165539-1">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OctetString</span><span·class="p"·data-group-id="8015165539-2">(</span><span·class="p"·data-group-id="8015165539-2">)</span><span·class="w"> 
363 </span><span·class="n">QoSFilterRule</span><span·class="p"·data-group-id="8015165539-3">(</span><span·class="p"·data-group-id="8015165539-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OctetString</span><[·...·truncated·by·diffoscope;·len:·224,·SHA:·3ff3b55a3dfff25dad9de4973a7e4843e9ac92edf195b3c8c697bb2e3835e055·...·]">362 hrl·file.</p><p><a·href=""·id="IPFilterRule"></a>·<a·href=""·id="QoSFilterRule"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">IPFilterRule</span><span·class="p"·data-group-id="1999489555-1">(</span><span·class="p"·data-group-id="1[·...·truncated·by·diffoscope;·len:·248,·SHA:·dc493339af38db86488738712634c37d7196e241a515334b81467af569be476c·...·]">
 363 </span><span·class="n">QoSFilterRule</span><span·class="p"·data-group-id="1999489555-3">(</span><span·class="p"·data-group-id="1999489555-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OctetString</span><span·class="p"·data-group-id="1999489555-4">(</span><span·class="p"·data-group-id="1999489555-4">)</span></code></pre><p>Values·of·these·types·are·not·currently·parsed·by·diameter.</p><h2·id="see-also"·class="section-heading">
364 ··<a·href="#see-also"·class="hover-link">364 ··<a·href="#see-also"·class="hover-link">
365 ····<i·class="ri-link-m"·aria-hidden="true"></i>365 ····<i·class="ri-link-m"·aria-hidden="true"></i>
366 ··</a>366 ··</a>
367 ··<span·class="text">SEE·ALSO</span>367 ··<span·class="text">SEE·ALSO</span>
368 </h2>368 </h2>
369 <p><a·href="diameterc_cmd.html">diameterc(1)</a>,·<a·href="diameter.html"><code·class="inline">diameter</code></a>,·<a·href="diameter_app.html"><code·class="inline">diameter_app</code></a>,369 <p><a·href="diameterc_cmd.html">diameterc(1)</a>,·<a·href="diameter.html"><code·class="inline">diameter</code></a>,·<a·href="diameter_app.html"><code·class="inline">diameter_app</code></a>,
370 <a·href="diameter_codec.html"><code·class="inline">diameter_codec</code></a>,·<a·href="diameter_make.html"><code·class="inline">diameter_make</code></a></p>370 <a·href="diameter_codec.html"><code·class="inline">diameter_codec</code></a>,·<a·href="diameter_make.html"><code·class="inline">diameter_make</code></a></p>
651 B
./usr/share/doc/erlang-doc/html/lib/edoc-1.3.1/doc/html/.build
    
Offset 18, 15 lines modifiedOffset 18, 15 lines modified
18 dist/lato-latin-300-normal-YUMVEFOL.woff218 dist/lato-latin-300-normal-YUMVEFOL.woff2
19 dist/lato-latin-400-normal-W7754I4D.woff219 dist/lato-latin-400-normal-W7754I4D.woff2
20 dist/lato-latin-700-normal-2XVSBPG4.woff220 dist/lato-latin-700-normal-2XVSBPG4.woff2
21 dist/lato-latin-ext-300-normal-VPGGJKJL.woff221 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
22 dist/lato-latin-ext-400-normal-N27NCBWW.woff222 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
23 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff223 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
24 dist/remixicon-NKANDIL5.woff224 dist/remixicon-NKANDIL5.woff2
25 dist/search_data-EEF082FF.js25 dist/search_data-4C4A2C52.js
26 dist/sidebar_items-8E345266.js26 dist/sidebar_items-8E345266.js
27 doc_storage.html27 doc_storage.html
28 edoc.html28 edoc.html
29 edoc_cmd.html29 edoc_cmd.html
30 edoc_doclet.html30 edoc_doclet.html
31 edoc_doclet_chunks.html31 edoc_doclet_chunks.html
32 edoc_doclet_markdown.html32 edoc_doclet_markdown.html
4.44 KB
./usr/share/doc/erlang-doc/html/lib/edoc-1.3.1/doc/html/edoc_doclet_markdown.html
    
Offset 124, 16 lines modifiedOffset 124, 16 lines modified
124 ····<span·translate="no">edoc_doclet_markdown</span>·124 ····<span·translate="no">edoc_doclet_markdown</span>·
125 ····<small·class="app-vsn"·translate="no">(edoc·v1.3.1)</small>125 ····<small·class="app-vsn"·translate="no">(edoc·v1.3.1)</small>
  
126 ··</h1>126 ··</h1>
  
  
127 ····<section·id="moduledoc">127 ····<section·id="moduledoc">
128 <p>Doclet·converting·an·edoc·application·to·use·EEP-59·and·markdown.</p><p>This·doclet·has·to·be·used·together·with·<a·href="edoc_layout_chunks.html"><code>edoc_layout_chunks</code></a>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">edoc</span><span·class="p">:</span><span·class="nf">application</span><span·class="p"·data-group-id="3382823502-1">(</span><span·class="ss">example</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3382823502-2">[</span><span·class="p"·data-group-id="3382823502-3">{</span><span·class="ss">preprocess</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="3382823502-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3382823502-4">{</span><span·class="ss">doclet</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">edoc_doclet_markdown</span><span·class="p"·data-group-id="3382823502-4">}</span><span·class="p">,</span><span·class="w"> 
129 ·······</span><span·class="p"·data-group-id="3382823502-5">{</span><span·class="ss">layout</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">edoc_layout_chunks</span><span·class="p"·data-group-id="3382823502-5">}</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·603,·SHA:·6b2647f7e0cd1266b5b22f35005bc043fbc6eefb98ef11cd475b872ca575477e·...·]>128 <p>Doclet·converting·an·edoc·application·to·use·EEP-59·and·markdown.</p><p>This·doclet·has·to·be·used·together·with·<a·href="edoc_layout_chunks.html"><code>edoc_layout_chunks</code></a>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><sp[·...·truncated·by·diffoscope;·len:·900,·SHA:·1d9a1da7d22055289c736674bdc70e813cd9e63c6f4b51f6c14c991f42c44938·...·]>
 129 ·······</span><span·class="p"·data-group-id="7042513992-5">{</span><span·class="ss">layout</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">edoc_layout_chunks</span><span·class="p"·data-group-id="7042513992-5">}</span><span·class="p"·data-group-id="7042513992-2">]</span><span·class="p"·data-group-id="7042513992-1">)</span><span·class="p">.</span></code></pre><p>It·will·convert·the·overview·to·markdown·and·any·module·documentation·to·use·<code>-doc</code>·attributes·and·markdown.·Any·XHTML·tags·in·the·edoc·documentation·that·are·not·part·of·the·tags·supported·by·<a·href="doc_storage.html#erlang-documentation-format">Erlang·Documentation·Format</a>·will·be·added·as·HTML·tags·in·the·Markdown.</p><p>It·does·not·delete·the·old·edoc·documentation.</p><p><em>See·also:·</em><a·href="edoc_layout_chunks.html">edoc_layout_chunks</a>.</p>
130 ····</section>130 ····</section>
  
131 </div>131 </div>
  
132 ··<section·id="summary"·class="details-list">132 ··<section·id="summary"·class="details-list">
133 ····<h1·class="section-heading">133 ····<h1·class="section-heading">
134 ······<a·class="hover-link"·href="#summary">134 ······<a·class="hover-link"·href="#summary">
626 B
./usr/share/doc/erlang-doc/html/lib/edoc-1.3.1/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-EEF082FF.js"></script>124 <script·src="dist/search_data-4C4A2C52.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
59.7 KB
./usr/share/doc/erlang-doc/html/lib/eldap-1.2.13/doc/html/eldap.epub
1.92 KB
zipinfo {}
    
Offset 1, 13 lines modifiedOffset 1, 13 lines modified
1 Zip·file·size:·33617·bytes,·number·of·entries:·111 Zip·file·size:·33619·bytes,·number·of·entries:·11
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:21·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······716·b-·defN·24-Oct-11·20:21·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······716·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····18377·b-·defN·24-Oct-11·20:21·OEBPS/notes.xhtml4 ?rw-r--r--··2.0·unx····18377·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
5 ?rw-r--r--··2.0·unx······936·b-·defN·24-Oct-11·20:21·OEBPS/nav.xhtml5 ?rw-r--r--··2.0·unx······936·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
6 ?rw-r--r--··2.0·unx····93097·b-·defN·24-Oct-11·20:21·OEBPS/eldap.xhtml6 ?rw-r--r--··2.0·unx····93097·b-·defN·24-Oct-11·20:59·OEBPS/eldap.xhtml
7 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-erlang-2EWSTWER.css7 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
8 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-CB7BJMUW.js8 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
9 ?rw-r--r--··2.0·unx·····1323·b-·defN·24-Oct-11·20:21·OEBPS/content.opf9 ?rw-r--r--··2.0·unx·····1323·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
10 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:21·OEBPS/assets/logo.png10 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
11 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:21·META-INF/container.xml11 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
12 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:21·META-INF/com.apple.ibooks.display-options.xml12 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
13 11·files,·137617·bytes·uncompressed,·32277·bytes·compressed:··76.5%13 11·files,·137617·bytes·uncompressed,·32279·bytes·compressed:··76.5%
27.1 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
29.3 KB
OEBPS/eldap.xhtml
Max HTML report size reached
1.19 KB
OEBPS/content.opf
1.15 KB
OEBPS/content.opf
Max HTML report size reached
29.4 KB
./usr/share/doc/erlang-doc/html/lib/eldap-1.2.13/doc/html/eldap.html
    
Offset 973, 21 lines modifiedOffset 973, 21 lines modified
973 ·················Dn·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),973 ·················Dn·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
974 ·················Attributes·::·[<a·href="#t:attribute/0">attribute</a>()],974 ·················Attributes·::·[<a·href="#t:attribute/0">attribute</a>()],
975 ·················Refs·::·{referral,·<a·href="#t:referrals/0">referrals</a>()},975 ·················Refs·::·{referral,·<a·href="#t:referrals/0">referrals</a>()},
976 ·················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>976 ·················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
977 ······</div>977 ······</div>
  
978 <p>Add·an·entry.·The·entry·must·not·exist.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nf">add</span><span·class="p"·data-group-id="9893936487-1">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">978 <p>Add·an·entry.·The·entry·must·not·exist.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nf">add</span><span·class="p"·data-group-id="6760378572-1">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">
979 ······</span><span·class="s">&quot;cn=Bill·Valentine,·ou=people,·o=Example·Org,·dc=example,·dc=com&quot;</span><span·class="p">,</span><span·class="w">979 ······</span><span·class="s">&quot;cn=Bill·Valentine,·ou=people,·o=Example·Org,·dc=example,·dc=com&quot;</span><span·class="p">,</span><span·class="w">
980 ·······</span><span·class="p"·data-group-id="9893936487-2">[</span><span·class="p"·data-group-id="9893936487-3">{</span><span·class="s">&quot;objectclass&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9893936487-4">[</span><span·class="s">&quot;person&quot;[·...·truncated·by·diffoscope;·len:·101,·SHA:·c1b777a3a6a86cde78a3c3ad9b35d66299848764ef12b73fd1509d53881c44fb·...·]-3">}</span><span·class="p">,</span><span·class="w">980 ·······</span><span·class="p"·data-group-id="6760378572-2">[</span><span·class="p"·data-group-id="6760378572-3">{</span><span·class="s">&quot;objectclass&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6760378572-4">[</span><span·class="s">&quot;person&quot;[·...·truncated·by·diffoscope;·len:·101,·SHA:·ba3f1e215b933d6efb34f653eb8bee303a95b4fb7b98fae64bd3bef4df17d692·...·]-3">}</span><span·class="p">,</span><span·class="w">
981 ········</span><span·class="p"·data-group-id="9893936487-5">{</span><span·class="s">&quot;cn&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9893936487-6">[</span><span·class="s">&quot;Bill·Valentine&quot;</span><span·class="p"·data-group-id="9893936487-6">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·a74a001ba5916e2b9251be2f4045ccf36912cc47c6da60ae417de2c89036315e·...·]-5">}</span><span·class="p">,</span><span·class="w">981 ········</span><span·class="p"·data-group-id="6760378572-5">{</span><span·class="s">&quot;cn&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6760378572-6">[</span><span·class="s">&quot;Bill·Valentine&quot;</span><span·class="p"·data-group-id="6760378572-6">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·fd396d1eb6bc97ff1d73751487385b0a27f1995ad952e75c150b418bd3f29cbd·...·]-5">}</span><span·class="p">,</span><span·class="w">
982 ········</span><span·class="p"·data-group-id="9893936487-7">{</span><span·class="s">&quot;sn&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9893936487-8">[</span><span·class="s">&quot;Valentine&quot;</span><span·class="p"·data-group-id="9893936487-8">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·7fc715b3d72631cd4f7f4232762f2a9dbfa3543da6ad9d7ad2158784e5c33345·...·]-7">}</span><span·class="p">,</span><span·class="w">982 ········</span><span·class="p"·data-group-id="6760378572-7">{</span><span·class="s">&quot;sn&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6760378572-8">[</span><span·class="s">&quot;Valentine&quot;</span><span·class="p"·data-group-id="6760378572-8">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·a62a8afb90255f6e7d4646b598573fc42c39929b3749d57103e13e1fc49f1b35·...·]-7">}</span><span·class="p">,</span><span·class="w">
983 ········</span><span·class="p"·data-group-id="9893936487-9">{</span><span·class="s">&quot;telephoneNumber&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9893936487-10">[</span><span·class="s">&quot;545·555·00&quot;</span><span·class="p"·data-group-id="989393[·...·truncated·by·diffoscope;·len:·111,·SHA:·2bd019c03ff654a9b61425e2f68b4bd698f0020953262cadd614c903f821eeb3·...·]-2">]</span><span·class="w">983 ········</span><span·class="p"·data-group-id="6760378572-9">{</span><span·class="s">&quot;telephoneNumber&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6760378572-10">[</span><span·class="s">&quot;545·555·00&quot;</span><span·class="p"·data-group-id="676037[·...·truncated·by·diffoscope;·len:·111,·SHA:·d395b870033d88f704ab275f2f146b5eca7389adcc14980d1f633c4dac82b48c·...·]-2">]</span><span·class="w">
984 ·····</span><span·class="p"·data-group-id="9893936487-1">)</span></code></pre>984 ·····</span><span·class="p"·data-group-id="6760378572-1">)</span></code></pre>
985 ··</section>985 ··</section>
986 </section>986 </section>
987 <section·class="detail"·id="and/1">987 <section·class="detail"·id="and/1">
  
988 ··<div·class="detail-header">988 ··<div·class="detail-header">
989 ····<a·href="#and/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">989 ····<a·href="#and/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
990 ······<i·class="ri-link-m"·aria-hidden="true"></i>990 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1291, 15 lines modifiedOffset 1291, 15 lines modified
1291 ·····························OptionalAttrs·::1291 ·····························OptionalAttrs·::
1292 ·································[{matchingRule,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()}·|1292 ·································[{matchingRule,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()}·|
1293 ··································{type,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()}·|1293 ··································{type,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()}·|
1294 ··································{dnAttributes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()}].</pre>1294 ··································{dnAttributes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()}].</pre>
  
1295 ······</div>1295 ······</div>
  
1296 <p>Creates·an·extensible·match·filter.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">extensibleMatch</span><span·class="p"·data-group-id="6048542620-1">(</span><span·class="s">&quot;Bar&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6048542620-2">[</span><span·class="p"·data-group-id="6048542620-3">{</span><span·class="ss">type</span><span·class="p[·...·truncated·by·diffoscope;·len:·457,·SHA:·fb2870b3117aa72cb95e174f854b541704c5a7d8c7e0a308d905f41b27438880·...·]-1">)</span><span·class="p">)</span></code></pre><p>creates·a·filter·which·performs·a·<code·class="inline">caseExactMatch</code>·on·the·attribute·<code·class="inline">sn</code>·and1296 <p>Creates·an·extensible·match·filter.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">extensibleMatch</span><span·class="p"·data-group-id="5521380121-1">(</span><span·class="s">&quot;Bar&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5521380121-2">[</span><span·class="p"·data-group-id="5521380121-3">{</span><span·class="ss">type</span><span·class="p[·...·truncated·by·diffoscope;·len:·457,·SHA:·9fb9d80896a5c79c743352ce5e5bbaf4ae22df2ac454af5d4c6449e32af091e3·...·]-1">)</span><span·class="p">)</span></code></pre><p>creates·a·filter·which·performs·a·<code·class="inline">caseExactMatch</code>·on·the·attribute·<code·class="inline">sn</code>·and
1297 matches·with·the·value·<code·class="inline">&quot;Bar&quot;</code>.·The·default·value·of·<code·class="inline">dnAttributes</code>·is·<code·class="inline">false</code>.</p>1297 matches·with·the·value·<code·class="inline">&quot;Bar&quot;</code>.·The·default·value·of·<code·class="inline">dnAttributes</code>·is·<code·class="inline">false</code>.</p>
1298 ··</section>1298 ··</section>
1299 </section>1299 </section>
1300 <section·class="detail"·id="greaterOrEqual/2">1300 <section·class="detail"·id="greaterOrEqual/2">
  
1301 ··<div·class="detail-header">1301 ··<div·class="detail-header">
1302 ····<a·href="#greaterOrEqual/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1302 ····<a·href="#greaterOrEqual/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1509, 17 lines modifiedOffset 1509, 17 lines modified
1509 ····················Dn·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),1509 ····················Dn·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
1510 ····················ModifyOps·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],1510 ····················ModifyOps·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],
1511 ····················Refs·::·{referral,·<a·href="#t:referrals/0">referrals</a>()},1511 ····················Refs·::·{referral,·<a·href="#t:referrals/0">referrals</a>()},
1512 ····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1512 ····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1513 ······</div>1513 ······</div>
  
1514 <p>Modify·an·entry.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nf">modify</span><span·class="p"·data-group-id="0694472805-1">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cn=Bill·Valentine,·ou=people,·o=Example·Org,·dc=example,·dc=com&quot;</span><span·class="p">,</span><span·class="w">1514 <p>Modify·an·entry.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nf">modify</span><span·class="p"·data-group-id="3970824890-1">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cn=Bill·Valentine,·ou=people,·o=Example·Org,·dc=example,·dc=com&quot;</span><span·class="p">,</span><span·class="w">
1515 ·········</span><span·class="p"·data-group-id="0694472805-2">[</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">mod_replace</span><span·class="p"·data-group-id="0694472805-3">(</span><span·class="s">&quot;telephoneNumber&quot;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·197,·SHA:·2e3039355749fcac39be267082a2e39db3320ec0e9477f2670fe2cdfb408a166·...·]-3">)</span><span·class="p">,</span><span·class="w">1515 ·········</span><span·class="p"·data-group-id="3970824890-2">[</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">mod_replace</span><span·class="p"·data-group-id="3970824890-3">(</span><span·class="s">&quot;telephoneNumber&quot;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·197,·SHA:·66700ddc9716b63f891d083f94c397b3236501a85aea144dde214f025fa7eb18·...·]-3">)</span><span·class="p">,</span><span·class="w">
1516 »       ··</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">mod_add</span><span·class="p"·data-group-id="0694472805-5">(</span><span·class="s">&quot;description&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0694472805-6">[</span><span·class="s">&quot;LDAP·Hacker&quot;</span><span·class="p"·data-group-id="0694472805[·...·truncated·by·diffoscope;·len:·183,·SHA:·a00f75e3b773e3c200914a6818f6b95540093b651f3c07c7a5a34f124d8bf5fd·...·]-1">)</span></code></pre>1516 »       ··</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">mod_add</span><span·class="p"·data-group-id="3970824890-5">(</span><span·class="s">&quot;description&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3970824890-6">[</span><span·class="s">&quot;LDAP·Hacker&quot;</span><span·class="p"·data-group-id="3970824890[·...·truncated·by·diffoscope;·len:·183,·SHA:·65a0f1b9d95ced0f0dcfc92ab90c3fc1748f5800714122d55ad950dc9f357072·...·]-1">)</span></code></pre>
1517 ··</section>1517 ··</section>
1518 </section>1518 </section>
1519 <section·class="detail"·id="modify_dn/5">1519 <section·class="detail"·id="modify_dn/5">
  
1520 ··<div·class="detail-header">1520 ··<div·class="detail-header">
1521 ····<a·href="#modify_dn/5"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1521 ····<a·href="#modify_dn/5"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1522 ······<i·class="ri-link-m"·aria-hidden="true"></i>1522 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1832, 16 lines modifiedOffset 1832, 16 lines modified
1832 ··········<pre·translate="no"><span·class="attribute">-spec</span>·paged_result_control(PageSize)·->·{control,·ControlOID,·true,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()}1832 ··········<pre·translate="no"><span·class="attribute">-spec</span>·paged_result_control(PageSize)·->·{control,·ControlOID,·true,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()}
1833 ······························when·PageSize·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·ControlOID·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>().</pre>1833 ······························when·PageSize·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·ControlOID·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>().</pre>
  
1834 ······</div>1834 ······</div>
  
1835 <p>paged_result_control(PageSize)·-&gt;·{control,·&quot;1.2.840.113556.1.4.319&quot;,·true,1835 <p>paged_result_control(PageSize)·-&gt;·{control,·&quot;1.2.840.113556.1.4.319&quot;,·true,
1836 binary()}</p><p>Paged·results·is·an·extension·to·the·LDAP·protocol·specified·by·RFC2696</p><p>This·function·creates·a·control·with·the·specified·page·size·for·use·in1836 binary()}</p><p>Paged·results·is·an·extension·to·the·LDAP·protocol·specified·by·RFC2696</p><p>This·function·creates·a·control·with·the·specified·page·size·for·use·in
1837 <code·class="inline">search/3</code>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Control</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">paged_result_control</span><span·class="p"·data-group-id="4443395370-1">(</span><span·class="mi">50</span><span·class="p"·data-group-id="4443395370-1">)</span><span·class="p">,</span><span·class="w">1837 <code·class="inline">search/3</code>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Control</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">paged_result_control</span><span·class="p"·data-group-id="1822372866-1">(</span><span·class="mi">50</span><span·class="p"·data-group-id="1822372866-1">)</span><span·class="p">,</span><span·class="w">
1838 </span><span·class="p"·data-group-id="4443395370-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SearchResults</span><span·class="p"·data-group-id="4443395370-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·727,·SHA:·f3054bfcc565122e8007e95d8a37ad5380083a0b125345ac057d7efcc6d9d0ec·...·]-3">)</span><span·class="p">,</span></code></pre>1838 </span><span·class="p"·data-group-id="1822372866-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SearchResults</span><span·class="p"·data-group-id="1822372866-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·727,·SHA:·77c32044c2fc2a2579c1c282b225f6bb2364dde101937ceffa15bf6ad23e7f59·...·]-3">)</span><span·class="p">,</span></code></pre>
1839 ··</section>1839 ··</section>
1840 </section>1840 </section>
1841 <section·class="detail"·id="paged_result_control/2">1841 <section·class="detail"·id="paged_result_control/2">
  
1842 ··<div·class="detail-header">1842 ··<div·class="detail-header">
1843 ····<a·href="#paged_result_control/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1843 ····<a·href="#paged_result_control/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1844 ······<i·class="ri-link-m"·aria-hidden="true"></i>1844 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1867, 20 lines modifiedOffset 1867, 20 lines modified
1867 ······························when·PageSize·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·Cookie·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),·ControlOID·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>().</pre>1867 ······························when·PageSize·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·Cookie·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),·ControlOID·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>().</pre>
  
1868 ······</div>1868 ······</div>
  
1869 <p>paged_result_control(PageSize,·Cookie)·-&gt;·{control,·&quot;1.2.840.113556.1.4.319&quot;,1869 <p>paged_result_control(PageSize,·Cookie)·-&gt;·{control,·&quot;1.2.840.113556.1.4.319&quot;,
1870 true,·binary()}</p><p>Paged·results·is·an·extension·to·the·LDAP·protocol·specified·by·RFC2696</p><p>This·function·creates·a·control·with·the·specified·page·size·and·cookie·for·use1870 true,·binary()}</p><p>Paged·results·is·an·extension·to·the·LDAP·protocol·specified·by·RFC2696</p><p>This·function·creates·a·control·with·the·specified·page·size·and·cookie·for·use
1871 in·<code·class="inline">search/3</code>·to·retrieve·the·next·results·page.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">PageSize</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">50</span><span·class="p">,</span><span·class="w">1871 in·<code·class="inline">search/3</code>·to·retrieve·the·next·results·page.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">PageSize</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">50</span><span·class="p">,</span><span·class="w">
1872 </span><span·class="n">Control1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">paged_result_control</span><span·class="p"·data-group-id="6594583221-1">(</span><span·class="n">PageSize</span><span·class="p"·data-group-id="6594583221-1">)</span><span·class="p">,</span><span·class="w">1872 </span><span·class="n">Control1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">paged_result_control</span><span·class="p"·data-group-id="5705643061-1">(</span><span·class="n">PageSize</span><span·class="p"·data-group-id="5705643061-1">)</span><span·class="p">,</span><span·class="w">
1873 </span><span·class="p"·data-group-id="6594583221-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SearchResults1</span><span·class="p"·data-group-id="6594583221-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·728,·SHA:·8060d25f72cee5e2f97441e1c54f7fc2ee566b15301706677a38597b6614040f·...·]1-3">)</span><span·class="p">,</span><span·class="w">1873 </span><span·class="p"·data-group-id="5705643061-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SearchResults1</span><span·class="p"·data-group-id="5705643061-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·728,·SHA:·cd2c4127bc4e4ac8867b95d80558d8cd00ae0c7d71d263b657da9d4a276556f6·...·]1-3">)</span><span·class="p">,</span><span·class="w">
1874 </span><span·class="c1">%%·retrieve·the·returned·cookie·from·the·search·results</span><span·class="w">1874 </span><span·class="c1">%%·retrieve·the·returned·cookie·from·the·search·results</span><span·class="w">
1875 </span><span·class="p"·data-group-id="6594583221-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cookie1</span><span·class="p"·data-group-id="6594583221-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·221,·SHA:·75b4a996102444c106ecfb1a9cb4f605bea0e4fc6aee03f80c21d38d9b4ea127·...·]1-8">)</span><span·class="p">,</span><span·class="w">1875 </span><span·class="p"·data-group-id="5705643061-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cookie1</span><span·class="p"·data-group-id="5705643061-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·221,·SHA:·dcecfd577c827e1540deefa921f0b755e2119f289ee70b6aef10330a531fafd6·...·]1-8">)</span><span·class="p">,</span><span·class="w">
1876 </span><span·class="n">Control2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">paged_result_control</span><span·class="p"·data-group-id="6594583221-9">(</span><span·class="n">PageSize</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cookie1</span><span·class="p"·data-group-id="6594583221-9">)</span><span·class="p">,</span><span·class="w">1876 </span><span·class="n">Control2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">paged_result_control</span><span·class="p"·data-group-id="5705643061-9">(</span><span·class="n">PageSize</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cookie1</span><span·class="p"·data-group-id="5705643061-9">)</span><span·class="p">,</span><span·class="w">
1877 </span><span·class="p"·data-group-id="6594583221-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SearchResults2</span><span·class="p"·data-group-id="6594583221-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·789,·SHA:·363bf4c6d1a108a819e527988ceb27b04cf5d773c2be8e7060787faadc23b39f·...·]1-11">)</span><span·class="p">,</span><span·class="w">1877 </span><span·class="p"·data-group-id="5705643061-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SearchResults2</span><span·class="p"·data-group-id="5705643061-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·789,·SHA:·c70432fbcbfc03aca363de36ca21d6cdb66f913f2208c95654a168bc71b2aaf8·...·]1-11">)</span><span·class="p">,</span><span·class="w">
1878 </span><span·class="c1">%%·etc</span></code></pre>1878 </span><span·class="c1">%%·etc</span></code></pre>
1879 ··</section>1879 ··</section>
1880 </section>1880 </section>
1881 <section·class="detail"·id="paged_result_cookie/1">1881 <section·class="detail"·id="paged_result_cookie/1">
  
1882 ··<div·class="detail-header">1882 ··<div·class="detail-header">
1883 ····<a·href="#paged_result_cookie/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1883 ····<a·href="#paged_result_cookie/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1992, 16 lines modifiedOffset 1992, 16 lines modified
1992 ····················Refs·::·{referral,·<a·href="#t:referrals/0">referrals</a>()},1992 ····················Refs·::·{referral,·<a·href="#t:referrals/0">referrals</a>()},
1993 ····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1993 ····················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1994 ······</div>1994 ······</div>
  
1995 <p>Search·the·directory·with·the·supplied·the·SearchOptions.</p><p>The·base·and·filter1995 <p>Search·the·directory·with·the·supplied·the·SearchOptions.</p><p>The·base·and·filter
1996 options·must·be·supplied.·Default·values:·scope·is·<a·href="#wholeSubtree/0"><code·class="inline">wholeSubtree/0</code></a>,·deref·is1996 options·must·be·supplied.·Default·values:·scope·is·<a·href="#wholeSubtree/0"><code·class="inline">wholeSubtree/0</code></a>,·deref·is
1997 <a·href="#derefAlways/0"><code·class="inline">derefAlways/0</code></a>,·types_only·is·<code·class="inline">false</code>·and·timeout·is·<code·class="inline">0</code>·(meaning·infinity).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="n">Filter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">substrings</span><span·class="p"·data-group-id="1709121803-1">(</span><span·class="s">&quot;cn&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1709121803-2">[</span><span·class="p"·data-group-id="1709121803-3">{</span><span·class="ss">any</span><span·class="p">[·...·truncated·by·diffoscope;·len:·191,·SHA:·c6b2314b7cc004d69f41a1c1ada6605e38bdaf23b9d9491a06bc8d63ab7b1b2b·...·]-1">)</span><span·class="p">,</span><span·class="w">1997 <a·href="#derefAlways/0"><code·class="inline">derefAlways/0</code></a>,·types_only·is·<code·class="inline">false</code>·and·timeout·is·<code·class="inline">0</code>·(meaning·infinity).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="n">Filter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">eldap</span><span·class="p">:</span><span·class="nf">substrings</span><span·class="p"·data-group-id="3290264036-1">(</span><span·class="s">&quot;cn&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3290264036-2">[</span><span·class="p"·data-group-id="3290264036-3">{</span><span·class="ss">any</span><span·class="p">[·...·truncated·by·diffoscope;·len:·191,·SHA:·6df79017fea232486be730d663a8ed4f81c6e3be9b387a7b82bfa01aaf67f44f·...·]-1">)</span><span·class="p">,</span><span·class="w">
1998 ··</span><span·class="nf">search</span><span·class="p"·data-group-id="1709121803-4">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1709121803-5">[</span><span·class="p"·data-group-id="1709121803-6">{</span><span·class="ss">base</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·865,·SHA:·cd2398ad1dca4834e1ecd88d7da63423e7179ba79b4a0a866adb55943550b2ee·...·]-4">)</span><span·class="p">,</span></code></pre><p>The·<code·class="inline">timeout</code>·option·in·the·<code·class="inline">SearchOptions</code>·is·for·the·ldap·server,·while·the1998 ··</span><span·class="nf">search</span><span·class="p"·data-group-id="3290264036-4">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3290264036-5">[</span><span·class="p"·data-group-id="3290264036-6">{</span><span·class="ss">base</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·865,·SHA:·26555663177f899d3bcaaeff854a28348c39e6d8911439d67adea908c22aa42d·...·]-4">)</span><span·class="p">,</span></code></pre><p>The·<code·class="inline">timeout</code>·option·in·the·<code·class="inline">SearchOptions</code>·is·for·the·ldap·server,·while·the
1999 timeout·in·<a·href="#open/2">eldap:open/2</a>·is·used·for·each·individual·request·in·the1999 timeout·in·<a·href="#open/2">eldap:open/2</a>·is·used·for·each·individual·request·in·the
2000 search·operation.</p>2000 search·operation.</p>
2001 ··</section>2001 ··</section>
2002 </section>2002 </section>
2003 <section·class="detail"·id="simple_bind/3">2003 <section·class="detail"·id="simple_bind/3">
  
2004 ··<div·class="detail-header">2004 ··<div·class="detail-header">
649 B
./usr/share/doc/erlang-doc/html/lib/erl_interface-5.5.2/doc/html/.build
    
Offset 13, 15 lines modifiedOffset 13, 15 lines modified
13 dist/lato-latin-300-normal-YUMVEFOL.woff213 dist/lato-latin-300-normal-YUMVEFOL.woff2
14 dist/lato-latin-400-normal-W7754I4D.woff214 dist/lato-latin-400-normal-W7754I4D.woff2
15 dist/lato-latin-700-normal-2XVSBPG4.woff215 dist/lato-latin-700-normal-2XVSBPG4.woff2
16 dist/lato-latin-ext-300-normal-VPGGJKJL.woff216 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
17 dist/lato-latin-ext-400-normal-N27NCBWW.woff217 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
18 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff218 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
19 dist/remixicon-NKANDIL5.woff219 dist/remixicon-NKANDIL5.woff2
20 dist/search_data-73A3D537.js20 dist/search_data-E56B0CB2.js
21 dist/sidebar_items-8A5CCEF3.js21 dist/sidebar_items-8A5CCEF3.js
22 ei.html22 ei.html
23 ei_connect.html23 ei_connect.html
24 ei_global.html24 ei_global.html
25 ei_users_guide.html25 ei_users_guide.html
26 erl_call_cmd.html26 erl_call_cmd.html
27 index.html27 index.html
4.75 KB
./usr/share/doc/erlang-doc/html/lib/erl_interface-5.5.2/doc/html/erl_call_cmd.html
    
Offset 247, 16 lines modifiedOffset 247, 16 lines modified
247 ·{&lt;madonna@chivas.du.etx.ericsson.se,17,0&gt;,247 ·{&lt;madonna@chivas.du.etx.ericsson.se,17,0&gt;,
248 ··················{registered_name,code_server}},248 ··················{registered_name,code_server}},
249 ·{&lt;madonna@chivas.du.etx.ericsson.se,20,0&gt;,249 ·{&lt;madonna@chivas.du.etx.ericsson.se,20,0&gt;,
250 ··················{registered_name,user}},250 ··················{registered_name,user}},
251 ·{&lt;madonna@chivas.du.etx.ericsson.se,38,0&gt;,251 ·{&lt;madonna@chivas.du.etx.ericsson.se,38,0&gt;,
252 ··················[]}]</code></pre><p>To·forward·standard·output·without·printing·the·result·term·(<em>again,·the·input252 ··················[]}]</code></pre><p>To·forward·standard·output·without·printing·the·result·term·(<em>again,·the·input
253 ends·with·EOF·(Control-D)</em>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">erl_call</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">s</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">e</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">sname</span><span·class="w">·</span><span·class="ss">madonna</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">fetch_stdout</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">no_result_term</span><span·class="w">253 ends·with·EOF·(Control-D)</em>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">erl_call</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">s</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">e</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">sname</span><span·class="w">·</span><span·class="ss">madonna</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">fetch_stdout</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">no_result_term</span><span·class="w">
254 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6963448406-1">(</span><span·class="s">&quot;Number·of·schedulers:·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6963448406-2">[</span><[·...·truncated·by·diffoscope;·len:·322,·SHA:·c122c20ead7fd6e884a5af33f81a57db9df6ee89b2b7d8d5cc35822ceed484a4·...·]-1">)</span><span·class="p">,</span><span·class="w">254 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1693564584-1">(</span><span·class="s">&quot;Number·of·schedulers:·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1693564584-2">[</span><[·...·truncated·by·diffoscope;·len:·322,·SHA:·e5277eae3d336c0c24e5d8e8ce054a6a93931bea8c8a584d1a035c9276deecac·...·]-1">)</span><span·class="p">,</span><span·class="w">
255 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6963448406-4">(</span><span·class="s">&quot;Number·of·logical·cores:·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6963448406-5">[</spa[·...·truncated·by·diffoscope;·len:·343,·SHA:·6a211a5e3cd56cb33e55fd305cbe4ec24ac8b5e187648ed2a20580bc236260d1·...·]-4">)</span><span·class="p">.</span><span·class="w">255 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1693564584-4">(</span><span·class="s">&quot;Number·of·logical·cores:·</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1693564584-5">[</spa[·...·truncated·by·diffoscope;·len:·343,·SHA:·b66ae0416eee24927dd68da758504078bed9db77602ea609b289f242ed81c9e7·...·]-4">)</span><span·class="p">.</span><span·class="w">
256 </span><span·class="err">^</span><span·class="n">D</span><span·class="w">256 </span><span·class="err">^</span><span·class="n">D</span><span·class="w">
257 </span><span·class="n">Number</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="nc">schedulers</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">8</span><span·class="w">257 </span><span·class="n">Number</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="nc">schedulers</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">8</span><span·class="w">
258 </span><span·class="n">Number</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">logical</span><span·class="w">·</span><span·class="nc">cores</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">8</span></code></pre>258 </span><span·class="n">Number</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">logical</span><span·class="w">·</span><span·class="nc">cores</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">8</span></code></pre>
259 </div>259 </div>
  
260 <div·class="bottom-actions"·id="bottom-actions">260 <div·class="bottom-actions"·id="bottom-actions">
261 ··<div·class="bottom-actions-item">261 ··<div·class="bottom-actions-item">
48.8 KB
./usr/share/doc/erlang-doc/html/lib/erl_interface-5.5.2/doc/html/erl_interface.epub
2.53 KB
zipinfo {}
    
Offset 1, 17 lines modifiedOffset 1, 17 lines modified
1 Zip·file·size:·84387·bytes,·number·of·entries:·151 Zip·file·size:·84389·bytes,·number·of·entries:·15
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:18·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:57·mimetype
3 ?rw-r--r--··2.0·unx······730·b-·defN·24-Oct-11·20:18·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······730·b-·defN·24-Oct-11·20:57·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx···105507·b-·defN·24-Oct-11·20:18·OEBPS/notes.xhtml4 ?rw-r--r--··2.0·unx···105507·b-·defN·24-Oct-11·20:57·OEBPS/notes.xhtml
5 ?rw-r--r--··2.0·unx·····1261·b-·defN·24-Oct-11·20:18·OEBPS/nav.xhtml5 ?rw-r--r--··2.0·unx·····1261·b-·defN·24-Oct-11·20:57·OEBPS/nav.xhtml
6 ?rw-r--r--··2.0·unx····16899·b-·defN·24-Oct-11·20:18·OEBPS/erl_call_cmd.xhtml6 ?rw-r--r--··2.0·unx····16899·b-·defN·24-Oct-11·20:57·OEBPS/erl_call_cmd.xhtml
7 ?rw-r--r--··2.0·unx····21202·b-·defN·24-Oct-11·20:18·OEBPS/ei_users_guide.xhtml7 ?rw-r--r--··2.0·unx····21202·b-·defN·24-Oct-11·20:57·OEBPS/ei_users_guide.xhtml
8 ?rw-r--r--··2.0·unx·····6232·b-·defN·24-Oct-11·20:18·OEBPS/ei_global.xhtml8 ?rw-r--r--··2.0·unx·····6232·b-·defN·24-Oct-11·20:57·OEBPS/ei_global.xhtml
9 ?rw-r--r--··2.0·unx····66858·b-·defN·24-Oct-11·20:18·OEBPS/ei_connect.xhtml9 ?rw-r--r--··2.0·unx····66858·b-·defN·24-Oct-11·20:57·OEBPS/ei_connect.xhtml
10 ?rw-r--r--··2.0·unx····67942·b-·defN·24-Oct-11·20:18·OEBPS/ei.xhtml10 ?rw-r--r--··2.0·unx····67942·b-·defN·24-Oct-11·20:57·OEBPS/ei.xhtml
11 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-erlang-2EWSTWER.css11 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-erlang-2EWSTWER.css
12 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-CB7BJMUW.js12 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-CB7BJMUW.js
13 ?rw-r--r--··2.0·unx·····1948·b-·defN·24-Oct-11·20:18·OEBPS/content.opf13 ?rw-r--r--··2.0·unx·····1948·b-·defN·24-Oct-11·20:57·OEBPS/content.opf
14 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:18·OEBPS/assets/logo.png14 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:57·OEBPS/assets/logo.png
15 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:18·META-INF/container.xml15 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:57·META-INF/container.xml
16 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:18·META-INF/com.apple.ibooks.display-options.xml16 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:57·META-INF/com.apple.ibooks.display-options.xml
17 15·files,·311747·bytes·uncompressed,·82563·bytes·compressed:··73.5%17 15·files,·311747·bytes·uncompressed,·82565·bytes·compressed:··73.5%
40.3 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
4.57 KB
OEBPS/erl_call_cmd.xhtml
Max HTML report size reached
1.25 KB
OEBPS/content.opf
1.22 KB
OEBPS/content.opf
Max HTML report size reached
644 B
./usr/share/doc/erlang-doc/html/lib/erl_interface-5.5.2/doc/html/search.html
    
Offset 108, 15 lines modifiedOffset 108, 15 lines modified
108 <div·id="search">108 <div·id="search">
109 ··<h1>109 ··<h1>
110 ····<span></span>110 ····<span></span>
111 ··</h1>111 ··</h1>
  
112 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>112 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
113 </div>113 </div>
114 <script·src="dist/search_data-73A3D537.js"></script>114 <script·src="dist/search_data-E56B0CB2.js"></script>
115 ····<footer·class="footer">115 ····<footer·class="footer">
116 ······<p>116 ······<p>
  
117 ········<span·class="line">117 ········<span·class="line">
118 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">118 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
119 ············Search·HexDocs119 ············Search·HexDocs
120 ··········</button>120 ··········</button>
362 KB
./usr/share/doc/erlang-doc/html/lib/et-1.7.1/doc/html/et.epub
4.92 KB
zipinfo {}
Max HTML report size reached
79.2 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
57.7 KB
OEBPS/et_tutorial.xhtml
Max HTML report size reached
172 KB
OEBPS/et_examples.xhtml
Max HTML report size reached
44.0 KB
OEBPS/et_desc.xhtml
Max HTML report size reached
3.92 KB
OEBPS/content.opf
3.89 KB
OEBPS/content.opf
Max HTML report size reached
44.1 KB
./usr/share/doc/erlang-doc/html/lib/et-1.7.1/doc/html/et_desc.html
    
Offset 134, 41 lines modifiedOffset 134, 41 lines modified
134 <p>The·two·major·components·of·the·<code·class="inline">Event·Tracer·(ET)</code>·tool·is·a·graphical·sequence134 <p>The·two·major·components·of·the·<code·class="inline">Event·Tracer·(ET)</code>·tool·is·a·graphical·sequence
135 chart·viewer·(<code·class="inline">et_viewer</code>)·and·its·backing·storage·(<code·class="inline">et_collector</code>).·One135 chart·viewer·(<code·class="inline">et_viewer</code>)·and·its·backing·storage·(<code·class="inline">et_collector</code>).·One
136 <code·class="inline">Collector</code>·may·be·used·as·backing·storage·for·several·simultaneous·<code·class="inline">Viewers</code>136 <code·class="inline">Collector</code>·may·be·used·as·backing·storage·for·several·simultaneous·<code·class="inline">Viewers</code>
137 where·each·one·may·display·a·different·view·of·the·same·trace·data.</p><p>The·interface·between·the·<code·class="inline">Collector</code>·and·its·<code·class="inline">Viewers</code>·is·public·in·order·to137 where·each·one·may·display·a·different·view·of·the·same·trace·data.</p><p>The·interface·between·the·<code·class="inline">Collector</code>·and·its·<code·class="inline">Viewers</code>·is·public·in·order·to
138 enable·other·types·of·<code·class="inline">Viewers</code>.·However·in·the·following·text·we·will·focus·on138 enable·other·types·of·<code·class="inline">Viewers</code>.·However·in·the·following·text·we·will·focus·on
139 usage·of·the·<code·class="inline">et_viewer</code>.</p><p>The·main·start·function·is·<a·href="et_viewer.html#start/1"><code·class="inline">et_viewer:start/1</code></a>.·By·default·it·will·start·both·an139 usage·of·the·<code·class="inline">et_viewer</code>.</p><p>The·main·start·function·is·<a·href="et_viewer.html#start/1"><code·class="inline">et_viewer:start/1</code></a>.·By·default·it·will·start·both·an
140 <code·class="inline">et_collector</code>·and·an·<code·class="inline">et_viewer</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-pa·et/examples</span><span·class="w">140 <code·class="inline">et_collector</code>·and·an·<code·class="inline">et_viewer</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-pa·et/examples</span><span·class="w">
141 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R13B03</span><span·class="w">·</span><span·class="p"·data-group-id="2232862844-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.7</span><span·class="p">.</span><span·class="mi">4</span><span·class="p"·data-group-id="2232862844-1">)</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·1129,·SHA:·0a7c5167ad73b05740c07db865e066c3e0f28f3c7f2374f267edb9a1686e5706·...·]4-6">]</span><span·class="w">141 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R13B03</span><span·class="w">·</span><span·class="p"·data-group-id="8325560934-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.7</span><span·class="p">.</span><span·class="mi">4</span><span·class="p"·data-group-id="8325560934-1">)</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·1129,·SHA:·26f5ae28c6e8d5cb7e848a3f00f0a5d29173d494d7d1e1c0b242890755efd9c9·...·]4-6">]</span><span·class="w">
  
142 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">7.4</span><span·class="w">··</span><span·class="p"·data-group-id="2232862844-7">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2232862844-7">)</span><span·class="gp·unselectable">142 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">7.4</span><span·class="w">··</span><span·class="p"·data-group-id="8325560934-7">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="8325560934-7">)</span><span·class="gp·unselectable">
143 1&gt;·</span><span·class="p"·data-group-id="2232862844-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="2232862844-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·281,·SHA:·df15f8a2b110ed552f4b2aa78a82d3fd7daf10544db941d2a2e4871619f68018·...·]4-9">)</span><span·class="p">.</span><span·class="w">143 1&gt;·</span><span·class="p"·data-group-id="8325560934-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="8325560934-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·281,·SHA:·3adc4270b512eeed4271d256d3b41219e1597de2ff47f0c8289d1bdcd7d2caf2·...·]4-9">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="p"·data-group-id="2232862844-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2232862844-11">}</span></code></pre><p>A·<code·class="inline">Viewer</code>·gets·trace·<code·class="inline">Events</code>·from·its·<code·class="inline">Collector</code>·by·polling·it·regularly·for144 </span><span·class="p"·data-group-id="8325560934-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8325560934-11">}</span></code></pre><p>A·<code·class="inline">Viewer</code>·gets·trace·<code·class="inline">Events</code>·from·its·<code·class="inline">Collector</code>·by·polling·it·regularly·for
145 more·<code·class="inline">Events</code>·to·display.·<code·class="inline">Events</code>·are·for·example·reported·to·the·<code·class="inline">Collector</code>145 more·<code·class="inline">Events</code>·to·display.·<code·class="inline">Events</code>·are·for·example·reported·to·the·<code·class="inline">Collector</code>
146 with·<a·href="et_collector.html#report_event/6"><code·class="inline">et_collector:report_event/6</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">Collector</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="9340652875-1">(</span><span·class="n">Viewer</span><span·class="p"·data-group-id="9340652875-1">)</span><span·class="p">.</span><span·class="w">146 with·<a·href="et_collector.html#report_event/6"><code·class="inline">et_collector:report_event/6</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">Collector</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="0169445536-1">(</span><span·class="n">Viewer</span><span·class="p"·data-group-id="0169445536-1">)</span><span·class="p">.</span><span·class="w">
147 </span><span·class="o">&lt;</span><span·class="mf">0.39</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">147 </span><span·class="o">&lt;</span><span·class="mf">0.39</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
148 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-2">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_outer</span><span·class="p">,</span><span·class="gp·unselectable">148 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-2">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_outer</span><span·class="p">,</span><span·class="gp·unselectable">
149 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Start·outer·transaction&quot;</span><span·class="p"·data-group-id="9340652875-2">)</span><span·class="p">,</span><span·class="gp·unselectable">149 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Start·outer·transaction&quot;</span><span·class="p"·data-group-id="0169445536-2">)</span><span·class="p">,</span><span·class="gp·unselectable">
150 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-3">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new_tid</span><span·class="p">,</span><span·class="gp·unselectable">150 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-3">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new_tid</span><span·class="p">,</span><span·class="gp·unselectable">
151 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;New·transaction·id·is·4711&quot;</span><span·class="p"·data-group-id="9340652875-3">)</span><span·class="p">,</span><span·class="gp·unselectable">151 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;New·transaction·id·is·4711&quot;</span><span·class="p"·data-group-id="0169445536-3">)</span><span·class="p">,</span><span·class="gp·unselectable">
152 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-4">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">try_write_lock</span><span·class="p">,</span><span·class="gp·unselectable">152 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-4">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">try_write_lock</span><span·class="p">,</span><span·class="gp·unselectable">
153 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Acquire·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="9340652875-4">)</span><span·class="p">,</span><span·class="gp·unselectable">153 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Acquire·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="0169445536-4">)</span><span·class="p">,</span><span·class="gp·unselectable">
154 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-5">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">granted</span><span·class="p">,</span><span·class="gp·unselectable">154 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-5">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">granted</span><span·class="p">,</span><span·class="gp·unselectable">
155 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;You·got·the·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="9340652875-5">)</span><span·class="p">,</span><span·class="gp·unselectable">155 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;You·got·the·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="0169445536-5">)</span><span·class="p">,</span><span·class="gp·unselectable">
156 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-6">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">do_commit</span><span·class="p">,</span><span·class="gp·unselectable">156 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-6">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">do_commit</span><span·class="p">,</span><span·class="gp·unselectable">
157 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Perform··transaction·commit&quot;</span><span·class="p"·data-group-id="9340652875-6">)</span><span·class="p">,</span><span·class="gp·unselectable">157 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Perform··transaction·commit&quot;</span><span·class="p"·data-group-id="0169445536-6">)</span><span·class="p">,</span><span·class="gp·unselectable">
158 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-7">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">release_tid</span><span·class="p">,</span><span·class="gp·unselectable">158 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-7">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">release_tid</span><span·class="p">,</span><span·class="gp·unselectable">
159 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Release·all·locks·for·transaction·4711&quot;</span><span·class="p"·data-group-id="9340652875-7">)</span><span·class="p">,</span><span·class="gp·unselectable">159 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Release·all·locks·for·transaction·4711&quot;</span><span·class="p"·data-group-id="0169445536-7">)</span><span·class="p">,</span><span·class="gp·unselectable">
160 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-8">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete_transaction</span><span·class="p">,</span><span·class="gp·unselectable">160 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-8">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete_transaction</span><span·class="p">,</span><span·class="gp·unselectable">
161 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;End·of·outer·transaction&quot;</span><span·class="p"·data-group-id="9340652875-8">)</span><span·class="p">,</span><span·class="gp·unselectable">161 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;End·of·outer·transaction&quot;</span><span·class="p"·data-group-id="0169445536-8">)</span><span·class="p">,</span><span·class="gp·unselectable">
162 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="9340652875-9">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_outer</span><span·class="p">,</span><span·class="gp·unselectable">162 3&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="0169445536-9">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_outer</span><span·class="p">,</span><span·class="gp·unselectable">
163 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Transaction·returned·{atomic,·ok}&quot;</span><span·class="p"·data-group-id="9340652875-9">)</span><span·class="p">.</span><span·class="w">163 3&gt;·</span><span·class="w">··························</span><span·class="s">&quot;Transaction·returned·{atomic,·ok}&quot;</span><span·class="p"·data-group-id="0169445536-9">)</span><span·class="p">.</span><span·class="w">
164 </span><span·class="p"·data-group-id="9340652875-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9340652875-11">{</span><span·class="ss">table_handle</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.39</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="mi">16402</span><span·class="p">,</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="w">164 </span><span·class="p"·data-group-id="0169445536-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0169445536-11">{</span><span·class="ss">table_handle</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.39</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="mi">16402</span><span·class="p">,</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="w">
165 ·····</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">et_collector</span><span·class="p">.</span><span·class="mf">0.62831470</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9340652875-11">}</span><span·class="p"·data-group-id="9340652875-10">}</span></code></pre><p>This·actually·is·a·simulation·of·the·process·<code·class="inline">Events</code>·caused·by·a·<code·class="inline">Mnesia</code>165 ·····</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">et_collector</span><span·class="p">.</span><span·class="mf">0.62831470</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0169445536-11">}</span><span·class="p"·data-group-id="0169445536-10">}</span></code></pre><p>This·actually·is·a·simulation·of·the·process·<code·class="inline">Events</code>·caused·by·a·<code·class="inline">Mnesia</code>
166 transaction·that·writes·a·record·in·a·local·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="1725835659-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1725835659-2">(</span><span·class="p"·data-group-id="1725835659-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</[·...·truncated·by·diffoscope;·len:·541,·SHA:·103536ff0d6abaee3c18f9df17ee89eaa54524b36168f62af91b51b53e9c0334·...·]-1">)</span><span·class="p">.</span></code></pre><p>At·this·stage·when·we·have·a·couple·of·<code·class="inline">Events</code>,·it·is·time·to·show·how·it·looks166 transaction·that·writes·a·record·in·a·local·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="9955117393-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="9955117393-2">(</span><span·class="p"·data-group-id="9955117393-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</[·...·truncated·by·diffoscope;·len:·541,·SHA:·2ed0e474cf6d3e81acec1678b22d7d1d2d81c311d1e6e58607eaf87fdefa47ca·...·]-1">)</span><span·class="p">.</span></code></pre><p>At·this·stage·when·we·have·a·couple·of·<code·class="inline">Events</code>,·it·is·time·to·show·how·it·looks
167 like·in·the·graphical·interface·of·<code·class="inline">et_viewer</code>:</p><p><img·src="assets/sim_trans.png"·alt="A·simulated·Mnesia·transaction·which·writes·one·record"·title="A·simulated·Mnesia·transaction·which·writes·one·record"/></p><p>In·the·sequence·chart,·the·actors·(which·symbolically·has·performed·the·<code·class="inline">Event</code>)167 like·in·the·graphical·interface·of·<code·class="inline">et_viewer</code>:</p><p><img·src="assets/sim_trans.png"·alt="A·simulated·Mnesia·transaction·which·writes·one·record"·title="A·simulated·Mnesia·transaction·which·writes·one·record"/></p><p>In·the·sequence·chart,·the·actors·(which·symbolically·has·performed·the·<code·class="inline">Event</code>)
168 are·shown·as·named·vertical·bars.·The·order·of·the·actors·may·be·altered·by168 are·shown·as·named·vertical·bars.·The·order·of·the·actors·may·be·altered·by
169 dragging·(hold·mouse·button·1·pressed·during·the·operation)·the·name·tag·of·an169 dragging·(hold·mouse·button·1·pressed·during·the·operation)·the·name·tag·of·an
170 actor·and·drop·it·elsewhere:</p><p><img·src="assets/sim_trans_move_actor.png"·alt="Two·actors·has·switched·places"·title="Two·actors·has·switched·places"/></p><p>An·<code·class="inline">Event</code>·may·be·an·action·performed·by·one·single·actor·(blue·text·label)·or170 actor·and·drop·it·elsewhere:</p><p><img·src="assets/sim_trans_move_actor.png"·alt="Two·actors·has·switched·places"·title="Two·actors·has·switched·places"/></p><p>An·<code·class="inline">Event</code>·may·be·an·action·performed·by·one·single·actor·(blue·text·label)·or
171 it·may·involve·two·actors·and·is·then·depicted·as·an·arrow·directed·from·one171 it·may·involve·two·actors·and·is·then·depicted·as·an·arrow·directed·from·one
172 actor·to·another·(red·text·label).·Details·of·an·<code·class="inline">Event</code>·can·be·shown·by172 actor·to·another·(red·text·label).·Details·of·an·<code·class="inline">Event</code>·can·be·shown·by
173 clicking·(press·and·release·the·mouse·button·1)·on·the·event·label·text·or·on173 clicking·(press·and·release·the·mouse·button·1)·on·the·event·label·text·or·on
Offset 177, 19 lines modifiedOffset 177, 19 lines modified
177 ··<a·href="#filters-and-dictionary"·class="hover-link">177 ··<a·href="#filters-and-dictionary"·class="hover-link">
178 ····<i·class="ri-link-m"·aria-hidden="true"></i>178 ····<i·class="ri-link-m"·aria-hidden="true"></i>
179 ··</a>179 ··</a>
180 ··<span·class="text">Filters·and·dictionary</span>180 ··<span·class="text">Filters·and·dictionary</span>
181 </h2>181 </h2>
182 <p>The·<code·class="inline">Event·Tracer·(ET)</code>·uses·named·filters·in·various·contexts.·An·Event·Trace182 <p>The·<code·class="inline">Event·Tracer·(ET)</code>·uses·named·filters·in·various·contexts.·An·Event·Trace
183 filter·is·an·<code·class="inline">Erlang·fun</code>·that·takes·some·trace·data·as·input·and·returns·a183 filter·is·an·<code·class="inline">Erlang·fun</code>·that·takes·some·trace·data·as·input·and·returns·a
184 possibly·modified·version·of·it:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">filter</span><span·class="p"·data-group-id="1467953872-1">(</span><span·class="n">TraceData</span><span·class="p"·data-group-id="1467953872-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">|</s[·...·truncated·by·diffoscope;·len:·329,·SHA:·d16e5ba04fbf5714452620a383764d7ca376956cbb2517c25756e29c9d057ac4·...·]-2">}</span><span·class="w">184 possibly·modified·version·of·it:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">filter</span><span·class="p"·data-group-id="0497335355-1">(</span><span·class="n">TraceData</span><span·class="p"·data-group-id="0497335355-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">|</s[·...·truncated·by·diffoscope;·len:·329,·SHA:·11e914036f7ae1bd71e9a9b720da822af79984035e506753b3907b81aca19e7e·...·]-2">}</span><span·class="w">
  
185 </span><span·class="n">TraceData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Event</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">erlang_trace_data</span><span·class="p"·data-group-id="1467953872-3">(</span><span·class="p"·data-group-id="1467953872-3">)</span><span·class="w">185 </span><span·class="n">TraceData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Event</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">erlang_trace_data</span><span·class="p"·data-group-id="0497335355-3">(</span><span·class="p"·data-group-id="0497335355-3">)</span><span·class="w">
186 </span><span·class="n">Event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="1467953872-4">{</span><span·class="p"·data-group-id="1467953872-4">}</span><span·class="w">186 </span><span·class="n">Event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="0497335355-4">{</span><span·class="p"·data-group-id="0497335355-4">}</span><span·class="w">
187 </span><span·class="n">NewEvent</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="1467953872-5">{</span><span·class="p"·data-group-id="1467953872-5">}</span></code></pre><p>The·interface·of·the·filter·function·is·the·same·as·the·the·filter·functions·for187 </span><span·class="n">NewEvent</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="0497335355-5">{</span><span·class="p"·data-group-id="0497335355-5">}</span></code></pre><p>The·interface·of·the·filter·function·is·the·same·as·the·the·filter·functions·for
188 the·good·old·<a·href="../../../../lib/stdlib-6.0.1/doc/html/lists.html#filtermap/2"><code·class="inline">lists:filtermap/2</code></a>.·If·the·filter·returns·<code·class="inline">false</code>·it·means·that188 the·good·old·<a·href="../../../../lib/stdlib-6.0.1/doc/html/lists.html#filtermap/2"><code·class="inline">lists:filtermap/2</code></a>.·If·the·filter·returns·<code·class="inline">false</code>·it·means·that
189 the·trace·data·should·silently·be·dropped.·<code·class="inline">true</code>·means·that·the·trace·data·data189 the·trace·data·should·silently·be·dropped.·<code·class="inline">true</code>·means·that·the·trace·data·data
190 already·is·an·<code·class="inline">Event·Record</code>·and·that·it·should·be·kept·as·it·is.·<code·class="inline">true</code>·means190 already·is·an·<code·class="inline">Event·Record</code>·and·that·it·should·be·kept·as·it·is.·<code·class="inline">true</code>·means
191 that·the·<code·class="inline">TraceData</code>·already·is·an·<code·class="inline">Event·Record</code>·and·that·it·should·be·kept·as191 that·the·<code·class="inline">TraceData</code>·already·is·an·<code·class="inline">Event·Record</code>·and·that·it·should·be·kept·as
192 it·is.·<code·class="inline">{true,·NewEvent}</code>·means·that·the·original·trace·data·should·be·replaced192 it·is.·<code·class="inline">{true,·NewEvent}</code>·means·that·the·original·trace·data·should·be·replaced
193 with·<code·class="inline">Event</code>.·This·provides·means·to·get·rid·of·unwanted·<code·class="inline">Events</code>·as·well·as193 with·<code·class="inline">Event</code>.·This·provides·means·to·get·rid·of·unwanted·<code·class="inline">Events</code>·as·well·as
194 enabling·alternate·views·of·an·<code·class="inline">Event</code>.</p><p>The·first·filter·that·the·trace·data·is·exposed·for·is·the·<code·class="inline">Collector·Filter</code>.194 enabling·alternate·views·of·an·<code·class="inline">Event</code>.</p><p>The·first·filter·that·the·trace·data·is·exposed·for·is·the·<code·class="inline">Collector·Filter</code>.
Offset 208, 29 lines modifiedOffset 208, 29 lines modified
208 When·a·<code·class="inline">Viewer</code>·is·started·it·is·registered·as·a·subscriber·of·dictionary208 When·a·<code·class="inline">Viewer</code>·is·started·it·is·registered·as·a·subscriber·of·dictionary
209 updates.</p><p>In·each·<code·class="inline">Viewer</code>·there·is·only·one·filter·that·is·active·and·all·trace·<code·class="inline">Events</code>209 updates.</p><p>In·each·<code·class="inline">Viewer</code>·there·is·only·one·filter·that·is·active·and·all·trace·<code·class="inline">Events</code>
210 that·the·<code·class="inline">Viewer</code>·gets·from·the·<code·class="inline">Collector</code>·will·pass·thru·that·filter.·By210 that·the·<code·class="inline">Viewer</code>·gets·from·the·<code·class="inline">Collector</code>·will·pass·thru·that·filter.·By
211 writing·clever·filters·it·is·possible·to·customize·how·the·<code·class="inline">Events</code>·looks·like211 writing·clever·filters·it·is·possible·to·customize·how·the·<code·class="inline">Events</code>·looks·like
212 in·the·viewer.·The·following·filter·in·<code·class="inline">et/examples/et_demo.erl</code>·replaces·the212 in·the·viewer.·The·following·filter·in·<code·class="inline">et/examples/et_demo.erl</code>·replaces·the
213 actor·names·<code·class="inline">mnesia_tm</code>·and·<code·class="inline">mnesia_locker</code>·and·leaves·everything·else·in·the213 actor·names·<code·class="inline">mnesia_tm</code>·and·<code·class="inline">mnesia_locker</code>·and·leaves·everything·else·in·the
214 record·as·it·was:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">214 record·as·it·was:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
215 </span><span·class="nf">mgr_actors</span><span·class="p"·data-group-id="6436415545-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="6436415545-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="6436415545-2">(</s[·...·truncated·by·diffoscope;·len:·145,·SHA:·9e68ad64b3b3454bb68d4dcf908c038037cf63bdd1ece2b42cc473218b8c9ef7·...·]5-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">215 </span><span·class="nf">mgr_actors</span><span·class="p"·data-group-id="5696872865-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="5696872865-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="5696872865-2">(</s[·...·truncated·by·diffoscope;·len:·145,·SHA:·5ef39615fad67823f4ffba8b1498cf0314ed9a63d38daa5620b66c4bdddbd3f8·...·]5-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
216 ····</span><span·class="n">Actor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6436415545-3">(</span><span·class="n">A</span><span·class="p"·data-group-id="6436415545-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 ····</span><span·class="n">Actor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5696872865-3">(</span><span·class="n">A</span><span·class="p"·data-group-id="5696872865-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ···············</span><span·class="k">case</span><span·class="w">·</span><span·class="n">A</span><span·class="w">·</span><span·class="k">of</span><span·class="w">217 ···············</span><span·class="k">case</span><span·class="w">·</span><span·class="n">A</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
218 ···················</span><span·class="ss">mnesia_tm</span><span·class="w">·····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">trans_mgr</span><span·class="p">;</span><span·class="w">218 ···················</span><span·class="ss">mnesia_tm</span><span·class="w">·····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">trans_mgr</span><span·class="p">;</span><span·class="w">
219 ···················</span><span·class="ss">mnesia_locker</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">lock_mgr</span><span·class="p">;</span><span·class="w">219 ···················</span><span·class="ss">mnesia_locker</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">lock_mgr</span><span·class="p">;</span><span·class="w">
220 ···················</span><span·class="p">_</span><span·class="w">·············</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">A</span><span·class="w">220 ···················</span><span·class="p">_</span><span·class="w">·············</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">A</span><span·class="w">
221 ···············</span><span·class="k">end</span><span·class="w">221 ···············</span><span·class="k">end</span><span·class="w">
222 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">222 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
223 ····</span><span·class="p"·data-group-id="6436415545-4">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="6436415545-5">{</span><span·class="ss">from</span>[·...·truncated·by·diffoscope;·len:·322,·SHA:·2618eb120958660dd36a2df76feaa0b957886e04a0c4a2be72d052563270a1f1·...·]5-6">)</span><span·class="p">,</span><span·class="w">223 ····</span><span·class="p"·data-group-id="5696872865-4">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="5696872865-5">{</span><span·class="ss">from</span>[·...·truncated·by·diffoscope;·len:·322,·SHA:·0ce8c9d903cb7f4f3bb6180a6e53d0f03cf545e2575eaceb752b45dbd356c514·...·]5-6">)</span><span·class="p">,</span><span·class="w">
224 ···················</span><span·class="ss">to</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Actor</span><span·class="p"·data-group-id="6436415545-7">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-group-id="6436415545-7">)</span><span·class="p">,</span><span·class="w">224 ···················</span><span·class="ss">to</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Actor</span><span·class="p"·data-group-id="5696872865-7">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-group-id="5696872865-7">)</span><span·class="p">,</span><span·class="w">
225 ···················</span><span·class="ss">contents</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6436415545-8">[</span><span·class="p"·data-group-id="6436415545-9">{</span><span·class="ss">orig_from</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·69,·SHA:·17104b1a2cd1cf1034250bde4cd7822d3a1d7153495303e513648a7f9967fd41·...·]5-9">}</span><span·class="p">,</span><span·class="w">225 ···················</span><span·class="ss">contents</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5696872865-8">[</span><span·class="p"·data-group-id="5696872865-9">{</span><span·class="ss">orig_from</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·69,·SHA:·7e865c216d4331a42e0af915f0d0a996f5ee1adafafe98c58110123337f27262·...·]5-9">}</span><span·class="p">,</span><span·class="w">
226 ·······························</span><span·class="p"·data-group-id="6436415545-10">{</span><span·class="ss">orig_to</span><span·class="p">,</span><span·class="w">···</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·15,·SHA:·cafcb365fe51e9899571d8a9c29fa1619a1b32cd19c5e834fe02329a4930c5e0·...·]5-10">}</span><span·class="p">,</span><span·class="w">226 ·······························</span><span·class="p"·data-group-id="5696872865-10">{</span><span·class="ss">orig_to</span><span·class="p">,</span><span·class="w">···</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·15,·SHA:·7b17d31cf86fb2ee6445331475d7f914f15c3a462413c5729b1a388551be7acf·...·]5-10">}</span><span·class="p">,</span><span·class="w">
227 ·······························</span><span·class="p"·data-group-id="6436415545-11">{</span><span·class="ss">orig_contents</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">contents</span><span·class="p"[·...·truncated·by·diffoscope;·len:·949,·SHA:·5bb599e8b0306b855d63585e9ac043e79598f5794775ea68cc8d9db8fca64dad·...·]-2">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">227 ·······························</span><span·class="p"·data-group-id="5696872865-11">{</span><span·class="ss">orig_contents</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">contents</span><span·class="p"[·...·truncated·by·diffoscope;·len:·949,·SHA:·5d47e5ccbde0a430f1e51e243f9aec7bb6bd10b26cf71064ac31b21e12a02dfb·...·]-2">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
228 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">6.13229925</span><span·class="o">&gt;</span><span·class="gp·unselectable">228 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="p">.</span><span·class="mf">6.13229925</span><span·class="o">&gt;</span><span·class="gp·unselectable">
229 5&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">dict_insert</span><span·class="p"·data-group-id="8344401625-3">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8344401625-4">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mgr_ac[·...·truncated·by·diffoscope;·len:·179,·SHA:·021390cd372d2ce23c5eacd86423d1e31406836ee1496e6f5e280f5d7b1a1d2b·...·]-3">)</span><span·class="p">.</span><span·class="w">229 5&gt;·</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">dict_insert</span><span·class="p"·data-group-id="1733196501-3">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1733196501-4">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mgr_ac[·...·truncated·by·diffoscope;·len:·179,·SHA:·f856cf28a9eace51fb23dae8dc427f339f9143f5901e62fa6419d56887837ace·...·]-3">)</span><span·class="p">.</span><span·class="w">
230 </span><span·class="ss">ok</span></code></pre><p>you·will·see·that·the·<code·class="inline">Filter</code>·menu·in·all·viewers·have·got·a·new·entry·called230 </span><span·class="ss">ok</span></code></pre><p>you·will·see·that·the·<code·class="inline">Filter</code>·menu·in·all·viewers·have·got·a·new·entry·called
231 <code·class="inline">mgr_actors</code>.·Select·it,·and·a·new·<code·class="inline">Viewer</code>·window·will·pop·up:</p><p><img·src="assets/sim_trans_mgr_actors.png"·alt="The·same·trace·data·in·a·different·view"·title="The·same·trace·data·in·a·different·view"/></p><p>In·order·to·see·the·nitty·gritty·details·of·an·<code·class="inline">Event</code>·you·may·click·on·the231 <code·class="inline">mgr_actors</code>.·Select·it,·and·a·new·<code·class="inline">Viewer</code>·window·will·pop·up:</p><p><img·src="assets/sim_trans_mgr_actors.png"·alt="The·same·trace·data·in·a·different·view"·title="The·same·trace·data·in·a·different·view"/></p><p>In·order·to·see·the·nitty·gritty·details·of·an·<code·class="inline">Event</code>·you·may·click·on·the
232 <code·class="inline">Event</code>·in·order·to·start·a·<code·class="inline">Contents·Viewer</code>·for·that·<code·class="inline">Event</code>.·In·the232 <code·class="inline">Event</code>·in·order·to·start·a·<code·class="inline">Contents·Viewer</code>·for·that·<code·class="inline">Event</code>.·In·the
233 <code·class="inline">Contents·Viewer</code>·there·also·is·a·filter·menu·that·enables·inspection·of·the233 <code·class="inline">Contents·Viewer</code>·there·also·is·a·filter·menu·that·enables·inspection·of·the
234 <code·class="inline">Event</code>·from·other·views·than·the·one·selected·in·the·viewer.·A·click·on·the234 <code·class="inline">Event</code>·from·other·views·than·the·one·selected·in·the·viewer.·A·click·on·the
235 <code·class="inline">new_tid</code>·<code·class="inline">Event</code>·will·cause·a·<code·class="inline">Contents·Viewer</code>·window·to·pop·up,·showing·the235 <code·class="inline">new_tid</code>·<code·class="inline">Event</code>·will·cause·a·<code·class="inline">Contents·Viewer</code>·window·to·pop·up,·showing·the
236 <code·class="inline">Event</code>·in·the·<code·class="inline">mgr_actors</code>·view:</p><p><img·src="assets/sim_trans_contents_viewer_mgr_actors.png"·alt="The·trace·Event·in·the·mgr_actors·view"·title="The·trace·Event·in·the·mgr_actors·view"/></p><p>Select·the·<code·class="inline">all</code>·entry·in·the·<code·class="inline">Filters</code>·menu·and·a·new·<code·class="inline">Contents·Viewer·window</code>236 <code·class="inline">Event</code>·in·the·<code·class="inline">mgr_actors</code>·view:</p><p><img·src="assets/sim_trans_contents_viewer_mgr_actors.png"·alt="The·trace·Event·in·the·mgr_actors·view"·title="The·trace·Event·in·the·mgr_actors·view"/></p><p>Select·the·<code·class="inline">all</code>·entry·in·the·<code·class="inline">Filters</code>·menu·and·a·new·<code·class="inline">Contents·Viewer·window</code>
172 KB
./usr/share/doc/erlang-doc/html/lib/et-1.7.1/doc/html/et_examples.html
    
Offset 129, 178 lines modifiedOffset 129, 178 lines modified
129 ··<a·href="#a-simulated-mnesia-transaction"·class="hover-link">129 ··<a·href="#a-simulated-mnesia-transaction"·class="hover-link">
130 ····<i·class="ri-link-m"·aria-hidden="true"></i>130 ····<i·class="ri-link-m"·aria-hidden="true"></i>
131 ··</a>131 ··</a>
132 ··<span·class="text">A·simulated·Mnesia·transaction</span>132 ··<span·class="text">A·simulated·Mnesia·transaction</span>
133 </h2>133 </h2>
134 <p>The·Erlang·code·for·running·the·simulated·<code·class="inline">Mnesia</code>·transaction·example·in·the134 <p>The·Erlang·code·for·running·the·simulated·<code·class="inline">Mnesia</code>·transaction·example·in·the
135 previous·chapter·is·included·in·the·<code·class="inline">et/examples/et_demo.erl</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">135 previous·chapter·is·included·in·the·<code·class="inline">et/examples/et_demo.erl</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
136 </span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="6971739145-1">(</span><span·class="p"·data-group-id="6971739145-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">136 </span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="2352307853-1">(</span><span·class="p"·data-group-id="2352307853-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
137 ····</span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="6971739145-2">(</span><span·class="p"·data-group-id="6971739145-3">[</span><span·class="p"·data-group-id="6971739145-3">]</span><span·class="p"·data-group-id="6971739145-2">)</span><span·class="p">.</span><span·class="w">137 ····</span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="2352307853-2">(</span><span·class="p"·data-group-id="2352307853-3">[</span><span·class="p"·data-group-id="2352307853-3">]</span><span·class="p"·data-group-id="2352307853-2">)</span><span·class="p">.</span><span·class="w">
  
138 </span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="6971739145-4">(</span><span·class="n">ExtraOptions</span><span·class="p"·data-group-id="6971739145-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 </span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="2352307853-4">(</span><span·class="n">ExtraOptions</span><span·class="p"·data-group-id="2352307853-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ····</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6971739145-5">[</span><span·class="p"·data-group-id="6971739145-6">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6971739145-7">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mgr_actors</span><span·class="p"·data-group-id="6971739145-7">}</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">mgr_actors</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="6971739145-6">}</span><span·class="p"·data-group-id="6971739145-5">]</span><span·class="p">,</span><span·class="w"> 
140 ····</span><span·class="p"·data-group-id="6971739145-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="6971739145-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class=[·...·truncated·by·diffoscope;·len:·340,·SHA:·88f45b1e3bbcccb303fed21ae3a701534b0c382c00b9de4b2fa0078b5943e312·...·]</span><span·class="p">,</span><span·class="w">139 ····</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2352307853-5">[</span><span·class="p"·data-group-id="2352307853-6">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·520,·SHA:·51af2a1c6ad4e8a11eacce46d59838e34dbcd550afa7b584622750081e21be2b·...·]</span><span·class="p">,</span><span·class="w">
 140 ····</span><span·class="p"·data-group-id="2352307853-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="2352307853-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="2352307853-9">(</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">ExtraOptions</span><span·class="p"·data-group-id="2352307853-9">)</span><span·class="p">,</span><span·class="w">
141 ····</span><span·class="n">Collector</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="6971739145-10">(</span><span·class="n">Viewer</span><span·class="p"·data-group-id="6971739145-10">)</span><span·class="p">,</span><span·class="w">141 ····</span><span·class="n">Collector</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="2352307853-10">(</span><span·class="n">Viewer</span><span·class="p"·data-group-id="2352307853-10">)</span><span·class="p">,</span><span·class="w">
142 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-11">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_outer</span><span·class="p">,</span><span·class="w">142 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-11">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start_outer</span><span·class="p">,</span><span·class="w">
143 ······························</span><span·class="s">&quot;Start·outer·transaction&quot;</span><span·class="p"·data-group-id="6971739145-11">)</span><span·class="p">,</span><span·class="w">143 ······························</span><span·class="s">&quot;Start·outer·transaction&quot;</span><span·class="p"·data-group-id="2352307853-11">)</span><span·class="p">,</span><span·class="w">
144 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-12">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new_tid</span><span·class="p">,</span><span·class="w">144 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-12">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new_tid</span><span·class="p">,</span><span·class="w">
145 ······························</span><span·class="s">&quot;New·transaction·id·is·4711&quot;</span><span·class="p"·data-group-id="6971739145-12">)</span><span·class="p">,</span><span·class="w">145 ······························</span><span·class="s">&quot;New·transaction·id·is·4711&quot;</span><span·class="p"·data-group-id="2352307853-12">)</span><span·class="p">,</span><span·class="w">
146 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-13">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">try_write_lock</span><span·class="p">,</span><span·class="w">146 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-13">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">try_write_lock</span><span·class="p">,</span><span·class="w">
147 ······························</span><span·class="s">&quot;Acquire·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="6971739145-13">)</span><span·class="p">,</span><span·class="w">147 ······························</span><span·class="s">&quot;Acquire·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="2352307853-13">)</span><span·class="p">,</span><span·class="w">
148 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-14">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">granted</span><span·class="p">,</span><span·class="w">148 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-14">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">granted</span><span·class="p">,</span><span·class="w">
149 ······························</span><span·class="s">&quot;You·got·the·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="6971739145-14">)</span><span·class="p">,</span><span·class="w">149 ······························</span><span·class="s">&quot;You·got·the·write·lock·for·{my_tab,·key}&quot;</span><span·class="p"·data-group-id="2352307853-14">)</span><span·class="p">,</span><span·class="w">
150 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-15">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">do_commit</span><span·class="p">,</span><span·class="w">150 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-15">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">do_commit</span><span·class="p">,</span><span·class="w">
151 ······························</span><span·class="s">&quot;Perform··transaction·commit&quot;</span><span·class="p"·data-group-id="6971739145-15">)</span><span·class="p">,</span><span·class="w">151 ······························</span><span·class="s">&quot;Perform··transaction·commit&quot;</span><span·class="p"·data-group-id="2352307853-15">)</span><span·class="p">,</span><span·class="w">
152 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-16">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">release_tid</span><span·class="p">,</span><span·class="w">152 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-16">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">40</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_locker</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">release_tid</span><span·class="p">,</span><span·class="w">
153 ······························</span><span·class="s">&quot;Release·all·locks·for·transaction·4711&quot;</span><span·class="p"·data-group-id="6971739145-16">)</span><span·class="p">,</span><span·class="w">153 ······························</span><span·class="s">&quot;Release·all·locks·for·transaction·4711&quot;</span><span·class="p"·data-group-id="2352307853-16">)</span><span·class="p">,</span><span·class="w">
154 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-17">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete_transaction</span><span·class="p">,</span><span·class="w">154 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-17">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">60</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_tm</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete_transaction</span><span·class="p">,</span><span·class="w">
155 ······························</span><span·class="s">&quot;End·of·outer·transaction&quot;</span><span·class="p"·data-group-id="6971739145-17">)</span><span·class="p">,</span><span·class="w">155 ······························</span><span·class="s">&quot;End·of·outer·transaction&quot;</span><span·class="p"·data-group-id="2352307853-17">)</span><span·class="p">,</span><span·class="w">
156 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="6971739145-18">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_outer</span><span·class="p">,</span><span·class="w">156 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2352307853-18">(</span><span·class="n">Collector</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_shell</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">end_outer</span><span·class="p">,</span><span·class="w">
157 ······························</span><span·class="s">&quot;Transaction·returned·{atomic,·ok}&quot;</span><span·class="p"·data-group-id="6971739145-18">)</span><span·class="p">,</span><span·class="w">157 ······························</span><span·class="s">&quot;Transaction·returned·{atomic,·ok}&quot;</span><span·class="p"·data-group-id="2352307853-18">)</span><span·class="p">,</span><span·class="w">
158 ····</span><span·class="p"·data-group-id="6971739145-19">{</span><span·class="ss">collector</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Collector</span><span·class="p"·data-group-id="6971739145-19">}</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="w">158 ····</span><span·class="p"·data-group-id="2352307853-19">{</span><span·class="ss">collector</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Collector</span><span·class="p"·data-group-id="2352307853-19">}</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
159 </span><span·class="nf">mgr_actors</span><span·class="p"·data-group-id="9272714661-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="9272714661-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="9272714661-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·817c965c88914ae816c3568a84996a59c374ac427536531eb36e151054d6a0f4·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 </span><span·class="nf">mgr_actors</span><span·class="p"·data-group-id="2741091013-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="2741091013-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="2741091013-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·8bb7bd31ff1ec72090971cb418dbb17f56cd687bb8191f3c8a10d3df8e288535·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ····</span><span·class="n">Actor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="9272714661-3">(</span><span·class="n">A</span><span·class="p"·data-group-id="9272714661-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">160 ····</span><span·class="n">Actor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2741091013-3">(</span><span·class="n">A</span><span·class="p"·data-group-id="2741091013-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
161 ···············</span><span·class="k">case</span><span·class="w">·</span><span·class="n">A</span><span·class="w">·</span><span·class="k">of</span><span·class="w">161 ···············</span><span·class="k">case</span><span·class="w">·</span><span·class="n">A</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
162 ···················</span><span·class="ss">mnesia_tm</span><span·class="w">·····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">trans_mgr</span><span·class="p">;</span><span·class="w">162 ···················</span><span·class="ss">mnesia_tm</span><span·class="w">·····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">trans_mgr</span><span·class="p">;</span><span·class="w">
163 ···················</span><span·class="ss">mnesia_locker</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">lock_mgr</span><span·class="p">;</span><span·class="w">163 ···················</span><span·class="ss">mnesia_locker</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">lock_mgr</span><span·class="p">;</span><span·class="w">
164 ···················</span><span·class="p">_</span><span·class="w">·············</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">A</span><span·class="w">164 ···················</span><span·class="p">_</span><span·class="w">·············</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">A</span><span·class="w">
165 ···············</span><span·class="k">end</span><span·class="w">165 ···············</span><span·class="k">end</span><span·class="w">
166 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">166 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
167 ····</span><span·class="p"·data-group-id="9272714661-4">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="9272714661-5">{</span><span·class="ss">from</span>[·...·truncated·by·diffoscope;·len:·323,·SHA:·e38a5fb8f3089fb4e218ea980f696a5144fc06d3aaaba55ca97cfe4f5d749863·...·]-6">)</span><span·class="p">,</span><span·class="w">167 ····</span><span·class="p"·data-group-id="2741091013-4">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="2741091013-5">{</span><span·class="ss">from</span>[·...·truncated·by·diffoscope;·len:·323,·SHA:·3523824757e75447f42918df3557635c765e4445d34b72c5cb530de39f1c19e0·...·]-6">)</span><span·class="p">,</span><span·class="w">
168 ···················</span><span·class="ss">to</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Actor</span><span·class="p"·data-group-id="9272714661-7">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-group-id="9272714661-7">)</span><span·class="p">,</span><span·class="w">168 ···················</span><span·class="ss">to</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Actor</span><span·class="p"·data-group-id="2741091013-7">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-group-id="2741091013-7">)</span><span·class="p">,</span><span·class="w">
169 ···················</span><span·class="ss">contents</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9272714661-8">[</span><span·class="p"·data-group-id="9272714661-9">{</span><span·class="ss">orig_from</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·70,·SHA:·8c978325d7303576cf6e50831f7ae531b422d65be1b6a29e61f51c3b6d0da68a·...·]-9">}</span><span·class="p">,</span><span·class="w">169 ···················</span><span·class="ss">contents</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2741091013-8">[</span><span·class="p"·data-group-id="2741091013-9">{</span><span·class="ss">orig_from</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·70,·SHA:·1a38a83f8e0bd019803bbadf0a7a29b21be4a504a6eda8b06527ffcd3f33290b·...·]-9">}</span><span·class="p">,</span><span·class="w">
170 ·······························</span><span·class="p"·data-group-id="9272714661-10">{</span><span·class="ss">orig_to</span><span·class="p">,</span><span·class="w">···</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·0c89e5b2756cc37dd4e9c06a7c0a8fadc144cfa7edb77967483eaa1b7dfb0b05·...·]-10">}</span><span·class="p">,</span><span·class="w">170 ·······························</span><span·class="p"·data-group-id="2741091013-10">{</span><span·class="ss">orig_to</span><span·class="p">,</span><span·class="w">···</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">to</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·52deba5b52cf683cb15a28154e18f397a62b32eefde8ac296359432c61da9f12·...·]-10">}</span><span·class="p">,</span><span·class="w">
171 ·······························</span><span·class="p"·data-group-id="9272714661-11">{</span><span·class="ss">orig_contents</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">contents</span><span·class="p"[·...·truncated·by·diffoscope;·len:·186,·SHA:·f61470d3cdd019a073c07ef0abc43f7ddafb9180e8ff64fbe2bfd5a4d5103775·...·]-4">}</span><span·class="p">.</span></code></pre><p>If·you·invoke·the·<code·class="inline">et_demo:sim_trans()</code>·function,·a·<code·class="inline">Viewer</code>·window·will·pop·up171 ·······························</span><span·class="p"·data-group-id="2741091013-11">{</span><span·class="ss">orig_contents</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">contents</span><span·class="p"[·...·truncated·by·diffoscope;·len:·186,·SHA:·56499cf7f85b359984ea72ed0d5ea74f8d53bf21e58f9922664e71da863ffd20·...·]-4">}</span><span·class="p">.</span></code></pre><p>If·you·invoke·the·<code·class="inline">et_demo:sim_trans()</code>·function,·a·<code·class="inline">Viewer</code>·window·will·pop·up
172 and·the·sequence·trace·will·be·almost·the·same·as·if·the·following·<code·class="inline">Mnesia</code>172 and·the·sequence·trace·will·be·almost·the·same·as·if·the·following·<code·class="inline">Mnesia</code>
173 transaction·would·have·been·run:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="8757680071-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8757680071-2">(</span><span·class="p"·data-group-id="8757680071-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</[·...·truncated·by·diffoscope;·len:·2205,·SHA:·a88bf009c0bfc342d15e1b3dd95742758f7f541c51804a7b1b6b24cccee96f99·...·]-6">]</span><span·class="w">173 transaction·would·have·been·run:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="4284814974-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4284814974-2">(</span><span·class="p"·data-group-id="4284814974-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</[·...·truncated·by·diffoscope;·len:·2205,·SHA:·86afc0abf023c13c62da3dcb9d122b314a525063fe8733c1466a9e62c89b586f·...·]-6">]</span><span·class="w">
  
174 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">7.4</span><span·class="w">··</span><span·class="p"·data-group-id="0331252502-7">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="0331252502-7">)</span><span·class="gp·unselectable">174 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">7.4</span><span·class="w">··</span><span·class="p"·data-group-id="2484295574-7">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2484295574-7">)</span><span·class="gp·unselectable">
175 1&gt;·</span><span·class="p"·data-group-id="0331252502-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="0331252502-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·282,·SHA:·cdcd4d003cc20bec3a3ca37dea73e64b133dd2d11ed3a24f6b641b5930f1b94a·...·]-9">)</span><span·class="p">.</span><span·class="w">175 1&gt;·</span><span·class="p"·data-group-id="2484295574-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="2484295574-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·282,·SHA:·1616bdc8d299bfc4a7df6289a2e3c18096ca0d1231fe1572b04a9e6df659b32d·...·]-9">)</span><span·class="p">.</span><span·class="w">
176 </span><span·class="p"·data-group-id="0331252502-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">;</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·eca78fd757376b80e0feda4dc12ae90587114edd1e62f646c180d910df92fac2·...·]-11">}</span><span·class="gp·unselectable">176 </span><span·class="p"·data-group-id="2484295574-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.40</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">;</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·9141cc1be517a47e59f9f2f18109c3610e7d66ef3a3ae90bb6388aaa75981c6f·...·]-11">}</span><span·class="gp·unselectable">
177 2&gt;·</span><span·class="nc">et_demo</span><span·class="p">:</span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="0331252502-12">(</span><span·class="p"·data-group-id="0331252502-12">)</span><span·class="p">.</span><span·class="w">177 2&gt;·</span><span·class="nc">et_demo</span><span·class="p">:</span><span·class="nf">sim_trans</span><span·class="p"·data-group-id="2484295574-12">(</span><span·class="p"·data-group-id="2484295574-12">)</span><span·class="p">.</span><span·class="w">
178 </span><span·class="p"·data-group-id="0331252502-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0331252502-14">{</span><span·class="ss">table_handle</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.45</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="mi">24596</span><span·class="p">,</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="w">178 </span><span·class="p"·data-group-id="2484295574-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2484295574-14">{</span><span·class="ss">table_handle</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.45</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="mi">24596</span><span·class="p">,</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="w">
179 ·····</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">et_collector</span><span·class="p">.</span><span·class="mf">0.62831470</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0331252502-14">}</span><span·class="p"·data-group-id="0331252502-13">}</span></code></pre><p><img·src="assets/sim_trans.png"·alt="A·simulated·Mnesia·transaction·which·writes·one·record"·title="A·simulated·Mnesia·transaction·which·writes·one·record"/></p><h2·id="some-convenient-functions-used-in-the-mnesia-transaction-example"·class="section-heading">179 ·····</span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">et_collector</span><span·class="p">.</span><span·class="mf">0.62831470</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2484295574-14">}</span><span·class="p"·data-group-id="2484295574-13">}</span></code></pre><p><img·src="assets/sim_trans.png"·alt="A·simulated·Mnesia·transaction·which·writes·one·record"·title="A·simulated·Mnesia·transaction·which·writes·one·record"/></p><h2·id="some-convenient-functions-used-in-the-mnesia-transaction-example"·class="section-heading">
180 ··<a·href="#some-convenient-functions-used-in-the-mnesia-transaction-example"·class="hover-link">180 ··<a·href="#some-convenient-functions-used-in-the-mnesia-transaction-example"·class="hover-link">
181 ····<i·class="ri-link-m"·aria-hidden="true"></i>181 ····<i·class="ri-link-m"·aria-hidden="true"></i>
182 ··</a>182 ··</a>
183 ··<span·class="text">Some·convenient·functions·used·in·the·Mnesia·transaction·example</span>183 ··<span·class="text">Some·convenient·functions·used·in·the·Mnesia·transaction·example</span>
184 </h2>184 </h2>
185 <p>The·<code·class="inline">module_as_actor</code>·filter·converts·the·<code·class="inline">Event·Records</code>·so·the·module·names185 <p>The·<code·class="inline">module_as_actor</code>·filter·converts·the·<code·class="inline">Event·Records</code>·so·the·module·names
186 becomes·actors·and·the·invoked·functions·becomes·labels.·If·the·information186 becomes·actors·and·the·invoked·functions·becomes·labels.·If·the·information
187 about·who·the·caller·was·it·will·be·displayed·as·an·arrow·directed·from·the187 about·who·the·caller·was·it·will·be·displayed·as·an·arrow·directed·from·the
188 caller·to·the·callee.·The·<code·class="inline">[{message,·{caller}},·{return_trace}]</code>·options·to188 caller·to·the·callee.·The·<code·class="inline">[{message,·{caller}},·{return_trace}]</code>·options·to
189 <a·href="../../../../lib/runtime_tools-2.1/doc/html/dbg.html#tpl/2"><code·class="inline">dbg:tpl/2</code></a>·function·will·imply·the·necessary·information·in·the·Erlang·traces.189 <a·href="../../../../lib/runtime_tools-2.1/doc/html/dbg.html#tpl/2"><code·class="inline">dbg:tpl/2</code></a>·function·will·imply·the·necessary·information·in·the·Erlang·traces.
190 Here·follows·the·<code·class="inline">module_as_actor</code>·filter:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">190 Here·follows·the·<code·class="inline">module_as_actor</code>·filter:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
191 </span><span·class="nf">module_as_actor</span><span·class="p"·data-group-id="5216502545-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="5216502545-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="5216502545-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·919706abdbdb298df6cf534cd73e0185966376041bf8e1db82d4c13f07326608·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 </span><span·class="nf">module_as_actor</span><span·class="p"·data-group-id="7925347763-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="7925347763-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="7925347763-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·495b67db327996070749e9069afaa14e310bde1f9452063ea751341446388588·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keysearch</span><span·class="p"·data-group-id="5216502545-3">(</span><span·class="ss">mfa</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·cla[·...·truncated·by·diffoscope;·len:·88,·SHA:·7ac3c3a2c171a5ce8298f0be5d7c97bde6938447c5b3ffa492555eaa009a421d·...·]-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">192 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keysearch</span><span·class="p"·data-group-id="7925347763-3">(</span><span·class="ss">mfa</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·cla[·...·truncated·by·diffoscope;·len:·88,·SHA:·b6be8235460dc13dd0eababe842772ad5f39449df62a3c2d9063cbf76c37f858·...·]-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
193 ········</span><span·class="p"·data-group-id="5216502545-4">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5216502545-5">{</span><span·class="ss">mfa</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·363,·SHA:·369fee9d14327ae1246491c22367a81a693d50a2297563878f27ea082e7681bb·...·]-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 ········</span><span·class="p"·data-group-id="7925347763-4">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7925347763-5">{</span><span·class="ss">mfa</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·363,·SHA:·4b1d7f326b63ccc38ae94e27c9c41e03f7c0706f77f874b0c06184f4c809643e·...·]-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keysearch</span><span·class="p"·data-group-id="5216502545-7">(</span><span·class="ss">pam_result</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><s[·...·truncated·by·diffoscope;·len:·95,·SHA:·765c67a989446e72b1ed9f044cd63a8ba7d912fda5efcd9de151dcde893320ae·...·]-7">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">194 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keysearch</span><span·class="p"·data-group-id="7925347763-7">(</span><span·class="ss">pam_result</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><s[·...·truncated·by·diffoscope;·len:·95,·SHA:·d85356675f2182b438ca46d9f7409e6fec8afa4a2be0b6060d48a331365d51eb·...·]-7">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
195 ················</span><span·class="p"·data-group-id="5216502545-8">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5216502545-9">{</span><span·class="ss">pam_result</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·399,·SHA:·ac3d12e3e3f42987b204d8ff05c2d1ae2f61f4beb9f5dcfbbcc1c650ce25e57b·...·]-8">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">195 ················</span><span·class="p"·data-group-id="7925347763-8">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7925347763-9">{</span><span·class="ss">pam_result</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·399,·SHA:·d68954807574a0a740cd3f3047bdcd6817ffc18855ffd6488a30f8b05e76a5f6·...·]-8">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
196 ····················</span><span·class="p"·data-group-id="5216502545-11">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="5216502545-12">{</span><span·class="ss">label</sp[·...·truncated·by·diffoscope;·len:·537,·SHA:·89879e5a5361308198ff0cc768b8b0ac8cc644e2dec41e74bace992adb69c9bb·...·]-11">}</span><span·class="p">;</span><span·class="w">196 ····················</span><span·class="p"·data-group-id="7925347763-11">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="7925347763-12">{</span><span·class="ss">label</sp[·...·truncated·by·diffoscope;·len:·537,·SHA:·0758901213a7d0f44c33345d7e3313c3f685e678f8d05a20bdbe94eba0238603·...·]-11">}</span><span·class="p">;</span><span·class="w">
197 ················</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">197 ················</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
198 ····················</span><span·class="p"·data-group-id="5216502545-13">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="5216502545-14">{</span><span·class="ss">label</sp[·...·truncated·by·diffoscope;·len:·536,·SHA:·4b4fcaad55be826b7f6ad2e02fb51a98b9d2aa613ef1d52a7764c913f78bac56·...·]-13">}</span><span·class="w">198 ····················</span><span·class="p"·data-group-id="7925347763-13">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p"·data-group-id="7925347763-14">{</span><span·class="ss">label</sp[·...·truncated·by·diffoscope;·len:·536,·SHA:·1c1746a76f1cf260e80af25b8cf293e2f07d44aa1c7c8775ea9187509de48374·...·]-13">}</span><span·class="w">
199 ············</span><span·class="k">end</span><span·class="p">;</span><span·class="w">199 ············</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
200 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ············</span><span·class="ss">false</span><span·class="w">201 ············</span><span·class="ss">false</span><span·class="w">
202 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">plain_process_info</code>·filter·does·not·alter·the·<code·class="inline">Event·Records</code>.·It·merely202 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">plain_process_info</code>·filter·does·not·alter·the·<code·class="inline">Event·Records</code>.·It·merely
203 ensures·that·the·event·not·related·to·processes·are·skipped:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">203 ensures·that·the·event·not·related·to·processes·are·skipped:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
204 </span><span·class="nf">plain_process_info</span><span·class="p"·data-group-id="2337151762-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="2337151762-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="2337151762-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·fd1d0a32824b1d003eddb127b0dd66209fe6d3ddd8a02fbce9deae797521b0bf·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">204 </span><span·class="nf">plain_process_info</span><span·class="p"·data-group-id="6063125818-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="6063125818-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="6063125818-2">(</s[·...·truncated·by·diffoscope;·len:·146,·SHA:·cda1e5fe5292f0703eb22fa7bedcbe697d6e1ef06a9919960b41348715659cb6·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
205 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="k">of</span><span·class="w">205 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
206 ········</span><span·class="nb">send</span><span·class="w">··························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">206 ········</span><span·class="nb">send</span><span·class="w">··························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
207 ········</span><span·class="ss">send_to_non_existing_process</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">207 ········</span><span·class="ss">send_to_non_existing_process</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
208 ········</span><span·class="ss">&#39;receive&#39;</span><span·class="w">·····················</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">208 ········</span><span·class="ss">&#39;receive&#39;</span><span·class="w">·····················</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
209 ········</span><span·class="nb">spawn</span><span·class="w">·························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">209 ········</span><span·class="nb">spawn</span><span·class="w">·························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
210 ········</span><span·class="nb">exit</span><span·class="w">··························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">210 ········</span><span·class="nb">exit</span><span·class="w">··························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
211 ········</span><span·class="nb">link</span><span·class="w">··························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">211 ········</span><span·class="nb">link</span><span·class="w">··························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
212 ········</span><span·class="nb">unlink</span><span·class="w">························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">212 ········</span><span·class="nb">unlink</span><span·class="w">························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
213 ········</span><span·class="ss">getting_linked</span><span·class="w">················</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">213 ········</span><span·class="ss">getting_linked</span><span·class="w">················</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
214 ········</span><span·class="p"·data-group-id="2337151762-3">{</span><span·class="ss">seq_send</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Label</span><span·class="p"·data-group-id="2337151762-3">}</span><span·class="w">············</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">214 ········</span><span·class="p"·data-group-id="6063125818-3">{</span><span·class="ss">seq_send</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Label</span><span·class="p"·data-group-id="6063125818-3">}</span><span·class="w">············</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
215 ········</span><span·class="p"·data-group-id="2337151762-4">{</span><span·class="ss">seq_receive</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Label</span><span·class="p"·data-group-id="2337151762-4">}</span><span·class="w">·········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">215 ········</span><span·class="p"·data-group-id="6063125818-4">{</span><span·class="ss">seq_receive</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Label</span><span·class="p"·data-group-id="6063125818-4">}</span><span·class="w">·········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
216 ········</span><span·class="p"·data-group-id="2337151762-5">{</span><span·class="ss">seq_print</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Label</span><span·class="p"·data-group-id="2337151762-5">}</span><span·class="w">···········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">216 ········</span><span·class="p"·data-group-id="6063125818-5">{</span><span·class="ss">seq_print</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Label</span><span·class="p"·data-group-id="6063125818-5">}</span><span·class="w">···········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
217 ········</span><span·class="p"·data-group-id="2337151762-6">{</span><span·class="ss">drop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">N</span><span·class="p"·data-group-id="2337151762-6">}</span><span·class="w">····················</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">217 ········</span><span·class="p"·data-group-id="6063125818-6">{</span><span·class="ss">drop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">N</span><span·class="p"·data-group-id="6063125818-6">}</span><span·class="w">····················</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
218 ········</span><span·class="p">_</span><span·class="w">·····························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">218 ········</span><span·class="p">_</span><span·class="w">·····························</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">
219 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">plain_process_info_nolink</code>·filter·does·not·alter·the·<code·class="inline">Event·Records</code>.·It·do219 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">plain_process_info_nolink</code>·filter·does·not·alter·the·<code·class="inline">Event·Records</code>.·It·do
220 makes·use·of·the·<code·class="inline">plain_process_info</code>·,·but·do·also·ensure·that·the·process·info220 makes·use·of·the·<code·class="inline">plain_process_info</code>·,·but·do·also·ensure·that·the·process·info
221 related·to·linking·and·unlinking·is·skipped:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">221 related·to·linking·and·unlinking·is·skipped:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
222 </span><span·class="nf">plain_process_info_nolink</span><span·class="p"·data-group-id="1562980744-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="1562980744-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="1562980744-2">(</s[·...·truncated·by·diffoscope;·len:·145,·SHA:·ec4b5ae80d617ff572b978368f9fc9a659179489559c5aa6dda198182543a0e9·...·]4-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 </span><span·class="nf">plain_process_info_nolink</span><span·class="p"·data-group-id="7554580434-1">(</span><span·class="n">E</span><span·class="p"·data-group-id="7554580434-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_record</span><span·class="p"·data-group-id="7554580434-2">(</s[·...·truncated·by·diffoscope;·len:·145,·SHA:·bb5deaa1b0b2741e1e01a071a99f35a1f7eeb877650f06beb29b7fea0f873c3d·...·]4-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ····</span><span·class="p"·data-group-id="1562980744-3">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="o">/=</span><span·class="w">·</span><span·class="nb">link</span><sp[·...·truncated·by·diffoscope;·len:·37,·SHA:·91d1867e869967cb1a2695e6432581e9872efddc419d956a938d4a5420a04a12·...·]4-3">)</span><span·class="w">·</span><span·class="nf">and</span><span·class="w">223 ····</span><span·class="p"·data-group-id="7554580434-3">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="o">/=</span><span·class="w">·</span><span·class="nb">link</span><sp[·...·truncated·by·diffoscope;·len:·37,·SHA:·4e11358eb68711a4d451a17d2b1ec4b345a0dc494048fa0d98acd4f1417058c8·...·]4-3">)</span><span·class="w">·</span><span·class="nf">and</span><span·class="w">
224 ····</span><span·class="p"·data-group-id="1562980744-4">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="o">/=</span><span·class="w">·</span><span·class="nb">unlink</span><[·...·truncated·by·diffoscope;·len:·39,·SHA:·d9bfcbf90574a9b35c419f99cb3f51aac90ccab576a769ad12d42d61d11a7586·...·]4-4">)</span><span·class="w">·</span><span·class="nf">and</span><span·class="w">224 ····</span><span·class="p"·data-group-id="7554580434-4">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="o">/=</span><span·class="w">·</span><span·class="nb">unlink</span><[·...·truncated·by·diffoscope;·len:·39,·SHA:·e9d650778e092476c068ee8c13caaac7a9f37eb3ec8ff81c6aac181da6739254·...·]4-4">)</span><span·class="w">·</span><span·class="nf">and</span><span·class="w">
225 ····</span><span·class="p"·data-group-id="1562980744-5">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="o">/=</span><span·class="w">·</span><span·class="ss">getting_linked[·...·truncated·by·diffoscope;·len:·47,·SHA:·a7cca957181d9a21767cec89578421a322b0e56695c1436fbcd16a5fd02f857a·...·]4-5">)</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">225 ····</span><span·class="p"·data-group-id="7554580434-5">(</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">event</span><span·class="p">.</span><span·class="ss">label</span><span·class="w">·</span><span·class="o">/=</span><span·class="w">·</span><span·class="ss">getting_linked[·...·truncated·by·diffoscope;·len:·47,·SHA:·53eb69673ba14ba8263d8447fe943abad77d67bbffe5c9f06b47d3c7fca0ede2·...·]4-5">)</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">
226 ····</span><span·class="nf">plain_process_info</span><span·class="p"·data-group-id="1562980744-6">(</span><span·class="n">E</span><span·class="p"·data-group-id="1562980744-6">)</span><span·class="p">.</span></code></pre><p>In·order·to·simplify·the·startup·of·an·<code·class="inline">et_viewer</code>·process·with·the·filters226 ····</span><span·class="nf">plain_process_info</span><span·class="p"·data-group-id="7554580434-6">(</span><span·class="n">E</span><span·class="p"·data-group-id="7554580434-6">)</span><span·class="p">.</span></code></pre><p>In·order·to·simplify·the·startup·of·an·<code·class="inline">et_viewer</code>·process·with·the·filters
227 mentioned·above,·plus·some·others·(that·also·are·found·in227 mentioned·above,·plus·some·others·(that·also·are·found·in
228 <code·class="inline">et/examples/et_demo.erl</code>·src/et_collector.erl·the·<code·class="inline">et_demo:start/0,1</code>·functions228 <code·class="inline">et/examples/et_demo.erl</code>·src/et_collector.erl·the·<code·class="inline">et_demo:start/0,1</code>·functions
229 can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">229 can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
230 </span><span·class="nf">start</span><span·class="p"·data-group-id="7018280140-1">(</span><span·class="p"·data-group-id="7018280140-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">230 </span><span·class="nf">start</span><span·class="p"·data-group-id="8129021996-1">(</span><span·class="p"·data-group-id="8129021996-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
231 ····</span><span·class="nf">start</span><span·class="p"·data-group-id="7018280140-2">(</span><span·class="p"·data-group-id="7018280140-3">[</span><span·class="p"·data-group-id="7018280140-3">]</span><span·class="p"·data-group-id="7018280140-2">)</span><span·class="p">.</span><span·class="w">231 ····</span><span·class="nf">start</span><span·class="p"·data-group-id="8129021996-2">(</span><span·class="p"·data-group-id="8129021996-3">[</span><span·class="p"·data-group-id="8129021996-3">]</span><span·class="p"·data-group-id="8129021996-2">)</span><span·class="p">.</span><span·class="w">
  
232 </span><span·class="nf">start</span><span·class="p"·data-group-id="7018280140-4">(</span><span·class="n">ExtraOptions</span><span·class="p"·data-group-id="7018280140-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">232 </span><span·class="nf">start</span><span·class="p"·data-group-id="8129021996-4">(</span><span·class="n">ExtraOptions</span><span·class="p"·data-group-id="8129021996-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
233 ····</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7018280140-5">[</span><span·class="p"·data-group-id="7018280140-6">{</span><span·class="ss">trace_global</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="7018280140-6">}</span><span·class="p">,</span><span·class="w">233 ····</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8129021996-5">[</span><span·class="p"·data-group-id="8129021996-6">{</span><span·class="ss">trace_global</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8129021996-6">}</span><span·class="p">,</span><span·class="w">
234 ···············</span><span·class="p"·data-group-id="7018280140-7">{</span><span·class="ss">parent_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p"·data-group-id="7018280140-7">}</span><span·class="p">,</span><span·class="w">234 ···············</span><span·class="p"·data-group-id="8129021996-7">{</span><span·class="ss">parent_pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p"·data-group-id="8129021996-7">}</span><span·class="p">,</span><span·class="w">
235 ···············</span><span·class="p"·data-group-id="7018280140-8">{</span><span·class="ss">max_actors</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="7018280140-8">}</span><span·class="p">,</span><span·class="w">235 ···············</span><span·class="p"·data-group-id="8129021996-8">{</span><span·class="ss">max_actors</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="8129021996-8">}</span><span·class="p">,</span><span·class="w">
236 ···············</span><span·class="p"·data-group-id="7018280140-9">{</span><span·class="ss">max_events</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1000</span><span·class="p"·data-group-id="7018280140-9">}</span><span·class="p">,</span><span·class="w">236 ···············</span><span·class="p"·data-group-id="8129021996-9">{</span><span·class="ss">max_events</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1000</span><span·class="p"·data-group-id="8129021996-9">}</span><span·class="p">,</span><span·class="w">
237 ···············</span><span·class="p"·data-group-id="7018280140-10">{</span><span·class="ss">active_filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">module_as_actor</span><span·class="p"·data-group-id="7018280140-10">}</span><span·class="p"·data-group-id="7018280140-5">]</span><span·class="p">,</span><span·class="w">237 ···············</span><span·class="p"·data-group-id="8129021996-10">{</span><span·class="ss">active_filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">module_as_actor</span><span·class="p"·data-group-id="8129021996-10">}</span><span·class="p"·data-group-id="8129021996-5">]</span><span·class="p">,</span><span·class="w">
238 ····</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="7018280140-11">(</span><span·class="nf">filters</span><span·class="p"·data-group-id="7018280140-12">(</span><span·class="p"·data-group-id="7018280140-12">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">Optio[·...·truncated·by·diffoscope;·len:·158,·SHA:·cae6138341d5bb47786bc22422aefe5858b309b07a27742f9928f92e51d066af·...·]-11">)</span><span·class="p">.</span></code></pre><p>A·simple·one-liner·starts·the·tool:</p><pre><code·class="text">··········erl·-pa·../examples·-s·et_demo</code></pre><p>The·filters·are·included·by·the·following·parameters:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">238 ····</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="8129021996-11">(</span><span·class="nf">filters</span><span·class="p"·data-group-id="8129021996-12">(</span><span·class="p"·data-group-id="8129021996-12">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">Optio[·...·truncated·by·diffoscope;·len:·158,·SHA:·e7f628bd9a1ad8394c27b919cee05570544136373e6e0e431c14fed70b872ef8·...·]-11">)</span><span·class="p">.</span></code></pre><p>A·simple·one-liner·starts·the·tool:</p><pre><code·class="text">··········erl·-pa·../examples·-s·et_demo</code></pre><p>The·filters·are·included·by·the·following·parameters:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
239 </span><span·class="nf">filters</span><span·class="p"·data-group-id="3511528318-1">(</span><span·class="p"·data-group-id="3511528318-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">239 </span><span·class="nf">filters</span><span·class="p"·data-group-id="1642420295-1">(</span><span·class="p"·data-group-id="1642420295-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
240 ····</span><span·class="p"·data-group-id="3511528318-2">[</span><span·class="p"·data-group-id="3511528318-3">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3511528318-4">{</span><span·class="ss">filter</span><span·class="p"[·...·truncated·by·diffoscope;·len:·113,·SHA:·ee4fd0e3b8e31bb920f1eed6109a80c21af95e5cd8c8cd3e58f548faf07f6f8c·...·]-4">}</span><span·class="p">,</span><span·class="w">240 ····</span><span·class="p"·data-group-id="1642420295-2">[</span><span·class="p"·data-group-id="1642420295-3">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642420295-4">{</span><span·class="ss">filter</span><span·class="p"[·...·truncated·by·diffoscope;·len:·113,·SHA:·67d745b5c3d27a5dd42601e796a50cdb56dca4e2ea1d9b649fe9367fe13bcb05·...·]-4">}</span><span·class="p">,</span><span·class="w">
241 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">module_as_actor</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3511528318-3">}</span><span·class="p">,</span><span·class="w">241 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">module_as_actor</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1642420295-3">}</span><span·class="p">,</span><span·class="w">
242 ·····</span><span·class="p"·data-group-id="3511528318-5">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3511528318-6">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pla[·...·truncated·by·diffoscope;·len:·63,·SHA:·9e053615e83efcd11a3c35f0e4eed03d4bdedc3b6f1f4a5e58b23cb79a80cc47·...·]-6">}</span><span·class="p">,</span><span·class="w">242 ·····</span><span·class="p"·data-group-id="1642420295-5">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642420295-6">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pla[·...·truncated·by·diffoscope;·len:·63,·SHA:·807a859a038ad21e715c3f08d4f65616c1bb881c0d11fa4154232e45fa597575·...·]-6">}</span><span·class="p">,</span><span·class="w">
243 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">plain_process_info</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3511528318-5">}</span><span·class="p">,</span><span·class="w">243 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">plain_process_info</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1642420295-5">}</span><span·class="p">,</span><span·class="w">
244 ·····</span><span·class="p"·data-group-id="3511528318-7">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3511528318-8">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pla[·...·truncated·by·diffoscope;·len:·70,·SHA:·4a8ac0b996b83dee361227c0cf836532d89d926bb42a8090ba3b5ccb17122c7b·...·]-8">}</span><span·class="p">,</span><span·class="w">244 ·····</span><span·class="p"·data-group-id="1642420295-7">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642420295-8">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pla[·...·truncated·by·diffoscope;·len:·70,·SHA:·b05f2aed378af8bbbd440a3f8b3ab450d4d5feca113f700a615439c13b55586c·...·]-8">}</span><span·class="p">,</span><span·class="w">
245 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">plain_process_info_nolink</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3511528318-7">}</span><span·class="p">,</span><span·class="w">245 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">plain_process_info_nolink</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1642420295-7">}</span><span·class="p">,</span><span·class="w">
246 ·····</span><span·class="p"·data-group-id="3511528318-9">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3511528318-10">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">na[·...·truncated·by·diffoscope;·len:·64,·SHA:·f6ac87bc4fc9f9a8b9bf0dca51078f3585ef7da363873c95d735c874986f29d3·...·]-10">}</span><span·class="p">,</span><span·class="w">246 ·····</span><span·class="p"·data-group-id="1642420295-9">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642420295-10">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">na[·...·truncated·by·diffoscope;·len:·64,·SHA:·2a846ba3e7809cc0eba58cd6cfc1bcde0ff6fcb4a6d003f274fa3424c05b1617·...·]-10">}</span><span·class="p">,</span><span·class="w">
247 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">named_process_info</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3511528318-9">}</span><span·class="p">,</span><span·class="w">247 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">named_process_info</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1642420295-9">}</span><span·class="p">,</span><span·class="w">
248 ·····</span><span·class="p"·data-group-id="3511528318-11">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3511528318-12">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">n[·...·truncated·by·diffoscope;·len:·72,·SHA:·0cffd41d9838d781e38fae0305c50313ce031ce38b1bb8580fc38b6a4e6b7484·...·]-12">}</span><span·class="p">,</span><span·class="w">248 ·····</span><span·class="p"·data-group-id="1642420295-11">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642420295-12">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">n[·...·truncated·by·diffoscope;·len:·72,·SHA:·b5c1b22be6d3dd556dbceef522a80ee4eaf94182277dff3d6cf1407cc20e0d0d·...·]-12">}</span><span·class="p">,</span><span·class="w">
249 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">named_process_info_nolink</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3511528318-11">}</span><span·class="p">,</span><span·class="w">249 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">named_process_info_nolink</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1642420295-11">}</span><span·class="p">,</span><span·class="w">
250 ·····</span><span·class="p"·data-group-id="3511528318-13">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3511528318-14">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">n[·...·truncated·by·diffoscope;·len:·64,·SHA:·e2875f64b193790f9ba489778a6959d3fde13e232ccc7df8f16a2a7b6cd42fe7·...·]-14">}</span><span·class="p">,</span><span·class="w">250 ·····</span><span·class="p"·data-group-id="1642420295-13">{</span><span·class="ss">dict_insert</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642420295-14">{</span><span·class="ss">filter</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">n[·...·truncated·by·diffoscope;·len:·64,·SHA:·1797b0e0ead9d0ff344643f4eccac438361dbd9dc79ed089d83f73454d2a04df·...·]-14">}</span><span·class="p">,</span><span·class="w">
251 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">node_process_info</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3511528318-13">}</span><span·class="p">,</span><span·class="w">251 ···················</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">node_process_info</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1642420295-13">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 96896/176207 bytes (54.99%) of diff not shown.
57.8 KB
./usr/share/doc/erlang-doc/html/lib/et-1.7.1/doc/html/et_tutorial.html
    
Offset 129, 49 lines modifiedOffset 129, 49 lines modified
129 ··<a·href="#visualizing-message-sequence-charts"·class="hover-link">129 ··<a·href="#visualizing-message-sequence-charts"·class="hover-link">
130 ····<i·class="ri-link-m"·aria-hidden="true"></i>130 ····<i·class="ri-link-m"·aria-hidden="true"></i>
131 ··</a>131 ··</a>
132 ··<span·class="text">Visualizing·Message·Sequence·Charts</span>132 ··<span·class="text">Visualizing·Message·Sequence·Charts</span>
133 </h2>133 </h2>
134 <p>The·easiest·way·of·using·<code·class="inline">ET</code>,·is·to·just·use·it·as·a·graphical·tool·for134 <p>The·easiest·way·of·using·<code·class="inline">ET</code>,·is·to·just·use·it·as·a·graphical·tool·for
135 displaying·message·sequence·charts.·In·order·to·do·that·you·need·to·first·start135 displaying·message·sequence·charts.·In·order·to·do·that·you·need·to·first·start
136 a·<code·class="inline">Viewer</code>·(which·by·default·starts·a·<code·class="inline">Collector</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="9887843771-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ViewerPid</span><span·class="p"·data-group-id="9887843771-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·489,·SHA:·2c5b5532c91a3a38281e8385d30437f6b5ee385bc5cd4b472c9c0dc9ad5b0c12·...·]-2">)</span><span·class="p">,</span><span·class="w">136 a·<code·class="inline">Viewer</code>·(which·by·default·starts·a·<code·class="inline">Collector</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="6871939865-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ViewerPid</span><span·class="p"·data-group-id="6871939865-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·489,·SHA:·46fa0b82b99d3f07db11f0c6719850fb21167cb67c52e63f85cf438a67ed057d·...·]-2">)</span><span·class="p">,</span><span·class="w">
137 ······</span><span·class="n">CollectorPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="9887843771-5">(</span><span·class="n">ViewerPid</span><span·class="p"·data-group-id="9887843771-5">)</span><span·class="p">.</span></code></pre><p><a·href=""·id="report_event"></a></p><p>Then·you·send·events·to·the·<code·class="inline">Collector</code>·with·the·function137 ······</span><span·class="n">CollectorPid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="6871939865-5">(</span><span·class="n">ViewerPid</span><span·class="p"·data-group-id="6871939865-5">)</span><span·class="p">.</span></code></pre><p><a·href=""·id="report_event"></a></p><p>Then·you·send·events·to·the·<code·class="inline">Collector</code>·with·the·function
138 <a·href="et_collector.html#report_event/6"><code·class="inline">et_collector:report_event/6</code></a>·like·this:</p><pre><code·class="text">······et_collector:report_event(CollectorPid,85,from,to,message,extra_stuff).</code></pre><p>The·<code·class="inline">Viewer</code>·will·automatically·pull·events·from·the·<code·class="inline">Collector</code>·and·display138 <a·href="et_collector.html#report_event/6"><code·class="inline">et_collector:report_event/6</code></a>·like·this:</p><pre><code·class="text">······et_collector:report_event(CollectorPid,85,from,to,message,extra_stuff).</code></pre><p>The·<code·class="inline">Viewer</code>·will·automatically·pull·events·from·the·<code·class="inline">Collector</code>·and·display
139 them·on·the·screen.</p><p>The·number·(in·this·case·85)·is·an·integer·from·1·to·100·that·specifies·the139 them·on·the·screen.</p><p>The·number·(in·this·case·85)·is·an·integer·from·1·to·100·that·specifies·the
140 &quot;detail·level&quot;·of·the·message.·The·higher·the·number,·the·more·important·it·is.140 &quot;detail·level&quot;·of·the·message.·The·higher·the·number,·the·more·important·it·is.
141 This·provides·a·crude·form·of·priority·filtering.</p><p>The·<code·class="inline">from</code>,·<code·class="inline">to</code>,·and·<code·class="inline">message</code>·parameters·are·exactly·what·they·sound·like.141 This·provides·a·crude·form·of·priority·filtering.</p><p>The·<code·class="inline">from</code>,·<code·class="inline">to</code>,·and·<code·class="inline">message</code>·parameters·are·exactly·what·they·sound·like.
142 <code·class="inline">from</code>·and·<code·class="inline">to</code>·are·visualized·in·the·<code·class="inline">Viewer</code>·as·&quot;lifelines&quot;,·with·the·message142 <code·class="inline">from</code>·and·<code·class="inline">to</code>·are·visualized·in·the·<code·class="inline">Viewer</code>·as·&quot;lifelines&quot;,·with·the·message
143 passing·from·one·to·the·other.·If·<code·class="inline">from</code>·and·<code·class="inline">to</code>·are·the·same·value,·then·it·is143 passing·from·one·to·the·other.·If·<code·class="inline">from</code>·and·<code·class="inline">to</code>·are·the·same·value,·then·it·is
144 displayed·next·to·the·lifeline·as·an·&quot;action&quot;.·The·<code·class="inline">extra_stuff</code>value·is·simply144 displayed·next·to·the·lifeline·as·an·&quot;action&quot;.·The·<code·class="inline">extra_stuff</code>value·is·simply
145 data·that·you·can·attach·that·will·be·displayed·when·someone·actually·clicks·on145 data·that·you·can·attach·that·will·be·displayed·when·someone·actually·clicks·on
146 the·action·or·message·in·the·<code·class="inline">Viewer</code>·window.</p><p>The·module·<code·class="inline">et/examples/et_display_demo.erl</code>·illustrates·how·it·can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">146 the·action·or·message·in·the·<code·class="inline">Viewer</code>·window.</p><p>The·module·<code·class="inline">et/examples/et_display_demo.erl</code>·illustrates·how·it·can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
147 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2184228775-1">(</span><span·class="ss">et_display_demo</span><span·class="p"·data-group-id="2184228775-1">)</span><span·class="p">.</span><span·class="w">147 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1265349844-1">(</span><span·class="ss">et_display_demo</span><span·class="p"·data-group-id="1265349844-1">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="w">148 </span><span·class="w">
149 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2184228775-2">(</span><span·class="p"·data-group-id="2184228775-3">[</span><span·class="ss">test</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="2184228775-3">]</span><span·class="p"·data-group-id="2184228775-2">)</span><span·class="p">.</span><span·class="w">149 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1265349844-2">(</span><span·class="p"·data-group-id="1265349844-3">[</span><span·class="ss">test</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1265349844-3">]</span><span·class="p"·data-group-id="1265349844-2">)</span><span·class="p">.</span><span·class="w">
  
150 </span><span·class="nf">test</span><span·class="p"·data-group-id="2184228775-4">(</span><span·class="p"·data-group-id="2184228775-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">150 </span><span·class="nf">test</span><span·class="p"·data-group-id="1265349844-4">(</span><span·class="p"·data-group-id="1265349844-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
151 ····</span><span·class="p"·data-group-id="2184228775-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="2184228775-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·724,·SHA:·ce1a16b4781c8f4a2fa06945833cf5bdfa58c0c3a35a7ed7484d9f4b1d86092a·...·]-6">)</span><span·class="p">,</span><span·class="w">151 ····</span><span·class="p"·data-group-id="1265349844-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Viewer</span><span·class="p"·data-group-id="1265349844-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·724,·SHA:·12a5b98043c9667e2c5fb7a032d465319e1ddca7f038dbfaece61d28cc6fd284·...·]-6">)</span><span·class="p">,</span><span·class="w">
152 ····</span><span·class="n">Drink</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2184228775-10">{</span><span·class="ss">drink</span><span·class="p">,</span><span·class="ss">iced_chai_latte</span><span·class="p"·data-group-id="2184228775-10">}</span><span·class="p">,</span><span·class="w">152 ····</span><span·class="n">Drink</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1265349844-10">{</span><span·class="ss">drink</span><span·class="p">,</span><span·class="ss">iced_chai_latte</span><span·class="p"·data-group-id="1265349844-10">}</span><span·class="p">,</span><span·class="w">
153 ····</span><span·class="n">Size</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2184228775-11">{</span><span·class="nb">size</span><span·class="p">,</span><span·class="ss">grande</span><span·class="p"·data-group-id="2184228775-11">}</span><span·class="p">,</span><span·class="w">153 ····</span><span·class="n">Size</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1265349844-11">{</span><span·class="nb">size</span><span·class="p">,</span><span·class="ss">grande</span><span·class="p"·data-group-id="1265349844-11">}</span><span·class="p">,</span><span·class="w">
154 ····</span><span·class="n">Milk</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2184228775-12">{</span><span·class="ss">milk</span><span·class="p">,</span><span·class="ss">whole</span><span·class="p"·data-group-id="2184228775-12">}</span><span·class="p">,</span><span·class="w">154 ····</span><span·class="n">Milk</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1265349844-12">{</span><span·class="ss">milk</span><span·class="p">,</span><span·class="ss">whole</span><span·class="p"·data-group-id="1265349844-12">}</span><span·class="p">,</span><span·class="w">
155 ····</span><span·class="n">Flavor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2184228775-13">{</span><span·class="ss">flavor</span><span·class="p">,</span><span·class="ss">vanilla</span><span·class="p"·data-group-id="2184228775-13">}</span><span·class="p">,</span><span·class="w">155 ····</span><span·class="n">Flavor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1265349844-13">{</span><span·class="ss">flavor</span><span·class="p">,</span><span·class="ss">vanilla</span><span·class="p"·data-group-id="1265349844-13">}</span><span·class="p">,</span><span·class="w">
156 ····</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="2184228775-14">(</span><span·class="n">Viewer</span><span·class="p"·data-group-id="2184228775-14">)</span><span·class="p">,</span><span·class="w">156 ····</span><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">get_collector_pid</span><span·class="p"·data-group-id="1265349844-14">(</span><span·class="n">Viewer</span><span·class="p"·data-group-id="1265349844-14">)</span><span·class="p">,</span><span·class="w">
157 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-15">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">place[·...·truncated·by·diffoscope;·len:·369,·SHA:·a41352f516b17fc3cbd1f71327e77ef22a18eb30d577fae2e4b619f35319dc15·...·]-15">)</span><span·class="p">,</span><span·class="w">157 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-15">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">place[·...·truncated·by·diffoscope;·len:·369,·SHA:·5e3c20fa450ee09f1a1a4d15a709e7d3d2cd2c4b94f6054f5cb8618e942f5d48·...·]-15">)</span><span·class="p">,</span><span·class="w">
158 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-17">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">enter[·...·truncated·by·diffoscope;·len:·318,·SHA:·3630b97ba9c7dae46e8da1353248c4e08d7b5210af2b543b5c0772326c5e313a·...·]-17">)</span><span·class="p">,</span><span·class="w">158 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-17">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">enter[·...·truncated·by·diffoscope;·len:·318,·SHA:·aa3a7479dc87b95ff7f25477130320c89004f4ec98f2984a6d914bffe40a451e·...·]-17">)</span><span·class="p">,</span><span·class="w">
159 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-19">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">give_[·...·truncated·by·diffoscope;·len:·114,·SHA:·32ef07dfafaa3d8afafdd6b0993e3609b553fb3ab87349855861be6abbca9ec5·...·]-19">)</span><span·class="p">,</span><span·class="w">159 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-19">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">give_[·...·truncated·by·diffoscope;·len:·114,·SHA:·7eccbf162a36c7eef0ea066a7ade8916e16e09cf38572b36b4d251b48590d1d9·...·]-19">)</span><span·class="p">,</span><span·class="w">
160 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-20">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">get_[·...·truncated·by·diffoscope;·len:·262,·SHA:·f03c70eea2cda6cc71f4211f6448d985a2daec8df586fcca7341ce2cee9d8ee1·...·]-20">)</span><span·class="p">,</span><span·class="w">160 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-20">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">get_[·...·truncated·by·diffoscope;·len:·262,·SHA:·fec95b68ed024807a22bcdc1d772fa40b3ba7998789cfbc063515f3515bc310a·...·]-20">)</span><span·class="p">,</span><span·class="w">
161 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-22">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">give[·...·truncated·by·diffoscope;·len:·184,·SHA:·4cae56752cf876dfcb793fee25ae6391b24bfb7ddfb450779133e792860a4822·...·]-22">)</span><span·class="p">,</span><span·class="w">161 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-22">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">give[·...·truncated·by·diffoscope;·len:·184,·SHA:·a64c9021beee7b7dd582ca4d095c41eb5618ad11669d0536f3af2c0166067c50·...·]-22">)</span><span·class="p">,</span><span·class="w">
162 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-24">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">reque[·...·truncated·by·diffoscope;·len:·117,·SHA:·0642978d799101208897894854135afaaad7d32848a3227419c7ba68155da0f2·...·]-24">)</span><span·class="p">,</span><span·class="w">162 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-24">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">reque[·...·truncated·by·diffoscope;·len:·117,·SHA:·d5a4c5c482d488ea47e882285f69428806a4d0c78afbf4c6fe5a9d05c9d22e7e·...·]-24">)</span><span·class="p">,</span><span·class="w">
163 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-25">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">pay_m[·...·truncated·by·diffoscope;·len:·113,·SHA:·c3946b7ef3d83c1e9fb0faa673bbe23d978404101d7db4c4da61bab3614d766c·...·]-25">)</span><span·class="p">,</span><span·class="w">163 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-25">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">pay_m[·...·truncated·by·diffoscope;·len:·113,·SHA:·331cf797dd14de51092b44f9284009d9e7ebe57874eaf2798ae35a5bd4cfda99·...·]-25">)</span><span·class="p">,</span><span·class="w">
164 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-26">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">get_[·...·truncated·by·diffoscope;·len:·188,·SHA:·bb6ab41bea340201324d246b235ffe9a167587b62f6cab384dd034500f859cf0·...·]-26">)</span><span·class="p">,</span><span·class="w">164 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-26">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">get_[·...·truncated·by·diffoscope;·len:·188,·SHA:·3213db2507208dac2efc1c3eaa391f7348c71b3c59025e1ca4411ceae290535d·...·]-26">)</span><span·class="p">,</span><span·class="w">
165 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-28">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_[·...·truncated·by·diffoscope;·len:·215,·SHA:·684ebf80591eb6b6b680eab09b3dc13c2f82891120de8b32f1196afdfad048fc·...·]-28">)</span><span·class="p">,</span><span·class="w">165 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-28">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_[·...·truncated·by·diffoscope;·len:·215,·SHA:·a4640fde57d252415e604395560f22918f1a45fcf0d72bcb6551d85248331e5a·...·]-28">)</span><span·class="p">,</span><span·class="w">
166 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-30">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_[·...·truncated·by·diffoscope;·len:·211,·SHA:·44ed89bcc71057b3d9407ebed951fd1dfeafb558f0264cc24aa4413598dcc6b4·...·]-30">)</span><span·class="p">,</span><span·class="w">166 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-30">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_[·...·truncated·by·diffoscope;·len:·211,·SHA:·4bbd11e12f261dc28f2c12910b3609d9c3ada495fc2fc9f341854040d12edcf4·...·]-30">)</span><span·class="p">,</span><span·class="w">
167 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-32">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_[·...·truncated·by·diffoscope;·len:·183,·SHA:·f048f0dd8903c8480c8d81df473569e0cc5f64697e7d5acd4031ef9c523006a1·...·]-32">)</span><span·class="p">,</span><span·class="w">167 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-32">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_[·...·truncated·by·diffoscope;·len:·183,·SHA:·555d2952290717811f0db1c87a76d2a397a8a63fe00e76d491888ba9a66bbe0e·...·]-32">)</span><span·class="p">,</span><span·class="w">
168 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-34">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">swir[·...·truncated·by·diffoscope;·len:·181,·SHA:·26b71a69790c7bf2a344ba732edaff35ad3a220f689177dd519fab26f8e84433·...·]-34">)</span><span·class="p">,</span><span·class="w">168 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-34">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">swir[·...·truncated·by·diffoscope;·len:·181,·SHA:·dffbd0387874186067562c2fb4ccea42dee98c3dcb35b0768dcf39ad2af607fc·...·]-34">)</span><span·class="p">,</span><span·class="w">
169 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="2184228775-36">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">give_[·...·truncated·by·diffoscope;·len:·273,·SHA:·8ef6d29218cdd60824c65ec545f938474e8185069af5097ae5fd458502ea4114·...·]-36">)</span><span·class="p">,</span><span·class="w">169 ····</span><span·class="nc">et_collector</span><span·class="p">:</span><span·class="nf">report_event</span><span·class="p"·data-group-id="1265349844-36">(</span><span·class="n">C</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">give_[·...·truncated·by·diffoscope;·len:·273,·SHA:·47e31c1ae8198460930259ada5dbd672b28e4e14579553d9b477156f8e732f70·...·]-36">)</span><span·class="p">,</span><span·class="w">
170 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>When·you·run·the·<code·class="inline">et_display_demo:test().</code>·function·in·the·example·above,·the170 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>When·you·run·the·<code·class="inline">et_display_demo:test().</code>·function·in·the·example·above,·the
171 <code·class="inline">Viewer</code>·window·will·look·like·this:</p><p><img·src="assets/coffee_order.png"·alt="Screenshot·of·the·Viewer·window"·title="Screenshot·of·the·Viewer·window"/></p><h2·id="four-modules"·class="section-heading">171 <code·class="inline">Viewer</code>·window·will·look·like·this:</p><p><img·src="assets/coffee_order.png"·alt="Screenshot·of·the·Viewer·window"·title="Screenshot·of·the·Viewer·window"/></p><h2·id="four-modules"·class="section-heading">
172 ··<a·href="#four-modules"·class="hover-link">172 ··<a·href="#four-modules"·class="hover-link">
173 ····<i·class="ri-link-m"·aria-hidden="true"></i>173 ····<i·class="ri-link-m"·aria-hidden="true"></i>
174 ··</a>174 ··</a>
175 ··<span·class="text">Four·Modules</span>175 ··<span·class="text">Four·Modules</span>
176 </h2>176 </h2>
Offset 195, 15 lines modifiedOffset 195, 15 lines modified
195 <code·class="inline">Tracer</code>·of·the·<code·class="inline">Raw·Trace·Data</code>.</p><p>Erlang·tracing·is·a·seething·pile·of·pain·that·involves·reasonably·complex195 <code·class="inline">Tracer</code>·of·the·<code·class="inline">Raw·Trace·Data</code>.</p><p>Erlang·tracing·is·a·seething·pile·of·pain·that·involves·reasonably·complex
196 knowledge·of·clever·ports,·tracing·return·formats,·and·specialized·tracing196 knowledge·of·clever·ports,·tracing·return·formats,·and·specialized·tracing
197 <code·class="inline">MatchSpecs</code>·(which·are·really·their·own·special·kind·of·hell).·The·tracing197 <code·class="inline">MatchSpecs</code>·(which·are·really·their·own·special·kind·of·hell).·The·tracing
198 mechanism·is·very·powerful·indeed,·but·it·can·be·hard·to·grasp.</p><p>Luckily·there·is·a·simplified·way·to·start·tracing·of·<a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·function198 mechanism·is·very·powerful·indeed,·but·it·can·be·hard·to·grasp.</p><p>Luckily·there·is·a·simplified·way·to·start·tracing·of·<a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·function
199 calls.·The·idea·is·that·you·should·instrument·your·code·with·calls·to199 calls.·The·idea·is·that·you·should·instrument·your·code·with·calls·to
200 <a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·in·strategic·places·where·you·have·interesting·information200 <a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·in·strategic·places·where·you·have·interesting·information
201 available·in·your·program.·Then·you·just·start·the·<code·class="inline">Collector</code>·with·global201 available·in·your·program.·Then·you·just·start·the·<code·class="inline">Collector</code>·with·global
202 tracing·enabled:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7209914225-1">(</span><span·class="p"·data-group-id="7209914225-2">[</span><span·class="p"·data-group-id="7209914225-3">{</span><span·class="ss">trace_global</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·552,·SHA:·8f790e754dd0793077052302fd922fae311efe9e98e3b8cf77066d8f5c3e1c2c·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·will·start·a·<code·class="inline">Collector</code>,·a·<code·class="inline">Viewer</code>·and·also·start·the·tracing·of202 tracing·enabled:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7963047806-1">(</span><span·class="p"·data-group-id="7963047806-2">[</span><span·class="p"·data-group-id="7963047806-3">{</span><span·class="ss">trace_global</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·552,·SHA:·e510da1b266a48d5c1bf64e7f0ee777197bb08a2c05e3591e46578676dd70004·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·will·start·a·<code·class="inline">Collector</code>,·a·<code·class="inline">Viewer</code>·and·also·start·the·tracing·of
203 <a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·function·calls.·The·<code·class="inline">Raw·Trace·Data</code>·is·collected·by·the203 <a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·function·calls.·The·<code·class="inline">Raw·Trace·Data</code>·is·collected·by·the
204 <code·class="inline">Collector</code>·and·a·view·of·it·is·displayed·on·the·screen·by·the·<code·class="inline">Viewer</code>.·You·can204 <code·class="inline">Collector</code>·and·a·view·of·it·is·displayed·on·the·screen·by·the·<code·class="inline">Viewer</code>.·You·can
205 define·your·own·&quot;views&quot;·of·the·data·by·implementing·your·own·<code·class="inline">Filter</code>·functions205 define·your·own·&quot;views&quot;·of·the·data·by·implementing·your·own·<code·class="inline">Filter</code>·functions
206 and·register·them·in·the·<code·class="inline">Viewer</code>.</p><h2·id="the-collector-and-viewer"·class="section-heading">206 and·register·them·in·the·<code·class="inline">Viewer</code>.</p><h2·id="the-collector-and-viewer"·class="section-heading">
207 ··<a·href="#the-collector-and-viewer"·class="hover-link">207 ··<a·href="#the-collector-and-viewer"·class="hover-link">
208 ····<i·class="ri-link-m"·aria-hidden="true"></i>208 ····<i·class="ri-link-m"·aria-hidden="true"></i>
209 ··</a>209 ··</a>
Offset 251, 44 lines modifiedOffset 251, 44 lines modified
251 ··</a>251 ··</a>
252 ··<span·class="text">How·To·Put·It·Together</span>252 ··<span·class="text">How·To·Put·It·Together</span>
253 </h2>253 </h2>
254 <p>The·<code·class="inline">Collector</code>·automatically·registers·itself·to·listen·for·trace·<code·class="inline">Events</code>,·so254 <p>The·<code·class="inline">Collector</code>·automatically·registers·itself·to·listen·for·trace·<code·class="inline">Events</code>,·so
255 all·you·have·to·do·is·enable·them.</p><p>For·those·people·who·want·to·do·general·tracing,·consult·the·<code·class="inline">dbg</code>·module·on·how255 all·you·have·to·do·is·enable·them.</p><p>For·those·people·who·want·to·do·general·tracing,·consult·the·<code·class="inline">dbg</code>·module·on·how
256 to·trace·whatever·you're·interested·in·and·let·it·work·its·magic.·If·you·just256 to·trace·whatever·you're·interested·in·and·let·it·work·its·magic.·If·you·just
257 want·<a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·to·work,·do·the·following:</p><ol><li>Create·a·<code·class="inline">Collector</code></li><li>Create·a·<code·class="inline">Viewer</code>·(this·can·do·step·#1·for·you)</li><li>Turn·on·and·pare·down·debugging</li></ol><p>The·module·<code·class="inline">et/examples/et_trace_demo.erl</code>·achieves·this.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">257 want·<a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·to·work,·do·the·following:</p><ol><li>Create·a·<code·class="inline">Collector</code></li><li>Create·a·<code·class="inline">Viewer</code>·(this·can·do·step·#1·for·you)</li><li>Turn·on·and·pare·down·debugging</li></ol><p>The·module·<code·class="inline">et/examples/et_trace_demo.erl</code>·achieves·this.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">
258 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7217676086-1">(</span><span·class="ss">et_trace_demo</span><span·class="p"·data-group-id="7217676086-1">)</span><span·class="p">.</span><span·class="w">258 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4906854023-1">(</span><span·class="ss">et_trace_demo</span><span·class="p"·data-group-id="4906854023-1">)</span><span·class="p">.</span><span·class="w">
259 </span><span·class="w">259 </span><span·class="w">
260 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7217676086-2">(</span><span·class="p"·data-group-id="7217676086-3">[</span><span·class="ss">test</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7217676086-3">]</span><span·class="p"·data-group-id="7217676086-2">)</span><span·class="p">.</span><span·class="w">260 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4906854023-2">(</span><span·class="p"·data-group-id="4906854023-3">[</span><span·class="ss">test</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4906854023-3">]</span><span·class="p"·data-group-id="4906854023-2">)</span><span·class="p">.</span><span·class="w">
  
261 </span><span·class="nf">test</span><span·class="p"·data-group-id="7217676086-4">(</span><span·class="p"·data-group-id="7217676086-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">261 </span><span·class="nf">test</span><span·class="p"·data-group-id="4906854023-4">(</span><span·class="p"·data-group-id="4906854023-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
262 ····</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7217676086-5">(</span><span·class="p"·data-group-id="7217676086-6">[</span><span·class="w">262 ····</span><span·class="nc">et_viewer</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4906854023-5">(</span><span·class="p"·data-group-id="4906854023-6">[</span><span·class="w">
263 ········</span><span·class="p"·data-group-id="7217676086-7">{</span><span·class="ss">title</span><span·class="p">,</span><span·class="s">&quot;Coffee·Order&quot;</span><span·class="p"·data-group-id="7217676086-7">}</span><span·class="p">,</span><span·class="w">263 ········</span><span·class="p"·data-group-id="4906854023-7">{</span><span·class="ss">title</span><span·class="p">,</span><span·class="s">&quot;Coffee·Order&quot;</span><span·class="p"·data-group-id="4906854023-7">}</span><span·class="p">,</span><span·class="w">
264 ········</span><span·class="p"·data-group-id="7217676086-8">{</span><span·class="ss">trace_global</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="7217676086-8">}</span><span·class="p">,</span><span·class="w">264 ········</span><span·class="p"·data-group-id="4906854023-8">{</span><span·class="ss">trace_global</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="4906854023-8">}</span><span·class="p">,</span><span·class="w">
265 ········</span><span·class="p"·data-group-id="7217676086-9">{</span><span·class="nb">trace_pattern</span><span·class="p">,</span><span·class="p"·data-group-id="7217676086-10">{</span><span·class="ss">et</span><span·class="p">,</span><span·class="ss">max</span><span·class="p"·data-group-id="7217676086-[·...·truncated·by·diffoscope;·len:·53,·SHA:·fecdc05a4726275178eb8a149d8fa3b37977fcf9e45946858814dbeb20ceaef3·...·]-9">}</span><span·class="p">,</span><span·class="w">265 ········</span><span·class="p"·data-group-id="4906854023-9">{</span><span·class="nb">trace_pattern</span><span·class="p">,</span><span·class="p"·data-group-id="4906854023-10">{</span><span·class="ss">et</span><span·class="p">,</span><span·class="ss">max</span><span·class="p"·data-group-id="4906854023-[·...·truncated·by·diffoscope;·len:·53,·SHA:·0908047462105ef577f707e84948ffb29e4a68b51f46b786a07074f78cd81e1a·...·]-9">}</span><span·class="p">,</span><span·class="w">
266 ········</span><span·class="p"·data-group-id="7217676086-11">{</span><span·class="ss">max_actors</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="7217676086-11">}</span><span·class="w">266 ········</span><span·class="p"·data-group-id="4906854023-11">{</span><span·class="ss">max_actors</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="4906854023-11">}</span><span·class="w">
267 ······</span><span·class="p"·data-group-id="7217676086-6">]</span><span·class="p"·data-group-id="7217676086-5">)</span><span·class="p">,</span><span·class="w">267 ······</span><span·class="p"·data-group-id="4906854023-6">]</span><span·class="p"·data-group-id="4906854023-5">)</span><span·class="p">,</span><span·class="w">
268 ······</span><span·class="c1">%%·dbg:p(all,call),</span><span·class="w">268 ······</span><span·class="c1">%%·dbg:p(all,call),</span><span·class="w">
269 ······</span><span·class="c1">%%·dbg:tpl(et,·trace_me,·5,·[]),</span><span·class="w">269 ······</span><span·class="c1">%%·dbg:tpl(et,·trace_me,·5,·[]),</span><span·class="w">
270 ······</span><span·class="n">Drink</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7217676086-12">{</span><span·class="ss">drink</span><span·class="p">,</span><span·class="ss">iced_chai_latte</span><span·class="p"·data-group-id="7217676086-12">}</span><span·class="p">,</span><span·class="w">270 ······</span><span·class="n">Drink</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4906854023-12">{</span><span·class="ss">drink</span><span·class="p">,</span><span·class="ss">iced_chai_latte</span><span·class="p"·data-group-id="4906854023-12">}</span><span·class="p">,</span><span·class="w">
271 ······</span><span·class="n">Size</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7217676086-13">{</span><span·class="nb">size</span><span·class="p">,</span><span·class="ss">grande</span><span·class="p"·data-group-id="7217676086-13">}</span><span·class="p">,</span><span·class="w">271 ······</span><span·class="n">Size</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4906854023-13">{</span><span·class="nb">size</span><span·class="p">,</span><span·class="ss">grande</span><span·class="p"·data-group-id="4906854023-13">}</span><span·class="p">,</span><span·class="w">
272 ······</span><span·class="n">Milk</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7217676086-14">{</span><span·class="ss">milk</span><span·class="p">,</span><span·class="ss">whole</span><span·class="p"·data-group-id="7217676086-14">}</span><span·class="p">,</span><span·class="w">272 ······</span><span·class="n">Milk</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4906854023-14">{</span><span·class="ss">milk</span><span·class="p">,</span><span·class="ss">whole</span><span·class="p"·data-group-id="4906854023-14">}</span><span·class="p">,</span><span·class="w">
273 ······</span><span·class="n">Flavor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7217676086-15">{</span><span·class="ss">flavor</span><span·class="p">,</span><span·class="ss">vanilla</span><span·class="p"·data-group-id="7217676086-15">}</span><span·class="p">,</span><span·class="w">273 ······</span><span·class="n">Flavor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4906854023-15">{</span><span·class="ss">flavor</span><span·class="p">,</span><span·class="ss">vanilla</span><span·class="p"·data-group-id="4906854023-15">}</span><span·class="p">,</span><span·class="w">
274 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-16">(</span><span·class="mi">99</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">place_order</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·321,·SHA:·60eaf0ac1d32b7841477a32417c9b1c838c6c9023e47b428489d73007dbd48b5·...·]-16">)</span><span·class="p">,</span><span·class="w">274 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-16">(</span><span·class="mi">99</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">place_order</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·321,·SHA:·7a5bcbfbcb063ae4985d271e7ec85ab6f4e08edd9aae56a8453ecb130ef565cf·...·]-16">)</span><span·class="p">,</span><span·class="w">
275 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-18">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">enter_order</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·270,·SHA:·f1d09560e81efd54553953aa852200724bfdc81df156dda73dca200e76b76d62·...·]-18">)</span><span·class="p">,</span><span·class="w">275 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-18">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">enter_order</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·270,·SHA:·c6e0fcad3aeb8bc6561f193ed766c7d3e124f2e1464d1cd8cb01ac1446a988ec·...·]-18">)</span><span·class="p">,</span><span·class="w">
276 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-20">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">give_total</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·66,·SHA:·5a56962b0a0398dee76a49a4e6df5f8cfbfdd86bd15f1c989941c643f3bb7c32·...·]-20">)</span><span·class="p">,</span><span·class="w">276 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-20">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="nb">register</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">give_total</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·66,·SHA:·5b26ecfe17ab68d96752c9670e2a52b27c1f8d88444485bb6dd8cddf55642907·...·]-20">)</span><span·class="p">,</span><span·class="w">
277 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-21">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">get_cup</span><span·class="p">,</span><span·class="p[·...·truncated·by·diffoscope;·len:·214,·SHA:·d34a92a9d6c6452129a43f63cfd8af3d093bdf51bcea5efd9964e83a1b790d73·...·]-21">)</span><span·class="p">,</span><span·class="w">277 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-21">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">get_cup</span><span·class="p">,</span><span·class="p[·...·truncated·by·diffoscope;·len:·214,·SHA:·efca68b97ebed669c62ea6cc145641ba07cc1d0a91930e5e9814b3d1d4c44931·...·]-21">)</span><span·class="p">,</span><span·class="w">
278 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-23">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">give_cup</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·136,·SHA:·21fb4b737c07195aeae8a165e27a14e7d5193b249541e8ac621b404313048441·...·]-23">)</span><span·class="p">,</span><span·class="w">278 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-23">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">give_cup</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·136,·SHA:·3b8d587fcb7e779d5d4b4e244116d93e3ab246cbc1b0cd87d06100a84f8e1a02·...·]-23">)</span><span·class="p">,</span><span·class="w">
279 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-25">(</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">request_money</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·69,·SHA:·2ea4da894ba79bb9d8094fa2466f71175695fa83787716936b1e941579b58114·...·]-25">)</span><span·class="p">,</span><span·class="w">279 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-25">(</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">request_money</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·69,·SHA:·ab7cf834115836dc078e27d130425f1ba896d357b05a292e24196867143c38eb·...·]-25">)</span><span·class="p">,</span><span·class="w">
280 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-26">(</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">pay_money</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·65,·SHA:·96cde653122314eed56a833353c430a9d83dae8df4f1036e1af2532740796c9b·...·]-26">)</span><span·class="p">,</span><span·class="w">280 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-26">(</span><span·class="mi">90</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">barrista1</span><span·class="p">,</span><span·class="ss">pay_money</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·65,·SHA:·48e4fc2dc1d8cb3fbb3605d56042245c96135f58131e5bd0ff1d759e70ec29d1·...·]-26">)</span><span·class="p">,</span><span·class="w">
281 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-27">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">get_chai_mix</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·140,·SHA:·1c98074bbaea14f50002816d98af137401f07d523f7129998fe671203d035759·...·]-27">)</span><span·class="p">,</span><span·class="w">281 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-27">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">get_chai_mix</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·140,·SHA:·ab90778a9344f4c5268926032801b4991a92dfef517ecf651329996a338791c6·...·]-27">)</span><span·class="p">,</span><span·class="w">
282 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-29">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_flavor</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·167,·SHA:·642b6b65525ac4b2c822c8ebc17cbfb33097a56adf18c3183f932536b82137c7·...·]-29">)</span><span·class="p">,</span><span·class="w">282 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-29">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_flavor</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·167,·SHA:·24f255d61ae359cbd13f66e2cd78f0897cb7a2b9f0b2b223765eba1d265e3ff7·...·]-29">)</span><span·class="p">,</span><span·class="w">
283 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-31">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_milk</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·163,·SHA:·db93620885f2f028e88721c43f9edcd94b71e252cae7be3f0e344136102d25ff·...·]-31">)</span><span·class="p">,</span><span·class="w">283 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-31">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_milk</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·163,·SHA:·66ea98cc4a0cfb2b26b87f0a22fc7750a49929cf284d312b51129310a96c2f76·...·]-31">)</span><span·class="p">,</span><span·class="w">
284 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-33">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_ice</span><span·class="p">,</span><span·class="p[·...·truncated·by·diffoscope;·len:·135,·SHA:·9a2bd6d7a6a451c505c3ddac4ea673d8195d16e8cfd3364fa0d77277c3615419·...·]-33">)</span><span·class="p">,</span><span·class="w">284 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-33">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">add_ice</span><span·class="p">,</span><span·class="p[·...·truncated·by·diffoscope;·len:·135,·SHA:·f01efe24c69e9f7e6af53828004585bdadaf8a772c5aca6629804f9ebe5d6518·...·]-33">)</span><span·class="p">,</span><span·class="w">
285 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-35">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">swirl</span><span·class="p">,</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·133,·SHA:·27cc969ae81025b4d25cdd7512fc7c90725a90183571f749d07713cafa483021·...·]-35">)</span><span·class="p">,</span><span·class="w">285 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-35">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">swirl</span><span·class="p">,</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·133,·SHA:·6bcb50d916eb4acf6f30dff622a4a8336de489be750b8f132ec9988ed406d4b0·...·]-35">)</span><span·class="p">,</span><span·class="w">
286 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="7217676086-37">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">give_tasty_beverage</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·225,·SHA:·be23dbaa5a2b36e0a28ae02084e4e3f14313009d528bb858c698181119871641·...·]-37">)</span><span·class="p">,</span><span·class="w">286 ······</span><span·class="nc">et</span><span·class="p">:</span><span·class="nf">trace_me</span><span·class="p"·data-group-id="4906854023-37">(</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">barrista2</span><span·class="p">,</span><span·class="ss">customer</span><span·class="p">,</span><span·class="ss">give_tasty_beverage</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·225,·SHA:·dbcf7ad1b4b9660a45f77c94f5fc0e5a06c3cceabe12447051e0763993593c9c·...·]-37">)</span><span·class="p">,</span><span·class="w">
287 ······</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>Running·through·the·above,·the·most·important·points·are:</p><ul><li>Turn·on·global·tracing</li><li>Set·a·<code·class="inline">Trace·Pattern</code></li><li>Tell·<code·class="inline">dbg</code>·to·trace·function·Calls</li><li>Tell·it·specifically·to·trace·the·<a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·function</li></ul><p>When·you·run·the·<code·class="inline">et_trace_demo:test()</code>·function·above,·the·<code·class="inline">Viewer</code>·window·will287 ······</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>Running·through·the·above,·the·most·important·points·are:</p><ul><li>Turn·on·global·tracing</li><li>Set·a·<code·class="inline">Trace·Pattern</code></li><li>Tell·<code·class="inline">dbg</code>·to·trace·function·Calls</li><li>Tell·it·specifically·to·trace·the·<a·href="et.html#trace_me/5"><code·class="inline">et:trace_me/5</code></a>·function</li></ul><p>When·you·run·the·<code·class="inline">et_trace_demo:test()</code>·function·above,·the·<code·class="inline">Viewer</code>·window·will
288 look·like·this·screenshot:</p><p><img·src="assets/coffee_order.png"·alt="Screenshot·of·the·Viewer·window"·title="Screenshot·of·the·Viewer·window"/></p>288 look·like·this·screenshot:</p><p><img·src="assets/coffee_order.png"·alt="Screenshot·of·the·Viewer·window"·title="Screenshot·of·the·Viewer·window"/></p>
289 </div>289 </div>
  
290 <div·class="bottom-actions"·id="bottom-actions">290 <div·class="bottom-actions"·id="bottom-actions">
291 ··<div·class="bottom-actions-item">291 ··<div·class="bottom-actions-item">
  
35.6 KB
./usr/share/doc/erlang-doc/html/lib/eunit-2.9.1/doc/html/eunit.epub
2.23 KB
zipinfo {}
    
Offset 1, 15 lines modifiedOffset 1, 15 lines modified
1 Zip·file·size:·45074·bytes,·number·of·entries:·131 Zip·file·size:·45075·bytes,·number·of·entries:·13
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:21·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······714·b-·defN·24-Oct-11·20:21·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······714·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····32747·b-·defN·24-Oct-11·20:21·OEBPS/notes.xhtml4 ?rw-r--r--··2.0·unx····32747·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
5 ?rw-r--r--··2.0·unx·····1175·b-·defN·24-Oct-11·20:21·OEBPS/nav.xhtml5 ?rw-r--r--··2.0·unx·····1175·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
6 ?rw-r--r--··2.0·unx·····1136·b-·defN·24-Oct-11·20:21·OEBPS/eunit_surefire.xhtml6 ?rw-r--r--··2.0·unx·····1136·b-·defN·24-Oct-11·20:59·OEBPS/eunit_surefire.xhtml
7 ?rw-r--r--··2.0·unx·····8201·b-·defN·24-Oct-11·20:21·OEBPS/eunit.xhtml7 ?rw-r--r--··2.0·unx·····8201·b-·defN·24-Oct-11·20:59·OEBPS/eunit.xhtml
8 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-erlang-2EWSTWER.css8 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
9 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-CB7BJMUW.js9 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
10 ?rw-r--r--··2.0·unx·····1623·b-·defN·24-Oct-11·20:21·OEBPS/content.opf10 ?rw-r--r--··2.0·unx·····1623·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
11 ?rw-r--r--··2.0·unx····65980·b-·defN·24-Oct-11·20:21·OEBPS/chapter.xhtml11 ?rw-r--r--··2.0·unx····65980·b-·defN·24-Oct-11·20:59·OEBPS/chapter.xhtml
12 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:21·OEBPS/assets/logo.png12 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
13 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:21·META-INF/container.xml13 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
14 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:21·META-INF/com.apple.ibooks.display-options.xml14 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
15 13·files,·134744·bytes·uncompressed,·43492·bytes·compressed:··67.7%15 13·files,·134744·bytes·uncompressed,·43493·bytes·compressed:··67.7%
32.0 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
1.2 KB
OEBPS/content.opf
1.16 KB
OEBPS/content.opf
Max HTML report size reached
618 B
./usr/share/doc/erlang-doc/html/lib/ftp-1.2.2/doc/html/.build
    
Offset 14, 15 lines modifiedOffset 14, 15 lines modified
14 dist/lato-latin-300-normal-YUMVEFOL.woff214 dist/lato-latin-300-normal-YUMVEFOL.woff2
15 dist/lato-latin-400-normal-W7754I4D.woff215 dist/lato-latin-400-normal-W7754I4D.woff2
16 dist/lato-latin-700-normal-2XVSBPG4.woff216 dist/lato-latin-700-normal-2XVSBPG4.woff2
17 dist/lato-latin-ext-300-normal-VPGGJKJL.woff217 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
18 dist/lato-latin-ext-400-normal-N27NCBWW.woff218 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
19 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff219 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
20 dist/remixicon-NKANDIL5.woff220 dist/remixicon-NKANDIL5.woff2
21 dist/search_data-F6750343.js21 dist/search_data-73EEAED9.js
22 dist/sidebar_items-EF3B4869.js22 dist/sidebar_items-EF3B4869.js
23 ftp.html23 ftp.html
24 ftp_client.html24 ftp_client.html
25 index.html25 index.html
26 introduction.html26 introduction.html
27 notes.html27 notes.html
28 search.html28 search.html
49.3 KB
./usr/share/doc/erlang-doc/html/lib/ftp-1.2.2/doc/html/ftp.epub
2.22 KB
zipinfo {}
    
Offset 1, 15 lines modifiedOffset 1, 15 lines modified
1 Zip·file·size:·33711·bytes,·number·of·entries:·131 Zip·file·size:·33714·bytes,·number·of·entries:·13
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:21·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······710·b-·defN·24-Oct-11·20:21·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······710·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····14998·b-·defN·24-Oct-11·20:21·OEBPS/notes.xhtml4 ?rw-r--r--··2.0·unx····14998·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
5 ?rw-r--r--··2.0·unx·····1121·b-·defN·24-Oct-11·20:21·OEBPS/nav.xhtml5 ?rw-r--r--··2.0·unx·····1121·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
6 ?rw-r--r--··2.0·unx·····1191·b-·defN·24-Oct-11·20:21·OEBPS/introduction.xhtml6 ?rw-r--r--··2.0·unx·····1191·b-·defN·24-Oct-11·20:59·OEBPS/introduction.xhtml
7 ?rw-r--r--··2.0·unx·····7771·b-·defN·24-Oct-11·20:21·OEBPS/ftp_client.xhtml7 ?rw-r--r--··2.0·unx·····7771·b-·defN·24-Oct-11·20:59·OEBPS/ftp_client.xhtml
8 ?rw-r--r--··2.0·unx····79467·b-·defN·24-Oct-11·20:21·OEBPS/ftp.xhtml8 ?rw-r--r--··2.0·unx····79467·b-·defN·24-Oct-11·20:59·OEBPS/ftp.xhtml
9 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-erlang-2EWSTWER.css9 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
10 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-CB7BJMUW.js10 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
11 ?rw-r--r--··2.0·unx·····1614·b-·defN·24-Oct-11·20:21·OEBPS/content.opf11 ?rw-r--r--··2.0·unx·····1614·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
12 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:21·OEBPS/assets/logo.png12 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
13 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:21·META-INF/container.xml13 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
14 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:21·META-INF/com.apple.ibooks.display-options.xml14 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
15 13·files,·130040·bytes·uncompressed,·32131·bytes·compressed:··75.3%15 13·files,·130040·bytes·uncompressed,·32134·bytes·compressed:··75.3%
33.5 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
12.3 KB
OEBPS/ftp_client.xhtml
Max HTML report size reached
1.21 KB
OEBPS/content.opf
1.17 KB
OEBPS/content.opf
Max HTML report size reached
12.3 KB
./usr/share/doc/erlang-doc/html/lib/ftp-1.2.2/doc/html/ftp_client.html
    
Offset 133, 33 lines modifiedOffset 133, 33 lines modified
133 </h2>133 </h2>
134 <p>FTP·clients·are·considered·to·be·rather·temporary.·Thus,·they·are·only·started134 <p>FTP·clients·are·considered·to·be·rather·temporary.·Thus,·they·are·only·started
135 and·stopped·during·runtime·and·cannot·be·started·at·application·startup.·The·FTP135 and·stopped·during·runtime·and·cannot·be·started·at·application·startup.·The·FTP
136 client·API·is·designed·to·allow·some·functions·to·return·intermediate·results.136 client·API·is·designed·to·allow·some·functions·to·return·intermediate·results.
137 This·implies·that·only·the·process·that·started·the·FTP·client·can·access·it137 This·implies·that·only·the·process·that·started·the·FTP·client·can·access·it
138 with·preserved·sane·semantics.·If·the·process·that·started·the·FTP·session·dies,138 with·preserved·sane·semantics.·If·the·process·that·started·the·FTP·session·dies,
139 the·FTP·client·process·terminates.</p><p>The·client·supports·IPv6·as·long·as·the·underlying·mechanisms·also·do·so.</p><p>The·following·is·a·simple·example·of·an·FTP·session,·where·the·user·<code·class="inline">guest</code>·with139 the·FTP·client·process·terminates.</p><p>The·client·supports·IPv6·as·long·as·the·underlying·mechanisms·also·do·so.</p><p>The·following·is·a·simple·example·of·an·FTP·session,·where·the·user·<code·class="inline">guest</code>·with
140 password·<code·class="inline">password</code>·logs·on·to·the·remote·host·<code·class="inline">erlang.org</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5863987668-1">(</span><span·class="p"·data-group-id="5863987668-1">)</span><span·class="p">.</span><span·class="w">140 password·<code·class="inline">password</code>·logs·on·to·the·remote·host·<code·class="inline">erlang.org</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="1534638621-1">(</span><span·class="p"·data-group-id="1534638621-1">)</span><span·class="p">.</span><span·class="w">
141 ······</span><span·class="ss">ok</span><span·class="w">141 ······</span><span·class="ss">ok</span><span·class="w">
142 ······</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5863987668-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="5863987668-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·497,·SHA:·7cc93948f41f474a0b4a7a61faad76cae1aae67f8eee6a8753547ff63d8dc8dc·...·]-3">)</span><span·class="p">.</span><span·class="w">142 ······</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1534638621-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="1534638621-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·497,·SHA:·52a21d29cabfab7bfb6b8bf0c781dfbb65e2407f79bb67a2e8d14d2e34a0b76d·...·]-3">)</span><span·class="p">.</span><span·class="w">
143 ······</span><span·class="p"·data-group-id="5863987668-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.22</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5863987668-6">}</span><span·class="w">143 ······</span><span·class="p"·data-group-id="1534638621-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.22</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1534638621-6">}</span><span·class="w">
144 ······</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">user</span><span·class="p"·data-group-id="5863987668-7">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;guest&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;password&quot;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·9c3668ca552019769e67afe98c01ce5e7fe0bd5f1e85e88cb9e8f691690accd2·...·]-7">)</span><span·class="p">.</span><span·class="w">144 ······</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">user</span><span·class="p"·data-group-id="1534638621-7">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;guest&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;password&quot;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·26e2f9dc53c04b888cd22ce99a9bcbdef19ac5523ff711abf919e8444bbdf419·...·]-7">)</span><span·class="p">.</span><span·class="w">
145 ······</span><span·class="ss">ok</span><span·class="w">145 ······</span><span·class="ss">ok</span><span·class="w">
146 ······</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">pwd</span><span·class="p"·data-group-id="5863987668-8">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="5863987668-8">)</span><span·class="p">.</span><span·class="w">146 ······</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">pwd</span><span·class="p"·data-group-id="1534638621-8">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="1534638621-8">)</span><span·class="p">.</span><span·class="w">
147 ······</span><span·class="p"·data-group-id="5863987668-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/guest&quot;</span><span·class="p"·data-group-id="5863987668-9">}</span><span·class="w">147 ······</span><span·class="p"·data-group-id="1534638621-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/guest&quot;</span><span·class="p"·data-group-id="1534638621-9">}</span><span·class="w">
148 ······</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">cd</span><span·class="p"·data-group-id="5863987668-10">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;appl/examples&quot;</span><span·class="p"·data-group-id="5863987668-10">)</span><span·class="p">.</span><span·class="w">148 ······</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">cd</span><span·class="p"·data-group-id="1534638621-10">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;appl/examples&quot;</span><span·class="p"·data-group-id="1534638621-10">)</span><span·class="p">.</span><span·class="w">
149 ······</span><span·class="ss">ok</span><span·class="w">149 ······</span><span·class="ss">ok</span><span·class="w">
150 ······</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">lpwd</span><span·class="p"·data-group-id="5863987668-11">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="5863987668-11">)</span><span·class="p">.</span><span·class="w">150 ······</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">lpwd</span><span·class="p"·data-group-id="1534638621-11">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="1534638621-11">)</span><span·class="p">.</span><span·class="w">
151 ······</span><span·class="p"·data-group-id="5863987668-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/fred&quot;</span><span·class="p"·data-group-id="5863987668-12">}</span><span·class="p">.</span><span·class="w">151 ······</span><span·class="p"·data-group-id="1534638621-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/fred&quot;</span><span·class="p"·data-group-id="1534638621-12">}</span><span·class="p">.</span><span·class="w">
152 ······</span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">lcd</span><span·class="p"·data-group-id="5863987668-13">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/eproj/examples&quot;</span><span·class="p"·data-group-id="5863987668-13">)</span><span·class="p">.</span><span·class="w">152 ······</span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">lcd</span><span·class="p"·data-group-id="1534638621-13">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/eproj/examples&quot;</span><span·class="p"·data-group-id="1534638621-13">)</span><span·class="p">.</span><span·class="w">
153 ······</span><span·class="ss">ok</span><span·class="w">153 ······</span><span·class="ss">ok</span><span·class="w">
154 ······</span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="5863987668-14">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;appl.erl&quot;</span><span·class="p"·data-group-id="5863987668-14">)</span><span·class="p">.</span><span·class="w">154 ······</span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="1534638621-14">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;appl.erl&quot;</span><span·class="p"·data-group-id="1534638621-14">)</span><span·class="p">.</span><span·class="w">
155 ······</span><span·class="ss">ok</span><span·class="w">155 ······</span><span·class="ss">ok</span><span·class="w">
156 ······</span><span·class="mi">9</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5863987668-15">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="5863987668-15">)</span><span·class="p">.</span><span·class="w">156 ······</span><span·class="mi">9</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1534638621-15">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="1534638621-15">)</span><span·class="p">.</span><span·class="w">
157 ······</span><span·class="ss">ok</span><span·class="w">157 ······</span><span·class="ss">ok</span><span·class="w">
158 ······</span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="5863987668-16">(</span><span·class="p"·data-group-id="5863987668-16">)</span><span·class="p">.</span><span·class="w">158 ······</span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ftp</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="1534638621-16">(</span><span·class="p"·data-group-id="1534638621-16">)</span><span·class="p">.</span><span·class="w">
159 ······</span><span·class="ss">ok</span></code></pre><p>The·file·<code·class="inline">appl.erl</code>·is·transferred·from·the·remote·to·the·local·host.·When·the159 ······</span><span·class="ss">ok</span></code></pre><p>The·file·<code·class="inline">appl.erl</code>·is·transferred·from·the·remote·to·the·local·host.·When·the
160 session·is·opened,·the·current·directory·at·the·remote·host·is·<code·class="inline">/home/guest</code>,160 session·is·opened,·the·current·directory·at·the·remote·host·is·<code·class="inline">/home/guest</code>,
161 and·<code·class="inline">/home/fred</code>·at·the·local·host.·Before·transferring·the·file,·the·current161 and·<code·class="inline">/home/fred</code>·at·the·local·host.·Before·transferring·the·file,·the·current
162 local·directory·is·changed·to·<code·class="inline">/home/eproj/examples</code>,·and·the·remote·directory162 local·directory·is·changed·to·<code·class="inline">/home/eproj/examples</code>,·and·the·remote·directory
163 is·set·to·<code·class="inline">/home/guest/appl/examples</code>.</p>163 is·set·to·<code·class="inline">/home/guest/appl/examples</code>.</p>
164 </div>164 </div>
  
624 B
./usr/share/doc/erlang-doc/html/lib/ftp-1.2.2/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-F6750343.js"></script>124 <script·src="dist/search_data-73EEAED9.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
40.2 KB
./usr/share/doc/erlang-doc/html/lib/inets-9.2/doc/html/http_client.html
    
Offset 134, 40 lines modifiedOffset 134, 40 lines modified
134 <p>The·HTTP·client·default·profile·is·started·when·the·<code·class="inline">Inets</code>·application·is134 <p>The·HTTP·client·default·profile·is·started·when·the·<code·class="inline">Inets</code>·application·is
135 started·and·is·then·available·to·all·processes·on·that·Erlang·node.·Other135 started·and·is·then·available·to·all·processes·on·that·Erlang·node.·Other
136 profiles·can·also·be·started·at·application·startup,·or·profiles·can·be·started136 profiles·can·also·be·started·at·application·startup,·or·profiles·can·be·started
137 and·stopped·dynamically·in·runtime.·Each·client·profile·spawns·a·new·process·to137 and·stopped·dynamically·in·runtime.·Each·client·profile·spawns·a·new·process·to
138 handle·each·request,·unless·a·persistent·connection·can·be·used·with·or·without138 handle·each·request,·unless·a·persistent·connection·can·be·used·with·or·without
139 pipelining.·The·client·adds·a·<code·class="inline">host</code>·header·and·an·empty·<code·class="inline">te</code>·header·if·there139 pipelining.·The·client·adds·a·<code·class="inline">host</code>·header·and·an·empty·<code·class="inline">te</code>·header·if·there
140 are·no·such·headers·present·in·the·request.</p><p>The·client·supports·IPv6·as·long·as·the·underlying·mechanisms·also·do·so.</p><p>The·following·is·to·be·put·in·the·Erlang·node·application·configuration·file·to140 are·no·such·headers·present·in·the·request.</p><p>The·client·supports·IPv6·as·long·as·the·underlying·mechanisms·also·do·so.</p><p>The·following·is·to·be·put·in·the·Erlang·node·application·configuration·file·to
141 start·a·profile·at·application·startup:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2131233835-1">[</span><span·class="p"·data-group-id="2131233835-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2131233835-3">[</span><span·class="p"·data-group-id="2131233835-4">{</spa[·...·truncated·by·diffoscope;·len:·606,·SHA:·9a1c4fb62d2b2a5c52457b3f0877b81a960d1d47421c3c2f160b3aa7c3aa2e13·...·]-1">]</span></code></pre><p>For·valid·properties,·see·<a·href="httpc.html"><code·class="inline">httpc</code></a>.</p><h2·id="getting-started"·class="section-heading">141 start·a·profile·at·application·startup:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6748432584-1">[</span><span·class="p"·data-group-id="6748432584-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6748432584-3">[</span><span·class="p"·data-group-id="6748432584-4">{</spa[·...·truncated·by·diffoscope;·len:·606,·SHA:·4865ad5e560b0b8eb65524b0670eab646c9fdec96a76d37951659936531ffa5b·...·]-1">]</span></code></pre><p>For·valid·properties,·see·<a·href="httpc.html"><code·class="inline">httpc</code></a>.</p><h2·id="getting-started"·class="section-heading">
142 ··<a·href="#getting-started"·class="hover-link">142 ··<a·href="#getting-started"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
144 ··</a>144 ··</a>
145 ··<span·class="text">Getting·Started</span>145 ··<span·class="text">Getting·Started</span>
146 </h2>146 </h2>
147 <p>Start·<code·class="inline">Inets</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3679285601-1">(</span><span·class="p"·data-group-id="3679285601-1">)</span><span·class="p">.</span><span·class="w">147 <p>Start·<code·class="inline">Inets</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8838145956-1">(</span><span·class="p"·data-group-id="8838145956-1">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="ss">ok</span></code></pre><p>The·following·calls·use·the·default·client·profile.·Use·the·proxy148 </span><span·class="ss">ok</span></code></pre><p>The·following·calls·use·the·default·client·profile.·Use·the·proxy
149 <code·class="inline">&quot;www-proxy.mycompany.com:8000&quot;</code>,·except·from·requests·to·localhost.·This149 <code·class="inline">&quot;www-proxy.mycompany.com:8000&quot;</code>,·except·from·requests·to·localhost.·This
150 applies·to·all·the·following·requests.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">set_options</span><span·class="p"·data-group-id="8898157615-1">(</span><span·class="p"·data-group-id="8898157615-2">[</span><span·class="p"·data-group-id="8898157615-3">{</span><span·class="ss">proxy</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8898157615-4">{</spa[·...·truncated·by·diffoscope;·len:·230,·SHA:·db424c54ccfa13fff38306ac3166b0e5a5e12d92b57612a4a9851c64f1d3c0b5·...·]-5">}</span><span·class="p">,</span><span·class="w">150 applies·to·all·the·following·requests.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">set_options</span><span·class="p"·data-group-id="0919717194-1">(</span><span·class="p"·data-group-id="0919717194-2">[</span><span·class="p"·data-group-id="0919717194-3">{</span><span·class="ss">proxy</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0919717194-4">{</spa[·...·truncated·by·diffoscope;·len:·230,·SHA:·115c89cdba7cecbc4def140b6f9ebe9abac4c4657a1e9e0880694f3615b37c4e·...·]-5">}</span><span·class="p">,</span><span·class="w">
151 </span><span·class="p"·data-group-id="8898157615-6">[</span><span·class="s">&quot;localhost&quot;</span><span·class="p"·data-group-id="8898157615-6">]</span><span·class="p"·data-group-id="8898157615-4">}</span><span·class="p"·data-group-id="8898157615-3">}</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·3a694ed292c1d8403bf9750037b6722238172455a5c804d5c426deefde6a7be3·...·]-1">)</span><span·class="p">.</span><span·class="w">151 </span><span·class="p"·data-group-id="0919717194-6">[</span><span·class="s">&quot;localhost&quot;</span><span·class="p"·data-group-id="0919717194-6">]</span><span·class="p"·data-group-id="0919717194-4">}</span><span·class="p"·data-group-id="0919717194-3">}</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·ed7ceaec734cb8849fc6aff018c32a12206b6e8c3ce7553253eb4cafbf5f66e5·...·]-1">)</span><span·class="p">.</span><span·class="w">
 152 </span><span·class="ss">ok</span></code></pre><p>The·following·is·an·ordinary·synchronous·request:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="p"·data-group-id="2776235859-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2776235859-2">{</span><span·class="p"·data-group-id="2776235859-3">{</span><span·class="n">Version</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReasonPhrase</span><span·class="p"·data-group-id="2776235859-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Body</span><span·class="p"·data-group-id="2776235859-2">}</span><span·class="p"·data-group-id="2776235859-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
 153 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="2776235859-4">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2776235859-5">{</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2776235859-6">[</span><span·class="p"·data-group-id="2776235859-6">]</span><span·class="p"·data-group-id="2776235859-5">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2776235859-7">[</span><span·class="p"·data-group-id="2776235859-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2776235859-8">[</span><span·class="p"·data-group-id="2776235859-8">]</span><span·class="p"·data-group-id="2776235859-4">)</span><span·class="p">.</span></code></pre><p>With·all·the·default·values·presented,·a·get·request·can·also·be·written·as
152 </span><span·class="ss">ok</span></code></pre><p>The·following·is·an·ordinary·synchronous·request:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="p"·data-group-id="2758469352-1">{</span><span·clas[·...·truncated·by·diffoscope;·len:·658,·SHA:·f5f854a5ffd5d0c38fd01ab25e24199adf44265e1bdfa99590262d0423853479·...·]-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">154 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="p"·data-group-id="7508436431-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·568,·SHA:·2a83c1151a3355409288170d7f247782034f283dbed722221373fc7061355e0b·...·]-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
 155 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="7508436431-4">(</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p"·data-group-id="7508436431-4">)</span><span·class="p">.</span></code></pre><p>The·following·is·a·https·request·and·with·verification·of·the·host:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="p"·data-group-id="3893107503-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3893107503-2">{</span><span·class="p"·data-group-id="3893107503-3">{</span><span·class="n">Version</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReasonPhrase</span><span·class="p"·data-group-id="3893107503-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Body</span><span·class="p"·data-group-id="3893107503-2">}</span><span·class="p"·data-group-id="3893107503-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
 156 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="3893107503-4">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3893107503-5">{</span><span·class="s">&quot;https://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3893107503-6">[</span><span·class="p"·data-group-id="3893107503-6">]</span><span·class="p"·data-group-id="3893107503-5">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3893107503-7">[</span><span·class="p"·data-group-id="3893107503-8">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">ssl_verify_host_options</span><span·class="p"·data-group-id="3893107503-9">(</span><span·class="ss">true</span><span·class="p"·data-group-id="3893107503-9">)</span><span·class="p"·data-group-id="3893107503-8">}</span><span·class="p"·data-group-id="3893107503-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3893107503-10">[</span><span·class="p"·data-group-id="3893107503-10">]</span><span·class="p"·data-group-id="3893107503-4">)</span><span·class="p">.</span></code></pre><p>The·following·is·an·ordinary·asynchronous·request:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="p"·data-group-id="1699714226-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RequestId</span><span·class="p"·data-group-id="1699714226-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
 157 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="1699714226-2">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1699714226-3">{</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1699714226-4">[</span><span·class="p"·data-group-id="1699714226-4">]</span><span·class="p"·data-group-id="1699714226-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1699714226-5">[</span><span·class="p"·data-group-id="1699714226-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1699714226-6">[</span><span·class="p"·data-group-id="1699714226-7">{</span><span·class="ss">sync</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="1699714226-7">}</span><span·class="p"·data-group-id="1699714226-6">]</span><span·class="p"·data-group-id="1699714226-2">)</span><span·class="p">.</span></code></pre><p>The·result·is·sent·to·the·calling·process·as·<code·class="inline">{http,·{ReqestId,·Result}}</code>.</p><p>In·this·case,·the·calling·process·is·the·shell,·so·the·following·result·is
153 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="2758469352-4">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2758469352-5">{</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2758469352-6">[</span><span·class="p"·data-group-id="2758469352-6">]</span><span·class="p"·data-group-id="2758469352-5">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2758469352-7">[</span><span·class="p"·data-group-id="2758469352-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2758469352-8">[</span><span·class="p"·data-group-id="2758469352-8">]</span><span·class="p"·data-group-id="2758469352-4">)</span><span·class="p">.</span></code></pre><p>With·all·the·default·values·presented,·a·get·request·can·also·be·written·as 
154 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="p"·data-group-id="3739251361-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3739251361-2">{</span><span·class="p"·data-group-id="3739251361-3">{</span><span·class="n">Version</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReasonPhrase</span><span·class="p"·data-group-id="3739251361-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Body</span><span·class="p"·data-group-id="3739251361-2">}</span><span·class="p"·data-group-id="3739251361-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w"> 
155 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="3739251361-4">(</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p"·data-group-id="3739251361-4">)</span><span·class="p">.</span></code></pre><p>The·following·is·a·https·request·and·with·verification·of·the·host:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="p"·data-group-id="9008585122-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9008585122-2">{</span><span·class="p"·data-group-id="9008585122-3">{</span><span·class="n">Version</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReasonPhrase</span><span·class="p"·data-group-id="9008585122-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Body</span><span·class="p"·data-group-id="9008585122-2">}</span><span·class="p"·data-group-id="9008585122-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w"> 
156 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="9008585122-4">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9008585122-5">{</span><span·class="s">&quot;https://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9008585122-6">[</span><span·class="p"·data-group-id="9008585122-6">]</span><span·class="p"·data-group-id="9008585122-5">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9008585122-7">[</span><span·class="p"·data-group-id="9008585122-8">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">ssl_verify_host_options</span><span·class="p"·data-group-id="9008585122-9">(</span><span·class="ss">true</span><span·class="p"·data-group-id="9008585122-9">)</span><span·class="p"·data-group-id="9008585122-8">}</span><span·class="p"·data-group-id="9008585122-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9008585122-10">[</span><span·class="p"·data-group-id="9008585122-10">]</span><span·class="p"·data-group-id="9008585122-4">)</span><span·class="p">.</span></code></pre><p>The·following·is·an·ordinary·asynchronous·request:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="p"·data-group-id="1361133298-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RequestId</span><span·class="p"·data-group-id="1361133298-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w"> 
157 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="1361133298-2">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1361133298-3">{</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1361133298-4">[</span><span·class="p"·data-group-id="1361133298-4">]</span><span·class="p"·data-group-id="1361133298-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1361133298-5">[</span><span·class="p"·data-group-id="1361133298-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1361133298-6">[</span><span·class="p"·data-group-id="1361133298-7">{</span><span·class="ss">sync</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="1361133298-7">}</span><span·class="p"·data-group-id="1361133298-6">]</span><span·class="p"·data-group-id="1361133298-2">)</span><span·class="p">.</span></code></pre><p>The·result·is·sent·to·the·calling·process·as·<code·class="inline">{http,·{ReqestId,·Result}}</code>.</p><p>In·this·case,·the·calling·process·is·the·shell,·so·the·following·result·is 
158 received:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="6681921934-1">{</span><span·class="ss">http</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6681921934-2">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·a3c928566d30c01a0aed1fcbd51e3f7b5ce8d74622d922b831be2f1e53ac6952·...·]-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">500</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">158 received:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="4291315117-1">{</span><span·class="ss">http</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4291315117-2">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·7b401d77ac6ec9cc3267e3eaf9f54be6c3055e2244f01772c6989e941b66cc19·...·]-1">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">500</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
159 </span><span·class="ss">ok</span></code></pre><p>This·sends·a·request·with·a·specified·connection·header:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="p"·data-group-id="9363402758-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9363402758-2">{</span><span·class="p"·data-group-id="9363402758-3">{</span><span·class="n">NewVersion</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">200</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewReasonPhrase</span><span·class="p"·data-group-id="9363402758-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewHeaders</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewBody</span><span·class="p"·data-group-id="9363402758-2">}</span><span·class="p"·data-group-id="9363402758-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w"> 
160 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="9363402758-4">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9363402758-5">{</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9363402758-6">[</span><span·class="p"·data-group-id="9363402758-7">{</span><span·class="s">&quot;connection&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;close&quot;</span><span·class="p"·data-group-id="9363402758-7">}</span><span·class="p"·data-group-id="9363402758-6">]</span><span·class="p"·data-group-id="9363402758-5">}</span><span·class="p">,</span><span·class="w"> 
161 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="9363402758-8">[</span><span·class="p"·data-group-id="9363402758-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9363402758-9[·...·truncated·by·diffoscope;·len:·1167,·SHA:·d12229dbfc60bea72111a414dd2eb11408d03a40bdb1e212d0d3869a4851d296·...·]">159 </span><span·class="ss">ok</span></code></pre><p>This·sends·a·request·with·a·specified·connection·header:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="p"·data-group-id="5629501658-1">{</span><span·class="ss">ok</sp[·...·truncated·by·diffoscope;·len:·731,·SHA:·d34097b9cb42d0f7afc2a08f2d7e17a169dbc8b98c16360205dbb023bbca5d91·...·]">
 160 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="5629501658-4">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5629501658-5">{</span><span·class="s">&quot;http://www.erlang.org&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5629501658-6">[</span><span·class="p"·data-group-id="5629501658-7">{</span><span·class="s">&quot;connection&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;close&quot;</span><span·class="p"·data-group-id="5629501658-7">}</span><span·class="p"·data-group-id="5629501658-6">]</span><span·class="p"·data-group-id="5629501658-5">}</span><span·class="p">,</span><span·class="w">
 161 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="5629501658-8">[</span><span·class="p"·data-group-id="5629501658-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5629501658-9">[</span><span·class="p"·data-group-id="5629501658-9">]</span><span·class="p"·data-group-id="5629501658-4">)</span><span·class="p">.</span></code></pre><p>This·sends·an·HTTP·request·over·a·unix·domain·socket·(experimental):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">set_options</span><span·class="p"·data-group-id="8772999058-1">(</span><span·class="p"·data-group-id="8772999058-2">[</span><span·class="p"·data-group-id="8772999058-3">{</span><span·class="ss">ipfamily</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">local</span><span·class="p"·data-group-id="8772999058-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8772999058-4">{</span><span·class="ss">unix_socket</span><span·class="p">,</span><span·class="s">&quot;/tmp/unix_socket/consul_http.sock&quot;</span><span·class="p"·data-group-id="8772999058-4">}</span><span·class="p"·data-group-id="8772999058-2">]</span><span·class="p"·data-group-id="8772999058-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
162 10&gt;·</span><span·class="p"·data-group-id="7343356136-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7343356136-6">{</span><span·class="p"·data-group-id="7343356136-7">{</span><span·class="n">NewVersion</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·446,·SHA:·2b8a0db2d036ea835dcc218e45276d8d3c58c50b0d3c1d79b8e2c40221e9ef9d·...·]-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">162 10&gt;·</span><span·class="p"·data-group-id="8772999058-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8772999058-6">{</span><span·class="p"·data-group-id="8772999058-7">{</span><span·class="n">NewVersion</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·446,·SHA:·1dc65f0eea5c34c599ea4abc32d71878603b9a0de4729712b0d048e1bf1f4fb9·...·]-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
163 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="7343356136-8">(</span><span·class="nb">put</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7343356136-9">{</span><span·class="s">&quot;http:///v1/kv/foo&quot;</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·1778,·SHA:·827e301b294585f431cb3b279ca5e91a700cf65165e38cf68dd2ab79beb2bd1e·...·]-2">)</span><span·class="p">.</span><span·class="w">163 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="nc">httpc</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="8772999058-8">(</span><span·class="nb">put</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8772999058-9">{</span><span·class="s">&quot;http:///v1/kv/foo&quot;</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·1778,·SHA:·b3b64331d3c41e727391eaa4dd8c8592b6851184993cc6e4197b7f3f13611a12·...·]-2">)</span><span·class="p">.</span><span·class="w">
164 </span><span·class="p"·data-group-id="5639258067-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.45</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·513,·SHA:·f4972d373813c750db33cdb52c1bc1dd0bb3c689c913529a2bf1bdddb7b1abe8·...·]-1">)</span><span·class="p">.</span><span·class="w">164 </span><span·class="p"·data-group-id="3672023706-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.45</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·513,·SHA:·1f1d7978d93b0c3f87b74e6adb8134cee77e510ab3453f226c4c77e0c7aaf2a3·...·]-1">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="p"·data-group-id="2139087810-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">econnrefused</span><span·class="p"·data-group-id="2139087810-2">}</span></code></pre><p>Stop·the·HTTP·client·profile:</p><pre><code·class="m[·...·truncated·by·diffoscope;·len:·352,·SHA:·3be5ce145e99bee169ba975ebfb581e2a61d85689c423dc91759dc7c8a105f6e·...·]-1">)</span><span·class="p">.</span><span·class="w">165 </span><span·class="p"·data-group-id="3759809668-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">econnrefused</span><span·class="p"·data-group-id="3759809668-2">}</span></code></pre><p>Stop·the·HTTP·client·profile:</p><pre><code·class="m[·...·truncated·by·diffoscope;·len:·352,·SHA:·27961824859b12b4d05630ea540d80e45c43296b0d727778447718db491fa3df·...·]-1">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="ss">ok</span></code></pre><p>Alternative·way·to·stop·the·HTTP·client·profile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">13&gt;·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="2325028304-1">(</span><span·class="ss">httpc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="2325028304-1">)</span><span·class="p">.</span><span·class="w">166 </span><span·class="ss">ok</span></code></pre><p>Alternative·way·to·stop·the·HTTP·client·profile:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">13&gt;·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="2164255302-1">(</span><span·class="ss">httpc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="2164255302-1">)</span><span·class="p">.</span><span·class="w">
167 </span><span·class="ss">ok</span></code></pre>167 </span><span·class="ss">ok</span></code></pre>
168 </div>168 </div>
  
169 <div·class="bottom-actions"·id="bottom-actions">169 <div·class="bottom-actions"·id="bottom-actions">
170 ··<div·class="bottom-actions-item">170 ··<div·class="bottom-actions-item">
  
171 ······<a·href="inets_services.html"·class="bottom-actions-button"·rel="prev">171 ······<a·href="inets_services.html"·class="bottom-actions-button"·rel="prev">
53.3 KB
./usr/share/doc/erlang-doc/html/lib/inets-9.2/doc/html/http_server.html
    
Offset 137, 54 lines modifiedOffset 137, 54 lines modified
137 underlying·mechanisms·also·do·so.</p><p>The·server·implements·numerous·features,·such·as:</p><ul><li>Secure·Sockets·Layer·(SSL)</li><li>Erlang·Scripting·Interface·(ESI)</li><li>Common·Gateway·Interface·(CGI)</li><li>User·Authentication·(using·Mnesia,·Dets·or·plain·text·database)</li><li>Common·Logfile·Format·(with·or·without·disk_log(3)·support)</li><li>URL·Aliasing</li><li>Action·Mappings</li><li>Directory·Listings</li></ul><p>The·configuration·of·the·server·is·provided·as·an·Erlang·property·list.</p><p>As·of·<code·class="inline">Inets</code>·5.0·the·HTTP·server·is·an·easy·to·start/stop·and·customize·web137 underlying·mechanisms·also·do·so.</p><p>The·server·implements·numerous·features,·such·as:</p><ul><li>Secure·Sockets·Layer·(SSL)</li><li>Erlang·Scripting·Interface·(ESI)</li><li>Common·Gateway·Interface·(CGI)</li><li>User·Authentication·(using·Mnesia,·Dets·or·plain·text·database)</li><li>Common·Logfile·Format·(with·or·without·disk_log(3)·support)</li><li>URL·Aliasing</li><li>Action·Mappings</li><li>Directory·Listings</li></ul><p>The·configuration·of·the·server·is·provided·as·an·Erlang·property·list.</p><p>As·of·<code·class="inline">Inets</code>·5.0·the·HTTP·server·is·an·easy·to·start/stop·and·customize·web
138 server·providing·the·most·basic·web·server·functionality.·Inets·is·designed·for138 server·providing·the·most·basic·web·server·functionality.·Inets·is·designed·for
139 embedded·systems·and·if·you·want·a·full-fledged·web·server·there·are·other139 embedded·systems·and·if·you·want·a·full-fledged·web·server·there·are·other
140 erlang·open·source·alternatives.</p><p>Almost·all·server·functionality·has·been·implemented·using·an·especially·crafted140 erlang·open·source·alternatives.</p><p>Almost·all·server·functionality·has·been·implemented·using·an·especially·crafted
141 server·API,·which·is·described·in·the·Erlang·Web·Server·API.·This·API·can·be141 server·API,·which·is·described·in·the·Erlang·Web·Server·API.·This·API·can·be
142 used·to·enhance·the·core·server·functionality,·for·example·with·custom·logging142 used·to·enhance·the·core·server·functionality,·for·example·with·custom·logging
143 and·authentication.</p><p>The·following·is·to·be·put·in·the·Erlang·node·application·configuration·file·to143 and·authentication.</p><p>The·following·is·to·be·put·in·the·Erlang·node·application·configuration·file·to
144 start·an·HTTP·server·at·application·startup:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3771160722-1">[</span><span·class="p"·data-group-id="3771160722-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3771160722-3">[</span><span·class="p"·data-group-id="3771160722-4">{</span><span·class="ss">services</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3771160722-5">[</span><span·class="p"·data-group-id="3771160722-6">{</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3771160722-7">[</span><span·class="p"·data-group-id="3771160722-8">{</span><span·class="ss">proplist_file</span><span·class="p">,</span><span·class="w"> 
145 ···········</span><span·class="s">&quot;/var/tmp/server_root/conf/8888_props.conf&quot;</span><span·class="p"·data-group-id="3771160722-8">}</span><span·class="p"·data-group-id="3771160722-7">]</span><span·class="p"·data-group-id="3771160722-6">}</span><span·class="p">,</span><span·class="w">144 start·an·HTTP·server·at·application·startup:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1007647389-1">[</span><span·class="p"·data-group-id="1007647389-2">{</span><span·class="ss">inets</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·528,·SHA:·0c7a623d7b0d3e16c39eef4c86b8db5f7e3a38de2f97fafcfd39cb289ef49820·...·]</span><span·class="p">,</span><span·class="w">
 145 ···········</span><span·class="s">&quot;/var/tmp/server_root/conf/8888_props.conf&quot;</span><span·class="p"·data-group-id="1007647389-8">}</span><span·class="p"·data-group-id="1007647389-7">]</span><span·class="p"·data-group-id="1007647389-6">}</span><span·class="p">,</span><span·class="w">
146 ··········</span><span·class="p"·data-group-id="3771160722-9">{</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3771160722-10">[</span><span·class="p"·data-group-id="3771160722-11">{</span><span·class="ss">proplist_file</span><span·class="p">,</span><span·class="w">146 ··········</span><span·class="p"·data-group-id="1007647389-9">{</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1007647389-10">[</span><span·class="p"·data-group-id="1007647389-11">{</span><span·class="ss">proplist_file</span><span·class="p">,</span><span·class="w">
147 ···········</span><span·class="s">&quot;/var/tmp/server_root/conf/8080_props.conf&quot;</span><span·class="p"·data-group-id="3771160722-11">}</span><span·class="p"·data-group-id="3771160722-10">]</span><span·class="p"·data-group-id="3771160722-9">}</span><span·class="p"·data-group-id="3771160722-5">]</span><span·class="p"·data-group-id="3771160722-4">}</span><span·class="p"·data-group-id="3771160722-3">]</span><span·class="p"·data-group-id="3771160722-2">}</span><span·class="p"·data-group-id="3771160722-1">]</span><span·class="p">.</span></code></pre><p>The·server·is·configured·using·an·Erlang·property·list.·For·the·available 
148 properties,·see·<a·href="httpd.html"><code·class="inline">httpd</code></a>.</p><p>The·available·configuration·properties·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">httpd_service</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·485,·SHA:·fba37372760fd5864f8aa1867d7d75379223ddd74b87399e17d034cace41720e·...·]147 ···········</span><span·class="s">&quot;/var/tmp/server_root/conf/8080_props.conf&quot;</span><span·class="p"·data-group-id="1007647389-11">}</span><span·class="p"·data-group-id="1007647389-10">]</span><span·class="p"·data-group-id="1007647389-9">}</span><[·...·truncated·by·diffoscope;·len:·377,·SHA:·8365d853b81d120c00edd538548db225fc04cd25e290016f5cd30f52bbade037·...·]
 148 properties,·see·<a·href="httpd.html"><code·class="inline">httpd</code></a>.</p><p>The·available·configuration·properties·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">httpd_service</span><span·class="p"·data-group-id="7250439036-1">(</span><span·class="p"·data-group-id="7250439036-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7250439036-2">{</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">httpd</span><span·class="p"·data-group-id="7250439036-3">(</span><span·class="p"·data-group-id="7250439036-3">)</span><span·class="p"·data-group-id="7250439036-2">}</span><span·class="w">
149 </span><span·class="nf">httpd</span><span·class="p"·data-group-id="0748355988-4">(</span><span·class="p"·data-group-id="0748355988-4">)</span><span·class="w">·········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0748355988-5">[</span><span·class="nf">httpd_config</span><span·cl[·...·truncated·by·diffoscope;·len:·139,·SHA:·d35dd566ab24e36501ce14a3b1f1c127b863371154f889285ac761ed6fc13536·...·]-5">]</span><span·class="w">149 </span><span·class="nf">httpd</span><span·class="p"·data-group-id="7250439036-4">(</span><span·class="p"·data-group-id="7250439036-4">)</span><span·class="w">·········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7250439036-5">[</span><span·class="nf">httpd_config</span><span·cl[·...·truncated·by·diffoscope;·len:·139,·SHA:·0365bfd97bfa34d00a47d6acb5e3b7761b712548e6ab8830a1800900572a7549·...·]-5">]</span><span·class="w">
150 </span><span·class="nf">httpd_config</span><span·class="p"·data-group-id="0748355988-7">(</span><span·class="p"·data-group-id="0748355988-7">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0748355988-8">{</span><span·class="ss">proplist_file</span><span·class="p[·...·truncated·by·diffoscope;·len:·209,·SHA:·1eda42df5e09ff98a906220e09aad78c2724e6ea6c288aab9aec3fc9043b51ed·...·]-8">}</span><span·class="w">150 </span><span·class="nf">httpd_config</span><span·class="p"·data-group-id="7250439036-7">(</span><span·class="p"·data-group-id="7250439036-7">)</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7250439036-8">{</span><span·class="ss">proplist_file</span><span·class="p[·...·truncated·by·diffoscope;·len:·209,·SHA:·992c92ad7f407669a1a8d3d51e2b93e0aa05dfc56af211fc2a794d536a02eaa6·...·]-8">}</span><span·class="w">
151 ···················</span><span·class="p"·data-group-id="0748355988-10">{</span><span·class="ss">debug</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">debug</span><span·class="p"·data-group-id="0748355988-11">(</span><span·class="p"·data-group-id="0748355988-11">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·0fc8696b51c58eef46964c659e268ce7e34cfe922f4ca3cbc4ceddf45b57feb6·...·]-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">151 ···················</span><span·class="p"·data-group-id="7250439036-10">{</span><span·class="ss">debug</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">debug</span><span·class="p"·data-group-id="7250439036-11">(</span><span·class="p"·data-group-id="7250439036-11">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·bcc311f5589bc18746b0546a49e8ea33a584ba1d5cd50b9c0bd8e01fe06e7d1c·...·]-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
152 ···················</span><span·class="p"·data-group-id="0748355988-12">{</span><span·class="ss">accept_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="0748355988-13">(</span><span·class="p"·data-group-id="0748355988-13">)</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·d68d28622899c803af63b628d67033c6e5f6f16a838e51909dc3d202540388d1·...·]-12">}</span><span·class="w">152 ···················</span><span·class="p"·data-group-id="7250439036-12">{</span><span·class="ss">accept_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7250439036-13">(</span><span·class="p"·data-group-id="7250439036-13">)</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·3aac83de943a73fcd874cb8da3ff3ecc6d63d41beb16160d9d11c002d44799a5·...·]-12">}</span><span·class="w">
153 </span><span·class="nf">debug</span><span·class="p"·data-group-id="0748355988-14">(</span><span·class="p"·data-group-id="0748355988-14">)</span><span·class="w">·········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">disable</span><span·class="w">·</span><span·class="p">|</span><span·class="w">[·...·truncated·by·diffoscope;·len:·248,·SHA:·0c23c13ba7850a1bc32d7a90f5bc82b574837bd143a834b4c14cb51cd818dd43·...·]-15">]</span><span·class="w">153 </span><span·class="nf">debug</span><span·class="p"·data-group-id="7250439036-14">(</span><span·class="p"·data-group-id="7250439036-14">)</span><span·class="w">·········</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">disable</span><span·class="w">·</span><span·class="p">|</span><span·class="w">[·...·truncated·by·diffoscope;·len:·248,·SHA:·3afcdaab30cf7d2d2743134a170af8f3b2888639143b722200493414cb5fe25e·...·]-15">]</span><span·class="w">
154 </span><span·class="nf">debug_options</span><span·class="p"·data-group-id="0748355988-17">(</span><span·class="p"·data-group-id="0748355988-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0748355988-18">{</span><span·class="ss">all_functions</span><span·class=[·...·truncated·by·diffoscope;·len:·216,·SHA:·b5a6fcce7a003ad8d0679a7022304444ddbce5eb25910aa2f930f3bc0ae79b6f·...·]-18">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">154 </span><span·class="nf">debug_options</span><span·class="p"·data-group-id="7250439036-17">(</span><span·class="p"·data-group-id="7250439036-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7250439036-18">{</span><span·class="ss">all_functions</span><span·class=[·...·truncated·by·diffoscope;·len:·216,·SHA:·bf7c98ca3e667e51582c3faf32932cfc00a80a7c023d000e55c2cb66d0ba8248·...·]-18">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
155 ···················</span><span·class="p"·data-group-id="0748355988-20">{</span><span·class="ss">exported_functions</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="0748355988-21">(</span><span·class="p"·data-group-id="0748355988-21">)</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·e7e98e10c835a4d8e56855479e29531ab0ab743e8e5a69d8eae4514cbad8b637·...·]-20">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">155 ···················</span><span·class="p"·data-group-id="7250439036-20">{</span><span·class="ss">exported_functions</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="7250439036-21">(</span><span·class="p"·data-group-id="7250439036-21">)</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·f760f6e271d8c0d23ddea285e492409bef6a55d19560605ed13a220438ef455e·...·]-20">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
156 ···················</span><span·class="p"·data-group-id="0748355988-22">{</span><span·class="ss">disable</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="0748355988-23">(</span><span·class="p"·data-group-id="0748355988-23">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·a30621a0477275f2c340f6ed2f42453dd3a154b6dac1b0129c6d555f781daa8e·...·]-22">}</span><span·class="w">156 ···················</span><span·class="p"·data-group-id="7250439036-22">{</span><span·class="ss">disable</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="7250439036-23">(</span><span·class="p"·data-group-id="7250439036-23">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·f241e51badf144345fff63801f14d207bbad32fce97fd0b727748880e7be4fc1·...·]-22">}</span><span·class="w">
157 </span><span·class="nf">modules</span><span·class="p"·data-group-id="0748355988-24">(</span><span·class="p"·data-group-id="0748355988-24">)</span><span·class="w">·······</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0748355988-25">[</span><span·class="nf">atom</span><span·class="p"[·...·truncated·by·diffoscope;·len:·134,·SHA:·8c772f572869f08532c04cc4a15bd4f4e00b19527b2b7bb02702ab7473671af5·...·]-25">]</span></code></pre><p>Here:</p><ul><li><p><strong><code·class="inline">{proplist_file,·file()}</code></strong>·-·File·containing·an·Erlang·property·list,157 </span><span·class="nf">modules</span><span·class="p"·data-group-id="7250439036-24">(</span><span·class="p"·data-group-id="7250439036-24">)</span><span·class="w">·······</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7250439036-25">[</span><span·class="nf">atom</span><span·class="p"[·...·truncated·by·diffoscope;·len:·134,·SHA:·cb057256d29a5ac437329933d75277186e7901765345a39e17dde4a0a6e102a1·...·]-25">]</span></code></pre><p>Here:</p><ul><li><p><strong><code·class="inline">{proplist_file,·file()}</code></strong>·-·File·containing·an·Erlang·property·list,
158 followed·by·a·full·stop,·describing·the·HTTP·server·configuration.</p></li><li><p><strong><code·class="inline">{debug,·debug()}</code></strong>·-·Can·enable·trace·on·all·functions·or·only·exported158 followed·by·a·full·stop,·describing·the·HTTP·server·configuration.</p></li><li><p><strong><code·class="inline">{debug,·debug()}</code></strong>·-·Can·enable·trace·on·all·functions·or·only·exported
159 functions·on·chosen·modules.</p></li><li><p><strong><code·class="inline">{accept_timeout,·integer()}</code></strong>·-·Sets·the·wanted·time-out·value·for·the159 functions·on·chosen·modules.</p></li><li><p><strong><code·class="inline">{accept_timeout,·integer()}</code></strong>·-·Sets·the·wanted·time-out·value·for·the
160 server·to·set·up·a·request·connection.</p></li></ul><h2·id="getting-started"·class="section-heading">160 server·to·set·up·a·request·connection.</p></li></ul><h2·id="getting-started"·class="section-heading">
161 ··<a·href="#getting-started"·class="hover-link">161 ··<a·href="#getting-started"·class="hover-link">
162 ····<i·class="ri-link-m"·aria-hidden="true"></i>162 ····<i·class="ri-link-m"·aria-hidden="true"></i>
163 ··</a>163 ··</a>
164 ··<span·class="text">Getting·Started</span>164 ··<span·class="text">Getting·Started</span>
165 </h2>165 </h2>
166 <p><a·href=""·id="using_http_server_api"></a></p><p>Start·<code·class="inline">Inets</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9240931202-1">(</span><span·class="p"·data-group-id="9240931202-1">)</span><span·class="p">.</span><span·class="w">166 <p><a·href=""·id="using_http_server_api"></a></p><p>Start·<code·class="inline">Inets</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="0332262748-1">(</span><span·class="p"·data-group-id="0332262748-1">)</span><span·class="p">.</span><span·class="w">
167 </span><span·class="ss">ok</span></code></pre><p>Start·an·HTTP·server·with·minimal·required·configuration.·If·you·specify·port167 </span><span·class="ss">ok</span></code></pre><p>Start·an·HTTP·server·with·minimal·required·configuration.·If·you·specify·port
168 <code·class="inline">0</code>,·an·arbitrary·available·port·is·used,·and·you·can·use·function·<code·class="inline">info</code>·to168 <code·class="inline">0</code>,·an·arbitrary·available·port·is·used,·and·you·can·use·function·<code·class="inline">info</code>·to
169 find·which·port·number·that·was·picked:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="p"·data-group-id="4496353339-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="4496353339-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·703,·SHA:·6ace735c000535b390de227b829db82aec9b78983b29b85a17c631472426db0c·...·]-5">}</span><span·class="p">,</span><span·class="w">169 find·which·port·number·that·was·picked:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="p"·data-group-id="1132981496-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="1132981496-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·703,·SHA:·bb9ff73cd678ca32f2bd52109a5713a15a4a2f3081841a3a3c343d42e16e9f22·...·]-5">}</span><span·class="p">,</span><span·class="w">
170 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="4496353339-6">{</span><span·class="ss">document_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/htdocs&quot;</span><span·class="p"·data-group-id="4496353339-6">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·302,·SHA:·f47ef69f5ec7f9c6dda1d8df9b89061e1a012649bae97d6702440372c99536f4·...·]-2">)</span><span·class="p">.</span><span·class="w">170 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="1132981496-6">{</span><span·class="ss">document_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/htdocs&quot;</span><span·class="p"·data-group-id="1132981496-6">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·302,·SHA:·3bee9a9002936bac651c492192212f72f0b4b4045b5cfd6c19d48de56154f5df·...·]-2">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="p"·data-group-id="4496353339-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="mf">0.79</span><span·class="p">.</span><span·class="mi">0</span><span·class="p"·data-group-id="4496353339-8">}</span></code></pre><p>Call·<code·cla[·...·truncated·by·diffoscope;·len:·320,·SHA:·56c930ca0203145c9f6911be101b1c3415d3c28089b5bcea9b9b9629cb43f308·...·]-1">)</span><span·class="p">.</span><span·class="w">171 </span><span·class="p"·data-group-id="1132981496-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="mf">0.79</span><span·class="p">.</span><span·class="mi">0</span><span·class="p"·data-group-id="1132981496-8">}</span></code></pre><p>Call·<code·cla[·...·truncated·by·diffoscope;·len:·320,·SHA:·b5eb4d47c6750d71b3630a4f45807732e05dfc13e36f46ab7e98842dc6a72651·...·]-1">)</span><span·class="p">.</span><span·class="w">
172 </span><span·class="p"·data-group-id="4669247998-2">[</span><span·class="p"·data-group-id="4669247998-3">{</span><span·class="ss">mime_types</span><span·class="p">,</span><span·class="p"·data-group-id="4669247998-4">[</span><span·class="p"·data-group-id="4669247998-5">{</span><span·class="s">&[·...·truncated·by·diffoscope;·len:·473,·SHA:·c4e33a307bf87dd3fee1e47640b9a473c829033d863062c848bd85f10a496923·...·]-3">}</span><span·class="p">,</span><span·class="w">172 </span><span·class="p"·data-group-id="5367625133-2">[</span><span·class="p"·data-group-id="5367625133-3">{</span><span·class="ss">mime_types</span><span·class="p">,</span><span·class="p"·data-group-id="5367625133-4">[</span><span·class="p"·data-group-id="5367625133-5">{</span><span·class="s">&[·...·truncated·by·diffoscope;·len:·473,·SHA:·d26d6cfe8561e3f724cb000e9288901c9ce1854d9ea43b53722909ddc71ba2b1·...·]-3">}</span><span·class="p">,</span><span·class="w">
173 ·</span><span·class="p"·data-group-id="4669247998-7">{</span><span·class="ss">server_name</span><span·class="p">,</span><span·class="s">&quot;machine.local&quot;</span><span·class="p"·data-group-id="4669247998-7">}</span><span·class="p">,</span><span·class="w">173 ·</span><span·class="p"·data-group-id="5367625133-7">{</span><span·class="ss">server_name</span><span·class="p">,</span><span·class="s">&quot;machine.local&quot;</span><span·class="p"·data-group-id="5367625133-7">}</span><span·class="p">,</span><span·class="w">
174 ·</span><span·class="p"·data-group-id="4669247998-8">{</span><span·class="ss">bind_address</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4669247998-9">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·171,·SHA:·9210cc451c25d8de053aa25689b711d5a73c9689e5bd67b622378ccbb115dbc6·...·]-8">}</span><span·class="p">,</span><span·class="w">174 ·</span><span·class="p"·data-group-id="5367625133-8">{</span><span·class="ss">bind_address</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5367625133-9">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·171,·SHA:·0a241fff3f128bf6f6cf9f7a9f12cc41e5f4c1c2b8b4f181ad7dea45d9b3f85e·...·]-8">}</span><span·class="p">,</span><span·class="w">
175 ·</span><span·class="p"·data-group-id="4669247998-10">{</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="s">&quot;/tmp&quot;</span><span·class="p"·data-group-id="4669247998-10">}</span><span·class="p">,</span><span·class="w">175 ·</span><span·class="p"·data-group-id="5367625133-10">{</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="s">&quot;/tmp&quot;</span><span·class="p"·data-group-id="5367625133-10">}</span><span·class="p">,</span><span·class="w">
176 ·</span><span·class="p"·data-group-id="4669247998-11">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="mi">59408</span><span·class="p"·data-group-id="4669247998-11">}</span><span·class="p">,</span><span·class="w">176 ·</span><span·class="p"·data-group-id="5367625133-11">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="mi">59408</span><span·class="p"·data-group-id="5367625133-11">}</span><span·class="p">,</span><span·class="w">
177 ·</span><span·class="p"·data-group-id="4669247998-12">{</span><span·class="ss">document_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/htdocs&quot;</span><span·class="p"·data-group-id="4669247998-12">}</span><span·class="p">,</span><span·class="w">177 ·</span><span·class="p"·data-group-id="5367625133-12">{</span><span·class="ss">document_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/htdocs&quot;</span><span·class="p"·data-group-id="5367625133-12">}</span><span·class="p">,</span><span·class="w">
178 ·</span><span·class="p"·data-group-id="4669247998-13">{</span><span·class="ss">ipfamily</span><span·class="p">,</span><span·class="ss">inet</span><span·class="p"·data-group-id="4669247998-13">}</span><span·class="p"·data-group-id="4669247998-2">]</span></code></pre><p>Reload·the·configuration·w[·...·truncated·by·diffoscope;·len:·519,·SHA:·113ad451fc87b69b24f6302d5a5a51b9185115410a73ebc30d7bf437b9d4013f·...·]-3">}</span><span·class="p">,</span><span·class="w">178 ·</span><span·class="p"·data-group-id="5367625133-13">{</span><span·class="ss">ipfamily</span><span·class="p">,</span><span·class="ss">inet</span><span·class="p"·data-group-id="5367625133-13">}</span><span·class="p"·data-group-id="5367625133-2">]</span></code></pre><p>Reload·the·configuration·w[·...·truncated·by·diffoscope;·len:·519,·SHA:·268a751e116bcbc518113a9c6efd54b48511f884e341dfe7e945b5699a9b5f33·...·]-3">}</span><span·class="p">,</span><span·class="w">
179 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="3928997157-4">{</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/www_test&quot;</span><span·class="p"·data-group-id="3928997157-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·184,·SHA:·8db2dffaf5ec65dbf211950509f591afed1e2354549826a76fcf149b0abc687d·...·]-5">}</span><span·class="p">,</span><span·class="w">179 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="1721204123-4">{</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/www_test&quot;</span><span·class="p"·data-group-id="1721204123-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·184,·SHA:·981c4419fff5061c86d6acdb6423229550896a3bb4ba842a71dc5c6597d6e90b·...·]-5">}</span><span·class="p">,</span><span·class="w">
180 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="3928997157-6">{</span><span·class="ss">bind_address</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;localhost&quot;</span><span·class="p"·data-group-id="3928997157-6">}</span><span·class="p"·data-group-id="3928997157-2">]</span>[·...·truncated·by·diffoscope;·len:·127,·SHA:·f61f9106645e2097ec3eecafdaf63143e240611a7c6f7547c849893b0e1760f0·...·]-1">)</span><span·class="p">.</span><span·class="w">180 </span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="1721204123-6">{</span><span·class="ss">bind_address</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;localhost&quot;</span><span·class="p"·data-group-id="1721204123-6">}</span><span·class="p"·data-group-id="1721204123-2">]</span>[·...·truncated·by·diffoscope;·len:·127,·SHA:·4ef74b52a4f18e780715fbf271e37362698dd147328b2e6d1ee9f3b6b1f2628c·...·]-1">)</span><span·class="p">.</span><span·class="w">
181 </span><span·class="ss">ok</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p><code·class="inline">port</code>·and·<code·class="inline">bind_address</code>·cannot·be·changed.·Clients·trying·to·access·the181 </span><span·class="ss">ok</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p><code·class="inline">port</code>·and·<code·class="inline">bind_address</code>·cannot·be·changed.·Clients·trying·to·access·the
182 server·during·the·reload·get·a·service·temporary·unavailable·answer.</p></blockquote><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">httpd</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="5990450300-1">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5990450300-2">[</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">document_root</span><span·class="p"·data-group-id="5990450300-2">]</span><span·class="p"·data-group-id="5990450300-1">)</span><span·class="p">.</span><span·class="w"> 
183 </span><span·class="p"·data-group-id="5990450300-3">[</span><span·class="p"·data-group-id="5990450300-4">{</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/www_test&quot;</span><span·class="p"·data-group-id="59904[·...·truncated·by·diffoscope;·len:·1948,·SHA:·2a374300359f48058feb654954482535be6cfc769f2db5128c40d1aa893ffc76·...·]>182 server·during·the·reload·get·a·service·temporary·unavailable·answer.</p></blockquote><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">httpd</span><span·class="p">:</span><span·class="nf">info</span[·...·truncated·by·diffoscope;·len:·446,·SHA:·965eb3e20276ac50f8bf6c5b7da8f604539e58b6593aa7404433d729dab39faf·...·]>
 183 </span><span·class="p"·data-group-id="8537684702-3">[</span><span·class="p"·data-group-id="8537684702-4">{</span><span·class="ss">server_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/www_test&quot;</span><span·class="p"·data-group-id="8537684702-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="8537684702-5">{</span><span·class="ss">document_root</span><span·class="p">,</span><span·class="s">&quot;/tmp/www_test/htdocs&quot;</span><span·class="p"·data-group-id="8537684702-5">}</span><span·class="p"·data-group-id="8537684702-3">]</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0859709003-1">(</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="0859709003-1">)</span><span·class="p">.</span></code></pre><p>Alternative:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">inets</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0024905830-1">(</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0024905830-2">{</span><span·class="p"·data-group-id="0024905830-3">{</span><span·class="mi">127</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="0024905830-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">59408</span><span·class="p"·data-group-id="0024905830-2">}</span><span·class="p"·data-group-id="0024905830-1">)</span><span·class="p">.</span></code></pre><p>Notice·that·<code·class="inline">bind_address</code>·must·be·the·IP·address·reported·by·function·<code·class="inline">info</code>
184 and·cannot·be·the·hostname·that·is·allowed·when·putting·in·<code·class="inline">bind_address</code>.</p><h2·id="dynamic-web-pages"·class="section-heading">184 and·cannot·be·the·hostname·that·is·allowed·when·putting·in·<code·class="inline">bind_address</code>.</p><h2·id="dynamic-web-pages"·class="section-heading">
185 ··<a·href="#dynamic-web-pages"·class="hover-link">185 ··<a·href="#dynamic-web-pages"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">Dynamic·Web·Pages</span>188 ··<span·class="text">Dynamic·Web·Pages</span>
189 </h2>189 </h2>
190 <p><a·href=""·id="dynamic_we_pages"></a></p><p><code·class="inline">Inets</code>·HTTP·server·provides·two·ways·of·creating·dynamic·web·pages,·each·with190 <p><a·href=""·id="dynamic_we_pages"></a></p><p><code·class="inline">Inets</code>·HTTP·server·provides·two·ways·of·creating·dynamic·web·pages,·each·with
Offset 301, 36 lines modifiedOffset 301, 36 lines modified
301 files,·Dets·databases·as·well·as·Mnesia·databases.</p><p>Uses·the·following·Erlang·Web·Server·API·interaction·data:</p><ul><li><code·class="inline">real_name</code>·-·from·<a·href="mod_alias.html"><code·class="inline">mod_alias</code></a></li></ul><p>Exports·the·following·Erlang·Web·Server·API·interaction·data:</p><ul><li><strong><code·class="inline">{remote_user,·User}</code></strong>·-·The·username·used·for·authentication.</li></ul><h4>Mnesia·As·Authentication·Database</h4><p>If·Mnesia·is·used·as·storage·method,·Mnesia·must·be·started·before·the·HTTP301 files,·Dets·databases·as·well·as·Mnesia·databases.</p><p>Uses·the·following·Erlang·Web·Server·API·interaction·data:</p><ul><li><code·class="inline">real_name</code>·-·from·<a·href="mod_alias.html"><code·class="inline">mod_alias</code></a></li></ul><p>Exports·the·following·Erlang·Web·Server·API·interaction·data:</p><ul><li><strong><code·class="inline">{remote_user,·User}</code></strong>·-·The·username·used·for·authentication.</li></ul><h4>Mnesia·As·Authentication·Database</h4><p>If·Mnesia·is·used·as·storage·method,·Mnesia·must·be·started·before·the·HTTP
302 server.·The·first·time·Mnesia·is·started,·the·schema·and·the·tables·must·be302 server.·The·first·time·Mnesia·is·started,·the·schema·and·the·tables·must·be
303 created·before·Mnesia·is·started.·A·simple·example·of·a·module·with·two303 created·before·Mnesia·is·started.·A·simple·example·of·a·module·with·two
304 functions·that·creates·and·start·Mnesia·is·provided·here.·Function304 functions·that·creates·and·start·Mnesia·is·provided·here.·Function
305 <code·class="inline">first_start/0</code>·is·to·be·used·the·first·time.·It·creates·the·schema·and·the305 <code·class="inline">first_start/0</code>·is·to·be·used·the·first·time.·It·creates·the·schema·and·the
306 tables.·<code·class="inline">start/0</code>·is·to·be·used·in·consecutive·startups.·<code·class="inline">start/0</code>·starts·Mnesia306 tables.·<code·class="inline">start/0</code>·is·to·be·used·in·consecutive·startups.·<code·class="inline">start/0</code>·starts·Mnesia
307 and·waits·for·the·tables·to·be·initiated.·This·function·must·only·be·used·when307 and·waits·for·the·tables·to·be·initiated.·This·function·must·only·be·used·when
308 the·schema·and·the·tables·are·already·created.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8136090792-1">(</span><span·class="ss">mnesia_test</span><span·class="p"·data-group-id="8136090792-1">)</span><span·class="p">.</span><span·class="w"> 
309 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8136090792-2">(</span><span·class="p"·data-group-id="8136090792-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class[·...·truncated·by·diffoscope;·len:·191,·SHA:·38d0b020916890774a2b92073759ba5d63d7c0c5f6d2c56490ae5bd62224ad78·...·]">)</span><span·class="p">.</span><span·class="w">308 the·schema·and·the·tables·are·already·created.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6152554740-1">(</span><span·class="ss">mnesia_test</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·27,·SHA:·53e0c094a43fadb2f7ed8915212406d7dfe4e48da7c63d5a43df1416e1c3394e·...·]">)</span><span·class="p">.</span><span·class="w">
 309 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6152554740-2">(</span><span·class="p"·data-group-id="6152554740-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">load_data</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6152554740-3">]</span><span·class="p"·data-group-id="6152554740-2">)</span><span·class="p">.</span><span·class="w">
310 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="8136090792-4">(</span><span·class="s">&quot;mod_auth.hrl&quot;</span><span·class="p"·data-group-id="8136090792-4">)</span><span·class="p">.</span><span·class="w">310 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6152554740-4">(</span><span·class="s">&quot;mod_auth.hrl&quot;</span><span·class="p"·data-group-id="6152554740-4">)</span><span·class="p">.</span><span·class="w">
  
311 </span><span·class="nf">first_start</span><span·class="p"·data-group-id="8136090792-5">(</span><span·class="p"·data-group-id="8136090792-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">311 </span><span·class="nf">first_start</span><span·class="p"·data-group-id="6152554740-5">(</span><span·class="p"·data-group-id="6152554740-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
312 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="8136090792-6">(</span><span·class="p"·data-group-id="8136090792-7">[</span><span·class="nf">node</span><span·class="p"·data-group-id="8136090792-8">(</span><span·class="p"·data-group-id="8136090792-8">)</span><span·class="p"·data-group-id="8136090792-7">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·d7c4608c1b3427a405bdf2885e37ba9a6f9dff9587d829112fda9b1633f14d63·...·]-6">)</span><span·class="p">,</span><span·class="w">312 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="6152554740-6">(</span><span·class="p"·data-group-id="6152554740-7">[</span><span·class="nf">node</span><span·class="p"·data-group-id="6152554740-8">(</span><span·class="p"·data-group-id="6152554740-8">)</span><span·class="p"·data-group-id="6152554740-7">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·8e66f5223c1870f6f8e5aeced9dd3c289c393d05edd4e6be933a504bb47d1230·...·]-6">)</span><span·class="p">,</span><span·class="w">
313 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8136090792-9">(</span><span·class="p"·data-group-id="8136090792-9">)</span><span·class="p">,</span><span·class="w">313 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6152554740-9">(</span><span·class="p"·data-group-id="6152554740-9">)</span><span·class="p">,</span><span·class="w">
314 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="8136090792-10">(</span><span·class="ss">httpd_user</span><span·class="p">,</span><span·class="w">314 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6152554740-10">(</span><span·class="ss">httpd_user</span><span·class="p">,</span><span·class="w">
315 ························</span><span·class="p"·data-group-id="8136090792-11">[</span><span·class="p"·data-group-id="8136090792-12">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bag</span><span·class="p"·data-group-id="8136090792-12">}</span><span·class="p">,</span><span·class="w">315 ························</span><span·class="p"·data-group-id="6152554740-11">[</span><span·class="p"·data-group-id="6152554740-12">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bag</span><span·class="p"·data-group-id="6152554740-12">}</span><span·class="p">,</span><span·class="w">
316 ·························</span><span·class="p"·data-group-id="8136090792-13">{</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8136090792-14">[</span><span·class="nf">node</span><span·class="p"·data-group-id="8136090792-15">(</span><span·class="p[·...·truncated·by·diffoscope;·len:·135,·SHA:·7c8d6e809ffae33e9c677baad2fa9308bb4ded8ea63caf0e10e971e3179edb25·...·]-13">}</span><span·class="p">,</span><span·class="w">316 ·························</span><span·class="p"·data-group-id="6152554740-13">{</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6152554740-14">[</span><span·class="nf">node</span><span·class="p"·data-group-id="6152554740-15">(</span><span·class="p[·...·truncated·by·diffoscope;·len:·135,·SHA:·cfeb156f8a9106692aa16e6e75c52ce631c148c8aadd5f95caa5af7865fa0c6a·...·]-13">}</span><span·class="p">,</span><span·class="w">
317 ·························</span><span·class="p"·data-group-id="8136090792-16">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="8136090792-17">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">317 ·························</span><span·class="p"·data-group-id="6152554740-16">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6152554740-17">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">
318 ··················································</span><span·class="ss">httpd_user</span><span·class="p"·data-group-id="8136090792-17">)</span><span·class="p"·data-group-id="8136090792-16">}</span><span·class="p"·data-group-id="8136090792-11">]</span><span·class="p"·data-group-id="8136090792-10">)</span><span·class="p">,</span><span·class="w">318 ··················································</span><span·class="ss">httpd_user</span><span·class="p"·data-group-id="6152554740-17">)</span><span·class="p"·data-group-id="6152554740-16">}</span><span·class="p"·data-group-id="6152554740-11">]</span><span·class="p"·data-group-id="6152554740-10">)</span><span·class="p">,</span><span·class="w">
319 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="8136090792-18">(</span><span·class="ss">httpd_group</span><span·class="p">,</span><span·class="w">319 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6152554740-18">(</span><span·class="ss">httpd_group</span><span·class="p">,</span><span·class="w">
320 ························</span><span·class="p"·data-group-id="8136090792-19">[</span><span·class="p"·data-group-id="8136090792-20">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bag</span><span·class="p"·data-group-id="8136090792-20">}</span><span·class="p">,</span><span·class="w">320 ························</span><span·class="p"·data-group-id="6152554740-19">[</span><span·class="p"·data-group-id="6152554740-20">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bag</span><span·class="p"·data-group-id="6152554740-20">}</span><span·class="p">,</span><span·class="w">
321 ·························</span><span·class="p"·data-group-id="8136090792-21">{</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8136090792-22">[</span><span·class="nf">node</span><span·class="p"·data-group-id="8136090792-23">(</span><span·class="p[·...·truncated·by·diffoscope;·len:·135,·SHA:·2e1e25727cf16078cc85f3272c30c23245271a81bc5f3ba62b9c9238c471ab27·...·]-21">}</span><span·class="p">,</span><span·class="w">321 ·························</span><span·class="p"·data-group-id="6152554740-21">{</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6152554740-22">[</span><span·class="nf">node</span><span·class="p"·data-group-id="6152554740-23">(</span><span·class="p[·...·truncated·by·diffoscope;·len:·135,·SHA:·284132545faf449697cdb0ba46cf4bc1b48025cae5e3d59641319152f1d5c8f4·...·]-21">}</span><span·class="p">,</span><span·class="w">
322 ·························</span><span·class="p"·data-group-id="8136090792-24">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="8136090792-25">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">322 ·························</span><span·class="p"·data-group-id="6152554740-24">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6152554740-25">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">
323 ··················································</span><span·class="ss">httpd_group</span><span·class="p"·data-group-id="8136090792-25">)</span><span·class="p"·data-group-id="8136090792-24">}</span><span·class="p"·data-group-id="8136090792-19">]</span><span·class="p"·data-group-id="8136090792-18">)</span><span·class="p">,</span><span·class="w">323 ··················································</span><span·class="ss">httpd_group</span><span·class="p"·data-group-id="6152554740-25">)</span><span·class="p"·data-group-id="6152554740-24">}</span><span·class="p"·data-group-id="6152554740-19">]</span><span·class="p"·data-group-id="6152554740-18">)</span><span·class="p">,</span><span·class="w">
324 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">wait_for_tables</span><span·class="p"·data-group-id="8136090792-26">(</span><span·class="p"·data-group-id="8136090792-27">[</span><span·class="ss">httpd_user</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd_group</span><span·class="p"·data-group-id="8136090792-27">]</span><span·cl[·...·truncated·by·diffoscope;·len:·110,·SHA:·cffba2b5ec0f36e2b941487b12e3805c24fdb93efab3fb2a3ca38e3f2bc822f1·...·]-26">)</span><span·class="p">.</span><span·class="w">324 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">wait_for_tables</span><span·class="p"·data-group-id="6152554740-26">(</span><span·class="p"·data-group-id="6152554740-27">[</span><span·class="ss">httpd_user</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd_group</span><span·class="p"·data-group-id="6152554740-27">]</span><span·cl[·...·truncated·by·diffoscope;·len:·110,·SHA:·3d848b1633388fb8ecaf12d7ce0e1c2ce6f7afd27d91259a46228f59b0ebf738·...·]-26">)</span><span·class="p">.</span><span·class="w">
  
325 </span><span·class="nf">start</span><span·class="p"·data-group-id="8136090792-28">(</span><span·class="p"·data-group-id="8136090792-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">325 </span><span·class="nf">start</span><span·class="p"·data-group-id="6152554740-28">(</span><span·class="p"·data-group-id="6152554740-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
326 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8136090792-29">(</span><span·class="p"·data-group-id="8136090792-29">)</span><span·class="p">,</span><span·class="w">326 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6152554740-29">(</span><span·class="p"·data-group-id="6152554740-29">)</span><span·class="p">,</span><span·class="w">
327 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">wait_for_tables</span><span·class="p"·data-group-id="8136090792-30">(</span><span·class="p"·data-group-id="8136090792-31">[</span><span·class="ss">httpd_user</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd_group</span><span·class="p"·data-group-id="8136090792-31">]</span><span·cl[·...·truncated·by·diffoscope;·len:·110,·SHA:·cffba2b5ec0f36e2b941487b12e3805c24fdb93efab3fb2a3ca38e3f2bc822f1·...·]-30">)</span><span·class="p">.</span></code></pre><p>To·create·the·Mnesia·tables,·we·use·two·records·defined·in·<code·class="inline">mod_auth.hrl</code>,·so327 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">wait_for_tables</span><span·class="p"·data-group-id="6152554740-30">(</span><span·class="p"·data-group-id="6152554740-31">[</span><span·class="ss">httpd_user</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd_group</span><span·class="p"·data-group-id="6152554740-31">]</span><span·cl[·...·truncated·by·diffoscope;·len:·110,·SHA:·3d848b1633388fb8ecaf12d7ce0e1c2ce6f7afd27d91259a46228f59b0ebf738·...·]-30">)</span><span·class="p">.</span></code></pre><p>To·create·the·Mnesia·tables,·we·use·two·records·defined·in·<code·class="inline">mod_auth.hrl</code>,·so
328 that·file·must·be·included.·<code·class="inline">first_start/0</code>·creates·a·schema·that·specifies·on328 that·file·must·be·included.·<code·class="inline">first_start/0</code>·creates·a·schema·that·specifies·on
329 which·nodes·the·database·is·to·reside.·Then·it·starts·Mnesia·and·creates·the329 which·nodes·the·database·is·to·reside.·Then·it·starts·Mnesia·and·creates·the
330 tables.·The·first·argument·is·the·name·of·the·tables,·the·second·argument·is·a330 tables.·The·first·argument·is·the·name·of·the·tables,·the·second·argument·is·a
331 list·of·options·of·how·to·create·the·table,·see·<a·href="../../../../lib/mnesia-4.23.2/doc/html/mnesia.html"><code·class="inline">mnesia</code></a>,·documentation·for331 list·of·options·of·how·to·create·the·table,·see·<a·href="../../../../lib/mnesia-4.23.2/doc/html/mnesia.html"><code·class="inline">mnesia</code></a>,·documentation·for
332 more·information.·As·the·implementation·of·the·<code·class="inline">mod_auth_mnesia</code>·saves·one·row332 more·information.·As·the·implementation·of·the·<code·class="inline">mod_auth_mnesia</code>·saves·one·row
333 for·each·user,·the·type·must·be·<code·class="inline">bag</code>.·When·the·schema·and·the·tables·are333 for·each·user,·the·type·must·be·<code·class="inline">bag</code>.·When·the·schema·and·the·tables·are
334 created,·function·<a·href="../../../../lib/mnesia-4.23.2/doc/html/mnesia.html#start/0"><code·class="inline">mnesia:start/0</code></a>·is·used·to·start·Mnesia·and·waits·for·the334 created,·function·<a·href="../../../../lib/mnesia-4.23.2/doc/html/mnesia.html#start/0"><code·class="inline">mnesia:start/0</code></a>·is·used·to·start·Mnesia·and·waits·for·the
7.34 KB
./usr/share/doc/erlang-doc/html/lib/inets-9.2/doc/html/httpc.html
    
Offset 1062, 21 lines modifiedOffset 1062, 21 lines modified
1062 requests·to·the·same·host,·port·combination·will·use·the·same·socket1062 requests·to·the·same·host,·port·combination·will·use·the·same·socket
1063 options.</p></blockquote><p>By·default·the·socket·options·set·by·function1063 options.</p></blockquote><p>By·default·the·socket·options·set·by·function
1064 <a·href="#set_options/1">set_options/1,2</a>·are·used·when·establishing·a·connection.</p></li><li><p><strong><code·class="inline">receiver</code></strong>·-·Defines·how·the·client·delivers·the·result·of·an·asynchronous1064 <a·href="#set_options/1">set_options/1,2</a>·are·used·when·establishing·a·connection.</p></li><li><p><strong><code·class="inline">receiver</code></strong>·-·Defines·how·the·client·delivers·the·result·of·an·asynchronous
1065 request·(<code·class="inline">sync</code>·has·the·value·<code·class="inline">false</code>).</p><ul><li><p><strong><a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0"><code·class="inline">pid/0</code></a></strong>·-·Messages·are·sent·to·this·process·in·the·format1065 request·(<code·class="inline">sync</code>·has·the·value·<code·class="inline">false</code>).</p><ul><li><p><strong><a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0"><code·class="inline">pid/0</code></a></strong>·-·Messages·are·sent·to·this·process·in·the·format
1066 <code·class="inline">{http,·ReplyInfo}</code>.</p></li><li><p><strong><code·class="inline">function/1</code></strong>·-·Information·is·delivered·to·the·receiver·through·calls·to1066 <code·class="inline">{http,·ReplyInfo}</code>.</p></li><li><p><strong><code·class="inline">function/1</code></strong>·-·Information·is·delivered·to·the·receiver·through·calls·to
1067 the·provided·fun·<code·class="inline">Receiver(ReplyInfo)</code>.</p></li><li><p><strong><code·class="inline">{Module,·Function,·Args}</code></strong>·-·Information·is·delivered·to·the·receiver1067 the·provided·fun·<code·class="inline">Receiver(ReplyInfo)</code>.</p></li><li><p><strong><code·class="inline">{Module,·Function,·Args}</code></strong>·-·Information·is·delivered·to·the·receiver
1068 through·calls·to·the·callback·function1068 through·calls·to·the·callback·function
1069 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(Module,·Function,·[ReplyInfo·|·Args])</code></a>.</p></li></ul><p>In·all·of·these·cases,·<code·class="inline">ReplyInfo</code>·has·the·following·structure:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p"·data-group-id="7554138550-1">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">saved_to_file</span><span·class="p"·data-group-id="7554138550-1">}</span><span·class="w">1069 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(Module,·Function,·[ReplyInfo·|·Args])</code></a>.</p></li></ul><p>In·all·of·these·cases,·<code·class="inline">ReplyInfo</code>·has·the·following·structure:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p"·data-group-id="8419385951-1">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">saved_to_file</span><span·class="p"·data-group-id="8419385951-1">}</span><span·class="w">
1070 ·</span><span·class="p"·data-group-id="7554138550-2">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7554138550-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</[·...·truncated·by·diffoscope;·len:·99,·SHA:·b279fbf0ed1752ba3c2edd3459f97f2f90dbc037372ffdcb1bbce7f3313e6203·...·]-2">}</span><span·class="w">1070 ·</span><span·class="p"·data-group-id="8419385951-2">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8419385951-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</[·...·truncated·by·diffoscope;·len:·99,·SHA:·d8ac41f23f127a1098954f4f84b63ac15793c24ad3f8e55ba5809a641b101013·...·]-2">}</span><span·class="w">
1071 ·</span><span·class="p"·data-group-id="7554138550-4">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="7554138550-4">}</span><span·class="w">1071 ·</span><span·class="p"·data-group-id="8419385951-4">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p"·data-group-id="8419385951-4">}</span><span·class="w">
1072 ·</span><span·class="p"·data-group-id="7554138550-5">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream_start</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p"·data-group-id="755413855[·...·truncated·by·diffoscope;·len:·1,·SHA:·5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9·...·]-5">}</span><span·class="w">1072 ·</span><span·class="p"·data-group-id="8419385951-5">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream_start</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p"·data-group-id="841938595[·...·truncated·by·diffoscope;·len:·1,·SHA:·6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b·...·]-5">}</span><span·class="w">
1073 ·</span><span·class="p"·data-group-id="7554138550-6">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream_start</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·82,·SHA:·833fc3244a0a2b3ddfc221aa546012bf01988010b4b254897f87f4e0a3479012·...·]-6">}</span><span·class="w">1073 ·</span><span·class="p"·data-group-id="8419385951-6">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream_start</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·82,·SHA:·4c2ed9d5b3185a1fc4424cca8b24ba9044bff5cbb884de8208b0ca68f495adbc·...·]-6">}</span><span·class="w">
1074 ·</span><span·class="p"·data-group-id="7554138550-7">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BinBodyPart</span><span·class="p"·data-group-id="7554138550-7">}</span><span·class="w">1074 ·</span><span·class="p"·data-group-id="8419385951-7">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BinBodyPart</span><span·class="p"·data-group-id="8419385951-7">}</span><span·class="w">
1075 ·</span><span·class="p"·data-group-id="7554138550-8">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream_end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p"·data-group-id="7554138550-8">}</span></code></pre><p>Default·is·the·<code·class="inline">pid</code>·of·the·process·calling·the·request·function·(<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>).</p><p><a·href=""·id="ipv6_host_with_brackets"></a></p></li><li><p><strong><code·class="inline">ipv6_host_with_brackets</code></strong>·-·Defines·when·parsing·the·Host-Port·part·of·an1075 ·</span><span·class="p"·data-group-id="8419385951-8">{</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stream_end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Headers</span><span·class="p"·data-group-id="8419385951-8">}</span></code></pre><p>Default·is·the·<code·class="inline">pid</code>·of·the·process·calling·the·request·function·(<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>).</p><p><a·href=""·id="ipv6_host_with_brackets"></a></p></li><li><p><strong><code·class="inline">ipv6_host_with_brackets</code></strong>·-·Defines·when·parsing·the·Host-Port·part·of·an
1076 URI·with·an·IPv6·address·with·brackets,·if·those·brackets·are·to·be·retained1076 URI·with·an·IPv6·address·with·brackets,·if·those·brackets·are·to·be·retained
1077 (<code·class="inline">true</code>)·or·stripped·(<code·class="inline">false</code>).</p><p>Default·is·<code·class="inline">false</code>.</p></li></ul>1077 (<code·class="inline">true</code>)·or·stripped·(<code·class="inline">false</code>).</p><p>Default·is·<code·class="inline">false</code>.</p></li></ul>
1078 ··</section>1078 ··</section>
1079 </section>1079 </section>
1080 <section·class="detail"·id="reset_cookies/0">1080 <section·class="detail"·id="reset_cookies/0">
  
1081 ··<div·class="detail-header">1081 ··<div·class="detail-header">
31.2 KB
./usr/share/doc/erlang-doc/html/lib/inets-9.2/doc/html/httpd.html
    
Offset 214, 51 lines modifiedOffset 214, 51 lines modified
214 }</code></pre><p>An·example·of·a·log·entry·with·only·default·settings·of·logger</p><pre><code·class="text">=ERROR·REPORT====·9-Oct-2019::09:33:27.350235·===214 }</code></pre><p>An·example·of·a·log·entry·with·only·default·settings·of·logger</p><pre><code·class="text">=ERROR·REPORT====·9-Oct-2019::09:33:27.350235·===
215 ···Server:·My·Server215 ···Server:·My·Server
216 ·Protocol:·HTTP216 ·Protocol:·HTTP
217 Transport:·TLS217 Transport:·TLS
218 ······URI:·/not_there218 ······URI:·/not_there
219 ·····Host:·127.0.1.1:80219 ·····Host:·127.0.1.1:80
220 ·····Peer:·127.0.0.1:45253220 ·····Peer:·127.0.0.1:45253
221 ···Reason:·[{statuscode,404},{description,&quot;Object·Not·Found&quot;}]</code></pre><p>Using·this·option·makes·mod_log·and·mod_disk_log·error·logs·redundant.</p><p>Add·the·filter</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9452599230-1">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">221 ···Reason:·[{statuscode,404},{description,&quot;Object·Not·Found&quot;}]</code></pre><p>Using·this·option·makes·mod_log·and·mod_disk_log·error·logs·redundant.</p><p>Add·the·filter</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3596193317-1">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
222 ····</span><span·class="p"·data-group-id="9452599230-2">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="ss">equal</span><span·class="p">,</span><span·class="p"·data-group-id="9452599230-3">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="ss">inets</sp[·...·truncated·by·diffoscope;·len:·330,·SHA:·6bfbada7e0537d868df58a789139ba955faac9d78bbc05101e848402d5370532·...·]-2">}</span></code></pre><p>to·appropriate·logger·handler·to·handle·the·events.·For·example·to·write·the222 ····</span><span·class="p"·data-group-id="3596193317-2">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="ss">equal</span><span·class="p">,</span><span·class="p"·data-group-id="3596193317-3">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="ss">inets</sp[·...·truncated·by·diffoscope;·len:·330,·SHA:·9997524e140d6dfa384763350827d2aeeb7bc27446466ab0294c06a2a745c9dd·...·]-2">}</span></code></pre><p>to·appropriate·logger·handler·to·handle·the·events.·For·example·to·write·the
223 error·log·from·an·httpd·server·with·a·<code·class="inline">ServerID</code>·of·<code·class="inline">my_server</code>·to·a·file223 error·log·from·an·httpd·server·with·a·<code·class="inline">ServerID</code>·of·<code·class="inline">my_server</code>·to·a·file
224 you·can·use·the·following·sys.config:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8467478287-1">[</span><span·class="p"·data-group-id="8467478287-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">224 you·can·use·the·following·sys.config:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5199046883-1">[</span><span·class="p"·data-group-id="5199046883-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
225 ·</span><span·class="p"·data-group-id="8467478287-3">[</span><span·class="p"·data-group-id="8467478287-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">225 ·</span><span·class="p"·data-group-id="5199046883-3">[</span><span·class="p"·data-group-id="5199046883-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
226 ··</span><span·class="p"·data-group-id="8467478287-5">[</span><span·class="p"·data-group-id="8467478287-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">http_error_test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">226 ··</span><span·class="p"·data-group-id="5199046883-5">[</span><span·class="p"·data-group-id="5199046883-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">http_error_test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
227 ····</span><span·class="p"·data-group-id="8467478287-7">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8467478287-8">#{</span><span·class="w">·</span><span·class="ss">file</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·173,·SHA:·8f31209eb8d5c4c77463b9d7d6787c5c467df8a524a6e7944b8b7593530c3b1a·...·]-8">}</span><span·class="p">,</span><span·class="w">227 ····</span><span·class="p"·data-group-id="5199046883-7">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5199046883-8">#{</span><span·class="w">·</span><span·class="ss">file</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·173,·SHA:·fb8e75b2fff0694ae068303cce05bbf792de39463e27306161ec3618cbc21fe0·...·]-8">}</span><span·class="p">,</span><span·class="w">
228 ······</span><span·class="ss">filters</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8467478287-9">[</span><span·class="p"·data-group-id="8467478287-10">{</span><span·class="ss">inets_httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8467478287-11">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">228 ······</span><span·class="ss">filters</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5199046883-9">[</span><span·class="p"·data-group-id="5199046883-10">{</span><span·class="ss">inets_httpd</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5199046883-11">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
229 ·································</span><span·class="p"·data-group-id="8467478287-12">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">equal</span><span·class="p">,</span><span·class="w">229 ·································</span><span·class="p"·data-group-id="5199046883-12">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">equal</span><span·class="p">,</span><span·class="w">
230 ··································</span><span·class="p"·data-group-id="8467478287-13">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·c87b0f16b43e97f12c30283d8927a6b049179957b14a0e1d0809ad02ee9438ff·...·]-13">]</span><span·class="w">230 ··································</span><span·class="p"·data-group-id="5199046883-13">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·147,·SHA:·d846aefd19aa03358ff8346e7a2c147ab6eaa826a93364d2f9c5142beccb417a·...·]-13">]</span><span·class="w">
231 ·································</span><span·class="p"·data-group-id="8467478287-12">}</span><span·class="p"·data-group-id="8467478287-11">}</span><span·class="p"·data-group-id="8467478287-10">}</span><span·class="p"·data-group-id="8467478287-9">]</span><span·class="p">,</span><span·class="w">231 ·································</span><span·class="p"·data-group-id="5199046883-12">}</span><span·class="p"·data-group-id="5199046883-11">}</span><span·class="p"·data-group-id="5199046883-10">}</span><span·class="p"·data-group-id="5199046883-9">]</span><span·class="p">,</span><span·class="w">
232 ······</span><span·class="ss">filter_default</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">stop</span><span·class="w">·</span><span·class="p"·data-group-id="8467478287-7">}</span><span·class="p"·data-group-id="8467478287-6">}</span><span·class="p"·data-group-id="8467478287-5">]</span><span·class="p"·data-group-id="8467478287-4">}</span><span·class="p"·data-group-id="8467478287-3">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·371,·SHA:·df9b65cd6fba53c893d04c464255f6a51d21be52c202d63b92f21d955481186a·...·]-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">232 ······</span><span·class="ss">filter_default</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">stop</span><span·class="w">·</span><span·class="p"·data-group-id="5199046883-7">}</span><span·class="p"·data-group-id="5199046883-6">}</span><span·class="p"·data-group-id="5199046883-5">]</span><span·class="p"·data-group-id="5199046883-4">}</span><span·class="p"·data-group-id="5199046883-3">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·371,·SHA:·d92f6fe9afdadebc99e6f19a02b803715693305046ec597fd9f896ca293a7e92·...·]-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">
233 ··························</span><span·class="ss">inets_httpd</span><span·class="p">,</span><span·class="w">233 ··························</span><span·class="ss">inets_httpd</span><span·class="p">,</span><span·class="w">
234 ··························</span><span·class="p"·data-group-id="0793140592-2">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">234 ··························</span><span·class="p"·data-group-id="0992259758-2">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
235 ···························</span><span·class="p"·data-group-id="0793140592-3">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">equal</span><span·class="p">,</span><span·class="w">235 ···························</span><span·class="p"·data-group-id="0992259758-3">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">equal</span><span·class="p">,</span><span·class="w">
236 ····························</span><span·class="p"·data-group-id="0793140592-4">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·304,·SHA:·aba02d4fc468cb35148597aa7c980c6634459565d61ef028b2c1a46fc1c8bb92·...·]-1">)</span><span·class="p">.</span></code></pre></li></ul></li><li><p><strong><a·href=""·id="prop_log_format"></a>·{log_format,·common·|·combined}</strong><br/>Defines·if·access·logs·are·to·be·written·according·to·the·<code·class="inline">common</code>·log·format236 ····························</span><span·class="p"·data-group-id="0992259758-4">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">httpd</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·304,·SHA:·10f18ade3cab19cc759741c187bb6fe599d54bd471c71b494591f9edf91ce25f·...·]-1">)</span><span·class="p">.</span></code></pre></li></ul></li><li><p><strong><a·href=""·id="prop_log_format"></a>·{log_format,·common·|·combined}</strong><br/>Defines·if·access·logs·are·to·be·written·according·to·the·<code·class="inline">common</code>·log·format
237 or·the·extended·common·log·format.·The·<code·class="inline">common</code>·format·is·one·line·looking237 or·the·extended·common·log·format.·The·<code·class="inline">common</code>·format·is·one·line·looking
238 like·this:·<code·class="inline">remotehost·rfc931·authuser·[date]·&quot;request&quot;·status·bytes</code>.</p><p>Here:</p><ul><li><p><strong><code·class="inline">remotehost</code></strong>·-·Remote.</p></li><li><p><strong><code·class="inline">rfc931</code></strong>·-·The·remote·username·of·the·client238 like·this:·<code·class="inline">remotehost·rfc931·authuser·[date]·&quot;request&quot;·status·bytes</code>.</p><p>Here:</p><ul><li><p><strong><code·class="inline">remotehost</code></strong>·-·Remote.</p></li><li><p><strong><code·class="inline">rfc931</code></strong>·-·The·remote·username·of·the·client
239 (<a·href="http://www.ietf.org/rfc/rfc931.txt">RFC·931</a>).</p></li><li><p><strong><code·class="inline">authuser</code></strong>·-·The·username·used·for·authentication.</p></li><li><p><strong><code·class="inline">[date]</code></strong>·-·Date·and·time·of·the·request239 (<a·href="http://www.ietf.org/rfc/rfc931.txt">RFC·931</a>).</p></li><li><p><strong><code·class="inline">authuser</code></strong>·-·The·username·used·for·authentication.</p></li><li><p><strong><code·class="inline">[date]</code></strong>·-·Date·and·time·of·the·request
240 (<a·href="http://www.ietf.org/rfc/rfc1123.txt">RFC·1123</a>).</p></li><li><p><strong><code·class="inline">&quot;request&quot;</code></strong>·-·The·request·line·as·it·came·from·the·client240 (<a·href="http://www.ietf.org/rfc/rfc1123.txt">RFC·1123</a>).</p></li><li><p><strong><code·class="inline">&quot;request&quot;</code></strong>·-·The·request·line·as·it·came·from·the·client
241 (<a·href="http://www.ietf.org/rfc/rfc1945.txt">RFC·1945</a>).</p></li><li><p><strong><code·class="inline">status</code></strong>·-·The·HTTP·status·code·returned·to·the·client241 (<a·href="http://www.ietf.org/rfc/rfc1945.txt">RFC·1945</a>).</p></li><li><p><strong><code·class="inline">status</code></strong>·-·The·HTTP·status·code·returned·to·the·client
242 (<a·href="http://www.ietf.org/rfc/rfc1945.txt">RFC·1945</a>).</p></li><li><p><strong><code·class="inline">bytes</code></strong>·-·The·content-length·of·the·document·transferred.</p></li></ul><p>The·<code·class="inline">combined</code>·format·is·one·line·looking·like·this:242 (<a·href="http://www.ietf.org/rfc/rfc1945.txt">RFC·1945</a>).</p></li><li><p><strong><code·class="inline">bytes</code></strong>·-·The·content-length·of·the·document·transferred.</p></li></ul><p>The·<code·class="inline">combined</code>·format·is·one·line·looking·like·this:
243 <code·class="inline">remotehost·rfc931·authuser·[date]·&quot;request&quot;·status·bytes·&quot;referer&quot;·&quot;user_agent&quot;</code></p><p>In·addition·to·the·earlier:</p><ul><li><p><strong><code·class="inline">&quot;referer&quot;</code></strong>·-·The·URL·the·client·was·on·before·requesting·the·URL·(if·it243 <code·class="inline">remotehost·rfc931·authuser·[date]·&quot;request&quot;·status·bytes·&quot;referer&quot;·&quot;user_agent&quot;</code></p><p>In·addition·to·the·earlier:</p><ul><li><p><strong><code·class="inline">&quot;referer&quot;</code></strong>·-·The·URL·the·client·was·on·before·requesting·the·URL·(if·it
244 could·not·be·determined,·a·minus·sign·is·placed·in·this·field).</p></li><li><p><strong><code·class="inline">&quot;user_agent&quot;</code></strong>·-·The·software·the·client·claims·to·be·using·(if·it·could244 could·not·be·determined,·a·minus·sign·is·placed·in·this·field).</p></li><li><p><strong><code·class="inline">&quot;user_agent&quot;</code></strong>·-·The·software·the·client·claims·to·be·using·(if·it·could
245 not·be·determined,·a·minus·sign·is·placed·in·this·field).</p></li></ul><p>This·affects·the·access·logs·written·by·<code·class="inline">mod_log</code>·and·<code·class="inline">mod_disk_log</code>.</p></li><li><p><strong><a·href=""·id="prop_elog_format"></a>·{error_log_format,·pretty·|·compact}</strong><br/>Default·is·<code·class="inline">pretty</code>.·If·the·error·log·is·meant·to·be·read·directly·by·a·human,245 not·be·determined,·a·minus·sign·is·placed·in·this·field).</p></li></ul><p>This·affects·the·access·logs·written·by·<code·class="inline">mod_log</code>·and·<code·class="inline">mod_disk_log</code>.</p></li><li><p><strong><a·href=""·id="prop_elog_format"></a>·{error_log_format,·pretty·|·compact}</strong><br/>Default·is·<code·class="inline">pretty</code>.·If·the·error·log·is·meant·to·be·read·directly·by·a·human,
246 <code·class="inline">pretty</code>·is·the·best·option.</p><p><code·class="inline">pretty</code>·has·a·format·corresponding·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1762186322-1">(</span><span·class="s">&quot;[</span><span·class="si">~s</span><span·class="s">]·</span><span·class="si">~s</span><span·class="s">,·reason:·</span><span·class="si">~n</span><span·class="s">·</span><span·class="si">~p</span><span·class="s">·<[·...·truncated·by·diffoscope;·len:·1381,·SHA:·e472203edde1dd631f2bd8e893c91f22c2d113ba2e394a4454200cced5cc2894·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·affects·the·error·logs·written·by·<code·class="inline">mod_log</code>·and·<code·class="inline">mod_disk_log</code>.</p></li></ul><p><a·href=""·id="props_alias"></a></p><p><em>URL·Aliasing·Properties·-·Requires·mod_alias</em></p><ul><li><p><strong><a·href=""·id="prop_alias"></a>·{alias,·{Alias,·RealName}}</strong><br/><code·class="inline">Alias·=·string()</code>·and·<code·class="inline">RealName·=·string()</code>.·<code·class="inline">alias</code>·allows·documents·to·be246 <code·class="inline">pretty</code>·is·the·best·option.</p><p><code·class="inline">pretty</code>·has·a·format·corresponding·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5396179550-1">(</span><span·class="s">&quot;[</span><span·class="si">~s</span><span·class="s">]·</span><span·class="si">~s</span><span·class="s">,·reason:·</span><span·class="si">~n</span><span·class="s">·</span><span·class="si">~p</span><span·class="s">·<[·...·truncated·by·diffoscope;·len:·1381,·SHA:·0722ac14f6287e492b59d1d34d11a319b0e58a851161b5235a3cf26d34599f80·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·affects·the·error·logs·written·by·<code·class="inline">mod_log</code>·and·<code·class="inline">mod_disk_log</code>.</p></li></ul><p><a·href=""·id="props_alias"></a></p><p><em>URL·Aliasing·Properties·-·Requires·mod_alias</em></p><ul><li><p><strong><a·href=""·id="prop_alias"></a>·{alias,·{Alias,·RealName}}</strong><br/><code·class="inline">Alias·=·string()</code>·and·<code·class="inline">RealName·=·string()</code>.·<code·class="inline">alias</code>·allows·documents·to·be
247 stored·in·the·local·file·system·instead·of·the·<code·class="inline">document_root</code>·location.·URLs247 stored·in·the·local·file·system·instead·of·the·<code·class="inline">document_root</code>·location.·URLs
248 with·a·path·beginning·with·url-path·is·mapped·to·local·files·beginning·with248 with·a·path·beginning·with·url-path·is·mapped·to·local·files·beginning·with
249 directory-filename,·for·example:</p><pre><code·class="text">{alias,·{&quot;/image&quot;,·&quot;/ftp/pub/image&quot;}}</code></pre><p>Access·to·<a·href="http://your.server.org/image/foo.gif">http://your.server.org/image/foo.gif</a>·would·refer·to·the·file249 directory-filename,·for·example:</p><pre><code·class="text">{alias,·{&quot;/image&quot;,·&quot;/ftp/pub/image&quot;}}</code></pre><p>Access·to·<a·href="http://your.server.org/image/foo.gif">http://your.server.org/image/foo.gif</a>·would·refer·to·the·file
250 /ftp/pub/image/foo.gif.</p></li><li><p><strong><a·href=""·id="prop_re_write"></a>·{re_write,·{Re,·Replacement}}</strong><br/><code·class="inline">Re·=·string()</code>·and·<code·class="inline">Replacement·=·string()</code>.·<code·class="inline">re_write</code>·allows·documents·to250 /ftp/pub/image/foo.gif.</p></li><li><p><strong><a·href=""·id="prop_re_write"></a>·{re_write,·{Re,·Replacement}}</strong><br/><code·class="inline">Re·=·string()</code>·and·<code·class="inline">Replacement·=·string()</code>.·<code·class="inline">re_write</code>·allows·documents·to
251 be·stored·in·the·local·file·system·instead·of·the·<code·class="inline">document_root</code>·location.251 be·stored·in·the·local·file·system·instead·of·the·<code·class="inline">document_root</code>·location.
252 URLs·are·rewritten·by·<a·href="../../../../lib/stdlib-6.0.1/doc/html/re.html#replace/3"><code·class="inline">re:replace/3</code></a>·to·produce·a·path·in·the·local252 URLs·are·rewritten·by·<a·href="../../../../lib/stdlib-6.0.1/doc/html/re.html#replace/3"><code·class="inline">re:replace/3</code></a>·to·produce·a·path·in·the·local
253 file-system,·for·example:</p><pre><code·class="text">{re_write,·{&quot;^/[~]([^/]+)(.*)$&quot;,·&quot;/home/\\1/public\\2&quot;}}</code></pre><p>Access·to·<a·href="http://your.server.org/~bob/foo.gif">http://your.server.org/~bob/foo.gif</a>·would·refer·to·the·file253 file-system,·for·example:</p><pre><code·class="text">{re_write,·{&quot;^/[~]([^/]+)(.*)$&quot;,·&quot;/home/\\1/public\\2&quot;}}</code></pre><p>Access·to·<a·href="http://your.server.org/~bob/foo.gif">http://your.server.org/~bob/foo.gif</a>·would·refer·to·the·file
254 /home/bob/public/foo.gif.</p></li><li><p><strong><a·href=""·id="prop_dir_idx"></a>·{directory_index,·[string()]}</strong><br/><code·class="inline">directory_index</code>·specifies·a·list·of·resources·to·look·for·if·a·client254 /home/bob/public/foo.gif.</p></li><li><p><strong><a·href=""·id="prop_dir_idx"></a>·{directory_index,·[string()]}</strong><br/><code·class="inline">directory_index</code>·specifies·a·list·of·resources·to·look·for·if·a·client
255 requests·a·directory·using·a·<code·class="inline">/</code>·at·the·end·of·the·directory·name.·<code·class="inline">file</code>255 requests·a·directory·using·a·<code·class="inline">/</code>·at·the·end·of·the·directory·name.·<code·class="inline">file</code>
256 depicts·the·name·of·a·file·in·the·directory.·Several·files·can·be·given,·in256 depicts·the·name·of·a·file·in·the·directory.·Several·files·can·be·given,·in
257 which·case·the·server·returns·the·first·it·finds,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9110321712-1">{</span><span·class="ss">directory_index</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9110321712-2">[</span><span·class="s">&quot;index.html&quot;</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·140,·SHA:·5e517c3bcd521c388ab8deb6dae067f6aa62a14a057a84ba13f5d49af0b03ccd·...·]-1">}</span></code></pre><p>Access·to·<a·href="http://your.server.org/docs/">http://your.server.org/docs/</a>·would·return257 which·case·the·server·returns·the·first·it·finds,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6718526611-1">{</span><span·class="ss">directory_index</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6718526611-2">[</span><span·class="s">&quot;index.html&quot;</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·140,·SHA:·b07abdc1a757c8115455a1e67a87f8e40708dd8dcfd5595239e57305659c391c·...·]-1">}</span></code></pre><p>Access·to·<a·href="http://your.server.org/docs/">http://your.server.org/docs/</a>·would·return
258 <a·href="http://your.server.org/docs/index.html">http://your.server.org/docs/index.html</a>·or258 <a·href="http://your.server.org/docs/index.html">http://your.server.org/docs/index.html</a>·or
259 <a·href="http://your.server.org/docs/welcome.html">http://your.server.org/docs/welcome.html</a>·if·index.html·does·not·exist.</p></li></ul><p><a·href=""·id="props_cgi"></a></p><p><em>CGI·Properties·-·Requires·mod_cgi</em></p><ul><li><p><strong><a·href=""·id="prop_script_alias"></a>·{script_alias,·{Alias,·RealName}}</strong><br/><code·class="inline">Alias·=·string()</code>·and·<code·class="inline">RealName·=·string()</code>.·Have·the·same·behavior·as259 <a·href="http://your.server.org/docs/welcome.html">http://your.server.org/docs/welcome.html</a>·if·index.html·does·not·exist.</p></li></ul><p><a·href=""·id="props_cgi"></a></p><p><em>CGI·Properties·-·Requires·mod_cgi</em></p><ul><li><p><strong><a·href=""·id="prop_script_alias"></a>·{script_alias,·{Alias,·RealName}}</strong><br/><code·class="inline">Alias·=·string()</code>·and·<code·class="inline">RealName·=·string()</code>.·Have·the·same·behavior·as
260 property·<code·class="inline">alias</code>,·except·that·they·also·mark·the·target·directory·as260 property·<code·class="inline">alias</code>,·except·that·they·also·mark·the·target·directory·as
261 containing·CGI·scripts.·URLs·with·a·path·beginning·with·url-path·are·mapped·to261 containing·CGI·scripts.·URLs·with·a·path·beginning·with·url-path·are·mapped·to
262 scripts·beginning·with·directory-filename,·for·example:</p><pre><code·class="text">{script_alias,·{&quot;/cgi-bin/&quot;,·&quot;/web/cgi-bin/&quot;}}</code></pre><p>Access·to·<a·href="http://your.server.org/cgi-bin/foo">http://your.server.org/cgi-bin/foo</a>·would·cause·the·server·to·run·the262 scripts·beginning·with·directory-filename,·for·example:</p><pre><code·class="text">{script_alias,·{&quot;/cgi-bin/&quot;,·&quot;/web/cgi-bin/&quot;}}</code></pre><p>Access·to·<a·href="http://your.server.org/cgi-bin/foo">http://your.server.org/cgi-bin/foo</a>·would·cause·the·server·to·run·the
263 script·/web/cgi-bin/foo.</p></li><li><p><strong><a·href=""·id="prop_script_re_write"></a>·{script_re_write,·{Re,·Replacement}}</strong><br/><code·class="inline">Re·=·string()</code>·and·<code·class="inline">Replacement·=·string()</code>.·Have·the·same·behavior·as263 script·/web/cgi-bin/foo.</p></li><li><p><strong><a·href=""·id="prop_script_re_write"></a>·{script_re_write,·{Re,·Replacement}}</strong><br/><code·class="inline">Re·=·string()</code>·and·<code·class="inline">Replacement·=·string()</code>.·Have·the·same·behavior·as
264 property·<code·class="inline">re_write</code>,·except·that·they·also·mark·the·target·directory·as264 property·<code·class="inline">re_write</code>,·except·that·they·also·mark·the·target·directory·as
Offset 358, 30 lines modifiedOffset 358, 30 lines modified
358 remembered.·After·this·time·has·passed,·the·authentication·is·no·longer358 remembered.·After·this·time·has·passed,·the·authentication·is·no·longer
359 reported.·Default·is·<code·class="inline">30</code>.</p></li></ul><h2·id="module-web-server-api-data-types"·class="section-heading">359 reported.·Default·is·<code·class="inline">30</code>.</p></li></ul><h2·id="module-web-server-api-data-types"·class="section-heading">
360 ··<a·href="#module-web-server-api-data-types"·class="hover-link">360 ··<a·href="#module-web-server-api-data-types"·class="hover-link">
361 ····<i·class="ri-link-m"·aria-hidden="true"></i>361 ····<i·class="ri-link-m"·aria-hidden="true"></i>
362 ··</a>362 ··</a>
363 ··<span·class="text">Web·server·API·data·types</span>363 ··<span·class="text">Web·server·API·data·types</span>
364 </h2>364 </h2>
365 <p>The·Erlang·web·server·API·data·types·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="n">ModData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">mod</span><span·class="p"·data-group-id="1425445547-1">{</span><span·class="p"·data-group-id="1425445547-1">}</span><span·class="w">365 <p>The·Erlang·web·server·API·data·types·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="n">ModData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">mod</span><span·class="p"·data-group-id="1168399376-1">{</span><span·class="p"·data-group-id="1168399376-1">}</span><span·class="w">
366 </span><span·class="w">366 </span><span·class="w">
367 ······</span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1425445547-2">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1425445547-3">{</span><span·class="w">367 ······</span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1168399376-2">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1168399376-3">{</span><span·class="w">
368 »       »       </span><span·class="ss">data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1425445547-4">[</span><span·class="p"·data-group-id="1425445547-4">]</span><span·class="p">,</span><span·class="w">368 »       »       </span><span·class="ss">data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1168399376-4">[</span><span·class="p"·data-group-id="1168399376-4">]</span><span·class="p">,</span><span·class="w">
369 »       »       </span><span·class="ss">socket_type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">ip_comm</span><span·class="p">,</span><span·class="w">369 »       »       </span><span·class="ss">socket_type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">ip_comm</span><span·class="p">,</span><span·class="w">
370 »       »       </span><span·class="ss">socket</span><span·class="p">,</span><span·class="w">370 »       »       </span><span·class="ss">socket</span><span·class="p">,</span><span·class="w">
371 »       »       </span><span·class="ss">config_db</span><span·class="p">,</span><span·class="w">371 »       »       </span><span·class="ss">config_db</span><span·class="p">,</span><span·class="w">
372 »       »       </span><span·class="ss">method</span><span·class="p">,</span><span·class="w">372 »       »       </span><span·class="ss">method</span><span·class="p">,</span><span·class="w">
373 »       »       </span><span·class="ss">absolute_uri</span><span·class="p">,</span><span·class="w">373 »       »       </span><span·class="ss">absolute_uri</span><span·class="p">,</span><span·class="w">
374 »       »       </span><span·class="ss">request_uri</span><span·class="p">,</span><span·class="w">374 »       »       </span><span·class="ss">request_uri</span><span·class="p">,</span><span·class="w">
375 »       »       </span><span·class="ss">http_version</span><span·class="p">,</span><span·class="w">375 »       »       </span><span·class="ss">http_version</span><span·class="p">,</span><span·class="w">
376 »       »       </span><span·class="ss">request_line</span><span·class="p">,</span><span·class="w">376 »       »       </span><span·class="ss">request_line</span><span·class="p">,</span><span·class="w">
377 »       »       </span><span·class="ss">parsed_header</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1425445547-5">[</span><span·class="p"·data-group-id="1425445547-5">]</span><span·class="p">,</span><span·class="w">377 »       »       </span><span·class="ss">parsed_header</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1168399376-5">[</span><span·class="p"·data-group-id="1168399376-5">]</span><span·class="p">,</span><span·class="w">
378 »       »       </span><span·class="ss">entity_body</span><span·class="p">,</span><span·class="w">378 »       »       </span><span·class="ss">entity_body</span><span·class="p">,</span><span·class="w">
379 »       »       </span><span·class="ss">connection</span><span·class="w">379 »       »       </span><span·class="ss">connection</span><span·class="w">
380 »       </span><span·class="p"·data-group-id="1425445547-3">}</span><span·class="p"·data-group-id="1425445547-2">)</span><span·class="p">.</span></code></pre><p>To·access·the·record·in·your·callback-module·use:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p">-[·...·truncated·by·diffoscope;·len:·194,·SHA:·7e0a538d330aa2c8d1bac83fac207e15efc16a82bbf4c9eee38677ef4415794f·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·fields·of·record·<code·class="inline">mod</code>·have·the·following·meaning:</p><ul><li><p><strong><code·class="inline">data</code></strong>·-·Type·<code·class="inline">[{InteractionKey,InteractionValue}]</code>·is·used·to·propagate380 »       </span><span·class="p"·data-group-id="1168399376-3">}</span><span·class="p"·data-group-id="1168399376-2">)</span><span·class="p">.</span></code></pre><p>To·access·the·record·in·your·callback-module·use:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p">-[·...·truncated·by·diffoscope;·len:·194,·SHA:·2340b5ab39cf3b000d681a991895bb4f416f0d96799b100157878e0989fa311f·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·fields·of·record·<code·class="inline">mod</code>·have·the·following·meaning:</p><ul><li><p><strong><code·class="inline">data</code></strong>·-·Type·<code·class="inline">[{InteractionKey,InteractionValue}]</code>·is·used·to·propagate
381 data·between·modules.·Depicted·<code·class="inline">interaction_data()</code>·in·function·type381 data·between·modules.·Depicted·<code·class="inline">interaction_data()</code>·in·function·type
382 declarations.</p></li><li><p><strong><code·class="inline">socket_type</code></strong>·-·<code·class="inline">socket_type()</code>·indicates·whether·it·is·an·IP·socket·or·an382 declarations.</p></li><li><p><strong><code·class="inline">socket_type</code></strong>·-·<code·class="inline">socket_type()</code>·indicates·whether·it·is·an·IP·socket·or·an
383 <code·class="inline">ssl</code>·socket.</p></li><li><p><strong><code·class="inline">socket</code></strong>·-·The·socket,·in·format·<code·class="inline">ip_comm</code>·or·<code·class="inline">ssl</code>,·depending·on383 <code·class="inline">ssl</code>·socket.</p></li><li><p><strong><code·class="inline">socket</code></strong>·-·The·socket,·in·format·<code·class="inline">ip_comm</code>·or·<code·class="inline">ssl</code>,·depending·on
384 <code·class="inline">socket_type</code>.</p></li><li><p><strong><code·class="inline">config_db</code></strong>·-·The·config·file·directives·stored·as·key-value·tuples·in·an384 <code·class="inline">socket_type</code>.</p></li><li><p><strong><code·class="inline">config_db</code></strong>·-·The·config·file·directives·stored·as·key-value·tuples·in·an
385 ETS·table.·Depicted·<code·class="inline">config_db()</code>·in·function·type·declarations.</p></li><li><p><strong><code·class="inline">method</code></strong>·-·Type·<code·class="inline">&quot;GET&quot;·|·&quot;POST&quot;·|·&quot;HEAD&quot;·|·&quot;TRACE&quot;</code>,·that·is,·the·HTTP385 ETS·table.·Depicted·<code·class="inline">config_db()</code>·in·function·type·declarations.</p></li><li><p><strong><code·class="inline">method</code></strong>·-·Type·<code·class="inline">&quot;GET&quot;·|·&quot;POST&quot;·|·&quot;HEAD&quot;·|·&quot;TRACE&quot;</code>,·that·is,·the·HTTP
386 method.</p></li><li><p><strong><code·class="inline">absolute_uri</code></strong>·-·If·the·request·is·an·HTTP/1.1·request,·the·URI·can·be·in386 method.</p></li><li><p><strong><code·class="inline">absolute_uri</code></strong>·-·If·the·request·is·an·HTTP/1.1·request,·the·URI·can·be·in
387 the·absolute·URI·format.·In·that·case,·<code·class="inline">httpd</code>·saves·the·absolute·URI·in·this387 the·absolute·URI·format.·In·that·case,·<code·class="inline">httpd</code>·saves·the·absolute·URI·in·this
204 KB
./usr/share/doc/erlang-doc/html/lib/inets-9.2/doc/html/inets.epub
4.03 KB
zipinfo {}
Max HTML report size reached
65.1 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
2.43 KB
OEBPS/inets_services.xhtml
    
Offset 32, 12 lines modifiedOffset 32, 12 lines modified
32 takeover,·configure·the·services·to·be·started·at·application·startup.·When32 takeover,·configure·the·services·to·be·started·at·application·startup.·When
33 starting·the·<code·class="inline">Inets</code>·application,·the·<code·class="inline">Inets</code>·top·supervisor·starts·a·number·of33 starting·the·<code·class="inline">Inets</code>·application,·the·<code·class="inline">Inets</code>·top·supervisor·starts·a·number·of
34 subsupervisors·and·worker·processes·for·handling·the·provided·services.·When34 subsupervisors·and·worker·processes·for·handling·the·provided·services.·When
35 starting·services·dynamically,·new·children·are·added·to·the·supervision·tree,35 starting·services·dynamically,·new·children·are·added·to·the·supervision·tree,
36 unless·the·service·is·started·with·the·standalone·option.·In·this·case·the36 unless·the·service·is·started·with·the·standalone·option.·In·this·case·the
37 service·is·linked·to·the·calling·process·and·all·OTP·application·features,·such37 service·is·linked·to·the·calling·process·and·all·OTP·application·features,·such
38 as·soft·upgrade,·are·lost.</p><p>Services·to·be·configured·for·startup·at·application·startup·are·to·be·put·into38 as·soft·upgrade,·are·lost.</p><p>Services·to·be·configured·for·startup·at·application·startup·are·to·be·put·into
39 the·Erlang·node·configuration·file·on·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3501548932-1">[</span><span·class="p"·data-group-id="3501548932-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3501548932-3">[</span><span·class="p"·data-group-id="3501548932-4">{</spa[·...·truncated·by·diffoscope;·len:·329,·SHA:·5fa0d067821dbf95b678a09991ed2e796e1443e176083c68a54120b84f6678ce·...·]-1">]</span><span·class="p">.</span></code></pre><p>For·details·of·what·to·put·in·the·list·of·configured·services,·see·the39 the·Erlang·node·configuration·file·on·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1030759374-1">[</span><span·class="p"·data-group-id="1030759374-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1030759374-3">[</span><span·class="p"·data-group-id="1030759374-4">{</spa[·...·truncated·by·diffoscope;·len:·329,·SHA:·fd86829a43be87770c5591e05a55b1cd1895ea809dbdc5c3aa8672c107f9bc55·...·]-1">]</span><span·class="p">.</span></code></pre><p>For·details·of·what·to·put·in·the·list·of·configured·services,·see·the
40 documentation·for·the·services·to·be·configured.</p>40 documentation·for·the·services·to·be·configured.</p>
  
41 ··</body>41 ··</body>
42 </html>42 </html>
31.1 KB
OEBPS/httpd.xhtml
Max HTML report size reached
7.24 KB
OEBPS/httpc.xhtml
Max HTML report size reached
53.2 KB
OEBPS/http_server.xhtml
Max HTML report size reached
39.9 KB
OEBPS/http_client.xhtml
Max HTML report size reached
1.22 KB
OEBPS/content.opf
1.19 KB
OEBPS/content.opf
Max HTML report size reached
2.67 KB
./usr/share/doc/erlang-doc/html/lib/inets-9.2/doc/html/inets_services.html
    
Offset 137, 15 lines modifiedOffset 137, 15 lines modified
137 takeover,·configure·the·services·to·be·started·at·application·startup.·When137 takeover,·configure·the·services·to·be·started·at·application·startup.·When
138 starting·the·<code·class="inline">Inets</code>·application,·the·<code·class="inline">Inets</code>·top·supervisor·starts·a·number·of138 starting·the·<code·class="inline">Inets</code>·application,·the·<code·class="inline">Inets</code>·top·supervisor·starts·a·number·of
139 subsupervisors·and·worker·processes·for·handling·the·provided·services.·When139 subsupervisors·and·worker·processes·for·handling·the·provided·services.·When
140 starting·services·dynamically,·new·children·are·added·to·the·supervision·tree,140 starting·services·dynamically,·new·children·are·added·to·the·supervision·tree,
141 unless·the·service·is·started·with·the·standalone·option.·In·this·case·the141 unless·the·service·is·started·with·the·standalone·option.·In·this·case·the
142 service·is·linked·to·the·calling·process·and·all·OTP·application·features,·such142 service·is·linked·to·the·calling·process·and·all·OTP·application·features,·such
143 as·soft·upgrade,·are·lost.</p><p>Services·to·be·configured·for·startup·at·application·startup·are·to·be·put·into143 as·soft·upgrade,·are·lost.</p><p>Services·to·be·configured·for·startup·at·application·startup·are·to·be·put·into
144 the·Erlang·node·configuration·file·on·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5053468016-1">[</span><span·class="p"·data-group-id="5053468016-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5053468016-3">[</span><span·class="p"·data-group-id="5053468016-4">{</spa[·...·truncated·by·diffoscope;·len:·329,·SHA:·fd47da9c7ecdf5d7de7ab8752fcf4a0a5f42d3be5e493ae2319739e192579533·...·]-1">]</span><span·class="p">.</span></code></pre><p>For·details·of·what·to·put·in·the·list·of·configured·services,·see·the144 the·Erlang·node·configuration·file·on·the·following·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0658071999-1">[</span><span·class="p"·data-group-id="0658071999-2">{</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0658071999-3">[</span><span·class="p"·data-group-id="0658071999-4">{</spa[·...·truncated·by·diffoscope;·len:·329,·SHA:·7dba524e6ed4760dd548e8e89ffa9a141c4a6e5d440e0f2dfba063716c5574a6·...·]-1">]</span><span·class="p">.</span></code></pre><p>For·details·of·what·to·put·in·the·list·of·configured·services,·see·the
145 documentation·for·the·services·to·be·configured.</p>145 documentation·for·the·services·to·be·configured.</p>
146 </div>146 </div>
  
147 <div·class="bottom-actions"·id="bottom-actions">147 <div·class="bottom-actions"·id="bottom-actions">
148 ··<div·class="bottom-actions-item">148 ··<div·class="bottom-actions-item">
  
149 ······<a·href="introduction.html"·class="bottom-actions-button"·rel="prev">149 ······<a·href="introduction.html"·class="bottom-actions-button"·rel="prev">
637 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/.build.gz
493 B
.build
    
Offset 111, 13 lines modifiedOffset 111, 13 lines modified
111 dist/lato-latin-300-normal-YUMVEFOL.woff2111 dist/lato-latin-300-normal-YUMVEFOL.woff2
112 dist/lato-latin-400-normal-W7754I4D.woff2112 dist/lato-latin-400-normal-W7754I4D.woff2
113 dist/lato-latin-700-normal-2XVSBPG4.woff2113 dist/lato-latin-700-normal-2XVSBPG4.woff2
114 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2114 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
115 dist/lato-latin-ext-400-normal-N27NCBWW.woff2115 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
116 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2116 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
117 dist/remixicon-NKANDIL5.woff2117 dist/remixicon-NKANDIL5.woff2
118 dist/search_data-62425A17.js118 dist/search_data-074FBB44.js
119 dist/sidebar_items-C4FB09FB.js119 dist/sidebar_items-C4FB09FB.js
120 index.html120 index.html
121 jinterface_users_guide.html121 jinterface_users_guide.html
122 notes.html122 notes.html
123 search.html123 search.html
841 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/allclasses-index.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>All·Classes·and·Interfaces·(Java-Erlang·Interface·Library)</title>5 <title>All·Classes·and·Interfaces·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="class·index">9 <meta·name="description"·content="class·index">
10 <meta·name="generator"·content="javadoc/AllClassesIndexWriter">10 <meta·name="generator"·content="javadoc/AllClassesIndexWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
832 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/allpackages-index.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>All·Packages·(Java-Erlang·Interface·Library)</title>5 <title>All·Packages·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="package·index">9 <meta·name="description"·content="package·index">
10 <meta·name="generator"·content="javadoc/AllPackagesIndexWriter">10 <meta·name="generator"·content="javadoc/AllPackagesIndexWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
952 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/AbstractConnection.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>AbstractConnection·(Java-Erlang·Interface·Library)</title>5 <title>AbstractConnection·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·AbstractConnection">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·AbstractConnection">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/AbstractNode.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>AbstractNode·(Java-Erlang·Interface·Library)</title>5 <title>AbstractNode·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·AbstractNode">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·AbstractNode">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/GenericQueue.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>GenericQueue·(Java-Erlang·Interface·Library)</title>5 <title>GenericQueue·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·GenericQueue">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·GenericQueue">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
944 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpAuthException.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpAuthException·(Java-Erlang·Interface·Library)</title>5 <title>OtpAuthException·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpAuthException">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpAuthException">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpConnection.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpConnection·(Java-Erlang·Interface·Library)</title>5 <title>OtpConnection·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpConnection">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpConnection">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
956 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpCookedConnection.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpCookedConnection·(Java-Erlang·Interface·Library)</title>5 <title>OtpCookedConnection·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpCookedConnection">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpCookedConnection">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
908 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpEpmd.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpEpmd·(Java-Erlang·Interface·Library)</title>5 <title>OtpEpmd·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpEpmd">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpEpmd">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangAtom.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangAtom·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangAtom·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangAtom">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangAtom">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangBinary.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangBinary·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangBinary·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangBinary">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangBinary">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangBitstr.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangBitstr·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangBitstr·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangBitstr">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangBitstr">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
944 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangBoolean.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangBoolean·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangBoolean·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangBoolean">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangBoolean">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangByte.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangByte·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangByte·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangByte">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangByte">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangChar.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangChar·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangChar·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangChar">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangChar">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
976 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangDecodeException.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangDecodeException·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangDecodeException·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangDecodeException">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangDecodeException">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangDouble.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangDouble·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangDouble·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangDouble">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangDouble">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
952 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangException.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangException·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangException·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangException">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangException">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangExit.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangExit·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangExit·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangExit">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangExit">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
960 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangExternalFun.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangExternalFun·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangExternalFun·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangExternalFun">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangExternalFun">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
936 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangFloat.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangFloat·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangFloat·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangFloat">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangFloat">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangFun.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangFun·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangFun·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangFun">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangFun">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangInt.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangInt·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangInt·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangInt">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangInt">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
972 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangList.SubList.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangList.SubList·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangList.SubList·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangList,·class:·SubList">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangList,·class:·SubList">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangList.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangList·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangList·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangList">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangList">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangLong.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangLong·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangLong·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangLong">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangLong">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangMap.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangMap·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangMap·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangMap">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangMap">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
968 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangObject.Hash.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangObject.Hash·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangObject.Hash·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangObject,·class:·Hash">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangObject,·class:·Hash">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangObject.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangObject·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangObject·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangObject">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangObject">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangPid.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangPid·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangPid·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangPid">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangPid">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangPort.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangPort·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangPort·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangPort">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangPort">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
972 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangRangeException.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangRangeException·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangRangeException·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangRangeException">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangRangeException">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangRef.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangRef·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangRef·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangRef">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangRef">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
936 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangShort.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangShort·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangShort·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangShort">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangShort">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangString.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangString·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangString·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangString">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangString">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
936 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangTuple.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangTuple·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangTuple·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangTuple">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangTuple">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangUInt.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangUInt·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangUInt·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangUInt">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangUInt">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpErlangUShort.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpErlangUShort·(Java-Erlang·Interface·Library)</title>5 <title>OtpErlangUShort·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangUShort">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpErlangUShort">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpException.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpException·(Java-Erlang·Interface·Library)</title>5 <title>OtpException·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpException">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpException">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
924 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpExternal.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpExternal·(Java-Erlang·Interface·Library)</title>5 <title>OtpExternal·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpExternal">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpExternal">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
984 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpGenericTransportFactory.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpGenericTransportFactory·(Java-Erlang·Interface·Library)</title>5 <title>OtpGenericTransportFactory·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpGenericTransportFactory">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpGenericTransportFactory">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
936 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpInputStream.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpInputStream·(Java-Erlang·Interface·Library)</title>5 <title>OtpInputStream·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpInputStream">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpInputStream">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
928 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpLocalNode.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpLocalNode·(Java-Erlang·Interface·Library)</title>5 <title>OtpLocalNode·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpLocalNode">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpLocalNode">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
908 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpMbox.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpMbox·(Java-Erlang·Interface·Library)</title>5 <title>OtpMbox·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpMbox">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpMbox">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
904 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpMsg.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpMsg·(Java-Erlang·Interface·Library)</title>5 <title>OtpMsg·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpMsg">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpMsg">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
952 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpNode.Acceptor.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpNode.Acceptor·(Java-Erlang·Interface·Library)</title>5 <title>OtpNode.Acceptor·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNode,·class:·Acceptor">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNode,·class:·Acceptor">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
956 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpNode.Mailboxes.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpNode.Mailboxes·(Java-Erlang·Interface·Library)</title>5 <title>OtpNode.Mailboxes·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNode,·class:·Mailboxes">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNode,·class:·Mailboxes">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
908 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpNode.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpNode·(Java-Erlang·Interface·Library)</title>5 <title>OtpNode·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNode">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNode">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpNodeStatus.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpNodeStatus·(Java-Erlang·Interface·Library)</title>5 <title>OtpNodeStatus·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNodeStatus">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpNodeStatus">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
940 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpOutputStream.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpOutputStream·(Java-Erlang·Interface·Library)</title>5 <title>OtpOutputStream·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpOutputStream">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpOutputStream">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
908 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpPeer.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpPeer·(Java-Erlang·Interface·Library)</title>5 <title>OtpPeer·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpPeer">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpPeer">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
908 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpSelf.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpSelf·(Java-Erlang·Interface·Library)</title>5 <title>OtpSelf·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpSelf">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpSelf">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
916 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpServer.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpServer·(Java-Erlang·Interface·Library)</title>5 <title>OtpServer·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpServer">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpServer">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
976 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpServerSocketTransport.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpServerSocketTransport·(Java-Erlang·Interface·Library)</title>5 <title>OtpServerSocketTransport·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpServerSocketTransport">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpServerSocketTransport">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
956 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpServerTransport.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpServerTransport·(Java-Erlang·Interface·Library)</title>5 <title>OtpServerTransport·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·interface:·OtpServerTransport">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·interface:·OtpServerTransport">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
952 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpSocketTransport.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpSocketTransport·(Java-Erlang·Interface·Library)</title>5 <title>OtpSocketTransport·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpSocketTransport">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpSocketTransport">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
980 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpSocketTransportFactory.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpSocketTransportFactory·(Java-Erlang·Interface·Library)</title>5 <title>OtpSocketTransportFactory·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpSocketTransportFactory">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·class:·OtpSocketTransportFactory">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
932 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpTransport.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpTransport·(Java-Erlang·Interface·Library)</title>5 <title>OtpTransport·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·interface:·OtpTransport">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·interface:·OtpTransport">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
960 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/OtpTransportFactory.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>OtpTransportFactory·(Java-Erlang·Interface·Library)</title>5 <title>OtpTransportFactory·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·interface:·OtpTransportFactory">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang,·interface:·OtpTransportFactory">
10 <meta·name="generator"·content="javadoc/ClassWriterImpl">10 <meta·name="generator"·content="javadoc/ClassWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
926 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/package-summary.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>com.ericsson.otp.erlang·(Java-Erlang·Interface·Library)</title>5 <title>com.ericsson.otp.erlang·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang">9 <meta·name="description"·content="declaration:·package:·com.ericsson.otp.erlang">
10 <meta·name="generator"·content="javadoc/PackageWriterImpl">10 <meta·name="generator"·content="javadoc/PackageWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
929 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/com/ericsson/otp/erlang/package-tree.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>com.ericsson.otp.erlang·Class·Hierarchy·(Java-Erlang·Interface·Library)</title>5 <title>com.ericsson.otp.erlang·Class·Hierarchy·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="tree:·package:·com.ericsson.otp.erlang">9 <meta·name="description"·content="tree:·package:·com.ericsson.otp.erlang">
10 <meta·name="generator"·content="javadoc/PackageTreeWriter">10 <meta·name="generator"·content="javadoc/PackageTreeWriter">
11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="../../../../stylesheet.css"·title="Style">
848 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/constant-values.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Constant·Field·Values·(Java-Erlang·Interface·Library)</title>5 <title>Constant·Field·Values·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="summary·of·constants">9 <meta·name="description"·content="summary·of·constants">
10 <meta·name="generator"·content="javadoc/ConstantsSummaryWriterImpl">10 <meta·name="generator"·content="javadoc/ConstantsSummaryWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
835 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/deprecated-list.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Deprecated·List·(Java-Erlang·Interface·Library)</title>5 <title>Deprecated·List·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="deprecated·elements">9 <meta·name="description"·content="deprecated·elements">
10 <meta·name="generator"·content="javadoc/DeprecatedListWriter">10 <meta·name="generator"·content="javadoc/DeprecatedListWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
789 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/help-doc.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>API·Help·(Java-Erlang·Interface·Library)</title>5 <title>API·Help·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="help">9 <meta·name="description"·content="help">
10 <meta·name="generator"·content="javadoc/HelpWriter">10 <meta·name="generator"·content="javadoc/HelpWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
790 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/index-all.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Index·(Java-Erlang·Interface·Library)</title>5 <title>Index·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="index">9 <meta·name="description"·content="index">
10 <meta·name="generator"·content="javadoc/IndexWriter">10 <meta·name="generator"·content="javadoc/IndexWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
790 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/index.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Java-Erlang·Interface·Library</title>5 <title>Java-Erlang·Interface·Library</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="index·redirect">9 <meta·name="description"·content="index·redirect">
10 <meta·name="generator"·content="javadoc/IndexRedirectWriter">10 <meta·name="generator"·content="javadoc/IndexRedirectWriter">
11 <link·rel="canonical"·href="com/ericsson/otp/erlang/package-summary.html">11 <link·rel="canonical"·href="com/ericsson/otp/erlang/package-summary.html">
812 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/overview-tree.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Class·Hierarchy·(Java-Erlang·Interface·Library)</title>5 <title>Class·Hierarchy·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="class·tree">9 <meta·name="description"·content="class·tree">
10 <meta·name="generator"·content="javadoc/TreeWriter">10 <meta·name="generator"·content="javadoc/TreeWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
787 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/search.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Search·(Java-Erlang·Interface·Library)</title>5 <title>Search·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="search">9 <meta·name="description"·content="search">
10 <meta·name="generator"·content="javadoc/SearchWriter">10 <meta·name="generator"·content="javadoc/SearchWriter">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
836 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/assets/java/serialized-form.html
    
Offset 1, 11 lines modifiedOffset 1, 11 lines modified
1 <!DOCTYPE·HTML>1 <!DOCTYPE·HTML>
2 <html·lang="en">2 <html·lang="en">
3 <head>3 <head>
4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:18:53·GMT·2024·-->4 <!--·Generated·by·javadoc·(21)·on·Fri·Oct·11·20:58:01·GMT·2024·-->
5 <title>Serialized·Form·(Java-Erlang·Interface·Library)</title>5 <title>Serialized·Form·(Java-Erlang·Interface·Library)</title>
6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">6 <meta·name="viewport"·content="width=device-width,·initial-scale=1">
7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">7 <meta·http-equiv="Content-Type"·content="text/html;·charset=UTF-8">
8 <meta·name="dc.created"·content="2024-10-11">8 <meta·name="dc.created"·content="2024-10-11">
9 <meta·name="description"·content="serialized·forms">9 <meta·name="description"·content="serialized·forms">
10 <meta·name="generator"·content="javadoc/SerializedFormWriterImpl">10 <meta·name="generator"·content="javadoc/SerializedFormWriterImpl">
11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">11 <link·rel="stylesheet"·type="text/css"·href="stylesheet.css"·title="Style">
640 B
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/search.html
    
Offset 108, 15 lines modifiedOffset 108, 15 lines modified
108 <div·id="search">108 <div·id="search">
109 ··<h1>109 ··<h1>
110 ····<span></span>110 ····<span></span>
111 ··</h1>111 ··</h1>
  
112 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>112 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
113 </div>113 </div>
114 <script·src="dist/search_data-62425A17.js"></script>114 <script·src="dist/search_data-074FBB44.js"></script>
115 ····<footer·class="footer">115 ····<footer·class="footer">
116 ······<p>116 ······<p>
  
117 ········<span·class="line">117 ········<span·class="line">
118 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">118 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
119 ············Search·HexDocs119 ············Search·HexDocs
120 ··········</button>120 ··········</button>
26.2 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/app.html
    
Offset 140, 49 lines modifiedOffset 140, 49 lines modified
140 ····<i·class="ri-link-m"·aria-hidden="true"></i>140 ····<i·class="ri-link-m"·aria-hidden="true"></i>
141 ··</a>141 ··</a>
142 ··<span·class="text">File·Syntax</span>142 ··<span·class="text">File·Syntax</span>
143 </h2>143 </h2>
144 <p>The·application·resource·file·is·to·be·called·<code·class="inline">Application.app</code>,·where144 <p>The·application·resource·file·is·to·be·called·<code·class="inline">Application.app</code>,·where
145 <code·class="inline">Application</code>·is·the·application·name.·The·file·is·to·be·located·in·directory145 <code·class="inline">Application</code>·is·the·application·name.·The·file·is·to·be·located·in·directory
146 <code·class="inline">ebin</code>·for·the·application.</p><p>The·file·must·contain·a·single·Erlang·term,·which·is·called·an·<em>application146 <code·class="inline">ebin</code>·for·the·application.</p><p>The·file·must·contain·a·single·Erlang·term,·which·is·called·an·<em>application
147 specification</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2868630805-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">147 specification</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5839641797-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">
148 ··</span><span·class="p"·data-group-id="2868630805-2">[</span><span·class="p"·data-group-id="2868630805-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">··</span><span·class="n">Description</span><span·class="p"·data-group-id="2868630805-3">}</span><span·class="p">,</span><span·class="w">148 ··</span><span·class="p"·data-group-id="5839641797-2">[</span><span·class="p"·data-group-id="5839641797-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">··</span><span·class="n">Description</span><span·class="p"·data-group-id="5839641797-3">}</span><span·class="p">,</span><span·class="w">
149 ···</span><span·class="p"·data-group-id="2868630805-4">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="w">···········</span><span·class="n">Id</span><span·class="p"·data-group-id="2868630805-4">}</span><span·class="p">,</span><span·class="w">149 ···</span><span·class="p"·data-group-id="5839641797-4">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="w">···········</span><span·class="n">Id</span><span·class="p"·data-group-id="5839641797-4">}</span><span·class="p">,</span><span·class="w">
150 ···</span><span·class="p"·data-group-id="2868630805-5">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">··········</span><span·class="n">Vsn</span><span·class="p"·data-group-id="2868630805-5">}</span><span·class="p">,</span><span·class="w">150 ···</span><span·class="p"·data-group-id="5839641797-5">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">··········</span><span·class="n">Vsn</span><span·class="p"·data-group-id="5839641797-5">}</span><span·class="p">,</span><span·class="w">
151 ···</span><span·class="p"·data-group-id="2868630805-6">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">······</span><span·class="n">Modules</span><span·class="p"·data-group-id="2868630805-6">}</span><span·class="p">,</span><span·class="w">151 ···</span><span·class="p"·data-group-id="5839641797-6">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">······</span><span·class="n">Modules</span><span·class="p"·data-group-id="5839641797-6">}</span><span·class="p">,</span><span·class="w">
152 ···</span><span·class="p"·data-group-id="2868630805-7">{</span><span·class="ss">maxP</span><span·class="p">,</span><span·class="w">·········</span><span·class="n">MaxP</span><span·class="p"·data-group-id="2868630805-7">}</span><span·class="p">,</span><span·class="w">152 ···</span><span·class="p"·data-group-id="5839641797-7">{</span><span·class="ss">maxP</span><span·class="p">,</span><span·class="w">·········</span><span·class="n">MaxP</span><span·class="p"·data-group-id="5839641797-7">}</span><span·class="p">,</span><span·class="w">
153 ···</span><span·class="p"·data-group-id="2868630805-8">{</span><span·class="ss">maxT</span><span·class="p">,</span><span·class="w">·········</span><span·class="n">MaxT</span><span·class="p"·data-group-id="2868630805-8">}</span><span·class="p">,</span><span·class="w">153 ···</span><span·class="p"·data-group-id="5839641797-8">{</span><span·class="ss">maxT</span><span·class="p">,</span><span·class="w">·········</span><span·class="n">MaxT</span><span·class="p"·data-group-id="5839641797-8">}</span><span·class="p">,</span><span·class="w">
154 ···</span><span·class="p"·data-group-id="2868630805-9">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">···</span><span·class="n">Names</span><span·class="p"·data-group-id="2868630805-9">}</span><span·class="p">,</span><span·class="w">154 ···</span><span·class="p"·data-group-id="5839641797-9">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">···</span><span·class="n">Names</span><span·class="p"·data-group-id="5839641797-9">}</span><span·class="p">,</span><span·class="w">
155 ···</span><span·class="p"·data-group-id="2868630805-10">{</span><span·class="ss">included_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Apps</span><span·class="p"·data-group-id="2868630805-10">}</span><span·class="p">,</span><span·class="w">155 ···</span><span·class="p"·data-group-id="5839641797-10">{</span><span·class="ss">included_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Apps</span><span·class="p"·data-group-id="5839641797-10">}</span><span·class="p">,</span><span·class="w">
156 ···</span><span·class="p"·data-group-id="2868630805-11">{</span><span·class="ss">optional_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Apps</span><span·class="p"·data-group-id="2868630805-11">}</span><span·class="p">,</span><span·class="w">156 ···</span><span·class="p"·data-group-id="5839641797-11">{</span><span·class="ss">optional_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Apps</span><span·class="p"·data-group-id="5839641797-11">}</span><span·class="p">,</span><span·class="w">
157 ···</span><span·class="p"·data-group-id="2868630805-12">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Apps</span><span·class="p"·data-group-id="2868630805-12">}</span><span·class="p">,</span><span·class="w">157 ···</span><span·class="p"·data-group-id="5839641797-12">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Apps</span><span·class="p"·data-group-id="5839641797-12">}</span><span·class="p">,</span><span·class="w">
158 ···</span><span·class="p"·data-group-id="2868630805-13">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">··········</span><span·class="n">Env</span><span·class="p"·data-group-id="2868630805-13">}</span><span·class="p">,</span><span·class="w">158 ···</span><span·class="p"·data-group-id="5839641797-13">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">··········</span><span·class="n">Env</span><span·class="p"·data-group-id="5839641797-13">}</span><span·class="p">,</span><span·class="w">
159 ···</span><span·class="p"·data-group-id="2868630805-14">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">··········</span><span·class="n">Start</span><span·class="p"·data-group-id="2868630805-14">}</span><span·class="p">,</span><span·class="w">159 ···</span><span·class="p"·data-group-id="5839641797-14">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">··········</span><span·class="n">Start</span><span·class="p"·data-group-id="5839641797-14">}</span><span·class="p">,</span><span·class="w">
160 ···</span><span·class="p"·data-group-id="2868630805-15">{</span><span·class="ss">start_phases</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Phases</span><span·class="p"·data-group-id="2868630805-15">}</span><span·class="p">,</span><span·class="w">160 ···</span><span·class="p"·data-group-id="5839641797-15">{</span><span·class="ss">start_phases</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Phases</span><span·class="p"·data-group-id="5839641797-15">}</span><span·class="p">,</span><span·class="w">
161 ···</span><span·class="p"·data-group-id="2868630805-16">{</span><span·class="ss">runtime_dependencies</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RTDeps</span><span·class="p"·data-group-id="2868630805-16">}</span><span·class="p"·data-group-id="2868630805-2">]</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·d5354367feaeaa6ec81bec35e6911582b55a81d10852aaa48447323334d7f0a2·...·]-1">}</span><span·class="p">.</span><span·class="w">161 ···</span><span·class="p"·data-group-id="5839641797-16">{</span><span·class="ss">runtime_dependencies</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RTDeps</span><span·class="p"·data-group-id="5839641797-16">}</span><span·class="p"·data-group-id="5839641797-2">]</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·f67c2283ba6300791cc64d2757212e831964b3c3ed8e8d3e1f47b6ad174f2d34·...·]-1">}</span><span·class="p">.</span><span·class="w">
  
162 ·············</span><span·class="n">Value</span><span·class="w">················</span><span·class="n">Default</span><span·class="w">162 ·············</span><span·class="n">Value</span><span·class="w">················</span><span·class="n">Default</span><span·class="w">
163 ·············</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">················</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">163 ·············</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">················</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">
164 </span><span·class="n">Application</span><span·class="w">··</span><span·class="nf">atom</span><span·class="p"·data-group-id="2868630805-17">(</span><span·class="p"·data-group-id="2868630805-17">)</span><span·class="w">···············</span><span·class="o">-</span><span·class="w">164 </span><span·class="n">Application</span><span·class="w">··</span><span·class="nf">atom</span><span·class="p"·data-group-id="5839641797-17">(</span><span·class="p"·data-group-id="5839641797-17">)</span><span·class="w">···············</span><span·class="o">-</span><span·class="w">
165 </span><span·class="n">Description</span><span·class="w">··</span><span·class="nf">string</span><span·class="p"·data-group-id="2868630805-18">(</span><span·class="p"·data-group-id="2868630805-18">)</span><span·class="w">·············</span><span·class="s">&quot;&quot;</span><span·class="w">165 </span><span·class="n">Description</span><span·class="w">··</span><span·class="nf">string</span><span·class="p"·data-group-id="5839641797-18">(</span><span·class="p"·data-group-id="5839641797-18">)</span><span·class="w">·············</span><span·class="s">&quot;&quot;</span><span·class="w">
166 </span><span·class="n">Id</span><span·class="w">···········</span><span·class="nf">string</span><span·class="p"·data-group-id="2868630805-19">(</span><span·class="p"·data-group-id="2868630805-19">)</span><span·class="w">·············</span><span·class="s">&quot;&quot;</span><span·class="w">166 </span><span·class="n">Id</span><span·class="w">···········</span><span·class="nf">string</span><span·class="p"·data-group-id="5839641797-19">(</span><span·class="p"·data-group-id="5839641797-19">)</span><span·class="w">·············</span><span·class="s">&quot;&quot;</span><span·class="w">
167 </span><span·class="n">Vsn</span><span·class="w">··········</span><span·class="nf">string</span><span·class="p"·data-group-id="2868630805-20">(</span><span·class="p"·data-group-id="2868630805-20">)</span><span·class="w">·············</span><span·class="s">&quot;&quot;</span><span·class="w">167 </span><span·class="n">Vsn</span><span·class="w">··········</span><span·class="nf">string</span><span·class="p"·data-group-id="5839641797-20">(</span><span·class="p"·data-group-id="5839641797-20">)</span><span·class="w">·············</span><span·class="s">&quot;&quot;</span><span·class="w">
168 </span><span·class="n">Modules</span><span·class="w">······</span><span·class="p"·data-group-id="2868630805-21">[</span><span·class="n">Module</span><span·class="p"·data-group-id="2868630805-21">]</span><span·class="w">·············</span><span·class="p"·data-group-id="2868630805-22">[</span><span·class="p"·data-group-id="2868630805-22">]</span><span·class="w">168 </span><span·class="n">Modules</span><span·class="w">······</span><span·class="p"·data-group-id="5839641797-21">[</span><span·class="n">Module</span><span·class="p"·data-group-id="5839641797-21">]</span><span·class="w">·············</span><span·class="p"·data-group-id="5839641797-22">[</span><span·class="p"·data-group-id="5839641797-22">]</span><span·class="w">
169 </span><span·class="n">MaxP</span><span·class="w">·········</span><span·class="nf">int</span><span·class="p"·data-group-id="2868630805-23">(</span><span·class="p"·data-group-id="2868630805-23">)</span><span·class="w">················</span><span·class="ss">infinity</span><span·class="w">169 </span><span·class="n">MaxP</span><span·class="w">·········</span><span·class="nf">int</span><span·class="p"·data-group-id="5839641797-23">(</span><span·class="p"·data-group-id="5839641797-23">)</span><span·class="w">················</span><span·class="ss">infinity</span><span·class="w">
170 </span><span·class="n">MaxT</span><span·class="w">·········</span><span·class="nf">int</span><span·class="p"·data-group-id="2868630805-24">(</span><span·class="p"·data-group-id="2868630805-24">)</span><span·class="w">················</span><span·class="ss">infinity</span><span·class="w">170 </span><span·class="n">MaxT</span><span·class="w">·········</span><span·class="nf">int</span><span·class="p"·data-group-id="5839641797-24">(</span><span·class="p"·data-group-id="5839641797-24">)</span><span·class="w">················</span><span·class="ss">infinity</span><span·class="w">
171 </span><span·class="n">Names</span><span·class="w">········</span><span·class="p"·data-group-id="2868630805-25">[</span><span·class="n">Name</span><span·class="p"·data-group-id="2868630805-25">]</span><span·class="w">···············</span><span·class="p"·data-group-id="2868630805-26">[</span><span·class="p"·data-group-id="2868630805-26">]</span><span·class="w">171 </span><span·class="n">Names</span><span·class="w">········</span><span·class="p"·data-group-id="5839641797-25">[</span><span·class="n">Name</span><span·class="p"·data-group-id="5839641797-25">]</span><span·class="w">···············</span><span·class="p"·data-group-id="5839641797-26">[</span><span·class="p"·data-group-id="5839641797-26">]</span><span·class="w">
172 </span><span·class="n">Apps</span><span·class="w">·········</span><span·class="p"·data-group-id="2868630805-27">[</span><span·class="n">App</span><span·class="p"·data-group-id="2868630805-27">]</span><span·class="w">················</span><span·class="p"·data-group-id="2868630805-28">[</span><span·class="p"·data-group-id="2868630805-28">]</span><span·class="w">172 </span><span·class="n">Apps</span><span·class="w">·········</span><span·class="p"·data-group-id="5839641797-27">[</span><span·class="n">App</span><span·class="p"·data-group-id="5839641797-27">]</span><span·class="w">················</span><span·class="p"·data-group-id="5839641797-28">[</span><span·class="p"·data-group-id="5839641797-28">]</span><span·class="w">
173 </span><span·class="n">Env</span><span·class="w">··········</span><span·class="p"·data-group-id="2868630805-29">[</span><span·class="p"·data-group-id="2868630805-30">{</span><span·class="n">Par</span><span·class="p">,</span><span·class="n">Val</span><span·class="p"·data-group-id="2868630805-30">}</span><span·class="p"·data-group-id="2868630805-29">]</[·...·truncated·by·diffoscope;·len:·133,·SHA:·54b2f8664d2526d91eeef23eef3e5b579fc1c407251f987547b8bc2e6423c588·...·]-31">]</span><span·class="w">173 </span><span·class="n">Env</span><span·class="w">··········</span><span·class="p"·data-group-id="5839641797-29">[</span><span·class="p"·data-group-id="5839641797-30">{</span><span·class="n">Par</span><span·class="p">,</span><span·class="n">Val</span><span·class="p"·data-group-id="5839641797-30">}</span><span·class="p"·data-group-id="5839641797-29">]</[·...·truncated·by·diffoscope;·len:·133,·SHA:·fd279b27a24aa6251f0a183a186d354ab2ebc288c5d25458aa736bf8bb2187bf·...·]-31">]</span><span·class="w">
174 </span><span·class="n">Start</span><span·class="w">········</span><span·class="p"·data-group-id="2868630805-32">{</span><span·class="n">Module</span><span·class="p">,</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="2868630805-32">}</span><span·class="w">···</span><span·class="p"·data-group-id="2868630805-33">[</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·7eca98ff88e19f9d173203b172c592e3f89ad079a8fb8c541f65b0b689236051·...·]-33">]</span><span·class="w">174 </span><span·class="n">Start</span><span·class="w">········</span><span·class="p"·data-group-id="5839641797-32">{</span><span·class="n">Module</span><span·class="p">,</span><span·class="n">StartArgs</span><span·class="p"·data-group-id="5839641797-32">}</span><span·class="w">···</span><span·class="p"·data-group-id="5839641797-33">[</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·cfa66df7e02e85bc058e9b4635ccfe8d5d7edd0d665d9293701b5c4555f35d1e·...·]-33">]</span><span·class="w">
175 </span><span·class="n">Phases</span><span·class="w">·······</span><span·class="p"·data-group-id="2868630805-34">[</span><span·class="p"·data-group-id="2868630805-35">{</span><span·class="n">Phase</span><span·class="p">,</span><span·class="n">PhaseArgs</span><span·class="p"·data-group-id="2868630805-35">}</span><span·class="p"·data-group-id="2868630805-34">]</span><span·class="w">··</span><span·class="ss">undefined</span><span·class="w">175 </span><span·class="n">Phases</span><span·class="w">·······</span><span·class="p"·data-group-id="5839641797-34">[</span><span·class="p"·data-group-id="5839641797-35">{</span><span·class="n">Phase</span><span·class="p">,</span><span·class="n">PhaseArgs</span><span·class="p"·data-group-id="5839641797-35">}</span><span·class="p"·data-group-id="5839641797-34">]</span><span·class="w">··</span><span·class="ss">undefined</span><span·class="w">
176 </span><span·class="n">RTDeps</span><span·class="w">·······</span><span·class="p"·data-group-id="2868630805-36">[</span><span·class="n">ApplicationVersion</span><span·class="p"·data-group-id="2868630805-36">]</span><span·class="w">·</span><span·class="p"·data-group-id="2868630805-37">[</span><span·class="p"·data-group-id="2868630805-37">]</span><span·class="w">176 </span><span·class="n">RTDeps</span><span·class="w">·······</span><span·class="p"·data-group-id="5839641797-36">[</span><span·class="n">ApplicationVersion</span><span·class="p"·data-group-id="5839641797-36">]</span><span·class="w">·</span><span·class="p"·data-group-id="5839641797-37">[</span><span·class="p"·data-group-id="5839641797-37">]</span><span·class="w">
  
177 </span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">App</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Par</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Phase</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="2868630805-38">(</span><span·class="p"·data-group-id="2868630805-38">)</span><span·class="w">177 </span><span·class="n">Module</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">App</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Par</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Phase</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="5839641797-38">(</span><span·class="p"·data-group-id="5839641797-38">)</span><span·class="w">
178 </span><span·class="n">Val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PhaseArgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="2868630805-39">(</span><span·class="p"·data-group-id="2868630805-39">)</span><span·class="w">178 </span><span·class="n">Val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">StartArgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PhaseArgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="5839641797-39">(</span><span·class="p"·data-group-id="5839641797-39">)</span><span·class="w">
179 </span><span·class="n">ApplicationVersion</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2868630805-40">(</span><span·class="p"·data-group-id="2868630805-40">)</span></code></pre><ul><li><strong><code·class="inline">Application</code></strong>·-·Application·name.</li></ul><p>For·the·application·controller,·all·keys·are·optional.·The·respective·default179 </span><span·class="n">ApplicationVersion</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="5839641797-40">(</span><span·class="p"·data-group-id="5839641797-40">)</span></code></pre><ul><li><strong><code·class="inline">Application</code></strong>·-·Application·name.</li></ul><p>For·the·application·controller,·all·keys·are·optional.·The·respective·default
180 values·are·used·for·any·omitted·keys.</p><p>The·functions·in·<code·class="inline">systools</code>·require·more·information.·If·they·are·used,·the180 values·are·used·for·any·omitted·keys.</p><p>The·functions·in·<code·class="inline">systools</code>·require·more·information.·If·they·are·used,·the
181 following·keys·are·mandatory:</p><ul><li><code·class="inline">description</code></li><li><code·class="inline">vsn</code></li><li><code·class="inline">modules</code></li><li><code·class="inline">registered</code></li><li><code·class="inline">applications</code></li></ul><p>The·other·keys·are·ignored·by·<code·class="inline">systools</code>.</p><ul><li><p><strong><code·class="inline">description</code></strong>·-·A·one-line·description·of·the·application.</p></li><li><p><strong><code·class="inline">id</code></strong>·-·Product·identification,·or·similar.</p></li><li><p><strong><code·class="inline">vsn</code></strong>·-·Version·of·the·application.</p></li><li><p><strong><code·class="inline">modules</code></strong>·-·All·modules·introduced·by·this·application.·<code·class="inline">systools</code>·uses181 following·keys·are·mandatory:</p><ul><li><code·class="inline">description</code></li><li><code·class="inline">vsn</code></li><li><code·class="inline">modules</code></li><li><code·class="inline">registered</code></li><li><code·class="inline">applications</code></li></ul><p>The·other·keys·are·ignored·by·<code·class="inline">systools</code>.</p><ul><li><p><strong><code·class="inline">description</code></strong>·-·A·one-line·description·of·the·application.</p></li><li><p><strong><code·class="inline">id</code></strong>·-·Product·identification,·or·similar.</p></li><li><p><strong><code·class="inline">vsn</code></strong>·-·Version·of·the·application.</p></li><li><p><strong><code·class="inline">modules</code></strong>·-·All·modules·introduced·by·this·application.·<code·class="inline">systools</code>·uses
182 this·list·when·generating·start·scripts·and·tar·files.·A·module·can·only·be182 this·list·when·generating·start·scripts·and·tar·files.·A·module·can·only·be
183 defined·in·one·application.</p></li><li><p><strong><code·class="inline">maxP</code></strong>·-·<em>Deprecated·-·is·ignored</em></p><p>Maximum·number·of·processes·allowed·in·the·application.</p></li><li><p><strong><code·class="inline">maxT</code></strong>·-·Maximum·time,·in·milliseconds,·that·the·application·is·allowed·to183 defined·in·one·application.</p></li><li><p><strong><code·class="inline">maxP</code></strong>·-·<em>Deprecated·-·is·ignored</em></p><p>Maximum·number·of·processes·allowed·in·the·application.</p></li><li><p><strong><code·class="inline">maxT</code></strong>·-·Maximum·time,·in·milliseconds,·that·the·application·is·allowed·to
184 run.·After·the·specified·time,·the·application·terminates·automatically.</p></li><li><p><strong><code·class="inline">registered</code></strong>·-·All·names·of·registered·processes·started·in·this184 run.·After·the·specified·time,·the·application·terminates·automatically.</p></li><li><p><strong><code·class="inline">registered</code></strong>·-·All·names·of·registered·processes·started·in·this
185 application.·<code·class="inline">systools</code>·uses·this·list·to·detect·name·clashes·between185 application.·<code·class="inline">systools</code>·uses·this·list·to·detect·name·clashes·between
186 different·applications.</p></li><li><p><strong><code·class="inline">included_applications</code></strong>·-·All·applications·included·by·this·application.186 different·applications.</p></li><li><p><strong><code·class="inline">included_applications</code></strong>·-·All·applications·included·by·this·application.
Offset 207, 15 lines modifiedOffset 207, 15 lines modified
207 be·omitted·for·applications·without·processes,·typically·code·libraries,·for207 be·omitted·for·applications·without·processes,·typically·code·libraries,·for
208 example,·STDLIB.</p></li><li><p><strong><code·class="inline">start_phases</code></strong>·-·A·list·of·start·phases·and·corresponding·start·arguments208 example,·STDLIB.</p></li><li><p><strong><code·class="inline">start_phases</code></strong>·-·A·list·of·start·phases·and·corresponding·start·arguments
209 for·the·application.·If·this·key·is·present,·the·application·master,·in209 for·the·application.·If·this·key·is·present,·the·application·master,·in
210 addition·to·the·usual·call·to·<code·class="inline">Module:start/2</code>,·also·calls210 addition·to·the·usual·call·to·<code·class="inline">Module:start/2</code>,·also·calls
211 <code·class="inline">Module:start_phase(Phase,Type,PhaseArgs)</code>·for·each·start·phase·defined·by·key211 <code·class="inline">Module:start_phase(Phase,Type,PhaseArgs)</code>·for·each·start·phase·defined·by·key
212 <code·class="inline">start_phases</code>.·Only·after·this·extended·start·procedure,212 <code·class="inline">start_phases</code>.·Only·after·this·extended·start·procedure,
213 <code·class="inline">application:start(Application)</code>·returns.</p><p>Start·phases·can·be·used·to·synchronize·startup·of·an·application·and·its213 <code·class="inline">application:start(Application)</code>·returns.</p><p>Start·phases·can·be·used·to·synchronize·startup·of·an·application·and·its
214 included·applications.·In·this·case,·key·<code·class="inline">mod</code>·must·be·specified·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2475693852-1">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2475693852-2">{</span><span·class="ss">application_starter</span><span·class="p">,</span><span·class="p"·data-group-id="24756938[·...·truncated·by·diffoscope;·len:·246,·SHA:·cd8335329f9c3d3795b95d442184f0a95c1020673022acb924e124d582cd97c0·...·]-1">}</span></code></pre><p>The·application·master·then·calls·<code·class="inline">Module:start/2</code>·for·the·primary214 included·applications.·In·this·case,·key·<code·class="inline">mod</code>·must·be·specified·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0912404295-1">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0912404295-2">{</span><span·class="ss">application_starter</span><span·class="p">,</span><span·class="p"·data-group-id="09124042[·...·truncated·by·diffoscope;·len:·246,·SHA:·181645360b306e0a445c0a1b202babca9d9d6796961e7b2236cdee6a93fc73f4·...·]-1">}</span></code></pre><p>The·application·master·then·calls·<code·class="inline">Module:start/2</code>·for·the·primary
215 application,·followed·by·calls·to·<code·class="inline">Module:start_phase/3</code>·for·each·start·phase215 application,·followed·by·calls·to·<code·class="inline">Module:start_phase/3</code>·for·each·start·phase
216 (as·defined·for·the·primary·application),·both·for·the·primary·application·and216 (as·defined·for·the·primary·application),·both·for·the·primary·application·and
217 for·each·of·its·included·applications,·for·which·the·start·phase·is·defined.</p><p>This·implies·that·for·an·included·application,·the·set·of·start·phases·must·be217 for·each·of·its·included·applications,·for·which·the·start·phase·is·defined.</p><p>This·implies·that·for·an·included·application,·the·set·of·start·phases·must·be
218 a·subset·of·the·set·of·phases·defined·for·the·primary·application.·For·more218 a·subset·of·the·set·of·phases·defined·for·the·primary·application.·For·more
219 information,·see·<a·href="../../../../doc/system/applications.html">OTP·Design·Principles</a>.</p></li><li><p><strong><code·class="inline"·id="runtime_dependencies">runtime_dependencies</code></strong>·-·A·list·of·application219 information,·see·<a·href="../../../../doc/system/applications.html">OTP·Design·Principles</a>.</p></li><li><p><strong><code·class="inline"·id="runtime_dependencies">runtime_dependencies</code></strong>·-·A·list·of·application
220 versions·that·the·application·depends·on.·An·example·of·such·an·application220 versions·that·the·application·depends·on.·An·example·of·such·an·application
221 version·is·<code·class="inline">&quot;kernel-3.0&quot;</code>.·Application·versions·specified·as·runtime221 version·is·<code·class="inline">&quot;kernel-3.0&quot;</code>.·Application·versions·specified·as·runtime
2.78 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/application.html
    
Offset 1649, 15 lines modifiedOffset 1649, 15 lines modified
1649 distributed.·The·argument·overrides·the·value·for·the·application·in·the·Kernel1649 distributed.·The·argument·overrides·the·value·for·the·application·in·the·Kernel
1650 configuration·parameter·<code·class="inline">distributed</code>.·<code·class="inline">Application</code>·must·be·the·application1650 configuration·parameter·<code·class="inline">distributed</code>.·<code·class="inline">Application</code>·must·be·the·application
1651 name·(same·as·in·the·first·argument).·If·a·node·crashes·and·<code·class="inline">Time</code>·is·specified,1651 name·(same·as·in·the·first·argument).·If·a·node·crashes·and·<code·class="inline">Time</code>·is·specified,
1652 the·application·controller·waits·for·<code·class="inline">Time</code>·milliseconds·before·attempting·to1652 the·application·controller·waits·for·<code·class="inline">Time</code>·milliseconds·before·attempting·to
1653 restart·the·application·on·another·node.·If·<code·class="inline">Time</code>·is·not·specified,·it·defaults1653 restart·the·application·on·another·node.·If·<code·class="inline">Time</code>·is·not·specified,·it·defaults
1654 to·<code·class="inline">0</code>·and·the·application·is·restarted·immediately.</p><p><code·class="inline">Nodes</code>·is·a·list·of·node·names·where·the·application·can·run,·in·priority·from1654 to·<code·class="inline">0</code>·and·the·application·is·restarted·immediately.</p><p><code·class="inline">Nodes</code>·is·a·list·of·node·names·where·the·application·can·run,·in·priority·from
1655 left·to·right.·Node·names·can·be·grouped·using·tuples·to·indicate·that·they·have1655 left·to·right.·Node·names·can·be·grouped·using·tuples·to·indicate·that·they·have
1656 the·same·priority.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0218622668-1">[</span><span·class="ss">cp1@cave</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0218622668-2">{</span><span·class="ss">cp2@cave</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cp3@[·...·truncated·by·diffoscope;·len:·105,·SHA:·dc6d10b1ad85bfba6c53695ebdcb5226b494f939e60b0460cd46bb02e975c7f6·...·]-1">]</span></code></pre><p>This·means·that·the·application·is·preferably·to·be·started·at·<code·class="inline">cp1@cave</code>.·If1656 the·same·priority.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3222177381-1">[</span><span·class="ss">cp1@cave</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3222177381-2">{</span><span·class="ss">cp2@cave</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cp3@[·...·truncated·by·diffoscope;·len:·105,·SHA:·cdc63b59e18a109631a1f2c40a8867d9f1c7ee75bf6d0386c560473dab1afe82·...·]-1">]</span></code></pre><p>This·means·that·the·application·is·preferably·to·be·started·at·<code·class="inline">cp1@cave</code>.·If
1657 <code·class="inline">cp1@cave</code>·is·down,·the·application·is·to·be·started·at·<code·class="inline">cp2@cave</code>·or1657 <code·class="inline">cp1@cave</code>·is·down,·the·application·is·to·be·started·at·<code·class="inline">cp2@cave</code>·or
1658 <code·class="inline">cp3@cave</code>.</p><p>If·<code·class="inline">Distributed·==·default</code>,·the·value·for·the·application·in·the·Kernel1658 <code·class="inline">cp3@cave</code>.</p><p>If·<code·class="inline">Distributed·==·default</code>,·the·value·for·the·application·in·the·Kernel
1659 configuration·parameter·<code·class="inline">distributed</code>·is·used.</p>1659 configuration·parameter·<code·class="inline">distributed</code>·is·used.</p>
1660 ··</section>1660 ··</section>
1661 </section>1661 </section>
1662 <section·class="detail"·id="loaded_applications/0">1662 <section·class="detail"·id="loaded_applications/0">
  
21.0 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/code.html
    
Offset 189, 19 lines modifiedOffset 189, 19 lines modified
189 <a·href="#lib_dir/2"><code·class="inline">code:lib_dir/2</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erl_prim_loader.html"><code·class="inline">erl_prim_loader</code></a>.</p></blockquote><p>The·Erlang·archives·are·<code·class="inline">ZIP</code>·files·with·extension·<code·class="inline">.ez</code>.·Erlang·archives·can189 <a·href="#lib_dir/2"><code·class="inline">code:lib_dir/2</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erl_prim_loader.html"><code·class="inline">erl_prim_loader</code></a>.</p></blockquote><p>The·Erlang·archives·are·<code·class="inline">ZIP</code>·files·with·extension·<code·class="inline">.ez</code>.·Erlang·archives·can
190 also·be·<a·href="../../../../lib/stdlib-6.0.1/doc/html/escript.html">enclosed·in·<code·class="inline">escript</code></a>·files·whose·file·extension·is·arbitrary.</p><p>Erlang·archive·files·can·contain·entire·Erlang·applications·or·parts·of190 also·be·<a·href="../../../../lib/stdlib-6.0.1/doc/html/escript.html">enclosed·in·<code·class="inline">escript</code></a>·files·whose·file·extension·is·arbitrary.</p><p>Erlang·archive·files·can·contain·entire·Erlang·applications·or·parts·of
191 applications.·The·structure·in·an·archive·file·is·the·same·as·the·directory191 applications.·The·structure·in·an·archive·file·is·the·same·as·the·directory
192 structure·for·an·application.·If·you,·for·example,·create·an·archive·of192 structure·for·an·application.·If·you,·for·example,·create·an·archive·of
193 <code·class="inline">mnesia-4.4.7</code>,·the·archive·file·must·be·named·<code·class="inline">mnesia-4.4.7.ez</code>·and·it·must193 <code·class="inline">mnesia-4.4.7</code>,·the·archive·file·must·be·named·<code·class="inline">mnesia-4.4.7.ez</code>·and·it·must
194 contain·a·top·directory·named·<code·class="inline">mnesia-4.4.7</code>.·If·the·version·part·of·the·name·is194 contain·a·top·directory·named·<code·class="inline">mnesia-4.4.7</code>.·If·the·version·part·of·the·name·is
195 omitted,·it·must·also·be·omitted·in·the·archive.·That·is,·a·<code·class="inline">mnesia.ez</code>·archive195 omitted,·it·must·also·be·omitted·in·the·archive.·That·is,·a·<code·class="inline">mnesia.ez</code>·archive
196 must·contain·a·<code·class="inline">mnesia</code>·top·directory.</p><p>An·archive·file·for·an·application·can,·for·example,·be·created·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">zip</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="1574825965-1">(</span><span·class="s">&quot;mnesia-4.4.7.ez&quot;</span><span·class="p">,</span><span·class="w">196 must·contain·a·<code·class="inline">mnesia</code>·top·directory.</p><p>An·archive·file·for·an·application·can,·for·example,·be·created·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">zip</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="8875151915-1">(</span><span·class="s">&quot;mnesia-4.4.7.ez&quot;</span><span·class="p">,</span><span·class="w">
197 »       </span><span·class="p"·data-group-id="1574825965-2">[</span><span·class="s">&quot;mnesia-4.4.7&quot;</span><span·class="p"·data-group-id="1574825965-2">]</span><span·class="p">,</span><span·class="w">197 »       </span><span·class="p"·data-group-id="8875151915-2">[</span><span·class="s">&quot;mnesia-4.4.7&quot;</span><span·class="p"·data-group-id="8875151915-2">]</span><span·class="p">,</span><span·class="w">
198 »       </span><span·class="p"·data-group-id="1574825965-3">[</span><span·class="p"·data-group-id="1574825965-4">{</span><span·class="ss">cwd</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·123,·SHA:·cfaf43bd4b89043c2b799082e8e7b0c1b7373f3881f9bd802de88a456b5dedb0·...·]5-4">}</span><span·class="p">,</span><span·class="w">198 »       </span><span·class="p"·data-group-id="8875151915-3">[</span><span·class="p"·data-group-id="8875151915-4">{</span><span·class="ss">cwd</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·123,·SHA:·281d4451166b4960c99ab97115a124d14bb8dd441c5821d1f3e81d01bc3f00cb·...·]5-4">}</span><span·class="p">,</span><span·class="w">
199 »       ·</span><span·class="p"·data-group-id="1574825965-6">{</span><span·class="ss">compress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all</span><span·class="p"·data-group-id="1574825965-6">}</span><span·class="p">,</span><span·class="w">199 »       ·</span><span·class="p"·data-group-id="8875151915-6">{</span><span·class="ss">compress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all</span><span·class="p"·data-group-id="8875151915-6">}</span><span·class="p">,</span><span·class="w">
200 »       ·</span><span·class="p"·data-group-id="1574825965-7">{</span><span·class="ss">uncompress</span><span·class="p">,</span><span·class="p"·data-group-id="1574825965-8">[</span><span·class="s">&quot;.beam&quot;</span><span·class="p">,</span><span·class="s">&quot;.app&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·179,·SHA:·9d070aa28e1cda94e2c5f586b3029305a6070cd7fa637c5695b28f1f420f4e71·...·]5-1">)</span><span·class="p">.</span></code></pre><p>Any·file·in·the·archive·can·be·compressed,·but·to·speed·up·the·access·of200 »       ·</span><span·class="p"·data-group-id="8875151915-7">{</span><span·class="ss">uncompress</span><span·class="p">,</span><span·class="p"·data-group-id="8875151915-8">[</span><span·class="s">&quot;.beam&quot;</span><span·class="p">,</span><span·class="s">&quot;.app&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·179,·SHA:·e41e62b2ccc36af83685cade18dfeb9003f78d9b53bae8ccca6430e5a0d1e916·...·]5-1">)</span><span·class="p">.</span></code></pre><p>Any·file·in·the·archive·can·be·compressed,·but·to·speed·up·the·access·of
201 frequently·read·files,·it·can·be·a·good·idea·to·store·<code·class="inline">beam</code>·and·<code·class="inline">app</code>·files201 frequently·read·files,·it·can·be·a·good·idea·to·store·<code·class="inline">beam</code>·and·<code·class="inline">app</code>·files
202 uncompressed·in·the·archive.</p><p>Normally·the·top·directory·of·an·application·is·located·in·library·directory202 uncompressed·in·the·archive.</p><p>Normally·the·top·directory·of·an·application·is·located·in·library·directory
203 <code·class="inline">$OTPROOT/lib</code>·or·in·a·directory·referred·to·by·environment·variable·<code·class="inline">ERL_LIBS</code>.203 <code·class="inline">$OTPROOT/lib</code>·or·in·a·directory·referred·to·by·environment·variable·<code·class="inline">ERL_LIBS</code>.
204 At·startup,·when·the·initial·code·path·is·computed,·the·code·server·also·looks204 At·startup,·when·the·initial·code·path·is·computed,·the·code·server·also·looks
205 for·archive·files·in·these·directories·and·possibly·adds·<code·class="inline">ebin</code>·directories·in205 for·archive·files·in·these·directories·and·possibly·adds·<code·class="inline">ebin</code>·directories·in
206 archives·to·the·code·path.·The·code·path·then·contains·paths·to·directories·that206 archives·to·the·code·path.·The·code·path·then·contains·paths·to·directories·that
207 look·like·<code·class="inline">$OTPROOT/lib/mnesia.ez/mnesia/ebin</code>·or207 look·like·<code·class="inline">$OTPROOT/lib/mnesia.ez/mnesia/ebin</code>·or
Offset 1871, 18 lines modifiedOffset 1871, 18 lines modified
1871 none·of·the·modules·are·loaded·if·there·is·a·problem·with·any·of·the1871 none·of·the·modules·are·loaded·if·there·is·a·problem·with·any·of·the
1872 modules.</p><p>Loading·can·fail·for·one·the·following·reasons:</p><ul><li><p><strong><code·class="inline">badfile</code></strong>·-·The·object·code·has·an·incorrect·format·or·the·module·name·in1872 modules.</p><p>Loading·can·fail·for·one·the·following·reasons:</p><ul><li><p><strong><code·class="inline">badfile</code></strong>·-·The·object·code·has·an·incorrect·format·or·the·module·name·in
1873 the·object·code·is·not·the·expected·module·name.</p></li><li><p><strong><code·class="inline">nofile</code></strong>·-·No·file·with·object·code·exists.</p></li><li><p><strong><code·class="inline">on_load_not_allowed</code></strong>·-·A·module·contains·an1873 the·object·code·is·not·the·expected·module·name.</p></li><li><p><strong><code·class="inline">nofile</code></strong>·-·No·file·with·object·code·exists.</p></li><li><p><strong><code·class="inline">on_load_not_allowed</code></strong>·-·A·module·contains·an
1874 <a·href="../../../../doc/system/code_loading.html#on_load">-on_load·function</a>.</p></li><li><p><strong><code·class="inline">duplicated</code></strong>·-·A·module·is·included·more·than·once·in·<code·class="inline">Modules</code>.</p></li><li><p><strong><code·class="inline">not_purged</code></strong>·-·The·object·code·cannot·be·loaded·because·an·old·version·of1874 <a·href="../../../../doc/system/code_loading.html#on_load">-on_load·function</a>.</p></li><li><p><strong><code·class="inline">duplicated</code></strong>·-·A·module·is·included·more·than·once·in·<code·class="inline">Modules</code>.</p></li><li><p><strong><code·class="inline">not_purged</code></strong>·-·The·object·code·cannot·be·loaded·because·an·old·version·of
1875 the·code·already·exists.</p></li><li><p><strong><code·class="inline">sticky_directory</code></strong>·-·The·object·code·resides·in·a·sticky·directory.</p></li><li><p><strong><code·class="inline">pending_on_load</code></strong>·-·A·previously·loaded·module·contains·an·<code·class="inline">-on_load</code>1875 the·code·already·exists.</p></li><li><p><strong><code·class="inline">sticky_directory</code></strong>·-·The·object·code·resides·in·a·sticky·directory.</p></li><li><p><strong><code·class="inline">pending_on_load</code></strong>·-·A·previously·loaded·module·contains·an·<code·class="inline">-on_load</code>
1876 function·that·never·finished.</p></li></ul><p>If·it·is·important·to·minimize·the·time·that·an·application·is·inactive·while1876 function·that·never·finished.</p></li></ul><p>If·it·is·important·to·minimize·the·time·that·an·application·is·inactive·while
1877 changing·code,·use·<a·href="#prepare_loading/1"><code·class="inline">prepare_loading/1</code></a>·and·<a·href="#finish_loading/1"><code·class="inline">finish_loading/1</code></a>·instead·of1877 changing·code,·use·<a·href="#prepare_loading/1"><code·class="inline">prepare_loading/1</code></a>·and·<a·href="#finish_loading/1"><code·class="inline">finish_loading/1</code></a>·instead·of
1878 <a·href="#atomic_load/1"><code·class="inline">atomic_load/1</code></a>.·Here·is·an·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0358293979-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Prepared</span><span·class="p"·data-group-id="0358293979-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span>[·...·truncated·by·diffoscope;·len:·187,·SHA:·8563138a2db851be5b772b72456c58c4e3ba50904beaae89b7438fb45633247d·...·]-2">)</span><span·class="p">,</span><span·class="w">1878 <a·href="#atomic_load/1"><code·class="inline">atomic_load/1</code></a>.·Here·is·an·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4115206934-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Prepared</span><span·class="p"·data-group-id="4115206934-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span>[·...·truncated·by·diffoscope;·len:·187,·SHA:·5308450819715070e69e47e9f82a8b30849639627d6b361b447208e84a7b6dd4·...·]-2">)</span><span·class="p">,</span><span·class="w">
1879 </span><span·class="c1">%%·Put·the·application·into·an·inactive·state·or·do·any</span><span·class="w">1879 </span><span·class="c1">%%·Put·the·application·into·an·inactive·state·or·do·any</span><span·class="w">
1880 </span><span·class="c1">%%·other·preparation·needed·before·changing·the·code.</span><span·class="w">1880 </span><span·class="c1">%%·other·preparation·needed·before·changing·the·code.</span><span·class="w">
1881 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">finish_loading</span><span·class="p"·data-group-id="0358293979-3">(</span><span·class="n">Prepared</span><span·class="p"·data-group-id="0358293979-3">)</span><span·class="p">,</span><span·class="w">1881 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">finish_loading</span><span·class="p"·data-group-id="4115206934-3">(</span><span·class="n">Prepared</span><span·class="p"·data-group-id="4115206934-3">)</span><span·class="p">,</span><span·class="w">
1882 </span><span·class="c1">%%·Resume·the·application.</span></code></pre>1882 </span><span·class="c1">%%·Resume·the·application.</span></code></pre>
1883 ··</section>1883 ··</section>
1884 </section>1884 </section>
1885 <section·class="detail"·id="clash/0">1885 <section·class="detail"·id="clash/0">
  
1886 ··<div·class="detail-header">1886 ··<div·class="detail-header">
1887 ····<a·href="#clash/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1887 ····<a·href="#clash/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 2427, 16 lines modifiedOffset 2427, 16 lines modified
2427 ······</div>2427 ······</div>
  
2428 <p>Returns·the·object·code·for·module·<code·class="inline">Module</code>·if·found·in·the·code·path.</p><p>Returns·<code·class="inline">{Module,·Binary,·Filename}</code>·if·successful,·otherwise2428 <p>Returns·the·object·code·for·module·<code·class="inline">Module</code>·if·found·in·the·code·path.</p><p>Returns·<code·class="inline">{Module,·Binary,·Filename}</code>·if·successful,·otherwise
2429 <code·class="inline">error</code>.·<code·class="inline">Binary</code>·is·a·binary·data·object,·which·contains·the·object2429 <code·class="inline">error</code>.·<code·class="inline">Binary</code>·is·a·binary·data·object,·which·contains·the·object
2430 code·for·the·module.·This·is·useful·if·code·is·to·be·loaded·on·a2430 code·for·the·module.·This·is·useful·if·code·is·to·be·loaded·on·a
2431 remote·node·in·a·distributed·system.·For·example,·loading·module2431 remote·node·in·a·distributed·system.·For·example,·loading·module
2432 <code·class="inline">Module</code>·on·a·node·<code·class="inline">Node</code>·is·done·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">2432 <code·class="inline">Module</code>·on·a·node·<code·class="inline">Node</code>·is·done·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
2433 </span><span·class="p"·data-group-id="8854831510-1">{</span><span·class="p">_</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Binary</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filename</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·314,·SHA:·7f864d216ae7412397f35ab360cc8b99efdc72a97027c15dc1680ca84af838d0·...·]-2">)</span><span·class="p">,</span><span·class="w">2433 </span><span·class="p"·data-group-id="9064610223-1">{</span><span·class="p">_</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Binary</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filename</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·314,·SHA:·c8f1a977415ce00214a3d0c6a27dd2a4ef609b473e0ea08fe665483e7311c7bc·...·]-2">)</span><span·class="p">,</span><span·class="w">
2434 </span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8854831510-3">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">load_binary</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·332,·SHA:·f9d5b65a95a4a95d83b241d74e8d89f10f459fcbba9826713256fc1d97c41ddf·...·]-3">)</span><span·class="p">,</span><span·class="w">2434 </span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="9064610223-3">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">load_binary</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·332,·SHA:·be810d3c1ff500b9e50a19f545f6cbfbc5e1e60aad9aa361b514d6d90d51f0ab·...·]-3">)</span><span·class="p">,</span><span·class="w">
2435 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>2435 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>
2436 ··</section>2436 ··</section>
2437 </section>2437 </section>
2438 <section·class="detail"·id="get_path/0">2438 <section·class="detail"·id="get_path/0">
  
2439 ··<div·class="detail-header">2439 ··<div·class="detail-header">
2440 ····<a·href="#get_path/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2440 ····<a·href="#get_path/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 2547, 15 lines modifiedOffset 2547, 15 lines modified
2547 ······<div·class="specs">2547 ······<div·class="specs">
  
2548 ··········<pre·translate="no"><span·class="attribute">-spec</span>·lib_dir()·->·<a·href="file.html#t:filename/0">file:filename</a>().</pre>2548 ··········<pre·translate="no"><span·class="attribute">-spec</span>·lib_dir()·->·<a·href="file.html#t:filename/0">file:filename</a>().</pre>
  
2549 ······</div>2549 ······</div>
  
2550 <p>Returns·the·library·directory,·<code·class="inline">$OTPROOT/lib</code>,·where·<code·class="inline">$OTPROOT</code>·is·the·root2550 <p>Returns·the·library·directory,·<code·class="inline">$OTPROOT/lib</code>,·where·<code·class="inline">$OTPROOT</code>·is·the·root
2551 directory·of·Erlang/OTP.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="1972730600-1">(</span><span·class="p"·data-group-id="1972730600-1">)</span><span·class="p">.</span><span·class="w">2551 directory·of·Erlang/OTP.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="7954959586-1">(</span><span·class="p"·data-group-id="7954959586-1">)</span><span·class="p">.</span><span·class="w">
2552 </span><span·class="s">&quot;/usr/local/otp/lib&quot;</span></code></pre>2552 </span><span·class="s">&quot;/usr/local/otp/lib&quot;</span></code></pre>
2553 ··</section>2553 ··</section>
2554 </section>2554 </section>
2555 <section·class="detail"·id="lib_dir/1">2555 <section·class="detail"·id="lib_dir/1">
  
2556 ··<div·class="detail-header">2556 ··<div·class="detail-header">
2557 ····<a·href="#lib_dir/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2557 ····<a·href="#lib_dir/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 2586, 15 lines modifiedOffset 2586, 15 lines modified
2586 an·<code·class="inline">ebin</code>·subdirectory,·the·path·to·this·directory·is·returned·(not·the·<code·class="inline">ebin</code>2586 an·<code·class="inline">ebin</code>·subdirectory,·the·path·to·this·directory·is·returned·(not·the·<code·class="inline">ebin</code>
2587 directory).</p><p>If·the·directory·refers·to·a·directory·in·an·archive,·the·archive·name·is2587 directory).</p><p>If·the·directory·refers·to·a·directory·in·an·archive,·the·archive·name·is
2588 stripped·away·before·the·path·is·returned.·For·example,·if·directory2588 stripped·away·before·the·path·is·returned.·For·example,·if·directory
2589 <code·class="inline">/usr/local/otp/lib/mnesia-4.2.2.ez/mnesia-4.2.2/ebin</code>·is·in·the·path,2589 <code·class="inline">/usr/local/otp/lib/mnesia-4.2.2.ez/mnesia-4.2.2/ebin</code>·is·in·the·path,
2590 <code·class="inline">/usr/local/otp/lib/mnesia-4.2.2/ebin</code>·is·returned.·This·means·that·the·library2590 <code·class="inline">/usr/local/otp/lib/mnesia-4.2.2/ebin</code>·is·returned.·This·means·that·the·library
2591 directory·for·an·application·is·the·same,·regardless·if·the·application·resides2591 directory·for·an·application·is·the·same,·regardless·if·the·application·resides
2592 in·an·archive·or·not.</p><blockquote><h4·class="info">Warning</h4><p>Archives·are·experimental.·In·a·future·release,·they·can·be·removed·or2592 in·an·archive·or·not.</p><blockquote><h4·class="info">Warning</h4><p>Archives·are·experimental.·In·a·future·release,·they·can·be·removed·or
2593 their·behavior·can·change.</p></blockquote><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="4794544459-1">(</span><span·class="ss">mnesia</span><span·class="p"·data-group-id="4794544459-1">)</span><span·class="p">.</span><span·class="w">2593 their·behavior·can·change.</p></blockquote><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="7008493512-1">(</span><span·class="ss">mnesia</span><span·class="p"·data-group-id="7008493512-1">)</span><span·class="p">.</span><span·class="w">
2594 </span><span·class="s">&quot;/usr/local/otp/lib/mnesia-4.23&quot;</span></code></pre><p>Returns·<code·class="inline">{error,·bad_name}</code>·if·<code·class="inline">Name</code>·is·not·the·name·of·an·application·under2594 </span><span·class="s">&quot;/usr/local/otp/lib/mnesia-4.23&quot;</span></code></pre><p>Returns·<code·class="inline">{error,·bad_name}</code>·if·<code·class="inline">Name</code>·is·not·the·name·of·an·application·under
2595 <code·class="inline">$OTPROOT/lib</code>·or·on·a·directory·referred·to·through·environment·variable2595 <code·class="inline">$OTPROOT/lib</code>·or·on·a·directory·referred·to·through·environment·variable
2596 <code·class="inline">ERL_LIBS</code>.·Fails·with·an·exception·if·<code·class="inline">Name</code>·has·the·wrong·type.</p><blockquote><h4·class="warning">Warning</h4><p>For·backward·compatibility,·<code·class="inline">Name</code>·is·also·allowed·to·be·a·string.·That·will2596 <code·class="inline">ERL_LIBS</code>.·Fails·with·an·exception·if·<code·class="inline">Name</code>·has·the·wrong·type.</p><blockquote><h4·class="warning">Warning</h4><p>For·backward·compatibility,·<code·class="inline">Name</code>·is·also·allowed·to·be·a·string.·That·will
2597 probably·change·in·a·future·release.</p></blockquote>2597 probably·change·in·a·future·release.</p></blockquote>
2598 ··</section>2598 ··</section>
2599 </section>2599 </section>
2600 <section·class="detail"·id="lib_dir/2">2600 <section·class="detail"·id="lib_dir/2">
Offset 2629, 15 lines modifiedOffset 2629, 15 lines modified
2629 <p>Returns·the·path·to·a·subdirectory·directly·under·the·top·directory·of·an2629 <p>Returns·the·path·to·a·subdirectory·directly·under·the·top·directory·of·an
2630 application.</p><blockquote><h4·class="info">Change</h4><p>This·function·is·part·of·the·archive·support,·which·is·an·experimental2630 application.</p><blockquote><h4·class="info">Change</h4><p>This·function·is·part·of·the·archive·support,·which·is·an·experimental
2631 feature·that·will·be·changed·or·removed·in·a·future·release.</p></blockquote><p>Normally·the·subdirectories·reside·under·the·top·directory·for·the2631 feature·that·will·be·changed·or·removed·in·a·future·release.</p></blockquote><p>Normally·the·subdirectories·reside·under·the·top·directory·for·the
2632 application,·but·when·applications·at·least·partly·reside·in·an·archive,·the2632 application,·but·when·applications·at·least·partly·reside·in·an·archive,·the
2633 situation·is·different.·Some·of·the·subdirectories·can·reside·as·regular2633 situation·is·different.·Some·of·the·subdirectories·can·reside·as·regular
2634 directories·while·others·reside·in·an·archive·file.·It·is·not·checked·whether2634 directories·while·others·reside·in·an·archive·file.·It·is·not·checked·whether
2635 this·directory·exists.</p><p>Instead·of·using·this·function,·use·<a·href="#lib_dir/1"><code·class="inline">code:lib_dir/1</code></a>2635 this·directory·exists.</p><p>Instead·of·using·this·function,·use·<a·href="#lib_dir/1"><code·class="inline">code:lib_dir/1</code></a>
2636 and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/filename.html#join/2"><code·class="inline">filename:join/2</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="3121715693-1">(</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="3121715693-2">(</span><span·class="ss">megaco</span><span·class="p"·data-group-id="3121715693-2">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·112,·SHA:·55d0df74553b253fd9596e5c8f32a8f248b250a2a7bc531c5e56b4f5b0d26c12·...·]3-1">)</span><span·class="p">.</span><span·class="w">2636 and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/filename.html#join/2"><code·class="inline">filename:join/2</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2779749033-1">(</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="2779749033-2">(</span><span·class="ss">megaco</span><span·class="p"·data-group-id="2779749033-2">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·112,·SHA:·c4ebdd5f036bda5614cba7aa8a022405789a437fada704cabf4e8f9d764d1793·...·]3-1">)</span><span·class="p">.</span><span·class="w">
2637 </span><span·class="s">&quot;/usr/local/otp/lib/megaco-3.9.1.1/priv&quot;</span></code></pre><p>Fails·with·an·exception·if·<code·class="inline">Name</code>·or·<code·class="inline">SubDir</code>·has·the·wrong·type.</p>2637 </span><span·class="s">&quot;/usr/local/otp/lib/megaco-3.9.1.1/priv&quot;</span></code></pre><p>Fails·with·an·exception·if·<code·class="inline">Name</code>·or·<code·class="inline">SubDir</code>·has·the·wrong·type.</p>
2638 ··</section>2638 ··</section>
2639 </section>2639 </section>
2640 <section·class="detail"·id="load_abs/1">2640 <section·class="detail"·id="load_abs/1">
  
2641 ··<div·class="detail-header">2641 ··<div·class="detail-header">
2642 ····<a·href="#load_abs/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2642 ····<a·href="#load_abs/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 3088, 15 lines modifiedOffset 3088, 15 lines modified
3088 ······<div·class="specs">3088 ······<div·class="specs">
  
3089 ··········<pre·translate="no"><span·class="attribute">-spec</span>·root_dir()·->·<a·href="file.html#t:filename/0">file:filename</a>().</pre>3089 ··········<pre·translate="no"><span·class="attribute">-spec</span>·root_dir()·->·<a·href="file.html#t:filename/0">file:filename</a>().</pre>
  
3090 ······</div>3090 ······</div>
  
3091 <p>Returns·the·root·directory·of·Erlang/OTP,·which·is·the·directory·where·it·is3091 <p>Returns·the·root·directory·of·Erlang/OTP,·which·is·the·directory·where·it·is
3092 installed.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">root_dir</span><span·class="p"·data-group-id="9946586472-1">(</span><span·class="p"·data-group-id="9946586472-1">)</span><span·class="p">.</span><span·class="w">3092 installed.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">root_dir</span><span·class="p"·data-group-id="9980063573-1">(</span><span·class="p"·data-group-id="9980063573-1">)</span><span·class="p">.</span><span·class="w">
3093 </span><span·class="s">&quot;/usr/local/otp&quot;</span></code></pre>3093 </span><span·class="s">&quot;/usr/local/otp&quot;</span></code></pre>
3094 ··</section>3094 ··</section>
3095 </section>3095 </section>
3096 <section·class="detail"·id="set_coverage_mode/1">3096 <section·class="detail"·id="set_coverage_mode/1">
  
3097 ··<div·class="detail-header">3097 ··<div·class="detail-header">
3098 ····<a·href="#set_coverage_mode/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3098 ····<a·href="#set_coverage_mode/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
5.13 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/config.html
    
Offset 148, 17 lines modifiedOffset 148, 17 lines modified
148 (see·<a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html"><code·class="inline">erts:erl(1)</code></a>).</p><p>The·value·of·a·configuration·parameter·is·retrieved·by·calling148 (see·<a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html"><code·class="inline">erts:erl(1)</code></a>).</p><p>The·value·of·a·configuration·parameter·is·retrieved·by·calling
149 <code·class="inline">application:get_env/1,2</code>.</p><h2·id="file-syntax"·class="section-heading">149 <code·class="inline">application:get_env/1,2</code>.</p><h2·id="file-syntax"·class="section-heading">
150 ··<a·href="#file-syntax"·class="hover-link">150 ··<a·href="#file-syntax"·class="hover-link">
151 ····<i·class="ri-link-m"·aria-hidden="true"></i>151 ····<i·class="ri-link-m"·aria-hidden="true"></i>
152 ··</a>152 ··</a>
153 ··<span·class="text">File·Syntax</span>153 ··<span·class="text">File·Syntax</span>
154 </h2>154 </h2>
155 <p>The·configuration·file·is·to·be·called·<code·class="inline">Name.config</code>,·where·<code·class="inline">Name</code>·is·any·name.</p><p>File·<code·class="inline">.config</code>·contains·a·single·Erlang·term·and·has·the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2768481357-1">[</span><span·class="p"·data-group-id="2768481357-2">{</span><span·class="n">Application1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2768481357-3">[</span><span·class="p"·data-group-id="2768481357-4">[·...·truncated·by·diffoscope;·len:·379,·SHA:·85a1b8df5fb8fac4bf4fc2ae0523940d2c14a2e18e17879b6cc4358248f27c93·...·]-2">}</span><span·class="p">,</span><span·class="w">155 <p>The·configuration·file·is·to·be·called·<code·class="inline">Name.config</code>,·where·<code·class="inline">Name</code>·is·any·name.</p><p>File·<code·class="inline">.config</code>·contains·a·single·Erlang·term·and·has·the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1604440062-1">[</span><span·class="p"·data-group-id="1604440062-2">{</span><span·class="n">Application1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1604440062-3">[</span><span·class="p"·data-group-id="1604440062-4">[·...·truncated·by·diffoscope;·len:·379,·SHA:·20a4e719d13b0893bd380683cc69c64dda9ff7e2e6e5d90dae06aea2206fc32d·...·]-2">}</span><span·class="p">,</span><span·class="w">
156 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">156 ·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
157 ·</span><span·class="p"·data-group-id="2768481357-5">{</span><span·class="n">ApplicationN</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2768481357-6">[</span><span·class="p"·data-group-id="2768481357-7">{</span><span·class="n">ParN1</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·379,·SHA:·16115baebeaf8d045ef6291829874ad3e8d04b6c49ba467093648dac2c1b8b3d·...·]-1">]</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">Application·=·atom()</code></strong>·-·Application·name.</p></li><li><p><strong><code·class="inline">Par·=·atom()</code></strong>·-·Name·of·a·configuration·parameter.</p></li><li><p><strong><code·class="inline">Val·=·term()</code></strong>·-·Value·of·a·configuration·parameter.</p></li></ul><h2·id="sys-config"·class="section-heading">157 ·</span><span·class="p"·data-group-id="1604440062-5">{</span><span·class="n">ApplicationN</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1604440062-6">[</span><span·class="p"·data-group-id="1604440062-7">{</span><span·class="n">ParN1</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·379,·SHA:·01538fbfac09a67bc2194744347c966a9a2d432493c3ce47fa432b143f038dad·...·]-1">]</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">Application·=·atom()</code></strong>·-·Application·name.</p></li><li><p><strong><code·class="inline">Par·=·atom()</code></strong>·-·Name·of·a·configuration·parameter.</p></li><li><p><strong><code·class="inline">Val·=·term()</code></strong>·-·Value·of·a·configuration·parameter.</p></li></ul><h2·id="sys-config"·class="section-heading">
158 ··<a·href="#sys-config"·class="hover-link">158 ··<a·href="#sys-config"·class="hover-link">
159 ····<i·class="ri-link-m"·aria-hidden="true"></i>159 ····<i·class="ri-link-m"·aria-hidden="true"></i>
160 ··</a>160 ··</a>
161 ··<span·class="text">sys.config</span>161 ··<span·class="text">sys.config</span>
162 </h2>162 </h2>
163 <p>When·starting·Erlang·in·embedded·mode,·it·is·assumed·that·exactly·one·system163 <p>When·starting·Erlang·in·embedded·mode,·it·is·assumed·that·exactly·one·system
164 configuration·file·is·used,·named·<code·class="inline">sys.config</code>.·This·file·is·to·be·located·in164 configuration·file·is·used,·named·<code·class="inline">sys.config</code>.·This·file·is·to·be·located·in
12.8 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/eep48_chapter.html
    
Offset 150, 28 lines modifiedOffset 150, 28 lines modified
150 ····<i·class="ri-link-m"·aria-hidden="true"></i>150 ····<i·class="ri-link-m"·aria-hidden="true"></i>
151 ··</a>151 ··</a>
152 ··<span·class="text">The·&quot;Docs&quot;·format</span>152 ··<span·class="text">The·&quot;Docs&quot;·format</span>
153 </h2>153 </h2>
154 <p>In·both·storages,·the·documentation·is·written·in·the·exactly·same·format:·an154 <p>In·both·storages,·the·documentation·is·written·in·the·exactly·same·format:·an
155 Erlang·term·serialized·to·binary·via155 Erlang·term·serialized·to·binary·via
156 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#term_to_binary/1"><code·class="inline">term_to_binary/1</code></a>.·The·term·can·be·optionally156 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#term_to_binary/1"><code·class="inline">term_to_binary/1</code></a>.·The·term·can·be·optionally
157 compressed·when·serialized.·It·must·follow·the·type·specification·below:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5936679004-1">{</span><span·class="ss">docs_v1</span><span·class="p">,</span><span·class="w">157 compressed·when·serialized.·It·must·follow·the·type·specification·below:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7883026662-1">{</span><span·class="ss">docs_v1</span><span·class="p">,</span><span·class="w">
158 ·</span><span·class="n">Anno</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nc">erl_anno</span><span·class="p">:</span><span·class="nf">anno</span><span·class="p"·data-group-id="5936679004-2">(</span><span·class="p"·data-group-id="5936679004-2">)</span><span·class="p">,</span><span·class="w">158 ·</span><span·class="n">Anno</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nc">erl_anno</span><span·class="p">:</span><span·class="nf">anno</span><span·class="p"·data-group-id="7883026662-2">(</span><span·class="p"·data-group-id="7883026662-2">)</span><span·class="p">,</span><span·class="w">
159 ·</span><span·class="n">BeamLanguage</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="5936679004-3">(</span><span·class="p"·data-group-id="5936679004-3">)</span><span·class="p">,</span><span·class="w">159 ·</span><span·class="n">BeamLanguage</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7883026662-3">(</span><span·class="p"·data-group-id="7883026662-3">)</span><span·class="p">,</span><span·class="w">
160 ·</span><span·class="n">Format</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="5936679004-4">(</span><span·class="p"·data-group-id="5936679004-4">)</span><span·class="p">,</span><span·class="w">160 ·</span><span·class="n">Format</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="7883026662-4">(</span><span·class="p"·data-group-id="7883026662-4">)</span><span·class="p">,</span><span·class="w">
161 ·</span><span·class="n">ModuleDoc</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5936679004-5">#{</span><span·class="n">DocLanguage</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">DocValue</span><span·class="p"·data-group-id="5936679004-5">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">hidden</span><span·class="p">,</span><span·class="w">161 ·</span><span·class="n">ModuleDoc</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="7883026662-5">#{</span><span·class="n">DocLanguage</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">DocValue</span><span·class="p"·data-group-id="7883026662-5">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">hidden</span><span·class="p">,</span><span·class="w">
162 ·</span><span·class="n">Metadata</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="5936679004-6">(</span><span·class="p"·data-group-id="5936679004-6">)</span><span·class="p">,</span><span·class="w">162 ·</span><span·class="n">Metadata</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="7883026662-6">(</span><span·class="p"·data-group-id="7883026662-6">)</span><span·class="p">,</span><span·class="w">
163 ·</span><span·class="n">Docs</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">163 ·</span><span·class="n">Docs</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">
164 ···</span><span·class="p"·data-group-id="5936679004-7">[</span><span·class="p"·data-group-id="5936679004-8">{</span><span·class="p"·data-group-id="5936679004-9">{</span><span·class="n">Kind</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·91,·SHA:·0f31329e92bba16c3e4324db811621f099a63b50246aa217dad6e3bca45013f0·...·]-9">}</span><span·class="p">,</span><span·class="w">164 ···</span><span·class="p"·data-group-id="7883026662-7">[</span><span·class="p"·data-group-id="7883026662-8">{</span><span·class="p"·data-group-id="7883026662-9">{</span><span·class="n">Kind</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·91,·SHA:·6024e7e041dec091767042524c6c8b798c12002b42b0596bbfa0ed65b5dfe943·...·]-9">}</span><span·class="p">,</span><span·class="w">
165 ·····</span><span·class="n">Anno</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nc">erl_anno</span><span·class="p">:</span><span·class="nf">anno</span><span·class="p"·data-group-id="5936679004-10">(</span><span·class="p"·data-group-id="5936679004-10">)</span><span·class="p">,</span><span·class="w">165 ·····</span><span·class="n">Anno</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nc">erl_anno</span><span·class="p">:</span><span·class="nf">anno</span><span·class="p"·data-group-id="7883026662-10">(</span><span·class="p"·data-group-id="7883026662-10">)</span><span·class="p">,</span><span·class="w">
166 ·····</span><span·class="n">Signature</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5936679004-11">[</span><span·class="nf">binary</span><span·class="p"·data-group-id="5936679004-12">(</span><span·class="p"·data-group-id="5936679004-12">)</span><span·class="p"·data-group-id="5936679004-11">]</span><span·class="p">,</span><span·class="w">166 ·····</span><span·class="n">Signature</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="7883026662-11">[</span><span·class="nf">binary</span><span·class="p"·data-group-id="7883026662-12">(</span><span·class="p"·data-group-id="7883026662-12">)</span><span·class="p"·data-group-id="7883026662-11">]</span><span·class="p">,</span><span·class="w">
167 ·····</span><span·class="n">Doc</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5936679004-13">#{</span><span·class="n">DocLanguage</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">DocValue</span><span·class="p"·data-group-id="5936679004-13">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">hidden</span><span·class="p">,</span><span·class="w">167 ·····</span><span·class="n">Doc</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="7883026662-13">#{</span><span·class="n">DocLanguage</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">DocValue</span><span·class="p"·data-group-id="7883026662-13">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">hidden</span><span·class="p">,</span><span·class="w">
168 ·····</span><span·class="n">Metadata</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="5936679004-14">(</span><span·class="p"·data-group-id="5936679004-14">)</span><span·class="w">168 ·····</span><span·class="n">Metadata</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">map</span><span·class="p"·data-group-id="7883026662-14">(</span><span·class="p"·data-group-id="7883026662-14">)</span><span·class="w">
169 ····</span><span·class="p"·data-group-id="5936679004-8">}</span><span·class="p"·data-group-id="5936679004-7">]</span><span·class="p"·data-group-id="5936679004-1">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">DocLanguage</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·202,·SHA:·fce406954753fc818c632e6d82a610dcb2df60f69108aac66f3f4e4b717833f4·...·]-15">)</span><span·class="p">,</span><span·class="w">169 ····</span><span·class="p"·data-group-id="7883026662-8">}</span><span·class="p"·data-group-id="7883026662-7">]</span><span·class="p"·data-group-id="7883026662-1">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">DocLanguage</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·202,·SHA:·f246fe4dbce2c151ed45b1b52595f2c098786575d7922d3e48a978b3cd7bddfa·...·]-15">)</span><span·class="p">,</span><span·class="w">
170 ·············</span><span·class="n">DocValue</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="5936679004-16">(</span><span·class="p"·data-group-id="5936679004-16">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="5936679004-17">(</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·37d34d204ae2fc6e9f8d2ee6e71797ecc0431a53de5bd789b6e335453951bc29·...·]-17">)</span></code></pre><p>where·in·the·root·tuple·we·have:</p><ul><li><p><strong><code·class="inline">Anno</code></strong>·-·annotation·(line,·column,·file)·of·the·definition·itself·(see170 ·············</span><span·class="n">DocValue</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="7883026662-16">(</span><span·class="p"·data-group-id="7883026662-16">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="7883026662-17">(</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·38a3f158c960dde9509444563010900bb187577cab1de19b8bd7ae443ab70de1·...·]-17">)</span></code></pre><p>where·in·the·root·tuple·we·have:</p><ul><li><p><strong><code·class="inline">Anno</code></strong>·-·annotation·(line,·column,·file)·of·the·definition·itself·(see
171 <a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_anno.html"><code·class="inline">erl_anno</code></a>)</p></li><li><p><strong><code·class="inline">BeamLanguage</code></strong>·-·an·atom·representing·the·language,·for·example:·<code·class="inline">erlang</code>,171 <a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_anno.html"><code·class="inline">erl_anno</code></a>)</p></li><li><p><strong><code·class="inline">BeamLanguage</code></strong>·-·an·atom·representing·the·language,·for·example:·<code·class="inline">erlang</code>,
172 <code·class="inline">elixir</code>,·<code·class="inline">lfe</code>,·<code·class="inline">alpaca</code>,·and·so·on</p></li><li><p><strong><code·class="inline">Format</code></strong>·-·the·mime·type·of·the·documentation,·such·as·<code·class="inline">&lt;&lt;&quot;text/markdown&quot;&gt;&gt;</code>172 <code·class="inline">elixir</code>,·<code·class="inline">lfe</code>,·<code·class="inline">alpaca</code>,·and·so·on</p></li><li><p><strong><code·class="inline">Format</code></strong>·-·the·mime·type·of·the·documentation,·such·as·<code·class="inline">&lt;&lt;&quot;text/markdown&quot;&gt;&gt;</code>
173 or·<code·class="inline">&lt;&lt;&quot;application/erlang+html&quot;&gt;&gt;</code>.·For·details·of·the·format·used·by·Erlang173 or·<code·class="inline">&lt;&lt;&quot;application/erlang+html&quot;&gt;&gt;</code>.·For·details·of·the·format·used·by·Erlang
174 see·the·<a·href="../../../../lib/edoc-1.3.1/doc/html/doc_storage.html"><code·class="inline">EEP-48·Chapter</code></a>·in·EDoc's·User's174 see·the·<a·href="../../../../lib/edoc-1.3.1/doc/html/doc_storage.html"><code·class="inline">EEP-48·Chapter</code></a>·in·EDoc's·User's
175 Guide.</p></li><li><p><strong><code·class="inline">ModuleDoc</code></strong>·-·a·map·with·the·documentation·language·as·key,·such·as175 Guide.</p></li><li><p><strong><code·class="inline">ModuleDoc</code></strong>·-·a·map·with·the·documentation·language·as·key,·such·as
176 <code·class="inline">&lt;&lt;&quot;en&quot;&gt;&gt;</code>·or·<code·class="inline">&lt;&lt;&quot;pt_BR&quot;&gt;&gt;</code>,·and·the·documentation·as·a·binary·value.·It·can176 <code·class="inline">&lt;&lt;&quot;en&quot;&gt;&gt;</code>·or·<code·class="inline">&lt;&lt;&quot;pt_BR&quot;&gt;&gt;</code>,·and·the·documentation·as·a·binary·value.·It·can
177 be·atom·<code·class="inline">none</code>·if·no·documentation·exists·or·the·atom·<code·class="inline">hidden</code>·if177 be·atom·<code·class="inline">none</code>·if·no·documentation·exists·or·the·atom·<code·class="inline">hidden</code>·if
2.63 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/erl_epmd.html
    
Offset 357, 16 lines modifiedOffset 357, 16 lines modified
357 ···················Reason·::·address·|·<a·href="file.html#t:posix/0">file:posix</a>().</pre>357 ···················Reason·::·address·|·<a·href="file.html#t:posix/0">file:posix</a>().</pre>
  
358 ······</div>358 ······</div>
  
359 <p>Called·by·<a·href="net_adm.html"><code·class="inline">net_adm:names/0</code></a>.·<code·class="inline">Host</code>·defaults·to·the·localhost.359 <p>Called·by·<a·href="net_adm.html"><code·class="inline">net_adm:names/0</code></a>.·<code·class="inline">Host</code>·defaults·to·the·localhost.
360 Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>360 Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>
361 registered·at·the·specified·host.·Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not361 registered·at·the·specified·host.·Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not
362 operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(arne@dunn)1&gt;·</span><span·class="nc">erl_epmd</span><span·class="p">:</span><span·class="nf">names</span><span·class="p"·data-group-id="2170222855-1">(</span><span·class="ss">localhost</span><span·class="p"·data-group-id="2170222855-1">)</span><span·class="p">.</span><span·class="w">362 operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(arne@dunn)1&gt;·</span><span·class="nc">erl_epmd</span><span·class="p">:</span><span·class="nf">names</span><span·class="p"·data-group-id="1433843056-1">(</span><span·class="ss">localhost</span><span·class="p"·data-group-id="1433843056-1">)</span><span·class="p">.</span><span·class="w">
363 </span><span·class="p"·data-group-id="2170222855-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2170222855-3">[</span><span·class="p"·data-group-id="2170222855-4">{</span><span·class="s">&quot;arne&quot;</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·fdcf4e818f1665a6f2f906038fff50cf1e9b6275290a8afe2b26ea7769a688ae·...·]-2">}</span></code></pre>363 </span><span·class="p"·data-group-id="1433843056-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1433843056-3">[</span><span·class="p"·data-group-id="1433843056-4">{</span><span·class="s">&quot;arne&quot;</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·16230e50c5d5b775b196280f25051f0f964d72b908eea56f1c3b3f65493288a0·...·]-2">}</span></code></pre>
364 ··</section>364 ··</section>
365 </section>365 </section>
366 <section·class="detail"·id="port_please/2">366 <section·class="detail"·id="port_please/2">
  
367 ··<div·class="detail-header">367 ··<div·class="detail-header">
368 ····<a·href="#port_please/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">368 ····<a·href="#port_please/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
369 ······<i·class="ri-link-m"·aria-hidden="true"></i>369 ······<i·class="ri-link-m"·aria-hidden="true"></i>
18.1 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/erpc.html
    
Offset 1217, 28 lines modifiedOffset 1217, 28 lines modified
1217 at·the·client·side.</li></ul><p>The·call·<code·class="inline">erpc:multicall(Nodes,·Module,·Function,·Args)</code>·is·equivalent·to·the1217 at·the·client·side.</li></ul><p>The·call·<code·class="inline">erpc:multicall(Nodes,·Module,·Function,·Args)</code>·is·equivalent·to·the
1218 call·<code·class="inline">erpc:multicall(Nodes,·Module,·Function,·Args,·infinity)</code>.·These·calls·are1218 call·<code·class="inline">erpc:multicall(Nodes,·Module,·Function,·Args,·infinity)</code>.·These·calls·are
1219 also·equivalent·to·calling·<code·class="inline">my_multicall(Nodes,·Module,·Function,·Args)</code>·below1219 also·equivalent·to·calling·<code·class="inline">my_multicall(Nodes,·Module,·Function,·Args)</code>·below
1220 if·one·disregard·performance·and·failure·behavior.·<code·class="inline">multicall()</code>·can·utilize·a1220 if·one·disregard·performance·and·failure·behavior.·<code·class="inline">multicall()</code>·can·utilize·a
1221 selective·receive·optimization·which·removes·the·need·to·scan·the·message·queue1221 selective·receive·optimization·which·removes·the·need·to·scan·the·message·queue
1222 from·the·beginning·in·order·to·find·a·matching·message.·The1222 from·the·beginning·in·order·to·find·a·matching·message.·The
1223 <code·class="inline">send_request()/receive_response()</code>·combination·can,·however,·not·utilize·this1223 <code·class="inline">send_request()/receive_response()</code>·combination·can,·however,·not·utilize·this
1224 optimization.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_multicall</span><span·class="p"·data-group-id="9709778327-1">(</span><span·class="n">Nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·65,·SHA:·29f13ea4df69c199350e76ef370360814f0a335d0605ebb1d54963028ed18626·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1224 optimization.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_multicall</span><span·class="p"·data-group-id="9967076466-1">(</span><span·class="n">Nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·65,·SHA:·3ed51d54a0aa2130df30a0cfb68a932a3df8a12feeb09abe009a1e240b97cefc·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1225 ··</span><span·class="n">ReqIds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="9709778327-2">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="9709778327-3">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9709778327-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1225 ··</span><span·class="n">ReqIds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="9967076466-2">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="9967076466-3">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9967076466-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1226 ·······················</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">send_request</span><span·class="p"·data-group-id="9709778327-4">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·64,·SHA:·a48f581491a43a12962822f1c2d21ddf9443a2faa60002ea620e8967fb38054d·...·]-4">)</span><span·class="w">1226 ·······················</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">send_request</span><span·class="p"·data-group-id="9967076466-4">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·64,·SHA:·30dae713659bd5d0dcaf8f98066296f2d157bbfb6f1f78a3018683deaf04527b·...·]-4">)</span><span·class="w">
1227 ·····················</span><span·class="k">end</span><span·class="p">,</span><span·class="w">1227 ·····················</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
1228 ·····················</span><span·class="n">Nodes</span><span·class="p"·data-group-id="9709778327-2">)</span><span·class="p">,</span><span·class="w">1228 ·····················</span><span·class="n">Nodes</span><span·class="p"·data-group-id="9967076466-2">)</span><span·class="p">,</span><span·class="w">
1229 ··</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="9709778327-5">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="9709778327-6">(</span><span·class="n">ReqId</span><span·class="p"·data-group-id="9709778327-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1229 ··</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="9967076466-5">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="9967076466-6">(</span><span·class="n">ReqId</span><span·class="p"·data-group-id="9967076466-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1230 ··············</span><span·class="k">try</span><span·class="w">1230 ··············</span><span·class="k">try</span><span·class="w">
1231 ················</span><span·class="p"·data-group-id="9709778327-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">receive_response</span><span·class="p"·data-group-id="9709778327-8">(</span><span·class="n">[·...·truncated·by·diffoscope;·len:·186,·SHA:·c4158603412beaf04f788bb6e3091ed0c8e9a14f52f3ff815d908d7b34b3d3d1·...·]-7">}</span><span·class="w">1231 ················</span><span·class="p"·data-group-id="9967076466-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">receive_response</span><span·class="p"·data-group-id="9967076466-8">(</span><span·class="n">[·...·truncated·by·diffoscope;·len:·186,·SHA:·0a24a9605bbc32b14b8682bfdd835c0ccd63663e1bec666d0ed40f0dfa6b7eab·...·]-7">}</span><span·class="w">
1232 ··············</span><span·class="k">catch</span><span·class="w">1232 ··············</span><span·class="k">catch</span><span·class="w">
1233 ················</span><span·class="n">Class</span><span·class="p">:</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1233 ················</span><span·class="n">Class</span><span·class="p">:</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1234 ··················</span><span·class="p"·data-group-id="9709778327-9">{</span><span·class="n">Class</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="9709778327-9">}</span><span·class="w">1234 ··················</span><span·class="p"·data-group-id="9967076466-9">{</span><span·class="n">Class</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="9967076466-9">}</span><span·class="w">
1235 ··············</span><span·class="k">end</span><span·class="w">1235 ··············</span><span·class="k">end</span><span·class="w">
1236 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">1236 ············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
1237 ············</span><span·class="n">ReqIds</span><span·class="p"·data-group-id="9709778327-5">)</span><span·class="p">.</span></code></pre><p>If·an·<code·class="inline">erpc</code>·operation·fails,·but·it·is·unknown·if·the·function·is/will·be1237 ············</span><span·class="n">ReqIds</span><span·class="p"·data-group-id="9967076466-5">)</span><span·class="p">.</span></code></pre><p>If·an·<code·class="inline">erpc</code>·operation·fails,·but·it·is·unknown·if·the·function·is/will·be
1238 applied·(that·is,·a·timeout,·connection·loss,·or·an·improper·<code·class="inline">Nodes</code>·list),·the1238 applied·(that·is,·a·timeout,·connection·loss,·or·an·improper·<code·class="inline">Nodes</code>·list),·the
1239 caller·will·not·receive·any·further·information·about·the·result·if/when·the1239 caller·will·not·receive·any·further·information·about·the·result·if/when·the
1240 applied·function·completes.·If·the·applied·function·communicates·with·the1240 applied·function·completes.·If·the·applied·function·communicates·with·the
1241 calling·process,·such·communication·may,·of·course,·reach·the·calling·process.</p><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the1241 calling·process,·such·communication·may,·of·course,·reach·the·calling·process.</p><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the
1242 <code·class="inline">apply()</code>.·It·may·be·the·calling·process·itself,·a·server,·or·a·freshly1242 <code·class="inline">apply()</code>.·It·may·be·the·calling·process·itself,·a·server,·or·a·freshly
1243 spawned·process.</p></blockquote>1243 spawned·process.</p></blockquote>
1244 ··</section>1244 ··</section>
Offset 1388, 17 lines modifiedOffset 1388, 17 lines modified
1388 exception·if/when·an·invalid·<code·class="inline">RequestId</code>·is·detected·or·if·an·invalid·<code·class="inline">Timeout</code>1388 exception·if/when·an·invalid·<code·class="inline">RequestId</code>·is·detected·or·if·an·invalid·<code·class="inline">Timeout</code>
1389 is·passed.</p><p>A·call·to·the·function·<code·class="inline">my_call(Node,·Module,·Function,·Args,·Timeout)</code>·below·is1389 is·passed.</p><p>A·call·to·the·function·<code·class="inline">my_call(Node,·Module,·Function,·Args,·Timeout)</code>·below·is
1390 equivalent·to·the·call1390 equivalent·to·the·call
1391 <a·href="#call/5"><code·class="inline">erpc:call(Node,·Module,·Function,·Args,·Timeout)</code></a>·if·one·disregards1391 <a·href="#call/5"><code·class="inline">erpc:call(Node,·Module,·Function,·Args,·Timeout)</code></a>·if·one·disregards
1392 performance.·<code·class="inline">call()</code>·can·utilize·a·selective·receive·optimization·which·removes1392 performance.·<code·class="inline">call()</code>·can·utilize·a·selective·receive·optimization·which·removes
1393 the·need·to·scan·the·message·queue·from·the·beginning·in·order·to·find·a1393 the·need·to·scan·the·message·queue·from·the·beginning·in·order·to·find·a
1394 matching·message.·The·<code·class="inline">send_request()/receive_response()</code>·combination·can,1394 matching·message.·The·<code·class="inline">send_request()/receive_response()</code>·combination·can,
1395 however,·not·utilize·this·optimization.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_call</span><span·class="p"·data-group-id="3507575412-1">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·143,·SHA:·355d7493c0f50b8a0a6bd9724ba7fc161c1d12af1361de3011cc2280c578ffeb·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1395 however,·not·utilize·this·optimization.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_call</span><span·class="p"·data-group-id="0668874478-1">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·143,·SHA:·882598530a0b8a4e14f3a33156dc5cd86c4bc7daf65ac12f9217587bbf6a9b73·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1396 ··</span><span·class="n">RequestId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">send_request</span><span·class="p"·data-group-id="3507575412-2">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·65,·SHA:·cd252be7ad7d6be4ec9ff90b3ff4d7593408a5e248aecd60472adf367da3b213·...·]-2">)</span><span·class="p">,</span><span·class="w">1396 ··</span><span·class="n">RequestId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">send_request</span><span·class="p"·data-group-id="0668874478-2">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·65,·SHA:·d1cfd1bcb36313bb86858af171fb7ff4ab23a49ba6e82c6d7a46e89d957bdab0·...·]-2">)</span><span·class="p">,</span><span·class="w">
1397 ··</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">receive_response</span><span·class="p"·data-group-id="3507575412-3">(</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Timeout</span><span·class="p"·data-group-id="3507575412-3">)</span><span·class="p">.</span></code></pre><p>If·the·<code·class="inline">erpc</code>·operation·fails,·but·it·is·unknown·if·the·function·is/will·be1397 ··</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">receive_response</span><span·class="p"·data-group-id="0668874478-3">(</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Timeout</span><span·class="p"·data-group-id="0668874478-3">)</span><span·class="p">.</span></code></pre><p>If·the·<code·class="inline">erpc</code>·operation·fails,·but·it·is·unknown·if·the·function·is/will·be
1398 applied·(that·is,·a·timeout,·or·a·connection·loss),·the·caller·will·not·receive1398 applied·(that·is,·a·timeout,·or·a·connection·loss),·the·caller·will·not·receive
1399 any·further·information·about·the·result·if/when·the·applied·function·completes.1399 any·further·information·about·the·result·if/when·the·applied·function·completes.
1400 If·the·applied·function·explicitly·communicates·with·the·calling·process,·such1400 If·the·applied·function·explicitly·communicates·with·the·calling·process,·such
1401 communication·may,·of·course,·reach·the·calling·process.</p>1401 communication·may,·of·course,·reach·the·calling·process.</p>
1402 ··</section>1402 ··</section>
1403 </section>1403 </section>
1404 <section·class="detail"·id="receive_response/3">1404 <section·class="detail"·id="receive_response/3">
Offset 1693, 17 lines modifiedOffset 1693, 17 lines modified
1693 about·to·save·the·request·identifier·in·a·request·identifier·collection,·you·may1693 about·to·save·the·request·identifier·in·a·request·identifier·collection,·you·may
1694 want·to·consider·using·<a·href="#send_request/6"><code·class="inline">send_request/6</code></a>·instead.</p><p>A·call·to·the·function·<code·class="inline">my_call(Node,·Module,·Function,·Args,·Timeout)</code>·below·is1694 want·to·consider·using·<a·href="#send_request/6"><code·class="inline">send_request/6</code></a>·instead.</p><p>A·call·to·the·function·<code·class="inline">my_call(Node,·Module,·Function,·Args,·Timeout)</code>·below·is
1695 equivalent·to·the·call1695 equivalent·to·the·call
1696 <a·href="#call/5"><code·class="inline">erpc:call(Node,·Module,·Function,·Args,·Timeout)</code></a>·if·one·disregards1696 <a·href="#call/5"><code·class="inline">erpc:call(Node,·Module,·Function,·Args,·Timeout)</code></a>·if·one·disregards
1697 performance.·<code·class="inline">call()</code>·can·utilize·a·selective·receive·optimization·which·removes1697 performance.·<code·class="inline">call()</code>·can·utilize·a·selective·receive·optimization·which·removes
1698 the·need·to·scan·the·message·queue·from·the·beginning·in·order·to·find·a1698 the·need·to·scan·the·message·queue·from·the·beginning·in·order·to·find·a
1699 matching·message.·The·<code·class="inline">send_request()/receive_response()</code>·combination·can,1699 matching·message.·The·<code·class="inline">send_request()/receive_response()</code>·combination·can,
1700 however,·not·utilize·this·optimization.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_call</span><span·class="p"·data-group-id="0046754023-1">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·142,·SHA:·f097ab6c82b97d1c77be31b6885533b94e3e444e089a5ed407873b9ba0691a79·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1700 however,·not·utilize·this·optimization.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_call</span><span·class="p"·data-group-id="0327146360-1">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·142,·SHA:·a6cfb35fd7877d1fb35f0de9565bf69b9884f6d614c1caf9c94800b363f3b85a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1701 ··</span><span·class="n">RequestId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">send_request</span><span·class="p"·data-group-id="0046754023-2">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·64,·SHA:·b5ecb0af9fe68869ee7d5bb54594ebb9c30ce6d5d7f6459e24ee154003241bb9·...·]-2">)</span><span·class="p">,</span><span·class="w">1701 ··</span><span·class="n">RequestId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">send_request</span><span·class="p"·data-group-id="0327146360-2">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·64,·SHA:·b1e5f3008e01a130e16f920db2c1a37f147d1b83f68064ce90c127dd873aa594·...·]-2">)</span><span·class="p">,</span><span·class="w">
1702 ··</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">receive_response</span><span·class="p"·data-group-id="0046754023-3">(</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Timeout</span><span·class="p"·data-group-id="0046754023-3">)</span><span·class="p">.</span></code></pre><p>Fails·with·an·<code·class="inline">{erpc,·badarg}</code>·<code·class="inline">error</code>·exception·if:</p><ul><li><code·class="inline">Node</code>·is·not·an·atom.</li><li><code·class="inline">Module</code>·is·not·an·atom.</li><li><code·class="inline">Function</code>·is·not·an·atom.</li><li><code·class="inline">Args</code>·is·not·a·list.·Note·that·the·list·is·not·verified·to·be·a·proper·list1702 ··</span><span·class="nc">erpc</span><span·class="p">:</span><span·class="nf">receive_response</span><span·class="p"·data-group-id="0327146360-3">(</span><span·class="n">RequestId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Timeout</span><span·class="p"·data-group-id="0327146360-3">)</span><span·class="p">.</span></code></pre><p>Fails·with·an·<code·class="inline">{erpc,·badarg}</code>·<code·class="inline">error</code>·exception·if:</p><ul><li><code·class="inline">Node</code>·is·not·an·atom.</li><li><code·class="inline">Module</code>·is·not·an·atom.</li><li><code·class="inline">Function</code>·is·not·an·atom.</li><li><code·class="inline">Args</code>·is·not·a·list.·Note·that·the·list·is·not·verified·to·be·a·proper·list
1703 at·the·client·side.</li></ul><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the1703 at·the·client·side.</li></ul><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the
1704 <code·class="inline">apply()</code>.·It·may·be·a·server,·or·a·freshly·spawned·process.</p></blockquote><p>Equivalent·to1704 <code·class="inline">apply()</code>.·It·may·be·a·server,·or·a·freshly·spawned·process.</p></blockquote><p>Equivalent·to
1705 <a·href="#send_request/6"><code·class="inline">erpc:send_request(Node,·erlang,·apply,·[Fun,[]]),·Label,·RequestIdCollection)</code></a>.</p><p>Fails·with·an·<code·class="inline">{erpc,·badarg}</code>·<code·class="inline">error</code>·exception·if:</p><ul><li><code·class="inline">Node</code>·is·not·an·atom.</li><li><code·class="inline">Fun</code>·is·not·a·fun·of·zero·arity.</li><li><code·class="inline">RequestIdCollection</code>·is·detected·not·to·be·request·identifier·collection.</li></ul><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the1705 <a·href="#send_request/6"><code·class="inline">erpc:send_request(Node,·erlang,·apply,·[Fun,[]]),·Label,·RequestIdCollection)</code></a>.</p><p>Fails·with·an·<code·class="inline">{erpc,·badarg}</code>·<code·class="inline">error</code>·exception·if:</p><ul><li><code·class="inline">Node</code>·is·not·an·atom.</li><li><code·class="inline">Fun</code>·is·not·a·fun·of·zero·arity.</li><li><code·class="inline">RequestIdCollection</code>·is·detected·not·to·be·request·identifier·collection.</li></ul><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the
1706 <code·class="inline">apply()</code>.·It·may·be·a·server,·or·a·freshly·spawned·process.</p></blockquote>1706 <code·class="inline">apply()</code>.·It·may·be·a·server,·or·a·freshly·spawned·process.</p></blockquote>
1707 ··</section>1707 ··</section>
1708 </section>1708 </section>
1709 <section·class="detail"·id="send_request/6">1709 <section·class="detail"·id="send_request/6">
29.9 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/file.html
    
Offset 176, 39 lines modifiedOffset 176, 39 lines modified
176 running·its·file·server·as·slave·to·the·file·server·of·another·node,·and·the176 running·its·file·server·as·slave·to·the·file·server·of·another·node,·and·the
177 other·node·runs·on·some·other·host·machine,·they·can·have·different·file177 other·node·runs·on·some·other·host·machine,·they·can·have·different·file
178 systems.·However,·this·is·seldom·a·problem.</p></blockquote><p><a·href="#open/2"><code·class="inline">open/2</code></a>·can·be·given·the·options·<code·class="inline">delayed_write</code>·and·<code·class="inline">read_ahead</code>·to·turn·on178 systems.·However,·this·is·seldom·a·problem.</p></blockquote><p><a·href="#open/2"><code·class="inline">open/2</code></a>·can·be·given·the·options·<code·class="inline">delayed_write</code>·and·<code·class="inline">read_ahead</code>·to·turn·on
179 caching,·which·will·reduce·the·number·of·operating·system·calls·and·greatly179 caching,·which·will·reduce·the·number·of·operating·system·calls·and·greatly
180 improve·performance·for·small·reads·and·writes.·However,·the·overhead·won't180 improve·performance·for·small·reads·and·writes.·However,·the·overhead·won't
181 disappear·completely·and·it's·best·to·keep·the·number·of·file·operations·to·a181 disappear·completely·and·it's·best·to·keep·the·number·of·file·operations·to·a
182 minimum.·As·a·contrived·example,·the·following·function·writes·4MB·in·2.5182 minimum.·As·a·contrived·example,·the·following·function·writes·4MB·in·2.5
183 seconds·when·tested:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="0892622963-1">(</span><span·class="n">Name</span><span·class="p"·data-group-id="0892622963-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">183 seconds·when·tested:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="6818545201-1">(</span><span·class="n">Name</span><span·class="p"·data-group-id="6818545201-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
184 ····</span><span·class="p"·data-group-id="0892622963-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0892622963-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·612,·SHA:·972c117e3b0c47d2db03107ac28da3c35228206b0749716ec6fabe0013c71341·...·]-3">)</span><span·class="p">,</span><span·class="w">184 ····</span><span·class="p"·data-group-id="6818545201-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="6818545201-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·612,·SHA:·ea48c8f2c01b12fea9cc8662cc6963be2ccbe81e826024909e13ae9fe6b55fe3·...·]-3">)</span><span·class="p">,</span><span·class="w">
185 ····</span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="0892622963-5">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">·</span><span·class="ow">bsl</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="0892[·...·truncated·by·diffoscope;·len:·6,·SHA:·d87561fb614ed9dfb565752153a378ad16987e733fd80bce07c1a96c354e113b·...·]-5">)</span><span·class="p">,</span><span·class="w">185 ····</span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="6818545201-5">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">·</span><span·class="ow">bsl</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="6818[·...·truncated·by·diffoscope;·len:·6,·SHA:·9b224bb193628f7a31a87071ac0f34abde966192581c33c032641675459cd333·...·]-5">)</span><span·class="p">,</span><span·class="w">
186 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="0892622963-6">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="0892622963-6">)</span><span·class="p">.</span><span·class="w">186 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6818545201-6">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="6818545201-6">)</span><span·class="p">.</span><span·class="w">
  
187 </span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="0892622963-7">(</span><span·class="p">_</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="0892622963-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">187 </span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="6818545201-7">(</span><span·class="p">_</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="6818545201-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
188 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">188 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
189 </span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="0892622963-8">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="0892622963-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 </span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="6818545201-8">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="6818545201-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="0892622963-9">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0892622963-9">)</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="6818545201-9">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6818545201-9">)</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="0892622963-10">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="08926229[·...·truncated·by·diffoscope;·len:·2,·SHA:·da4ea2a5506f2693eae190d9360a1f31793c98a1adade51d93533a6f520ace1c·...·]-10">)</span><span·class="p">.</span></code></pre><p>The·following·functionally·equivalent·code·writes·128·bytes·per·call·to191 ····</span><span·class="nf">create_file_slow_1</span><span·class="p"·data-group-id="6818545201-10">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="68185452[·...·truncated·by·diffoscope;·len:·2,·SHA:·938db8c9f82c8cb58d3f3ef4fd250036a48d26a712753d2fde5abd03a85cabf4·...·]-10">)</span><span·class="p">.</span></code></pre><p>The·following·functionally·equivalent·code·writes·128·bytes·per·call·to
192 <a·href="#write/2"><code·class="inline">write/2</code></a>·and·so·does·the·same·work·in·0.08·seconds,·which·is·roughly·30·times192 <a·href="#write/2"><code·class="inline">write/2</code></a>·and·so·does·the·same·work·in·0.08·seconds,·which·is·roughly·30·times
193 faster:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">create_file</span><span·class="p"·data-group-id="1837249028-1">(</span><span·class="n">Name</span><span·class="p"·data-group-id="1837249028-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 faster:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">create_file</span><span·class="p"·data-group-id="0653239642-1">(</span><span·class="n">Name</span><span·class="p"·data-group-id="0653239642-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ····</span><span·class="p"·data-group-id="1837249028-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="1837249028-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·612,·SHA:·852aefd6c032b47b1d9e8b39d66ebe4633d1f83d86492f0ca536bd3d4321de84·...·]-3">)</span><span·class="p">,</span><span·class="w">194 ····</span><span·class="p"·data-group-id="0653239642-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0653239642-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·612,·SHA:·5379f44482aabe190dc04fc840c2b4a10ffa3a95d83d57b7126e458d4f8cdca7·...·]-3">)</span><span·class="p">,</span><span·class="w">
195 ····</span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="1837249028-5">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">·</span><span·class="ow">bsl</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="1837[·...·truncated·by·diffoscope;·len:·6,·SHA:·cbdc7b34a37696293d2e7a59e2ce92d102a4a3c3ab281529155c51f9abd09baf·...·]-5">)</span><span·class="p">,</span><span·class="w">195 ····</span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="0653239642-5">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">·</span><span·class="ow">bsl</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="0653[·...·truncated·by·diffoscope;·len:·6,·SHA:·1a948696bd1cca53fbe6f3a6cc5b6d7516f31aae8966d5083eb4bfad998e5d00·...·]-5">)</span><span·class="p">,</span><span·class="w">
196 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1837249028-6">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="1837249028-6">)</span><span·class="p">,</span><span·class="w">196 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="0653239642-6">(</span><span·class="n">Fd</span><span·class="p"·data-group-id="0653239642-6">)</span><span·class="p">,</span><span·class="w">
197 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">197 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
198 </span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="1837249028-7">(</span><span·class="p">_</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="1837249028-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 </span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="0653239642-7">(</span><span·class="p">_</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="0653239642-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">199 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
200 </span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="1837249028-8">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="1837249028-8">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">128</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 </span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="0653239642-8">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="0653239642-8">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">128</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="1837249028-9">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="p"·data-group-id="1837249028-10">(</span><span·class="mi">128</span>[·...·truncated·by·diffoscope;·len:·227,·SHA:·977f607c0941d45674d64f883be000abfe40a6a7da17dc44c4213c53268b3cf3·...·]-9">)</span><span·class="p">,</span><span·class="w">201 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="0653239642-9">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="p"·data-group-id="0653239642-10">(</span><span·class="mi">128</span>[·...·truncated·by·diffoscope;·len:·227,·SHA:·05e5bd81b00402f44d802e0a08c9851b1ff36208575f88b11dc46f2e09f58d1d·...·]-9">)</span><span·class="p">,</span><span·class="w">
202 ····</span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="1837249028-11">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">128</span><span·class="p"·data-group-id="183724[·...·truncated·by·diffoscope;·len:·4,·SHA:·e74d3069d3a02c342c1f98d5197ebc861d3ecdb9bd0be746e9547ef3ea0ba251·...·]-11">)</span><span·class="p">;</span><span·class="w">202 ····</span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="0653239642-11">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">128</span><span·class="p"·data-group-id="065323[·...·truncated·by·diffoscope;·len:·4,·SHA:·ee2aff0f5389cabab7481e2edaa95f6d16d8b8db99eb3ae5a7ed09facc80ec96·...·]-11">)</span><span·class="p">;</span><span·class="w">
203 </span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="1837249028-12">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="1837249028-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 </span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="0653239642-12">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="0653239642-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="1837249028-13">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="p"·data-group-id="1837249028-14">(</span><span·class="n">M</span><s[·...·truncated·by·diffoscope;·len:·225,·SHA:·1a181459a499fc91c7d55aebb9c9f0729c293857aabfea73dea2a6cb719e1886·...·]-13">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="0653239642-13">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">0</span><span·class="p">:</span><span·class="p"·data-group-id="0653239642-14">(</span><span·class="n">M</span><s[·...·truncated·by·diffoscope;·len:·225,·SHA:·135f97d965a4de82376d742c1b1fdd370db84f353d22418af83ebdd7d405cf3a·...·]-13">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="1837249028-15">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="18372490[·...·truncated·by·diffoscope;·len:·2,·SHA:·59e19706d51d39f66711c2653cd7eb1291c94d9b55eb14bda74ce4dc636d015a·...·]-15">)</span><span·class="p">.</span></code></pre><p>When·writing·data·it's·generally·more·efficient·to·write·a·list·of·binaries205 ····</span><span·class="nf">create_file_1</span><span·class="p"·data-group-id="0653239642-15">(</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="06532396[·...·truncated·by·diffoscope;·len:·2,·SHA:·73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049·...·]-15">)</span><span·class="p">.</span></code></pre><p>When·writing·data·it's·generally·more·efficient·to·write·a·list·of·binaries
206 rather·than·a·list·of·integers.·It·is·not·needed·to·flatten·a·deep·list·before206 rather·than·a·list·of·integers.·It·is·not·needed·to·flatten·a·deep·list·before
207 writing.·On·Unix·hosts,·scatter·output,·which·writes·a·set·of·buffers·in·one207 writing.·On·Unix·hosts,·scatter·output,·which·writes·a·set·of·buffers·in·one
208 operation,·is·used·when·possible.·In·this·way208 operation,·is·used·when·possible.·In·this·way
209 <a·href="#write/2"><code·class="inline">write(FD,·[Bin1,·Bin2·|·Bin3])</code></a>·writes·the·contents·of·the209 <a·href="#write/2"><code·class="inline">write(FD,·[Bin1,·Bin2·|·Bin3])</code></a>·writes·the·contents·of·the
210 binaries·without·copying·the·data·at·all,·except·for·perhaps·deep·down·in·the210 binaries·without·copying·the·data·at·all,·except·for·perhaps·deep·down·in·the
211 operating·system·kernel.</p><blockquote><h4·class="warning">Warning</h4><p>If·an·error·occurs·when·accessing·an·open·file·with·module·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html"><code·class="inline">io</code></a>,·the·process211 operating·system·kernel.</p><blockquote><h4·class="warning">Warning</h4><p>If·an·error·occurs·when·accessing·an·open·file·with·module·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html"><code·class="inline">io</code></a>,·the·process
212 handling·the·file·exits.·The·dead·file·process·can·hang·if·a·process·tries·to212 handling·the·file·exits.·The·dead·file·process·can·hang·if·a·process·tries·to
Offset 1974, 16 lines modifiedOffset 1974, 16 lines modified
1974 ······</div>1974 ······</div>
  
1975 <p>Reads·Erlang·terms,·separated·by·<code·class="inline">.</code>,·from·<code·class="inline">Filename</code>.·Returns·one·of·the1975 <p>Reads·Erlang·terms,·separated·by·<code·class="inline">.</code>,·from·<code·class="inline">Filename</code>.·Returns·one·of·the
1976 following:</p><ul><li><p><strong><code·class="inline">{ok,·Terms}</code></strong>·-·The·file·was·successfully·read.</p></li><li><p><strong><code·class="inline">{error,·atom()}</code></strong>·-·An·error·occurred·when·opening·the·file·or·reading·it.1976 following:</p><ul><li><p><strong><code·class="inline">{ok,·Terms}</code></strong>·-·The·file·was·successfully·read.</p></li><li><p><strong><code·class="inline">{error,·atom()}</code></strong>·-·An·error·occurred·when·opening·the·file·or·reading·it.
1977 For·a·list·of·typical·error·codes,·see·<a·href="#open/2"><code·class="inline">open/2</code></a>.</p></li><li><p><strong><code·class="inline">{error,·{Line,·Mod,·Term}}</code></strong>·-·An·error·occurred·when·interpreting·the1977 For·a·list·of·typical·error·codes,·see·<a·href="#open/2"><code·class="inline">open/2</code></a>.</p></li><li><p><strong><code·class="inline">{error,·{Line,·Mod,·Term}}</code></strong>·-·An·error·occurred·when·interpreting·the
1978 Erlang·terms·in·the·file.·To·convert·the·three-element·tuple·to·an·English1978 Erlang·terms·in·the·file.·To·convert·the·three-element·tuple·to·an·English
1979 description·of·the·error,·use·<a·href="#format_error/1"><code·class="inline">format_error/1</code></a>.</p></li></ul><p><em>Example:</em></p><pre><code·class="text">f.txt:··{person,·&quot;kalle&quot;,·25}.1979 description·of·the·error,·use·<a·href="#format_error/1"><code·class="inline">format_error/1</code></a>.</p></li></ul><p><em>Example:</em></p><pre><code·class="text">f.txt:··{person,·&quot;kalle&quot;,·25}.
1980 ········{person,·&quot;pelle&quot;,·30}.</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">consult</span><span·class="p"·data-group-id="7761358079-1">(</span><span·class="s">&quot;f.txt&quot;</span><span·class="p"·data-group-id="7761358079-1">)</span><span·class="p">.</span><span·class="w">1980 ········{person,·&quot;pelle&quot;,·30}.</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">consult</span><span·class="p"·data-group-id="4299806357-1">(</span><span·class="s">&quot;f.txt&quot;</span><span·class="p"·data-group-id="4299806357-1">)</span><span·class="p">.</span><span·class="w">
1981 </span><span·class="p"·data-group-id="7761358079-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7761358079-3">[</span><span·class="p"·data-group-id="7761358079-4">{</span><span·class="ss">person</span><span·class="p">,</span><span·class="s">&quot;ka[·...·truncated·by·diffoscope;·len:·487,·SHA:·b49634eb2a3bfc2ade751650dbd2736bb32ac059dc5fde7f7e8b25639d0083a4·...·]-2">}</span></code></pre><p>The·encoding·of·<code·class="inline">Filename</code>·can·be·set·by·a·comment,·as·described·in1981 </span><span·class="p"·data-group-id="4299806357-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4299806357-3">[</span><span·class="p"·data-group-id="4299806357-4">{</span><span·class="ss">person</span><span·class="p">,</span><span·class="s">&quot;ka[·...·truncated·by·diffoscope;·len:·487,·SHA:·c9866d621e38a71ce62aae783d3cd0a1e7a8ecd10081b56ec10789c4f395b3ba·...·]-2">}</span></code></pre><p>The·encoding·of·<code·class="inline">Filename</code>·can·be·set·by·a·comment,·as·described·in
1982 <a·href="../../../../lib/stdlib-6.0.1/doc/html/epp.html#encoding"><code·class="inline">epp</code></a>.</p>1982 <a·href="../../../../lib/stdlib-6.0.1/doc/html/epp.html#encoding"><code·class="inline">epp</code></a>.</p>
1983 ··</section>1983 ··</section>
1984 </section>1984 </section>
1985 <section·class="detail"·id="copy/2">1985 <section·class="detail"·id="copy/2">
  
1986 ··<div·class="detail-header">1986 ··<div·class="detail-header">
1987 ····<a·href="#copy/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1987 ····<a·href="#copy/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 3332, 15 lines modifiedOffset 3332, 15 lines modified
3332 ····························FileInfo·::·<a·href="#t:file_info/0">file_info</a>(),3332 ····························FileInfo·::·<a·href="#t:file_info/0">file_info</a>(),
3333 ····························Reason·::·<a·href="#t:posix/0">posix</a>()·|·badarg.</pre>3333 ····························Reason·::·<a·href="#t:posix/0">posix</a>()·|·badarg.</pre>
  
3334 ······</div>3334 ······</div>
  
3335 <p>Retrieves·information·about·a·file.·Returns·<code·class="inline">{ok,·FileInfo}</code>·if·successful,3335 <p>Retrieves·information·about·a·file.·Returns·<code·class="inline">{ok,·FileInfo}</code>·if·successful,
3336 otherwise·<code·class="inline">{error,·Reason}</code>.</p><p><code·class="inline">FileInfo</code>·is·a·record·<code·class="inline">file_info</code>,·defined·in·the·Kernel·include·file·<code·class="inline">file.hrl</code>.3336 otherwise·<code·class="inline">{error,·Reason}</code>.</p><p><code·class="inline">FileInfo</code>·is·a·record·<code·class="inline">file_info</code>,·defined·in·the·Kernel·include·file·<code·class="inline">file.hrl</code>.
3337 Include·the·following·directive·in·the·module·from·which·the·function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="3139911782-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="3139911782-1">)</span><span·class="p">.</span></code></pre><p>The·time·type·returned·in·<code·class="inline">atime</code>,·<code·class="inline">mtime</code>,·and·<code·class="inline">ctime</code>·is·dependent·on·the·time3337 Include·the·following·directive·in·the·module·from·which·the·function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="3272514983-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="3272514983-1">)</span><span·class="p">.</span></code></pre><p>The·time·type·returned·in·<code·class="inline">atime</code>,·<code·class="inline">mtime</code>,·and·<code·class="inline">ctime</code>·is·dependent·on·the·time
3338 type·set·in·<code·class="inline">Opts·::·{time,·Type}</code>·as·follows:</p><ul><li><p><strong><code·class="inline">local</code></strong>·-·Returns·local·time.</p></li><li><p><strong><code·class="inline">universal</code></strong>·-·Returns·universal·time.</p></li><li><p><strong><code·class="inline">posix</code></strong>·-·Returns·seconds·since·or·before·Unix·time·epoch,·which·is3338 type·set·in·<code·class="inline">Opts·::·{time,·Type}</code>·as·follows:</p><ul><li><p><strong><code·class="inline">local</code></strong>·-·Returns·local·time.</p></li><li><p><strong><code·class="inline">universal</code></strong>·-·Returns·universal·time.</p></li><li><p><strong><code·class="inline">posix</code></strong>·-·Returns·seconds·since·or·before·Unix·time·epoch,·which·is
3339 1970-01-01·00:00·UTC.</p></li></ul><p>Default·is·<code·class="inline">{time,·local}</code>.</p><p>If·the·option·<code·class="inline">raw</code>·is·set,·the·file·server·is·not·called·and·only·information3339 1970-01-01·00:00·UTC.</p></li></ul><p>Default·is·<code·class="inline">{time,·local}</code>.</p><p>If·the·option·<code·class="inline">raw</code>·is·set,·the·file·server·is·not·called·and·only·information
3340 about·local·files·is·returned.·Note·that·this·will·break·this·module's·atomicity3340 about·local·files·is·returned.·Note·that·this·will·break·this·module's·atomicity
3341 guarantees·as·it·can·race·with·a·concurrent·call·to3341 guarantees·as·it·can·race·with·a·concurrent·call·to
3342 <a·href="#write_file_info/2"><code·class="inline">write_file_info/1,2</code>·</a>.</p><p>This·option·has·no·effect·when·the·function·is·given·an·I/O·device·instead·of·a3342 <a·href="#write_file_info/2"><code·class="inline">write_file_info/1,2</code>·</a>.</p><p>This·option·has·no·effect·when·the·function·is·given·an·I/O·device·instead·of·a
3343 file·name.·Use·<a·href="#open/2"><code·class="inline">open/2</code></a>·with·the·<code·class="inline">raw</code>·mode·to·obtain·a·file·descriptor·first.</p><blockquote><h4·class="info">Note</h4><p>As·file·times·are·stored·in·POSIX·time·on·most·OS,·it·is·faster·to·query·file3343 file·name.·Use·<a·href="#open/2"><code·class="inline">open/2</code></a>·with·the·<code·class="inline">raw</code>·mode·to·obtain·a·file·descriptor·first.</p><blockquote><h4·class="info">Note</h4><p>As·file·times·are·stored·in·POSIX·time·on·most·OS,·it·is·faster·to·query·file
3344 information·with·option·<code·class="inline">posix</code>.</p></blockquote><p>The·record·<code·class="inline">file_info</code>·contains·the·following·fields:</p><ul><li><p><strong><code·class="inline">size·=</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·Size·of·file·in·bytes.</p></li><li><p><strong><code·class="inline">type·=·device·|·directory·|·other·|·regular</code></strong>·-·The·type·of·the·file.·Can3344 information·with·option·<code·class="inline">posix</code>.</p></blockquote><p>The·record·<code·class="inline">file_info</code>·contains·the·following·fields:</p><ul><li><p><strong><code·class="inline">size·=</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·Size·of·file·in·bytes.</p></li><li><p><strong><code·class="inline">type·=·device·|·directory·|·other·|·regular</code></strong>·-·The·type·of·the·file.·Can
Offset 4022, 15 lines modifiedOffset 4022, 15 lines modified
4022 ·····························Reason·::·<a·href="#t:posix/0">posix</a>()·|·badarg.</pre>4022 ·····························Reason·::·<a·href="#t:posix/0">posix</a>()·|·badarg.</pre>
  
4023 ······</div>4023 ······</div>
  
4024 <p>Changes·file·information.·Returns·<code·class="inline">ok</code>·if·successful,·otherwise4024 <p>Changes·file·information.·Returns·<code·class="inline">ok</code>·if·successful,·otherwise
4025 <code·class="inline">{error,·Reason}</code>.</p><p><code·class="inline">FileInfo</code>·is·a·record·<code·class="inline">file_info</code>,·defined·in·the·Kernel4025 <code·class="inline">{error,·Reason}</code>.</p><p><code·class="inline">FileInfo</code>·is·a·record·<code·class="inline">file_info</code>,·defined·in·the·Kernel
4026 include·file·<code·class="inline">file.hrl</code>.·Include·the·following·directive·in·the·module·from4026 include·file·<code·class="inline">file.hrl</code>.·Include·the·following·directive·in·the·module·from
4027 which·the·function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2776370686-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="2776370686-1">)</span><span·class="p">.</span></code></pre><p>The·time·type·set·in·<code·class="inline">atime</code>,·<code·class="inline">mtime</code>,·and·<code·class="inline">ctime</code>·depends·on·the·time·type·set4027 which·the·function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="1419148266-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="1419148266-1">)</span><span·class="p">.</span></code></pre><p>The·time·type·set·in·<code·class="inline">atime</code>,·<code·class="inline">mtime</code>,·and·<code·class="inline">ctime</code>·depends·on·the·time·type·set
4028 in·<code·class="inline">Opts·::·{time,·Type}</code>·as·follows:</p><ul><li><p><strong><code·class="inline">local</code></strong>·-·Interprets·the·time·set·as·local.</p></li><li><p><strong><code·class="inline">universal</code></strong>·-·Interprets·it·as·universal·time.</p></li><li><p><strong><code·class="inline">posix</code></strong>·-·Must·be·seconds·since·or·before·Unix·time·epoch,·which·is4028 in·<code·class="inline">Opts·::·{time,·Type}</code>·as·follows:</p><ul><li><p><strong><code·class="inline">local</code></strong>·-·Interprets·the·time·set·as·local.</p></li><li><p><strong><code·class="inline">universal</code></strong>·-·Interprets·it·as·universal·time.</p></li><li><p><strong><code·class="inline">posix</code></strong>·-·Must·be·seconds·since·or·before·Unix·time·epoch,·which·is
4029 1970-01-01·00:00·UTC.</p></li></ul><p>Default·is·<code·class="inline">{time,·local}</code>.</p><p>If·the·option·<code·class="inline">raw</code>·is·set,·the·file·server·is·not·called·and·only·information4029 1970-01-01·00:00·UTC.</p></li></ul><p>Default·is·<code·class="inline">{time,·local}</code>.</p><p>If·the·option·<code·class="inline">raw</code>·is·set,·the·file·server·is·not·called·and·only·information
4030 about·local·files·is·returned.</p><p>The·following·fields·are·used·from·the·record,·if·they·are·specified:</p><ul><li><p><strong><code·class="inline">atime·=</code>·<a·href="#t:date_time/0"><code·class="inline">date_time/0</code></a>·<code·class="inline">|</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·The·last·time·the·file·was4030 about·local·files·is·returned.</p><p>The·following·fields·are·used·from·the·record,·if·they·are·specified:</p><ul><li><p><strong><code·class="inline">atime·=</code>·<a·href="#t:date_time/0"><code·class="inline">date_time/0</code></a>·<code·class="inline">|</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·The·last·time·the·file·was
4031 read.</p></li><li><p><strong><code·class="inline">mtime·=</code>·<a·href="#t:date_time/0"><code·class="inline">date_time/0</code></a>·<code·class="inline">|</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·The·last·time·the·file·was4031 read.</p></li><li><p><strong><code·class="inline">mtime·=</code>·<a·href="#t:date_time/0"><code·class="inline">date_time/0</code></a>·<code·class="inline">|</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·The·last·time·the·file·was
4032 written.</p></li><li><p><strong><code·class="inline">ctime·=</code>·<a·href="#t:date_time/0"><code·class="inline">date_time/0</code></a>·<code·class="inline">|</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·On·Unix,·any·value4032 written.</p></li><li><p><strong><code·class="inline">ctime·=</code>·<a·href="#t:date_time/0"><code·class="inline">date_time/0</code></a>·<code·class="inline">|</code>·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0"><code·class="inline">non_neg_integer/0</code></a></strong>·-·On·Unix,·any·value
4033 specified·for·this·field·is·ignored·(the·&quot;ctime&quot;·for·the·file·is·set·to·the4033 specified·for·this·field·is·ignored·(the·&quot;ctime&quot;·for·the·file·is·set·to·the
4034 current·time).·On·Windows,·this·field·is·the·new·creation·time·to·set·for·the4034 current·time).·On·Windows,·this·field·is·the·new·creation·time·to·set·for·the
168 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/gen_sctp.html
    
Offset 132, 15 lines modifiedOffset 132, 15 lines modified
132 The·implementation·assumes·that·the·OS·kernel·supports·SCTP132 The·implementation·assumes·that·the·OS·kernel·supports·SCTP
133 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">(RFC·2960)</a>133 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">(RFC·2960)</a>
134 through·the·user-level134 through·the·user-level
135 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions</a>.</p><p>During·development,·this·implementation·was·tested·on:</p><ul><li>Linux·Fedora·Core·5.0·(kernel·2.6.15-2054·or·later·is·needed)</li><li>Solaris·10,·11</li></ul><p>During·OTP·adaptation·it·was·tested·on:</p><ul><li>SUSE·Linux·Enterprise·Server·10·(x86_64)·kernel·2.6.16.27-0.6-smp,·with135 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions</a>.</p><p>During·development,·this·implementation·was·tested·on:</p><ul><li>Linux·Fedora·Core·5.0·(kernel·2.6.15-2054·or·later·is·needed)</li><li>Solaris·10,·11</li></ul><p>During·OTP·adaptation·it·was·tested·on:</p><ul><li>SUSE·Linux·Enterprise·Server·10·(x86_64)·kernel·2.6.16.27-0.6-smp,·with
136 lksctp-tools-1.0.6</li><li>Briefly·on·Solaris·10</li><li>SUSE·Linux·Enterprise·Server·10·Service·Pack·1·(x86_64)·kernel136 lksctp-tools-1.0.6</li><li>Briefly·on·Solaris·10</li><li>SUSE·Linux·Enterprise·Server·10·Service·Pack·1·(x86_64)·kernel
137 2.6.16.54-0.2.3-smp·with·lksctp-tools-1.0.7</li><li>FreeBSD·8.2</li></ul><p>This·module·was·written·for·one-to-many·style·sockets·(type·<code·class="inline">seqpacket</code>).137 2.6.16.54-0.2.3-smp·with·lksctp-tools-1.0.7</li><li>FreeBSD·8.2</li></ul><p>This·module·was·written·for·one-to-many·style·sockets·(type·<code·class="inline">seqpacket</code>).
138 With·the·addition·of·<a·href="#peeloff/2"><code·class="inline">peeloff/2</code></a>,·one-to-one·style·sockets·(type·<code·class="inline">stream</code>)138 With·the·addition·of·<a·href="#peeloff/2"><code·class="inline">peeloff/2</code></a>,·one-to-one·style·sockets·(type·<code·class="inline">stream</code>)
139 were·introduced.</p><p>Record·definitions·for·this·module·can·be·found·using:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2802202587-1">(</span><span·class="s">&quot;kernel/include/inet_sctp.hrl&quot;</span><span·class="p"·data-group-id="2802202587-1">)</span><span·class="p">.</span></code></pre><p>These·record·definitions·use·the·&quot;new&quot;·spelling·'adaptation',139 were·introduced.</p><p>Record·definitions·for·this·module·can·be·found·using:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="3859979146-1">(</span><span·class="s">&quot;kernel/include/inet_sctp.hrl&quot;</span><span·class="p"·data-group-id="3859979146-1">)</span><span·class="p">.</span></code></pre><p>These·record·definitions·use·the·&quot;new&quot;·spelling·'adaptation',
140 not·the·deprecated·'adaption',·regardless·of·which·spelling140 not·the·deprecated·'adaption',·regardless·of·which·spelling
141 the·underlying·C·API·uses.</p><h2·id="module-sctp-socket-options"·class="section-heading">141 the·underlying·C·API·uses.</p><h2·id="module-sctp-socket-options"·class="section-heading">
142 ··<a·href="#module-sctp-socket-options"·class="hover-link">142 ··<a·href="#module-sctp-socket-options"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
144 ··</a>144 ··</a>
145 ··<span·class="text"><a·href=""·id="options"></a>·SCTP·Socket·Options</span>145 ··<span·class="text"><a·href=""·id="options"></a>·SCTP·Socket·Options</span>
146 </h2>146 </h2>
Offset 177, 39 lines modifiedOffset 177, 39 lines modified
177 (can·be·required·for·some·types·of·servers).</p></li><li><p><strong><code·class="inline">{sndbuf, integer()}</code></strong>·-·The·size,·in·bytes,·of·the·OS·kernel·send·buffer177 (can·be·required·for·some·types·of·servers).</p></li><li><p><strong><code·class="inline">{sndbuf, integer()}</code></strong>·-·The·size,·in·bytes,·of·the·OS·kernel·send·buffer
178 for·this·socket.·Sending·errors·would·occur·for·datagrams·larger·than178 for·this·socket.·Sending·errors·would·occur·for·datagrams·larger·than
179 <code·class="inline">val(sndbuf)</code>.·Setting·this·option·also·adjusts·the·size·of179 <code·class="inline">val(sndbuf)</code>.·Setting·this·option·also·adjusts·the·size·of
180 the·driver·buffer·(see·<code·class="inline">buffer</code>·above).</p></li><li><p><strong><code·class="inline">{recbuf, integer()}</code></strong>·-·The·size,·in·bytes,·of·the·OS·kernel·receive180 the·driver·buffer·(see·<code·class="inline">buffer</code>·above).</p></li><li><p><strong><code·class="inline">{recbuf, integer()}</code></strong>·-·The·size,·in·bytes,·of·the·OS·kernel·receive
181 buffer·for·this·socket.·Sending·errors·would·occur·for·datagrams181 buffer·for·this·socket.·Sending·errors·would·occur·for·datagrams
182 larger·than·<code·class="inline">val(recbuf)</code>.·Setting·this·option·also·adjusts·the·size182 larger·than·<code·class="inline">val(recbuf)</code>.·Setting·this·option·also·adjusts·the·size
183 of·the·driver·buffer·(see·<code·class="inline">buffer</code>·above).</p></li><li><p><strong><code·class="inline">{sctp_module, module()}</code></strong>·-·Overrides·which·callback·module·is·used.183 of·the·driver·buffer·(see·<code·class="inline">buffer</code>·above).</p></li><li><p><strong><code·class="inline">{sctp_module, module()}</code></strong>·-·Overrides·which·callback·module·is·used.
184 Defaults·to·<code·class="inline">inet_sctp</code>·for·IPv4·and·<code·class="inline">inet6_sctp</code>·for·IPv6.</p></li><li><p><strong><code·class="inline">{sctp_rtoinfo, #sctp_rtoinfo{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_rtoinfo</span><span·class="p"·data-group-id="9496166675-1">{</span><span·class="w">184 Defaults·to·<code·class="inline">inet_sctp</code>·for·IPv4·and·<code·class="inline">inet6_sctp</code>·for·IPv6.</p></li><li><p><strong><code·class="inline">{sctp_rtoinfo, #sctp_rtoinfo{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_rtoinfo</span><span·class="p"·data-group-id="4767377253-1">{</span><span·class="w">
185 ······</span><span·class="ss">assoc_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="9496166675-2">(</span><span·class="p"·data-group-id="9496166675-2">)</span><span·class="p">,</span><span·class="w">185 ······</span><span·class="ss">assoc_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="4767377253-2">(</span><span·class="p"·data-group-id="4767377253-2">)</span><span·class="p">,</span><span·class="w">
186 ······</span><span·class="ss">initial</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="9496166675-3">(</span><span·class="p"·data-group-id="9496166675-3">)</span><span·class="p">,</span><span·class="w">186 ······</span><span·class="ss">initial</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4767377253-3">(</span><span·class="p"·data-group-id="4767377253-3">)</span><span·class="p">,</span><span·class="w">
187 ······</span><span·class="ss">max</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="9496166675-4">(</span><span·class="p"·data-group-id="9496166675-4">)</span><span·class="p">,</span><span·class="w">187 ······</span><span·class="ss">max</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4767377253-4">(</span><span·class="p"·data-group-id="4767377253-4">)</span><span·class="p">,</span><span·class="w">
188 ······</span><span·class="ss">min</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="9496166675-5">(</span><span·class="p"·data-group-id="9496166675-5">)</span><span·class="w">188 ······</span><span·class="ss">min</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4767377253-5">(</span><span·class="p"·data-group-id="4767377253-5">)</span><span·class="w">
189 </span><span·class="p"·data-group-id="9496166675-1">}</span></code></pre><p>Determines·retransmission·time-out·parameters,·in·milliseconds,·for·the189 </span><span·class="p"·data-group-id="4767377253-1">}</span></code></pre><p>Determines·retransmission·time-out·parameters,·in·milliseconds,·for·the
190 association(s)·specified·by·<code·class="inline">assoc_id</code>.</p><p><code·class="inline">assoc_id = 0</code>·(default)·indicates·the·whole·endpoint.·See190 association(s)·specified·by·<code·class="inline">assoc_id</code>.</p><p><code·class="inline">assoc_id = 0</code>·(default)·indicates·the·whole·endpoint.·See
191 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">RFC·2960</a>·and191 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">RFC·2960</a>·and
192 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>192 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>
193 for·the·exact·semantics·of·the·field·values.</p></li><li><p><strong><code·class="inline">{sctp_associnfo, #sctp_assocparams{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_assocparams</span><span·class="p"·data-group-id="1431487120-1">{</span><span·class="w">193 for·the·exact·semantics·of·the·field·values.</p></li><li><p><strong><code·class="inline">{sctp_associnfo, #sctp_assocparams{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_assocparams</span><span·class="p"·data-group-id="8704795826-1">{</span><span·class="w">
194 ······</span><span·class="ss">assoc_id</span><span·class="w">·················</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="1431487120-2">(</span><span·class="p"·data-group-id="1431487120-2">)</span><span·class="p">,</span><span·class="w">194 ······</span><span·class="ss">assoc_id</span><span·class="w">·················</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="8704795826-2">(</span><span·class="p"·data-group-id="8704795826-2">)</span><span·class="p">,</span><span·class="w">
195 ······</span><span·class="ss">asocmaxrxt</span><span·class="w">···············</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1431487120-3">(</span><span·class="p"·data-group-id="1431487120-3">)</span><span·class="p">,</span><span·class="w">195 ······</span><span·class="ss">asocmaxrxt</span><span·class="w">···············</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8704795826-3">(</span><span·class="p"·data-group-id="8704795826-3">)</span><span·class="p">,</span><span·class="w">
196 ······</span><span·class="ss">number_peer_destinations</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1431487120-4">(</span><span·class="p"·data-group-id="1431487120-4">)</span><span·class="p">,</span><span·class="w">196 ······</span><span·class="ss">number_peer_destinations</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8704795826-4">(</span><span·class="p"·data-group-id="8704795826-4">)</span><span·class="p">,</span><span·class="w">
197 ······</span><span·class="ss">peer_rwnd</span><span·class="w">················</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1431487120-5">(</span><span·class="p"·data-group-id="1431487120-5">)</span><span·class="p">,</span><span·class="w">197 ······</span><span·class="ss">peer_rwnd</span><span·class="w">················</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8704795826-5">(</span><span·class="p"·data-group-id="8704795826-5">)</span><span·class="p">,</span><span·class="w">
198 ······</span><span·class="ss">local_rwnd</span><span·class="w">···············</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1431487120-6">(</span><span·class="p"·data-group-id="1431487120-6">)</span><span·class="p">,</span><span·class="w">198 ······</span><span·class="ss">local_rwnd</span><span·class="w">···············</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8704795826-6">(</span><span·class="p"·data-group-id="8704795826-6">)</span><span·class="p">,</span><span·class="w">
199 ······</span><span·class="ss">cookie_life</span><span·class="w">··············</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1431487120-7">(</span><span·class="p"·data-group-id="1431487120-7">)</span><span·class="w">199 ······</span><span·class="ss">cookie_life</span><span·class="w">··············</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="8704795826-7">(</span><span·class="p"·data-group-id="8704795826-7">)</span><span·class="w">
200 </span><span·class="p"·data-group-id="1431487120-1">}</span></code></pre><p>Determines·association·parameters·for·the·association(s)·specified·by200 </span><span·class="p"·data-group-id="8704795826-1">}</span></code></pre><p>Determines·association·parameters·for·the·association(s)·specified·by
201 <code·class="inline">assoc_id</code>.</p><p><code·class="inline">assoc_id = 0</code>·(default)·indicates·the·whole·endpoint.·See201 <code·class="inline">assoc_id</code>.</p><p><code·class="inline">assoc_id = 0</code>·(default)·indicates·the·whole·endpoint.·See
202 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>202 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>
203 for·the·discussion·of·their·semantics.·Rarely·used.</p></li><li><p><strong><code·class="inline">{sctp_initmsg, #sctp_initmsg{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_initmsg</span><span·class="p"·data-group-id="5942762734-1">{</span><span·class="w">203 for·the·discussion·of·their·semantics.·Rarely·used.</p></li><li><p><strong><code·class="inline">{sctp_initmsg, #sctp_initmsg{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_initmsg</span><span·class="p"·data-group-id="2582892579-1">{</span><span·class="w">
204 ·····</span><span·class="ss">num_ostreams</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5942762734-2">(</span><span·class="p"·data-group-id="5942762734-2">)</span><span·class="p">,</span><span·class="w">204 ·····</span><span·class="ss">num_ostreams</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2582892579-2">(</span><span·class="p"·data-group-id="2582892579-2">)</span><span·class="p">,</span><span·class="w">
205 ·····</span><span·class="ss">max_instreams</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5942762734-3">(</span><span·class="p"·data-group-id="5942762734-3">)</span><span·class="p">,</span><span·class="w">205 ·····</span><span·class="ss">max_instreams</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2582892579-3">(</span><span·class="p"·data-group-id="2582892579-3">)</span><span·class="p">,</span><span·class="w">
206 ·····</span><span·class="ss">max_attempts</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5942762734-4">(</span><span·class="p"·data-group-id="5942762734-4">)</span><span·class="p">,</span><span·class="w">206 ·····</span><span·class="ss">max_attempts</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2582892579-4">(</span><span·class="p"·data-group-id="2582892579-4">)</span><span·class="p">,</span><span·class="w">
207 ·····</span><span·class="ss">max_init_timeo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5942762734-5">(</span><span·class="p"·data-group-id="5942762734-5">)</span><span·class="w">207 ·····</span><span·class="ss">max_init_timeo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2582892579-5">(</span><span·class="p"·data-group-id="2582892579-5">)</span><span·class="w">
208 </span><span·class="p"·data-group-id="5942762734-1">}</span></code></pre><p>Determines·the·default·parameters·that·this·socket·tries·to·negotiate208 </span><span·class="p"·data-group-id="2582892579-1">}</span></code></pre><p>Determines·the·default·parameters·that·this·socket·tries·to·negotiate
209 with·its·peer·while·establishing·an·association·with·it.·Is·to·be·set·after209 with·its·peer·while·establishing·an·association·with·it.·Is·to·be·set·after
210 <a·href="#open/1"><code·class="inline">open/*</code></a>·but·before·the·first·<a·href="#connect/4"><code·class="inline">connect/*</code></a>.210 <a·href="#open/1"><code·class="inline">open/*</code></a>·but·before·the·first·<a·href="#connect/4"><code·class="inline">connect/*</code></a>.
211 <code·class="inline">#sctp_initmsg{}</code>·can·also·be·used·as·ancillary·data·with·the·first·call·of211 <code·class="inline">#sctp_initmsg{}</code>·can·also·be·used·as·ancillary·data·with·the·first·call·of
212 <a·href="#send/3"><code·class="inline">send/*</code></a>·to·a·new·peer·(when·a·new·association·is·created).</p><ul><li><p><strong><code·class="inline">num_ostreams</code></strong>·-·Number·of·outbound·streams</p></li><li><p><strong><code·class="inline">max_instreams</code></strong>·-·Maximum·number·of·inbound·streams</p></li><li><p><strong><code·class="inline">max_attempts</code></strong>·-·Maximum·retransmissions·while·establishing·an212 <a·href="#send/3"><code·class="inline">send/*</code></a>·to·a·new·peer·(when·a·new·association·is·created).</p><ul><li><p><strong><code·class="inline">num_ostreams</code></strong>·-·Number·of·outbound·streams</p></li><li><p><strong><code·class="inline">max_instreams</code></strong>·-·Maximum·number·of·inbound·streams</p></li><li><p><strong><code·class="inline">max_attempts</code></strong>·-·Maximum·retransmissions·while·establishing·an
213 association</p></li><li><p><strong><code·class="inline">max_init_timeo</code></strong>·-·Time-out,·in·milliseconds,·for·establishing·an213 association</p></li><li><p><strong><code·class="inline">max_init_timeo</code></strong>·-·Time-out,·in·milliseconds,·for·establishing·an
214 association</p></li></ul></li><li><p><strong><code·class="inline">{sctp_autoclose, integer()·&gt;=·0}</code></strong>·-·Determines·the·time,·in·seconds,214 association</p></li></ul></li><li><p><strong><code·class="inline">{sctp_autoclose, integer()·&gt;=·0}</code></strong>·-·Determines·the·time,·in·seconds,
215 after·which·an·idle·association·is·automatically·closed.·<code·class="inline">0</code>·means·that·the215 after·which·an·idle·association·is·automatically·closed.·<code·class="inline">0</code>·means·that·the
Offset 218, 239 lines modifiedOffset 218, 239 lines modified
218 expense·of·latency.</p></li><li><p><strong><code·class="inline">{sctp_disable_fragments,·true|false}</code></strong>·-·If·<code·class="inline">true</code>,·induces·an·error·on·an218 expense·of·latency.</p></li><li><p><strong><code·class="inline">{sctp_disable_fragments,·true|false}</code></strong>·-·If·<code·class="inline">true</code>,·induces·an·error·on·an
219 attempt·to·send·a·message·larger·than·the·current·PMTU·size·(which·would219 attempt·to·send·a·message·larger·than·the·current·PMTU·size·(which·would
220 require·fragmentation/reassembling).·Notice·that·message·fragmentation·does220 require·fragmentation/reassembling).·Notice·that·message·fragmentation·does
221 not·affect·the·logical·atomicity·of·its·delivery;·this·option·is·provided·for221 not·affect·the·logical·atomicity·of·its·delivery;·this·option·is·provided·for
222 performance·reasons·only.</p></li><li><p><strong><code·class="inline">{sctp_i_want_mapped_v4_addr, true|false}</code></strong>·-·Turns·on|off·automatic222 performance·reasons·only.</p></li><li><p><strong><code·class="inline">{sctp_i_want_mapped_v4_addr, true|false}</code></strong>·-·Turns·on|off·automatic
223 mapping·of·IPv4·addresses·into·IPv6·ones·(if·the·socket·address·family·is223 mapping·of·IPv4·addresses·into·IPv6·ones·(if·the·socket·address·family·is
224 <code·class="inline">AF_INET6</code>).</p></li><li><p><strong><code·class="inline">{sctp_maxseg, integer()}</code></strong>·-·Determines·the·maximum·chunk·size·if·message224 <code·class="inline">AF_INET6</code>).</p></li><li><p><strong><code·class="inline">{sctp_maxseg, integer()}</code></strong>·-·Determines·the·maximum·chunk·size·if·message
225 fragmentation·is·used.·If·<code·class="inline">0</code>,·the·chunk·size·is·limited·by·the·Path·MTU·only.</p></li><li><p><strong><code·class="inline">{sctp_primary_addr, #sctp_prim{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_prim</span><span·class="p"·data-group-id="0603189599-1">{</span><span·class="w">225 fragmentation·is·used.·If·<code·class="inline">0</code>,·the·chunk·size·is·limited·by·the·Path·MTU·only.</p></li><li><p><strong><code·class="inline">{sctp_primary_addr, #sctp_prim{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_prim</span><span·class="p"·data-group-id="1530845304-1">{</span><span·class="w">
226 ······</span><span·class="ss">assoc_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="0603189599-2">(</span><span·class="p"·data-group-id="0603189599-2">)</span><span·class="p">,</span><span·class="w">226 ······</span><span·class="ss">assoc_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="1530845304-2">(</span><span·class="p"·data-group-id="1530845304-2">)</span><span·class="p">,</span><span·class="w">
227 ······</span><span·class="ss">addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0603189599-3">{</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="0603189599-3">}</span><span·class="w">227 ······</span><span·class="ss">addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1530845304-3">{</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="1530845304-3">}</span><span·class="w">
228 </span><span·class="p"·data-group-id="0603189599-1">}</span><span·class="w">228 </span><span·class="p"·data-group-id="1530845304-1">}</span><span·class="w">
229 ·</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="0603189599-4">(</span><span·class="p"·data-group-id="0603189599-4">)</span><span·class="w">229 ·</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="1530845304-4">(</span><span·class="p"·data-group-id="1530845304-4">)</span><span·class="w">
230 ·</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">port_number</span><span·class="p"·data-group-id="0603189599-5">(</span><span·class="p"·data-group-id="0603189599-5">)</span></code></pre><p>For·the·association·specified·by·<code·class="inline">assoc_id</code>,·<code·class="inline">{IP,Port}</code>·must·be·one·of·the230 ·</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">port_number</span><span·class="p"·data-group-id="1530845304-5">(</span><span·class="p"·data-group-id="1530845304-5">)</span></code></pre><p>For·the·association·specified·by·<code·class="inline">assoc_id</code>,·<code·class="inline">{IP,Port}</code>·must·be·one·of·the
231 peer·addresses.·This·option·determines·that·the·specified·address·is·treated231 peer·addresses.·This·option·determines·that·the·specified·address·is·treated
232 by·the·local·SCTP·stack·as·the·primary·address·of·the·peer.</p></li><li><p><strong><code·class="inline">{sctp_set_peer_primary_addr, #sctp_setpeerprim{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_setpeerprim</span><span·class="p"·data-group-id="0896449945-1">{</span><span·class="w">232 by·the·local·SCTP·stack·as·the·primary·address·of·the·peer.</p></li><li><p><strong><code·class="inline">{sctp_set_peer_primary_addr, #sctp_setpeerprim{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_setpeerprim</span><span·class="p"·data-group-id="1383223822-1">{</span><span·class="w">
233 ······</span><span·class="ss">assoc_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="0896449945-2">(</span><span·class="p"·data-group-id="0896449945-2">)</span><span·class="p">,</span><span·class="w">233 ······</span><span·class="ss">assoc_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="1383223822-2">(</span><span·class="p"·data-group-id="1383223822-2">)</span><span·class="p">,</span><span·class="w">
234 ······</span><span·class="ss">addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0896449945-3">{</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="0896449945-3">}</span><span·class="w">234 ······</span><span·class="ss">addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1383223822-3">{</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="1383223822-3">}</span><span·class="w">
235 </span><span·class="p"·data-group-id="0896449945-1">}</span><span·class="w">235 </span><span·class="p"·data-group-id="1383223822-1">}</span><span·class="w">
236 ·</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="0896449945-4">(</span><span·class="p"·data-group-id="0896449945-4">)</span><span·class="w">236 ·</span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="1383223822-4">(</span><span·class="p"·data-group-id="1383223822-4">)</span><span·class="w">
237 ·</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">port_number</span><span·class="p"·data-group-id="0896449945-5">(</span><span·class="p"·data-group-id="0896449945-5">)</span></code></pre><p>When·set,·informs·the·peer·to·use·<code·class="inline">{IP, Port}</code>·as·the·primary·address·of·the237 ·</span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">port_number</span><span·class="p"·data-group-id="1383223822-5">(</span><span·class="p"·data-group-id="1383223822-5">)</span></code></pre><p>When·set,·informs·the·peer·to·use·<code·class="inline">{IP, Port}</code>·as·the·primary·address·of·the
238 local·endpoint·for·the·association·specified·by·<code·class="inline">assoc_id</code>.</p></li><li><p><strong><code·class="inline">{sctp_adaptation_layer, #sctp_setadaptation{}}</code></strong>·<a·href=""·id="option-sctp_adaptation_layer"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_setadaptation</span><span·class="p"·data-group-id="0914437818-1">{</span><span·class="w">238 local·endpoint·for·the·association·specified·by·<code·class="inline">assoc_id</code>.</p></li><li><p><strong><code·class="inline">{sctp_adaptation_layer, #sctp_setadaptation{}}</code></strong>·<a·href=""·id="option-sctp_adaptation_layer"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_setadaptation</span><span·class="p"·data-group-id="3151937052-1">{</span><span·class="w">
239 ······</span><span·class="ss">adaptation_ind</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="0914437818-2">(</span><span·class="p"·data-group-id="0914437818-2">)</span><span·class="w">239 ······</span><span·class="ss">adaptation_ind</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="3151937052-2">(</span><span·class="p"·data-group-id="3151937052-2">)</span><span·class="w">
240 </span><span·class="p"·data-group-id="0914437818-1">}</span></code></pre><p>When·set,·requests·that·the·local·endpoint·uses·the·value·specified·by240 </span><span·class="p"·data-group-id="3151937052-1">}</span></code></pre><p>When·set,·requests·that·the·local·endpoint·uses·the·value·specified·by
241 <code·class="inline">adaptation_ind</code>·as·the·Adaptation·Indication·parameter·for·establishing241 <code·class="inline">adaptation_ind</code>·as·the·Adaptation·Indication·parameter·for·establishing
242 new·associations.·For·details,·see242 new·associations.·For·details,·see
243 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">RFC·2960</a>·and243 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">RFC·2960</a>·and
244 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>.</p></li><li><p><strong><code·class="inline">{sctp_peer_addr_params, #sctp_paddrparams{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_paddrparams</span><span·class="p"·data-group-id="5977974843-1">{</span><span·class="w">244 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>.</p></li><li><p><strong><code·class="inline">{sctp_peer_addr_params, #sctp_paddrparams{}}</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_paddrparams</span><span·class="p"·data-group-id="3363315466-1">{</span><span·class="w">
245 ······</span><span·class="ss">assoc_id</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="5977974843-2">(</span><span·class="p"·data-group-id="5977974843-2">)</span><span·class="p">,</span><span·class="w">245 ······</span><span·class="ss">assoc_id</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="3363315466-2">(</span><span·class="p"·data-group-id="3363315466-2">)</span><span·class="p">,</span><span·class="w">
246 ······</span><span·class="ss">address</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5977974843-3">{</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="5977974843-3">}</span><span·class="p">,</span><span·class="w">246 ······</span><span·class="ss">address</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3363315466-3">{</span><span·class="n">IP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="3363315466-3">}</span><span·class="p">,</span><span·class="w">
247 ······</span><span·class="ss">hbinterval</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5977974843-4">(</span><span·class="p"·data-group-id="5977974843-4">)</span><span·class="p">,</span><span·class="w">247 ······</span><span·class="ss">hbinterval</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="3363315466-4">(</span><span·class="p"·data-group-id="3363315466-4">)</span><span·class="p">,</span><span·class="w">
248 ······</span><span·class="ss">pathmaxrxt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5977974843-5">(</span><span·class="p"·data-group-id="5977974843-5">)</span><span·class="p">,</span><span·class="w">248 ······</span><span·class="ss">pathmaxrxt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="3363315466-5">(</span><span·class="p"·data-group-id="3363315466-5">)</span><span·class="p">,</span><span·class="w">
249 ······</span><span·class="ss">pathmtu</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5977974843-6">(</span><span·class="p"·data-group-id="5977974843-6">)</span><span·class="p">,</span><span·class="w">249 ······</span><span·class="ss">pathmtu</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="3363315466-6">(</span><span·class="p"·data-group-id="3363315466-6">)</span><span·class="p">,</span><span·class="w">
250 ······</span><span·class="ss">sackdelay</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="5977974843-7">(</span><span·class="p"·data-group-id="5977974843-7">)</span><span·class="p">,</span><span·class="w">250 ······</span><span·class="ss">sackdelay</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="3363315466-7">(</span><span·class="p"·data-group-id="3363315466-7">)</span><span·class="p">,</span><span·class="w">
251 ······</span><span·class="ss">flags</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="5977974843-8">(</span><span·class="p"·data-group-id="5977974843-8">)</span><span·class="w">251 ······</span><span·class="ss">flags</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="3363315466-8">(</span><span·class="p"·data-group-id="3363315466-8">)</span><span·class="w">
252 </span><span·class="p"·data-group-id="5977974843-1">}</span><span·class="w">252 </span><span·class="p"·data-group-id="3363315466-1">}</span><span·class="w">
253 </span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="5977974843-9">(</span><span·class="p"·data-group-id="5977974843-9">)</span><span·class="w">253 </span><span·class="n">IP</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="3363315466-9">(</span><span·class="p"·data-group-id="3363315466-9">)</span><span·class="w">
254 </span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">port_number</span><span·class="p"·data-group-id="5977974843-10">(</span><span·class="p"·data-group-id="5977974843-10">)</span></code></pre><p>Determines·various·per-address·parameters·for·the·association·specified·by254 </span><span·class="n">Port</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">port_number</span><span·class="p"·data-group-id="3363315466-10">(</span><span·class="p"·data-group-id="3363315466-10">)</span></code></pre><p>Determines·various·per-address·parameters·for·the·association·specified·by
255 <code·class="inline">assoc_id</code>·and·the·peer·address·<code·class="inline">address</code>·(the·SCTP·protocol·supports255 <code·class="inline">assoc_id</code>·and·the·peer·address·<code·class="inline">address</code>·(the·SCTP·protocol·supports
256 multi-homing,·so·more·than·one·address·can·correspond·to·a·specified256 multi-homing,·so·more·than·one·address·can·correspond·to·a·specified
257 association).</p><ul><li><p><strong><code·class="inline">hbinterval</code></strong>·-·Heartbeat·interval,·in·milliseconds</p></li><li><p><strong><code·class="inline">pathmaxrxt</code></strong>·-·Maximum·number·of·retransmissions·before·this·address·is257 association).</p><ul><li><p><strong><code·class="inline">hbinterval</code></strong>·-·Heartbeat·interval,·in·milliseconds</p></li><li><p><strong><code·class="inline">pathmaxrxt</code></strong>·-·Maximum·number·of·retransmissions·before·this·address·is
258 considered·unreachable·(and·an·alternative·address·is·selected)</p></li><li><p><strong><code·class="inline">pathmtu</code></strong>·-·Fixed·Path·MTU,·if·automatic·discovery·is·disabled·(see258 considered·unreachable·(and·an·alternative·address·is·selected)</p></li><li><p><strong><code·class="inline">pathmtu</code></strong>·-·Fixed·Path·MTU,·if·automatic·discovery·is·disabled·(see
259 <code·class="inline">flags</code>·below)</p></li><li><p><strong><code·class="inline">sackdelay</code></strong>·-·Delay,·in·milliseconds,·for·SAC·messages·(if·the·delay·is259 <code·class="inline">flags</code>·below)</p></li><li><p><strong><code·class="inline">sackdelay</code></strong>·-·Delay,·in·milliseconds,·for·SAC·messages·(if·the·delay·is
260 enabled,·see·<code·class="inline">flags</code>·below)</p></li><li><p><strong><code·class="inline">flags</code></strong>·-·The·following·flags·are·available:</p><ul><li><p><strong><code·class="inline">hb_enable</code></strong>·-·Enables·heartbeat</p></li><li><p><strong><code·class="inline">hb_disable</code></strong>·-·Disables·heartbeat</p></li><li><p><strong><code·class="inline">hb_demand</code></strong>·-·Initiates·heartbeat·immediately</p></li><li><p><strong><code·class="inline">pmtud_enable</code></strong>·-·Enables·automatic·Path·MTU·discovery</p></li><li><p><strong><code·class="inline">pmtud_disable</code></strong>·-·Disables·automatic·Path·MTU·discovery</p></li><li><p><strong><code·class="inline">sackdelay_enable</code></strong>·-·Enables·SAC·delay</p></li><li><p><strong><code·class="inline">sackdelay_disable</code></strong>·-·Disables·SAC·delay</p></li></ul></li></ul></li><li><p><strong><code·class="inline">{sctp_default_send_param, #sctp_sndrcvinfo{}}</code></strong></p><p><a·href=""·id="record-sctp_sndrcvinfo"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_sndrcvinfo</span><span·class="p"·data-group-id="7479499902-1">{</span><span·class="w">260 enabled,·see·<code·class="inline">flags</code>·below)</p></li><li><p><strong><code·class="inline">flags</code></strong>·-·The·following·flags·are·available:</p><ul><li><p><strong><code·class="inline">hb_enable</code></strong>·-·Enables·heartbeat</p></li><li><p><strong><code·class="inline">hb_disable</code></strong>·-·Disables·heartbeat</p></li><li><p><strong><code·class="inline">hb_demand</code></strong>·-·Initiates·heartbeat·immediately</p></li><li><p><strong><code·class="inline">pmtud_enable</code></strong>·-·Enables·automatic·Path·MTU·discovery</p></li><li><p><strong><code·class="inline">pmtud_disable</code></strong>·-·Disables·automatic·Path·MTU·discovery</p></li><li><p><strong><code·class="inline">sackdelay_enable</code></strong>·-·Enables·SAC·delay</p></li><li><p><strong><code·class="inline">sackdelay_disable</code></strong>·-·Disables·SAC·delay</p></li></ul></li></ul></li><li><p><strong><code·class="inline">{sctp_default_send_param, #sctp_sndrcvinfo{}}</code></strong></p><p><a·href=""·id="record-sctp_sndrcvinfo"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_sndrcvinfo</span><span·class="p"·data-group-id="2674650249-1">{</span><span·class="w">
261 ······</span><span·class="ss">stream</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-2">(</span><span·class="p"·data-group-id="7479499902-2">)</span><span·class="p">,</span><span·class="w">261 ······</span><span·class="ss">stream</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-2">(</span><span·class="p"·data-group-id="2674650249-2">)</span><span·class="p">,</span><span·class="w">
262 ······</span><span·class="ss">ssn</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-3">(</span><span·class="p"·data-group-id="7479499902-3">)</span><span·class="p">,</span><span·class="w">262 ······</span><span·class="ss">ssn</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-3">(</span><span·class="p"·data-group-id="2674650249-3">)</span><span·class="p">,</span><span·class="w">
263 ······</span><span·class="ss">flags</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="7479499902-4">(</span><span·class="p"·data-group-id="7479499902-4">)</span><span·class="p">,</span><span·class="w">263 ······</span><span·class="ss">flags</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">list</span><span·class="p"·data-group-id="2674650249-4">(</span><span·class="p"·data-group-id="2674650249-4">)</span><span·class="p">,</span><span·class="w">
264 ······</span><span·class="ss">ppid</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-5">(</span><span·class="p"·data-group-id="7479499902-5">)</span><span·class="p">,</span><span·class="w">264 ······</span><span·class="ss">ppid</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-5">(</span><span·class="p"·data-group-id="2674650249-5">)</span><span·class="p">,</span><span·class="w">
265 ······</span><span·class="ss">context</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-6">(</span><span·class="p"·data-group-id="7479499902-6">)</span><span·class="p">,</span><span·class="w">265 ······</span><span·class="ss">context</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-6">(</span><span·class="p"·data-group-id="2674650249-6">)</span><span·class="p">,</span><span·class="w">
266 ······</span><span·class="ss">timetolive</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-7">(</span><span·class="p"·data-group-id="7479499902-7">)</span><span·class="p">,</span><span·class="w">266 ······</span><span·class="ss">timetolive</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-7">(</span><span·class="p"·data-group-id="2674650249-7">)</span><span·class="p">,</span><span·class="w">
267 ······</span><span·class="ss">tsn</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-8">(</span><span·class="p"·data-group-id="7479499902-8">)</span><span·class="p">,</span><span·class="w">267 ······</span><span·class="ss">tsn</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-8">(</span><span·class="p"·data-group-id="2674650249-8">)</span><span·class="p">,</span><span·class="w">
268 ······</span><span·class="ss">cumtsn</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7479499902-9">(</span><span·class="p"·data-group-id="7479499902-9">)</span><span·class="p">,</span><span·class="w">268 ······</span><span·class="ss">cumtsn</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2674650249-9">(</span><span·class="p"·data-group-id="2674650249-9">)</span><span·class="p">,</span><span·class="w">
269 ······</span><span·class="ss">assoc_id</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="7479499902-10">(</span><span·class="p"·data-group-id="7479499902-10">)</span><span·class="w">269 ······</span><span·class="ss">assoc_id</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">assoc_id</span><span·class="p"·data-group-id="2674650249-10">(</span><span·class="p"·data-group-id="2674650249-10">)</span><span·class="w">
270 </span><span·class="p"·data-group-id="7479499902-1">}</span></code></pre><p><code·class="inline">#sctp_sndrcvinfo{}</code>·is·used·both·in·this·socket·option,·and·as270 </span><span·class="p"·data-group-id="2674650249-1">}</span></code></pre><p><code·class="inline">#sctp_sndrcvinfo{}</code>·is·used·both·in·this·socket·option,·and·as
271 ancillary·data·while·sending·or·receiving·SCTP·messages.·When·set271 ancillary·data·while·sending·or·receiving·SCTP·messages.·When·set
272 as·an·option,·it·provides·default·values·for·subsequent272 as·an·option,·it·provides·default·values·for·subsequent
273 <a·href="#send/3"><code·class="inline">send</code></a>·calls·on·the·association·specified·by·<code·class="inline">assoc_id</code>.</p><p><code·class="inline">assoc_id = 0</code>·(default)·indicates·the·whole·endpoint.</p><p>The·following·fields·typically·must·be·specified·by·the·sender:</p><ul><li><p><strong><code·class="inline">sinfo_stream</code></strong>·-·Stream·number·(0-base)·within·the·association·to·send273 <a·href="#send/3"><code·class="inline">send</code></a>·calls·on·the·association·specified·by·<code·class="inline">assoc_id</code>.</p><p><code·class="inline">assoc_id = 0</code>·(default)·indicates·the·whole·endpoint.</p><p>The·following·fields·typically·must·be·specified·by·the·sender:</p><ul><li><p><strong><code·class="inline">sinfo_stream</code></strong>·-·Stream·number·(0-base)·within·the·association·to·send
274 the·messages·through;</p></li><li><p><strong><code·class="inline">sinfo_flags</code></strong>·-·The·following·flags·are·recognised:</p><ul><li><p><strong><code·class="inline">unordered</code></strong>·-·The·message·is·to·be·sent·unordered</p></li><li><p><strong><code·class="inline">addr_over</code></strong>·-·The·address·specified·in·<a·href="#send/3"><code·class="inline">send</code></a>·overwrites274 the·messages·through;</p></li><li><p><strong><code·class="inline">sinfo_flags</code></strong>·-·The·following·flags·are·recognised:</p><ul><li><p><strong><code·class="inline">unordered</code></strong>·-·The·message·is·to·be·sent·unordered</p></li><li><p><strong><code·class="inline">addr_over</code></strong>·-·The·address·specified·in·<a·href="#send/3"><code·class="inline">send</code></a>·overwrites
275 the·primary·peer·address</p></li><li><p><strong><code·class="inline">abort</code></strong>·-·Aborts·the·current·association·without·flushing·any·unsent275 the·primary·peer·address</p></li><li><p><strong><code·class="inline">abort</code></strong>·-·Aborts·the·current·association·without·flushing·any·unsent
276 data</p></li><li><p><strong><code·class="inline">eof</code></strong>·-·Gracefully·shuts·down·the·current·association,·with·flushing276 data</p></li><li><p><strong><code·class="inline">eof</code></strong>·-·Gracefully·shuts·down·the·current·association,·with·flushing
277 of·unsent·data</p></li></ul><p>Other·fields·are·rarely·used.·For·complete·information,·see277 of·unsent·data</p></li></ul><p>Other·fields·are·rarely·used.·For·complete·information,·see
278 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">RFC·2960</a>·and278 <a·href="http://www.rfc-archive.org/getrfc.php?rfc=2960">RFC·2960</a>·and
279 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>.</p></li></ul></li><li><p><strong><code·class="inline">{sctp_events, #sctp_event_subscribe{}}</code></strong>·<a·href=""·id="option-sctp_events"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_event_subscribe</span><span·class="p"·data-group-id="9961671122-1">{</span><span·class="w">279 <a·href="http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13">Sockets·API·Extensions·for·SCTP</a>.</p></li></ul></li><li><p><strong><code·class="inline">{sctp_events, #sctp_event_subscribe{}}</code></strong>·<a·href=""·id="option-sctp_events"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">sctp_event_subscribe</span><span·class="p"·data-group-id="5712848261-1">{</span><span·class="w">
280 ········</span><span·class="ss">data_io_event</span><span·class="w">··········</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">280 ········</span><span·class="ss">data_io_event</span><span·class="w">··········</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
281 ········</span><span·class="ss">association_event</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">281 ········</span><span·class="ss">association_event</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
282 ········</span><span·class="ss">address_event</span><span·class="w">··········</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">282 ········</span><span·class="ss">address_event</span><span·class="w">··········</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
283 ········</span><span·class="ss">send_failure_event</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">283 ········</span><span·class="ss">send_failure_event</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
284 ········</span><span·class="ss">peer_error_event</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">284 ········</span><span·class="ss">peer_error_event</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
285 ········</span><span·class="ss">shutdown_event</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">285 ········</span><span·class="ss">shutdown_event</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
286 ········</span><span·class="ss">partial_delivery_event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">286 ········</span><span·class="ss">partial_delivery_event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
287 ········</span><span·class="ss">adaptation_layer_event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">287 ········</span><span·class="ss">adaptation_layer_event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">
288 </span><span·class="p"·data-group-id="9961671122-1">}</span></code></pre><p>This·option·determines·which·<a·href="#sctp-events">SCTP Events</a>·that·are·to·be288 </span><span·class="p"·data-group-id="5712848261-1">}</span></code></pre><p>This·option·determines·which·<a·href="#sctp-events">SCTP Events</a>·that·are·to·be
Max diff block lines reached; 125877/172367 bytes (73.03%) of diff not shown.
59.5 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/gen_tcp.html
    
Offset 126, 35 lines modifiedOffset 126, 35 lines modified
  
126 ··</h1>126 ··</h1>
  
  
127 ····<section·id="moduledoc">127 ····<section·id="moduledoc">
128 <p>Interface·to·TCP/IP·sockets.</p><p>This·module·provides·functions·for·communicating·over·TCP/IP128 <p>Interface·to·TCP/IP·sockets.</p><p>This·module·provides·functions·for·communicating·over·TCP/IP
129 protocol·sockets.</p><p>The·following·code·fragment·is·a·simple·example·of·a·client·connecting·to·a129 protocol·sockets.</p><p>The·following·code·fragment·is·a·simple·example·of·a·client·connecting·to·a
130 server·at·port·5678,·transferring·a·binary,·and·closing·the·connection:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">client</span><span·class="p"·data-group-id="7152165164-1">(</span><span·class="p"·data-group-id="7152165164-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">130 server·at·port·5678,·transferring·a·binary,·and·closing·the·connection:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">client</span><span·class="p"·data-group-id="6579115724-1">(</span><span·class="p"·data-group-id="6579115724-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
131 ····</span><span·class="n">SomeHostInNet</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;localhost&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·to·make·it·runnable·on·one·machine</span><span·class="w">131 ····</span><span·class="n">SomeHostInNet</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;localhost&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·to·make·it·runnable·on·one·machine</span><span·class="w">
132 ····</span><span·class="p"·data-group-id="7152165164-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="7152165164-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·118,·SHA:·8d8038e48810694bc47669dae28dc77c23f5259dc21af9533bf53da984f14971·...·]4-3">(</span><span·class="n">SomeHostInNet</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5678</span><span·class="p">,</span><span·class="w">132 ····</span><span·class="p"·data-group-id="6579115724-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="6579115724-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·118,·SHA:·1ff1a5b8de4bcfa5c97464f193e1996ce5d0d9679ec95be84513d797997e1cdb·...·]4-3">(</span><span·class="n">SomeHostInNet</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5678</span><span·class="p">,</span><span·class="w">
133 ·································</span><span·class="p"·data-group-id="7152165164-4">[</span><span·class="ss">binary</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7152165164-5">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·eab058f13c95ccf60273f731ff1fe8fe155f2f73049e99f14d7acf1aa6044f22·...·]4-3">)</span><span·class="p">,</span><span·class="w">133 ·································</span><span·class="p"·data-group-id="6579115724-4">[</span><span·class="ss">binary</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6579115724-5">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·a81c2f89818f6bf645dcf82f6edd40c4c5c031dce1bdab4286c0d82d82239688·...·]4-3">)</span><span·class="p">,</span><span·class="w">
134 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="7152165164-6">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Some·Data&quot;</span><span·class="p"·data-group-id="7152165164-6">)</span><span·class="p">,</span><span·class="w">134 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="6579115724-6">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Some·Data&quot;</span><span·class="p"·data-group-id="6579115724-6">)</span><span·class="p">,</span><span·class="w">
135 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="7152165164-7">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7152165164-7">)</span><span·class="p">.</span></code></pre><p>At·the·other·end,·a·server·is·listening·on·port·5678,·accepts·the·connection,135 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6579115724-7">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="6579115724-7">)</span><span·class="p">.</span></code></pre><p>At·the·other·end,·a·server·is·listening·on·port·5678,·accepts·the·connection,
136 and·receives·the·binary:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">server</span><span·class="p"·data-group-id="5244588012-1">(</span><span·class="p"·data-group-id="5244588012-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">136 and·receives·the·binary:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">server</span><span·class="p"·data-group-id="8564194883-1">(</span><span·class="p"·data-group-id="8564194883-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
137 ····</span><span·class="p"·data-group-id="5244588012-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LSock</span><span·class="p"·data-group-id="5244588012-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·535,·SHA:·87067fb72bac7000e4a5f83b6a979f4737a01ff9b2bcea7dceb3373acf21f791·...·]-5">}</span><span·class="p">,</span><span·class="w">137 ····</span><span·class="p"·data-group-id="8564194883-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LSock</span><span·class="p"·data-group-id="8564194883-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·535,·SHA:·0825400ffc43626e75340717174ab252d22db4ef215dc8761cab9bca89503f60·...·]-5">}</span><span·class="p">,</span><span·class="w">
138 ········································</span><span·class="p"·data-group-id="5244588012-6">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="5244588012-6">}</span><span·class="p"·data-group-id="5244588012-4">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·98d8f33a3a5ac89d12103092935aead35bc36b7d027717d6716a03b1704f33ab·...·]-3">)</span><span·class="p">,</span><span·class="w">138 ········································</span><span·class="p"·data-group-id="8564194883-6">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8564194883-6">}</span><span·class="p"·data-group-id="8564194883-4">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·af0b04dc7b021c0c853f21629072ca78ee51c3a5f80b1bf95b1b838a61bf1d4f·...·]-3">)</span><span·class="p">,</span><span·class="w">
139 ····</span><span·class="p"·data-group-id="5244588012-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="5244588012-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·199,·SHA:·48fb7daa09585c94f0c4dfc8d4e8c69ee74191606812fda8d77a5379d5caa79c·...·]-8">)</span><span·class="p">,</span><span·class="w">139 ····</span><span·class="p"·data-group-id="8564194883-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="8564194883-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·199,·SHA:·bc3850cf2aae10f04ceaf0d7980be58ea3651881d7c74e7432a4c70c0ce27f6d·...·]-8">)</span><span·class="p">,</span><span·class="w">
140 ····</span><span·class="p"·data-group-id="5244588012-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="5244588012-9">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·300,·SHA:·efef235204726de8b1a17423e51857074888564851f724b63e9e44e811f99a75·...·]-10">)</span><span·class="p">,</span><span·class="w">140 ····</span><span·class="p"·data-group-id="8564194883-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="8564194883-9">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·300,·SHA:·4b4a69aa157b6f662f80064a1917d2687cb69cd1bae44a2390432dd27f5cf2df·...·]-10">)</span><span·class="p">,</span><span·class="w">
141 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5244588012-12">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="5244588012-12">)</span><span·class="p">,</span><span·class="w">141 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8564194883-12">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="8564194883-12">)</span><span·class="p">,</span><span·class="w">
142 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5244588012-13">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="5244588012-13">)</span><span·class="p">,</span><span·class="w">142 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8564194883-13">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="8564194883-13">)</span><span·class="p">,</span><span·class="w">
143 ····</span><span·class="n">Bin</span><span·class="p">.</span><span·class="w">143 ····</span><span·class="n">Bin</span><span·class="p">.</span><span·class="w">
  
144 </span><span·class="nf">do_recv</span><span·class="p"·data-group-id="5244588012-14">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bs</span><span·class="p"·data-group-id="5244588012-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">144 </span><span·class="nf">do_recv</span><span·class="p"·data-group-id="8564194883-14">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bs</span><span·class="p"·data-group-id="8564194883-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
145 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="5244588012-15">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="5244588012-15">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">145 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="8564194883-15">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="8564194883-15">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
146 ········</span><span·class="p"·data-group-id="5244588012-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="5244588012-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">146 ········</span><span·class="p"·data-group-id="8564194883-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="8564194883-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
147 ············</span><span·class="nf">do_recv</span><span·class="p"·data-group-id="5244588012-17">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5244588012-18">[</span><span·class="n">Bs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·c[·...·truncated·by·diffoscope;·len:·88,·SHA:·22b91ab37cf28be702dc4e0076303eabe4a6e0ce2933687740dabc736463a26d·...·]-17">)</span><span·class="p">;</span><span·class="w">147 ············</span><span·class="nf">do_recv</span><span·class="p"·data-group-id="8564194883-17">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8564194883-18">[</span><span·class="n">Bs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·c[·...·truncated·by·diffoscope;·len:·88,·SHA:·3d6a055f32cdaf12a2ae74e3713aba12ab108944e5236d1ab6a16342df6feb94·...·]-17">)</span><span·class="p">;</span><span·class="w">
148 ········</span><span·class="p"·data-group-id="5244588012-19">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="5244588012-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
149 ············</span><span·class="p"·data-group-id="5244588012-20">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="5244588012-21">(</span><span·class="n">Bs</span>[·...·truncated·by·diffoscope;·len:·101,·SHA:·8cdfdda9164819224a18813483b7a1009bb74a084d7a0b5db201b4e697a51b87·...·]</span><span·class="w">148 ········</span><span·class="p"·data-group-id="8564194883-19">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">closed</span><span·class="p"·data-group-id="8564194883-19">}</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·11,·SHA:·729ec6a90153422f6d3e5f23f801dfde120453a477458b8201046ba74dbb1028·...·]</span><span·class="w">
 149 ············</span><span·class="p"·data-group-id="8564194883-20">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="8564194883-21">(</span><span·class="n">Bs</span><span·class="p"·data-group-id="8564194883-21">)</span><span·class="p"·data-group-id="8564194883-20">}</span><span·class="w">
150 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>For·more·examples,·see·section·<a·href="#module-examples">Examples</a>.</p><blockquote><h4·class="info">Note</h4><p>Functions·that·create·sockets·can·take·an·optional·option;150 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>For·more·examples,·see·section·<a·href="#module-examples">Examples</a>.</p><blockquote><h4·class="info">Note</h4><p>Functions·that·create·sockets·can·take·an·optional·option;
151 <code·class="inline">{inet_backend, Backend}</code>·that,·if·specified,·has·to·be·the·first·option.·This151 <code·class="inline">{inet_backend, Backend}</code>·that,·if·specified,·has·to·be·the·first·option.·This
152 selects·the·implementation·backend·towards·the·platform's·socket·API.</p><p>This·is·a·<em>temporary</em>·option·that·will·be·ignored·in·a·future·release.</p><p>The·default·is·<code·class="inline">Backend = inet</code>·that·selects·the·traditional·<code·class="inline">inet_drv.c</code>152 selects·the·implementation·backend·towards·the·platform's·socket·API.</p><p>This·is·a·<em>temporary</em>·option·that·will·be·ignored·in·a·future·release.</p><p>The·default·is·<code·class="inline">Backend = inet</code>·that·selects·the·traditional·<code·class="inline">inet_drv.c</code>
153 driver.·The·other·choice·is·<code·class="inline">Backend = socket</code>·that·selects·the·new·<a·href="socket.html"><code·class="inline">socket</code></a>153 driver.·The·other·choice·is·<code·class="inline">Backend = socket</code>·that·selects·the·new·<a·href="socket.html"><code·class="inline">socket</code></a>
154 module·and·its·NIF·implementation.</p><p>The·system·default·can·be·changed·when·the·node·is·started·with·the154 module·and·its·NIF·implementation.</p><p>The·system·default·can·be·changed·when·the·node·is·started·with·the
155 application·<code·class="inline">kernel</code>'s·configuration·variable·<code·class="inline">inet_backend</code>.</p><p>For·<code·class="inline">gen_tcp</code>·with·<code·class="inline">inet_backend·=·socket</code>·we·have·tried·to·be·as·&quot;compatible&quot;155 application·<code·class="inline">kernel</code>'s·configuration·variable·<code·class="inline">inet_backend</code>.</p><p>For·<code·class="inline">gen_tcp</code>·with·<code·class="inline">inet_backend·=·socket</code>·we·have·tried·to·be·as·&quot;compatible&quot;
156 as·possible·which·has·sometimes·been·impossible.·Here·is·a·list·of·cases·when156 as·possible·which·has·sometimes·been·impossible.·Here·is·a·list·of·cases·when
Offset 185, 91 lines modifiedOffset 185, 91 lines modified
185 ··<span·class="text">Examples</span>185 ··<span·class="text">Examples</span>
186 </h2>186 </h2>
187 <p>The·following·example·illustrates·use·of·option·<code·class="inline">{active,once}</code>·and·multiple187 <p>The·following·example·illustrates·use·of·option·<code·class="inline">{active,once}</code>·and·multiple
188 accepts·by·implementing·a·server·as·a·number·of·worker·processes·doing·accept·on188 accepts·by·implementing·a·server·as·a·number·of·worker·processes·doing·accept·on
189 a·single·listening·socket.·Function·<code·class="inline">start/2</code>·takes·the·number·of·worker189 a·single·listening·socket.·Function·<code·class="inline">start/2</code>·takes·the·number·of·worker
190 processes·and·the·port·number·on·which·to·listen·for·incoming·connections.·If190 processes·and·the·port·number·on·which·to·listen·for·incoming·connections.·If
191 <code·class="inline">LPort</code>·is·specified·as·<code·class="inline">0</code>,·an·ephemeral·port·number·is·used,·which·is·why·the191 <code·class="inline">LPort</code>·is·specified·as·<code·class="inline">0</code>,·an·ephemeral·port·number·is·used,·which·is·why·the
192 start·function·returns·the·actual·port·number·allocated:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start</span><span·class="p"·data-group-id="4373873613-1">(</span><span·class="n">Num</span><span·class="p">,</span><span·class="n">LPort</span><span·class="p"·data-group-id="4373873613-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 start·function·returns·the·actual·port·number·allocated:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start</span><span·class="p"·data-group-id="1746841960-1">(</span><span·class="n">Num</span><span·class="p">,</span><span·class="n">LPort</span><span·class="p"·data-group-id="1746841960-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="4373873613-2">(</span><span·class="n">LPort</span><span·class="p">,</span><span·class="p"·data-group-id="4373873613-3">[</span><span·class="p"·data-group-id="4373873613-4">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·387,·SHA:·51e45e8b100ce4932a83dcdb5e2b03e67859b7321003d0ee90a99aa31afed620·...·]-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">193 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="1746841960-2">(</span><span·class="n">LPort</span><span·class="p">,</span><span·class="p"·data-group-id="1746841960-3">[</span><span·class="p"·data-group-id="1746841960-4">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·387,·SHA:·709751e1b1b7f6056c59deb333bce76630827e653a2a4518e9b628f0e7678fc8·...·]-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
194 ········</span><span·class="p"·data-group-id="4373873613-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ListenSock</span><span·class="p"·data-group-id="4373873613-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">194 ········</span><span·class="p"·data-group-id="1746841960-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ListenSock</span><span·class="p"·data-group-id="1746841960-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
195 ············</span><span·class="nf">start_servers</span><span·class="p"·data-group-id="4373873613-7">(</span><span·class="n">Num</span><span·class="p">,</span><span·class="n">ListenSock</span><span·class="p"·data-group-id="4373873613-7">)</span><span·class="p">,</span><span·class="w">195 ············</span><span·class="nf">start_servers</span><span·class="p"·data-group-id="1746841960-7">(</span><span·class="n">Num</span><span·class="p">,</span><span·class="n">ListenSock</span><span·class="p"·data-group-id="1746841960-7">)</span><span·class="p">,</span><span·class="w">
196 ············</span><span·class="p"·data-group-id="4373873613-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="4373873613-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·199,·SHA:·df9acbc95272e5e79a005ee36f44c85d8ed87851ef4d6954f836a61e5bd6bbe2·...·]-9">)</span><span·class="p">,</span><span·class="w">196 ············</span><span·class="p"·data-group-id="1746841960-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="1746841960-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·199,·SHA:·200945f853332da5c59f686a2741a133664d4950dd64ad4e591875e14678fb94·...·]-9">)</span><span·class="p">,</span><span·class="w">
197 ············</span><span·class="n">Port</span><span·class="p">;</span><span·class="w">197 ············</span><span·class="n">Port</span><span·class="p">;</span><span·class="w">
198 ········</span><span·class="p"·data-group-id="4373873613-10">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="4373873613-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 ········</span><span·class="p"·data-group-id="1746841960-10">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="1746841960-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ············</span><span·class="p"·data-group-id="4373873613-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="4373873613-11">}</span><span·class="w">199 ············</span><span·class="p"·data-group-id="1746841960-11">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Reason</span><span·class="p"·data-group-id="1746841960-11">}</span><span·class="w">
200 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">200 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
201 </span><span·class="nf">start_servers</span><span·class="p"·data-group-id="4373873613-12">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="4373873613-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 </span><span·class="nf">start_servers</span><span·class="p"·data-group-id="1746841960-12">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="1746841960-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">202 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
203 </span><span·class="nf">start_servers</span><span·class="p"·data-group-id="4373873613-13">(</span><span·class="n">Num</span><span·class="p">,</span><span·class="n">LS</span><span·class="p"·data-group-id="4373873613-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 </span><span·class="nf">start_servers</span><span·class="p"·data-group-id="1746841960-13">(</span><span·class="n">Num</span><span·class="p">,</span><span·class="n">LS</span><span·class="p"·data-group-id="1746841960-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4373873613-14">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="ss">server</span><span·class="p">,</span><span·class="p"·data-group-id="4373873613-15">[</span><span·class="n">LS</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·72,·SHA:·2ed29c7a21840f9977d6b234fb1d2125a11e445590114ebae24e7cbf336b49e7·...·]-14">)</span><span·class="p">,</span><span·class="w">204 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="1746841960-14">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="ss">server</span><span·class="p">,</span><span·class="p"·data-group-id="1746841960-15">[</span><span·class="n">LS</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·72,·SHA:·a91654a2390c51e7ad7c76b498524ea6dfcaba296928994641410ac5dfd74bf8·...·]-14">)</span><span·class="p">,</span><span·class="w">
205 ····</span><span·class="nf">start_servers</span><span·class="p"·data-group-id="4373873613-16">(</span><span·class="n">Num</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">LS</span><span·class="p"·data-group-id="4373873613-16">)</span><span·class="p">.</span><span·class="w">205 ····</span><span·class="nf">start_servers</span><span·class="p"·data-group-id="1746841960-16">(</span><span·class="n">Num</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">,</span><span·class="n">LS</span><span·class="p"·data-group-id="1746841960-16">)</span><span·class="p">.</span><span·class="w">
  
206 </span><span·class="nf">server</span><span·class="p"·data-group-id="4373873613-17">(</span><span·class="n">LS</span><span·class="p"·data-group-id="4373873613-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">206 </span><span·class="nf">server</span><span·class="p"·data-group-id="1746841960-17">(</span><span·class="n">LS</span><span·class="p"·data-group-id="1746841960-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
207 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">accept</span><span·class="p"·data-group-id="4373873613-18">(</span><span·class="n">LS</span><span·class="p"·data-group-id="4373873613-18">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">207 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">accept</span><span·class="p"·data-group-id="1746841960-18">(</span><span·class="n">LS</span><span·class="p"·data-group-id="1746841960-18">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
208 ········</span><span·class="p"·data-group-id="4373873613-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">S</span><span·class="p"·data-group-id="4373873613-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 ········</span><span·class="p"·data-group-id="1746841960-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">S</span><span·class="p"·data-group-id="1746841960-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4373873613-20">(</span><span·class="n">S</span><span·class="p"·data-group-id="4373873613-20">)</span><span·class="p">,</span><span·class="w">209 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="1746841960-20">(</span><span·class="n">S</span><span·class="p"·data-group-id="1746841960-20">)</span><span·class="p">,</span><span·class="w">
210 ············</span><span·class="nf">server</span><span·class="p"·data-group-id="4373873613-21">(</span><span·class="n">LS</span><span·class="p"·data-group-id="4373873613-21">)</span><span·class="p">;</span><span·class="w">210 ············</span><span·class="nf">server</span><span·class="p"·data-group-id="1746841960-21">(</span><span·class="n">LS</span><span·class="p"·data-group-id="1746841960-21">)</span><span·class="p">;</span><span·class="w">
211 ········</span><span·class="n">Other</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">211 ········</span><span·class="n">Other</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
212 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4373873613-22">(</span><span·class="s">&quot;accept·returned·</span><span·class="si">~w</span><span·class="s">·-·goodbye!</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="4373873613-23">[</[·...·truncated·by·diffoscope;·len:·128,·SHA:·29feed0c743ced798d8ad736c179a422dc9b32e0cd13d0fe9591eefa56de60e1·...·]-22">)</span><span·class="p">,</span><span·class="w">212 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1746841960-22">(</span><span·class="s">&quot;accept·returned·</span><span·class="si">~w</span><span·class="s">·-·goodbye!</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1746841960-23">[</[·...·truncated·by·diffoscope;·len:·128,·SHA:·8544bb7d7b905b6b98633d2f64a0d57e05949ee4f24f3a5e15cf3b8b8a1c4a6d·...·]-22">)</span><span·class="p">,</span><span·class="w">
213 ············</span><span·class="ss">ok</span><span·class="w">213 ············</span><span·class="ss">ok</span><span·class="w">
214 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">214 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
215 </span><span·class="nf">loop</span><span·class="p"·data-group-id="4373873613-24">(</span><span·class="n">S</span><span·class="p"·data-group-id="4373873613-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">215 </span><span·class="nf">loop</span><span·class="p"·data-group-id="1746841960-24">(</span><span·class="n">S</span><span·class="p"·data-group-id="1746841960-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
216 ····</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">setopts</span><span·class="p"·data-group-id="4373873613-25">(</span><span·class="n">S</span><span·class="p">,</span><span·class="p"·data-group-id="4373873613-26">[</span><span·class="p"·data-group-id="4373873613-27">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="ss">once</[·...·truncated·by·diffoscope;·len:·154,·SHA:·ff4c9ea930eaa83427226b161bdcc1b7308592242004cdb556aa611a1db3f074·...·]-25">)</span><span·class="p">,</span><span·class="w">216 ····</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">setopts</span><span·class="p"·data-group-id="1746841960-25">(</span><span·class="n">S</span><span·class="p">,</span><span·class="p"·data-group-id="1746841960-26">[</span><span·class="p"·data-group-id="1746841960-27">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="ss">once</[·...·truncated·by·diffoscope;·len:·154,·SHA:·a3ed1c35a9ca1b738a4ea6bd711aaf72182f4735243475cea73f5f18b1236b54·...·]-25">)</span><span·class="p">,</span><span·class="w">
217 ····</span><span·class="k">receive</span><span·class="w">217 ····</span><span·class="k">receive</span><span·class="w">
218 ········</span><span·class="p"·data-group-id="4373873613-28">{</span><span·class="ss">tcp</span><span·class="p">,</span><span·class="n">S</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="4373873613-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">218 ········</span><span·class="p"·data-group-id="1746841960-28">{</span><span·class="ss">tcp</span><span·class="p">,</span><span·class="n">S</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="1746841960-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
219 ············</span><span·class="n">Answer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">process</span><span·class="p"·data-group-id="4373873613-29">(</span><span·class="n">Data</span><span·class="p"·data-group-id="4373873613-29">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Not·implemented·in·this·example</span><span·class="w">219 ············</span><span·class="n">Answer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">process</span><span·class="p"·data-group-id="1746841960-29">(</span><span·class="n">Data</span><span·class="p"·data-group-id="1746841960-29">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Not·implemented·in·this·example</span><span·class="w">
220 ············</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="4373873613-30">(</span><span·class="n">S</span><span·class="p">,</span><span·class="n">Answer</span><span·class="p"·data-group-id="4373873613-30">)</span><span·class="p">,</span><span·class="w">220 ············</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="1746841960-30">(</span><span·class="n">S</span><span·class="p">,</span><span·class="n">Answer</span><span·class="p"·data-group-id="1746841960-30">)</span><span·class="p">,</span><span·class="w">
221 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="4373873613-31">(</span><span·class="n">S</span><span·class="p"·data-group-id="4373873613-31">)</span><span·class="p">;</span><span·class="w">221 ············</span><span·class="nf">loop</span><span·class="p"·data-group-id="1746841960-31">(</span><span·class="n">S</span><span·class="p"·data-group-id="1746841960-31">)</span><span·class="p">;</span><span·class="w">
222 ········</span><span·class="p"·data-group-id="4373873613-32">{</span><span·class="ss">tcp_closed</span><span·class="p">,</span><span·class="n">S</span><span·class="p"·data-group-id="4373873613-32">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 ········</span><span·class="p"·data-group-id="1746841960-32">{</span><span·class="ss">tcp_closed</span><span·class="p">,</span><span·class="n">S</span><span·class="p"·data-group-id="1746841960-32">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4373873613-33">(</span><span·class="s">&quot;Socket·</span><span·class="si">~w</span><span·class="s">·closed·[</span><span·class="si">~w</span><span·class="s">]</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·323,·SHA:·db35bf6b222d7a29cbc252fea5ce4c23941863242a0dd8c4cb7586b9d26ee809·...·]-33">)</span><span·class="p">,</span><span·class="w">223 ············</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1746841960-33">(</span><span·class="s">&quot;Socket·</span><span·class="si">~w</span><span·class="s">·closed·[</span><span·class="si">~w</span><span·class="s">]</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·323,·SHA:·9946e899718058eef5d9e6107b6358c3f0d3a83e15b653e1c951ff003e57ab19·...·]-33">)</span><span·class="p">,</span><span·class="w">
224 ············</span><span·class="ss">ok</span><span·class="w">224 ············</span><span·class="ss">ok</span><span·class="w">
225 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Example·of·a·simple·client:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">client</span><span·class="p"·data-group-id="6865065716-1">(</span><span·class="n">PortNo</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="6865065716-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">225 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Example·of·a·simple·client:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">client</span><span·class="p"·data-group-id="2050797622-1">(</span><span·class="n">PortNo</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="2050797622-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
226 ····</span><span·class="p"·data-group-id="6865065716-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Sock</span><span·class="p"·data-group-id="6865065716-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><[·...·truncated·by·diffoscope;·len:·458,·SHA:·c37546c6920eb511a13cef8a0cded3774f50966253ff0599682626c5041469a2·...·]-5">}</span><span·class="p">,</span><span·class="w">226 ····</span><span·class="p"·data-group-id="2050797622-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Sock</span><span·class="p"·data-group-id="2050797622-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><[·...·truncated·by·diffoscope;·len:·458,·SHA:·42c3c9e3bf2afc0941cd7dfc22677a1329d6267a1ca8f7bd5c62f37413d065c4·...·]-5">}</span><span·class="p">,</span><span·class="w">
227 ····················································</span><span·class="p"·data-group-id="6865065716-6">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="6865065716-6">}</span><span·class="p"·data-group-id="6865065716-4">]</span><span·class="p"·data-group-id="6865065716-3">)</span><span·class="p">,</span><span·class="w">227 ····················································</span><span·class="p"·data-group-id="2050797622-6">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2050797622-6">}</span><span·class="p"·data-group-id="2050797622-4">]</span><span·class="p"·data-group-id="2050797622-3">)</span><span·class="p">,</span><span·class="w">
228 ····</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="6865065716-7">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="6865065716-7">)</span><span·class="p">,</span><span·class="w">228 ····</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="2050797622-7">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="2050797622-7">)</span><span·class="p">,</span><span·class="w">
229 ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="6865065716-8">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="6865065716-8">)</span><span·class="p">,</span><span·class="w">229 ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="2050797622-8">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="2050797622-8">)</span><span·class="p">,</span><span·class="w">
230 ····</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6865065716-9">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="6865065716-9">)</span><span·class="p">,</span><span·class="w">230 ····</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="2050797622-9">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="2050797622-9">)</span><span·class="p">,</span><span·class="w">
231 ····</span><span·class="n">A</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">send</code>·call·does·not·accept·a·time-out·option·because·time-outs·on·send·is231 ····</span><span·class="n">A</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">send</code>·call·does·not·accept·a·time-out·option·because·time-outs·on·send·is
232 handled·through·socket·option·<code·class="inline">send_timeout</code>.·The·behavior·of·a·send·operation232 handled·through·socket·option·<code·class="inline">send_timeout</code>.·The·behavior·of·a·send·operation
233 with·no·receiver·is·mainly·defined·by·the·underlying·TCP·stack·and·the·network233 with·no·receiver·is·mainly·defined·by·the·underlying·TCP·stack·and·the·network
234 infrastructure.·To·write·code·that·handles·a·hanging·receiver·that·can234 infrastructure.·To·write·code·that·handles·a·hanging·receiver·that·can
235 eventually·cause·the·sender·to·hang·on·a·<code·class="inline">send</code>·do·like·the·following.</p><p>Consider·a·process·that·receives·data·from·a·client·process·to·be·forwarded·to·a235 eventually·cause·the·sender·to·hang·on·a·<code·class="inline">send</code>·do·like·the·following.</p><p>Consider·a·process·that·receives·data·from·a·client·process·to·be·forwarded·to·a
236 server·on·the·network.·The·process·is·connected·to·the·server·through·TCP/IP·and236 server·on·the·network.·The·process·is·connected·to·the·server·through·TCP/IP·and
237 does·not·get·any·acknowledge·for·each·message·it·sends,·but·has·to·rely·on·the237 does·not·get·any·acknowledge·for·each·message·it·sends,·but·has·to·rely·on·the
238 send·time-out·option·to·detect·that·the·other·end·is·unresponsive.·Option238 send·time-out·option·to·detect·that·the·other·end·is·unresponsive.·Option
239 <code·class="inline">send_timeout</code>·can·be·used·when·connecting:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">239 <code·class="inline">send_timeout</code>·can·be·used·when·connecting:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
240 </span><span·class="p"·data-group-id="3243668310-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Sock</span><span·class="p"·data-group-id="3243668310-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><[·...·truncated·by·diffoscope;·len:·95,·SHA:·28329d429f43a5d3969b8b8a63ce2332b789849aa2a26fa167b04063174fd967·...·]-2">(</span><span·class="n">HostAddress</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">240 </span><span·class="p"·data-group-id="9638996019-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Sock</span><span·class="p"·data-group-id="9638996019-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><[·...·truncated·by·diffoscope;·len:·95,·SHA:·7e6ef1cbfc76ffb67741c4e7874c2eceac74f1ecdf4aecc4c6a786607e8f30c7·...·]-2">(</span><span·class="n">HostAddress</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">
241 ····························</span><span·class="p"·data-group-id="3243668310-3">[</span><span·class="p"·data-group-id="3243668310-4">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="3243668310-4">}</span><span·class="p">,</span><span·class="w">241 ····························</span><span·class="p"·data-group-id="9638996019-3">[</span><span·class="p"·data-group-id="9638996019-4">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="9638996019-4">}</span><span·class="p">,</span><span·class="w">
242 ·····························</span><span·class="p"·data-group-id="3243668310-5">{</span><span·class="ss">send_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5000</span><span·class="p"·data-group-id="3243668310-5">}</span><span·class="p">,</span><span·class="w">242 ·····························</span><span·class="p"·data-group-id="9638996019-5">{</span><span·class="ss">send_timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5000</span><span·class="p"·data-group-id="9638996019-5">}</span><span·class="p">,</span><span·class="w">
243 ·····························</span><span·class="p"·data-group-id="3243668310-6">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3243668310-6">}</span><span·class="p"·data-group-id="3243668310-3">]</span><span·class="p"·data-group-id="3243668310-2">)</span><span·class="p">,</span><span·class="w">243 ·····························</span><span·class="p"·data-group-id="9638996019-6">{</span><span·class="ss">packet</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9638996019-6">}</span><span·class="p"·data-group-id="9638996019-3">]</span><span·class="p"·data-group-id="9638996019-2">)</span><span·class="p">,</span><span·class="w">
244 ················</span><span·class="nf">loop</span><span·class="p"·data-group-id="3243668310-7">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="3243668310-7">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·See·below</span><span·class="w">244 ················</span><span·class="nf">loop</span><span·class="p"·data-group-id="9638996019-7">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="9638996019-7">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·See·below</span><span·class="w">
245 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>In·the·loop·where·requests·are·handled,·send·time-outs·can·now·be·detected:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="0249478419-1">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0249478419-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">245 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>In·the·loop·where·requests·are·handled,·send·time-outs·can·now·be·detected:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">loop</span><span·class="p"·data-group-id="7882529866-1">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7882529866-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
246 ····</span><span·class="k">receive</span><span·class="w">246 ····</span><span·class="k">receive</span><span·class="w">
247 ········</span><span·class="p"·data-group-id="0249478419-2">{</span><span·class="n">Client</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">send_data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Binary</span><span·class="p"·data-group-id="0249478419-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">247 ········</span><span·class="p"·data-group-id="7882529866-2">{</span><span·class="n">Client</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">send_data</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Binary</span><span·class="p"·data-group-id="7882529866-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
248 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="0249478419-3">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="p"·data-group-id="0249478419-4">[</span><span·class="n">Binary</span><span·class="p"·data-group-id="0249478419-4">]</span><span·class="p"·data-group-id="0249478419-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">248 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="7882529866-3">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="p"·data-group-id="7882529866-4">[</span><span·class="n">Binary</span><span·class="p"·data-group-id="7882529866-4">]</span><span·class="p"·data-group-id="7882529866-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
249 ················</span><span·class="p"·data-group-id="0249478419-5">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="p"·data-group-id="0249478419-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">249 ················</span><span·class="p"·data-group-id="7882529866-5">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="p"·data-group-id="7882529866-5">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
250 ····················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0249478419-6">(</span><span·class="s">&quot;Send·timeout,·closing!</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">250 ····················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7882529866-6">(</span><span·class="s">&quot;Send·timeout,·closing!</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
251 ······························</span><span·class="p"·data-group-id="0249478419-7">[</span><span·class="p"·data-group-id="0249478419-7">]</span><span·class="p"·data-group-id="0249478419-6">)</span><span·class="p">,</span><span·class="w">251 ······························</span><span·class="p"·data-group-id="7882529866-7">[</span><span·class="p"·data-group-id="7882529866-7">]</span><span·class="p"·data-group-id="7882529866-6">)</span><span·class="p">,</span><span·class="w">
252 ····················</span><span·class="nf">handle_send_timeout</span><span·class="p"·data-group-id="0249478419-8">(</span><span·class="p"·data-group-id="0249478419-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Not·implemented·here</span><span·class="w">252 ····················</span><span·class="nf">handle_send_timeout</span><span·class="p"·data-group-id="7882529866-8">(</span><span·class="p"·data-group-id="7882529866-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Not·implemented·here</span><span·class="w">
253 ····················</span><span·class="n">Client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0249478419-9">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0249478419-10">(</span><span·class="p"·data-group-id="0249478419-10">)</span><span·class="p">,</span><span·class="p"·data-group-id="0249478419-11">{</span><span·class="ss">err[·...·truncated·by·diffoscope;·len:·191,·SHA:·167087a90a9246a9582e804ac3f9be1091db69d02596466bac4da4ac08c39b26·...·]-9">}</span><span·class="p">,</span><span·class="w">253 ····················</span><span·class="n">Client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7882529866-9">{</span><span·class="nf">self</span><span·class="p"·data-group-id="7882529866-10">(</span><span·class="p"·data-group-id="7882529866-10">)</span><span·class="p">,</span><span·class="p"·data-group-id="7882529866-11">{</span><span·class="ss">err[·...·truncated·by·diffoscope;·len:·191,·SHA:·e36e2b7de251f92e2cfef4b8d4da915218b93ef99d1b11f6e0dbaebbd34e22d8·...·]-9">}</span><span·class="p">,</span><span·class="w">
254 ····················</span><span·class="c1">%%·Usually,·it&#39;s·a·good·idea·to·give·up·in·case·of·a</span><span·class="w">254 ····················</span><span·class="c1">%%·Usually,·it&#39;s·a·good·idea·to·give·up·in·case·of·a</span><span·class="w">
255 ····················</span><span·class="c1">%%·send·timeout,·as·you·never·know·how·much·actually</span><span·class="w">255 ····················</span><span·class="c1">%%·send·timeout,·as·you·never·know·how·much·actually</span><span·class="w">
256 ····················</span><span·class="c1">%%·reached·the·server,·maybe·only·a·packet·header?!</span><span·class="w">256 ····················</span><span·class="c1">%%·reached·the·server,·maybe·only·a·packet·header?!</span><span·class="w">
257 ····················</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="0249478419-12">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0249478419-12">)</span><span·class="p">;</span><span·class="w">257 ····················</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="7882529866-12">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7882529866-12">)</span><span·class="p">;</span><span·class="w">
258 ················</span><span·class="p"·data-group-id="0249478419-13">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherSendError</span><span·class="p"·data-group-id="0249478419-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">258 ················</span><span·class="p"·data-group-id="7882529866-13">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherSendError</span><span·class="p"·data-group-id="7882529866-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
259 ····················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0249478419-14">(</span><span·class="s">&quot;Some·other·error·on·socket·(</span><span·class="si">~p</span><span·class="s">),·closing&quot;</span><span·class="p">,</span><span·class="w">259 ····················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7882529866-14">(</span><span·class="s">&quot;Some·other·error·on·socket·(</span><span·class="si">~p</span><span·class="s">),·closing&quot;</span><span·class="p">,</span><span·class="w">
260 ······························</span><span·class="p"·data-group-id="0249478419-15">[</span><span·class="n">OtherSendError</span><span·class="p"·data-group-id="0249478419-15">]</span><span·class="p"·data-group-id="0249478419-14">)</span><span·class="p">,</span><span·class="w">260 ······························</span><span·class="p"·data-group-id="7882529866-15">[</span><span·class="n">OtherSendError</span><span·class="p"·data-group-id="7882529866-15">]</span><span·class="p"·data-group-id="7882529866-14">)</span><span·class="p">,</span><span·class="w">
261 ····················</span><span·class="n">Client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0249478419-16">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0249478419-17">(</span><span·class="p"·data-group-id="0249478419-17">)</span><span·class="p">,</span><span·class="p"·data-group-id="0249478419-18">{</span><span·class="ss">er[·...·truncated·by·diffoscope;·len:·198,·SHA:·863fb08ad6e848dd8d1b7aa3dfd4d58c7301ce27cc6db9ed5074a98810dd3bf2·...·]-16">}</span><span·class="p">,</span><span·class="w">261 ····················</span><span·class="n">Client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7882529866-16">{</span><span·class="nf">self</span><span·class="p"·data-group-id="7882529866-17">(</span><span·class="p"·data-group-id="7882529866-17">)</span><span·class="p">,</span><span·class="p"·data-group-id="7882529866-18">{</span><span·class="ss">er[·...·truncated·by·diffoscope;·len:·198,·SHA:·1f197dfd5e819ac74b667017fcf2bb991fb91fa4343bf5afbde67ba9a863ebb4·...·]-16">}</span><span·class="p">,</span><span·class="w">
262 ····················</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="0249478419-19">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0249478419-19">)</span><span·class="p">;</span><span·class="w">262 ····················</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="7882529866-19">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7882529866-19">)</span><span·class="p">;</span><span·class="w">
263 ················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">263 ················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
264 ····················</span><span·class="n">Client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0249478419-20">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0249478419-21">(</span><span·class="p"·data-group-id="0249478419-21">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">data_sent</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·a7c4e3712cd7dc9b66aedb09a01918c610d1797be1e25bdcabc784a0728ee569·...·]-20">}</span><span·class="p">,</span><span·class="w">264 ····················</span><span·class="n">Client</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7882529866-20">{</span><span·class="nf">self</span><span·class="p"·data-group-id="7882529866-21">(</span><span·class="p"·data-group-id="7882529866-21">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">data_sent</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·704c016b302694eaabb3cc5978810a5e2aa113aa45d6dec0bdc6719fb1c5c5e2·...·]-20">}</span><span·class="p">,</span><span·class="w">
265 ····················</span><span·class="nf">loop</span><span·class="p"·data-group-id="0249478419-22">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0249478419-22">)</span><span·class="w">265 ····················</span><span·class="nf">loop</span><span·class="p"·data-group-id="7882529866-22">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7882529866-22">)</span><span·class="w">
266 ············</span><span·class="k">end</span><span·class="w">266 ············</span><span·class="k">end</span><span·class="w">
267 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Usually·it·suffices·to·detect·time-outs·on·receive,·as·most·protocols·include267 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Usually·it·suffices·to·detect·time-outs·on·receive,·as·most·protocols·include
268 some·sort·of·acknowledgment·from·the·server,·but·if·the·protocol·is·strictly·one268 some·sort·of·acknowledgment·from·the·server,·but·if·the·protocol·is·strictly·one
269 way,·option·<code·class="inline">send_timeout</code>·comes·in·handy.</p>269 way,·option·<code·class="inline">send_timeout</code>·comes·in·handy.</p>
270 ····</section>270 ····</section>
  
Max diff block lines reached; 0/60835 bytes (0.00%) of diff not shown.
7.42 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/gen_udp.html
    
Offset 956, 25 lines modifiedOffset 956, 25 lines modified
956 time-to-live·(TTL)·for·outgoing·multicast·datagrams·to·control·the·scope·of956 time-to-live·(TTL)·for·outgoing·multicast·datagrams·to·control·the·scope·of
957 the·multicasts.</p><p>Datagrams·with·a·TTL·of·1·are·not·forwarded·beyond·the·local·network.957 the·multicasts.</p><p>Datagrams·with·a·TTL·of·1·are·not·forwarded·beyond·the·local·network.
958 Defaults·to·<code·class="inline">1</code>.</p></li><li><p><strong><code·class="inline">{add_membership, {MultiAddress, InterfaceAddress}}</code></strong>·-958 Defaults·to·<code·class="inline">1</code>.</p></li><li><p><strong><code·class="inline">{add_membership, {MultiAddress, InterfaceAddress}}</code></strong>·-
959 Joins·a·multicast·group.</p></li><li><p><strong><code·class="inline">{drop_membership, {MultiAddress, InterfaceAddress}}</code></strong>·-959 Joins·a·multicast·group.</p></li><li><p><strong><code·class="inline">{drop_membership, {MultiAddress, InterfaceAddress}}</code></strong>·-
960 Leaves·a·multicast·group.</p></li><li><p><strong><a·href="#t:option/0"><code·class="inline">option/0</code></a></strong>·-·See·<a·href="inet.html#setopts/2"><code·class="inline">inet:setopts/2</code></a>.</p></li></ul><p>UDP·packets·are·sent·with·this·socket·using·<a·href="#send/3"><code·class="inline">send(Socket, ...)</code></a>.960 Leaves·a·multicast·group.</p></li><li><p><strong><a·href="#t:option/0"><code·class="inline">option/0</code></a></strong>·-·See·<a·href="inet.html#setopts/2"><code·class="inline">inet:setopts/2</code></a>.</p></li></ul><p>UDP·packets·are·sent·with·this·socket·using·<a·href="#send/3"><code·class="inline">send(Socket, ...)</code></a>.
961 When·UDP·packets·arrive·to·the·<code·class="inline">Socket</code>'s·UDP·port,·and·the·socket·is·in961 When·UDP·packets·arrive·to·the·<code·class="inline">Socket</code>'s·UDP·port,·and·the·socket·is·in
962 an·<em>active·mode</em>,·the·packets·are·delivered·as·messages·to·the962 an·<em>active·mode</em>,·the·packets·are·delivered·as·messages·to·the
963 controlling·process·(socket·owner):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1609823729-1">{</span><span·class="ss">udp</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p">,</span><span·class="err"> </span><span·class="n">PeerIP</span><span·class="p">,</span><span·class="err"> </span>[·...·truncated·by·diffoscope;·len:·151,·SHA:·b6a4b22e738b0939ec643814b0bc17e0c0ce0329c728d75e161c0699b0d55df6·...·]-1">}</span><span·class="w">·</span><span·class="c1">%·Without·ancillary·data</span><span·class="w">963 controlling·process·(socket·owner):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1168808832-1">{</span><span·class="ss">udp</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p">,</span><span·class="err"> </span><span·class="n">PeerIP</span><span·class="p">,</span><span·class="err"> </span>[·...·truncated·by·diffoscope;·len:·151,·SHA:·392c0a49811fbd22c0080333439413774d614c004cd693c52df4208ea24447ce·...·]-1">}</span><span·class="w">·</span><span·class="c1">%·Without·ancillary·data</span><span·class="w">
964 </span><span·class="p"·data-group-id="1609823729-2">{</span><span·class="ss">udp</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p">,</span><span·class="err"> </span><span·class="n">PeerIP</span><span·class="p">,</span><span·class="err"> </span>[·...·truncated·by·diffoscope;·len:·231,·SHA:·4cefee340802ae4da68dd29f092eb3c4f40c82daf611b74896d4664441685096·...·]-2">}</span><span·class="w">·</span><span·class="c1">%·With·ancillary·data</span></code></pre><p><code·class="inline">PeerIP</code>·and·<code·class="inline">PeerPort</code>·are·the·address·from·which·<code·class="inline">Packet</code>·was·sent.964 </span><span·class="p"·data-group-id="1168808832-2">{</span><span·class="ss">udp</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p">,</span><span·class="err"> </span><span·class="n">PeerIP</span><span·class="p">,</span><span·class="err"> </span>[·...·truncated·by·diffoscope;·len:·231,·SHA:·a1624b68fb0cbe5c7d97b5e0a7d9c76bc415408e58c93201b273c1193989b9ce·...·]-2">}</span><span·class="w">·</span><span·class="c1">%·With·ancillary·data</span></code></pre><p><code·class="inline">PeerIP</code>·and·<code·class="inline">PeerPort</code>·are·the·address·from·which·<code·class="inline">Packet</code>·was·sent.
965 <code·class="inline">Packet</code>·is·a·list·of·bytes·(<code·class="inline">[</code><a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a><code·class="inline">]</code>·if·option·<code·class="inline">list</code>965 <code·class="inline">Packet</code>·is·a·list·of·bytes·(<code·class="inline">[</code><a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a><code·class="inline">]</code>·if·option·<code·class="inline">list</code>
966 is·active·and·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0"><code·class="inline">binary/0</code></a>·if·option·<code·class="inline">binary</code>is·active966 is·active·and·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0"><code·class="inline">binary/0</code></a>·if·option·<code·class="inline">binary</code>is·active
967 (they·are·mutually·exclusive).</p><p>The·message·contains·an·<code·class="inline">AncData</code>·field·only·if·any·of·the·socket967 (they·are·mutually·exclusive).</p><p>The·message·contains·an·<code·class="inline">AncData</code>·field·only·if·any·of·the·socket
968 <a·href="#t:option/0">options</a>·<a·href="inet.html#option-recvtos"><code·class="inline">recvtos</code></a>,968 <a·href="#t:option/0">options</a>·<a·href="inet.html#option-recvtos"><code·class="inline">recvtos</code></a>,
969 <a·href="inet.html#option-recvtclass"><code·class="inline">recvtclass</code></a>·or969 <a·href="inet.html#option-recvtclass"><code·class="inline">recvtclass</code></a>·or
970 <a·href="inet.html#option-recvttl"><code·class="inline">recvttl</code></a>·are·active.</p><p>When·a·socket·in·<code·class="inline">{active, N}</code>·mode·(see·<a·href="inet.html#setopts/2"><code·class="inline">inet:setopts/2</code></a>·for·details),970 <a·href="inet.html#option-recvttl"><code·class="inline">recvttl</code></a>·are·active.</p><p>When·a·socket·in·<code·class="inline">{active, N}</code>·mode·(see·<a·href="inet.html#setopts/2"><code·class="inline">inet:setopts/2</code></a>·for·details),
971 transitions·to·passive·(<code·class="inline">{active, false}</code>)·mode·(<code·class="inline">N</code>·counts·down·to·<code·class="inline">0</code>),971 transitions·to·passive·(<code·class="inline">{active, false}</code>)·mode·(<code·class="inline">N</code>·counts·down·to·<code·class="inline">0</code>),
972 the·controlling·process·is·notified·by·a·message·on·this·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9364951236-1">{</span><span·class="ss">udp_passive</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p"·data-group-id="9364951236-1">}</span></code></pre><p>If·the·OS·protocol·stack·reports·an·error·for·the·socket,·the·following972 the·controlling·process·is·notified·by·a·message·on·this·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9477819015-1">{</span><span·class="ss">udp_passive</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p"·data-group-id="9477819015-1">}</span></code></pre><p>If·the·OS·protocol·stack·reports·an·error·for·the·socket,·the·following
973 message·is·sent·to·the·controlling·process:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5391164019-1">{</span><span·class="ss">udp_error</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Reason</span><span·class="p"·data-group-id="5391164019-1">}</span></code></pre><p><code·class="inline">Reason</code>·is·mostly·a·<a·href="inet.html#posix-error-codes">POSIX·Error·Code</a>.</p><p>If·the·socket·is·in·<em>passive·mode</em>·(not·in·an·<em>active·mode</em>),·received·data973 message·is·sent·to·the·controlling·process:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5096654825-1">{</span><span·class="ss">udp_error</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Socket</span><span·class="p">,</span><span·class="err"> </span><span·class="n">Reason</span><span·class="p"·data-group-id="5096654825-1">}</span></code></pre><p><code·class="inline">Reason</code>·is·mostly·a·<a·href="inet.html#posix-error-codes">POSIX·Error·Code</a>.</p><p>If·the·socket·is·in·<em>passive·mode</em>·(not·in·an·<em>active·mode</em>),·received·data
974 can·be·retrieved·with·the<code·class="inline">recv/2,3</code>](<a·href="#recv/2"><code·class="inline">recv/2</code></a>)·calls.·Note·that·incoming974 can·be·retrieved·with·the<code·class="inline">recv/2,3</code>](<a·href="#recv/2"><code·class="inline">recv/2</code></a>)·calls.·Note·that·incoming
975 UDP·packets·that·are·longer·than·the·receive·buffer·option·specifies975 UDP·packets·that·are·longer·than·the·receive·buffer·option·specifies
976 can·be·truncated·without·warning.</p><p>The·default·value·for·the·receive·buffer·option·is·<code·class="inline">{recbuf, 8192}</code>.</p>976 can·be·truncated·without·warning.</p><p>The·default·value·for·the·receive·buffer·option·is·<code·class="inline">{recbuf, 8192}</code>.</p>
977 ··</section>977 ··</section>
978 </section>978 </section>
979 <section·class="detail"·id="recv/2">979 <section·class="detail"·id="recv/2">
  
2.93 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/global_group.html
    
Offset 128, 15 lines modifiedOffset 128, 15 lines modified
  
  
128 ····<section·id="moduledoc">128 ····<section·id="moduledoc">
129 <p>Grouping·nodes·to·global·name·registration·groups.</p><p>This·module·makes·it·possible·to·partition·the·nodes·of·a·system·into·<em>global129 <p>Grouping·nodes·to·global·name·registration·groups.</p><p>This·module·makes·it·possible·to·partition·the·nodes·of·a·system·into·<em>global
130 groups</em>.·Each·global·group·has·its·own·global·namespace,·see·<a·href="global.html"><code·class="inline">global</code></a>.</p><p>The·main·advantage·of·dividing·systems·into·global·groups·is·that·the·background130 groups</em>.·Each·global·group·has·its·own·global·namespace,·see·<a·href="global.html"><code·class="inline">global</code></a>.</p><p>The·main·advantage·of·dividing·systems·into·global·groups·is·that·the·background
131 load·decreases·while·the·number·of·nodes·to·be·updated·is·reduced·when131 load·decreases·while·the·number·of·nodes·to·be·updated·is·reduced·when
132 manipulating·globally·registered·names.</p><p>The·Kernel·configuration·parameter·<a·href="kernel_app.html#global_groups"><code·class="inline">global_groups</code></a>132 manipulating·globally·registered·names.</p><p>The·Kernel·configuration·parameter·<a·href="kernel_app.html#global_groups"><code·class="inline">global_groups</code></a>
133 defines·the·global·groups:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2666034401-1">{</span><span·class="ss">global_groups</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2666034401-2">[</span><span·class="n">GroupTuple</span><span·class="w">·</span><span·class="p">:</span><span·class="p"[·...·truncated·by·diffoscope;·len:·268,·SHA:·73f9777834831e01d3e10a79be01d5f325a8c8e53ee945933e55b307f678bb83·...·]-1">}</span></code></pre><p>For·the·processes·and·nodes·to·run·smoothly·using·the·global·group133 defines·the·global·groups:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6676607756-1">{</span><span·class="ss">global_groups</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6676607756-2">[</span><span·class="n">GroupTuple</span><span·class="w">·</span><span·class="p">:</span><span·class="p"[·...·truncated·by·diffoscope;·len:·268,·SHA:·2793020c0901c38bca75f661fde0ef287be438fc415d9218e53323f1abefe35a·...·]-1">}</span></code></pre><p>For·the·processes·and·nodes·to·run·smoothly·using·the·global·group
134 functionality,·the·following·criteria·must·be·met:</p><ul><li>An·instance·of·the·global·group·server,·<code·class="inline">global_group</code>,·must·be·running·on134 functionality,·the·following·criteria·must·be·met:</p><ul><li>An·instance·of·the·global·group·server,·<code·class="inline">global_group</code>,·must·be·running·on
135 each·node.·The·processes·are·automatically·started·and·synchronized·when·a135 each·node.·The·processes·are·automatically·started·and·synchronized·when·a
136 node·is·started.</li><li>All·involved·nodes·must·agree·on·the·global·group·definition,·otherwise·the136 node·is·started.</li><li>All·involved·nodes·must·agree·on·the·global·group·definition,·otherwise·the
137 behavior·of·the·system·is·undefined.</li><li><em>All</em>·nodes·in·the·system·must·belong·to·exactly·one·global·group.</li></ul><p>In·the·following·descriptions,·a·<em>group·node</em>·is·a·node·belonging·to·the·same137 behavior·of·the·system·is·undefined.</li><li><em>All</em>·nodes·in·the·system·must·belong·to·exactly·one·global·group.</li></ul><p>In·the·following·descriptions,·a·<em>group·node</em>·is·a·node·belonging·to·the·same
138 global·group·as·the·local·node.</p><h2·id="module-notes"·class="section-heading">138 global·group·as·the·local·node.</p><h2·id="module-notes"·class="section-heading">
139 ··<a·href="#module-notes"·class="hover-link">139 ··<a·href="#module-notes"·class="hover-link">
140 ····<i·class="ri-link-m"·aria-hidden="true"></i>140 ····<i·class="ri-link-m"·aria-hidden="true"></i>
34.3 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/inet.html
    
Offset 147, 27 lines modifiedOffset 147, 27 lines modified
147 inet_default_listen_options·'[{delay_send,true}]'</code></pre><p><strong>Please·note</strong>·that·the·default·option·<code·class="inline">{active,·true}</code>·cannot·be·changed,147 inet_default_listen_options·'[{delay_send,true}]'</code></pre><p><strong>Please·note</strong>·that·the·default·option·<code·class="inline">{active,·true}</code>·cannot·be·changed,
148 for·internal·implementation·reasons.</p><p>Addresses·as·inputs·to·functions·can·be·either·a·string·or·a·tuple.148 for·internal·implementation·reasons.</p><p>Addresses·as·inputs·to·functions·can·be·either·a·string·or·a·tuple.
149 For·example,·the·IP·address·150.236.20.73·can·be·passed·to149 For·example,·the·IP·address·150.236.20.73·can·be·passed·to
150 <a·href="#gethostbyaddr/1"><code·class="inline">gethostbyaddr/1</code></a>,·either·as·a·string·<code·class="inline">&quot;150.236.20.73&quot;</code>150 <a·href="#gethostbyaddr/1"><code·class="inline">gethostbyaddr/1</code></a>,·either·as·a·string·<code·class="inline">&quot;150.236.20.73&quot;</code>
151 or·as·a·tuple·<code·class="inline">{150, 236, 20, 73}</code>.</p><p><em>IPv4·address·examples:</em></p><pre><code·class="text">Address··········ip_address()151 or·as·a·tuple·<code·class="inline">{150, 236, 20, 73}</code>.</p><p><em>IPv4·address·examples:</em></p><pre><code·class="text">Address··········ip_address()
152 -------··········------------152 -------··········------------
153 127.0.0.1········{127,0,0,1}153 127.0.0.1········{127,0,0,1}
154 192.168.42.2·····{192,168,42,2}</code></pre><p><em>IPv6·address·examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Address</span><span·class="w">··········</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="9419756957-1">(</span><span·class="p"·data-group-id="9419756957-1">)</span><span·class="w">154 192.168.42.2·····{192,168,42,2}</code></pre><p><em>IPv6·address·examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Address</span><span·class="w">··········</span><span·class="nf">ip_address</span><span·class="p"·data-group-id="2259019991-1">(</span><span·class="p"·data-group-id="2259019991-1">)</span><span·class="w">
155 </span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">··········</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="w">155 </span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">-</span><span·class="w">··········</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="o">--</span><span·class="w">
156 </span><span·class="p">:</span><span·class="p">:</span><span·class="mi">1</span><span·class="w">·············</span><span·class="p"·data-group-id="9419756957-2">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·175,·SHA:·fbe8801e55930b6a995efc7f8e52f07c3e667431c12ac92dff0103e0470a861e·...·]-2">}</span><span·class="w">156 </span><span·class="p">:</span><span·class="p">:</span><span·class="mi">1</span><span·class="w">·············</span><span·class="p"·data-group-id="2259019991-2">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·175,·SHA:·2c258e3ee566356aa7acd9c34ccab78bd4257a253ddf0f0925f43eb490277c4a·...·]-2">}</span><span·class="w">
157 </span><span·class="p">:</span><span·class="p">:</span><span·class="mf">192.168</span><span·class="p">.</span><span·class="mf">42.2</span><span·class="w">··</span><span·class="p"·data-group-id="9419756957-3">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·792,·SHA:·32440b979eabb3dc753a5808ebbf01451d975463700551d6be9ec9bf22be841e·...·]-3">}</span><span·class="w">157 </span><span·class="p">:</span><span·class="p">:</span><span·class="mf">192.168</span><span·class="p">.</span><span·class="mf">42.2</span><span·class="w">··</span><span·class="p"·data-group-id="2259019991-3">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·792,·SHA:·865dc165df51b881a0921ca85d2158c0b740da1b272b00ac4e4efbd2ac2aa19b·...·]-3">}</span><span·class="w">
158 </span><span·class="p">:</span><span·class="p">:</span><span·class="n">FFFF</span><span·class="p">:</span><span·class="mf">192.168</span><span·class="p">.</span><span·class="mf">42.2</span><span·class="w">158 </span><span·class="p">:</span><span·class="p">:</span><span·class="n">FFFF</span><span·class="p">:</span><span·class="mf">192.168</span><span·class="p">.</span><span·class="mf">42.2</span><span·class="w">
159 ················</span><span·class="p"·data-group-id="9419756957-6">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·798,·SHA:·dadab715520f8cf0283013780fa6d8e663f062ada94d6f0a7b1eae377d8c25ca·...·]-6">}</span><span·class="w">159 ················</span><span·class="p"·data-group-id="2259019991-6">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·798,·SHA:·62bc7fadbdd53407c4059f4adaa74ecca806bb3f27a7263faf5d69f7323c265c·...·]-6">}</span><span·class="w">
160 </span><span·class="mi">3</span><span·class="nc">ffe</span><span·class="p">:</span><span·class="nc">b80</span><span·class="p">:</span><span·class="mi">1</span><span·class="nc">f8d</span><span·class="p">:</span><span·class="mi">2</span><span·class="p">:</span><span·class="mi">204</span><span·class="p">:</span><span·class="nc">acff</span><span·class="p">:</span><span·class="nc">fe17</span><span·class="p">:</span><span·class="ss">bf38</span><span·class="w">160 </span><span·class="mi">3</span><span·class="nc">ffe</span><span·class="p">:</span><span·class="nc">b80</span><span·class="p">:</span><span·class="mi">1</span><span·class="nc">f8d</span><span·class="p">:</span><span·class="mi">2</span><span·class="p">:</span><span·class="mi">204</span><span·class="p">:</span><span·class="nc">acff</span><span·class="p">:</span><span·class="nc">fe17</span><span·class="p">:</span><span·class="ss">bf38</span><span·class="w">
161 ················</span><span·class="p"·data-group-id="9419756957-9">{</span><span·class="mi">16#3ffe</span><span·class="p">,</span><span·class="mi">16#b80</span><span·class="p">,</span><span·class="mi">16#1f8d</span><span·class="p">,</span><span·class="mi">16#2</span><span·class="p">,</span><span·class="mi">1[·...·truncated·by·diffoscope;·len:·218,·SHA:·de1db7c43341cf016cbf18563e9c03afb3c98abd5639f1275c6ca0ad6a9b2379·...·]-9">}</span><span·class="w">161 ················</span><span·class="p"·data-group-id="2259019991-9">{</span><span·class="mi">16#3ffe</span><span·class="p">,</span><span·class="mi">16#b80</span><span·class="p">,</span><span·class="mi">16#1f8d</span><span·class="p">,</span><span·class="mi">16#2</span><span·class="p">,</span><span·class="mi">1[·...·truncated·by·diffoscope;·len:·218,·SHA:·1fd27db80ef6a5657596c601677a00981d4c7bda07b82a285dc64758219a71ff·...·]-9">}</span><span·class="w">
162 </span><span·class="nc">fe80</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">204</span><span·class="p">:</span><span·class="nc">acff</span><span·class="p">:</span><span·class="nc">fe17</span><span·class="p">:</span><span·class="ss">bf38</span><span·class="w">162 </span><span·class="nc">fe80</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">204</span><span·class="p">:</span><span·class="nc">acff</span><span·class="p">:</span><span·class="nc">fe17</span><span·class="p">:</span><span·class="ss">bf38</span><span·class="w">
163 ················</span><span·class="p"·data-group-id="9419756957-10">{</span><span·class="mi">16#fe80</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">16#204</span><[·...·truncated·by·diffoscope;·len:·657,·SHA:·5cdf8cdd0aa1b056164998e23f8ad4db51f7e892047a77a6c7c74fd13ef2fbfb·...·]-1">)</span><span·class="p">.</span><span·class="w">163 ················</span><span·class="p"·data-group-id="2259019991-10">{</span><span·class="mi">16#fe80</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">16#204</span><[·...·truncated·by·diffoscope;·len:·657,·SHA:·3918e3f041b76da9ed39f0e9a8660ce15032d0066b88967fa15a7ce0c3419feb·...·]-1">)</span><span·class="p">.</span><span·class="w">
164 </span><span·class="p"·data-group-id="6108879090-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6108879090-3">{</span><span·class="mi">192</span><span·class="p">,</span><span·class="mi">168</span><span·class="p">,</span><span·class="mi">42</span><sp[·...·truncated·by·diffoscope;·len:·140,·SHA:·1436dce7597affe96b6b0f1a8a974ae4de45ef83dcc75d97d8fd65540623b1a7·...·]-2">}</span><span·class="gp·unselectable">164 </span><span·class="p"·data-group-id="8937803343-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8937803343-3">{</span><span·class="mi">192</span><span·class="p">,</span><span·class="mi">168</span><span·class="p">,</span><span·class="mi">42</span><sp[·...·truncated·by·diffoscope;·len:·140,·SHA:·085ec48233a2c6e094951d658653d8ac11a9614f10ac93265614e9b3bbbac120·...·]-2">}</span><span·class="gp·unselectable">
165 2&gt;·</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">parse_address</span><span·class="p"·data-group-id="6108879090-4">(</span><span·class="s">&quot;::FFFF:192.168.42.2&quot;</span><span·class="p"·data-group-id="6108879090-4">)</span><span·class="p">.</span><span·class="w">165 2&gt;·</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">parse_address</span><span·class="p"·data-group-id="8937803343-4">(</span><span·class="s">&quot;::FFFF:192.168.42.2&quot;</span><span·class="p"·data-group-id="8937803343-4">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="p"·data-group-id="6108879090-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6108879090-6">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·cl[·...·truncated·by·diffoscope;·len:·343,·SHA:·42fca7cd7c2f6ce5838397445f327c6ddef4446d8cdf84f441d1d2712551742c·...·]-5">}</span></code></pre><h2·id="module-posix-error-codes"·class="section-heading">166 </span><span·class="p"·data-group-id="8937803343-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8937803343-6">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·cl[·...·truncated·by·diffoscope;·len:·343,·SHA:·71fe295b7a8a2b93cc9adc165a343c4ec76c94506ea8ee775a60086e21140230·...·]-5">}</span></code></pre><h2·id="module-posix-error-codes"·class="section-heading">
167 ··<a·href="#module-posix-error-codes"·class="hover-link">167 ··<a·href="#module-posix-error-codes"·class="hover-link">
168 ····<i·class="ri-link-m"·aria-hidden="true"></i>168 ····<i·class="ri-link-m"·aria-hidden="true"></i>
169 ··</a>169 ··</a>
170 ··<span·class="text"><a·href=""·id="posix-error-codes"></a>·POSIX·Error·Codes</span>170 ··<span·class="text"><a·href=""·id="posix-error-codes"></a>·POSIX·Error·Codes</span>
171 </h2>171 </h2>
172 <ul><li><code·class="inline">e2big</code>·-·Too·long·argument·list</li><li><code·class="inline">eacces</code>·-·Permission·denied</li><li><code·class="inline">eaddrinuse</code>·-·Address·already·in·use</li><li><code·class="inline">eaddrnotavail</code>·-·Cannot·assign·requested·address</li><li><code·class="inline">eadv</code>·-·Advertise·error</li><li><code·class="inline">eafnosupport</code>·-·Address·family·not·supported·by·protocol·family</li><li><code·class="inline">eagain</code>·-·Resource·temporarily·unavailable</li><li><code·class="inline">ealign</code>·-·EALIGN</li><li><code·class="inline">ealready</code>·-·Operation·already·in·progress</li><li><code·class="inline">ebade</code>·-·Bad·exchange·descriptor</li><li><code·class="inline">ebadf</code>·-·Bad·file·number</li><li><code·class="inline">ebadfd</code>·-·File·descriptor·in·bad·state</li><li><code·class="inline">ebadmsg</code>·-·Not·a·data·message</li><li><code·class="inline">ebadr</code>·-·Bad·request·descriptor</li><li><code·class="inline">ebadrpc</code>·-·Bad·RPC·structure</li><li><code·class="inline">ebadrqc</code>·-·Bad·request·code</li><li><code·class="inline">ebadslt</code>·-·Invalid·slot</li><li><code·class="inline">ebfont</code>·-·Bad·font·file·format</li><li><code·class="inline">ebusy</code>·-·File·busy</li><li><code·class="inline">echild</code>·-·No·children</li><li><code·class="inline">echrng</code>·-·Channel·number·out·of·range</li><li><code·class="inline">ecomm</code>·-·Communication·error·on·send</li><li><code·class="inline">econnaborted</code>·-·Software·caused·connection·abort</li><li><code·class="inline">econnrefused</code>·-·Connection·refused</li><li><code·class="inline">econnreset</code>·-·Connection·reset·by·peer</li><li><code·class="inline">edeadlk</code>·-·Resource·deadlock·avoided</li><li><code·class="inline">edeadlock</code>·-·Resource·deadlock·avoided</li><li><code·class="inline">edestaddrreq</code>·-·Destination·address·required</li><li><code·class="inline">edirty</code>·-·Mounting·a·dirty·fs·without·force</li><li><code·class="inline">edom</code>·-·Math·argument·out·of·range</li><li><code·class="inline">edotdot</code>·-·Cross·mount·point</li><li><code·class="inline">edquot</code>·-·Disk·quota·exceeded</li><li><code·class="inline">eduppkg</code>·-·Duplicate·package·name</li><li><code·class="inline">eexist</code>·-·File·already·exists</li><li><code·class="inline">efault</code>·-·Bad·address·in·system·call·argument</li><li><code·class="inline">efbig</code>·-·File·too·large</li><li><code·class="inline">ehostdown</code>·-·Host·is·down</li><li><code·class="inline">ehostunreach</code>·-·Host·is·unreachable</li><li><code·class="inline">eidrm</code>·-·Identifier·removed</li><li><code·class="inline">einit</code>·-·Initialization·error</li><li><code·class="inline">einprogress</code>·-·Operation·now·in·progress</li><li><code·class="inline">eintr</code>·-·Interrupted·system·call</li><li><code·class="inline">einval</code>·-·Invalid·argument</li><li><code·class="inline">eio</code>·-·I/O·error</li><li><code·class="inline">eisconn</code>·-·Socket·is·already·connected</li><li><code·class="inline">eisdir</code>·-·Illegal·operation·on·a·directory</li><li><code·class="inline">eisnam</code>·-·Is·a·named·file</li><li><code·class="inline">el2hlt</code>·-·Level·2·halted</li><li><code·class="inline">el2nsync</code>·-·Level·2·not·synchronized</li><li><code·class="inline">el3hlt</code>·-·Level·3·halted</li><li><code·class="inline">el3rst</code>·-·Level·3·reset</li><li><code·class="inline">elbin</code>·-·ELBIN</li><li><code·class="inline">elibacc</code>·-·Cannot·access·a·needed·shared·library</li><li><code·class="inline">elibbad</code>·-·Accessing·a·corrupted·shared·library</li><li><code·class="inline">elibexec</code>·-·Cannot·exec·a·shared·library·directly</li><li><code·class="inline">elibmax</code>·-·Attempting·to·link·in·more·shared·libraries·than·system·limit</li><li><code·class="inline">elibscn</code>·-·<code·class="inline">.lib</code>·section·in·<code·class="inline">a.out</code>·corrupted</li><li><code·class="inline">elnrng</code>·-·Link·number·out·of·range</li><li><code·class="inline">eloop</code>·-·Too·many·levels·of·symbolic·links</li><li><code·class="inline">emfile</code>·-·Too·many·open·files</li><li><code·class="inline">emlink</code>·-·Too·many·links</li><li><code·class="inline">emsgsize</code>·-·Message·too·long</li><li><code·class="inline">emultihop</code>·-·Multihop·attempted</li><li><code·class="inline">enametoolong</code>·-·Filename·too·long</li><li><code·class="inline">enavail</code>·-·Unavailable</li><li><code·class="inline">enet</code>·-·ENET</li><li><code·class="inline">enetdown</code>·-·Network·is·down</li><li><code·class="inline">enetreset</code>·-·Network·dropped·connection·on·reset</li><li><code·class="inline">enetunreach</code>·-·Network·is·unreachable</li><li><code·class="inline">enfile</code>·-·File·table·overflow</li><li><code·class="inline">enoano</code>·-·Anode·table·overflow</li><li><code·class="inline">enobufs</code>·-·No·buffer·space·available</li><li><code·class="inline">enocsi</code>·-·No·CSI·structure·available</li><li><code·class="inline">enodata</code>·-·No·data·available</li><li><code·class="inline">enodev</code>·-·No·such·device</li><li><code·class="inline">enoent</code>·-·No·such·file·or·directory</li><li><code·class="inline">enoexec</code>·-·Exec·format·error</li><li><code·class="inline">enolck</code>·-·No·locks·available</li><li><code·class="inline">enolink</code>·-·Link·has·been·severed</li><li><code·class="inline">enomem</code>·-·Not·enough·memory</li><li><code·class="inline">enomsg</code>·-·No·message·of·desired·type</li><li><code·class="inline">enonet</code>·-·Machine·is·not·on·the·network</li><li><code·class="inline">enopkg</code>·-·Package·not·installed</li><li><code·class="inline">enoprotoopt</code>·-·Bad·protocol·option</li><li><code·class="inline">enospc</code>·-·No·space·left·on·device</li><li><code·class="inline">enosr</code>·-·Out·of·stream·resources·or·not·a·stream·device</li><li><code·class="inline">enosym</code>·-·Unresolved·symbol·name</li><li><code·class="inline">enosys</code>·-·Function·not·implemented</li><li><code·class="inline">enotblk</code>·-·Block·device·required</li><li><code·class="inline">enotconn</code>·-·Socket·is·not·connected</li><li><code·class="inline">enotdir</code>·-·Not·a·directory</li><li><code·class="inline">enotempty</code>·-·Directory·not·empty</li><li><code·class="inline">enotnam</code>·-·Not·a·named·file</li><li><code·class="inline">enotsock</code>·-·Socket·operation·on·non-socket</li><li><code·class="inline">enotsup</code>·-·Operation·not·supported</li><li><code·class="inline">enotty</code>·-·Inappropriate·device·for·<code·class="inline">ioctl</code></li><li><code·class="inline">enotuniq</code>·-·Name·not·unique·on·network</li><li><code·class="inline">enxio</code>·-·No·such·device·or·address</li><li><code·class="inline">eopnotsupp</code>·-·Operation·not·supported·on·socket</li><li><code·class="inline">eperm</code>·-·Not·owner</li><li><code·class="inline">epfnosupport</code>·-·Protocol·family·not·supported</li><li><code·class="inline">epipe</code>·-·Broken·pipe</li><li><code·class="inline">eproclim</code>·-·Too·many·processes</li><li><code·class="inline">eprocunavail</code>·-·Bad·procedure·for·program</li><li><code·class="inline">eprogmismatch</code>·-·Wrong·program·version</li><li><code·class="inline">eprogunavail</code>·-·RPC·program·unavailable</li><li><code·class="inline">eproto</code>·-·Protocol·error</li><li><code·class="inline">eprotonosupport</code>·-·Protocol·not·supported</li><li><code·class="inline">eprototype</code>·-·Wrong·protocol·type·for·socket</li><li><code·class="inline">erange</code>·-·Math·result·unrepresentable</li><li><code·class="inline">erefused</code>·-·EREFUSED</li><li><code·class="inline">eremchg</code>·-·Remote·address·changed</li><li><code·class="inline">eremdev</code>·-·Remote·device</li><li><code·class="inline">eremote</code>·-·Pathname·hit·remote·filesystem</li><li><code·class="inline">eremoteio</code>·-·Remote·I/O·error</li><li><code·class="inline">eremoterelease</code>·-·EREMOTERELEASE</li><li><code·class="inline">erofs</code>·-·Read-only·filesystem</li><li><code·class="inline">erpcmismatch</code>·-·Wrong·RPC·version</li><li><code·class="inline">erremote</code>·-·Object·is·remote</li><li><code·class="inline">eshutdown</code>·-·Cannot·send·after·socket·shutdown</li><li><code·class="inline">esocktnosupport</code>·-·Socket·type·not·supported</li><li><code·class="inline">espipe</code>·-·Invalid·seek</li><li><code·class="inline">esrch</code>·-·No·such·process</li><li><code·class="inline">esrmnt</code>·-·Srmount·error</li><li><code·class="inline">estale</code>·-·Stale·remote·file·handle</li><li><code·class="inline">esuccess</code>·-·Error·0</li><li><code·class="inline">etime</code>·-·Timer·expired</li><li><code·class="inline">etimedout</code>·-·Connection·timed·out</li><li><code·class="inline">etoomanyrefs</code>·-·Too·many·references</li><li><code·class="inline">etxtbsy</code>·-·Text·file·or·pseudo-device·busy</li><li><code·class="inline">euclean</code>·-·Structure·needs·cleaning</li><li><code·class="inline">eunatch</code>·-·Protocol·driver·not·attached</li><li><code·class="inline">eusers</code>·-·Too·many·users</li><li><code·class="inline">eversion</code>·-·Version·mismatch</li><li><code·class="inline">ewouldblock</code>·-·Operation·would·block</li><li><code·class="inline">exdev</code>·-·Cross-device·link</li><li><code·class="inline">exfull</code>·-·Message·tables·full</li><li><code·class="inline">nxdomain</code>·-·Hostname·or·domain·name·cannot·be·found</li></ul>172 <ul><li><code·class="inline">e2big</code>·-·Too·long·argument·list</li><li><code·class="inline">eacces</code>·-·Permission·denied</li><li><code·class="inline">eaddrinuse</code>·-·Address·already·in·use</li><li><code·class="inline">eaddrnotavail</code>·-·Cannot·assign·requested·address</li><li><code·class="inline">eadv</code>·-·Advertise·error</li><li><code·class="inline">eafnosupport</code>·-·Address·family·not·supported·by·protocol·family</li><li><code·class="inline">eagain</code>·-·Resource·temporarily·unavailable</li><li><code·class="inline">ealign</code>·-·EALIGN</li><li><code·class="inline">ealready</code>·-·Operation·already·in·progress</li><li><code·class="inline">ebade</code>·-·Bad·exchange·descriptor</li><li><code·class="inline">ebadf</code>·-·Bad·file·number</li><li><code·class="inline">ebadfd</code>·-·File·descriptor·in·bad·state</li><li><code·class="inline">ebadmsg</code>·-·Not·a·data·message</li><li><code·class="inline">ebadr</code>·-·Bad·request·descriptor</li><li><code·class="inline">ebadrpc</code>·-·Bad·RPC·structure</li><li><code·class="inline">ebadrqc</code>·-·Bad·request·code</li><li><code·class="inline">ebadslt</code>·-·Invalid·slot</li><li><code·class="inline">ebfont</code>·-·Bad·font·file·format</li><li><code·class="inline">ebusy</code>·-·File·busy</li><li><code·class="inline">echild</code>·-·No·children</li><li><code·class="inline">echrng</code>·-·Channel·number·out·of·range</li><li><code·class="inline">ecomm</code>·-·Communication·error·on·send</li><li><code·class="inline">econnaborted</code>·-·Software·caused·connection·abort</li><li><code·class="inline">econnrefused</code>·-·Connection·refused</li><li><code·class="inline">econnreset</code>·-·Connection·reset·by·peer</li><li><code·class="inline">edeadlk</code>·-·Resource·deadlock·avoided</li><li><code·class="inline">edeadlock</code>·-·Resource·deadlock·avoided</li><li><code·class="inline">edestaddrreq</code>·-·Destination·address·required</li><li><code·class="inline">edirty</code>·-·Mounting·a·dirty·fs·without·force</li><li><code·class="inline">edom</code>·-·Math·argument·out·of·range</li><li><code·class="inline">edotdot</code>·-·Cross·mount·point</li><li><code·class="inline">edquot</code>·-·Disk·quota·exceeded</li><li><code·class="inline">eduppkg</code>·-·Duplicate·package·name</li><li><code·class="inline">eexist</code>·-·File·already·exists</li><li><code·class="inline">efault</code>·-·Bad·address·in·system·call·argument</li><li><code·class="inline">efbig</code>·-·File·too·large</li><li><code·class="inline">ehostdown</code>·-·Host·is·down</li><li><code·class="inline">ehostunreach</code>·-·Host·is·unreachable</li><li><code·class="inline">eidrm</code>·-·Identifier·removed</li><li><code·class="inline">einit</code>·-·Initialization·error</li><li><code·class="inline">einprogress</code>·-·Operation·now·in·progress</li><li><code·class="inline">eintr</code>·-·Interrupted·system·call</li><li><code·class="inline">einval</code>·-·Invalid·argument</li><li><code·class="inline">eio</code>·-·I/O·error</li><li><code·class="inline">eisconn</code>·-·Socket·is·already·connected</li><li><code·class="inline">eisdir</code>·-·Illegal·operation·on·a·directory</li><li><code·class="inline">eisnam</code>·-·Is·a·named·file</li><li><code·class="inline">el2hlt</code>·-·Level·2·halted</li><li><code·class="inline">el2nsync</code>·-·Level·2·not·synchronized</li><li><code·class="inline">el3hlt</code>·-·Level·3·halted</li><li><code·class="inline">el3rst</code>·-·Level·3·reset</li><li><code·class="inline">elbin</code>·-·ELBIN</li><li><code·class="inline">elibacc</code>·-·Cannot·access·a·needed·shared·library</li><li><code·class="inline">elibbad</code>·-·Accessing·a·corrupted·shared·library</li><li><code·class="inline">elibexec</code>·-·Cannot·exec·a·shared·library·directly</li><li><code·class="inline">elibmax</code>·-·Attempting·to·link·in·more·shared·libraries·than·system·limit</li><li><code·class="inline">elibscn</code>·-·<code·class="inline">.lib</code>·section·in·<code·class="inline">a.out</code>·corrupted</li><li><code·class="inline">elnrng</code>·-·Link·number·out·of·range</li><li><code·class="inline">eloop</code>·-·Too·many·levels·of·symbolic·links</li><li><code·class="inline">emfile</code>·-·Too·many·open·files</li><li><code·class="inline">emlink</code>·-·Too·many·links</li><li><code·class="inline">emsgsize</code>·-·Message·too·long</li><li><code·class="inline">emultihop</code>·-·Multihop·attempted</li><li><code·class="inline">enametoolong</code>·-·Filename·too·long</li><li><code·class="inline">enavail</code>·-·Unavailable</li><li><code·class="inline">enet</code>·-·ENET</li><li><code·class="inline">enetdown</code>·-·Network·is·down</li><li><code·class="inline">enetreset</code>·-·Network·dropped·connection·on·reset</li><li><code·class="inline">enetunreach</code>·-·Network·is·unreachable</li><li><code·class="inline">enfile</code>·-·File·table·overflow</li><li><code·class="inline">enoano</code>·-·Anode·table·overflow</li><li><code·class="inline">enobufs</code>·-·No·buffer·space·available</li><li><code·class="inline">enocsi</code>·-·No·CSI·structure·available</li><li><code·class="inline">enodata</code>·-·No·data·available</li><li><code·class="inline">enodev</code>·-·No·such·device</li><li><code·class="inline">enoent</code>·-·No·such·file·or·directory</li><li><code·class="inline">enoexec</code>·-·Exec·format·error</li><li><code·class="inline">enolck</code>·-·No·locks·available</li><li><code·class="inline">enolink</code>·-·Link·has·been·severed</li><li><code·class="inline">enomem</code>·-·Not·enough·memory</li><li><code·class="inline">enomsg</code>·-·No·message·of·desired·type</li><li><code·class="inline">enonet</code>·-·Machine·is·not·on·the·network</li><li><code·class="inline">enopkg</code>·-·Package·not·installed</li><li><code·class="inline">enoprotoopt</code>·-·Bad·protocol·option</li><li><code·class="inline">enospc</code>·-·No·space·left·on·device</li><li><code·class="inline">enosr</code>·-·Out·of·stream·resources·or·not·a·stream·device</li><li><code·class="inline">enosym</code>·-·Unresolved·symbol·name</li><li><code·class="inline">enosys</code>·-·Function·not·implemented</li><li><code·class="inline">enotblk</code>·-·Block·device·required</li><li><code·class="inline">enotconn</code>·-·Socket·is·not·connected</li><li><code·class="inline">enotdir</code>·-·Not·a·directory</li><li><code·class="inline">enotempty</code>·-·Directory·not·empty</li><li><code·class="inline">enotnam</code>·-·Not·a·named·file</li><li><code·class="inline">enotsock</code>·-·Socket·operation·on·non-socket</li><li><code·class="inline">enotsup</code>·-·Operation·not·supported</li><li><code·class="inline">enotty</code>·-·Inappropriate·device·for·<code·class="inline">ioctl</code></li><li><code·class="inline">enotuniq</code>·-·Name·not·unique·on·network</li><li><code·class="inline">enxio</code>·-·No·such·device·or·address</li><li><code·class="inline">eopnotsupp</code>·-·Operation·not·supported·on·socket</li><li><code·class="inline">eperm</code>·-·Not·owner</li><li><code·class="inline">epfnosupport</code>·-·Protocol·family·not·supported</li><li><code·class="inline">epipe</code>·-·Broken·pipe</li><li><code·class="inline">eproclim</code>·-·Too·many·processes</li><li><code·class="inline">eprocunavail</code>·-·Bad·procedure·for·program</li><li><code·class="inline">eprogmismatch</code>·-·Wrong·program·version</li><li><code·class="inline">eprogunavail</code>·-·RPC·program·unavailable</li><li><code·class="inline">eproto</code>·-·Protocol·error</li><li><code·class="inline">eprotonosupport</code>·-·Protocol·not·supported</li><li><code·class="inline">eprototype</code>·-·Wrong·protocol·type·for·socket</li><li><code·class="inline">erange</code>·-·Math·result·unrepresentable</li><li><code·class="inline">erefused</code>·-·EREFUSED</li><li><code·class="inline">eremchg</code>·-·Remote·address·changed</li><li><code·class="inline">eremdev</code>·-·Remote·device</li><li><code·class="inline">eremote</code>·-·Pathname·hit·remote·filesystem</li><li><code·class="inline">eremoteio</code>·-·Remote·I/O·error</li><li><code·class="inline">eremoterelease</code>·-·EREMOTERELEASE</li><li><code·class="inline">erofs</code>·-·Read-only·filesystem</li><li><code·class="inline">erpcmismatch</code>·-·Wrong·RPC·version</li><li><code·class="inline">erremote</code>·-·Object·is·remote</li><li><code·class="inline">eshutdown</code>·-·Cannot·send·after·socket·shutdown</li><li><code·class="inline">esocktnosupport</code>·-·Socket·type·not·supported</li><li><code·class="inline">espipe</code>·-·Invalid·seek</li><li><code·class="inline">esrch</code>·-·No·such·process</li><li><code·class="inline">esrmnt</code>·-·Srmount·error</li><li><code·class="inline">estale</code>·-·Stale·remote·file·handle</li><li><code·class="inline">esuccess</code>·-·Error·0</li><li><code·class="inline">etime</code>·-·Timer·expired</li><li><code·class="inline">etimedout</code>·-·Connection·timed·out</li><li><code·class="inline">etoomanyrefs</code>·-·Too·many·references</li><li><code·class="inline">etxtbsy</code>·-·Text·file·or·pseudo-device·busy</li><li><code·class="inline">euclean</code>·-·Structure·needs·cleaning</li><li><code·class="inline">eunatch</code>·-·Protocol·driver·not·attached</li><li><code·class="inline">eusers</code>·-·Too·many·users</li><li><code·class="inline">eversion</code>·-·Version·mismatch</li><li><code·class="inline">ewouldblock</code>·-·Operation·would·block</li><li><code·class="inline">exdev</code>·-·Cross-device·link</li><li><code·class="inline">exfull</code>·-·Message·tables·full</li><li><code·class="inline">nxdomain</code>·-·Hostname·or·domain·name·cannot·be·found</li></ul>
173 ····</section>173 ····</section>
Offset 961, 15 lines modifiedOffset 961, 15 lines modified
961 ···················h_addrtype·::·inet·|·inet6,961 ···················h_addrtype·::·inet·|·inet6,
962 ···················h_length·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),962 ···················h_length·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),
963 ···················h_addr_list·::·[<a·href="inet.html#t:ip_address/0">inet:ip_address</a>()]}.</pre>963 ···················h_addr_list·::·[<a·href="inet.html#t:ip_address/0">inet:ip_address</a>()]}.</pre>
  
964 ······</div>964 ······</div>
  
965 <p>A·record·describing·a·host;·name·and·address.</p><p>Corresponds·to·the·<code·class="inline">C</code>:·<code·class="inline">struct hostent</code>·as·returned·by·for·example965 <p>A·record·describing·a·host;·name·and·address.</p><p>Corresponds·to·the·<code·class="inline">C</code>:·<code·class="inline">struct hostent</code>·as·returned·by·for·example
966 <code·class="inline">gethostbyname(3)</code>.</p><p>The·record·is·defined·in·the·Kernel·include·file·<code·class="inline">&quot;inet.hrl&quot;</code>.</p><p>Add·the·following·directive·to·the·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="3655240843-1">(</span><span·class="s">&quot;kernel/include/inet.hrl&quot;</span><span·class="p"·data-group-id="3655240843-1">)</span><span·class="p">.</span></code></pre>966 <code·class="inline">gethostbyname(3)</code>.</p><p>The·record·is·defined·in·the·Kernel·include·file·<code·class="inline">&quot;inet.hrl&quot;</code>.</p><p>Add·the·following·directive·to·the·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6832552106-1">(</span><span·class="s">&quot;kernel/include/inet.hrl&quot;</span><span·class="p"·data-group-id="6832552106-1">)</span><span·class="p">.</span></code></pre>
967 ··</section>967 ··</section>
968 </section>968 </section>
969 <section·class="detail"·id="t:hostname/0">969 <section·class="detail"·id="t:hostname/0">
  
970 ··<div·class="detail-header">970 ··<div·class="detail-header">
971 ····<a·href="#t:hostname/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">971 ····<a·href="#t:hostname/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">
972 ······<i·class="ri-link-m"·aria-hidden="true"></i>972 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 2124, 16 lines modifiedOffset 2124, 16 lines modified
2124 coded·in·native·endianness.</p><p>Asking·for·and·inspecting·raw·socket·options·require·low-level·information·about2124 coded·in·native·endianness.</p><p>Asking·for·and·inspecting·raw·socket·options·require·low-level·information·about
2125 the·current·operating·system·and·TCP·stack.</p><p><em>Example:</em></p><p>Consider·a·Linux·machine·where·option·<code·class="inline">TCP_INFO</code>·can·be·used·to·collect·TCP2125 the·current·operating·system·and·TCP·stack.</p><p><em>Example:</em></p><p>Consider·a·Linux·machine·where·option·<code·class="inline">TCP_INFO</code>·can·be·used·to·collect·TCP
2126 statistics·for·a·socket.·Assume·you·are·interested·in·field·<code·class="inline">tcpi_sacked</code>·of2126 statistics·for·a·socket.·Assume·you·are·interested·in·field·<code·class="inline">tcpi_sacked</code>·of
2127 <code·class="inline">struct·tcp_info</code>·filled·in·when·asking·for·<code·class="inline">TCP_INFO</code>.·To·be·able·to·access2127 <code·class="inline">struct·tcp_info</code>·filled·in·when·asking·for·<code·class="inline">TCP_INFO</code>.·To·be·able·to·access
2128 this·information,·you·need·to·know·the·following:</p><ul><li>The·numeric·value·of·protocol·level·<code·class="inline">IPPROTO_TCP</code></li><li>The·numeric·value·of·option·<code·class="inline">TCP_INFO</code></li><li>The·size·of·<code·class="inline">struct·tcp_info</code></li><li>The·size·and·offset·of·the·specific·field</li></ul><p>By·inspecting·the·headers·or·writing·a·small·C·program,·it·is·found·that2128 this·information,·you·need·to·know·the·following:</p><ul><li>The·numeric·value·of·protocol·level·<code·class="inline">IPPROTO_TCP</code></li><li>The·numeric·value·of·option·<code·class="inline">TCP_INFO</code></li><li>The·size·of·<code·class="inline">struct·tcp_info</code></li><li>The·size·and·offset·of·the·specific·field</li></ul><p>By·inspecting·the·headers·or·writing·a·small·C·program,·it·is·found·that
2129 <code·class="inline">IPPROTO_TCP</code>·is·6,·<code·class="inline">TCP_INFO</code>·is·11,·the·structure·size·is·92·(bytes),·the2129 <code·class="inline">IPPROTO_TCP</code>·is·6,·<code·class="inline">TCP_INFO</code>·is·11,·the·structure·size·is·92·(bytes),·the
2130 offset·of·<code·class="inline">tcpi_sacked</code>·is·28·bytes,·and·the·value·is·a·32-bit·integer.·The2130 offset·of·<code·class="inline">tcpi_sacked</code>·is·28·bytes,·and·the·value·is·a·32-bit·integer.·The
2131 following·code·can·be·used·to·retrieve·the·value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">get_tcpi_sacked</span><span·class="p"·data-group-id="2081274871-1">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="2081274871-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
2132 ····</span><span·class="p"·data-group-id="2081274871-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2081274871-3">[</span><span·class="p"·data-group-id="2081274871-4">{</span><span·class="ss">raw</span><span·cla[·...·truncated·by·diffoscope;·len:·1014,·SHA:·52553c21de5ee0bcafd324921d5e701841f6a45a705cfd1269427c1692d68d65·...·]</span><span·class="w">2131 following·code·can·be·used·to·retrieve·the·value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">get_tcpi_sacked</span><span·class="p"·data-group-id="8299386899-1">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="82993[·...·truncated·by·diffoscope;·len:·62,·SHA:·aceceeb77f78ff9f83de5092b736449f0ccdf61d7ff95f8d7e08cb4223b25609·...·]</span><span·class="w">
 2132 ····</span><span·class="p"·data-group-id="8299386899-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8299386899-3">[</span><span·class="p"·data-group-id="8299386899-4">{</span><span·class="ss">raw</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Info</span><span·class="p"·data-group-id="8299386899-4">}</span><span·class="p"·data-group-id="8299386899-3">]</span><span·class="p"·data-group-id="8299386899-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">getopts</span><span·class="p"·data-group-id="8299386899-5">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="p"·data-group-id="8299386899-6">[</span><span·class="p"·data-group-id="8299386899-7">{</span><span·class="ss">raw</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">92</span><span·class="p"·data-group-id="8299386899-7">}</span><span·class="p"·data-group-id="8299386899-6">]</span><span·class="p"·data-group-id="8299386899-5">)</span><span·class="p">,</span><span·class="w">
2133 ····</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">:</span><span·class="mi">28</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">TcpiSacked</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">native</span><span·class="p">,</span><span·class="p">_</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">2133 ····</span><span·class="p">&lt;&lt;</span><span·class="p">_</span><span·class="p">:</span><span·class="mi">28</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="n">TcpiSacked</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">native</span><span·class="p">,</span><span·class="p">_</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">
2134 ····</span><span·class="n">TcpiSacked</span><span·class="p">.</span></code></pre><p>Preferably,·you·would·check·the·machine·type,·the·operating·system,·and·the2134 ····</span><span·class="n">TcpiSacked</span><span·class="p">.</span></code></pre><p>Preferably,·you·would·check·the·machine·type,·the·operating·system,·and·the
2135 Kernel·version·before·executing·anything·similar·to·this·code.</p>2135 Kernel·version·before·executing·anything·similar·to·this·code.</p>
2136 ··</section>2136 ··</section>
2137 </section>2137 </section>
2138 <section·class="detail"·id="getstat/1">2138 <section·class="detail"·id="getstat/1">
  
Offset 2477, 15 lines modifiedOffset 2477, 15 lines modified
2477 ······<div·class="specs">2477 ······<div·class="specs">
  
2478 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor(Socket)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0">reference</a>()·when·Socket·::·<a·href="#t:socket/0">socket</a>().</pre>2478 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor(Socket)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0">reference</a>()·when·Socket·::·<a·href="#t:socket/0">socket</a>().</pre>
  
2479 ······</div>2479 ······</div>
  
2480 <p>Start·a·socket·monitor.</p><p>If·the·<code·class="inline">Socket</code>·to·monitor·doesn't·exist·or·when·the·monitor·is·triggered,2480 <p>Start·a·socket·monitor.</p><p>If·the·<code·class="inline">Socket</code>·to·monitor·doesn't·exist·or·when·the·monitor·is·triggered,
2481 a·<code·class="inline">'DOWN'</code>·message·is·sent·that·has·the·following·pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»     ····</span><span·class="p"·data-group-id="4096497422-1">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MonitorRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·153,·SHA:·35b2a376c020c0a3f0889895b51b7909d60f7d265dec2cff5ba67ac599e29a82·...·]-1">}</span></code></pre><ul><li><p><strong><code·class="inline">MonitorRef</code></strong>·-·The·return·value·from·this·function.</p></li><li><p><strong><code·class="inline">Type</code></strong>·-·The·type·of·socket,·can·be·one·of·the·following2481 a·<code·class="inline">'DOWN'</code>·message·is·sent·that·has·the·following·pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»     ····</span><span·class="p"·data-group-id="0964941623-1">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MonitorRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·153,·SHA:·dd4bc03fb869802d9b27e67fdd21bd08219d25f45fca81bb55dd4e5138ca6acf·...·]-1">}</span></code></pre><ul><li><p><strong><code·class="inline">MonitorRef</code></strong>·-·The·return·value·from·this·function.</p></li><li><p><strong><code·class="inline">Type</code></strong>·-·The·type·of·socket,·can·be·one·of·the·following
2482 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0"><code·class="inline">atom/0</code></a>s:·<code·class="inline">port</code>·or·<code·class="inline">socket</code>.</p></li><li><p><strong><code·class="inline">Object</code></strong>·-·The·monitored·entity,·the·socket,·which·triggered·the·event.</p></li><li><p><strong><code·class="inline">Info</code></strong>·-·Either·the·termination·reason·of·the·socket·or·<code·class="inline">nosock</code>2482 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0"><code·class="inline">atom/0</code></a>s:·<code·class="inline">port</code>·or·<code·class="inline">socket</code>.</p></li><li><p><strong><code·class="inline">Object</code></strong>·-·The·monitored·entity,·the·socket,·which·triggered·the·event.</p></li><li><p><strong><code·class="inline">Info</code></strong>·-·Either·the·termination·reason·of·the·socket·or·<code·class="inline">nosock</code>
2483 (the·<code·class="inline">Socket</code>·did·not·exist·when·this·function·was·called).</p></li></ul><p>Making·several·calls·to·<a·href="#monitor/1"><code·class="inline">inet:monitor/1</code></a>·for·the·same·<code·class="inline">Socket</code>2483 (the·<code·class="inline">Socket</code>·did·not·exist·when·this·function·was·called).</p></li></ul><p>Making·several·calls·to·<a·href="#monitor/1"><code·class="inline">inet:monitor/1</code></a>·for·the·same·<code·class="inline">Socket</code>
2484 is·not·an·error;·one·monitor·is·created·per·call.</p><p>The·monitor·is·triggered·when·the·socket·is·closed·in·any·way·such·as2484 is·not·an·error;·one·monitor·is·created·per·call.</p><p>The·monitor·is·triggered·when·the·socket·is·closed·in·any·way·such·as
2485 an·API·call,·remote·end·close,·closed·by·signal·when·owner·exits,·...</p>2485 an·API·call,·remote·end·close,·closed·by·signal·when·owner·exits,·...</p>
2486 ··</section>2486 ··</section>
2487 </section>2487 </section>
2488 <section·class="detail"·id="ntoa/1">2488 <section·class="detail"·id="ntoa/1">
49.6 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/inet_res.html
    
Offset 175, 23 lines modifiedOffset 175, 23 lines modified
175 <p>The·following·data·types·concern·the·DNS·client:</p><h2·id="module-example"·class="section-heading">175 <p>The·following·data·types·concern·the·DNS·client:</p><h2·id="module-example"·class="section-heading">
176 ··<a·href="#module-example"·class="hover-link">176 ··<a·href="#module-example"·class="hover-link">
177 ····<i·class="ri-link-m"·aria-hidden="true"></i>177 ····<i·class="ri-link-m"·aria-hidden="true"></i>
178 ··</a>178 ··</a>
179 ··<span·class="text">Example</span>179 ··<span·class="text">Example</span>
180 </h2>180 </h2>
181 <p>This·access·functions·example·shows·how·<a·href="#lookup/3"><code·class="inline">lookup/3</code></a>·can·be·implemented·using181 <p>This·access·functions·example·shows·how·<a·href="#lookup/3"><code·class="inline">lookup/3</code></a>·can·be·implemented·using
182 <a·href="#resolve/3"><code·class="inline">resolve/3</code></a>·from·outside·the·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">example_lookup</span><span·class="p"·data-group-id="5373647411-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Class</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="5373647411-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 <a·href="#resolve/3"><code·class="inline">resolve/3</code></a>·from·outside·the·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">example_lookup</span><span·class="p"·data-group-id="8885455056-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Class</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="8885455056-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">inet_res</span><span·class="p">:</span><span·class="nf">resolve</span><span·class="p"·data-group-id="5373647411-2">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Class</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="5373647411-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">183 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">inet_res</span><span·class="p">:</span><span·class="nf">resolve</span><span·class="p"·data-group-id="8885455056-2">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Class</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="8885455056-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
184 ········</span><span·class="p"·data-group-id="5373647411-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Msg</span><span·class="p"·data-group-id="5373647411-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 ········</span><span·class="p"·data-group-id="8885455056-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Msg</span><span·class="p"·data-group-id="8885455056-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ············</span><span·class="p"·data-group-id="5373647411-4">[</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="5373647411-5">(</span><span·class="n">RR</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">data</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·a400fa27e55ed8023b6251fbfd0c933f6edc1c25ae129046eb83dcbad5e98c4b·...·]-5">)</span><span·class="w">185 ············</span><span·class="p"·data-group-id="8885455056-4">[</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="8885455056-5">(</span><span·class="n">RR</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">data</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·4f89c1c8015ea87f1edbca54d68bca02a2a91732105c193694e2f61d7d396fbc·...·]-5">)</span><span·class="w">
186 ·············</span><span·class="p">||</span><span·class="w">·</span><span·class="n">RR</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="5373647411-6">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">anlist</span><span·class="p"·data-group-id="5373647411-6">)</span><span·class="p">,</span><span·class="w">186 ·············</span><span·class="p">||</span><span·class="w">·</span><span·class="n">RR</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="8885455056-6">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">anlist</span><span·class="p"·data-group-id="8885455056-6">)</span><span·class="p">,</span><span·class="w">
187 ·················</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="5373647411-7">(</span><span·class="n">RR</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">type</span><span·class="p"·data-group-id="5373647411-7">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">187 ·················</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="8885455056-7">(</span><span·class="n">RR</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">type</span><span·class="p"·data-group-id="8885455056-7">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">
188 ·················</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="5373647411-8">(</span><span·class="n">RR</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">class</span><span·class="p"·data-group-id="5373647411-8">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·64,·SHA:·4b6d1e99276e0282a9d3e13627227d79eafeacf67f004b3a350ae01b741188be·...·]-4">]</span><span·class="p">;</span><span·class="w">188 ·················</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="8885455056-8">(</span><span·class="n">RR</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">class</span><span·class="p"·data-group-id="8885455056-8">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·64,·SHA:·59bfe3d2df9ecfb88defa0c1f2d51e756173604c79dd68724aca79964767eff0·...·]-4">]</span><span·class="p">;</span><span·class="w">
189 ········</span><span·class="p"·data-group-id="5373647411-9">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="5373647411-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 ········</span><span·class="p"·data-group-id="8885455056-9">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="8885455056-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ············</span><span·class="p"·data-group-id="5373647411-10">[</span><span·class="p"·data-group-id="5373647411-10">]</span><span·class="w">190 ············</span><span·class="p"·data-group-id="8885455056-10">[</span><span·class="p"·data-group-id="8885455056-10">]</span><span·class="w">
191 ·····</span><span·class="k">end</span><span·class="p">.</span></code></pre>191 ·····</span><span·class="k">end</span><span·class="p">.</span></code></pre>
192 ····</section>192 ····</section>
  
193 </div>193 </div>
  
194 ··<section·id="summary"·class="details-list">194 ··<section·id="summary"·class="details-list">
195 ····<h1·class="section-heading">195 ····<h1·class="section-heading">
Offset 590, 65 lines modifiedOffset 590, 65 lines modified
590 ··········<pre·translate="no"><span·class="attribute">-type</span>·dns_msg()·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>590 ··········<pre·translate="no"><span·class="attribute">-type</span>·dns_msg()·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
591 ······</div>591 ······</div>
  
592 <p>A·DNS·message.</p><p>This·is·the·start·of·a·hierarchy·of·opaque·data·structures·that·can·be592 <p>A·DNS·message.</p><p>This·is·the·start·of·a·hierarchy·of·opaque·data·structures·that·can·be
593 examined·with·access·functions·in·<code·class="inline">inet_dns</code>,·which·return·lists·of593 examined·with·access·functions·in·<code·class="inline">inet_dns</code>,·which·return·lists·of
594 <code·class="inline">{Field,Value}</code>·tuples.·The·arity·2·functions·return·the·value594 <code·class="inline">{Field,Value}</code>·tuples.·The·arity·2·functions·return·the·value
595 for·a·specified·field.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">dns_msg</span><span·class="p"·data-group-id="4994362013-1">(</span><span·class="p"·data-group-id="4994362013-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsMsg</span><span·class="w">595 for·a·specified·field.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">dns_msg</span><span·class="p"·data-group-id="7108105324-1">(</span><span·class="p"·data-group-id="7108105324-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsMsg</span><span·class="w">
596 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="4994362013-2">(</span><span·class="n">DnsMsg</span><span·class="p"·data-group-id="4994362013-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">596 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="7108105324-2">(</span><span·class="n">DnsMsg</span><span·class="p"·data-group-id="7108105324-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
597 ········</span><span·class="p"·data-group-id="4994362013-3">[</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-4">{</span><span·class="ss">header</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_header</span><span·class="p"·data-group-id="4994362013-5">[·...·truncated·by·diffoscope;·len:·102,·SHA:·b50defeb8698270d7885a62b4305ac44a0882f096d9fb945461342fdd13ea47a·...·]-4">}</span><span·class="w">597 ········</span><span·class="p"·data-group-id="7108105324-3">[</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-4">{</span><span·class="ss">header</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_header</span><span·class="p"·data-group-id="7108105324-5">[·...·truncated·by·diffoscope;·len:·102,·SHA:·bf00a0e677224d97e4b77f27af031d3c42b88822544b81c0a9f3a15fbca4513e·...·]-4">}</span><span·class="w">
598 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-6">{</span><span·class="ss">qdlist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="4994362013-7">(</span><span·class="p"·data-group-id="4994362013-7">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·1b42e650dee908f93aad6141aa065a083294184ebd950eb312220a2404a863c8·...·]-6">}</span><span·class="w">598 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-6">{</span><span·class="ss">qdlist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="7108105324-7">(</span><span·class="p"·data-group-id="7108105324-7">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·c81be7b4f492f4710c72ffbbdedbc89c8b268e8b0b7dbc06e5bb629a2501e20d·...·]-6">}</span><span·class="w">
599 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-8">{</span><span·class="ss">anlist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="4994362013-9">(</span><span·class="p"·data-group-id="4994362013-9">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-8">}</span><span·class="w">599 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-8">{</span><span·class="ss">anlist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="7108105324-9">(</span><span·class="p"·data-group-id="7108105324-9">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-8">}</span><span·class="w">
600 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-10">{</span><span·class="ss">nslist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="4994362013-11">(</span><span·class="p"·data-group-id="4994362013-11">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·1b42e650dee908f93aad6141aa065a083294184ebd950eb312220a2404a863c8·...·]-10">}</span><span·class="w">600 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-10">{</span><span·class="ss">nslist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="7108105324-11">(</span><span·class="p"·data-group-id="7108105324-11">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·c81be7b4f492f4710c72ffbbdedbc89c8b268e8b0b7dbc06e5bb629a2501e20d·...·]-10">}</span><span·class="w">
601 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-12">{</span><span·class="ss">arlist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="4994362013-13">(</span><span·class="p"·data-group-id="4994362013-13">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·102,·SHA:·2a018a365e7701d53753a8cc7a6243075fbc9a7162f689d1afaa6ab7c6a2ed80·...·]-3">]</span><span·class="w">601 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-12">{</span><span·class="ss">arlist</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="7108105324-13">(</span><span·class="p"·data-group-id="7108105324-13">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·102,·SHA:·642c4ac4b079d9063fdf4baeda4e2d0d20e5b6742d3eff7263da88be2e0715ee·...·]-3">]</span><span·class="w">
602 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="4994362013-14">(</span><span·class="n">DnsMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">header</span><span·class="p"·data-group-id="4994362013-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·133,·SHA:·28fd3f908345750df1cf681c36c0c17cbba7c3c2a47341e5fca354a50b99af86·...·]-15">)</span><span·class="w">·</span><span·class="c1">%·for·example</span><span·class="w">602 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="7108105324-14">(</span><span·class="n">DnsMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">header</span><span·class="p"·data-group-id="7108105324-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·133,·SHA:·3c8a3d5ae28d28ef70ed61f4bb4e3d65bb3819f6d7b4d6d08f00598bd7319542·...·]-15">)</span><span·class="w">·</span><span·class="c1">%·for·example</span><span·class="w">
603 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="4994362013-16">(</span><span·class="n">DnsMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="4994362013-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">603 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">msg</span><span·class="p"·data-group-id="7108105324-16">(</span><span·class="n">DnsMsg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="7108105324-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">
  
604 </span><span·class="nf">dns_header</span><span·class="p"·data-group-id="4994362013-17">(</span><span·class="p"·data-group-id="4994362013-17">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsHeader</span><span·class="w">604 </span><span·class="nf">dns_header</span><span·class="p"·data-group-id="7108105324-17">(</span><span·class="p"·data-group-id="7108105324-17">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsHeader</span><span·class="w">
605 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">header</span><span·class="p"·data-group-id="4994362013-18">(</span><span·class="n">DnsHeader</span><span·class="p"·data-group-id="4994362013-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">605 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">header</span><span·class="p"·data-group-id="7108105324-18">(</span><span·class="n">DnsHeader</span><span·class="p"·data-group-id="7108105324-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
606 ········</span><span·class="p"·data-group-id="4994362013-19">[</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-20">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-21">(</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·135112897508c0228025caece295897fe225b60a604d13cb0e66107f46a241e9·...·]-20">}</span><span·class="w">606 ········</span><span·class="p"·data-group-id="7108105324-19">[</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-20">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-21">(</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·5c66b816f5123aae3e428508a129c22327ac5b5a2891125a10b15662c1e551ea·...·]-20">}</span><span·class="w">
607 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-22">{</span><span·class="ss">qr</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4994362013-23">(</span><span·class="p"·data-group-id="4994362013-23">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-22">}</span><span·class="w">607 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-22">{</span><span·class="ss">qr</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7108105324-23">(</span><span·class="p"·data-group-id="7108105324-23">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-22">}</span><span·class="w">
608 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-24">{</span><span·class="ss">opcode</span><span·class="p">,</span><span·class="w">·</span><span·class="k">query</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">iquery</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·329,·SHA:·7f9301c43341c5d607bb8f3c2b8c3260a3bbef5bbb81b842795b01f38ed45efe·...·]-24">}</span><span·class="w">608 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-24">{</span><span·class="ss">opcode</span><span·class="p">,</span><span·class="w">·</span><span·class="k">query</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">iquery</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·329,·SHA:·aa980b22f8f4f2e7137c6bb30aa24727bc680540fa29f11f67767b0fd71da6b5·...·]-24">}</span><span·class="w">
609 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-26">{</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4994362013-27">(</span><span·class="p"·data-group-id="4994362013-27">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-26">}</span><span·class="w">609 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-26">{</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7108105324-27">(</span><span·class="p"·data-group-id="7108105324-27">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-26">}</span><span·class="w">
610 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-28">{</span><span·class="ss">tc</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4994362013-29">(</span><span·class="p"·data-group-id="4994362013-29">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-28">}</span><span·class="w">610 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-28">{</span><span·class="ss">tc</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7108105324-29">(</span><span·class="p"·data-group-id="7108105324-29">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-28">}</span><span·class="w">
611 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-30">{</span><span·class="ss">rd</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4994362013-31">(</span><span·class="p"·data-group-id="4994362013-31">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-30">}</span><span·class="w">611 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-30">{</span><span·class="ss">rd</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7108105324-31">(</span><span·class="p"·data-group-id="7108105324-31">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-30">}</span><span·class="w">
612 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-32">{</span><span·class="ss">ra</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4994362013-33">(</span><span·class="p"·data-group-id="4994362013-33">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-32">}</span><span·class="w">612 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-32">{</span><span·class="ss">ra</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7108105324-33">(</span><span·class="p"·data-group-id="7108105324-33">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-32">}</span><span·class="w">
613 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-34">{</span><span·class="ss">pr</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="4994362013-35">(</span><span·class="p"·data-group-id="4994362013-35">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·f494c8c2633679e74167a9dee55f42017e5a2cc2f52a26a488160749104d97db·...·]-34">}</span><span·class="w">613 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-34">{</span><span·class="ss">pr</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="7108105324-35">(</span><span·class="p"·data-group-id="7108105324-35">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·88d2769e024580735339d6e03a0e0e6383a6e1afde300d05ed7a03e6f593c389·...·]-34">}</span><span·class="w">
614 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-36">{</span><span·class="ss">rcode</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-37">(</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</spa[·...·truncated·by·diffoscope;·len:·201,·SHA:·605c5281e3b402e4025d5133408933799ed7c338efa309068e2aea70351c6694·...·]-19">]</span><span·class="w">614 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-36">{</span><span·class="ss">rcode</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-37">(</span><span·class="mi">0</span><span·class="p">.</span><span·class="p">.</spa[·...·truncated·by·diffoscope;·len:·201,·SHA:·851628f4aa715a9da4f24505fc99e8f70afa4e50e9b7500af275f38c23df874c·...·]-19">]</span><span·class="w">
615 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">header</span><span·class="p"·data-group-id="4994362013-38">(</span><span·class="n">DnsHeader</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="4994362013-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">615 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">header</span><span·class="p"·data-group-id="7108105324-38">(</span><span·class="n">DnsHeader</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="7108105324-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">
  
616 </span><span·class="nf">query_type</span><span·class="p"·data-group-id="4994362013-39">(</span><span·class="p"·data-group-id="4994362013-39">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">axfr</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·424,·SHA:·71e6fb550a594f7fe8f4001a999e2485a0e507bb4bf5fb8968a6ea15f0c5f5c7·...·]-40">)</span><span·class="w">616 </span><span·class="nf">query_type</span><span·class="p"·data-group-id="7108105324-39">(</span><span·class="p"·data-group-id="7108105324-39">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">axfr</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·424,·SHA:·38e9daf9ca1d7a8c0175f224018d7613a8ed55190ce0fda0897aeea6bbfa8704·...·]-40">)</span><span·class="w">
  
617 </span><span·class="nf">dns_query</span><span·class="p"·data-group-id="4994362013-41">(</span><span·class="p"·data-group-id="4994362013-41">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsQuery</span><span·class="w">617 </span><span·class="nf">dns_query</span><span·class="p"·data-group-id="7108105324-41">(</span><span·class="p"·data-group-id="7108105324-41">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsQuery</span><span·class="w">
618 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="4994362013-42">(</span><span·class="n">DnsQuery</span><span·class="p"·data-group-id="4994362013-42">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">618 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="7108105324-42">(</span><span·class="n">DnsQuery</span><span·class="p"·data-group-id="7108105324-42">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
619 ········</span><span·class="p"·data-group-id="4994362013-43">[</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-44">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_name</span><span·class="p"·data-group-id="4994362013-45"[·...·truncated·by·diffoscope;·len:·104,·SHA:·fa64ad1af825cdc5a8a4b9ea7cd6f232098d84a379a3829ef606abf48a859b55·...·]-44">}</span><span·class="w">619 ········</span><span·class="p"·data-group-id="7108105324-43">[</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-44">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_name</span><span·class="p"·data-group-id="7108105324-45"[·...·truncated·by·diffoscope;·len:·104,·SHA:·9da1f55b30c3664abff129160aff354ed1aecb35cc029652ff28539aefa9eada·...·]-44">}</span><span·class="w">
620 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-46">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">query_type</span><span·class="p"·data-group-id="4994362013-47">(</span><span·class="p"·data-group-id="4994362013-47">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·0b12fd386ccaee47ef53131647659693ad0a87aecbddb0a99e7339cae3bb5686·...·]-46">}</span><span·class="w">620 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-46">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">query_type</span><span·class="p"·data-group-id="7108105324-47">(</span><span·class="p"·data-group-id="7108105324-47">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·bce4987416a7a49f478c1d2380d799d4f3985f110bcba261ee30763b659d951f·...·]-46">}</span><span·class="w">
621 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-48">{</span><span·class="ss">class</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_class</span><span·class="p"·data-group-id="4994362013-49">(</span><span·class="p"·data-group-id="4994362013-49">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·104,·SHA:·182079e9e3df38d11cf487831eb571a7e2dc5167d059cf3c35c9cc99cd0d0075·...·]-43">]</span><span·class="w">621 ········</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-48">{</span><span·class="ss">class</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_class</span><span·class="p"·data-group-id="7108105324-49">(</span><span·class="p"·data-group-id="7108105324-49">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·104,·SHA:·553399157e6fa608315451e3d86300424cf977831d2811fe354e56c637f8db34·...·]-43">]</span><span·class="w">
622 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="4994362013-50">(</span><span·class="n">DnsQuery</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="4994362013-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">622 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="7108105324-50">(</span><span·class="n">DnsQuery</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="7108105324-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Value</span><span·class="w">
  
623 </span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="4994362013-51">(</span><span·class="p"·data-group-id="4994362013-51">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsRr</span><span·class="w">623 </span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="7108105324-51">(</span><span·class="p"·data-group-id="7108105324-51">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">DnsRr</span><span·class="w">
624 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="4994362013-52">(</span><span·class="n">DnsRr</span><span·class="p"·data-group-id="4994362013-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">DnsRrFields</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">DnsRrOptFields</span><span·class="w">624 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="7108105324-52">(</span><span·class="n">DnsRr</span><span·class="p"·data-group-id="7108105324-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">DnsRrFields</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">DnsRrOptFields</span><span·class="w">
625 ····</span><span·class="n">DnsRrFields</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-53">[</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-54">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_name</span><span·class="p"·data-group-id="4994362013-55"[·...·truncated·by·diffoscope;·len:·104,·SHA:·3a8b2da9a4dffb798b15ab7eccb5b618958ac96f4437bbb06af266b627fb422d·...·]-54">}</span><span·class="w">625 ····</span><span·class="n">DnsRrFields</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-53">[</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-54">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_name</span><span·class="p"·data-group-id="7108105324-55"[·...·truncated·by·diffoscope;·len:·104,·SHA:·5f1cdd1fdd08f83155bc4b08c76ccf10a1412698b8bf1de0cbb0773328bea21d·...·]-54">}</span><span·class="w">
626 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-56">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr_type</span><span·class="p"·data-group-id="4994362013-57">(</span><span·class="p"·data-group-id="4994362013-57">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·15fc2196a249e69aa98b77d0ee542566b111d61589d7a594c3d412da3896beda·...·]-56">}</span><span·class="w">626 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-56">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_rr_type</span><span·class="p"·data-group-id="7108105324-57">(</span><span·class="p"·data-group-id="7108105324-57">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·82790b37d9bd9876a518904fbdd1dd1c9d59aca35df673e149c5bf4e20207d3f·...·]-56">}</span><span·class="w">
627 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-58">{</span><span·class="ss">class</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_class</span><span·class="p"·data-group-id="4994362013-59">(</span><span·class="p"·data-group-id="4994362013-59">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·0b12fd386ccaee47ef53131647659693ad0a87aecbddb0a99e7339cae3bb5686·...·]-58">}</span><span·class="w">627 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-58">{</span><span·class="ss">class</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_class</span><span·class="p"·data-group-id="7108105324-59">(</span><span·class="p"·data-group-id="7108105324-59">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·bce4987416a7a49f478c1d2380d799d4f3985f110bcba261ee30763b659d951f·...·]-58">}</span><span·class="w">
628 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-60">{</span><span·class="ss">ttl</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-61">(</span><span·class="p"·data-group-id="4994362013-61">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·cfe510304219f0af110da568ffd8683b736b67ce622ee46d70bf17d9eaff4c5c·...·]-60">}</span><span·class="w">628 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-60">{</span><span·class="ss">ttl</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-61">(</span><span·class="p"·data-group-id="7108105324-61">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·c966621292780c31fb1b54776980b8a64cf62e74b3f8775f1cc2f2884f1b889f·...·]-60">}</span><span·class="w">
629 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-62">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_data</span><span·class="p"·data-group-id="4994362013-63">(</span><span·class="p"·data-group-id="4994362013-63">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·102,·SHA:·4f07ecc09aae7892a2bc40fc826ee8967c4e40ebd38976c5deb0a4ccba09d0f3·...·]-53">]</span><span·class="w">629 ··················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-62">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_data</span><span·class="p"·data-group-id="7108105324-63">(</span><span·class="p"·data-group-id="7108105324-63">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·102,·SHA:·c956c8f0533cec82d6a485b89db3b99f4fd005188e0497d2048af220e0a9b29c·...·]-53">]</span><span·class="w">
630 ····</span><span·class="n">DnsRrOptFields</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-64">[</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-65">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_name</span><span·class="p"·data-group-id="4994362013-66"[·...·truncated·by·diffoscope;·len:·104,·SHA:·6e4c5a45ccfbed17354aa074a3ebe3198773375086a9568103c03e2359b487cc·...·]-65">}</span><span·class="w">630 ····</span><span·class="n">DnsRrOptFields</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-64">[</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-65">{</span><span·class="ss">domain</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_name</span><span·class="p"·data-group-id="7108105324-66"[·...·truncated·by·diffoscope;·len:·104,·SHA:·835f6c44e429f4bed7ddba67e35c8607ea4315ac2cb678d0fee07b9e3277815a·...·]-65">}</span><span·class="w">
631 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-67">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">opt</span><span·class="p"·data-group-id="4994362013-67">}</span><span·class="w">631 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-67">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">opt</span><span·class="p"·data-group-id="7108105324-67">}</span><span·class="w">
632 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-68">{</span><span·class="ss">udp_payload_size</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-69">(</span><span·class="p"·data-group-id="4994362013-69">)</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·6a72f86b49da38cbc5fed482c6121472288e9d6c1a0941297d1f70969c740603·...·]-68">}</span><span·class="w">632 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-68">{</span><span·class="ss">udp_payload_size</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-69">(</span><span·class="p"·data-group-id="7108105324-69">)</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·b076b6168bb29a8433423f2189f6288947651936834082368ace70f3cba3dc13·...·]-68">}</span><span·class="w">
633 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-70">{</span><span·class="ss">ext_rcode</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-71">(</span><span·class="p"·data-group-id="4994362013-71">)</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·cc3b58a4305da424c9fa759d2bccbe01406763ce0ded1b973c8dc84edbd2658d·...·]-70">}</span><span·class="w">633 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-70">{</span><span·class="ss">ext_rcode</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-71">(</span><span·class="p"·data-group-id="7108105324-71">)</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·c1691984938d6f5b51c2e6860de75e13e1b46e90c56a334e6922a2e830c796ed·...·]-70">}</span><span·class="w">
634 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-72">{</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-73">(</span><span·class="p"·data-group-id="4994362013-73">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·0b12fd386ccaee47ef53131647659693ad0a87aecbddb0a99e7339cae3bb5686·...·]-72">}</span><span·class="w">634 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-72">{</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-73">(</span><span·class="p"·data-group-id="7108105324-73">)</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·bce4987416a7a49f478c1d2380d799d4f3985f110bcba261ee30763b659d951f·...·]-72">}</span><span·class="w">
635 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-74">{</span><span·class="ss">z</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4994362013-75">(</span><span·class="p"·data-group-id="4994362013-75">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·1649758f7b94129830a3da72c3fcf0ae3b09fd3db71250f18e0e52848d96e7e5·...·]-74">}</span><span·class="w">635 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-74">{</span><span·class="ss">z</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7108105324-75">(</span><span·class="p"·data-group-id="7108105324-75">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·158edf979b3e28174f941eb8aa1c6ce19509661d61716ea89416bef9e127fd1a·...·]-74">}</span><span·class="w">
636 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="4994362013-76">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_data</span><span·class="p"·data-group-id="4994362013-77">(</span><span·class="p"·data-group-id="4994362013-77">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·102,·SHA:·2f1d32c4e067bca7c10929d49f7ceada0ac458849437c47b16f5b57e0e3c2511·...·]-64">]</span><span·class="w">636 ·····················</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="7108105324-76">{</span><span·class="ss">data</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">dns_data</span><span·class="p"·data-group-id="7108105324-77">(</span><span·class="p"·data-group-id="7108105324-77">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·102,·SHA:·a644b3da40711fd6774046ee16752ac8cf518ca5b2a3bd1710bae3f0ea496853·...·]-64">]</span><span·class="w">
637 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="4994362013-78">(</span><span·class="n">DnsRr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="4994362013-78">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·471,·SHA:·d7f067a8053172ae1a6f872c345236cffd19a62fd939ceea0ff3032711145139·...·]5-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">msg</span><span·class="p">;</span><span·class="w">637 ····</span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">rr</span><span·class="p"·data-group-id="7108105324-78">(</span><span·class="n">DnsRr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Field</span><span·class="p"·data-group-id="7108105324-78">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·471,·SHA:·a5ce957629ee62f2c229c4ffcde435b09fb852674d06dd6a9bdc3a0ef1238eac·...·]5-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">msg</span><span·class="p">;</span><span·class="w">
638 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="9604518965-3">(</span><span·class="nf">dns_header</span><span·class="p"·data-group-id="9604518965-4">(</span><span·class="p"·data-group-id="9604518965-4">)</span><span·class="p"·data-group-id="9604518965-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">header</span><span·class="p">;</span><span·class="w">638 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="3155476835-3">(</span><span·class="nf">dns_header</span><span·class="p"·data-group-id="3155476835-4">(</span><span·class="p"·data-group-id="3155476835-4">)</span><span·class="p"·data-group-id="3155476835-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">header</span><span·class="p">;</span><span·class="w">
639 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="9604518965-5">(</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="9604518965-6">(</span><span·class="p"·data-group-id="9604518965-6">)</span><span·class="p"·data-group-id="9604518965-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">dns_query</span><span·class="p">;</span><span·class="w">639 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="3155476835-5">(</span><span·class="nf">dns_query</span><span·class="p"·data-group-id="3155476835-6">(</span><span·class="p"·data-group-id="3155476835-6">)</span><span·class="p"·data-group-id="3155476835-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">dns_query</span><span·class="p">;</span><span·class="w">
640 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="9604518965-7">(</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="9604518965-8">(</span><span·class="p"·data-group-id="9604518965-8">)</span><span·class="p"·data-group-id="9604518965-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">rr</span><span·class="p">;</span><span·class="w">640 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="3155476835-7">(</span><span·class="nf">dns_rr</span><span·class="p"·data-group-id="3155476835-8">(</span><span·class="p"·data-group-id="3155476835-8">)</span><span·class="p"·data-group-id="3155476835-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">rr</span><span·class="p">;</span><span·class="w">
641 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="9604518965-9">(</span><span·class="p">_</span><span·class="p"·data-group-id="9604518965-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">.</span></code></pre><p>So,·<code·class="inline">inet_dns:(inet_dns:record_type(X))(X)</code>·converts·any·of·these·data641 </span><span·class="nc">inet_dns</span><span·class="p">:</span><span·class="nf">record_type</span><span·class="p"·data-group-id="3155476835-9">(</span><span·class="p">_</span><span·class="p"·data-group-id="3155476835-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">.</span></code></pre><p>So,·<code·class="inline">inet_dns:(inet_dns:record_type(X))(X)</code>·converts·any·of·these·data
642 structures·into·a·<code·class="inline">{Field,Value}</code>·list.</p>642 structures·into·a·<code·class="inline">{Field,Value}</code>·list.</p>
643 ··</section>643 ··</section>
644 </section>644 </section>
645 <section·class="detail"·id="t:dns_name/0">645 <section·class="detail"·id="t:dns_name/0">
  
646 ··<div·class="detail-header">646 ··<div·class="detail-header">
647 ····<a·href="#t:dns_name/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">647 ····<a·href="#t:dns_name/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">
1.18 MB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/kernel.epub
8.16 KB
zipinfo {}
Max HTML report size reached
146 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
40.7 KB
OEBPS/trace.xhtml
Max HTML report size reached
141 KB
OEBPS/socket_usage.xhtml
Max HTML report size reached
32.4 KB
OEBPS/socket.xhtml
Max HTML report size reached
50.0 KB
OEBPS/seq_trace.xhtml
Max HTML report size reached
4.92 KB
OEBPS/rpc.xhtml
Max HTML report size reached
3.17 KB
OEBPS/pg.xhtml
    
Offset 745, 15 lines modifiedOffset 745, 15 lines modified
  
745 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor_scope(Scope·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:atom/0">atom</a>())·->·{<a·href="../../../../lib/../erts/doc/html/erlang.html#t:reference/0">reference</a>(),·#{<a·href="#t:group/0">group</a>()·=>·[<a·href="../../../../lib/../erts/doc/html/erlang.html#t:pid/0">pid</a>()]}}.</pre>745 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor_scope(Scope·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:atom/0">atom</a>())·->·{<a·href="../../../../lib/../erts/doc/html/erlang.html#t:reference/0">reference</a>(),·#{<a·href="#t:group/0">group</a>()·=>·[<a·href="../../../../lib/../erts/doc/html/erlang.html#t:pid/0">pid</a>()]}}.</pre>
  
746 ······</div>746 ······</div>
  
747 <p>Subscribes·the·caller·to·updates·from·the·specified·scope.</p><p>Returns·content·of·the·entire·scope·and·a·reference·to·match·the·upcoming747 <p>Subscribes·the·caller·to·updates·from·the·specified·scope.</p><p>Returns·content·of·the·entire·scope·and·a·reference·to·match·the·upcoming
748 notifications.</p><p>Whenever·any·group·membership·changes,·an·update·message·is·sent·to·the748 notifications.</p><p>Whenever·any·group·membership·changes,·an·update·message·is·sent·to·the
749 subscriber:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="0239898969-1">{</samp><samp·class="n">Ref</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">join</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Group</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·cl[·...·truncated·by·diffoscope;·len:·781,·SHA:·de1caba1cfff33a5acb8eef3f6cad9a55435d5daba43c883b0a8a50501e1ce27·...·]-1">}</samp></code></pre>749 subscriber:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="4255149463-1">{</samp><samp·class="n">Ref</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">join</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Group</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·cl[·...·truncated·by·diffoscope;·len:·781,·SHA:·7129d691a9625d98266bac13b9c12e2c2d15b5b39d35c215a78ded294e45ae5f·...·]-1">}</samp></code></pre>
750 ··</section>750 ··</section>
751 </section>751 </section>
752 <section·class="detail"·id="start/1">752 <section·class="detail"·id="start/1">
  
753 ··<div·class="detail-header">753 ··<div·class="detail-header">
754 ····<a·href="#start/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">754 ····<a·href="#start/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
755 ······<i·class="ri-link-m"·aria-hidden="true"></i>755 ······<i·class="ri-link-m"·aria-hidden="true"></i>
22.8 KB
OEBPS/os.xhtml
Max HTML report size reached
7.29 KB
OEBPS/notes.xhtml
Max HTML report size reached
26.0 KB
OEBPS/net_kernel.xhtml
Max HTML report size reached
2.99 KB
OEBPS/net_adm.xhtml
    
Offset 366, 16 lines modifiedOffset 366, 16 lines modified
366 ···················Name·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:string/0">string</a>(),366 ···················Name·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:string/0">string</a>(),
367 ···················Port·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),367 ···················Port·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),
368 ···················Reason·::·address·|·<a·href="file.xhtml#t:posix/0">file:posix</a>().</pre>368 ···················Reason·::·address·|·<a·href="file.xhtml#t:posix/0">file:posix</a>().</pre>
  
369 ······</div>369 ······</div>
  
370 <p>Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>370 <p>Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>
371 registered·at·the·specified·host.</p><p>Similar·to·<code·class="inline">epmd·-names</code>,·see·<a·href="../../../../lib/../erts/doc/html/epmd_cmd.xhtml"><code·class="inline">erts:epmd</code></a>.</p><p>Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not·operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">(arne@dunn)1&gt;·</samp><samp·class="nc">net_adm</samp><samp·class="p">:</samp><samp·class="nf">names</samp><samp·class="p"·data-group-id="2920932987-1">(</samp><samp·class="p"·data-group-id="2920932987-1">)</samp><samp·class="p">.</samp><samp·class="w">371 registered·at·the·specified·host.</p><p>Similar·to·<code·class="inline">epmd·-names</code>,·see·<a·href="../../../../lib/../erts/doc/html/epmd_cmd.xhtml"><code·class="inline">erts:epmd</code></a>.</p><p>Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not·operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">(arne@dunn)1&gt;·</samp><samp·class="nc">net_adm</samp><samp·class="p">:</samp><samp·class="nf">names</samp><samp·class="p"·data-group-id="7615981229-1">(</samp><samp·class="p"·data-group-id="7615981229-1">)</samp><samp·class="p">.</samp><samp·class="w">
372 </samp><samp·class="p"·data-group-id="2920932987-2">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="p"·data-group-id="2920932987-3">[</samp><samp·class="p"·data-group-id="2920932987-4">{</samp><samp·class="s">&quot;arne&quot;</samp><samp·class="p">,</samp><samp·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·d71974dd5dd01294a1b34533b67a14c1f9a49527c04c41b2539b11cb077532d4·...·]-2">}</samp></code></pre>372 </samp><samp·class="p"·data-group-id="7615981229-2">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="p"·data-group-id="7615981229-3">[</samp><samp·class="p"·data-group-id="7615981229-4">{</samp><samp·class="s">&quot;arne&quot;</samp><samp·class="p">,</samp><samp·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·60edfb99b2508a6e384520731bf667bf859f80f53c1374d32165f5aebb5f4c48·...·]-2">}</samp></code></pre>
373 ··</section>373 ··</section>
374 </section>374 </section>
375 <section·class="detail"·id="ping/1">375 <section·class="detail"·id="ping/1">
  
376 ··<div·class="detail-header">376 ··<div·class="detail-header">
377 ····<a·href="#ping/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">377 ····<a·href="#ping/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
378 ······<i·class="ri-link-m"·aria-hidden="true"></i>378 ······<i·class="ri-link-m"·aria-hidden="true"></i>
4.8 KB
OEBPS/net.xhtml
Max HTML report size reached
4.42 KB
OEBPS/logger_std_h.xhtml
Max HTML report size reached
15.5 KB
OEBPS/logger_filters.xhtml
Max HTML report size reached
4.69 KB
OEBPS/logger_disk_log_h.xhtml
Max HTML report size reached
93.9 KB
OEBPS/logger_cookbook.xhtml
Max HTML report size reached
101 KB
OEBPS/logger_chapter.xhtml
Max HTML report size reached
52.8 KB
OEBPS/logger.xhtml
Max HTML report size reached
49.5 KB
OEBPS/inet_res.xhtml
Max HTML report size reached
34.2 KB
OEBPS/inet.xhtml
Max HTML report size reached
2.85 KB
OEBPS/global_group.xhtml
    
Offset 23, 15 lines modifiedOffset 23, 15 lines modified
  
  
23 ······<section·id="moduledoc"·class="docstring">23 ······<section·id="moduledoc"·class="docstring">
24 <p>Grouping·nodes·to·global·name·registration·groups.</p><p>This·module·makes·it·possible·to·partition·the·nodes·of·a·system·into·<em>global24 <p>Grouping·nodes·to·global·name·registration·groups.</p><p>This·module·makes·it·possible·to·partition·the·nodes·of·a·system·into·<em>global
25 groups</em>.·Each·global·group·has·its·own·global·namespace,·see·<a·href="global.xhtml"><code·class="inline">global</code></a>.</p><p>The·main·advantage·of·dividing·systems·into·global·groups·is·that·the·background25 groups</em>.·Each·global·group·has·its·own·global·namespace,·see·<a·href="global.xhtml"><code·class="inline">global</code></a>.</p><p>The·main·advantage·of·dividing·systems·into·global·groups·is·that·the·background
26 load·decreases·while·the·number·of·nodes·to·be·updated·is·reduced·when26 load·decreases·while·the·number·of·nodes·to·be·updated·is·reduced·when
27 manipulating·globally·registered·names.</p><p>The·Kernel·configuration·parameter·<a·href="kernel_app.xhtml#global_groups"><code·class="inline">global_groups</code></a>27 manipulating·globally·registered·names.</p><p>The·Kernel·configuration·parameter·<a·href="kernel_app.xhtml#global_groups"><code·class="inline">global_groups</code></a>
28 defines·the·global·groups:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="8697942060-1">{</samp><samp·class="ss">global_groups</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="8697942060-2">[</samp><samp·class="n">GroupTuple</samp><samp·class="w">·</samp><samp·class="p">:</samp><samp·class="p"[·...·truncated·by·diffoscope;·len:·268,·SHA:·46447f102ce42a8e0cbe8b566dd4b99cdcfbb20bdb721a010b4681ee9698800b·...·]-1">}</samp></code></pre><p>For·the·processes·and·nodes·to·run·smoothly·using·the·global·group28 defines·the·global·groups:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="0378999471-1">{</samp><samp·class="ss">global_groups</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="0378999471-2">[</samp><samp·class="n">GroupTuple</samp><samp·class="w">·</samp><samp·class="p">:</samp><samp·class="p"[·...·truncated·by·diffoscope;·len:·268,·SHA:·9aa453e95fc99db272abe23052fc41db8d3cdafd41e97ad16b3dbedea1be9136·...·]-1">}</samp></code></pre><p>For·the·processes·and·nodes·to·run·smoothly·using·the·global·group
29 functionality,·the·following·criteria·must·be·met:</p><ul><li>An·instance·of·the·global·group·server,·<code·class="inline">global_group</code>,·must·be·running·on29 functionality,·the·following·criteria·must·be·met:</p><ul><li>An·instance·of·the·global·group·server,·<code·class="inline">global_group</code>,·must·be·running·on
30 each·node.·The·processes·are·automatically·started·and·synchronized·when·a30 each·node.·The·processes·are·automatically·started·and·synchronized·when·a
31 node·is·started.</li><li>All·involved·nodes·must·agree·on·the·global·group·definition,·otherwise·the31 node·is·started.</li><li>All·involved·nodes·must·agree·on·the·global·group·definition,·otherwise·the
32 behavior·of·the·system·is·undefined.</li><li><em>All</em>·nodes·in·the·system·must·belong·to·exactly·one·global·group.</li></ul><p>In·the·following·descriptions,·a·<em>group·node</em>·is·a·node·belonging·to·the·same32 behavior·of·the·system·is·undefined.</li><li><em>All</em>·nodes·in·the·system·must·belong·to·exactly·one·global·group.</li></ul><p>In·the·following·descriptions,·a·<em>group·node</em>·is·a·node·belonging·to·the·same
33 global·group·as·the·local·node.</p><h2·id="module-notes"·class="section-heading">33 global·group·as·the·local·node.</p><h2·id="module-notes"·class="section-heading">
34 ··<a·href="#module-notes"·class="hover-link">34 ··<a·href="#module-notes"·class="hover-link">
35 ····<i·class="ri-link-m"·aria-hidden="true"></i>35 ····<i·class="ri-link-m"·aria-hidden="true"></i>
7.33 KB
OEBPS/gen_udp.xhtml
Max HTML report size reached
59.5 KB
OEBPS/gen_tcp.xhtml
Max HTML report size reached
168 KB
OEBPS/gen_sctp.xhtml
Max HTML report size reached
29.8 KB
OEBPS/file.xhtml
Max HTML report size reached
18.0 KB
OEBPS/erpc.xhtml
Max HTML report size reached
2.53 KB
OEBPS/erl_epmd.xhtml
    
Offset 241, 16 lines modifiedOffset 241, 16 lines modified
241 ···················Reason·::·address·|·<a·href="file.xhtml#t:posix/0">file:posix</a>().</pre>241 ···················Reason·::·address·|·<a·href="file.xhtml#t:posix/0">file:posix</a>().</pre>
  
242 ······</div>242 ······</div>
  
243 <p>Called·by·<a·href="net_adm.xhtml"><code·class="inline">net_adm:names/0</code></a>.·<code·class="inline">Host</code>·defaults·to·the·localhost.243 <p>Called·by·<a·href="net_adm.xhtml"><code·class="inline">net_adm:names/0</code></a>.·<code·class="inline">Host</code>·defaults·to·the·localhost.
244 Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>244 Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>
245 registered·at·the·specified·host.·Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not245 registered·at·the·specified·host.·Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not
246 operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">(arne@dunn)1&gt;·</samp><samp·class="nc">erl_epmd</samp><samp·class="p">:</samp><samp·class="nf">names</samp><samp·class="p"·data-group-id="1055732569-1">(</samp><samp·class="ss">localhost</samp><samp·class="p"·data-group-id="1055732569-1">)</samp><samp·class="p">.</samp><samp·class="w">246 operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">(arne@dunn)1&gt;·</samp><samp·class="nc">erl_epmd</samp><samp·class="p">:</samp><samp·class="nf">names</samp><samp·class="p"·data-group-id="3767102784-1">(</samp><samp·class="ss">localhost</samp><samp·class="p"·data-group-id="3767102784-1">)</samp><samp·class="p">.</samp><samp·class="w">
247 </samp><samp·class="p"·data-group-id="1055732569-2">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="p"·data-group-id="1055732569-3">[</samp><samp·class="p"·data-group-id="1055732569-4">{</samp><samp·class="s">&quot;arne&quot;</samp><samp·class="p">,</samp><samp·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·05be95568637c4a4b3a3271adb17918ccf12c5e6fb2bf7cc3db724cbcd374c6d·...·]-2">}</samp></code></pre>247 </samp><samp·class="p"·data-group-id="3767102784-2">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="p"·data-group-id="3767102784-3">[</samp><samp·class="p"·data-group-id="3767102784-4">{</samp><samp·class="s">&quot;arne&quot;</samp><samp·class="p">,</samp><samp·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·24c20d608fab9a7654b0557849008e729154ca5f9abbfc5599ba5933d08b2aa1·...·]-2">}</samp></code></pre>
248 ··</section>248 ··</section>
249 </section>249 </section>
250 <section·class="detail"·id="port_please/2">250 <section·class="detail"·id="port_please/2">
  
251 ··<div·class="detail-header">251 ··<div·class="detail-header">
252 ····<a·href="#port_please/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">252 ····<a·href="#port_please/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
253 ······<i·class="ri-link-m"·aria-hidden="true"></i>253 ······<i·class="ri-link-m"·aria-hidden="true"></i>
12.6 KB
OEBPS/eep48_chapter.xhtml
Max HTML report size reached
1.24 KB
OEBPS/content.opf
1.2 KB
OEBPS/content.opf
Max HTML report size reached
5.03 KB
OEBPS/config.xhtml
Max HTML report size reached
20.9 KB
OEBPS/code.xhtml
Max HTML report size reached
2.68 KB
OEBPS/application.xhtml
    
Offset 1523, 15 lines modifiedOffset 1523, 15 lines modified
1523 distributed.·The·argument·overrides·the·value·for·the·application·in·the·Kernel1523 distributed.·The·argument·overrides·the·value·for·the·application·in·the·Kernel
1524 configuration·parameter·<code·class="inline">distributed</code>.·<code·class="inline">Application</code>·must·be·the·application1524 configuration·parameter·<code·class="inline">distributed</code>.·<code·class="inline">Application</code>·must·be·the·application
1525 name·(same·as·in·the·first·argument).·If·a·node·crashes·and·<code·class="inline">Time</code>·is·specified,1525 name·(same·as·in·the·first·argument).·If·a·node·crashes·and·<code·class="inline">Time</code>·is·specified,
1526 the·application·controller·waits·for·<code·class="inline">Time</code>·milliseconds·before·attempting·to1526 the·application·controller·waits·for·<code·class="inline">Time</code>·milliseconds·before·attempting·to
1527 restart·the·application·on·another·node.·If·<code·class="inline">Time</code>·is·not·specified,·it·defaults1527 restart·the·application·on·another·node.·If·<code·class="inline">Time</code>·is·not·specified,·it·defaults
1528 to·<code·class="inline">0</code>·and·the·application·is·restarted·immediately.</p><p><code·class="inline">Nodes</code>·is·a·list·of·node·names·where·the·application·can·run,·in·priority·from1528 to·<code·class="inline">0</code>·and·the·application·is·restarted·immediately.</p><p><code·class="inline">Nodes</code>·is·a·list·of·node·names·where·the·application·can·run,·in·priority·from
1529 left·to·right.·Node·names·can·be·grouped·using·tuples·to·indicate·that·they·have1529 left·to·right.·Node·names·can·be·grouped·using·tuples·to·indicate·that·they·have
1530 the·same·priority.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="n">Nodes</samp><samp·class="w">·</samp><samp·class="o">=</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="7700004851-1">[</samp><samp·class="ss">cp1@cave</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="7700004851-2">{</samp><samp·class="ss">cp2@cave</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">cp3@[·...·truncated·by·diffoscope;·len:·105,·SHA:·7f34576952bb185a80dfb82750dcc9f19906040410af27c444b4066a79f568eb·...·]-1">]</samp></code></pre><p>This·means·that·the·application·is·preferably·to·be·started·at·<code·class="inline">cp1@cave</code>.·If1530 the·same·priority.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="n">Nodes</samp><samp·class="w">·</samp><samp·class="o">=</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="5327271126-1">[</samp><samp·class="ss">cp1@cave</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="5327271126-2">{</samp><samp·class="ss">cp2@cave</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">cp3@[·...·truncated·by·diffoscope;·len:·105,·SHA:·fe801287c22d8b78c56e55b67c37e6c99e8a6c66d5b465419c5e818d5ae272bb·...·]-1">]</samp></code></pre><p>This·means·that·the·application·is·preferably·to·be·started·at·<code·class="inline">cp1@cave</code>.·If
1531 <code·class="inline">cp1@cave</code>·is·down,·the·application·is·to·be·started·at·<code·class="inline">cp2@cave</code>·or1531 <code·class="inline">cp1@cave</code>·is·down,·the·application·is·to·be·started·at·<code·class="inline">cp2@cave</code>·or
1532 <code·class="inline">cp3@cave</code>.</p><p>If·<code·class="inline">Distributed·==·default</code>,·the·value·for·the·application·in·the·Kernel1532 <code·class="inline">cp3@cave</code>.</p><p>If·<code·class="inline">Distributed·==·default</code>,·the·value·for·the·application·in·the·Kernel
1533 configuration·parameter·<code·class="inline">distributed</code>·is·used.</p>1533 configuration·parameter·<code·class="inline">distributed</code>·is·used.</p>
1534 ··</section>1534 ··</section>
1535 </section>1535 </section>
1536 <section·class="detail"·id="loaded_applications/0">1536 <section·class="detail"·id="loaded_applications/0">
  
26.1 KB
OEBPS/app.xhtml
Max HTML report size reached
52.9 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/logger.html
    
Offset 126, 34 lines modifiedOffset 126, 34 lines modified
  
126 ··</h1>126 ··</h1>
  
  
127 ····<section·id="moduledoc">127 ····<section·id="moduledoc">
128 <p>API·module·for·Logger,·the·standard·logging·facility·in·Erlang/OTP.</p><p>This·module·implements·the·main·API·for·logging·in·Erlang/OTP.·To·create·a·log128 <p>API·module·for·Logger,·the·standard·logging·facility·in·Erlang/OTP.</p><p>This·module·implements·the·main·API·for·logging·in·Erlang/OTP.·To·create·a·log
129 event,·use·the·<a·href="#logging-api-functions">API·functions</a>·or·the·log129 event,·use·the·<a·href="#logging-api-functions">API·functions</a>·or·the·log
130 <a·href="#module-macros">macros</a>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">?</span><span·class="n">LOG_ERROR</span><span·class="p"·data-group-id="6387901108-1">(</span><span·class="s">&quot;error·happened·because:·</span><span·class="si">~p</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6387901108-2">[</span><span·class="n">Reason</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·ec7444f97cfd789c3b62d6e785a510e0a82ac3fb82288bd5c20c1c0cd11d2d3d·...·]-1">)</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·With·macro</span><span·class="w">130 <a·href="#module-macros">macros</a>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">?</span><span·class="n">LOG_ERROR</span><span·class="p"·data-group-id="9033992971-1">(</span><span·class="s">&quot;error·happened·because:·</span><span·class="si">~p</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9033992971-2">[</span><span·class="n">Reason</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·79ef51f77a13079cd030c71fa5852ea4786be25ebb215539348c1e66ba406c10·...·]-1">)</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·With·macro</span><span·class="w">
131 </span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="6387901108-3">(</span><span·class="s">&quot;error·happened·because:·</span><span·class="si">~p</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6387901108-4">[</span><span·class="n">Reason</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·43d2739a403205f76af8dbea176dcd39f14e55624e988647607728bb36de0899·...·]-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Without·macro</span></code></pre><p>To·configure·the·Logger·backend,·use131 </span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="9033992971-3">(</span><span·class="s">&quot;error·happened·because:·</span><span·class="si">~p</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9033992971-4">[</span><span·class="n">Reason</s[·...·truncated·by·diffoscope;·len:·98,·SHA:·82a5577dd2e2594d065c560f987bd1824a1832c50fed48e165b0e2ab40b227fc·...·]-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Without·macro</span></code></pre><p>To·configure·the·Logger·backend,·use
132 <a·href="kernel_app.html#logger">Kernel·configuration·parameters</a>·or132 <a·href="kernel_app.html#logger">Kernel·configuration·parameters</a>·or
133 <a·href="#configuration-api-functions">configuration·functions</a>·in·the·Logger·API.</p><p>By·default,·the·Kernel·application·installs·one·log·handler·at·system·start.133 <a·href="#configuration-api-functions">configuration·functions</a>·in·the·Logger·API.</p><p>By·default,·the·Kernel·application·installs·one·log·handler·at·system·start.
134 This·handler·is·named·<code·class="inline">default</code>.·It·receives·and·processes·standard·log·events134 This·handler·is·named·<code·class="inline">default</code>.·It·receives·and·processes·standard·log·events
135 produced·by·the·Erlang·runtime·system,·standard·behaviours·and·different135 produced·by·the·Erlang·runtime·system,·standard·behaviours·and·different
136 Erlang/OTP·applications.·The·log·events·are·by·default·printed·to·the·terminal.</p><p>If·you·want·your·systems·logs·to·be·printed·to·a·file·instead,·you·must136 Erlang/OTP·applications.·The·log·events·are·by·default·printed·to·the·terminal.</p><p>If·you·want·your·systems·logs·to·be·printed·to·a·file·instead,·you·must
137 configure·the·default·handler·to·do·so.·The·simplest·way·is·to·include·the137 configure·the·default·handler·to·do·so.·The·simplest·way·is·to·include·the
138 following·in·your·<a·href="config.html"><code·class="inline">sys.config</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4072634825-1">[</span><span·class="p"·data-group-id="4072634825-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">138 following·in·your·<a·href="config.html"><code·class="inline">sys.config</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8164941067-1">[</span><span·class="p"·data-group-id="8164941067-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
139 ··</span><span·class="p"·data-group-id="4072634825-3">[</span><span·class="p"·data-group-id="4072634825-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">139 ··</span><span·class="p"·data-group-id="8164941067-3">[</span><span·class="p"·data-group-id="8164941067-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
140 ····</span><span·class="p"·data-group-id="4072634825-5">[</span><span·class="p"·data-group-id="4072634825-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">140 ····</span><span·class="p"·data-group-id="8164941067-5">[</span><span·class="p"·data-group-id="8164941067-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
141 ······</span><span·class="p"·data-group-id="4072634825-7">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4072634825-8">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;[·...·truncated·by·diffoscope;·len:·494,·SHA:·01e25e55049e7617ab97c28116068a43a45f51bc6bd2bfbedb3024c0de70f24f·...·]-1">]</span><span·class="p">.</span></code></pre><p>For·more·information·about:</p><ul><li>the·Logger·facility·in·general,·see·the·<a·href="logger_chapter.html">User's·Guide</a>.</li><li>how·to·configure·Logger,·see·the141 ······</span><span·class="p"·data-group-id="8164941067-7">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8164941067-8">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;[·...·truncated·by·diffoscope;·len:·494,·SHA:·f0bf9dc99eedb2f41eb4c986529d532c8d91e7bf55807cb4cfc9f0b77a8b7c31·...·]-1">]</span><span·class="p">.</span></code></pre><p>For·more·information·about:</p><ul><li>the·Logger·facility·in·general,·see·the·<a·href="logger_chapter.html">User's·Guide</a>.</li><li>how·to·configure·Logger,·see·the
142 <a·href="logger_chapter.html#configuration">Configuration</a>·section·in·the·User's·Guide.</li><li>the·built-in·handlers,·see·<a·href="logger_std_h.html"><code·class="inline">logger_std_h</code></a>·and·<a·href="logger_disk_log_h.html"><code·class="inline">logger_disk_log_h</code></a>.</li><li>the·built-in·formatter,·see·<a·href="logger_formatter.html"><code·class="inline">logger_formatter</code></a>.</li><li>built-in·filters,·see·<a·href="logger_filters.html"><code·class="inline">logger_filters</code></a>.</li></ul><h2·id="module-macros"·class="section-heading">142 <a·href="logger_chapter.html#configuration">Configuration</a>·section·in·the·User's·Guide.</li><li>the·built-in·handlers,·see·<a·href="logger_std_h.html"><code·class="inline">logger_std_h</code></a>·and·<a·href="logger_disk_log_h.html"><code·class="inline">logger_disk_log_h</code></a>.</li><li>the·built-in·formatter,·see·<a·href="logger_formatter.html"><code·class="inline">logger_formatter</code></a>.</li><li>built-in·filters,·see·<a·href="logger_filters.html"><code·class="inline">logger_filters</code></a>.</li></ul><h2·id="module-macros"·class="section-heading">
143 ··<a·href="#module-macros"·class="hover-link">143 ··<a·href="#module-macros"·class="hover-link">
144 ····<i·class="ri-link-m"·aria-hidden="true"></i>144 ····<i·class="ri-link-m"·aria-hidden="true"></i>
145 ··</a>145 ··</a>
146 ··<span·class="text">Macros</span>146 ··<span·class="text">Macros</span>
147 </h2>147 </h2>
148 <p>The·following·macros·are·defined·in·<code·class="inline">logger.hrl</code>,·which·is·included·in·a·module148 <p>The·following·macros·are·defined·in·<code·class="inline">logger.hrl</code>,·which·is·included·in·a·module
149 with·the·directive</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="7245550647-1">(</span><span·class="s">&quot;kernel/include/logger.hrl&quot;</span><span·class="p"·data-group-id="7245550647-1">)</span><span·class="p">.</span></code></pre><ul><li><code·class="inline">?LOG_EMERGENCY(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_EMERGENCY(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_ALERT(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_ALERT(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_CRITICAL(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_CRITICAL(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_ERROR(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_ERROR(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_WARNING(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_WARNING(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_NOTICE(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_NOTICE(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_INFO(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_INFO(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_DEBUG(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_DEBUG(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG(Level,StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG(Level,FunOrFormat,Args[,Metadata])</code></li></ul><p>All·macros·expand·to·a·call·to·Logger,·where·<code·class="inline">Level</code>·is·taken·from·the·macro149 with·the·directive</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6629191407-1">(</span><span·class="s">&quot;kernel/include/logger.hrl&quot;</span><span·class="p"·data-group-id="6629191407-1">)</span><span·class="p">.</span></code></pre><ul><li><code·class="inline">?LOG_EMERGENCY(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_EMERGENCY(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_ALERT(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_ALERT(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_CRITICAL(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_CRITICAL(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_ERROR(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_ERROR(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_WARNING(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_WARNING(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_NOTICE(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_NOTICE(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_INFO(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_INFO(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG_DEBUG(StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG_DEBUG(FunOrFormat,Args[,Metadata])</code></li><li><code·class="inline">?LOG(Level,StringOrReport[,Metadata])</code></li><li><code·class="inline">?LOG(Level,FunOrFormat,Args[,Metadata])</code></li></ul><p>All·macros·expand·to·a·call·to·Logger,·where·<code·class="inline">Level</code>·is·taken·from·the·macro
150 name,·or·from·the·first·argument·in·the·case·of·the·<code·class="inline">?LOG</code>·macro.·Location·data150 name,·or·from·the·first·argument·in·the·case·of·the·<code·class="inline">?LOG</code>·macro.·Location·data
151 is·added·to·the·metadata·as·described·under·the·<a·href="#t:metadata/0"><code·class="inline">metadata/0</code></a>·type·definition.</p><p>The·call·is·wrapped·in·a·case·statement·and·will·be·evaluated·only·if·<code·class="inline">Level</code>·is151 is·added·to·the·metadata·as·described·under·the·<a·href="#t:metadata/0"><code·class="inline">metadata/0</code></a>·type·definition.</p><p>The·call·is·wrapped·in·a·case·statement·and·will·be·evaluated·only·if·<code·class="inline">Level</code>·is
152 equal·to·or·below·the·configured·log·level.</p><h2·id="module-see-also"·class="section-heading">152 equal·to·or·below·the·configured·log·level.</p><h2·id="module-see-also"·class="section-heading">
153 ··<a·href="#module-see-also"·class="hover-link">153 ··<a·href="#module-see-also"·class="hover-link">
154 ····<i·class="ri-link-m"·aria-hidden="true"></i>154 ····<i·class="ri-link-m"·aria-hidden="true"></i>
155 ··</a>155 ··</a>
156 ··<span·class="text">See·Also</span>156 ··<span·class="text">See·Also</span>
Offset 2382, 21 lines modifiedOffset 2382, 21 lines modified
2382 ·········(Level·::·<a·href="#t:level/0">level</a>(),·Fun·::·<a·href="#t:msg_fun/0">msg_fun</a>(),·FunArgs·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·ok.</pre>2382 ·········(Level·::·<a·href="#t:level/0">level</a>(),·Fun·::·<a·href="#t:msg_fun/0">msg_fun</a>(),·FunArgs·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·ok.</pre>
  
2383 ······</div>2383 ······</div>
  
2384 <p>Create·a·log·event·at·the·given·<a·href="logger_chapter.html#log-level">log·level</a>,·with2384 <p>Create·a·log·event·at·the·given·<a·href="logger_chapter.html#log-level">log·level</a>,·with
2385 the·given·<a·href="logger_chapter.html#log-message">message</a>·to·be·logged·and2385 the·given·<a·href="logger_chapter.html#log-message">message</a>·to·be·logged·and
2386 <a·href="logger_chapter.html#metadata"><em>metadata</em></a>.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·A·plain·string</span><span·class="gp·unselectable">2386 <a·href="logger_chapter.html#metadata"><em>metadata</em></a>.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·A·plain·string</span><span·class="gp·unselectable">
2387 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3429396286-1">(</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Hello·World&quot;</span><span·class="p"·data-group-id="3429396286-1">)</span><span·class="p">.</span><span·class="w">2387 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3577462694-1">(</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Hello·World&quot;</span><span·class="p"·data-group-id="3577462694-1">)</span><span·class="p">.</span><span·class="w">
2388 </span><span·class="c1">%%·A·plain·string·with·metadata</span><span·class="gp·unselectable">2388 </span><span·class="c1">%%·A·plain·string·with·metadata</span><span·class="gp·unselectable">
2389 2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3429396286-2">(</span><span·class="ss">debug</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Hello·World&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3429396286-3">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·264,·SHA:·14710844feab313d95b9c55872bc40b7efea5a76bec493b48a4eafea5a2d4c7d·...·]-2">)</span><span·class="p">.</span><span·class="w">2389 2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3577462694-2">(</span><span·class="ss">debug</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Hello·World&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3577462694-3">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·264,·SHA:·ccc84bcd94bedbfb98656228eba3b518164d110dade3c0b7c33c34453b11e5d4·...·]-2">)</span><span·class="p">.</span><span·class="w">
2390 </span><span·class="c1">%%·A·format·string·with·arguments</span><span·class="gp·unselectable">2390 </span><span·class="c1">%%·A·format·string·with·arguments</span><span·class="gp·unselectable">
2391 3&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3429396286-4">(</span><span·class="ss">warning</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;The·roof·is·on·~ts&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3429396286-5">[</span><span·class="n">Cause</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·bcd423a367200bd0ae8d4e229af30c1a6b00d2ac4a70f8d650182c737c18d83a·...·]-4">)</span><span·class="p">.</span><span·class="w">2391 3&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3577462694-4">(</span><span·class="ss">warning</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;The·roof·is·on·~ts&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3577462694-5">[</span><span·class="n">Cause</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·e11ebddf2e6b2c4e1fd8d38dbc007e082c09d2b5c9c4e86b617742b3a683af20·...·]-4">)</span><span·class="p">.</span><span·class="w">
2392 </span><span·class="c1">%%·A·report</span><span·class="gp·unselectable">2392 </span><span·class="c1">%%·A·report</span><span·class="gp·unselectable">
2393 4&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3429396286-6">(</span><span·class="ss">warning</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3429396286-7">#{</span><span·class="w">·</span><span·class="ss">what</span><span·class="w">·</span><span·class="p">=&gt;</spa[·...·truncated·by·diffoscope;·len:·353,·SHA:·b7f5ac9d5ce1359a9141eaf2ed6028cd55c7d73daae4356058726a2cbaf8feff·...·]-6">)</span><span·class="p">.</span></code></pre><p>Equivalent·to·<a·href="#log/4"><code·class="inline">log(Level,·FormatOrFun,·Args,·#{})</code></a>·if·called·as2393 4&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="3577462694-6">(</span><span·class="ss">warning</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3577462694-7">#{</span><span·class="w">·</span><span·class="ss">what</span><span·class="w">·</span><span·class="p">=&gt;</spa[·...·truncated·by·diffoscope;·len:·353,·SHA:·063c8094f0b72426a3e4e7e1e5548fea19e3b89b165095c72db667a0989b925b·...·]-6">)</span><span·class="p">.</span></code></pre><p>Equivalent·to·<a·href="#log/4"><code·class="inline">log(Level,·FormatOrFun,·Args,·#{})</code></a>·if·called·as
2394 <code·class="inline">log(Level,·FormatOrFun,·Args)</code>.</p>2394 <code·class="inline">log(Level,·FormatOrFun,·Args)</code>.</p>
2395 ··</section>2395 ··</section>
2396 </section>2396 </section>
2397 <section·class="detail"·id="log/4">2397 <section·class="detail"·id="log/4">
  
2398 ··<div·class="detail-header">2398 ··<div·class="detail-header">
2399 ····<a·href="#log/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2399 ····<a·href="#log/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 2427, 20 lines modifiedOffset 2427, 20 lines modified
2427 <p>Create·a·log·event·at·the·given·<a·href="logger_chapter.html#log-level">log·level</a>,·with2427 <p>Create·a·log·event·at·the·given·<a·href="logger_chapter.html#log-level">log·level</a>,·with
2428 the·given·<a·href="logger_chapter.html#log-message">message</a>·to·be·logged·and2428 the·given·<a·href="logger_chapter.html#log-message">message</a>·to·be·logged·and
2429 <a·href="logger_chapter.html#metadata"><em>metadata</em></a>.</p><p>The·message·and·metadata·can·either·be·given·directly·in·the·arguments,·or2429 <a·href="logger_chapter.html#metadata"><em>metadata</em></a>.</p><p>The·message·and·metadata·can·either·be·given·directly·in·the·arguments,·or
2430 returned·from·a·fun.·Passing·a·fun·instead·of·the·message/metadata·directly·is2430 returned·from·a·fun.·Passing·a·fun·instead·of·the·message/metadata·directly·is
2431 useful·in·scenarios·when·the·message/metadata·is·very·expensive·to·compute.·This2431 useful·in·scenarios·when·the·message/metadata·is·very·expensive·to·compute.·This
2432 is·because·the·fun·is·only·evaluated·when·the·message/metadata·is·actually2432 is·because·the·fun·is·only·evaluated·when·the·message/metadata·is·actually
2433 needed,·which·may·be·not·at·all·if·the·log·event·is·not·to·be·logged.·Examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·A·plain·string·with·expensive·metadata</span><span·class="gp·unselectable">2433 needed,·which·may·be·not·at·all·if·the·log·event·is·not·to·be·logged.·Examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·A·plain·string·with·expensive·metadata</span><span·class="gp·unselectable">
2434 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="8465994032-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8465994032-2">(</span><span·class="p"·data-group-id="8465994032-3">[</span><span·class="p"·data-group-id="8465994032-3">]</span><span·class="p"·data-group-id="8465994032-2">)</[·...·truncated·by·diffoscope;·len:·900,·SHA:·5683ce6480b4c45bd612d02f8f5deca6cf67cda20b69ba6c3bcdd66cbd81038d·...·]-1">)</span><span·class="p">.</span><span·class="w">2434 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="4979985251-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4979985251-2">(</span><span·class="p"·data-group-id="4979985251-3">[</span><span·class="p"·data-group-id="4979985251-3">]</span><span·class="p"·data-group-id="4979985251-2">)</[·...·truncated·by·diffoscope;·len:·900,·SHA:·db920dbe5ba25ea46b41e7be84b512038a997daafe100a74c939eba83cb1cde2·...·]-1">)</span><span·class="p">.</span><span·class="w">
2435 </span><span·class="c1">%%·An·expensive·report</span><span·class="gp·unselectable">2435 </span><span·class="c1">%%·An·expensive·report</span><span·class="gp·unselectable">
2436 2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">debug</span><span·class="p"·data-group-id="8465994032-8">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8465994032-9">(</span><span·class="n">What</span><span·class="p"·data-group-id="8465994032-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·727,·SHA:·409dc60bee1530a727bbdb0d2546091ee4617619c2763c173359a737e3ff4919·...·]-8">)</span><span·class="p">.</span><span·class="w">2436 2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">debug</span><span·class="p"·data-group-id="4979985251-8">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4979985251-9">(</span><span·class="n">What</span><span·class="p"·data-group-id="4979985251-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·727,·SHA:·1e850e051fa10c5e1ebf5803cff4390418696396173bb2ba36665fe942e0b809·...·]-8">)</span><span·class="p">.</span><span·class="w">
2437 </span><span·class="c1">%%·A·plain·string·with·expensive·metadata·and·normal·metadata</span><span·class="gp·unselectable">2437 </span><span·class="c1">%%·A·plain·string·with·expensive·metadata·and·normal·metadata</span><span·class="gp·unselectable">
2438 3&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">debug</span><span·class="p"·data-group-id="8465994032-12">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8465994032-13">(</span><span·class="p"·data-group-id="8465994032-14">[</span><span·class="p"·data-group-id="8465994032-14">]</span><span·class="p"·data-group-id="8465994032-13[·...·truncated·by·diffoscope;·len:·859,·SHA:·56c62906f905434c93a2bcfcebc536f09b992c06223335484de1c8c5f594b02f·...·]-18">]</span><span·class="p">,</span><span·class="w">2438 3&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">debug</span><span·class="p"·data-group-id="4979985251-12">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4979985251-13">(</span><span·class="p"·data-group-id="4979985251-14">[</span><span·class="p"·data-group-id="4979985251-14">]</span><span·class="p"·data-group-id="4979985251-13[·...·truncated·by·diffoscope;·len:·859,·SHA:·c9394f1b8296715ae9b58950b78d6e644b8b0cb35f936da21ae692608dcb6bca·...·]-18">]</span><span·class="p">,</span><span·class="w">
2439 ···············</span><span·class="p"·data-group-id="8465994032-19">#{</span><span·class="w">·</span><span·class="ss">meta</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">data</span><span·class="w">·</span><span·class="p"·data-group-id="8465994032-19">}</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·8c904ba3714ae4c0ef7ba2af25600c849f64fde2fd9669026154960e8a278d9c·...·]-12">)</span><span·class="p">.</span></code></pre><p>When·metadata·is·given·both·as·an·argument·and·returned·from·the·fun·they·are2439 ···············</span><span·class="p"·data-group-id="4979985251-19">#{</span><span·class="w">·</span><span·class="ss">meta</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">data</span><span·class="w">·</span><span·class="p"·data-group-id="4979985251-19">}</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·568bd9ce363408e0dde5480e2b00a7320ae3ab2400e265052991697876a9c7c1·...·]-12">)</span><span·class="p">.</span></code></pre><p>When·metadata·is·given·both·as·an·argument·and·returned·from·the·fun·they·are
2440 merged.·If·equal·keys·exists·the·values·are·taken·from·the·metadata·returned·by2440 merged.·If·equal·keys·exists·the·values·are·taken·from·the·metadata·returned·by
2441 the·fun.</p>2441 the·fun.</p>
2442 ··</section>2442 ··</section>
2443 </section>2443 </section>
2444 <section·class="detail"·id="notice/1">2444 <section·class="detail"·id="notice/1">
  
2445 ··<div·class="detail-header">2445 ··<div·class="detail-header">
Offset 2755, 34 lines modifiedOffset 2755, 34 lines modified
2755 ······</div>2755 ······</div>
  
2756 <p>Reads·the·application·configuration·parameter·<code·class="inline">logger</code>·and·calls2756 <p>Reads·the·application·configuration·parameter·<code·class="inline">logger</code>·and·calls
2757 <a·href="#add_handlers/1"><code·class="inline">add_handlers/1</code></a>·with·its·contents.</p><p>This·function·should·be·used·by·custom·Logger·handlers·to·make·configuration2757 <a·href="#add_handlers/1"><code·class="inline">add_handlers/1</code></a>·with·its·contents.</p><p>This·function·should·be·used·by·custom·Logger·handlers·to·make·configuration
2758 consistent·no·matter·which·handler·the·system·uses.·Normal·usage·is·to·add·a2758 consistent·no·matter·which·handler·the·system·uses.·Normal·usage·is·to·add·a
2759 call·to·<a·href="#add_handlers/1"><code·class="inline">logger:add_handlers/1</code></a>·just·after·the·processes·that·the·handler·needs2759 call·to·<a·href="#add_handlers/1"><code·class="inline">logger:add_handlers/1</code></a>·just·after·the·processes·that·the·handler·needs
2760 are·started,·and·pass·the·application's·<code·class="inline">logger</code>·configuration·as·the·argument.2760 are·started,·and·pass·the·application's·<code·class="inline">logger</code>·configuration·as·the·argument.
2761 For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="6124358038-1">(</span><span·class="ss">application</span><span·class="p"·data-group-id="6124358038-1">)</span><span·class="p">.</span><span·class="w">2761 For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="9393762792-1">(</span><span·class="ss">application</span><span·class="p"·data-group-id="9393762792-1">)</span><span·class="p">.</span><span·class="w">
2762 </span><span·class="nf">start</span><span·class="p"·data-group-id="6124358038-2">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6124358038-3">[</span><span·class="p"·data-group-id="6124358038-3">]</span><span·class="p"·data-group-id="6124358038-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">2762 </span><span·class="nf">start</span><span·class="p"·data-group-id="9393762792-2">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9393762792-3">[</span><span·class="p"·data-group-id="9393762792-3">]</span><span·class="p"·data-group-id="9393762792-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
2763 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="6124358038-4">(</span><span·class="p"·data-group-id="6124358038-5">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_sup</span><span·class="p"·data-group-id="6124358038-5">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·252,·SHA:·194ce2f85edd1775abcad438bed3cc1aaa3ad3d0b10097acc43b5c38901e0151·...·]-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">2763 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">supervisor</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="9393762792-4">(</span><span·class="p"·data-group-id="9393762792-5">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_sup</span><span·class="p"·data-group-id="9393762792-5">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·252,·SHA:·1e7d79b61e190ad0351c14299ee6dd83c4855c31c64651e9c81f06dc0ba64c33·...·]-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
2764 ········</span><span·class="p"·data-group-id="6124358038-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="6124358038-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">2764 ········</span><span·class="p"·data-group-id="9393762792-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="9393762792-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
2765 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handlers</span><span·class="p"·data-group-id="6124358038-8">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="6124358038-8">)</span><span·class="p">,</span><span·class="w">2765 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handlers</span><span·class="p"·data-group-id="9393762792-8">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="9393762792-8">)</span><span·class="p">,</span><span·class="w">
2766 ············</span><span·class="p"·data-group-id="6124358038-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6124358038-10">[</span><span·class="p"·data-group-id="6[·...·truncated·by·diffoscope;·len:·63,·SHA:·1e2833d928839aea2e469c3bee0db063a4391aab7112e802b189ca7f9db53eef·...·]-9">}</span><span·class="p">;</span><span·class="w">2766 ············</span><span·class="p"·data-group-id="9393762792-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9393762792-10">[</span><span·class="p"·data-group-id="9[·...·truncated·by·diffoscope;·len:·63,·SHA:·5dbdfa259f51e0370fce29a481d7c0944e472b9e1802082efe127af93bd11d30·...·]-9">}</span><span·class="p">;</span><span·class="w">
2767 ········</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Error</span><span·class="w">2767 ········</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Error</span><span·class="w">
2768 ·····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>This·reads·the·<code·class="inline">logger</code>·configuration·parameter·from·the·<code·class="inline">my_app</code>·application2768 ·····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>This·reads·the·<code·class="inline">logger</code>·configuration·parameter·from·the·<code·class="inline">my_app</code>·application
2769 and·starts·the·configured·handlers.·The·contents·of·the·configuration·use·the2769 and·starts·the·configured·handlers.·The·contents·of·the·configuration·use·the
2770 same·rules·as·the2770 same·rules·as·the
2771 <a·href="logger_chapter.html#handler-configuration">logger·handler·configuration</a>.</p><p>If·the·handler·is·meant·to·replace·the·default·handler,·the·Kernel's·default2771 <a·href="logger_chapter.html#handler-configuration">logger·handler·configuration</a>.</p><p>If·the·handler·is·meant·to·replace·the·default·handler,·the·Kernel's·default
2772 handler·have·to·be·disabled·before·the·new·handler·is·added.·A·<code·class="inline">sys.config</code>·file2772 handler·have·to·be·disabled·before·the·new·handler·is·added.·A·<code·class="inline">sys.config</code>·file
2773 that·disables·the·Kernel·handler·and·adds·a·custom·handler·could·look·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7594880115-1">[</span><span·class="p"·data-group-id="7594880115-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">2773 that·disables·the·Kernel·handler·and·adds·a·custom·handler·could·look·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7393517202-1">[</span><span·class="p"·data-group-id="7393517202-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
2774 ··</span><span·class="p"·data-group-id="7594880115-3">[</span><span·class="p"·data-group-id="7594880115-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">2774 ··</span><span·class="p"·data-group-id="7393517202-3">[</span><span·class="p"·data-group-id="7393517202-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
2775 ····</span><span·class="c1">%%·Disable·the·default·Kernel·handler</span><span·class="w">2775 ····</span><span·class="c1">%%·Disable·the·default·Kernel·handler</span><span·class="w">
2776 ····</span><span·class="p"·data-group-id="7594880115-5">[</span><span·class="p"·data-group-id="7594880115-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefin[·...·truncated·by·diffoscope;·len:·262,·SHA:·6c9707282bab2295668642834334ca453d1d921b6b2fd2ddafedee7339ed31d3·...·]-2">}</span><span·class="p">,</span><span·class="w">2776 ····</span><span·class="p"·data-group-id="7393517202-5">[</span><span·class="p"·data-group-id="7393517202-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefin[·...·truncated·by·diffoscope;·len:·262,·SHA:·da2cf10de4855dc5666e468ddffcef86c5200a612157dca6259a524a1833f510·...·]-2">}</span><span·class="p">,</span><span·class="w">
2777 ·</span><span·class="p"·data-group-id="7594880115-7">{</span><span·class="ss">my_app</span><span·class="p">,</span><span·class="w">2777 ·</span><span·class="p"·data-group-id="7393517202-7">{</span><span·class="ss">my_app</span><span·class="p">,</span><span·class="w">
2778 ··</span><span·class="p"·data-group-id="7594880115-8">[</span><span·class="p"·data-group-id="7594880115-9">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">2778 ··</span><span·class="p"·data-group-id="7393517202-8">[</span><span·class="p"·data-group-id="7393517202-9">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
2779 ····</span><span·class="c1">%%·Enable·this·handler·as·the·default</span><span·class="w">2779 ····</span><span·class="c1">%%·Enable·this·handler·as·the·default</span><span·class="w">
2780 ····</span><span·class="p"·data-group-id="7594880115-10">[</span><span·class="p"·data-group-id="7594880115-11">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_ha[·...·truncated·by·diffoscope;·len:·477,·SHA:·30dcbcb82858bbccf9124d7b9cdbab69b7769eef4f0de90b4f0a0292599ea5cd·...·]-1">]</span><span·class="p">.</span></code></pre>2780 ····</span><span·class="p"·data-group-id="7393517202-10">[</span><span·class="p"·data-group-id="7393517202-11">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_ha[·...·truncated·by·diffoscope;·len:·477,·SHA:·9cd78fe0fda13db2d348415105b055f36b1c93d4df0572c2be5b0bf3ad09dcdd·...·]-1">]</span><span·class="p">.</span></code></pre>
2781 ··</section>2781 ··</section>
2782 </section>2782 </section>
2783 <section·class="detail"·id="add_primary_filter/2">2783 <section·class="detail"·id="add_primary_filter/2">
  
2784 ··<div·class="detail-header">2784 ··<div·class="detail-header">
2785 ····<a·href="#add_primary_filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2785 ····<a·href="#add_primary_filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2786 ······<i·class="ri-link-m"·aria-hidden="true"></i>2786 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 3729, 16 lines modifiedOffset 3729, 16 lines modified
3729 ··········<pre·translate="no"><span·class="attribute">-spec</span>·update_formatter_config(HandlerId,·FormatterConfig)·->·ok·|·{error,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}3729 ··········<pre·translate="no"><span·class="attribute">-spec</span>·update_formatter_config(HandlerId,·FormatterConfig)·->·ok·|·{error,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}
3730 ·································when3730 ·································when
3731 ·····································HandlerId·::·<a·href="logger_handler.html#t:id/0">logger_handler:id</a>(),3731 ·····································HandlerId·::·<a·href="logger_handler.html#t:id/0">logger_handler:id</a>(),
3732 ·····································FormatterConfig·::·<a·href="#t:formatter_config/0">formatter_config</a>().</pre>3732 ·····································FormatterConfig·::·<a·href="#t:formatter_config/0">formatter_config</a>().</pre>
  
3733 ······</div>3733 ······</div>
  
3734 <p>Update·the·formatter·configuration·for·the·specified·handler.</p><p>The·new·configuration·is·merged·with·the·existing·formatter·configuration.</p><p>To·overwrite·the·existing·configuration·without·any·merge,·use</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="1202978829-1">(</span><span·class="n">HandlerId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="p">,</span><span·class="w">3734 <p>Update·the·formatter·configuration·for·the·specified·handler.</p><p>The·new·configuration·is·merged·with·the·existing·formatter·configuration.</p><p>To·overwrite·the·existing·configuration·without·any·merge,·use</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="4917485661-1">(</span><span·class="n">HandlerId</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="p">,</span><span·class="w">
3735 »       ······</span><span·class="p"·data-group-id="1202978829-2">{</span><span·class="n">FormatterModule</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FormatterConfig</span><span·class="p"·data-group-id="1202978829-2">}</span><span·class="p"·data-group-id="1202978829-1">)</span><span·class="p">.</span></code></pre>3735 »       ······</span><span·class="p"·data-group-id="4917485661-2">{</span><span·class="n">FormatterModule</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FormatterConfig</span><span·class="p"·data-group-id="4917485661-2">}</span><span·class="p"·data-group-id="4917485661-1">)</span><span·class="p">.</span></code></pre>
3736 ··</section>3736 ··</section>
3737 </section>3737 </section>
3738 <section·class="detail"·id="update_formatter_config/3">3738 <section·class="detail"·id="update_formatter_config/3">
  
3739 ··<div·class="detail-header">3739 ··<div·class="detail-header">
Max diff block lines reached; 11794/54016 bytes (21.83%) of diff not shown.
101 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/logger_chapter.html
    
Offset 186, 15 lines modifiedOffset 186, 15 lines modified
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">Logger·API</span>188 ··<span·class="text">Logger·API</span>
189 </h2>189 </h2>
190 <p>The·API·for·logging·consists·of·a·set·of·<a·href="logger.html#module-macros">macros</a>,·and·a·set190 <p>The·API·for·logging·consists·of·a·set·of·<a·href="logger.html#module-macros">macros</a>,·and·a·set
191 of·functions·on·the·form·<code·class="inline">logger:Level/1,2,3</code>,·which·are·all·shortcuts·for191 of·functions·on·the·form·<code·class="inline">logger:Level/1,2,3</code>,·which·are·all·shortcuts·for
192 <a·href="logger.html#log/2"><code·class="inline">logger:log(Level,Arg1[,Arg2[,Arg3]])</code></a>.</p><p>The·macros·are·defined·in·<code·class="inline">logger.hrl</code>,·which·is·included·in·a·module·with·the192 <a·href="logger.html#log/2"><code·class="inline">logger:log(Level,Arg1[,Arg2[,Arg3]])</code></a>.</p><p>The·macros·are·defined·in·<code·class="inline">logger.hrl</code>,·which·is·included·in·a·module·with·the
193 directive</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="9131807271-1">(</span><span·class="s">&quot;kernel/include/logger.hrl&quot;</span><span·class="p"·data-group-id="9131807271-1">)</span><span·class="p">.</span></code></pre><p>The·difference·between·using·the·macros·and·the·exported·functions·is·that193 directive</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4549454095-1">(</span><span·class="s">&quot;kernel/include/logger.hrl&quot;</span><span·class="p"·data-group-id="4549454095-1">)</span><span·class="p">.</span></code></pre><p>The·difference·between·using·the·macros·and·the·exported·functions·is·that
194 macros·add·location·(originator)·information·to·the·metadata,·and·performs·lazy194 macros·add·location·(originator)·information·to·the·metadata,·and·performs·lazy
195 evaluation·by·wrapping·the·logger·call·in·a·case·statement,·so·it·is·only195 evaluation·by·wrapping·the·logger·call·in·a·case·statement,·so·it·is·only
196 evaluated·if·the·log·level·of·the·event·passes·the·primary·log·level·check.</p><h3·id="log-level"·class="section-heading">196 evaluated·if·the·log·level·of·the·event·passes·the·primary·log·level·check.</p><h3·id="log-level"·class="section-heading">
197 ··<a·href="#log-level"·class="hover-link">197 ··<a·href="#log-level"·class="hover-link">
198 ····<i·class="ri-link-m"·aria-hidden="true"></i>198 ····<i·class="ri-link-m"·aria-hidden="true"></i>
199 ··</a>199 ··</a>
200 ··<span·class="text">Log·Level</span>200 ··<span·class="text">Log·Level</span>
Offset 208, 31 lines modifiedOffset 208, 31 lines modified
208 ··<a·href="#log-message"·class="hover-link">208 ··<a·href="#log-message"·class="hover-link">
209 ····<i·class="ri-link-m"·aria-hidden="true"></i>209 ····<i·class="ri-link-m"·aria-hidden="true"></i>
210 ··</a>210 ··</a>
211 ··<span·class="text">Log·Message</span>211 ··<span·class="text">Log·Message</span>
212 </h3>212 </h3>
213 <p>The·log·message·contains·the·information·to·be·logged.·The·message·can·consist213 <p>The·log·message·contains·the·information·to·be·logged.·The·message·can·consist
214 of·a·format·string·and·arguments·(given·as·two·separate·parameters·in·the·Logger214 of·a·format·string·and·arguments·(given·as·two·separate·parameters·in·the·Logger
215 API),·a·string·or·a·report.</p><p>Example,·format·string·and·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="2720513502-1">(</span><span·class="s">&quot;The·file·does·not·exist:·~ts&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2720513502-2">[</span><span·class="n">Filename</span><span·class="p"·data-group-id="2720513502-2">]</span><span·clas[·...·truncated·by·diffoscope;·len:·367,·SHA:·d32e60ece94eae4d79a98840e7810e80f1c6481ac11850db522181e78476cc6f·...·]-1">)</span></code></pre><p>A·report,·which·is·either·a·map·or·a·key-value·list,·is·the·preferred·way·to·log215 API),·a·string·or·a·report.</p><p>Example,·format·string·and·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="7680795526-1">(</span><span·class="s">&quot;The·file·does·not·exist:·~ts&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="7680795526-2">[</span><span·class="n">Filename</span><span·class="p"·data-group-id="7680795526-2">]</span><span·clas[·...·truncated·by·diffoscope;·len:·367,·SHA:·24b8ac70aad683bff23fd819aa6a7b1052a06bf513b6ef6ff6715c100f1323ff·...·]-1">)</span></code></pre><p>A·report,·which·is·either·a·map·or·a·key-value·list,·is·the·preferred·way·to·log
216 using·Logger·as·it·makes·it·possible·for·different·backends·to·filter·and·format216 using·Logger·as·it·makes·it·possible·for·different·backends·to·filter·and·format
217 the·log·event·as·it·needs·to.</p><p>Example,·report:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">?</span><span·class="n">LOG_ERROR</span><span·class="p"·data-group-id="9922270995-1">(</span><span·class="p"·data-group-id="9922270995-2">#{</span><span·class="w">·</span><span·class="ss">user</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">joe</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·464,·SHA:·0beca617b655aa7a6b3a6119fe675fe441ca0b1246a07e255048c155c09b8a16·...·]-1">)</span></code></pre><p>Reports·can·be·accompanied·by·a·<em>report·callback</em>·specified·in·the·log·event's217 the·log·event·as·it·needs·to.</p><p>Example,·report:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">?</span><span·class="n">LOG_ERROR</span><span·class="p"·data-group-id="8091266437-1">(</span><span·class="p"·data-group-id="8091266437-2">#{</span><span·class="w">·</span><span·class="ss">user</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">joe</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·464,·SHA:·db9bbfb45bd22bc6d09ac7b95f9a5d0bc6c20a149f82da2f7ac31620f90fae0f·...·]-1">)</span></code></pre><p>Reports·can·be·accompanied·by·a·<em>report·callback</em>·specified·in·the·log·event's
218 <a·href="#metadata">metadata</a>.·The·report·callback·is·a·convenience218 <a·href="#metadata">metadata</a>.·The·report·callback·is·a·convenience
219 function·that·the·<a·href="#formatters">formatter</a>·can·use·to·convert219 function·that·the·<a·href="#formatters">formatter</a>·can·use·to·convert
220 the·report·to·a·format·string·and·arguments,·or·directly·to·a·string.·The220 the·report·to·a·format·string·and·arguments,·or·directly·to·a·string.·The
221 formatter·can·also·use·its·own·conversion·function,·if·no·callback·is·provided,221 formatter·can·also·use·its·own·conversion·function,·if·no·callback·is·provided,
222 or·if·a·customized·formatting·is·desired.</p><p>The·report·callback·must·be·a·fun·with·one·or·two·arguments.·If·it·takes·one222 or·if·a·customized·formatting·is·desired.</p><p>The·report·callback·must·be·a·fun·with·one·or·two·arguments.·If·it·takes·one
223 argument,·this·is·the·report·itself,·and·the·fun·returns·a·format·string·and223 argument,·this·is·the·report·itself,·and·the·fun·returns·a·format·string·and
224 arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="7393719895-1">(</span><span·class="p"·data-group-id="7393719895-2">(</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">report</span><span·class="p"·data-group-id="7393719895-3">(</span><span·class="p"·data-group-id="7393719895-3">)</span><span·class="p"·data-group-id="7393719895-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7393719895-4">{</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7393719895-5">(</span><span·class="p"·data-group-id="7393719895-5">)</span><span·class="p">,</span><span·class="p"·data-group-id="7393719895-6">[</span><span·class="nf">term</span><span·class="p"·data-group-id="7393719895-7">(</span><span·class="p"·data-group-id="7393719895-7">)</span><span·class="p"·data-group-id="7393719895-6">]</span><span·class="p"·data-group-id="7393719895-4">}</span><span·class="p"·data-group-id="7393719895-1">)</span></code></pre><p>If·it·takes·two·arguments,·the·first·is·the·report,·and·the·second·is·a·map 
225 containing·extra·data·that·allows·direct·conversion·to·a·string:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="9461410856-1">(</span><span·class="p"·data-group-id="9461410856-2">(</span><span·c[·...·truncated·by·diffoscope;·len:·924,·SHA:·ea416b6656500c2e9ae0536a01548b5b6b9bbca55bcdbec4dd5814d2d198ee6b·...·]224 arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="3024863056-1">(</span><span·class="p"·data-group-id="3024863056-2">(</span><span·class="nc">logger</span><span·class="p">:</span><span·c[·...·truncated·by·diffoscope;·len:·958,·SHA:·7a0a2a8c2338272c639ac4e841fa3df1de98f38cb7987d96ce080ac80b6b7beb·...·]
 225 containing·extra·data·that·allows·direct·conversion·to·a·string:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="8135316594-1">(</span><span·class="p"·data-group-id="8135316594-2">(</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">report</span><span·class="p"·data-group-id="8135316594-3">(</span><span·class="p"·data-group-id="8135316594-3">)</span><span·class="p">,</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">report_cb_config</span><span·class="p"·data-group-id="8135316594-4">(</span><span·class="p"·data-group-id="8135316594-4">)</span><span·class="p"·data-group-id="8135316594-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">chardata</span><span·class="p"·data-group-id="8135316594-5">(</span><span·class="p"·data-group-id="8135316594-5">)</span><span·class="p"·data-group-id="8135316594-1">)</span></code></pre><p>The·fun·must·obey·the·<code·class="inline">depth</code>·and·<code·class="inline">chars_limit</code>·parameters·provided·in·the
226 second·argument,·as·the·formatter·cannot·do·anything·useful·of·these·parameters226 second·argument,·as·the·formatter·cannot·do·anything·useful·of·these·parameters
227 with·the·returned·string.·The·extra·data·also·contains·a·field·named227 with·the·returned·string.·The·extra·data·also·contains·a·field·named
228 <code·class="inline">single_line</code>,·indicating·if·the·printed·log·message·may·contain·line·breaks·or228 <code·class="inline">single_line</code>,·indicating·if·the·printed·log·message·may·contain·line·breaks·or
229 not.·This·variant·is·used·when·the·formatting·of·the·report·depends·on·the·size229 not.·This·variant·is·used·when·the·formatting·of·the·report·depends·on·the·size
230 or·single·line·parameters.</p><p>Example,·report,·and·metadata·with·report·callback:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">debug</span><span·class="p"·data-group-id="6947923040-1">(</span><span·class="p"·data-group-id="6947923040-2">#{</span><span·class="ss">got</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">connection_request</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·361,·SHA:·608c8ed9ca1f79ff693e1c9ef22d148a3b57d79084c04f84c0984e35a0b2eedd·...·]0-2">}</span><span·class="p">,</span><span·class="w">230 or·single·line·parameters.</p><p>Example,·report,·and·metadata·with·report·callback:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">debug</span><span·class="p"·data-group-id="7635803870-1">(</span><span·class="p"·data-group-id="7635803870-2">#{</span><span·class="ss">got</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">connection_request</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·361,·SHA:·cfd1745cc755ade973d7a34fe58414199d819d4f9c00a2ee0879724519105ee5·...·]0-2">}</span><span·class="p">,</span><span·class="w">
231 ·············</span><span·class="p"·data-group-id="6947923040-3">#{</span><span·class="ss">report_cb</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6947923040-4">(</span><span·class="n">R</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·596,·SHA:·1f6456de3ef4364dbe120021912e7e53c38006f7529fe76df101d4e5f0919418·...·]0-1">)</span></code></pre><p>The·log·message·can·also·be·provided·through·a·fun·for·lazy·evaluation.·The·fun231 ·············</span><span·class="p"·data-group-id="7635803870-3">#{</span><span·class="ss">report_cb</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7635803870-4">(</span><span·class="n">R</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·596,·SHA:·4ff81294ffcd100d8fc93e8795e61edf0ef907a08c40a515bcdb1f7f17c8071c·...·]0-1">)</span></code></pre><p>The·log·message·can·also·be·provided·through·a·fun·for·lazy·evaluation.·The·fun
232 is·only·evaluated·if·the·primary·log·level·check·passes,·and·is·therefore232 is·only·evaluated·if·the·primary·log·level·check·passes,·and·is·therefore
233 recommended·if·it·is·expensive·to·generate·the·message.·The·lazy·fun·must·return233 recommended·if·it·is·expensive·to·generate·the·message.·The·lazy·fun·must·return
234 a·string,·a·report,·or·a·tuple·with·format·string·and·arguments.</p><h3·id="metadata"·class="section-heading">234 a·string,·a·report,·or·a·tuple·with·format·string·and·arguments.</p><h3·id="metadata"·class="section-heading">
235 ··<a·href="#metadata"·class="hover-link">235 ··<a·href="#metadata"·class="hover-link">
236 ····<i·class="ri-link-m"·aria-hidden="true"></i>236 ····<i·class="ri-link-m"·aria-hidden="true"></i>
237 ··</a>237 ··</a>
238 ··<span·class="text">Metadata</span>238 ··<span·class="text">Metadata</span>
Offset 412, 22 lines modifiedOffset 412, 22 lines modified
412 with·<a·href="../../../../lib/sasl-4.2.2/doc/html/error_logging.html">SASL·Error·Logging</a>,·which·is·specified·with412 with·<a·href="../../../../lib/sasl-4.2.2/doc/html/error_logging.html">SASL·Error·Logging</a>,·which·is·specified·with
413 <a·href="#logger_sasl_compatible"><code·class="inline">logger_sasl_compatible</code></a>.</p><p>With·this·parameter,·you·can·modify·or·disable·the·default·handler,·add·custom413 <a·href="#logger_sasl_compatible"><code·class="inline">logger_sasl_compatible</code></a>.</p><p>With·this·parameter,·you·can·modify·or·disable·the·default·handler,·add·custom
414 handlers·and·primary·logger·filters,·set·log·levels·per·module,·and·modify·the414 handlers·and·primary·logger·filters,·set·log·levels·per·module,·and·modify·the
415 <a·href="#logger-proxy">proxy</a>·configuration.</p><p><code·class="inline">Config</code>·is·any·(zero·or·more)·of·the·following:</p><ul><li><p><strong><code·class="inline">{handler,·default,·undefined}</code></strong>·-·Disables·the·default·handler.·This415 <a·href="#logger-proxy">proxy</a>·configuration.</p><p><code·class="inline">Config</code>·is·any·(zero·or·more)·of·the·following:</p><ul><li><p><strong><code·class="inline">{handler,·default,·undefined}</code></strong>·-·Disables·the·default·handler.·This
416 allows·another·application·to·add·its·own·default·handler.</p><p>Only·one·entry·of·this·type·is·allowed.</p></li><li><p><strong><code·class="inline">{handler,·HandlerId,·Module,·HandlerConfig}</code></strong>·-·If·<code·class="inline">HandlerId</code>·is416 allows·another·application·to·add·its·own·default·handler.</p><p>Only·one·entry·of·this·type·is·allowed.</p></li><li><p><strong><code·class="inline">{handler,·HandlerId,·Module,·HandlerConfig}</code></strong>·-·If·<code·class="inline">HandlerId</code>·is
417 <code·class="inline">default</code>,·then·this·entry·modifies·the·default·handler,·equivalent·to417 <code·class="inline">default</code>,·then·this·entry·modifies·the·default·handler,·equivalent·to
418 calling</p><pre><code·class="text">········logger:remove_handler(default)418 calling</p><pre><code·class="text">········logger:remove_handler(default)
419 </code></pre><p>followed·by</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="4504071628-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HandlerConfig</span><span·class="p"·data-group-id="4504071628-1">)</span><span·class="w">419 </code></pre><p>followed·by</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="2522567301-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HandlerConfig</span><span·class="p"·data-group-id="2522567301-1">)</span><span·class="w">
420 </span></code></pre><p>For·all·other·values·of·<code·class="inline">HandlerId</code>,·this·entry·adds·a·new·handler,420 </span></code></pre><p>For·all·other·values·of·<code·class="inline">HandlerId</code>,·this·entry·adds·a·new·handler,
421 equivalent·to·calling</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="9691850402-1">(</span><span·class="n">HandlerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HandlerConfig</span><span·class="p"·data-group-id="9691850402-1">)</span><span·class="w">421 equivalent·to·calling</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="4442397742-1">(</span><span·class="n">HandlerId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HandlerConfig</span><span·class="p"·data-group-id="4442397742-1">)</span><span·class="w">
422 </span></code></pre><p>Multiple·entries·of·this·type·are·allowed.</p></li><li><p><strong><code·class="inline">{filters,·FilterDefault,·[Filter]}</code></strong>·-·Adds·the·specified·primary422 </span></code></pre><p>Multiple·entries·of·this·type·are·allowed.</p></li><li><p><strong><code·class="inline">{filters,·FilterDefault,·[Filter]}</code></strong>·-·Adds·the·specified·primary
423 filters.</p><ul><li><p><code·class="inline">FilterDefault·=·log·|·stop</code></p></li><li><code·class="inline">Filter·=·{FilterId,·{FilterFun,·FilterConfig}}</code></li></ul><p>Equivalent·to·calling</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_primary_filter</span><span·class="p"·data-group-id="4144321607-1">(</span><span·class="n">FilterId</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4144321607-2">{</span><span·class="n">FilterFun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filter[·...·truncated·by·diffoscope;·len:·107,·SHA:·1ab7c5c58882605b59a8fba7b2529f98857a6fa397ffbe59056c30e319aae909·...·]-1">)</span><span·class="w">423 filters.</p><ul><li><p><code·class="inline">FilterDefault·=·log·|·stop</code></p></li><li><code·class="inline">Filter·=·{FilterId,·{FilterFun,·FilterConfig}}</code></li></ul><p>Equivalent·to·calling</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_primary_filter</span><span·class="p"·data-group-id="1236031724-1">(</span><span·class="n">FilterId</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1236031724-2">{</span><span·class="n">FilterFun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filter[·...·truncated·by·diffoscope;·len:·107,·SHA:·c7ebcc9f0928ef84f36744b984973635e60add38e119bf9d8dd2b6459758d407·...·]-1">)</span><span·class="w">
424 </span></code></pre><p>for·each·<code·class="inline">Filter</code>.</p><p><code·class="inline">FilterDefault</code>·specifies·the·behaviour·if·all·primary·filters·return424 </span></code></pre><p>for·each·<code·class="inline">Filter</code>.</p><p><code·class="inline">FilterDefault</code>·specifies·the·behaviour·if·all·primary·filters·return
425 <code·class="inline">ignore</code>,·see·section·<a·href="#filters">Filters</a>.</p><p>Only·one·entry·of·this·type·is·allowed.</p></li><li><p><strong><code·class="inline">{module_level,·Level,·[Module]}</code></strong>·-·Sets·module·log·level·for·the·given425 <code·class="inline">ignore</code>,·see·section·<a·href="#filters">Filters</a>.</p><p>Only·one·entry·of·this·type·is·allowed.</p></li><li><p><strong><code·class="inline">{module_level,·Level,·[Module]}</code></strong>·-·Sets·module·log·level·for·the·given
426 modules.·Equivalent·to·calling</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_module_level</span><span·class="p"·data-group-id="0698039134-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Level</span><span·class="p"·data-group-id="0698039134-1">)</span></code></pre><p>for·each·<code·class="inline">Module</code>.</p><p>Multiple·entries·of·this·type·are·allowed.</p></li><li><p><strong><code·class="inline">{proxy,·ProxyConfig}</code></strong>·-·Sets·the·proxy·configuration,·equivalent·to426 modules.·Equivalent·to·calling</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_module_level</span><span·class="p"·data-group-id="8358869913-1">(</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Level</span><span·class="p"·data-group-id="8358869913-1">)</span></code></pre><p>for·each·<code·class="inline">Module</code>.</p><p>Multiple·entries·of·this·type·are·allowed.</p></li><li><p><strong><code·class="inline">{proxy,·ProxyConfig}</code></strong>·-·Sets·the·proxy·configuration,·equivalent·to
427 calling</p><pre><code·class="text">········logger:set_proxy_config(ProxyConfig)427 calling</p><pre><code·class="text">········logger:set_proxy_config(ProxyConfig)
428 </code></pre><p>Only·one·entry·of·this·type·is·allowed.</p></li></ul><p>See·section·<a·href="#configuration-examples">Configuration·Examples</a>·for428 </code></pre><p>Only·one·entry·of·this·type·is·allowed.</p></li></ul><p>See·section·<a·href="#configuration-examples">Configuration·Examples</a>·for
429 examples·using·the·<code·class="inline">logger</code>·parameter·for·system·configuration.</p></li><li><p><strong><code·class="inline"·id="logger_metadata">logger_metadata·=·map()</code></strong>·-·Specifies·the·primary429 examples·using·the·<code·class="inline">logger</code>·parameter·for·system·configuration.</p></li><li><p><strong><code·class="inline"·id="logger_metadata">logger_metadata·=·map()</code></strong>·-·Specifies·the·primary
430 metadata.·See·the·<a·href="kernel_app.html#logger_metadata"><code·class="inline">kernel(6)</code></a>·manual·page·for430 metadata.·See·the·<a·href="kernel_app.html#logger_metadata"><code·class="inline">kernel(6)</code></a>·manual·page·for
431 more·information·about·this·parameter.</p></li><li><p><strong><code·class="inline"·id="logger_level">logger_level·=·Level</code></strong>·-·Specifies·the·primary·log431 more·information·about·this·parameter.</p></li><li><p><strong><code·class="inline"·id="logger_level">logger_level·=·Level</code></strong>·-·Specifies·the·primary·log
432 level.·See·the·<a·href="kernel_app.html#logger_level"><code·class="inline">kernel(6)</code></a>·manual·page·for·more432 level.·See·the·<a·href="kernel_app.html#logger_level"><code·class="inline">kernel(6)</code></a>·manual·page·for·more
433 information·about·this·parameter.</p></li><li><p><strong><code·class="inline"·id="logger_sasl_compatible">logger_sasl_compatible·=·true·|·false</code></strong>·-433 information·about·this·parameter.</p></li><li><p><strong><code·class="inline"·id="logger_sasl_compatible">logger_sasl_compatible·=·true·|·false</code></strong>·-
Offset 442, 39 lines modifiedOffset 442, 39 lines modified
442 </h3>442 </h3>
443 <p>The·value·of·the·Kernel·configuration·parameter·<code·class="inline">logger</code>·is·a·list·of·tuples.·It443 <p>The·value·of·the·Kernel·configuration·parameter·<code·class="inline">logger</code>·is·a·list·of·tuples.·It
444 is·possible·to·write·the·term·on·the·command·line·when·starting·an·erlang·node,444 is·possible·to·write·the·term·on·the·command·line·when·starting·an·erlang·node,
445 but·as·the·term·grows,·a·better·approach·is·to·use·the·system·configuration445 but·as·the·term·grows,·a·better·approach·is·to·use·the·system·configuration
446 file.·See·the·<a·href="config.html"><code·class="inline">config(4)</code></a>·manual·page·for·more·information·about446 file.·See·the·<a·href="config.html"><code·class="inline">config(4)</code></a>·manual·page·for·more·information·about
447 this·file.</p><p>Each·of·the·following·examples·shows·a·simple·system·configuration·file·that447 this·file.</p><p>Each·of·the·following·examples·shows·a·simple·system·configuration·file·that
448 configures·Logger·according·to·the·description.</p><p>Modify·the·default·handler·to·print·to·a·file·instead·of448 configures·Logger·according·to·the·description.</p><p>Modify·the·default·handler·to·print·to·a·file·instead·of
449 <a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#t:standard_io/0"><code·class="inline">standard_io</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6058860097-1">[</span><span·class="p"·data-group-id="6058860097-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">449 <a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#t:standard_io/0"><code·class="inline">standard_io</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6076818286-1">[</span><span·class="p"·data-group-id="6076818286-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
450 ··</span><span·class="p"·data-group-id="6058860097-3">[</span><span·class="p"·data-group-id="6058860097-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">450 ··</span><span·class="p"·data-group-id="6076818286-3">[</span><span·class="p"·data-group-id="6076818286-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
451 ····</span><span·class="p"·data-group-id="6058860097-5">[</span><span·class="p"·data-group-id="6058860097-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·{handler,·HandlerId,·Module,</span><span·class="w">451 ····</span><span·class="p"·data-group-id="6076818286-5">[</span><span·class="p"·data-group-id="6076818286-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·{handler,·HandlerId,·Module,</span><span·class="w">
452 ······</span><span·class="p"·data-group-id="6058860097-7">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6058860097-8">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/erlang.log&quot;</span><span·class="p"·data-group-id="6058860097-8">}</span><span·class="p"·data-group-id="6058860097-7">}</span><span·class="p"·data-group-id="6058860097-6">}</span><span·class="w">··</span><span·class="c1">%·Config}</span><span·class="w"> 
453 ····</span><span·class="p"·data-group-id="6058860097-5">]</span><span·class="p"·data-group-id="6058860097-4">}</span><span·class="p"·data-group-id="6058860097-3">]</span><span·class="p"·data-group-id="6058860097-2">}</span><span·class="p"·data-group-id="605886[·...·truncated·by·diffoscope;·len:·329,·SHA:·dcd6940992c37602adce087406b8420cf94cbb7e438e7228855924868c0208f2·...·]</span><span·class="w">452 ······</span><span·class="p"·data-group-id="6076818286-7">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6076818286-8">#{</span><span·class="ss">file</span><span[·...·truncated·by·diffoscope;·len:·330,·SHA:·c8a1d2a7dc34e404277c1e26cda5e0580bc9a9064bf2433c0a904e50a9c852e2·...·]</span><span·class="w">
 453 ····</span><span·class="p"·data-group-id="6076818286-5">]</span><span·class="p"·data-group-id="6076818286-4">}</span><span·class="p"·data-group-id="6076818286-3">]</span><span·class="p"·data-group-id="6076818286-2">}</span><span·class="p"·data-group-id="6076818286-1">]</span><span·class="p">.</span></code></pre><p>Modify·the·default·handler·to·print·each·log·event·as·a·single·line:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1057214845-1">[</span><span·class="p"·data-group-id="1057214845-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
454 ··</span><span·class="p"·data-group-id="8335133596-3">[</span><span·class="p"·data-group-id="8335133596-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">454 ··</span><span·class="p"·data-group-id="1057214845-3">[</span><span·class="p"·data-group-id="1057214845-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
455 ····</span><span·class="p"·data-group-id="8335133596-5">[</span><span·class="p"·data-group-id="8335133596-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">455 ····</span><span·class="p"·data-group-id="1057214845-5">[</span><span·class="p"·data-group-id="1057214845-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
456 ······</span><span·class="p"·data-group-id="8335133596-7">#{</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8335133596-8">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8335133596-9">#{</span><span·class="ss">single_line</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8335133596-9">}</span><span·class="p"·data-group-id="8335133596-8">}</span><span·class="p"·data-group-id="8335133596-7">}</span><span·class="p"·data-group-id="8335133596-6">}</span><span·class="w"> 
457 ····</span><span·class="p"·data-group-id="8335133596-5">]</span><span·class="p"·data-group-id="8335133596-4">}</span><span·class="p"·data-group-id="8335133596-3">]</span><span·class="p"·data-group-id="8335133596-2">}</span><span·class="p"·data-group-id="8335133596-1">]</span><span·class="p">.</span></code></pre><p>Modify·the·default·handler·to·print·the·pid·of·the·logging·process·for·each·log 
458 event:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3239145301-1">[</span><span·class="p"·data-group-id="3239145301-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">456 ······</span><span·class="p"·data-group-id="1057214845-7">#{</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1057214845-8">{</span><span·class="ss">logger_for[·...·truncated·by·diffoscope;·len:·459,·SHA:·219c48a06251bc33c2af5d93e28382529f3b24f362eaeba0b45647f49e6eba03·...·]</span><span·class="w">
 457 ····</span><span·class="p"·data-group-id="1057214845-5">]</span><span·class="p"·data-group-id="1057214845-4">}</span><span·class="p"·data-group-id="1057214845-3">]</span><span·class="p"·data-group-id="1057214845-2">}</span><span·class="p"·data-group-id="1057214845-1">]</span><span·class="p">.</span></code></pre><p>Modify·the·default·handler·to·print·the·pid·of·the·logging·process·for·each·log
 458 event:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3027929806-1">[</span><span·class="p"·data-group-id="3027929806-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
459 ··</span><span·class="p"·data-group-id="3239145301-3">[</span><span·class="p"·data-group-id="3239145301-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">459 ··</span><span·class="p"·data-group-id="3027929806-3">[</span><span·class="p"·data-group-id="3027929806-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
460 ····</span><span·class="p"·data-group-id="3239145301-5">[</span><span·class="p"·data-group-id="3239145301-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">460 ····</span><span·class="p"·data-group-id="3027929806-5">[</span><span·class="p"·data-group-id="3027929806-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
461 ······</span><span·class="p"·data-group-id="3239145301-7">#{</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3239145301-8">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">461 ······</span><span·class="p"·data-group-id="3027929806-7">#{</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3027929806-8">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">
462 ························</span><span·class="p"·data-group-id="3239145301-9">#{</span><span·class="ss">template</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3239145301-10">[</span><span·class="ss">time</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·493,·SHA:·42ada4b975b9735a627b4f7a0f9890b5d42c0a5c7a1a0c262053d0f7679e4bab·...·]-6">}</span><span·class="w">462 ························</span><span·class="p"·data-group-id="3027929806-9">#{</span><span·class="ss">template</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3027929806-10">[</span><span·class="ss">time</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·493,·SHA:·433b428cb8d91a27dede8d99cd5d47bde0a7b5c89368a7ea79c9911a8db38402·...·]-6">}</span><span·class="w">
463 ····</span><span·class="p"·data-group-id="3239145301-5">]</span><span·class="p"·data-group-id="3239145301-4">}</span><span·class="p"·data-group-id="3239145301-3">]</span><span·class="p"·data-group-id="3239145301-2">}</span><span·class="p"·data-group-id="3239145301-1">]</span><span·class="p">.</span></code></pre><p>Modify·the·default·handler·to·only·print·errors·and·more·severe·log·events·to463 ····</span><span·class="p"·data-group-id="3027929806-5">]</span><span·class="p"·data-group-id="3027929806-4">}</span><span·class="p"·data-group-id="3027929806-3">]</span><span·class="p"·data-group-id="3027929806-2">}</span><span·class="p"·data-group-id="3027929806-1">]</span><span·class="p">.</span></code></pre><p>Modify·the·default·handler·to·only·print·errors·and·more·severe·log·events·to
464 &quot;log/erlang.log&quot;,·and·add·another·handler·to·print·all·log·events·to464 &quot;log/erlang.log&quot;,·and·add·another·handler·to·print·all·log·events·to
465 &quot;log/debug.log&quot;.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4670744396-1">[</span><span·class="p"·data-group-id="4670744396-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">465 &quot;log/debug.log&quot;.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2824567105-1">[</span><span·class="p"·data-group-id="2824567105-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
466 ··</span><span·class="p"·data-group-id="4670744396-3">[</span><span·class="p"·data-group-id="4670744396-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">466 ··</span><span·class="p"·data-group-id="2824567105-3">[</span><span·class="p"·data-group-id="2824567105-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
467 ····</span><span·class="p"·data-group-id="4670744396-5">[</span><span·class="p"·data-group-id="4670744396-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">467 ····</span><span·class="p"·data-group-id="2824567105-5">[</span><span·class="p"·data-group-id="2824567105-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
468 ······</span><span·class="p"·data-group-id="4670744396-7">#{</span><span·class="ss">level</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">468 ······</span><span·class="p"·data-group-id="2824567105-7">#{</span><span·class="ss">level</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">
469 ········</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4670744396-8">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/erlang.log&quot;</span><span·class="p"·data-group-id="4670744396-8">}</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·67,·SHA:·e3eee74af019824078aae6e8e5754de63629a2cc21657d01207698aacb9379f6·...·]-6">}</span><span·class="p">,</span><span·class="w">469 ········</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2824567105-8">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/erlang.log&quot;</span><span·class="p"·data-group-id="2824567105-8">}</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·67,·SHA:·7f4896db8b8b16685a0016198e6b3b33d85ba8d2d45b0d5eedf9fb4c1173553c·...·]-6">}</span><span·class="p">,</span><span·class="w">
470 ·····</span><span·class="p"·data-group-id="4670744396-9">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">470 ·····</span><span·class="p"·data-group-id="2824567105-9">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
471 ······</span><span·class="p"·data-group-id="4670744396-10">#{</span><span·class="ss">level</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">debug</span><span·class="p">,</span><span·class="w">471 ······</span><span·class="p"·data-group-id="2824567105-10">#{</span><span·class="ss">level</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">debug</span><span·class="p">,</span><span·class="w">
472 ········</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4670744396-11">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/debug.log&quot;</span><span·class="p"·data-group-id="4670744396-11">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·69,·SHA:·2982966a9a7468697582888a2a3c420f1a8c42ce660f0c1804e6251673f786e4·...·]-9">}</span><span·class="w">472 ········</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2824567105-11">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/debug.log&quot;</span><span·class="p"·data-group-id="2824567105-11">}</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·69,·SHA:·a45b99cc1d9cab42948e83bbc467fb3efd399944935ae3b7ef38745c5f3b5247·...·]-9">}</span><span·class="w">
473 ····</span><span·class="p"·data-group-id="4670744396-5">]</span><span·class="p"·data-group-id="4670744396-4">}</span><span·class="p"·data-group-id="4670744396-3">]</span><span·class="p"·data-group-id="4670744396-2">}</span><span·class="p"·data-group-id="4670744396-1">]</span><span·class="p">.</span></code></pre><h2·id="backwards-compatibility-with-error_logger"·class="section-heading">473 ····</span><span·class="p"·data-group-id="2824567105-5">]</span><span·class="p"·data-group-id="2824567105-4">}</span><span·class="p"·data-group-id="2824567105-3">]</span><span·class="p"·data-group-id="2824567105-2">}</span><span·class="p"·data-group-id="2824567105-1">]</span><span·class="p">.</span></code></pre><h2·id="backwards-compatibility-with-error_logger"·class="section-heading">
474 ··<a·href="#backwards-compatibility-with-error_logger"·class="hover-link">474 ··<a·href="#backwards-compatibility-with-error_logger"·class="hover-link">
475 ····<i·class="ri-link-m"·aria-hidden="true"></i>475 ····<i·class="ri-link-m"·aria-hidden="true"></i>
476 ··</a>476 ··</a>
477 ··<span·class="text">Backwards·Compatibility·with·error_logger</span>477 ··<span·class="text">Backwards·Compatibility·with·error_logger</span>
478 </h2>478 </h2>
479 <p>Logger·provides·backwards·compatibility·with·<code·class="inline">error_logger</code>·in·the·following479 <p>Logger·provides·backwards·compatibility·with·<code·class="inline">error_logger</code>·in·the·following
480 ways:</p><ul><li><p><strong>API·for·Logging</strong>·-·The·<code·class="inline">error_logger</code>·API·still·exists,·but·should·only·be480 ways:</p><ul><li><p><strong>API·for·Logging</strong>·-·The·<code·class="inline">error_logger</code>·API·still·exists,·but·should·only·be
Offset 507, 17 lines modifiedOffset 507, 17 lines modified
507 <code·class="inline">true</code>.·The507 <code·class="inline">true</code>.·The
508 <a·href="../../../../lib/sasl-4.2.2/doc/html/sasl_app.html#deprecated_error_logger_config">SASL·configuration·parameters</a>508 <a·href="../../../../lib/sasl-4.2.2/doc/html/sasl_app.html#deprecated_error_logger_config">SASL·configuration·parameters</a>
509 can·then·be·used·as·before,·and·the·SASL·reports·will·only·be·printed·if·the509 can·then·be·used·as·before,·and·the·SASL·reports·will·only·be·printed·if·the
510 SASL·application·is·running,·through·a·second·log·handler·named·<code·class="inline">sasl</code>.</p><p>All·SASL·reports·have·a·metadata·field·<code·class="inline">domain</code>·which·is·set·to·<code·class="inline">[otp,sasl]</code>.510 SASL·application·is·running,·through·a·second·log·handler·named·<code·class="inline">sasl</code>.</p><p>All·SASL·reports·have·a·metadata·field·<code·class="inline">domain</code>·which·is·set·to·<code·class="inline">[otp,sasl]</code>.
511 This·field·can·be·used·by·filters·to·stop·or·allow·the·log·events.</p><p>See·section·<a·href="../../../../lib/sasl-4.2.2/doc/html/error_logging.html">SASL·User's·Guide</a>·for·more511 This·field·can·be·used·by·filters·to·stop·or·allow·the·log·events.</p><p>See·section·<a·href="../../../../lib/sasl-4.2.2/doc/html/error_logging.html">SASL·User's·Guide</a>·for·more
512 information·about·the·old·SASL·error·logging·functionality.</p></li><li><p><strong><a·href=""·id="legacy_event_handlers"></a>·Legacy·Event·Handlers</strong><br/>To·use·event·handlers·written·for·<code·class="inline">error_logger</code>,·just·add·your·event·handler512 information·about·the·old·SASL·error·logging·functionality.</p></li><li><p><strong><a·href=""·id="legacy_event_handlers"></a>·Legacy·Event·Handlers</strong><br/>To·use·event·handlers·written·for·<code·class="inline">error_logger</code>,·just·add·your·event·handler
513 with</p><pre><code·class="text">error_logger:add_report_handler/1,2.</code></pre><p>This·automatically·starts·the·error·logger·event·manager,·and·adds513 with</p><pre><code·class="text">error_logger:add_report_handler/1,2.</code></pre><p>This·automatically·starts·the·error·logger·event·manager,·and·adds
514 <code·class="inline">error_logger</code>·as·a·handler·to·Logger,·with·the·following·configuration:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0748870170-1">#{</span><span·class="ss">level</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">514 <code·class="inline">error_logger</code>·as·a·handler·to·Logger,·with·the·following·configuration:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4936955688-1">#{</span><span·class="ss">level</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">
515 ··</span><span·class="ss">filter_default</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">log</span><span·class="p">,</span><span·class="w">515 ··</span><span·class="ss">filter_default</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">log</span><span·class="p">,</span><span·class="w">
516 ··</span><span·class="ss">filters</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0748870170-2">[</span><span·class="p"·data-group-id="0748870170-2">]</span><span·class="p"·data-group-id="0748870170-1">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·handler·ignores·events·that·do·not·originate·from·the·<code·class="inline">error_logger</code>516 ··</span><span·class="ss">filters</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4936955688-2">[</span><span·class="p"·data-group-id="4936955688-2">]</span><span·class="p"·data-group-id="4936955688-1">}</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·handler·ignores·events·that·do·not·originate·from·the·<code·class="inline">error_logger</code>
517 API,·or·from·within·OTP.·This·means·that·if·your·code·uses·the·Logger·API517 API,·or·from·within·OTP.·This·means·that·if·your·code·uses·the·Logger·API
518 for·logging,·then·your·log·events·will·be·discarded·by·this·handler.</p><p>The·handler·is·not·overload·protected.</p></blockquote></li></ul><h2·id="error-handling"·class="section-heading">518 for·logging,·then·your·log·events·will·be·discarded·by·this·handler.</p><p>The·handler·is·not·overload·protected.</p></blockquote></li></ul><h2·id="error-handling"·class="section-heading">
Max diff block lines reached; 56657/103394 bytes (54.80%) of diff not shown.
94.2 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/logger_cookbook.html
    
Offset 140, 27 lines modifiedOffset 140, 27 lines modified
140 </h2>140 </h2>
141 <h3·id="print-the-primary-logger-configurations"·class="section-heading">141 <h3·id="print-the-primary-logger-configurations"·class="section-heading">
142 ··<a·href="#print-the-primary-logger-configurations"·class="hover-link">142 ··<a·href="#print-the-primary-logger-configurations"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
144 ··</a>144 ··</a>
145 ··<span·class="text">Print·the·primary·Logger·configurations.</span>145 ··<span·class="text">Print·the·primary·Logger·configurations.</span>
146 </h3>146 </h3>
147 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">i</span><span·class="p"·data-group-id="5364150132-1">(</span><span·class="ss">primary</span><span·class="p"·data-group-id="5364150132-1">)</span><span·class="p">.</span><span·class="w">147 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">i</span><span·class="p"·data-group-id="7288783079-1">(</span><span·class="ss">primary</span><span·class="p"·data-group-id="7288783079-1">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="n">Primary</span><span·class="w">·</span><span·class="nc">configuration</span><span·class="p">:</span><span·class="w">148 </span><span·class="n">Primary</span><span·class="w">·</span><span·class="nc">configuration</span><span·class="p">:</span><span·class="w">
149 ····</span><span·class="n">Level</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">notice</span><span·class="w">149 ····</span><span·class="n">Level</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">notice</span><span·class="w">
150 ····</span><span·class="n">Filter</span><span·class="w">·</span><span·class="n">Default</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">log</span><span·class="w">150 ····</span><span·class="n">Filter</span><span·class="w">·</span><span·class="n">Default</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">log</span><span·class="w">
151 ····</span><span·class="n">Filters</span><span·class="p">:</span><span·class="w">151 ····</span><span·class="n">Filters</span><span·class="p">:</span><span·class="w">
152 ········</span><span·class="p"·data-group-id="5364150132-2">(</span><span·class="ss">none</span><span·class="p"·data-group-id="5364150132-2">)</span></code></pre><p>It·is·also·possible·to·fetch·the·configuration·using152 ········</span><span·class="p"·data-group-id="7288783079-2">(</span><span·class="ss">none</span><span·class="p"·data-group-id="7288783079-2">)</span></code></pre><p>It·is·also·possible·to·fetch·the·configuration·using
153 <a·href="logger.html#get_primary_config/0"><code·class="inline">logger:get_primary_config()</code></a>.</p><h4>See·also</h4><ul><li><a·href="logger.html#i/0">logger:i()</a></li><li><a·href="logger_chapter.html#configuration">Configuration</a>·in·the·Logging·User's·Guide</li></ul><h3·id="print-the-configuration-of-all-handlers"·class="section-heading">153 <a·href="logger.html#get_primary_config/0"><code·class="inline">logger:get_primary_config()</code></a>.</p><h4>See·also</h4><ul><li><a·href="logger.html#i/0">logger:i()</a></li><li><a·href="logger_chapter.html#configuration">Configuration</a>·in·the·Logging·User's·Guide</li></ul><h3·id="print-the-configuration-of-all-handlers"·class="section-heading">
154 ··<a·href="#print-the-configuration-of-all-handlers"·class="hover-link">154 ··<a·href="#print-the-configuration-of-all-handlers"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">Print·the·configuration·of·all·handlers.</span>157 ··<span·class="text">Print·the·configuration·of·all·handlers.</span>
158 </h3>158 </h3>
159 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">i</span><span·class="p"·data-group-id="2327341861-1">(</span><span·class="ss">handlers</span><span·class="p"·data-group-id="2327341861-1">)</span><span·class="p">.</span><span·class="w">159 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">i</span><span·class="p"·data-group-id="3322980901-1">(</span><span·class="ss">handlers</span><span·class="p"·data-group-id="3322980901-1">)</span><span·class="p">.</span><span·class="w">
160 </span><span·class="n">Handler</span><span·class="w">·</span><span·class="nc">configuration</span><span·class="p">:</span><span·class="w">160 </span><span·class="n">Handler</span><span·class="w">·</span><span·class="nc">configuration</span><span·class="p">:</span><span·class="w">
161 ····</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">default</span><span·class="w">161 ····</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">default</span><span·class="w">
162 ········</span><span·class="n">Module</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="w">162 ········</span><span·class="n">Module</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="w">
163 ········</span><span·class="n">Level</span><span·class="p">:</span><span·class="w">··</span><span·class="ss">all</span><span·class="w">163 ········</span><span·class="n">Level</span><span·class="p">:</span><span·class="w">··</span><span·class="ss">all</span><span·class="w">
164 ········</span><span·class="n">Formatter</span><span·class="p">:</span><span·class="w">164 ········</span><span·class="n">Formatter</span><span·class="p">:</span><span·class="w">
165 ············</span><span·class="n">Module</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">logger_formatter</span><span·class="w">165 ············</span><span·class="n">Module</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">logger_formatter</span><span·class="w">
166 ············</span><span·class="n">Config</span><span·class="p">:</span><span·class="w">166 ············</span><span·class="n">Config</span><span·class="p">:</span><span·class="w">
Offset 169, 18 lines modifiedOffset 169, 18 lines modified
169 ········</span><span·class="n">Filter</span><span·class="w">·</span><span·class="n">Default</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stop</span><span·class="w">169 ········</span><span·class="n">Filter</span><span·class="w">·</span><span·class="n">Default</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stop</span><span·class="w">
170 ········</span><span·class="n">Filters</span><span·class="p">:</span><span·class="w">170 ········</span><span·class="n">Filters</span><span·class="p">:</span><span·class="w">
171 ············</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">remote_gl</span><span·class="w">171 ············</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">remote_gl</span><span·class="w">
172 ················</span><span·class="n">Fun</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">remote_gl</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">172 ················</span><span·class="n">Fun</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">remote_gl</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">
173 ················</span><span·class="n">Arg</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stop</span><span·class="w">173 ················</span><span·class="n">Arg</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stop</span><span·class="w">
174 ············</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">domain</span><span·class="w">174 ············</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">domain</span><span·class="w">
175 ················</span><span·class="n">Fun</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">175 ················</span><span·class="n">Fun</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">
176 ················</span><span·class="n">Arg</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2327341861-2">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="ss">super</span><span·class="p">,</span><span·class="p"·data-group-id="2327341861-3">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="ss">sasl</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·816945378d2acaf41d43b3625d7d5d11608f0f57159195a7f103487db393dc53·...·]1-2">}</span><span·class="w">176 ················</span><span·class="n">Arg</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3322980901-2">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="ss">super</span><span·class="p">,</span><span·class="p"·data-group-id="3322980901-3">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="ss">sasl</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·c6ab1c4a8db85e4b703eb5a59832d2bf66537cce4e7e8cafd96854620bc6fcb0·...·]1-2">}</span><span·class="w">
177 ············</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">no_domain</span><span·class="w">177 ············</span><span·class="n">Id</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">no_domain</span><span·class="w">
178 ················</span><span·class="n">Fun</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">178 ················</span><span·class="n">Fun</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">
179 ················</span><span·class="n">Arg</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2327341861-4">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="p"·data-group-id="2327341861-5">[</span><span·class="p"·data-group-id="2327341861-5">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·20,·SHA:·63b9791552f6b9137b6f8894984b9ddaeff6d6f5081b2fdd1fea2ed1e9d0690f·...·]1-4">}</span><span·class="w">179 ················</span><span·class="n">Arg</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3322980901-4">{</span><span·class="ss">log</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="p"·data-group-id="3322980901-5">[</span><span·class="p"·data-group-id="3322980901-5">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·20,·SHA:·719d34ff91358dcf5b3c605c28cedadbd3d2c1840619880ac4ba465231190f8f·...·]1-4">}</span><span·class="w">
180 ········</span><span·class="n">Handler</span><span·class="w">·</span><span·class="n">Config</span><span·class="p">:</span><span·class="w">180 ········</span><span·class="n">Handler</span><span·class="w">·</span><span·class="n">Config</span><span·class="p">:</span><span·class="w">
181 ············</span><span·class="nc">burst_limit_enable</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">181 ············</span><span·class="nc">burst_limit_enable</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">
182 ············</span><span·class="nc">burst_limit_max_count</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">500</span><span·class="w">182 ············</span><span·class="nc">burst_limit_max_count</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">500</span><span·class="w">
183 ············</span><span·class="nc">burst_limit_window_time</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">1000</span><span·class="w">183 ············</span><span·class="nc">burst_limit_window_time</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">1000</span><span·class="w">
184 ············</span><span·class="nc">drop_mode_qlen</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">200</span><span·class="w">184 ············</span><span·class="nc">drop_mode_qlen</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">200</span><span·class="w">
185 ············</span><span·class="nc">filesync_repeat_interval</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">no_repeat</span><span·class="w">185 ············</span><span·class="nc">filesync_repeat_interval</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">no_repeat</span><span·class="w">
186 ············</span><span·class="nc">flush_qlen</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">1000</span><span·class="w">186 ············</span><span·class="nc">flush_qlen</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">1000</span><span·class="w">
Offset 211, 15 lines modifiedOffset 211, 15 lines modified
211 level·to·<code·class="inline">info</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">kernel</span><span·class="w">·</span><span·class="ss">logger_level</span><span·class="w">·</span><span·class="ss">info</span><span·class="w">211 level·to·<code·class="inline">info</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">kernel</span><span·class="w">·</span><span·class="ss">logger_level</span><span·class="w">·</span><span·class="ss">info</span><span·class="w">
212 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">-</span><span·class="n">Nov</span><span·class="o">-</span><span·class="mi">2019</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">33</span><span·class="p">:</span><span·class="mf">11.742069</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">212 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">-</span><span·class="n">Nov</span><span·class="o">-</span><span·class="mi">2019</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">33</span><span·class="p">:</span><span·class="mf">11.742069</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
213 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">kernel</span><span·class="w">213 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">kernel</span><span·class="w">
214 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">214 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">
215 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">-</span><span·class="n">Nov</span><span·class="o">-</span><span·class="mi">2019</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">33</span><span·class="p">:</span><span·class="mf">11.746546</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">215 </span><span·class="o">=</span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="o">==</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">4</span><span·class="o">-</span><span·class="n">Nov</span><span·class="o">-</span><span·class="mi">2019</span><span·class="p">:</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">33</span><span·class="p">:</span><span·class="mf">11.746546</span><span·class="w">·</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
216 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stdlib</span><span·class="w">216 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">stdlib</span><span·class="w">
217 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">217 ····</span><span·class="nc">started_at</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">nonode@nohost</span><span·class="w">
218 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.3</span><span·class="w">··</span><span·class="p"·data-group-id="9656040303-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="9656040303-1">)</span><span·class="w">218 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.3</span><span·class="w">··</span><span·class="p"·data-group-id="6497631835-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="6497631835-1">)</span><span·class="w">
219 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre><h2·id="configure-logger-formatter"·class="section-heading">219 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre><h2·id="configure-logger-formatter"·class="section-heading">
220 ··<a·href="#configure-logger-formatter"·class="hover-link">220 ··<a·href="#configure-logger-formatter"·class="hover-link">
221 ····<i·class="ri-link-m"·aria-hidden="true"></i>221 ····<i·class="ri-link-m"·aria-hidden="true"></i>
222 ··</a>222 ··</a>
223 ··<span·class="text">Configure·Logger·formatter</span>223 ··<span·class="text">Configure·Logger·formatter</span>
224 </h2>224 </h2>
225 <p>In·order·to·fit·better·into·your·existing·logging·infrastructure·Logger·can225 <p>In·order·to·fit·better·into·your·existing·logging·infrastructure·Logger·can
Offset 229, 40 lines modifiedOffset 229, 40 lines modified
229 ····<i·class="ri-link-m"·aria-hidden="true"></i>229 ····<i·class="ri-link-m"·aria-hidden="true"></i>
230 ··</a>230 ··</a>
231 ··<span·class="text">Single·line·configuration</span>231 ··<span·class="text">Single·line·configuration</span>
232 </h3>232 </h3>
233 <p>Since·single·line·logging·is·the·default·of·the·built-in·formatter·you·only·have233 <p>Since·single·line·logging·is·the·default·of·the·built-in·formatter·you·only·have
234 to·provide·the·empty·map·as·the·configuration.·The·example·below·uses·the234 to·provide·the·empty·map·as·the·configuration.·The·example·below·uses·the
235 <code·class="inline">sys.config</code>·to·change·the·formatter·configuration.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">sys</span><span·class="p">.</span><span·class="ss">config</span><span·class="w">235 <code·class="inline">sys.config</code>·to·change·the·formatter·configuration.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">sys</span><span·class="p">.</span><span·class="ss">config</span><span·class="w">
236 </span><span·class="p"·data-group-id="0487597386-1">[</span><span·class="p"·data-group-id="0487597386-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">236 </span><span·class="p"·data-group-id="2886957635-1">[</span><span·class="p"·data-group-id="2886957635-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
237 ··</span><span·class="p"·data-group-id="0487597386-3">[</span><span·class="p"·data-group-id="0487597386-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">237 ··</span><span·class="p"·data-group-id="2886957635-3">[</span><span·class="p"·data-group-id="2886957635-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
238 ····</span><span·class="p"·data-group-id="0487597386-5">[</span><span·class="p"·data-group-id="0487597386-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">238 ····</span><span·class="p"·data-group-id="2886957635-5">[</span><span·class="p"·data-group-id="2886957635-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
239 ······</span><span·class="p"·data-group-id="0487597386-7">#{</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0487597386-8">{</span><span·class="ss">logger_formatter</span><span·c[·...·truncated·by·diffoscope;·len:·584,·SHA:·df9ad906fedcfe152f08af45fce1d4dba6945dbdd3cdf6206633850fd227c286·...·]-1">]</span><span·class="p">.</span><span·class="w">239 ······</span><span·class="p"·data-group-id="2886957635-7">#{</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2886957635-8">{</span><span·class="ss">logger_formatter</span><span·c[·...·truncated·by·diffoscope;·len:·584,·SHA:·df298840fe96da71b96bfbd8cce202f8d2d96167c354ab04322ac3674e8d0356·...·]-1">]</span><span·class="p">.</span><span·class="w">
240 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="ss">sys</span><span·class="w">240 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="ss">sys</span><span·class="w">
241 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.1</span><span·class="w">··</span><span·class="p"·data-group-id="0487597386-10">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="0487597386-10">)</span><span·class="gp·unselectable">241 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.1</span><span·class="w">··</span><span·class="p"·data-group-id="2886957635-10">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2886957635-10">)</span><span·class="gp·unselectable">
242 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="0487597386-11">(</span><span·class="s">&quot;Oh·noes,·an·error&quot;</span><span·class="p"·data-group-id="0487597386-11">)</span><span·class="p">.</span><span·class="w">242 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="2886957635-11">(</span><span·class="s">&quot;Oh·noes,·an·error&quot;</span><span·class="p"·data-group-id="2886957635-11">)</span><span·class="p">.</span><span·class="w">
243 </span><span·class="mi">1962</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">03</span><span·class="n">T11</span><span·class="p">:</span><span·class="mi">07</span><span·class="p">:</span><span·class="mf">47.466763</span><span·class="o">-</span><span·class="mi">04</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">an</span><span·class="w">·</span><span·class="ss">error</span></code></pre><p>However,·if·you·just·want·to·change·it·for·the·current·session·you·can·also·do243 </span><span·class="mi">1962</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">03</span><span·class="n">T11</span><span·class="p">:</span><span·class="mi">07</span><span·class="p">:</span><span·class="mf">47.466763</span><span·class="o">-</span><span·class="mi">04</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">an</span><span·class="w">·</span><span·class="ss">error</span></code></pre><p>However,·if·you·just·want·to·change·it·for·the·current·session·you·can·also·do
244 that.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="9329562330-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9329562330-2">{</span><span·class="ss">logg[·...·truncated·by·diffoscope;·len:·268,·SHA:·b5ed87ecb7ae5994fe564af2e5229b1483b5bab962f0029b5ef4f545faf0afbc·...·]-1">)</span><span·class="p">.</span><span·class="w">244 that.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="5399872557-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5399872557-2">{</span><span·class="ss">logg[·...·truncated·by·diffoscope;·len:·268,·SHA:·3d8426815638e841b6d6f85e0ed038a20b98e77f60e5975c963da92397225ac5·...·]-1">)</span><span·class="p">.</span><span·class="w">
245 </span><span·class="ss">ok</span><span·class="gp·unselectable">245 </span><span·class="ss">ok</span><span·class="gp·unselectable">
246 2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="9329562330-4">(</span><span·class="s">&quot;Oh·noes,·another·error&quot;</span><span·class="p"·data-group-id="9329562330-4">)</span><span·class="p">.</span><span·class="w">246 2&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="5399872557-4">(</span><span·class="s">&quot;Oh·noes,·another·error&quot;</span><span·class="p"·data-group-id="5399872557-4">)</span><span·class="p">.</span><span·class="w">
247 </span><span·class="mi">1962</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">04</span><span·class="n">T15</span><span·class="p">:</span><span·class="mi">34</span><span·class="p">:</span><span·class="mf">02.648713</span><span·class="o">-</span><span·class="mi">04</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">another</span><span·class="w">·</span><span·class="ss">error</span></code></pre><h4>See·also</h4><ul><li><a·href="logger_formatter.html#t:config/0">logger_formatter's·Configuration</a></li><li><a·href="logger_chapter.html#formatters">Formatters</a>·in·the·Logging·User's·Guide</li><li><a·href="logger.html#set_handler_config/3"><code·class="inline">logger:set_handler_config/3</code></a></li></ul><h3·id="add-file-and-line-number-to-log-entries"·class="section-heading">247 </span><span·class="mi">1962</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">04</span><span·class="n">T15</span><span·class="p">:</span><span·class="mi">34</span><span·class="p">:</span><span·class="mf">02.648713</span><span·class="o">-</span><span·class="mi">04</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">another</span><span·class="w">·</span><span·class="ss">error</span></code></pre><h4>See·also</h4><ul><li><a·href="logger_formatter.html#t:config/0">logger_formatter's·Configuration</a></li><li><a·href="logger_chapter.html#formatters">Formatters</a>·in·the·Logging·User's·Guide</li><li><a·href="logger.html#set_handler_config/3"><code·class="inline">logger:set_handler_config/3</code></a></li></ul><h3·id="add-file-and-line-number-to-log-entries"·class="section-heading">
248 ··<a·href="#add-file-and-line-number-to-log-entries"·class="hover-link">248 ··<a·href="#add-file-and-line-number-to-log-entries"·class="hover-link">
249 ····<i·class="ri-link-m"·aria-hidden="true"></i>249 ····<i·class="ri-link-m"·aria-hidden="true"></i>
250 ··</a>250 ··</a>
251 ··<span·class="text">Add·file·and·line·number·to·log·entries</span>251 ··<span·class="text">Add·file·and·line·number·to·log·entries</span>
252 </h3>252 </h3>
253 <p>You·can·change·what·is·printed·to·the·log·by·using·the·formatter·template:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">sys</span><span·class="p">.</span><span·class="ss">config</span><span·class="w">253 <p>You·can·change·what·is·printed·to·the·log·by·using·the·formatter·template:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">sys</span><span·class="p">.</span><span·class="ss">config</span><span·class="w">
254 </span><span·class="p"·data-group-id="5718352797-1">[</span><span·class="p"·data-group-id="5718352797-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">254 </span><span·class="p"·data-group-id="0877964848-1">[</span><span·class="p"·data-group-id="0877964848-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
255 ··</span><span·class="p"·data-group-id="5718352797-3">[</span><span·class="p"·data-group-id="5718352797-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">255 ··</span><span·class="p"·data-group-id="0877964848-3">[</span><span·class="p"·data-group-id="0877964848-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
256 ····</span><span·class="p"·data-group-id="5718352797-5">[</span><span·class="p"·data-group-id="5718352797-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">256 ····</span><span·class="p"·data-group-id="0877964848-5">[</span><span·class="p"·data-group-id="0877964848-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
257 ······</span><span·class="p"·data-group-id="5718352797-7">#{</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5718352797-8">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">257 ······</span><span·class="p"·data-group-id="0877964848-7">#{</span><span·class="w">·</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0877964848-8">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">
258 ········</span><span·class="p"·data-group-id="5718352797-9">#{</span><span·class="w">·</span><span·class="ss">template</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5718352797-10">[</span><span·class="ss">time</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·1058,·SHA:·59a1800072a495b1d0e959da292f694b9af4c99b666cfb192e4e283f28f4f231·...·]-1">]</span><span·class="p">.</span><span·class="w">258 ········</span><span·class="p"·data-group-id="0877964848-9">#{</span><span·class="w">·</span><span·class="ss">template</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0877964848-10">[</span><span·class="ss">time</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·1058,·SHA:·1a29a9efe597bc48ebcf19a040c816eddf1a02d1153602f2dc1d3a62ab195530·...·]-1">]</span><span·class="p">.</span><span·class="w">
259 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="ss">sys</span><span·class="w">259 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="ss">sys</span><span·class="w">
260 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.1</span><span·class="w">··</span><span·class="p"·data-group-id="5718352797-11">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5718352797-11">)</span><span·class="gp·unselectable">260 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.1</span><span·class="w">··</span><span·class="p"·data-group-id="0877964848-11">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="0877964848-11">)</span><span·class="gp·unselectable">
261 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="5718352797-12">(</span><span·class="s">&quot;Oh·noes,·more·errors&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="5718352797-13">#{</span><span·class="w">·</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</[·...·truncated·by·diffoscope;·len:·369,·SHA:·010015aac0df1619471c73d3cb5e80b58de8249a5514efd717c4f54f1200cbad·...·]-12">)</span><span·class="p">.</span><span·class="w">261 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="0877964848-12">(</span><span·class="s">&quot;Oh·noes,·more·errors&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="0877964848-13">#{</span><span·class="w">·</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</[·...·truncated·by·diffoscope;·len:·369,·SHA:·80826bab78fee3ca61908e2753d03d8a89a1a1be66f782ca5d373513cac3ea9d·...·]-12">)</span><span·class="p">.</span><span·class="w">
262 </span><span·class="mi">1962</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">05</span><span·class="n">T07</span><span·class="p">:</span><span·class="mi">37</span><span·class="p">:</span><span·class="mf">44.104241</span><span·class="o">+</span><span·class="mi">02</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="ss">shell</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">1</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">more</span><span·class="w">·</span><span·class="ss">errors</span></code></pre><p>Note·that·file·and·line·have·to·be·added·in·the·metadata·by·the·caller·of262 </span><span·class="mi">1962</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">05</span><span·class="n">T07</span><span·class="p">:</span><span·class="mi">37</span><span·class="p">:</span><span·class="mf">44.104241</span><span·class="o">+</span><span·class="mi">02</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="ss">shell</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">1</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">more</span><span·class="w">·</span><span·class="ss">errors</span></code></pre><p>Note·that·file·and·line·have·to·be·added·in·the·metadata·by·the·caller·of
263 <a·href="logger.html#log/3"><code·class="inline">logger:log/3</code></a>·as·otherwise·Logger·will·not·know·from·where·it·was·called.·The263 <a·href="logger.html#log/3"><code·class="inline">logger:log/3</code></a>·as·otherwise·Logger·will·not·know·from·where·it·was·called.·The
264 file·and·line·number·are·automatically·added·if·you·use·the·<code·class="inline">?LOG_ERROR</code>·macros264 file·and·line·number·are·automatically·added·if·you·use·the·<code·class="inline">?LOG_ERROR</code>·macros
265 in·<code·class="inline">kernel/include/logger.hrl</code>.</p><h4>See·also</h4><ul><li><a·href="logger_formatter.html#t:config/0">logger_formatter's·Configuration</a></li><li><a·href="logger_formatter.html#t:template/0">logger_formatter's·Template</a></li><li><a·href="logger.html#module-macros">Logger·Macros</a></li><li><a·href="logger_chapter.html#metadata">Metadata</a>·in·the·Logging·User's·Guide</li></ul><h2·id="configuring-handlers"·class="section-heading">265 in·<code·class="inline">kernel/include/logger.hrl</code>.</p><h4>See·also</h4><ul><li><a·href="logger_formatter.html#t:config/0">logger_formatter's·Configuration</a></li><li><a·href="logger_formatter.html#t:template/0">logger_formatter's·Template</a></li><li><a·href="logger.html#module-macros">Logger·Macros</a></li><li><a·href="logger_chapter.html#metadata">Metadata</a>·in·the·Logging·User's·Guide</li></ul><h2·id="configuring-handlers"·class="section-heading">
266 ··<a·href="#configuring-handlers"·class="hover-link">266 ··<a·href="#configuring-handlers"·class="hover-link">
267 ····<i·class="ri-link-m"·aria-hidden="true"></i>267 ····<i·class="ri-link-m"·aria-hidden="true"></i>
268 ··</a>268 ··</a>
Offset 271, 67 lines modifiedOffset 271, 67 lines modified
271 <h3·id="print-logs-to-a-file"·class="section-heading">271 <h3·id="print-logs-to-a-file"·class="section-heading">
272 ··<a·href="#print-logs-to-a-file"·class="hover-link">272 ··<a·href="#print-logs-to-a-file"·class="hover-link">
273 ····<i·class="ri-link-m"·aria-hidden="true"></i>273 ····<i·class="ri-link-m"·aria-hidden="true"></i>
274 ··</a>274 ··</a>
275 ··<span·class="text">Print·logs·to·a·file</span>275 ··<span·class="text">Print·logs·to·a·file</span>
276 </h3>276 </h3>
277 <p>Instead·of·printing·the·logs·to·stdout·we·print·them·to·a·rotating·file·log.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">sys</span><span·class="p">.</span><span·class="ss">config</span><span·class="w">277 <p>Instead·of·printing·the·logs·to·stdout·we·print·them·to·a·rotating·file·log.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">sys</span><span·class="p">.</span><span·class="ss">config</span><span·class="w">
278 </span><span·class="p"·data-group-id="7018191272-1">[</span><span·class="p"·data-group-id="7018191272-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">278 </span><span·class="p"·data-group-id="7157394281-1">[</span><span·class="p"·data-group-id="7157394281-2">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">
279 ··</span><span·class="p"·data-group-id="7018191272-3">[</span><span·class="p"·data-group-id="7018191272-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">279 ··</span><span·class="p"·data-group-id="7157394281-3">[</span><span·class="p"·data-group-id="7157394281-4">{</span><span·class="ss">logger</span><span·class="p">,</span><span·class="w">
280 ····</span><span·class="p"·data-group-id="7018191272-5">[</span><span·class="p"·data-group-id="7018191272-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">280 ····</span><span·class="p"·data-group-id="7157394281-5">[</span><span·class="p"·data-group-id="7157394281-6">{</span><span·class="ss">handler</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
281 ······</span><span·class="p"·data-group-id="7018191272-7">#{</span><span·class="w">·</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7018191272-8">#{</span><span·class="w">·</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/erlang.log&quot;</span><span·class="p">,</span><span·class="w">281 ······</span><span·class="p"·data-group-id="7157394281-7">#{</span><span·class="w">·</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7157394281-8">#{</span><span·class="w">·</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;log/erlang.log&quot;</span><span·class="p">,</span><span·class="w">
282 ······················</span><span·class="ss">max_no_bytes</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">4096</span><span·class="p">,</span><span·class="w">282 ······················</span><span·class="ss">max_no_bytes</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">4096</span><span·class="p">,</span><span·class="w">
283 ······················</span><span·class="ss">max_no_files</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="7018191272-8">}</span><span·class="p">,</span><span·class="w">283 ······················</span><span·class="ss">max_no_files</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="7157394281-8">}</span><span·class="p">,</span><span·class="w">
284 ·········</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7018191272-9">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7018191272-10">#{</span><span·class="p"·data-group-id="7018191272-10">}</span><span·class="p"·data-group-id="7018191[·...·truncated·by·diffoscope;·len:·374,·SHA:·fb24ed811f8be7653a0aaa7ace0850084e911929c490c2d8a8b1ab49357d86bc·...·]-1">]</span><span·class="p">.</span><span·class="w">284 ·········</span><span·class="ss">formatter</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7157394281-9">{</span><span·class="ss">logger_formatter</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7157394281-10">#{</span><span·class="p"·data-group-id="7157394281-10">}</span><span·class="p"·data-group-id="7157394[·...·truncated·by·diffoscope;·len:·374,·SHA:·8088e88e1c6859f2f556ffc9a2915a3e0deb97ae018e6b362c9eaf8f3667c6e2·...·]-1">]</span><span·class="p">.</span><span·class="w">
285 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="ss">sys</span><span·class="w">285 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="ss">sys</span><span·class="w">
286 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.1</span><span·class="w">··</span><span·class="p"·data-group-id="7018191272-11">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7018191272-11">)</span><span·class="gp·unselectable">286 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V10</span><span·class="p">.</span><span·class="mf">5.1</span><span·class="w">··</span><span·class="p"·data-group-id="7157394281-11">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7157394281-11">)</span><span·class="gp·unselectable">
287 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="7018191272-12">(</span><span·class="s">&quot;Oh·noes,·even·more·errors&quot;</span><span·class="p"·data-group-id="7018191272-12">)</span><span·class="p">.</span><span·class="w">287 1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="7157394281-12">(</span><span·class="s">&quot;Oh·noes,·even·more·errors&quot;</span><span·class="p"·data-group-id="7157394281-12">)</span><span·class="p">.</span><span·class="w">
288 </span><span·class="ss">ok</span><span·class="gp·unselectable">288 </span><span·class="ss">ok</span><span·class="gp·unselectable">
289 2&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">halt</span><span·class="p"·data-group-id="7018191272-13">(</span><span·class="p"·data-group-id="7018191272-13">)</span><span·class="p">.</span><span·class="w">289 2&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">halt</span><span·class="p"·data-group-id="7157394281-13">(</span><span·class="p"·data-group-id="7157394281-13">)</span><span·class="p">.</span><span·class="w">
290 </span><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">log</span><span·class="o">/</span><span·class="ss">erlang</span><span·class="p">.</span><span·class="ss">log</span><span·class="w">290 </span><span·class="sc">$·</span><span·class="ss">cat</span><span·class="w">·</span><span·class="ss">log</span><span·class="o">/</span><span·class="ss">erlang</span><span·class="p">.</span><span·class="ss">log</span><span·class="w">
291 </span><span·class="mi">2019</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">07</span><span·class="n">T11</span><span·class="p">:</span><span·class="mi">47</span><span·class="p">:</span><span·class="mf">16.837958</span><span·class="o">+</span><span·class="mi">02</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">even</span><span·class="w">·</span><span·class="ss">more</span><span·class="w">·</span><span·class="ss">errors</span></code></pre><h4>See·also</h4><ul><li><a·href="logger_std_h.html"><code·class="inline">logger_std_h</code></a></li><li><a·href="logger_chapter.html#handlers">Handlers</a>·in·the·Logging·User's·Guide</li></ul><h3·id="debug-only-handler"·class="section-heading">291 </span><span·class="mi">2019</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">07</span><span·class="n">T11</span><span·class="p">:</span><span·class="mi">47</span><span·class="p">:</span><span·class="mf">16.837958</span><span·class="o">+</span><span·class="mi">02</span><span·class="p">:</span><span·class="mi">00</span><span·class="w">·</span><span·class="nc">error</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Oh</span><span·class="w">·</span><span·class="ss">noes</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">even</span><span·class="w">·</span><span·class="ss">more</span><span·class="w">·</span><span·class="ss">errors</span></code></pre><h4>See·also</h4><ul><li><a·href="logger_std_h.html"><code·class="inline">logger_std_h</code></a></li><li><a·href="logger_chapter.html#handlers">Handlers</a>·in·the·Logging·User's·Guide</li></ul><h3·id="debug-only-handler"·class="section-heading">
292 ··<a·href="#debug-only-handler"·class="hover-link">292 ··<a·href="#debug-only-handler"·class="hover-link">
293 ····<i·class="ri-link-m"·aria-hidden="true"></i>293 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Max diff block lines reached; 55252/96267 bytes (57.39%) of diff not shown.
4.79 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/logger_disk_log_h.html
    
Offset 160, 20 lines modifiedOffset 160, 20 lines modified
160 sync·if·something·has·actually·been·logged.</p><p>Defaults·to·<code·class="inline">5000</code>·milliseconds.</p><p>If·<code·class="inline">no_repeat</code>·is·set·as·value,·the·repeated·sync·operation·is·disabled.·The160 sync·if·something·has·actually·been·logged.</p><p>Defaults·to·<code·class="inline">5000</code>·milliseconds.</p><p>If·<code·class="inline">no_repeat</code>·is·set·as·value,·the·repeated·sync·operation·is·disabled.·The
161 user·can·also·call·the·<a·href="#filesync/1"><code·class="inline">filesync/1</code></a>·function·to·perform·a161 user·can·also·call·the·<a·href="#filesync/1"><code·class="inline">filesync/1</code></a>·function·to·perform·a
162 disk_log·sync.</p></li></ul><p>Other·configuration·parameters·exist,·to·be·used·for·customizing·the·overload162 disk_log·sync.</p></li></ul><p>Other·configuration·parameters·exist,·to·be·used·for·customizing·the·overload
163 protection·behaviour.·The·same·parameters·are·used·both·in·the·standard·handler163 protection·behaviour.·The·same·parameters·are·used·both·in·the·standard·handler
164 and·the·disk_log·handler,·and·are·documented·in·the164 and·the·disk_log·handler,·and·are·documented·in·the
165 <a·href="logger_chapter.html#overload_protection"><code·class="inline">User's·Guide</code></a>.</p><p>Notice·that·when·changing·the·configuration·of·the·handler·in·runtime,·the165 <a·href="logger_chapter.html#overload_protection"><code·class="inline">User's·Guide</code></a>.</p><p>Notice·that·when·changing·the·configuration·of·the·handler·in·runtime,·the
166 disk_log·options·(<code·class="inline">file</code>,·<code·class="inline">type</code>,·<code·class="inline">max_no_files</code>,·<code·class="inline">max_no_bytes</code>)·must·not·be166 disk_log·options·(<code·class="inline">file</code>,·<code·class="inline">type</code>,·<code·class="inline">max_no_files</code>,·<code·class="inline">max_no_bytes</code>)·must·not·be
167 modified.</p><p>Example·of·adding·a·disk_log·handler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="8486196211-1">(</span><span·class="ss">my_disk_log_h</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_disk_log_h</span><span·class="p">,</span><span·class="w">167 modified.</p><p>Example·of·adding·a·disk_log·handler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="3283299006-1">(</span><span·class="ss">my_disk_log_h</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_disk_log_h</span><span·class="p">,</span><span·class="w">
168 ···················</span><span·class="p"·data-group-id="8486196211-2">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8486196211-3">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;./my_disk_log&quot;</span><span·class="p">,</span><span·class="w">168 ···················</span><span·class="p"·data-group-id="3283299006-2">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3283299006-3">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;./my_disk_log&quot;</span><span·class="p">,</span><span·class="w">
169 ·································</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">wrap</span><span·class="p">,</span><span·class="w">169 ·································</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">wrap</span><span·class="p">,</span><span·class="w">
170 ·································</span><span·class="ss">max_no_files</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">170 ·································</span><span·class="ss">max_no_files</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">
171 ·································</span><span·class="ss">max_no_bytes</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">10000</span><span·class="p">,</span><span·class="w">171 ·································</span><span·class="ss">max_no_bytes</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">10000</span><span·class="p">,</span><span·class="w">
172 ·································</span><span·class="ss">filesync_repeat_interval</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1000</span><span·class="p"·data-group-id="8486196211-3">}</span><span·class="p"·data-group-id="8486196211-2">}</span><span·class="p"·data-group-id="8486196211-1">)</span><span·class="p">.</span></code></pre><p>To·use·the·disk_log·handler·instead·of·the·default·standard·handler·when172 ·································</span><span·class="ss">filesync_repeat_interval</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1000</span><span·class="p"·data-group-id="3283299006-3">}</span><span·class="p"·data-group-id="3283299006-2">}</span><span·class="p"·data-group-id="3283299006-1">)</span><span·class="p">.</span></code></pre><p>To·use·the·disk_log·handler·instead·of·the·default·standard·handler·when
173 starting·an·Erlang·node,·change·the·Kernel·default·logger·to·use173 starting·an·Erlang·node,·change·the·Kernel·default·logger·to·use
174 <code·class="inline">logger_disk_log_h</code>.·Example:</p><pre><code·class="text">erl·-kernel·logger·'[{handler,default,logger_disk_log_h,174 <code·class="inline">logger_disk_log_h</code>.·Example:</p><pre><code·class="text">erl·-kernel·logger·'[{handler,default,logger_disk_log_h,
175 ······················#{config·=&gt;·#{file·=&gt;·&quot;./system_disk_log&quot;}}}]'</code></pre><h2·id="module-see-also"·class="section-heading">175 ······················#{config·=&gt;·#{file·=&gt;·&quot;./system_disk_log&quot;}}}]'</code></pre><h2·id="module-see-also"·class="section-heading">
176 ··<a·href="#module-see-also"·class="hover-link">176 ··<a·href="#module-see-also"·class="hover-link">
177 ····<i·class="ri-link-m"·aria-hidden="true"></i>177 ····<i·class="ri-link-m"·aria-hidden="true"></i>
178 ··</a>178 ··</a>
179 ··<span·class="text">See·Also</span>179 ··<span·class="text">See·Also</span>
15.6 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/logger_filters.html
    
Offset 247, 35 lines modifiedOffset 247, 35 lines modified
247 ······</div>247 ······</div>
  
248 <p>This·filter·provides·a·way·of·filtering·log·events·based·on·a·<code·class="inline">domain</code>·field·in248 <p>This·filter·provides·a·way·of·filtering·log·events·based·on·a·<code·class="inline">domain</code>·field·in
249 <code·class="inline">Metadata</code>.·This·field·is·optional,·and·the·purpose·of·using·it·is·to·group·log249 <code·class="inline">Metadata</code>.·This·field·is·optional,·and·the·purpose·of·using·it·is·to·group·log
250 events·from,·for·example,·a·specific·functional·area.·This·allows·filtering·or250 events·from,·for·example,·a·specific·functional·area.·This·allows·filtering·or
251 other·specialized·treatment·in·a·Logger·handler.</p><p>A·domain·field·must·be·a·list·of·atoms,·creating·smaller·and·more·specialized251 other·specialized·treatment·in·a·Logger·handler.</p><p>A·domain·field·must·be·a·list·of·atoms,·creating·smaller·and·more·specialized
252 domains·as·the·list·grows·longer.·The·greatest·domain·is·<code·class="inline">[]</code>,·which·comprises252 domains·as·the·list·grows·longer.·The·greatest·domain·is·<code·class="inline">[]</code>,·which·comprises
253 all·possible·domains.</p><p>For·example,·consider·the·following·domains:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">D1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5053082670-1">[</span><span·class="ss">otp</span><span·class="p"·data-group-id="5053082670-1">]</span><span·class="w">253 all·possible·domains.</p><p>For·example,·consider·the·following·domains:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">D1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5857719260-1">[</span><span·class="ss">otp</span><span·class="p"·data-group-id="5857719260-1">]</span><span·class="w">
254 </span><span·class="n">D2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5053082670-2">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sasl</span><span·class="p"·data-group-id="5053082670-2">]</span></code></pre><p><code·class="inline">D1</code>·is·the·greatest·of·the·two,·and·is·said·to·be·a·super-domain·of·<code·class="inline">D2</code>.·<code·class="inline">D2</code>254 </span><span·class="n">D2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5857719260-2">[</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sasl</span><span·class="p"·data-group-id="5857719260-2">]</span></code></pre><p><code·class="inline">D1</code>·is·the·greatest·of·the·two,·and·is·said·to·be·a·super-domain·of·<code·class="inline">D2</code>.·<code·class="inline">D2</code>
255 is·a·sub-domain·<code·class="inline">D1</code>.·Both·<code·class="inline">D1</code>·and·<code·class="inline">D2</code>·are·sub-domains·of·<code·class="inline">[]</code>.</p><p>The·above·domains·are·used·for·logs·originating·from·Erlang/OTP.·D1·specifies255 is·a·sub-domain·<code·class="inline">D1</code>.·Both·<code·class="inline">D1</code>·and·<code·class="inline">D2</code>·are·sub-domains·of·<code·class="inline">[]</code>.</p><p>The·above·domains·are·used·for·logs·originating·from·Erlang/OTP.·D1·specifies
256 that·the·log·event·comes·from·Erlang/OTP·in·general,·and·D2·indicates·that·the256 that·the·log·event·comes·from·Erlang/OTP·in·general,·and·D2·indicates·that·the
257 log·event·is·a·so·called·<a·href="logger_chapter.html#sasl_reports">SASL·report</a>.</p><p>The·<code·class="inline">Extra</code>·parameter·to·the·<a·href="#domain/2"><code·class="inline">domain/2</code></a>·function·is·specified·when257 log·event·is·a·so·called·<a·href="logger_chapter.html#sasl_reports">SASL·report</a>.</p><p>The·<code·class="inline">Extra</code>·parameter·to·the·<a·href="#domain/2"><code·class="inline">domain/2</code></a>·function·is·specified·when
258 adding·the·filter·via·<a·href="logger.html#add_primary_filter/2"><code·class="inline">logger:add_primary_filter/2</code></a>·or258 adding·the·filter·via·<a·href="logger.html#add_primary_filter/2"><code·class="inline">logger:add_primary_filter/2</code></a>·or
259 <a·href="logger.html#add_handler_filter/3"><code·class="inline">logger:add_handler_filter/3</code></a>.</p><p>The·filter·compares·the·value·of·the·<code·class="inline">domain</code>·field·in·the·log·event's·metadata259 <a·href="logger.html#add_handler_filter/3"><code·class="inline">logger:add_handler_filter/3</code></a>.</p><p>The·filter·compares·the·value·of·the·<code·class="inline">domain</code>·field·in·the·log·event's·metadata
260 (<code·class="inline">Domain</code>)·against·<code·class="inline">MatchDomain</code>.·The·filter·matches·if·the·value·of·<code·class="inline">Compare</code>260 (<code·class="inline">Domain</code>)·against·<code·class="inline">MatchDomain</code>.·The·filter·matches·if·the·value·of·<code·class="inline">Compare</code>
261 is:</p><ul><li><p><strong><code·class="inline">sub</code></strong>·-·and·<code·class="inline">Domain</code>·is·equal·to·or·a·sub-domain·of·<code·class="inline">MatchDomain</code>,·that261 is:</p><ul><li><p><strong><code·class="inline">sub</code></strong>·-·and·<code·class="inline">Domain</code>·is·equal·to·or·a·sub-domain·of·<code·class="inline">MatchDomain</code>,·that
262 is,·if·<code·class="inline">MatchDomain</code>·is·a·prefix·of·<code·class="inline">Domain</code>.</p></li><li><p><strong><code·class="inline">super</code></strong>·-·and·<code·class="inline">Domain</code>·is·equal·to·or·a·super-domain·of·<code·class="inline">MatchDomain</code>,262 is,·if·<code·class="inline">MatchDomain</code>·is·a·prefix·of·<code·class="inline">Domain</code>.</p></li><li><p><strong><code·class="inline">super</code></strong>·-·and·<code·class="inline">Domain</code>·is·equal·to·or·a·super-domain·of·<code·class="inline">MatchDomain</code>,
263 that·is,·if·<code·class="inline">Domain</code>·is·a·prefix·of·<code·class="inline">MatchDomain</code>.</p></li><li><p><strong><code·class="inline">equal</code></strong>·-·and·<code·class="inline">Domain</code>·is·equal·to·<code·class="inline">MatchDomain</code>.</p></li><li><p><strong><code·class="inline">not_equal</code></strong>·-·and·<code·class="inline">Domain</code>·differs·from·<code·class="inline">MatchDomain</code>,·or·if·there·is·no263 that·is,·if·<code·class="inline">Domain</code>·is·a·prefix·of·<code·class="inline">MatchDomain</code>.</p></li><li><p><strong><code·class="inline">equal</code></strong>·-·and·<code·class="inline">Domain</code>·is·equal·to·<code·class="inline">MatchDomain</code>.</p></li><li><p><strong><code·class="inline">not_equal</code></strong>·-·and·<code·class="inline">Domain</code>·differs·from·<code·class="inline">MatchDomain</code>,·or·if·there·is·no
264 domain·field·in·metadata.</p></li><li><p><strong><code·class="inline">undefined</code></strong>·-·and·there·is·no·domain·field·in·metadata.·In·this·case264 domain·field·in·metadata.</p></li><li><p><strong><code·class="inline">undefined</code></strong>·-·and·there·is·no·domain·field·in·metadata.·In·this·case
265 <code·class="inline">MatchDomain</code>·must·be·set·to·<code·class="inline">[]</code>.</p></li></ul><p>If·the·filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">log</code>,·the·log·event·is·allowed.·If·the265 <code·class="inline">MatchDomain</code>·must·be·set·to·<code·class="inline">[]</code>.</p></li></ul><p>If·the·filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">log</code>,·the·log·event·is·allowed.·If·the
266 filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">stop</code>,·the·log·event·is·stopped.</p><p>If·the·filter·does·not·match,·it·returns·<code·class="inline">ignore</code>,·meaning·that·other·filters,266 filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">stop</code>,·the·log·event·is·stopped.</p><p>If·the·filter·does·not·match,·it·returns·<code·class="inline">ignore</code>,·meaning·that·other·filters,
267 or·the·value·of·the·configuration·parameter·<code·class="inline">filter_default</code>,·decide·if·the267 or·the·value·of·the·configuration·parameter·<code·class="inline">filter_default</code>,·decide·if·the
268 event·is·allowed·or·not.</p><p>Log·events·that·do·not·contain·any·domain·field,·match·only·when·<code·class="inline">Compare</code>·is268 event·is·allowed·or·not.</p><p>Log·events·that·do·not·contain·any·domain·field,·match·only·when·<code·class="inline">Compare</code>·is
269 equal·to·<code·class="inline">undefined</code>·or·<code·class="inline">not_equal</code>.</p><p>Example:·stop·all·events·with·domain·<code·class="inline">[otp,·sasl·|·_]</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="0992995713-1">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">filter_default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">log</span><span·class="p"·data-group-id="0992995713-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·this·is·the·default</span><span·class="w">269 equal·to·<code·class="inline">undefined</code>·or·<code·class="inline">not_equal</code>.</p><p>Example:·stop·all·events·with·domain·<code·class="inline">[otp,·sasl·|·_]</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="7116910735-1">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">filter_default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">log</span><span·class="p"·data-group-id="7116910735-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·this·is·the·default</span><span·class="w">
270 </span><span·class="ss">ok</span><span·class="gp·unselectable">270 </span><span·class="ss">ok</span><span·class="gp·unselectable">
271 2&gt;·</span><span·class="n">Filter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0992995713-2">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·512,·SHA:·5f361dda154b44369552108d7a0f65e49e611576e945be7e17e44bd141977c63·...·]-2">}</span><span·class="p">.</span><span·class="w">271 2&gt;·</span><span·class="n">Filter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7116910735-2">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">domain</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·512,·SHA:·f11938030e41ef2ece1a0e97080a29b110a0a8d93227ee69bd140abf74e62264·...·]-2">}</span><span·class="p">.</span><span·class="w">
272 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">272 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
273 3&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler_filter</span><span·class="p"·data-group-id="0992995713-5">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">no_sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filter</span><span·class="p"·data-group-id="0992995713-5">)</span><span·class="p">.</span><span·class="w">273 3&gt;·</span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler_filter</span><span·class="p"·data-group-id="7116910735-5">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">no_sasl</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filter</span><span·class="p"·data-group-id="7116910735-5">)</span><span·class="p">.</span><span·class="w">
274 </span><span·class="ss">ok</span></code></pre>274 </span><span·class="ss">ok</span></code></pre>
275 ··</section>275 ··</section>
276 </section>276 </section>
277 <section·class="detail"·id="level/2">277 <section·class="detail"·id="level/2">
  
278 ··<div·class="detail-header">278 ··<div·class="detail-header">
279 ····<a·href="#level/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">279 ····<a·href="#level/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 312, 17 lines modifiedOffset 312, 17 lines modified
312 matches·log·events·by·comparing·the·log·level·with·a·specified·<code·class="inline">MatchLevel</code></p><p>The·<code·class="inline">Extra</code>·parameter·is·specified·when·adding·the·filter·via312 matches·log·events·by·comparing·the·log·level·with·a·specified·<code·class="inline">MatchLevel</code></p><p>The·<code·class="inline">Extra</code>·parameter·is·specified·when·adding·the·filter·via
313 <a·href="logger.html#add_primary_filter/2"><code·class="inline">logger:add_primary_filter/2</code></a>·or·<a·href="logger.html#add_handler_filter/3"><code·class="inline">logger:add_handler_filter/3</code></a>.</p><p>The·filter·compares·the·value·of·the·event's·log·level·(<code·class="inline">Level</code>)·to·<code·class="inline">MatchLevel</code>313 <a·href="logger.html#add_primary_filter/2"><code·class="inline">logger:add_primary_filter/2</code></a>·or·<a·href="logger.html#add_handler_filter/3"><code·class="inline">logger:add_handler_filter/3</code></a>.</p><p>The·filter·compares·the·value·of·the·event's·log·level·(<code·class="inline">Level</code>)·to·<code·class="inline">MatchLevel</code>
314 by·calling314 by·calling
315 <a·href="logger.html#compare_levels/2"><code·class="inline">logger:compare_levels(Level,·MatchLevel)</code></a>.·The315 <a·href="logger.html#compare_levels/2"><code·class="inline">logger:compare_levels(Level,·MatchLevel)</code></a>.·The
316 filter·matches·if·the·value·of·<code·class="inline">Operator</code>·is:</p><ul><li><p><strong><code·class="inline">neq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">lt</code>·or·<code·class="inline">gt</code>.</p></li><li><p><strong><code·class="inline">eq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">eq</code>.</p></li><li><p><strong><code·class="inline">lt</code></strong>·-·and·the·compare·function·returns·<code·class="inline">lt</code>.</p></li><li><p><strong><code·class="inline">gt</code></strong>·-·and·the·compare·function·returns·<code·class="inline">gt</code>.</p></li><li><p><strong><code·class="inline">lteq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">lt</code>·or·<code·class="inline">eq</code>.</p></li><li><p><strong><code·class="inline">gteq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">gt</code>·or·<code·class="inline">eq</code>.</p></li></ul><p>If·the·filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">log</code>,·the·log·event·is·allowed.·If·the316 filter·matches·if·the·value·of·<code·class="inline">Operator</code>·is:</p><ul><li><p><strong><code·class="inline">neq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">lt</code>·or·<code·class="inline">gt</code>.</p></li><li><p><strong><code·class="inline">eq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">eq</code>.</p></li><li><p><strong><code·class="inline">lt</code></strong>·-·and·the·compare·function·returns·<code·class="inline">lt</code>.</p></li><li><p><strong><code·class="inline">gt</code></strong>·-·and·the·compare·function·returns·<code·class="inline">gt</code>.</p></li><li><p><strong><code·class="inline">lteq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">lt</code>·or·<code·class="inline">eq</code>.</p></li><li><p><strong><code·class="inline">gteq</code></strong>·-·and·the·compare·function·returns·<code·class="inline">gt</code>·or·<code·class="inline">eq</code>.</p></li></ul><p>If·the·filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">log</code>,·the·log·event·is·allowed.·If·the
317 filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">stop</code>,·the·log·event·is·stopped.</p><p>If·the·filter·does·not·match,·it·returns·<code·class="inline">ignore</code>,·meaning·that·other·filters,317 filter·matches·and·<code·class="inline">Action</code>·is·<code·class="inline">stop</code>,·the·log·event·is·stopped.</p><p>If·the·filter·does·not·match,·it·returns·<code·class="inline">ignore</code>,·meaning·that·other·filters,
318 or·the·value·of·the·configuration·parameter·<code·class="inline">filter_default</code>,·will·decide·if·the318 or·the·value·of·the·configuration·parameter·<code·class="inline">filter_default</code>,·will·decide·if·the
319 event·is·allowed·or·not.</p><p>Example:·only·allow·debug·level·log·events</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="8388540450-1">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">filter_default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="8388540450-1">)</span><span·class="p">.</span><span·class="w">319 event·is·allowed·or·not.</p><p>Example:·only·allow·debug·level·log·events</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">set_handler_config</span><span·class="p"·data-group-id="4778740077-1">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">filter_default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="4778740077-1">)</span><span·class="p">.</span><span·class="w">
320 </span><span·class="n">Filter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8388540450-2">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">level</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·329,·SHA:·c6d9e05b8b230084078fbcbbe7d2a05ce310b6ed26d5b056f024dc4b474270ac·...·]-2">}</span><span·class="p">.</span><span·class="w">320 </span><span·class="n">Filter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4778740077-2">{</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">logger_filters</span><span·class="p">:</span><span·class="ss">level</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·329,·SHA:·6f799e270bc4c6d220a637cc5c9e1ef8dc25def9adb1e474b74d59e3041606b1·...·]-2">}</span><span·class="p">.</span><span·class="w">
321 </span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler_filter</span><span·class="p"·data-group-id="8388540450-4">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug_only</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filter</span><span·class="p"·data-group-id="8388540450-4">)</span><span·class="p">.</span><span·class="w">321 </span><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler_filter</span><span·class="p"·data-group-id="4778740077-4">(</span><span·class="ss">h1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug_only</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filter</span><span·class="p"·data-group-id="4778740077-4">)</span><span·class="p">.</span><span·class="w">
322 </span><span·class="ss">ok</span></code></pre>322 </span><span·class="ss">ok</span></code></pre>
323 ··</section>323 ··</section>
324 </section>324 </section>
325 <section·class="detail"·id="progress/2">325 <section·class="detail"·id="progress/2">
  
326 ··<div·class="detail-header">326 ··<div·class="detail-header">
327 ····<a·href="#progress/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">327 ····<a·href="#progress/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
4.53 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/logger_std_h.html
    
Offset 181, 17 lines modifiedOffset 181, 17 lines modified
181 but·only·performs·a·new·sync·if·something·has·actually·been·logged.</p><p>If·<code·class="inline">no_repeat</code>·is·set·as·value,·the·repeated·file·sync·operation·is·disabled,181 but·only·performs·a·new·sync·if·something·has·actually·been·logged.</p><p>If·<code·class="inline">no_repeat</code>·is·set·as·value,·the·repeated·file·sync·operation·is·disabled,
182 and·it·is·the·operating·system·settings·that·determine·how·quickly·or·slowly182 and·it·is·the·operating·system·settings·that·determine·how·quickly·or·slowly
183 data·is·written·to·disk.·The·user·can·also·call·the·<a·href="#filesync/1"><code·class="inline">filesync/1</code></a>·function·to183 data·is·written·to·disk.·The·user·can·also·call·the·<a·href="#filesync/1"><code·class="inline">filesync/1</code></a>·function·to
184 perform·a·file·sync.</p><p>Defaults·to·<code·class="inline">5000</code>·milliseconds.</p></li></ul><p>Other·configuration·parameters·exist,·to·be·used·for·customizing·the·overload184 perform·a·file·sync.</p><p>Defaults·to·<code·class="inline">5000</code>·milliseconds.</p></li></ul><p>Other·configuration·parameters·exist,·to·be·used·for·customizing·the·overload
185 protection·behaviour.·The·same·parameters·are·used·both·in·the·standard·handler185 protection·behaviour.·The·same·parameters·are·used·both·in·the·standard·handler
186 and·the·disk_log·handler,·and·are·documented·in·the186 and·the·disk_log·handler,·and·are·documented·in·the
187 <a·href="logger_chapter.html#overload_protection"><code·class="inline">User's·Guide</code></a>.</p><p>Notice·that·if·changing·the·configuration·of·the·handler·in·runtime,·the·<code·class="inline">type</code>,187 <a·href="logger_chapter.html#overload_protection"><code·class="inline">User's·Guide</code></a>.</p><p>Notice·that·if·changing·the·configuration·of·the·handler·in·runtime,·the·<code·class="inline">type</code>,
188 <code·class="inline">file</code>,·or·<code·class="inline">modes</code>·parameters·must·not·be·modified.</p><p>Example·of·adding·a·standard·handler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="1779222652-1">(</span><span·class="ss">my_standard_h</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">188 <code·class="inline">file</code>,·or·<code·class="inline">modes</code>·parameters·must·not·be·modified.</p><p>Example·of·adding·a·standard·handler:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">logger</span><span·class="p">:</span><span·class="nf">add_handler</span><span·class="p"·data-group-id="8519529921-1">(</span><span·class="ss">my_standard_h</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">logger_std_h</span><span·class="p">,</span><span·class="w">
189 ···················</span><span·class="p"·data-group-id="1779222652-2">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1779222652-3">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;./system_info.log&quot;</span><span·class="p">,</span><span·class="w">189 ···················</span><span·class="p"·data-group-id="8519529921-2">#{</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8519529921-3">#{</span><span·class="ss">file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;./system_info.log&quot;</span><span·class="p">,</span><span·class="w">
190 ·································</span><span·class="ss">filesync_repeat_interval</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1000</span><span·class="p"·data-group-id="1779222652-3">}</span><span·class="p"·data-group-id="1779222652-2">}</span><span·class="p"·data-group-id="1779222652-1">)</span><span·class="p">.</span></code></pre><p>To·set·the·default·handler,·that·starts·initially·with·the·Kernel·application,190 ·································</span><span·class="ss">filesync_repeat_interval</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1000</span><span·class="p"·data-group-id="8519529921-3">}</span><span·class="p"·data-group-id="8519529921-2">}</span><span·class="p"·data-group-id="8519529921-1">)</span><span·class="p">.</span></code></pre><p>To·set·the·default·handler,·that·starts·initially·with·the·Kernel·application,
191 to·log·to·file·instead·of·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#t:standard_io/0"><code·class="inline">standard_io</code></a>,·change·the191 to·log·to·file·instead·of·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#t:standard_io/0"><code·class="inline">standard_io</code></a>,·change·the
192 Kernel·default·logger·configuration.·Example:</p><pre><code·class="text">erl·-kernel·logger·'[{handler,default,logger_std_h,192 Kernel·default·logger·configuration.·Example:</p><pre><code·class="text">erl·-kernel·logger·'[{handler,default,logger_std_h,
193 ······················#{config·=&gt;·#{file·=&gt;·&quot;./log.log&quot;}}}]'</code></pre><p>An·example·of·how·to·replace·the·standard·handler·with·a·disk_log·handler·at193 ······················#{config·=&gt;·#{file·=&gt;·&quot;./log.log&quot;}}}]'</code></pre><p>An·example·of·how·to·replace·the·standard·handler·with·a·disk_log·handler·at
194 startup·is·found·in·the·<a·href="logger_disk_log_h.html"><code·class="inline">logger_disk_log_h</code></a>·manual.</p><h2·id="module-see-also"·class="section-heading">194 startup·is·found·in·the·<a·href="logger_disk_log_h.html"><code·class="inline">logger_disk_log_h</code></a>·manual.</p><h2·id="module-see-also"·class="section-heading">
195 ··<a·href="#module-see-also"·class="hover-link">195 ··<a·href="#module-see-also"·class="hover-link">
196 ····<i·class="ri-link-m"·aria-hidden="true"></i>196 ····<i·class="ri-link-m"·aria-hidden="true"></i>
197 ··</a>197 ··</a>
4.9 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/net.html
    
Offset 519, 21 lines modifiedOffset 519, 21 lines modified
  
519 ··········<pre·translate="no"><span·class="attribute">-type</span>·ifaddrs_filter_fun()·::·fun((<a·href="#t:ifaddrs/0">ifaddrs</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()).</pre>519 ··········<pre·translate="no"><span·class="attribute">-type</span>·ifaddrs_filter_fun()·::·fun((<a·href="#t:ifaddrs/0">ifaddrs</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()).</pre>
  
520 ······</div>520 ······</div>
  
521 <p>Interface·address·filtering·selector·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:function/0"><code·class="inline">function/0</code></a>.</p><p>For·each·<code·class="inline">ifaddrs</code>·entry,·return·either·<code·class="inline">true</code>·to·keep·the·entry521 <p>Interface·address·filtering·selector·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:function/0"><code·class="inline">function/0</code></a>.</p><p>For·each·<code·class="inline">ifaddrs</code>·entry,·return·either·<code·class="inline">true</code>·to·keep·the·entry
522 or·<code·class="inline">false</code>·to·discard·the·entry.</p><p>For·example,·to·get·an·interface·list·which·only·contains522 or·<code·class="inline">false</code>·to·discard·the·entry.</p><p>For·example,·to·get·an·interface·list·which·only·contains
523 non-<code·class="inline">loopback</code>·<code·class="inline">inet</code>·interfaces:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">net</span><span·class="p">:</span><span·class="nf">getifaddrs</span><span·class="p"·data-group-id="0276279696-1">(</span><span·class="w">523 non-<code·class="inline">loopback</code>·<code·class="inline">inet</code>·interfaces:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">net</span><span·class="p">:</span><span·class="nf">getifaddrs</span><span·class="p"·data-group-id="2062773666-1">(</span><span·class="w">
524 ····</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="0276279696-2">(</span><span·class="p"·data-group-id="0276279696-3">#{</span><span·class="w">·</span><span·class="ss">addr</span><span·class="w">··</span><span·class="p">:=</span><span·class="w">·</span><span·class="p"·data-group-id="0276279696-4">#{</span>[·...·truncated·by·diffoscope;·len:·171,·SHA:·bde458f2ac858ccffd62c14f401def096c73fe555ab6ac490a9cb726f98fe815·...·]6-4">}</span><span·class="p">,</span><span·class="w">524 ····</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2062773666-2">(</span><span·class="p"·data-group-id="2062773666-3">#{</span><span·class="w">·</span><span·class="ss">addr</span><span·class="w">··</span><span·class="p">:=</span><span·class="w">·</span><span·class="p"·data-group-id="2062773666-4">#{</span>[·...·truncated·by·diffoscope;·len:·171,·SHA:·2d355542a051564ab5cf10e94e0d642d31086dcd3e24975dce014a1bedc0bbb8·...·]6-4">}</span><span·class="p">,</span><span·class="w">
525 ············</span><span·class="ss">flags</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Flags</span><span·class="p"·data-group-id="0276279696-3">}</span><span·class="p"·data-group-id="0276279696-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">525 ············</span><span·class="ss">flags</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Flags</span><span·class="p"·data-group-id="2062773666-3">}</span><span·class="p"·data-group-id="2062773666-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
526 ··········</span><span·class="ow">not</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="0276279696-5">(</span><span·class="ss">loopback</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Flags</span><span·class="p"·data-group-id="0276279696-5">)</span><span·class="p">;</span><span·class="w">526 ··········</span><span·class="ow">not</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="2062773666-5">(</span><span·class="ss">loopback</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Flags</span><span·class="p"·data-group-id="2062773666-5">)</span><span·class="p">;</span><span·class="w">
527 ········</span><span·class="p"·data-group-id="0276279696-6">(</span><span·class="p">_</span><span·class="p"·data-group-id="0276279696-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">527 ········</span><span·class="p"·data-group-id="2062773666-6">(</span><span·class="p">_</span><span·class="p"·data-group-id="2062773666-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
528 ··········</span><span·class="ss">false</span><span·class="w">528 ··········</span><span·class="ss">false</span><span·class="w">
529 ····</span><span·class="k">end</span><span·class="p"·data-group-id="0276279696-1">)</span><span·class="p">.</span></code></pre>529 ····</span><span·class="k">end</span><span·class="p"·data-group-id="2062773666-1">)</span><span·class="p">.</span></code></pre>
530 ··</section>530 ··</section>
531 </section>531 </section>
532 <section·class="detail"·id="t:ifaddrs_filter_map/0">532 <section·class="detail"·id="t:ifaddrs_filter_map/0">
  
533 ··<div·class="detail-header">533 ··<div·class="detail-header">
534 ····<a·href="#t:ifaddrs_filter_map/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">534 ····<a·href="#t:ifaddrs_filter_map/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">
535 ······<i·class="ri-link-m"·aria-hidden="true"></i>535 ······<i·class="ri-link-m"·aria-hidden="true"></i>
3.09 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/net_adm.html
    
Offset 487, 16 lines modifiedOffset 487, 16 lines modified
487 ···················Name·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),487 ···················Name·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
488 ···················Port·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),488 ···················Port·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),
489 ···················Reason·::·address·|·<a·href="file.html#t:posix/0">file:posix</a>().</pre>489 ···················Reason·::·address·|·<a·href="file.html#t:posix/0">file:posix</a>().</pre>
  
490 ······</div>490 ······</div>
  
491 <p>Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>491 <p>Returns·the·names·and·associated·port·numbers·of·the·Erlang·nodes·that·<code·class="inline">epmd</code>
492 registered·at·the·specified·host.</p><p>Similar·to·<code·class="inline">epmd·-names</code>,·see·<a·href="../../../../erts-15.0.1/doc/html/epmd_cmd.html"><code·class="inline">erts:epmd</code></a>.</p><p>Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not·operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(arne@dunn)1&gt;·</span><span·class="nc">net_adm</span><span·class="p">:</span><span·class="nf">names</span><span·class="p"·data-group-id="9788005214-1">(</span><span·class="p"·data-group-id="9788005214-1">)</span><span·class="p">.</span><span·class="w">492 registered·at·the·specified·host.</p><p>Similar·to·<code·class="inline">epmd·-names</code>,·see·<a·href="../../../../erts-15.0.1/doc/html/epmd_cmd.html"><code·class="inline">erts:epmd</code></a>.</p><p>Returns·<code·class="inline">{error,·address}</code>·if·<code·class="inline">epmd</code>·is·not·operational.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(arne@dunn)1&gt;·</span><span·class="nc">net_adm</span><span·class="p">:</span><span·class="nf">names</span><span·class="p"·data-group-id="6868918758-1">(</span><span·class="p"·data-group-id="6868918758-1">)</span><span·class="p">.</span><span·class="w">
493 </span><span·class="p"·data-group-id="9788005214-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9788005214-3">[</span><span·class="p"·data-group-id="9788005214-4">{</span><span·class="s">&quot;arne&quot;</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·f030ee954763769e5b55edbf73d86587aa384e5bf0316ed1a7ee51764977a439·...·]-2">}</span></code></pre>493 </span><span·class="p"·data-group-id="6868918758-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6868918758-3">[</span><span·class="p"·data-group-id="6868918758-4">{</span><span·class="s">&quot;arne&quot;</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·161,·SHA:·3df78e489f1fe1737def9b90880dae7a56b12e73f9ace621be35f2f847ef3b7c·...·]-2">}</span></code></pre>
494 ··</section>494 ··</section>
495 </section>495 </section>
496 <section·class="detail"·id="ping/1">496 <section·class="detail"·id="ping/1">
  
497 ··<div·class="detail-header">497 ··<div·class="detail-header">
498 ····<a·href="#ping/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">498 ····<a·href="#ping/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
499 ······<i·class="ri-link-m"·aria-hidden="true"></i>499 ······<i·class="ri-link-m"·aria-hidden="true"></i>
26.1 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/net_kernel.html
    
Offset 128, 17 lines modifiedOffset 128, 17 lines modified
  
  
128 ····<section·id="moduledoc">128 ····<section·id="moduledoc">
129 <p>Erlang·networking·kernel.</p><p>The·net·kernel·is·a·system·process,·registered·as·<code·class="inline">net_kernel</code>,·which·must·be129 <p>Erlang·networking·kernel.</p><p>The·net·kernel·is·a·system·process,·registered·as·<code·class="inline">net_kernel</code>,·which·must·be
130 operational·for·distributed·Erlang·to·work.·The·purpose·of·this·process·is·to130 operational·for·distributed·Erlang·to·work.·The·purpose·of·this·process·is·to
131 implement·parts·of·the·BIFs·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#spawn/4"><code·class="inline">spawn/4</code></a>·and131 implement·parts·of·the·BIFs·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#spawn/4"><code·class="inline">spawn/4</code></a>·and
132 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#spawn_link/4"><code·class="inline">spawn_link/4</code></a>,·and·to·provide·monitoring·of·the·network.</p><p>An·Erlang·node·is·started·using·command-line·flag·<code·class="inline">-name</code>·or·<code·class="inline">-sname</code>:</p><pre><code·class="text">$·erl·-sname·foobar</code></pre><p>It·is·also·possible·to·call·<a·href="#start/2"><code·class="inline">net_kernel:start(foobar,·#{})</code></a>132 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#spawn_link/4"><code·class="inline">spawn_link/4</code></a>,·and·to·provide·monitoring·of·the·network.</p><p>An·Erlang·node·is·started·using·command-line·flag·<code·class="inline">-name</code>·or·<code·class="inline">-sname</code>:</p><pre><code·class="text">$·erl·-sname·foobar</code></pre><p>It·is·also·possible·to·call·<a·href="#start/2"><code·class="inline">net_kernel:start(foobar,·#{})</code></a>
133 directly·from·the·normal·Erlang·shell·prompt:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">net_kernel</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9389220760-1">(</span><span·class="ss">foobar</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9389220760-2">#{</span><span·class="ss">name_domain</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w"[·...·truncated·by·diffoscope;·len:·136,·SHA:·c50c233ce100936b62d087511b868f545d430d7c6eb454505a582e8d20e69ce0·...·]0-1">)</span><span·class="p">.</span><span·class="w">133 directly·from·the·normal·Erlang·shell·prompt:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">net_kernel</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4146921170-1">(</span><span·class="ss">foobar</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4146921170-2">#{</span><span·class="ss">name_domain</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w"[·...·truncated·by·diffoscope;·len:·136,·SHA:·6f353544026d0b59245a7c593ff7827da36476f7ef6ff2a8a8b20796b9671259·...·]0-1">)</span><span·class="p">.</span><span·class="w">
134 </span><span·class="p"·data-group-id="9389220760-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.64</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9389220760-3">}</span><span·class="w">134 </span><span·class="p"·data-group-id="4146921170-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.64</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4146921170-3">}</span><span·class="w">
135 </span><span·class="p"·data-group-id="9389220760-4">(</span><span·class="ss">foobar@gringotts</span><span·class="p"·data-group-id="9389220760-4">)</span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>If·the·node·is·started·with·command-line·flag·<code·class="inline">-sname</code>,·the·node·name·is135 </span><span·class="p"·data-group-id="4146921170-4">(</span><span·class="ss">foobar@gringotts</span><span·class="p"·data-group-id="4146921170-4">)</span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>If·the·node·is·started·with·command-line·flag·<code·class="inline">-sname</code>,·the·node·name·is
136 <code·class="inline">foobar@Host</code>,·where·<code·class="inline">Host</code>·is·the·short·name·of·the·host·(not·the·fully136 <code·class="inline">foobar@Host</code>,·where·<code·class="inline">Host</code>·is·the·short·name·of·the·host·(not·the·fully
137 qualified·domain·name).·If·started·with·flag·<code·class="inline">-name</code>,·the·node·name·is137 qualified·domain·name).·If·started·with·flag·<code·class="inline">-name</code>,·the·node·name·is
138 <code·class="inline">foobar@Host</code>,·where·<code·class="inline">Host</code>·is·the·fully·qualified·domain·name.·For·more138 <code·class="inline">foobar@Host</code>,·where·<code·class="inline">Host</code>·is·the·fully·qualified·domain·name.·For·more
139 information,·see·<a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html"><code·class="inline">erl</code></a>.</p><p>Normally,·connections·are·established·automatically·when·another·node·is139 information,·see·<a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html"><code·class="inline">erl</code></a>.</p><p>Normally,·connections·are·established·automatically·when·another·node·is
140 referenced.·This·functionality·can·be·disabled·by·setting·Kernel·configuration140 referenced.·This·functionality·can·be·disabled·by·setting·Kernel·configuration
141 parameter·<code·class="inline">dist_auto_connect</code>·to·<code·class="inline">never</code>,·see·<a·href="kernel_app.html"><code·class="inline">kernel(6)</code></a>.·In141 parameter·<code·class="inline">dist_auto_connect</code>·to·<code·class="inline">never</code>,·see·<a·href="kernel_app.html"><code·class="inline">kernel(6)</code></a>.·In
142 this·case,·connections·must·be·established·explicitly·by·calling142 this·case,·connections·must·be·established·explicitly·by·calling
Offset 664, 21 lines modifiedOffset 664, 21 lines modified
664 node·through·the·newly·established·connection.</li><li><code·class="inline">nodedown</code>·messages·are·delivered·after·all·the·signals·from·the·remote·node664 node·through·the·newly·established·connection.</li><li><code·class="inline">nodedown</code>·messages·are·delivered·after·all·the·signals·from·the·remote·node
665 over·the·connection·have·been·delivered.</li><li><code·class="inline">nodeup</code>·messages·are·delivered·after·the·corresponding·node·appears·in665 over·the·connection·have·been·delivered.</li><li><code·class="inline">nodeup</code>·messages·are·delivered·after·the·corresponding·node·appears·in
666 results·from·<code·class="inline">erlang:nodes()</code>.</li><li><code·class="inline">nodedown</code>·messages·are·delivered·after·the·corresponding·node·has·disappeared666 results·from·<code·class="inline">erlang:nodes()</code>.</li><li><code·class="inline">nodedown</code>·messages·are·delivered·after·the·corresponding·node·has·disappeared
667 in·results·from·<code·class="inline">erlang:nodes()</code>.</li><li>As·of·OTP·23.0,·a·<code·class="inline">nodedown</code>·message·for·a·connection·being·taken·down·will·be667 in·results·from·<code·class="inline">erlang:nodes()</code>.</li><li>As·of·OTP·23.0,·a·<code·class="inline">nodedown</code>·message·for·a·connection·being·taken·down·will·be
668 delivered·before·a·<code·class="inline">nodeup</code>·message·due·to·a·new·connection·to·the·same·node.668 delivered·before·a·<code·class="inline">nodeup</code>·message·due·to·a·new·connection·to·the·same·node.
669 Prior·to·OTP·23.0,·this·was·not·guaranteed·to·be·the·case.</li></ul><p>The·format·of·the·node·status·change·messages·depends·on·<code·class="inline">Options</code>.·If·<code·class="inline">Options</code>669 Prior·to·OTP·23.0,·this·was·not·guaranteed·to·be·the·case.</li></ul><p>The·format·of·the·node·status·change·messages·depends·on·<code·class="inline">Options</code>.·If·<code·class="inline">Options</code>
670 is·the·empty·list·or·if·<a·href="#monitor_nodes/1"><code·class="inline">net_kernel:monitor_nodes/1</code></a>·is·called,·the·format·is·as670 is·the·empty·list·or·if·<a·href="#monitor_nodes/1"><code·class="inline">net_kernel:monitor_nodes/1</code></a>·is·called,·the·format·is·as
671 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6397435843-1">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="6397435843-1">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·197,·SHA:·c03a6ec6c1f1f10063451f2fa290b5adb9d27608f36a256bf916f85be99fec60·...·]-2">}</span><span·class="w">671 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8953636844-1">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="8953636844-1">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·197,·SHA:·b249a6fa7551d3ce12a8fccbd503b3addd7d92ffb6096df13606d70c22548be1·...·]-2">}</span><span·class="w">
672 ··</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="6397435843-3">(</span><span·class="p"·data-group-id="6397435843-3">)</span></code></pre><p>When·<code·class="inline">Options</code>·is·the·empty·map·or·empty·list,·the·caller·will·only·subscribe672 ··</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="8953636844-3">(</span><span·class="p"·data-group-id="8953636844-3">)</span></code></pre><p>When·<code·class="inline">Options</code>·is·the·empty·map·or·empty·list,·the·caller·will·only·subscribe
673 for·status·change·messages·for·visible·nodes.·That·is,·only·nodes·that·appear·in673 for·status·change·messages·for·visible·nodes.·That·is,·only·nodes·that·appear·in
674 the·result·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#nodes/0"><code·class="inline">erlang:nodes/0</code></a>.</p><p>If·<code·class="inline">Options</code>·equals·anything·other·than·the·empty·list,·the·format·of·the·status674 the·result·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#nodes/0"><code·class="inline">erlang:nodes/0</code></a>.</p><p>If·<code·class="inline">Options</code>·equals·anything·other·than·the·empty·list,·the·format·of·the·status
675 change·messages·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4181127119-1">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p"·data-group-id="4181127119-1">}</span><[·...·truncated·by·diffoscope;·len:·347,·SHA:·11e74a7576530f7bf411beaddd012e68a058710c4792393606e6a7cedbbf1178·...·]-2">}</span><span·class="w">675 change·messages·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2510110052-1">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p"·data-group-id="2510110052-1">}</span><[·...·truncated·by·diffoscope;·len:·347,·SHA:·b2c04209ebd8acd2e48844e821693cfa847afe77800acc98657a11fe92419177·...·]-2">}</span><span·class="w">
676 ··</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="4181127119-3">(</span><span·class="p"·data-group-id="4181127119-3">)</span><span·class="w">676 ··</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="2510110052-3">(</span><span·class="p"·data-group-id="2510110052-3">)</span><span·class="w">
677 ··</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4181127119-4">#{</span><span·class="n">Tag</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="4181127119-4">}</span><span·class="w">·</span><span·class="p">|</span><spa[·...·truncated·by·diffoscope;·len:·320,·SHA:·bd989c982940317bc6d7b9045df19bf91ace8e9ca8cfdfe1d567d8b8b149f208·...·]-5">]</span></code></pre><p><code·class="inline">Info</code>·is·either·a·map·or·a·list·of·2-tuples.·Its·content·depends·on·<code·class="inline">Options</code>.677 ··</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2510110052-4">#{</span><span·class="n">Tag</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="2510110052-4">}</span><span·class="w">·</span><span·class="p">|</span><spa[·...·truncated·by·diffoscope;·len:·320,·SHA:·e6f2c594a8b75e364d3f47c579944fef614a02b6e3d544ce491441349a095ae1·...·]-5">]</span></code></pre><p><code·class="inline">Info</code>·is·either·a·map·or·a·list·of·2-tuples.·Its·content·depends·on·<code·class="inline">Options</code>.
678 If·<code·class="inline">Options</code>·is·a·map,·<code·class="inline">Info</code>·will·also·be·a·map.·If·<code·class="inline">Options</code>·is·a·list,·<code·class="inline">Info</code>678 If·<code·class="inline">Options</code>·is·a·map,·<code·class="inline">Info</code>·will·also·be·a·map.·If·<code·class="inline">Options</code>·is·a·list,·<code·class="inline">Info</code>
679 will·also·be·a·list.</p><p>When·<code·class="inline">Options</code>·is·a·map,·currently·the·following·associations·are·allowed:</p><ul><li><p><strong><code·class="inline">connection_id·=&gt;·boolean()</code></strong>·-·If·the·value·of·the·association·equals679 will·also·be·a·list.</p><p>When·<code·class="inline">Options</code>·is·a·map,·currently·the·following·associations·are·allowed:</p><ul><li><p><strong><code·class="inline">connection_id·=&gt;·boolean()</code></strong>·-·If·the·value·of·the·association·equals
680 <code·class="inline">true</code>,·a·<code·class="inline">connection_id·=&gt;·ConnectionId</code>·association·will·be·included·in·the680 <code·class="inline">true</code>,·a·<code·class="inline">connection_id·=&gt;·ConnectionId</code>·association·will·be·included·in·the
681 <code·class="inline">Info</code>·map·where·<code·class="inline">ConnectionId</code>·is·the·connection·identifier·of·the·connection681 <code·class="inline">Info</code>·map·where·<code·class="inline">ConnectionId</code>·is·the·connection·identifier·of·the·connection
682 coming·up·or·going·down.·For·more·info·about·this·connection·identifier·see682 coming·up·or·going·down.·For·more·info·about·this·connection·identifier·see
683 the·documentation·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#connection_id">erlang:nodes/2</a>.</p></li><li><p><strong><code·class="inline">node_type·=&gt;·NodeType</code></strong>·-·Valid·values·for·<code·class="inline">NodeType</code>:</p><ul><li><p><strong><code·class="inline">visible</code></strong>·-·Subscribe·to·node·status·change·messages·for·visible·nodes683 the·documentation·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#connection_id">erlang:nodes/2</a>.</p></li><li><p><strong><code·class="inline">node_type·=&gt;·NodeType</code></strong>·-·Valid·values·for·<code·class="inline">NodeType</code>:</p><ul><li><p><strong><code·class="inline">visible</code></strong>·-·Subscribe·to·node·status·change·messages·for·visible·nodes
684 only.·The·association·<code·class="inline">node_type·=&gt;·visible</code>·will·be·included·in·the·<code·class="inline">Info</code>684 only.·The·association·<code·class="inline">node_type·=&gt;·visible</code>·will·be·included·in·the·<code·class="inline">Info</code>
Offset 704, 31 lines modifiedOffset 704, 31 lines modified
704 only.·The·tuple·<code·class="inline">{node_type,·hidden}</code>·will·be·included·in·the·<code·class="inline">Info</code>·list.</p></li><li><p><strong><code·class="inline">all</code></strong>·-·Subscribe·to·node·status·change·messages·for·both·visible·and704 only.·The·tuple·<code·class="inline">{node_type,·hidden}</code>·will·be·included·in·the·<code·class="inline">Info</code>·list.</p></li><li><p><strong><code·class="inline">all</code></strong>·-·Subscribe·to·node·status·change·messages·for·both·visible·and
705 hidden·nodes.·The·tuple·<code·class="inline">{node_type,·visible·|·hidden}</code>·will·be·included·in705 hidden·nodes.·The·tuple·<code·class="inline">{node_type,·visible·|·hidden}</code>·will·be·included·in
706 the·<code·class="inline">Info</code>·list.</p></li></ul><p>If·no·<code·class="inline">{node_type,·NodeType}</code>·option·has·been·given.·The·caller·will·subscribe706 the·<code·class="inline">Info</code>·list.</p></li></ul><p>If·no·<code·class="inline">{node_type,·NodeType}</code>·option·has·been·given.·The·caller·will·subscribe
707 for·status·change·messages·for·visible·nodes·only,·but·<em>no</em>707 for·status·change·messages·for·visible·nodes·only,·but·<em>no</em>
708 <code·class="inline">{node_type,·visible}</code>·tuple·will·be·included·in·the·<code·class="inline">Info</code>·list.</p></li><li><p><strong><code·class="inline">nodedown_reason</code></strong>·-·The·tuple·<code·class="inline">{nodedown_reason,·Reason}</code>·will·be·included708 <code·class="inline">{node_type,·visible}</code>·tuple·will·be·included·in·the·<code·class="inline">Info</code>·list.</p></li><li><p><strong><code·class="inline">nodedown_reason</code></strong>·-·The·tuple·<code·class="inline">{nodedown_reason,·Reason}</code>·will·be·included
709 in·the·<code·class="inline">Info</code>·list·for·<code·class="inline">nodedown</code>·messages.</p><p>See·the·documentation·of·the709 in·the·<code·class="inline">Info</code>·list·for·<code·class="inline">nodedown</code>·messages.</p><p>See·the·documentation·of·the
710 <a·href="net_kernel.html#nodedown_reasons"><code·class="inline">nodedown_reason·=&gt;·boolean()</code></a>·association710 <a·href="net_kernel.html#nodedown_reasons"><code·class="inline">nodedown_reason·=&gt;·boolean()</code></a>·association
711 above·for·information·about·possible·<code·class="inline">Reason</code>·values.</p></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(a@localhost)1&gt;·</span><span·class="nc">net_kernel</span><span·class="p">:</span><span·class="nf">monitor_nodes</span><span·class="p"·data-group-id="1040802887-1">(</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1040802887-2">#{</span><span·class="ss">connection_id</span><span·class="p">=&gt;</span><span·class="ss">true</span><span·class[·...·truncated·by·diffoscope;·len:·362,·SHA:·30aba93b00d155d9af7378d0e7049ccc57abadaf23cdbc626b245f75b03e4eb3·...·]-1">)</span><span·class="p">.</span><span·class="w">711 above·for·information·about·possible·<code·class="inline">Reason</code>·values.</p></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(a@localhost)1&gt;·</span><span·class="nc">net_kernel</span><span·class="p">:</span><span·class="nf">monitor_nodes</span><span·class="p"·data-group-id="8623992631-1">(</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8623992631-2">#{</span><span·class="ss">connection_id</span><span·class="p">=&gt;</span><span·class="ss">true</span><span·class[·...·truncated·by·diffoscope;·len:·362,·SHA:·9bbbab8fc95e9032a8a63aedf214f714eb284f3a3fbd9c11404726e61e0015c5·...·]-1">)</span><span·class="p">.</span><span·class="w">
712 </span><span·class="nf">ok</span><span·class="w">712 </span><span·class="nf">ok</span><span·class="w">
713 </span><span·class="p"·data-group-id="1040802887-3">(</span><span·class="ss">a@localhost</span><span·class="p"·data-group-id="1040802887-3">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">flush</span><span·class="p"·data-group-id="1040802887[·...·truncated·by·diffoscope;·len:·53,·SHA:·a64bb5350467e979ee139dad332d4367845971bbc627123f19d3767aee937ce0·...·]-4">)</span><span·class="p">.</span><span·class="w">713 </span><span·class="p"·data-group-id="8623992631-3">(</span><span·class="ss">a@localhost</span><span·class="p"·data-group-id="8623992631-3">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">flush</span><span·class="p"·data-group-id="8623992631[·...·truncated·by·diffoscope;·len:·53,·SHA:·60eeff6bf583bd8b1093fb121e5fa74b3302f7db138f30acbd69c75001540fac·...·]-4">)</span><span·class="p">.</span><span·class="w">
714 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="1040802887-5">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="w">714 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="8623992631-5">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="w">
715 ··················</span><span·class="p"·data-group-id="1040802887-6">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">3067552</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·169,·SHA:·112876dcd51fdf783735ecc2f0ca9df4ae7cbac2152724b2315bc07648afe3c7·...·]-5">}</span><span·class="w">715 ··················</span><span·class="p"·data-group-id="8623992631-6">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">3067552</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·169,·SHA:·06112421f7705f6cf12a3dcb79201cf222359ad6252b14bb4f8eb130f88c9ece·...·]-5">}</span><span·class="w">
716 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="1040802887-7">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="ss">c@localhost</span><span·class="p">,</span><span·class="w">716 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="8623992631-7">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="ss">c@localhost</span><span·class="p">,</span><span·class="w">
717 ··················</span><span·class="p"·data-group-id="1040802887-8">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">13892107</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·169,·SHA:·83f2a429e11b55c76948f2e6334d225e476f624002b80ea50be1f63abc395ff4·...·]-7">}</span><span·class="w">717 ··················</span><span·class="p"·data-group-id="8623992631-8">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">13892107</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·169,·SHA:·5d5b11091be68b2923b08221a1cfa40e426200fe0eed1e92a0a366f309b66e53·...·]-7">}</span><span·class="w">
718 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="1040802887-9">{</span><span·class="ss">nodedown</span><span·class="p">,</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="w">718 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="8623992631-9">{</span><span·class="ss">nodedown</span><span·class="p">,</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="w">
719 ····················</span><span·class="p"·data-group-id="1040802887-10">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">3067552</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">visible</span><span·class="p">,</span><span·class="w">719 ····················</span><span·class="p"·data-group-id="8623992631-10">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">3067552</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">visible</span><span·class="p">,</span><span·class="w">
720 ······················</span><span·class="ss">nodedown_reason</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">connection_closed</span><span·class="p"·data-group-id="1040802887-10">}</span><span·class="p"·data-group-id="1040802887-9">}</span><span·class="w">720 ······················</span><span·class="ss">nodedown_reason</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">connection_closed</span><span·class="p"·data-group-id="8623992631-10">}</span><span·class="p"·data-group-id="8623992631-9">}</span><span·class="w">
721 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="1040802887-11">{</span><span·class="ss">nodedown</span><span·class="p">,</span><span·class="ss">c@localhost</span><span·class="p">,</span><span·class="w">721 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="8623992631-11">{</span><span·class="ss">nodedown</span><span·class="p">,</span><span·class="ss">c@localhost</span><span·class="p">,</span><span·class="w">
722 ····················</span><span·class="p"·data-group-id="1040802887-12">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">13892107</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">hidden</span><span·class="p">,</span><span·class="w">722 ····················</span><span·class="p"·data-group-id="8623992631-12">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">13892107</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">hidden</span><span·class="p">,</span><span·class="w">
723 ······················</span><span·class="ss">nodedown_reason</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">net_tick_timeout</span><span·class="p"·data-group-id="1040802887-12">}</span><span·class="p"·data-group-id="1040802887-11">}</span><span·class="w">723 ······················</span><span·class="ss">nodedown_reason</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">net_tick_timeout</span><span·class="p"·data-group-id="8623992631-12">}</span><span·class="p"·data-group-id="8623992631-11">}</span><span·class="w">
724 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="1040802887-13">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="w">724 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="8623992631-13">{</span><span·class="ss">nodeup</span><span·class="p">,</span><span·class="ss">b@localhost</span><span·class="p">,</span><span·class="w">
725 ··················</span><span·class="p"·data-group-id="1040802887-14">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">3067553</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·171,·SHA:·c8254565c99c00f0a869e8ea39c100d78666f11b60dedaff4314b2abbd6fcb72·...·]-13">}</span><span·class="w">725 ··················</span><span·class="p"·data-group-id="8623992631-14">#{</span><span·class="ss">connection_id</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">3067553</span><span·class="p">,</span><span·class="ss">node_type</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·171,·SHA:·32188dea398aa3f07c636b3c77bffd31f62b1c2cf53b6e0037832887974f5665·...·]-13">}</span><span·class="w">
726 </span><span·class="nf">ok</span><span·class="w">726 </span><span·class="nf">ok</span><span·class="w">
727 </span><span·class="p"·data-group-id="1040802887-15">(</span><span·class="ss">a@localhost</span><span·class="p"·data-group-id="1040802887-15">)</span><span·class="mi">3</span><span·class="o">&gt;</span></code></pre>727 </span><span·class="p"·data-group-id="8623992631-15">(</span><span·class="ss">a@localhost</span><span·class="p"·data-group-id="8623992631-15">)</span><span·class="mi">3</span><span·class="o">&gt;</span></code></pre>
728 ··</section>728 ··</section>
729 </section>729 </section>
730 <section·class="detail"·id="set_net_ticktime/1">730 <section·class="detail"·id="set_net_ticktime/1">
  
731 ··<div·class="detail-header">731 ··<div·class="detail-header">
732 ····<a·href="#set_net_ticktime/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">732 ····<a·href="#set_net_ticktime/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
733 ······<i·class="ri-link-m"·aria-hidden="true"></i>733 ······<i·class="ri-link-m"·aria-hidden="true"></i>
5.84 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/notes.html
    
Offset 3891, 20 lines modifiedOffset 3891, 20 lines modified
3891 will·make·repeated·attempts·to·open·the·disk·log·fail·every·time.</p><p>Own·Id:·OTP-5558·Aux·Id:·seq9823</p></li><li><p>Previously·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·behaved3891 will·make·repeated·attempts·to·open·the·disk·log·fail·every·time.</p><p>Own·Id:·OTP-5558·Aux·Id:·seq9823</p></li><li><p>Previously·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·behaved
3892 completely·asynchronous.·This·had·one·undesirable·effect,·though.·You·could3892 completely·asynchronous.·This·had·one·undesirable·effect,·though.·You·could
3893 never·know·when·you·were·guaranteed·<em>not</em>·to·be·affected·by·a·link·that·you3893 never·know·when·you·were·guaranteed·<em>not</em>·to·be·affected·by·a·link·that·you
3894 had·unlinked·or·a·monitor·that·you·had·demonitored.</p><p>The·new·behavior·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·can·be3894 had·unlinked·or·a·monitor·that·you·had·demonitored.</p><p>The·new·behavior·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#unlink/1"><code·class="inline">unlink/1</code></a>·and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#demonitor/2"><code·class="inline">erlang:demonitor/2</code></a>·can·be
3895 viewed·as·two·operations·performed·atomically.·Asynchronously·send·an·unlink3895 viewed·as·two·operations·performed·atomically.·Asynchronously·send·an·unlink
3896 signal·or·a·demonitor·signal,·and·ignore·any·future·results·of·the·link·or3896 signal·or·a·demonitor·signal,·and·ignore·any·future·results·of·the·link·or
3897 monitor.</p><p><em>NOTE</em>:·This·change·can·cause·some·obscure·code·to·fail·which·previously·did3897 monitor.</p><p><em>NOTE</em>:·This·change·can·cause·some·obscure·code·to·fail·which·previously·did
3898 not.·For·example,·the·following·code·might·hang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">············</span><span·class="n">Mon</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monitor</span><span·class="p"·data-group-id="9561418379-1">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="9561418379-1">)</span><span·class="p">,</span><span·class="w">3898 not.·For·example,·the·following·code·might·hang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">············</span><span·class="n">Mon</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monitor</span><span·class="p"·data-group-id="3009711541-1">(</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="3009711541-1">)</span><span·class="p">,</span><span·class="w">
3899 ············</span><span·class="c1">%%·...</span><span·class="w">3899 ············</span><span·class="c1">%%·...</span><span·class="w">
3900 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="9561418379-2">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bang</span><span·class="p"·data-group-id="9561418379-2">)</span><span·class="p">,</span><span·class="w">3900 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="3009711541-2">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bang</span><span·class="p"·data-group-id="3009711541-2">)</span><span·class="p">,</span><span·class="w">
3901 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="9561418379-3">(</span><span·class="n">Mon</span><span·class="p"·data-group-id="9561418379-3">)</span><span·class="p">,</span><span·class="w">3901 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="3009711541-3">(</span><span·class="n">Mon</span><span·class="p"·data-group-id="3009711541-3">)</span><span·class="p">,</span><span·class="w">
3902 ············</span><span·class="k">receive</span><span·class="w">3902 ············</span><span·class="k">receive</span><span·class="w">
3903 ················</span><span·class="p"·data-group-id="9561418379-4">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mon</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·144,·SHA:·79a775559717fe82fedff41142850c93051d02756d333466a1bc37630d55a699·...·]-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">3903 ················</span><span·class="p"·data-group-id="3009711541-4">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mon</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·144,·SHA:·d6059606fbebc6de9d8e42d580cfedb689c75ca825beac2fb0c00a4901984bca·...·]-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">
3904 ············</span><span·class="c1">%%·We·were·previously·guaranteed·to·get·a·down·message</span><span·class="w">3904 ············</span><span·class="c1">%%·We·were·previously·guaranteed·to·get·a·down·message</span><span·class="w">
3905 ············</span><span·class="c1">%%·(since·we·exited·the·process·ourself),·so·we·could</span><span·class="w">3905 ············</span><span·class="c1">%%·(since·we·exited·the·process·ourself),·so·we·could</span><span·class="w">
3906 ············</span><span·class="c1">%%·in·this·case·leave·out:</span><span·class="w">3906 ············</span><span·class="c1">%%·in·this·case·leave·out:</span><span·class="w">
3907 ············</span><span·class="c1">%%·after·0·-&gt;·ok</span><span·class="w">3907 ············</span><span·class="c1">%%·after·0·-&gt;·ok</span><span·class="w">
3908 ············</span><span·class="k">end</span><span·class="p">,</span></code></pre><p>*<strong>·POTENTIAL·INCOMPATIBILITY·*</strong></p><p>Own·Id:·OTP-5772</p></li><li><p>The·behavior·when·an·application·fails·to·start·and·possibly·causes·the3908 ············</span><span·class="k">end</span><span·class="p">,</span></code></pre><p>*<strong>·POTENTIAL·INCOMPATIBILITY·*</strong></p><p>Own·Id:·OTP-5772</p></li><li><p>The·behavior·when·an·application·fails·to·start·and·possibly·causes·the
3909 runtime·system·to·halt·has·been·cleaned·up,·including·fixing·some·minor·bugs.</p><p><code·class="inline">application_controller</code>·should·now·always·terminate·with·a·non-nested·string,3909 runtime·system·to·halt·has·been·cleaned·up,·including·fixing·some·minor·bugs.</p><p><code·class="inline">application_controller</code>·should·now·always·terminate·with·a·non-nested·string,
3910 meaning·the·slogan·in·an·<code·class="inline">erl_crash.dump</code>·should·always·be·easy·to·read.</p><p><code·class="inline">init</code>·now·makes·sure·that·the·slogan·passed·to·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#halt/1"><code·class="inline">erlang:halt/1</code></a>·does·not3910 meaning·the·slogan·in·an·<code·class="inline">erl_crash.dump</code>·should·always·be·easy·to·read.</p><p><code·class="inline">init</code>·now·makes·sure·that·the·slogan·passed·to·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#halt/1"><code·class="inline">erlang:halt/1</code></a>·does·not
22.9 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/os.html
    
Offset 652, 21 lines modifiedOffset 652, 21 lines modified
652 ······<div·class="specs">652 ······<div·class="specs">
  
653 ··········<pre·translate="no"><span·class="attribute">-spec</span>·cmd(Command,·Options)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·when·Command·::·<a·href="#t:os_command/0">os_command</a>(),·Options·::·<a·href="#t:os_command_opts/0">os_command_opts</a>().</pre>653 ··········<pre·translate="no"><span·class="attribute">-spec</span>·cmd(Command,·Options)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·when·Command·::·<a·href="#t:os_command/0">os_command</a>(),·Options·::·<a·href="#t:os_command_opts/0">os_command_opts</a>().</pre>
  
654 ······</div>654 ······</div>
  
655 <p>Executes·<code·class="inline">Command</code>·in·a·command·shell·of·the·target·OS,·captures·the·standard655 <p>Executes·<code·class="inline">Command</code>·in·a·command·shell·of·the·target·OS,·captures·the·standard
656 output·and·standard·error·of·the·command,·and·returns·this·result·as·a·string.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">LsOut</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="0320278316-1">(</span><span·class="s">&quot;ls&quot;</span><span·class="p"·data-group-id="0320278316-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·on·unix·platform</span><span·class="w">656 output·and·standard·error·of·the·command,·and·returns·this·result·as·a·string.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">LsOut</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="2000274535-1">(</span><span·class="s">&quot;ls&quot;</span><span·class="p"·data-group-id="2000274535-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·on·unix·platform</span><span·class="w">
657 </span><span·class="n">DirOut</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="0320278316-2">(</span><span·class="s">&quot;dir&quot;</span><span·class="p"·data-group-id="0320278316-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·on·Win32·platform</span></code></pre><p>Notice·that·in·some·cases,·standard·output·of·a·command·when·called·from·another657 </span><span·class="n">DirOut</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="2000274535-2">(</span><span·class="s">&quot;dir&quot;</span><span·class="p"·data-group-id="2000274535-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·on·Win32·platform</span></code></pre><p>Notice·that·in·some·cases,·standard·output·of·a·command·when·called·from·another
658 program·can·differ,·compared·with·the·standard·output·of·the·command·when·called658 program·can·differ,·compared·with·the·standard·output·of·the·command·when·called
659 directly·from·an·OS·command·shell.</p><p>The·possible·options·are:</p><ul><li><p><strong><code·class="inline">max_size</code></strong>·-·The·maximum·size·of·the·data·returned·by·the·<code·class="inline">os:cmd</code>·call.659 directly·from·an·OS·command·shell.</p><p>The·possible·options·are:</p><ul><li><p><strong><code·class="inline">max_size</code></strong>·-·The·maximum·size·of·the·data·returned·by·the·<code·class="inline">os:cmd</code>·call.
660 This·option·is·a·safety·feature·that·should·be·used·when·the·command·executed660 This·option·is·a·safety·feature·that·should·be·used·when·the·command·executed
661 can·return·a·very·large,·possibly·infinite,·result.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="6006270344-1">(</span><span·class="s">&quot;cat·/dev/zero&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6006270344-2">#{</span><span·class="w">·</span><span·class="ss">max_size</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·192,·SHA:·2da6dc0c44f51169f8913b27aac0913790693cb5599741553b714dc0bcea227c·...·]-1">)</span><span·class="p">.</span><span·class="w">661 can·return·a·very·large,·possibly·infinite,·result.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="5489262710-1">(</span><span·class="s">&quot;cat·/dev/zero&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5489262710-2">#{</span><span·class="w">·</span><span·class="ss">max_size</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·192,·SHA:·9ae10dbb46be571c24969271aecd121ba9a60261206eb8947ffab6c9b598cad7·...·]-1">)</span><span·class="p">.</span><span·class="w">
662 </span><span·class="p"·data-group-id="6006270344-3">[</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·763,·SHA:·4523e6a4c69cf3669beab7d8c71909382a7854bb72827bb8bcd402727a1bb98f·...·]-3">]</span></code></pre></li></ul>662 </span><span·class="p"·data-group-id="5489262710-3">[</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·763,·SHA:·34de43504c899dbff738caada9406656957863c3c3cfdbe156df7442a4b25999·...·]-3">]</span></code></pre></li></ul>
663 ··</section>663 ··</section>
664 </section>664 </section>
665 <section·class="detail"·id="env/0">665 <section·class="detail"·id="env/0">
  
666 ··<div·class="detail-header">666 ··<div·class="detail-header">
667 ····<a·href="#env/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">667 ····<a·href="#env/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
668 ······<i·class="ri-link-m"·aria-hidden="true"></i>668 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 948, 15 lines modifiedOffset 948, 15 lines modified
  
948 ······</div>948 ······</div>
  
949 <p>Returns·a·performance·counter·that·can·be·used·as·a·very·fast·and·high949 <p>Returns·a·performance·counter·that·can·be·used·as·a·very·fast·and·high
950 resolution·timestamp.</p><p>This·counter·is·read·directly·from·the·hardware·or·operating·system·with·the950 resolution·timestamp.</p><p>This·counter·is·read·directly·from·the·hardware·or·operating·system·with·the
951 same·guarantees.·This·means·that·two·consecutive·calls·to·the·function·are·not951 same·guarantees.·This·means·that·two·consecutive·calls·to·the·function·are·not
952 guaranteed·to·be·monotonic,·though·it·most·likely·will·be.·The·performance952 guaranteed·to·be·monotonic,·though·it·most·likely·will·be.·The·performance
953 counter·will·be·converted·to·the·resolution·passed·as·an·argument.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">T1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">perf_counter</span><span·class="p"·data-group-id="9743999476-1">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="9743999476-1">)</span><span·class="p">,</span><span·class="k">receive</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">10000<[·...·truncated·by·diffoscope;·len:·487,·SHA:·8c4f39532e175f746bba553900123d4a4e0fbd3d226db142c544d1ec1bbae700·...·]-2">)</span><span·class="p">.</span><span·class="w">953 counter·will·be·converted·to·the·resolution·passed·as·an·argument.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">T1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">perf_counter</span><span·class="p"·data-group-id="1416511330-1">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="1416511330-1">)</span><span·class="p">,</span><span·class="k">receive</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">10000<[·...·truncated·by·diffoscope;·len:·487,·SHA:·d1847367b942af605544db70cf84c5cfdddc8bb94b9fbf86fda72418aedcbc0d·...·]-2">)</span><span·class="p">.</span><span·class="w">
954 </span><span·class="mi">176525861</span><span·class="gp·unselectable">954 </span><span·class="mi">176525861</span><span·class="gp·unselectable">
955 2&gt;·</span><span·class="n">T2</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="n">T1</span><span·class="p">.</span><span·class="w">955 2&gt;·</span><span·class="n">T2</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="n">T1</span><span·class="p">.</span><span·class="w">
956 </span><span·class="mi">10004</span></code></pre>956 </span><span·class="mi">10004</span></code></pre>
957 ··</section>957 ··</section>
958 </section>958 </section>
959 <section·class="detail"·id="putenv/2">959 <section·class="detail"·id="putenv/2">
  
Offset 1119, 24 lines modifiedOffset 1119, 24 lines modified
1119 <p>Returns·the·current·<a·href="../../../../erts-15.0.1/doc/html/time_correction.html#os-system-time">OS·system·time</a>1119 <p>Returns·the·current·<a·href="../../../../erts-15.0.1/doc/html/time_correction.html#os-system-time">OS·system·time</a>
1120 in·the·same·format·as·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#timestamp/0"><code·class="inline">erlang:timestamp/0</code></a>.</p><p>The·tuple·can·be·used·together·with·function·<a·href="../../../../lib/stdlib-6.0.1/doc/html/calendar.html#now_to_universal_time/1"><code·class="inline">calendar:now_to_universal_time/1</code></a>1120 in·the·same·format·as·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#timestamp/0"><code·class="inline">erlang:timestamp/0</code></a>.</p><p>The·tuple·can·be·used·together·with·function·<a·href="../../../../lib/stdlib-6.0.1/doc/html/calendar.html#now_to_universal_time/1"><code·class="inline">calendar:now_to_universal_time/1</code></a>
1121 or·<a·href="../../../../lib/stdlib-6.0.1/doc/html/calendar.html#now_to_local_time/1"><code·class="inline">calendar:now_to_local_time/1</code></a>·to·get·calendar·time.·Using·the·calendar·time,1121 or·<a·href="../../../../lib/stdlib-6.0.1/doc/html/calendar.html#now_to_local_time/1"><code·class="inline">calendar:now_to_local_time/1</code></a>·to·get·calendar·time.·Using·the·calendar·time,
1122 together·with·the·<code·class="inline">MicroSecs</code>·part·of·the·return·tuple·from·this·function,1122 together·with·the·<code·class="inline">MicroSecs</code>·part·of·the·return·tuple·from·this·function,
1123 allows·you·to·log·time·stamps·in·high·resolution·and·consistent·with·the·time·in1123 allows·you·to·log·time·stamps·in·high·resolution·and·consistent·with·the·time·in
1124 ·the·rest·of·the·OS.</p><p>Example·of·code·formatting·a·string·in·format·&quot;DD·Mon·YYYY·HH:MM:SS.mmmmmm&quot;,1124 ·the·rest·of·the·OS.</p><p>Example·of·code·formatting·a·string·in·format·&quot;DD·Mon·YYYY·HH:MM:SS.mmmmmm&quot;,
1125 where·DD·is·the·day·of·month,·Mon·is·the·textual·month·name,·YYYY·is·the·year,1125 where·DD·is·the·day·of·month,·Mon·is·the·textual·month·name,·YYYY·is·the·year,
1126 HH:MM:SS·is·the·time,·and·mmmmmm·is·the·microseconds·in·six·positions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1201427228-1">(</span><span·class="ss">print_time</span><span·class="p"·data-group-id="1201427228-1">)</span><span·class="p">.</span><span·class="w">1126 HH:MM:SS·is·the·time,·and·mmmmmm·is·the·microseconds·in·six·positions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7526151859-1">(</span><span·class="ss">print_time</span><span·class="p"·data-group-id="7526151859-1">)</span><span·class="p">.</span><span·class="w">
1127 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1201427228-2">(</span><span·class="p"·data-group-id="1201427228-3">[</span><span·class="ss">format_utc_timestamp</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1201427228-3">]</span><span·class="p"·data-group-id="1201[·...·truncated·by·diffoscope;·len:·6,·SHA:·f9dff385804c8b43bb544f08808d8da159dcdab7163b3dc29298156ff56bfea2·...·]-2">)</span><span·class="p">.</span><span·class="w">1127 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7526151859-2">(</span><span·class="p"·data-group-id="7526151859-3">[</span><span·class="ss">format_utc_timestamp</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7526151859-3">]</span><span·class="p"·data-group-id="7526[·...·truncated·by·diffoscope;·len:·6,·SHA:·e114d5871ed7b75b45a096e0e5fd12d48c9edfebe52f6cfbc38c395dc478b744·...·]-2">)</span><span·class="p">.</span><span·class="w">
1128 </span><span·class="nf">format_utc_timestamp</span><span·class="p"·data-group-id="1201427228-4">(</span><span·class="p"·data-group-id="1201427228-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1128 </span><span·class="nf">format_utc_timestamp</span><span·class="p"·data-group-id="7526151859-4">(</span><span·class="p"·data-group-id="7526151859-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1129 ····</span><span·class="n">TS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1201427228-5">{</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Micro</span><span·class="p"·data-group-id="1201427228-5">}</span><span·class="w">·</span><span·class="o">=</span><span·cla[·...·truncated·by·diffoscope;·len:·192,·SHA:·8ea9c4d782216ca731938443eac80b97e8d572ea72fcfdf93f5ad2678d8578ba·...·]-6">)</span><span·class="p">,</span><span·class="w">1129 ····</span><span·class="n">TS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7526151859-5">{</span><span·class="p">_</span><span·class="p">,</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Micro</span><span·class="p"·data-group-id="7526151859-5">}</span><span·class="w">·</span><span·class="o">=</span><span·cla[·...·truncated·by·diffoscope;·len:·192,·SHA:·b4be5aa1deb4cf258aed7160f1d8da3e510b60ec5526de133f5c277d4057d46c·...·]-6">)</span><span·class="p">,</span><span·class="w">
1130 ····</span><span·class="p"·data-group-id="1201427228-7">{</span><span·class="p"·data-group-id="1201427228-8">{</span><span·class="n">Year</span><span·class="p">,</span><span·class="n">Month</span><span·class="p">,</span><span·class="n">Day</span><span·class="p"·data-group-id="1201427228-8">}</span[·...·truncated·by·diffoscope;·len:·305,·SHA:·2b69a655bc21191880aec4a80bba8181b04a4d372813d99e8f330276f98214d1·...·]-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">1130 ····</span><span·class="p"·data-group-id="7526151859-7">{</span><span·class="p"·data-group-id="7526151859-8">{</span><span·class="n">Year</span><span·class="p">,</span><span·class="n">Month</span><span·class="p">,</span><span·class="n">Day</span><span·class="p"·data-group-id="7526151859-8">}</span[·...·truncated·by·diffoscope;·len:·305,·SHA:·7ee74c1a1d8aeee206dd08fe5814ab2de44c4058ec6c4436a75e708a4b8cec34·...·]-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
1131 </span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">now_to_universal_time</span><span·class="p"·data-group-id="1201427228-10">(</span><span·class="n">TS</span><span·class="p"·data-group-id="1201427228-10">)</span><span·class="p">,</span><span·class="w">1131 </span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">now_to_universal_time</span><span·class="p"·data-group-id="7526151859-10">(</span><span·class="n">TS</span><span·class="p"·data-group-id="7526151859-10">)</span><span·class="p">,</span><span·class="w">
1132 ····</span><span·class="n">Mstr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="1201427228-11">(</span><span·class="n">Month</span><span·class="p">,</span><span·class="p"·data-group-id="1201427228-12">{</span><span·class="s">&quot;Jan&quot;</span><span·class="p">,</span><span·class="s">&quot;Feb&quot;</span><span·class="p">,</span><span·class="s">&quot;Mar&quot;</span><span·class="p">,</span><span·class="s">&quot;Apr&quot;</span><span·class="p">,</span><span·class="s">&quot;May&quot;</span><span·class="p">,</span><span·class="s">&quot;Jun&quot;</span><span·class="p">,</span><span·class="s">&quot;Jul&quot;</span><span·class="p">,</span><span·class="w">1132 ····</span><span·class="n">Mstr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="7526151859-11">(</span><span·class="n">Month</span><span·class="p">,</span><span·class="p"·data-group-id="7526151859-12">{</span><span·class="s">&quot;Jan&quot;</span><span·class="p">,</span><span·class="s">&quot;Feb&quot;</span><span·class="p">,</span><span·class="s">&quot;Mar&quot;</span><span·class="p">,</span><span·class="s">&quot;Apr&quot;</span><span·class="p">,</span><span·class="s">&quot;May&quot;</span><span·class="p">,</span><span·class="s">&quot;Jun&quot;</span><span·class="p">,</span><span·class="s">&quot;Jul&quot;</span><span·class="p">,</span><span·class="w">
1133 ····</span><span·class="s">&quot;Aug&quot;</span><span·class="p">,</span><span·class="s">&quot;Sep&quot;</span><span·class="p">,</span><span·class="s">&quot;Oct&quot;</span><span·class="p">,</span><span·class="s">&quot;Nov&quot;</span><span·class="p">,</span><span·class="s">&quot;Dec&quot;</span><span·class="p"·data-group-id="1201427228-12">}</span><span·class="p"·data-group-id="1201427228-11">)</span><span·class="p">,</span><span·class="w">1133 ····</span><span·class="s">&quot;Aug&quot;</span><span·class="p">,</span><span·class="s">&quot;Sep&quot;</span><span·class="p">,</span><span·class="s">&quot;Oct&quot;</span><span·class="p">,</span><span·class="s">&quot;Nov&quot;</span><span·class="p">,</span><span·class="s">&quot;Dec&quot;</span><span·class="p"·data-group-id="7526151859-12">}</span><span·class="p"·data-group-id="7526151859-11">)</span><span·class="p">,</span><span·class="w">
1134 ····</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1201427228-13">(</span><span·class="s">&quot;</span><span·class="si">~2w</span><span·class="s">·</span><span·class="si">~s</span><span·class="s">·</span><span·class="si">~4w</span><span·class="s">·</span><span·class="si">~2w</span><span·class="s">:</span><span·class="si">~2..0w</span><span·class="s">:</span><span·class="si">~2..0w</span><span·class="s">.</span><span·class="si">~6..0w</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">1134 ····</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7526151859-13">(</span><span·class="s">&quot;</span><span·class="si">~2w</span><span·class="s">·</span><span·class="si">~s</span><span·class="s">·</span><span·class="si">~4w</span><span·class="s">·</span><span·class="si">~2w</span><span·class="s">:</span><span·class="si">~2..0w</span><span·class="s">:</span><span·class="si">~2..0w</span><span·class="s">.</span><span·class="si">~6..0w</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
1135 ····</span><span·class="p"·data-group-id="1201427228-14">[</span><span·class="n">Day</span><span·class="p">,</span><span·class="n">Mstr</span><span·class="p">,</span><span·class="n">Year</span><span·class="p">,</span><span·class="n">Hour</span><span·class="p">,</span><span·class="n">Minute</span><[·...·truncated·by·diffoscope;·len:·1003,·SHA:·581b30ad8608c5e70b0ae0f3ca8d94ffe3a625a14d1ac553378eca5867ff778b·...·]7-1">)</span><span·class="p">.</span><span·class="w">1135 ····</span><span·class="p"·data-group-id="7526151859-14">[</span><span·class="n">Day</span><span·class="p">,</span><span·class="n">Mstr</span><span·class="p">,</span><span·class="n">Year</span><span·class="p">,</span><span·class="n">Hour</span><span·class="p">,</span><span·class="n">Minute</span><[·...·truncated·by·diffoscope;·len:·1003,·SHA:·d3fafe8937f80f3f60c69765dc181f3ae00691acc604d74b854c9a9098208fea·...·]7-1">)</span><span·class="p">.</span><span·class="w">
1136 </span><span·class="mi">29</span><span·class="w">·</span><span·class="n">Apr</span><span·class="w">·</span><span·class="mi">2009</span><span·class="w">··</span><span·class="mi">9</span><span·class="p">:</span><span·class="mi">55</span><span·class="p">:</span><span·class="mf">30.051711</span></code></pre><p>OS·system·time·can·also·be·retrieved·by·<a·href="#system_time/0"><code·class="inline">system_time/0</code></a>·and·<a·href="#system_time/1"><code·class="inline">system_time/1</code></a>.</p>1136 </span><span·class="mi">29</span><span·class="w">·</span><span·class="n">Apr</span><span·class="w">·</span><span·class="mi">2009</span><span·class="w">··</span><span·class="mi">9</span><span·class="p">:</span><span·class="mi">55</span><span·class="p">:</span><span·class="mf">30.051711</span></code></pre><p>OS·system·time·can·also·be·retrieved·by·<a·href="#system_time/0"><code·class="inline">system_time/0</code></a>·and·<a·href="#system_time/1"><code·class="inline">system_time/1</code></a>.</p>
1137 ··</section>1137 ··</section>
1138 </section>1138 </section>
1139 <section·class="detail"·id="type/0">1139 <section·class="detail"·id="type/0">
  
1140 ··<div·class="detail-header">1140 ··<div·class="detail-header">
1141 ····<a·href="#type/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1141 ····<a·href="#type/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3.27 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/pg.html
    
Offset 866, 15 lines modifiedOffset 866, 15 lines modified
  
866 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor_scope(Scope·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>())·->·{<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0">reference</a>(),·#{<a·href="#t:group/0">group</a>()·=>·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0">pid</a>()]}}.</pre>866 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor_scope(Scope·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>())·->·{<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0">reference</a>(),·#{<a·href="#t:group/0">group</a>()·=>·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0">pid</a>()]}}.</pre>
  
867 ······</div>867 ······</div>
  
868 <p>Subscribes·the·caller·to·updates·from·the·specified·scope.</p><p>Returns·content·of·the·entire·scope·and·a·reference·to·match·the·upcoming868 <p>Subscribes·the·caller·to·updates·from·the·specified·scope.</p><p>Returns·content·of·the·entire·scope·and·a·reference·to·match·the·upcoming
869 notifications.</p><p>Whenever·any·group·membership·changes,·an·update·message·is·sent·to·the869 notifications.</p><p>Whenever·any·group·membership·changes,·an·update·message·is·sent·to·the
870 subscriber:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9648069374-1">{</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">join</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Group</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·780,·SHA:·76540d0bdf928877740fa425b1ee8902e79352ef00d5d6e4bc61ba6c8dde2d1a·...·]-1">}</span></code></pre>870 subscriber:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9457725138-1">{</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">join</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Group</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·780,·SHA:·488dbf5fdf0e074bff37a2f3852196a36791c6d39887e2d6d6e612231e9e057f·...·]-1">}</span></code></pre>
871 ··</section>871 ··</section>
872 </section>872 </section>
873 <section·class="detail"·id="start/1">873 <section·class="detail"·id="start/1">
  
874 ··<div·class="detail-header">874 ··<div·class="detail-header">
875 ····<a·href="#start/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">875 ····<a·href="#start/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
876 ······<i·class="ri-link-m"·aria-hidden="true"></i>876 ······<i·class="ri-link-m"·aria-hidden="true"></i>
5.02 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/rpc.html
    
Offset 1075, 18 lines modifiedOffset 1075, 18 lines modified
1075 all·the·nodes,·but·the·multicall·is·faster,·as·all·the·requests·are·sent·at·the1075 all·the·nodes,·but·the·multicall·is·faster,·as·all·the·requests·are·sent·at·the
1076 same·time·and·are·collected·one·by·one·as·they·come·back.</p><p>The·function·evaluates·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(Module,·Function,·Args)</code></a>·on·the1076 same·time·and·are·collected·one·by·one·as·they·come·back.</p><p>The·function·evaluates·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(Module,·Function,·Args)</code></a>·on·the
1077 specified·nodes·and·collects·the·answers.·It·returns·<code·class="inline">{ResL,·BadNodes}</code>,·where1077 specified·nodes·and·collects·the·answers.·It·returns·<code·class="inline">{ResL,·BadNodes}</code>,·where
1078 <code·class="inline">BadNodes</code>·is·a·list·of·the·nodes·that·do·not·exist,·and·<code·class="inline">ResL</code>·is·a·list·of·the1078 <code·class="inline">BadNodes</code>·is·a·list·of·the·nodes·that·do·not·exist,·and·<code·class="inline">ResL</code>·is·a·list·of·the
1079 return·values,·or·<code·class="inline">{badrpc,·Reason}</code>·for·failing·calls.·<code·class="inline">Timeout</code>·is·a·time1079 return·values,·or·<code·class="inline">{badrpc,·Reason}</code>·for·failing·calls.·<code·class="inline">Timeout</code>·is·a·time
1080 (integer)·in·milliseconds,·or·<code·class="inline">infinity</code>.</p><p>The·following·example·is·useful·when·new·object·code·is·to·be·loaded·on·all1080 (integer)·in·milliseconds,·or·<code·class="inline">infinity</code>.</p><p>The·following·example·is·useful·when·new·object·code·is·to·be·loaded·on·all
1081 nodes·in·the·network,·and·indicates·some·side·effects·that·RPCs·can·produce:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Find·object·code·for·module·Mod</span><span·class="w">1081 nodes·in·the·network,·and·indicates·some·side·effects·that·RPCs·can·produce:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Find·object·code·for·module·Mod</span><span·class="w">
1082 </span><span·class="p"·data-group-id="1087877234-1">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="1087877234-1">}</span><span·[·...·truncated·by·diffoscope;·len:·277,·SHA:·203a54352779275f8e1b5b2cda8c90866aab13b093667e1ea355b6b441f8dcf2·...·]-2">)</span><span·class="p">,</span><span·class="w">1082 </span><span·class="p"·data-group-id="3248880348-1">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="3248880348-1">}</span><span·[·...·truncated·by·diffoscope;·len:·277,·SHA:·0bcefbf6bdfabbb8db3800c79f7706abb48c04e6593a49a52b65dbba87a7ff19·...·]-2">)</span><span·class="p">,</span><span·class="w">
  
1083 </span><span·class="c1">%%·and·load·it·on·all·nodes·including·this·one</span><span·class="w">1083 </span><span·class="c1">%%·and·load·it·on·all·nodes·including·this·one</span><span·class="w">
1084 </span><span·class="p"·data-group-id="1087877234-3">{</span><span·class="n">ResL</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="1087877234-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·608,·SHA:·215fde21f7099361fd53922cd4a43a7c1766d07231ec6fb86b20cec2fe4a142d·...·]-4">)</span><span·class="p">,</span><span·class="w">1084 </span><span·class="p"·data-group-id="3248880348-3">{</span><span·class="n">ResL</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="3248880348-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·608,·SHA:·eea559024c2441ac8e65022575920e67607ae7f2fa8d8796571ddb79fc8933a1·...·]-4">)</span><span·class="p">,</span><span·class="w">
  
1085 </span><span·class="c1">%%·and·then·maybe·check·the·ResL·list.</span></code></pre><blockquote><h4·class="info">Note</h4><p>If·you·want·the·ability·to·distinguish·between·results,·you·may·want·to1085 </span><span·class="c1">%%·and·then·maybe·check·the·ResL·list.</span></code></pre><blockquote><h4·class="info">Note</h4><p>If·you·want·the·ability·to·distinguish·between·results,·you·may·want·to
1086 consider·using·the·<a·href="erpc.html#multicall/4"><code·class="inline">erpc:multicall()</code></a>·function·from·the1086 consider·using·the·<a·href="erpc.html#multicall/4"><code·class="inline">erpc:multicall()</code></a>·function·from·the
1087 <code·class="inline">erpc</code>·module·instead.</p></blockquote><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the1087 <code·class="inline">erpc</code>·module·instead.</p></blockquote><blockquote><h4·class="info">Note</h4><p>You·cannot·make·<em>any</em>·assumptions·about·the·process·that·will·perform·the
1088 <code·class="inline">apply()</code>.·It·may·be·the·calling·process·itself,·an·<code·class="inline">rpc</code>·server,·another1088 <code·class="inline">apply()</code>.·It·may·be·the·calling·process·itself,·an·<code·class="inline">rpc</code>·server,·another
1089 server,·or·a·freshly·spawned·process.</p></blockquote>1089 server,·or·a·freshly·spawned·process.</p></blockquote>
1090 ··</section>1090 ··</section>
50.1 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/seq_trace.html
    
Offset 137, 17 lines modifiedOffset 137, 17 lines modified
137 of·the·trace·output.</p><h2·id="module-trace-messages-sent-to-the-system-tracer"·class="section-heading">137 of·the·trace·output.</p><h2·id="module-trace-messages-sent-to-the-system-tracer"·class="section-heading">
138 ··<a·href="#module-trace-messages-sent-to-the-system-tracer"·class="hover-link">138 ··<a·href="#module-trace-messages-sent-to-the-system-tracer"·class="hover-link">
139 ····<i·class="ri-link-m"·aria-hidden="true"></i>139 ····<i·class="ri-link-m"·aria-hidden="true"></i>
140 ··</a>140 ··</a>
141 ··<span·class="text">Trace·Messages·Sent·to·the·System·Tracer</span>141 ··<span·class="text">Trace·Messages·Sent·to·the·System·Tracer</span>
142 </h2>142 </h2>
143 <p>The·format·of·the·messages·is·one·of·the·following,·depending·on·if·flag143 <p>The·format·of·the·messages·is·one·of·the·following,·depending·on·if·flag
144 <code·class="inline">timestamp</code>·of·the·trace·token·is·set·to·<code·class="inline">true</code>·or·<code·class="inline">false</code>:</p><pre><code·class="text">{seq_trace,·Label,·SeqTraceInfo,·TimeStamp}</code></pre><p>or</p><pre><code·class="text">{seq_trace,·Label,·SeqTraceInfo}</code></pre><p>Where:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Label</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="2762055545-1">(</span><span·class="p"·data-group-id="2762055545-1">)</span><span·class="w">144 <code·class="inline">timestamp</code>·of·the·trace·token·is·set·to·<code·class="inline">true</code>·or·<code·class="inline">false</code>:</p><pre><code·class="text">{seq_trace,·Label,·SeqTraceInfo,·TimeStamp}</code></pre><p>or</p><pre><code·class="text">{seq_trace,·Label,·SeqTraceInfo}</code></pre><p>Where:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Label</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="3020282720-1">(</span><span·class="p"·data-group-id="3020282720-1">)</span><span·class="w">
145 </span><span·class="n">TimeStamp</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2762055545-2">{</span><span·class="n">Seconds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Milliseconds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Microseconds</span><span·class="p"·data-group-id="2762055[·...·truncated·by·diffoscope;·len:·3,·SHA:·68e476b5d5aeca7b0e3b5ca867106c32e40cad05a490f6b08a24063cceed7e7e·...·]-2">}</span><span·class="w">145 </span><span·class="n">TimeStamp</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3020282720-2">{</span><span·class="n">Seconds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Milliseconds</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Microseconds</span><span·class="p"·data-group-id="3020282[·...·truncated·by·diffoscope;·len:·3,·SHA:·d829857eb1366e70be857a69886d1555af0d32681beab068afb93492c2e2b843·...·]-2">}</span><span·class="w">
146 ··</span><span·class="n">Seconds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Milliseconds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Microseconds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="2762055545-3">(</span><span·class="p"·data-group-id="2762055545-3">)</span></code></pre><p><code·class="inline">SeqTraceInfo</code>·can·have·the·following·formats:</p><ul><li><p><strong><code·class="inline">{send,·Serial,·From,·To,·Message}</code></strong>·-·Used·when·a·process·<code·class="inline">From</code>·with·its146 ··</span><span·class="n">Seconds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Milliseconds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Microseconds</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="3020282720-3">(</span><span·class="p"·data-group-id="3020282720-3">)</span></code></pre><p><code·class="inline">SeqTraceInfo</code>·can·have·the·following·formats:</p><ul><li><p><strong><code·class="inline">{send,·Serial,·From,·To,·Message}</code></strong>·-·Used·when·a·process·<code·class="inline">From</code>·with·its
147 trace·token·flag·<code·class="inline">send</code>·set·to·<code·class="inline">true</code>·has·sent·information.·<code·class="inline">To</code>·may·be·a147 trace·token·flag·<code·class="inline">send</code>·set·to·<code·class="inline">true</code>·has·sent·information.·<code·class="inline">To</code>·may·be·a
148 process·identifier,·a·registered·name·on·a·node·represented·as148 process·identifier,·a·registered·name·on·a·node·represented·as
149 <code·class="inline">{NameAtom,·NodeAtom}</code>,·or·a·node·name·represented·as·an·atom.·<code·class="inline">From</code>·may·be·a149 <code·class="inline">{NameAtom,·NodeAtom}</code>,·or·a·node·name·represented·as·an·atom.·<code·class="inline">From</code>·may·be·a
150 process·identifier·or·a·node·name·represented·as·an·atom.·<code·class="inline">Message</code>·contains150 process·identifier·or·a·node·name·represented·as·an·atom.·<code·class="inline">Message</code>·contains
151 the·information·passed·along·in·this·information·transfer.·If·the·transfer·is151 the·information·passed·along·in·this·information·transfer.·If·the·transfer·is
152 done·via·message·passing,·it·is·the·actual·message.</p></li><li><p><strong><code·class="inline">{'receive',·Serial,·From,·To,·Message}</code></strong>·-·Used·when·a·process·<code·class="inline">To</code>152 done·via·message·passing,·it·is·the·actual·message.</p></li><li><p><strong><code·class="inline">{'receive',·Serial,·From,·To,·Message}</code></strong>·-·Used·when·a·process·<code·class="inline">To</code>
153 receives·information·with·a·trace·token·that·has·flag·<code·class="inline">'receive'</code>·set·to153 receives·information·with·a·trace·token·that·has·flag·<code·class="inline">'receive'</code>·set·to
Offset 283, 76 lines modifiedOffset 283, 76 lines modified
283 from·the·sequential·tracing·point·of·view.</p><h2·id="module-example-of-use"·class="section-heading">283 from·the·sequential·tracing·point·of·view.</p><h2·id="module-example-of-use"·class="section-heading">
284 ··<a·href="#module-example-of-use"·class="hover-link">284 ··<a·href="#module-example-of-use"·class="hover-link">
285 ····<i·class="ri-link-m"·aria-hidden="true"></i>285 ····<i·class="ri-link-m"·aria-hidden="true"></i>
286 ··</a>286 ··</a>
287 ··<span·class="text">Example·of·Use</span>287 ··<span·class="text">Example·of·Use</span>
288 </h2>288 </h2>
289 <p>This·example·gives·a·rough·idea·of·how·the·new·primitives·can·be·used·and·what289 <p>This·example·gives·a·rough·idea·of·how·the·new·primitives·can·be·used·and·what
290 kind·of·output·it·produces.</p><p>Assume·that·you·have·an·initiating·process·with·<code·class="inline">Pid·==·&lt;0.30.0&gt;</code>·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6459439939-1">(</span><span·class="ss">seqex</span><span·class="p"·data-group-id="6459439939-1">)</span><span·class="p">.</span><span·class="w">290 kind·of·output·it·produces.</p><p>Assume·that·you·have·an·initiating·process·with·<code·class="inline">Pid·==·&lt;0.30.0&gt;</code>·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9298171451-1">(</span><span·class="ss">seqex</span><span·class="p"·data-group-id="9298171451-1">)</span><span·class="p">.</span><span·class="w">
291 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="6459439939-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="6459439939-2">)</span><span·class="p">.</span><span·class="w">291 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="9298171451-2">(</span><span·class="ss">export_all</span><span·class="p"·data-group-id="9298171451-2">)</span><span·class="p">.</span><span·class="w">
  
292 </span><span·class="nf">loop</span><span·class="p"·data-group-id="6459439939-3">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6459439939-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">292 </span><span·class="nf">loop</span><span·class="p"·data-group-id="9298171451-3">(</span><span·class="n">Port</span><span·class="p"·data-group-id="9298171451-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
293 ····</span><span·class="k">receive</span><span·class="w">293 ····</span><span·class="k">receive</span><span·class="w">
294 ········</span><span·class="p"·data-group-id="6459439939-4">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="6459439939-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">294 ········</span><span·class="p"·data-group-id="9298171451-4">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="9298171451-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
295 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="6459439939-5">(</span><span·class="ss">label</span><span·class="p">,</span><span·class="mi">17</span><span·class="p"·data-group-id="6459439939-5">)</span><span·class="p">,</span><span·class="w">295 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9298171451-5">(</span><span·class="ss">label</span><span·class="p">,</span><span·class="mi">17</span><span·class="p"·data-group-id="9298171451-5">)</span><span·class="p">,</span><span·class="w">
296 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="6459439939-6">(</span><span·class="ss">&#39;receive&#39;</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6459439939-6">)</span><span·class="p">,</span><span·class="w">296 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9298171451-6">(</span><span·class="ss">&#39;receive&#39;</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9298171451-6">)</span><span·class="p">,</span><span·class="w">
297 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="6459439939-7">(</span><span·class="ss">print</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6459439939-7">)</span><span·class="p">,</span><span·class="w">297 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9298171451-7">(</span><span·class="ss">print</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9298171451-7">)</span><span·class="p">,</span><span·class="w">
298 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="6459439939-8">(</span><span·class="mi">17</span><span·class="p">,</span><span·class="s">&quot;****·Trace·Started·****&quot;</span><span·class="p"·data-group-id="6459439939-8">)</span><span·class="p">,</span><span·class="w">298 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="9298171451-8">(</span><span·class="mi">17</span><span·class="p">,</span><span·class="s">&quot;****·Trace·Started·****&quot;</span><span·class="p"·data-group-id="9298171451-8">)</span><span·class="p">,</span><span·class="w">
299 ············</span><span·class="ss">call_server</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6459439939-9">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6459439939-10">(</span><span·class="p"·data-group-id="6459439939-10">)</span><span·class="p">,</span><span·class="ss">the_message</span><span·class="p"·data-group-id="64594399[·...·truncated·by·diffoscope;·len:·2,·SHA:·0b918943df0962bc7a1824c0555a389347b4febdc7cf9d1254406d80ce44e3f9·...·]-9">}</span><span·class="p">;</span><span·class="w">299 ············</span><span·class="ss">call_server</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="9298171451-9">{</span><span·class="nf">self</span><span·class="p"·data-group-id="9298171451-10">(</span><span·class="p"·data-group-id="9298171451-10">)</span><span·class="p">,</span><span·class="ss">the_message</span><span·class="p"·data-group-id="92981714[·...·truncated·by·diffoscope;·len:·2,·SHA:·031b4af5197ec30a926f48cf40e11a7dbc470048a21e4003b7a3c07c5dab1baa·...·]-9">}</span><span·class="p">;</span><span·class="w">
300 ········</span><span·class="p"·data-group-id="6459439939-11">{</span><span·class="ss">ack</span><span·class="p">,</span><span·class="n">Ack</span><span·class="p"·data-group-id="6459439939-11">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">300 ········</span><span·class="p"·data-group-id="9298171451-11">{</span><span·class="ss">ack</span><span·class="p">,</span><span·class="n">Ack</span><span·class="p"·data-group-id="9298171451-11">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
301 ············</span><span·class="ss">ok</span><span·class="w">301 ············</span><span·class="ss">ok</span><span·class="w">
302 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">302 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
303 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="6459439939-12">(</span><span·class="n">Port</span><span·class="p"·data-group-id="6459439939-12">)</span><span·class="p">.</span></code></pre><p>And·a·registered·process·<code·class="inline">call_server</code>·with·<code·class="inline">Pid·==·&lt;0.31.0&gt;[·...·truncated·by·diffoscope;·len:·192,·SHA:·06f99da9baf7ee5707b834f8589e23e6b4ba86815ca975dcc510e8ee3d8f0ecc·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">303 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="9298171451-12">(</span><span·class="n">Port</span><span·class="p"·data-group-id="9298171451-12">)</span><span·class="p">.</span></code></pre><p>And·a·registered·process·<code·class="inline">call_server</code>·with·<code·class="inline">Pid·==·&lt;0.31.0&gt;[·...·truncated·by·diffoscope;·len:·192,·SHA:·96ea3639d0b663525f1daadc87b4a9bae90aee008d3ac30f11b09e68cb7d81f0·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
304 ····</span><span·class="k">receive</span><span·class="w">304 ····</span><span·class="k">receive</span><span·class="w">
305 ········</span><span·class="p"·data-group-id="3131996756-2">{</span><span·class="n">PortController</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="3131996756-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">305 ········</span><span·class="p"·data-group-id="1097181595-2">{</span><span·class="n">PortController</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="1097181595-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
306 ············</span><span·class="n">Ack</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3131996756-3">{</span><span·class="ss">received</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="3131996756-3">}</span><span·class="p">,</span><span·class="w">306 ············</span><span·class="n">Ack</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1097181595-3">{</span><span·class="ss">received</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Message</span><span·class="p"·data-group-id="1097181595-3">}</span><span·class="p">,</span><span·class="w">
307 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="3131996756-4">(</span><span·class="mi">17</span><span·class="p">,</span><span·class="s">&quot;We·are·here·now&quot;</span><span·class="p"·data-group-id="3131996756-4">)</span><span·class="p">,</span><span·class="w">307 ············</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="1097181595-4">(</span><span·class="mi">17</span><span·class="p">,</span><span·class="s">&quot;We·are·here·now&quot;</span><span·class="p"·data-group-id="1097181595-4">)</span><span·class="p">,</span><span·class="w">
308 ············</span><span·class="n">PortController</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="3131996756-5">{</span><span·class="ss">ack</span><span·class="p">,</span><span·class="n">Ack</span><span·class="p"·data-group-id="3131996756-5">}</span><span·class="w">308 ············</span><span·class="n">PortController</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1097181595-5">{</span><span·class="ss">ack</span><span·class="p">,</span><span·class="n">Ack</span><span·class="p"·data-group-id="1097181595-5">}</span><span·class="w">
309 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">309 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
310 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="3131996756-6">(</span><span·class="p"·data-group-id="3131996756-6">)</span><span·class="p">.</span></code></pre><p>A·possible·output·from·the·system's·<code·class="inline">sequential_tracer</code>·can·be·like·this:</p><pre><code·class="makeup·erlang"·trans[·...·truncated·by·diffoscope;·len:·433,·SHA:·916878c9432d99f44d39324ac972b2b1a76dc72621d7cbd661692cb5db621496·...·]8-1">}</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">310 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="1097181595-6">(</span><span·class="p"·data-group-id="1097181595-6">)</span><span·class="p">.</span></code></pre><p>A·possible·output·from·the·system's·<code·class="inline">sequential_tracer</code>·can·be·like·this:</p><pre><code·class="makeup·erlang"·trans[·...·truncated·by·diffoscope;·len:·433,·SHA:·189b684782ff5128b7ec65221d1d831a5ecaf5f3b8deb85f8757472d1bd9e4b8·...·]8-1">}</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">
311 </span><span·class="s">&quot;****·Trace·Started·****&quot;</span><span·class="w">311 </span><span·class="s">&quot;****·Trace·Started·****&quot;</span><span·class="w">
312 </span><span·class="mi">17</span><span·class="p">:</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Received</span><span·class="w">·</span><span·class="p"·data-group-id="8789970878-2">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8789970878-2">}</span><span·class="w">·</span><span·class="n">FROM</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">312 </span><span·class="mi">17</span><span·class="p">:</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Received</span><span·class="w">·</span><span·class="p"·data-group-id="2501593668-2">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2501593668-2">}</span><span·class="w">·</span><span·class="n">FROM</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">
313 </span><span·class="p"·data-group-id="8789970878-3">{</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">the_message</span><span·class="p"·data-group-id="8789970878-3">}</span><span·class="w">313 </span><span·class="p"·data-group-id="2501593668-3">{</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">the_message</span><span·class="p"·data-group-id="2501593668-3">}</span><span·class="w">
314 </span><span·class="mi">17</span><span·class="p">:</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Info</span><span·class="w">·</span><span·class="p"·data-group-id="8789970878-4">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8789970878-4">}</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">314 </span><span·class="mi">17</span><span·class="p">:</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Info</span><span·class="w">·</span><span·class="p"·data-group-id="2501593668-4">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="2501593668-4">}</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">
315 </span><span·class="s">&quot;We·are·here·now&quot;</span><span·class="w">315 </span><span·class="s">&quot;We·are·here·now&quot;</span><span·class="w">
316 </span><span·class="mi">17</span><span·class="p">:</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Received</span><span·class="w">·</span><span·class="p"·data-group-id="8789970878-5">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="8789970878-5">}</span><span·class="w">·</span><span·class="n">FROM</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">316 </span><span·class="mi">17</span><span·class="p">:</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Received</span><span·class="w">·</span><span·class="p"·data-group-id="2501593668-5">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="2501593668-5">}</span><span·class="w">·</span><span·class="n">FROM</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">WITH</span><span·class="w">
317 </span><span·class="p"·data-group-id="8789970878-6">{</span><span·class="ss">ack</span><span·class="p">,</span><span·class="p"·data-group-id="8789970878-7">{</span><span·class="ss">received</span><span·class="p">,</span><span·class="ss">the_message</span><span·class="p"·data-group-id="87899708[·...·truncated·by·diffoscope;·len:·54,·SHA:·cabfa9c5b049e233def260072447615b8ffe1a7eae05fc86821094dd925f54a9·...·]8-6">}</span></code></pre><p>The·implementation·of·a·system·tracer·process·that·produces·this·printout·can317 </span><span·class="p"·data-group-id="2501593668-6">{</span><span·class="ss">ack</span><span·class="p">,</span><span·class="p"·data-group-id="2501593668-7">{</span><span·class="ss">received</span><span·class="p">,</span><span·class="ss">the_message</span><span·class="p"·data-group-id="25015936[·...·truncated·by·diffoscope;·len:·54,·SHA:·e9decc892de79eb07c559b6e6a6ca875d1d9bac24dd1bfa30b2ccbe415bb86dc·...·]8-6">}</span></code></pre><p>The·implementation·of·a·system·tracer·process·that·produces·this·printout·can
318 look·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">tracer</span><span·class="p"·data-group-id="2815713498-1">(</span><span·class="p"·data-group-id="2815713498-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">318 look·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">tracer</span><span·class="p"·data-group-id="1128809359-1">(</span><span·class="p"·data-group-id="1128809359-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
319 ····</span><span·class="k">receive</span><span·class="w">319 ····</span><span·class="k">receive</span><span·class="w">
320 ········</span><span·class="p"·data-group-id="2815713498-2">{</span><span·class="ss">seq_trace</span><span·class="p">,</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p"·data-group-id="2815713498-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">320 ········</span><span·class="p"·data-group-id="1128809359-2">{</span><span·class="ss">seq_trace</span><span·class="p">,</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p"·data-group-id="1128809359-2">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
321 ···········</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-3">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="2815713498-3">)</span><span·class="p">;</span><span·class="w">321 ···········</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-3">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="1128809359-3">)</span><span·class="p">;</span><span·class="w">
322 ········</span><span·class="p"·data-group-id="2815713498-4">{</span><span·class="ss">seq_trace</span><span·class="p">,</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p"·data-group-id="2815713498-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">322 ········</span><span·class="p"·data-group-id="1128809359-4">{</span><span·class="ss">seq_trace</span><span·class="p">,</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p"·data-group-id="1128809359-4">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
323 ···········</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-5">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p"·data-group-id="2815713498-5">)</span><span·class="p">;</span><span·class="w">323 ···········</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-5">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p"·data-group-id="1128809359-5">)</span><span·class="p">;</span><span·class="w">
324 ········</span><span·class="p">_</span><span·class="n">Other</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ignore</span><span·class="w">324 ········</span><span·class="p">_</span><span·class="n">Other</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ignore</span><span·class="w">
325 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">325 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
326 ····</span><span·class="nf">tracer</span><span·class="p"·data-group-id="2815713498-6">(</span><span·class="p"·data-group-id="2815713498-6">)</span><span·class="p">.</span><span·class="w">326 ····</span><span·class="nf">tracer</span><span·class="p"·data-group-id="1128809359-6">(</span><span·class="p"·data-group-id="1128809359-6">)</span><span·class="p">.</span><span·class="w">
  
327 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-7">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="2815713498-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">327 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-7">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="1128809359-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
328 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2815713498-8">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">:&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2815713498-9">[</span><span·class="n">Label</span><span·class="p"·data-group-id="2815713498-9"[·...·truncated·by·diffoscope;·len:·50,·SHA:·a29d9d8a391aaafe401dfa172115e66e0ddf11f0c8d833c84e56f511c5edd71a·...·]-8">)</span><span·class="p">,</span><span·class="w">328 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1128809359-8">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">:&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1128809359-9">[</span><span·class="n">Label</span><span·class="p"·data-group-id="1128809359-9"[·...·truncated·by·diffoscope;·len:·50,·SHA:·dad07635751149f7d1f8f56e51d19888b8ee4cfccc4ae3a4152231bf2182e8b0·...·]-8">)</span><span·class="p">,</span><span·class="w">
329 ····</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-10">(</span><span·class="n">TraceInfo</span><span·class="p"·data-group-id="2815713498-10">)</span><span·class="p">;</span><span·class="w">329 ····</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-10">(</span><span·class="n">TraceInfo</span><span·class="p"·data-group-id="1128809359-10">)</span><span·class="p">;</span><span·class="w">
330 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-11">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p"·data-group-id="2815713498-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">330 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-11">(</span><span·class="n">Label</span><span·class="p">,</span><span·class="n">TraceInfo</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p"·data-group-id="1128809359-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
331 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2815713498-12">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·</span><span·class="si">~p</span><span·class="s">:&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2815713498-13">[</span><span·class="n">Labe[·...·truncated·by·diffoscope;·len:·152,·SHA:·30208e55837739359147e1ac2f45917ae87fad65d2a75fd537f66cd6770416d6·...·]-12">)</span><span·class="p">,</span><span·class="w">331 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1128809359-12">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·</span><span·class="si">~p</span><span·class="s">:&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1128809359-13">[</span><span·class="n">Labe[·...·truncated·by·diffoscope;·len:·152,·SHA:·da05c18229694f21c5a17daeca3aa5c84f3cda5548429f8cbba6151fcfdd0723·...·]-12">)</span><span·class="p">,</span><span·class="w">
332 ····</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-14">(</span><span·class="n">TraceInfo</span><span·class="p"·data-group-id="2815713498-14">)</span><span·class="p">.</span><span·class="w">332 ····</span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-14">(</span><span·class="n">TraceInfo</span><span·class="p"·data-group-id="1128809359-14">)</span><span·class="p">.</span><span·class="w">
  
333 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-15">(</span><span·class="p"·data-group-id="2815713498-16">{</span><span·class="ss">print</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="p">_</spa[·...·truncated·by·diffoscope;·len:·148,·SHA:·f752946529ce3b76d6f13b652c7fc6de440d1f85a1d6fd2bf67ae50858d9b67a·...·]-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">333 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-15">(</span><span·class="p"·data-group-id="1128809359-16">{</span><span·class="ss">print</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="p">_</spa[·...·truncated·by·diffoscope;·len:·148,·SHA:·ae3bed480e81d7957e5ecefe4f15e4346fc047a7d8fe973a5c2d3e74bc023ac2·...·]-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
334 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2815713498-17">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·Info·</span><span·class="si">~p</span><span·class="s">·WITH</span><span·class="si">~n</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&[·...·truncated·by·diffoscope;·len:·340,·SHA:·ba4ed64ce49a890347916518779360267597c4bd8209162c1990fa3cbde1a591·...·]-17">)</span><span·class="p">;</span><span·class="w">334 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1128809359-17">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·Info·</span><span·class="si">~p</span><span·class="s">·WITH</span><span·class="si">~n</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&[·...·truncated·by·diffoscope;·len:·340,·SHA:·563e157fbfd635e0d8f74fba130434b9280eb33771caf7a0b69a3fb6215176b9·...·]-17">)</span><span·class="p">;</span><span·class="w">
335 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-19">(</span><span·class="p"·data-group-id="2815713498-20">{</span><span·class="ss">&#39;receive&#39;</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·164,·SHA:·65e6e85e029ac88618252711f25f3294b04b987cb0867cf270d7d97281de520e·...·]-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">335 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-19">(</span><span·class="p"·data-group-id="1128809359-20">{</span><span·class="ss">&#39;receive&#39;</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·164,·SHA:·70cf012a8ddab574a5250efade825023465303a92c56db40a9154fd55c980fb9·...·]-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
336 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2815713498-21">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·Received·</span><span·class="si">~p</span><span·class="s">·FROM·</span><span·class="si">~p</span><span·class="s">·WITH</span><span·class="si">~n</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">336 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1128809359-21">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·Received·</span><span·class="si">~p</span><span·class="s">·FROM·</span><span·class="si">~p</span><span·class="s">·WITH</span><span·class="si">~n</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
337 ··············</span><span·class="p"·data-group-id="2815713498-22">[</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="2815713498-22">]</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·b706ecede0a9e401209d4f3018620be3471f31097be23e194e829230afd053e4·...·]-21">)</span><span·class="p">;</span><span·class="w">337 ··············</span><span·class="p"·data-group-id="1128809359-22">[</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="1128809359-22">]</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·d41d8210ec595c7f6d032da38c6bc6bc1381b90f24eede6b39a7eed794b7184d·...·]-21">)</span><span·class="p">;</span><span·class="w">
338 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="2815713498-23">(</span><span·class="p"·data-group-id="2815713498-24">{</span><span·class="nb">send</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">To</spa[·...·truncated·by·diffoscope;·len:·151,·SHA:·01d300541bb54fc45f562f9fd5eb44cdd0a03d4e755a8e691551eece013b9bc4·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">338 </span><span·class="nf">print_trace</span><span·class="p"·data-group-id="1128809359-23">(</span><span·class="p"·data-group-id="1128809359-24">{</span><span·class="nb">send</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">From</span><span·class="p">,</span><span·class="n">To</spa[·...·truncated·by·diffoscope;·len:·151,·SHA:·89cbe0baa697b0ae329e3fdff43ce56f7d74af9dca4e4b7ceb8870cc344cddeb·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
339 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2815713498-25">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·Sent·</span><span·class="si">~p</span><span·class="s">·TO·</span><span·class="si">~p</span><span·class="s">·WITH</span><span·class="si">~n</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">339 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1128809359-25">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">·Sent·</span><span·class="si">~p</span><span·class="s">·TO·</span><span·class="si">~p</span><span·class="s">·WITH</span><span·class="si">~n</span><span·class="si">~p</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
340 ··············</span><span·class="p"·data-group-id="2815713498-26">[</span><span·class="n">From</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="2815713498-26">]</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·b706ecede0a9e401209d4f3018620be3471f31097be23e194e829230afd053e4·...·]-25">)</span><span·class="p">.</span></code></pre><p>The·code·that·creates·a·process·that·runs·this·tracer·function·and·sets·that340 ··············</span><span·class="p"·data-group-id="1128809359-26">[</span><span·class="n">From</span><span·class="p">,</span><span·class="n">Serial</span><span·class="p">,</span><span·class="n">To</span><span·class="p">,</span><span·class="n">Message</span><span·class="p"·data-group-id="1128809359-26">]</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·d41d8210ec595c7f6d032da38c6bc6bc1381b90f24eede6b39a7eed794b7184d·...·]-25">)</span><span·class="p">.</span></code></pre><p>The·code·that·creates·a·process·that·runs·this·tracer·function·and·sets·that
341 process·as·the·system·tracer·can·look·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start</span><span·class="p"·data-group-id="2387230657-1">(</span><span·class="p"·data-group-id="2387230657-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">341 process·as·the·system·tracer·can·look·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">start</span><span·class="p"·data-group-id="7909283765-1">(</span><span·class="p"·data-group-id="7909283765-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
342 ····</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="2387230657-2">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="ss">tracer</span><span·class="p">,</span><span·class="p"·data-group-id="2387230657-3">[</span><span·class="p"·data-group-id="2387230657-3">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·f289dc6cb44ba2c430fcb4b48ee0179f798643c43d44523810066ab794a972c0·...·]-2">)</span><span·class="p">,</span><span·class="w">342 ····</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="7909283765-2">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="ss">tracer</span><span·class="p">,</span><span·class="p"·data-group-id="7909283765-3">[</span><span·class="p"·data-group-id="7909283765-3">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·411ebcac7117f50f110aca257591d76bec2911393916a30dc7e0c7c3a5c0d720·...·]-2">)</span><span·class="p">,</span><span·class="w">
343 ····</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_system_tracer</span><span·class="p"·data-group-id="2387230657-4">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="2387230657-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·set·Pid·as·the·system·tracer</span><span·class="w">343 ····</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_system_tracer</span><span·class="p"·data-group-id="7909283765-4">(</span><span·class="n">Pid</span><span·class="p"·data-group-id="7909283765-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·set·Pid·as·the·system·tracer</span><span·class="w">
344 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>With·a·function·like·<code·class="inline">test/0</code>,·the·whole·example·can·be·started:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">test</span><span·class="p"·data-group-id="1290703336-1">(</span><span·class="p"·data-group-id="1290703336-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">344 ····</span><span·class="ss">ok</span><span·class="p">.</span></code></pre><p>With·a·function·like·<code·class="inline">test/0</code>,·the·whole·example·can·be·started:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">test</span><span·class="p"·data-group-id="6896615331-1">(</span><span·class="p"·data-group-id="6896615331-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
345 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="1290703336-2">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1290703336-3">[</span><spa[·...·truncated·by·diffoscope;·len:·118,·SHA:·ea292dc1e59fb4ddb07e298e72779dd812b79e160fd1fe7ad7491d4fa3bed212·...·]-2">)</span><span·class="p">,</span><span·class="w">345 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6896615331-2">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6896615331-3">[</span><spa[·...·truncated·by·diffoscope;·len:·118,·SHA:·3027076d461bcb036ce5ffdf3ead6d2af2df1e2c11c4f9374cf56c1ec233fc4b·...·]-2">)</span><span·class="p">,</span><span·class="w">
346 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="1290703336-4">(</span><span·class="ss">call_server</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="1290703336-5">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">[·...·truncated·by·diffoscope;·len:·308,·SHA:·b2e4bea8d151f65f2c0942417eb62d5c4f5245b63892afb93ce9b8c300a340a7·...·]-4">)</span><span·class="p">,</span><span·class="w">346 ····</span><span·class="nf">register</span><span·class="p"·data-group-id="6896615331-4">(</span><span·class="ss">call_server</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6896615331-5">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">[·...·truncated·by·diffoscope;·len:·308,·SHA:·3d5c39a1a1d03b29a0e19e465efc1b1e80486868a1d322b0109e8ae98e6b1495·...·]-4">)</span><span·class="p">,</span><span·class="w">
347 ····</span><span·class="nf">start</span><span·class="p"·data-group-id="1290703336-7">(</span><span·class="p"·data-group-id="1290703336-7">)</span><span·class="p">,</span><span·class="w">347 ····</span><span·class="nf">start</span><span·class="p"·data-group-id="6896615331-7">(</span><span·class="p"·data-group-id="6896615331-7">)</span><span·class="p">,</span><span·class="w">
348 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="1290703336-8">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="ss">message</span><span·class="p"·data-group-id="1290703336-8">}</span><span·class="p">.</span></code></pre>348 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6896615331-8">{</span><span·class="ss">port</span><span·class="p">,</span><span·class="ss">message</span><span·class="p"·data-group-id="6896615331-8">}</span><span·class="p">.</span></code></pre>
349 ····</section>349 ····</section>
  
350 </div>350 </div>
  
351 ··<section·id="summary"·class="details-list">351 ··<section·id="summary"·class="details-list">
352 ····<h1·class="section-heading">352 ····<h1·class="section-heading">
353 ······<a·class="hover-link"·href="#summary">353 ······<a·class="hover-link"·href="#summary">
Offset 933, 19 lines modifiedOffset 933, 19 lines modified
  
933 ······</div>933 ······</div>
  
934 <p>Sets·the·trace·token·for·the·calling·process·to·<code·class="inline">Token</code>.·If·<code·class="inline">Token·==·[]</code>·then934 <p>Sets·the·trace·token·for·the·calling·process·to·<code·class="inline">Token</code>.·If·<code·class="inline">Token·==·[]</code>·then
935 tracing·is·disabled,·otherwise·<code·class="inline">Token</code>·should·be·an·Erlang·term·returned·from935 tracing·is·disabled,·otherwise·<code·class="inline">Token</code>·should·be·an·Erlang·term·returned·from
936 <a·href="#get_token/0"><code·class="inline">get_token/0</code></a>·or·<a·href="#set_token/1"><code·class="inline">set_token/1</code></a>.·<a·href="#set_token/1"><code·class="inline">set_token/1</code></a>936 <a·href="#get_token/0"><code·class="inline">get_token/0</code></a>·or·<a·href="#set_token/1"><code·class="inline">set_token/1</code></a>.·<a·href="#set_token/1"><code·class="inline">set_token/1</code></a>
937 can·be·used·to·temporarily·exclude·message·passing·from·the·trace·by·setting·the937 can·be·used·to·temporarily·exclude·message·passing·from·the·trace·by·setting·the
938 trace·token·to·empty·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OldToken</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9216524057-1">(</span><span·class="p"·data-group-id="9216524057-2">[</span><span·class="p"·data-group-id="9216524057-2">]</span><span·class="p"·data-group-id="9216524057-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·set·to·empty·and·save</span><span·class="w">938 trace·token·to·empty·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">OldToken</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9454181819-1">(</span><span·class="p"·data-group-id="9454181819-2">[</span><span·class="p"·data-group-id="9454181819-2">]</span><span·class="p"·data-group-id="9454181819-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·set·to·empty·and·save</span><span·class="w">
939 ····································</span><span·class="c1">%·old·value</span><span·class="w">939 ····································</span><span·class="c1">%·old·value</span><span·class="w">
940 </span><span·class="c1">%·do·something·that·should·not·be·part·of·the·trace</span><span·class="w">940 </span><span·class="c1">%·do·something·that·should·not·be·part·of·the·trace</span><span·class="w">
941 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9216524057-3">(</span><span·class="s">&quot;Exclude·the·signalling·caused·by·this</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p"·data-group-id="9216524057-3">)</span><span·class="p">,</span><span·class="w">941 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9454181819-3">(</span><span·class="s">&quot;Exclude·the·signalling·caused·by·this</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p"·data-group-id="9454181819-3">)</span><span·class="p">,</span><span·class="w">
942 </span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9216524057-4">(</span><span·class="n">OldToken</span><span·class="p"·data-group-id="9216524057-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·activate·the·trace·token·again</span><span·class="w">942 </span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9454181819-4">(</span><span·class="n">OldToken</span><span·class="p"·data-group-id="9454181819-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·activate·the·trace·token·again</span><span·class="w">
943 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Returns·the·previous·value·of·the·trace·token.</p>943 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>Returns·the·previous·value·of·the·trace·token.</p>
944 ··</section>944 ··</section>
945 </section>945 </section>
946 <section·class="detail"·id="set_token/2">946 <section·class="detail"·id="set_token/2">
  
947 ··<div·class="detail-header">947 ··<div·class="detail-header">
948 ····<a·href="#set_token/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">948 ····<a·href="#set_token/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
32.5 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/socket.html
    
Offset 168, 16 lines modifiedOffset 168, 16 lines modified
168 and·using·that·as·the·<code·class="inline">Timeout | Handle</code>·argument,·the·same·<code·class="inline">Handle</code>168 and·using·that·as·the·<code·class="inline">Timeout | Handle</code>·argument,·the·same·<code·class="inline">Handle</code>
169 will·then·be·the·<a·href="#t:select_handle/0"><code·class="inline">SelectHandle</code></a>·in·the·returned169 will·then·be·the·<a·href="#t:select_handle/0"><code·class="inline">SelectHandle</code></a>·in·the·returned
170 <a·href="#t:select_info/0"><code·class="inline">select_info/0</code></a>·and·the·received·<code·class="inline">select</code>·message,·or·be170 <a·href="#t:select_info/0"><code·class="inline">select_info/0</code></a>·and·the·received·<code·class="inline">select</code>·message,·or·be
171 the·<a·href="#t:completion_handle/0"><code·class="inline">CompletionHandle</code></a>·in·the·returned171 the·<a·href="#t:completion_handle/0"><code·class="inline">CompletionHandle</code></a>·in·the·returned
172 <a·href="#t:completion_info/0"><code·class="inline">completion_info/0</code></a>·and·the·received·<code·class="inline">completion</code>·message.</p><p>The·compiler·may·then·optimize·a·following·<code·class="inline">receive</code>·statement172 <a·href="#t:completion_info/0"><code·class="inline">completion_info/0</code></a>·and·the·received·<code·class="inline">completion</code>·message.</p><p>The·compiler·may·then·optimize·a·following·<code·class="inline">receive</code>·statement
173 to·only·scan·the·messages·that·arrive·after·the·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0"><code·class="inline">reference/0</code></a>173 to·only·scan·the·messages·that·arrive·after·the·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0"><code·class="inline">reference/0</code></a>
174 is·created.··If·the·message·queue·is·large·this·is·a·big·optimization.</p><p>The·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0"><code·class="inline">reference/0</code></a>·has·to·be·unique·for·the·call.</p><h4>Repeating·an·Operation·on·a·<code·class="inline">select</code>·Systems</h4><p>On<code·class="inline">select</code>·systems,·if·a·call·would·be·repeated·<em>before</em>·the·<code·class="inline">select</code>174 is·created.··If·the·message·queue·is·large·this·is·a·big·optimization.</p><p>The·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0"><code·class="inline">reference/0</code></a>·has·to·be·unique·for·the·call.</p><h4>Repeating·an·Operation·on·a·<code·class="inline">select</code>·Systems</h4><p>On<code·class="inline">select</code>·systems,·if·a·call·would·be·repeated·<em>before</em>·the·<code·class="inline">select</code>
175 message·has·been·received·it·replaces·the·call·in·progress:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p"·data-group-id="3397992344-1">{</span><span·class="ss">select</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3397992344-2">{</span><span·class="ss">select_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Hand[·...·truncated·by·diffoscope;·len:·470,·SHA:·fb69a4388b0fbeea4d308bdcd7c82666880ed8d8fbf11be6cbbf71db66b6117b·...·]4-3">)</span><span·class="p">,</span><span·class="w">175 message·has·been·received·it·replaces·the·call·in·progress:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p"·data-group-id="2158941824-1">{</span><span·class="ss">select</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2158941824-2">{</span><span·class="ss">select_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Hand[·...·truncated·by·diffoscope;·len:·470,·SHA:·2f781232c39e8f60d99c7e359ef32759a40f254fac8adfb34f70cddc6c4794a6·...·]4-3">)</span><span·class="p">,</span><span·class="w">
176 ····</span><span·class="p"·data-group-id="3397992344-4">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="p"·data-group-id="3397992344-4">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·279,·SHA:·9f7af88b3f87b9c7406abec3ace48ead63864752f57a0aa3f362be933ba42b8f·...·]4-5">)</span><span·class="p">,</span><span·class="w">176 ····</span><span·class="p"·data-group-id="2158941824-4">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="p"·data-group-id="2158941824-4">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·279,·SHA:·22530515865a4b419f521af6af190647fd3642b59d28f8050c044c337a56197c·...·]4-5">)</span><span·class="p">,</span><span·class="w">
177 ····</span><span·class="p">:</span></code></pre><p>Above,·<code·class="inline">Handle</code>·is·<em>no·longer</em>·valid·once·the·second·<a·href="#accept/2"><code·class="inline">accept/2</code></a>,·call177 ····</span><span·class="p">:</span></code></pre><p>Above,·<code·class="inline">Handle</code>·is·<em>no·longer</em>·valid·once·the·second·<a·href="#accept/2"><code·class="inline">accept/2</code></a>,·call
178 has·been·made·(the·first·call·is·automatically·canceled).178 has·been·made·(the·first·call·is·automatically·canceled).
179 After·the·second·<a·href="#accept/2"><code·class="inline">accept/2</code></a>·call·returns·<code·class="inline">{error,·timeout}</code>,179 After·the·second·<a·href="#accept/2"><code·class="inline">accept/2</code></a>·call·returns·<code·class="inline">{error,·timeout}</code>,
180 the·accept·operation·has·completed.</p><p>Note·that·there·is·a·race·here;·there·is·no·way·to·know·if·the·call180 the·accept·operation·has·completed.</p><p>Note·that·there·is·a·race·here;·there·is·no·way·to·know·if·the·call
181 is·repeated·<em>before</em>·the·<code·class="inline">select</code>·message·is·sent·since·it·<em>may</em>181 is·repeated·<em>before</em>·the·<code·class="inline">select</code>·message·is·sent·since·it·<em>may</em>
182 have·been·sent·just·before·the·repeated·call.··So·now·there182 have·been·sent·just·before·the·repeated·call.··So·now·there
183 might·be·a·<code·class="inline">select</code>·message·containing·<code·class="inline">Handle</code>·in·the·inbox.</p><h4>The·<code·class="inline">abort</code>·Message</h4><p>Another·message·the·user·must·be·prepared·for183 might·be·a·<code·class="inline">select</code>·message·containing·<code·class="inline">Handle</code>·in·the·inbox.</p><h4>The·<code·class="inline">abort</code>·Message</h4><p>Another·message·the·user·must·be·prepared·for
Offset 202, 36 lines modifiedOffset 202, 36 lines modified
202 (<a·href="#t:completion_handle/0">completion·handle</a>)202 (<a·href="#t:completion_handle/0">completion·handle</a>)
203 API·features·could·be·considered·no·longer·experimental.</li></ul><h2·id="module-examples"·class="section-heading">203 API·features·could·be·considered·no·longer·experimental.</li></ul><h2·id="module-examples"·class="section-heading">
204 ··<a·href="#module-examples"·class="hover-link">204 ··<a·href="#module-examples"·class="hover-link">
205 ····<i·class="ri-link-m"·aria-hidden="true"></i>205 ····<i·class="ri-link-m"·aria-hidden="true"></i>
206 ··</a>206 ··</a>
207 ··<span·class="text">Examples</span>207 ··<span·class="text">Examples</span>
208 </h2>208 </h2>
209 <pre><code·class="makeup·erlang"·translate="no"><span·class="nf">client</span><span·class="p"·data-group-id="3170953170-1">(</span><span·class="n">SAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SPort</span><span·class="p"·data-group-id="3170953170-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">209 <pre><code·class="makeup·erlang"·translate="no"><span·class="nf">client</span><span·class="p"·data-group-id="8036541865-1">(</span><span·class="n">SAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SPort</span><span·class="p"·data-group-id="8036541865-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
210 ···</span><span·class="p"·data-group-id="3170953170-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="3170953170-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·349,·SHA:·c6e9f7af590ba7ae9c427160b584b0ae1749f353c270192e7f15984a8bb31901·...·]-3">)</span><span·class="p">,</span><span·class="w">210 ···</span><span·class="p"·data-group-id="8036541865-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="8036541865-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·349,·SHA:·81c28dc969d26c4c846a6e0d66828dc2bc3df4b1de022455778fe7ad79f21a75·...·]-3">)</span><span·class="p">,</span><span·class="w">
211 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="3170953170-4">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3170953170-5">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">211 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="8036541865-4">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8036541865-5">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">
212 ·······························</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">SAddr</span><span·class="p">,</span><span·class="w">212 ·······························</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">SAddr</span><span·class="p">,</span><span·class="w">
213 ·······························</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">SPort</span><span·class="p"·data-group-id="3170953170-5">}</span><span·class="p"·data-group-id="3170953170-4">)</span><span·class="p">,</span><span·class="w">213 ·······························</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">SPort</span><span·class="p"·data-group-id="8036541865-5">}</span><span·class="p"·data-group-id="8036541865-4">)</span><span·class="p">,</span><span·class="w">
214 ···</span><span·class="n">Msg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;hello&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">214 ···</span><span·class="n">Msg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;hello&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
215 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="3170953170-6">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="3170953170-6">)</span><span·class="p">,</span><span·class="w">215 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="8036541865-6">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="8036541865-6">)</span><span·class="p">,</span><span·class="w">
216 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="3170953170-7">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">write</span><span·class="p"·data-group-id="3170953170-7">)</span><span·class="p">,</span><span·class="w">216 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="8036541865-7">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">write</span><span·class="p"·data-group-id="8036541865-7">)</span><span·class="p">,</span><span·class="w">
217 ···</span><span·class="p"·data-group-id="3170953170-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="3170953170-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·194,·SHA:·e5362222a0ec4e33271ac1291118fb5280ae710e259c1fde59cd55d77d882c71·...·]-9">)</span><span·class="p">,</span><span·class="w">217 ···</span><span·class="p"·data-group-id="8036541865-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="8036541865-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·194,·SHA:·e9c967125747079104b8dcebf85115c0536f6263308a4f033f004a69b06f9128·...·]-9">)</span><span·class="p">,</span><span·class="w">
218 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="3170953170-10">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="3170953170-10">)</span><span·class="p">.</span><span·class="w">218 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8036541865-10">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="8036541865-10">)</span><span·class="p">.</span><span·class="w">
  
219 </span><span·class="nf">server</span><span·class="p"·data-group-id="3170953170-11">(</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="3170953170-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 </span><span·class="nf">server</span><span·class="p"·data-group-id="8036541865-11">(</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="8036541865-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 ···</span><span·class="p"·data-group-id="3170953170-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LSock</span><span·class="p"·data-group-id="3170953170-12">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·353,·SHA:·83b4627e35b8ae034abcae59e48d0fb3debacc172953c882da5eb3f4c42fa5ae·...·]-13">)</span><span·class="p">,</span><span·class="w">220 ···</span><span·class="p"·data-group-id="8036541865-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LSock</span><span·class="p"·data-group-id="8036541865-12">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·353,·SHA:·ccd5236704a91e13894a63d5fe14a85a968b3505f36ee3174f7dc825c8edd4d4·...·]-13">)</span><span·class="p">,</span><span·class="w">
221 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">bind</span><span·class="p"·data-group-id="3170953170-14">(</span><span·class="n">LSock</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3170953170-15">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">221 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">bind</span><span·class="p"·data-group-id="8036541865-14">(</span><span·class="n">LSock</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8036541865-15">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">
222 ·····························</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">222 ·····························</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">
223 ·····························</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p"·data-group-id="3170953170-15">}</span><span·class="p"·data-group-id="3170953170-14">)</span><span·class="p">,</span><span·class="w">223 ·····························</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p"·data-group-id="8036541865-15">}</span><span·class="p"·data-group-id="8036541865-14">)</span><span·class="p">,</span><span·class="w">
224 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="3170953170-16">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="3170953170-16">)</span><span·class="p">,</span><span·class="w">224 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="8036541865-16">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="8036541865-16">)</span><span·class="p">,</span><span·class="w">
225 ···</span><span·class="p"·data-group-id="3170953170-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="3170953170-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·201,·SHA:·3b0c49068f98672ea3858abb2b4a9a8b63885b1c1db7aaa1c7b17bada4418694·...·]-18">)</span><span·class="p">,</span><span·class="w">225 ···</span><span·class="p"·data-group-id="8036541865-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="8036541865-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·201,·SHA:·a338eb32f580bc5c4d4340466aba54238c440e4a28b3d7078dbedc001d6f61aa·...·]-18">)</span><span·class="p">,</span><span·class="w">
226 ···</span><span·class="p"·data-group-id="3170953170-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="3170953170-19">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·197,·SHA:·fda5fb1bf650a93158e639a65852a2cb9247897d01b2187dacfdda72d48495f3·...·]-20">)</span><span·class="p">,</span><span·class="w">226 ···</span><span·class="p"·data-group-id="8036541865-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="8036541865-19">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·197,·SHA:·90a3a093461a89e7437108279bcdbf66ffd12cb0bbc86279278de585fc32b449·...·]-20">)</span><span·class="p">,</span><span·class="w">
227 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="3170953170-21">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="3170953170-21">)</span><span·class="p">,</span><span·class="w">227 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="8036541865-21">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="8036541865-21">)</span><span·class="p">,</span><span·class="w">
228 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="3170953170-22">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="3170953170-22">)</span><span·class="p">,</span><span·class="w">228 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8036541865-22">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="8036541865-22">)</span><span·class="p">,</span><span·class="w">
229 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="3170953170-23">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="3170953170-23">)</span><span·class="p">.</span></code></pre>229 ···</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8036541865-23">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="8036541865-23">)</span><span·class="p">.</span></code></pre>
230 ····</section>230 ····</section>
  
231 </div>231 </div>
  
232 ··<section·id="summary"·class="details-list">232 ··<section·id="summary"·class="details-list">
233 ····<h1·class="section-heading">233 ····<h1·class="section-heading">
234 ······<a·class="hover-link"·href="#summary">234 ······<a·class="hover-link"·href="#summary">
Offset 4790, 15 lines modifiedOffset 4790, 15 lines modified
4790 the·<code·class="inline">GetRequest</code>·argument.</p><ul><li><p><strong><code·class="inline">gifconf</code></strong>·-·Get·a·list·of·interface·(transport·layer)·addresses.</p><p>Result;·a·list·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a>s,·one·for·each·interface,4790 the·<code·class="inline">GetRequest</code>·argument.</p><ul><li><p><strong><code·class="inline">gifconf</code></strong>·-·Get·a·list·of·interface·(transport·layer)·addresses.</p><p>Result;·a·list·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a>s,·one·for·each·interface,
4791 with·its·name·and·address.</p></li><li><p><strong><code·class="inline">nread</code></strong>·-·Get·the·number·of·bytes·immediately·available·for·reading4791 with·its·name·and·address.</p></li><li><p><strong><code·class="inline">nread</code></strong>·-·Get·the·number·of·bytes·immediately·available·for·reading
4792 <em>(since·OTP·26.1)</em>.</p><p>Result;·the·number·of·bytes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p></li><li><p><strong><code·class="inline">nwrite</code></strong>·-·Get·the·number·of·bytes·in·the·send·queue4792 <em>(since·OTP·26.1)</em>.</p><p>Result;·the·number·of·bytes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p></li><li><p><strong><code·class="inline">nwrite</code></strong>·-·Get·the·number·of·bytes·in·the·send·queue
4793 <em>(since·OTP·26.1)</em>.</p><p>Result;·the·number·of·bytes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p></li><li><p><strong><code·class="inline">nspace</code></strong>·-·Get·the·free·space·in·the·send·queue4793 <em>(since·OTP·26.1)</em>.</p><p>Result;·the·number·of·bytes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p></li><li><p><strong><code·class="inline">nspace</code></strong>·-·Get·the·free·space·in·the·send·queue
4794 <em>(since·OTP·26.1)</em>.</p><p>Result;·the·number·of·bytes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p></li><li><p><strong><code·class="inline">atmark</code></strong>·-·Test·if·there·is·OOB·(out-of-bound)·data·waiting·to·be·read4794 <em>(since·OTP·26.1)</em>.</p><p>Result;·the·number·of·bytes,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p></li><li><p><strong><code·class="inline">atmark</code></strong>·-·Test·if·there·is·OOB·(out-of-bound)·data·waiting·to·be·read
4795 <em>(since·OTP·26.1)</em>.</p><p>Result;·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0"><code·class="inline">boolean/0</code></a>.</p></li><li><p><strong><code·class="inline">tcp_info</code></strong>·-·Get·miscellaneous·TCP·related·information·for·a4795 <em>(since·OTP·26.1)</em>.</p><p>Result;·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0"><code·class="inline">boolean/0</code></a>.</p></li><li><p><strong><code·class="inline">tcp_info</code></strong>·-·Get·miscellaneous·TCP·related·information·for·a
4796 <em>connected</em>·socket·<em>(since·OTP·26.1)</em>.</p><p>Result;·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a>·with·information·items·as·key-value·pairs.</p></li></ul><blockquote><h4·class="info">Note</h4><p>To·see·if·a·ioctl·request·is·supported·on·the·current·platform:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="n">Request</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">nread</span><span·class="p">,</span><span·class="w">4796 <em>connected</em>·socket·<em>(since·OTP·26.1)</em>.</p><p>Result;·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0"><code·class="inline">map/0</code></a>·with·information·items·as·key-value·pairs.</p></li></ul><blockquote><h4·class="info">Note</h4><p>To·see·if·a·ioctl·request·is·supported·on·the·current·platform:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="n">Request</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">nread</span><span·class="p">,</span><span·class="w">
4797 ······</span><span·class="p"·data-group-id="6282755131-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="6282755131-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·293,·SHA:·9fe36598fbda3b66ea2974402e2720dea491e2df28020c7786d5f503c4ffa5d7·...·]-2">)</span><span·class="p">,</span><span·class="w">4797 ······</span><span·class="p"·data-group-id="8038204898-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8038204898-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·293,·SHA:·379f0ae40ef0996e9b45e88ccb2ca21bbaaa1364a089d3ea20d551fc40d4dc83·...·]-2">)</span><span·class="p">,</span><span·class="w">
4798 ······</span><span·class="p">:</span></code></pre></blockquote>4798 ······</span><span·class="p">:</span></code></pre></blockquote>
4799 ··</section>4799 ··</section>
4800 </section>4800 </section>
4801 <section·class="detail"·id="ioctl/3">4801 <section·class="detail"·id="ioctl/3">
  
4802 ··<div·class="detail-header">4802 ··<div·class="detail-header">
4803 ····<a·href="#ioctl/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">4803 ····<a·href="#ioctl/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 4952, 15 lines modifiedOffset 4952, 15 lines modified
  
4952 ··········<pre·translate="no"><span·class="attribute">-spec</span>·is_supported(Key1·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>().</pre>4952 ··········<pre·translate="no"><span·class="attribute">-spec</span>·is_supported(Key1·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>().</pre>
  
4953 ······</div>4953 ······</div>
  
4954 <p>Check·if·a·socket·feature·is·supported.</p><p>Returns·<code·class="inline">true</code>·if·<a·href="#supports/0"><code·class="inline">supports/0</code></a>·has·a·<code·class="inline">{Key1,·true}</code>·tuple4954 <p>Check·if·a·socket·feature·is·supported.</p><p>Returns·<code·class="inline">true</code>·if·<a·href="#supports/0"><code·class="inline">supports/0</code></a>·has·a·<code·class="inline">{Key1,·true}</code>·tuple
4955 or·a·<code·class="inline">{Key1,·list()}</code>·tuple·in·its·returned·list,4955 or·a·<code·class="inline">{Key1,·list()}</code>·tuple·in·its·returned·list,
4956 otherwise·<code·class="inline">false</code>·(also·for·unknown·keys).</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">true</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">is_supported</span><span·class="p"·data-group-id="9801573804-1">(</span><span·class="ss">local</span><span·class="p"·data-group-id="9801573804-1">)</span><span·class="p">,</span></code></pre>4956 otherwise·<code·class="inline">false</code>·(also·for·unknown·keys).</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">true</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">is_supported</span><span·class="p"·data-group-id="5287643015-1">(</span><span·class="ss">local</span><span·class="p"·data-group-id="5287643015-1">)</span><span·class="p">,</span></code></pre>
4957 ··</section>4957 ··</section>
4958 </section>4958 </section>
4959 <section·class="detail"·id="is_supported/2">4959 <section·class="detail"·id="is_supported/2">
  
4960 ··<div·class="detail-header">4960 ··<div·class="detail-header">
4961 ····<a·href="#is_supported/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">4961 ····<a·href="#is_supported/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
4962 ······<i·class="ri-link-m"·aria-hidden="true"></i>4962 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 4983, 15 lines modifiedOffset 4983, 15 lines modified
4983 ······<div·class="specs">4983 ······<div·class="specs">
  
4984 ··········<pre·translate="no"><span·class="attribute">-spec</span>·is_supported(Key1·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Key2·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>().</pre>4984 ··········<pre·translate="no"><span·class="attribute">-spec</span>·is_supported(Key1·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Key2·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>().</pre>
  
4985 ······</div>4985 ······</div>
  
4986 <p>Check·if·a·socket·feature·is·supported.</p><p>Returns·<code·class="inline">true</code>·if·<a·href="#supports/1"><code·class="inline">supports(Key1)</code></a>·has·a·<code·class="inline">{Key2,·true}</code>·tuple4986 <p>Check·if·a·socket·feature·is·supported.</p><p>Returns·<code·class="inline">true</code>·if·<a·href="#supports/1"><code·class="inline">supports(Key1)</code></a>·has·a·<code·class="inline">{Key2,·true}</code>·tuple
4987 in·its·returned·list,·otherwise·<code·class="inline">false</code>·(also·for·unknown·keys).</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">true</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">is_supported</span><span·class="p"·data-group-id="5659254377-1">(</span><span·class="ss">msg_flags</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">errqueue</span><span·class="p"·data-group-id="5659254377-1">)</span><span·class="p">,</span></code></pre>4987 in·its·returned·list,·otherwise·<code·class="inline">false</code>·(also·for·unknown·keys).</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">true</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">is_supported</span><span·class="p"·data-group-id="0727932656-1">(</span><span·class="ss">msg_flags</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">errqueue</span><span·class="p"·data-group-id="0727932656-1">)</span><span·class="p">,</span></code></pre>
4988 ··</section>4988 ··</section>
4989 </section>4989 </section>
4990 <section·class="detail"·id="listen/1">4990 <section·class="detail"·id="listen/1">
  
4991 ··<div·class="detail-header">4991 ··<div·class="detail-header">
4992 ····<a·href="#listen/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">4992 ····<a·href="#listen/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
4993 ······<i·class="ri-link-m"·aria-hidden="true"></i>4993 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 5081, 15 lines modifiedOffset 5081, 15 lines modified
  
5081 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor(Socket·::·<a·href="#t:socket/0">socket</a>())·->·MonitorRef·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0">reference</a>().</pre>5081 ··········<pre·translate="no"><span·class="attribute">-spec</span>·monitor(Socket·::·<a·href="#t:socket/0">socket</a>())·->·MonitorRef·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:reference/0">reference</a>().</pre>
  
5082 ······</div>5082 ······</div>
  
5083 <p>Start·a·socket·monitor.</p><p>If·the·<code·class="inline">Socket</code>·doesn't·exist·or·when·later·the·monitor·is·triggered,5083 <p>Start·a·socket·monitor.</p><p>If·the·<code·class="inline">Socket</code>·doesn't·exist·or·when·later·the·monitor·is·triggered,
5084 a·<code·class="inline">'DOWN'</code>·message·is·sent·to·the·process·that·called·<a·href="#monitor/1"><code·class="inline">monitor/1</code></a>5084 a·<code·class="inline">'DOWN'</code>·message·is·sent·to·the·process·that·called·<a·href="#monitor/1"><code·class="inline">monitor/1</code></a>
5085 with·the·following·pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»       ····</span><span·class="p"·data-group-id="3083017063-1">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MonitorRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">socket</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·156,·SHA:·dd0e23eba3eee4faa9cbf0d023232104deadcd5c47e91485fd2fc3b2342b2c35·...·]-1">}</span></code></pre><p><code·class="inline">Info</code>·is·the·termination·reason·of·the·socket·or·<code·class="inline">nosock</code>·if5085 with·the·following·pattern:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»       ····</span><span·class="p"·data-group-id="9129151387-1">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MonitorRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">socket</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·156,·SHA:·dccc6128a80df2265099dd5aabd7ba1d4c87820449d2271e3d77bac5e954c566·...·]-1">}</span></code></pre><p><code·class="inline">Info</code>·is·the·termination·reason·of·the·socket·or·<code·class="inline">nosock</code>·if
5086 <code·class="inline">Socket</code>·did·not·exist·when·the·monitor·was·started.</p><p>Making·several·calls·to·<a·href="#monitor/1"><code·class="inline">socket:monitor/1</code></a>·for·the·same·<code·class="inline">Socket</code>·is·not·an5086 <code·class="inline">Socket</code>·did·not·exist·when·the·monitor·was·started.</p><p>Making·several·calls·to·<a·href="#monitor/1"><code·class="inline">socket:monitor/1</code></a>·for·the·same·<code·class="inline">Socket</code>·is·not·an
5087 error;·each·call·creates·an·independent·monitor·instance.</p>5087 error;·each·call·creates·an·independent·monitor·instance.</p>
5088 ··</section>5088 ··</section>
5089 </section>5089 </section>
5090 <section·class="detail"·id="number_of/0">5090 <section·class="detail"·id="number_of/0">
  
5091 ··<div·class="detail-header">5091 ··<div·class="detail-header">
141 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/socket_usage.html
    
Offset 182, 244 lines modifiedOffset 182, 244 lines modified
182 effects·<em>that</em>·specific·socket).</p><h2·id="example"·class="section-heading">182 effects·<em>that</em>·specific·socket).</p><h2·id="example"·class="section-heading">
183 ··<a·href="#example"·class="hover-link">183 ··<a·href="#example"·class="hover-link">
184 ····<i·class="ri-link-m"·aria-hidden="true"></i>184 ····<i·class="ri-link-m"·aria-hidden="true"></i>
185 ··</a>185 ··</a>
186 ··<span·class="text">Example</span>186 ··<span·class="text">Example</span>
187 </h2>187 </h2>
188 <p>This·example·is·intended·to·show·how·to·create·a·simple·(echo)·server188 <p>This·example·is·intended·to·show·how·to·create·a·simple·(echo)·server
189 (and·client).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0154664139-1">(</span><span·class="ss">example</span><span·class="p"·data-group-id="0154664139-1">)</span><span·class="p">.</span><span·class="w">189 (and·client).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7501044239-1">(</span><span·class="ss">example</span><span·class="p"·data-group-id="7501044239-1">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="w">190 </span><span·class="w">
191 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0154664139-2">(</span><span·class="p"·data-group-id="0154664139-3">[</span><span·class="ss">client</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">client</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·117,·SHA:·b59cb8ee3d3feba936bbfa8ae29b0c8258f0d6f0ef27197a7b32096632106fd9·...·]39-2">)</span><span·class="p">.</span><span·class="w">191 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7501044239-2">(</span><span·class="p"·data-group-id="7501044239-3">[</span><span·class="ss">client</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">client</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·117,·SHA:·82bb961d7e98239983086cd43655284246bc8bf78cffd2d1c2db92a32af0f6f8·...·]39-2">)</span><span·class="p">.</span><span·class="w">
192 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0154664139-4">(</span><span·class="p"·data-group-id="0154664139-5">[</span><span·class="ss">server</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">server</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·244,·SHA:·00ddff00734dd074ef4846c820daf3123fed70243eb83d7798c9903b3c3fd790·...·]39-4">)</span><span·class="p">.</span><span·class="w">192 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7501044239-4">(</span><span·class="p"·data-group-id="7501044239-5">[</span><span·class="ss">server</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">server</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·244,·SHA:·8b25690f9500cb6ac63dac62c80e77c63698582f4da05c36d536718f3e00f59c·...·]39-4">)</span><span·class="p">.</span><span·class="w">
  
  
193 </span><span·class="c1">%%·======================================================================</span><span·class="w">193 </span><span·class="c1">%%·======================================================================</span><span·class="w">
  
194 </span><span·class="c1">%%·===·Client·===</span><span·class="w">194 </span><span·class="c1">%%·===·Client·===</span><span·class="w">
  
195 </span><span·class="nf">client</span><span·class="p"·data-group-id="0154664139-6">(</span><span·class="p"·data-group-id="0154664139-7">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Family</span><span·class="p"·data-group-id="0154664139-7">}</[·...·truncated·by·diffoscope;·len:·227,·SHA:·e6cfa3a852a39afe1d453b95304b3fcfd80806175c7c8c0d106f6c66828fe406·...·]39-6">)</span><span·class="w">195 </span><span·class="nf">client</span><span·class="p"·data-group-id="7501044239-6">(</span><span·class="p"·data-group-id="7501044239-7">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Family</span><span·class="p"·data-group-id="7501044239-7">}</[·...·truncated·by·diffoscope;·len:·227,·SHA:·4706c908829dce11335a0e3a8b6508517d6070a6b54e6bcbc086f4cafbac4746·...·]39-6">)</span><span·class="w">
196 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="0154664139-8">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-8">)</span><span·class="w">·</span><span·class="ow">orelse</span><span·class="w">·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="0154664139-9"[·...·truncated·by·diffoscope;·len:·74,·SHA:·57bd57b7cc26f985f95e3daf2691627f7d72e9ea1d1d487616a520c087bd6352·...·]39-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">196 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="7501044239-8">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-8">)</span><span·class="w">·</span><span·class="ow">orelse</span><span·class="w">·</span><span·class="nf">is_binary</span><span·class="p"·data-group-id="7501044239-9"[·...·truncated·by·diffoscope;·len:·74,·SHA:·adc76088da76af2f41f25d05f6fbf118ffa901f60d8d24753b7f5bb573d2663e·...·]39-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
197 ····</span><span·class="p"·data-group-id="0154664139-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="0154664139-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·355,·SHA:·3b7c39cbd8f213457f9fb7bf6c81ea5870a2917ca20f9ac0fd1533078df738e5·...·]39-11">)</span><span·class="p">,</span><span·class="w">197 ····</span><span·class="p"·data-group-id="7501044239-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="7501044239-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·355,·SHA:·c3634986c52106c44caafa4a717174cf96e4174bbaa57f69409cd1848f3ba4d8·...·]39-11">)</span><span·class="p">,</span><span·class="w">
198 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">maybe_bind</span><span·class="p"·data-group-id="0154664139-12">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Family</span><span·class="p"·data-group-id="0154664139-12">)</span><span·class="p">,</span><span·class="w">198 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">maybe_bind</span><span·class="p"·data-group-id="7501044239-12">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Family</span><span·class="p"·data-group-id="7501044239-12">)</span><span·class="p">,</span><span·class="w">
199 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="0154664139-13">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ServerSockAddr</span><span·class="p"·data-group-id="0154664139-13">)</span><span·class="p">,</span><span·class="w">199 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="7501044239-13">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ServerSockAddr</span><span·class="p"·data-group-id="7501044239-13">)</span><span·class="p">,</span><span·class="w">
200 ····</span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="0154664139-14">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-14">)</span><span·class="p">;</span><span·class="w">200 ····</span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="7501044239-14">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-14">)</span><span·class="p">;</span><span·class="w">
  
201 </span><span·class="nf">client</span><span·class="p"·data-group-id="0154664139-15">(</span><span·class="n">ServerPort</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-15">)</span><span·class="w">201 </span><span·class="nf">client</span><span·class="p"·data-group-id="7501044239-15">(</span><span·class="n">ServerPort</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-15">)</span><span·class="w">
202 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="0154664139-16">(</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="0154664139-16">)</span><span·class="w">·</span><span·class="nf">andalso</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-17">(</span><span·class="[·...·truncated·by·diffoscope;·len:·159,·SHA:·a9409c4016bc99f24d0b1d5b501ebe142a45572f7e4528153c7cb3e13701756d·...·]39-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">202 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="7501044239-16">(</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="7501044239-16">)</span><span·class="w">·</span><span·class="nf">andalso</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-17">(</span><span·class="[·...·truncated·by·diffoscope;·len:·159,·SHA:·40c4c214d24116208915c977350785a3caabe8fd1440937d757437b39a7dd192·...·]39-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
203 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Default</span><span·class="w">203 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Default</span><span·class="w">
204 ····</span><span·class="n">Addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">get_local_addr</span><span·class="p"·data-group-id="0154664139-18">(</span><span·class="n">Family</span><span·class="p"·data-group-id="0154664139-18">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Pick·an·address</span><span·class="w">204 ····</span><span·class="n">Addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">get_local_addr</span><span·class="p"·data-group-id="7501044239-18">(</span><span·class="n">Family</span><span·class="p"·data-group-id="7501044239-18">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Pick·an·address</span><span·class="w">
205 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-19">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">205 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-19">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">
206 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">206 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">
207 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="0154664139-19">}</span><span·class="p">,</span><span·class="w">207 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="7501044239-19">}</span><span·class="p">,</span><span·class="w">
208 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="0154664139-20">(</span><span·class="n">SockAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-20">)</span><span·class="p">.</span><span·class="w">208 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="7501044239-20">(</span><span·class="n">SockAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-20">)</span><span·class="p">.</span><span·class="w">
  
209 </span><span·class="nf">client</span><span·class="p"·data-group-id="0154664139-21">(</span><span·class="n">ServerPort</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ServerAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-21">)</span><span·class="w">209 </span><span·class="nf">client</span><span·class="p"·data-group-id="7501044239-21">(</span><span·class="n">ServerPort</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ServerAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-21">)</span><span·class="w">
210 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="0154664139-22">(</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="0154664139-22">)</span><span·class="w">·</span><span·class="nf">andalso</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-23">(</span><span·class="[·...·truncated·by·diffoscope;·len:·159,·SHA:·a9409c4016bc99f24d0b1d5b501ebe142a45572f7e4528153c7cb3e13701756d·...·]39-23">)</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">210 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="7501044239-22">(</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="7501044239-22">)</span><span·class="w">·</span><span·class="nf">andalso</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-23">(</span><span·class="[·...·truncated·by·diffoscope;·len:·159,·SHA:·40c4c214d24116208915c977350785a3caabe8fd1440937d757437b39a7dd192·...·]39-23">)</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">
211 ·······</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="0154664139-24">(</span><span·class="n">ServerAddr</span><span·class="p"·data-group-id="0154664139-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">211 ·······</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="7501044239-24">(</span><span·class="n">ServerAddr</span><span·class="p"·data-group-id="7501044239-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
212 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">which_family</span><span·class="p"·data-group-id="0154664139-25">(</span><span·class="n">ServerAddr</span><span·class="p"·data-group-id="0154664139-25">)</span><span·class="p">,</span><span·class="w">212 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">which_family</span><span·class="p"·data-group-id="7501044239-25">(</span><span·class="n">ServerAddr</span><span·class="p"·data-group-id="7501044239-25">)</span><span·class="p">,</span><span·class="w">
213 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-26">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">213 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-26">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">
214 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">ServerAddr</span><span·class="p">,</span><span·class="w">214 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">ServerAddr</span><span·class="p">,</span><span·class="w">
215 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="0154664139-26">}</span><span·class="p">,</span><span·class="w">215 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">ServerPort</span><span·class="p"·data-group-id="7501044239-26">}</span><span·class="p">,</span><span·class="w">
216 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="0154664139-27">(</span><span·class="n">SockAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-27">)</span><span·class="p">.</span><span·class="w">216 ····</span><span·class="nf">client</span><span·class="p"·data-group-id="7501044239-27">(</span><span·class="n">SockAddr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-27">)</span><span·class="p">.</span><span·class="w">
  
217 </span><span·class="c1">%%·Send·the·message·to·the·(echo)·server·and·wait·for·the·echo·to·come·back.</span><span·class="w">217 </span><span·class="c1">%%·Send·the·message·to·the·(echo)·server·and·wait·for·the·echo·to·come·back.</span><span·class="w">
218 </span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="0154664139-28">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-28">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·147,·SHA:·a19c014c4b0c28972354b293348cfae35d9b55bec44fc3600e68b1293b11610f·...·]39-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">218 </span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="7501044239-28">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-28">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·147,·SHA:·2dda975ecfd8566aefbfa9708e7446beac566171ef642904d38d3f670769600c·...·]39-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
219 ····</span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="0154664139-30">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="0154664139-31">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="015466413[·...·truncated·by·diffoscope;·len:·53,·SHA:·c24fb37b5e4bcfdaa243602e963fdd8691341bf8452c28168fc3be31f5fa1f2a·...·]39-30">)</span><span·class="p">;</span><span·class="w">219 ····</span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="7501044239-30">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="7501044239-31">(</span><span·class="n">Msg</span><span·class="p"·data-group-id="750104423[·...·truncated·by·diffoscope;·len:·53,·SHA:·34faab08f66e53fa7b2ec86c6349b825f7ab137369544d7c187630917edf3b46·...·]39-30">)</span><span·class="p">;</span><span·class="w">
220 </span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="0154664139-32">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-32">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·149,·SHA:·4bf733760e3fcd074d475eb87733374696f7c1354379d47e36ccf524f10d503b·...·]39-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">220 </span><span·class="nf">client_exchange</span><span·class="p"·data-group-id="7501044239-32">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-32">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·149,·SHA:·a2dd0ac3ebebbbda0a39270dc5826d933d2da467d795155ee07ad5ac0d6906bc·...·]39-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
221 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="0154664139-34">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="0154664139-34">)</span><span·class="p">,</span><span·class="w">221 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="7501044239-34">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="7501044239-34">)</span><span·class="p">,</span><span·class="w">
222 ····</span><span·class="p"·data-group-id="0154664139-35">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0154664139-35">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·490,·SHA:·d47cda6bfda57613d0c63f89f268fbf419bfaef36ec31a0dbfc2040c07a9659a·...·]39-36">)</span><span·class="p">,</span><span·class="w">222 ····</span><span·class="p"·data-group-id="7501044239-35">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7501044239-35">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·490,·SHA:·f1ed8de589844c27db756f42011722993fb4c10fccaf3f936de9fb917a94b604·...·]39-36">)</span><span·class="p">,</span><span·class="w">
223 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">223 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
  
224 </span><span·class="c1">%%·======================================================================</span><span·class="w">224 </span><span·class="c1">%%·======================================================================</span><span·class="w">
  
225 </span><span·class="c1">%%·===·Server·===</span><span·class="w">225 </span><span·class="c1">%%·===·Server·===</span><span·class="w">
  
226 </span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-38">(</span><span·class="p"·data-group-id="0154664139-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">226 </span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-38">(</span><span·class="p"·data-group-id="7501044239-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
227 ····</span><span·class="c1">%%·Make·system·choose·port·(and·address)</span><span·class="w">227 ····</span><span·class="c1">%%·Make·system·choose·port·(and·address)</span><span·class="w">
228 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-39">(</span><span·class="mi">0</span><span·class="p"·data-group-id="0154664139-39">)</span><span·class="p">.</span><span·class="w">228 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-39">(</span><span·class="mi">0</span><span·class="p"·data-group-id="7501044239-39">)</span><span·class="p">.</span><span·class="w">
  
229 </span><span·class="c1">%%·This·function·return·the·port·and·address·that·it·actually·uses,</span><span·class="w">229 </span><span·class="c1">%%·This·function·return·the·port·and·address·that·it·actually·uses,</span><span·class="w">
230 </span><span·class="c1">%%·in·case·server/0·or·server/1·(with·a·port·number)·was·used·to·start·it.</span><span·class="w">230 </span><span·class="c1">%%·in·case·server/0·or·server/1·(with·a·port·number)·was·used·to·start·it.</span><span·class="w">
  
231 </span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-40">(</span><span·class="p"·data-group-id="0154664139-41">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·499,·SHA:·5da15a31016706dd481fde4f8b48feaf0f623f9124434440d604a787a893d3d6·...·]39-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 </span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-40">(</span><span·class="p"·data-group-id="7501044239-41">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·499,·SHA:·6eb7f2e9bf112e535aff9bea8a52b085ff327f71df280a8979f1ffba31f269e5·...·]39-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ····</span><span·class="p"·data-group-id="0154664139-42">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="0154664139-42">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·351,·SHA:·9aede010cd7bf7f419784ac7ff42c402064b9601d5fba1f8e7b37a422256b620·...·]39-43">)</span><span·class="p">,</span><span·class="w">232 ····</span><span·class="p"·data-group-id="7501044239-42">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sock</span><span·class="p"·data-group-id="7501044239-42">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·351,·SHA:·ec4bc0b29a1c39787882f983431242d176f12d666012c8b4272fd6f8773978b9·...·]39-43">)</span><span·class="p">,</span><span·class="w">
233 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">bind</span><span·class="p"·data-group-id="0154664139-44">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SockAddr</span><span·class="p"·data-group-id="0154664139-44">)</span><span·class="p">,</span><span·class="w">233 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">bind</span><span·class="p"·data-group-id="7501044239-44">(</span><span·class="n">Sock</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SockAddr</span><span·class="p"·data-group-id="7501044239-44">)</span><span·class="p">,</span><span·class="w">
234 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="0154664139-45">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0154664139-45">)</span><span·class="p">,</span><span·class="w">234 ····</span><span·class="ss">ok</span><span·class="w">·········</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="7501044239-45">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7501044239-45">)</span><span·class="p">,</span><span·class="w">
235 ····</span><span·class="p"·data-group-id="0154664139-46">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-47">#{</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·410,·SHA:·f104a8d84808a57918136184c432181b2594c2b316f906441cd0a06dfeeafd44·...·]39-48">)</span><span·class="p">,</span><span·class="w">235 ····</span><span·class="p"·data-group-id="7501044239-46">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-47">#{</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·410,·SHA:·43fa11ce1df6f51fabc6ad73ba0fd34389a7241dcac6b7e145674a230c6c1109·...·]39-48">)</span><span·class="p">,</span><span·class="w">
236 ····</span><span·class="n">Acceptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_acceptor</span><span·class="p"·data-group-id="0154664139-49">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0154664139-49">)</span><span·class="p">,</span><span·class="w">236 ····</span><span·class="n">Acceptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_acceptor</span><span·class="p"·data-group-id="7501044239-49">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7501044239-49">)</span><span·class="p">,</span><span·class="w">
237 ····</span><span·class="p"·data-group-id="0154664139-50">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-51">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Addr</span><sp[·...·truncated·by·diffoscope;·len:·169,·SHA:·154e1f875e35fe8c5d22c81d1972afa006d5257179625e0e9d32888df1a9666c·...·]39-50">}</span><span·class="p">;</span><span·class="w">237 ····</span><span·class="p"·data-group-id="7501044239-50">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-51">{</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Addr</span><sp[·...·truncated·by·diffoscope;·len:·169,·SHA:·69e9a73d37301fc1a6a0196fdfedf3db0b3a7e75963c9cdf692b829bfbacd5bf·...·]39-50">}</span><span·class="p">;</span><span·class="w">
  
238 </span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-52">(</span><span·class="n">Port</span><span·class="p"·data-group-id="0154664139-52">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="0154664139-5[·...·truncated·by·diffoscope;·len:·77,·SHA:·81cbcccae4f623be328011cdf486353905ea2a0a984e5b3d1451e20a2249e63d·...·]39-53">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">238 </span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-52">(</span><span·class="n">Port</span><span·class="p"·data-group-id="7501044239-52">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="7501044239-5[·...·truncated·by·diffoscope;·len:·77,·SHA:·b032671d8f6b6064b54fbc317f4ef6eeb1397758d2a89c53ddf029462a2ed89f·...·]39-53">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
239 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Default</span><span·class="w">239 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">inet</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Default</span><span·class="w">
240 ····</span><span·class="n">Addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">get_local_addr</span><span·class="p"·data-group-id="0154664139-54">(</span><span·class="n">Family</span><span·class="p"·data-group-id="0154664139-54">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Pick·an·address</span><span·class="w">240 ····</span><span·class="n">Addr</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">get_local_addr</span><span·class="p"·data-group-id="7501044239-54">(</span><span·class="n">Family</span><span·class="p"·data-group-id="7501044239-54">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·Pick·an·address</span><span·class="w">
241 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-55">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">241 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-55">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">
242 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">242 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">
243 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="0154664139-55">}</span><span·class="p">,</span><span·class="w">243 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="7501044239-55">}</span><span·class="p">,</span><span·class="w">
244 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-56">(</span><span·class="n">SockAddr</span><span·class="p"·data-group-id="0154664139-56">)</span><span·class="p">.</span><span·class="w">244 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-56">(</span><span·class="n">SockAddr</span><span·class="p"·data-group-id="7501044239-56">)</span><span·class="p">.</span><span·class="w">
  
245 </span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-57">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p"·data-group-id="0154664139-57">)</span><span·class="w">245 </span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-57">(</span><span·class="n">Port</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p"·data-group-id="7501044239-57">)</span><span·class="w">
246 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="0154664139-58">(</span><span·class="n">Port</span><span·class="p"·data-group-id="0154664139-58">)</span><span·class="w">·</span><span·class="nf">andalso</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-59">(</span><span·class="n">Por[·...·truncated·by·diffoscope;·len:·148,·SHA:·2e4a312a2207a44b1be232a3da7663fe1b6c7c8b745ab51e78d6dc2986e30597·...·]39-59">)</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">246 ··</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="7501044239-58">(</span><span·class="n">Port</span><span·class="p"·data-group-id="7501044239-58">)</span><span·class="w">·</span><span·class="nf">andalso</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-59">(</span><span·class="n">Por[·...·truncated·by·diffoscope;·len:·148,·SHA:·db5e3e465cf3c07cc1920ce23043d2520cf4939e77169c1d5e25cc44512dd4c2·...·]39-59">)</span><span·class="w">·</span><span·class="ow">andalso</span><span·class="w">
247 ·······</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="0154664139-60">(</span><span·class="n">Addr</span><span·class="p"·data-group-id="0154664139-60">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">247 ·······</span><span·class="nf">is_tuple</span><span·class="p"·data-group-id="7501044239-60">(</span><span·class="n">Addr</span><span·class="p"·data-group-id="7501044239-60">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
248 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">which_family</span><span·class="p"·data-group-id="0154664139-61">(</span><span·class="n">Addr</span><span·class="p"·data-group-id="0154664139-61">)</span><span·class="p">,</span><span·class="w">248 ····</span><span·class="n">Family</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">which_family</span><span·class="p"·data-group-id="7501044239-61">(</span><span·class="n">Addr</span><span·class="p"·data-group-id="7501044239-61">)</span><span·class="p">,</span><span·class="w">
249 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-62">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">249 ····</span><span·class="n">SockAddr</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-62">#{</span><span·class="ss">family</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Family</span><span·class="p">,</span><span·class="w">
250 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">250 »       »       ·</span><span·class="ss">addr</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Addr</span><span·class="p">,</span><span·class="w">
251 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="0154664139-62">}</span><span·class="p">,</span><span·class="w">251 »       »       ·</span><span·class="ss">port</span><span·class="w">···</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Port</span><span·class="p"·data-group-id="7501044239-62">}</span><span·class="p">,</span><span·class="w">
252 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="0154664139-63">(</span><span·class="n">SockAddr</span><span·class="p"·data-group-id="0154664139-63">)</span><span·class="p">.</span><span·class="w">252 ····</span><span·class="nf">server</span><span·class="p"·data-group-id="7501044239-63">(</span><span·class="n">SockAddr</span><span·class="p"·data-group-id="7501044239-63">)</span><span·class="p">.</span><span·class="w">
  
  
253 </span><span·class="c1">%%·---·Echo·Server·-·Acceptor·---</span><span·class="w">253 </span><span·class="c1">%%·---·Echo·Server·-·Acceptor·---</span><span·class="w">
  
254 </span><span·class="nf">start_acceptor</span><span·class="p"·data-group-id="0154664139-64">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="0154664139-64">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">254 </span><span·class="nf">start_acceptor</span><span·class="p"·data-group-id="7501044239-64">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="7501044239-64">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
255 ····</span><span·class="n">Self</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="0154664139-65">(</span><span·class="p"·data-group-id="0154664139-65">)</span><span·class="p">,</span><span·class="w">255 ····</span><span·class="n">Self</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7501044239-65">(</span><span·class="p"·data-group-id="7501044239-65">)</span><span·class="p">,</span><span·class="w">
256 ····</span><span·class="p"·data-group-id="0154664139-66">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p"·data-group-id="0154664139-66">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·633,·SHA:·5e2fe400f747b5367c0c7f839a33a9c1c0d769bb6bace7300b35e69fc6afda7d·...·]39-67">)</span><span·class="p">,</span><span·class="w">256 ····</span><span·class="p"·data-group-id="7501044239-66">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p"·data-group-id="7501044239-66">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·633,·SHA:·158c32c6bac04c1890ee9ebaeb9316195804fdb619747fcd496f67dc1ead7e97·...·]39-67">)</span><span·class="p">,</span><span·class="w">
257 ····</span><span·class="k">receive</span><span·class="w">257 ····</span><span·class="k">receive</span><span·class="w">
258 »       </span><span·class="p"·data-group-id="0154664139-70">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·147,·SHA:·6ebe5ce658836d85ec0e9d5ad517319f928be92e8ceb6958494c806d5dd15854·...·]39-70">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">258 »       </span><span·class="p"·data-group-id="7501044239-70">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·147,·SHA:·0958260927a2085a215531cfc5d24e1c77db7d5eeb2a3e41be6bf22e974ef306·...·]39-70">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
259 »       ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="0154664139-71">(</span><span·class="p"·data-group-id="0154664139-72">{</span><span·class="ss">failed_starting_acceptor</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p"·data-group-id="0154664139-72">}</span><s[·...·truncated·by·diffoscope;·len:·37,·SHA:·0e0c56ad6309761f33e76095e0888d9141d2ae7c93eada063c051c0a672e1522·...·]39-71">)</span><span·class="p">;</span><span·class="w">259 »       ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="7501044239-71">(</span><span·class="p"·data-group-id="7501044239-72">{</span><span·class="ss">failed_starting_acceptor</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p"·data-group-id="7501044239-72">}</span><s[·...·truncated·by·diffoscope;·len:·37,·SHA:·8036b9dd7d8d6e586ab7f2f13c23b9b08e2a48cd6b0a1640719084f006d0ba6e·...·]39-71">)</span><span·class="p">;</span><span·class="w">
260 »       </span><span·class="p"·data-group-id="0154664139-73">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">started</span><span·class="p"·data-group-id="0154664139-73">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">260 »       </span><span·class="p"·data-group-id="7501044239-73">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">started</span><span·class="p"·data-group-id="7501044239-73">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
261 »       ····</span><span·class="c1">%%·Transfer·ownership</span><span·class="w">261 »       ····</span><span·class="c1">%%·Transfer·ownership</span><span·class="w">
262 »       ····</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">setopt</span><span·class="p"·data-group-id="0154664139-74">(</span><span·class="n">LSock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">owner</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·60,·SHA:·898b400d21a9186f6844ee7525e3ea1f90581dd029fb1288849b6927a650f923·...·]39-74">)</span><span·class="p">,</span><span·class="w">262 »       ····</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">setopt</span><span·class="p"·data-group-id="7501044239-74">(</span><span·class="n">LSock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">otp</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">owner</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·60,·SHA:·2cdfc902f1cad3f484840fd4e1df9fa8a3d1d1fb41b3f945794ed2df6095ec09·...·]39-74">)</span><span·class="p">,</span><span·class="w">
263 »       ····</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-75">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0154664139-76">(</span><span·class="p"·data-group-id="0154664139-76">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·22,·SHA:·3b99c4d541e4363cb449a13ce5be0cf6f3f154de94c5e0100f96d8c8e52b19d4·...·]39-75">}</span><span·class="p">,</span><span·class="w">263 »       ····</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-75">{</span><span·class="nf">self</span><span·class="p"·data-group-id="7501044239-76">(</span><span·class="p"·data-group-id="7501044239-76">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·22,·SHA:·0a2f87a25f24e9bc45d75d11042d38e30df926e0bf994af24657b4d1eb539e76·...·]39-75">}</span><span·class="p">,</span><span·class="w">
264 »       ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="0154664139-77">(</span><span·class="n">MRef</span><span·class="p"·data-group-id="0154664139-77">)</span><span·class="p">,</span><span·class="w">264 »       ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">demonitor</span><span·class="p"·data-group-id="7501044239-77">(</span><span·class="n">MRef</span><span·class="p"·data-group-id="7501044239-77">)</span><span·class="p">,</span><span·class="w">
265 »       ····</span><span·class="n">Pid</span><span·class="w">265 »       ····</span><span·class="n">Pid</span><span·class="w">
266 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">266 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
267 ····267 ····
268 </span><span·class="nf">acceptor_init</span><span·class="p"·data-group-id="0154664139-78">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LSock</span><span·class="p"·data-group-id="0154664139-78">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">268 </span><span·class="nf">acceptor_init</span><span·class="p"·data-group-id="7501044239-78">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LSock</span><span·class="p"·data-group-id="7501044239-78">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
269 ····</span><span·class="n">Parent</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0154664139-79">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0154664139-80">(</span><span·class="p"·data-group-id="0154664139-80">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">started</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·21,·SHA:·e4f039e7adb861163a60bcb506c56c951864ce243b440e8a3c0793c6d6678016·...·]39-79">}</span><span·class="p">,</span><span·class="w">269 ····</span><span·class="n">Parent</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7501044239-79">{</span><span·class="nf">self</span><span·class="p"·data-group-id="7501044239-80">(</span><span·class="p"·data-group-id="7501044239-80">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">started</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·21,·SHA:·9c41c1077dea8c69926fb46acbfc81e45bb62ecf8def32cbdcfb7c359c849aa8·...·]39-79">}</span><span·class="p">,</span><span·class="w">
270 ····</span><span·class="k">receive</span><span·class="w">270 ····</span><span·class="k">receive</span><span·class="w">
271 »       </span><span·class="p"·data-group-id="0154664139-81">{</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="p"·data-group-id="0154664139-81">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">271 »       </span><span·class="p"·data-group-id="7501044239-81">{</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="p"·data-group-id="7501044239-81">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
272 »       ····</span><span·class="ss">ok</span><span·class="w">272 »       ····</span><span·class="ss">ok</span><span·class="w">
273 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">273 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
274 ····</span><span·class="nf">acceptor_loop</span><span·class="p"·data-group-id="0154664139-82">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="0154664139-82">)</span><span·class="p">.</span><span·class="w">274 ····</span><span·class="nf">acceptor_loop</span><span·class="p"·data-group-id="7501044239-82">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="7501044239-82">)</span><span·class="p">.</span><span·class="w">
  
275 </span><span·class="nf">acceptor_loop</span><span·class="p"·data-group-id="0154664139-83">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="0154664139-83">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">275 </span><span·class="nf">acceptor_loop</span><span·class="p"·data-group-id="7501044239-83">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="7501044239-83">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
276 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">accept</span><span·class="p"·data-group-id="0154664139-84">(</span><span·class="n">LSock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="0154664139-84">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">276 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">socket</span><span·class="p">:</span><span·class="nf">accept</span><span·class="p"·data-group-id="7501044239-84">(</span><span·class="n">LSock</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="7501044239-84">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
277 »       </span><span·class="p"·data-group-id="0154664139-85">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ASock</span><span·class="p"·data-group-id="0154664139-85">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">277 »       </span><span·class="p"·data-group-id="7501044239-85">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ASock</span><span·class="p"·data-group-id="7501044239-85">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
278 »       ····</span><span·class="nf">start_handler</span><span·class="p"·data-group-id="0154664139-86">(</span><span·class="n">ASock</span><span·class="p"·data-group-id="0154664139-86">)</span><span·class="p">,</span><span·class="w">278 »       ····</span><span·class="nf">start_handler</span><span·class="p"·data-group-id="7501044239-86">(</span><span·class="n">ASock</span><span·class="p"·data-group-id="7501044239-86">)</span><span·class="p">,</span><span·class="w">
279 »       ····</span><span·class="nf">acceptor_loop</span><span·class="p"·data-group-id="0154664139-87">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="0154664139-87">)</span><span·class="p">;</span><span·class="w">279 »       ····</span><span·class="nf">acceptor_loop</span><span·class="p"·data-group-id="7501044239-87">(</span><span·class="n">LSock</span><span·class="p"·data-group-id="7501044239-87">)</span><span·class="p">;</span><span·class="w">
280 »       </span><span·class="p"·data-group-id="0154664139-88">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="0154664139-88">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">280 »       </span><span·class="p"·data-group-id="7501044239-88">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="7501044239-88">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
281 »       ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="0154664139-89">(</span><span·class="p"·data-group-id="0154664139-90">{</span><span·class="ss">accept_failed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="0154664139-90">}</span><span·class[·...·truncated·by·diffoscope;·len:·28,·SHA:·0021637e10e06cb354b6beb60bec4a487b68c2fe27c081f1018362e5275fcb33·...·]39-89">)</span><span·class="w">281 »       ····</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="7501044239-89">(</span><span·class="p"·data-group-id="7501044239-90">{</span><span·class="ss">accept_failed</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="7501044239-90">}</span><span·class[·...·truncated·by·diffoscope;·len:·28,·SHA:·4e5f7d599cbf8bea06209ef8a84c82bc9322f47f9bcb9829a64a634069e09a66·...·]39-89">)</span><span·class="w">
282 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">282 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
  
283 </span><span·class="c1">%%·---·Echo·Server·-·Handler·---</span><span·class="w">283 </span><span·class="c1">%%·---·Echo·Server·-·Handler·---</span><span·class="w">
  
284 </span><span·class="nf">start_handler</span><span·class="p"·data-group-id="0154664139-91">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="0154664139-91">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">284 </span><span·class="nf">start_handler</span><span·class="p"·data-group-id="7501044239-91">(</span><span·class="n">Sock</span><span·class="p"·data-group-id="7501044239-91">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
285 ····</span><span·class="n">Self</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="0154664139-92">(</span><span·class="p"·data-group-id="0154664139-92">)</span><span·class="p">,</span><span·class="w">285 ····</span><span·class="n">Self</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7501044239-92">(</span><span·class="p"·data-group-id="7501044239-92">)</span><span·class="p">,</span><span·class="w">
286 ····</span><span·class="p"·data-group-id="0154664139-93">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p"·data-group-id="0154664139-93">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·631,·SHA:·fae45729b217f76ba6c9c8ddaebdb56e690d7bf11d3e96919eb6ffcbed8ee81a·...·]39-94">)</span><span·class="p">,</span><span·class="w">286 ····</span><span·class="p"·data-group-id="7501044239-93">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p"·data-group-id="7501044239-93">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·631,·SHA:·7e5acbd856cea983c952bb1f7f424989ea2c85c2a42a3d03cf1da1832df3e33c·...·]39-94">)</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 79212/144452 bytes (54.84%) of diff not shown.
40.8 KB
./usr/share/doc/erlang-doc/html/lib/kernel-10.0.1/doc/html/trace.html
    
Offset 142, 31 lines modifiedOffset 142, 31 lines modified
142 </h2>142 </h2>
143 <p>All·tracing·is·done·within·a·trace·session.·Trace·sessions·can·be143 <p>All·tracing·is·done·within·a·trace·session.·Trace·sessions·can·be
144 <a·href="#session_create/3">created</a>·and·<a·href="#session_destroy/1">destroyed</a>144 <a·href="#session_create/3">created</a>·and·<a·href="#session_destroy/1">destroyed</a>
145 dynamically.·Each·session·has·its·own·tracer·that·will·receive·all·trace145 dynamically.·Each·session·has·its·own·tracer·that·will·receive·all·trace
146 messages.·Several·sessions·can·exist·at·the·same·time·without·interfering·with146 messages.·Several·sessions·can·exist·at·the·same·time·without·interfering·with
147 each·other.·When·a·trace·session·is·destroyed,·all·its·trace·settings·are147 each·other.·When·a·trace·session·is·destroyed,·all·its·trace·settings·are
148 automatically·cleaned·up.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Create·a·tracer·process·that·will·receive·the·trace·events</span><span·class="gp·unselectable">148 automatically·cleaned·up.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Create·a·tracer·process·that·will·receive·the·trace·events</span><span·class="gp·unselectable">
149 1&gt;·</span><span·class="n">Tracer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="8370966468-1">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="8370966468-2">(</span><span·class="p"·data-group-id="8370966468-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><sp[·...·truncated·by·diffoscope;·len:·944,·SHA:·4586749e458cd103d72cb74d682efecf9dcff0fc800135fb52380e7e152abf2b·...·]-1">)</span><span·class="p">.</span><span·class="w">149 1&gt;·</span><span·class="n">Tracer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="8479195964-1">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="8479195964-2">(</span><span·class="p"·data-group-id="8479195964-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><sp[·...·truncated·by·diffoscope;·len:·944,·SHA:·52994f0dbfd0ded1e2ea39d7590a3c68b802d5809111642300843dbc47d33443·...·]-1">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="o">&lt;</span><span·class="mf">0.91</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">150 </span><span·class="o">&lt;</span><span·class="mf">0.91</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
151 </span><span·class="c1">%%·Create·a·session·using·the·Tracer</span><span·class="gp·unselectable">151 </span><span·class="c1">%%·Create·a·session·using·the·Tracer</span><span·class="gp·unselectable">
152 2&gt;·</span><span·class="n">Session</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">session_create</span><span·class="p"·data-group-id="8370966468-6">(</span><span·class="ss">my_session</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tracer</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8370966468-7">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·71,·SHA:·cc170c527a642ccb857b00125052389f8ca4a627568b823deb4d4f08e1324e30·...·]-6">)</span><span·class="p">.</span><span·class="w">152 2&gt;·</span><span·class="n">Session</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">session_create</span><span·class="p"·data-group-id="8479195964-6">(</span><span·class="ss">my_session</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tracer</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8479195964-7">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·71,·SHA:·2b353d672654aeac0fda7c4f47b022fe9d9cd471dbf8f824cae2b9e9deac01c2·...·]-6">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p"·data-group-id="8370966468-8">{</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.1543805153</span><span·class="p">.</span><span·class="mf">1548353537.92331</span><span·class="o">&gt;</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·247,·SHA:·7d2fcaee013f9b08035061ec21c05772a02e51f9fb32055576cd5dcf31810652·...·]-8">}</span><span·class="w">153 </span><span·class="p"·data-group-id="8479195964-8">{</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.1543805153</span><span·class="p">.</span><span·class="mf">1548353537.92331</span><span·class="o">&gt;</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·247,·SHA:·06751c1d06b879c313df295a7c5098e2959cee43da904a2879c90255c8b5a9f6·...·]-8">}</span><span·class="w">
154 </span><span·class="c1">%%·Setup·call·tracing·on·self()</span><span·class="gp·unselectable">154 </span><span·class="c1">%%·Setup·call·tracing·on·self()</span><span·class="gp·unselectable">
155 3&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">process</span><span·class="p"·data-group-id="8370966468-10">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8370966468-11">(</span><span·class="p"·data-group-id="8370966468-11">)</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·281,·SHA:·6e3ac9d4548c6ce6e5335e863395673b528e4b7f1f740decb3c0398955826e7e·...·]-10">)</span><span·class="p">.</span><span·class="w">155 3&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">process</span><span·class="p"·data-group-id="8479195964-10">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8479195964-11">(</span><span·class="p"·data-group-id="8479195964-11">)</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·281,·SHA:·f654c23ff7a195ac0b14ec6c5b82ee14ea4b32a4b8bf021d8ca022631daeb59d·...·]-10">)</span><span·class="p">.</span><span·class="w">
156 </span><span·class="mi">1</span><span·class="w">156 </span><span·class="mi">1</span><span·class="w">
157 </span><span·class="c1">%%·Setup·call·tracing·on·lists:seq/2</span><span·class="gp·unselectable">157 </span><span·class="c1">%%·Setup·call·tracing·on·lists:seq/2</span><span·class="gp·unselectable">
158 4&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">function</span><span·class="p"·data-group-id="8370966468-13">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8370966468-14">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">seq</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·434,·SHA:·999a87e8d95af827a0935177313db8ba01c25de8aa05e600f9adc532013ce156·...·]-13">)</span><span·class="p">.</span><span·class="w">158 4&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">function</span><span·class="p"·data-group-id="8479195964-13">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8479195964-14">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">seq</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·434,·SHA:·bd793561390e36d000329b46e9e849114daf526685d497bafaf6c1e0fbc36e9d·...·]-13">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="mi">1</span><span·class="w">159 </span><span·class="mi">1</span><span·class="w">
160 </span><span·class="c1">%%·Call·the·traced·function</span><span·class="gp·unselectable">160 </span><span·class="c1">%%·Call·the·traced·function</span><span·class="gp·unselectable">
161 5&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="8370966468-17">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p"·data-group-id="8370966468-17">)</span><span·class="p">.</span><span·class="w">161 5&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="8479195964-17">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p"·data-group-id="8479195964-17">)</span><span·class="p">.</span><span·class="w">
162 </span><span·class="p"·data-group-id="8370966468-18">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.89</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">call</spa[·...·truncated·by·diffoscope;·len:·462,·SHA:·7774c2ead759184b2fdf32fe6a119908d5816c82897594032364ffd398d0c0c5·...·]-18">}</span><span·class="w">·</span><span·class="c1">%·The·trace·message</span><span·class="w">162 </span><span·class="p"·data-group-id="8479195964-18">{</span><span·class="nb">trace</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.89</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">call</spa[·...·truncated·by·diffoscope;·len:·462,·SHA:·ccd2d86aae7b36fff9dc92f705c07dc4bb3c3a19d1991f368bd9d3729f343cca·...·]-18">}</span><span·class="w">·</span><span·class="c1">%·The·trace·message</span><span·class="w">
163 </span><span·class="p"·data-group-id="8370966468-21">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="[·...·truncated·by·diffoscope;·len:·274,·SHA:·392be532779207363f4a26b789b0d3f28aa17a02fa408804b85ff4e0d85e584d·...·]-21">]</span><span·class="w">·</span><span·class="c1">%·The·return·value</span><span·class="w">163 </span><span·class="p"·data-group-id="8479195964-21">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="[·...·truncated·by·diffoscope;·len:·274,·SHA:·fa7067eea4f7f950b888ce6cef8e975565ec6915b5281b540061aac1e2ec5a4e·...·]-21">]</span><span·class="w">·</span><span·class="c1">%·The·return·value</span><span·class="w">
164 </span><span·class="c1">%%·Cleanup·the·trace·session</span><span·class="gp·unselectable">164 </span><span·class="c1">%%·Cleanup·the·trace·session</span><span·class="gp·unselectable">
165 6&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">session_destroy</span><span·class="p"·data-group-id="8370966468-22">(</span><span·class="n">Session</span><span·class="p"·data-group-id="8370966468-22">)</span><span·class="p">.</span><span·class="w">165 6&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">session_destroy</span><span·class="p"·data-group-id="8479195964-22">(</span><span·class="n">Session</span><span·class="p"·data-group-id="8479195964-22">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="ss">ok</span></code></pre><h2·id="module-node-local-tracing-only"·class="section-heading">166 </span><span·class="ss">ok</span></code></pre><h2·id="module-node-local-tracing-only"·class="section-heading">
167 ··<a·href="#module-node-local-tracing-only"·class="hover-link">167 ··<a·href="#module-node-local-tracing-only"·class="hover-link">
168 ····<i·class="ri-link-m"·aria-hidden="true"></i>168 ····<i·class="ri-link-m"·aria-hidden="true"></i>
169 ··</a>169 ··</a>
170 ··<span·class="text">Node·Local·Tracing·Only</span>170 ··<span·class="text">Node·Local·Tracing·Only</span>
171 </h2>171 </h2>
172 <p>The·functions·in·this·module·only·operates·on·the·local·node.·That·is,·both·the172 <p>The·functions·in·this·module·only·operates·on·the·local·node.·That·is,·both·the
Offset 1316, 17 lines modifiedOffset 1316, 17 lines modified
1316 <code·class="inline">undefined</code>·if·the·sender·is·not·known·(which·can·be·the·case·for·remote1316 <code·class="inline">undefined</code>·if·the·sender·is·not·known·(which·can·be·the·case·for·remote
1317 senders).·<code·class="inline">Msg</code>·is·the·message·term.·The·pid·of·the·receiving·process·can·be1317 senders).·<code·class="inline">Msg</code>·is·the·message·term.·The·pid·of·the·receiving·process·can·be
1318 accessed·with·the·guard·function·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>.·An·empty·list·is·the·same·as1318 accessed·with·the·guard·function·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>.·An·empty·list·is·the·same·as
1319 <code·class="inline">true</code>.·For·more·information,·see·section1319 <code·class="inline">true</code>.·For·more·information,·see·section
1320 <a·href="../../../../erts-15.0.1/doc/html/match_spec.html">Match·Specifications·in·Erlang</a>·in·the·User's·Guide1320 <a·href="../../../../erts-15.0.1/doc/html/match_spec.html">Match·Specifications·in·Erlang</a>·in·the·User's·Guide
1321 for·the·ERTS·application.</p></li><li><p><strong><code·class="inline">true</code></strong>·-·Enable·tracing·for·all·received·messages·(to·<code·class="inline">'receive'</code>·traced1321 for·the·ERTS·application.</p></li><li><p><strong><code·class="inline">true</code></strong>·-·Enable·tracing·for·all·received·messages·(to·<code·class="inline">'receive'</code>·traced
1322 processes).·Any·match·specification·is·removed.·<em>This·is·the·default</em>.</p></li><li><p><strong><code·class="inline">false</code></strong>·-·Disable·tracing·for·all·received·messages.·Any·match1322 processes).·Any·match·specification·is·removed.·<em>This·is·the·default</em>.</p></li><li><p><strong><code·class="inline">false</code></strong>·-·Disable·tracing·for·all·received·messages.·Any·match
1323 specification·is·removed.</p></li></ul><p>Argument·<code·class="inline">FlagList</code>·must·be·<code·class="inline">[]</code>·for·receive·tracing.</p><p>The·return·value·is·always·<code·class="inline">1</code>.</p><p><em>Examples:</em></p><p>Only·trace·messages·from·a·specific·process·<code·class="inline">Pid</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="8240784588-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8240784588-2">[</span><span·class="p"·data-group-id="8240784588-3">{</span><span·class="p"·data-group-id="8240784588-4">[</sp[·...·truncated·by·diffoscope;·len:·785,·SHA:·9f369e61ba7890963ac2e760e62ebe15c4f366e3917e5ccf5937e50ec036548e·...·]-1">)</span><span·class="p">.</span><span·class="w">1323 specification·is·removed.</p></li></ul><p>Argument·<code·class="inline">FlagList</code>·must·be·<code·class="inline">[]</code>·for·receive·tracing.</p><p>The·return·value·is·always·<code·class="inline">1</code>.</p><p><em>Examples:</em></p><p>Only·trace·messages·from·a·specific·process·<code·class="inline">Pid</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="6384993506-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6384993506-2">[</span><span·class="p"·data-group-id="6384993506-3">{</span><span·class="p"·data-group-id="6384993506-4">[</sp[·...·truncated·by·diffoscope;·len:·785,·SHA:·707a087fff854455411d02f2cc75dfc877a6435728745f558089dc4bd24e7231·...·]-1">)</span><span·class="p">.</span><span·class="w">
1324 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·matching·<code·class="inline">{reply,·_}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="8419404098-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8419404098-2">[</span><span·class="p"·data-group-id="8419404098-3">{</span><span·class="p"·data-group-id="8419404098-4">[</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8419404098-5">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="8419404098-5">}</span><span·class="p"·data-group-id="8419404098-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="8419404098-6">[</span><span·class="p"·data-group-id="8419404098-6">]</span><span·class="p">,</span><span·class="p"·data-group-id="8419404098-7">[</span><span·class="p"·data-group-id="8419404098-7">]</span><span·class="p"·data-group-id="8419404098-3">}</span><span·class="p"·data-group-id="8419404098-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8419404098-8">[</span><span·class="p"·data-group-id="8419404098-8">]</span><span·class="p"·data-group-id="8419404098-1">)</span><span·class="p">.</span><span·class="w"> 
1325 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·from·other·nodes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="7646901792-1">(</span><span·class[·...·truncated·by·diffoscope;·len:·1403,·SHA:·a12063a28cfcc1ba50ecbba77fc866790351343d771a382fb50f06d56e061be1·...·]-1">)</span><span·class="p">.</span><span·class="w">1324 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·matching·<code·class="inline">{reply,·_}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="16[·...·truncated·by·diffoscope;·len:·1207,·SHA:·e678eb9013cfb85e96eb41351cea8ec6346ef745a16aa14c5b306db385344879·...·]-1">)</span><span·class="p">.</span><span·class="w">
 1325 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·from·other·nodes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">recv</span><span·class="p"·data-group-id="6111034804-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6111034804-2">[</span><span·class="p"·data-group-id="6111034804-3">{</span><span·class="p"·data-group-id="6111034804-4">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="6111034804-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="6111034804-5">[</span><span·class="p"·data-group-id="6111034804-6">{</span><span·class="ss">&#39;=/=&#39;</span><span·class="p">,</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="6111034804-7">{</span><span·class="nb">node</span><span·class="p"·data-group-id="6111034804-7">}</span><span·class="p"·data-group-id="6111034804-6">}</span><span·class="p"·data-group-id="6111034804-5">]</span><span·class="p">,</span><span·class="p"·data-group-id="6111034804-8">[</span><span·class="p"·data-group-id="6111034804-8">]</span><span·class="p"·data-group-id="6111034804-3">}</span><span·class="p"·data-group-id="6111034804-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6111034804-9">[</span><span·class="p"·data-group-id="6111034804-9">]</span><span·class="p"·data-group-id="6111034804-1">)</span><span·class="p">.</span><span·class="w">
1326 </span><span·class="mi">1</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·match·specification·for·<code·class="inline">'receive'</code>·trace·can·use·all·guard·and·body1326 </span><span·class="mi">1</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·match·specification·for·<code·class="inline">'receive'</code>·trace·can·use·all·guard·and·body
1327 functions·except·<code·class="inline">caller</code>,·<code·class="inline">is_seq_trace</code>,·<code·class="inline">get_seq_token</code>,·<code·class="inline">set_seq_token</code>,1327 functions·except·<code·class="inline">caller</code>,·<code·class="inline">is_seq_trace</code>,·<code·class="inline">get_seq_token</code>,·<code·class="inline">set_seq_token</code>,
1328 <code·class="inline">enable_trace</code>,·<code·class="inline">disable_trace</code>,·<code·class="inline">trace</code>,·<code·class="inline">silent</code>,·and·<code·class="inline">process_dump</code>.</p></blockquote><p>Fails·by·raising·an·error·exception·with·an·error·reason·of:</p><ul><li><p><strong><code·class="inline">badarg</code></strong>·-·If·an·argument·is·invalid.</p></li><li><p><strong><code·class="inline">system_limit</code></strong>·-·If·a·match·specification·passed·as·argument·has·excessive1328 <code·class="inline">enable_trace</code>,·<code·class="inline">disable_trace</code>,·<code·class="inline">trace</code>,·<code·class="inline">silent</code>,·and·<code·class="inline">process_dump</code>.</p></blockquote><p>Fails·by·raising·an·error·exception·with·an·error·reason·of:</p><ul><li><p><strong><code·class="inline">badarg</code></strong>·-·If·an·argument·is·invalid.</p></li><li><p><strong><code·class="inline">system_limit</code></strong>·-·If·a·match·specification·passed·as·argument·has·excessive
1329 nesting·which·causes·scheduler·stack·exhaustion·for·the·scheduler·that·the1329 nesting·which·causes·scheduler·stack·exhaustion·for·the·scheduler·that·the
1330 calling·process·is·executing·on.1330 calling·process·is·executing·on.
1331 <a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html#sched_thread_stack_size">Scheduler·stack·size</a>·can·be·configured1331 <a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html#sched_thread_stack_size">Scheduler·stack·size</a>·can·be·configured
1332 when·starting·the·runtime·system.</p></li></ul>1332 when·starting·the·runtime·system.</p></li></ul>
Offset 1369, 18 lines modifiedOffset 1369, 18 lines modified
1369 the·list·<code·class="inline">[Receiver,·Msg]</code>.·<code·class="inline">Receiver</code>·is·the·process·or·port·identity·of·the1369 the·list·<code·class="inline">[Receiver,·Msg]</code>.·<code·class="inline">Receiver</code>·is·the·process·or·port·identity·of·the
1370 receiver·and·<code·class="inline">Msg</code>·is·the·message·term.·The·pid·of·the·sending·process·can·be1370 receiver·and·<code·class="inline">Msg</code>·is·the·message·term.·The·pid·of·the·sending·process·can·be
1371 accessed·with·the·guard·function·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>.·An·empty·list·is·the·same·as1371 accessed·with·the·guard·function·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>.·An·empty·list·is·the·same·as
1372 <code·class="inline">true</code>.·For·more·information,·see·section1372 <code·class="inline">true</code>.·For·more·information,·see·section
1373 <a·href="../../../../erts-15.0.1/doc/html/match_spec.html">Match·Specifications·in·Erlang</a>·in·the·User's·Guide1373 <a·href="../../../../erts-15.0.1/doc/html/match_spec.html">Match·Specifications·in·Erlang</a>·in·the·User's·Guide
1374 for·the·ERTS·application.</p></li><li><p><strong><code·class="inline">true</code></strong>·-·Enable·tracing·for·all·sent·messages·(from·<code·class="inline">send</code>·traced1374 for·the·ERTS·application.</p></li><li><p><strong><code·class="inline">true</code></strong>·-·Enable·tracing·for·all·sent·messages·(from·<code·class="inline">send</code>·traced
1375 processes).·Any·match·specification·is·removed.</p></li><li><p><strong><code·class="inline">false</code></strong>·-·Disable·tracing·for·all·sent·messages.·Any·match·specification1375 processes).·Any·match·specification·is·removed.</p></li><li><p><strong><code·class="inline">false</code></strong>·-·Disable·tracing·for·all·sent·messages.·Any·match·specification
1376 is·removed.</p></li></ul><p>Argument·<code·class="inline">FlagList</code>·must·be·<code·class="inline">[]</code>.</p><p>The·return·value·is·always·<code·class="inline">1</code>.</p><p><em>Examples:</em></p><p>Only·trace·messages·to·a·specific·process·<code·class="inline">Pid</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="9055482848-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9055482848-2">[</span><span·class="p"·data-group-id="9055482848-3">{</span><span·class="p"·data-group-id="9055482848-4">[</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="9055482848-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="9055482848-5">[</span><span·class="p"·data-group-id="9055482848-5">]</span><span·class="p">,</span><span·class="p"·data-group-id="9055482848-6">[</span><span·class="p"·data-group-id="9055482848-6">]</span><span·class="p"·data-group-id="9055482848-3">}</span><span·class="p"·data-group-id="9055482848-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9055482848-7">[</span><span·class="p"·data-group-id="9055482848-7">]</span><span·class="p"·data-group-id="9055482848-1">)</span><span·class="p">.</span><span·class="w"> 
1377 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·matching·<code·class="inline">{reply,·_}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="8707656210-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8707656210-2">[</span><span·class="p"·data-group-id="8707656210-3">{</span><span·class="p"·data-group-id="8707656210-4">[</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8707656210-5">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="8707656210-5">}</span><span·class="p"·data-group-id="8707656210-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="8707656210-6">[</span><span·class="p"·data-group-id="8707656210-6">]</span><span·class="p">,</span><span·class="p"·data-group-id="8707656210-7">[</span><span·class="p"·data-group-id="8707656210-7">]</span><span·class="p"·data-group-id="8707656210-3">}</span><span·class="p"·data-group-id="8707656210-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8707656210-8">[</span><span·class="p"·data-group-id="8707656210-8">]</span><span·class="p"·data-group-id="8707656210-1">)</span><span·class="p">.</span><span·class="w"> 
1378 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·sent·to·the·sender·itself:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="2573275054-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2573275054-2">[</span><span·class="p"·data-group-id="2573275054-3">{</span><span·class="p"·data-group-id="2573275054-4">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="2573275054-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="2573275054-5">[</span><span·class="p"·data-group-id="2573275054-6">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="2573275054-7">{</span><span·class="ss">self</span><span·class="p"·data-group-id="2573275054-7">}</span><span·class="p"·data-group-id="2573275054-6">}</span><span·class="p"·data-group-id="2573275054-5">]</span><span·class="p">,</span><span·class="p"·data-group-id="2573275054-8">[</span><span·class="p"·data-group-id="2573275054-8">]</span><span·class="p"·data-group-id="2573275054-3">}</span><span·class="p"·data-group-id="2573275054-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2573275054-9">[</span><span·class="p"·data-group-id="2573275054-9">]</span><span·class="p"·data-group-id="2573275054-1">)</span><span·class="p">.</span><span·class="w"> 
1379 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·sent·to·other·nodes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send[·...·truncated·by·diffoscope;·len:·1550,·SHA:·1baa5909849f5e2a6a513ff519e8fef3be942c5b26dc1760bd4144471be6e120·...·]4-1">)</span><span·class="p">.</span><span·class="w">1376 is·removed.</p></li></ul><p>Argument·<code·class="inline">FlagList</code>·must·be·<code·class="inline">[]</code>.</p><p>The·return·value·is·always·<code·class="inline">1</code>.</p><p><em>Examples:</em></p><p>Only·trace·messages·to·a·specific·process·<code[·...·truncated·by·diffoscope;·len:·1214,·SHA:·87206fbffd64dd79f97e0e5c688e0c2e2a2ba394ac50b74f259e760cbcd09f2b·...·]4-1">)</span><span·class="p">.</span><span·class="w">
 1377 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·matching·<code·class="inline">{reply,·_}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="2936390027-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2936390027-2">[</span><span·class="p"·data-group-id="2936390027-3">{</span><span·class="p"·data-group-id="2936390027-4">[</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2936390027-5">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="2936390027-5">}</span><span·class="p"·data-group-id="2936390027-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="2936390027-6">[</span><span·class="p"·data-group-id="2936390027-6">]</span><span·class="p">,</span><span·class="p"·data-group-id="2936390027-7">[</span><span·class="p"·data-group-id="2936390027-7">]</span><span·class="p"·data-group-id="2936390027-3">}</span><span·class="p"·data-group-id="2936390027-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2936390027-8">[</span><span·class="p"·data-group-id="2936390027-8">]</span><span·class="p"·data-group-id="2936390027-1">)</span><span·class="p">.</span><span·class="w">
 1378 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·sent·to·the·sender·itself:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="1077313965-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1077313965-2">[</span><span·class="p"·data-group-id="1077313965-3">{</span><span·class="p"·data-group-id="1077313965-4">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="1077313965-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="1077313965-5">[</span><span·class="p"·data-group-id="1077313965-6">{</span><span·class="ss">&#39;=:=&#39;</span><span·class="p">,</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="1077313965-7">{</span><span·class="ss">self</span><span·class="p"·data-group-id="1077313965-7">}</span><span·class="p"·data-group-id="1077313965-6">}</span><span·class="p"·data-group-id="1077313965-5">]</span><span·class="p">,</span><span·class="p"·data-group-id="1077313965-8">[</span><span·class="p"·data-group-id="1077313965-8">]</span><span·class="p"·data-group-id="1077313965-3">}</span><span·class="p"·data-group-id="1077313965-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1077313965-9">[</span><span·class="p"·data-group-id="1077313965-9">]</span><span·class="p"·data-group-id="1077313965-1">)</span><span·class="p">.</span><span·class="w">
 1379 </span><span·class="mi">1</span></code></pre><p>Only·trace·messages·sent·to·other·nodes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">trace</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="1282474254-1">(</span><span·class="n">Session</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1282474254-2">[</span><span·class="p"·data-group-id="1282474254-3">{</span><span·class="p"·data-group-id="1282474254-4">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="1282474254-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="1282474254-5">[</span><span·class="p"·data-group-id="1282474254-6">{</span><span·class="ss">&#39;=/=&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="1282474254-7">{</span><span·class="nb">node</span><span·class="p">,</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="1282474254-7">}</span><span·class="p">,</span><span·class="p"·data-group-id="1282474254-8">{</span><span·class="nb">node</span><span·class="p"·data-group-id="1282474254-8">}</span><span·class="p"·data-group-id="1282474254-6">}</span><span·class="p"·data-group-id="1282474254-5">]</span><span·class="p">,</span><span·class="p"·data-group-id="1282474254-9">[</span><span·class="p"·data-group-id="1282474254-9">]</span><span·class="p"·data-group-id="1282474254-3">}</span><span·class="p"·data-group-id="1282474254-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1282474254-10">[</span><span·class="p"·data-group-id="1282474254-10">]</span><span·class="p"·data-group-id="1282474254-1">)</span><span·class="p">.</span><span·class="w">
1380 </span><span·class="mi">1</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·match·specification·for·<code·class="inline">send</code>·trace·can·use·all·guard·and·body·functions1380 </span><span·class="mi">1</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·match·specification·for·<code·class="inline">send</code>·trace·can·use·all·guard·and·body·functions
1381 except·<code·class="inline">caller</code>.</p></blockquote><p>Fails·by·raising·an·error·exception·with·an·error·reason·of:</p><ul><li><p><strong><code·class="inline">badarg</code></strong>·-·If·an·argument·is·invalid.</p></li><li><p><strong><code·class="inline">system_limit</code></strong>·-·If·a·match·specification·passed·as·argument·has·excessive1381 except·<code·class="inline">caller</code>.</p></blockquote><p>Fails·by·raising·an·error·exception·with·an·error·reason·of:</p><ul><li><p><strong><code·class="inline">badarg</code></strong>·-·If·an·argument·is·invalid.</p></li><li><p><strong><code·class="inline">system_limit</code></strong>·-·If·a·match·specification·passed·as·argument·has·excessive
1382 nesting·which·causes·scheduler·stack·exhaustion·for·the·scheduler·that·the1382 nesting·which·causes·scheduler·stack·exhaustion·for·the·scheduler·that·the
1383 calling·process·is·executing·on.1383 calling·process·is·executing·on.
1384 <a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html#sched_thread_stack_size">Scheduler·stack·size</a>·can·be·configured1384 <a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html#sched_thread_stack_size">Scheduler·stack·size</a>·can·be·configured
1385 when·starting·the·runtime·system.</p></li></ul>1385 when·starting·the·runtime·system.</p></li></ul>
1386 ··</section>1386 ··</section>
163 KB
./usr/share/doc/erlang-doc/html/lib/megaco-4.6/doc/html/megaco.epub
6.87 KB
zipinfo {}
Max HTML report size reached
102 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
9.03 KB
OEBPS/megaco_user.xhtml
Max HTML report size reached
5.12 KB
OEBPS/megaco_examples.xhtml
Max HTML report size reached
21.6 KB
OEBPS/megaco_encode.xhtml
Max HTML report size reached
11.5 KB
OEBPS/megaco_debug.xhtml
Max HTML report size reached
2.74 KB
OEBPS/megaco.xhtml
    
Offset 3080, 15 lines modifiedOffset 3080, 15 lines modified
  
3080 ··········<pre·translate="no"><span·class="attribute">-spec</span>·print_version_info(Versions)·->·<a·href="#t:void/0">void</a>()·when·Versions·::·[VersionInfo],·VersionInfo·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:term/0">term</a>().</pre>3080 ··········<pre·translate="no"><span·class="attribute">-spec</span>·print_version_info(Versions)·->·<a·href="#t:void/0">void</a>()·when·Versions·::·[VersionInfo],·VersionInfo·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3081 ······</div>3081 ······</div>
  
3082 <p>Utility·function·to·produce·a·formated·printout·of·the·versions·info·generated3082 <p>Utility·function·to·produce·a·formated·printout·of·the·versions·info·generated
3083 by·the·<code·class="inline">versions1</code>·and·<code·class="inline">versions2</code>·functions.</p><p>The·function·print_version_info/0·uses·the·result·of·function·version1/0·as3083 by·the·<code·class="inline">versions1</code>·and·<code·class="inline">versions2</code>·functions.</p><p>The·function·print_version_info/0·uses·the·result·of·function·version1/0·as
3084 <code·class="inline">VersionInfo</code>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="w">···········</samp><samp·class="p"·data-group-id="0450743015-1">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">V</samp><samp·class="p"·data-group-id="0450743015-1">}</samp><samp·class="w">·</samp><samp·class="o">=</samp><samp·class="w">·</samp><samp·class[·...·truncated·by·diffoscope;·len:·441,·SHA:·853e5ee919fb3d3bb729dc3d2c4f69ea11253e4d9fb0299440d5a9845f120f5b·...·]-3">)</samp><samp·class="p">.</samp></code></pre><p><a·href=""·id="enable_trace"></a></p>3084 <code·class="inline">VersionInfo</code>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="w">···········</samp><samp·class="p"·data-group-id="5317626041-1">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">V</samp><samp·class="p"·data-group-id="5317626041-1">}</samp><samp·class="w">·</samp><samp·class="o">=</samp><samp·class="w">·</samp><samp·class[·...·truncated·by·diffoscope;·len:·441,·SHA:·83f3b5adeb5c235354e0b52657d610a523abb2fbcdfbb63af72298a5224fa17f·...·]-3">)</samp><samp·class="p">.</samp></code></pre><p><a·href=""·id="enable_trace"></a></p>
3085 ··</section>3085 ··</section>
3086 </section>3086 </section>
3087 <section·class="detail"·id="process_received_message/4">3087 <section·class="detail"·id="process_received_message/4">
  
3088 ··<div·class="detail-header">3088 ··<div·class="detail-header">
3089 ····<a·href="#process_received_message/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3089 ····<a·href="#process_received_message/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3090 ······<i·class="ri-link-m"·aria-hidden="true"></i>3090 ······<i·class="ri-link-m"·aria-hidden="true"></i>
3.38 KB
OEBPS/content.opf
3.35 KB
OEBPS/content.opf
Max HTML report size reached
2.83 KB
./usr/share/doc/erlang-doc/html/lib/megaco-4.6/doc/html/megaco.html
    
Offset 3201, 15 lines modifiedOffset 3201, 15 lines modified
  
3201 ··········<pre·translate="no"><span·class="attribute">-spec</span>·print_version_info(Versions)·->·<a·href="#t:void/0">void</a>()·when·Versions·::·[VersionInfo],·VersionInfo·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>3201 ··········<pre·translate="no"><span·class="attribute">-spec</span>·print_version_info(Versions)·->·<a·href="#t:void/0">void</a>()·when·Versions·::·[VersionInfo],·VersionInfo·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3202 ······</div>3202 ······</div>
  
3203 <p>Utility·function·to·produce·a·formated·printout·of·the·versions·info·generated3203 <p>Utility·function·to·produce·a·formated·printout·of·the·versions·info·generated
3204 by·the·<code·class="inline">versions1</code>·and·<code·class="inline">versions2</code>·functions.</p><p>The·function·print_version_info/0·uses·the·result·of·function·version1/0·as3204 by·the·<code·class="inline">versions1</code>·and·<code·class="inline">versions2</code>·functions.</p><p>The·function·print_version_info/0·uses·the·result·of·function·version1/0·as
3205 <code·class="inline">VersionInfo</code>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">···········</span><span·class="p"·data-group-id="3965519904-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p"·data-group-id="3965519904-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·440,·SHA:·9fcf3d03d8e91ab911442e1a91ae327362cfb1b0612cdc1cf709620ed5a289de·...·]4-3">)</span><span·class="p">.</span></code></pre><p><a·href=""·id="enable_trace"></a></p>3205 <code·class="inline">VersionInfo</code>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">···········</span><span·class="p"·data-group-id="9547856144-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p"·data-group-id="9547856144-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·440,·SHA:·6f8e17fecd7f2be1db2ad667a4d5b9a981a22f38f43a8f6d6fe9b9ddb51978b3·...·]4-3">)</span><span·class="p">.</span></code></pre><p><a·href=""·id="enable_trace"></a></p>
3206 ··</section>3206 ··</section>
3207 </section>3207 </section>
3208 <section·class="detail"·id="process_received_message/4">3208 <section·class="detail"·id="process_received_message/4">
  
3209 ··<div·class="detail-header">3209 ··<div·class="detail-header">
3210 ····<a·href="#process_received_message/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3210 ····<a·href="#process_received_message/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3211 ······<i·class="ri-link-m"·aria-hidden="true"></i>3211 ······<i·class="ri-link-m"·aria-hidden="true"></i>
11.6 KB
./usr/share/doc/erlang-doc/html/lib/megaco-4.6/doc/html/megaco_debug.html
    
Offset 168, 20 lines modifiedOffset 168, 20 lines modified
168 file·(see·below·for·more·info).·The·messages·in·this·file·is·encoded·with·just168 file·(see·below·for·more·info).·The·messages·in·this·file·is·encoded·with·just
169 one·codec.·During·measurement·initiation,·the·messages·are·read·and·then169 one·codec.·During·measurement·initiation,·the·messages·are·read·and·then
170 transformed·to·all·codec·formats·used·in·the·measurement.</p><p>The·message·transformation·is·done·by·the·transformation·module.·It·is·used·to170 transformed·to·all·codec·formats·used·in·the·measurement.</p><p>The·message·transformation·is·done·by·the·transformation·module.·It·is·used·to
171 transform·a·set·of·messages·encoded·with·one·codec·into·the·other·base·codec's.</p><h4>Measurement(s)</h4><p>There·are·two·different·measurement·tools:</p><ul><li><p><em>meas</em>:</p><p>Used·to·perform·codec·measurements.·That·is,·to·see·what·kind·of·performance171 transform·a·set·of·messages·encoded·with·one·codec·into·the·other·base·codec's.</p><h4>Measurement(s)</h4><p>There·are·two·different·measurement·tools:</p><ul><li><p><em>meas</em>:</p><p>Used·to·perform·codec·measurements.·That·is,·to·see·what·kind·of·performance
172 can·be·expected·by·the·different·codecs·provided·by·the·megaco·application.</p><p>The·measurement·is·done·by·iterating·over·the·decode/encode·function·for172 can·be·expected·by·the·different·codecs·provided·by·the·megaco·application.</p><p>The·measurement·is·done·by·iterating·over·the·decode/encode·function·for
173 approx·2·seconds·per·message·and·counting·the·number·of·decodes/encodes.</p><p>Is·best·run·by·modifying·the·meas.sh.skel·skeleton·script·provided·by·the173 approx·2·seconds·per·message·and·counting·the·number·of·decodes/encodes.</p><p>Is·best·run·by·modifying·the·meas.sh.skel·skeleton·script·provided·by·the
174 tool.</p><p>To·run·it·manually·do·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="c1">%·erl·-pa·&lt;path-megaco-ebin-dir&gt;·-pa·&lt;path-to-meas-module-dir&gt;</span><span·class="w">174 tool.</p><p>To·run·it·manually·do·the·following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="c1">%·erl·-pa·&lt;path-megaco-ebin-dir&gt;·-pa·&lt;path-to-meas-module-dir&gt;</span><span·class="w">
175 ········</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="8596599699-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="8596599699-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.[·...·truncated·by·diffoscope;·len:·156,·SHA:·9e7818bcdb87e974c17cfe562be43cb99c1042d4f8b6ff8d6e144a3b3e5aeb8a·...·]-2">]</span><span·class="w">175 ········</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="5470008498-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="5470008498-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.[·...·truncated·by·diffoscope;·len:·156,·SHA:·935d3726608a3aaed12e2b62621a0f9939dc3ed9f802dfab4e8e0400325f98a4·...·]-2">]</span><span·class="w">
  
176 ········</span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V12</span><span·class="p">.</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="8596599699-3">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="8596599699-3">)</span><span·class="w">176 ········</span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V12</span><span·class="p">.</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="5470008498-3">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5470008498-3">)</span><span·class="w">
177 ········</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">megaco_codec_meas</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8596599699-4">(</span><span·class="p"·data-group-id="8596599699-4">)</span><span·class="p">.</span><span·class="w">177 ········</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">megaco_codec_meas</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5470008498-4">(</span><span·class="p"·data-group-id="5470008498-4">)</span><span·class="p">.</span><span·class="w">
178 ········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">178 ········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
179 ········</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">halt</span><span·class="p"·data-group-id="8596599699-5">(</span><span·class="p"·data-group-id="8596599699-5">)</span><span·class="p">.</span></code></pre><p>or·to·make·it·even·easier,·assuming·a·measure·shall·be·done·on·all·the·codecs179 ········</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">halt</span><span·class="p"·data-group-id="5470008498-5">(</span><span·class="p"·data-group-id="5470008498-5">)</span><span·class="p">.</span></code></pre><p>or·to·make·it·even·easier,·assuming·a·measure·shall·be·done·on·all·the·codecs
180 (as·above):</p><pre><code·class="text">········%·erl·-noshell·-pa·&lt;path-megaco-ebin-dir&gt;·\\180 (as·above):</p><pre><code·class="text">········%·erl·-noshell·-pa·&lt;path-megaco-ebin-dir&gt;·\\
181 ··············-pa·&lt;path-to-meas-module-dir&gt;·\\181 ··············-pa·&lt;path-to-meas-module-dir&gt;·\\
182 ··············-s·megaco_codec_meas·-s·init·stop</code></pre><p>When·run·as·above·(this·will·take·some·time),·the·measurement·process·is·done182 ··············-s·megaco_codec_meas·-s·init·stop</code></pre><p>When·run·as·above·(this·will·take·some·time),·the·measurement·process·is·done
183 as·follows:</p><pre><code·class="text">For·each·codec:183 as·follows:</p><pre><code·class="text">For·each·codec:
184 ····For·each·message:184 ····For·each·message:
185 ········Read·the·message·from·the·file185 ········Read·the·message·from·the·file
186 ············Detect·message·version186 ············Detect·message·version
Offset 195, 18 lines modifiedOffset 195, 18 lines modified
195 tool.</p><p>The·<em>mstone2</em>·is·similar·to·the·<em>mstone1</em>·tool,·but·in·this·case,·each·created195 tool.</p><p>The·<em>mstone2</em>·is·similar·to·the·<em>mstone1</em>·tool,·but·in·this·case,·each·created
196 process·makes·only·<em>one</em>·run·through·the·messages·and·then·exits.·A·soon·as·a196 process·makes·only·<em>one</em>·run·through·the·messages·and·then·exits.·A·soon·as·a
197 process·exits,·a·new·process·(with·the·same·config·and·messages)·is·created·to197 process·exits,·a·new·process·(with·the·same·config·and·messages)·is·created·to
198 takes·its·place.·The·number·of·messages·processed·in·total·is·the·mstone2(1)198 takes·its·place.·The·number·of·messages·processed·in·total·is·the·mstone2(1)
199 value.</p></li></ul><p>Both·these·tools·use·the·message·package·(time_test.msgs)·provided·with·the199 value.</p></li></ul><p>Both·these·tools·use·the·message·package·(time_test.msgs)·provided·with·the
200 tool(s),·although·it·can·run·on·any·message·package·as·long·as·it·has·the·same200 tool(s),·although·it·can·run·on·any·message·package·as·long·as·it·has·the·same
201 structure.</p><h4>Message·package·file</h4><p>This·is·simply·an·erlang·compatible·text-file·with·the·following·structure:201 structure.</p><h4>Message·package·file</h4><p>This·is·simply·an·erlang·compatible·text-file·with·the·following·structure:
202 <code·class="inline">{codec_name(),·messages_list()}</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">codec_name</span><span·class="p"·data-group-id="5924096579-1">(</span><span·class="p"·data-group-id="5924096579-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">pretty</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·687,·SHA:·a9244b761b7d1a920d20c9103a9b0721776c1f115dc16e773bb7e55c2c275579·...·]-2">)</span><span·class="w">202 <code·class="inline">{codec_name(),·messages_list()}</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">codec_name</span><span·class="p"·data-group-id="8090599571-1">(</span><span·class="p"·data-group-id="8090599571-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">pretty</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·687,·SHA:·f9e2de847d8dbd1a09c47752f2a823f4251366ae3038154247543e87a597fdbc·...·]-2">)</span><span·class="w">
203 </span><span·class="nf">messages_list</span><span·class="p"·data-group-id="5924096579-3">(</span><span·class="p"·data-group-id="5924096579-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5924096579-4">[</span><span·class="p"·data-group-id="5924096579-5">{</span><sp[·...·truncated·by·diffoscope;·len:·418,·SHA:·b48415b4ca9722ec99d65db6eb2ca29f1da2cdaae8be2f3e2242583d0ff54364·...·]-4">]</span><span·class="w">203 </span><span·class="nf">messages_list</span><span·class="p"·data-group-id="8090599571-3">(</span><span·class="p"·data-group-id="8090599571-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8090599571-4">[</span><span·class="p"·data-group-id="8090599571-5">{</span><sp[·...·truncated·by·diffoscope;·len:·418,·SHA:·33456f45a46ed28dd5cf44cf1989a001ad2bcc8fd6cfe9256458ff033e1def5f·...·]-4">]</span><span·class="w">
204 </span><span·class="nf">message_name</span><span·class="p"·data-group-id="5924096579-8">(</span><span·class="p"·data-group-id="5924096579-8">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="5924096579-9">(</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·8ee8a82d3d028856eb19d6b25b3c10eb1bc8e833186f3bc79de192987239c1c2·...·]-9">)</span><span·class="w">204 </span><span·class="nf">message_name</span><span·class="p"·data-group-id="8090599571-8">(</span><span·class="p"·data-group-id="8090599571-8">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8090599571-9">(</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·580ea9bd7d96d5fbae31f65002eef4b6f60ade484063d1385a21413f673a8b48·...·]-9">)</span><span·class="w">
205 </span><span·class="nf">message</span><span·class="p"·data-group-id="5924096579-10">(</span><span·class="p"·data-group-id="5924096579-10">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="5924096579-11">(</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·2973d2e7e6b1e2556151dbde81db8621c2282bb6ab1f562e8a7a9c01da2d3691·...·]-11">)</span></code></pre><p>The·codec·name·is·the·name·of·the·codec·with·which·all·messages·in·the205 </span><span·class="nf">message</span><span·class="p"·data-group-id="8090599571-10">(</span><span·class="p"·data-group-id="8090599571-10">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="8090599571-11">(</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·3c0697ee7fb1b85922fe1716bef7593ad42f420597e27bd407538ef558c54ecd·...·]-11">)</span></code></pre><p>The·codec·name·is·the·name·of·the·codec·with·which·all·messages·in·the
206 <code·class="inline">message_list()</code>·has·been·encoded.</p><p>This·file·can·be·<code·class="inline">exported</code>·to·a·file·structure·by·calling·the206 <code·class="inline">message_list()</code>·has·been·encoded.</p><p>This·file·can·be·<code·class="inline">exported</code>·to·a·file·structure·by·calling·the
207 <a·href="megaco_codec_transform.html#export_messages">export_messages</a>·function.·This·can207 <a·href="megaco_codec_transform.html#export_messages">export_messages</a>·function.·This·can
208 be·usefull·if·a·measurement·shall·be·done·with·an·external·tool.·Exporting·the208 be·usefull·if·a·measurement·shall·be·done·with·an·external·tool.·Exporting·the
209 messages·creates·a·directory·tree·with·the·following·structure:</p><pre><code·class="text">&lt;message·package&gt;/pretty/&lt;message-files&gt;209 messages·creates·a·directory·tree·with·the·following·structure:</p><pre><code·class="text">&lt;message·package&gt;/pretty/&lt;message-files&gt;
210 ··················compact/210 ··················compact/
211 ··················per/211 ··················per/
212 ··················ber/&lt;message-files&gt;212 ··················ber/&lt;message-files&gt;
21.7 KB
./usr/share/doc/erlang-doc/html/lib/megaco-4.6/doc/html/megaco_encode.html
    
Offset 170, 67 lines modifiedOffset 170, 67 lines modified
170 ···························}170 ···························}
171 ···················}171 ···················}
172 ···········}172 ···········}
173 ···}</code></pre><p>Then·the·compact·version·without·indentation·and·with·short·keywords:</p><pre><code·class="text">173 ···}</code></pre><p>Then·the·compact·version·without·indentation·and·with·short·keywords:</p><pre><code·class="text">
174 ···!/1·[124.124.124.222]174 ···!/1·[124.124.124.222]
175 ···T=9998{C=-{SC=ROOT{SV{MT=RS,AD=55555,PF=ResGW/1,RE=&quot;901·Cold·Boot&quot;}}}}</code></pre><p>And·the·programmers·view·of·the·same·message.·First·a·list·of·ActionRequest175 ···T=9998{C=-{SC=ROOT{SV{MT=RS,AD=55555,PF=ResGW/1,RE=&quot;901·Cold·Boot&quot;}}}}</code></pre><p>And·the·programmers·view·of·the·same·message.·First·a·list·of·ActionRequest
176 records·are·constructed·and·then·it·is·sent·with·one·of·the·send·functions·in176 records·are·constructed·and·then·it·is·sent·with·one·of·the·send·functions·in
177 the·API:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="n">Prof</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ServiceChangeProfile&#39;</span><span·class="p"·data-group-id="8777349550-1">{</span><span·class="ss">profileName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;resgw&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·cl[·...·truncated·by·diffoscope;·len:·130,·SHA:·f76866e19a7e52382ae8888d7d4a8c82b9074d1f615c066e38fbede551a9a77d·...·]-1">}</span><span·class="p">,</span><span·class="w">177 the·API:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="n">Prof</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ServiceChangeProfile&#39;</span><span·class="p"·data-group-id="5691075734-1">{</span><span·class="ss">profileName</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;resgw&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·cl[·...·truncated·by·diffoscope;·len:·130,·SHA:·d8d5b9785c135909e101d329942f9f8ccb3db2e77a19880b569cc2c980af9d0a·...·]-1">}</span><span·class="p">,</span><span·class="w">
178 ··</span><span·class="n">Parm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ServiceChangeParm&#39;</span><span·class="p"·data-group-id="8777349550-2">{</span><span·class="ss">serviceChangeMethod</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">restart</span><span·class="p">,</span><span·class="w">178 ··</span><span·class="n">Parm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ServiceChangeParm&#39;</span><span·class="p"·data-group-id="5691075734-2">{</span><span·class="ss">serviceChangeMethod</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">restart</span><span·class="p">,</span><span·class="w">
179 ······························</span><span·class="ss">serviceChangeAddress</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8777349550-3">{</span><span·class="ss">portNumber</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">55555</span><span·class="p"·data-group-id="8777349550-3">}</span><span·class="p">,</span><span·class="w">179 ······························</span><span·class="ss">serviceChangeAddress</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5691075734-3">{</span><span·class="ss">portNumber</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">55555</span><span·class="p"·data-group-id="5691075734-3">}</span><span·class="p">,</span><span·class="w">
180 ······························</span><span·class="ss">serviceChangeReason</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;901·Cold·Boot&quot;</span><span·class="p">,</span><span·class="w">180 ······························</span><span·class="ss">serviceChangeReason</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;901·Cold·Boot&quot;</span><span·class="p">,</span><span·class="w">
181 ······························</span><span·class="ss">serviceChangeProfile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Prof</span><span·class="p"·data-group-id="8777349550-2">}</span><span·class="p">,</span><span·class="w">181 ······························</span><span·class="ss">serviceChangeProfile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Prof</span><span·class="p"·data-group-id="5691075734-2">}</span><span·class="p">,</span><span·class="w">
182 ··</span><span·class="n">Req</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ServiceChangeRequest&#39;</span><span·class="p"·data-group-id="8777349550-4">{</span><span·class="ss">terminationID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8777349550-5">[</span><span·class="o">?</span><span·class="ss">megaco_root_termination_id</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·fe2514d20fa2ab30b9bebcd48e171951b70c6b73e29ecacfc9278e03cf6b6d93·...·]-5">]</span><span·class="p">,</span><span·class="w">182 ··</span><span·class="n">Req</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ServiceChangeRequest&#39;</span><span·class="p"·data-group-id="5691075734-4">{</span><span·class="ss">terminationID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5691075734-5">[</span><span·class="o">?</span><span·class="ss">megaco_root_termination_id</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·537ed98341612c3a7438f1b866484a02e4361f8ddcc2472fce1ca06829720489·...·]-5">]</span><span·class="p">,</span><span·class="w">
183 ································</span><span·class="ss">serviceChangeParms</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Parm</span><span·class="p"·data-group-id="8777349550-4">}</span><span·class="p">,</span><span·class="w">183 ································</span><span·class="ss">serviceChangeParms</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Parm</span><span·class="p"·data-group-id="5691075734-4">}</span><span·class="p">,</span><span·class="w">
184 ··</span><span·class="n">Actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8777349550-6">[</span><span·class="o">#</span><span·class="ss">&#39;ActionRequest&#39;</span><span·class="p"·data-group-id="8777349550-7">{</span><span·class="ss">contextId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">megaco_null_context_id</span><span·class="p">,</span><span·class="w">184 ··</span><span·class="n">Actions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5691075734-6">[</span><span·class="o">#</span><span·class="ss">&#39;ActionRequest&#39;</span><span·class="p"·data-group-id="5691075734-7">{</span><span·class="ss">contextId</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">megaco_null_context_id</span><span·class="p">,</span><span·class="w">
185 ······························</span><span·class="ss">commandRequests</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8777349550-8">{</span><span·class="ss">serviceChangeReq</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="8777349550-8">}</span><span·class="p"·data-group-id="8777349550-7">}</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·fca806df801b131afbd7fce9fac3cfc763a4471d801ef613363ae6517f6b0f9b·...·]-6">]</span><span·class="p">,</span><span·class="w">185 ······························</span><span·class="ss">commandRequests</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5691075734-8">{</span><span·class="ss">serviceChangeReq</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Req</span><span·class="p"·data-group-id="5691075734-8">}</span><span·class="p"·data-group-id="5691075734-7">}</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·dc87bf34469336bd0fffb8457a6115f9424ee6bbef22d0ac4c5b41a223b073a6·...·]-6">]</span><span·class="p">,</span><span·class="w">
186 ··</span><span·class="nc">megaco</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8777349550-9">(</span><span·class="n">ConnHandle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Actions</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="8777349550-9">)[·...·truncated·by·diffoscope;·len:·217,·SHA:·83c1dc8f0f161d9974f83ae631ead867e3276178fb9adcdaa3b3926b81d91515·...·]-1">{</span><span·class="ss">&#39;MegacoMessage&#39;</span><span·class="p">,</span><span·class="w">186 ··</span><span·class="nc">megaco</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="5691075734-9">(</span><span·class="n">ConnHandle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Actions</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="5691075734-9">)[·...·truncated·by·diffoscope;·len:·217,·SHA:·a1029cbea5d9b1a275499101bad152a455889725b10b02a4186a9300a8b7a358·...·]-1">{</span><span·class="ss">&#39;MegacoMessage&#39;</span><span·class="p">,</span><span·class="w">
187 ···</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">187 ···</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
188 ···</span><span·class="p"·data-group-id="7330074394-2">{</span><span·class="ss">&#39;Message&#39;</span><span·class="p">,</span><span·class="w">188 ···</span><span·class="p"·data-group-id="6238030143-2">{</span><span·class="ss">&#39;Message&#39;</span><span·class="p">,</span><span·class="w">
189 ····</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">189 ····</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
190 ····</span><span·class="p"·data-group-id="7330074394-3">{</span><span·class="ss">ip4Address</span><span·class="p">,</span><span·class="p"·data-group-id="7330074394-4">{</span><span·class="ss">&#39;IP4Address&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·433,·SHA:·adb45f871e7256329ba408a70cdcdfbfb517cf9af25ac942061d8fa468d94808·...·]-3">}</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="p"·data-group-id="6238030143-3">{</span><span·class="ss">ip4Address</span><span·class="p">,</span><span·class="p"·data-group-id="6238030143-4">{</span><span·class="ss">&#39;IP4Address&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·433,·SHA:·b34b1ddc08ef08c33ab3272f7bee051561518bd62cac6e7ba2782b9356595b1a·...·]-3">}</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="p"·data-group-id="7330074394-6">{</span><span·class="ss">transactions</span><span·class="p">,</span><span·class="w">191 ····</span><span·class="p"·data-group-id="6238030143-6">{</span><span·class="ss">transactions</span><span·class="p">,</span><span·class="w">
192 ·····</span><span·class="p"·data-group-id="7330074394-7">[</span><span·class="w">192 ·····</span><span·class="p"·data-group-id="6238030143-7">[</span><span·class="w">
193 ······</span><span·class="p"·data-group-id="7330074394-8">{</span><span·class="ss">transactionRequest</span><span·class="p">,</span><span·class="w">193 ······</span><span·class="p"·data-group-id="6238030143-8">{</span><span·class="ss">transactionRequest</span><span·class="p">,</span><span·class="w">
194 ·······</span><span·class="p"·data-group-id="7330074394-9">{</span><span·class="ss">&#39;TransactionRequest&#39;</span><span·class="p">,</span><span·class="w">194 ·······</span><span·class="p"·data-group-id="6238030143-9">{</span><span·class="ss">&#39;TransactionRequest&#39;</span><span·class="p">,</span><span·class="w">
195 ·········</span><span·class="mi">9998</span><span·class="p">,</span><span·class="w">195 ·········</span><span·class="mi">9998</span><span·class="p">,</span><span·class="w">
196 ·········</span><span·class="p"·data-group-id="7330074394-10">[</span><span·class="p"·data-group-id="7330074394-11">{</span><span·class="ss">&#39;ActionRequest&#39;</span><span·class="p">,</span><span·class="w">196 ·········</span><span·class="p"·data-group-id="6238030143-10">[</span><span·class="p"·data-group-id="6238030143-11">{</span><span·class="ss">&#39;ActionRequest&#39;</span><span·class="p">,</span><span·class="w">
197 ···········</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">197 ···········</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
198 ···········</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">198 ···········</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
199 ···········</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">199 ···········</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
200 ···········</span><span·class="p"·data-group-id="7330074394-12">[</span><span·class="w">200 ···········</span><span·class="p"·data-group-id="6238030143-12">[</span><span·class="w">
201 ············</span><span·class="p"·data-group-id="7330074394-13">{</span><span·class="ss">&#39;CommandRequest&#39;</span><span·class="p">,</span><span·class="w">201 ············</span><span·class="p"·data-group-id="6238030143-13">{</span><span·class="ss">&#39;CommandRequest&#39;</span><span·class="p">,</span><span·class="w">
202 ·············</span><span·class="p"·data-group-id="7330074394-14">{</span><span·class="ss">serviceChangeReq</span><span·class="p">,</span><span·class="w">202 ·············</span><span·class="p"·data-group-id="6238030143-14">{</span><span·class="ss">serviceChangeReq</span><span·class="p">,</span><span·class="w">
203 ··············</span><span·class="p"·data-group-id="7330074394-15">{</span><span·class="ss">&#39;ServiceChangeRequest&#39;</span><span·class="p">,</span><span·class="w">203 ··············</span><span·class="p"·data-group-id="6238030143-15">{</span><span·class="ss">&#39;ServiceChangeRequest&#39;</span><span·class="p">,</span><span·class="w">
204 ···············</span><span·class="p"·data-group-id="7330074394-16">[</span><span·class="w">204 ···············</span><span·class="p"·data-group-id="6238030143-16">[</span><span·class="w">
205 ················</span><span·class="p"·data-group-id="7330074394-17">{</span><span·class="ss">megaco_term_id</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7330074394-18">[</span><span·class="s">[·...·truncated·by·diffoscope;·len:·172,·SHA:·5f43dd7b8b844767a38ccba1b5e4018ec62cfef31a997eccc8feb98996fc3296·...·]-16">]</span><span·class="p">,</span><span·class="w">205 ················</span><span·class="p"·data-group-id="6238030143-17">{</span><span·class="ss">megaco_term_id</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6238030143-18">[</span><span·class="s">[·...·truncated·by·diffoscope;·len:·172,·SHA:·1975d36333beb397d1ff390e29f9a64d2ef746772389bd98c5ce0d18666c6022·...·]-16">]</span><span·class="p">,</span><span·class="w">
206 ················</span><span·class="p"·data-group-id="7330074394-19">{</span><span·class="ss">&#39;ServiceChangeParm&#39;</span><span·class="p">,</span><span·class="w">206 ················</span><span·class="p"·data-group-id="6238030143-19">{</span><span·class="ss">&#39;ServiceChangeParm&#39;</span><span·class="p">,</span><span·class="w">
207 ·················</span><span·class="ss">restart</span><span·class="p">,</span><span·class="w">207 ·················</span><span·class="ss">restart</span><span·class="p">,</span><span·class="w">
208 ·················</span><span·class="p"·data-group-id="7330074394-20">{</span><span·class="ss">portNumber</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">55555</span><span·class="p"·data-group-id="7330074394-20">}</span><span·class="p">,</span><span·class="w">208 ·················</span><span·class="p"·data-group-id="6238030143-20">{</span><span·class="ss">portNumber</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">55555</span><span·class="p"·data-group-id="6238030143-20">}</span><span·class="p">,</span><span·class="w">
209 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">209 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
210 ·················</span><span·class="p"·data-group-id="7330074394-21">{</span><span·class="ss">&#39;ServiceChangeProfile&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;resgw&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·class=[·...·truncated·by·diffoscope;·len:·126,·SHA:·724fa01b4aebab8db5bb32d97306ff94a81331bcda9d25af85360a4cc82e3dba·...·]-21">}</span><span·class="p">,</span><span·class="w">210 ·················</span><span·class="p"·data-group-id="6238030143-21">{</span><span·class="ss">&#39;ServiceChangeProfile&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;resgw&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·class=[·...·truncated·by·diffoscope;·len:·126,·SHA:·cbb8429e513160972f6d815655f81026eb5d14303030efa4ebf7a9a76052a8fc·...·]-21">}</span><span·class="p">,</span><span·class="w">
211 ·················</span><span·class="s">&quot;901·MG·Cold·Boot&quot;</span><span·class="p">,</span><span·class="w">211 ·················</span><span·class="s">&quot;901·MG·Cold·Boot&quot;</span><span·class="p">,</span><span·class="w">
212 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">212 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
213 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">213 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
214 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="w">214 ·················</span><span·class="ss">asn1_NOVALUE</span><span·class="w">
215 ················</span><span·class="p"·data-group-id="7330074394-19">}</span><span·class="w">215 ················</span><span·class="p"·data-group-id="6238030143-19">}</span><span·class="w">
216 ··············</span><span·class="p"·data-group-id="7330074394-15">}</span><span·class="w">216 ··············</span><span·class="p"·data-group-id="6238030143-15">}</span><span·class="w">
217 ·············</span><span·class="p"·data-group-id="7330074394-14">}</span><span·class="p">,</span><span·class="w">217 ·············</span><span·class="p"·data-group-id="6238030143-14">}</span><span·class="p">,</span><span·class="w">
218 ·············</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">218 ·············</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
219 ·············</span><span·class="ss">asn1_NOVALUE</span><span·class="w">219 ·············</span><span·class="ss">asn1_NOVALUE</span><span·class="w">
220 ············</span><span·class="p"·data-group-id="7330074394-13">}</span><span·class="w">220 ············</span><span·class="p"·data-group-id="6238030143-13">}</span><span·class="w">
221 ···········</span><span·class="p"·data-group-id="7330074394-12">]</span><span·class="w">221 ···········</span><span·class="p"·data-group-id="6238030143-12">]</span><span·class="w">
222 ··········</span><span·class="p"·data-group-id="7330074394-11">}</span><span·class="w">222 ··········</span><span·class="p"·data-group-id="6238030143-11">}</span><span·class="w">
223 ·········</span><span·class="p"·data-group-id="7330074394-10">]</span><span·class="w">223 ·········</span><span·class="p"·data-group-id="6238030143-10">]</span><span·class="w">
224 ·······</span><span·class="p"·data-group-id="7330074394-9">}</span><span·class="w">224 ·······</span><span·class="p"·data-group-id="6238030143-9">}</span><span·class="w">
225 ······</span><span·class="p"·data-group-id="7330074394-8">}</span><span·class="w">225 ······</span><span·class="p"·data-group-id="6238030143-8">}</span><span·class="w">
226 ·····</span><span·class="p"·data-group-id="7330074394-7">]</span><span·class="w">226 ·····</span><span·class="p"·data-group-id="6238030143-7">]</span><span·class="w">
227 ····</span><span·class="p"·data-group-id="7330074394-6">}</span><span·class="w">227 ····</span><span·class="p"·data-group-id="6238030143-6">}</span><span·class="w">
228 ···</span><span·class="p"·data-group-id="7330074394-2">}</span><span·class="w">228 ···</span><span·class="p"·data-group-id="6238030143-2">}</span><span·class="w">
229 ··</span><span·class="p"·data-group-id="7330074394-1">}</span></code></pre><p>The·following·encoding·modules·are·provided:</p><ul><li>megaco_pretty_text_encoder·-·encodes·messages·into·pretty·text·format,·decodes229 ··</span><span·class="p"·data-group-id="6238030143-1">}</span></code></pre><p>The·following·encoding·modules·are·provided:</p><ul><li>megaco_pretty_text_encoder·-·encodes·messages·into·pretty·text·format,·decodes
230 both·pretty·as·well·as·compact·text.</li><li>megaco_compact_text_encoder·-·encodes·messages·into·compact·text·format,230 both·pretty·as·well·as·compact·text.</li><li>megaco_compact_text_encoder·-·encodes·messages·into·compact·text·format,
231 decodes·both·pretty·as·well·as·compact·text.</li><li>megaco_binary_encoder·-·encode/decode·ASN.1·BER·messages.·This·encoder231 decodes·both·pretty·as·well·as·compact·text.</li><li>megaco_binary_encoder·-·encode/decode·ASN.1·BER·messages.·This·encoder
232 implements·the·fastest·of·the·BER·encoders/decoders.·Recommended·binary·codec.</li><li>megaco_ber_encoder·-·encode/decode·ASN.1·BER·messages.</li><li>megaco_per_encoder·-·encode/decode·ASN.1·PER·messages.·N.B.·that·this·format232 implements·the·fastest·of·the·BER·encoders/decoders.·Recommended·binary·codec.</li><li>megaco_ber_encoder·-·encode/decode·ASN.1·BER·messages.</li><li>megaco_per_encoder·-·encode/decode·ASN.1·PER·messages.·N.B.·that·this·format
233 is·not·included·in·the·Megaco·standard.</li><li>megaco_erl_dist_encoder·-·encodes·messages·into·Erlangs·distribution·format.233 is·not·included·in·the·Megaco·standard.</li><li>megaco_erl_dist_encoder·-·encodes·messages·into·Erlangs·distribution·format.
234 It·is·rather·verbose·but·encoding·and·decoding·is·blinding·fast.·N.B.·that234 It·is·rather·verbose·but·encoding·and·decoding·is·blinding·fast.·N.B.·that
235 this·format·is·not·included·in·the·Megaco·standard.</li></ul><p><a·href=""·id="erl_dist_config"></a></p><h2·id="configuration-of-erlang-distribution-encoding-module"·class="section-heading">235 this·format·is·not·included·in·the·Megaco·standard.</li></ul><p><a·href=""·id="erl_dist_config"></a></p><h2·id="configuration-of-erlang-distribution-encoding-module"·class="section-heading">
236 ··<a·href="#configuration-of-erlang-distribution-encoding-module"·class="hover-link">236 ··<a·href="#configuration-of-erlang-distribution-encoding-module"·class="hover-link">
5.21 KB
./usr/share/doc/erlang-doc/html/lib/megaco-4.6/doc/html/megaco_examples.html
    
Offset 155, 18 lines modifiedOffset 155, 18 lines modified
155 synchronously·for·a·reply.</p><p>After·this·initial·service·change·message·the·connection·between·the·MG·and·MGC155 synchronously·for·a·reply.</p><p>After·this·initial·service·change·message·the·connection·between·the·MG·and·MGC
156 is·fully·established·and·supervised.</p><p>Assuming·that·the·MGC·is·started·on·the·local·host,·four·different·MG's,·using156 is·fully·established·and·supervised.</p><p>Assuming·that·the·MGC·is·started·on·the·local·host,·four·different·MG's,·using
157 text·over·TCP/IP,·binary·over·TCP/IP,·text·over·UDP/IP·and·binary·over·UDP/IP157 text·over·TCP/IP,·binary·over·TCP/IP,·text·over·UDP/IP·and·binary·over·UDP/IP
158 may·be·started·on·the·same·Erlang·node·with:</p><pre><code·class="text">······cd·megaco/examples/simple158 may·be·started·on·the·same·Erlang·node·with:</p><pre><code·class="text">······cd·megaco/examples/simple
159 ······erl·-pa·../../../megaco/ebin·-s·megaco_filter·-s·megaco159 ······erl·-pa·../../../megaco/ebin·-s·megaco_filter·-s·megaco
160 ······megaco_simple_mg:start().</code></pre><p>or·simply·'gmake·mg'.</p><p>If·you·&quot;only&quot;·want·to·start·a·single·MG·which·tries·to·connect·an·MG·on·a·host160 ······megaco_simple_mg:start().</code></pre><p>or·simply·'gmake·mg'.</p><p>If·you·&quot;only&quot;·want·to·start·a·single·MG·which·tries·to·connect·an·MG·on·a·host
161 named·&quot;baidarka&quot;,·you·may·use·one·of·these·functions·(instead·of·the161 named·&quot;baidarka&quot;,·you·may·use·one·of·these·functions·(instead·of·the
162 megaco_simple_mg:start/0·above):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_tcp_text</span><span·class="p"·data-group-id="7072573811-1">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7072573811-2">[</span><span·class="p"·data-group-id="7072573811-2">]</span><span·class="p"·data-group-id="707257[·...·truncated·by·diffoscope;·len:·4,·SHA:·52c5a260883bb90127eec9cdbac2f9e726dc8ad2a6543d20685eec4ebf7f76bc·...·]-1">)</span><span·class="p">.</span><span·class="w">162 megaco_simple_mg:start/0·above):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_tcp_text</span><span·class="p"·data-group-id="1465184158-1">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1465184158-2">[</span><span·class="p"·data-group-id="1465184158-2">]</span><span·class="p"·data-group-id="146518[·...·truncated·by·diffoscope;·len:·4,·SHA:·aae49ea590f262f6ac48c5b7ced9469d00f15c4c398533e0ff28c8cb590a4c64·...·]-1">)</span><span·class="p">.</span><span·class="w">
163 ······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_tcp_binary</span><span·class="p"·data-group-id="7072573811-3">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7072573811-4">[</span><span·class="p"·data-group-id="7072573811-4">]</span><span·class="p"·data-group-id="707257[·...·truncated·by·diffoscope;·len:·4,·SHA:·52c5a260883bb90127eec9cdbac2f9e726dc8ad2a6543d20685eec4ebf7f76bc·...·]-3">)</span><span·class="p">.</span><span·class="w">163 ······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_tcp_binary</span><span·class="p"·data-group-id="1465184158-3">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1465184158-4">[</span><span·class="p"·data-group-id="1465184158-4">]</span><span·class="p"·data-group-id="146518[·...·truncated·by·diffoscope;·len:·4,·SHA:·aae49ea590f262f6ac48c5b7ced9469d00f15c4c398533e0ff28c8cb590a4c64·...·]-3">)</span><span·class="p">.</span><span·class="w">
164 ······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_udp_text</span><span·class="p"·data-group-id="7072573811-5">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7072573811-6">[</span><span·class="p"·data-group-id="7072573811-6">]</span><span·class="p"·data-group-id="707257[·...·truncated·by·diffoscope;·len:·4,·SHA:·52c5a260883bb90127eec9cdbac2f9e726dc8ad2a6543d20685eec4ebf7f76bc·...·]-5">)</span><span·class="p">.</span><span·class="w">164 ······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_udp_text</span><span·class="p"·data-group-id="1465184158-5">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1465184158-6">[</span><span·class="p"·data-group-id="1465184158-6">]</span><span·class="p"·data-group-id="146518[·...·truncated·by·diffoscope;·len:·4,·SHA:·aae49ea590f262f6ac48c5b7ced9469d00f15c4c398533e0ff28c8cb590a4c64·...·]-5">)</span><span·class="p">.</span><span·class="w">
165 ······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_udp_binary</span><span·class="p"·data-group-id="7072573811-7">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7072573811-8">[</span><span·class="p"·data-group-id="7072573811-8">]</span><span·class="p"·data-group-id="707257[·...·truncated·by·diffoscope;·len:·4,·SHA:·52c5a260883bb90127eec9cdbac2f9e726dc8ad2a6543d20685eec4ebf7f76bc·...·]-7">)</span><span·class="p">.</span></code></pre><p>The·-s·megaco_filter·option·to·erl·implies,·the·event·tracing·mechanism·to·be165 ······</span><span·class="nc">megaco_simple_mg</span><span·class="p">:</span><span·class="nf">start_udp_binary</span><span·class="p"·data-group-id="1465184158-7">(</span><span·class="s">&quot;baidarka&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1465184158-8">[</span><span·class="p"·data-group-id="1465184158-8">]</span><span·class="p"·data-group-id="146518[·...·truncated·by·diffoscope;·len:·4,·SHA:·aae49ea590f262f6ac48c5b7ced9469d00f15c4c398533e0ff28c8cb590a4c64·...·]-7">)</span><span·class="p">.</span></code></pre><p>The·-s·megaco_filter·option·to·erl·implies,·the·event·tracing·mechanism·to·be
166 enabled·and·an·interactive·sequence·chart·tool·to·be·started.·This·may·be·quite166 enabled·and·an·interactive·sequence·chart·tool·to·be·started.·This·may·be·quite
167 useful·in·order·to·visualize·how·your·MG·interacts·with·the·Megaco/H.248167 useful·in·order·to·visualize·how·your·MG·interacts·with·the·Megaco/H.248
168 protocol·stack.</p><p>The·event·traces·may·alternatively·be·directed·to·a·file·for·later·analyze.·By168 protocol·stack.</p><p>The·event·traces·may·alternatively·be·directed·to·a·file·for·later·analyze.·By
169 default·the·event·tracing·is·disabled,·but·it·may·dynamically·be·enabled·without169 default·the·event·tracing·is·disabled,·but·it·may·dynamically·be·enabled·without
170 any·need·for·re-compilation·of·the·code.</p>170 any·need·for·re-compilation·of·the·code.</p>
171 </div>171 </div>
  
9.1 KB
./usr/share/doc/erlang-doc/html/lib/megaco-4.6/doc/html/megaco_user.html
    
Offset 129, 29 lines modifiedOffset 129, 29 lines modified
  
129 ····<section·id="moduledoc">129 ····<section·id="moduledoc">
130 <p>Callback·module·for·users·of·the·Megaco·application</p><p>This·module·defines·the·callback·behaviour·of·Megaco·users.·A·megaco_user130 <p>Callback·module·for·users·of·the·Megaco·application</p><p>This·module·defines·the·callback·behaviour·of·Megaco·users.·A·megaco_user
131 compliant·callback·module·must·export·the·following·functions:</p><ul><li><a·href="megaco_user.html#connect">handle_connect/2,3</a></li><li><a·href="megaco_user.html#disconnect">handle_disconnect/3</a></li><li><a·href="megaco_user.html#syntax_error">handle_syntax_error/3,4</a></li><li><a·href="megaco_user.html#message_error">handle_message_error/3,4</a></li><li><a·href="megaco_user.html#trans_request">handle_trans_request/3,4</a></li><li><a·href="megaco_user.html#trans_long_request">handle_trans_long_request/3,4</a></li><li><a·href="megaco_user.html#trans_reply">handle_trans_reply/4,5</a></li><li><a·href="megaco_user.html#trans_ack">handle_trans_ack/4,5</a></li><li><a·href="megaco_user.html#unexpected_trans">handle_unexpected_trans/3,4</a></li><li><a·href="megaco_user.html#request_abort">handle_trans_request_abort/4,5</a></li><li><a·href="megaco_user.html#segment_reply">handle_segment_reply/5,6</a></li></ul><p>The·semantics·of·them·and·their·exact·signatures·are·explained·below.</p><p>The·<code·class="inline">user_args</code>·configuration·parameter·which·may·be·used·to·extend·the·argument131 compliant·callback·module·must·export·the·following·functions:</p><ul><li><a·href="megaco_user.html#connect">handle_connect/2,3</a></li><li><a·href="megaco_user.html#disconnect">handle_disconnect/3</a></li><li><a·href="megaco_user.html#syntax_error">handle_syntax_error/3,4</a></li><li><a·href="megaco_user.html#message_error">handle_message_error/3,4</a></li><li><a·href="megaco_user.html#trans_request">handle_trans_request/3,4</a></li><li><a·href="megaco_user.html#trans_long_request">handle_trans_long_request/3,4</a></li><li><a·href="megaco_user.html#trans_reply">handle_trans_reply/4,5</a></li><li><a·href="megaco_user.html#trans_ack">handle_trans_ack/4,5</a></li><li><a·href="megaco_user.html#unexpected_trans">handle_unexpected_trans/3,4</a></li><li><a·href="megaco_user.html#request_abort">handle_trans_request_abort/4,5</a></li><li><a·href="megaco_user.html#segment_reply">handle_segment_reply/5,6</a></li></ul><p>The·semantics·of·them·and·their·exact·signatures·are·explained·below.</p><p>The·<code·class="inline">user_args</code>·configuration·parameter·which·may·be·used·to·extend·the·argument
132 list·of·the·callback·functions.·For·example,·the·handle_connect·function·takes132 list·of·the·callback·functions.·For·example,·the·handle_connect·function·takes
133 by·default·two·arguments:</p><pre><code·class="text">········handle_connect(Handle,·Version)</code></pre><p>but·if·the·<code·class="inline">user_args</code>·parameter·is·set·to·a·longer·list,·such·as133 by·default·two·arguments:</p><pre><code·class="text">········handle_connect(Handle,·Version)</code></pre><p>but·if·the·<code·class="inline">user_args</code>·parameter·is·set·to·a·longer·list,·such·as
134 <code·class="inline">[SomePid,SomeTableRef]</code>,·the·callback·function·is·expected·to·have·these·(in134 <code·class="inline">[SomePid,SomeTableRef]</code>,·the·callback·function·is·expected·to·have·these·(in
135 this·case·two)·extra·arguments·last·in·the·argument·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nf">handle_connect</span><span·class="p"·data-group-id="4750813787-1">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Version</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SomePid</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·74,·SHA:·2614c120cf99dbf5010b929fc7f1181bcd5438b2843304d0cb0090ad772c99df·...·]-1">)</span></code></pre><p><a·href=""·id="extra_argument"></a></p><blockquote><h4·class="info">Note</h4><p>Must·of·the·functions·below·has·an·optional·<code·class="inline">Extra</code>·argument·(e.g.135 this·case·two)·extra·arguments·last·in·the·argument·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="nf">handle_connect</span><span·class="p"·data-group-id="4648353048-1">(</span><span·class="n">Handle</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Version</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SomePid</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·74,·SHA:·eaca09ae2cc55c09c3c274fc4c4cdb435e1db775c242d0a0cddc002bd0a6ad3f·...·]-1">)</span></code></pre><p><a·href=""·id="extra_argument"></a></p><blockquote><h4·class="info">Note</h4><p>Must·of·the·functions·below·has·an·optional·<code·class="inline">Extra</code>·argument·(e.g.
136 <a·href="megaco_user.html#unexpected_trans">handle_unexpected_trans/4</a>).·The·functions136 <a·href="megaco_user.html#unexpected_trans">handle_unexpected_trans/4</a>).·The·functions
137 which·takes·this·argument·will·be·called·if·and·only·if·one·of·the·functions137 which·takes·this·argument·will·be·called·if·and·only·if·one·of·the·functions
138 <a·href="megaco.html#receive_message">receive_message/5</a>·or138 <a·href="megaco.html#receive_message">receive_message/5</a>·or
139 <a·href="megaco.html#process_received_message">process_received_message/5</a>·was·called139 <a·href="megaco.html#process_received_message">process_received_message/5</a>·was·called
140 with·the·<code·class="inline">Extra</code>·argument·different·than·<code·class="inline">ignore_extra</code>.</p></blockquote><h2·id="module-data-types"·class="section-heading">140 with·the·<code·class="inline">Extra</code>·argument·different·than·<code·class="inline">ignore_extra</code>.</p></blockquote><h2·id="module-data-types"·class="section-heading">
141 ··<a·href="#module-data-types"·class="hover-link">141 ··<a·href="#module-data-types"·class="hover-link">
142 ····<i·class="ri-link-m"·aria-hidden="true"></i>142 ····<i·class="ri-link-m"·aria-hidden="true"></i>
143 ··</a>143 ··</a>
144 ··<span·class="text">DATA·TYPES</span>144 ··<span·class="text">DATA·TYPES</span>
145 </h2>145 </h2>
146 <pre><code·class="makeup·erlang"·translate="no"><span·class="nf">action_request</span><span·class="p"·data-group-id="1385493028-1">(</span><span·class="p"·data-group-id="1385493028-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ActionRequest&#39;</span><span·class="p"·data-group-id="1385493[·...·truncated·by·diffoscope;·len:·56,·SHA:·3ec6945c0aa7d52a9badfc7a25c157efa038e0811dc22db2d390cdd5e2e6d4e9·...·]-2">}</span><span·class="w">146 <pre><code·class="makeup·erlang"·translate="no"><span·class="nf">action_request</span><span·class="p"·data-group-id="2976681120-1">(</span><span·class="p"·data-group-id="2976681120-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ActionRequest&#39;</span><span·class="p"·data-group-id="2976681[·...·truncated·by·diffoscope;·len:·56,·SHA:·311dba680a3ccce7147271ed4c6eede52d07cd90f965fd3a28024333d958505f·...·]-2">}</span><span·class="w">
147 </span><span·class="nf">action_reply</span><span·class="p"·data-group-id="1385493028-3">(</span><span·class="p"·data-group-id="1385493028-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ActionReply&#39;</span><span·class="p"·data-group-id="138549302[·...·truncated·by·diffoscope;·len:·54,·SHA:·3318c812d1da378a41948181db02af37cf905d39a03da65087591d9a84f8bb16·...·]-4">}</span><span·class="w">147 </span><span·class="nf">action_reply</span><span·class="p"·data-group-id="2976681120-3">(</span><span·class="p"·data-group-id="2976681120-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ActionReply&#39;</span><span·class="p"·data-group-id="297668112[·...·truncated·by·diffoscope;·len:·54,·SHA:·84ef750276ecf7a1f38bd00bfbdd2cfa85f0b7c7fd8ff4f64bf8083c1f561aa9·...·]-4">}</span><span·class="w">
148 </span><span·class="nf">error_desc</span><span·class="p"·data-group-id="1385493028-5">(</span><span·class="p"·data-group-id="1385493028-5">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ErrorDescriptor&#39;</span><span·class="p"·data-group-id="1385493028-6">{</span><span·class="p"·data-group-id="1385493028-6">}</span><span·class="w"> 
149 </span><span·class="nf">segment_no</span><span·class="p"·data-group-id="1385493028-7">(</span><span·class="p"·data-group-id="1385493028-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·654,·SHA:·90578b8c7543af04491820d49be374d498d7d32b45e440276d8b47e6dbd65eb8·...·]148 </span><span·class="nf">error_desc</span><span·class="p"·data-group-id="2976681120-5">(</span><span·class="p"·data-group-id="2976681120-5">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;ErrorDescriptor[·...·truncated·by·diffoscope;·len:·134,·SHA:·e0830576a3b66018f0085db9f9e5b8c1e094b04b2dc49a705137d1be3480a9be·...·]
 149 </span><span·class="nf">segment_no</span><span·class="p"·data-group-id="2976681120-7">(</span><span·class="p"·data-group-id="2976681120-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="2976681120-8">(</span><span·class="p"·data-group-id="2976681120-8">)</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">conn_handle</span><span·class="p"·data-group-id="0482296916-1">(</span><span·class="p"·data-group-id="0482296916-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">megaco_conn_handle</span><span·class="p"·data-group-id="0482296916-2">{</span><span·class="p"·data-group-id="0482296916-2">}</span></code></pre><p>The·record·initially·returned·by·<code·class="inline">megaco:connect/4,5</code>.·It·identifies·a·&quot;virtual&quot;
150 connection·and·may·be·reused·after·a·reconnect·(disconnect·+·connect).</p><pre><code·class="text">protocol_version()·=·integer()</code></pre><p>Is·the·actual·protocol·version.·In·most·cases·the·protocol·version·is·retrieved150 connection·and·may·be·reused·after·a·reconnect·(disconnect·+·connect).</p><pre><code·class="text">protocol_version()·=·integer()</code></pre><p>Is·the·actual·protocol·version.·In·most·cases·the·protocol·version·is·retrieved
151 from·the·processed·message,·but·there·are·exceptions:</p><ul><li>When·<code·class="inline">handle_connect/2,3</code>·is·triggered·by·an·explicit·call·to151 from·the·processed·message,·but·there·are·exceptions:</p><ul><li>When·<code·class="inline">handle_connect/2,3</code>·is·triggered·by·an·explicit·call·to
152 <code·class="inline">megaco:connect/4,5</code>.</li><li><a·href="#c:handle_disconnect/3"><code·class="inline">handle_disconnect/3</code></a></li><li><a·href="#c:handle_syntax_error/3"><code·class="inline">handle_syntax_error/3</code></a></li></ul><p>In·these·cases,·the·ProtocolVersion·default·version·is·obtained·from·the·static152 <code·class="inline">megaco:connect/4,5</code>.</li><li><a·href="#c:handle_disconnect/3"><code·class="inline">handle_disconnect/3</code></a></li><li><a·href="#c:handle_syntax_error/3"><code·class="inline">handle_syntax_error/3</code></a></li></ul><p>In·these·cases,·the·ProtocolVersion·default·version·is·obtained·from·the·static
153 connection·configuration:</p><ul><li><code·class="inline">megaco:conn_info(ConnHandle,·protocol_version)</code>.</li></ul><p><a·href=""·id="connect"></a></p>153 connection·configuration:</p><ul><li><code·class="inline">megaco:conn_info(ConnHandle,·protocol_version)</code>.</li></ul><p><a·href=""·id="connect"></a></p>
154 ····</section>154 ····</section>
  
155 </div>155 </div>
935 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia.epub
3.96 KB
zipinfo {}
Max HTML report size reached
63.4 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
3.59 KB
OEBPS/mnesia_registry.xhtml
Max HTML report size reached
46.8 KB
OEBPS/mnesia_chap7.xhtml
Max HTML report size reached
147 KB
OEBPS/mnesia_chap5.xhtml
Max HTML report size reached
141 KB
OEBPS/mnesia_chap4.xhtml
Max HTML report size reached
51.7 KB
OEBPS/mnesia_chap3.xhtml
Max HTML report size reached
161 KB
OEBPS/mnesia_chap2.xhtml
Max HTML report size reached
68.5 KB
OEBPS/mnesia_app_c.xhtml
Max HTML report size reached
133 KB
OEBPS/mnesia_app_b.xhtml
Max HTML report size reached
63.3 KB
OEBPS/mnesia_app_a.xhtml
Max HTML report size reached
50.6 KB
OEBPS/mnesia.xhtml
Max HTML report size reached
1.23 KB
OEBPS/content.opf
1.2 KB
OEBPS/content.opf
Max HTML report size reached
50.7 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia.html
    
Offset 162, 19 lines modifiedOffset 162, 19 lines modified
162 <code·class="inline">true</code>,·a·majority·of·the·table·replicas·must·be·available·for·an·update·to162 <code·class="inline">true</code>,·a·majority·of·the·table·replicas·must·be·available·for·an·update·to
163 succeed.·Majority·checking·can·be·enabled·on·tables·with·mission-critical163 succeed.·Majority·checking·can·be·enabled·on·tables·with·mission-critical
164 data,·where·it·is·vital·to·avoid·inconsistencies·because·of·network·splits.</p></li><li><p><code·class="inline">snmp</code>.·Each·(set-based)·Mnesia·table·can·be·automatically·turned·into·a164 data,·where·it·is·vital·to·avoid·inconsistencies·because·of·network·splits.</p></li><li><p><code·class="inline">snmp</code>.·Each·(set-based)·Mnesia·table·can·be·automatically·turned·into·a
165 Simple·Network·Management·Protocol·(SNMP)·ordered·table·as·well.·This·property165 Simple·Network·Management·Protocol·(SNMP)·ordered·table·as·well.·This·property
166 specifies·the·types·of·the·SNMP·keys.</p></li><li><p><code·class="inline">attributes</code>.·The·names·of·the·attributes·for·the·records·that·are·inserted·in166 specifies·the·types·of·the·SNMP·keys.</p></li><li><p><code·class="inline">attributes</code>.·The·names·of·the·attributes·for·the·records·that·are·inserted·in
167 the·table.</p></li></ul><p>For·information·about·the·complete·set·of·table·properties·and·their·details,167 the·table.</p></li></ul><p>For·information·about·the·complete·set·of·table·properties·and·their·details,
168 see·<a·href="#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>.</p><p>This·Reference·Manual·uses·a·table·of·persons·to·illustrate·various·examples.168 see·<a·href="#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>.</p><p>This·Reference·Manual·uses·a·table·of·persons·to·illustrate·various·examples.
169 The·following·record·definition·is·assumed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="8747491911-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8747491911-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">169 The·following·record·definition·is·assumed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="9791184611-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9791184611-2">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">
170 ·················</span><span·class="ss">age</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">170 ·················</span><span·class="ss">age</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
171 ·················</span><span·class="ss">address</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">171 ·················</span><span·class="ss">address</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">
172 ·················</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">172 ·················</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
173 ·················</span><span·class="ss">children</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8747491911-3">[</span><span·class="p"·data-group-id="8747491911-3">]</span><span·class="p"·data-group-id="8747491911-2">}</span><span·class="p"·data-group-id="8747491911-1">)</span><span·class="p">,</span></code></pre><p>The·first·record·attribute·is·the·primary·key,·or·key·for·short.</p><p>The·function·descriptions·are·sorted·in·alphabetical·order.·It·is·recommended·to173 ·················</span><span·class="ss">children</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9791184611-3">[</span><span·class="p"·data-group-id="9791184611-3">]</span><span·class="p"·data-group-id="9791184611-2">}</span><span·class="p"·data-group-id="9791184611-1">)</span><span·class="p">,</span></code></pre><p>The·first·record·attribute·is·the·primary·key,·or·key·for·short.</p><p>The·function·descriptions·are·sorted·in·alphabetical·order.·It·is·recommended·to
174 start·to·read·about·<a·href="#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>,·<a·href="#lock/2"><code·class="inline">mnesia:lock/2</code></a>,·and174 start·to·read·about·<a·href="#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>,·<a·href="#lock/2"><code·class="inline">mnesia:lock/2</code></a>,·and
175 ·<a·href="#activity/4"><code·class="inline">mnesia:activity/4</code></a>·before·you·continue·and·learn·about·the·rest.</p><p>Writing·or·deleting·in·transaction-context·creates·a·local·copy·of·each·modified175 ·<a·href="#activity/4"><code·class="inline">mnesia:activity/4</code></a>·before·you·continue·and·learn·about·the·rest.</p><p>Writing·or·deleting·in·transaction-context·creates·a·local·copy·of·each·modified
176 record·during·the·transaction.·During·iteration,·that·is,·<a·href="#foldl/4"><code·class="inline">mnesia:foldl/4</code></a>,176 record·during·the·transaction.·During·iteration,·that·is,·<a·href="#foldl/4"><code·class="inline">mnesia:foldl/4</code></a>,
177 <a·href="#foldr/4"><code·class="inline">mnesia:foldr/4</code></a>,·<a·href="#next/2"><code·class="inline">mnesia:next/2</code></a>,·<a·href="#prev/2"><code·class="inline">mnesia:prev/2</code></a>,·and·<a·href="#snmp_get_next_index/2"><code·class="inline">mnesia:snmp_get_next_index/2</code></a>,·Mnesia177 <a·href="#foldr/4"><code·class="inline">mnesia:foldr/4</code></a>,·<a·href="#next/2"><code·class="inline">mnesia:next/2</code></a>,·<a·href="#prev/2"><code·class="inline">mnesia:prev/2</code></a>,·and·<a·href="#snmp_get_next_index/2"><code·class="inline">mnesia:snmp_get_next_index/2</code></a>,·Mnesia
178 compensates·for·every·written·or·deleted·record,·which·can·reduce·the178 compensates·for·every·written·or·deleted·record,·which·can·reduce·the
179 performance.</p><p>If·possible,·avoid·writing·or·deleting·records·in·the·same·transaction·before179 performance.</p><p>If·possible,·avoid·writing·or·deleting·records·in·the·same·transaction·before
180 iterating·over·the·table.</p><h2·id="module-configuration-parameters"·class="section-heading">180 iterating·over·the·table.</p><h2·id="module-configuration-parameters"·class="section-heading">
Offset 2861, 15 lines modifiedOffset 2861, 15 lines modified
  
2861 ······<div·class="specs">2861 ······<div·class="specs">
  
2862 ··········<pre·translate="no"><span·class="attribute">-spec</span>·change_table_copy_type(Tab·::·<a·href="#t:table/0">table</a>(),·Node·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:node/0">node</a>(),·To·::·<a·href="#t:storage_type/0">storage_type</a>())·->·<a·href="#t:t_result/1">t_result</a>(ok).</pre>2862 ··········<pre·translate="no"><span·class="attribute">-spec</span>·change_table_copy_type(Tab·::·<a·href="#t:table/0">table</a>(),·Node·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:node/0">node</a>(),·To·::·<a·href="#t:storage_type/0">storage_type</a>())·->·<a·href="#t:t_result/1">t_result</a>(ok).</pre>
  
2863 ······</div>2863 ······</div>
  
2864 <p>Change·the·storage·type·of·a·table.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_copy_type</span><span·class="p"·data-group-id="8428674004-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="8428674004-2">(</span><span·class="p"·data-group-id="8428674004-2">)</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·102,·SHA:·72e00252d1983ed7dfb80775fba512bafeac2713398ed5b8302a12bd0a33ad68·...·]-1">)</span></code></pre><p>Transforms·the·<code·class="inline">person</code>·table·from·a·RAM·table·into·a·disc-based·table·at2864 <p>Change·the·storage·type·of·a·table.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_copy_type</span><span·class="p"·data-group-id="0828004365-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="0828004365-2">(</span><span·class="p"·data-group-id="0828004365-2">)</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·102,·SHA:·f16cb8228d6598234d20c2543e049bd2a73529b5dd79608c244380e935e9739f·...·]-1">)</span></code></pre><p>Transforms·the·<code·class="inline">person</code>·table·from·a·RAM·table·into·a·disc-based·table·at
2865 <code·class="inline">Node</code>.</p><p>This·function·can·also·be·used·to·change·the·storage·type·of·the·table·named2865 <code·class="inline">Node</code>.</p><p>This·function·can·also·be·used·to·change·the·storage·type·of·the·table·named
2866 <code·class="inline">schema</code>.·The·schema·table·can·only·have·<code·class="inline">ram_copies</code>·or·<code·class="inline">disc_copies</code>·as·the2866 <code·class="inline">schema</code>.·The·schema·table·can·only·have·<code·class="inline">ram_copies</code>·or·<code·class="inline">disc_copies</code>·as·the
2867 storage·type.·If·the·storage·type·of·the·schema·is·<code·class="inline">ram_copies</code>,·no·other·table2867 storage·type.·If·the·storage·type·of·the·schema·is·<code·class="inline">ram_copies</code>,·no·other·table
2868 can·be·disc-resident·on·that·node.</p>2868 can·be·disc-resident·on·that·node.</p>
2869 ··</section>2869 ··</section>
2870 </section>2870 </section>
2871 <section·class="detail"·id="change_table_frag/2">2871 <section·class="detail"·id="change_table_frag/2">
Offset 3112, 30 lines modifiedOffset 3112, 30 lines modified
3112 Therefore·applications·that·use·SNMP·to·manipulate·and·control·the·system·can3112 Therefore·applications·that·use·SNMP·to·manipulate·and·control·the·system·can
3113 be·designed·easily,·since·Mnesia·provides·a·direct·mapping·between·the·logical3113 be·designed·easily,·since·Mnesia·provides·a·direct·mapping·between·the·logical
3114 tables·that·make·up·an·SNMP·control·application·and·the·physical·data·that3114 tables·that·make·up·an·SNMP·control·application·and·the·physical·data·that
3115 makes·up·a·Mnesia·table.</p></li><li><p><code·class="inline">{storage_properties,·[{Backend,·Properties}]</code>·forwards·more·properties·to·the3115 makes·up·a·Mnesia·table.</p></li><li><p><code·class="inline">{storage_properties,·[{Backend,·Properties}]</code>·forwards·more·properties·to·the
3116 back·end·storage.·<code·class="inline">Backend</code>·can·currently·be·<code·class="inline">ets</code>·or·<code·class="inline">dets</code>.·<code·class="inline">Properties</code>·is3116 back·end·storage.·<code·class="inline">Backend</code>·can·currently·be·<code·class="inline">ets</code>·or·<code·class="inline">dets</code>.·<code·class="inline">Properties</code>·is
3117 a·list·of·options·sent·to·the·back·end·storage·during·table·creation.3117 a·list·of·options·sent·to·the·back·end·storage·during·table·creation.
3118 <code·class="inline">Properties</code>·cannot·contain·properties·already·used·by·Mnesia,·such·as·<code·class="inline">type</code>3118 <code·class="inline">Properties</code>·cannot·contain·properties·already·used·by·Mnesia,·such·as·<code·class="inline">type</code>
3119 or·<code·class="inline">named_table</code>.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="1351478660-1">(</span><span·class="ss">table</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1351478660-2">[</span><span·class="p"·data-group-id="1351478660-3">{</span><span·class="ss">ram_copies</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·689,·SHA:·8a60e64523a72f10a62bcbbe9785eab702ef877417c16ec620b36c00747cd89f·...·]-6">}</span><span·class="p">,</span><span·class="w">3119 or·<code·class="inline">named_table</code>.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0055315583-1">(</span><span·class="ss">table</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0055315583-2">[</span><span·class="p"·data-group-id="0055315583-3">{</span><span·class="ss">ram_copies</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·689,·SHA:·31f935506a3c98ee508d18c62ec76170f2e1e845ac192049dccf690d311f83ea·...·]-6">}</span><span·class="p">,</span><span·class="w">
3120 ·······</span><span·class="p"·data-group-id="1351478660-8">{</span><span·class="ss">storage_properties</span><span·class="p">,</span><span·class="w">3120 ·······</span><span·class="p"·data-group-id="0055315583-8">{</span><span·class="ss">storage_properties</span><span·class="p">,</span><span·class="w">
3121 ········</span><span·class="p"·data-group-id="1351478660-9">[</span><span·class="p"·data-group-id="1351478660-10">{</span><span·class="ss">ets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1351478660-11">[</span><span·class="ss">compressed</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·872,·SHA:·d98fc737c2b74cbb7abac301dd93912fe28bca0fd7221502aa1db9523b028540·...·]-1">)</span></code></pre></li><li><p><code·class="inline">{type,·Type}</code>,·where·<code·class="inline">Type</code>·must·be·either·of·the·atoms·<code·class="inline">set</code>,·<code·class="inline">ordered_set</code>,3121 ········</span><span·class="p"·data-group-id="0055315583-9">[</span><span·class="p"·data-group-id="0055315583-10">{</span><span·class="ss">ets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0055315583-11">[</span><span·class="ss">compressed</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·872,·SHA:·352dffb8384aecba72ddf207ad66aafbdd03bcba4a0afc99a5382513a2b7f140·...·]-1">)</span></code></pre></li><li><p><code·class="inline">{type,·Type}</code>,·where·<code·class="inline">Type</code>·must·be·either·of·the·atoms·<code·class="inline">set</code>,·<code·class="inline">ordered_set</code>,
3122 or·<code·class="inline">bag</code>.·Default·is·<code·class="inline">set</code>.·In·a·<code·class="inline">set</code>,·all·records·have·unique·keys.·In·a3122 or·<code·class="inline">bag</code>.·Default·is·<code·class="inline">set</code>.·In·a·<code·class="inline">set</code>,·all·records·have·unique·keys.·In·a
3123 <code·class="inline">bag</code>,·several·records·can·have·the·same·key,·but·the·record·content·is3123 <code·class="inline">bag</code>,·several·records·can·have·the·same·key,·but·the·record·content·is
3124 unique.·If·a·non-unique·record·is·stored,·the·old·conflicting·records·are3124 unique.·If·a·non-unique·record·is·stored,·the·old·conflicting·records·are
3125 overwritten.</p><p>Notice·that·currently·<code·class="inline">ordered_set</code>·is·not·supported·for·<code·class="inline">disc_only_copies</code>.</p></li><li><p><code·class="inline">{local_content,·Bool}</code>,·where·<code·class="inline">Bool</code>·is·<code·class="inline">true</code>·or·<code·class="inline">false</code>.·Default·is3125 overwritten.</p><p>Notice·that·currently·<code·class="inline">ordered_set</code>·is·not·supported·for·<code·class="inline">disc_only_copies</code>.</p></li><li><p><code·class="inline">{local_content,·Bool}</code>,·where·<code·class="inline">Bool</code>·is·<code·class="inline">true</code>·or·<code·class="inline">false</code>.·Default·is
3126 <code·class="inline">false</code>.</p></li></ul><p>For·example,·the·following·call·creates·the·<code·class="inline">person</code>·table·(defined·earlier)·and3126 <code·class="inline">false</code>.</p></li></ul><p>For·example,·the·following·call·creates·the·<code·class="inline">person</code>·table·(defined·earlier)·and
3127 replicates·it·on·two·nodes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="9301966119-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">3127 replicates·it·on·two·nodes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6763586296-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">
3128 ····</span><span·class="p"·data-group-id="9301966119-2">[</span><span·class="p"·data-group-id="9301966119-3">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9301966119-4">[</span><span·class="n">N1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N2</span><span·class="p"·data-group-id="9301966119-4">]</span><span·class="p"·data-group-id="9301966119-3">}</span><span·class="p">,</span><span·class="w"> 
3129 ·····</span><span·class="p"·data-group-id="9301966119-5">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="9301966119-6">(</span><span·class="ss">fields</[·...·truncated·by·diffoscope;·len:·412,·SHA:·50cfe15bacaaedb35bf5d8fd1fe0bc0ce6e0dd04f3c6428789d8d293858e02ce·...·]3128 ····</span><span·class="p"·data-group-id="6763586296-2">[</span><span·class="p"·data-group-id="6763586296-3">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6763586296-4">[</span><span·cl[·...·truncated·by·diffoscope;·len:·236,·SHA:·a2bc799c340b47ed1e7f523161fd7b4998e391918caf033bfd31d8aa944d7595·...·]
 3129 ·····</span><span·class="p"·data-group-id="6763586296-5">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6763586296-6">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">person</span><span·class="p"·data-group-id="6763586296-6">)</span><span·class="p"·data-group-id="6763586296-5">}</span><span·class="p"·data-group-id="6763586296-2">]</span><span·class="p"·data-group-id="6763586296-1">)</span><span·class="p">.</span></code></pre><p>If·it·is·required·that·Mnesia·must·build·and·maintain·an·extra·index·table·on
3130 attribute·<code·class="inline">address</code>·of·all·the·<code·class="inline">person</code>·records·that·are·inserted·in·the·table,3130 attribute·<code·class="inline">address</code>·of·all·the·<code·class="inline">person</code>·records·that·are·inserted·in·the·table,
3131 the·following·code·would·be·issued:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6423622103-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">3131 the·following·code·would·be·issued:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="9548930666-1">(</span><span·class="ss">person</span><span·class="p">,</span><span·class="w">
3132 ····</span><span·class="p"·data-group-id="6423622103-2">[</span><span·class="p"·data-group-id="6423622103-3">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6423622103-4">[</span><span·class="n">N1</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·146,·SHA:·4fb2035a0702768417f64b063703138d660accd4369b9fe9c30ab925de871065·...·]-3">}</span><span·class="p">,</span><span·class="w">3132 ····</span><span·class="p"·data-group-id="9548930666-2">[</span><span·class="p"·data-group-id="9548930666-3">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9548930666-4">[</span><span·class="n">N1</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·146,·SHA:·85144f084df26abe2d88eeaa7d8f876ba660c16c60e4969a153ebec58223ed85·...·]-3">}</span><span·class="p">,</span><span·class="w">
3133 ·····</span><span·class="p"·data-group-id="6423622103-5">{</span><span·class="ss">index</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6423622103-6">[</span><span·class="ss">address</span><span·class="p"·data-group-id="6423622103-6">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·495596ae150b94402e5cd1f2c3b0a595bcaf2bc15e96b1de1ba9b2bed2695d5b·...·]-5">}</span><span·class="p">,</span><span·class="w">3133 ·····</span><span·class="p"·data-group-id="9548930666-5">{</span><span·class="ss">index</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9548930666-6">[</span><span·class="ss">address</span><span·class="p"·data-group-id="9548930666-6">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·c4e8a206a280d662ff5d08021ee5faa569638435bb9fbb512b98690aa2379b91·...·]-5">}</span><span·class="p">,</span><span·class="w">
3134 ·····</span><span·class="p"·data-group-id="6423622103-7">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6423622103-8">(</span><span·class="ss">fields</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·244,·SHA:·812e78d8ba13b57f9292b04ade9459987a18982b63204dd03163c88b3abd9c8d·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·specification·of·<code·class="inline">index</code>·and·<code·class="inline">attributes</code>·can·be·hard-coded·as3134 ·····</span><span·class="p"·data-group-id="9548930666-7">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="9548930666-8">(</span><span·class="ss">fields</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·244,·SHA:·65b45ac159d82099bd678675612b6bce07fc23c61ce550dd68be1da8dcc32084·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·specification·of·<code·class="inline">index</code>·and·<code·class="inline">attributes</code>·can·be·hard-coded·as
3135 <code·class="inline">{index,·[2]}</code>·and·<code·class="inline">{attributes,·[name,·age,·address,·salary,·children]}</code>,3135 <code·class="inline">{index,·[2]}</code>·and·<code·class="inline">{attributes,·[name,·age,·address,·salary,·children]}</code>,
3136 respectively.</p><p><a·href="#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>·writes·records·into·the·table·<code·class="inline">schema</code>.·This·function,3136 respectively.</p><p><a·href="#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>·writes·records·into·the·table·<code·class="inline">schema</code>.·This·function,
3137 and·all·other·schema·manipulation·functions,·are·implemented·with·the·normal3137 and·all·other·schema·manipulation·functions,·are·implemented·with·the·normal
3138 transaction·management·system.·This·guarantees·that·schema·updates·are·performed3138 transaction·management·system.·This·guarantees·that·schema·updates·are·performed
3139 on·all·nodes·in·an·atomic·manner.</p>3139 on·all·nodes·in·an·atomic·manner.</p>
3140 ··</section>3140 ··</section>
3141 </section>3141 </section>
Offset 5377, 18 lines modifiedOffset 5377, 18 lines modified
5377 ······</div>5377 ······</div>
  
5378 <p>Select·the·objects·in·<code·class="inline">Tab</code>·against·<code·class="inline">MatchSpec</code>.</p><p>Matches·the·objects·in·table·<code·class="inline">Tab</code>·using·a·<code·class="inline">match_spec</code>·as·described·in·the5378 <p>Select·the·objects·in·<code·class="inline">Tab</code>·against·<code·class="inline">MatchSpec</code>.</p><p>Matches·the·objects·in·table·<code·class="inline">Tab</code>·using·a·<code·class="inline">match_spec</code>·as·described·in·the
5379 <a·href="../../../../lib/stdlib-6.0.1/doc/html/ets.html#select/3"><code·class="inline">ets:select/3</code></a>.·Optionally·a·lock·<code·class="inline">read</code>·or·<code·class="inline">write</code>·can·be·given·as·the·third5379 <a·href="../../../../lib/stdlib-6.0.1/doc/html/ets.html#select/3"><code·class="inline">ets:select/3</code></a>.·Optionally·a·lock·<code·class="inline">read</code>·or·<code·class="inline">write</code>·can·be·given·as·the·third
5380 argument.·Default·is·<code·class="inline">read</code>.·The·return·value·depends·on·<code·class="inline">MatchSpec</code>.</p><p>Notice·that·for·best·performance,·<code·class="inline">select</code>·is·to·be·used·before·any·modifying5380 argument.·Default·is·<code·class="inline">read</code>.·The·return·value·depends·on·<code·class="inline">MatchSpec</code>.</p><p>Notice·that·for·best·performance,·<code·class="inline">select</code>·is·to·be·used·before·any·modifying
5381 operations·are·done·on·that·table·in·the·same·transaction.·That·is,·do·not·use5381 operations·are·done·on·that·table·in·the·same·transaction.·That·is,·do·not·use
5382 <code·class="inline">write</code>·or·<code·class="inline">delete</code>·before·a·<code·class="inline">select</code>.</p><p>In·its·simplest·forms,·the·<code·class="inline">match_spec</code>·look·as·follows:</p><ul><li><code·class="inline">MatchSpec·=·[MatchFunction]</code></li><li><code·class="inline">MatchFunction·=·{MatchHead,·[Guard],·[Result]}</code></li><li><p><code·class="inline">MatchHead·=·tuple()·|·record()</code></p></li><li><code·class="inline">Guard·=·{&quot;Guardtest·name&quot;,·...}</code></li><li><code·class="inline">Result·=·&quot;Term·construct&quot;</code></li></ul><p>For·a·complete·description·of·<code·class="inline">select</code>,·see·the·<a·href="../../../../erts-15.0.1/doc/html/index.html">ERTS</a>5382 <code·class="inline">write</code>·or·<code·class="inline">delete</code>·before·a·<code·class="inline">select</code>.</p><p>In·its·simplest·forms,·the·<code·class="inline">match_spec</code>·look·as·follows:</p><ul><li><code·class="inline">MatchSpec·=·[MatchFunction]</code></li><li><code·class="inline">MatchFunction·=·{MatchHead,·[Guard],·[Result]}</code></li><li><p><code·class="inline">MatchHead·=·tuple()·|·record()</code></p></li><li><code·class="inline">Guard·=·{&quot;Guardtest·name&quot;,·...}</code></li><li><code·class="inline">Result·=·&quot;Term·construct&quot;</code></li></ul><p>For·a·complete·description·of·<code·class="inline">select</code>,·see·the·<a·href="../../../../erts-15.0.1/doc/html/index.html">ERTS</a>
5383 User's·Guide·and·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/ets.html"><code·class="inline">ets</code></a>·manual·page·in·STDLIB.</p><p>For·example,·to·find·the·names·of·all·male·persons·older·than·30·in·table·<code·class="inline">Tab</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">MatchHead</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2914977201-1">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sex</span><span·class="o">=</span><span·class="ss">male</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·287,·SHA:·81f9a0ab1c989ad86a9b7ee84cee97a5c7c7903a509ffbe9bde9a245a93841f1·...·]-1">}</span><span·class="p">,</span><span·class="w">5383 User's·Guide·and·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/ets.html"><code·class="inline">ets</code></a>·manual·page·in·STDLIB.</p><p>For·example,·to·find·the·names·of·all·male·persons·older·than·30·in·table·<code·class="inline">Tab</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">MatchHead</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2049131463-1">{</span><span·class="ss">name</span><span·class="o">=</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sex</span><span·class="o">=</span><span·class="ss">male</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·287,·SHA:·ae8db5562f0b4f6fcdd4c52c9f9577f2a2e4379015b087e2a45a701bc74116d6·...·]-1">}</span><span·class="p">,</span><span·class="w">
5384 </span><span·class="n">Guard</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2914977201-2">{</span><span·class="ss">&#39;&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">30</span><span·class="p"·data-group-id="29149772[·...·truncated·by·diffoscope;·len:·2,·SHA:·938db8c9f82c8cb58d3f3ef4fd250036a48d26a712753d2fde5abd03a85cabf4·...·]-2">}</span><span·class="p">,</span><span·class="w">5384 </span><span·class="n">Guard</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2049131463-2">{</span><span·class="ss">&#39;&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">30</span><span·class="p"·data-group-id="20491314[·...·truncated·by·diffoscope;·len:·2,·SHA:·da4ea2a5506f2693eae190d9360a1f31793c98a1adade51d93533a6f520ace1c·...·]-2">}</span><span·class="p">,</span><span·class="w">
5385 </span><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">5385 </span><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">
5386 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="2914977201-3">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="p"·data-group-id="2914977201-4">[</span><span·class="p"·data-group-id="2914977201-5">{</span><span·class="n">MatchHead</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·465,·SHA:·5bbb5cb44052024ca179cbbd7fe34d7561b17aa5953a5afd5deec8113273f140·...·]-3">)</span><span·class="p">,</span></code></pre>5386 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="2049131463-3">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="p"·data-group-id="2049131463-4">[</span><span·class="p"·data-group-id="2049131463-5">{</span><span·class="n">MatchHead</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·465,·SHA:·cd0dd2d6239937de80b49de5847bbad67b7ff214a1fe54869f8da64ed79671dd·...·]-3">)</span><span·class="p">,</span></code></pre>
5387 ··</section>5387 ··</section>
5388 </section>5388 </section>
5389 <section·class="detail"·id="select/4">5389 <section·class="detail"·id="select/4">
  
5390 ··<div·class="detail-header">5390 ··<div·class="detail-header">
5391 ····<a·href="#select/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">5391 ····<a·href="#select/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
5392 ······<i·class="ri-link-m"·aria-hidden="true"></i>5392 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 5675, 17 lines modifiedOffset 5675, 17 lines modified
5675 information·needed·is·information·about·the·key·types·in·the·table.·Multiple5675 information·needed·is·information·about·the·key·types·in·the·table.·Multiple
5676 keys·cannot·be·handled·in·Mnesia,·but·many·SNMP·tables·have·multiple·keys.5676 keys·cannot·be·handled·in·Mnesia,·but·many·SNMP·tables·have·multiple·keys.
5677 Therefore,·the·following·convention·is·used:·if·a·table·has·multiple·keys,·these5677 Therefore,·the·following·convention·is·used:·if·a·table·has·multiple·keys,·these
5678 must·always·be·stored·as·a·tuple·of·the·keys.·Information·about·the·key·types·is5678 must·always·be·stored·as·a·tuple·of·the·keys.·Information·about·the·key·types·is
5679 specified·as·a·tuple·of·atoms·describing·the·types.·The·only·significant·type·is5679 specified·as·a·tuple·of·atoms·describing·the·types.·The·only·significant·type·is
5680 <code·class="inline">fix_string</code>.·This·means·that·a·string·has·a·fixed·size.</p><p>For·example,·the·following·causes·table·<code·class="inline">person</code>·to·be·ordered·as·an·SNMP·table:</p><pre><code·class="text">mnesia:snmp_open_table(person,·[{key,·string}])</code></pre><p>Consider·the·following·schema·for·a·table·of·company·employees.·Each·employee·is5680 <code·class="inline">fix_string</code>.·This·means·that·a·string·has·a·fixed·size.</p><p>For·example,·the·following·causes·table·<code·class="inline">person</code>·to·be·ordered·as·an·SNMP·table:</p><pre><code·class="text">mnesia:snmp_open_table(person,·[{key,·string}])</code></pre><p>Consider·the·following·schema·for·a·table·of·company·employees.·Each·employee·is
5681 identified·by·department·number·and·name.·The·other·table·column·stores·the5681 identified·by·department·number·and·name.·The·other·table·column·stores·the
5682 telephone·number:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0570137525-1">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">5682 telephone·number:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="3556299066-1">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">
5683 ····</span><span·class="p"·data-group-id="0570137525-2">[</span><span·class="p"·data-group-id="0570137525-3">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0570137525-4">[</span><span·class="p"·data-group-id="0570137525-5">{</span[·...·truncated·by·diffoscope;·len:·438,·SHA:·a8ffd19a1b4912502aa604747aea40fcce35afaf89c6d025933413ddb6f18ea1·...·]-3">}</span><span·class="p">,</span><span·class="w">5683 ····</span><span·class="p"·data-group-id="3556299066-2">[</span><span·class="p"·data-group-id="3556299066-3">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3556299066-4">[</span><span·class="p"·data-group-id="3556299066-5">{</span[·...·truncated·by·diffoscope;·len:·438,·SHA:·f5402763adaca6429e786b436330f52af40d63710ca22499d06039250b00128f·...·]-3">}</span><span·class="p">,</span><span·class="w">
5684 ·····</span><span·class="p"·data-group-id="0570137525-7">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0570137525-8">(</span><span·class="ss">fields</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·247,·SHA:·743ebf5983bd8620d2ae868d39557cff883cec632a3ac6355cfda8fe9c22097b·...·]-1">)</span><span·class="p">,</span></code></pre><p>The·corresponding·SNMP·table·would·have·three·columns:·<code·class="inline">department</code>,·<code·class="inline">name</code>,·and5684 ·····</span><span·class="p"·data-group-id="3556299066-7">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="3556299066-8">(</span><span·class="ss">fields</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·247,·SHA:·91f5687ad2583cfe45e735de53f7e7bc9e1bf150eeab7d2fe53f1522bfba49ab·...·]-1">)</span><span·class="p">,</span></code></pre><p>The·corresponding·SNMP·table·would·have·three·columns:·<code·class="inline">department</code>,·<code·class="inline">name</code>,·and
5685 <code·class="inline">telno</code>.</p><p>An·option·is·to·have·table·columns·that·are·not·visible·through·the·SNMP5685 <code·class="inline">telno</code>.</p><p>An·option·is·to·have·table·columns·that·are·not·visible·through·the·SNMP
5686 protocol.·These·columns·must·be·the·last·columns·of·the·table.·In·the·previous5686 protocol.·These·columns·must·be·the·last·columns·of·the·table.·In·the·previous
5687 example,·the·SNMP·table·could·have·columns·<code·class="inline">department</code>·and·<code·class="inline">name</code>·only.·The5687 example,·the·SNMP·table·could·have·columns·<code·class="inline">department</code>·and·<code·class="inline">name</code>·only.·The
5688 application·could·then·use·column·<code·class="inline">telno</code>·internally,·but·it·would·not·be5688 application·could·then·use·column·<code·class="inline">telno</code>·internally,·but·it·would·not·be
5689 visible·to·the·SNMP·managers.</p><p>In·a·table·monitored·by·SNMP,·all·elements·must·be·integers,·strings,·or·lists5689 visible·to·the·SNMP·managers.</p><p>In·a·table·monitored·by·SNMP,·all·elements·must·be·integers,·strings,·or·lists
5690 of·integers.</p><p>When·a·table·is·SNMP·ordered,·modifications·are·more·expensive·than·usual,5690 of·integers.</p><p>When·a·table·is·SNMP·ordered,·modifications·are·more·expensive·than·usual,
5691 O(logN).·Also,·more·memory·is·used.</p><p>Notice·that·only·the·lexicographical·SNMP·ordering·is·implemented·in·Mnesia,·not5691 O(logN).·Also,·more·memory·is·used.</p><p>Notice·that·only·the·lexicographical·SNMP·ordering·is·implemented·in·Mnesia,·not
Offset 6280, 43 lines modifiedOffset 6280, 43 lines modified
  
6280 <p>Execute·<code·class="inline">Fun</code>·with·arguments·<code·class="inline">Args</code>·as·a·transaction.</p><p>The·code·that·executes·inside·the·transaction·can·consist·of·a·series·of·table6280 <p>Execute·<code·class="inline">Fun</code>·with·arguments·<code·class="inline">Args</code>·as·a·transaction.</p><p>The·code·that·executes·inside·the·transaction·can·consist·of·a·series·of·table
6281 manipulation·functions.·If·something·goes·wrong·inside·the·transaction·as·a6281 manipulation·functions.·If·something·goes·wrong·inside·the·transaction·as·a
6282 result·of·a·user·error·or·a·certain·table·not·being·available,·the·entire6282 result·of·a·user·error·or·a·certain·table·not·being·available,·the·entire
6283 transaction·is·terminated·and·the·function·<a·href="#transaction/1"><code·class="inline">transaction/1</code></a>6283 transaction·is·terminated·and·the·function·<a·href="#transaction/1"><code·class="inline">transaction/1</code></a>
6284 returns·the·tuple·<code·class="inline">{aborted,·Reason}</code>.</p><p>If·all·is·going·well,·<code·class="inline">{atomic,·ResultOfFun}</code>·is·returned,·where·<code·class="inline">ResultOfFun</code>6284 returns·the·tuple·<code·class="inline">{aborted,·Reason}</code>.</p><p>If·all·is·going·well,·<code·class="inline">{atomic,·ResultOfFun}</code>·is·returned,·where·<code·class="inline">ResultOfFun</code>
6285 is·the·value·of·the·last·expression·in·<code·class="inline">Fun</code>.</p><p>A·function·that·adds·a·family·to·the·database·can·be·written·as·follows·if·there6285 is·the·value·of·the·last·expression·in·<code·class="inline">Fun</code>.</p><p>A·function·that·adds·a·family·to·the·database·can·be·written·as·follows·if·there
6286 is·a·structure·<code·class="inline">{family,·Father,·Mother,·ChildrenList}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">add_family</span><span·class="p"·data-group-id="2652357042-1">(</span><span·class="p"·data-group-id="2652357042-2">{</span><span·class="ss">family</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·c[·...·truncated·by·diffoscope;·len:·166,·SHA:·9e4113cce4af8a38f8e985e7fd0305eeb9d40d5c0837813f58fbb284d2e473bb·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">6286 is·a·structure·<code·class="inline">{family,·Father,·Mother,·ChildrenList}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">add_family</span><span·class="p"·data-group-id="7391564538-1">(</span><span·class="p"·data-group-id="7391564538-2">{</span><span·class="ss">family</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·c[·...·truncated·by·diffoscope;·len:·166,·SHA:·a2f18f0b7e0b7dc81f49e8c9c9af9614f20b51359490b0c6dea77d24e51018be·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
6287 ····</span><span·class="n">ChildOids</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="2652357042-3">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">oid</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Children</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·35a1e981cb21ea60eaf6bdd6d32f78dcbbda63312d57c78ac493e983d292d4cf·...·]-3">)</span><span·class="p">,</span><span·class="w">6287 ····</span><span·class="n">ChildOids</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="7391564538-3">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">oid</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Children</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·912c93089cd0bbb3eaeeb9d1f850621f62038fdd60180ab30f5ee1c1c5729da0·...·]-3">)</span><span·class="p">,</span><span·class="w">
6288 ····</span><span·class="n">Trans</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2652357042-4">(</span><span·class="p"·data-group-id="2652357042-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">6288 ····</span><span·class="n">Trans</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7391564538-4">(</span><span·class="p"·data-group-id="7391564538-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
6289 ········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2652357042-5">(</span><span·class="n">F</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2652357042-6">{</span><span·class="ss">children</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ChildOids</span><span·class="p"·data-group-id="2652357042-6">}</span><span·class="p"·data-group-id="2652357042-5">)</span><span·class="p">,</span><span·class="w"> 
6290 ········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2652357042-7">(</span><span·class="n">M</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="2652357042-8">{</span><span·class="ss">children</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·129,·SHA:·02cc17b67863e6735a509fc651ff6da76fe6c5730345caea5bf619e2ba39b769·...·]">)</span><span·class="p">,</span><span·class="w">6289 ········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="7391564538-5">(</span><span·class="n">F</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="7391564538-6">{</span><span·class="ss">children</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·129,·SHA:·754bb3fc37333de9535ab666257db297c853ea1c4be3275db99c190d324db34a·...·]">)</span><span·class="p">,</span><span·class="w">
 6290 ········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="7391564538-7">(</span><span·class="n">M</span><span·class="o">#</span><span·class="ss">person</span><span·class="p"·data-group-id="7391564538-8">{</span><span·class="ss">children</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">ChildOids</span><span·class="p"·data-group-id="7391564538-8">}</span><span·class="p"·data-group-id="7391564538-7">)</span><span·class="p">,</span><span·class="w">
6291 ········</span><span·class="n">Write</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2652357042-9">(</span><span·class="n">Child</span><span·class="p"·data-group-id="2652357042-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write<[·...·truncated·by·diffoscope;·len:·129,·SHA:·557512562fa7c4c0c76afaf4d6ccff36ed6e448f88731957a06009f6e0d28de8·...·]-10">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">6291 ········</span><span·class="n">Write</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7391564538-9">(</span><span·class="n">Child</span><span·class="p"·data-group-id="7391564538-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write<[·...·truncated·by·diffoscope;·len:·129,·SHA:·a3ded9d1dfbfeaf9961e960f182043f49c828eee875b458d67836d8405448d81·...·]-10">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
6292 ········</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foreach</span><span·class="p"·data-group-id="2652357042-11">(</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Children</span><span·class="p"·data-group-id="2652357042-11">)</span><span·class="w">6292 ········</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foreach</span><span·class="p"·data-group-id="7391564538-11">(</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Children</span><span·class="p"·data-group-id="7391564538-11">)</span><span·class="w">
6293 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">6293 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
6294 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="2652357042-12">(</span><span·class="n">Trans</span><span·class="p"·data-group-id="2652357042-12">)</span><span·class="p">.</span><span·class="w">6294 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="7391564538-12">(</span><span·class="n">Trans</span><span·class="p"·data-group-id="7391564538-12">)</span><span·class="p">.</span><span·class="w">
  
6295 </span><span·class="nf">oid</span><span·class="p"·data-group-id="2652357042-13">(</span><span·class="n">Rec</span><span·class="p"·data-group-id="2652357042-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2652357042-14">{</span><span·class="nf">elemen[·...·truncated·by·diffoscope;·len:·542,·SHA:·f90a528e9c6e9b219ffabc9ad9c3bc788e3d2f79cf0829878bfd9c0e563fefc6·...·]-14">}</span><span·class="p">.</span></code></pre><p>This·code·adds·a·set·of·people·to·the·database.·Running·this·code·within·one6295 </span><span·class="nf">oid</span><span·class="p"·data-group-id="7391564538-13">(</span><span·class="n">Rec</span><span·class="p"·data-group-id="7391564538-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7391564538-14">{</span><span·class="nf">elemen[·...·truncated·by·diffoscope;·len:·542,·SHA:·26bf3a4dec79ac25a490486dad2f44c8f83063e17ffec3d33543932d5d0d37d0·...·]-14">}</span><span·class="p">.</span></code></pre><p>This·code·adds·a·set·of·people·to·the·database.·Running·this·code·within·one
6296 transaction·ensures·that·either·the·whole·family·is·added·to·the·database,·or6296 transaction·ensures·that·either·the·whole·family·is·added·to·the·database,·or
6297 the·whole·transaction·terminates.·For·example,·if·the·last·child·is·badly6297 the·whole·transaction·terminates.·For·example,·if·the·last·child·is·badly
6298 formatted,·or·the·executing·process·terminates·because·of·an·<code·class="inline">'EXIT'</code>·signal6298 formatted,·or·the·executing·process·terminates·because·of·an·<code·class="inline">'EXIT'</code>·signal
Max diff block lines reached; 7198/51825 bytes (13.89%) of diff not shown.
63.6 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_app_a.html
    
Offset 155, 160 lines modifiedOffset 155, 160 lines modified
155 </span><span·class="c1">%%</span><span·class="w">155 </span><span·class="c1">%%</span><span·class="w">
156 </span><span·class="c1">%%·The·NewOpaqueData·arguments·returned·by·restore·callback·functions·will</span><span·class="w">156 </span><span·class="c1">%%·The·NewOpaqueData·arguments·returned·by·restore·callback·functions·will</span><span·class="w">
157 </span><span·class="c1">%%·be·given·as·input·when·the·next·restore·callback·function·is·invoked</span><span·class="w">157 </span><span·class="c1">%%·be·given·as·input·when·the·next·restore·callback·function·is·invoked</span><span·class="w">
158 </span><span·class="c1">%%·If·any·return·value·does·not·match·{ok,·_}·the·restore·will·be·aborted.</span><span·class="w">158 </span><span·class="c1">%%·If·any·return·value·does·not·match·{ok,·_}·the·restore·will·be·aborted.</span><span·class="w">
159 </span><span·class="c1">%%</span><span·class="w">159 </span><span·class="c1">%%</span><span·class="w">
160 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">160 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
161 </span><span·class="w">161 </span><span·class="w">
162 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6785654069-1">(</span><span·class="ss">mnesia_backup</span><span·class="p"·data-group-id="6785654069-1">)</span><span·class="p">.</span><span·class="w">162 </span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1442824439-1">(</span><span·class="ss">mnesia_backup</span><span·class="p"·data-group-id="1442824439-1">)</span><span·class="p">.</span><span·class="w">
163 </span><span·class="w">163 </span><span·class="w">
164 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6785654069-2">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="6785654069-2">)</span><span·class="p">.</span><span·class="w">164 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="1442824439-2">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="1442824439-2">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="w">165 </span><span·class="w">
166 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6785654069-3">(</span><span·class="p"·data-group-id="6785654069-4">[</span><span·class="w">166 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1442824439-3">(</span><span·class="p"·data-group-id="1442824439-4">[</span><span·class="w">
167 »       ·</span><span·class="c1">%%·Write·access</span><span·class="w">167 »       ·</span><span·class="c1">%%·Write·access</span><span·class="w">
168 ·········</span><span·class="ss">open_write</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">168 ·········</span><span·class="ss">open_write</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
169 »       ·</span><span·class="ss">write</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">169 »       ·</span><span·class="ss">write</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
170 »       ·</span><span·class="ss">commit_write</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">170 »       ·</span><span·class="ss">commit_write</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
171 »       ·</span><span·class="ss">abort_write</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">171 »       ·</span><span·class="ss">abort_write</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
  
172 »       ·</span><span·class="c1">%%·Read·access</span><span·class="w">172 »       ·</span><span·class="c1">%%·Read·access</span><span·class="w">
173 ·········</span><span·class="ss">open_read</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">173 ·········</span><span·class="ss">open_read</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
174 »       ·</span><span·class="ss">read</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">174 »       ·</span><span·class="ss">read</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
175 »       ·</span><span·class="ss">close_read</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">175 »       ·</span><span·class="ss">close_read</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">
176 ········</span><span·class="p"·data-group-id="6785654069-4">]</span><span·class="p"·data-group-id="6785654069-3">)</span><span·class="p">.</span><span·class="w">176 ········</span><span·class="p"·data-group-id="1442824439-4">]</span><span·class="p"·data-group-id="1442824439-3">)</span><span·class="p">.</span><span·class="w">
  
177 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">177 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
178 </span><span·class="c1">%%·Backup·callback·interface</span><span·class="w">178 </span><span·class="c1">%%·Backup·callback·interface</span><span·class="w">
179 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="6785654069-5">(</span><span·class="ss">backup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6785654069-6">{</span><span·class="ss">tmp_file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file</[·...·truncated·by·diffoscope;·len:·179,·SHA:·3268fbdc2afbf1fd52f9a35b458848d54019494e79eec8250fd91a975430b8de·...·]9-5">)</span><span·class="p">.</span><span·class="w">179 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1442824439-5">(</span><span·class="ss">backup</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1442824439-6">{</span><span·class="ss">tmp_file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file</[·...·truncated·by·diffoscope;·len:·179,·SHA:·9c49522de0670305f0d24e63953b91dda5880954a33c8822ea70a0bd1290bc57·...·]9-5">)</span><span·class="p">.</span><span·class="w">
  
180 </span><span·class="c1">%%·Opens·backup·media·for·write</span><span·class="w">180 </span><span·class="c1">%%·Opens·backup·media·for·write</span><span·class="w">
181 </span><span·class="c1">%%</span><span·class="w">181 </span><span·class="c1">%%</span><span·class="w">
182 </span><span·class="c1">%%·Returns·{ok,·OpaqueData}·or·{error,·Reason}</span><span·class="w">182 </span><span·class="c1">%%·Returns·{ok,·OpaqueData}·or·{error,·Reason}</span><span·class="w">
183 </span><span·class="nf">open_write</span><span·class="p"·data-group-id="6785654069-7">(</span><span·class="n">OpaqueData</span><span·class="p"·data-group-id="6785654069-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">183 </span><span·class="nf">open_write</span><span·class="p"·data-group-id="1442824439-7">(</span><span·class="n">OpaqueData</span><span·class="p"·data-group-id="1442824439-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
184 ····</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">184 ····</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">
185 ····</span><span·class="n">Tmp</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">concat</span><span·class="p"·data-group-id="6785654069-8">(</span><span·class="p"·data-group-id="6785654069-9">[</span><span·class="n">File</span><span·class="p">,</span><span·class="s">&quot;.BUPTMP&quot;</span><span·class="p"·data-group-id="6785654069-9">]</span><span·class="p"·data-group-id="6785[·...·truncated·by·diffoscope;·len:·5,·SHA:·e6e1ae41c9c96f8141030c61ae0a7a422da85a40769b91b6b37200992463c8a4·...·]9-8">)</span><span·class="p">,</span><span·class="w">185 ····</span><span·class="n">Tmp</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">concat</span><span·class="p"·data-group-id="1442824439-8">(</span><span·class="p"·data-group-id="1442824439-9">[</span><span·class="n">File</span><span·class="p">,</span><span·class="s">&quot;.BUPTMP&quot;</span><span·class="p"·data-group-id="1442824439-9">]</span><span·class="p"·data-group-id="1442[·...·truncated·by·diffoscope;·len:·5,·SHA:·925c96980ae74a6cd3589191ebb46f6bbc9822a0108ca2c3d6761ae1eaee6016·...·]9-8">)</span><span·class="p">,</span><span·class="w">
186 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="6785654069-10">(</span><span·class="n">Tmp</span><span·class="p"·data-group-id="6785654069-10">)</span><span·class="p">,</span><span·class="w">186 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="1442824439-10">(</span><span·class="n">Tmp</span><span·class="p"·data-group-id="1442824439-10">)</span><span·class="p">,</span><span·class="w">
187 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="6785654069-11">(</span><span·class="p"·data-group-id="6785654069-12">[</span><span·class="p"·data-group-id="6785654069-13">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·131,·SHA:·521aabc8c602406a922c7c4615627c1c1ce66f2d499a47c73a67a89be03bf011·...·]9-13">}</span><span·class="p">,</span><span·class="w">187 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="1442824439-11">(</span><span·class="p"·data-group-id="1442824439-12">[</span><span·class="p"·data-group-id="1442824439-13">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·131,·SHA:·a2016beb794ac8912dee50704e74f2dd09cfc03f9cb85b95a020f25c490e6056·...·]9-13">}</span><span·class="p">,</span><span·class="w">
188 »       »       »       </span><span·class="p"·data-group-id="6785654069-15">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tmp</span><span·class="p"·data-group-id="6785654069-15">}</span><span·class="p">,</span><span·class="w">188 »       »       »       </span><span·class="p"·data-group-id="1442824439-15">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tmp</span><span·class="p"·data-group-id="1442824439-15">}</span><span·class="p">,</span><span·class="w">
189 »       »       »       </span><span·class="p"·data-group-id="6785654069-16">{</span><span·class="ss">repair</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="6785654069-16">}</span><span·class="p">,</span><span·class="w">189 »       »       »       </span><span·class="p"·data-group-id="1442824439-16">{</span><span·class="ss">repair</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="1442824439-16">}</span><span·class="p">,</span><span·class="w">
190 »       »       »       </span><span·class="p"·data-group-id="6785654069-17">{</span><span·class="ss">linkto</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="6785654069-18">(</span><span·class="p"·data-group-id="6785654069-18">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·129,·SHA:·8e70a29add45be1c280aea8b0321c161d185c281b9e302dc712b22638efde699·...·]9-11">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">190 »       »       »       </span><span·class="p"·data-group-id="1442824439-17">{</span><span·class="ss">linkto</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1442824439-18">(</span><span·class="p"·data-group-id="1442824439-18">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·129,·SHA:·56ccbebdc90967ad382063d633285b5bf5ae679d524e57e2e696104b26ff8883·...·]9-11">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
191 »       </span><span·class="p"·data-group-id="6785654069-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="6785654069-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 »       </span><span·class="p"·data-group-id="1442824439-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="1442824439-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 »       ····</span><span·class="p"·data-group-id="6785654069-20">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p"·data-group-id="6785654069-21">{</span><span·class="ss">tmp_file</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·526,·SHA:·742816d53cdf80e2a16bb7c4e7a4cee1ddc0750a17f32ba6e295e8e95b34fede·...·]9-20">}</span><span·class="p">;</span><span·class="w">192 »       ····</span><span·class="p"·data-group-id="1442824439-20">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p"·data-group-id="1442824439-21">{</span><span·class="ss">tmp_file</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·526,·SHA:·3dffd1f42ee4a982f1bee99d50d9ec47139ad84d296c75cda1b067a1f3627da8·...·]9-20">}</span><span·class="p">;</span><span·class="w">
193 »       </span><span·class="p"·data-group-id="6785654069-22">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-22">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 »       </span><span·class="p"·data-group-id="1442824439-22">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-22">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 »       ····</span><span·class="p"·data-group-id="6785654069-23">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-23">}</span><span·class="w">194 »       ····</span><span·class="p"·data-group-id="1442824439-23">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-23">}</span><span·class="w">
195 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">195 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="c1">%%·Writes·BackupItems·to·the·backup·media</span><span·class="w">196 </span><span·class="c1">%%·Writes·BackupItems·to·the·backup·media</span><span·class="w">
197 </span><span·class="c1">%%</span><span·class="w">197 </span><span·class="c1">%%</span><span·class="w">
198 </span><span·class="c1">%%·Returns·{ok,·OpaqueData}·or·{error,·Reason}</span><span·class="w">198 </span><span·class="c1">%%·Returns·{ok,·OpaqueData}·or·{error,·Reason}</span><span·class="w">
199 </span><span·class="nf">write</span><span·class="p"·data-group-id="6785654069-24">(</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BackupItems</span><span·class="p"·data-group-id="6785654069-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">199 </span><span·class="nf">write</span><span·class="p"·data-group-id="1442824439-24">(</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BackupItems</span><span·class="p"·data-group-id="1442824439-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
200 ····</span><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">200 ····</span><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">
201 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">log_terms</span><span·class="p"·data-group-id="6785654069-25">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BackupItems</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·24,·SHA:·ee8b06bf56f4d3c0f7c7510167c80341d8945c9c4cac4a5dacd53056fdcd89fc·...·]9-25">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">201 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">log_terms</span><span·class="p"·data-group-id="1442824439-25">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BackupItems</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·24,·SHA:·8d0c57d64ff03659348642c758a2caa8033a43adf71ef90880cd2a53107c8344·...·]9-25">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
202 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">202 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
203 ············</span><span·class="p"·data-group-id="6785654069-26">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="6785654069-26">}</span><span·class="p">;</span><span·class="w">203 ············</span><span·class="p"·data-group-id="1442824439-26">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="1442824439-26">}</span><span·class="p">;</span><span·class="w">
204 ········</span><span·class="p"·data-group-id="6785654069-27">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-27">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">204 ········</span><span·class="p"·data-group-id="1442824439-27">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-27">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
205 ············</span><span·class="nf">abort_write</span><span·class="p"·data-group-id="6785654069-28">(</span><span·class="n">B</span><span·class="p"·data-group-id="6785654069-28">)</span><span·class="p">,</span><span·class="w">205 ············</span><span·class="nf">abort_write</span><span·class="p"·data-group-id="1442824439-28">(</span><span·class="n">B</span><span·class="p"·data-group-id="1442824439-28">)</span><span·class="p">,</span><span·class="w">
206 ············</span><span·class="p"·data-group-id="6785654069-29">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-29">}</span><span·class="w">206 ············</span><span·class="p"·data-group-id="1442824439-29">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-29">}</span><span·class="w">
207 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">207 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
208 </span><span·class="c1">%%·Closes·the·backup·media·after·a·successful·backup</span><span·class="w">208 </span><span·class="c1">%%·Closes·the·backup·media·after·a·successful·backup</span><span·class="w">
209 </span><span·class="c1">%%</span><span·class="w">209 </span><span·class="c1">%%</span><span·class="w">
210 </span><span·class="c1">%%·Returns·{ok,·ReturnValueToUser}·or·{error,·Reason}</span><span·class="w">210 </span><span·class="c1">%%·Returns·{ok,·ReturnValueToUser}·or·{error,·Reason}</span><span·class="w">
211 </span><span·class="nf">commit_write</span><span·class="p"·data-group-id="6785654069-30">(</span><span·class="n">OpaqueData</span><span·class="p"·data-group-id="6785654069-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">211 </span><span·class="nf">commit_write</span><span·class="p"·data-group-id="1442824439-30">(</span><span·class="n">OpaqueData</span><span·class="p"·data-group-id="1442824439-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
212 ····</span><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">212 ····</span><span·class="n">B</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">
213 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">sync</span><span·class="p"·data-group-id="6785654069-31">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p"·data-group-id="6785654069-31">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">213 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">sync</span><span·class="p"·data-group-id="1442824439-31">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p"·data-group-id="1442824439-31">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
214 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6785654069-32">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p"·data-group-id="6785654069-32">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">215 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1442824439-32">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p"·data-group-id="1442824439-32">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
216 ················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 ················</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ····················</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="6785654069-33">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file</span><span·class="p"·data-group-id="6785654069-33">)</span><span·class="p">,</span><span·class="w">217 ····················</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="1442824439-33">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file</span><span·class="p"·data-group-id="1442824439-33">)</span><span·class="p">,</span><span·class="w">
218 »       »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">rename</span><span·class="p"·data-group-id="6785654069-34">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">tmp_file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="o">#</span><sp[·...·truncated·by·diffoscope;·len:·119,·SHA:·63dbc5336e46255e094e2b9f2cbb1c50d837bee6c06b04fd6c29eb151cf93798·...·]9-34">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">218 »       »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">rename</span><span·class="p"·data-group-id="1442824439-34">(</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">tmp_file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="o">#</span><sp[·...·truncated·by·diffoscope;·len:·119,·SHA:·8a175d65de032e0e5bcbd2b713b36710a48c627757dc7268ab5aa7862acc6667·...·]9-34">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
219 »       »       ·······</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 »       »       ·······</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 »       »       »       ····</span><span·class="p"·data-group-id="6785654069-35">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·11,·SHA:·36b8071261211a1ef948fc54451d0d7936f27c9035bc164230fb33869f51cfc2·...·]9-35">}</span><span·class="p">;</span><span·class="w">220 »       »       »       ····</span><span·class="p"·data-group-id="1442824439-35">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·11,·SHA:·7ff2118ff207262e551e40523eeda2bceddc786f35051be3faf97aa417b81883·...·]9-35">}</span><span·class="p">;</span><span·class="w">
221 »       »       ·······</span><span·class="p"·data-group-id="6785654069-36">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-36">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 »       »       ·······</span><span·class="p"·data-group-id="1442824439-36">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-36">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 »       »       »       ····</span><span·class="p"·data-group-id="6785654069-37">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-37">}</span><span·class="w">222 »       »       »       ····</span><span·class="p"·data-group-id="1442824439-37">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-37">}</span><span·class="w">
223 »       »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">223 »       »       ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
224 ················</span><span·class="p"·data-group-id="6785654069-38">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-38">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 ················</span><span·class="p"·data-group-id="1442824439-38">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-38">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 »       »       ····</span><span·class="p"·data-group-id="6785654069-39">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-39">}</span><span·class="w">225 »       »       ····</span><span·class="p"·data-group-id="1442824439-39">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-39">}</span><span·class="w">
226 ············</span><span·class="k">end</span><span·class="p">;</span><span·class="w">226 ············</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
227 ········</span><span·class="p"·data-group-id="6785654069-40">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-40">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 ········</span><span·class="p"·data-group-id="1442824439-40">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-40">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 ············</span><span·class="p"·data-group-id="6785654069-41">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-41">}</span><span·class="w">228 ············</span><span·class="p"·data-group-id="1442824439-41">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-41">}</span><span·class="w">
229 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">229 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
230 </span><span·class="c1">%%·Closes·the·backup·media·after·an·interrupted·backup</span><span·class="w">230 </span><span·class="c1">%%·Closes·the·backup·media·after·an·interrupted·backup</span><span·class="w">
231 </span><span·class="c1">%%</span><span·class="w">231 </span><span·class="c1">%%</span><span·class="w">
232 </span><span·class="c1">%%·Returns·{ok,·ReturnValueToUser}·or·{error,·Reason}</span><span·class="w">232 </span><span·class="c1">%%·Returns·{ok,·ReturnValueToUser}·or·{error,·Reason}</span><span·class="w">
233 </span><span·class="nf">abort_write</span><span·class="p"·data-group-id="6785654069-42">(</span><span·class="n">BackupRef</span><span·class="p"·data-group-id="6785654069-42">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">233 </span><span·class="nf">abort_write</span><span·class="p"·data-group-id="1442824439-42">(</span><span·class="n">BackupRef</span><span·class="p"·data-group-id="1442824439-42">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
234 ····</span><span·class="n">Res</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="6785654069-43">(</span><span·class="n">BackupRef</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p"·data-group-id="6785654069-43">)</span><span·class="p">,</span><span·class="w">234 ····</span><span·class="n">Res</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="1442824439-43">(</span><span·class="n">BackupRef</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file_desc</span><span·class="p"·data-group-id="1442824439-43">)</span><span·class="p">,</span><span·class="w">
235 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="6785654069-44">(</span><span·class="n">BackupRef</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">tmp_file</span><span·class="p"·data-group-id="6785654069-44">)</span><span·class="p">,</span><span·class="w">235 ····</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="1442824439-44">(</span><span·class="n">BackupRef</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">tmp_file</span><span·class="p"·data-group-id="1442824439-44">)</span><span·class="p">,</span><span·class="w">
236 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Res</span><span·class="w">·</span><span·class="k">of</span><span·class="w">236 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Res</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
237 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">237 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
238 ············</span><span·class="p"·data-group-id="6785654069-45">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BackupRef</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·19,·SHA:·10465d931ca0fc90b9e6f297a769a2382dd94fb3803f3dc2aa8055332c23045a·...·]9-45">}</span><span·class="p">;</span><span·class="w">238 ············</span><span·class="p"·data-group-id="1442824439-45">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BackupRef</span><span·class="o">#</span><span·class="ss">backup</span><span·class="p">.</span><span·class="ss">file</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·19,·SHA:·c4183c6a64099323d0beb884606212d47ef337ddfd23ebdad32e850c290ef1ab·...·]9-45">}</span><span·class="p">;</span><span·class="w">
239 ········</span><span·class="p"·data-group-id="6785654069-46">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-46">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">239 ········</span><span·class="p"·data-group-id="1442824439-46">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-46">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
240 ············</span><span·class="p"·data-group-id="6785654069-47">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-47">}</span><span·class="w">240 ············</span><span·class="p"·data-group-id="1442824439-47">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-47">}</span><span·class="w">
241 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">241 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
242 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">242 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
243 </span><span·class="c1">%%·Restore·callback·interface</span><span·class="w">243 </span><span·class="c1">%%·Restore·callback·interface</span><span·class="w">
244 </span><span·class="w">244 </span><span·class="w">
245 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="6785654069-48">(</span><span·class="ss">restore</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6785654069-49">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file_de[·...·truncated·by·diffoscope;·len:·179,·SHA:·ac2c253d8a53cfd14c689fe51c1c834a0395c8bb08cb57141ef30739d7f54cfc·...·]9-48">)</span><span·class="p">.</span><span·class="w">245 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1442824439-48">(</span><span·class="ss">restore</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1442824439-49">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file_de[·...·truncated·by·diffoscope;·len:·179,·SHA:·75390488ef84bbf45f992e1e482cf28530f0da4c28b7f43654a965643aa934c8·...·]9-48">)</span><span·class="p">.</span><span·class="w">
  
246 </span><span·class="c1">%%·Opens·backup·media·for·read</span><span·class="w">246 </span><span·class="c1">%%·Opens·backup·media·for·read</span><span·class="w">
247 </span><span·class="c1">%%</span><span·class="w">247 </span><span·class="c1">%%</span><span·class="w">
248 </span><span·class="c1">%%·Returns·{ok,·OpaqueData}·or·{error,·Reason}</span><span·class="w">248 </span><span·class="c1">%%·Returns·{ok,·OpaqueData}·or·{error,·Reason}</span><span·class="w">
249 </span><span·class="nf">open_read</span><span·class="p"·data-group-id="6785654069-50">(</span><span·class="n">OpaqueData</span><span·class="p"·data-group-id="6785654069-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">249 </span><span·class="nf">open_read</span><span·class="p"·data-group-id="1442824439-50">(</span><span·class="n">OpaqueData</span><span·class="p"·data-group-id="1442824439-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
250 ····</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">250 ····</span><span·class="n">File</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">OpaqueData</span><span·class="p">,</span><span·class="w">
251 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">read_file_info</span><span·class="p"·data-group-id="6785654069-51">(</span><span·class="n">File</span><span·class="p"·data-group-id="6785654069-51">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">251 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">read_file_info</span><span·class="p"·data-group-id="1442824439-51">(</span><span·class="n">File</span><span·class="p"·data-group-id="1442824439-51">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
252 »       </span><span·class="p"·data-group-id="6785654069-52">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-52">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">252 »       </span><span·class="p"·data-group-id="1442824439-52">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-52">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
253 »       ····</span><span·class="p"·data-group-id="6785654069-53">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-53">}</span><span·class="p">;</span><span·class="w">253 »       ····</span><span·class="p"·data-group-id="1442824439-53">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-53">}</span><span·class="p">;</span><span·class="w">
254 »       </span><span·class="p">_</span><span·class="n">FileInfo</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="c1">%%·file·exists</span><span·class="w">254 »       </span><span·class="p">_</span><span·class="n">FileInfo</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="c1">%%·file·exists</span><span·class="w">
255 »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="6785654069-54">(</span><span·class="p"·data-group-id="6785654069-55">[</span><span·class="p"·data-group-id="6785654069-56">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·cd5b195715db14427f6294162060f63e5385fa22c01f39783b3419a616e79bae·...·]9-56">}</span><span·class="p">,</span><span·class="w">255 »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="1442824439-54">(</span><span·class="p"·data-group-id="1442824439-55">[</span><span·class="p"·data-group-id="1442824439-56">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·6c6a1af3680c1bf84eb85e501f964190d190e41ba778c26b185c5c4a58ca8fb5·...·]9-56">}</span><span·class="p">,</span><span·class="w">
256 »       »       »       »       </span><span·class="p"·data-group-id="6785654069-57">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·data-group-id="6785654069-58">(</span><span·class="p"·data-group-id="6785654069-58">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·23,·SHA:·9bc409e46458a9066cb4fc99e040e2bcc6c1af32a82935556a6c7bdd4261e350·...·]9-57">}</span><span·class="p">,</span><span·class="w">256 »       »       »       »       </span><span·class="p"·data-group-id="1442824439-57">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">make_ref</span><span·class="p"·data-group-id="1442824439-58">(</span><span·class="p"·data-group-id="1442824439-58">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·23,·SHA:·f891ab8fc0ba5e20da629046aab9091ac9f33d114caef6d21ee8adff383f5cd1·...·]9-57">}</span><span·class="p">,</span><span·class="w">
257 »       »       »       »       </span><span·class="p"·data-group-id="6785654069-59">{</span><span·class="ss">repair</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="6785654069-59">}</span><span·class="p">,</span><span·class="w">257 »       »       »       »       </span><span·class="p"·data-group-id="1442824439-59">{</span><span·class="ss">repair</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="1442824439-59">}</span><span·class="p">,</span><span·class="w">
258 »       »       »       »       </span><span·class="p"·data-group-id="6785654069-60">{</span><span·class="ss">mode</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">read_only</span><span·class="p"·data-group-id="6785654069-60">}</span><span·class="p">,</span><span·class="w">258 »       »       »       »       </span><span·class="p"·data-group-id="1442824439-60">{</span><span·class="ss">mode</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">read_only</span><span·class="p"·data-group-id="1442824439-60">}</span><span·class="p">,</span><span·class="w">
259 »       »       »       »       </span><span·class="p"·data-group-id="6785654069-61">{</span><span·class="ss">linkto</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="6785654069-62">(</span><span·class="p"·data-group-id="6785654069-62">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·129,·SHA:·f3fa63b014fb45bea1f8c77c12637f5aedc9ef05d1e9e90aeaf7bfdee21a01c6·...·]9-54">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">259 »       »       »       »       </span><span·class="p"·data-group-id="1442824439-61">{</span><span·class="ss">linkto</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1442824439-62">(</span><span·class="p"·data-group-id="1442824439-62">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·129,·SHA:·1c0696a4ded38c155a6708681117648ddea35278b0afe9832e0128c9c84ae9f2·...·]9-54">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
260 »       »       </span><span·class="p"·data-group-id="6785654069-63">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="6785654069-63">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">260 »       »       </span><span·class="p"·data-group-id="1442824439-63">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="1442824439-63">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
261 »       »       ····</span><span·class="p"·data-group-id="6785654069-64">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">restore</span><span·class="p"·data-group-id="6785654069-65">{</span><span·class="ss">file</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·526,·SHA:·92833eb19f118bdcde4c50755b539e8091efe6bbd914a828bd85e663954f6117·...·]9-64">}</span><span·class="p">;</span><span·class="w">261 »       »       ····</span><span·class="p"·data-group-id="1442824439-64">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">restore</span><span·class="p"·data-group-id="1442824439-65">{</span><span·class="ss">file</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·526,·SHA:·9a8b9b46ff97b70fac417873660dc5abdb929d5ea863e897406487f8b864f49a·...·]9-64">}</span><span·class="p">;</span><span·class="w">
262 »       »       </span><span·class="p"·data-group-id="6785654069-66">{</span><span·class="ss">repaired</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·245,·SHA:·5d818fc8fc89bbb4043030eb003846a0fc04fb3204b9bfdafdbcc7a85a114842·...·]9-66">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">262 »       »       </span><span·class="p"·data-group-id="1442824439-66">{</span><span·class="ss">repaired</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·245,·SHA:·0324c2c6495ef4d54ceaa5e6430cd20a13391ec250265aa8248825e0ddc79420·...·]9-66">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
263 »       »       ····</span><span·class="p"·data-group-id="6785654069-68">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">restore</span><span·class="p"·data-group-id="6785654069-69">{</span><span·class="ss">file</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·526,·SHA:·87b620551b2d8b9ebb7106b02b93f9948f988d0e31133f541cddcfe15c56c702·...·]9-68">}</span><span·class="p">;</span><span·class="w">263 »       »       ····</span><span·class="p"·data-group-id="1442824439-68">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">restore</span><span·class="p"·data-group-id="1442824439-69">{</span><span·class="ss">file</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·526,·SHA:·5690fea562ad49ae0eb815bf9d1580ca32461ad09df87c418c6fc9a4acc82d40·...·]9-68">}</span><span·class="p">;</span><span·class="w">
264 »       »       </span><span·class="p"·data-group-id="6785654069-70">{</span><span·class="ss">repaired</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·56,·SHA:·4aac326ac708092f293c775f723f5dd90bbcd8b2a06038459f1e2967fa60876a·...·]9-70">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">264 »       »       </span><span·class="p"·data-group-id="1442824439-70">{</span><span·class="ss">repaired</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·56,·SHA:·9e8cf1c5257b1c63e1d59943f849eaceb23a302aee31f603cfe03d4def523074·...·]9-70">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
265 »       »       ····</span><span·class="p"·data-group-id="6785654069-71">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">restore</span><span·class="p"·data-group-id="6785654069-72">{</span><span·class="ss">file</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·526,·SHA:·f8664b4d8a995d17405a5ac2cb62699affb61fb8001cce70df75782fbd993230·...·]9-71">}</span><span·class="p">;</span><span·class="w">265 »       »       ····</span><span·class="p"·data-group-id="1442824439-71">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">restore</span><span·class="p"·data-group-id="1442824439-72">{</span><span·class="ss">file</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·526,·SHA:·87fa4a3a12596ff676e4f36135f5b8739dd70cef722fa7871bb245e0dc0da668·...·]9-71">}</span><span·class="p">;</span><span·class="w">
266 »       »       </span><span·class="p"·data-group-id="6785654069-73">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-73">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">266 »       »       </span><span·class="p"·data-group-id="1442824439-73">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-73">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
267 »       »       ····</span><span·class="p"·data-group-id="6785654069-74">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6785654069-74">}</span><span·class="w">267 »       »       ····</span><span·class="p"·data-group-id="1442824439-74">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1442824439-74">}</span><span·class="w">
268 »       ····</span><span·class="k">end</span><span·class="w">268 »       ····</span><span·class="k">end</span><span·class="w">
269 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">269 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
270 </span><span·class="c1">%%·Reads·BackupItems·from·the·backup·media</span><span·class="w">270 </span><span·class="c1">%%·Reads·BackupItems·from·the·backup·media</span><span·class="w">
271 </span><span·class="c1">%%</span><span·class="w">271 </span><span·class="c1">%%</span><span·class="w">
272 </span><span·class="c1">%%·Returns·{ok,·OpaqueData,·BackupItems}·or·{error,·Reason}</span><span·class="w">272 </span><span·class="c1">%%·Returns·{ok,·OpaqueData,·BackupItems}·or·{error,·Reason}</span><span·class="w">
Max diff block lines reached; 14518/64973 bytes (22.34%) of diff not shown.
134 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_app_b.html
    
Offset 127, 250 lines modifiedOffset 127, 250 lines modified
  
127 <h2·id="mnesia_access-callback-behavior"·class="section-heading">127 <h2·id="mnesia_access-callback-behavior"·class="section-heading">
128 ··<a·href="#mnesia_access-callback-behavior"·class="hover-link">128 ··<a·href="#mnesia_access-callback-behavior"·class="hover-link">
129 ····<i·class="ri-link-m"·aria-hidden="true"></i>129 ····<i·class="ri-link-m"·aria-hidden="true"></i>
130 ··</a>130 ··</a>
131 ··<span·class="text">mnesia_access·Callback·Behavior</span>131 ··<span·class="text">mnesia_access·Callback·Behavior</span>
132 </h2>132 </h2>
133 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3950561758-1">(</span><span·class="ss">mnesia_frag</span><span·class="p"·data-group-id="3950561758-1">)</span><span·class="p">.</span><span·class="w">133 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6145108632-1">(</span><span·class="ss">mnesia_frag</span><span·class="p"·data-group-id="6145108632-1">)</span><span·class="p">.</span><span·class="w">
  
134 </span><span·class="c1">%%·Callback·functions·when·accessed·within·an·activity</span><span·class="w">134 </span><span·class="c1">%%·Callback·functions·when·accessed·within·an·activity</span><span·class="w">
135 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3950561758-2">(</span><span·class="p"·data-group-id="3950561758-3">[</span><span·class="w">135 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6145108632-2">(</span><span·class="p"·data-group-id="6145108632-3">[</span><span·class="w">
136 »       ·</span><span·class="ss">lock</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">136 »       ·</span><span·class="ss">lock</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">
137 »       ·</span><span·class="ss">write</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete_object</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">137 »       ·</span><span·class="ss">write</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">delete_object</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">
138 »       ·</span><span·class="ss">read</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">match_object</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all_keys</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">138 »       ·</span><span·class="ss">read</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">match_object</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">all_keys</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">
139 »       ·</span><span·class="ss">select</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">select</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">select_cont</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">139 »       ·</span><span·class="ss">select</span><span·class="p">/</span><span·class="mi">5</span><span·class="p">,</span><span·class="ss">select</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="ss">select_cont</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
140 »       ·</span><span·class="ss">index_match_object</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">index_read</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">140 »       ·</span><span·class="ss">index_match_object</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">index_read</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">
141 »       ·</span><span·class="ss">foldl</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foldr</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">table_info</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">141 »       ·</span><span·class="ss">foldl</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foldr</span><span·class="p">/</span><span·class="mi">6</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">table_info</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">
142 »       ·</span><span·class="ss">first</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">next</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prev</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">last</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">142 »       ·</span><span·class="ss">first</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">next</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">prev</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">last</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
143 »       ·</span><span·class="ss">clear_table</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">143 »       ·</span><span·class="ss">clear_table</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">
144 ·······</span><span·class="p"·data-group-id="3950561758-3">]</span><span·class="p"·data-group-id="3950561758-2">)</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Callback·functions·which·provides·transparent</span><span·class="w">144 ·······</span><span·class="p"·data-group-id="6145108632-3">]</span><span·class="p"·data-group-id="6145108632-2">)</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Callback·functions·which·provides·transparent</span><span·class="w">
145 </span><span·class="c1">%%·access·of·fragmented·tables·from·any·activity</span><span·class="w">145 </span><span·class="c1">%%·access·of·fragmented·tables·from·any·activity</span><span·class="w">
146 </span><span·class="c1">%%·access·context.</span><span·class="w">146 </span><span·class="c1">%%·access·context.</span><span·class="w">
  
147 </span><span·class="nf">lock</span><span·class="p"·data-group-id="5935326037-1">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-2">{</span><span·class="ss">table<[·...·truncated·by·diffoscope;·len:·277,·SHA:·e044d220318063c6d3a4c328905f71a9c3641f65383d8ed149ada28333fe4653·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">147 </span><span·class="nf">lock</span><span·class="p"·data-group-id="7298989719-1">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-2">{</span><span·class="ss">table<[·...·truncated·by·diffoscope;·len:·277,·SHA:·e74948a81feb044b01c7a4b13d4658d4a383b1832bc149316487c879a3b08e9a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
148 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="5935326037-3">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">148 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="7298989719-3">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-3">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
149 »       </span><span·class="p"·data-group-id="5935326037-4">[</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-4">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 »       </span><span·class="p"·data-group-id="7298989719-4">[</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-4">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 »       ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="5935326037-5">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-6">{</span><span·class="ss">table<[·...·truncated·by·diffoscope;·len:·253,·SHA:·3a57e5e6e301edbe9db6b8d9d08c487a1f9f4edf6929c9d9d2f9405e480c5b53·...·]-5">)</span><span·class="p">;</span><span·class="w">150 »       ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="7298989719-5">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-6">{</span><span·class="ss">table<[·...·truncated·by·diffoscope;·len:·253,·SHA:·09f8519dc6736899192db7d08bc90496782775b472327e279afa3326ef6e3af7·...·]-5">)</span><span·class="p">;</span><span·class="w">
151 »       </span><span·class="n">Frags</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">151 »       </span><span·class="n">Frags</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
152 »       ····</span><span·class="n">DeepNs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-7">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="5935326037-8">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Op[·...·truncated·by·diffoscope;·len:·386,·SHA:·e9d3bd4339e1ca3c3b5ff6598dd7efea6f517a5001cb180029eb4e5fcf036f6f·...·]-8">)</span><span·class="w">·</span><span·class="p">||</span><span·class="w">152 »       ····</span><span·class="n">DeepNs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-7">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="7298989719-8">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Op[·...·truncated·by·diffoscope;·len:·386,·SHA:·76372671bbe990c8eba13cbd9a3c2b2f3e4a4ac09610784a12731dd960807fab·...·]-8">)</span><span·class="w">·</span><span·class="p">||</span><span·class="w">
153 »       »       »       ·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">Frags</span><span·class="p"·data-group-id="5935326037-7">]</span><span·class="p">,</span><span·class="w">153 »       »       »       ·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">Frags</span><span·class="p"·data-group-id="7298989719-7">]</span><span·class="p">,</span><span·class="w">
154 »       ····</span><span·class="nc">mnesia_lib</span><span·class="p">:</span><span·class="nf">uniq</span><span·class="p"·data-group-id="5935326037-10">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="5935326037-11">(</span><span·class="n">DeepNs</span><span·class="p"·data-group-id="5935326037-11">)</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·ca02412d1eb08926060d5ef636512095305c62dd9f652733044a86d2e08d1ca1·...·]-10">)</span><span·class="w">154 »       ····</span><span·class="nc">mnesia_lib</span><span·class="p">:</span><span·class="nf">uniq</span><span·class="p"·data-group-id="7298989719-10">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7298989719-11">(</span><span·class="n">DeepNs</span><span·class="p"·data-group-id="7298989719-11">)</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·9be304248e4319178e31abcf84016f5dfbac85b56c57f866a8baf2bfcbf8df25·...·]-10">)</span><span·class="w">
155 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">155 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
  
156 </span><span·class="nf">lock</span><span·class="p"·data-group-id="5935326037-12">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LockItem</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·76,·SHA:·9cd4e452bde309202860bc2355b2016f96e4b6044f5057df1865257160f31ca6·...·]-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">156 </span><span·class="nf">lock</span><span·class="p"·data-group-id="7298989719-12">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LockItem</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·76,·SHA:·ffaa172639c3fe910efb70030b1c62eb11a1fdd91db75d4b0c1e5d9f37432079·...·]-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
157 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="5935326037-13">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LockItem</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·76,·SHA:·9cd4e452bde309202860bc2355b2016f96e4b6044f5057df1865257160f31ca6·...·]-13">)</span><span·class="p">.</span><span·class="w">157 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="7298989719-13">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LockItem</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·76,·SHA:·ffaa172639c3fe910efb70030b1c62eb11a1fdd91db75d4b0c1e5d9f37432079·...·]-13">)</span><span·class="p">.</span><span·class="w">
  
158 </span><span·class="nf">write</span><span·class="p"·data-group-id="5935326037-14">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·1ecde87660750f1101a54ed587370fcf604d19b613247674452c665482f8e775·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">158 </span><span·class="nf">write</span><span·class="p"·data-group-id="7298989719-14">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·ab4cde3b2b853a2bafc1be7dc1635248588cc99f6705cf8782fe75f8b44bee12·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
159 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record_to_frag_name</span><span·class="p"·data-group-id="5935326037-15">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rec</span><span·class="p"·data-group-id="5935326037-15">)</span><span·class="p">,</span><span·class="w">159 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record_to_frag_name</span><span·class="p"·data-group-id="7298989719-15">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rec</span><span·class="p"·data-group-id="7298989719-15">)</span><span·class="p">,</span><span·class="w">
160 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="5935326037-16">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·6fb7d93ca243b42e8cebf45237eb3e03f2c6daba1eb27327a563369de9dea1e4·...·]-16">)</span><span·class="p">.</span><span·class="w">160 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="7298989719-16">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·23db05cffcce3c73ee8291008b7237bed43cf09fb758519b569f8aaf15fbcf12·...·]-16">)</span><span·class="p">.</span><span·class="w">
  
161 </span><span·class="nf">delete</span><span·class="p"·data-group-id="5935326037-17">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·57a59e4a6982ba3d6fd9362a338f13df2b581af383fd039272e3164b028e1cd1·...·]-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 </span><span·class="nf">delete</span><span·class="p"·data-group-id="7298989719-17">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·d47221b95bbb8b3fb286cf010846a580b7e59ad98f45f7793cb92e0d339a0e4e·...·]-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">key_to_frag_name</span><span·class="p"·data-group-id="5935326037-18">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="5935326037-18">)</span><span·class="p">,</span><span·class="w">162 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">key_to_frag_name</span><span·class="p"·data-group-id="7298989719-18">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7298989719-18">)</span><span·class="p">,</span><span·class="w">
163 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="5935326037-19">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·c180052a807e0ad6f55c07bbe5c9034340fbafb4af3d6c806bac5eb215455366·...·]-19">)</span><span·class="p">.</span><span·class="w">163 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="7298989719-19">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·0a66f9733e0ff4fc963fde5888bed5090be27466f5e006e851c8d3e09e094089·...·]-19">)</span><span·class="p">.</span><span·class="w">
  
164 </span><span·class="nf">delete_object</span><span·class="p"·data-group-id="5935326037-20">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·1ecde87660750f1101a54ed587370fcf604d19b613247674452c665482f8e775·...·]-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">164 </span><span·class="nf">delete_object</span><span·class="p"·data-group-id="7298989719-20">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·ab4cde3b2b853a2bafc1be7dc1635248588cc99f6705cf8782fe75f8b44bee12·...·]-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
165 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record_to_frag_name</span><span·class="p"·data-group-id="5935326037-21">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rec</span><span·class="p"·data-group-id="5935326037-21">)</span><span·class="p">,</span><span·class="w">165 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">record_to_frag_name</span><span·class="p"·data-group-id="7298989719-21">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rec</span><span·class="p"·data-group-id="7298989719-21">)</span><span·class="p">,</span><span·class="w">
166 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">delete_object</span><span·class="p"·data-group-id="5935326037-22">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·6fb7d93ca243b42e8cebf45237eb3e03f2c6daba1eb27327a563369de9dea1e4·...·]-22">)</span><span·class="p">.</span><span·class="w">166 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">delete_object</span><span·class="p"·data-group-id="7298989719-22">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·23db05cffcce3c73ee8291008b7237bed43cf09fb758519b569f8aaf15fbcf12·...·]-22">)</span><span·class="p">.</span><span·class="w">
  
167 </span><span·class="nf">read</span><span·class="p"·data-group-id="5935326037-23">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·57a59e4a6982ba3d6fd9362a338f13df2b581af383fd039272e3164b028e1cd1·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 </span><span·class="nf">read</span><span·class="p"·data-group-id="7298989719-23">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·145,·SHA:·d47221b95bbb8b3fb286cf010846a580b7e59ad98f45f7793cb92e0d339a0e4e·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">key_to_frag_name</span><span·class="p"·data-group-id="5935326037-24">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="5935326037-24">)</span><span·class="p">,</span><span·class="w">168 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">key_to_frag_name</span><span·class="p"·data-group-id="7298989719-24">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7298989719-24">)</span><span·class="p">,</span><span·class="w">
169 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="5935326037-25">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·c180052a807e0ad6f55c07bbe5c9034340fbafb4af3d6c806bac5eb215455366·...·]-25">)</span><span·class="p">.</span><span·class="w">169 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="7298989719-25">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·146,·SHA:·0a66f9733e0ff4fc963fde5888bed5090be27466f5e006e851c8d3e09e094089·...·]-25">)</span><span·class="p">.</span><span·class="w">
  
170 </span><span·class="nf">match_object</span><span·class="p"·data-group-id="5935326037-26">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·149,·SHA:·de98a212884997c5f934c64f60a5fcb8ec2e4d8b07a45ec26f0d6b24053ab73e·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">170 </span><span·class="nf">match_object</span><span·class="p"·data-group-id="7298989719-26">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·149,·SHA:·d41e45ae7eaf03c8e1a5ccf3d75e228f2155ece7ba14fa7b7c0d792198ddaad6·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
171 ····</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-27">[</span><span·class="p"·data-group-id="5935326037-28">{</span><span·class="n">HeadPat</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-29">[</span><span·class="p"·data-group-id="5935326037-29">][·...·truncated·by·diffoscope;·len:·294,·SHA:·c282e9ed85139a1abca3d9216a6f48b9af8ab0a5a8839949312e83a48198cbd7·...·]-27">]</span><span·class="p">,</span><span·class="w">171 ····</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-27">[</span><span·class="p"·data-group-id="7298989719-28">{</span><span·class="n">HeadPat</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-29">[</span><span·class="p"·data-group-id="7298989719-29">][·...·truncated·by·diffoscope;·len:·294,·SHA:·42824de97c3fefa3292031ab923b967a40c8e87b3ed2ee71b40757a295369031·...·]-27">]</span><span·class="p">,</span><span·class="w">
172 ····</span><span·class="nf">select</span><span·class="p"·data-group-id="5935326037-31">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·151,·SHA:·12cf7f769d3442b683cea208b97fb136ebbb33be99d8c8c0aefd4f2e4b355ba5·...·]-31">)</span><span·class="p">.</span><span·class="w">172 ····</span><span·class="nf">select</span><span·class="p"·data-group-id="7298989719-31">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·151,·SHA:·fb758b778e45b7fdec2861ae5044e74305e1b6327731ecf596ab5e1838b72a8e·...·]-31">)</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="nf">select</span><span·class="p"·data-group-id="5935326037-32">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·151,·SHA:·12cf7f769d3442b683cea208b97fb136ebbb33be99d8c8c0aefd4f2e4b355ba5·...·]-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">select</span><span·class="p"·data-group-id="7298989719-32">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·151,·SHA:·fb758b778e45b7fdec2861ae5044e74305e1b6327731ecf596ab5e1838b72a8e·...·]-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="nf">do_select</span><span·class="p"·data-group-id="5935326037-33">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·151,·SHA:·12cf7f769d3442b683cea208b97fb136ebbb33be99d8c8c0aefd4f2e4b355ba5·...·]-33">)</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="nf">do_select</span><span·class="p"·data-group-id="7298989719-33">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·151,·SHA:·fb758b778e45b7fdec2861ae5044e74305e1b6327731ecf596ab5e1838b72a8e·...·]-33">)</span><span·class="p">.</span><span·class="w">
  
  
175 </span><span·class="nf">select</span><span·class="p"·data-group-id="5935326037-34">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·227,·SHA:·5a551dd690a600919e94cf3f80eff6cc888a327bb6615c185d3cee4876ca9038·...·]-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 </span><span·class="nf">select</span><span·class="p"·data-group-id="7298989719-34">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·227,·SHA:·25f31bb9b4baf2bc87f0f3696baedf1360384919200e2f32d045c385d743d85f·...·]-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ····</span><span·class="nf">init_select</span><span·class="p"·data-group-id="5935326037-35">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·227,·SHA:·5a551dd690a600919e94cf3f80eff6cc888a327bb6615c185d3cee4876ca9038·...·]-35">)</span><span·class="p">.</span><span·class="w">176 ····</span><span·class="nf">init_select</span><span·class="p"·data-group-id="7298989719-35">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·227,·SHA:·25f31bb9b4baf2bc87f0f3696baedf1360384919200e2f32d045c385d743d85f·...·]-35">)</span><span·class="p">.</span><span·class="w">
  
  
177 </span><span·class="nf">all_keys</span><span·class="p"·data-group-id="5935326037-36">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·71,·SHA:·7c9d4e033153d9819fd1c0dab7fe9c7ac1bb64cf357d7bce18d3de2431b7784b·...·]-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">all_keys</span><span·class="p"·data-group-id="7298989719-36">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·71,·SHA:·53aacd22cc6670fbe151b6f43c7f91f5aefa4b7acd51c29021b5993b2079009c·...·]-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ····</span><span·class="n">Match</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-37">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">all_keys</span><span·class="p"·data-group-id="5935326037-38">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·212,·SHA:·1e1e6456b12c49b4f9bc14f074ecf06f8a5ad21fb35b36f407645ef1e309345f·...·]-38">)</span><span·class="w">178 ····</span><span·class="n">Match</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-37">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">all_keys</span><span·class="p"·data-group-id="7298989719-38">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·212,·SHA:·de26ffd5622ac1174f0799101f7161f8e938421c6fcb236411f42f9a354d386a·...·]-38">)</span><span·class="w">
179 »       ·····</span><span·class="p">||</span><span·class="w">·</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="5935326037-39">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-39">)</span><span·class="p"·data-group-id="5935326037-37">]</span><span·class="p">,</span><span·class="w">179 »       ·····</span><span·class="p">||</span><span·class="w">·</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="7298989719-39">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-39">)</span><span·class="p"·data-group-id="7298989719-37">]</span><span·class="p">,</span><span·class="w">
180 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="5935326037-40">(</span><span·class="n">Match</span><span·class="p"·data-group-id="5935326037-40">)</span><span·class="p">.</span><span·class="w">180 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7298989719-40">(</span><span·class="n">Match</span><span·class="p"·data-group-id="7298989719-40">)</span><span·class="p">.</span><span·class="w">
  
181 </span><span·class="nf">clear_table</span><span·class="p"·data-group-id="5935326037-41">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·66,·SHA:·cf78ec7e91a12d99c8432d8a45b6d17b0f4377817d93be26c2f4a6b4b54e3641·...·]-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">181 </span><span·class="nf">clear_table</span><span·class="p"·data-group-id="7298989719-41">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·66,·SHA:·64ccb3c1ec7f721ff145d122226093f5ffce282e4f7ee1632a5b7f27f56fb676·...·]-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
182 ····</span><span·class="p"·data-group-id="5935326037-42">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">clear_table</span><span·class="p"·data-group-id="5935326037-43">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·609,·SHA:·1dddf3a087551ce55443936ef6fa72e7c26c729c5294ab00097bfd0f66b075de·...·]-42">]</span><span·class="p">,</span><span·class="w">182 ····</span><span·class="p"·data-group-id="7298989719-42">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">clear_table</span><span·class="p"·data-group-id="7298989719-43">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·609,·SHA:·5c36811b9bdb9958c238265b46c2f35cc5e719d5c4447c90cdb2dc47d000bcbd·...·]-42">]</span><span·class="p">,</span><span·class="w">
183 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">183 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
184 </span><span·class="nf">index_match_object</span><span·class="p"·data-group-id="5935326037-45">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·220,·SHA:·0ffc7c31e9cfa96e0d059a5c5fdd175ada1e855e11b71572ff9d04b64bc67163·...·]-45">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 </span><span·class="nf">index_match_object</span><span·class="p"·data-group-id="7298989719-45">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·220,·SHA:·85bae284b4436a61fe031685b23e1044873f14c06f024f658c82e36f6bacb18f·...·]-45">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ····</span><span·class="n">Match</span><span·class="w">·</span><span·class="o">=</span><span·class="w">185 ····</span><span·class="n">Match</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
186 »       </span><span·class="p"·data-group-id="5935326037-46">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">index_match_object</span><span·class="p"·data-group-id="5935326037-47">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·371,·SHA:·932b3d1077fad11e1e4af406b70ae9fe62716b7836e307e1d85960a365ba54cc·...·]-47">)</span><span·class="w">186 »       </span><span·class="p"·data-group-id="7298989719-46">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">index_match_object</span><span·class="p"·data-group-id="7298989719-47">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·371,·SHA:·0bc98a8317398f385e2e055aa284e9ef8785446d946aed8407a38c947060eec0·...·]-47">)</span><span·class="w">
187 »       ·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="5935326037-48">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-48">)</span><span·class="p"·data-group-id="5935326037-46">]</span><span·class="p">,</span><span·class="w">187 »       ·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="7298989719-48">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-48">)</span><span·class="p"·data-group-id="7298989719-46">]</span><span·class="p">,</span><span·class="w">
188 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="5935326037-49">(</span><span·class="n">Match</span><span·class="p"·data-group-id="5935326037-49">)</span><span·class="p">.</span><span·class="w">188 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7298989719-49">(</span><span·class="n">Match</span><span·class="p"·data-group-id="7298989719-49">)</span><span·class="p">.</span><span·class="w">
  
189 </span><span·class="nf">index_read</span><span·class="p"·data-group-id="5935326037-50">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·220,·SHA:·166f9132ad5909b00b9a801e32afcaa4f5e5970e690329616658aaea1e5ff254·...·]-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 </span><span·class="nf">index_read</span><span·class="p"·data-group-id="7298989719-50">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·220,·SHA:·d26ff64c4488e473e75f4cdd8d26ff7642cce8f37f2d318025579744b9993ce3·...·]-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="n">Match</span><span·class="w">·</span><span·class="o">=</span><span·class="w">190 ····</span><span·class="n">Match</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
191 »       </span><span·class="p"·data-group-id="5935326037-51">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">index_read</span><span·class="p"·data-group-id="5935326037-52">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·363,·SHA:·36bc7affcc600790a964a46b35deb5ad6cbe4b85e72a77b778f7cedea594579e·...·]-52">)</span><span·class="w">191 »       </span><span·class="p"·data-group-id="7298989719-51">[</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">index_read</span><span·class="p"·data-group-id="7298989719-52">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·363,·SHA:·ddea82c75df4a4671481942cb47b4b75521228937b5d1fb9c90c2dacd4eebefc·...·]-52">)</span><span·class="w">
192 »       ·····</span><span·class="p">||</span><span·class="w">·</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="5935326037-53">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-53">)</span><span·class="p"·data-group-id="5935326037-51">]</span><span·class="p">,</span><span·class="w">192 »       ·····</span><span·class="p">||</span><span·class="w">·</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="7298989719-53">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-53">)</span><span·class="p"·data-group-id="7298989719-51">]</span><span·class="p">,</span><span·class="w">
193 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="5935326037-54">(</span><span·class="n">Match</span><span·class="p"·data-group-id="5935326037-54">)</span><span·class="p">.</span><span·class="w">193 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7298989719-54">(</span><span·class="n">Match</span><span·class="p"·data-group-id="7298989719-54">)</span><span·class="p">.</span><span·class="w">
  
194 </span><span·class="nf">foldl</span><span·class="p"·data-group-id="5935326037-55">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·219,·SHA:·e850dcf075986e6fc3c6e1897f8ee45ace4212dcc44d4c88fc1e03a61b5a489f·...·]-55">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">194 </span><span·class="nf">foldl</span><span·class="p"·data-group-id="7298989719-55">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·219,·SHA:·3921ccab4a31865fbf7d0b3a40654b00f6b3d44dcbcc7ff7691b1ed4885959a3·...·]-55">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
195 ····</span><span·class="n">Fun2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5935326037-56">(</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="5935326037-56">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">195 ····</span><span·class="n">Fun2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7298989719-56">(</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="7298989719-56">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
196 »       »       ···</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="5935326037-57">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·218,·SHA:·4e766f2f1b0855a29e6fade14d3c841ccd00660652a50e2a3e7abaafcdb0e837·...·]-57">)</span><span·class="w">196 »       »       ···</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="7298989719-57">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·218,·SHA:·59921fc6df6a8bddece5de9b5023ec28fb1e94c569bf0a42f7bfcf02f8381b52·...·]-57">)</span><span·class="w">
197 »       ···</span><span·class="k">end</span><span·class="p">,</span><span·class="w">197 »       ···</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
198 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="5935326037-58">(</span><span·class="n">Fun2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="5935326037-59">(</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·f337b78deacab092316c9b1e6e834cfe939f0e0921a289d4f66b30ba278af276·...·]-58">)</span><span·class="p">.</span><span·class="w">198 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="7298989719-58">(</span><span·class="n">Fun2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="7298989719-59">(</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·261ae8154319559a2b7340104e53b97168d3dc2dac71ec7f067e0556b09ed645·...·]-58">)</span><span·class="p">.</span><span·class="w">
  
199 </span><span·class="nf">foldr</span><span·class="p"·data-group-id="5935326037-60">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·219,·SHA:·e850dcf075986e6fc3c6e1897f8ee45ace4212dcc44d4c88fc1e03a61b5a489f·...·]-60">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">199 </span><span·class="nf">foldr</span><span·class="p"·data-group-id="7298989719-60">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·219,·SHA:·3921ccab4a31865fbf7d0b3a40654b00f6b3d44dcbcc7ff7691b1ed4885959a3·...·]-60">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
200 ····</span><span·class="n">Fun2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5935326037-61">(</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="5935326037-61">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 ····</span><span·class="n">Fun2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7298989719-61">(</span><span·class="n">Frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p"·data-group-id="7298989719-61">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 »       »       ···</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="5935326037-62">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·218,·SHA:·4e766f2f1b0855a29e6fade14d3c841ccd00660652a50e2a3e7abaafcdb0e837·...·]-62">)</span><span·class="w">201 »       »       ···</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="7298989719-62">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·218,·SHA:·59921fc6df6a8bddece5de9b5023ec28fb1e94c569bf0a42f7bfcf02f8381b52·...·]-62">)</span><span·class="w">
202 »       ···</span><span·class="k">end</span><span·class="p">,</span><span·class="w">202 »       ···</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
203 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="5935326037-63">(</span><span·class="n">Fun2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="5935326037-64">(</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·e744965daeeccb221eba8cb74edce5b49fb63f55ec4004ee122c9b5b9513e0c2·...·]-63">)</span><span·class="p">.</span><span·class="w">203 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="7298989719-63">(</span><span·class="n">Fun2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_names</span><span·class="p"·data-group-id="7298989719-64">(</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·0f44000eb24701d9924ad54bc56275bbf5b6c44881f401a13367dbe19b1987d5·...·]-63">)</span><span·class="p">.</span><span·class="w">
  
204 </span><span·class="nf">table_info</span><span·class="p"·data-group-id="5935326037-65">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5935326037-66">{</span><span·class="n">Tab</[·...·truncated·by·diffoscope;·len:·249,·SHA:·44048228f62873be11fb87737418a6d13d11f5e0dcbbec52b85f5fdaf9146f23·...·]-65">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">204 </span><span·class="nf">table_info</span><span·class="p"·data-group-id="7298989719-65">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7298989719-66">{</span><span·class="n">Tab</[·...·truncated·by·diffoscope;·len:·249,·SHA:·bc25e469b79bcb2a2ad1f3e8f091384a3778598f531554d1d99982d52a5d2ab8·...·]-65">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
205 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">key_to_frag_name</span><span·class="p"·data-group-id="5935326037-67">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="5935326037-67">)</span><span·class="p">,</span><span·class="w">205 ····</span><span·class="n">Frag</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">key_to_frag_name</span><span·class="p"·data-group-id="7298989719-67">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7298989719-67">)</span><span·class="p">,</span><span·class="w">
206 ····</span><span·class="nf">table_info2</span><span·class="p"·data-group-id="5935326037-68">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·142,·SHA:·b2d1fe67cdd8eecb037392827d555b04c7daec7a811295a6f23d69bed09d7080·...·]-68">)</span><span·class="p">;</span><span·class="w">206 ····</span><span·class="nf">table_info2</span><span·class="p"·data-group-id="7298989719-68">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·142,·SHA:·9b1f2a449c4a7f3d1235d656cd309583944a0f0147a6d70c98555df06c59c6cf·...·]-68">)</span><span·class="p">;</span><span·class="w">
207 </span><span·class="nf">table_info</span><span·class="p"·data-group-id="5935326037-69">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·67,·SHA:·57773ebf78275d21d1501c14540ee52bb4b2701a7f6a94b649a7eb8a9fe87218·...·]-69">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">207 </span><span·class="nf">table_info</span><span·class="p"·data-group-id="7298989719-69">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·67,·SHA:·c5963f1e1532f020ea6097f6c51dce358d439a215203b95275e490ece601f931·...·]-69">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
208 ····</span><span·class="nf">table_info2</span><span·class="p"·data-group-id="5935326037-70">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·141,·SHA:·44034a3fa580c05dfbbc837a032e1cc86df5b7595e4706eea8d89d6d528679a1·...·]-70">)</span><span·class="p">.</span><span·class="w">208 ····</span><span·class="nf">table_info2</span><span·class="p"·data-group-id="7298989719-70">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·141,·SHA:·6cac85a90e966e80b3a48cd9500188ec2e226b71ccbe9670ddc8d1cf4cf2ad8b·...·]-70">)</span><span·class="p">.</span><span·class="w">
  
209 </span><span·class="nf">table_info2</span><span·class="p"·data-group-id="5935326037-71">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·142,·SHA:·b2d1fe67cdd8eecb037392827d555b04c7daec7a811295a6f23d69bed09d7080·...·]-71">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">209 </span><span·class="nf">table_info2</span><span·class="p"·data-group-id="7298989719-71">(</span><span·class="n">ActivityId</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Opaque</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·142,·SHA:·9b1f2a449c4a7f3d1235d656cd309583944a0f0147a6d70c98555df06c59c6cf·...·]-71">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
210 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Item</span><span·class="w">·</span><span·class="k">of</span><span·class="w">210 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Item</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
211 »       </span><span·class="nb">size</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">211 »       </span><span·class="nb">size</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
212 »       ····</span><span·class="n">SumFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5935326037-72">(</span><span·class="p"·data-group-id="5935326037-73">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="5935326037-73">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·89,·SHA:·6c4afeba3c87566d821e6dbd3b7640002dccfeb589210904338701083a816c4e·...·]-72">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Size</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">212 »       ····</span><span·class="n">SumFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7298989719-72">(</span><span·class="p"·data-group-id="7298989719-73">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="7298989719-73">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·89,·SHA:·90600ac53f1d50ecdce636cecea02e0b9831fc17decf9a44297af18c03708b7e·...·]-72">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Size</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
213 »       ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="5935326037-74">(</span><span·class="n">SumFun</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_size</span><span·class="p"·data-group-id="5935326037-75">(</s[·...·truncated·by·diffoscope;·len:·283,·SHA:·2a9a4adc29d1a585f2979680a4787ec65e6be8de155a30c3c1085dd396370f1f·...·]-74">)</span><span·class="p">;</span><span·class="w">213 »       ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="7298989719-74">(</span><span·class="n">SumFun</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_size</span><span·class="p"·data-group-id="7298989719-75">(</s[·...·truncated·by·diffoscope;·len:·283,·SHA:·858405500c1c2814b83306197c040ee7b6c20dafdf3a95e04a54d984fbbca450·...·]-74">)</span><span·class="p">;</span><span·class="w">
214 »       </span><span·class="nb">memory</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 »       </span><span·class="nb">memory</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 »       ····</span><span·class="n">SumFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5935326037-76">(</span><span·class="p"·data-group-id="5935326037-77">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="5935326037-77">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·89,·SHA:·6c4afeba3c87566d821e6dbd3b7640002dccfeb589210904338701083a816c4e·...·]-76">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Size</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">215 »       ····</span><span·class="n">SumFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7298989719-76">(</span><span·class="p"·data-group-id="7298989719-77">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Size</span><span·class="p"·data-group-id="7298989719-77">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·89,·SHA:·90600ac53f1d50ecdce636cecea02e0b9831fc17decf9a44297af18c03708b7e·...·]-76">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Size</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
216 »       ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="5935326037-78">(</span><span·class="n">SumFun</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_memory</span><span·class="p"·data-group-id="5935326037-79">(<[·...·truncated·by·diffoscope;·len:·285,·SHA:·44ac46a14281d6ec100ffd0261da2d6ffa0919cef60531a3e843ffe46c7e8df2·...·]-78">)</span><span·class="p">;</span><span·class="w">216 »       ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="7298989719-78">(</span><span·class="n">SumFun</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">frag_memory</span><span·class="p"·data-group-id="7298989719-79">(<[·...·truncated·by·diffoscope;·len:·285,·SHA:·603d5c622bc52d8dd62bde105a930c2b99cf898ba1898a347e404522d1032a2a·...·]-78">)</span><span·class="p">;</span><span·class="w">
217 »       </span><span·class="ss">base_table</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">217 »       </span><span·class="ss">base_table</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
218 »       ····</span><span·class="nf">lookup_prop</span><span·class="p"·data-group-id="5935326037-80">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">base_table</span><span·class="p"·data-group-id="5935326037-80">)</span><span·class="p">;</span><span·class="w">218 »       ····</span><span·class="nf">lookup_prop</span><span·class="p"·data-group-id="7298989719-80">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">base_table</span><span·class="p"·data-group-id="7298989719-80">)</span><span·class="p">;</span><span·class="w">
219 »       </span><span·class="ss">node_pool</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 »       </span><span·class="ss">node_pool</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 »       ····</span><span·class="nf">lookup_prop</span><span·class="p"·data-group-id="5935326037-81">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node_pool</span><span·class="p"·data-group-id="5935326037-81">)</span><span·class="p">;</span><span·class="w">220 »       ····</span><span·class="nf">lookup_prop</span><span·class="p"·data-group-id="7298989719-81">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">node_pool</span><span·class="p"·data-group-id="7298989719-81">)</span><span·class="p">;</span><span·class="w">
221 »       </span><span·class="ss">n_fragments</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 »       </span><span·class="ss">n_fragments</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 »       ····</span><span·class="n">FH</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">lookup_frag_hash</span><span·class="p"·data-group-id="5935326037-82">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-82">)</span><span·class="p">,</span><span·class="w">222 »       ····</span><span·class="n">FH</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">lookup_frag_hash</span><span·class="p"·data-group-id="7298989719-82">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-82">)</span><span·class="p">,</span><span·class="w">
223 »       ····</span><span·class="n">FH</span><span·class="o">#</span><span·class="ss">frag_state</span><span·class="p">.</span><span·class="ss">n_fragments</span><span·class="p">;</span><span·class="w">223 »       ····</span><span·class="n">FH</span><span·class="o">#</span><span·class="ss">frag_state</span><span·class="p">.</span><span·class="ss">n_fragments</span><span·class="p">;</span><span·class="w">
224 »       </span><span·class="ss">foreign_key</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 »       </span><span·class="ss">foreign_key</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 »       ····</span><span·class="n">FH</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">lookup_frag_hash</span><span·class="p"·data-group-id="5935326037-83">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-83">)</span><span·class="p">,</span><span·class="w">225 »       ····</span><span·class="n">FH</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">lookup_frag_hash</span><span·class="p"·data-group-id="7298989719-83">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-83">)</span><span·class="p">,</span><span·class="w">
226 »       ····</span><span·class="n">FH</span><span·class="o">#</span><span·class="ss">frag_state</span><span·class="p">.</span><span·class="ss">foreign_key</span><span·class="p">;</span><span·class="w">226 »       ····</span><span·class="n">FH</span><span·class="o">#</span><span·class="ss">frag_state</span><span·class="p">.</span><span·class="ss">foreign_key</span><span·class="p">;</span><span·class="w">
227 »       </span><span·class="ss">foreigners</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 »       </span><span·class="ss">foreigners</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 »       ····</span><span·class="nf">lookup_foreigners</span><span·class="p"·data-group-id="5935326037-84">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="5935326037-84">)</span><span·class="p">;</span><span·class="w">228 »       ····</span><span·class="nf">lookup_foreigners</span><span·class="p"·data-group-id="7298989719-84">(</span><span·class="n">Tab</span><span·class="p"·data-group-id="7298989719-84">)</span><span·class="p">;</span><span·class="w">
229 »       </span><span·class="ss">n_ram_copies</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">229 »       </span><span·class="ss">n_ram_copies</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
230 »       ····</span><span·class="nf">length</span><span·class="p"·data-group-id="5935326037-85">(</span><span·class="nf">val</span><span·class="p"·data-group-id="5935326037-86">(</span><span·class="p"·data-group-id="5935326037-87">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ram_cop[·...·truncated·by·diffoscope;·len:·159,·SHA:·2f00ed5b80160a8bd2f96274b1edbb2fc44043dccc95add048254124583eee68·...·]-85">)</span><span·class="p">;</span><span·class="w">230 »       ····</span><span·class="nf">length</span><span·class="p"·data-group-id="7298989719-85">(</span><span·class="nf">val</span><span·class="p"·data-group-id="7298989719-86">(</span><span·class="p"·data-group-id="7298989719-87">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ram_cop[·...·truncated·by·diffoscope;·len:·159,·SHA:·874bab18d3619738cb16a7507be69d94529fd075ec094e9af859a9d08ddfe14c·...·]-85">)</span><span·class="p">;</span><span·class="w">
231 »       </span><span·class="ss">n_disc_copies</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 »       </span><span·class="ss">n_disc_copies</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 »       ····</span><span·class="nf">length</span><span·class="p"·data-group-id="5935326037-88">(</span><span·class="nf">val</span><span·class="p"·data-group-id="5935326037-89">(</span><span·class="p"·data-group-id="5935326037-90">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disc_co[·...·truncated·by·diffoscope;·len:·160,·SHA:·47d36e50c7aa34078148c147817c081573fe83e19ea85b2cbf35d50da30ecd69·...·]-88">)</span><span·class="p">;</span><span·class="w">232 »       ····</span><span·class="nf">length</span><span·class="p"·data-group-id="7298989719-88">(</span><span·class="nf">val</span><span·class="p"·data-group-id="7298989719-89">(</span><span·class="p"·data-group-id="7298989719-90">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disc_co[·...·truncated·by·diffoscope;·len:·160,·SHA:·844aedb234cd3c3beb9b4426a7e2f0fd08747823349beae719d1ea73e55e4dc6·...·]-88">)</span><span·class="p">;</span><span·class="w">
Max diff block lines reached; 58921/136552 bytes (43.15%) of diff not shown.
68.8 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_app_c.html
    
Offset 127, 144 lines modifiedOffset 127, 144 lines modified
  
127 <h2·id="mnesia_frag_hash-callback-behavior"·class="section-heading">127 <h2·id="mnesia_frag_hash-callback-behavior"·class="section-heading">
128 ··<a·href="#mnesia_frag_hash-callback-behavior"·class="hover-link">128 ··<a·href="#mnesia_frag_hash-callback-behavior"·class="hover-link">
129 ····<i·class="ri-link-m"·aria-hidden="true"></i>129 ····<i·class="ri-link-m"·aria-hidden="true"></i>
130 ··</a>130 ··</a>
131 ··<span·class="text">mnesia_frag_hash·Callback·Behavior</span>131 ··<span·class="text">mnesia_frag_hash·Callback·Behavior</span>
132 </h2>132 </h2>
133 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4342900615-1">(</span><span·class="ss">mnesia_frag_hash</span><span·class="p"·data-group-id="4342900615-1">)</span><span·class="p">.</span><span·class="w">133 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="5933339470-1">(</span><span·class="ss">mnesia_frag_hash</span><span·class="p"·data-group-id="5933339470-1">)</span><span·class="p">.</span><span·class="w">
134 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="4342900615-2">(</span><span·class="p"·data-group-id="4342900615-3">[</span><span·class="p"·data-group-id="4342900615-4">{</span><span·class="ss">nowarn_deprecated_function</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·461,·SHA:·41ee681caed6fb172232eac9215d286e2b0265b2dd8ccdb1fed0cafc935150e6·...·]-2">)</span><span·class="p">.</span><span·class="w">134 </span><span·class="p">-</span><span·class="na">compile</span><span·class="p"·data-group-id="5933339470-2">(</span><span·class="p"·data-group-id="5933339470-3">[</span><span·class="p"·data-group-id="5933339470-4">{</span><span·class="ss">nowarn_deprecated_function</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·461,·SHA:·8fcfc5d886d6f13bd91203fabd78903a3a78f2001091131476ffa33179a6ab90·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
135 </span><span·class="c1">%%·Fragmented·Table·Hashing·callback·functions</span><span·class="w">135 </span><span·class="c1">%%·Fragmented·Table·Hashing·callback·functions</span><span·class="w">
136 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4342900615-7">(</span><span·class="p"·data-group-id="4342900615-8">[</span><span·class="w">136 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="5933339470-7">(</span><span·class="p"·data-group-id="5933339470-8">[</span><span·class="w">
137 »       ·</span><span·class="ss">init_state</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">137 »       ·</span><span·class="ss">init_state</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
138 »       ·</span><span·class="ss">add_frag</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">138 »       ·</span><span·class="ss">add_frag</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
139 »       ·</span><span·class="ss">del_frag</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">139 »       ·</span><span·class="ss">del_frag</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
140 »       ·</span><span·class="ss">key_to_frag_number</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">140 »       ·</span><span·class="ss">key_to_frag_number</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
141 »       ·</span><span·class="ss">match_spec_to_frag_numbers</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">141 »       ·</span><span·class="ss">match_spec_to_frag_numbers</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">
142 »       </span><span·class="p"·data-group-id="4342900615-8">]</span><span·class="p"·data-group-id="4342900615-7">)</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1770120919-1">(</span><span·class="ss">hash_state</span><span·class="p">,</span><span·class="w">142 »       </span><span·class="p"·data-group-id="5933339470-8">]</span><span·class="p"·data-group-id="5933339470-7">)</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4307282746-1">(</span><span·class="ss">hash_state</span><span·class="p">,</span><span·class="w">
143 »       </span><span·class="p"·data-group-id="1770120919-2">{</span><span·class="ss">n_fragments</span><span·class="p">,</span><span·class="w">143 »       </span><span·class="p"·data-group-id="4307282746-2">{</span><span·class="ss">n_fragments</span><span·class="p">,</span><span·class="w">
144 »       ·</span><span·class="ss">next_n_to_split</span><span·class="p">,</span><span·class="w">144 »       ·</span><span·class="ss">next_n_to_split</span><span·class="p">,</span><span·class="w">
145 »       ·</span><span·class="ss">n_doubles</span><span·class="p">,</span><span·class="w">145 »       ·</span><span·class="ss">n_doubles</span><span·class="p">,</span><span·class="w">
146 »       ·</span><span·class="ss">function</span><span·class="p"·data-group-id="1770120919-2">}</span><span·class="p"·data-group-id="1770120919-1">)</span><span·class="p">.</span><span·class="w">146 »       ·</span><span·class="ss">function</span><span·class="p"·data-group-id="4307282746-2">}</span><span·class="p"·data-group-id="4307282746-1">)</span><span·class="p">.</span><span·class="w">
  
147 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">147 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
148 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">init_state</span><span·class="p"·data-group-id="1770120919-3">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="1770120919-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">NewState</span><span·class="w">·</span><span·class="k">when</span><span·class="w">148 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">init_state</span><span·class="p"·data-group-id="4307282746-3">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="4307282746-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">NewState</span><span·class="w">·</span><span·class="k">when</span><span·class="w">
149 ······</span><span·class="n">Tab</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="1770120919-4">(</span><span·class="p"·data-group-id="1770120919-4">)</span><span·class="p">,</span><span·class="w">149 ······</span><span·class="n">Tab</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4307282746-4">(</span><span·class="p"·data-group-id="4307282746-4">)</span><span·class="p">,</span><span·class="w">
150 ······</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-5">(</span><span·class="p"·data-group-id="1770120919-5">)</span><span·class="p">,</span><span·class="w">150 ······</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-5">(</span><span·class="p"·data-group-id="4307282746-5">)</span><span·class="p">,</span><span·class="w">
151 ······</span><span·class="n">NewState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-6">(</span><span·class="p"·data-group-id="1770120919-6">)</span><span·class="p">.</span><span·class="w">151 ······</span><span·class="n">NewState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-6">(</span><span·class="p"·data-group-id="4307282746-6">)</span><span·class="p">.</span><span·class="w">
152 </span><span·class="nf">init_state</span><span·class="p"·data-group-id="1770120919-7">(</span><span·class="p">_</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="1770120919-7">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">State</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">152 </span><span·class="nf">init_state</span><span·class="p"·data-group-id="4307282746-7">(</span><span·class="p">_</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="4307282746-7">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">State</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
153 ····</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-8">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">153 ····</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-8">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
154 »       »       </span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">154 »       »       </span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
155 »       »       </span><span·class="ss">n_doubles</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">155 »       »       </span><span·class="ss">n_doubles</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
156 »       »       </span><span·class="ss">function</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">phash2</span><span·class="p"·data-group-id="1770120919-8">}</span><span·class="p">.</span><span·class="w">156 »       »       </span><span·class="ss">function</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">phash2</span><span·class="p"·data-group-id="4307282746-8">}</span><span·class="p">.</span><span·class="w">
  
157 </span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="1770120919-9">(</span><span·class="p"·data-group-id="1770120919-10">{</span><span·class="ss">hash_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><s[·...·truncated·by·diffoscope;·len:·165,·SHA:·c84e022449defb09935a3c50945d32502bf69f409032243f61520493a41cafad·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="4307282746-9">(</span><span·class="p"·data-group-id="4307282746-10">{</span><span·class="ss">hash_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><s[·...·truncated·by·diffoscope;·len:·165,·SHA:·10a600b659b6ddb5c5aaabed0f21d31bbb450e41d215eb39bc74b4dc2901b9fd·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-11">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">158 ····</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-11">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">
159 »       »       </span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="p">,</span><span·class="w">159 »       »       </span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="p">,</span><span·class="w">
160 »       »       </span><span·class="ss">n_doubles</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·class="p">,</span><span·class="w">160 »       »       </span><span·class="ss">n_doubles</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·class="p">,</span><span·class="w">
161 »       »       </span><span·class="ss">function</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">phash</span><span·class="p"·data-group-id="1770120919-11">}</span><span·class="p">.</span><span·class="w">161 »       »       </span><span·class="ss">function</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">phash</span><span·class="p"·data-group-id="4307282746-11">}</span><span·class="p">.</span><span·class="w">
  
162 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">162 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
163 </span><span·class="w">163 </span><span·class="w">
164 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">add_frag</span><span·class="p"·data-group-id="1770120919-12">(</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-13">(</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·453,·SHA:·6e95db87e55ba2de602ce62c524c9eff422ee2397d1820c874a9cba3894fbf0d·...·]-14">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">164 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">add_frag</span><span·class="p"·data-group-id="4307282746-12">(</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-13">(</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·453,·SHA:·6781d99129b3ea7aa3bf11c10c459c0042968358f31c19033b6816d0565da839·...·]-14">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">
165 ······</span><span·class="n">NewState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-15">(</span><span·class="p"·data-group-id="1770120919-15">)</span><span·class="p">,</span><span·class="w">165 ······</span><span·class="n">NewState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-15">(</span><span·class="p"·data-group-id="4307282746-15">)</span><span·class="p">,</span><span·class="w">
166 ······</span><span·class="n">IterFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-16">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="1770120919-17">(</span><span·class="p"·data-group-id="1770120919-17">)</span><span·class="p"·data-group-id="1770120919-16">]</span><span·class="p">,</span><span·class="w">166 ······</span><span·class="n">IterFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-16">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="4307282746-17">(</span><span·class="p"·data-group-id="4307282746-17">)</span><span·class="p"·data-group-id="4307282746-16">]</span><span·class="p">,</span><span·class="w">
167 ······</span><span·class="n">AdditionalLockFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-18">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="1770120919-19">(</span><span·class="p"·data-group-id="1770120919-19">)</span><span·class="p"·data-group-id="1770120919-18">]</span><span·class="p">.</span><span·class="w">167 ······</span><span·class="n">AdditionalLockFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-18">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="4307282746-19">(</span><span·class="p"·data-group-id="4307282746-19">)</span><span·class="p"·data-group-id="4307282746-18">]</span><span·class="p">.</span><span·class="w">
168 </span><span·class="nf">add_frag</span><span·class="p"·data-group-id="1770120919-20">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-21">{</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·570,·SHA:·a10321cf0484752b310081d1981261feddb26a552e329f6c4de0c0c6ad5d0650·...·]-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">168 </span><span·class="nf">add_frag</span><span·class="p"·data-group-id="4307282746-20">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-21">{</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·570,·SHA:·9bc4fe56e312e5fa6e0f7846d0b9de4d8e7108632b5a8875e932371b65fad7f5·...·]-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
169 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">SplitN</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">169 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">SplitN</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
170 ····</span><span·class="n">NewN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">170 ····</span><span·class="n">NewN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
171 ····</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="1770120919-22">(</span><span·class="n">L</span><span·class="p"·data-group-id="1770120919-22">)</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="k">of</span><span·class="w">171 ····</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="4307282746-22">(</span><span·class="n">L</span><span·class="p"·data-group-id="4307282746-22">)</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
172 »       »       ·</span><span·class="n">P2</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">P2</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">P</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 »       »       ·</span><span·class="n">P2</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">P2</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">P</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 »       »       ·····</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-23">{</span><span·class="ss">n_fragments</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="n">NewN</span><span·class="p">,</span><span·class="w">173 »       »       ·····</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-23">{</span><span·class="ss">n_fragments</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="n">NewN</span><span·class="p">,</span><span·class="w">
174 »       »       »       »       ······</span><span·class="ss">n_doubles</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">174 »       »       »       »       ······</span><span·class="ss">n_doubles</span><span·class="w">········</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
175 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1770120919-23">}</span><span·class="p">;</span><span·class="w">175 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4307282746-23">}</span><span·class="p">;</span><span·class="w">
176 »       »       ·</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 »       »       ·</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 »       »       ·····</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-24">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">NewN</span><span·class="p">,</span><span·class="w">177 »       »       ·····</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-24">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">NewN</span><span·class="p">,</span><span·class="w">
178 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="p"·data-group-id="1770120919-24">}</span><span·class="w">178 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="p"·data-group-id="4307282746-24">}</span><span·class="w">
179 »       ·····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">179 »       ·····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
180 ····</span><span·class="p"·data-group-id="1770120919-25">{</span><span·class="n">State2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-26">[</span><span·class="n">SplitN</span><span·class="p"·data-group-id="1770120919-26">]</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·205,·SHA:·42fd6227cf5e92181a1ce3124fffdfbf4671f0ddbe03a78d71424d9f07332176·...·]-25">}</span><span·class="p">;</span><span·class="w">180 ····</span><span·class="p"·data-group-id="4307282746-25">{</span><span·class="n">State2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-26">[</span><span·class="n">SplitN</span><span·class="p"·data-group-id="4307282746-26">]</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·205,·SHA:·7d6451e55befdd5e6a0b8f6daee6677d7b5ff5a3f3eaf4f22bfe164afd1faf24·...·]-25">}</span><span·class="p">;</span><span·class="w">
181 </span><span·class="nf">add_frag</span><span·class="p"·data-group-id="1770120919-28">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="1770120919-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">181 </span><span·class="nf">add_frag</span><span·class="p"·data-group-id="4307282746-28">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="4307282746-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
182 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="1770120919-29">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="1770120919-29">)</span><span·class="p">,</span><span·class="w">182 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="4307282746-29">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="4307282746-29">)</span><span·class="p">,</span><span·class="w">
183 ····</span><span·class="nf">add_frag</span><span·class="p"·data-group-id="1770120919-30">(</span><span·class="n">State</span><span·class="p"·data-group-id="1770120919-30">)</span><span·class="p">.</span><span·class="w">183 ····</span><span·class="nf">add_frag</span><span·class="p"·data-group-id="4307282746-30">(</span><span·class="n">State</span><span·class="p"·data-group-id="4307282746-30">)</span><span·class="p">.</span><span·class="w">
  
184 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">184 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
185 </span><span·class="w">185 </span><span·class="w">
186 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">del_frag</span><span·class="p"·data-group-id="1770120919-31">(</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-32">(</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·453,·SHA:·577f9b2f928aedd2ad78ae9f9cec1b2954f2a82a6d3e38a56f23f5ddb3689064·...·]-33">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">186 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">del_frag</span><span·class="p"·data-group-id="4307282746-31">(</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-32">(</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·453,·SHA:·f2d0a1724256d03478bf60ed12e359e5cadb761e5cb98f7c9234ab43f81e402d·...·]-33">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">
187 ······</span><span·class="n">NewState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-34">(</span><span·class="p"·data-group-id="1770120919-34">)</span><span·class="p">,</span><span·class="w">187 ······</span><span·class="n">NewState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-34">(</span><span·class="p"·data-group-id="4307282746-34">)</span><span·class="p">,</span><span·class="w">
188 ······</span><span·class="n">IterFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-35">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="1770120919-36">(</span><span·class="p"·data-group-id="1770120919-36">)</span><span·class="p"·data-group-id="1770120919-35">]</span><span·class="p">,</span><span·class="w">188 ······</span><span·class="n">IterFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-35">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="4307282746-36">(</span><span·class="p"·data-group-id="4307282746-36">)</span><span·class="p"·data-group-id="4307282746-35">]</span><span·class="p">,</span><span·class="w">
189 ······</span><span·class="n">AdditionalLockFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-37">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="1770120919-38">(</span><span·class="p"·data-group-id="1770120919-38">)</span><span·class="p"·data-group-id="1770120919-37">]</span><span·class="p">.</span><span·class="w">189 ······</span><span·class="n">AdditionalLockFrags</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-37">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="4307282746-38">(</span><span·class="p"·data-group-id="4307282746-38">)</span><span·class="p"·data-group-id="4307282746-37">]</span><span·class="p">.</span><span·class="w">
190 </span><span·class="nf">del_frag</span><span·class="p"·data-group-id="1770120919-39">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-40">{</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·570,·SHA:·cf630a29170d0a1df883a7a4b3b05a398f525f170c8c4e5eb0955e39df38b3cf·...·]-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">190 </span><span·class="nf">del_frag</span><span·class="p"·data-group-id="4307282746-39">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-40">{</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·570,·SHA:·abb832b035cca937c95db10550ea8ee14013e4c730eee993ff99ee381b83f99f·...·]-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
191 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">SplitN</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">191 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">SplitN</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
192 ····</span><span·class="k">if</span><span·class="w">192 ····</span><span·class="k">if</span><span·class="w">
193 »       </span><span·class="n">P</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 »       </span><span·class="n">P</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 »       ····</span><span·class="n">L2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">194 »       ····</span><span·class="n">L2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
195 »       ····</span><span·class="n">MergeN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="1770120919-41">(</span><span·class="n">L2</span><span·class="p"·data-group-id="1770120919-41">)</span><span·class="p">,</span><span·class="w">195 »       ····</span><span·class="n">MergeN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="4307282746-41">(</span><span·class="n">L2</span><span·class="p"·data-group-id="4307282746-41">)</span><span·class="p">,</span><span·class="w">
196 »       ····</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-42">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">196 »       ····</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-42">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
197 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">MergeN</span><span·class="p">,</span><span·class="w">197 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">MergeN</span><span·class="p">,</span><span·class="w">
198 »       »       »       »       ······</span><span·class="ss">n_doubles</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L2</span><span·class="p"·data-group-id="1770120919-42">}</span><span·class="p">,</span><span·class="w">198 »       »       »       »       ······</span><span·class="ss">n_doubles</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="n">L2</span><span·class="p"·data-group-id="4307282746-42">}</span><span·class="p">,</span><span·class="w">
199 »       ····</span><span·class="p"·data-group-id="1770120919-43">{</span><span·class="n">State2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-44">[</span><span·class="n">N</span><span·class="p"·data-group-id="1770120919-44">]</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·3a988c3ccb4f7ba7d9e6c5d9fb65c01adb2c5c0dc02398c91488bba82824bf77·...·]-43">}</span><span·class="p">;</span><span·class="w">199 »       ····</span><span·class="p"·data-group-id="4307282746-43">{</span><span·class="n">State2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-44">[</span><span·class="n">N</span><span·class="p"·data-group-id="4307282746-44">]</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·8a290ba9c5f10fb714eb405f1b2e2cf8ed903150126de945b65da8e25c87468b·...·]-43">}</span><span·class="p">;</span><span·class="w">
200 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 »       ····</span><span·class="n">MergeN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="p">,</span><span·class="w">201 »       ····</span><span·class="n">MergeN</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">P</span><span·class="p">,</span><span·class="w">
202 »       ····</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-46">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">202 »       ····</span><span·class="n">State2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-46">{</span><span·class="ss">n_fragments</span><span·class="w">·····</span><span·class="o">=</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
203 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">MergeN</span><span·class="p"·data-group-id="1770120919-46">}</span><span·class="p">,</span><span·class="w">203 »       »       »       »       ······</span><span·class="ss">next_n_to_split</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">MergeN</span><span·class="p"·data-group-id="4307282746-46">}</span><span·class="p">,</span><span·class="w">
204 »       ····</span><span·class="p"·data-group-id="1770120919-47">{</span><span·class="n">State2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-48">[</span><span·class="n">N</span><span·class="p"·data-group-id="1770120919-48">]</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·8b4c2e321f535a1b4bdc1ba4d3b6df195c6a4549b59c5faaaba47256898c489f·...·]-47">}</span><span·class="w">204 »       ····</span><span·class="p"·data-group-id="4307282746-47">{</span><span·class="n">State2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-48">[</span><span·class="n">N</span><span·class="p"·data-group-id="4307282746-48">]</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·202,·SHA:·56736662b88784f649f88321a62d5a2c4c6780b343732eff76b5cba0054593ae·...·]-47">}</span><span·class="w">
205 »       </span><span·class="k">end</span><span·class="p">;</span><span·class="w">205 »       </span><span·class="k">end</span><span·class="p">;</span><span·class="w">
206 </span><span·class="nf">del_frag</span><span·class="p"·data-group-id="1770120919-50">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="1770120919-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">206 </span><span·class="nf">del_frag</span><span·class="p"·data-group-id="4307282746-50">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="4307282746-50">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
207 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="1770120919-51">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="1770120919-51">)</span><span·class="p">,</span><span·class="w">207 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="4307282746-51">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="4307282746-51">)</span><span·class="p">,</span><span·class="w">
208 ····</span><span·class="nf">del_frag</span><span·class="p"·data-group-id="1770120919-52">(</span><span·class="n">State</span><span·class="p"·data-group-id="1770120919-52">)</span><span·class="p">.</span><span·class="w">208 ····</span><span·class="nf">del_frag</span><span·class="p"·data-group-id="4307282746-52">(</span><span·class="n">State</span><span·class="p"·data-group-id="4307282746-52">)</span><span·class="p">.</span><span·class="w">
  
209 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">209 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
210 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="1770120919-53">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="1770120919-53">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Fragnum</span><span·class="w">·</span><span·class="k">when</span><span·class="w">210 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="4307282746-53">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="4307282746-53">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Fragnum</span><span·class="w">·</span><span·class="k">when</span><span·class="w">
211 ······</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-54">(</span><span·class="p"·data-group-id="1770120919-54">)</span><span·class="p">,</span><span·class="w">211 ······</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-54">(</span><span·class="p"·data-group-id="4307282746-54">)</span><span·class="p">,</span><span·class="w">
212 ······</span><span·class="n">Key</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-55">(</span><span·class="p"·data-group-id="1770120919-55">)</span><span·class="p">,</span><span·class="w">212 ······</span><span·class="n">Key</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-55">(</span><span·class="p"·data-group-id="4307282746-55">)</span><span·class="p">,</span><span·class="w">
213 ······</span><span·class="n">Fragnum</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="1770120919-56">(</span><span·class="p"·data-group-id="1770120919-56">)</span><span·class="p">.</span><span·class="w">213 ······</span><span·class="n">Fragnum</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4307282746-56">(</span><span·class="p"·data-group-id="4307282746-56">)</span><span·class="p">.</span><span·class="w">
214 </span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="1770120919-57">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-58">{</span><span·class="ss">function</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">[·...·truncated·by·diffoscope;·len:·537,·SHA:·9fe2a2dbc9266f1d7ee001601645df44f9afee3cf883e4971070ad8d32b65142·...·]-57">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 </span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="4307282746-57">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-58">{</span><span·class="ss">function</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">[·...·truncated·by·diffoscope;·len:·537,·SHA:·46e913d4bfa9a212420a79fc5e8e638936231c2c796a681b87702a4d9bb39c6f·...·]-57">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">phash</span><span·class="p"·data-group-id="1770120919-59">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="1770120919-60">(</span><span·class="n">L</span><span·class="w">·</span><span·class="o">+</span><sp[·...·truncated·by·diffoscope;·len:·141,·SHA:·d16923c169aef51a10857153dd6da3dadbce24cac6fa40b2b85ea7104fa58354·...·]-59">)</span><span·class="p">,</span><span·class="w">215 ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">phash</span><span·class="p"·data-group-id="4307282746-59">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="4307282746-60">(</span><span·class="n">L</span><span·class="w">·</span><span·class="o">+</span><sp[·...·truncated·by·diffoscope;·len:·141,·SHA:·4e94fa2d28d68346ab2de35293e0d1899433e2999d42219f5826726e0c518a6b·...·]-59">)</span><span·class="p">,</span><span·class="w">
216 ····</span><span·class="k">if</span><span·class="w">216 ····</span><span·class="k">if</span><span·class="w">
217 »       </span><span·class="n">A</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">217 »       </span><span·class="n">A</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
218 »       ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="1770120919-61">(</span><span·class="n">L</span><span·class="p"·data-group-id="1770120919-61">)</span><span·class="p">;</span><span·class="w">218 »       ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="4307282746-61">(</span><span·class="n">L</span><span·class="p"·data-group-id="4307282746-61">)</span><span·class="p">;</span><span·class="w">
219 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 »       ····</span><span·class="n">A</span><span·class="w">220 »       ····</span><span·class="n">A</span><span·class="w">
221 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">221 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
222 </span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="1770120919-62">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-63">{</span><span·class="ss">function</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">[·...·truncated·by·diffoscope;·len:·538,·SHA:·dd53e1ef53f4bbaeef0870f62d6f572945147c980361de19ffee7b97c42eeb51·...·]-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">222 </span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="4307282746-62">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-63">{</span><span·class="ss">function</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nb">[·...·truncated·by·diffoscope;·len:·538,·SHA:·14abcaef9d02c119271c0177737929078ec97547a45a913d7dede534b1014088·...·]-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
223 ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">phash2</span><span·class="p"·data-group-id="1770120919-64">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="1770120919-65">(</span><span·class="n">L</span><span·class="w">·</span><span·class="o">+</span><sp[·...·truncated·by·diffoscope;·len:·141,·SHA:·5af1225b21e2f8384c1421002b7c447976b8c1e853ca8889122a19d024cad2bb·...·]-64">)</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">223 ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">phash2</span><span·class="p"·data-group-id="4307282746-64">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="4307282746-65">(</span><span·class="n">L</span><span·class="w">·</span><span·class="o">+</span><sp[·...·truncated·by·diffoscope;·len:·141,·SHA:·cf1aa71cb05ff0e9d48adf701bf77fbc8974b074ef62778876473e4ae1aefddd·...·]-64">)</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
224 ····</span><span·class="k">if</span><span·class="w">224 ····</span><span·class="k">if</span><span·class="w">
225 »       </span><span·class="n">A</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">225 »       </span><span·class="n">A</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
226 »       ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="1770120919-66">(</span><span·class="n">L</span><span·class="p"·data-group-id="1770120919-66">)</span><span·class="p">;</span><span·class="w">226 »       ····</span><span·class="n">A</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="nf">power2</span><span·class="p"·data-group-id="4307282746-66">(</span><span·class="n">L</span><span·class="p"·data-group-id="4307282746-66">)</span><span·class="p">;</span><span·class="w">
227 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 »       ····</span><span·class="n">A</span><span·class="w">228 »       ····</span><span·class="n">A</span><span·class="w">
229 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">229 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
230 </span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="1770120919-67">(</span><span·class="n">OldState</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="1770120919-67">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">230 </span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="4307282746-67">(</span><span·class="n">OldState</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="4307282746-67">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
231 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="1770120919-68">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="1770120919-68">)</span><span·class="p">,</span><span·class="w">231 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">convert_old_state</span><span·class="p"·data-group-id="4307282746-68">(</span><span·class="n">OldState</span><span·class="p"·data-group-id="4307282746-68">)</span><span·class="p">,</span><span·class="w">
232 ····</span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="1770120919-69">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="1770120919-69">)</span><span·class="p">.</span><span·class="w">232 ····</span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="4307282746-69">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="4307282746-69">)</span><span·class="p">.</span><span·class="w">
  
233 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">233 </span><span·class="c1">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span><span·class="w">
234 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">match_spec_to_frag_numbers</span><span·class="p"·data-group-id="1770120919-70">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="1770120919-70">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Fragnums</span><span·class="w">·</span><span·class="k">when</span><span·class="w">234 </span><span·class="p">-</span><span·class="na">spec</span><span·class="w">·</span><span·class="nf">match_spec_to_frag_numbers</span><span·class="p"·data-group-id="4307282746-70">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="4307282746-70">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Fragnums</span><span·class="w">·</span><span·class="k">when</span><span·class="w">
235 ······</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1770120919-71">(</span><span·class="p"·data-group-id="1770120919-71">)</span><span·class="p">,</span><span·class="w">235 ······</span><span·class="n">State</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4307282746-71">(</span><span·class="p"·data-group-id="4307282746-71">)</span><span·class="p">,</span><span·class="w">
236 ······</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_spec</span><span·class="p"·data-group-id="1770120919-72">(</span><span·class="p"·data-group-id="1770120919-72">)</span><span·class="p">,</span><span·class="w">236 ······</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_spec</span><span·class="p"·data-group-id="4307282746-72">(</span><span·class="p"·data-group-id="4307282746-72">)</span><span·class="p">,</span><span·class="w">
237 ······</span><span·class="n">Fragnums</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1770120919-73">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="1770120919-74">(</span><span·class="p"·data-group-id="1770120919-74">)</span><span·class="p"·data-group-id="1770120919-73">]</span><span·class="p">.</span><span·class="w">237 ······</span><span·class="n">Fragnums</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4307282746-73">[</span><span·class="nf">integer</span><span·class="p"·data-group-id="4307282746-74">(</span><span·class="p"·data-group-id="4307282746-74">)</span><span·class="p"·data-group-id="4307282746-73">]</span><span·class="p">.</span><span·class="w">
238 </span><span·class="nf">match_spec_to_frag_numbers</span><span·class="p"·data-group-id="1770120919-75">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="1770120919-76">{</span><span·class="ss">n_fragments</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n[·...·truncated·by·diffoscope;·len:·285,·SHA:·044661c0001698281a42a841264d428f24deb11073f715ee2f0beb3598f8b9ca·...·]-75">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">238 </span><span·class="nf">match_spec_to_frag_numbers</span><span·class="p"·data-group-id="4307282746-75">(</span><span·class="o">#</span><span·class="ss">hash_state</span><span·class="p"·data-group-id="4307282746-76">{</span><span·class="ss">n_fragments</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n[·...·truncated·by·diffoscope;·len:·285,·SHA:·15a63572e6d70eb3e602aa14fb03fd352908e28de37a7361e9f2f8cb845b7c0a·...·]-75">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
239 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="k">of</span><span·class="w">239 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
240 »       </span><span·class="p"·data-group-id="1770120919-77">[</span><span·class="p"·data-group-id="1770120919-78">{</span><span·class="n">HeadPat</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span[·...·truncated·by·diffoscope;·len:·555,·SHA:·875565fb75b215ad21d219935df6c194013d77bae8e5f9866ce6ef05fba6c166·...·]-80">)</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">240 »       </span><span·class="p"·data-group-id="4307282746-77">[</span><span·class="p"·data-group-id="4307282746-78">{</span><span·class="n">HeadPat</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span[·...·truncated·by·diffoscope;·len:·555,·SHA:·d5353aecc0855d41ca09e96537896dd375e2488aa2884c887dffb0ecb1254f61·...·]-80">)</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
241 »       ····</span><span·class="n">KeyPat</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="1770120919-81">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HeadPat</span><span·class="p"·data-group-id="1770120919-81">)</span><span·class="p">,</span><span·class="w">241 »       ····</span><span·class="n">KeyPat</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="4307282746-81">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HeadPat</span><span·class="p"·data-group-id="4307282746-81">)</span><span·class="p">,</span><span·class="w">
242 »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">has_var</span><span·class="p"·data-group-id="1770120919-82">(</span><span·class="n">KeyPat</span><span·class="p"·data-group-id="1770120919-82">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">242 »       ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">has_var</span><span·class="p"·data-group-id="4307282746-82">(</span><span·class="n">KeyPat</span><span·class="p"·data-group-id="4307282746-82">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
243 »       »       </span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">243 »       »       </span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
244 »       »       ····</span><span·class="p"·data-group-id="1770120919-83">[</span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="1770120919-84">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">KeyPat</span><span·class="p"·data-group-id="1[·...·truncated·by·diffoscope;·len:·63,·SHA:·5520460e1d5a63801c1e9db53bd1ee60d847b452be2ddbc6e4d33692dd9848c4·...·]-83">]</span><span·class="p">;</span><span·class="w">244 »       »       ····</span><span·class="p"·data-group-id="4307282746-83">[</span><span·class="nf">key_to_frag_number</span><span·class="p"·data-group-id="4307282746-84">(</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">KeyPat</span><span·class="p"·data-group-id="4[·...·truncated·by·diffoscope;·len:·63,·SHA:·109afb70babaa7ff220d167e44ec60497d84a135eda1e6d69a5b0dc03e3a3d3c·...·]-83">]</span><span·class="p">;</span><span·class="w">
245 »       »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">245 »       »       </span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 3709/70270 bytes (5.28%) of diff not shown.
161 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_chap2.html
    
Offset 133, 47 lines modifiedOffset 133, 47 lines modified
133 ··<a·href="#starting-mnesia-for-the-first-time"·class="hover-link">133 ··<a·href="#starting-mnesia-for-the-first-time"·class="hover-link">
134 ····<i·class="ri-link-m"·aria-hidden="true"></i>134 ····<i·class="ri-link-m"·aria-hidden="true"></i>
135 ··</a>135 ··</a>
136 ··<span·class="text">Starting·Mnesia·for·the·First·Time</span>136 ··<span·class="text">Starting·Mnesia·for·the·First·Time</span>
137 </h2>137 </h2>
138 <p>This·section·provides·a·simplified·demonstration·of·a·<code·class="inline">Mnesia</code>·system·startup.138 <p>This·section·provides·a·simplified·demonstration·of·a·<code·class="inline">Mnesia</code>·system·startup.
139 The·dialogue·from·the·Erlang·shell·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">unix</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">mnesia</span><span·class="w">·</span><span·class="ss">dir</span><span·class="w">·</span><span·class="ss">&#39;&quot;/tmp/funky&quot;&#39;</span><span·class="w">139 The·dialogue·from·the·Erlang·shell·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">unix</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">mnesia</span><span·class="w">·</span><span·class="ss">dir</span><span·class="w">·</span><span·class="ss">&#39;&quot;/tmp/funky&quot;&#39;</span><span·class="w">
140 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="6754653326-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">4.9</span><span·class="w">140 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="5505337245-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">4.9</span><span·class="w">
  
141 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="6754653326-2">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="6754653326-2">)</span><span·class="w">141 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="5505337245-2">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5505337245-2">)</span><span·class="w">
142 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="gp·unselectable">142 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="gp·unselectable">
143 1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="6754653326-3">(</span><span·class="p"·data-group-id="6754653326-4">[</span><span·class="nf">node</span><span·class="p"·data-group-id="6754653326-5">(</span><span·class="p"·data-group-id="6754653326-5">)</span><span·class="p"·data-group-id="6754653326-4">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·54ebb56579e5e7a17a67ddcd271b87f9f9ed1eab83e2f346ebb42edc65668a27·...·]-3">)</span><span·class="p">.</span><span·class="w">143 1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="5505337245-3">(</span><span·class="p"·data-group-id="5505337245-4">[</span><span·class="nf">node</span><span·class="p"·data-group-id="5505337245-5">(</span><span·class="p"·data-group-id="5505337245-5">)</span><span·class="p"·data-group-id="5505337245-4">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·a1fc7bb363de5a1b7a82a0bba92b831f6605930566b4274a5f56012c233aa3ca·...·]-3">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="ss">ok</span><span·class="gp·unselectable">144 </span><span·class="ss">ok</span><span·class="gp·unselectable">
145 2&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6754653326-6">(</span><span·class="p"·data-group-id="6754653326-6">)</span><span·class="p">.</span><span·class="w">145 2&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5505337245-6">(</span><span·class="p"·data-group-id="5505337245-6">)</span><span·class="p">.</span><span·class="w">
146 </span><span·class="ss">ok</span><span·class="gp·unselectable">146 </span><span·class="ss">ok</span><span·class="gp·unselectable">
147 3&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6754653326-7">(</span><span·class="ss">funky</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-8">[</span><span·class="p"·data-group-id="6754653326-8">]</span><span·class="p"·data-group-id="6754653326-7">)</span><span·class="p">.</span><span·class="w">147 3&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5505337245-7">(</span><span·class="ss">funky</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-8">[</span><span·class="p"·data-group-id="5505337245-8">]</span><span·class="p"·data-group-id="5505337245-7">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="p"·data-group-id="6754653326-9">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="6754653326-9">}</span><span·class="gp·unselectable">148 </span><span·class="p"·data-group-id="5505337245-9">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="5505337245-9">}</span><span·class="gp·unselectable">
149 4&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="6754653326-10">(</span><span·class="p"·data-group-id="6754653326-10">)</span><span·class="p">.</span><span·class="w">149 4&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="5505337245-10">(</span><span·class="p"·data-group-id="5505337245-10">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Processes</span><span·class="w">·</span><span·class="ss">holding</span><span·class="w">·</span><span·class="ss">locks</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">150 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Processes</span><span·class="w">·</span><span·class="ss">holding</span><span·class="w">·</span><span·class="ss">locks</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">
151 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Processes</span><span·class="w">·</span><span·class="ss">waiting</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">locks</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">151 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Processes</span><span·class="w">·</span><span·class="ss">waiting</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">locks</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">
152 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Pending</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-11">(</span><span·class="ss">remote</span><span·class="p"·data-group-id="6754653326-11">)</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">152 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Pending</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-11">(</span><span·class="ss">remote</span><span·class="p"·data-group-id="5505337245-11">)</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">
153 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Active</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-12">(</span><span·class="ss">local</span><span·class="p"·data-group-id="6754653326-12">)</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">153 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Active</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-12">(</span><span·class="ss">local</span><span·class="p"·data-group-id="5505337245-12">)</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">
154 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Uncertain</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">154 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Uncertain</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">
155 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Active</span><span·class="w">·</span><span·class="ss">tables</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">155 </span><span·class="o">--</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Active</span><span·class="w">·</span><span·class="ss">tables</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="o">--</span><span·class="w">
156 </span><span·class="ss">funky</span><span·class="w">··········</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">records</span><span·class="w">·</span><span·class="ss">occupying</span><span·class="w">·</span><span·class="mi">269</span><span·class="w">·</span><span·class="ss">words</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">mem</span><span·class="w">156 </span><span·class="ss">funky</span><span·class="w">··········</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">records</span><span·class="w">·</span><span·class="ss">occupying</span><span·class="w">·</span><span·class="mi">269</span><span·class="w">·</span><span·class="ss">words</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">mem</span><span·class="w">
157 </span><span·class="ss">schema</span><span·class="w">·········</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="ss">records</span><span·class="w">·</span><span·class="ss">occupying</span><span·class="w">·</span><span·class="mi">353</span><span·class="w">·</span><span·class="ss">words</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">mem</span><span·class="w">157 </span><span·class="ss">schema</span><span·class="w">·········</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="ss">records</span><span·class="w">·</span><span·class="ss">occupying</span><span·class="w">·</span><span·class="mi">353</span><span·class="w">·</span><span·class="ss">words</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">mem</span><span·class="w">
158 </span><span·class="o">==</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">System</span><span·class="w">·</span><span·class="ss">info</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug</span><span·class="w">·</span><span·class="ss">level</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">none</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="o">==</span><span·class="o">=</span><span·class="w">158 </span><span·class="o">==</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">System</span><span·class="w">·</span><span·class="ss">info</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug</span><span·class="w">·</span><span·class="ss">level</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">none</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
159 </span><span·class="ss">opt_disc</span><span·class="p">.</span><span·class="w">·</span><span·class="n">Directory</span><span·class="w">·</span><span·class="s">&quot;/tmp/funky&quot;</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">used</span><span·class="p">.</span><span·class="w">159 </span><span·class="ss">opt_disc</span><span·class="p">.</span><span·class="w">·</span><span·class="n">Directory</span><span·class="w">·</span><span·class="s">&quot;/tmp/funky&quot;</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">used</span><span·class="p">.</span><span·class="w">
160 </span><span·class="ss">use</span><span·class="w">·</span><span·class="ss">fall</span><span·class="o">-</span><span·class="ss">back</span><span·class="w">·</span><span·class="ss">at</span><span·class="w">·</span><span·class="ss">restart</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">160 </span><span·class="ss">use</span><span·class="w">·</span><span·class="ss">fall</span><span·class="o">-</span><span·class="ss">back</span><span·class="w">·</span><span·class="ss">at</span><span·class="w">·</span><span·class="ss">restart</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">
161 </span><span·class="ss">running</span><span·class="w">·</span><span·class="ss">db</span><span·class="w">·</span><span·class="nb">nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-13">[</span><span·class="ss">nonode@nohost</span><span·class="p"·data-group-id="6754653326-13">]</span><span·class="w">161 </span><span·class="ss">running</span><span·class="w">·</span><span·class="ss">db</span><span·class="w">·</span><span·class="nb">nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-13">[</span><span·class="ss">nonode@nohost</span><span·class="p"·data-group-id="5505337245-13">]</span><span·class="w">
162 </span><span·class="ss">stopped</span><span·class="w">·</span><span·class="ss">db</span><span·class="w">·</span><span·class="nb">nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-14">[</span><span·class="p"·data-group-id="6754653326-14">]</span><span·class="w">162 </span><span·class="ss">stopped</span><span·class="w">·</span><span·class="ss">db</span><span·class="w">·</span><span·class="nb">nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-14">[</span><span·class="p"·data-group-id="5505337245-14">]</span><span·class="w">
163 </span><span·class="ss">remote</span><span·class="w">···········</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-15">[</span><span·class="p"·data-group-id="6754653326-15">]</span><span·class="w">163 </span><span·class="ss">remote</span><span·class="w">···········</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-15">[</span><span·class="p"·data-group-id="5505337245-15">]</span><span·class="w">
164 </span><span·class="ss">ram_copies</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-16">[</span><span·class="ss">funky</span><span·class="p"·data-group-id="6754653326-16">]</span><span·class="w">164 </span><span·class="ss">ram_copies</span><span·class="w">·······</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-16">[</span><span·class="ss">funky</span><span·class="p"·data-group-id="5505337245-16">]</span><span·class="w">
165 </span><span·class="ss">disc_copies</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-17">[</span><span·class="ss">schema</span><span·class="p"·data-group-id="6754653326-17">]</span><span·class="w">165 </span><span·class="ss">disc_copies</span><span·class="w">······</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-17">[</span><span·class="ss">schema</span><span·class="p"·data-group-id="5505337245-17">]</span><span·class="w">
166 </span><span·class="ss">disc_only_copies</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-18">[</span><span·class="p"·data-group-id="6754653326-18">]</span><span·class="w">166 </span><span·class="ss">disc_only_copies</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-18">[</span><span·class="p"·data-group-id="5505337245-18">]</span><span·class="w">
167 </span><span·class="p"·data-group-id="6754653326-19">[</span><span·class="p"·data-group-id="6754653326-20">{</span><span·class="ss">nonode@nohost</span><span·class="p">,</span><span·class="ss">disc_copies</span><span·class="p"·data-group-id="6754653326-20">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·222,·SHA:·f94ceade91377d97e8926507b5600ad93108ecf1b8b05d8538674359f5ae31d6·...·]-21">]</span><span·class="w">167 </span><span·class="p"·data-group-id="5505337245-19">[</span><span·class="p"·data-group-id="5505337245-20">{</span><span·class="ss">nonode@nohost</span><span·class="p">,</span><span·class="ss">disc_copies</span><span·class="p"·data-group-id="5505337245-20">}</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·222,·SHA:·c1b0fe53f3f7a5d801c84f4107238f3613e9537df1dfb49c01b3581389607ac9·...·]-21">]</span><span·class="w">
168 </span><span·class="p"·data-group-id="6754653326-22">[</span><span·class="p"·data-group-id="6754653326-23">{</span><span·class="ss">nonode@nohost</span><span·class="p">,</span><span·class="ss">ram_copies</span><span·class="p"·data-group-id="6754653326-23">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·220,·SHA:·e318138f0b006143ec952f2438efa181d184ecdac8f47eb801b1bc5331c38d08·...·]-24">]</span><span·class="w">168 </span><span·class="p"·data-group-id="5505337245-22">[</span><span·class="p"·data-group-id="5505337245-23">{</span><span·class="ss">nonode@nohost</span><span·class="p">,</span><span·class="ss">ram_copies</span><span·class="p"·data-group-id="5505337245-23">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·220,·SHA:·b72e09378606ee5dcd9971181a3464796068c3fdf456c9b7ec4cbdbeb00d75fb·...·]-24">]</span><span·class="w">
169 </span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="ss">committed</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">aborted</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">restarted</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">logged</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">disc</span><span·class="w">169 </span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="ss">committed</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">aborted</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">restarted</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">logged</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">disc</span><span·class="w">
170 </span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">held</span><span·class="w">·</span><span·class="ss">locks</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">queue</span><span·class="p">;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">local</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">remote</span><span·class="w">170 </span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">held</span><span·class="w">·</span><span·class="ss">locks</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">queue</span><span·class="p">;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">local</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">remote</span><span·class="w">
171 </span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="ss">waits</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">other</span><span·class="w">·</span><span·class="nc">nodes</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="6754653326-25">[</span><span·class="p"·data-group-id="6754653326-25">]</span><span·class="w">171 </span><span·class="mi">0</span><span·class="w">·</span><span·class="ss">transactions</span><span·class="w">·</span><span·class="ss">waits</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">other</span><span·class="w">·</span><span·class="nc">nodes</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5505337245-25">[</span><span·class="p"·data-group-id="5505337245-25">]</span><span·class="w">
172 </span><span·class="ss">ok</span></code></pre><p>In·this·example,·the·following·actions·are·performed:</p><ul><li><em>Step·1:</em>·The·Erlang·system·is·started·from·the·UNIX·prompt·with·a·flag172 </span><span·class="ss">ok</span></code></pre><p>In·this·example,·the·following·actions·are·performed:</p><ul><li><em>Step·1:</em>·The·Erlang·system·is·started·from·the·UNIX·prompt·with·a·flag
173 <code·class="inline">-mnesia·dir·'&quot;/tmp/funky&quot;'</code>,·which·indicates·in·which·directory·to·store·the173 <code·class="inline">-mnesia·dir·'&quot;/tmp/funky&quot;'</code>,·which·indicates·in·which·directory·to·store·the
174 data.</li><li><em>Step·2:</em>·A·new·empty·schema·is·initialized·on·the·local·node·by·evaluating174 data.</li><li><em>Step·2:</em>·A·new·empty·schema·is·initialized·on·the·local·node·by·evaluating
175 <a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema([node()])</code></a>.·The·schema175 <a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema([node()])</code></a>.·The·schema
176 contains·information·about·the·database·in·general.·This·is·explained·in176 contains·information·about·the·database·in·general.·This·is·explained·in
177 detail·later.</li><li><em>Step·3:</em>·The·DBMS·is·started·by·evaluating177 detail·later.</li><li><em>Step·3:</em>·The·DBMS·is·started·by·evaluating
178 <a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>.</li><li><em>Step·4:</em>·A·first·table·is·created,·called·<code·class="inline">funky</code>,·by·evaluating·the178 <a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>.</li><li><em>Step·4:</em>·A·first·table·is·created,·called·<code·class="inline">funky</code>,·by·evaluating·the
Offset 225, 36 lines modifiedOffset 225, 36 lines modified
225 relationship.</li></ol></li></ul><h3·id="defining-structure-and-content"·class="section-heading">225 relationship.</li></ol></li></ul><h3·id="defining-structure-and-content"·class="section-heading">
226 ··<a·href="#defining-structure-and-content"·class="hover-link">226 ··<a·href="#defining-structure-and-content"·class="hover-link">
227 ····<i·class="ri-link-m"·aria-hidden="true"></i>227 ····<i·class="ri-link-m"·aria-hidden="true"></i>
228 ··</a>228 ··</a>
229 ··<span·class="text">Defining·Structure·and·Content</span>229 ··<span·class="text">Defining·Structure·and·Content</span>
230 </h3>230 </h3>
231 <p>First·the·record·definitions·are·entered·into·a·text·file·named·<code·class="inline">company.hrl</code>.231 <p>First·the·record·definitions·are·entered·into·a·text·file·named·<code·class="inline">company.hrl</code>.
232 This·file·defines·the·following·structure·for·the·example·database:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1754734926-1">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1754734926-2">{</span><span·class="ss">emp_no</span><span·class="p">,</span><span·class="w">232 This·file·defines·the·following·structure·for·the·example·database:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4699466964-1">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4699466964-2">{</span><span·class="ss">emp_no</span><span·class="p">,</span><span·class="w">
233 ···················</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">233 ···················</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">
234 ···················</span><span·class="ss">salary</span><span·class="p">,</span><span·class="w">234 ···················</span><span·class="ss">salary</span><span·class="p">,</span><span·class="w">
235 ···················</span><span·class="ss">sex</span><span·class="p">,</span><span·class="w">235 ···················</span><span·class="ss">sex</span><span·class="p">,</span><span·class="w">
236 ···················</span><span·class="ss">phone</span><span·class="p">,</span><span·class="w">236 ···················</span><span·class="ss">phone</span><span·class="p">,</span><span·class="w">
237 ···················</span><span·class="ss">room_no</span><span·class="p"·data-group-id="1754734926-2">}</span><span·class="p"·data-group-id="1754734926-1">)</span><span·class="p">.</span><span·class="w">237 ···················</span><span·class="ss">room_no</span><span·class="p"·data-group-id="4699466964-2">}</span><span·class="p"·data-group-id="4699466964-1">)</span><span·class="p">.</span><span·class="w">
238 </span><span·class="w">238 </span><span·class="w">
239 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1754734926-3">(</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1754734926-4">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="w">239 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4699466964-3">(</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4699466964-4">{</span><span·class="ss">id</span><span·class="p">,</span><span·class="w">
240 ···············</span><span·class="ss">name</span><span·class="p"·data-group-id="1754734926-4">}</span><span·class="p"·data-group-id="1754734926-3">)</span><span·class="p">.</span><span·class="w">240 ···············</span><span·class="ss">name</span><span·class="p"·data-group-id="4699466964-4">}</span><span·class="p"·data-group-id="4699466964-3">)</span><span·class="p">.</span><span·class="w">
241 </span><span·class="w">241 </span><span·class="w">
242 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1754734926-5">(</span><span·class="ss">project</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1754734926-6">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">242 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4699466964-5">(</span><span·class="ss">project</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4699466964-6">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">
243 ··················</span><span·class="ss">number</span><span·class="p"·data-group-id="1754734926-6">}</span><span·class="p"·data-group-id="1754734926-5">)</span><span·class="p">.</span><span·class="w">243 ··················</span><span·class="ss">number</span><span·class="p"·data-group-id="4699466964-6">}</span><span·class="p"·data-group-id="4699466964-5">)</span><span·class="p">.</span><span·class="w">
244 </span><span·class="w">244 </span><span·class="w">
  
245 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1754734926-7">(</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1754734926-8">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">245 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4699466964-7">(</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4699466964-8">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">
246 ··················</span><span·class="ss">dept</span><span·class="p"·data-group-id="1754734926-8">}</span><span·class="p"·data-group-id="1754734926-7">)</span><span·class="p">.</span><span·class="w">246 ··················</span><span·class="ss">dept</span><span·class="p"·data-group-id="4699466964-8">}</span><span·class="p"·data-group-id="4699466964-7">)</span><span·class="p">.</span><span·class="w">
247 </span><span·class="w">247 </span><span·class="w">
248 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1754734926-9">(</span><span·class="ss">at_dep</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1754734926-10">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">248 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4699466964-9">(</span><span·class="ss">at_dep</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4699466964-10">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">
249 ·················</span><span·class="ss">dept_id</span><span·class="p"·data-group-id="1754734926-10">}</span><span·class="p"·data-group-id="1754734926-9">)</span><span·class="p">.</span><span·class="w">249 ·················</span><span·class="ss">dept_id</span><span·class="p"·data-group-id="4699466964-10">}</span><span·class="p"·data-group-id="4699466964-9">)</span><span·class="p">.</span><span·class="w">
250 </span><span·class="w">250 </span><span·class="w">
251 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="1754734926-11">(</span><span·class="ss">in_proj</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1754734926-12">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">251 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4699466964-11">(</span><span·class="ss">in_proj</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4699466964-12">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">
252 ··················</span><span·class="ss">proj_name</span><span·class="p"·data-group-id="1754734926-12">}</span><span·class="p"·data-group-id="1754734926-11">)</span><span·class="p">.</span></code></pre><p>The·structure·defines·six·tables·in·the·database.·In·<code·class="inline">Mnesia</code>,·the·function252 ··················</span><span·class="ss">proj_name</span><span·class="p"·data-group-id="4699466964-12">}</span><span·class="p"·data-group-id="4699466964-11">)</span><span·class="p">.</span></code></pre><p>The·structure·defines·six·tables·in·the·database.·In·<code·class="inline">Mnesia</code>,·the·function
253 <a·href="mnesia.html#create_table/2"><code·class="inline">mnesia:create_table(Name,·ArgList)</code></a>·creates·tables.253 <a·href="mnesia.html#create_table/2"><code·class="inline">mnesia:create_table(Name,·ArgList)</code></a>·creates·tables.
254 <code·class="inline">Name</code>·is·the·table·name.</p><blockquote><h4·class="info">Note</h4><p>The·current·version·of·<code·class="inline">Mnesia</code>·does·not·require·that·the·name·of·the·table·is254 <code·class="inline">Name</code>·is·the·table·name.</p><blockquote><h4·class="info">Note</h4><p>The·current·version·of·<code·class="inline">Mnesia</code>·does·not·require·that·the·name·of·the·table·is
255 the·same·as·the·record·name,·see255 the·same·as·the·record·name,·see
256 <a·href="mnesia_chap4.html#recordnames_tablenames">Record·Names·versus·Table·Names.</a>.</p></blockquote><p>For·example,·the·table·for·employees·is·created·with·the·function256 <a·href="mnesia_chap4.html#recordnames_tablenames">Record·Names·versus·Table·Names.</a>.</p></blockquote><p>For·example,·the·table·for·employees·is·created·with·the·function
257 <code·class="inline">mnesia:create_table(employee,·[{attributes,·record_info(fields,·employee)}])</code>.257 <code·class="inline">mnesia:create_table(employee,·[{attributes,·record_info(fields,·employee)}])</code>.
258 The·table·name·<code·class="inline">employee</code>·matches·the·name·for·records·specified·in·<code·class="inline">ArgList</code>.258 The·table·name·<code·class="inline">employee</code>·matches·the·name·for·records·specified·in·<code·class="inline">ArgList</code>.
259 The·expression·<code·class="inline">record_info(fields,·RecordName)</code>·is·processed·by·the·Erlang259 The·expression·<code·class="inline">record_info(fields,·RecordName)</code>·is·processed·by·the·Erlang
Offset 263, 120 lines modifiedOffset 263, 120 lines modified
263 ··<a·href="#program"·class="hover-link">263 ··<a·href="#program"·class="hover-link">
264 ····<i·class="ri-link-m"·aria-hidden="true"></i>264 ····<i·class="ri-link-m"·aria-hidden="true"></i>
265 ··</a>265 ··</a>
266 ··<span·class="text">Program</span>266 ··<span·class="text">Program</span>
267 </h3>267 </h3>
268 <p>The·following·shell·interaction·starts·<code·class="inline">Mnesia</code>·and·initializes·the·schema·for268 <p>The·following·shell·interaction·starts·<code·class="inline">Mnesia</code>·and·initializes·the·schema·for
269 the·<code·class="inline">Company</code>·database:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-mnesia·dir·&#39;&quot;/ldisc/scratch/Mnesia.Company&quot;&#39;</span><span·class="w">269 the·<code·class="inline">Company</code>·database:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·erl·-mnesia·dir·&#39;&quot;/ldisc/scratch/Mnesia.Company&quot;&#39;</span><span·class="w">
270 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="2777039165-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="2777039165-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">4.9</span><span·class="w">270 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="5299987608-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="5299987608-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">4.9</span><span·class="w">
  
271 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="2777039165-2">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2777039165-2">)</span><span·class="gp·unselectable">271 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="5299987608-2">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5299987608-2">)</span><span·class="gp·unselectable">
272 1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="2777039165-3">(</span><span·class="p"·data-group-id="2777039165-4">[</span><span·class="nf">node</span><span·class="p"·data-group-id="2777039165-5">(</span><span·class="p"·data-group-id="2777039165-5">)</span><span·class="p"·data-group-id="2777039165-4">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·06e3a74cae91333b12995c2a9b759d997eee232422c84d99eed30474ff8c5074·...·]-3">)</span><span·class="p">.</span><span·class="w">272 1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="5299987608-3">(</span><span·class="p"·data-group-id="5299987608-4">[</span><span·class="nf">node</span><span·class="p"·data-group-id="5299987608-5">(</span><span·class="p"·data-group-id="5299987608-5">)</span><span·class="p"·data-group-id="5299987608-4">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·f15cbfeda7e1f5fc3b17e466da01dbe4ac72bee5caa0a950b4d03a050821d5cc·...·]-3">)</span><span·class="p">.</span><span·class="w">
273 </span><span·class="ss">ok</span><span·class="gp·unselectable">273 </span><span·class="ss">ok</span><span·class="gp·unselectable">
274 2&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2777039165-6">(</span><span·class="p"·data-group-id="2777039165-6">)</span><span·class="p">.</span><span·class="w">274 2&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5299987608-6">(</span><span·class="p"·data-group-id="5299987608-6">)</span><span·class="p">.</span><span·class="w">
275 </span><span·class="ss">ok</span></code></pre><p>The·following·program·module·creates·and·populates·previously·defined·tables:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="5707241301-1">(</span><span·class="s">&quot;stdlib/include/qlc.hrl&quot;</span><span·class="p"·data-group-id="5707241301-1">)</span><span·class="p">.</span><span·class="w">275 </span><span·class="ss">ok</span></code></pre><p>The·following·program·module·creates·and·populates·previously·defined·tables:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0018103209-1">(</span><span·class="s">&quot;stdlib/include/qlc.hrl&quot;</span><span·class="p"·data-group-id="0018103209-1">)</span><span·class="p">.</span><span·class="w">
276 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="5707241301-2">(</span><span·class="s">&quot;company.hrl&quot;</span><span·class="p"·data-group-id="5707241301-2">)</span><span·class="p">.</span><span·class="w">276 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="0018103209-2">(</span><span·class="s">&quot;company.hrl&quot;</span><span·class="p"·data-group-id="0018103209-2">)</span><span·class="p">.</span><span·class="w">
  
277 </span><span·class="nf">init</span><span·class="p"·data-group-id="5707241301-3">(</span><span·class="p"·data-group-id="5707241301-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">277 </span><span·class="nf">init</span><span·class="p"·data-group-id="0018103209-3">(</span><span·class="p"·data-group-id="0018103209-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
278 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5707241301-4">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">278 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0018103209-4">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">
279 ························</span><span·class="p"·data-group-id="5707241301-5">[</span><span·class="p"·data-group-id="5707241301-6">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5707241301-7">(</span><span·class[·...·truncated·by·diffoscope;·len:·299,·SHA:·491ba782faa0cdaef2714179178285617f4706c08240c38b2c6cc0dcb483868b·...·]-4">)</span><span·class="p">,</span><span·class="w">279 ························</span><span·class="p"·data-group-id="0018103209-5">[</span><span·class="p"·data-group-id="0018103209-6">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0018103209-7">(</span><span·class[·...·truncated·by·diffoscope;·len:·299,·SHA:·965d58c32b79ab7decd3f86f360ed34c15a90a6efcd845cb26ebb2640c823d19·...·]-4">)</span><span·class="p">,</span><span·class="w">
280 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5707241301-8">(</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">280 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0018103209-8">(</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">
281 ························</span><span·class="p"·data-group-id="5707241301-9">[</span><span·class="p"·data-group-id="5707241301-10">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5707241301-11">(</span><span·cla[·...·truncated·by·diffoscope;·len:·299,·SHA:·55d0d9f19764cb0e7de63b72ee8ff6c05c480be31c268eb07c4aef1ddadf38c4·...·]-8">)</span><span·class="p">,</span><span·class="w">281 ························</span><span·class="p"·data-group-id="0018103209-9">[</span><span·class="p"·data-group-id="0018103209-10">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0018103209-11">(</span><span·cla[·...·truncated·by·diffoscope;·len:·299,·SHA:·3483c97731edc7e8eb6ea237108f81506eacf2cfbd1734b5d93734b7465ad10a·...·]-8">)</span><span·class="p">,</span><span·class="w">
282 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5707241301-12">(</span><span·class="ss">project</span><span·class="p">,</span><span·class="w">282 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0018103209-12">(</span><span·class="ss">project</span><span·class="p">,</span><span·class="w">
283 ························</span><span·class="p"·data-group-id="5707241301-13">[</span><span·class="p"·data-group-id="5707241301-14">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5707241301-15">(</span><span·cl[·...·truncated·by·diffoscope;·len:·304,·SHA:·02aa8cd03bce529010ca916a3aded6e565a8a6c3980163e7cb6ba41c0754222e·...·]-12">)</span><span·class="p">,</span><span·class="w">283 ························</span><span·class="p"·data-group-id="0018103209-13">[</span><span·class="p"·data-group-id="0018103209-14">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0018103209-15">(</span><span·cl[·...·truncated·by·diffoscope;·len:·304,·SHA:·5ce5f3bbeed94e24564ac7f0cdc10c43f6e51bb99940137f5eef349cec23184a·...·]-12">)</span><span·class="p">,</span><span·class="w">
284 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5707241301-16">(</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5707241301-17">[</span><span·class="p"·data-group-id="5707241301-18">{</span><span·class="ss">type</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·98,·SHA:·c30a3222180fb976ae0ff1786a9f14fa1babc95bce1ce4ed3a7f2893e5fc9968·...·]-18">}</span><span·class="p">,</span><span·class="w">284 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0018103209-16">(</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0018103209-17">[</span><span·class="p"·data-group-id="0018103209-18">{</span><span·class="ss">type</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·98,·SHA:·a52500466509d56da1b1cd53f1b5fa15439c3527eaca6124268a268abe75bd44·...·]-18">}</span><span·class="p">,</span><span·class="w">
285 ··································</span><span·class="p"·data-group-id="5707241301-19">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5707241301-20">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·44419fbd597c70156964685be5510ba47cf7f0f1c6f5a1fac96616f673d77100·...·]-16">)</span><span·class="p">,</span><span·class="w">285 ··································</span><span·class="p"·data-group-id="0018103209-19">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0018103209-20">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·8fa88523628e2281c19116ef8991e3301045a237a9b41e222709cdc55e555a65·...·]-16">)</span><span·class="p">,</span><span·class="w">
286 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5707241301-21">(</span><span·class="ss">at_dep</span><span·class="p">,</span><span·class="w">286 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0018103209-21">(</span><span·class="ss">at_dep</span><span·class="p">,</span><span·class="w">
287 ·························</span><span·class="p"·data-group-id="5707241301-22">[</span><span·class="p"·data-group-id="5707241301-23">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5707241301-24">(</span><span·cl[·...·truncated·by·diffoscope;·len:·303,·SHA:·95d3683e292f40b011fcda4ac7efba0ed97df8df4c94f90faf73f1c205a1034a·...·]-21">)</span><span·class="p">,</span><span·class="w">287 ·························</span><span·class="p"·data-group-id="0018103209-22">[</span><span·class="p"·data-group-id="0018103209-23">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0018103209-24">(</span><span·cl[·...·truncated·by·diffoscope;·len:·303,·SHA:·430b2213e8052b477581de44151dfd028ac28e272ad9cb77a6fa60b6999692c5·...·]-21">)</span><span·class="p">,</span><span·class="w">
288 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5707241301-25">(</span><span·class="ss">in_proj</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5707241301-26">[</span><span·class="p"·data-group-id="5707241301-27">{</span><span·class="ss">type</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·98,·SHA:·c30a3222180fb976ae0ff1786a9f14fa1babc95bce1ce4ed3a7f2893e5fc9968·...·]-27">}</span><span·class="p">,</span><span·class="w">288 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="0018103209-25">(</span><span·class="ss">in_proj</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0018103209-26">[</span><span·class="p"·data-group-id="0018103209-27">{</span><span·class="ss">type</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·98,·SHA:·a52500466509d56da1b1cd53f1b5fa15439c3527eaca6124268a268abe75bd44·...·]-27">}</span><span·class="p">,</span><span·class="w">
289 ··································</span><span·class="p"·data-group-id="5707241301-28">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5707241301-29">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·7af0f9668237c5e2fccdf60886ba724fe99abb6653be51dc19ec8352f3818b57·...·]-25">)</span><span·class="p">.</span></code></pre><h3·id="program-explained"·class="section-heading">289 ··································</span><span·class="p"·data-group-id="0018103209-28">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="0018103209-29">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·fbdb1733cf4c7a02190ac6f8fdcfc90262d12446424539e0c0cac11101301b48·...·]-25">)</span><span·class="p">.</span></code></pre><h3·id="program-explained"·class="section-heading">
290 ··<a·href="#program-explained"·class="hover-link">290 ··<a·href="#program-explained"·class="hover-link">
291 ····<i·class="ri-link-m"·aria-hidden="true"></i>291 ····<i·class="ri-link-m"·aria-hidden="true"></i>
292 ··</a>292 ··</a>
293 ··<span·class="text">Program·Explained</span>293 ··<span·class="text">Program·Explained</span>
294 </h3>294 </h3>
295 <p>The·following·commands·and·functions·are·used·to·initiate·the·<code·class="inline">Company</code>295 <p>The·following·commands·and·functions·are·used·to·initiate·the·<code·class="inline">Company</code>
296 database:</p><ul><li><code·class="inline">%·erl·-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.Company&quot;'</code>.·This·is·a·UNIX296 database:</p><ul><li><code·class="inline">%·erl·-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.Company&quot;'</code>.·This·is·a·UNIX
297 command-line·entry·that·starts·the·Erlang·system.·The·flag·<code·class="inline">-mnesia·dir·Dir</code>297 command-line·entry·that·starts·the·Erlang·system.·The·flag·<code·class="inline">-mnesia·dir·Dir</code>
298 specifies·the·location·of·the·database·directory.·The·system·responds·and298 specifies·the·location·of·the·database·directory.·The·system·responds·and
299 waits·for·further·input·with·the·prompt·<code·class="inline">1&gt;</code>.</li><li><a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema([node()])</code></a>.·This·function·has299 waits·for·further·input·with·the·prompt·<code·class="inline">1&gt;</code>.</li><li><a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema([node()])</code></a>.·This·function·has
300 the·format·<code·class="inline">mnesia:create_schema(DiscNodeList)</code>·and·initiates·a·new·schema.·In300 the·format·<code·class="inline">mnesia:create_schema(DiscNodeList)</code>·and·initiates·a·new·schema.·In
301 this·example,·a·non-distributed·system·using·only·one·node·is·created.·Schemas301 this·example,·a·non-distributed·system·using·only·one·node·is·created.·Schemas
302 are·fully·explained·in·<a·href="mnesia_chap3.html#def_schema">Define·a·Schema</a>.</li><li><a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>.·This·function·starts·<code·class="inline">Mnesia</code>·and·is·fully302 are·fully·explained·in·<a·href="mnesia_chap3.html#def_schema">Define·a·Schema</a>.</li><li><a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>.·This·function·starts·<code·class="inline">Mnesia</code>·and·is·fully
Max diff block lines reached; 115539/164970 bytes (70.04%) of diff not shown.
52.0 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_chap3.html
    
Offset 171, 26 lines modifiedOffset 171, 26 lines modified
171 there·as·well.·This·action·extends·the·set·of·nodes·that·comprise·this171 there·as·well.·This·action·extends·the·set·of·nodes·that·comprise·this
172 particular·<code·class="inline">Mnesia</code>·system.</p></li><li><p><a·href="mnesia.html#del_table_copy/2"><code·class="inline">mnesia:del_table_copy(Tab,·Node)</code></a>·deletes·the172 particular·<code·class="inline">Mnesia</code>·system.</p></li><li><p><a·href="mnesia.html#del_table_copy/2"><code·class="inline">mnesia:del_table_copy(Tab,·Node)</code></a>·deletes·the
173 replica·of·table·<code·class="inline">Tab</code>·at·node·<code·class="inline">Node</code>.·When·the·last·replica·of·a·table·is173 replica·of·table·<code·class="inline">Tab</code>·at·node·<code·class="inline">Node</code>.·When·the·last·replica·of·a·table·is
174 removed,·the·table·is·deleted.</p></li><li><p><a·href="mnesia.html#transform_table/4"><code·class="inline">mnesia:transform_table(Tab,·Fun,·NewAttributeList,·NewRecordName)</code></a>174 removed,·the·table·is·deleted.</p></li><li><p><a·href="mnesia.html#transform_table/4"><code·class="inline">mnesia:transform_table(Tab,·Fun,·NewAttributeList,·NewRecordName)</code></a>
175 changes·the·format·on·all·records·in·table·<code·class="inline">Tab</code>.·It·applies·argument·<code·class="inline">Fun</code>·to175 changes·the·format·on·all·records·in·table·<code·class="inline">Tab</code>.·It·applies·argument·<code·class="inline">Fun</code>·to
176 all·records·in·the·table.·<code·class="inline">Fun</code>·must·be·a·function·that·takes·a·record·of·the176 all·records·in·the·table.·<code·class="inline">Fun</code>·must·be·a·function·that·takes·a·record·of·the
177 old·type,·and·returns·the·record·of·the·new·type.·The·table·key·must·not·be177 old·type,·and·returns·the·record·of·the·new·type.·The·table·key·must·not·be
178 changed.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5633521591-1">(</span><span·class="ss">old</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5633521591-2">{</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">val</span><spa[·...·truncated·by·diffoscope;·len:·89,·SHA:·8a7caaad75569a3a4bc7213ac8efd6ab58d931c3e522b992a8f133aab44238da·...·]1-1">)</span><span·class="p">.</span><span·class="w">178 changed.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="2557688531-1">(</span><span·class="ss">old</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2557688531-2">{</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">val</span><spa[·...·truncated·by·diffoscope;·len:·89,·SHA:·50abb32d497ec7785b63565389853f3721b8a715b17a4355e7e4d8d2cd4c15a0·...·]1-1">)</span><span·class="p">.</span><span·class="w">
179 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5633521591-3">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5633521591-4">{</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">val</span><spa[·...·truncated·by·diffoscope;·len:·166,·SHA:·5b97fcde518cf8768721146566835f04ae3c99561c257dc0f649c122404512b0·...·]1-3">)</span><span·class="p">.</span><span·class="w">179 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="2557688531-3">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2557688531-4">{</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">val</span><spa[·...·truncated·by·diffoscope;·len:·166,·SHA:·336417eb639b78b83e4a11ef095e1aaf2820a93af46bdf20ac88a08af32f340d·...·]1-3">)</span><span·class="p">.</span><span·class="w">
  
180 </span><span·class="n">Transformer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">180 </span><span·class="n">Transformer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
181 ···</span><span·class="nf">fun</span><span·class="p"·data-group-id="5633521591-5">(</span><span·class="n">X</span><span·class="p"·data-group-id="5633521591-5">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">record</span><span·class="p"·data-group-id="5633521591-6">(</span[·...·truncated·by·diffoscope;·len:·140,·SHA:·b3c2073bac78ed5148c77fcdd59aed0aca6085572f288d7115c2da1888d3305f·...·]1-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">181 ···</span><span·class="nf">fun</span><span·class="p"·data-group-id="2557688531-5">(</span><span·class="n">X</span><span·class="p"·data-group-id="2557688531-5">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">record</span><span·class="p"·data-group-id="2557688531-6">(</span[·...·truncated·by·diffoscope;·len:·140,·SHA:·13549d336049df82eaed46e16cdba825be7caf11a808f37ec280df3bc869a5b8·...·]1-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
182 ······</span><span·class="o">#</span><span·class="ss">new</span><span·class="p"·data-group-id="5633521591-7">{</span><span·class="ss">key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">old</span><span·class="p">.</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">182 ······</span><span·class="o">#</span><span·class="ss">new</span><span·class="p"·data-group-id="2557688531-7">{</span><span·class="ss">key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">old</span><span·class="p">.</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">
183 ···········</span><span·class="ss">val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">old</span><span·class="p">.</span><span·class="ss">val</span><span·class="p">,</span><span·class="w">183 ···········</span><span·class="ss">val</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">X</span><span·class="o">#</span><span·class="ss">old</span><span·class="p">.</span><span·class="ss">val</span><span·class="p">,</span><span·class="w">
184 ···········</span><span·class="ss">extra</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="p"·data-group-id="5633521591-7">}</span><span·class="w">184 ···········</span><span·class="ss">extra</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="p"·data-group-id="2557688531-7">}</span><span·class="w">
185 ···</span><span·class="k">end</span><span·class="p">,</span><span·class="w">185 ···</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
186 </span><span·class="p"·data-group-id="5633521591-8">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p"·data-group-id="5633521591-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·128,·SHA:·426b84a8c804c2a1926d0fd25c0aecb6257999a7dca1f3d6aceb0d8b27e77c64·...·]1-9">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Transformer</span><span·class="p">,</span><span·class="w">186 </span><span·class="p"·data-group-id="2557688531-8">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p"·data-group-id="2557688531-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·128,·SHA:·5e5e26c5ea4fad4ab01e966d900fc3cf7c513758577ab1b60d059f654ffac1e2·...·]1-9">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Transformer</span><span·class="p">,</span><span·class="w">
187 ······································</span><span·class="nf">record_info</span><span·class="p"·data-group-id="5633521591-10">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new</span><span·class="p"·data-group-id="5633521591-10">)</span><span·class="p">,</span><span·class="w">187 ······································</span><span·class="nf">record_info</span><span·class="p"·data-group-id="2557688531-10">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">new</span><span·class="p"·data-group-id="2557688531-10">)</span><span·class="p">,</span><span·class="w">
188 ······································</span><span·class="ss">new</span><span·class="p"·data-group-id="5633521591-9">)</span><span·class="p">,</span></code></pre><p>Argument·<code·class="inline">Fun</code>·can·also·be·the·atom·<code·class="inline">ignore</code>,·which·indicates·that·only·the188 ······································</span><span·class="ss">new</span><span·class="p"·data-group-id="2557688531-9">)</span><span·class="p">,</span></code></pre><p>Argument·<code·class="inline">Fun</code>·can·also·be·the·atom·<code·class="inline">ignore</code>,·which·indicates·that·only·the
189 metadata·about·the·table·is·updated.·Use·of·<code·class="inline">ignore</code>·is·not·recommended·(as·it189 metadata·about·the·table·is·updated.·Use·of·<code·class="inline">ignore</code>·is·not·recommended·(as·it
190 creates·inconsistencies·between·the·metadata·and·the·actual·data)·but·it·is190 creates·inconsistencies·between·the·metadata·and·the·actual·data)·but·it·is
191 included·as·a·possibility·for·the·user·do·to·an·own·(offline)·transform.</p></li><li><p><a·href="mnesia.html#change_table_copy_type/3"><code·class="inline">mnesia:change_table_copy_type(Tab,·Node,·ToType)</code></a>191 included·as·a·possibility·for·the·user·do·to·an·own·(offline)·transform.</p></li><li><p><a·href="mnesia.html#change_table_copy_type/3"><code·class="inline">mnesia:change_table_copy_type(Tab,·Node,·ToType)</code></a>
192 changes·the·storage·type·of·a·table.·For·example,·a·RAM·table·is·changed·to·a192 changes·the·storage·type·of·a·table.·For·example,·a·RAM·table·is·changed·to·a
193 <code·class="inline">disc_table</code>·at·the·node·specified·as·<code·class="inline">Node</code>.</p></li></ul><h2·id="data-model"·class="section-heading">193 <code·class="inline">disc_table</code>·at·the·node·specified·as·<code·class="inline">Node</code>.</p></li></ul><h2·id="data-model"·class="section-heading">
194 ··<a·href="#data-model"·class="hover-link">194 ··<a·href="#data-model"·class="hover-link">
195 ····<i·class="ri-link-m"·aria-hidden="true"></i>195 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 234, 37 lines modifiedOffset 234, 37 lines modified
234 <a·href="mnesia_chap2.html#getting_started">Getting·Started</a>·to·illustrate·how·to·run·a234 <a·href="mnesia_chap2.html#getting_started">Getting·Started</a>·to·illustrate·how·to·run·a
235 database·on·two·separate·nodes,·called·<code·class="inline">a@gin</code>·and·<code·class="inline">b@skeppet</code>.·Each·of·these235 database·on·two·separate·nodes,·called·<code·class="inline">a@gin</code>·and·<code·class="inline">b@skeppet</code>.·Each·of·these
236 nodes·must·have·a·<code·class="inline">Mnesia</code>·directory·and·an·initialized·schema·before·<code·class="inline">Mnesia</code>236 nodes·must·have·a·<code·class="inline">Mnesia</code>·directory·and·an·initialized·schema·before·<code·class="inline">Mnesia</code>
237 can·be·started.·There·are·two·ways·to·specify·the·<code·class="inline">Mnesia</code>·directory·to·be·used:</p><ul><li><p>Specify·the·<code·class="inline">Mnesia</code>·directory·by·providing·an·application·parameter·either237 can·be·started.·There·are·two·ways·to·specify·the·<code·class="inline">Mnesia</code>·directory·to·be·used:</p><ul><li><p>Specify·the·<code·class="inline">Mnesia</code>·directory·by·providing·an·application·parameter·either
238 when·starting·the·Erlang·shell·or·in·the·application·script.·Previously,·the238 when·starting·the·Erlang·shell·or·in·the·application·script.·Previously,·the
239 following·example·was·used·to·create·the·directory·for·the·<code·class="inline">Company</code>·database:</p><pre><code·class="text">%·erl·-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.Company&quot;'</code></pre></li><li><p>If·no·command-line·flag·is·entered,·the·<code·class="inline">Mnesia</code>·directory·becomes·the·current239 following·example·was·used·to·create·the·directory·for·the·<code·class="inline">Company</code>·database:</p><pre><code·class="text">%·erl·-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.Company&quot;'</code></pre></li><li><p>If·no·command-line·flag·is·entered,·the·<code·class="inline">Mnesia</code>·directory·becomes·the·current
240 working·directory·on·the·node·where·the·Erlang·shell·is·started.</p></li></ul><p>To·start·the·<code·class="inline">Company</code>·database·and·get·it·running·on·the·two·specified·nodes,240 working·directory·on·the·node·where·the·Erlang·shell·is·started.</p></li></ul><p>To·start·the·<code·class="inline">Company</code>·database·and·get·it·running·on·the·two·specified·nodes,
241 enter·the·following·commands:</p><ol><li>On·the·node·<code·class="inline">a@gin</code>:</li></ol><pre><code·class="text">·gin·%·erl·-sname·a··-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.company&quot;'</code></pre><ol><li>On·the·node·<code·class="inline">b@skeppet</code>:</li></ol><pre><code·class="text">skeppet·%·erl·-sname·b·-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.company&quot;'</code></pre><ol><li>On·one·of·the·two·nodes:</li></ol><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(a@gin)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="1817583496-1">(</span><span·class="p"·data-group-id="1817583496-2">[</span><span·class="ss">a@gin</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b@skeppet</span><span·class="p"·data-group-id="1817583496-2">]</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·0c891faec26b39f7ae579494f36e5262c9497955580b5f2c47b4f7a85846ef29·...·]-1">)</span><span·class="p">.</span></code></pre><ol><li>The·function·<a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>·is·called·on·both·nodes.</li><li>To·initialize·the·database,·execute·the·following·code·on·one·of·the·two241 enter·the·following·commands:</p><ol><li>On·the·node·<code·class="inline">a@gin</code>:</li></ol><pre><code·class="text">·gin·%·erl·-sname·a··-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.company&quot;'</code></pre><ol><li>On·the·node·<code·class="inline">b@skeppet</code>:</li></ol><pre><code·class="text">skeppet·%·erl·-sname·b·-mnesia·dir·'&quot;/ldisc/scratch/Mnesia.company&quot;'</code></pre><ol><li>On·one·of·the·two·nodes:</li></ol><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(a@gin)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="9551559751-1">(</span><span·class="p"·data-group-id="9551559751-2">[</span><span·class="ss">a@gin</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b@skeppet</span><span·class="p"·data-group-id="9551559751-2">]</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·df537886b1d5c0576480df2969dbc098c46aa79c023e44fb41db2ded931908d9·...·]-1">)</span><span·class="p">.</span></code></pre><ol><li>The·function·<a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>·is·called·on·both·nodes.</li><li>To·initialize·the·database,·execute·the·following·code·on·one·of·the·two
242 nodes:</li></ol><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">dist_init</span><span·class="p"·data-group-id="6364052086-1">(</span><span·class="p"·data-group-id="6364052086-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">242 nodes:</li></ol><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">dist_init</span><span·class="p"·data-group-id="4519791740-1">(</span><span·class="p"·data-group-id="4519791740-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
243 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6364052086-2">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">243 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4519791740-2">(</span><span·class="ss">employee</span><span·class="p">,</span><span·class="w">
244 ·························</span><span·class="p"·data-group-id="6364052086-3">[</span><span·class="p"·data-group-id="6364052086-4">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-5">[</span><span·class="ss">a@gin</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·158,·SHA:·5d8397b5cd4be45ef6cd197afd3c1ae334e5af4657c8dc37b6c9e7b127c896f8·...·]-4">}</span><span·class="p">,</span><span·class="w">244 ·························</span><span·class="p"·data-group-id="4519791740-3">[</span><span·class="p"·data-group-id="4519791740-4">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-5">[</span><span·class="ss">a@gin</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·158,·SHA:·c7cc5d701b813dfe61deaede0412ffe42bb109211f443c5e920485a0b07b986d·...·]-4">}</span><span·class="p">,</span><span·class="w">
245 ··························</span><span·class="p"·data-group-id="6364052086-6">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6364052086-7">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">245 ··························</span><span·class="p"·data-group-id="4519791740-6">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="4519791740-7">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">
246 »       »       »       »       »       »       ···</span><span·class="ss">employee</span><span·class="p"·data-group-id="6364052086-7">)</span><span·class="p"·data-group-id="6364052086-6">}</span><span·class="p"·data-group-id="6364052086-3">]</span><span·class="p"·data-group-id="6364052086-2">)</span><span·class="p">,</span><span·class="w">246 »       »       »       »       »       »       ···</span><span·class="ss">employee</span><span·class="p"·data-group-id="4519791740-7">)</span><span·class="p"·data-group-id="4519791740-6">}</span><span·class="p"·data-group-id="4519791740-3">]</span><span·class="p"·data-group-id="4519791740-2">)</span><span·class="p">,</span><span·class="w">
247 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6364052086-8">(</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">247 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4519791740-8">(</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">
248 ·························</span><span·class="p"·data-group-id="6364052086-9">[</span><span·class="p"·data-group-id="6364052086-10">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-11">[</span><span·class="ss">a@gin</span><span·class="p"[·...·truncated·by·diffoscope;·len:·161,·SHA:·565be5bbabfced1aa4dd4ebedaf82ab89a50dfc1aae4f9f8cdca877232f1c2ec·...·]-10">}</span><span·class="p">,</span><span·class="w">248 ·························</span><span·class="p"·data-group-id="4519791740-9">[</span><span·class="p"·data-group-id="4519791740-10">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-11">[</span><span·class="ss">a@gin</span><span·class="p"[·...·truncated·by·diffoscope;·len:·161,·SHA:·180aae6159b12b63306d722481a712f8996c079f0fa21fd2db1123ddf3437e75·...·]-10">}</span><span·class="p">,</span><span·class="w">
249 ··························</span><span·class="p"·data-group-id="6364052086-12">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6364052086-13">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·246,·SHA:·0169ff169df3fd050a57cc2c70bfd857864f310d0519419ee8c0383a39772a72·...·]-8">)</span><span·class="p">,</span><span·class="w">249 ··························</span><span·class="p"·data-group-id="4519791740-12">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="4519791740-13">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·246,·SHA:·046a5ceb5326043db89e9d23bfe040e05104199e7cd5d62d9025470b51279d46·...·]-8">)</span><span·class="p">,</span><span·class="w">
250 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6364052086-14">(</span><span·class="ss">project</span><span·class="p">,</span><span·class="w">250 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4519791740-14">(</span><span·class="ss">project</span><span·class="p">,</span><span·class="w">
251 ·························</span><span·class="p"·data-group-id="6364052086-15">[</span><span·class="p"·data-group-id="6364052086-16">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-17">[</span><span·class="ss">a@gin</span><span·class="p[·...·truncated·by·diffoscope;·len:·162,·SHA:·9bf860747c8fdcfcb9907febae85807811019cd754519d5f74508d1c78901894·...·]-16">}</span><span·class="p">,</span><span·class="w">251 ·························</span><span·class="p"·data-group-id="4519791740-15">[</span><span·class="p"·data-group-id="4519791740-16">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-17">[</span><span·class="ss">a@gin</span><span·class="p[·...·truncated·by·diffoscope;·len:·162,·SHA:·ca4a915f1065fca0f960c0d5b8b2ceafb39457f5df06fcf9723b8c06d54fcbb2·...·]-16">}</span><span·class="p">,</span><span·class="w">
252 ··························</span><span·class="p"·data-group-id="6364052086-18">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6364052086-19">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·86a8546976d1e495f69d301362dcddfe40c2a96608b384393c28d407c21e3956·...·]-14">)</span><span·class="p">,</span><span·class="w">252 ··························</span><span·class="p"·data-group-id="4519791740-18">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="4519791740-19">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·fb0d7c4ad69f71efb33c32eaebca90d1fce3c12583039a1d32c7a945fa02bf78·...·]-14">)</span><span·class="p">,</span><span·class="w">
253 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6364052086-20">(</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-21">[</span><span·class="p"·data-group-id="6364052086-22">{</span><span·class="ss">type</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·98,·SHA:·7e96a3c2a12054c6cd57a951d5ee722e05517c3ec4d97b76ac20ab4938a91b80·...·]-22">}</span><span·class="p">,</span><span·class="w">253 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4519791740-20">(</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-21">[</span><span·class="p"·data-group-id="4519791740-22">{</span><span·class="ss">type</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·98,·SHA:·4234f751188fa3c08dd82e3a47167dee9707def69bd732ea723bbd5b80cd6f3c·...·]-22">}</span><span·class="p">,</span><span·class="w">
254 ··································</span><span·class="p"·data-group-id="6364052086-23">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-24">[</span><span·class="ss">a@gin</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b@s[·...·truncated·by·diffoscope;·len:·108,·SHA:·2c04648149e0a15f2925fd2d4e55ee51057e21cdf0917cabab603bac650adf52·...·]-23">}</span><span·class="p">,</span><span·class="w">254 ··································</span><span·class="p"·data-group-id="4519791740-23">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-24">[</span><span·class="ss">a@gin</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b@s[·...·truncated·by·diffoscope;·len:·108,·SHA:·fc61b8c22cae15c18d8bd4e00ef559213db4212b72c0bc93a11ea4b661596ecb·...·]-23">}</span><span·class="p">,</span><span·class="w">
255 ··································</span><span·class="p"·data-group-id="6364052086-25">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6364052086-26">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">255 ··································</span><span·class="p"·data-group-id="4519791740-25">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="4519791740-26">(</span><span·class="ss">fields</span><span·class="p">,</span><span·class="w">
256 »       »       »       »       »       »       »       ···</span><span·class="ss">manager</span><span·class="p"·data-group-id="6364052086-26">)</span><span·class="p"·data-group-id="6364052086-25">}</span><span·class="p"·data-group-id="6364052086-21">]</span><span·class="p"·data-group-id="6364052086-20">)</span><span·class="p">,</span><span·class="w">256 »       »       »       »       »       »       »       ···</span><span·class="ss">manager</span><span·class="p"·data-group-id="4519791740-26">)</span><span·class="p"·data-group-id="4519791740-25">}</span><span·class="p"·data-group-id="4519791740-21">]</span><span·class="p"·data-group-id="4519791740-20">)</span><span·class="p">,</span><span·class="w">
257 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6364052086-27">(</span><span·class="ss">at_dep</span><span·class="p">,</span><span·class="w">257 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4519791740-27">(</span><span·class="ss">at_dep</span><span·class="p">,</span><span·class="w">
258 ·························</span><span·class="p"·data-group-id="6364052086-28">[</span><span·class="p"·data-group-id="6364052086-29">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-30">[</span><span·class="ss">a@gin</span><span·class="p[·...·truncated·by·diffoscope;·len:·162,·SHA:·ad20fca1d9e1a07fb3798ba517cb732fa018fbfef0025acd6d217abff5dc3a1e·...·]-29">}</span><span·class="p">,</span><span·class="w">258 ·························</span><span·class="p"·data-group-id="4519791740-28">[</span><span·class="p"·data-group-id="4519791740-29">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-30">[</span><span·class="ss">a@gin</span><span·class="p[·...·truncated·by·diffoscope;·len:·162,·SHA:·76280bcc4375f0c1b76f8b1568f333e6e47326054ace73747fc63f75b7b6cc90·...·]-29">}</span><span·class="p">,</span><span·class="w">
259 ··························</span><span·class="p"·data-group-id="6364052086-31">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6364052086-32">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·249,·SHA:·808f206abe3b9437b503cf411f280004085245ecb814269fd300ef9ea17213d8·...·]-27">)</span><span·class="p">,</span><span·class="w">259 ··························</span><span·class="p"·data-group-id="4519791740-31">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="4519791740-32">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·249,·SHA:·3b76ba05d67c34bb9763ae6b81890299ced1ac10b60aca19439d23d66bba4b3d·...·]-27">)</span><span·class="p">,</span><span·class="w">
260 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6364052086-33">(</span><span·class="ss">in_proj</span><span·class="p">,</span><span·class="w">260 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4519791740-33">(</span><span·class="ss">in_proj</span><span·class="p">,</span><span·class="w">
261 ························</span><span·class="p"·data-group-id="6364052086-34">[</span><span·class="p"·data-group-id="6364052086-35">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bag</span><span·class="p"·data-group-id="6364052086-35">}</span><span·class="p">,</span><span·class="w">261 ························</span><span·class="p"·data-group-id="4519791740-34">[</span><span·class="p"·data-group-id="4519791740-35">{</span><span·class="ss">type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bag</span><span·class="p"·data-group-id="4519791740-35">}</span><span·class="p">,</span><span·class="w">
262 ·························</span><span·class="p"·data-group-id="6364052086-36">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6364052086-37">[</span><span·class="ss">a@gin</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b@s[·...·truncated·by·diffoscope;·len:·108,·SHA:·47c97f9515d59e83be9299de95139b339501cd22975f93b06b8967743478eca7·...·]-36">}</span><span·class="p">,</span><span·class="w">262 ·························</span><span·class="p"·data-group-id="4519791740-36">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4519791740-37">[</span><span·class="ss">a@gin</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b@s[·...·truncated·by·diffoscope;·len:·108,·SHA:·ae3ac7bf4068bdd74be705af855e6c17bcd03aaa8f24806f2e64ad886bd7fa66·...·]-36">}</span><span·class="p">,</span><span·class="w">
263 ·························</span><span·class="p"·data-group-id="6364052086-38">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6364052086-39">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·496e9bb690b7d7717a9ce541694c0918a7ff8c840700a9387f48a4631d44db83·...·]-33">)</span><span·class="p">.</span></code></pre><p>As·illustrated,·the·two·directories·reside·on·different·nodes,·because263 ·························</span><span·class="p"·data-group-id="4519791740-38">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="4519791740-39">(</span><span·class="ss">fields</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·250,·SHA:·8b6bee6107e7e154bd3d2380e98e5a3d138cd416ec7ae99cce38a86989d81882·...·]-33">)</span><span·class="p">.</span></code></pre><p>As·illustrated,·the·two·directories·reside·on·different·nodes,·because
264 <code·class="inline">/ldisc/scratch</code>·(the·&quot;local&quot;·disc)·exists·on·the·two·different·nodes.</p><p>By·executing·these·commands,·two·Erlang·nodes·are·configured·to·run·the264 <code·class="inline">/ldisc/scratch</code>·(the·&quot;local&quot;·disc)·exists·on·the·two·different·nodes.</p><p>By·executing·these·commands,·two·Erlang·nodes·are·configured·to·run·the
265 <code·class="inline">Company</code>·database,·and·therefore,·initialize·the·database.·This·is·required265 <code·class="inline">Company</code>·database,·and·therefore,·initialize·the·database.·This·is·required
266 only·once·when·setting·up.·The·next·time·the·system·is·started,266 only·once·when·setting·up.·The·next·time·the·system·is·started,
267 <a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>·is·called·on·both·nodes,·to·initialize·the267 <a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>·is·called·on·both·nodes,·to·initialize·the
268 system·from·disc.</p><p>In·a·system·of·<code·class="inline">Mnesia</code>·nodes,·every·node·is·aware·of·the·current·location·of268 system·from·disc.</p><p>In·a·system·of·<code·class="inline">Mnesia</code>·nodes,·every·node·is·aware·of·the·current·location·of
269 all·tables.·In·this·example,·data·is·replicated·on·both·nodes·and·functions·that269 all·tables.·In·this·example,·data·is·replicated·on·both·nodes·and·functions·that
270 manipulate·the·data·in·the·tables·can·be·executed·on·either·of·the·two·nodes.270 manipulate·the·data·in·the·tables·can·be·executed·on·either·of·the·two·nodes.
Offset 273, 15 lines modifiedOffset 273, 15 lines modified
273 the·function·is·executed.·The·functions·<a·href="mnesia.html#start/0"><code·class="inline">mnesia:start/0</code></a>·and·<a·href="mnesia.html#stop/0"><code·class="inline">mnesia:stop/0</code></a>273 the·function·is·executed.·The·functions·<a·href="mnesia.html#start/0"><code·class="inline">mnesia:start/0</code></a>·and·<a·href="mnesia.html#stop/0"><code·class="inline">mnesia:stop/0</code></a>
274 work·on·the·&quot;local&quot;·<code·class="inline">Mnesia</code>·system.·No·functions·start·or·stop·a·set·of·nodes.</p><h3·id="startup-procedure"·class="section-heading">274 work·on·the·&quot;local&quot;·<code·class="inline">Mnesia</code>·system.·No·functions·start·or·stop·a·set·of·nodes.</p><h3·id="startup-procedure"·class="section-heading">
275 ··<a·href="#startup-procedure"·class="hover-link">275 ··<a·href="#startup-procedure"·class="hover-link">
276 ····<i·class="ri-link-m"·aria-hidden="true"></i>276 ····<i·class="ri-link-m"·aria-hidden="true"></i>
277 ··</a>277 ··</a>
278 ··<span·class="text">Startup·Procedure</span>278 ··<span·class="text">Startup·Procedure</span>
279 </h3>279 </h3>
280 <p>Start·<code·class="inline">Mnesia</code>·by·calling·the·following·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5690125650-1">(</span><span·class="p"·data-group-id="5690125650-1">)</span><span·class="p">.</span></code></pre><p>This·function·initiates·the·DBMS·locally.</p><p>The·choice·of·configuration·alters·the·location·and·load·order·of·the·tables.280 <p>Start·<code·class="inline">Mnesia</code>·by·calling·the·following·function:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5544838326-1">(</span><span·class="p"·data-group-id="5544838326-1">)</span><span·class="p">.</span></code></pre><p>This·function·initiates·the·DBMS·locally.</p><p>The·choice·of·configuration·alters·the·location·and·load·order·of·the·tables.
281 The·alternatives·are·as·follows:</p><ol><li>Tables·that·are·only·stored·locally·are·initialized·from·the·local·<code·class="inline">Mnesia</code>281 The·alternatives·are·as·follows:</p><ol><li>Tables·that·are·only·stored·locally·are·initialized·from·the·local·<code·class="inline">Mnesia</code>
282 directory.</li><li>Replicated·tables·that·reside·locally·as·well·as·somewhere·else·are·either282 directory.</li><li>Replicated·tables·that·reside·locally·as·well·as·somewhere·else·are·either
283 initiated·from·disc·or·by·copying·the·entire·table·from·the·other·node,283 initiated·from·disc·or·by·copying·the·entire·table·from·the·other·node,
284 depending·on·which·of·the·different·replicas·are·the·most·recent.·<code·class="inline">Mnesia</code>284 depending·on·which·of·the·different·replicas·are·the·most·recent.·<code·class="inline">Mnesia</code>
285 determines·which·of·the·tables·are·the·most·recent.</li><li>Tables·that·reside·on·remote·nodes·are·available·to·other·nodes·as·soon·as285 determines·which·of·the·tables·are·the·most·recent.</li><li>Tables·that·reside·on·remote·nodes·are·available·to·other·nodes·as·soon·as
286 they·are·loaded.</li></ol><p>Table·initialization·is·asynchronous.·The·function·call286 they·are·loaded.</li></ol><p>Table·initialization·is·asynchronous.·The·function·call
287 <a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>·returns·the·atom·<code·class="inline">ok</code>·and·then·starts·to287 <a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>·returns·the·atom·<code·class="inline">ok</code>·and·then·starts·to
Offset 296, 17 lines modifiedOffset 296, 17 lines modified
296 situation,·a·call·to·<a·href="mnesia.html#wait_for_tables/2"><code·class="inline">mnesia:wait_for_tables/2</code></a>,·suspends·the·caller·until·the296 situation,·a·call·to·<a·href="mnesia.html#wait_for_tables/2"><code·class="inline">mnesia:wait_for_tables/2</code></a>,·suspends·the·caller·until·the
297 remote·node·has·initialized·the·table·from·its·local·disc·and·the·node·has297 remote·node·has·initialized·the·table·from·its·local·disc·and·the·node·has
298 copied·the·table·over·the·network·to·the·local·node.</p><p>However,·this·procedure·can·be·time-consuming,·the·shortcut·function298 copied·the·table·over·the·network·to·the·local·node.</p><p>However,·this·procedure·can·be·time-consuming,·the·shortcut·function
299 <a·href="mnesia.html#force_load_table/1"><code·class="inline">mnesia:force_load_table(Tab)</code></a>·loads·all·the·tables299 <a·href="mnesia.html#force_load_table/1"><code·class="inline">mnesia:force_load_table(Tab)</code></a>·loads·all·the·tables
300 from·disc·at·a·faster·rate.·The·function·forces·tables·to·be·loaded·from·disc300 from·disc·at·a·faster·rate.·The·function·forces·tables·to·be·loaded·from·disc
301 regardless·of·the·network·situation.</p><p>Thus,·it·can·be·assumed·that·if·an·application·wants·to·use·tables·<code·class="inline">a</code>·and·<code·class="inline">b</code>,301 regardless·of·the·network·situation.</p><p>Thus,·it·can·be·assumed·that·if·an·application·wants·to·use·tables·<code·class="inline">a</code>·and·<code·class="inline">b</code>,
302 the·application·must·perform·some·action·similar·to·following·before·it·can·use302 the·application·must·perform·some·action·similar·to·following·before·it·can·use
303 the·tables:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">wait_for_tables</span><span·class="p"·data-group-id="1626083726-1">(</span><span·class="p"·data-group-id="1626083726-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="1626083726-2">]</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·88,·SHA:·44d876dc93db9d88fc5bb19631c666f3fa7022388e2654d7599d98aa36b0dcd8·...·]-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">303 the·tables:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">case</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">wait_for_tables</span><span·class="p"·data-group-id="9468990959-1">(</span><span·class="p"·data-group-id="9468990959-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="p"·data-group-id="9468990959-2">]</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·88,·SHA:·eeaa4b9143b54c852f407e4b888c2529d4ff2da670469de7a013c60923143fc9·...·]-1">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
304 ··</span><span·class="p"·data-group-id="1626083726-3">{</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RemainingTabs</span><span·class="p"·data-group-id="1626083726-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">304 ··</span><span·class="p"·data-group-id="9468990959-3">{</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RemainingTabs</span><span·class="p"·data-group-id="9468990959-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
305 ····</span><span·class="nf">panic</span><span·class="p"·data-group-id="1626083726-4">(</span><span·class="n">RemainingTabs</span><span·class="p"·data-group-id="1626083726-4">)</span><span·class="p">;</span><span·class="w">305 ····</span><span·class="nf">panic</span><span·class="p"·data-group-id="9468990959-4">(</span><span·class="n">RemainingTabs</span><span·class="p"·data-group-id="9468990959-4">)</span><span·class="p">;</span><span·class="w">
306 ··</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">306 ··</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
307 ····</span><span·class="ss">synced</span><span·class="w">307 ····</span><span·class="ss">synced</span><span·class="w">
308 </span><span·class="k">end</span><span·class="p">.</span></code></pre><blockquote><h4·class="warning">Warning</h4><p>When·tables·are·forcefully·loaded·from·the·local·disc,·all·operations·that308 </span><span·class="k">end</span><span·class="p">.</span></code></pre><blockquote><h4·class="warning">Warning</h4><p>When·tables·are·forcefully·loaded·from·the·local·disc,·all·operations·that
309 were·performed·on·the·replicated·table·while·the·local·node·was·down,·and·the309 were·performed·on·the·replicated·table·while·the·local·node·was·down,·and·the
310 remote·replica·was·alive,·are·lost.·This·can·cause·the·database·to·become310 remote·replica·was·alive,·are·lost.·This·can·cause·the·database·to·become
311 inconsistent.</p></blockquote><p>If·the·startup·procedure·fails,·the·function·<a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>311 inconsistent.</p></blockquote><p>If·the·startup·procedure·fails,·the·function·<a·href="mnesia.html#start/0"><code·class="inline">mnesia:start()</code></a>
312 returns·the·cryptic·tuple312 returns·the·cryptic·tuple
Offset 324, 21 lines modifiedOffset 324, 21 lines modified
324 the·records·that·constitute·the·table.·For·details,·see·<code·class="inline">record_name</code>.</li><li><code·class="inline">ArgList</code>·is·a·list·of·<code·class="inline">{Key,Value}</code>·tuples.·The·following·arguments·are324 the·records·that·constitute·the·table.·For·details,·see·<code·class="inline">record_name</code>.</li><li><code·class="inline">ArgList</code>·is·a·list·of·<code·class="inline">{Key,Value}</code>·tuples.·The·following·arguments·are
325 valid:<ul><li><p><code·class="inline">{type,·Type}</code>,·where·<code·class="inline">Type</code>·must·be·either·of·the·atoms·<code·class="inline">set</code>,325 valid:<ul><li><p><code·class="inline">{type,·Type}</code>,·where·<code·class="inline">Type</code>·must·be·either·of·the·atoms·<code·class="inline">set</code>,
326 <code·class="inline">ordered_set</code>,·or·<code·class="inline">bag</code>.·Default·is·<code·class="inline">set</code>.</p><p>Notice·that·currently·<code·class="inline">ordered_set</code>·is·not·supported·for·<code·class="inline">disc_only_copies</code>326 <code·class="inline">ordered_set</code>,·or·<code·class="inline">bag</code>.·Default·is·<code·class="inline">set</code>.</p><p>Notice·that·currently·<code·class="inline">ordered_set</code>·is·not·supported·for·<code·class="inline">disc_only_copies</code>
327 tables.</p><p>A·table·of·type·<code·class="inline">set</code>·or·<code·class="inline">ordered_set</code>·has·either·zero·or·one·record·per327 tables.</p><p>A·table·of·type·<code·class="inline">set</code>·or·<code·class="inline">ordered_set</code>·has·either·zero·or·one·record·per
328 key,·whereas·a·table·of·type·<code·class="inline">bag</code>·can·have·an·arbitrary·number·of·records328 key,·whereas·a·table·of·type·<code·class="inline">bag</code>·can·have·an·arbitrary·number·of·records
329 per·key.·The·key·for·each·record·is·always·the·first·attribute·of·the329 per·key.·The·key·for·each·record·is·always·the·first·attribute·of·the
330 record.</p><p>The·following·example·illustrates·the·difference·between·type·<code·class="inline">set</code>·and330 record.</p><p>The·following·example·illustrates·the·difference·between·type·<code·class="inline">set</code>·and
331 <code·class="inline">bag</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="nf">f</span><span·class="p"·data-group-id="6286425687-1">(</span><span·class="p"·data-group-id="6286425687-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">331 <code·class="inline">bag</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="nf">f</span><span·class="p"·data-group-id="9803739235-1">(</span><span·class="p"·data-group-id="9803739235-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
332 ····</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6286425687-2">(</span><span·class="p"·data-group-id="6286425687-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">332 ····</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="9803739235-2">(</span><span·class="p"·data-group-id="9803739235-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
333 ··········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="6286425687-3">(</span><span·class="p"·data-group-id="6286425687-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·b228b0102a0bc85dbd0431ae776ccbece5849d352234c734f718d4d2ee2000e3·...·]-3">)</span><span·class="p">,</span><span·class="w">333 ··········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="9803739235-3">(</span><span·class="p"·data-group-id="9803739235-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·16a0af15552e1912e84bddd232bd5adb299b974cd5e32e2acef7597c0e2900ac·...·]-3">)</span><span·class="p">,</span><span·class="w">
334 ··········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="6286425687-5">(</span><span·class="p"·data-group-id="6286425687-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·326e83abeee5fed973de0790ff9f90d456fb697e77804f7631dbb6e37b2c1106·...·]-5">)</span><span·class="p">,</span><span·class="w">334 ··········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="9803739235-5">(</span><span·class="p"·data-group-id="9803739235-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·07eacbebbb41db6ae3f0a7eaec803495207a1ef142bdbb7c1524428c5c808993·...·]-5">)</span><span·class="p">,</span><span·class="w">
335 ··········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="6286425687-7">(</span><span·class="p"·data-group-id="6286425687-8">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="6286425687-8">}</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·8f1c107d7051af349436b7233a11479d557bb6c35d62fc174eb09f3d744aa849·...·]-7">)</span><span·class="w">335 ··········</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="9803739235-7">(</span><span·class="p"·data-group-id="9803739235-8">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9803739235-8">}</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·f5b93699f8c88b802d313e3141495458cf8c27ad74b970dafe2418bd72d34f6a·...·]-7">)</span><span·class="w">
336 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">336 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
337 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="6286425687-9">(</span><span·class="n">F</span><span·class="p"·data-group-id="6286425687-9">)</span><span·class="p">.</span></code></pre><p>This·transaction·returns·the·list·<code·class="inline">[{foo,1,3}]</code>·if·table·<code·class="inline">foo</code>·is·of·type337 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="9803739235-9">(</span><span·class="n">F</span><span·class="p"·data-group-id="9803739235-9">)</span><span·class="p">.</span></code></pre><p>This·transaction·returns·the·list·<code·class="inline">[{foo,1,3}]</code>·if·table·<code·class="inline">foo</code>·is·of·type
338 <code·class="inline">set</code>.·However,·the·list·<code·class="inline">[{foo,1,2},·{foo,1,3}]</code>·is·returned·if·the·table338 <code·class="inline">set</code>.·However,·the·list·<code·class="inline">[{foo,1,2},·{foo,1,3}]</code>·is·returned·if·the·table
339 is·of·type·<code·class="inline">bag</code>.</p><p><code·class="inline">Mnesia</code>·tables·can·never·contain·duplicates·of·the·same·record·in·the·same339 is·of·type·<code·class="inline">bag</code>.</p><p><code·class="inline">Mnesia</code>·tables·can·never·contain·duplicates·of·the·same·record·in·the·same
340 table.·Duplicate·records·have·attributes·with·the·same·contents·and·key.</p></li><li><p><code·class="inline">{disc_copies,·NodeList}</code>,·where·<code·class="inline">NodeList</code>·is·a·list·of·the·nodes·where340 table.·Duplicate·records·have·attributes·with·the·same·contents·and·key.</p></li><li><p><code·class="inline">{disc_copies,·NodeList}</code>,·where·<code·class="inline">NodeList</code>·is·a·list·of·the·nodes·where
341 this·table·is·to·reside·on·disc.</p><p>Write·operations·to·a·table·replica·of·type·<code·class="inline">disc_copies</code>·write·data·to·the341 this·table·is·to·reside·on·disc.</p><p>Write·operations·to·a·table·replica·of·type·<code·class="inline">disc_copies</code>·write·data·to·the
342 disc·copy·and·to·the·RAM·copy·of·the·table.</p><p>It·is·possible·to·have·a·replicated·table·of·type·<code·class="inline">disc_copies</code>·on·one·node,342 disc·copy·and·to·the·RAM·copy·of·the·table.</p><p>It·is·possible·to·have·a·replicated·table·of·type·<code·class="inline">disc_copies</code>·on·one·node,
343 and·the·same·table·stored·as·a·different·type·on·another·node.·Default·is343 and·the·same·table·stored·as·a·different·type·on·another·node.·Default·is
344 <code·class="inline">[]</code>.·This·arrangement·is·desirable·if·the·following·operational344 <code·class="inline">[]</code>.·This·arrangement·is·desirable·if·the·following·operational
Offset 374, 19 lines modifiedOffset 374, 19 lines modified
374 possible·for·you·to·provide·the·attribute·names·or·to·use·the374 possible·for·you·to·provide·the·attribute·names·or·to·use·the
375 <code·class="inline">record_info/2</code>·notation.</p><p>It·is·recommended·to·use·the·<code·class="inline">record_info/2</code>·notation,·as·it·becomes·easier375 <code·class="inline">record_info/2</code>·notation.</p><p>It·is·recommended·to·use·the·<code·class="inline">record_info/2</code>·notation,·as·it·becomes·easier
376 to·maintain·the·program·and·the·program·becomes·more·robust·with·regards·to376 to·maintain·the·program·and·the·program·becomes·more·robust·with·regards·to
377 future·record·changes.</p></li><li><p><code·class="inline">{record_name,·Atom}</code>·specifies·the·common·name·of·all·records·stored·in·the377 future·record·changes.</p></li><li><p><code·class="inline">{record_name,·Atom}</code>·specifies·the·common·name·of·all·records·stored·in·the
378 table.·All·records·stored·in·the·table·must·have·this·name·as·their·first378 table.·All·records·stored·in·the·table·must·have·this·name·as·their·first
379 element.·<code·class="inline">record_name</code>·defaults·to·the·name·of·the·table.·For·more379 element.·<code·class="inline">record_name</code>·defaults·to·the·name·of·the·table.·For·more
Max diff block lines reached; 7203/53113 bytes (13.56%) of diff not shown.
141 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_chap4.html
    
Offset 141, 22 lines modifiedOffset 141, 22 lines modified
141 <p>Transactions·are·important·when·designing·fault-tolerant,·distributed·systems.·A141 <p>Transactions·are·important·when·designing·fault-tolerant,·distributed·systems.·A
142 <code·class="inline">Mnesia</code>·transaction·is·a·mechanism·by·which·a·series·of·database·operations·can142 <code·class="inline">Mnesia</code>·transaction·is·a·mechanism·by·which·a·series·of·database·operations·can
143 be·executed·as·one·functional·block.·The·functional·block·that·is·run·as·a143 be·executed·as·one·functional·block.·The·functional·block·that·is·run·as·a
144 transaction·is·called·a·Functional·Object·(Fun),·and·this·code·can·read,·write,144 transaction·is·called·a·Functional·Object·(Fun),·and·this·code·can·read,·write,
145 and·delete·<code·class="inline">Mnesia</code>·records.·The·Fun·is·evaluated·as·a·transaction·that·either145 and·delete·<code·class="inline">Mnesia</code>·records.·The·Fun·is·evaluated·as·a·transaction·that·either
146 commits·or·terminates.·If·a·transaction·succeeds·in·executing·the·Fun,·it146 commits·or·terminates.·If·a·transaction·succeeds·in·executing·the·Fun,·it
147 replicates·the·action·on·all·nodes·involved,·or·terminates·if·an·error·occurs.</p><p>The·following·example·shows·a·transaction·that·raises·the·salary·of·certain147 replicates·the·action·on·all·nodes·involved,·or·terminates·if·an·error·occurs.</p><p>The·following·example·shows·a·transaction·that·raises·the·salary·of·certain
148 employee·numbers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">raise</span><span·class="p"·data-group-id="5914361746-1">(</span><span·class="n">Eno</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p"·data-group-id="5914361746-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">148 employee·numbers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">raise</span><span·class="p"·data-group-id="4325447991-1">(</span><span·class="n">Eno</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p"·data-group-id="4325447991-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
149 ····</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5914361746-2">(</span><span·class="p"·data-group-id="5914361746-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 ····</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4325447991-2">(</span><span·class="p"·data-group-id="4325447991-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 ················</span><span·class="p"·data-group-id="5914361746-3">[</span><span·class="n">E</span><span·class="p"·data-group-id="5914361746-3">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><sp[·...·truncated·by·diffoscope;·len:·274,·SHA:·7d829e8b15c4545e95e3e7a53c2ffb3b3dabd9cb09d6792a33bdc6d9076094aa·...·]-4">)</span><span·class="p">,</span><span·class="w">150 ················</span><span·class="p"·data-group-id="4325447991-3">[</span><span·class="n">E</span><span·class="p"·data-group-id="4325447991-3">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><sp[·...·truncated·by·diffoscope;·len:·274,·SHA:·4d04dd9a9208e02bb826c9eaf07dc6b0077ae2db9b6750605d558a19b78f676a·...·]-4">)</span><span·class="p">,</span><span·class="w">
151 ················</span><span·class="n">Salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p">.</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p">,</span><span·class="w">151 ················</span><span·class="n">Salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p">.</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p">,</span><span·class="w">
152 ················</span><span·class="n">New</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p"·data-group-id="5914361746-5">{</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Salary</span><span·class="p"·data-group-id="5914361746-5">}</span><span·class="p">,</span><span·class="w">152 ················</span><span·class="n">New</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p"·data-group-id="4325447991-5">{</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Salary</span><span·class="p"·data-group-id="4325447991-5">}</span><span·class="p">,</span><span·class="w">
153 ················</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="5914361746-6">(</span><span·class="n">New</span><span·class="p"·data-group-id="5914361746-6">)</span><span·class="w">153 ················</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="4325447991-6">(</span><span·class="n">New</span><span·class="p"·data-group-id="4325447991-6">)</span><span·class="w">
154 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">154 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
155 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="5914361746-7">(</span><span·class="n">F</span><span·class="p"·data-group-id="5914361746-7">)</span><span·class="p">.</span></code></pre><p>The·function·<code·class="inline">raise/2</code>·contains·a·Fun·made·up·of·four·code·lines.·This·Fun·is155 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="4325447991-7">(</span><span·class="n">F</span><span·class="p"·data-group-id="4325447991-7">)</span><span·class="p">.</span></code></pre><p>The·function·<code·class="inline">raise/2</code>·contains·a·Fun·made·up·of·four·code·lines.·This·Fun·is
156 called·by·the·statement·<code·class="inline">mnesia:transaction(F)</code>·and·returns·a·value.</p><p>The·<code·class="inline">Mnesia</code>·transaction·system·facilitates·the·construction·of·reliable,156 called·by·the·statement·<code·class="inline">mnesia:transaction(F)</code>·and·returns·a·value.</p><p>The·<code·class="inline">Mnesia</code>·transaction·system·facilitates·the·construction·of·reliable,
157 distributed·systems·by·providing·the·following·important·properties:</p><ul><li>The·transaction·handler·ensures·that·a·Fun,·which·is·placed·inside·a157 distributed·systems·by·providing·the·following·important·properties:</p><ul><li>The·transaction·handler·ensures·that·a·Fun,·which·is·placed·inside·a
158 transaction,·does·not·interfere·with·operations·embedded·in·other·transactions158 transaction,·does·not·interfere·with·operations·embedded·in·other·transactions
159 when·it·executes·a·series·of·operations·on·tables.</li><li>The·transaction·handler·ensures·that·either·all·operations·in·the·transaction159 when·it·executes·a·series·of·operations·on·tables.</li><li>The·transaction·handler·ensures·that·either·all·operations·in·the·transaction
160 are·performed·successfully·on·all·nodes·atomically,·or·the·transaction·fails160 are·performed·successfully·on·all·nodes·atomically,·or·the·transaction·fails
161 without·permanent·effect·on·any·node.</li><li>The·<code·class="inline">Mnesia</code>·transactions·have·four·important·properties,·called·<em>A</em>tomicity,161 without·permanent·effect·on·any·node.</li><li>The·<code·class="inline">Mnesia</code>·transactions·have·four·important·properties,·called·<em>A</em>tomicity,
162 <em>C</em>onsistency,·<em>I</em>solation,·and·<em>D</em>urability·(ACID).·These·properties·are162 <em>C</em>onsistency,·<em>I</em>solation,·and·<em>D</em>urability·(ACID).·These·properties·are
Offset 242, 23 lines modifiedOffset 242, 23 lines modified
242 code·these·operations.</p><p>Deadlocks·can·occur·when·concurrent·processes·set·and·release·locks·on·the·same242 code·these·operations.</p><p>Deadlocks·can·occur·when·concurrent·processes·set·and·release·locks·on·the·same
243 records.·<code·class="inline">Mnesia</code>·employs·a·&quot;wait-die&quot;·strategy·to·resolve·these·situations.·If243 records.·<code·class="inline">Mnesia</code>·employs·a·&quot;wait-die&quot;·strategy·to·resolve·these·situations.·If
244 <code·class="inline">Mnesia</code>·suspects·that·a·deadlock·can·occur·when·a·transaction·tries·to·set·a244 <code·class="inline">Mnesia</code>·suspects·that·a·deadlock·can·occur·when·a·transaction·tries·to·set·a
245 lock,·the·transaction·is·forced·to·release·all·its·locks·and·sleep·for·a·while.245 lock,·the·transaction·is·forced·to·release·all·its·locks·and·sleep·for·a·while.
246 The·Fun·in·the·transaction·is·evaluated·once·more.</p><p>It·is·therefore·important·that·the·code·inside·the·Fun·given·to246 The·Fun·in·the·transaction·is·evaluated·once·more.</p><p>It·is·therefore·important·that·the·code·inside·the·Fun·given·to
247 <a·href="mnesia.html#transaction/1"><code·class="inline">mnesia:transaction/1</code></a>·is·pure.·Some·strange·results·can·occur·if,·for·example,247 <a·href="mnesia.html#transaction/1"><code·class="inline">mnesia:transaction/1</code></a>·is·pure.·Some·strange·results·can·occur·if,·for·example,
248 messages·are·sent·by·the·transaction·Fun.·The·following·example·illustrates·this248 messages·are·sent·by·the·transaction·Fun.·The·following·example·illustrates·this
249 situation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bad_raise</span><span·class="p"·data-group-id="6995103248-1">(</span><span·class="n">Eno</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p"·data-group-id="6995103248-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">249 situation:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">bad_raise</span><span·class="p"·data-group-id="5991825853-1">(</span><span·class="n">Eno</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p"·data-group-id="5991825853-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
250 ····</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6995103248-2">(</span><span·class="p"·data-group-id="6995103248-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">250 ····</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5991825853-2">(</span><span·class="p"·data-group-id="5991825853-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
251 ················</span><span·class="p"·data-group-id="6995103248-3">[</span><span·class="n">E</span><span·class="p"·data-group-id="6995103248-3">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><sp[·...·truncated·by·diffoscope;·len:·303,·SHA:·c3faa287923174ef9fcf1a8a6f414e013e70ac60c0693bf86f674af23e70f147·...·]-4">)</span><span·class="p">,</span><span·class="w">251 ················</span><span·class="p"·data-group-id="5991825853-3">[</span><span·class="n">E</span><span·class="p"·data-group-id="5991825853-3">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><sp[·...·truncated·by·diffoscope;·len:·303,·SHA:·9e9d1fe72503cd0f529cf2effffea3937b2ea07ca03c7d42805c97f4ced589c8·...·]-4">)</span><span·class="p">,</span><span·class="w">
252 ················</span><span·class="n">Salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p">.</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p">,</span><span·class="w">252 ················</span><span·class="n">Salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p">.</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">Raise</span><span·class="p">,</span><span·class="w">
253 ················</span><span·class="n">New</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p"·data-group-id="6995103248-6">{</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Salary</span><span·class="p"·data-group-id="6995103248-6">}</span><span·class="p">,</span><span·class="w">253 ················</span><span·class="n">New</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span·class="o">#</span><span·class="ss">employee</span><span·class="p"·data-group-id="5991825853-6">{</span><span·class="ss">salary</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Salary</span><span·class="p"·data-group-id="5991825853-6">}</span><span·class="p">,</span><span·class="w">
254 ················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6995103248-7">(</span><span·class="s">&quot;Trying·to·write·...·</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6995103248-8">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·65,·SHA:·1d23b26788067649a2e7ef29819ba9b20531df7be00da71c11a0108d5d6c4bb3·...·]-7">)</span><span·class="p">,</span><span·class="w">254 ················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5991825853-7">(</span><span·class="s">&quot;Trying·to·write·...·</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5991825853-8">[</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·65,·SHA:·04824fae196dfd4e05a78b06e0f99053406e792838231bc7aae91ba61a7c79e7·...·]-7">)</span><span·class="p">,</span><span·class="w">
255 ················</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="6995103248-9">(</span><span·class="n">New</span><span·class="p"·data-group-id="6995103248-9">)</span><span·class="w">255 ················</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="5991825853-9">(</span><span·class="n">New</span><span·class="p"·data-group-id="5991825853-9">)</span><span·class="w">
256 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">256 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
257 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="6995103248-10">(</span><span·class="n">F</span><span·class="p"·data-group-id="6995103248-10">)</span><span·class="p">.</span></code></pre><p>This·transaction·can·write·the·text·<code·class="inline">&quot;Trying·to·write·...·&quot;</code>·1000·times·to·the257 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="5991825853-10">(</span><span·class="n">F</span><span·class="p"·data-group-id="5991825853-10">)</span><span·class="p">.</span></code></pre><p>This·transaction·can·write·the·text·<code·class="inline">&quot;Trying·to·write·...·&quot;</code>·1000·times·to·the
258 terminal.·However,·<code·class="inline">Mnesia</code>·guarantees·that·each·transaction·will·eventually258 terminal.·However,·<code·class="inline">Mnesia</code>·guarantees·that·each·transaction·will·eventually
259 run.·As·a·result,·<code·class="inline">Mnesia</code>·is·not·only·deadlock·free,·but·also·livelock·free.</p><p>The·<code·class="inline">Mnesia</code>·programmer·cannot·prioritize·one·particular·transaction·to·execute259 run.·As·a·result,·<code·class="inline">Mnesia</code>·is·not·only·deadlock·free,·but·also·livelock·free.</p><p>The·<code·class="inline">Mnesia</code>·programmer·cannot·prioritize·one·particular·transaction·to·execute
260 before·other·transactions·that·are·waiting·to·execute.·As·a·result,·the·<code·class="inline">Mnesia</code>260 before·other·transactions·that·are·waiting·to·execute.·As·a·result,·the·<code·class="inline">Mnesia</code>
261 DBMS·transaction·system·is·not·suitable·for·hard·real-time·applications.261 DBMS·transaction·system·is·not·suitable·for·hard·real-time·applications.
262 However,·<code·class="inline">Mnesia</code>·contains·other·features·that·have·real-time·properties.</p><p><code·class="inline">Mnesia</code>·dynamically·sets·and·releases·locks·as·transactions·execute.·It·is262 However,·<code·class="inline">Mnesia</code>·contains·other·features·that·have·real-time·properties.</p><p><code·class="inline">Mnesia</code>·dynamically·sets·and·releases·locks·as·transactions·execute.·It·is
263 therefore·dangerous·to·execute·code·with·transaction·side-effects.·In263 therefore·dangerous·to·execute·code·with·transaction·side-effects.·In
264 particular,·a·<code·class="inline">receive</code>·statement·inside·a·transaction·can·lead·to·a·situation264 particular,·a·<code·class="inline">receive</code>·statement·inside·a·transaction·can·lead·to·a·situation
Offset 297, 21 lines modifiedOffset 297, 21 lines modified
297 record·when·reading·a·record,·and·lock·all·replicas·of·a·record·when·writing·a297 record·when·reading·a·record,·and·lock·all·replicas·of·a·record·when·writing·a
298 record.·However,·some·applications·use·<code·class="inline">Mnesia</code>·mainly·for·its·fault-tolerant298 record.·However,·some·applications·use·<code·class="inline">Mnesia</code>·mainly·for·its·fault-tolerant
299 qualities.·These·applications·can·be·configured·with·one·node·doing·all·the299 qualities.·These·applications·can·be·configured·with·one·node·doing·all·the
300 heavy·work,·and·a·standby·node·that·is·ready·to·take·over·if·the·main·node300 heavy·work,·and·a·standby·node·that·is·ready·to·take·over·if·the·main·node
301 fails.·Such·applications·can·benefit·from·using·sticky·locks·instead·of·the301 fails.·Such·applications·can·benefit·from·using·sticky·locks·instead·of·the
302 normal·locking·scheme.</p><p>A·sticky·lock·is·a·lock·that·stays·in·place·at·a·node,·after·the·transaction302 normal·locking·scheme.</p><p>A·sticky·lock·is·a·lock·that·stays·in·place·at·a·node,·after·the·transaction
303 that·first·acquired·the·lock·has·terminated.·To·illustrate·this,·assume·that·the303 that·first·acquired·the·lock·has·terminated.·To·illustrate·this,·assume·that·the
304 following·transaction·is·executed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3192472378-1">(</span><span·class="p"·data-group-id="3192472378-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">304 following·transaction·is·executed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8046553246-1">(</span><span·class="p"·data-group-id="8046553246-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
305 ······</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="3192472378-2">(</span><span·class="o">#</span><span·class="ss">foo</span><span·class="p"·data-group-id="3192472378-3">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">kalle</span><spa[·...·truncated·by·diffoscope;·len:·90,·SHA:·17988b3498420f3a54eeb5615c9262f2612ecade141932230d258c60f0c22156·...·]-2">)</span><span·class="w">305 ······</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="8046553246-2">(</span><span·class="o">#</span><span·class="ss">foo</span><span·class="p"·data-group-id="8046553246-3">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">kalle</span><spa[·...·truncated·by·diffoscope;·len:·90,·SHA:·e81b26a557545c1fa2121fb22067a7d39d03efb7bf28f91c1e4c96051491c4ed·...·]-2">)</span><span·class="w">
306 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">306 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
307 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="3192472378-4">(</span><span·class="n">F</span><span·class="p"·data-group-id="3192472378-4">)</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">foo</code>·table·is·replicated·on·the·two·nodes·<code·class="inline">N1</code>·and·<code·cla[·...·truncated·by·diffoscope;·len:·556,·SHA:·be8ed6bea224f660750a4cdccb6fabb15bac44ce2499b407926044a9e4eaa083·...·]0-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">307 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="8046553246-4">(</span><span·class="n">F</span><span·class="p"·data-group-id="8046553246-4">)</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">foo</code>·table·is·replicated·on·the·two·nodes·<code·class="inline">N1</code>·and·<code·cla[·...·truncated·by·diffoscope;·len:·556,·SHA:·0a81a6697e8c1e0a9bf4649dcfaaaf6024d1dd722019eb1de68e6531fda4a783·...·]0-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
308 ······</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">s_write</span><span·class="p"·data-group-id="3931538660-2">(</span><span·class="o">#</span><span·class="ss">foo</span><span·class="p"·data-group-id="3931538660-3">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">kalle</span><spa[·...·truncated·by·diffoscope;·len:·89,·SHA:·cce8a0431d41e879225cdb57cdd6f1d496d1482478ed0681f0be8d6b8789d916·...·]0-2">)</span><span·class="w">308 ······</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">s_write</span><span·class="p"·data-group-id="7378199150-2">(</span><span·class="o">#</span><span·class="ss">foo</span><span·class="p"·data-group-id="7378199150-3">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">kalle</span><spa[·...·truncated·by·diffoscope;·len:·89,·SHA:·b14fc7893207d9f1020b9cb9e9f71803148b7370640e9ea72ea38a300014f509·...·]0-2">)</span><span·class="w">
309 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">309 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
310 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="3931538660-4">(</span><span·class="n">F</span><span·class="p"·data-group-id="3931538660-4">)</span><span·class="p">.</span></code></pre><p>This·code·uses·the·function·<a·href="mnesia.html#s_write/1"><code·class="inline">s_write/1</code></a>·instead·of·the310 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">transaction</span><span·class="p"·data-group-id="7378199150-4">(</span><span·class="n">F</span><span·class="p"·data-group-id="7378199150-4">)</span><span·class="p">.</span></code></pre><p>This·code·uses·the·function·<a·href="mnesia.html#s_write/1"><code·class="inline">s_write/1</code></a>·instead·of·the
311 function·<a·href="mnesia.html#write/1"><code·class="inline">write/1</code></a>·The·function·<code·class="inline">s_write/1</code>·sets·a·sticky·lock311 function·<a·href="mnesia.html#write/1"><code·class="inline">write/1</code></a>·The·function·<code·class="inline">s_write/1</code>·sets·a·sticky·lock
312 instead·of·a·normal·lock.·If·the·table·is·not·replicated,·sticky·locks·have·no312 instead·of·a·normal·lock.·If·the·table·is·not·replicated,·sticky·locks·have·no
313 special·effect.·If·the·table·is·replicated,·and·a·sticky·lock·is·set·on·node313 special·effect.·If·the·table·is·replicated,·and·a·sticky·lock·is·set·on·node
314 <code·class="inline">N1</code>,·this·lock·then·sticks·to·node·<code·class="inline">N1</code>.·The·next·time·you·try·to·set·a·sticky314 <code·class="inline">N1</code>,·this·lock·then·sticks·to·node·<code·class="inline">N1</code>.·The·next·time·you·try·to·set·a·sticky
315 lock·on·the·same·record·at·node·<code·class="inline">N1</code>,·<code·class="inline">Mnesia</code>·detects·that·the·lock·is·already315 lock·on·the·same·record·at·node·<code·class="inline">N1</code>,·<code·class="inline">Mnesia</code>·detects·that·the·lock·is·already
316 set·and·do·no·network·operation·to·acquire·the·lock.</p><p>It·is·more·efficient·to·set·a·local·lock·than·it·is·to·set·a·networked·lock.316 set·and·do·no·network·operation·to·acquire·the·lock.</p><p>It·is·more·efficient·to·set·a·local·lock·than·it·is·to·set·a·networked·lock.
317 Sticky·locks·can·therefore·benefit·an·application·that·uses·a·replicated·table317 Sticky·locks·can·therefore·benefit·an·application·that·uses·a·replicated·table
Offset 329, 16 lines modifiedOffset 329, 16 lines modified
329 locks·automatically,·and·the·programmer·does·not·need·to·code·these·operations.329 locks·automatically,·and·the·programmer·does·not·need·to·code·these·operations.
330 However,·transactions·that·read·and·write·many·records·in·a·specific·table330 However,·transactions·that·read·and·write·many·records·in·a·specific·table
331 execute·more·efficiently·if·the·transaction·is·started·by·setting·a·table·lock331 execute·more·efficiently·if·the·transaction·is·started·by·setting·a·table·lock
332 on·this·table.·This·blocks·other·concurrent·transactions·from·the·table.·The332 on·this·table.·This·blocks·other·concurrent·transactions·from·the·table.·The
333 following·two·functions·are·used·to·set·explicit·table·locks·for·read·and·write333 following·two·functions·are·used·to·set·explicit·table·locks·for·read·and·write
334 operations:</p><ul><li><a·href="mnesia.html#read_lock_table/1"><code·class="inline">mnesia:read_lock_table(Tab)</code></a>·sets·a·read·lock·on334 operations:</p><ul><li><a·href="mnesia.html#read_lock_table/1"><code·class="inline">mnesia:read_lock_table(Tab)</code></a>·sets·a·read·lock·on
335 table·<code·class="inline">Tab</code>.</li><li><a·href="mnesia.html#write_lock_table/1"><code·class="inline">mnesia:write_lock_table(Tab)</code></a>·sets·a·write·lock335 table·<code·class="inline">Tab</code>.</li><li><a·href="mnesia.html#write_lock_table/1"><code·class="inline">mnesia:write_lock_table(Tab)</code></a>·sets·a·write·lock
336 on·table·<code·class="inline">Tab</code>.</li></ul><p>Alternative·syntax·for·acquisition·of·table·locks·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="9895059040-1">(</span><span·class="p"·data-group-id="9895059040-2">{</span><span·class="ss">table</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="9895059040-2">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·91,·SHA:·9129ae121fa3ec0c8909278c8bd8d58a9eae672737ae63eb124c4cde03aa70ce·...·]-1">)</span><span·class="w">336 on·table·<code·class="inline">Tab</code>.</li></ul><p>Alternative·syntax·for·acquisition·of·table·locks·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="9502244898-1">(</span><span·class="p"·data-group-id="9502244898-2">{</span><span·class="ss">table</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="9502244898-2">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·91,·SHA:·048888d8f6ad6b5e0997eee48e42f0138d28daab1c05b4fe73aa91e9f46b2f3e·...·]-1">)</span><span·class="w">
337 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="9895059040-3">(</span><span·class="p"·data-group-id="9895059040-4">{</span><span·class="ss">table</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="9895059040-4">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·4c6caeeb856d58518485bed1b8a4aac80ee1195763b3745bf35e5eed98488a27·...·]-3">)</span></code></pre><p>The·matching·operations·in·<code·class="inline">Mnesia</code>·can·either·lock·the·entire·table·or·only·a337 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">lock</span><span·class="p"·data-group-id="9502244898-3">(</span><span·class="p"·data-group-id="9502244898-4">{</span><span·class="ss">table</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p"·data-group-id="9502244898-4">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·cd0aeb16c44366a990a87d7ad5c6d4bbdc3cf6ed6d4f9dc52331336f21cbbba0·...·]-3">)</span></code></pre><p>The·matching·operations·in·<code·class="inline">Mnesia</code>·can·either·lock·the·entire·table·or·only·a
338 single·record·(when·the·key·is·bound·in·the·pattern).</p><h3·id="global-locks"·class="section-heading">338 single·record·(when·the·key·is·bound·in·the·pattern).</p><h3·id="global-locks"·class="section-heading">
339 ··<a·href="#global-locks"·class="hover-link">339 ··<a·href="#global-locks"·class="hover-link">
340 ····<i·class="ri-link-m"·aria-hidden="true"></i>340 ····<i·class="ri-link-m"·aria-hidden="true"></i>
341 ··</a>341 ··</a>
342 ··<span·class="text">Global·Locks</span>342 ··<span·class="text">Global·Locks</span>
343 </h3>343 </h3>
344 <p>Write·locks·are·normally·acquired·on·all·nodes·where·a·replica·of·the·table344 <p>Write·locks·are·normally·acquired·on·all·nodes·where·a·replica·of·the·table
Offset 421, 86 lines modifiedOffset 421, 86 lines modified
421 ··<span·class="text">Record·Names·versus·Table·Names</span>421 ··<span·class="text">Record·Names·versus·Table·Names</span>
422 </h2>422 </h2>
423 <p>In·<code·class="inline">Mnesia</code>,·all·records·in·a·table·must·have·the·same·name.·All·the·records423 <p>In·<code·class="inline">Mnesia</code>,·all·records·in·a·table·must·have·the·same·name.·All·the·records
424 must·be·instances·of·the·same·record·type.·The·record·name,·however,·does·not424 must·be·instances·of·the·same·record·type.·The·record·name,·however,·does·not
425 necessarily·have·to·be·the·same·as·the·table·name,·although·this·is·the·case·in425 necessarily·have·to·be·the·same·as·the·table·name,·although·this·is·the·case·in
426 most·of·the·examples·in·this·User's·Guide.·If·a·table·is·created·without426 most·of·the·examples·in·this·User's·Guide.·If·a·table·is·created·without
427 property·<code·class="inline">record_name</code>,·the·following·code·ensures·that·all·records·in·the427 property·<code·class="inline">record_name</code>,·the·following·code·ensures·that·all·records·in·the
428 tables·have·the·same·name·as·the·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6304251993-1">(</span><span·class="ss">subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6304251993-2">[</span><span·class="p"·data-group-id="6304251993-2">]</span><span·class="p"·data-group-id="6304251993-1">)</span></code></pre><p>However,·if·the·table·is·created·with·an·explicit·record·name·as·argument,·as428 tables·have·the·same·name·as·the·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="9589448543-1">(</span><span·class="ss">subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9589448543-2">[</span><span·class="p"·data-group-id="9589448543-2">]</span><span·class="p"·data-group-id="9589448543-1">)</span></code></pre><p>However,·if·the·table·is·created·with·an·explicit·record·name·as·argument,·as
429 shown·in·the·following·example,·subscriber·records·can·be·stored·in·both·of·the429 shown·in·the·following·example,·subscriber·records·can·be·stored·in·both·of·the
430 tables·regardless·of·the·table·names:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">TabDef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9081262625-1">[</span><span·class="p"·data-group-id="9081262625-2">{</span><span·class="ss">record_name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="9081262625-2">}</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·19437fb3e7f6e6981779cf9d8d462160a8dd851eb42a703b162e5f492127d470·...·]-1">]</span><span·class="p">,</span><span·class="w">430 tables·regardless·of·the·table·names:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">TabDef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3215373489-1">[</span><span·class="p"·data-group-id="3215373489-2">{</span><span·class="ss">record_name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="3215373489-2">}</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·15d5e6c5efc3734bff93a7a23360934a077984e942f2aa491e46627536c2a986·...·]-1">]</span><span·class="p">,</span><span·class="w">
431 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="9081262625-3">(</span><span·class="ss">my_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabDef</span><span·class="p"·data-group-id="9081262625-3">)</span><span·class="p">,</span><span·class="w">431 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="3215373489-3">(</span><span·class="ss">my_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabDef</span><span·class="p"·data-group-id="3215373489-3">)</span><span·class="p">,</span><span·class="w">
432 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="9081262625-4">(</span><span·class="ss">your_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabDef</span><span·class="p"·data-group-id="9081262625-4">)</span><span·class="p">.</span></code></pre><p>To·access·such·tables,·simplified·access·functions·(as·described·earlier)·cannot432 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="3215373489-4">(</span><span·class="ss">your_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabDef</span><span·class="p"·data-group-id="3215373489-4">)</span><span·class="p">.</span></code></pre><p>To·access·such·tables,·simplified·access·functions·(as·described·earlier)·cannot
433 be·used.·For·example,·writing·a·subscriber·record·into·a·table·requires·the433 be·used.·For·example,·writing·a·subscriber·record·into·a·table·requires·the
434 function·<a·href="mnesia.html#write/3"><code·class="inline">mnesia:write/3</code></a>·instead·of·the·simplified·functions·<a·href="mnesia.html#write/1"><code·class="inline">mnesia:write/1</code></a>434 function·<a·href="mnesia.html#write/3"><code·class="inline">mnesia:write/3</code></a>·instead·of·the·simplified·functions·<a·href="mnesia.html#write/1"><code·class="inline">mnesia:write/1</code></a>
435 and·<a·href="mnesia.html#s_write/1"><code·class="inline">mnesia:s_write/1</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2820889290-1">(</span><span·class="ss">subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="2820889290-2">{</span><span·class="p"·data-group-id="2820889290[·...·truncated·by·diffoscope;·len:·130,·SHA:·edf3856a7f1f1e7bb46a55d6636a5d8f03f9cb1360f3a29c19f5b4354ca94b93·...·]-1">)</span><span·class="w">435 and·<a·href="mnesia.html#s_write/1"><code·class="inline">mnesia:s_write/1</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="4527013469-1">(</span><span·class="ss">subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="4527013469-2">{</span><span·class="p"·data-group-id="4527013469[·...·truncated·by·diffoscope;·len:·130,·SHA:·7103875f54524e1763bab3e418a470db21db1f7a49a38ad57f111a1bc7a36d62·...·]-1">)</span><span·class="w">
436 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2820889290-3">(</span><span·class="ss">my_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="2820889290-4">{</span><span·class="p"·data-group-id="2820889[·...·truncated·by·diffoscope;·len:·140,·SHA:·594aada8432b56c959c1e542a98e912d1b8f3db5d5271001bb7c3b13f0ad7796·...·]-3">)</span><span·class="w">436 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="4527013469-3">(</span><span·class="ss">my_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="4527013469-4">{</span><span·class="p"·data-group-id="4527013[·...·truncated·by·diffoscope;·len:·140,·SHA:·8670d959de3cc3401cddc583a8d9b18d4b2c09691f00ff779a249a8beb1a9a2a·...·]-3">)</span><span·class="w">
437 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2820889290-5">(</span><span·class="ss">your_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="2820889290-6">{</span><span·class="p"·data-group-id="28208[·...·truncated·by·diffoscope;·len:·135,·SHA:·789af539fca88eee33e8c4b818dc003f8bb936f89ee55eabcc3a6546d9e1a689·...·]-5">)</span></code></pre><p>The·following·simple·code·illustrates·the·relationship·between·the·simplified437 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="4527013469-5">(</span><span·class="ss">your_subscriber</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">subscriber</span><span·class="p"·data-group-id="4527013469-6">{</span><span·class="p"·data-group-id="45270[·...·truncated·by·diffoscope;·len:·135,·SHA:·0d98a32ad660da7626bb980ebc0d7ea9d40bdfc404e457e60066e27323f72cbc·...·]-5">)</span></code></pre><p>The·following·simple·code·illustrates·the·relationship·between·the·simplified
438 access·functions·used·in·most·of·the·examples·and·their·more·flexible438 access·functions·used·in·most·of·the·examples·and·their·more·flexible
439 counterparts:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_write</span><span·class="p"·data-group-id="2221519406-1">(</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">439 counterparts:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_write</span><span·class="p"·data-group-id="7167714453-1">(</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
440 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="2221519406-2">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-2">)</span><span·class="p">,</span><span·class="w">440 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="7167714453-2">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-2">)</span><span·class="p">,</span><span·class="w">
441 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_write</span><span·class="p"·data-group-id="2221519406-3">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-3">)</span><span·class="p">.</span><span·class="w">441 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_write</span><span·class="p"·data-group-id="7167714453-3">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-3">)</span><span·class="p">.</span><span·class="w">
  
442 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete</span><span·class="p"·data-group-id="2221519406-4">(</span><span·class="p"·data-group-id="2221519406-5">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2221519406-5">}</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·def924b90851578b77b979e265c1cc74e57f7168c8ab66b33757e84cad6f0f6b·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">442 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete</span><span·class="p"·data-group-id="7167714453-4">(</span><span·class="p"·data-group-id="7167714453-5">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7167714453-5">}</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·13,·SHA:·7b29b45a5b6aa6bde66cfec4c5db20a7b30f2f444248218cada86719dceedee5·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
443 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete</span><span·class="p"·data-group-id="2221519406-6">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2221519406-6">)</span><span·class="p">.</span><span·class="w">443 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete</span><span·class="p"·data-group-id="7167714453-6">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7167714453-6">)</span><span·class="p">.</span><span·class="w">
  
444 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete_object</span><span·class="p"·data-group-id="2221519406-7">(</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">444 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete_object</span><span·class="p"·data-group-id="7167714453-7">(</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
445 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="2221519406-8">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-8">)</span><span·class="p">,</span><span·class="w">445 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="7167714453-8">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-8">)</span><span·class="p">,</span><span·class="w">
446 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete_object</span><span·class="p"·data-group-id="2221519406-9">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-9">)</span><span·class="w">446 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_delete_object</span><span·class="p"·data-group-id="7167714453-9">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-9">)</span><span·class="w">
  
447 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_update_counter</span><span·class="p"·data-group-id="2221519406-10">(</span><span·class="p"·data-group-id="2221519406-11">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2221519406-11">}</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·91,·SHA:·65aabe7094150e8450c5cea77bbb56f13f6633f1c2e88f7668161b7e67612885·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">447 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_update_counter</span><span·class="p"·data-group-id="7167714453-10">(</span><span·class="p"·data-group-id="7167714453-11">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7167714453-11">}</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·91,·SHA:·2b1641ed0886996032fa1d854a67322032db96e0c8d99315ad32de17dabfd2a8·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
448 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_update_counter</span><span·class="p"·data-group-id="2221519406-12">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Incr</span><span·class="p"·data-group-id="2221519406-12">)</span><span·class="p">.</span><span·class="w">448 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_update_counter</span><span·class="p"·data-group-id="7167714453-12">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Incr</span><span·class="p"·data-group-id="7167714453-12">)</span><span·class="p">.</span><span·class="w">
  
449 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_read</span><span·class="p"·data-group-id="2221519406-13">(</span><span·class="p"·data-group-id="2221519406-14">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2221519406-14">}</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·82c961b138856fdd8e60c103d337c734093ce3dc02dac9d34425b120b1efdd0f·...·]-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">449 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_read</span><span·class="p"·data-group-id="7167714453-13">(</span><span·class="p"·data-group-id="7167714453-14">{</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7167714453-14">}</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·444425896dbdb2da543e73ae704fe8577b103c403a0c3de7ab8b88734e9313cd·...·]-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
450 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="2221519406-15">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="2221519406-15">)</span><span·class="p">,</span><span·class="w">450 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="7167714453-15">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Record</span><span·class="p"·data-group-id="7167714453-15">)</span><span·class="p">,</span><span·class="w">
451 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_read</span><span·class="p"·data-group-id="2221519406-16">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="2221519406-16">)</span><span·class="p">.</span><span·class="w">451 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_read</span><span·class="p"·data-group-id="7167714453-16">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Key</span><span·class="p"·data-group-id="7167714453-16">)</span><span·class="p">.</span><span·class="w">
  
452 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_match_object</span><span·class="p"·data-group-id="2221519406-17">(</span><span·class="n">Pattern</span><span·class="p"·data-group-id="2221519406-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">452 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_match_object</span><span·class="p"·data-group-id="7167714453-17">(</span><span·class="n">Pattern</span><span·class="p"·data-group-id="7167714453-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
453 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="2221519406-18">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pattern</span><span·class="p"·data-group-id="2221519406-18">)</span><span·class="p">,</span><span·class="w">453 ··</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">element</span><span·class="p"·data-group-id="7167714453-18">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pattern</span><span·class="p"·data-group-id="7167714453-18">)</span><span·class="p">,</span><span·class="w">
454 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_match_object</span><span·class="p"·data-group-id="2221519406-19">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pattern</span><span·class="p"·data-group-id="2221519406-19">)</span><span·class="p">.</span><span·class="w">454 ··</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_match_object</span><span·class="p"·data-group-id="7167714453-19">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pattern</span><span·class="p"·data-group-id="7167714453-19">)</span><span·class="p">.</span><span·class="w">
  
455 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_index_match_object</span><span·class="p"·data-group-id="2221519406-20">(</span><span·class="n">Pattern</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Attr</span><span·class="p"·data-group-id="2221519406-20">)</span><span·class="w">455 </span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">dirty_index_match_object</span><span·class="p"·data-group-id="7167714453-20">(</span><span·class="n">Pattern</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Attr</span><span·class="p"·data-group-id="7167714453-20">)</span><span·class="w">
Max diff block lines reached; 94949/144117 bytes (65.88%) of diff not shown.
147 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_chap5.html
    
Offset 163, 17 lines modifiedOffset 163, 17 lines modified
163 different·Erlang·nodes·in·various·ways.·The·<code·class="inline">Mnesia</code>·programmer·does·not·need·to163 different·Erlang·nodes·in·various·ways.·The·<code·class="inline">Mnesia</code>·programmer·does·not·need·to
164 state·where·the·different·tables·reside,·only·the·names·of·the·different·tables164 state·where·the·different·tables·reside,·only·the·names·of·the·different·tables
165 need·to·be·specified·in·the·program·code.·This·is·known·as·&quot;location165 need·to·be·specified·in·the·program·code.·This·is·known·as·&quot;location
166 transparency&quot;·and·is·an·important·concept.·In·particular:</p><ul><li><p>A·program·works·regardless·of·the·data·location.·It·makes·no·difference166 transparency&quot;·and·is·an·important·concept.·In·particular:</p><ul><li><p>A·program·works·regardless·of·the·data·location.·It·makes·no·difference
167 whether·the·data·resides·on·the·local·node·or·on·a·remote·node.</p><p>Notice·that·the·program·runs·slower·if·the·data·is·located·on·a·remote·node.</p></li><li><p>The·database·can·be·reconfigured,·and·tables·can·be·moved·between·nodes.·These167 whether·the·data·resides·on·the·local·node·or·on·a·remote·node.</p><p>Notice·that·the·program·runs·slower·if·the·data·is·located·on·a·remote·node.</p></li><li><p>The·database·can·be·reconfigured,·and·tables·can·be·moved·between·nodes.·These
168 operations·do·not·affect·the·user·programs.</p></li></ul><p>It·has·previously·been·shown·that·each·table·has·a·number·of·system·attributes,168 operations·do·not·affect·the·user·programs.</p></li></ul><p>It·has·previously·been·shown·that·each·table·has·a·number·of·system·attributes,
169 such·as·<code·class="inline">index</code>·and·<code·class="inline">type</code>.</p><p>Table·attributes·are·specified·when·the·table·is·created.·For·example,·the169 such·as·<code·class="inline">index</code>·and·<code·class="inline">type</code>.</p><p>Table·attributes·are·specified·when·the·table·is·created.·For·example,·the
170 following·function·creates·a·table·with·two·RAM·replicas:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="7351517940-1">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">170 following·function·creates·a·table·with·two·RAM·replicas:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6904187631-1">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">
171 ····················</span><span·class="p"·data-group-id="7351517940-2">[</span><span·class="p"·data-group-id="7351517940-3">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7351517940-4">[</span><span·class="n">N1</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·146,·SHA:·d9cca885bc04308a83085a116d6f76bec88d13d8ff85a971645bf39897ea2c8c·...·]-3">}</span><span·class="p">,</span><span·class="w">171 ····················</span><span·class="p"·data-group-id="6904187631-2">[</span><span·class="p"·data-group-id="6904187631-3">{</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6904187631-4">[</span><span·class="n">N1</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·146,·SHA:·147a47fe4760ec012bcfcf1182a7b202dcef5fbebd7e86e6430a5e0dea882194·...·]-3">}</span><span·class="p">,</span><span·class="w">
172 ·····················</span><span·class="p"·data-group-id="7351517940-5">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="7351517940-6">(</span><span·class="ss">fields</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·241,·SHA:·be33b0ba6d04462a5ac9cf08f379ca9f503442d0cdb43e3c5f87484747f9c97d·...·]-1">)</span><span·class="p">.</span></code></pre><p>Tables·can·also·have·the·following·properties,·where·each·attribute·has·a·list172 ·····················</span><span·class="p"·data-group-id="6904187631-5">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">record_info</span><span·class="p"·data-group-id="6904187631-6">(</span><span·class="ss">fields</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·241,·SHA:·95cb224afe9f5376b3c5d8ce513da4c8638efddb57b622d322cb43259ff89274·...·]-1">)</span><span·class="p">.</span></code></pre><p>Tables·can·also·have·the·following·properties,·where·each·attribute·has·a·list
173 of·Erlang·nodes·as·its·value:</p><ul><li><p><code·class="inline">ram_copies</code>.·The·value·of·the·node·list·is·a·list·of·Erlang·nodes,·and·a·RAM173 of·Erlang·nodes·as·its·value:</p><ul><li><p><code·class="inline">ram_copies</code>.·The·value·of·the·node·list·is·a·list·of·Erlang·nodes,·and·a·RAM
174 replica·of·the·table·resides·on·each·node·in·the·list.</p><p>Notice·that·no·disc·operations·are·performed·when·a·program·executes·write174 replica·of·the·table·resides·on·each·node·in·the·list.</p><p>Notice·that·no·disc·operations·are·performed·when·a·program·executes·write
175 operations·to·these·replicas.·However,·if·permanent·RAM·replicas·are·required,175 operations·to·these·replicas.·However,·if·permanent·RAM·replicas·are·required,
176 the·following·alternatives·are·available:</p><ol><li>The·function·<a·href="mnesia.html#dump_tables/1"><code·class="inline">mnesia:dump_tables/1</code></a>·can·be·used·to·dump·RAM·table·replicas176 the·following·alternatives·are·available:</p><ol><li>The·function·<a·href="mnesia.html#dump_tables/1"><code·class="inline">mnesia:dump_tables/1</code></a>·can·be·used·to·dump·RAM·table·replicas
177 to·disc.</li><li>The·table·replicas·can·be·backed·up,·either·from·RAM,·or·from·disc·if177 to·disc.</li><li>The·table·replicas·can·be·backed·up,·either·from·RAM,·or·from·disc·if
178 dumped·there·with·this·function.</li></ol></li><li><p><code·class="inline">disc_copies</code>.·The·value·of·the·attribute·is·a·list·of·Erlang·nodes,·and·a178 dumped·there·with·this·function.</li></ol></li><li><p><code·class="inline">disc_copies</code>.·The·value·of·the·attribute·is·a·list·of·Erlang·nodes,·and·a
179 replica·of·the·table·resides·both·in·RAM·and·on·disc·on·each·node·in·the·list.179 replica·of·the·table·resides·both·in·RAM·and·on·disc·on·each·node·in·the·list.
Offset 218, 60 lines modifiedOffset 218, 60 lines modified
218 <code·class="inline">mnesia_frag</code>·can·be·used·as·a·<code·class="inline">mnesia_access</code>·callback·module.</p><p>At·each·record·access,·<code·class="inline">mnesia_frag</code>·first·computes·a·hash·value·from·the·record218 <code·class="inline">mnesia_frag</code>·can·be·used·as·a·<code·class="inline">mnesia_access</code>·callback·module.</p><p>At·each·record·access,·<code·class="inline">mnesia_frag</code>·first·computes·a·hash·value·from·the·record
219 key.·Second,·the·name·of·the·table·fragment·is·determined·from·the·hash·value.219 key.·Second,·the·name·of·the·table·fragment·is·determined·from·the·hash·value.
220 Finally·the·actual·table·access·is·performed·by·the·same·functions·as·for220 Finally·the·actual·table·access·is·performed·by·the·same·functions·as·for
221 non-fragmented·tables.·When·the·key·is·not·known·beforehand,·all·fragments·are221 non-fragmented·tables.·When·the·key·is·not·known·beforehand,·all·fragments·are
222 searched·for·matching·records.</p><p>Notice·that·in·<code·class="inline">ordered_set</code>·tables,·the·records·are·ordered·per·fragment,·and222 searched·for·matching·records.</p><p>Notice·that·in·<code·class="inline">ordered_set</code>·tables,·the·records·are·ordered·per·fragment,·and
223 the·order·is·undefined·in·results·returned·by·<code·class="inline">select</code>·and·<code·class="inline">match_object</code>,·as223 the·order·is·undefined·in·results·returned·by·<code·class="inline">select</code>·and·<code·class="inline">match_object</code>,·as
224 well·as·<code·class="inline">first</code>,·<code·class="inline">next</code>,·<code·class="inline">prev</code>·and·<code·class="inline">last</code>.</p><p>The·following·code·illustrates·how·a·<code·class="inline">Mnesia</code>·table·is·converted·to·be·a224 well·as·<code·class="inline">first</code>,·<code·class="inline">next</code>,·<code·class="inline">prev</code>·and·<code·class="inline">last</code>.</p><p>The·following·code·illustrates·how·a·<code·class="inline">Mnesia</code>·table·is·converted·to·be·a
225 fragmented·table·and·how·more·fragments·are·added·later:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mf">7.3</span><span·class="p">.</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="3476307454-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="3476307454-1">)</span><span·class="gp·unselectable">225 fragmented·table·and·how·more·fragments·are·added·later:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mf">7.3</span><span·class="p">.</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="2928994128-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2928994128-1">)</span><span·class="gp·unselectable">
226 (a@sam)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3476307454-2">(</span><span·class="p"·data-group-id="3476307454-2">)</span><span·class="p">.</span><span·class="w">226 (a@sam)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2928994128-2">(</span><span·class="p"·data-group-id="2928994128-2">)</span><span·class="p">.</span><span·class="w">
227 </span><span·class="nf">ok</span><span·class="w">227 </span><span·class="nf">ok</span><span·class="w">
228 </span><span·class="p"·data-group-id="3476307454-3">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3476307454-3">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">syste[·...·truncated·by·diffoscope;·len:·147,·SHA:·42183b636f5fa6c025040a8fb0e2bdb2ee4a84f61ed23de03254a043957ee4bc·...·]-4">)</span><span·class="p">.</span><span·class="w">228 </span><span·class="p"·data-group-id="2928994128-3">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="2928994128-3">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">syste[·...·truncated·by·diffoscope;·len:·147,·SHA:·1d1929f51c73a5a60da2458d384dae0a8423073d882b931ed8d1d6378257ae4e·...·]-4">)</span><span·class="p">.</span><span·class="w">
229 </span><span·class="p"·data-group-id="3476307454-5">[</span><span·class="ss">b@sam</span><span·class="p">,</span><span·class="ss">c@sam</span><span·class="p">,</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3476307454-5">]</span><span·class="gp·unselectable">229 </span><span·class="p"·data-group-id="2928994128-5">[</span><span·class="ss">b@sam</span><span·class="p">,</span><span·class="ss">c@sam</span><span·class="p">,</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="2928994128-5">]</span><span·class="gp·unselectable">
230 (a@sam)3&gt;·</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">dictionary</span><span·class="p">.</span><span·class="w">230 (a@sam)3&gt;·</span><span·class="n">Tab</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">dictionary</span><span·class="p">.</span><span·class="w">
231 </span><span·class="nf">dictionary</span><span·class="w">231 </span><span·class="nf">dictionary</span><span·class="w">
232 </span><span·class="p"·data-group-id="3476307454-6">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3476307454-6">)</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">creat[·...·truncated·by·diffoscope;·len:·690,·SHA:·c0583b7ba91f938311402f2d889717723ad20532104fe4f3a1555ee01e019f5a·...·]-7">)</span><span·class="p">.</span><span·class="w">232 </span><span·class="p"·data-group-id="2928994128-6">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="2928994128-6">)</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">creat[·...·truncated·by·diffoscope;·len:·690,·SHA:·09d3eb198711e8b4b74789ac90aba3de0cd7fd9605094a96c4e38355a899adc8·...·]-7">)</span><span·class="p">.</span><span·class="w">
233 </span><span·class="p"·data-group-id="3476307454-11">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3476307454-11">}</span><span·class="gp·unselectable">233 </span><span·class="p"·data-group-id="2928994128-11">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="2928994128-11">}</span><span·class="gp·unselectable">
234 (a@sam)5&gt;·</span><span·class="n">Write</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3476307454-12">(</span><span·class="n">Keys</span><span·class="p"·data-group-id="3476307454-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-13">[</span><span·class="nc">mnesi[·...·truncated·by·diffoscope;·len:·664,·SHA:·8c15333e9f794afdeb13b151791f835e6ed36ab2375ad68d2b6b0ebe9ccd8074·...·]-13">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">234 (a@sam)5&gt;·</span><span·class="n">Write</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2928994128-12">(</span><span·class="n">Keys</span><span·class="p"·data-group-id="2928994128-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-13">[</span><span·class="nc">mnesi[·...·truncated·by·diffoscope;·len:·664,·SHA:·59153c952c9d92ab7d8669f03d27802e3e911d483604f29e1e143e455e662e85·...·]-13">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
235 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">235 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">
236 (a@sam)6&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3476307454-16">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-17">[</span><span·class="nc">list[·...·truncated·by·diffoscope;·len:·445,·SHA:·38ba3b4cd4e25cb651846b134856082a21c8c2025ff1fe825a3f714c104651ea·...·]-16">)</span><span·class="p">.</span><span·class="w">236 (a@sam)6&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="2928994128-16">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-17">[</span><span·class="nc">list[·...·truncated·by·diffoscope;·len:·445,·SHA:·ce6f6f261b7e1d2dc2318025d37c2b44a7e50fb274cbd15a3d35e62c90d20c64·...·]-16">)</span><span·class="p">.</span><span·class="w">
237 </span><span·class="nf">ok</span><span·class="w">237 </span><span·class="nf">ok</span><span·class="w">
238 </span><span·class="p"·data-group-id="3476307454-19">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3476307454-19">)</span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">cha[·...·truncated·by·diffoscope;·len:·486,·SHA:·1dc77b67d3eb5bc93b21aebc435e56afd84dbe75bea13a299800826faebf6886·...·]-20">)</span><span·class="p">.</span><span·class="w">238 </span><span·class="p"·data-group-id="2928994128-19">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="2928994128-19">)</span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">cha[·...·truncated·by·diffoscope;·len:·486,·SHA:·eb035b0ea724c5a643836f1e94f940c731e964bc92c500ba4617c16bbd558b15·...·]-20">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="p"·data-group-id="3476307454-23">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3476307454-23">}</span><span·class="gp·unselectable">239 </span><span·class="p"·data-group-id="2928994128-23">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="2928994128-23">}</span><span·class="gp·unselectable">
240 (a@sam)8&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">table_info</span><span·class="p"·data-group-id="3476307454-24">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">frag_properties</span><span·class="p"·data-group-id="3476307454-24">)</span><span·class="p">.</span><span·class="w">240 (a@sam)8&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">table_info</span><span·class="p"·data-group-id="2928994128-24">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">frag_properties</span><span·class="p"·data-group-id="2928994128-24">)</span><span·class="p">.</span><span·class="w">
241 </span><span·class="p"·data-group-id="3476307454-25">[</span><span·class="p"·data-group-id="3476307454-26">{</span><span·class="ss">base_table</span><span·class="p">,</span><span·class="ss">dictionary</span><span·class="p"·data-group-id="3476307454-26">}</span><span·class="p">,</span><span·class="w">241 </span><span·class="p"·data-group-id="2928994128-25">[</span><span·class="p"·data-group-id="2928994128-26">{</span><span·class="ss">base_table</span><span·class="p">,</span><span·class="ss">dictionary</span><span·class="p"·data-group-id="2928994128-26">}</span><span·class="p">,</span><span·class="w">
242 ·</span><span·class="p"·data-group-id="3476307454-27">{</span><span·class="ss">foreign_key</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="3476307454-27">}</span><span·class="p">,</span><span·class="w">242 ·</span><span·class="p"·data-group-id="2928994128-27">{</span><span·class="ss">foreign_key</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="2928994128-27">}</span><span·class="p">,</span><span·class="w">
243 ·</span><span·class="p"·data-group-id="3476307454-28">{</span><span·class="ss">n_doubles</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3476307454-28">}</span><span·class="p">,</span><span·class="w">243 ·</span><span·class="p"·data-group-id="2928994128-28">{</span><span·class="ss">n_doubles</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="2928994128-28">}</span><span·class="p">,</span><span·class="w">
244 ·</span><span·class="p"·data-group-id="3476307454-29">{</span><span·class="ss">n_fragments</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3476307454-29">}</span><span·class="p">,</span><span·class="w">244 ·</span><span·class="p"·data-group-id="2928994128-29">{</span><span·class="ss">n_fragments</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2928994128-29">}</span><span·class="p">,</span><span·class="w">
245 ·</span><span·class="p"·data-group-id="3476307454-30">{</span><span·class="ss">next_n_to_split</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3476307454-30">}</span><span·class="p">,</span><span·class="w">245 ·</span><span·class="p"·data-group-id="2928994128-30">{</span><span·class="ss">next_n_to_split</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2928994128-30">}</span><span·class="p">,</span><span·class="w">
246 ·</span><span·class="p"·data-group-id="3476307454-31">{</span><span·class="ss">node_pool</span><span·class="p">,</span><span·class="p"·data-group-id="3476307454-32">[</span><span·class="ss">a@sam</span><span·class="p">,</span><span·class="ss">b@sam</span><span·class="p">,</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·162,·SHA:·e63e44fb941601cbc06ded4249ea04b5108e00554bcae1b31380efc42aefa404·...·]-25">]</span><span·class="gp·unselectable">246 ·</span><span·class="p"·data-group-id="2928994128-31">{</span><span·class="ss">node_pool</span><span·class="p">,</span><span·class="p"·data-group-id="2928994128-32">[</span><span·class="ss">a@sam</span><span·class="p">,</span><span·class="ss">b@sam</span><span·class="p">,</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·162,·SHA:·0b1c63b546caed04de7fdd2973051b6f834254a9089716b8a9cbc2356086bcd2·...·]-25">]</span><span·class="gp·unselectable">
247 (a@sam)9&gt;·</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3476307454-33">(</span><span·class="n">Item</span><span·class="p"·data-group-id="3476307454-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">table[·...·truncated·by·diffoscope;·len:·208,·SHA:·a78293b2e953c261e81d96c90f5e3944fd6363e86e506673b9ca2f2d259b8d89·...·]-34">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">247 (a@sam)9&gt;·</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2928994128-33">(</span><span·class="n">Item</span><span·class="p"·data-group-id="2928994128-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">table[·...·truncated·by·diffoscope;·len:·208,·SHA:·2b88e33a7dda9da85c503f652d4f4a24bd93c841883a27535d4dafbdb15f8e52·...·]-34">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
248 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">248 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">
249 (a@sam)10&gt;·</span><span·class="n">Dist</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3476307454-35">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-36">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·6f53fdbc3c22d3deafeb66f06c12cc7bfabbdf1be64b492513efbab1089ba589·...·]-35">)</span><span·class="p">.</span><span·class="w">249 (a@sam)10&gt;·</span><span·class="n">Dist</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="2928994128-35">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-36">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·f6ee16c8ce8ef67b6e33d0d9dee3db1589ce28b8fb724a274e9db5977d47da3d·...·]-35">)</span><span·class="p">.</span><span·class="w">
250 </span><span·class="p"·data-group-id="3476307454-37">[</span><span·class="p"·data-group-id="3476307454-38">{</span><span·class="ss">c@sam</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3476307454-38">}</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·414,·SHA:·3fdaf2d116dd21f0391a852860c6a3e9f2516933fa03427ed3e76a32e2e12f09·...·]-37">]</span><span·class="gp·unselectable">250 </span><span·class="p"·data-group-id="2928994128-37">[</span><span·class="p"·data-group-id="2928994128-38">{</span><span·class="ss">c@sam</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="2928994128-38">}</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·414,·SHA:·1137924ff1fb135a7e9644bb14d22ffff8b836556311bb892eb64d6d402a3ef9·...·]-37">]</span><span·class="gp·unselectable">
251 (a@sam)11&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_frag</span><span·class="p"·data-group-id="3476307454-41">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-42">{</span><span·class="ss">add_frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dist</spa[·...·truncated·by·diffoscope;·len:·97,·SHA:·149ccfbfd641c2dafb2fdb4d8f290fde95ba89278d295aa72e6008e89a66c79a·...·]-41">)</span><span·class="p">.</span><span·class="w">251 (a@sam)11&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_frag</span><span·class="p"·data-group-id="2928994128-41">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-42">{</span><span·class="ss">add_frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dist</spa[·...·truncated·by·diffoscope;·len:·97,·SHA:·d92ba8f121305cd4828c2d43a2857f18b2fa7fafa4871e596df630ccab5689a6·...·]-41">)</span><span·class="p">.</span><span·class="w">
252 </span><span·class="p"·data-group-id="3476307454-43">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3476307454-43">}</span><span·class="gp·unselectable">252 </span><span·class="p"·data-group-id="2928994128-43">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="2928994128-43">}</span><span·class="gp·unselectable">
253 (a@sam)12&gt;·</span><span·class="n">Dist2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3476307454-44">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-45">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·5341796f31310ed00a22560710c88602539ddc9e1e755a5ae2ea7244f738efce·...·]-44">)</span><span·class="p">.</span><span·class="w">253 (a@sam)12&gt;·</span><span·class="n">Dist2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="2928994128-44">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-45">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·d66f8e7207edcac348a9ce4700c2632ad119b2a6ddd0ada6a045f438c989160b·...·]-44">)</span><span·class="p">.</span><span·class="w">
254 </span><span·class="p"·data-group-id="3476307454-46">[</span><span·class="p"·data-group-id="3476307454-47">{</span><span·class="ss">b@sam</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3476307454-47">}</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·414,·SHA:·f9612b1c41f00f4ab31841234f0d118b6c3c4a285c87574ebcd2ba70095fe308·...·]-46">]</span><span·class="gp·unselectable">254 </span><span·class="p"·data-group-id="2928994128-46">[</span><span·class="p"·data-group-id="2928994128-47">{</span><span·class="ss">b@sam</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2928994128-47">}</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·414,·SHA:·1ff95c1993595aa85a57fb527ab2dc8b4d1d5b0e0bd3136838b915c9508ed870·...·]-46">]</span><span·class="gp·unselectable">
255 (a@sam)13&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_frag</span><span·class="p"·data-group-id="3476307454-50">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-51">{</span><span·class="ss">add_frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dist2</sp[·...·truncated·by·diffoscope;·len:·98,·SHA:·d686017ed62fc9ca0e06864bbbbc85d5942122f302a433cfb2d651cabafe609c·...·]-50">)</span><span·class="p">.</span><span·class="w">255 (a@sam)13&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_frag</span><span·class="p"·data-group-id="2928994128-50">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-51">{</span><span·class="ss">add_frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dist2</sp[·...·truncated·by·diffoscope;·len:·98,·SHA:·355ee9f603913aa98bf9b219beaa60571c7f65155ea75630d0b29a9c080ee4cf·...·]-50">)</span><span·class="p">.</span><span·class="w">
256 </span><span·class="p"·data-group-id="3476307454-52">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3476307454-52">}</span><span·class="gp·unselectable">256 </span><span·class="p"·data-group-id="2928994128-52">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="2928994128-52">}</span><span·class="gp·unselectable">
257 (a@sam)14&gt;·</span><span·class="n">Dist3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3476307454-53">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-54">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·66194ae830842423d795a2068462f74848fcb3a95a2506de1be34cd84bab1abc·...·]-53">)</span><span·class="p">.</span><span·class="w">257 (a@sam)14&gt;·</span><span·class="n">Dist3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="2928994128-53">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-54">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·9a0510827e23d088e913cb72b5ec256e1a89ad1ff187598289c27536b0c27750·...·]-53">)</span><span·class="p">.</span><span·class="w">
258 </span><span·class="p"·data-group-id="3476307454-55">[</span><span·class="p"·data-group-id="3476307454-56">{</span><span·class="ss">a@sam</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3476307454-56">}</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·414,·SHA:·862488a9bd43f28a86b5f5dc5e70680e643136580d12790505d7585d7cd16062·...·]-55">]</span><span·class="gp·unselectable">258 </span><span·class="p"·data-group-id="2928994128-55">[</span><span·class="p"·data-group-id="2928994128-56">{</span><span·class="ss">a@sam</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2928994128-56">}</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·414,·SHA:·931ff8d550b07724a9852779eba1a18a5a9ec9eb60b4af6aeaf428a23d1d9597·...·]-55">]</span><span·class="gp·unselectable">
259 (a@sam)15&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_frag</span><span·class="p"·data-group-id="3476307454-59">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-60">{</span><span·class="ss">add_frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dist3</sp[·...·truncated·by·diffoscope;·len:·98,·SHA:·f01fd1ccc415c8dbba7fae5f4b442693c635947d8c3cff1fae65c1f88e2903c7·...·]-59">)</span><span·class="p">.</span><span·class="w">259 (a@sam)15&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">change_table_frag</span><span·class="p"·data-group-id="2928994128-59">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-60">{</span><span·class="ss">add_frag</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dist3</sp[·...·truncated·by·diffoscope;·len:·98,·SHA:·fab19271cbbf18eb1121c85e53dce0e79036fe35df30c6b6584a4b0ead4e0275·...·]-59">)</span><span·class="p">.</span><span·class="w">
260 </span><span·class="p"·data-group-id="3476307454-61">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3476307454-61">}</span><span·class="gp·unselectable">260 </span><span·class="p"·data-group-id="2928994128-61">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="2928994128-61">}</span><span·class="gp·unselectable">
261 (a@sam)16&gt;·</span><span·class="n">Read</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3476307454-62">(</span><span·class="n">Key</span><span·class="p"·data-group-id="3476307454-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</[·...·truncated·by·diffoscope;·len:·308,·SHA:·2bd6d36e685847aca393249bff925fc4dce1cb34f644dab69508072037a6f23f·...·]-63">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">261 (a@sam)16&gt;·</span><span·class="n">Read</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2928994128-62">(</span><span·class="n">Key</span><span·class="p"·data-group-id="2928994128-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</[·...·truncated·by·diffoscope;·len:·308,·SHA:·bda1df7968356863b2428a19d9e9dc4cc2fb644a1ab64374dc8dadde43cf3f01·...·]-63">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
262 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">262 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">
263 (a@sam)17&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3476307454-65">(</span><span·class="ss">transaction</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Read</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-66">[</span><span·class="mi">12</[·...·truncated·by·diffoscope;·len:·183,·SHA:·dc4653774503038bfd199185bd06705168fe643c0aaeebdf64ca4a61fc6d93ef·...·]-65">)</span><span·class="p">.</span><span·class="w">263 (a@sam)17&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="2928994128-65">(</span><span·class="ss">transaction</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Read</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-66">[</span><span·class="mi">12</[·...·truncated·by·diffoscope;·len:·183,·SHA:·aafa763893d661eaf9811f9cea5d78b7751d3931150a84a198dc53bcdf039b22·...·]-65">)</span><span·class="p">.</span><span·class="w">
264 </span><span·class="p"·data-group-id="3476307454-67">[</span><span·class="p"·data-group-id="3476307454-68">{</span><span·class="ss">dictionary</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="o">-</span><span·class="mi">12</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·74,·SHA:·46a1c9d00068865f6d93d391a18b6470c007f59a88d060c776f7c7943ce0566a·...·]-67">]</span><span·class="gp·unselectable">264 </span><span·class="p"·data-group-id="2928994128-67">[</span><span·class="p"·data-group-id="2928994128-68">{</span><span·class="ss">dictionary</span><span·class="p">,</span><span·class="mi">12</span><span·class="p">,</span><span·class="o">-</span><span·class="mi">12</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·74,·SHA:·3cbc9cebfbbda17424caa6fb49ae333f17e1552613dcfc4592da2faf4ef400e4·...·]-67">]</span><span·class="gp·unselectable">
265 (a@sam)18&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3476307454-69">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3476307454-70">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·d924c6a9d88e2eb46a7c630645bbb462c18517b2ce0a1e300b4fca1e9db54750·...·]-69">)</span><span·class="p">.</span><span·class="w">265 (a@sam)18&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="2928994128-69">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2928994128-70">[</span><span·class="ss">frag_[·...·truncated·by·diffoscope;·len:·189,·SHA:·f917482473ceebc5a60ba18bfc3c09ec9cedfd82ebea6ee55710e684604aeecc·...·]-69">)</span><span·class="p">.</span><span·class="w">
266 </span><span·class="p"·data-group-id="3476307454-71">[</span><span·class="p"·data-group-id="3476307454-72">{</span><span·class="ss">dictionary</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="3476307454-72">}</span><span·class="p">,</span><span·class="w">266 </span><span·class="p"·data-group-id="2928994128-71">[</span><span·class="p"·data-group-id="2928994128-72">{</span><span·class="ss">dictionary</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="2928994128-72">}</span><span·class="p">,</span><span·class="w">
267 ·</span><span·class="p"·data-group-id="3476307454-73">{</span><span·class="ss">dictionary_frag2</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="3476307454-73">}</span><span·class="p">,</span><span·class="w">267 ·</span><span·class="p"·data-group-id="2928994128-73">{</span><span·class="ss">dictionary_frag2</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="2928994128-73">}</span><span·class="p">,</span><span·class="w">
268 ·</span><span·class="p"·data-group-id="3476307454-74">{</span><span·class="ss">dictionary_frag3</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="3476307454-74">}</span><span·class="p">,</span><span·class="w">268 ·</span><span·class="p"·data-group-id="2928994128-74">{</span><span·class="ss">dictionary_frag3</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="2928994128-74">}</span><span·class="p">,</span><span·class="w">
269 ·</span><span·class="p"·data-group-id="3476307454-75">{</span><span·class="ss">dictionary_frag4</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="3476307454-75">}</span><span·class="p"·data-group-id="3476307454-71">]</span><span·class="w">269 ·</span><span·class="p"·data-group-id="2928994128-75">{</span><span·class="ss">dictionary_frag4</span><span·class="p">,</span><span·class="mi">64</span><span·class="p"·data-group-id="2928994128-75">}</span><span·class="p"·data-group-id="2928994128-71">]</span><span·class="w">
270 </span><span·class="p"·data-group-id="3476307454-76">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3476307454-76">)</span><span·class="mi">19</span><span·class="o">&gt;</span></code></pre><h3·id="fragmentation-properties"·class="section-heading">270 </span><span·class="p"·data-group-id="2928994128-76">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="2928994128-76">)</span><span·class="mi">19</span><span·class="o">&gt;</span></code></pre><h3·id="fragmentation-properties"·class="section-heading">
271 ··<a·href="#fragmentation-properties"·class="hover-link">271 ··<a·href="#fragmentation-properties"·class="hover-link">
272 ····<i·class="ri-link-m"·aria-hidden="true"></i>272 ····<i·class="ri-link-m"·aria-hidden="true"></i>
273 ··</a>273 ··</a>
274 ··<span·class="text">Fragmentation·Properties</span>274 ··<span·class="text">Fragmentation·Properties</span>
275 </h3>275 </h3>
276 <p>The·table·property·<code·class="inline">frag_properties</code>·can·be·read·with·the·function276 <p>The·table·property·<code·class="inline">frag_properties</code>·can·be·read·with·the·function
277 <a·href="mnesia.html#table_info/2"><code·class="inline">mnesia:table_info(Tab,·frag_properties)</code></a>.·The277 <a·href="mnesia.html#table_info/2"><code·class="inline">mnesia:table_info(Tab,·frag_properties)</code></a>.·The
Offset 305, 72 lines modifiedOffset 305, 72 lines modified
305 defaults·to·<code·class="inline">undefined</code>.·However,·if·the·foreign·key·is·set·to·something·else,305 defaults·to·<code·class="inline">undefined</code>.·However,·if·the·foreign·key·is·set·to·something·else,
306 it·causes·the·default·values·of·the·other·fragmentation·properties·to·be·the306 it·causes·the·default·values·of·the·other·fragmentation·properties·to·be·the
307 same·values·as·the·actual·fragmentation·properties·of·the·foreign·table.</p></li><li><p><strong><code·class="inline">{hash_module,·Atom}</code></strong>·-·Enables·definition·of·an·alternative·hashing307 same·values·as·the·actual·fragmentation·properties·of·the·foreign·table.</p></li><li><p><strong><code·class="inline">{hash_module,·Atom}</code></strong>·-·Enables·definition·of·an·alternative·hashing
308 scheme.·The·module·must·implement·the·<a·href="mnesia_frag_hash.html"><code·class="inline">mnesia_frag_hash</code></a>·callback·behavior.308 scheme.·The·module·must·implement·the·<a·href="mnesia_frag_hash.html"><code·class="inline">mnesia_frag_hash</code></a>·callback·behavior.
309 This·property·can·explicitly·be·set·at·table·creation.·Default·is309 This·property·can·explicitly·be·set·at·table·creation.·Default·is
310 <code·class="inline">mnesia_frag_hash</code>.</p></li><li><p><strong><code·class="inline">{hash_state,·Term}</code></strong>·-·Enables·a·table-specific·parameterization·of·a310 <code·class="inline">mnesia_frag_hash</code>.</p></li><li><p><strong><code·class="inline">{hash_state,·Term}</code></strong>·-·Enables·a·table-specific·parameterization·of·a
311 generic·hash·module.·This·property·can·explicitly·be·set·at·table·creation.311 generic·hash·module.·This·property·can·explicitly·be·set·at·table·creation.
312 Default·is·<code·class="inline">undefined</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mf">7.3</span><span·class="p">.</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5854150604-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5854150604-1">)</span><span·class="gp·unselectable">312 Default·is·<code·class="inline">undefined</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mf">7.3</span><span·class="p">.</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="3188212030-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="3188212030-1">)</span><span·class="gp·unselectable">
313 (a@sam)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5854150604-2">(</span><span·class="p"·data-group-id="5854150604-2">)</span><span·class="p">.</span><span·class="w">313 (a@sam)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3188212030-2">(</span><span·class="p"·data-group-id="3188212030-2">)</span><span·class="p">.</span><span·class="w">
314 </span><span·class="nf">ok</span><span·class="w">314 </span><span·class="nf">ok</span><span·class="w">
315 </span><span·class="p"·data-group-id="5854150604-3">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="5854150604-3">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">PrimProps</span><span·class="w">·</span><span·class="o">=</s[·...·truncated·by·diffoscope;·len:·811,·SHA:·9b99ab8b77bda32a7935ce0f63452a30d01c477ef6109f2bdb3a12368b91753f·...·]-4">]</span><span·class="p">.</span><span·class="w">315 </span><span·class="p"·data-group-id="3188212030-3">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3188212030-3">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">PrimProps</span><span·class="w">·</span><span·class="o">=</s[·...·truncated·by·diffoscope;·len:·811,·SHA:·9ec646236448f485a8f784f226bbcc33d636b70f113bf4990480fd170d7447c8·...·]-4">]</span><span·class="p">.</span><span·class="w">
316 </span><span·class="p"·data-group-id="5854150604-9">[</span><span·class="p"·data-group-id="5854150604-10">{</span><span·class="ss">n_fragments</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="5854150604-10">}</span><span·class="p">,</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·325,·SHA:·0fef85b6410fbc4281d090e01a0ee04a0395d015bb9825c936cf7df4d5889a0f·...·]-9">]</span><span·class="gp·unselectable">316 </span><span·class="p"·data-group-id="3188212030-9">[</span><span·class="p"·data-group-id="3188212030-10">{</span><span·class="ss">n_fragments</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="3188212030-10">}</span><span·class="p">,</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·325,·SHA:·693e90b90fa138a846f515d15e0e80ec2d1459d44c1907d7fde7d63b76d427b8·...·]-9">]</span><span·class="gp·unselectable">
317 (a@sam)3&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5854150604-13">(</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="w">317 (a@sam)3&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="3188212030-13">(</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="w">
318 ······························</span><span·class="p"·data-group-id="5854150604-14">[</span><span·class="p"·data-group-id="5854150604-15">{</span><span·class="ss">frag_properties</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimProps</span><span·class="p"·data-group-id="5854150604-15">}</span><span·class="p">,</span><span·class="w">318 ······························</span><span·class="p"·data-group-id="3188212030-14">[</span><span·class="p"·data-group-id="3188212030-15">{</span><span·class="ss">frag_properties</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimProps</span><span·class="p"·data-group-id="3188212030-15">}</span><span·class="p">,</span><span·class="w">
319 ·······························</span><span·class="p"·data-group-id="5854150604-16">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="p"·data-group-id="5854150604-17">[</span><span·class="ss">prim_key</span><span·class="p">,</span><span·class="ss">prim_val</span><span·class="p"·data-group-id="58[·...·truncated·by·diffoscope;·len:·170,·SHA:·9d7461e4f89748ea90197abb846a3b9b690d0495feec50090b90d71852de53f3·...·]-13">)</span><span·class="p">.</span><span·class="w">319 ·······························</span><span·class="p"·data-group-id="3188212030-16">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="p"·data-group-id="3188212030-17">[</span><span·class="ss">prim_key</span><span·class="p">,</span><span·class="ss">prim_val</span><span·class="p"·data-group-id="31[·...·truncated·by·diffoscope;·len:·170,·SHA:·204d93f23bff260480f8972ae3d0fdb13b5bfb39df5edb9e12f63738c2fb55b8·...·]-13">)</span><span·class="p">.</span><span·class="w">
320 </span><span·class="p"·data-group-id="5854150604-18">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="5854150604-18">}</span><span·class="gp·unselectable">320 </span><span·class="p"·data-group-id="3188212030-18">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3188212030-18">}</span><span·class="gp·unselectable">
321 (a@sam)4&gt;·</span><span·class="n">SecProps</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5854150604-19">[</span><span·class="p"·data-group-id="5854150604-20">{</span><span·class="ss">foreign_key</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5854150604-21">{</span><span·class="ss">prim_dict</span><span·cla[·...·truncated·by·diffoscope;·len:·219,·SHA:·f13a0b6329ad5ebed0da07ec4ec51c2ec0ab392f1e16a3095b83691f2809388c·...·]-19">]</span><span·class="p">.</span><span·class="w">321 (a@sam)4&gt;·</span><span·class="n">SecProps</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3188212030-19">[</span><span·class="p"·data-group-id="3188212030-20">{</span><span·class="ss">foreign_key</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3188212030-21">{</span><span·class="ss">prim_dict</span><span·cla[·...·truncated·by·diffoscope;·len:·219,·SHA:·2a2fce7f2400bf339b032b216fc52574c1a7e9a7ed545b446c680e1b23d85761·...·]-19">]</span><span·class="p">.</span><span·class="w">
322 </span><span·class="p"·data-group-id="5854150604-22">[</span><span·class="p"·data-group-id="5854150604-23">{</span><span·class="ss">foreign_key</span><span·class="p">,</span><span·class="p"·data-group-id="5854150604-24">{</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·171,·SHA:·6f8692a1da4124ad07029436ac6cd1f3696415deacaa2c2f95587b41bc29e5f9·...·]-22">]</span><span·class="gp·unselectable">322 </span><span·class="p"·data-group-id="3188212030-22">[</span><span·class="p"·data-group-id="3188212030-23">{</span><span·class="ss">foreign_key</span><span·class="p">,</span><span·class="p"·data-group-id="3188212030-24">{</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·171,·SHA:·858dfb35a66d69374ada00b3ab6a370bb9f00e35674d4585dbad15ba85b2ca73·...·]-22">]</span><span·class="gp·unselectable">
323 (a@sam)5&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5854150604-25">(</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="w">323 (a@sam)5&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="3188212030-25">(</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="w">
324 ······························</span><span·class="p"·data-group-id="5854150604-26">[</span><span·class="p"·data-group-id="5854150604-27">{</span><span·class="ss">frag_properties</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecProps</span><span·class="p"·data-group-id="5854150604-27">}</span><span·class="p">,</span><span·class="gp·unselectable">324 ······························</span><span·class="p"·data-group-id="3188212030-26">[</span><span·class="p"·data-group-id="3188212030-27">{</span><span·class="ss">frag_properties</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecProps</span><span·class="p"·data-group-id="3188212030-27">}</span><span·class="p">,</span><span·class="gp·unselectable">
325 (a@sam)5&gt;·</span><span·class="w">·····················</span><span·class="p"·data-group-id="5854150604-28">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5854150604-29">[</span><span·class="ss">sec_key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·216,·SHA:·af7bc10d07f53c17b19197e38d0440c6004f7fd69ba2f8d430cafbc21b33fd73·...·]-25">)</span><span·class="p">.</span><span·class="w">325 (a@sam)5&gt;·</span><span·class="w">·····················</span><span·class="p"·data-group-id="3188212030-28">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3188212030-29">[</span><span·class="ss">sec_key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·216,·SHA:·ad25170779db977b7013342f529c20bc8d222578f64a56585953200b66b88d03·...·]-25">)</span><span·class="p">.</span><span·class="w">
326 </span><span·class="p"·data-group-id="5854150604-30">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="5854150604-30">}</span><span·class="gp·unselectable">326 </span><span·class="p"·data-group-id="3188212030-30">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3188212030-30">}</span><span·class="gp·unselectable">
327 (a@sam)6&gt;·</span><span·class="n">Write</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5854150604-31">(</span><span·class="n">Rec</span><span·class="p"·data-group-id="5854150604-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write<[·...·truncated·by·diffoscope;·len:·127,·SHA:·5d41088a8acf4820ea011368d3109ee2cf5a6f27f3c04b3ec709455d5858be55·...·]-32">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">327 (a@sam)6&gt;·</span><span·class="n">Write</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3188212030-31">(</span><span·class="n">Rec</span><span·class="p"·data-group-id="3188212030-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">write<[·...·truncated·by·diffoscope;·len:·127,·SHA:·fdc613c7cfe709c0c26bf1dd8bb6781a42905ab159bda1ceae8a73792fa9116e·...·]-32">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
328 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">328 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">
329 (a@sam)7&gt;·</span><span·class="n">PrimKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">11</span><span·class="p">.</span><span·class="w">329 (a@sam)7&gt;·</span><span·class="n">PrimKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">11</span><span·class="p">.</span><span·class="w">
330 </span><span·class="mi">11</span><span·class="gp·unselectable">330 </span><span·class="mi">11</span><span·class="gp·unselectable">
331 (a@sam)8&gt;·</span><span·class="n">SecKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">.</span><span·class="w">331 (a@sam)8&gt;·</span><span·class="n">SecKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">.</span><span·class="w">
332 </span><span·class="mi">42</span><span·class="gp·unselectable">332 </span><span·class="mi">42</span><span·class="gp·unselectable">
333 (a@sam)9&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="5854150604-33">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">333 (a@sam)9&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3188212030-33">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">
334 ··························</span><span·class="p"·data-group-id="5854150604-34">[</span><span·class="p"·data-group-id="5854150604-35">{</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimKey</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</s[·...·truncated·by·diffoscope;·len:·262,·SHA:·9538f61b0907b92530ee18e36e7cd3c87381ff17997e2a63b281a74cf209fb09·...·]-33">)</span><span·class="p">.</span><span·class="w">334 ··························</span><span·class="p"·data-group-id="3188212030-34">[</span><span·class="p"·data-group-id="3188212030-35">{</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimKey</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</s[·...·truncated·by·diffoscope;·len:·262,·SHA:·7716e29176bfb851c7b770ce545620aa1af6be6728ae5b983f82ce604eb90f6c·...·]-33">)</span><span·class="p">.</span><span·class="w">
335 </span><span·class="nf">ok</span><span·class="w">335 </span><span·class="nf">ok</span><span·class="w">
336 </span><span·class="p"·data-group-id="5854150604-36">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="5854150604-36">)</span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">ac[·...·truncated·by·diffoscope;·len:·54,·SHA:·c793d1b124e3aaeb5efc35dec8d9d3f3e4f9cd9c88a632c23ac3cbc2ca6b4804·...·]-37">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">336 </span><span·class="p"·data-group-id="3188212030-36">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3188212030-36">)</span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">ac[·...·truncated·by·diffoscope;·len:·54,·SHA:·1885fe85ec9905490bd75f70464d7c9bf08fbeac4353f166535286ce1e380b2a·...·]-37">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Write</span><span·class="p">,</span><span·class="w">
337 ···························</span><span·class="p"·data-group-id="5854150604-38">[</span><span·class="p"·data-group-id="5854150604-39">{</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimKe[·...·truncated·by·diffoscope;·len:·240,·SHA:·cb7583cd4e346829ba69a155a8bf4f9bd36cb69f8d7ba4bc690dc9894b437696·...·]-37">)</span><span·class="p">.</span><span·class="w">337 ···························</span><span·class="p"·data-group-id="3188212030-38">[</span><span·class="p"·data-group-id="3188212030-39">{</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimKe[·...·truncated·by·diffoscope;·len:·240,·SHA:·d2571bb8161c3b47994aed07b01e0fbc0aae57e48050018d966ecfb19d08dbb2·...·]-37">)</span><span·class="p">.</span><span·class="w">
338 </span><span·class="nf">ok</span><span·class="w">338 </span><span·class="nf">ok</span><span·class="w">
339 </span><span·class="p"·data-group-id="5854150604-40">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="5854150604-40">)</span><span·class="mi">11</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">ch[·...·truncated·by·diffoscope;·len:·630,·SHA:·1d1e0372ec793f88dc348a6087b581ae78356cb8dcaad1cd90e027085813875f·...·]-41">)</span><span·class="p">.</span><span·class="w">339 </span><span·class="p"·data-group-id="3188212030-40">(</span><span·class="ss">a@sam</span><span·class="p"·data-group-id="3188212030-40">)</span><span·class="mi">11</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">ch[·...·truncated·by·diffoscope;·len:·630,·SHA:·57d5c1242cebdfffad0ad36b289bd240a72b6474e2cdbeb1f76a54948e3217eb·...·]-41">)</span><span·class="p">.</span><span·class="w">
340 </span><span·class="p"·data-group-id="5854150604-45">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="5854150604-45">}</span><span·class="gp·unselectable">340 </span><span·class="p"·data-group-id="3188212030-45">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="3188212030-45">}</span><span·class="gp·unselectable">
341 (a@sam)12&gt;·</span><span·class="n">SecRead</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5854150604-46">(</span><span·class="n">PrimKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecKey</span><span·class="p"·data-group-id="5854150604-46">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">341 (a@sam)12&gt;·</span><span·class="n">SecRead</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3188212030-46">(</span><span·class="n">PrimKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecKey</span><span·class="p"·data-group-id="3188212030-46">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
342 ···············</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="5854150604-47">(</span><span·class="p"·data-group-id="5854150604-48">{</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimKey</span><span·class="p"·data-group-id="5854150604-48">}</span><span·class="p"[·...·truncated·by·diffoscope;·len:·179,·SHA:·7c45bcbfcc9adc7f268800bbae152efeec18bb6eedb751f257cd7e5a31b214f9·...·]-47">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">342 ···············</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="3188212030-47">(</span><span·class="p"·data-group-id="3188212030-48">{</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrimKey</span><span·class="p"·data-group-id="3188212030-48">}</span><span·class="p"[·...·truncated·by·diffoscope;·len:·179,·SHA:·5ca78bfeab9cf6cb888f376f92405545ad6c8ed20852f4d132a3e6a664adbefd·...·]-47">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
343 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">343 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">
344 (a@sam)13&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="5854150604-49">(</span><span·class="ss">transaction</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecRead</span><span·class="p">,</span><span·class="w">344 (a@sam)13&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3188212030-49">(</span><span·class="ss">transaction</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecRead</span><span·class="p">,</span><span·class="w">
345 ···························</span><span·class="p"·data-group-id="5854150604-50">[</span><span·class="n">PrimKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecKey</span><span·class="p"·data-group-id="5854150604-50">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_[·...·truncated·by·diffoscope;·len:·52,·SHA:·60cee20a58bb64441c834a9d56d3e7140b823b75896cccfe8a2029f10b1f7421·...·]-49">)</span><span·class="p">.</span><span·class="w">345 ···························</span><span·class="p"·data-group-id="3188212030-50">[</span><span·class="n">PrimKey</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SecKey</span><span·class="p"·data-group-id="3188212030-50">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia_[·...·truncated·by·diffoscope;·len:·52,·SHA:·a7c31f8fa84bab7155fb3a1698c0b4fea866545644a73467974c16268a37726e·...·]-49">)</span><span·class="p">.</span><span·class="w">
346 </span><span·class="p"·data-group-id="5854150604-51">[</span><span·class="p"·data-group-id="5854150604-52">{</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="mi">42</span><span·class="p">,</span><span·class="mi">11</span><span·class="p"·data-group-id="5854150604-52">}[·...·truncated·by·diffoscope;·len:·48,·SHA:·1e45aaa5512a3b931489830ac223fc625cbcb08faf3ab9f352be4d049cebc426·...·]-51">]</span><span·class="gp·unselectable">346 </span><span·class="p"·data-group-id="3188212030-51">[</span><span·class="p"·data-group-id="3188212030-52">{</span><span·class="ss">sec_dict</span><span·class="p">,</span><span·class="mi">42</span><span·class="p">,</span><span·class="mi">11</span><span·class="p"·data-group-id="3188212030-52">}[·...·truncated·by·diffoscope;·len:·48,·SHA:·ad69097570083c453a16c9dab2a7b0eec037ab27006d47b100a7e72c698252a5·...·]-51">]</span><span·class="gp·unselectable">
347 (a@sam)14&gt;·</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5854150604-53">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Item</span><span·class="p"·data-group-id="5854150604-53">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·282,·SHA:·1414d2c3efc2cac2bdc3187662e0f3b9d3f7b7cdd35bfa956c0aa8227040c698·...·]-54">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">347 (a@sam)14&gt;·</span><span·class="n">Info</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3188212030-53">(</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Item</span><span·class="p"·data-group-id="3188212030-53">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·282,·SHA:·bd4cb1e9c0624e67f0d640b2e10e0e01ae4167bee7c8723859639c4dcf2c61c2·...·]-54">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
348 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">348 </span><span·class="p">#</span><span·class="n">Fun</span><span·class="o">&lt;</span><span·class="ss">erl_eval</span><span·class="o">&gt;</span><span·class="gp·unselectable">
349 (a@sam)15&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="5854150604-55">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">349 (a@sam)15&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">activity</span><span·class="p"·data-group-id="3188212030-55">(</span><span·class="ss">sync_dirty</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">
350 ···························</span><span·class="p"·data-group-id="5854150604-56">[</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">frag_size</span><span·class="p"·data-group-id="5854150604-56">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·59,·SHA:·352a98a4de15eaacffb4bbcc525e0ab6913cbd32ee05896a042394976db6a449·...·]-55">)</span><span·class="p">.</span><span·class="w">350 ···························</span><span·class="p"·data-group-id="3188212030-56">[</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">frag_size</span><span·class="p"·data-group-id="3188212030-56">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·59,·SHA:·20421ee9163d78de38615da0fd49ccd91acf875682bf35207523925cb5844721·...·]-55">)</span><span·class="p">.</span><span·class="w">
351 </span><span·class="p"·data-group-id="5854150604-57">[</span><span·class="p"·data-group-id="5854150604-58">{</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5854150604-58">}</span><span·class="p">,</span><span·class="w">351 </span><span·class="p"·data-group-id="3188212030-57">[</span><span·class="p"·data-group-id="3188212030-58">{</span><span·class="ss">prim_dict</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3188212030-58">}</span><span·class="p">,</span><span·class="w">
352 ·</span><span·class="p"·data-group-id="5854150604-59">{</span><span·class="ss">prim_dict_frag2</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5854150604-59">}</span><span·class="p">,</span><span·class="w">352 ·</span><span·class="p"·data-group-id="3188212030-59">{</span><span·class="ss">prim_dict_frag2</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3188212030-59">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 62073/149994 bytes (41.38%) of diff not shown.
46.9 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_chap7.html
    
Offset 229, 34 lines modifiedOffset 229, 34 lines modified
229 ··</a>229 ··</a>
230 ··<span·class="text">Startup·Files</span>230 ··<span·class="text">Startup·Files</span>
231 </h3>231 </h3>
232 <p><a·href="mnesia_chap3.html#start_mnesia">Start·Mnesia</a>·states·the·following·prerequisites232 <p><a·href="mnesia_chap3.html#start_mnesia">Start·Mnesia</a>·states·the·following·prerequisites
233 for·starting·<code·class="inline">Mnesia</code>:</p><ul><li>An·Erlang·session·must·be·started·and·a·<code·class="inline">Mnesia</code>·directory·must·be·specified233 for·starting·<code·class="inline">Mnesia</code>:</p><ul><li>An·Erlang·session·must·be·started·and·a·<code·class="inline">Mnesia</code>·directory·must·be·specified
234 for·the·database.</li><li>A·database·schema·must·be·initiated,·using·the·function234 for·the·database.</li><li>A·database·schema·must·be·initiated,·using·the·function
235 <a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema/1</code></a>.</li></ul><p>The·following·example·shows·how·these·tasks·are·performed:</p><p><em>Step·1:</em>·Start·an·Erlang·session·and·specify·a·<code·class="inline">Mnesia</code>·directory·for·the235 <a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema/1</code></a>.</li></ul><p>The·following·example·shows·how·these·tasks·are·performed:</p><p><em>Step·1:</em>·Start·an·Erlang·session·and·specify·a·<code·class="inline">Mnesia</code>·directory·for·the
236 database:</p><pre><code·class="text">%·erl·-sname·klacke·-mnesia·dir·'&quot;/ldisc/scratch/klacke&quot;'</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="0728488142-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="0728488142-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">4.9</span><span·class="w">236 database:</p><pre><code·class="text">%·erl·-sname·klacke·-mnesia·dir·'&quot;/ldisc/scratch/klacke&quot;'</code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="5082591039-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="5082591039-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">4.9</span><span·class="w">
  
237 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="0728488142-2">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="0728488142-2">)</span><span·class="gp·unselectable">237 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V4</span><span·class="p">.</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="5082591039-2">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5082591039-2">)</span><span·class="gp·unselectable">
238 (klacke@gin)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="0728488142-3">(</span><span·class="p"·data-group-id="0728488142-4">[</span><span·class="nf">node</span><span·class="p"·data-group-id="0728488142-5">(</span><span·class="p"·data-group-id="0728488142-5">)</span><span·class="p"·data-group-id="0728488142-4">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·5f7f19c5f58ee162f3443ce30862f4f750d67d6c5f8077c1a138a3a2e111272d·...·]-3">)</span><span·class="p">.</span><span·class="w">238 (klacke@gin)1&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_schema</span><span·class="p"·data-group-id="5082591039-3">(</span><span·class="p"·data-group-id="5082591039-4">[</span><span·class="nf">node</span><span·class="p"·data-group-id="5082591039-5">(</span><span·class="p"·data-group-id="5082591039-5">)</span><span·class="p"·data-group-id="5082591039-4">]<[·...·truncated·by·diffoscope;·len:·47,·SHA:·c52da169b00536c783e027ea20cb08b8bd048a295385f3278aafb93aa067f6cb·...·]-3">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="nf">ok</span><span·class="w">239 </span><span·class="nf">ok</span><span·class="w">
240 </span><span·class="p"·data-group-id="0728488142-6">(</span><span·class="ss">klacke@gin</span><span·class="p"·data-group-id="0728488142-6">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">240 </span><span·class="p"·data-group-id="5082591039-6">(</span><span·class="ss">klacke@gin</span><span·class="p"·data-group-id="5082591039-6">)</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">
241 </span><span·class="err">^</span><span·class="n">Z</span><span·class="w">241 </span><span·class="err">^</span><span·class="n">Z</span><span·class="w">
242 </span><span·class="n">Suspended</span></code></pre><p><em>Step·2:</em>·You·can·inspect·the·<code·class="inline">Mnesia</code>·directory·to·see·what·files·have·been242 </span><span·class="n">Suspended</span></code></pre><p><em>Step·2:</em>·You·can·inspect·the·<code·class="inline">Mnesia</code>·directory·to·see·what·files·have·been
243 created:</p><pre><code·class="text">%·ls·-l·/ldisc/scratch/klacke243 created:</p><pre><code·class="text">%·ls·-l·/ldisc/scratch/klacke
244 -rw-rw-r--···1·klacke···staff·······247·Aug·12·15:06·FALLBACK.BUP</code></pre><p>The·response·shows·that·the·file·<code·class="inline">FALLBACK.BUP</code>·has·been·created.·This·is·called244 -rw-rw-r--···1·klacke···staff·······247·Aug·12·15:06·FALLBACK.BUP</code></pre><p>The·response·shows·that·the·file·<code·class="inline">FALLBACK.BUP</code>·has·been·created.·This·is·called
245 a·backup·file,·and·it·contains·an·initial·schema.·If·more·than·one·node·in·the245 a·backup·file,·and·it·contains·an·initial·schema.·If·more·than·one·node·in·the
246 function·<a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema/1</code></a>·had·been·specified,·identical·backup·files246 function·<a·href="mnesia.html#create_schema/1"><code·class="inline">mnesia:create_schema/1</code></a>·had·been·specified,·identical·backup·files
247 would·have·been·created·on·all·nodes.</p><p><em>Step·3:</em>·Start·<code·class="inline">Mnesia</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0766334235-1">(</span><span·class="ss">klacke@gin</span><span·class="p"·data-group-id="0766334235-1">)</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="[·...·truncated·by·diffoscope;·len:·105,·SHA:·7b79553fa52841e55a947b4d6601cf5200ae416ae44139a3292ea2da5d751fd5·...·]-2">)</span><span·class="p">.</span><span·class="w">247 would·have·been·created·on·all·nodes.</p><p><em>Step·3:</em>·Start·<code·class="inline">Mnesia</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0638460104-1">(</span><span·class="ss">klacke@gin</span><span·class="p"·data-group-id="0638460104-1">)</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">start</span><span·class="[·...·truncated·by·diffoscope;·len:·105,·SHA:·cf94492e1a4625999d63fb9297286cf44984423a408e7848563e7ac23e3dab61·...·]-2">)</span><span·class="p">.</span><span·class="w">
248 </span><span·class="ss">ok</span></code></pre><p><em>Step·4:</em>·You·can·see·the·following·listing·in·the·<code·class="inline">Mnesia</code>·directory:</p><pre><code·class="text">-rw-rw-r--···1·klacke···staff·········86·May·26·19:03·LATEST.LOG248 </span><span·class="ss">ok</span></code></pre><p><em>Step·4:</em>·You·can·see·the·following·listing·in·the·<code·class="inline">Mnesia</code>·directory:</p><pre><code·class="text">-rw-rw-r--···1·klacke···staff·········86·May·26·19:03·LATEST.LOG
249 -rw-rw-r--···1·klacke···staff······34507·May·26·19:03·schema.DAT</code></pre><p>The·schema·in·the·backup·file·<code·class="inline">FALLBACK.BUP</code>·has·been·used·to·generate·the·file249 -rw-rw-r--···1·klacke···staff······34507·May·26·19:03·schema.DAT</code></pre><p>The·schema·in·the·backup·file·<code·class="inline">FALLBACK.BUP</code>·has·been·used·to·generate·the·file
250 <code·class="inline">schema.DAT</code>.·Since·there·are·no·other·disc·resident·tables·than·the·schema,·no250 <code·class="inline">schema.DAT</code>.·Since·there·are·no·other·disc·resident·tables·than·the·schema,·no
251 other·data·files·were·created.·The·file·<code·class="inline">FALLBACK.BUP</code>·was·removed·after·the251 other·data·files·were·created.·The·file·<code·class="inline">FALLBACK.BUP</code>·was·removed·after·the
252 successful·&quot;restoration&quot;.·You·also·see·some·files·that·are·for·internal·use·by252 successful·&quot;restoration&quot;.·You·also·see·some·files·that·are·for·internal·use·by
253 <code·class="inline">Mnesia</code>.</p><p><em>Step·5:</em>·Create·a·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(klacke@gin)4&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="2456235244-1">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="p"·data-group-id="2456235244-2">[</span><span·class="p"·data-group-id="2456235244-3">{</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·393,·SHA:·66dbeffdd344941efc8f98e8601fda0738a82dc14569dc953be6fb4e7a57ddc7·...·]-1">)</span><span·class="p">.</span><span·class="w">253 <code·class="inline">Mnesia</code>.</p><p><em>Step·5:</em>·Create·a·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(klacke@gin)4&gt;·</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4303567532-1">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="p"·data-group-id="4303567532-2">[</span><span·class="p"·data-group-id="4303567532-3">{</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·393,·SHA:·3e34c1f64f6fb0925b11a1a6872a373ea9f1fb60a7b7421efed4b06252002a4c·...·]-1">)</span><span·class="p">.</span><span·class="w">
254 </span><span·class="p"·data-group-id="2456235244-6">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="2456235244-6">}</span></code></pre><p><em>Step·6:</em>·You·can·see·the·following·listing·in·the·<code·class="inline">Mnesia</code>·directory:</p><pre><code·class="text">%·ls·-l·/ldisc/scratch/klacke254 </span><span·class="p"·data-group-id="4303567532-6">{</span><span·class="ss">atomic</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p"·data-group-id="4303567532-6">}</span></code></pre><p><em>Step·6:</em>·You·can·see·the·following·listing·in·the·<code·class="inline">Mnesia</code>·directory:</p><pre><code·class="text">%·ls·-l·/ldisc/scratch/klacke
255 -rw-rw-r--·1·klacke·staff····86·May·26·19:07·LATEST.LOG255 -rw-rw-r--·1·klacke·staff····86·May·26·19:07·LATEST.LOG
256 -rw-rw-r--·1·klacke·staff····94·May·26·19:07·foo.DCD256 -rw-rw-r--·1·klacke·staff····94·May·26·19:07·foo.DCD
257 -rw-rw-r--·1·klacke·staff··6679·May·26·19:07·schema.DAT</code></pre><p>The·file·<code·class="inline">foo.DCD</code>·has·been·created.·This·file·will·eventually·store·all·data257 -rw-rw-r--·1·klacke·staff··6679·May·26·19:07·schema.DAT</code></pre><p>The·file·<code·class="inline">foo.DCD</code>·has·been·created.·This·file·will·eventually·store·all·data
258 that·is·written·into·the·<code·class="inline">foo</code>·table.</p><h3·id="log-file"·class="section-heading">258 that·is·written·into·the·<code·class="inline">foo</code>·table.</p><h3·id="log-file"·class="section-heading">
259 ··<a·href="#log-file"·class="hover-link">259 ··<a·href="#log-file"·class="hover-link">
260 ····<i·class="ri-link-m"·aria-hidden="true"></i>260 ····<i·class="ri-link-m"·aria-hidden="true"></i>
261 ··</a>261 ··</a>
Offset 292, 19 lines modifiedOffset 292, 19 lines modified
292 and·it·is·efficient·to·insert·and·search·for·records·in·these·files·with·a292 and·it·is·efficient·to·insert·and·search·for·records·in·these·files·with·a
293 specific·key.·The·<code·class="inline">.DAT</code>·files·are·used·for·the·schema·and·for293 specific·key.·The·<code·class="inline">.DAT</code>·files·are·used·for·the·schema·and·for
294 <code·class="inline">disc_only_copies</code>·tables.·The·<code·class="inline">Mnesia</code>·data·files·are·currently·implemented·in294 <code·class="inline">disc_only_copies</code>·tables.·The·<code·class="inline">Mnesia</code>·data·files·are·currently·implemented·in
295 the·standard·library·module·<a·href="../../../../lib/stdlib-6.0.1/doc/html/dets.html"><code·class="inline">dets</code></a>·in·<code·class="inline">STDLIB</code>.</p><p>All·operations·that·can·be·performed·on·<code·class="inline">dets</code>·files·can·also·be·performed·on295 the·standard·library·module·<a·href="../../../../lib/stdlib-6.0.1/doc/html/dets.html"><code·class="inline">dets</code></a>·in·<code·class="inline">STDLIB</code>.</p><p>All·operations·that·can·be·performed·on·<code·class="inline">dets</code>·files·can·also·be·performed·on
296 the·<code·class="inline">Mnesia</code>·data·files.·For·example,·<code·class="inline">dets</code>·contains·the·function296 the·<code·class="inline">Mnesia</code>·data·files.·For·example,·<code·class="inline">dets</code>·contains·the·function
297 <a·href="../../../../lib/stdlib-6.0.1/doc/html/dets.html#traverse/2"><code·class="inline">dets:traverse/2</code></a>,·which·can·be·used·to·view·the·contents·of·a·<code·class="inline">Mnesia</code>·<code·class="inline">DAT</code>297 <a·href="../../../../lib/stdlib-6.0.1/doc/html/dets.html#traverse/2"><code·class="inline">dets:traverse/2</code></a>,·which·can·be·used·to·view·the·contents·of·a·<code·class="inline">Mnesia</code>·<code·class="inline">DAT</code>
298 file.·However,·this·can·only·be·done·when·<code·class="inline">Mnesia</code>·is·not·running.·So,·to·view298 file.·However,·this·can·only·be·done·when·<code·class="inline">Mnesia</code>·is·not·running.·So,·to·view
299 the·schema·file,·do·as·follows;</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8462948594-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="8462948594-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·688,·SHA:·c4a0b8a0465b2af115144806c738dedd35dbb8866a39877adb733b8b3e607405·...·]-5">}</span><span·class="p">,</span><span·class="w">299 the·schema·file,·do·as·follows;</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2607523616-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="2607523616-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·688,·SHA:·2f0b59fba8e09cffa44667c2e79c2ab3d7ee882c8503c5baa0d813eb5272497e·...·]-5">}</span><span·class="p">,</span><span·class="w">
300 </span><span·class="p"·data-group-id="8462948594-6">{</span><span·class="ss">keypos</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="8462948594-6">}</span><span·class="p"·data-group-id="8462948594-3">]</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·697287d6b84f375ccf7c781ea74b901582b96c1981d208fee9c71753eec72f95·...·]-2">)</span><span·class="p">,</span><span·class="w">300 </span><span·class="p"·data-group-id="2607523616-6">{</span><span·class="ss">keypos</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="2607523616-6">}</span><span·class="p"·data-group-id="2607523616-3">]</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·f50d50bfc6b08024b2a120afce866c95396f9742938b7dda93dd85798a5c811e·...·]-2">)</span><span·class="p">,</span><span·class="w">
301 </span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8462948594-7">(</span><span·class="n">X</span><span·class="p"·data-group-id="8462948594-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><[·...·truncated·by·diffoscope;·len:·381,·SHA:·7c29140d391feeb8106b2c0c8aa3b110f1fee503af19de7a1e2106bb3dcff85b·...·]-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">301 </span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2607523616-7">(</span><span·class="n">X</span><span·class="p"·data-group-id="2607523616-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><[·...·truncated·by·diffoscope;·len:·381,·SHA:·b9a7f0544cdb796f29cd9f4b1554e5287df0a8496af84d66632f44a2db9f015b·...·]-8">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
302 </span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">traverse</span><span·class="p"·data-group-id="8462948594-10">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="8462948594-10">)</span><span·class="p">,</span><span·class="w">302 </span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">traverse</span><span·class="p"·data-group-id="2607523616-10">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="2607523616-10">)</span><span·class="p">,</span><span·class="w">
303 </span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8462948594-11">(</span><span·class="n">N</span><span·class="p"·data-group-id="8462948594-11">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="warning">Warning</h4><p>The·<code·class="inline">DAT</code>·files·must·always·be·opened·with·option·<code·class="inline">{repair,·false}</code>.·This303 </span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="2607523616-11">(</span><span·class="n">N</span><span·class="p"·data-group-id="2607523616-11">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="warning">Warning</h4><p>The·<code·class="inline">DAT</code>·files·must·always·be·opened·with·option·<code·class="inline">{repair,·false}</code>.·This
304 ensures·that·these·files·are·not·automatically·repaired.·Without·this·option,304 ensures·that·these·files·are·not·automatically·repaired.·Without·this·option,
305 the·database·can·become·inconsistent,·because·<code·class="inline">Mnesia</code>·can·believe·that·the305 the·database·can·become·inconsistent,·because·<code·class="inline">Mnesia</code>·can·believe·that·the
306 files·were·properly·closed.·For·information·about·configuration·parameter306 files·were·properly·closed.·For·information·about·configuration·parameter
307 <code·class="inline">auto_repair</code>,·see·the·Reference·Manual.</p></blockquote><blockquote><h4·class="warning">Warning</h4><p>It·is·recommended·that·the·data·files·are·not·tampered·with·while·<code·class="inline">Mnesia</code>·is307 <code·class="inline">auto_repair</code>,·see·the·Reference·Manual.</p></blockquote><blockquote><h4·class="warning">Warning</h4><p>It·is·recommended·that·the·data·files·are·not·tampered·with·while·<code·class="inline">Mnesia</code>·is
308 running.·While·not·prohibited,·the·behavior·of·<code·class="inline">Mnesia</code>·is·unpredictable.</p></blockquote><p>The·<code·class="inline">disc_copies</code>·tables·are·stored·on·disk·with·<code·class="inline">.DCL</code>·and·<code·class="inline">.DCD</code>·files,·which308 running.·While·not·prohibited,·the·behavior·of·<code·class="inline">Mnesia</code>·is·unpredictable.</p></blockquote><p>The·<code·class="inline">disc_copies</code>·tables·are·stored·on·disk·with·<code·class="inline">.DCL</code>·and·<code·class="inline">.DCD</code>·files,·which
309 are·standard·<code·class="inline">disk_log</code>·files.</p><h2·id="loading-tables-at-startup"·class="section-heading">309 are·standard·<code·class="inline">disk_log</code>·files.</p><h2·id="loading-tables-at-startup"·class="section-heading">
310 ··<a·href="#loading-tables-at-startup"·class="hover-link">310 ··<a·href="#loading-tables-at-startup"·class="hover-link">
Offset 530, 48 lines modifiedOffset 530, 48 lines modified
530 of·what·<code·class="inline">record_name</code>·is·set·to.</li></ul><p>The·backup·data·is·divided·into·two·sections.·The·first·section·contains530 of·what·<code·class="inline">record_name</code>·is·set·to.</li></ul><p>The·backup·data·is·divided·into·two·sections.·The·first·section·contains
531 information·related·to·the·schema.·All·schema-related·items·are·tuples·where·the531 information·related·to·the·schema.·All·schema-related·items·are·tuples·where·the
532 first·field·equals·the·atom·schema.·The·second·section·is·the·record·section.532 first·field·equals·the·atom·schema.·The·second·section·is·the·record·section.
533 Schema·records·cannot·be·mixed·with·other·records·and·all·schema·records·must·be533 Schema·records·cannot·be·mixed·with·other·records·and·all·schema·records·must·be
534 located·first·in·the·backup.</p><p>The·schema·itself·is·a·table·and·is·possibly·included·in·the·backup.·Each·node534 located·first·in·the·backup.</p><p>The·schema·itself·is·a·table·and·is·possibly·included·in·the·backup.·Each·node
535 where·the·schema·table·resides·is·regarded·as·a·<code·class="inline">db_node</code>.</p><p>The·following·example·shows·how535 where·the·schema·table·resides·is·regarded·as·a·<code·class="inline">db_node</code>.</p><p>The·following·example·shows·how
536 <a·href="mnesia.html#traverse_backup/4"><code·class="inline">mnesia:traverse_backup</code></a>·can·be·used·to·rename·a536 <a·href="mnesia.html#traverse_backup/4"><code·class="inline">mnesia:traverse_backup</code></a>·can·be·used·to·rename·a
537 <code·class="inline">db_node</code>·in·a·backup·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">change_node_name</span><span·class="p"·data-group-id="9022617458-1">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">To</span><span·class="p">,</span><span·class="w">·</span><span·class="n[·...·truncated·by·diffoscope;·len:·133,·SHA:·0635fe313346b4ab605a274c333c5b51b88eb5e4a0e261fc3a0af279ed27006e·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">537 <code·class="inline">db_node</code>·in·a·backup·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">change_node_name</span><span·class="p"·data-group-id="9068732045-1">(</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">To</span><span·class="p">,</span><span·class="w">·</span><span·class="n[·...·truncated·by·diffoscope;·len:·133,·SHA:·278f304c1a4cc6b89b8a5ac28b75aafd2aa7522d7e51cca6db1cc11ba6673508·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
538 ····</span><span·class="n">Switch</span><span·class="w">·</span><span·class="o">=</span><span·class="w">538 ····</span><span·class="n">Switch</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
539 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="9022617458-2">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9022617458-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">From</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">To</span><span·class="p">;</span><span·class="w">539 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="9068732045-2">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9068732045-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="n">From</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">To</span><span·class="p">;</span><span·class="w">
540 ···········</span><span·class="p"·data-group-id="9022617458-3">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9022617458-3">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">==</span><span[·...·truncated·by·diffoscope;·len:·464,·SHA:·efe1e0933e2959fe9849fc70af4f23ca07b14f306832cdc58af2f611ae785e7b·...·]-4">)</span><span·class="p">;</span><span·class="w">540 ···········</span><span·class="p"·data-group-id="9068732045-3">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9068732045-3">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">==</span><span[·...·truncated·by·diffoscope;·len:·464,·SHA:·ec7f305e9e86857d06b61069bd680f8fffa123d6c7219f910c9ac926feb0d053·...·]-4">)</span><span·class="p">;</span><span·class="w">
541 ···········</span><span·class="p"·data-group-id="9022617458-6">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9022617458-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">541 ···········</span><span·class="p"·data-group-id="9068732045-6">(</span><span·class="n">Node</span><span·class="p"·data-group-id="9068732045-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">
542 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">542 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
543 ····</span><span·class="n">Convert</span><span·class="w">·</span><span·class="o">=</span><span·class="w">543 ····</span><span·class="n">Convert</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
544 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="9022617458-7">(</span><span·class="p"·data-group-id="9022617458-8">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">db_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Nodes</sp[·...·truncated·by·diffoscope;·len:·171,·SHA:·7f47c06c159ae858ec6c9ee858427d641003aad7f28c3d5c33ba19c2505f865e·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">544 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="9068732045-7">(</span><span·class="p"·data-group-id="9068732045-8">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">db_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Nodes</sp[·...·truncated·by·diffoscope;·len:·171,·SHA:·ff8bf5dc5f1475d869982bdaee24eb26ce9f3cb84b73ba681d14c88d085061c6·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
545 ················</span><span·class="p"·data-group-id="9022617458-9">{</span><span·class="p"·data-group-id="9022617458-10">[</span><span·class="p"·data-group-id="9022617458-11">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">db_nodes</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·522,·SHA:·e3962ca56ac6c853f8e1b725d3196adcba2235d849027a770815b3de14443890·...·]-9">}</span><span·class="p">;</span><span·class="w">545 ················</span><span·class="p"·data-group-id="9068732045-9">{</span><span·class="p"·data-group-id="9068732045-10">[</span><span·class="p"·data-group-id="9068732045-11">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">db_nodes</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·522,·SHA:·29d755e4abacb4c4982aa19f73f5074de8faef0c8ee7bbd5aa9e8a67bfd3bdc4·...·]-9">}</span><span·class="p">;</span><span·class="w">
546 ···········</span><span·class="p"·data-group-id="9022617458-13">(</span><span·class="p"·data-group-id="9022617458-14">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Version<[·...·truncated·by·diffoscope;·len:·175,·SHA:·dfcbec2dccac51ad67bdd1f2fb9e86662f4e6b27f563dae58d995847868f972a·...·]-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">546 ···········</span><span·class="p"·data-group-id="9068732045-13">(</span><span·class="p"·data-group-id="9068732045-14">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Version<[·...·truncated·by·diffoscope;·len:·175,·SHA:·2af9722a80c6026b98ff04c88d27490e672dcd3ef113ceba84a6ac978f2c4086·...·]-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
547 ················</span><span·class="p"·data-group-id="9022617458-15">{</span><span·class="p"·data-group-id="9022617458-16">[</span><span·class="p"·data-group-id="9022617458-17">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·283,·SHA:·509f036e7eafdeb41cc37cce2ad3787ffe893c7e1c28dc490c14a53b7309cf4e·...·]-15">}</span><span·class="p">;</span><span·class="w">547 ················</span><span·class="p"·data-group-id="9068732045-15">{</span><span·class="p"·data-group-id="9068732045-16">[</span><span·class="p"·data-group-id="9068732045-17">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">version</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·283,·SHA:·a19e54cb0090417400da5058cf5a24491202340376a2ad1d976a5e94522ea7cb·...·]-15">}</span><span·class="p">;</span><span·class="w">
548 ···········</span><span·class="p"·data-group-id="9022617458-18">(</span><span·class="p"·data-group-id="9022617458-19">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cookie</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cookie</s[·...·truncated·by·diffoscope;·len:·173,·SHA:·d83bf2b0488a00c268b09b6a4ac05d2b5a063e1a378418021d6a8c76a4f48a7e·...·]-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">548 ···········</span><span·class="p"·data-group-id="9068732045-18">(</span><span·class="p"·data-group-id="9068732045-19">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cookie</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cookie</s[·...·truncated·by·diffoscope;·len:·173,·SHA:·3813509e5d761730f66d569aa85078d4d3f606b471f7b2db4173f59f94a035d7·...·]-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
549 ················</span><span·class="p"·data-group-id="9022617458-20">{</span><span·class="p"·data-group-id="9022617458-21">[</span><span·class="p"·data-group-id="9022617458-22">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cookie</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·281,·SHA:·00d5cb99f1fc8f30a5d11120c5a9ebc31286a8cc8fb8b6072eb51bbc729a03fe·...·]-20">}</span><span·class="p">;</span><span·class="w">549 ················</span><span·class="p"·data-group-id="9068732045-20">{</span><span·class="p"·data-group-id="9068732045-21">[</span><span·class="p"·data-group-id="9068732045-22">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cookie</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·281,·SHA:·250c06c1e51338a58a222a60902d72226fe17a05d3a17015dee822bdd5d38aff·...·]-20">}</span><span·class="p">;</span><span·class="w">
550 ···········</span><span·class="p"·data-group-id="9022617458-23">(</span><span·class="p"·data-group-id="9022617458-24">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CreateList</s[·...·truncated·by·diffoscope;·len:·173,·SHA:·7c4cea2b64dc582c122717d4e774de81b71a3e0bcbe7e15e2d2e2c636df2d0b2·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">550 ···········</span><span·class="p"·data-group-id="9068732045-23">(</span><span·class="p"·data-group-id="9068732045-24">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CreateList</s[·...·truncated·by·diffoscope;·len:·173,·SHA:·d05b0f966aeaf605fa3da465a253d99e72fec5e8cc660bdd5cfe39e9bb6e6f9d·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
551 ················</span><span·class="n">Keys</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9022617458-25">[</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disc_only_copies</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·b2185182ecc634a78489229220f105b611cec4c826ab7129b4a6b6be877952f4·...·]-25">]</span><span·class="p">,</span><span·class="w">551 ················</span><span·class="n">Keys</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9068732045-25">[</span><span·class="ss">ram_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disc_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disc_only_copies</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·b90a2fc1af7460d97c929d01728f06c51a238bc60d926b49d50e9835a4bfdb01·...·]-25">]</span><span·class="p">,</span><span·class="w">
552 ················</span><span·class="n">OptSwitch</span><span·class="w">·</span><span·class="o">=</span><span·class="w">552 ················</span><span·class="n">OptSwitch</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
553 ····················</span><span·class="nf">fun</span><span·class="p"·data-group-id="9022617458-26">(</span><span·class="p"·data-group-id="9022617458-27">{</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="9022617458-27">}</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·14,·SHA:·2c066aa1732503f33e7e8368813190ae65ff9d2905aa178d585abae94034d8b9·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">553 ····················</span><span·class="nf">fun</span><span·class="p"·data-group-id="9068732045-26">(</span><span·class="p"·data-group-id="9068732045-27">{</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="9068732045-27">}</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·14,·SHA:·51d14b10f605f12f23842b5ee51864ee3bc8422d1b786c88fa201ea35d682d56·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
554 ····························</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="9022617458-28">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Keys</span><span·class="p"·data-group-id="9022617458-28">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">554 ····························</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="9068732045-28">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Keys</span><span·class="p"·data-group-id="9068732045-28">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
555 ································</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9022617458-29">{</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="9022617458-30">(</span><span·class="n">Switch</spa[·...·truncated·by·diffoscope;·len:·171,·SHA:·314a4e3c0edbf84fc417903ade9aec7aef668079d8b1827973df71daef076927·...·]-29">}</span><span·class="p">;</span><span·class="w">555 ································</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9068732045-29">{</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="9068732045-30">(</span><span·class="n">Switch</spa[·...·truncated·by·diffoscope;·len:·171,·SHA:·13bd762d577ee6121011c53e726942c04c7d8d3aeeecdd75ca89708b1a2021f0·...·]-29">}</span><span·class="p">;</span><span·class="w">
556 ································</span><span·class="ss">false</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9022617458-31">{</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="9022617458-31">}</span><span·class="w">556 ································</span><span·class="ss">false</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9068732045-31">{</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p"·data-group-id="9068732045-31">}</span><span·class="w">
557 ····························</span><span·class="k">end</span><span·class="w">557 ····························</span><span·class="k">end</span><span·class="w">
558 ····················</span><span·class="k">end</span><span·class="p">,</span><span·class="w">558 ····················</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
559 ················</span><span·class="p"·data-group-id="9022617458-32">{</span><span·class="p"·data-group-id="9022617458-33">[</span><span·class="p"·data-group-id="9022617458-34">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·549,·SHA:·0f74bba2440469fc9f3568ff7dcaaee851be78dfd5cfcf4bd6ed68ae8eada6ea·...·]-32">}</span><span·class="p">;</span><span·class="w">559 ················</span><span·class="p"·data-group-id="9068732045-32">{</span><span·class="p"·data-group-id="9068732045-33">[</span><span·class="p"·data-group-id="9068732045-34">{</span><span·class="ss">schema</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tab</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·549,·SHA:·b0f7978ddd3287f78cc73949a6ccc9115031d842457e79ee1b9340ac94fd283e·...·]-32">}</span><span·class="p">;</span><span·class="w">
560 ···········</span><span·class="p"·data-group-id="9022617458-36">(</span><span·class="n">Other</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="9022617458-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">560 ···········</span><span·class="p"·data-group-id="9068732045-36">(</span><span·class="n">Other</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="9068732045-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
561 ················</span><span·class="p"·data-group-id="9022617458-37">{</span><span·class="p"·data-group-id="9022617458-38">[</span><span·class="n">Other</span><span·class="p"·data-group-id="9022617458-38">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·a72505600ff5bf79d13425057b7f67579e588e080aad6047391fa08903b3359b·...·]-37">}</span><span·class="w">561 ················</span><span·class="p"·data-group-id="9068732045-37">{</span><span·class="p"·data-group-id="9068732045-38">[</span><span·class="n">Other</span><span·class="p"·data-group-id="9068732045-38">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·a5d63e6f9c7272a3f9cd5a6a561249c6eedc72926a715196fc0e1a1808ad9546·...·]-37">}</span><span·class="w">
562 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">562 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
563 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">traverse_backup</span><span·class="p"·data-group-id="9022617458-39">(</span><span·class="n">Source</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Target</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·218,·SHA:·94e407ea0c75bdab7856b89e49d61ed3522be4107f57fdde4eb90ddb4cec1425·...·]-39">)</span><span·class="p">.</span><span·class="w">563 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">traverse_backup</span><span·class="p"·data-group-id="9068732045-39">(</span><span·class="n">Source</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Target</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·218,·SHA:·4abd929f47f91b5f76428ec3e0a0afd48f2dd63cd1a8013e802f07f58460ebc1·...·]-39">)</span><span·class="p">.</span><span·class="w">
  
564 </span><span·class="nf">view</span><span·class="p"·data-group-id="9022617458-40">(</span><span·class="n">Source</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="9022617458-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">564 </span><span·class="nf">view</span><span·class="p"·data-group-id="9068732045-40">(</span><span·class="n">Source</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="9068732045-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
565 ····</span><span·class="n">View</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="9022617458-41">(</span><span·class="n">Item</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="9022617458-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">565 ····</span><span·class="n">View</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="9068732045-41">(</span><span·class="n">Item</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="9068732045-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
566 ···················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9022617458-42">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">.</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9022617458-43">[</span><span·class="n">Item</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·0ea428c1a2904e638c16c0306ff99320c3387ece255f3905dbec6534dfbcf007·...·]-42">)</span><span·class="p">,</span><span·class="w">566 ···················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9068732045-42">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">.</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9068732045-43">[</span><span·class="n">Item</s[·...·truncated·by·diffoscope;·len:·99,·SHA:·5afefa603318ad1428974871579ad0d16cc91ea3e61e47a8546cf4261c334a60·...·]-42">)</span><span·class="p">,</span><span·class="w">
567 ···················</span><span·class="p"·data-group-id="9022617458-44">{</span><span·class="p"·data-group-id="9022617458-45">[</span><span·class="n">Item</span><span·class="p"·data-group-id="9022617458-45">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·112,·SHA:·b31468596e3b02a0a6627026e6e075bbecfffe08bcb18fef652c587da2f0a973·...·]-44">}</span><span·class="w">567 ···················</span><span·class="p"·data-group-id="9068732045-44">{</span><span·class="p"·data-group-id="9068732045-45">[</span><span·class="n">Item</span><span·class="p"·data-group-id="9068732045-45">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·112,·SHA:·1abc1a8919786949a3dfa92c6beab05414405863fd99bc869d3af6b49bb74205·...·]-44">}</span><span·class="w">
568 ···········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">568 ···········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
569 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">traverse_backup</span><span·class="p"·data-group-id="9022617458-46">(</span><span·class="n">Source</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">dummy</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·215,·SHA:·2295cfd014bdb575f14c058042412eae66f1c94f70ce2dcc3915140b01b7a204·...·]-46">)</span><span·class="p">.</span></code></pre><h3·id="restore"·class="section-heading">569 ····</span><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">traverse_backup</span><span·class="p"·data-group-id="9068732045-46">(</span><span·class="n">Source</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">dummy</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·215,·SHA:·9a3f0093e3ee960c667b6f09565415cadf1a35fc567b70e4600e493f570b7e71·...·]-46">)</span><span·class="p">.</span></code></pre><h3·id="restore"·class="section-heading">
570 ··<a·href="#restore"·class="hover-link">570 ··<a·href="#restore"·class="hover-link">
571 ····<i·class="ri-link-m"·aria-hidden="true"></i>571 ····<i·class="ri-link-m"·aria-hidden="true"></i>
572 ··</a>572 ··</a>
573 ··<span·class="text">Restore</span>573 ··<span·class="text">Restore</span>
574 </h3>574 </h3>
575 <p>Tables·can·be·restored·online·from·a·backup·without·restarting·<code·class="inline">Mnesia</code>.·A575 <p>Tables·can·be·restored·online·from·a·backup·without·restarting·<code·class="inline">Mnesia</code>.·A
576 restore·is·performed·with·the·function576 restore·is·performed·with·the·function
3.71 KB
./usr/share/doc/erlang-doc/html/lib/mnesia-4.23.2/doc/html/mnesia_registry.html
    
Offset 254, 16 lines modifiedOffset 254, 16 lines modified
254 ··········<pre·translate="no"><span·class="attribute">-spec</span>·create_table(Tab·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),·Opt·::·[{<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}])·->·ok.</pre>254 ··········<pre·translate="no"><span·class="attribute">-spec</span>·create_table(Tab·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),·Opt·::·[{<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}])·->·ok.</pre>
  
255 ······</div>255 ······</div>
  
256 <blockquote><h4·class="warning">Warning</h4><p><em>This·function·is·deprecated.·Do·not·use·it.</em></p></blockquote><p>A·wrapper·function·for·<a·href="mnesia.html#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>,·which·creates·a·table·(if·there256 <blockquote><h4·class="warning">Warning</h4><p><em>This·function·is·deprecated.·Do·not·use·it.</em></p></blockquote><p>A·wrapper·function·for·<a·href="mnesia.html#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>,·which·creates·a·table·(if·there
257 is·no·existing·table)·with·an·appropriate·set·of·<code·class="inline">attributes</code>.·The·attributes257 is·no·existing·table)·with·an·appropriate·set·of·<code·class="inline">attributes</code>.·The·attributes
258 and·<code·class="inline">TabDef</code>·are·forwarded·to·<a·href="mnesia.html#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>.·For·example,·if·the·table258 and·<code·class="inline">TabDef</code>·are·forwarded·to·<a·href="mnesia.html#create_table/2"><code·class="inline">mnesia:create_table/2</code></a>.·For·example,·if·the·table
259 is·to·reside·as·<code·class="inline">disc_only_copies</code>·on·all·nodes,·a·call·looks·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">TabDef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7099972719-1">[</span><span·class="p"·data-group-id="7099972719-2">{</span><span·class="p"·data-group-id="7099972719-3">{</span><span·class="ss">disc_only_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">node</span><span·class=[·...·truncated·by·diffoscope;·len:·318,·SHA:·f25f3736296f0ed565cb06148db40eaa0dcbbfa3a8706e3cf60f1e72d0742adc·...·]-3">}</span><span·class="p">]</span><span·class="p">,</span><span·class="w">259 is·to·reside·as·<code·class="inline">disc_only_copies</code>·on·all·nodes,·a·call·looks·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">TabDef</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6353470165-1">[</span><span·class="p"·data-group-id="6353470165-2">{</span><span·class="p"·data-group-id="6353470165-3">{</span><span·class="ss">disc_only_copies</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">node</span><span·class=[·...·truncated·by·diffoscope;·len:·318,·SHA:·9f93eb2364601b472ce7979571b56845ccd561f41d119193fdd2160dea7c27dd·...·]-3">}</span><span·class="p">]</span><span·class="p">,</span><span·class="w">
260 ··········</span><span·class="nc">mnesia_registry</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="7099972719-6">(</span><span·class="ss">my_reg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabDef</span><span·class="p"·data-group-id="7099972719-6">)</span></code></pre>260 ··········</span><span·class="nc">mnesia_registry</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="6353470165-6">(</span><span·class="ss">my_reg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TabDef</span><span·class="p"·data-group-id="6353470165-6">)</span></code></pre>
261 ··</section>261 ··</section>
262 </section>262 </section>
  
263 ····</div>263 ····</div>
264 ··</section>264 ··</section>
  
265 ····<footer·class="footer">265 ····<footer·class="footer">
338 KB
./usr/share/doc/erlang-doc/html/lib/observer-2.16/doc/html/observer.epub
3.75 KB
zipinfo {}
Max HTML report size reached
63.5 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
250 KB
OEBPS/ttb_ug.xhtml
Max HTML report size reached
19.6 KB
OEBPS/ttb.xhtml
Max HTML report size reached
1.24 KB
OEBPS/content.opf
1.2 KB
OEBPS/content.opf
Max HTML report size reached
19.7 KB
./usr/share/doc/erlang-doc/html/lib/observer-2.16/doc/html/ttb.html
    
Offset 1904, 21 lines modifiedOffset 1904, 21 lines modified
1904 returns·a·match·specification,·which·turns·on·sequential·tracing·with·the1904 returns·a·match·specification,·which·turns·on·sequential·tracing·with·the
1905 specified·<code·class="inline">Flags</code>.</p><p>This·match·specification·can·be·specified·as·the·last·argument·to·<code·class="inline">tp</code>·or·<code·class="inline">tpl</code>.1905 specified·<code·class="inline">Flags</code>.</p><p>This·match·specification·can·be·specified·as·the·last·argument·to·<code·class="inline">tp</code>·or·<code·class="inline">tpl</code>.
1906 The·activated·<code·class="inline">Item</code>·then·becomes·a·<em>trigger</em>·for·sequential·tracing.·This·means1906 The·activated·<code·class="inline">Item</code>·then·becomes·a·<em>trigger</em>·for·sequential·tracing.·This·means
1907 that·if·the·item·is·called·on·a·process·with·trace·flag·<code·class="inline">call</code>·set,·the·process1907 that·if·the·item·is·called·on·a·process·with·trace·flag·<code·class="inline">call</code>·set,·the·process
1908 is·&quot;contaminated&quot;·with·token·<code·class="inline">seq_trace</code>.</p><p>If·<code·class="inline">Flags·=·all</code>,·all·possible·flags·are·set.</p><p>The·possible·values·for·<code·class="inline">SeqTraceFlag</code>·are·available·in·<a·href="../../../../lib/kernel-10.0.1/doc/html/seq_trace.html"><code·class="inline">seq_trace</code></a>.</p><p>For·a·description·of·the·<code·class="inline">match_spec()</code>·syntax,·see·section1908 is·&quot;contaminated&quot;·with·token·<code·class="inline">seq_trace</code>.</p><p>If·<code·class="inline">Flags·=·all</code>,·all·possible·flags·are·set.</p><p>The·possible·values·for·<code·class="inline">SeqTraceFlag</code>·are·available·in·<a·href="../../../../lib/kernel-10.0.1/doc/html/seq_trace.html"><code·class="inline">seq_trace</code></a>.</p><p>For·a·description·of·the·<code·class="inline">match_spec()</code>·syntax,·see·section
1909 <a·href="../../../../erts-15.0.1/doc/html/match_spec.html"><code·class="inline">Match·Specifications·in·Erlang</code></a>·in·ERTS,·which1909 <a·href="../../../../erts-15.0.1/doc/html/match_spec.html"><code·class="inline">Match·Specifications·in·Erlang</code></a>·in·ERTS,·which
1910 explains·the·general·match·specification·&quot;language&quot;.</p><blockquote><h4·class="info">Note</h4><p>The·<em>system·tracer</em>·for·sequential·tracing·is·automatically·initiated·by·<code·class="inline">ttb</code>1910 explains·the·general·match·specification·&quot;language&quot;.</p><blockquote><h4·class="info">Note</h4><p>The·<em>system·tracer</em>·for·sequential·tracing·is·automatically·initiated·by·<code·class="inline">ttb</code>
1911 when·a·trace·port·is·started·with·<code·class="inline">ttb:tracer/0,1,2</code>.</p></blockquote><p>An·example·of·how·to·use·function·<code·class="inline">seq_trigger_ms/0,1</code>·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(tiger@durin)5&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="9208659412-1">(</span><span·class="p"·data-group-id="9208659412-1">)</span><span·class="p">.</span><span·class="w">1911 when·a·trace·port·is·started·with·<code·class="inline">ttb:tracer/0,1,2</code>.</p></blockquote><p>An·example·of·how·to·use·function·<code·class="inline">seq_trigger_ms/0,1</code>·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(tiger@durin)5&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="5800056817-1">(</span><span·class="p"·data-group-id="5800056817-1">)</span><span·class="p">.</span><span·class="w">
1912 </span><span·class="p"·data-group-id="9208659412-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9208659412-3">[</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="9208659412-3">]</span><span·class="p"·data-group-id="9208659412-2">}</span><span·class="gp·unselectable">1912 </span><span·class="p"·data-group-id="5800056817-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5800056817-3">[</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="5800056817-3">]</span><span·class="p"·data-group-id="5800056817-2">}</span><span·class="gp·unselectable">
1913 (tiger@durin)6&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="9208659412-4">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">call</span><span·class="p"·data-group-id="9208659412-4">)</span><span·class="p">.</span><span·class="w">1913 (tiger@durin)6&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="5800056817-4">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">call</span><span·class="p"·data-group-id="5800056817-4">)</span><span·class="p">.</span><span·class="w">
1914 </span><span·class="p"·data-group-id="9208659412-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9208659412-6">{</span><span·class="p"·data-group-id="9208659412-7">[</span><span·class="ss">all</span><span·class="p"·data-group-id="9208659412-7">]</spa[·...·truncated·by·diffoscope;·len:·254,·SHA:·5b0056d3e0350e142590c6a85ce8adc6b32b6a4d09c878b64cc467ba896e888a·...·]-5">}</span><span·class="gp·unselectable">1914 </span><span·class="p"·data-group-id="5800056817-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5800056817-6">{</span><span·class="p"·data-group-id="5800056817-7">[</span><span·class="ss">all</span><span·class="p"·data-group-id="5800056817-7">]</spa[·...·truncated·by·diffoscope;·len:·254,·SHA:·0f52ee48362a52ee0b9851f80212c31413f48905c881c595f385a925fa93ac07·...·]-5">}</span><span·class="gp·unselectable">
1915 (tiger@durin)7&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="9208659412-9">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">func</span><span·class="p">,</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">seq_trigger_ms</span><span·class="p"·data-group-id="9208659412-[·...·truncated·by·diffoscope;·len:·107,·SHA:·316059d9280dd510d6252c6535e53f7496e55b748bc29b8b9de950f4cfae0760·...·]-9">)</span><span·class="p">.</span><span·class="w">1915 (tiger@durin)7&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="5800056817-9">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">func</span><span·class="p">,</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">seq_trigger_ms</span><span·class="p"·data-group-id="5800056817-[·...·truncated·by·diffoscope;·len:·107,·SHA:·df2deb0f901a72cfa12d5fae33f426c3fea3f1f1c05be24d9e96308f3f83b43a·...·]-9">)</span><span·class="p">.</span><span·class="w">
1916 </span><span·class="p"·data-group-id="9208659412-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9208659412-12">[</span><span·class="p"·data-group-id="9208659412-13">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="mi">1</[·...·truncated·by·diffoscope;·len:·364,·SHA:·8c1e891edb10c121298dec1f744b1d6e364a99eb2acfa3dd8c3056d0270c0829·...·]-11">}</span><span·class="w">1916 </span><span·class="p"·data-group-id="5800056817-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5800056817-12">[</span><span·class="p"·data-group-id="5800056817-13">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="mi">1</[·...·truncated·by·diffoscope;·len:·364,·SHA:·a8d5be7735bf3db068f1c45e1fc351a2310819123b735db504a3c551e6f80ede·...·]-11">}</span><span·class="w">
1917 </span><span·class="p"·data-group-id="9208659412-15">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="9208659412-15">)</span><span·class="mi">8</span><span·class="o">&gt;</span></code></pre><p>Whenever·<code·class="inline">mod:func(...)</code>·is·called·after·this,·token·<code·class="inline">seq_trace</code>·is·set·on·the1917 </span><span·class="p"·data-group-id="5800056817-15">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="5800056817-15">)</span><span·class="mi">8</span><span·class="o">&gt;</span></code></pre><p>Whenever·<code·class="inline">mod:func(...)</code>·is·called·after·this,·token·<code·class="inline">seq_trace</code>·is·set·on·the
1918 executing·process.</p>1918 executing·process.</p>
1919 ··</section>1919 ··</section>
1920 </section>1920 </section>
1921 <section·class="detail"·id="start_trace/4">1921 <section·class="detail"·id="start_trace/4">
  
1922 ··<div·class="detail-header">1922 ··<div·class="detail-header">
1923 ····<a·href="#start_trace/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1923 ····<a·href="#start_trace/4"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1949, 22 lines modifiedOffset 1949, 22 lines modified
1949 ·························TracerOpts·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),1949 ·························TracerOpts·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),
1950 ·························Result·::·{ok,·[{<a·href="#t:item/0">item</a>(),·<a·href="#t:match_desc/0">match_desc</a>()}]}.</pre>1950 ·························Result·::·{ok,·[{<a·href="#t:item/0">item</a>(),·<a·href="#t:match_desc/0">match_desc</a>()}]}.</pre>
  
1951 ······</div>1951 ······</div>
  
1952 <p>start_trace(Nodes,·Patterns,·FlagSpec,·Opts)·-&gt;·Result</p><p>This·function·is·a·shortcut·allowing·to·start·a·trace·with·one·command.·Each1952 <p>start_trace(Nodes,·Patterns,·FlagSpec,·Opts)·-&gt;·Result</p><p>This·function·is·a·shortcut·allowing·to·start·a·trace·with·one·command.·Each
1953 tuple·in·<code·class="inline">Patterns</code>·is·converted·to·a·list,·which·in·turn·is·passed·to1953 tuple·in·<code·class="inline">Patterns</code>·is·converted·to·a·list,·which·in·turn·is·passed·to
1954 <code·class="inline">ttb:tpl/2,3,4</code>.</p><p>The·call:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">start_trace</span><span·class="p"·data-group-id="6963198613-1">(</span><span·class="p"·data-group-id="6963198613-2">[</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherNode</span><span·class="p"·data-group-id="6963198613-2">]</span><span·class="p">,</span><span·class="w">1954 <code·class="inline">ttb:tpl/2,3,4</code>.</p><p>The·call:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">start_trace</span><span·class="p"·data-group-id="6193565919-1">(</span><span·class="p"·data-group-id="6193565919-2">[</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OtherNode</span><span·class="p"·data-group-id="6193565919-2">]</span><span·class="p">,</span><span·class="w">
1955 ··················</span><span·class="p"·data-group-id="6963198613-3">[</span><span·class="p"·data-group-id="6963198613-4">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6[·...·truncated·by·diffoscope;·len:·497,·SHA:·d4263b56ef470c2f48f12ab5ccbad2e56c46152b32cfb8303816c1925f2555d6·...·]-3">]</span><span·class="p">,</span><span·class="w">1955 ··················</span><span·class="p"·data-group-id="6193565919-3">[</span><span·class="p"·data-group-id="6193565919-4">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6[·...·truncated·by·diffoscope;·len:·497,·SHA:·a63b8714d35cb2e3e79fa28b97c8eb0143c944a4a4c224e9802217c65a2cfc94·...·]-3">]</span><span·class="p">,</span><span·class="w">
1956 ··················</span><span·class="p"·data-group-id="6963198613-7">{</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">call</span><span·class="p"·data-group-id="6963198613-7">}</span><span·class="p">,</span><span·class="w">1956 ··················</span><span·class="p"·data-group-id="6193565919-7">{</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">call</span><span·class="p"·data-group-id="6193565919-7">}</span><span·class="p">,</span><span·class="w">
1957 ··················</span><span·class="p"·data-group-id="6963198613-8">[</span><span·class="p"·data-group-id="6963198613-9">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="6963198613-9">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·1094,·SHA:·8f98462a09d806bd92e3c26f04b65920e96b7361f1b6bc99586e1e8a0b59d1cd·...·]-2">]</span><span·class="p">,</span><span·class="w">1957 ··················</span><span·class="p"·data-group-id="6193565919-8">[</span><span·class="p"·data-group-id="6193565919-9">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="6193565919-9">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·1094,·SHA:·b66c825b6c14c1bd6678c222e4aa1d86558aa8e0249bf257a2fc926053951254·...·]-2">]</span><span·class="p">,</span><span·class="w">
1958 ··················</span><span·class="p"·data-group-id="8174862776-3">[</span><span·class="p"·data-group-id="8174862776-4">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="8174862776-4">}</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·588,·SHA:·1019f4ad9a3d71a96f5042ba6d40671ab9a0c196aa60390b6490812cc60008fe·...·]-1">)</span><span·class="p">,</span><span·class="w">1958 ··················</span><span·class="p"·data-group-id="6445498391-3">[</span><span·class="p"·data-group-id="6445498391-4">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">File</span><span·class="p"·data-group-id="6445498391-4">}</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·588,·SHA:·646acf7e42c634452ff1e6735e0133dcb23f70336d2f3e7ea024028e71163667·...·]-1">)</span><span·class="p">,</span><span·class="w">
1959 </span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tpl</span><span·class="p"·data-group-id="8174862776-7">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8174862776-8">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·61dbb5f5f769c42baa72d38380be26cf453f4163d1572f03e50ad6f7a4089710·...·]-7">)</span><span·class="p">,</span><span·class="w">1959 </span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tpl</span><span·class="p"·data-group-id="6445498391-7">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6445498391-8">[</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·63,·SHA:·1cedfa91cb27ae6440b99fcf618f932f554aecdc4fcdb0810e1463c90028a431·...·]-7">)</span><span·class="p">,</span><span·class="w">
1960 </span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tpl</span><span·class="p"·data-group-id="8174862776-9">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·138,·SHA:·011bbaf5d3e42b089af1721dc6a8d0bc7571fef34da57aa79c27f4fdb54c3902·...·]-9">)</span><span·class="p">,</span><span·class="w">1960 </span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tpl</span><span·class="p"·data-group-id="6445498391-9">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·138,·SHA:·56802e6ec4d2c626593ad4c03273f6a6e53370bba24a91845a90330ab2882884·...·]-9">)</span><span·class="p">,</span><span·class="w">
1961 </span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="8174862776-11">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">call</span><span·class="p"·data-group-id="8174862776-11">)</span><span·class="p">.</span></code></pre>1961 </span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="6445498391-11">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">call</span><span·class="p"·data-group-id="6445498391-11">)</span><span·class="p">.</span></code></pre>
1962 ··</section>1962 ··</section>
1963 </section>1963 </section>
1964 <section·class="detail"·id="stop/0">1964 <section·class="detail"·id="stop/0">
  
1965 ··<div·class="detail-header">1965 ··<div·class="detail-header">
1966 ····<a·href="#stop/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1966 ····<a·href="#stop/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1967 ······<i·class="ri-link-m"·aria-hidden="true"></i>1967 ······<i·class="ri-link-m"·aria-hidden="true"></i>
250 KB
./usr/share/doc/erlang-doc/html/lib/observer-2.16/doc/html/ttb_ug.html
    
Offset 168, 130 lines modifiedOffset 168, 130 lines modified
168 graphically·with·application·Event·Tracer·(ET).</p><p>If·option·<code·class="inline">format</code>·is·specified·to·<a·href="ttb.html#stop/1"><code·class="inline">ttb:stop/1</code></a>,·the·formatting·is168 graphically·with·application·Event·Tracer·(ET).</p><p>If·option·<code·class="inline">format</code>·is·specified·to·<a·href="ttb.html#stop/1"><code·class="inline">ttb:stop/1</code></a>,·the·formatting·is
169 automatically·done·when·stopping·<code·class="inline">ttb</code>.</p></li></ul><h3·id="tracing-local-node-from-erlang-shell"·class="section-heading">169 automatically·done·when·stopping·<code·class="inline">ttb</code>.</p></li></ul><h3·id="tracing-local-node-from-erlang-shell"·class="section-heading">
170 ··<a·href="#tracing-local-node-from-erlang-shell"·class="hover-link">170 ··<a·href="#tracing-local-node-from-erlang-shell"·class="hover-link">
171 ····<i·class="ri-link-m"·aria-hidden="true"></i>171 ····<i·class="ri-link-m"·aria-hidden="true"></i>
172 ··</a>172 ··</a>
173 ··<span·class="text">Tracing·Local·Node·from·Erlang·Shell</span>173 ··<span·class="text">Tracing·Local·Node·from·Erlang·Shell</span>
174 </h3>174 </h3>
175 <p>The·following·small·module·is·used·in·the·subsequent·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0306254346-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="0306254346-1">)</span><span·class="p">.</span><span·class="w">175 <p>The·following·small·module·is·used·in·the·subsequent·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6830594356-1">(</span><span·class="ss">m</span><span·class="p"·data-group-id="6830594356-1">)</span><span·class="p">.</span><span·class="w">
176 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0306254346-2">(</span><span·class="p"·data-group-id="0306254346-3">[</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0306254346-3">]</span><span·class="p"·data-group-id="0306254346-2">)</span><span·class="p">.</span><span·class="w">176 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6830594356-2">(</span><span·class="p"·data-group-id="6830594356-3">[</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6830594356-3">]</span><span·class="p"·data-group-id="6830594356-2">)</span><span·class="p">.</span><span·class="w">
177 </span><span·class="nf">f</span><span·class="p"·data-group-id="0306254346-4">(</span><span·class="p"·data-group-id="0306254346-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">f</span><span·class="p"·data-group-id="6830594356-4">(</span><span·class="p"·data-group-id="6830594356-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ···</span><span·class="k">receive</span><span·class="w">178 ···</span><span·class="k">receive</span><span·class="w">
179 ······</span><span·class="n">From</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_pid</span><span·class="p"·data-group-id="0306254346-5">(</span><span·class="n">From</span><span·class="p"·data-group-id="0306254346-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">179 ······</span><span·class="n">From</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_pid</span><span·class="p"·data-group-id="6830594356-5">(</span><span·class="n">From</span><span·class="p"·data-group-id="6830594356-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
180 ·········</span><span·class="n">Now</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">now</span><span·class="p"·data-group-id="0306254346-6">(</span><span·class="p"·data-group-id="0306254346-6">)</span><span·class="p">,</span><span·class="w">180 ·········</span><span·class="n">Now</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">now</span><span·class="p"·data-group-id="6830594356-6">(</span><span·class="p"·data-group-id="6830594356-6">)</span><span·class="p">,</span><span·class="w">
181 ·········</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0306254346-7">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0306254346-8">(</span><span·class="p"·data-group-id="0306254346-8">)</span><span·class="p">,</span><span·class="n">Now</span><span·class="p"·data-group-id="0306254346-7">}</span><span·class="w">181 ·········</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6830594356-7">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6830594356-8">(</span><span·class="p"·data-group-id="6830594356-8">)</span><span·class="p">,</span><span·class="n">Now</span><span·class="p"·data-group-id="6830594356-7">}</span><span·class="w">
182 ···</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·following·example·shows·the·basic·use·of·<code·class="inline">ttb</code>·from·the·Erlang·shell.182 ···</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·following·example·shows·the·basic·use·of·<code·class="inline">ttb</code>·from·the·Erlang·shell.
183 Default·options·are·used·both·for·starting·the·tracer·and·for·formatting·(the183 Default·options·are·used·both·for·starting·the·tracer·and·for·formatting·(the
184 custom·fetch·directory·is·however·provided).·This·gives·a·trace·log·named184 custom·fetch·directory·is·however·provided).·This·gives·a·trace·log·named
185 <code·class="inline">Node-ttb</code>·in·the·newly·created·directory,·where·<code·class="inline">Node</code>·is·the·node·name.·The185 <code·class="inline">Node-ttb</code>·in·the·newly·created·directory,·where·<code·class="inline">Node</code>·is·the·node·name.·The
186 default·handler·prints·the·formatted·trace·messages·in·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(tiger@durin)47&gt;·</span><span·class="c1">%%·First·I·spawn·a·process·running·my·test·function</span><span·class="gp·unselectable">186 default·handler·prints·the·formatted·trace·messages·in·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">(tiger@durin)47&gt;·</span><span·class="c1">%%·First·I·spawn·a·process·running·my·test·function</span><span·class="gp·unselectable">
187 (tiger@durin)47&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3291963935-1">(</span><span·class="ss">m</span><span·class="p">,</span><span·class="ss">f</span><span·class="p">,</span><span·class="p"·data-group-id="3291963935-2">[</span><span·class="p"·data-group-id="3291963935-2">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·9b9d72a305d837152aa4dc248838c2e6fd1e676fcce58c52ac054cb897663c82·...·]-1">)</span><span·class="p">.</span><span·class="w">187 (tiger@durin)47&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="3355545547-1">(</span><span·class="ss">m</span><span·class="p">,</span><span·class="ss">f</span><span·class="p">,</span><span·class="p"·data-group-id="3355545547-2">[</span><span·class="p"·data-group-id="3355545547-2">]</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·481aa4b100cccce53d22a4d65384dd3843a909961cf5435b5332c46de6cd1077·...·]-1">)</span><span·class="p">.</span><span·class="w">
188 </span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">188 </span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
189 </span><span·class="p"·data-group-id="3291963935-3">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-3">)</span><span·class="mi">48</span><span·class="o">&gt;</span><span·class="gp·unselectable">189 </span><span·class="p"·data-group-id="3355545547-3">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-3">)</span><span·class="mi">48</span><span·class="o">&gt;</span><span·class="gp·unselectable">
190 (tiger@durin)48&gt;·</span><span·class="c1">%%·Then·I·start·a·tracer...</span><span·class="gp·unselectable">190 (tiger@durin)48&gt;·</span><span·class="c1">%%·Then·I·start·a·tracer...</span><span·class="gp·unselectable">
191 (tiger@durin)48&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="3291963935-4">(</span><span·class="p"·data-group-id="3291963935-4">)</span><span·class="p">.</span><span·class="w">191 (tiger@durin)48&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="3355545547-4">(</span><span·class="p"·data-group-id="3355545547-4">)</span><span·class="p">.</span><span·class="w">
192 </span><span·class="p"·data-group-id="3291963935-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3291963935-6">[</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-6">]</span><span·class="p"·data-group-id="3291963935-5">}</span><span·class="w"> 
193 </span><span·class="p"·data-group-id="3291963935-7">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-7">)</span><span·class="mi">49</span><span·class="o">&gt;</span><span·class="gp·unselectable">192 </span><span·class="p"·data-group-id="3355545547-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3355545547-6">[</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-6">]</span><span·class="p"·data-group-id="3355545547-5"[·...·truncated·by·diffoscope;·len:·23,·SHA:·e5e03d95796c505955700c486340d85082d573ba8478a572922024ab1da8ed22·...·]">
 193 </span><span·class="p"·data-group-id="3355545547-7">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-7">)</span><span·class="mi">49</span><span·class="o">&gt;</span><span·class="gp·unselectable">
194 (tiger@durin)49&gt;·</span><span·class="c1">%%·and·activate·the·new·process·for·tracing</span><span·class="gp·unselectable">194 (tiger@durin)49&gt;·</span><span·class="c1">%%·and·activate·the·new·process·for·tracing</span><span·class="gp·unselectable">
195 (tiger@durin)49&gt;·</span><span·class="c1">%%·function·calls·and·sent·messages.</span><span·class="gp·unselectable">195 (tiger@durin)49&gt;·</span><span·class="c1">%%·function·calls·and·sent·messages.</span><span·class="gp·unselectable">
196 (tiger@durin)49&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="3291963935-8">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="p"·data-group-id="3291963935-9">[</span><span·class="ss">call</span><span·class="p">,</span><span·class="nb">send</span><span·class="p"·data-group-id="3291963935-9">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·13be74703fdc9158ec0005fcc601d84137c1417c77069b225b17b6e55fad8582·...·]-8">)</span><span·class="p">.</span><span·class="w">196 (tiger@durin)49&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="3355545547-8">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="p"·data-group-id="3355545547-9">[</span><span·class="ss">call</span><span·class="p">,</span><span·class="nb">send</span><span·class="p"·data-group-id="3355545547-9">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·890a735c5c88fbda37a0cf42c05fa765b519a88158faf5a31fe2ae20106be299·...·]-8">)</span><span·class="p">.</span><span·class="w">
197 </span><span·class="p"·data-group-id="3291963935-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3291963935-11">[</span><span·class="p"·data-group-id="3291963935-12">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</s[·...·truncated·by·diffoscope;·len:·584,·SHA:·21511de16db5afabfb6601f76e23fbed65f283e64aa62249fe059d682c6e64f0·...·]-10">}</span><span·class="w">197 </span><span·class="p"·data-group-id="3355545547-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3355545547-11">[</span><span·class="p"·data-group-id="3355545547-12">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</s[·...·truncated·by·diffoscope;·len:·584,·SHA:·bc17fa02ef0f3b74ec8d34598eb71f261193bfff4e6fd819733570687a0612e9·...·]-10">}</span><span·class="w">
198 </span><span·class="p"·data-group-id="3291963935-15">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-15">)</span><span·class="mi">50</span><span·class="o">&gt;</span><span·class="gp·unselectable">198 </span><span·class="p"·data-group-id="3355545547-15">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-15">)</span><span·class="mi">50</span><span·class="o">&gt;</span><span·class="gp·unselectable">
199 (tiger@durin)50&gt;·</span><span·class="c1">%%·Here·I·set·a·trace·pattern·on·erlang:now/0</span><span·class="gp·unselectable">199 (tiger@durin)50&gt;·</span><span·class="c1">%%·Here·I·set·a·trace·pattern·on·erlang:now/0</span><span·class="gp·unselectable">
200 (tiger@durin)50&gt;·</span><span·class="c1">%%·The·trace·pattern·is·a·simple·match·spec</span><span·class="gp·unselectable">200 (tiger@durin)50&gt;·</span><span·class="c1">%%·The·trace·pattern·is·a·simple·match·spec</span><span·class="gp·unselectable">
201 (tiger@durin)50&gt;·</span><span·class="c1">%%·indicating·that·the·return·value·should·be</span><span·class="gp·unselectable">201 (tiger@durin)50&gt;·</span><span·class="c1">%%·indicating·that·the·return·value·should·be</span><span·class="gp·unselectable">
202 (tiger@durin)50&gt;·</span><span·class="c1">%%·traced.·Refer·to·the·reference_manual·for</span><span·class="gp·unselectable">202 (tiger@durin)50&gt;·</span><span·class="c1">%%·traced.·Refer·to·the·reference_manual·for</span><span·class="gp·unselectable">
203 (tiger@durin)50&gt;·</span><span·class="c1">%%·the·full·list·of·match·spec·shortcuts</span><span·class="gp·unselectable">203 (tiger@durin)50&gt;·</span><span·class="c1">%%·the·full·list·of·match·spec·shortcuts</span><span·class="gp·unselectable">
204 (tiger@durin)50&gt;·</span><span·class="c1">%%·available.</span><span·class="gp·unselectable">204 (tiger@durin)50&gt;·</span><span·class="c1">%%·available.</span><span·class="gp·unselectable">
205 (tiger@durin)51&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="3291963935-16">(</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="ss">now</span><span·class="p">,</span><span·class="ss">return</span><span·class="p"·data-group-id="3291963935-16">)</span><span·class="p">.</span><span·class="w">205 (tiger@durin)51&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="3355545547-16">(</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="ss">now</span><span·class="p">,</span><span·class="ss">return</span><span·class="p"·data-group-id="3355545547-16">)</span><span·class="p">.</span><span·class="w">
206 </span><span·class="p"·data-group-id="3291963935-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3291963935-18">[</span><span·class="p"·data-group-id="3291963935-19">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">tige[·...·truncated·by·diffoscope;·len:·422,·SHA:·5bb38201085ab9cef64ac37b8b039e14a67f1d6447073898f0146a81f36fa715·...·]-17">}</span><span·class="w">206 </span><span·class="p"·data-group-id="3355545547-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3355545547-18">[</span><span·class="p"·data-group-id="3355545547-19">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">tige[·...·truncated·by·diffoscope;·len:·422,·SHA:·4fb7074d300ba1ef69e4eca4ecd7b8c4fd499e5200c01bd9e99eecb880c90e5a·...·]-17">}</span><span·class="w">
207 </span><span·class="p"·data-group-id="3291963935-21">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-21">)</span><span·class="mi">52</span><span·class="o">&gt;</span><span·class="gp·unselectable">207 </span><span·class="p"·data-group-id="3355545547-21">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-21">)</span><span·class="mi">52</span><span·class="o">&gt;</span><span·class="gp·unselectable">
208 (tiger@durin)52&gt;·</span><span·class="c1">%%·I·run·my·test·(i.e.·send·a·message·to</span><span·class="gp·unselectable">208 (tiger@durin)52&gt;·</span><span·class="c1">%%·I·run·my·test·(i.e.·send·a·message·to</span><span·class="gp·unselectable">
209 (tiger@durin)52&gt;·</span><span·class="c1">%%·my·new·process)</span><span·class="gp·unselectable">209 (tiger@durin)52&gt;·</span><span·class="c1">%%·my·new·process)</span><span·class="gp·unselectable">
210 (tiger@durin)52&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3291963935-22">(</span><span·class="p"·data-group-id="3291963935-22">)</span><span·class="p">.</span><span·class="w">210 (tiger@durin)52&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="3355545547-22">(</span><span·class="p"·data-group-id="3355545547-22">)</span><span·class="p">.</span><span·class="w">
211 </span><span·class="o">&lt;</span><span·class="mf">0.72</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">211 </span><span·class="o">&lt;</span><span·class="mf">0.72</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
212 </span><span·class="p"·data-group-id="3291963935-23">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-23">)</span><span·class="mi">53</span><span·class="o">&gt;</span><span·class="gp·unselectable">212 </span><span·class="p"·data-group-id="3355545547-23">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-23">)</span><span·class="mi">53</span><span·class="o">&gt;</span><span·class="gp·unselectable">
213 (tiger@durin)53&gt;·</span><span·class="c1">%%·And·then·I·have·to·stop·ttb·in·order·to·flush</span><span·class="gp·unselectable">213 (tiger@durin)53&gt;·</span><span·class="c1">%%·And·then·I·have·to·stop·ttb·in·order·to·flush</span><span·class="gp·unselectable">
214 (tiger@durin)53&gt;·</span><span·class="c1">%%·the·trace·port·buffer</span><span·class="gp·unselectable">214 (tiger@durin)53&gt;·</span><span·class="c1">%%·the·trace·port·buffer</span><span·class="gp·unselectable">
215 (tiger@durin)53&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="3291963935-24">(</span><span·class="p"·data-group-id="3291963935-25">[</span><span·class="ss">return</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3291963935-26">{</span><span·class="ss">fetch_dir</span><span·class="p"[·...·truncated·by·diffoscope;·len:·222,·SHA:·a036489ee8179d186eaf643cd53ee12725ce3446d56ccd8d7604b69ea2de8baf·...·]-24">)</span><span·class="p">.</span><span·class="w">215 (tiger@durin)53&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="3355545547-24">(</span><span·class="p"·data-group-id="3355545547-25">[</span><span·class="ss">return</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3355545547-26">{</span><span·class="ss">fetch_dir</span><span·class="p"[·...·truncated·by·diffoscope;·len:·222,·SHA:·8c281a04b9d396f3583a4b5fb442e7ed528b99cb9806be4abfb2fec018605090·...·]-24">)</span><span·class="p">.</span><span·class="w">
216 </span><span·class="p"·data-group-id="3291963935-27">{</span><span·class="ss">stopped</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;fetch&quot;</span><span·class="p"·data-group-id="3291963935-27">}</span><span·class="w">216 </span><span·class="p"·data-group-id="3355545547-27">{</span><span·class="ss">stopped</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;fetch&quot;</span><span·class="p"·data-group-id="3355545547-27">}</span><span·class="w">
217 </span><span·class="p"·data-group-id="3291963935-28">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3291963935-28">)</span><span·class="mi">54</span><span·class="o">&gt;</span><span·class="gp·unselectable">217 </span><span·class="p"·data-group-id="3355545547-28">(</span><span·class="ss">tiger@durin</span><span·class="p"·data-group-id="3355545547-28">)</span><span·class="mi">54</span><span·class="o">&gt;</span><span·class="gp·unselectable">
218 (tiger@durin)54&gt;·</span><span·class="c1">%%·Finally·I·format·my·trace·log</span><span·class="gp·unselectable">218 (tiger@durin)54&gt;·</span><span·class="c1">%%·Finally·I·format·my·trace·log</span><span·class="gp·unselectable">
219 (tiger@durin)54&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3291963935-29">(</span><span·class="s">&quot;fetch&quot;</span><span·class="p"·data-group-id="3291963935-29">)</span><span·class="p">.</span><span·class="w">219 (tiger@durin)54&gt;·</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3355545547-29">(</span><span·class="s">&quot;fetch&quot;</span><span·class="p"·data-group-id="3355545547-29">)</span><span·class="p">.</span><span·class="w">
220 </span><span·class="p"·data-group-id="3291963935-30">(</span><span·class="p"·data-group-id="3291963935-31">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·626,·SHA:·e483acdd2862e4c56be54933be048dc08787e67ca5c030c541d365019ace5cda·...·]-33">)</span><span·class="w">220 </span><span·class="p"·data-group-id="3355545547-30">(</span><span·class="p"·data-group-id="3355545547-31">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·626,·SHA:·e6b3ab07ddaa3ddb28dd4e2360ea4e03b8434ceb96519ff927e69d5b3cff35be·...·]-33">)</span><span·class="w">
221 </span><span·class="p"·data-group-id="3291963935-34">(</span><span·class="p"·data-group-id="3291963935-35">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·361,·SHA:·f9754e8e8776074a90edb94c39fbb421b9b9902b9ba8bc2620d6f50d34ee55de·...·]-34">)</span><span·class="w">·</span><span·class="ss">returned</span><span·class="w">·</span><span·class="ss">from</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="ss">now</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 </span><span·class="p"·data-group-id="3355545547-34">(</span><span·class="p"·data-group-id="3355545547-35">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·361,·SHA:·084ed43c9ded2b3d60f3ec7f012eae34d71c8586e762e2f172d8e3740c6241c0·...·]-34">)</span><span·class="w">·</span><span·class="ss">returned</span><span·class="w">·</span><span·class="ss">from</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="ss">now</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 </span><span·class="p"·data-group-id="3291963935-37">{</span><span·class="mi">1031</span><span·class="p">,</span><span·class="mi">133451</span><span·class="p">,</span><span·class="mi">667611</span><span·class="p"·data-group-id="3291963935-37">}</span><span·class="w">222 </span><span·class="p"·data-group-id="3355545547-37">{</span><span·class="mi">1031</span><span·class="p">,</span><span·class="mi">133451</span><span·class="p">,</span><span·class="mi">667611</span><span·class="p"·data-group-id="3355545547-37">}</span><span·class="w">
223 </span><span·class="p"·data-group-id="3291963935-38">(</span><span·class="p"·data-group-id="3291963935-39">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·361,·SHA:·b9da248ff5ef6cd95b6d8dd9c07d8b810f7add967470fffc229e28d17cb4a11d·...·]-38">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.72</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">!</span><span·class="w">223 </span><span·class="p"·data-group-id="3355545547-38">(</span><span·class="p"·data-group-id="3355545547-39">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·361,·SHA:·6a458e8eee11d99a847a2cb478d5c681898acfd5e41644a5963d9fb355edf916·...·]-38">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.72</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">!</span><span·class="w">
224 </span><span·class="p"·data-group-id="3291963935-41">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="3291963935-42">{</span><span·class="mi">1031</s[·...·truncated·by·diffoscope;·len:·207,·SHA:·91f9d3706e4697902ac58462ac6ae2bca12c2fdd72b34c958ac01b4273923d5a·...·]-41">}</span><span·class="w">224 </span><span·class="p"·data-group-id="3355545547-41">{</span><span·class="o">&lt;</span><span·class="mf">0.125</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="3355545547-42">{</span><span·class="mi">1031</s[·...·truncated·by·diffoscope;·len:·207,·SHA:·5c386e0f8743e0fd8bd8d423dc8c2dd8086f7e39419ca611316cc4fff15c68b9·...·]-41">}</span><span·class="w">
225 </span><span·class="ss">ok</span></code></pre><h3·id="build-your-own-tool"·class="section-heading">225 </span><span·class="ss">ok</span></code></pre><h3·id="build-your-own-tool"·class="section-heading">
226 ··<a·href="#build-your-own-tool"·class="hover-link">226 ··<a·href="#build-your-own-tool"·class="hover-link">
227 ····<i·class="ri-link-m"·aria-hidden="true"></i>227 ····<i·class="ri-link-m"·aria-hidden="true"></i>
228 ··</a>228 ··</a>
229 ··<span·class="text">Build·Your·Own·Tool</span>229 ··<span·class="text">Build·Your·Own·Tool</span>
230 </h3>230 </h3>
231 <p>The·following·example·shows·a·simple·tool·for·&quot;debug·tracing&quot;,·that·is,·tracing231 <p>The·following·example·shows·a·simple·tool·for·&quot;debug·tracing&quot;,·that·is,·tracing
232 of·function·calls·with·return·values:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0323667696-1">(</span><span·class="ss">mydebug</span><span·class="p"·data-group-id="0323667696-1">)</span><span·class="p">.</span><span·class="w">232 of·function·calls·with·return·values:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0238565397-1">(</span><span·class="ss">mydebug</span><span·class="p"·data-group-id="0238565397-1">)</span><span·class="p">.</span><span·class="w">
233 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0323667696-2">(</span><span·class="p"·data-group-id="0323667696-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">trc</span><span·class="p">/</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·294,·SHA:·a1277de44844ee3bae8a2cfa38c309ef6c995d531b7075c418a6f4accf1227c8·...·]-2">)</span><span·class="p">.</span><span·class="w">233 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0238565397-2">(</span><span·class="p"·data-group-id="0238565397-3">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">trc</span><span·class="p">/</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·294,·SHA:·bd7dd9109a763ffe24e5e6695d49e628a169d66967624c6e7ebb7582ae47f1c7·...·]-2">)</span><span·class="p">.</span><span·class="w">
234 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0323667696-4">(</span><span·class="p"·data-group-id="0323667696-5">[</span><span·class="ss">print</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="0323667696-5">]</span><span·class="p"·data-group-id="0323667696-4">)</span><span·class="p">.</span><span·class="w">234 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0238565397-4">(</span><span·class="p"·data-group-id="0238565397-5">[</span><span·class="ss">print</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="0238565397-5">]</span><span·class="p"·data-group-id="0238565397-4">)</span><span·class="p">.</span><span·class="w">
235 </span><span·class="c1">%%·Include·ms_transform.hrl·so·that·I·can·use·dbg:fun2ms/2·to</span><span·class="w">235 </span><span·class="c1">%%·Include·ms_transform.hrl·so·that·I·can·use·dbg:fun2ms/2·to</span><span·class="w">
236 </span><span·class="c1">%%·generate·match·specifications.</span><span·class="w">236 </span><span·class="c1">%%·generate·match·specifications.</span><span·class="w">
237 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0323667696-6">(</span><span·class="s">&quot;stdlib/include/ms_transform.hrl&quot;</span><span·class="p"·data-group-id="0323667696-6">)</span><span·class="p">.</span><span·class="w">237 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0238565397-6">(</span><span·class="s">&quot;stdlib/include/ms_transform.hrl&quot;</span><span·class="p"·data-group-id="0238565397-6">)</span><span·class="p">.</span><span·class="w">
238 </span><span·class="c1">%%%·-------------Tool·API-------------</span><span·class="w">238 </span><span·class="c1">%%%·-------------Tool·API-------------</span><span·class="w">
239 </span><span·class="c1">%%%·----------------------------------</span><span·class="w">239 </span><span·class="c1">%%%·----------------------------------</span><span·class="w">
240 </span><span·class="c1">%%%·Star·the·&quot;mydebug&quot;·tool</span><span·class="w">240 </span><span·class="c1">%%%·Star·the·&quot;mydebug&quot;·tool</span><span·class="w">
241 </span><span·class="nf">start</span><span·class="p"·data-group-id="0323667696-7">(</span><span·class="p"·data-group-id="0323667696-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">241 </span><span·class="nf">start</span><span·class="p"·data-group-id="0238565397-7">(</span><span·class="p"·data-group-id="0238565397-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
242 ····</span><span·class="c1">%%·The·options·specify·that·the·binary·log·shall·be·named</span><span·class="w">242 ····</span><span·class="c1">%%·The·options·specify·that·the·binary·log·shall·be·named</span><span·class="w">
243 ····</span><span·class="c1">%%·&lt;Node&gt;-debug_log·and·that·the·print/4·function·in·this</span><span·class="w">243 ····</span><span·class="c1">%%·&lt;Node&gt;-debug_log·and·that·the·print/4·function·in·this</span><span·class="w">
244 ····</span><span·class="c1">%%·module·shall·be·used·as·format·handler</span><span·class="w">244 ····</span><span·class="c1">%%·module·shall·be·used·as·format·handler</span><span·class="w">
245 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="0323667696-8">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="p"·data-group-id="0323667696-9">[</span><span·class="p"·data-group-id="0323667696-10">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;deb[·...·truncated·by·diffoscope;·len:·725,·SHA:·783346c6fb7c022d97ca44b2297ffe374799a6d481ae2b2423ec1ea3419b651c·...·]-8">)</span><span·class="p">,</span><span·class="w">245 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="0238565397-8">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="p"·data-group-id="0238565397-9">[</span><span·class="p"·data-group-id="0238565397-10">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="s">&quot;deb[·...·truncated·by·diffoscope;·len:·725,·SHA:·02294e0ee12c9bdaf4f4d6f2c7d55c61c3989f9b610b5e668b2de88a5583fffa·...·]-8">)</span><span·class="p">,</span><span·class="w">
246 ····</span><span·class="c1">%%·All·processes·(existing·and·new)·shall·trace·function·calls</span><span·class="w">246 ····</span><span·class="c1">%%·All·processes·(existing·and·new)·shall·trace·function·calls</span><span·class="w">
247 ····</span><span·class="c1">%%·We·want·trace·messages·to·be·sorted·upon·format,·which·requires</span><span·class="w">247 ····</span><span·class="c1">%%·We·want·trace·messages·to·be·sorted·upon·format,·which·requires</span><span·class="w">
248 ····</span><span·class="c1">%%·timestamp·flag.·The·flag·is·however·enabled·by·default·in·ttb.</span><span·class="w">248 ····</span><span·class="c1">%%·timestamp·flag.·The·flag·is·however·enabled·by·default·in·ttb.</span><span·class="w">
249 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="0323667696-14">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">call</span><span·class="p"·data-group-id="0323667696-14">)</span><span·class="p">.</span><span·class="w">249 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="0238565397-14">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">call</span><span·class="p"·data-group-id="0238565397-14">)</span><span·class="p">.</span><span·class="w">
  
250 </span><span·class="c1">%%%·Set·trace·pattern·on·function(s)</span><span·class="w">250 </span><span·class="c1">%%%·Set·trace·pattern·on·function(s)</span><span·class="w">
251 </span><span·class="nf">trc</span><span·class="p"·data-group-id="0323667696-15">(</span><span·class="n">M</span><span·class="p"·data-group-id="0323667696-15">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_atom</span><span·class="p"·data-group-id="0323667696-16">(</s[·...·truncated·by·diffoscope;·len:·69,·SHA:·1070d1a172fc704f2a9d740f14ed6cd8866f655c064cf1b030eae54cd7612aa4·...·]-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">251 </span><span·class="nf">trc</span><span·class="p"·data-group-id="0238565397-15">(</span><span·class="n">M</span><span·class="p"·data-group-id="0238565397-15">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_atom</span><span·class="p"·data-group-id="0238565397-16">(</s[·...·truncated·by·diffoscope;·len:·69,·SHA:·3258d7890fc3f0a76512cecaeca2c28483ef8a7b70d853563f2cfa3a5ec56c3a·...·]-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
252 ····</span><span·class="nf">trc</span><span·class="p"·data-group-id="0323667696-17">(</span><span·class="p"·data-group-id="0323667696-18">{</span><span·class="n">M</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="0323667[·...·truncated·by·diffoscope;·len:·57,·SHA:·e7b2288ee918310cc1a6cabff198a0f25df20bf85ae9ecb8bc3a3f9f94a08744·...·]-17">)</span><span·class="p">;</span><span·class="w">252 ····</span><span·class="nf">trc</span><span·class="p"·data-group-id="0238565397-17">(</span><span·class="p"·data-group-id="0238565397-18">{</span><span·class="n">M</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="0238565[·...·truncated·by·diffoscope;·len:·57,·SHA:·36dbc8a862bdd26b1cf443ea8f78fc047e913cde08b35665686f878183f9e63c·...·]-17">)</span><span·class="p">;</span><span·class="w">
253 </span><span·class="nf">trc</span><span·class="p"·data-group-id="0323667696-19">(</span><span·class="p"·data-group-id="0323667696-20">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p"·data-group-id="0323667696-20">}</span><span·class="p"·data-group-id="0323667696-19">)</span>[·...·truncated·by·diffoscope;·len:·436,·SHA:·41b8876fa5c0b9989939c796bdc8cb0cb378baaf9678afa558aa5c46dd7a0def·...·]-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">253 </span><span·class="nf">trc</span><span·class="p"·data-group-id="0238565397-19">(</span><span·class="p"·data-group-id="0238565397-20">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p"·data-group-id="0238565397-20">}</span><span·class="p"·data-group-id="0238565397-19">)</span>[·...·truncated·by·diffoscope;·len:·436,·SHA:·c32213241e8cbf837ad50402252e1939ed2d6d1e69319bff1b168f8ead5dbe77·...·]-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
254 ····</span><span·class="nf">trc</span><span·class="p"·data-group-id="0323667696-23">(</span><span·class="p"·data-group-id="0323667696-24">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="0323667696-24">}</[·...·truncated·by·diffoscope;·len:·46,·SHA:·4140e19e3c24ea97a491514487071d6e99999586f51cf02b4c966150da3478ce·...·]-23">)</span><span·class="p">;</span><span·class="w">254 ····</span><span·class="nf">trc</span><span·class="p"·data-group-id="0238565397-23">(</span><span·class="p"·data-group-id="0238565397-24">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="ss">&#39;_&#39;</span><span·class="p"·data-group-id="0238565397-24">}</[·...·truncated·by·diffoscope;·len:·46,·SHA:·ef4478f86ddac70378ea5603b914191afda33525911c1881bc1857fa171dd409·...·]-23">)</span><span·class="p">;</span><span·class="w">
255 </span><span·class="nf">trc</span><span·class="p"·data-group-id="0323667696-25">(</span><span·class="p"·data-group-id="0323667696-26">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="p">_</span><span·class="n">A</span><span·class="p"·data-group-id="03236[·...·truncated·by·diffoscope;·len:·558,·SHA:·899f921558837dd356d93ecb226993eabb9c5c8ad33478f638248984ecab83c9·...·]-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">255 </span><span·class="nf">trc</span><span·class="p"·data-group-id="0238565397-25">(</span><span·class="p"·data-group-id="0238565397-26">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,</span><span·class="p">_</span><span·class="n">A</span><span·class="p"·data-group-id="02385[·...·truncated·by·diffoscope;·len:·558,·SHA:·cd70b549edbfbf72747ae5db43412fea9461d17e66ff3097714a8898bec61aa5·...·]-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
256 ····</span><span·class="c1">%%·This·match·spec·shortcut·specifies·that·return·values·shall</span><span·class="w">256 ····</span><span·class="c1">%%·This·match·spec·shortcut·specifies·that·return·values·shall</span><span·class="w">
257 ····</span><span·class="c1">%%·be·traced.</span><span·class="w">257 ····</span><span·class="c1">%%·be·traced.</span><span·class="w">
258 ····</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0323667696-29">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0323667696-30">(</span><span·class="p">_</span><span·class="p"·data-group-id="0323667696-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·236,·SHA:·efe7bebbf96e04b230982a3234a0db39608984788e81979e9dd6c7c1bcc32ef0·...·]-29">)</span><span·class="p">,</span><span·class="w">258 ····</span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0238565397-29">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0238565397-30">(</span><span·class="p">_</span><span·class="p"·data-group-id="0238565397-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·236,·SHA:·4019fe2fe2e4258973403ecdcc25acdd0f6d267cfd93609afc920130ee9b8878·...·]-29">)</span><span·class="p">,</span><span·class="w">
259 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tpl</span><span·class="p"·data-group-id="0323667696-32">(</span><span·class="n">MFA</span><span·class="p">,</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="0323667696-32">)</span><span·class="p">.</span><span·class="w">259 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">tpl</span><span·class="p"·data-group-id="0238565397-32">(</span><span·class="n">MFA</span><span·class="p">,</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="0238565397-32">)</span><span·class="p">.</span><span·class="w">
  
260 </span><span·class="c1">%%%·Format·a·binary·trace·log</span><span·class="w">260 </span><span·class="c1">%%%·Format·a·binary·trace·log</span><span·class="w">
261 </span><span·class="nf">format</span><span·class="p"·data-group-id="0323667696-33">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="0323667696-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">261 </span><span·class="nf">format</span><span·class="p"·data-group-id="0238565397-33">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="0238565397-33">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
262 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0323667696-34">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="0323667696-34">)</span><span·class="p">.</span><span·class="w">262 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0238565397-34">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="0238565397-34">)</span><span·class="p">.</span><span·class="w">
  
263 </span><span·class="c1">%%%·Stop·the·&quot;mydebug&quot;·tool</span><span·class="w">263 </span><span·class="c1">%%%·Stop·the·&quot;mydebug&quot;·tool</span><span·class="w">
264 </span><span·class="nf">stop</span><span·class="p"·data-group-id="0323667696-35">(</span><span·class="p"·data-group-id="0323667696-35">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">264 </span><span·class="nf">stop</span><span·class="p"·data-group-id="0238565397-35">(</span><span·class="p"·data-group-id="0238565397-35">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
265 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0323667696-36">(</span><span·class="ss">return</span><span·class="p"·data-group-id="0323667696-36">)</span><span·class="p">.</span><span·class="w">265 ····</span><span·class="nc">ttb</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0238565397-36">(</span><span·class="ss">return</span><span·class="p"·data-group-id="0238565397-36">)</span><span·class="p">.</span><span·class="w">
  
266 </span><span·class="c1">%%%·--------Internal·functions--------</span><span·class="w">266 </span><span·class="c1">%%%·--------Internal·functions--------</span><span·class="w">
267 </span><span·class="c1">%%%·----------------------------------</span><span·class="w">267 </span><span·class="c1">%%%·----------------------------------</span><span·class="w">
268 </span><span·class="c1">%%%·Format·handler</span><span·class="w">268 </span><span·class="c1">%%%·Format·handler</span><span·class="w">
269 </span><span·class="nf">print</span><span·class="p"·data-group-id="0323667696-37">(</span><span·class="p">_</span><span·class="n">Out</span><span·class="p">,</span><span·class="ss">end_of_trace</span><span·class="p">,</span><span·class="p">_</span><span·class="n">TI</span><span·class="p">,</span><span·class="n">N</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·cada64cd01b15a25e8bc7e02abb0cc05beaa8002d896c6d0a46c2a44c7c2dccb·...·]-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">269 </span><span·class="nf">print</span><span·class="p"·data-group-id="0238565397-37">(</span><span·class="p">_</span><span·class="n">Out</span><span·class="p">,</span><span·class="ss">end_of_trace</span><span·class="p">,</span><span·class="p">_</span><span·class="n">TI</span><span·class="p">,</span><span·class="n">N</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·da35650e117565c8b319f1bc6fa66d8bc7fe68c9e6a74184640997494c310a77·...·]-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
270 ····</span><span·class="n">N</span><span·class="p">;</span><span·class="w">270 ····</span><span·class="n">N</span><span·class="p">;</span><span·class="w">
271 </span><span·class="nf">print</span><span·class="p"·data-group-id="0323667696-38">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="n">Trace</span><span·class="p">,</span><span·class="p">_</span><span·class="n">TI</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0323[·...·truncated·by·diffoscope;·len:·6,·SHA:·f8224f67e3401e93f323e9d218696423256ed16d7285fe41e253458881a87e4e·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">271 </span><span·class="nf">print</span><span·class="p"·data-group-id="0238565397-38">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="n">Trace</span><span·class="p">,</span><span·class="p">_</span><span·class="n">TI</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0238[·...·truncated·by·diffoscope;·len:·6,·SHA:·0521d951f614c46bdcb5a597a232e8e6fce051194ccc1091928627d6c18fb76b·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
272 ····</span><span·class="nf">do_print</span><span·class="p"·data-group-id="0323667696-39">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="n">Trace</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0323667696-39">)</span><span·class="p">,</span><span·class="w">272 ····</span><span·class="nf">do_print</span><span·class="p"·data-group-id="0238565397-39">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="n">Trace</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0238565397-39">)</span><span·class="p">,</span><span·class="w">
273 ····</span><span·class="n">N</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">273 ····</span><span·class="n">N</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">.</span><span·class="w">
  
274 </span><span·class="nf">do_print</span><span·class="p"·data-group-id="0323667696-40">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="p"·data-group-id="0323667696-41">{</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="ss">call</spa[·...·truncated·by·diffoscope;·len:·446,·SHA:·39e9cb30eefb8ec8289932229808daddba3c2633bf977dc7418c26ccb686ede8·...·]-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">274 </span><span·class="nf">do_print</span><span·class="p"·data-group-id="0238565397-40">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="p"·data-group-id="0238565397-41">{</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="ss">call</spa[·...·truncated·by·diffoscope;·len:·446,·SHA:·a4ef52ff0eee235c9ac3de6280b62ac84d4b4955094fa6dc91df3b8dcba4e1cb·...·]-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
275 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0323667696-43">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="w">275 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0238565397-43">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="w">
276 ··············</span><span·class="s">&quot;</span><span·class="si">~w</span><span·class="s">:·</span><span·class="si">~w</span><span·class="s">,·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">276 ··············</span><span·class="s">&quot;</span><span·class="si">~w</span><span·class="s">:·</span><span·class="si">~w</span><span·class="s">,·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">
277 ··············</span><span·class="s">&quot;Call······:·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~w</span><span·class="s">/</span><span·class="si">~w</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">277 ··············</span><span·class="s">&quot;Call······:·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~w</span><span·class="s">/</span><span·class="si">~w</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">
278 ··············</span><span·class="s">&quot;Arguments·:</span><span·class="si">~p</span><span·class="si">~n</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">278 ··············</span><span·class="s">&quot;Arguments·:</span><span·class="si">~p</span><span·class="si">~n</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
279 ··············</span><span·class="p"·data-group-id="0323667696-44">[</span><span·class="n">N</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·312,·SHA:·283ab5d43f8cff786ef977b2838273f122abfe56b47d2baa52552a067ae3ecaa·...·]-43">)</span><span·class="p">;</span><span·class="w">279 ··············</span><span·class="p"·data-group-id="0238565397-44">[</span><span·class="n">N</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·312,·SHA:·06af292e51c17d0284eaaf1e2c8a43f6c487e20447f2327048b35098cb5de67d·...·]-43">)</span><span·class="p">;</span><span·class="w">
280 </span><span·class="nf">do_print</span><span·class="p"·data-group-id="0323667696-46">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="p"·data-group-id="0323667696-47">{</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="ss">return_fr[·...·truncated·by·diffoscope;·len:·501,·SHA:·a8d36598ff537e06ca019f200902f6faf0030f0164eba4ae327bf0dc97210e5b·...·]-46">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">280 </span><span·class="nf">do_print</span><span·class="p"·data-group-id="0238565397-46">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="p"·data-group-id="0238565397-47">{</span><span·class="ss">trace_ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="ss">return_fr[·...·truncated·by·diffoscope;·len:·501,·SHA:·bc8be4c3b3e11d92e5588aafec370f50b9d2780f1145d39e1b1d6ee4e7773949·...·]-46">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
281 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0323667696-49">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="w">281 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0238565397-49">(</span><span·class="n">Out</span><span·class="p">,</span><span·class="w">
282 ··············</span><span·class="s">&quot;</span><span·class="si">~w</span><span·class="s">:·</span><span·class="si">~w</span><span·class="s">,·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">282 ··············</span><span·class="s">&quot;</span><span·class="si">~w</span><span·class="s">:·</span><span·class="si">~w</span><span·class="s">,·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">
283 ··············</span><span·class="s">&quot;Return·from··:·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~w</span><span·class="s">/</span><span·class="si">~w</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">283 ··············</span><span·class="s">&quot;Return·from··:·</span><span·class="si">~w</span><span·class="s">:</span><span·class="si">~w</span><span·class="s">/</span><span·class="si">~w</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="w">
284 ··············</span><span·class="s">&quot;Return·value·:</span><span·class="si">~p</span><span·class="si">~n</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">284 ··············</span><span·class="s">&quot;Return·value·:</span><span·class="si">~p</span><span·class="si">~n</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">
285 ··············</span><span·class="p"·data-group-id="0323667696-50">[</span><span·class="n">N</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·174,·SHA:·22e02d48f2ee7a0016efe03a5ec49da872f255d77aad0a470fe8c1d34ea9f763·...·]-49">)</span><span·class="p">.</span></code></pre><p>To·distinguish·trace·logs·produced·with·this·tool·from·other·logs,·option·<code·class="inline">file</code>285 ··············</span><span·class="p"·data-group-id="0238565397-50">[</span><span·class="n">N</span><span·class="p">,</span><span·class="n">Ts</span><span·class="p">,</span><span·class="n">P</span><span·class="p">,</span><span·class="n">M</span><span·class="p">,</span><span·class="n">F</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·174,·SHA:·13e32b0c3802b4cba7e5bfb062abc5f819822162e8c9ba25b6887b0c6d6d5c00·...·]-49">)</span><span·class="p">.</span></code></pre><p>To·distinguish·trace·logs·produced·with·this·tool·from·other·logs,·option·<code·class="inline">file</code>
286 is·used·in·<a·href="ttb.html#tracer/2"><code·class="inline">tracer/2</code></a>.·The·logs·are·therefore·fetched·to·a286 is·used·in·<a·href="ttb.html#tracer/2"><code·class="inline">tracer/2</code></a>.·The·logs·are·therefore·fetched·to·a
287 directory·named·<code·class="inline">ttb_upload_debug_log-YYYYMMDD-HHMMSS</code></p><p>By·using·option·<code·class="inline">handler</code>·when·starting·the·tracer,·the·information·about·how·to287 directory·named·<code·class="inline">ttb_upload_debug_log-YYYYMMDD-HHMMSS</code></p><p>By·using·option·<code·class="inline">handler</code>·when·starting·the·tracer,·the·information·about·how·to
288 format·the·file·is·stored·in·the·trace·information·file·(<code·class="inline">.ti</code>).·This·is·not288 format·the·file·is·stored·in·the·trace·information·file·(<code·class="inline">.ti</code>).·This·is·not
Max diff block lines reached; 196697/255511 bytes (76.98%) of diff not shown.
82.4 KB
./usr/share/doc/erlang-doc/html/lib/odbc-2.14.3/doc/html/getting_started.html
    
Offset 153, 85 lines modifiedOffset 153, 85 lines modified
153 ··<span·class="text">Using·the·Erlang·API</span>153 ··<span·class="text">Using·the·Erlang·API</span>
154 </h2>154 </h2>
155 <p>The·following·dialog·within·the·Erlang·shell·illustrates·the·functionality·of155 <p>The·following·dialog·within·the·Erlang·shell·illustrates·the·functionality·of
156 the·Erlang·ODBC·interface.·The·table·used·in·the·example·does·not·have·any156 the·Erlang·ODBC·interface.·The·table·used·in·the·example·does·not·have·any
157 relevance·to·anything·that·exist·in·reality,·it·is·just·a·simple·example.·The157 relevance·to·anything·that·exist·in·reality,·it·is·just·a·simple·example.·The
158 example·was·created·using·<code·class="inline">sqlserver·7.0·with·servicepack·1</code>·as·database·and·the158 example·was·created·using·<code·class="inline">sqlserver·7.0·with·servicepack·1</code>·as·database·and·the
159 ODBC·driver·for·<code·class="inline">sqlserver</code>·with·version·<code·class="inline">2000.80.194.00</code>.</p><pre><code·class="text">·1·&gt;·odbc:start().159 ODBC·driver·for·<code·class="inline">sqlserver</code>·with·version·<code·class="inline">2000.80.194.00</code>.</p><pre><code·class="text">·1·&gt;·odbc:start().
160 ······ok</code></pre><p>Connect·to·the·database</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5744391031-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ref</span><span·class="p"·data-group-id="5744391031-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·394,·SHA:·e4d50b35c86b8dc5b460be41888ac3a8d870f61835d0a51d04bd78240f9773cc·...·]-2">)</span><span·class="p">.</span><span·class="w">160 ······ok</code></pre><p>Connect·to·the·database</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6780573817-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ref</span><span·class="p"·data-group-id="6780573817-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·394,·SHA:·d715ab16c6617f0dd3a1794b01b3b6d8d8e163c29295705a911433b98f2c09cc·...·]-2">)</span><span·class="p">.</span><span·class="w">
161 ······</span><span·class="p"·data-group-id="5744391031-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.342</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5744391031-4">}</span></code></pre><p>Create·a·table</p><pre><code·class="text">·3·&gt;·odbc:sql_query(Ref,·&quot;CREATE·TABLE·EMPLOYEE·(NR·integer,161 ······</span><span·class="p"·data-group-id="6780573817-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.342</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6780573817-4">}</span></code></pre><p>Create·a·table</p><pre><code·class="text">·3·&gt;·odbc:sql_query(Ref,·&quot;CREATE·TABLE·EMPLOYEE·(NR·integer,
162 ······FIRSTNAME··char·varying(20),·LASTNAME··char·varying(20),·GENDER·char(1),162 ······FIRSTNAME··char·varying(20),·LASTNAME··char·varying(20),·GENDER·char(1),
163 ······PRIMARY·KEY(NR))&quot;).163 ······PRIMARY·KEY(NR))&quot;).
164 ······{updated,undefined}</code></pre><p>Insert·some·data</p><pre><code·class="text">·4·&gt;·odbc:sql_query(Ref,·&quot;INSERT·INTO·EMPLOYEE·VALUES(1,·'Jane',·'Doe',·'F')&quot;).164 ······{updated,undefined}</code></pre><p>Insert·some·data</p><pre><code·class="text">·4·&gt;·odbc:sql_query(Ref,·&quot;INSERT·INTO·EMPLOYEE·VALUES(1,·'Jane',·'Doe',·'F')&quot;).
165 ······{updated,1}</code></pre><p>Check·what·data·types·the·database·assigned·for·the·columns.·Hopefully·this·is165 ······{updated,1}</code></pre><p>Check·what·data·types·the·database·assigned·for·the·columns.·Hopefully·this·is
166 not·a·surprise,·some·times·it·can·be!·These·are·the·data·types·that·you·should166 not·a·surprise,·some·times·it·can·be!·These·are·the·data·types·that·you·should
167 use·if·you·want·to·do·a·parameterized·query.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">describe_table</span><span·class="p"·data-group-id="8569159629-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;EMPLOYEE&quot;</span><span·class="p"·data-group-id="8569159629-1">)</span><span·class="p">.</span><span·class="w">167 use·if·you·want·to·do·a·parameterized·query.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">describe_table</span><span·class="p"·data-group-id="2060533911-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;EMPLOYEE&quot;</span><span·class="p"·data-group-id="2060533911-1">)</span><span·class="p">.</span><span·class="w">
168 ······</span><span·class="p"·data-group-id="8569159629-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8569159629-3">[</span><span·class="p"·data-group-id="8569159629-4">{</span><span·class="s">&quot;NR&quot;</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·107,·SHA:·3586c1fc3ed91d95a369302f4f22033f8ad0e68557ffdc8980f22098fc3efcf8·...·]-4">}</span><span·class="p">,</span><span·class="w">168 ······</span><span·class="p"·data-group-id="2060533911-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2060533911-3">[</span><span·class="p"·data-group-id="2060533911-4">{</span><span·class="s">&quot;NR&quot;</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·107,·SHA:·5dbed4bdfebf46ddb85d1e4895ae58bb47d3e25785df0772db4a4ec5da163bf4·...·]-4">}</span><span·class="p">,</span><span·class="w">
169 ············</span><span·class="p"·data-group-id="8569159629-5">{</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8569159629-6">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="8569159629-6">}</span><span·class="p"·data-group-id="8569159629-5">}</span><span·class="p">,</span><span·class="w"> 
170 ············</span><span·class="p"·data-group-id="8569159629-7">{</span><span·class="s">&quot;LASTNAME&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8569159629-8">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·118,·SHA:·58e8caccfceab4ced52fd399685f1b8bfccd846cc86fa4500f24fc411406e19b·...·]</span><span·class="w">169 ············</span><span·class="p"·data-group-id="2060533911-5">{</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2060533911-6">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·143,·SHA:·05e7ffa78c4fe00eb4b20befaa5d03c15063afbfb2f670a8fa19c9257a84a06a·...·]</span><span·class="w">
171 ············</span><span·class="p"·data-group-id="8569159629-9">{</span><span·class="s">&quot;GENDER&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8569159629-10">{</span><span·class="ss">sql_char</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·763,·SHA:·6d2744dba8e8265681fd0760b71923496f62e2e3bb357a4cb6b543982b5a8d9f·...·]</span><span·class="w">170 ············</span><span·class="p"·data-group-id="2060533911-7">{</span><span·class="s">&quot;LASTNAME&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2060533911-8">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·118,·SHA:·a9ec12020562c5e753dd4ba5e19cbc5f58de6a5ee04f02f55dde936c2bbb6d4e·...·]</span><span·class="w">
 171 ············</span><span·class="p"·data-group-id="2060533911-9">{</span><span·class="s">&quot;GENDER&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2060533911-10">{</span><span·class="ss">sql_char</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="2060533911-10">}</span><span·class="p"·data-group-id="2060533911-9">}</span><span·class="p"·data-group-id="2060533911-3">]</span><span·class="p"·data-group-id="2060533911-2">}</span></code></pre><p><a·href=""·id="param_query"></a>·Use·a·parameterized·query·to·insert·many·rows·in·one·go.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">6</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">param_query</span><span·class="p"·data-group-id="4486031615-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="s">&quot;INSERT·INTO·EMPLOYEE·(NR,·FIRSTNAME,·&quot;</span><span·class="w">
172 ··················</span><span·class="s">&quot;LASTNAME,·GENDER)·VALUES(?,·?,·?,·?)&quot;</span><span·class="p">,</span><span·class="w">172 ··················</span><span·class="s">&quot;LASTNAME,·GENDER)·VALUES(?,·?,·?,·?)&quot;</span><span·class="p">,</span><span·class="w">
173 ···················</span><span·class="p"·data-group-id="9716578622-2">[</span><span·class="p"·data-group-id="9716578622-3">{</span><span·class="ss">sql_integer</span><span·class="p">,</span><span·class="p"·data-group-id="9716578622-4">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</[·...·truncated·by·diffoscope;·len:·344,·SHA:·a231a78ae01bfb51c5eb592aa811d5f218004708f0706aac09f32e05b060f610·...·]-3">}</span><span·class="p">,</span><span·class="w">173 ···················</span><span·class="p"·data-group-id="4486031615-2">[</span><span·class="p"·data-group-id="4486031615-3">{</span><span·class="ss">sql_integer</span><span·class="p">,</span><span·class="p"·data-group-id="4486031615-4">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</[·...·truncated·by·diffoscope;·len:·344,·SHA:·df98c345e2e2cc7cefe44e6c0d155917c6ea5d0f9c7951685c994dba01b82882·...·]-3">}</span><span·class="p">,</span><span·class="w">
174 ····················</span><span·class="p"·data-group-id="9716578622-5">{</span><span·class="p"·data-group-id="9716578622-6">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="9716578622-6">}</span><span·class="p">,</span><span·class="w">174 ····················</span><span·class="p"·data-group-id="4486031615-5">{</span><span·class="p"·data-group-id="4486031615-6">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="4486031615-6">}</span><span·class="p">,</span><span·class="w">
175 ·····························</span><span·class="p"·data-group-id="9716578622-7">[</span><span·class="s">&quot;John&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Ross&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="w">175 ·····························</span><span·class="p"·data-group-id="4486031615-7">[</span><span·class="s">&quot;John&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Ross&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="w">
176 ·····························</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Louise&quot;</span><span·class="p"·data-group-id="9716578622-7">]</span><span·class="p"·data-group-id="9716578622-5">}</span><span·class="p">,</span><span·class="w">176 ·····························</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Louise&quot;</span><span·class="p"·data-group-id="4486031615-7">]</span><span·class="p"·data-group-id="4486031615-5">}</span><span·class="p">,</span><span·class="w">
177 ···················</span><span·class="p"·data-group-id="9716578622-8">{</span><span·class="p"·data-group-id="9716578622-9">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="9716578622-9">}</span><span·class="p">,</span><span·class="w">177 ···················</span><span·class="p"·data-group-id="4486031615-8">{</span><span·class="p"·data-group-id="4486031615-9">{</span><span·class="ss">sql_varchar</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">20</span><span·class="p"·data-group-id="4486031615-9">}</span><span·class="p">,</span><span·class="w">
178 ·····························</span><span·class="p"·data-group-id="9716578622-10">[</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Green&quot;</span><span·class="p">,</span><span·class="w">178 ·····························</span><span·class="p"·data-group-id="4486031615-10">[</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Green&quot;</span><span·class="p">,</span><span·class="w">
179 ······························</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Lane&quot;</span><span·class="p"·data-group-id="9716578622-10">]</span><span·class="p"·data-group-id="9716578622-8">}</span><span·class="p">,</span><span·class="w">179 ······························</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Lane&quot;</span><span·class="p"·data-group-id="4486031615-10">]</span><span·class="p"·data-group-id="4486031615-8">}</span><span·class="p">,</span><span·class="w">
180 ···················</span><span·class="p"·data-group-id="9716578622-11">{</span><span·class="p"·data-group-id="9716578622-12">{</span><span·class="ss">sql_char</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9716578622-12">}</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·680,·SHA:·4477afbabc84c1ac4175e50fd78d1076800d250a4a484c5af6c68769bd1c5e15·...·]-1">)</span><span·class="p">.</span><span·class="w">180 ···················</span><span·class="p"·data-group-id="4486031615-11">{</span><span·class="p"·data-group-id="4486031615-12">{</span><span·class="ss">sql_char</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4486031615-12">}</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·680,·SHA:·02cb419d49d128ff3298ea641fdcf5c989a34fa6aae569f75acabafd107563cb·...·]-1">)</span><span·class="p">.</span><span·class="w">
181 ······</span><span·class="p"·data-group-id="9716578622-14">{</span><span·class="ss">updated</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">7</span><span·class="p"·data-group-id="9716578622-14">}</span></code></pre><p>Fetch·all·data·in·the·table·employee</p><pre><code·class="m[·...·truncated·by·diffoscope;·len:·439,·SHA:·b7e6708794c18e30199043e2304ccd306e653b8eece5525e7ef8bcf23315426f·...·]-1">)</span><span·class="p">.</span><span·class="w">181 ······</span><span·class="p"·data-group-id="4486031615-14">{</span><span·class="ss">updated</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">7</span><span·class="p"·data-group-id="4486031615-14">}</span></code></pre><p>Fetch·all·data·in·the·table·employee</p><pre><code·class="m[·...·truncated·by·diffoscope;·len:·439,·SHA:·b54c4f5bf513352a37f5a6cba44601eb5bdfb3535c9fd94a07f4175f7e81fd95·...·]-1">)</span><span·class="p">.</span><span·class="w">
182 ····</span><span·class="p"·data-group-id="5981659670-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="5981659670-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·664f45f633794fa9c6e77271569d0959db7bcbe10e4f357f907078a45518b90d·...·]-3">]</span><span·class="p">,</span><span·class="w">182 ····</span><span·class="p"·data-group-id="7054839517-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="7054839517-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·94428cc4a5c5f4141e72561804334f16be09f532bc09d8f06ebf46a1823e5671·...·]-3">]</span><span·class="p">,</span><span·class="w">
183 ··········</span><span·class="p"·data-group-id="5981659670-4">[</span><span·class="p"·data-group-id="5981659670-5">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·70,·SHA:·a2bd154e31516b69718deb01a9c94f7f891de7ba766d22c6da692100cd794f67·...·]-5">}</span><span·class="p">,</span><span·class="w">183 ··········</span><span·class="p"·data-group-id="7054839517-4">[</span><span·class="p"·data-group-id="7054839517-5">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·70,·SHA:·589194f943cbb378b169f60678270c0792c7b0d1e505d9e9d50b398aeac6f36a·...·]-5">}</span><span·class="p">,</span><span·class="w">
184 ···········</span><span·class="p"·data-group-id="5981659670-6">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p">,</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·class="s">&quot;M&quot;</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·3e71b5f291d2466ca9852ab15334432c3e62554e633c28f671e34adfb3188460·...·]-6">}</span><span·class="p">,</span><span·class="w">184 ···········</span><span·class="p"·data-group-id="7054839517-6">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p">,</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·class="s">&quot;M&quot;</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·cd2d62bfa4edea5daa6471a3b049f7aeeb909f3990caa4ff5a057c70aaeb8af1·...·]-6">}</span><span·class="p">,</span><span·class="w">
185 ···········</span><span·class="p"·data-group-id="5981659670-7">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·ed7f6bcbe7a7d3e209d283d13f73cb24298f666911a7f730225f823ff7bece5f·...·]-7">}</span><span·class="p">,</span><span·class="w">185 ···········</span><span·class="p"·data-group-id="7054839517-7">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·4f9a7aa8d2526000cc44bf1100173934ff345a046dce2f0e4105553385a98df6·...·]-7">}</span><span·class="p">,</span><span·class="w">
186 ···········</span><span·class="p"·data-group-id="5981659670-8">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="s">&quot;Ross&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="s">&quot;M&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·85ab0e809d8bb38c7dc92fb36d45ef472d380cb0eb67e730b783fa74ecd5cb2e·...·]-8">}</span><span·class="p">,</span><span·class="w">186 ···········</span><span·class="p"·data-group-id="7054839517-8">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="s">&quot;Ross&quot;</span><span·class="p">,</span><span·class="s">&quot;Geller&quot;</span><span·class="p">,</span><span·class="s">&quot;M&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·1b1a857845388b696fc97a79f04673d74d3caec1cb02a1c157057e4050e8b19e·...·]-8">}</span><span·class="p">,</span><span·class="w">
187 ···········</span><span·class="p"·data-group-id="5981659670-9">{</span><span·class="mi">5</span><span·class="p">,</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="s">&quot;Green&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·c1076844a893b5258b63c795b0333e02e2ff472c3477874d571051e9399ed709·...·]-9">}</span><span·class="p">,</span><span·class="w">187 ···········</span><span·class="p"·data-group-id="7054839517-9">{</span><span·class="mi">5</span><span·class="p">,</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="s">&quot;Green&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·5aeaba2cde0421065a7878c434a7dc5a162029e2ed40fad4c9cab0d254ce15f0·...·]-9">}</span><span·class="p">,</span><span·class="w">
188 ···········</span><span·class="p"·data-group-id="5981659670-10">{</span><span·class="mi">6</span><span·class="p">,</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·b818c776c46f324012eee6a879c94f46549737b298a5551698ca0e718d734be3·...·]-10">}</span><span·class="p">,</span><span·class="w">188 ···········</span><span·class="p"·data-group-id="7054839517-10">{</span><span·class="mi">6</span><span·class="p">,</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·c04175c8dadb2a2f881e313b920d72bd7d393e479a598566b373c13cc42cb52c·...·]-10">}</span><span·class="p">,</span><span·class="w">
189 ···········</span><span·class="p"·data-group-id="5981659670-11">{</span><span·class="mi">7</span><span·class="p">,</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·bb70331cd0d6115b78956e91bda6e06dc4ccee79d4318a24ace16ae607b17a4c·...·]-11">}</span><span·class="p">,</span><span·class="w">189 ···········</span><span·class="p"·data-group-id="7054839517-11">{</span><span·class="mi">7</span><span·class="p">,</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="s">&quot;Halliwell&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·c124c651e9e60c85c0d6c99ee63ee952ab9dc5050ee7af893874b993eaa38605·...·]-11">}</span><span·class="p">,</span><span·class="w">
190 ···········</span><span·class="p"·data-group-id="5981659670-12">{</span><span·class="mi">8</span><span·class="p">,</span><span·class="s">&quot;Louise&quot;</span><span·class="p">,</span><span·class="s">&quot;Lane&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·152,·SHA:·c81a9235de87fd7446689d1adebf31a0d884e363c0d5714df05c7a7ff6f34693·...·]-2">}</span></code></pre><p>Associate·a·result·set·containing·the·whole·table·<code·class="inline">EMPLOYEE</code>·to·the·connection.190 ···········</span><span·class="p"·data-group-id="7054839517-12">{</span><span·class="mi">8</span><span·class="p">,</span><span·class="s">&quot;Louise&quot;</span><span·class="p">,</span><span·class="s">&quot;Lane&quot;</span><span·class="p">,</span><span·class="s">&quot;F&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·152,·SHA:·d2fab42f77add6fc7581d041f6fda80d6f7cef696262296fd11acb69d991bad7·...·]-2">}</span></code></pre><p>Associate·a·result·set·containing·the·whole·table·<code·class="inline">EMPLOYEE</code>·to·the·connection.
191 The·number·of·rows·in·the·result·set·is·returned.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">8</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">select_count</span><span·class="p"·data-group-id="3962635978-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·*·FROM·EMPLOYEE&quot;</span><span·class="p"·data-group-id="3962635978-1">)</span><span·class="p">.</span><span·class="w">191 The·number·of·rows·in·the·result·set·is·returned.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">8</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">select_count</span><span·class="p"·data-group-id="6417385910-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·*·FROM·EMPLOYEE&quot;</span><span·class="p"·data-group-id="6417385910-1">)</span><span·class="p">.</span><span·class="w">
192 ······</span><span·class="p"·data-group-id="3962635978-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="3962635978-2">}</span></code></pre><p>You·can·always·traverse·the·result·set·sequential·by·using·next</p><pre><code·class="makeu[·...·truncated·by·diffoscope;·len:·349,·SHA:·3545c6b469baad2ae0d605593b5c9e4fac6b07e9866d97b3bb3c5f5b3707d0d5·...·]-1">)</span><span·class="p">.</span><span·class="w">192 ······</span><span·class="p"·data-group-id="6417385910-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="6417385910-2">}</span></code></pre><p>You·can·always·traverse·the·result·set·sequential·by·using·next</p><pre><code·class="makeu[·...·truncated·by·diffoscope;·len:·349,·SHA:·1c178895fd529ec6ce67bfd213f1f45eea9c8a738b5559acd86f976fb077330b·...·]-1">)</span><span·class="p">.</span><span·class="w">
193 ······</span><span·class="p"·data-group-id="9774982623-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="9774982623-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1049,·SHA:·30c46369c2d53ff0147e95497f5b3d2f11c5c6f9c009ed883b9b7116415dfa67·...·]0-1">)</span><span·class="p">.</span><span·class="w">193 ······</span><span·class="p"·data-group-id="3712457867-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="3712457867-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1049,·SHA:·b8436979f07e32b7b9de8282c2cc1ddffde90588defae825cf911e6818bc0f45·...·]0-1">)</span><span·class="p">.</span><span·class="w">
194 ······</span><span·class="p"·data-group-id="5051805840-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="5051805840-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·651,·SHA:·ee61b738a40ad422062b9d0f344bb27f4499b4c52f7fac977a8572789271bed7·...·]0-2">}</span></code></pre><p>If·your·driver·supports·scrollable·cursors·you·have·a·little·more·freedom,·and194 ······</span><span·class="p"·data-group-id="9690401350-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="9690401350-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·651,·SHA:·645501fbae9df82d96b9888d0d6b7d277e113ee7c32466e8f60fa4a29aec3302·...·]0-2">}</span></code></pre><p>If·your·driver·supports·scrollable·cursors·you·have·a·little·more·freedom,·and
195 can·do·things·like·this.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">11</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">last</span><span·class="p"·data-group-id="6411519303-1">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="6411519303-1">)</span><span·class="p">.</span><span·class="w">195 can·do·things·like·this.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">11</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">last</span><span·class="p"·data-group-id="8137777347-1">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="8137777347-1">)</span><span·class="p">.</span><span·class="w">
196 ······</span><span·class="p"·data-group-id="6411519303-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="6411519303-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1053,·SHA:·9a146c8ee6d1686df5a797e6d420a571faf7ff84aee63d80ec9d8b8cf98a1657·...·]-1">)</span><span·class="p">.</span><span·class="w">196 ······</span><span·class="p"·data-group-id="8137777347-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="8137777347-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1053,·SHA:·1a9ef936bcbb547a8b677a11080f3ba7ab267a0984fcf885834bddc448f859b5·...·]-1">)</span><span·class="p">.</span><span·class="w">
197 ······</span><span·class="p"·data-group-id="5347089060-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="5347089060-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1057,·SHA:·ba8853e7ef886a98d2a57bcc3c0958d1217a906e00031b8804fb722cecf3a91c·...·]-1">)</span><span·class="p">.</span><span·class="w">197 ······</span><span·class="p"·data-group-id="7357919366-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="7357919366-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1057,·SHA:·b9285fbf3235f00f5439b251caebb280e4774c4fafc70b9802c05d2baaa5a8ec·...·]-1">)</span><span·class="p">.</span><span·class="w">
198 ······</span><span·class="p"·data-group-id="3728053712-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="3728053712-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1050,·SHA:·8288da925206bd8c2b3a61bc3ee497a4a3165a086205fb52f4c4a5024786b96e·...·]-1">)</span><span·class="p">.</span><span·class="w">198 ······</span><span·class="p"·data-group-id="9991554840-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="9991554840-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1050,·SHA:·4aa2fcf5f35b365b147a3b5146c3da22021934e3e1358eb52135552e460ca6ab·...·]-1">)</span><span·class="p">.</span><span·class="w">
199 ······</span><span·class="p"·data-group-id="0697586921-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="0697586921-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1318,·SHA:·3b03883d43939d68ba997c5a549b52cfd7ede34bfc36d23b53d4442bdc8d84cf·...·]-1">)</span><span·class="p">.</span><span·class="w">199 ······</span><span·class="p"·data-group-id="3691320015-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="3691320015-3">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·1318,·SHA:·b4ca4621ace1af22a8c969bfba6a9576b25426f538f51a9d3d42f9a8f229e1d4·...·]-1">)</span><span·class="p">.</span><span·class="w">
200 ·····</span><span·class="p"·data-group-id="7608039466-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="7608039466-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·496c4def7d08c95f21d1b3831d4d3f6fcd60ba7ad78261ef41589157f4dfd506·...·]-3">]</span><span·class="p">,</span><span·class="w">200 ·····</span><span·class="p"·data-group-id="5709657497-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="5709657497-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·6e367ba98c28af676d5c70c251da34e416313df85ed7ae8fb9043e35e7412510·...·]-3">]</span><span·class="p">,</span><span·class="w">
201 ··········</span><span·class="p"·data-group-id="7608039466-4">[</span><span·class="p"·data-group-id="7608039466-5">{</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7608039466-5">}</span><span·class="p">,</span><span·class="w">201 ··········</span><span·class="p"·data-group-id="5709657497-4">[</span><span·class="p"·data-group-id="5709657497-5">{</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5709657497-5">}</span><span·class="p">,</span><span·class="w">
202 ···········</span><span·class="p"·data-group-id="7608039466-6">{</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="7608039466-6">}</span><span·class="p">,</span><span·class="w">202 ···········</span><span·class="p"·data-group-id="5709657497-6">{</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="5709657497-6">}</span><span·class="p">,</span><span·class="w">
203 ···········</span><span·class="p"·data-group-id="7608039466-7">{</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7608039466-7">}</span><span·class="p">,</span><span·class="w">203 ···········</span><span·class="p"·data-group-id="5709657497-7">{</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="5709657497-7">}</span><span·class="p">,</span><span·class="w">
204 ···········</span><span·class="p"·data-group-id="7608039466-8">{</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7608039466-8">}</span><span·class="p">,</span><span·class="w">204 ···········</span><span·class="p"·data-group-id="5709657497-8">{</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="5709657497-8">}</span><span·class="p">,</span><span·class="w">
205 ···········</span><span·class="p"·data-group-id="7608039466-9">{</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="7608039466-9">}</span><span·class="p">,</span><span·class="w">205 ···········</span><span·class="p"·data-group-id="5709657497-9">{</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="5709657497-9">}</span><span·class="p">,</span><span·class="w">
206 ···········</span><span·class="p"·data-group-id="7608039466-10">{</span><span·class="s">&quot;Louise&quot;</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="7608039466-10">}</span><span·class="p"·data-group-id="7608039466-4">]</span><span·class="p"·data-group-id="76080[·...·truncated·by·diffoscope;·len:·5,·SHA:·582121c477197f5ce1ded7a55ce1ce6ea73b899a77c9b32ee276e0bc499c8a3c·...·]-2">}</span></code></pre><p>Fetch·the·fields·<code·class="inline">FIRSTNAME</code>and·<code·class="inline">NR</code>for·all·female·employees·and·sort·them·on206 ···········</span><span·class="p"·data-group-id="5709657497-10">{</span><span·class="s">&quot;Louise&quot;</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="5709657497-10">}</span><span·class="p"·data-group-id="5709657497-4">]</span><span·class="p"·data-group-id="57096[·...·truncated·by·diffoscope;·len:·5,·SHA:·c0c966afb67da4d5f75fc05412fa6c068d9eaff825cda70f5e4d0d4188dc9ade·...·]-2">}</span></code></pre><p>Fetch·the·fields·<code·class="inline">FIRSTNAME</code>and·<code·class="inline">NR</code>for·all·female·employees·and·sort·them·on
207 the·field·<code·class="inline">FIRSTNAME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">16</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">sql_query</span><span·class="p"·data-group-id="8806532248-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·FIRSTNAME,·NR·FROM·EMPLOYEE·WHERE·GENDER·=·&#39;F&#39;207 the·field·<code·class="inline">FIRSTNAME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">16</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">sql_query</span><span·class="p"·data-group-id="7921248364-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·FIRSTNAME,·NR·FROM·EMPLOYEE·WHERE·GENDER·=·&#39;F&#39;
208 ······ORDER·BY·FIRSTNAME&quot;</span><span·class="p"·data-group-id="8806532248-1">)</span><span·class="p">.</span><span·class="w">208 ······ORDER·BY·FIRSTNAME&quot;</span><span·class="p"·data-group-id="7921248364-1">)</span><span·class="p">.</span><span·class="w">
209 ····</span><span·class="p"·data-group-id="8806532248-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="8806532248-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·e874072a363c4902fa0ba691e871d69b426aac036d68d1fc6c1aa0a33ac7c645·...·]-3">]</span><span·class="p">,</span><span·class="w">209 ····</span><span·class="p"·data-group-id="7921248364-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="7921248364-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·8b6547ee395ed651527c1c768433618fc99ab05df68088b14794b3765cfafee8·...·]-3">]</span><span·class="p">,</span><span·class="w">
210 ··········</span><span·class="p"·data-group-id="8806532248-4">[</span><span·class="p"·data-group-id="8806532248-5">{</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8806532248-5">}</span><span·class="p">,</span><span·class="w">210 ··········</span><span·class="p"·data-group-id="7921248364-4">[</span><span·class="p"·data-group-id="7921248364-5">{</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7921248364-5">}</span><span·class="p">,</span><span·class="w">
211 ···········</span><span·class="p"·data-group-id="8806532248-6">{</span><span·class="s">&quot;Louise&quot;</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="8806532248-6">}</span><span·class="p">,</span><span·class="w">211 ···········</span><span·class="p"·data-group-id="7921248364-6">{</span><span·class="s">&quot;Louise&quot;</span><span·class="p">,</span><span·class="mi">8</span><span·class="p"·data-group-id="7921248364-6">}</span><span·class="p">,</span><span·class="w">
212 ···········</span><span·class="p"·data-group-id="8806532248-7">{</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8806532248-7">}</span><span·class="p">,</span><span·class="w">212 ···········</span><span·class="p"·data-group-id="7921248364-7">{</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="7921248364-7">}</span><span·class="p">,</span><span·class="w">
213 ···········</span><span·class="p"·data-group-id="8806532248-8">{</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="8806532248-8">}</span><span·class="p">,</span><span·class="w">213 ···········</span><span·class="p"·data-group-id="7921248364-8">{</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7921248364-8">}</span><span·class="p">,</span><span·class="w">
214 ···········</span><span·class="p"·data-group-id="8806532248-9">{</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="8806532248-9">}</span><span·class="p">,</span><span·class="w">214 ···········</span><span·class="p"·data-group-id="7921248364-9">{</span><span·class="s">&quot;Prue&quot;</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="7921248364-9">}</span><span·class="p">,</span><span·class="w">
215 ···········</span><span·class="p"·data-group-id="8806532248-10">{</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="8806532248-10">}</span><span·class="p"·data-group-id="8806532248-4">]</span><span·class="p"·data-group-id="88065[·...·truncated·by·diffoscope;·len:·5,·SHA:·de74439c978c76cc6fc0d71f2635d13a7632abd59542f307d086f9daab281f4b·...·]-2">}</span></code></pre><p>Associate·a·result·set·that·contains·the·fields·<code·class="inline">FIRSTNAME</code>·and·<code·class="inline">NR</code>for·all215 ···········</span><span·class="p"·data-group-id="7921248364-10">{</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7921248364-10">}</span><span·class="p"·data-group-id="7921248364-4">]</span><span·class="p"·data-group-id="79212[·...·truncated·by·diffoscope;·len:·5,·SHA:·02d51b78ba653a19f960424b06d20fa71b05b2f9de87cf3e211d7c6b686cc097·...·]-2">}</span></code></pre><p>Associate·a·result·set·that·contains·the·fields·<code·class="inline">FIRSTNAME</code>·and·<code·class="inline">NR</code>for·all
216 female·employees·to·the·connection.·The·number·of·rows·in·the·result·set·is216 female·employees·to·the·connection.·The·number·of·rows·in·the·result·set·is
217 returned.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">17</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">select_count</span><span·class="p"·data-group-id="5522853490-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·FIRSTNAME,·NR·FROM·EMPLOYEE·WHERE·GENDER·=·&#39;F&#39;&quot;</span><span·class="p"·data-group-id="5522853490-1">)</span><span·class="p">.</span><span·class="w">217 returned.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">17</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">select_count</span><span·class="p"·data-group-id="4420280449-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·FIRSTNAME,·NR·FROM·EMPLOYEE·WHERE·GENDER·=·&#39;F&#39;&quot;</span><span·class="p"·data-group-id="4420280449-1">)</span><span·class="p">.</span><span·class="w">
218 ······</span><span·class="p"·data-group-id="5522853490-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="5522853490-2">}</span></code></pre><p>A·few·more·ways·of·retrieving·parts·of·the·result·set·when·the·driver·supports218 ······</span><span·class="p"·data-group-id="4420280449-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="4420280449-2">}</span></code></pre><p>A·few·more·ways·of·retrieving·parts·of·the·result·set·when·the·driver·supports
219 scrollable·cursors.·Note·that·next·will·work·even·without·support·for·scrollable219 scrollable·cursors.·Note·that·next·will·work·even·without·support·for·scrollable
220 cursors.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">18</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="6056359119-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6056359119-2">{</span><span·class="ss">relative</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><sp[·...·truncated·by·diffoscope;·len:·164,·SHA:·aa9aeff79d5492336b8963cc89922b2d9d316a95ec4e25359eea5b25905872bf·...·]-1">)</span><span·class="p">.</span><span·class="w">220 cursors.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">18</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="6881391345-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6881391345-2">{</span><span·class="ss">relative</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><sp[·...·truncated·by·diffoscope;·len:·164,·SHA:·9d17a4ca9ad216ceedda1d2c909f4ba51a98fd7f495f2bb766c5a23f040f9102·...·]-1">)</span><span·class="p">.</span><span·class="w">
221 ····</span><span·class="p"·data-group-id="6056359119-3">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="6056359119-4">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·1386,·SHA:·3a270dd844c4c82cca7ce14ed6ee73eae4f952854242804dc9e7dab9d4a38e74·...·]3-1">)</span><span·class="p">.</span><span·class="w">221 ····</span><span·class="p"·data-group-id="6881391345-3">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="6881391345-4">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·1386,·SHA:·dd7fb28b7916f57e305cde0856108c87b3f6c9745e1a96eaa5847666b648b76a·...·]3-1">)</span><span·class="p">.</span><span·class="w">
222 ······</span><span·class="p"·data-group-id="9738433373-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="9738433373-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·1350,·SHA:·c192b6490d547a13771112bb6e0cab1a19d1a064d6a53db8e3eebcd9a9080a36·...·]-1">)</span><span·class="p">.</span><span·class="w">222 ······</span><span·class="p"·data-group-id="3948008523-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="3948008523-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·1350,·SHA:·0f01ab28e95db0eabda47f29a0e1501b5c22f2602f42a8f614dd5d5826fec486·...·]-1">)</span><span·class="p">.</span><span·class="w">
223 ······</span><span·class="p"·data-group-id="3090544684-3">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="3090544684-4">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·1167,·SHA:·7bb76b1a39b2c0a18e329601a6cd944c2ce07a53d8b0a1e0be8d66a371c9fce9·...·]-1">)</span><span·class="p">.</span><span·class="w">223 ······</span><span·class="p"·data-group-id="0988963713-3">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="0988963713-4">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·1167,·SHA:·a0d46bd23b582785fa3ac047bdb51a48f2d1329f67f42529a5993d266d446f82·...·]-1">)</span><span·class="p">.</span><span·class="w">
224 ····</span><span·class="p"·data-group-id="1173879291-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="1173879291-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·1351,·SHA:·0851c7eda8a01813b2025324071c4b096bf4ea59b31bd6712285144e4f98d4e4·...·]-1">)</span><span·class="p">.</span><span·class="w">224 ····</span><span·class="p"·data-group-id="4933827525-2">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="4933827525-3">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·1351,·SHA:·a25bdcaee4f07a583f334c0ef63d8b920d03423d9296b876eca1770cae9e7014·...·]-1">)</span><span·class="p">.</span><span·class="w">
225 ······</span><span·class="p"·data-group-id="4058565620-3">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="4058565620-4">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·a2a40cae7d89de1f834119b4b9ee0a037388a582b6035a545ff2b0cf61d2b80b·...·]-4">]</span><span·class="p">,</span><span·class="w">225 ······</span><span·class="p"·data-group-id="4788867992-3">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="4788867992-4">[</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</span><span·class="s">&quot;NR&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·e05485cdd25dc83a512d6b78514e4caf92317610ec87726ccfad5b47598f2e8f·...·]-4">]</span><span·class="p">,</span><span·class="w">
226 ················</span><span·class="p"·data-group-id="4058565620-5">[</span><span·class="p"·data-group-id="4058565620-6">{</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4058565620-6">}</span><span·class="p">,</span><span·class="p"·data-group-id="4058565620-7">{</span><span·class="s">&quot;Monica&quot;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="4058565620-7">}</span><span·class="p">,</span><span·class="p"·data-group-id="4058565620-8">{</span><span·class="s">&quot;Rachel&quot;</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="4058565620-8">}</span><span·class="p">,</span><span·class="p"·data-group-id="4058565620-9">{</span><span·class="s">&quot;Piper&quot;</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="4058565620-9">}</span><span·class="p"·data-group-id="4058565620-5">]</span><span·class="p"·data-group-id="4058565620-3">}</span></code></pre><p>Select,·using·a·parameterized·query.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">23</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">param_query</span><span·class="p"·data-group-id="9410638324-1">(</span><span·class="n">Ref</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SELECT·*·FROM·EMPLOYEE·WHERE·GENDER=?&quot;</span><span·class="p">,</span><span·class="w"> 
227 ······</span><span·class="p"·data-group-id="9410638324-2">[</span><span·class="p"·data-group-id="9410638324-3">{</span><span·class="p"·data-group-id="9410638324-4">{</span><span·class="ss">sql_char</span><span·class="p">,</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·434,·SHA:·6730b723a8a9b431217c53d97575ad1d1854cca211689263e44aa7494cb11f0d·...·]</span><span·class="w">226 ················</span><span·class="p"·data-group-id="4788867992-5">[</span><span·class="p"·data-group-id="4788867992-6">{</span><span·class="s">&quot;Jane&quot;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4788867992-6">[·...·truncated·by·diffoscope;·len:·1305,·SHA:·c59bab0c59090da100cd0cf8ce77fb88f0ff843296aa99d8df9fe0a4f53fbcbf·...·]</span><span·class="w">
 227 ······</span><span·class="p"·data-group-id="0865641128-2">[</span><span·class="p"·data-group-id="0865641128-3">{</span><span·class="p"·data-group-id="0865641128-4">{</span><span·class="ss">sql_char</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0865641128-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0865641128-5">[</span><span·class="s">&quot;M&quot;</span><span·class="p"·data-group-id="0865641128-5">]</span><span·class="p"·data-group-id="0865641128-3">}</span><span·class="p"·data-group-id="0865641128-2">]</span><span·class="p"·data-group-id="0865641128-1">)</span><span·class="p">.</span><span·class="w">
228 ······</span><span·class="p"·data-group-id="9410638324-6">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="9410638324-7">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·26bd39fc04cc6348e3036a07f39a388317d17a7e5ba094ac5bd6f7b7c6660e3a·...·]-7">]</span><span·class="p">,</span><span·class="w">228 ······</span><span·class="p"·data-group-id="0865641128-6">{</span><span·class="ss">selected</span><span·class="p">,</span><span·class="p"·data-group-id="0865641128-7">[</span><span·class="s">&quot;NR&quot;</span><span·class="p">,</span><span·class="s">&quot;FIRSTNAME&quot;</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·153,·SHA:·d3d42177ac681dd1b9a4340d1c20adde0b41e16f18d18bca187016b3b8267435·...·]-7">]</span><span·class="p">,</span><span·class="w">
229 ················</span><span·class="p"·data-group-id="9410638324-8">[</span><span·class="p"·data-group-id="9410638324-9">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Doe&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·569,·SHA:·a5f6cc7e3f863a786e49cedaa43e6c510a1352712a1483f68bceb9bcb8f767cd·...·]-6">}</span></code></pre><p>Delete·the·table·<code·class="inline">EMPLOYEE</code>.</p><pre><code·class="text">·24·&gt;·odbc:sql_query(Ref,·&quot;DROP·TABLE·EMPLOYEE&quot;).229 ················</span><span·class="p"·data-group-id="0865641128-8">[</span><span·class="p"·data-group-id="0865641128-9">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Doe&quot;</span><span·c[·...·truncated·by·diffoscope;·len:·569,·SHA:·cab75c13c91f81313d0074b92a97cf564284033214477722fe95a611404708c5·...·]-6">}</span></code></pre><p>Delete·the·table·<code·class="inline">EMPLOYEE</code>.</p><pre><code·class="text">·24·&gt;·odbc:sql_query(Ref,·&quot;DROP·TABLE·EMPLOYEE&quot;).
230 ······{updated,undefined}</code></pre><p>Shut·down·the·connection.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">25</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="1996998443-1">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="1996998443-1">)</span><span·class="p">.</span><span·class="w">230 ······{updated,undefined}</code></pre><p>Shut·down·the·connection.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">25</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">odbc</span><span·class="p">:</span><span·class="nf">disconnect</span><span·class="p"·data-group-id="6712208367-1">(</span><span·class="n">Ref</span><span·class="p"·data-group-id="6712208367-1">)</span><span·class="p">.</span><span·class="w">
231 ······</span><span·class="ss">ok</span></code></pre><p>Shut·down·the·application.</p><pre><code·class="text">·26·&gt;·odbc:stop().231 ······</span><span·class="ss">ok</span></code></pre><p>Shut·down·the·application.</p><pre><code·class="text">·26·&gt;·odbc:stop().
232 ····=INFO·REPORT====·7-Jan-2004::17:00:59·===232 ····=INFO·REPORT====·7-Jan-2004::17:00:59·===
233 ····application:·odbc233 ····application:·odbc
234 ····exited:·stopped234 ····exited:·stopped
235 ····type:·temporary235 ····type:·temporary
  
236 ····ok</code></pre>236 ····ok</code></pre>
127 KB
./usr/share/doc/erlang-doc/html/lib/odbc-2.14.3/doc/html/odbc.epub
2.71 KB
zipinfo {}
    
Offset 1, 18 lines modifiedOffset 1, 18 lines modified
1 Zip·file·size:·58873·bytes,·number·of·entries:·161 Zip·file·size:·58865·bytes,·number·of·entries:·16
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:20·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······714·b-·defN·24-Oct-11·20:20·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······714·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····73595·b-·defN·24-Oct-11·20:20·OEBPS/odbc.xhtml4 ?rw-r--r--··2.0·unx····73595·b-·defN·24-Oct-11·20:59·OEBPS/odbc.xhtml
5 ?rw-r--r--··2.0·unx····50447·b-·defN·24-Oct-11·20:20·OEBPS/notes.xhtml5 ?rw-r--r--··2.0·unx····50447·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
6 ?rw-r--r--··2.0·unx·····1258·b-·defN·24-Oct-11·20:20·OEBPS/nav.xhtml6 ?rw-r--r--··2.0·unx·····1258·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
7 ?rw-r--r--··2.0·unx·····2816·b-·defN·24-Oct-11·20:20·OEBPS/introduction.xhtml7 ?rw-r--r--··2.0·unx·····2816·b-·defN·24-Oct-11·20:59·OEBPS/introduction.xhtml
8 ?rw-r--r--··2.0·unx····45323·b-·defN·24-Oct-11·20:20·OEBPS/getting_started.xhtml8 ?rw-r--r--··2.0·unx····45323·b-·defN·24-Oct-11·20:59·OEBPS/getting_started.xhtml
9 ?rw-r--r--··2.0·unx·····8011·b-·defN·24-Oct-11·20:20·OEBPS/error_handling.xhtml9 ?rw-r--r--··2.0·unx·····8011·b-·defN·24-Oct-11·20:59·OEBPS/error_handling.xhtml
10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-erlang-2EWSTWER.css10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-CB7BJMUW.js11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
12 ?rw-r--r--··2.0·unx····11480·b-·defN·24-Oct-11·20:20·OEBPS/databases.xhtml12 ?rw-r--r--··2.0·unx····11480·b-·defN·24-Oct-11·20:59·OEBPS/databases.xhtml
13 ?rw-r--r--··2.0·unx·····2034·b-·defN·24-Oct-11·20:20·OEBPS/content.opf13 ?rw-r--r--··2.0·unx·····2034·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
14 ?rw-r--r--··2.0·unx·····4179·b-·stor·24-Oct-11·20:20·OEBPS/assets/odbc_app_arc.gif14 ?rw-r--r--··2.0·unx·····4179·b-·stor·24-Oct-11·20:59·OEBPS/assets/odbc_app_arc.gif
15 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:20·OEBPS/assets/logo.png15 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
16 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:20·META-INF/container.xml16 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
17 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:20·META-INF/com.apple.ibooks.display-options.xml17 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
18 16·files,·223025·bytes·uncompressed,·56901·bytes·compressed:··74.5%18 16·files,·223025·bytes·uncompressed,·56893·bytes·compressed:··74.5%
40.9 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
82.3 KB
OEBPS/getting_started.xhtml
Max HTML report size reached
1.22 KB
OEBPS/content.opf
1.19 KB
OEBPS/content.opf
Max HTML report size reached
24.3 KB
./usr/share/doc/erlang-doc/html/lib/os_mon-2.10/doc/html/os_mon.epub
2.54 KB
zipinfo {}
    
Offset 1, 18 lines modifiedOffset 1, 18 lines modified
1 Zip·file·size:·50152·bytes,·number·of·entries:·161 Zip·file·size:·50152·bytes,·number·of·entries:·16
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:20·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······714·b-·defN·24-Oct-11·20:20·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······714·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····17387·b-·defN·24-Oct-11·20:20·OEBPS/os_sup.xhtml4 ?rw-r--r--··2.0·unx····17387·b-·defN·24-Oct-11·20:59·OEBPS/os_sup.xhtml
5 ?rw-r--r--··2.0·unx·····3939·b-·defN·24-Oct-11·20:20·OEBPS/os_mon_app.xhtml5 ?rw-r--r--··2.0·unx·····3939·b-·defN·24-Oct-11·20:59·OEBPS/os_mon_app.xhtml
6 ?rw-r--r--··2.0·unx·····9295·b-·defN·24-Oct-11·20:20·OEBPS/nteventlog.xhtml6 ?rw-r--r--··2.0·unx·····9295·b-·defN·24-Oct-11·20:59·OEBPS/nteventlog.xhtml
7 ?rw-r--r--··2.0·unx····50354·b-·defN·24-Oct-11·20:20·OEBPS/notes.xhtml7 ?rw-r--r--··2.0·unx····50354·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
8 ?rw-r--r--··2.0·unx·····1223·b-·defN·24-Oct-11·20:20·OEBPS/nav.xhtml8 ?rw-r--r--··2.0·unx·····1223·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
9 ?rw-r--r--··2.0·unx····26419·b-·defN·24-Oct-11·20:20·OEBPS/memsup.xhtml9 ?rw-r--r--··2.0·unx····26419·b-·defN·24-Oct-11·20:59·OEBPS/memsup.xhtml
10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-erlang-2EWSTWER.css10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-CB7BJMUW.js11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
12 ?rw-r--r--··2.0·unx····19492·b-·defN·24-Oct-11·20:20·OEBPS/disksup.xhtml12 ?rw-r--r--··2.0·unx····19492·b-·defN·24-Oct-11·20:59·OEBPS/disksup.xhtml
13 ?rw-r--r--··2.0·unx····23365·b-·defN·24-Oct-11·20:20·OEBPS/cpu_sup.xhtml13 ?rw-r--r--··2.0·unx····23365·b-·defN·24-Oct-11·20:59·OEBPS/cpu_sup.xhtml
14 ?rw-r--r--··2.0·unx·····2042·b-·defN·24-Oct-11·20:20·OEBPS/content.opf14 ?rw-r--r--··2.0·unx·····2042·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
15 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:20·OEBPS/assets/logo.png15 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
16 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:20·META-INF/container.xml16 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
17 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:20·META-INF/com.apple.ibooks.display-options.xml17 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
18 16·files,·177398·bytes·uncompressed,·48230·bytes·compressed:··72.8%18 16·files,·177398·bytes·uncompressed,·48230·bytes·compressed:··72.8%
20.4 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
1.21 KB
OEBPS/content.opf
1.17 KB
OEBPS/content.opf
Max HTML report size reached
604 B
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/.build
    
Offset 14, 14 lines modifiedOffset 14, 14 lines modified
14 dist/lato-latin-300-normal-YUMVEFOL.woff214 dist/lato-latin-300-normal-YUMVEFOL.woff2
15 dist/lato-latin-400-normal-W7754I4D.woff215 dist/lato-latin-400-normal-W7754I4D.woff2
16 dist/lato-latin-700-normal-2XVSBPG4.woff216 dist/lato-latin-700-normal-2XVSBPG4.woff2
17 dist/lato-latin-ext-300-normal-VPGGJKJL.woff217 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
18 dist/lato-latin-ext-400-normal-N27NCBWW.woff218 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
19 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff219 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
20 dist/remixicon-NKANDIL5.woff220 dist/remixicon-NKANDIL5.woff2
21 dist/search_data-888771CF.js21 dist/search_data-F88FF550.js
22 dist/sidebar_items-E70C9F62.js22 dist/sidebar_items-E70C9F62.js
23 index.html23 index.html
24 leex.html24 leex.html
25 notes.html25 notes.html
26 search.html26 search.html
27 yecc.html27 yecc.html
13.6 KB
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/leex.html
    
Offset 169, 21 lines modifiedOffset 169, 21 lines modified
169 <code·class="inline">error_location</code>·is·set·to·<code·class="inline">line</code>).</p></li></ul><p>The·code·must·return:</p><ul><li><p><strong><code·class="inline">{token,Token}</code></strong>·-·Return·<code·class="inline">Token</code>·to·the·caller.</p></li><li><p><strong><code·class="inline">{end_token,Token}</code></strong>·-·Return·<code·class="inline">Token</code>·and·is·last·token·in·a·tokens·call.</p></li><li><p><strong><code·class="inline">skip_token</code></strong>·-·Skip·this·token·completely.</p></li><li><p><strong><code·class="inline">{error,ErrString}</code></strong>·-·An·error·in·the·token,·<code·class="inline">ErrString</code>·is·a·string169 <code·class="inline">error_location</code>·is·set·to·<code·class="inline">line</code>).</p></li></ul><p>The·code·must·return:</p><ul><li><p><strong><code·class="inline">{token,Token}</code></strong>·-·Return·<code·class="inline">Token</code>·to·the·caller.</p></li><li><p><strong><code·class="inline">{end_token,Token}</code></strong>·-·Return·<code·class="inline">Token</code>·and·is·last·token·in·a·tokens·call.</p></li><li><p><strong><code·class="inline">skip_token</code></strong>·-·Skip·this·token·completely.</p></li><li><p><strong><code·class="inline">{error,ErrString}</code></strong>·-·An·error·in·the·token,·<code·class="inline">ErrString</code>·is·a·string
170 describing·the·error.</p></li></ul><p>It·is·also·possible·to·push·back·characters·into·the·input·characters·with·the170 describing·the·error.</p></li></ul><p>It·is·also·possible·to·push·back·characters·into·the·input·characters·with·the
171 following·returns:</p><ul><li><code·class="inline">{token,Token,PushBackList}</code></li><li><code·class="inline">{end_token,Token,PushBackList}</code></li><li><code·class="inline">{skip_token,PushBackList}</code></li></ul><p>These·have·the·same·meanings·as·the·normal·returns·but·the·characters·in171 following·returns:</p><ul><li><code·class="inline">{token,Token,PushBackList}</code></li><li><code·class="inline">{end_token,Token,PushBackList}</code></li><li><code·class="inline">{skip_token,PushBackList}</code></li></ul><p>These·have·the·same·meanings·as·the·normal·returns·but·the·characters·in
172 <code·class="inline">PushBackList</code>·will·be·prepended·to·the·input·characters·and·scanned·for·the172 <code·class="inline">PushBackList</code>·will·be·prepended·to·the·input·characters·and·scanned·for·the
173 next·token.·Note·that·pushing·back·a·newline·will·mean·the·line·numbering·will173 next·token.·Note·that·pushing·back·a·newline·will·mean·the·line·numbering·will
174 no·longer·be·correct.</p><blockquote><h4·class="info">Note</h4><p>Pushing·back·characters·gives·you·unexpected·possibilities·to·cause·the174 no·longer·be·correct.</p><blockquote><h4·class="info">Note</h4><p>Pushing·back·characters·gives·you·unexpected·possibilities·to·cause·the
175 scanner·to·loop!</p></blockquote><p>The·following·example·would·match·a·simple·Erlang·integer·or·float·and·return·a175 scanner·to·loop!</p></blockquote><p>The·following·example·would·match·a·simple·Erlang·integer·or·float·and·return·a
176 token·which·could·be·sent·to·the·Erlang·parser:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">D</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3115273847-1">[</span><span·class="mi">0</span><span·class="o">-</span><span·class="mi">9</span><span·class="p"·data-group-id="3115273847-1">]</span><span·class="w">176 token·which·could·be·sent·to·the·Erlang·parser:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">D</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3727749124-1">[</span><span·class="mi">0</span><span·class="o">-</span><span·class="mi">9</span><span·class="p"·data-group-id="3727749124-1">]</span><span·class="w">
  
177 </span><span·class="p"·data-group-id="3115273847-2">{</span><span·class="n">D</span><span·class="p"·data-group-id="3115273847-2">}</span><span·class="o">+</span><span·class="w">·</span><span·class="p">:</span><span·class="w">177 </span><span·class="p"·data-group-id="3727749124-2">{</span><span·class="n">D</span><span·class="p"·data-group-id="3727749124-2">}</span><span·class="o">+</span><span·class="w">·</span><span·class="p">:</span><span·class="w">
178 ··</span><span·class="p"·data-group-id="3115273847-3">{</span><span·class="ss">token</span><span·class="p">,</span><span·class="p"·data-group-id="3115273847-4">{</span><span·class="ss">integer</span><span·class="p">,</span><span·class="n">TokenLine</span><span·class="p">,</span><span·class="nf">l[·...·truncated·by·diffoscope;·len:·254,·SHA:·36de5cc786b41179bc4935c8f3bf53d92dcdc25e51ce98061fae9fa2eeee642a·...·]-3">}</span><span·class="p">.</span><span·class="w">178 ··</span><span·class="p"·data-group-id="3727749124-3">{</span><span·class="ss">token</span><span·class="p">,</span><span·class="p"·data-group-id="3727749124-4">{</span><span·class="ss">integer</span><span·class="p">,</span><span·class="n">TokenLine</span><span·class="p">,</span><span·class="nf">l[·...·truncated·by·diffoscope;·len:·254,·SHA:·0ad6f1276bb7f7b3015aee696adced3732804283bd54b74c84dfb18510033356·...·]-3">}</span><span·class="p">.</span><span·class="w">
  
179 </span><span·class="p"·data-group-id="3115273847-6">{</span><span·class="n">D</span><span·class="p"·data-group-id="3115273847-6">}</span><span·class="o">+</span><span·class="err">\</span><span·class="p">.</span><span·class="p"·data-group-id="3115273847-7">{</span><span·class="n">D</span><span·class="p"·data-group-id="3115273847-7">}</span><span·class="o">+</span><span·class="p"·data-group-id="3115273847-8">(</span><span·class="p"·data-group-id="3115273847-9">(</span><span·class="n">E</span><span·class="p">|</span><span·class="ss">e</span><span·class="p"·data-group-id="3115273847-9">)</span><span·class="p"·data-group-id="3115273847-10">(</span><span·class="err">\</span><span·class="o">+</span><span·class="p">|</span><span·class="err">\</span><span·class="o">-</span><span·class="p"·data-group-id="3115273847-10">)</span><span·class="o">?</span><span·class="p"·data-group-id="3115273847-11">{</span><span·class="n">D</span><span·class="p"·data-group-id="3115273847-11">}</span><span·class="o">+</span><span·class="p"·data-group-id="3115273847-8">)</span><span·class="o">?</span><span·class="w">·</span><span·class="p">:</span><span·class="w"> 
180 ··</span><span·class="p"·data-group-id="3115273847-12">{</span><span·class="ss">token</span><span·class="p">,</span><span·class="p"·data-group-id="3115273847-13">{</span><span·class="nb">float</span><span·class="p">,</span><span·class="n">TokenLine</span><[·...·truncated·by·diffoscope;·len:·452,·SHA:·acb4730d2cf55dd47e748cd119a54555a219f168eaf3580ff437f94069d5af08·...·]179 </span><span·class="p"·data-group-id="3727749124-6">{</span><span·class="n">D</span><span·class="p"·data-group-id="3727749124-6">}</span><span·class="o">+</span><span·class="err">\</span><span·class="p">.</span><span·class="p"·data-group-id="3727749124-7">[·...·truncated·by·diffoscope;·len:·894,·SHA:·4b8352b70f49950d1933dbe1d1b6bdf1ecc0ce2112935ffc7b3bd533ad9a3b01·...·]
 180 ··</span><span·class="p"·data-group-id="3727749124-12">{</span><span·class="ss">token</span><span·class="p">,</span><span·class="p"·data-group-id="3727749124-13">{</span><span·class="nb">float</span><span·class="p">,</span><span·class="n">TokenLine</span><span·class="p">,</span><span·class="nf">list_to_float</span><span·class="p"·data-group-id="3727749124-14">(</span><span·class="n">TokenChars</span><span·class="p"·data-group-id="3727749124-14">)</span><span·class="p"·data-group-id="3727749124-13">}</span><span·class="p"·data-group-id="3727749124-12">}</span><span·class="p">.</span></code></pre><p>The·Erlang·code·in·the·<code·class="inline">Erlang·code.</code>·section·is·written·into·the·output·file
181 directly·after·the·module·declaration·and·predefined·exports·declaration,·making181 directly·after·the·module·declaration·and·predefined·exports·declaration,·making
182 it·possible·to·add·extra·exports,·define·imports,·and·other·attributes,·which·are182 it·possible·to·add·extra·exports,·define·imports,·and·other·attributes,·which·are
183 visible·in·the·whole·file.</p><h2·id="module-regular-expressions"·class="section-heading">183 visible·in·the·whole·file.</p><h2·id="module-regular-expressions"·class="section-heading">
184 ··<a·href="#module-regular-expressions"·class="hover-link">184 ··<a·href="#module-regular-expressions"·class="hover-link">
185 ····<i·class="ri-link-m"·aria-hidden="true"></i>185 ····<i·class="ri-link-m"·aria-hidden="true"></i>
186 ··</a>186 ··</a>
187 ··<span·class="text">Regular·Expressions</span>187 ··<span·class="text">Regular·Expressions</span>
Offset 727, 15 lines modifiedOffset 727, 15 lines modified
727 <p>This·is·a·re-entrant·call·to·try·and·scan·a·single·token·from·<code·class="inline">Chars</code>.</p><p>If·there·are·enough·characters·in·<code·class="inline">Chars</code>·to·either·scan·a·token·or727 <p>This·is·a·re-entrant·call·to·try·and·scan·a·single·token·from·<code·class="inline">Chars</code>.</p><p>If·there·are·enough·characters·in·<code·class="inline">Chars</code>·to·either·scan·a·token·or
728 detect·an·error·then·this·will·be·returned·with728 detect·an·error·then·this·will·be·returned·with
729 <code·class="inline">{done,...}</code>.·Otherwise·<code·class="inline">{cont,Cont}</code>·will·be·returned·where·<code·class="inline">Cont</code>·is729 <code·class="inline">{done,...}</code>.·Otherwise·<code·class="inline">{cont,Cont}</code>·will·be·returned·where·<code·class="inline">Cont</code>·is
730 used·in·the·next·call·to·<code·class="inline">token()</code>·with·more·characters·to·try·an·scan730 used·in·the·next·call·to·<code·class="inline">token()</code>·with·more·characters·to·try·an·scan
731 the·token.·This·is·continued·until·a·token·has·been·scanned.·<code·class="inline">Cont</code>·is731 the·token.·This·is·continued·until·a·token·has·been·scanned.·<code·class="inline">Cont</code>·is
732 initially·<code·class="inline">[]</code>.</p><p>It·is·not·designed·to·be·called·directly·by·an·application,·but·is732 initially·<code·class="inline">[]</code>.</p><p>It·is·not·designed·to·be·called·directly·by·an·application,·but·is
733 used·through·the·I/O·system·where·it·can·typically·be·called·in·an733 used·through·the·I/O·system·where·it·can·typically·be·called·in·an
734 application·by:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="4769096495-1">(</span><span·class="n">InFile</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4769096495-2">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p">[·...·truncated·by·diffoscope;·len:·393,·SHA:·13644c906eaf11c460ae1de2d47cf5cea0b7253f37ab35425ed2540b2ad0ea2f·...·]-1">)</span><span·class="w">734 application·by:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="9521783412-1">(</span><span·class="n">InFile</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9521783412-2">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p">[·...·truncated·by·diffoscope;·len:·393,·SHA:·b751e1e11e04bf291ce62ae72cd8251d94115e55d8e9514ef4a0cbfe97bdcb0d·...·]-1">)</span><span·class="w">
735 ··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">TokenRet</span></code></pre>735 ··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">TokenRet</span></code></pre>
736 ··</section>736 ··</section>
737 </section>737 </section>
738 <section·class="detail"·id="tokens/2">738 <section·class="detail"·id="tokens/2">
  
739 ··<div·class="detail-header">739 ··<div·class="detail-header">
740 ····<a·href="#tokens/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">740 ····<a·href="#tokens/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 816, 15 lines modifiedOffset 816, 15 lines modified
816 scan·the·tokens.·This·is·continued·until·all·tokens·have·been816 scan·the·tokens.·This·is·continued·until·all·tokens·have·been
817 scanned.·<code·class="inline">Cont</code>·is·initially·<code·class="inline">[]</code>.</p><p>This·functions·differs·from·<code·class="inline">token</code>·in·that·it·will·continue·to·scan·tokens·up817 scanned.·<code·class="inline">Cont</code>·is·initially·<code·class="inline">[]</code>.</p><p>This·functions·differs·from·<code·class="inline">token</code>·in·that·it·will·continue·to·scan·tokens·up
818 to·and·including·an·<code·class="inline">{end_token,Token}</code>·has·been·scanned·(see·next·section).·It818 to·and·including·an·<code·class="inline">{end_token,Token}</code>·has·been·scanned·(see·next·section).·It
819 will·then·return·all·the·tokens.·This·is·typically·used·for·scanning·grammars819 will·then·return·all·the·tokens.·This·is·typically·used·for·scanning·grammars
820 like·Erlang·where·there·is·an·explicit·end·token,·<code·class="inline">'.'</code>.·If·no·end·token·is820 like·Erlang·where·there·is·an·explicit·end·token,·<code·class="inline">'.'</code>.·If·no·end·token·is
821 found·then·the·whole·file·will·be·scanned·and·returned.·If·an·error·occurs·then821 found·then·the·whole·file·will·be·scanned·and·returned.·If·an·error·occurs·then
822 all·tokens·up·to·and·including·the·next·end·token·will·be·skipped.</p><p>It·is·not·designed·to·be·called·directly·by·an·application,·but·used·through·the822 all·tokens·up·to·and·including·the·next·end·token·will·be·skipped.</p><p>It·is·not·designed·to·be·called·directly·by·an·application,·but·used·through·the
823 I/O·system·where·it·can·typically·be·called·in·an·application·by:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="7732688170-1">(</span><span·class="n">InFile</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7732688170-2">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p">[·...·truncated·by·diffoscope;·len:·394,·SHA:·2191a89eba4a248be26d2169ac6b9009d99fe57271a34ab0c0eaf5cfc6640e8b·...·]-1">)</span><span·class="w">823 I/O·system·where·it·can·typically·be·called·in·an·application·by:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">io</span><span·class="p">:</span><span·class="nf">request</span><span·class="p"·data-group-id="4362314347-1">(</span><span·class="n">InFile</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4362314347-2">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p">[·...·truncated·by·diffoscope;·len:·394,·SHA:·187814b2be75741f2b2a0e1bf8d314299ce6f2ae7a3078789322ce7bd3105acd·...·]-1">)</span><span·class="w">
824 ··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">TokensRet</span></code></pre>824 ··</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">TokensRet</span></code></pre>
825 ··</section>825 ··</section>
826 </section>826 </section>
  
827 ····</div>827 ····</div>
828 ··</section>828 ··</section>
  
97.2 KB
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/parsetools.epub
2.06 KB
zipinfo {}
    
Offset 1, 14 lines modifiedOffset 1, 14 lines modified
1 Zip·file·size:·44529·bytes,·number·of·entries:·121 Zip·file·size:·44530·bytes,·number·of·entries:·12
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:18·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:57·mimetype
3 ?rw-r--r--··2.0·unx····62622·b-·defN·24-Oct-11·20:18·OEBPS/yecc.xhtml3 ?rw-r--r--··2.0·unx····62622·b-·defN·24-Oct-11·20:57·OEBPS/yecc.xhtml
4 ?rw-r--r--··2.0·unx······720·b-·defN·24-Oct-11·20:18·OEBPS/title.xhtml4 ?rw-r--r--··2.0·unx······720·b-·defN·24-Oct-11·20:57·OEBPS/title.xhtml
5 ?rw-r--r--··2.0·unx····31920·b-·defN·24-Oct-11·20:18·OEBPS/notes.xhtml5 ?rw-r--r--··2.0·unx····31920·b-·defN·24-Oct-11·20:57·OEBPS/notes.xhtml
6 ?rw-r--r--··2.0·unx······987·b-·defN·24-Oct-11·20:18·OEBPS/nav.xhtml6 ?rw-r--r--··2.0·unx······987·b-·defN·24-Oct-11·20:57·OEBPS/nav.xhtml
7 ?rw-r--r--··2.0·unx····50638·b-·defN·24-Oct-11·20:18·OEBPS/leex.xhtml7 ?rw-r--r--··2.0·unx····50638·b-·defN·24-Oct-11·20:57·OEBPS/leex.xhtml
8 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-erlang-2EWSTWER.css8 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-erlang-2EWSTWER.css
9 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-CB7BJMUW.js9 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-CB7BJMUW.js
10 ?rw-r--r--··2.0·unx·····1463·b-·defN·24-Oct-11·20:18·OEBPS/content.opf10 ?rw-r--r--··2.0·unx·····1463·b-·defN·24-Oct-11·20:57·OEBPS/content.opf
11 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:18·OEBPS/assets/logo.png11 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:57·OEBPS/assets/logo.png
12 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:18·META-INF/container.xml12 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:57·META-INF/container.xml
13 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:18·META-INF/com.apple.ibooks.display-options.xml13 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:57·META-INF/com.apple.ibooks.display-options.xml
14 12·files,·171518·bytes·uncompressed,·43083·bytes·compressed:··74.9%14 12·files,·171518·bytes·uncompressed,·43084·bytes·compressed:··74.9%
31.3 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
49.1 KB
OEBPS/yecc.xhtml
Max HTML report size reached
13.5 KB
OEBPS/leex.xhtml
Max HTML report size reached
1.21 KB
OEBPS/content.opf
1.17 KB
OEBPS/content.opf
Max HTML report size reached
634 B
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-888771CF.js"></script>124 <script·src="dist/search_data-F88FF550.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
49.2 KB
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/yecc.html
    
Offset 158, 16 lines modifiedOffset 158, 16 lines modified
158 <code·class="inline">{Category,·Position,·Symbol}</code>.</p><p>If·a·terminal·symbol·is·the·only·member·of·a·category,·and·the·symbol·name·is158 <code·class="inline">{Category,·Position,·Symbol}</code>.</p><p>If·a·terminal·symbol·is·the·only·member·of·a·category,·and·the·symbol·name·is
159 identical·to·the·category·name,·the·token·format·can·be·<code·class="inline">{Symbol,·Position}</code>.</p><p>A·list·of·tokens·produced·by·the·scanner·should·end·with·a·special159 identical·to·the·category·name,·the·token·format·can·be·<code·class="inline">{Symbol,·Position}</code>.</p><p>A·list·of·tokens·produced·by·the·scanner·should·end·with·a·special
160 <code·class="inline">end_of_input</code>·tuple·which·the·parser·is·looking·for.·The·format·of·this·tuple160 <code·class="inline">end_of_input</code>·tuple·which·the·parser·is·looking·for.·The·format·of·this·tuple
161 should·be·<code·class="inline">{Endsymbol,·EndPosition}</code>,·where·<code·class="inline">Endsymbol</code>·is·an·identifier·that·is161 should·be·<code·class="inline">{Endsymbol,·EndPosition}</code>,·where·<code·class="inline">Endsymbol</code>·is·an·identifier·that·is
162 distinguished·from·all·the·terminal·and·non-terminal·categories·of·the·syntax162 distinguished·from·all·the·terminal·and·non-terminal·categories·of·the·syntax
163 rules.·The·<code·class="inline">Endsymbol</code>·can·be·declared·in·the·grammar·file.</p><p>The·simplest·case·is·to·segment·the·input·string·into·a·list·of·identifiers163 rules.·The·<code·class="inline">Endsymbol</code>·can·be·declared·in·the·grammar·file.</p><p>The·simplest·case·is·to·segment·the·input·string·into·a·list·of·identifiers
164 (atoms)·and·use·those·atoms·both·as·categories·and·values·of·the·tokens.·For164 (atoms)·and·use·those·atoms·both·as·categories·and·values·of·the·tokens.·For
165 example,·the·input·string·<code·class="inline">aaa·bbb·777,·X</code>·may·be·scanned·(tokenized)·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0290512799-1">[</span><span·class="p"·data-group-id="0290512799-2">{</span><span·class="ss">aaa</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0290512799-2">}</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·1016,·SHA:·7fe34142da0509d8950ed206902e00fa9fd2bb4543fb904c37218f9340c3bbda·...·]-6">}</span><span·class="p">,</span><span·class="w">165 example,·the·input·string·<code·class="inline">aaa·bbb·777,·X</code>·may·be·scanned·(tokenized)·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4991178666-1">[</span><span·class="p"·data-group-id="4991178666-2">{</span><span·class="ss">aaa</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4991178666-2">}</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·1016,·SHA:·7e6f5d72b86f20ca67fc8230ef083895515a5d194c62892616bd54cdcb66d70a·...·]-6">}</span><span·class="p">,</span><span·class="w">
166 ·</span><span·class="p"·data-group-id="0290512799-7">{</span><span·class="ss">&#39;$end&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0290512799-7">}</span><span·class="p"·data-group-id="0290512799-1">]</span><span·class="p">.</span></code></pre><p>This·assumes·that·this·is·the·first·line·of·the·input·text,·and·that·<code·class="inline">'$end'</code>·is166 ·</span><span·class="p"·data-group-id="4991178666-7">{</span><span·class="ss">&#39;$end&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4991178666-7">}</span><span·class="p"·data-group-id="4991178666-1">]</span><span·class="p">.</span></code></pre><p>This·assumes·that·this·is·the·first·line·of·the·input·text,·and·that·<code·class="inline">'$end'</code>·is
167 the·distinguished·<code·class="inline">end_of_input</code>·symbol.</p><p>The·Erlang·scanner·in·the·<code·class="inline">io</code>·module·can·be·used·as·a·starting·point·when167 the·distinguished·<code·class="inline">end_of_input</code>·symbol.</p><p>The·Erlang·scanner·in·the·<code·class="inline">io</code>·module·can·be·used·as·a·starting·point·when
168 writing·a·new·scanner.·Study·<code·class="inline">yeccscan.erl</code>·in·order·to·see·how·a·filter·can·be168 writing·a·new·scanner.·Study·<code·class="inline">yeccscan.erl</code>·in·order·to·see·how·a·filter·can·be
169 added·on·top·of·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#scan_erl_form/3"><code·class="inline">io:scan_erl_form/3</code></a>·to·provide·a·scanner·for·Yecc·that169 added·on·top·of·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#scan_erl_form/3"><code·class="inline">io:scan_erl_form/3</code></a>·to·provide·a·scanner·for·Yecc·that
170 tokenizes·grammar·files·before·parsing·them·with·the·Yecc·parser.·A·more·general170 tokenizes·grammar·files·before·parsing·them·with·the·Yecc·parser.·A·more·general
171 approach·to·scanner·implementation·is·to·use·a·scanner·generator·such·as171 approach·to·scanner·implementation·is·to·use·a·scanner·generator·such·as
172 <a·href="leex.html"><code·class="inline">leex</code></a>.</p><h2·id="module-grammar-definition-format"·class="section-heading">172 <a·href="leex.html"><code·class="inline">leex</code></a>.</p><h2·id="module-grammar-definition-format"·class="section-heading">
173 ··<a·href="#module-grammar-definition-format"·class="hover-link">173 ··<a·href="#module-grammar-definition-format"·class="hover-link">
Offset 229, 29 lines modifiedOffset 229, 29 lines modified
229 list·-&gt;·'('·')'.229 list·-&gt;·'('·')'.
230 list·-&gt;·'('·elements·')'.230 list·-&gt;·'('·elements·')'.
231 elements·-&gt;·element.231 elements·-&gt;·element.
232 elements·-&gt;·element·elements.232 elements·-&gt;·element·elements.
233 element·-&gt;·atom.233 element·-&gt;·atom.
234 element·-&gt;·list.</code></pre><p>This·grammar·can·be·used·to·generate·a·parser·which·parses·list·expressions,234 element·-&gt;·list.</code></pre><p>This·grammar·can·be·used·to·generate·a·parser·which·parses·list·expressions,
235 such·as·<code·class="inline">(),·(a),·(peter·charles),·(a·(b·c)·d·(())),·...</code>·provided·that·your235 such·as·<code·class="inline">(),·(a),·(peter·charles),·(a·(b·c)·d·(())),·...</code>·provided·that·your
236 scanner·tokenizes,·for·example,·the·input·<code·class="inline">(peter·charles)</code>·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4738255365-1">[</span><span·class="p"·data-group-id="4738255365-2">{</span><span·class="ss">&#39;(&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4738255365-2">}</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·919,·SHA:·03ebd2f397c24eb8653ad76d32d30c17b7d5be555fcebef633e0bc8c3237ffc4·...·]5-5">}</span><span·class="p">,</span><span·class="w">236 scanner·tokenizes,·for·example,·the·input·<code·class="inline">(peter·charles)</code>·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7519387525-1">[</span><span·class="p"·data-group-id="7519387525-2">{</span><span·class="ss">&#39;(&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="7519387525-2">}</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·919,·SHA:·029e9c7c2cbc53096b8a204ef0d38b9f35105d161a40ad2a9a914d3310d714f1·...·]5-5">}</span><span·class="p">,</span><span·class="w">
237 ·</span><span·class="p"·data-group-id="4738255365-6">{</span><span·class="ss">&#39;$end&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4738255365-6">}</span><span·class="p"·data-group-id="4738255365-1">]</span></code></pre><p>When·a·grammar·rule·is·used·by·the·parser·to·parse·(part·of)·the·input·string·as237 ·</span><span·class="p"·data-group-id="7519387525-6">{</span><span·class="ss">&#39;$end&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="7519387525-6">}</span><span·class="p"·data-group-id="7519387525-1">]</span></code></pre><p>When·a·grammar·rule·is·used·by·the·parser·to·parse·(part·of)·the·input·string·as
238 a·grammatical·phrase,·the·associated·code·is·evaluated,·and·the·value·of·the238 a·grammatical·phrase,·the·associated·code·is·evaluated,·and·the·value·of·the
239 last·expression·becomes·the·value·of·the·parsed·phrase.·This·value·may·be·used239 last·expression·becomes·the·value·of·the·parsed·phrase.·This·value·may·be·used
240 by·the·parser·later·to·build·structures·that·are·values·of·higher·phrases·of240 by·the·parser·later·to·build·structures·that·are·values·of·higher·phrases·of
241 which·the·current·phrase·is·a·part.·The·values·initially·associated·with241 which·the·current·phrase·is·a·part.·The·values·initially·associated·with
242 terminal·category·phrases,·i.e.·input·tokens,·are·the·token·tuples·themselves.</p><p>Below·is·an·example·of·the·grammar·above·with·structure·building·code·added:</p><pre><code·class="text">list·-&gt;·'('·')'·:·nil.242 terminal·category·phrases,·i.e.·input·tokens,·are·the·token·tuples·themselves.</p><p>Below·is·an·example·of·the·grammar·above·with·structure·building·code·added:</p><pre><code·class="text">list·-&gt;·'('·')'·:·nil.
243 list·-&gt;·'('·elements·')'·:·'$2'.243 list·-&gt;·'('·elements·')'·:·'$2'.
244 elements·-&gt;·element·:·{cons,·'$1',·nil}.244 elements·-&gt;·element·:·{cons,·'$1',·nil}.
245 elements·-&gt;·element·elements·:·{cons,·'$1',·'$2'}.245 elements·-&gt;·element·elements·:·{cons,·'$1',·'$2'}.
246 element·-&gt;·atom·:·'$1'.246 element·-&gt;·atom·:·'$1'.
247 element·-&gt;·list·:·'$1'.</code></pre><p>With·this·code·added·to·the·grammar·rules,·the·parser·produces·the·following247 element·-&gt;·list·:·'$1'.</code></pre><p>With·this·code·added·to·the·grammar·rules,·the·parser·produces·the·following
248 value·(structure)·when·parsing·the·input·string·<code·class="inline">(a·b·c).</code>.·This·still·assumes248 value·(structure)·when·parsing·the·input·string·<code·class="inline">(a·b·c).</code>.·This·still·assumes
249 that·this·was·the·first·input·line·that·the·scanner·tokenized:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9416340926-1">{</span><span·class="ss">cons</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9416340926-2">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·566,·SHA:·03677914c931e94d69dfcff30bf12a532c73498b4e88b0347c48688fa4726c52·...·]6-4">}</span><span·class="p">,</span><span·class="w">249 that·this·was·the·first·input·line·that·the·scanner·tokenized:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2726617716-1">{</span><span·class="ss">cons</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2726617716-2">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·566,·SHA:·0395aa5fc2f9ccc7f391bb2eb405229ceb2625f0eaa17ced951cbeb04b1b2a76·...·]6-4">}</span><span·class="p">,</span><span·class="w">
250 ····························</span><span·class="p"·data-group-id="9416340926-5">{</span><span·class="ss">cons</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9416340926-6">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·343,·SHA:·30576539be22555711aa36e7254b7a99dec2d51649194c6e476b23450999134b·...·]6-1">}</span></code></pre><p>The·associated·code·contains·<code·class="inline">pseudo·variables</code>·<code·class="inline">'$1'</code>,·<code·class="inline">'$2'</code>,250 ····························</span><span·class="p"·data-group-id="2726617716-5">{</span><span·class="ss">cons</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2726617716-6">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·343,·SHA:·00ac7b7128ba3b357a2b9a01300266cdf3f0e0a57c6cc1f8986b6f851f94295c·...·]6-1">}</span></code></pre><p>The·associated·code·contains·<code·class="inline">pseudo·variables</code>·<code·class="inline">'$1'</code>,·<code·class="inline">'$2'</code>,
251 <code·class="inline">'$3'</code>,·and·so·on.··which·refer·to·(are·bound·to)·the·values251 <code·class="inline">'$3'</code>,·and·so·on.··which·refer·to·(are·bound·to)·the·values
252 associated·previously·by·the·parser·with·the·symbols·of·the·right-hand252 associated·previously·by·the·parser·with·the·symbols·of·the·right-hand
253 side·of·the·rule.·When·these·symbols·are·terminal·categories,·the253 side·of·the·rule.·When·these·symbols·are·terminal·categories,·the
254 values·are·token·tuples·of·the·input·string·(see·above).</p><p>The·associated·code·may·not·only·be·used·to·build·structures254 values·are·token·tuples·of·the·input·string·(see·above).</p><p>The·associated·code·may·not·only·be·used·to·build·structures
255 associated·with·phrases,·but·may·also·be·used·for·syntactic·and255 associated·with·phrases,·but·may·also·be·used·for·syntactic·and
256 semantic·tests,·printout·actions·(for·example·for·tracing),·and·so·on256 semantic·tests,·printout·actions·(for·example·for·tracing),·and·so·on
257 during·the·parsing·process.·Since·tokens·contain·positional·(line257 during·the·parsing·process.·Since·tokens·contain·positional·(line
Offset 266, 37 lines modifiedOffset 266, 37 lines modified
266 element·-&gt;·atom·:·'$1'.266 element·-&gt;·atom·:·'$1'.
267 element·-&gt;·list·:·'$1'.</code></pre><h2·id="module-generating-a-parser"·class="section-heading">267 element·-&gt;·list·:·'$1'.</code></pre><h2·id="module-generating-a-parser"·class="section-heading">
268 ··<a·href="#module-generating-a-parser"·class="hover-link">268 ··<a·href="#module-generating-a-parser"·class="hover-link">
269 ····<i·class="ri-link-m"·aria-hidden="true"></i>269 ····<i·class="ri-link-m"·aria-hidden="true"></i>
270 ··</a>270 ··</a>
271 ··<span·class="text">Generating·a·Parser</span>271 ··<span·class="text">Generating·a·Parser</span>
272 </h2>272 </h2>
273 <p>To·call·the·parser·generator,·use·the·following·command:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">yecc</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="5803266839-1">(</span><span·class="n">Grammarfile</span><span·class="p"·data-group-id="5803266839-1">)</span><span·class="p">.</span></code></pre><p>An·error·message·from·Yecc·will·be·shown·if·the·grammar·is·not·of·the·LALR·type273 <p>To·call·the·parser·generator,·use·the·following·command:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">yecc</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="5747973652-1">(</span><span·class="n">Grammarfile</span><span·class="p"·data-group-id="5747973652-1">)</span><span·class="p">.</span></code></pre><p>An·error·message·from·Yecc·will·be·shown·if·the·grammar·is·not·of·the·LALR·type
274 (for·example·too·ambiguous).·Shift/reduce·conflicts·are·resolved·in·favor·of274 (for·example·too·ambiguous).·Shift/reduce·conflicts·are·resolved·in·favor·of
275 shifting·if·there·are·no·operator·precedence·declarations.·Refer·to·the·<code·class="inline">yacc</code>275 shifting·if·there·are·no·operator·precedence·declarations.·Refer·to·the·<code·class="inline">yacc</code>
276 documentation·on·the·use·of·operator·precedence.</p><p>The·output·file·contains·Erlang·source·code·for·a·parser·module·with·module·name276 documentation·on·the·use·of·operator·precedence.</p><p>The·output·file·contains·Erlang·source·code·for·a·parser·module·with·module·name
277 equal·to·the·<code·class="inline">Parserfile</code>·parameter.·After·compilation,·the·parser·can·be·called277 equal·to·the·<code·class="inline">Parserfile</code>·parameter.·After·compilation,·the·parser·can·be·called
278 as·follows·(the·module·name·is·assumed·to·be·<code·class="inline">myparser</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">myparser</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="3818017666-1">(</span><span·class="nc">myscanner</span><span·class="p">:</span><span·class="nf">scan</span><span·class="p"·data-group-id="3818017666-2">(</span><span·class="n">Inport</span><span·class="p"·data-group-id="3818017666-2">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·3b02a50074fe87f2473b04515fb2411d9ee2613b18c915d0fdca599b34f93163·...·]-1">)</span></code></pre><p>The·call·format·can·be·different·if·a·customized·prologue·file·has·been·included278 as·follows·(the·module·name·is·assumed·to·be·<code·class="inline">myparser</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">myparser</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="7351287384-1">(</span><span·class="nc">myscanner</span><span·class="p">:</span><span·class="nf">scan</span><span·class="p"·data-group-id="7351287384-2">(</span><span·class="n">Inport</span><span·class="p"·data-group-id="7351287384-2">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·872da61b739424752cfea941de745e69744f9edf066b1162705f3015cdd35a1f·...·]-1">)</span></code></pre><p>The·call·format·can·be·different·if·a·customized·prologue·file·has·been·included
279 when·generating·the·parser·instead·of·the·default·file279 when·generating·the·parser·instead·of·the·default·file
280 <code·class="inline">lib/parsetools/include/yeccpre.hrl</code>.</p><p>With·the·standard·prologue,·this·call·will·return·either·<code·class="inline">{ok,·Result}</code>,·where280 <code·class="inline">lib/parsetools/include/yeccpre.hrl</code>.</p><p>With·the·standard·prologue,·this·call·will·return·either·<code·class="inline">{ok,·Result}</code>,·where
281 <code·class="inline">Result</code>·is·a·structure·that·the·Erlang·code·of·the·grammar·file·has·built,·or281 <code·class="inline">Result</code>·is·a·structure·that·the·Erlang·code·of·the·grammar·file·has·built,·or
282 <code·class="inline">{error,·{Position,·Module,·Message}}</code>·if·there·was·a·syntax·error·in·the·input.</p><p><code·class="inline">Message</code>·is·something·which·may·be·converted·into·a·string·by·calling282 <code·class="inline">{error,·{Position,·Module,·Message}}</code>·if·there·was·a·syntax·error·in·the·input.</p><p><code·class="inline">Message</code>·is·something·which·may·be·converted·into·a·string·by·calling
283 <code·class="inline">Module:format_error(Message)</code>·and·printed·with·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#format/3"><code·class="inline">io:format/3</code></a>.</p><blockquote><h4·class="info">Note</h4><p>By·default,·the·parser·that·was·generated·will·not·print·out·error·messages·to283 <code·class="inline">Module:format_error(Message)</code>·and·printed·with·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#format/3"><code·class="inline">io:format/3</code></a>.</p><blockquote><h4·class="info">Note</h4><p>By·default,·the·parser·that·was·generated·will·not·print·out·error·messages·to
284 the·screen.·The·user·will·have·to·do·this·either·by·printing·the·returned284 the·screen.·The·user·will·have·to·do·this·either·by·printing·the·returned
285 error·messages,·or·by·inserting·tests·and·print·instructions·in·the·Erlang285 error·messages,·or·by·inserting·tests·and·print·instructions·in·the·Erlang
286 code·associated·with·the·syntax·rules·of·the·grammar·file.</p></blockquote><p>It·is·also·possible·to·make·the·parser·ask·for·more·input·tokens·when·needed·if286 code·associated·with·the·syntax·rules·of·the·grammar·file.</p></blockquote><p>It·is·also·possible·to·make·the·parser·ask·for·more·input·tokens·when·needed·if
287 the·following·call·format·is·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">myparser</span><span·class="p">:</span><span·class="nf">parse_and_scan</span><span·class="p"·data-group-id="5574716088-1">(</span><span·class="p"·data-group-id="5574716088-2">{</span><span·class="n">Function</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="5574716088-2">}</span><span·class="p"·data-group-id="5574716088-1">)</span><span·class="w"> 
288 </span><span·class="nc">myparser</span><span·class="p">:</span><span·class="nf">parse_and_scan</span><span·class="p"·data-group-id="5574716088-3">(</span><span·class="p"·data-group-id="5574716088-4">{</span><span·class="n">Mod</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·386,·SHA:·4d65e29529c81a6554e1edd81bfcc0203da031d9384a3f711257fd891980d6c4·...·]287 the·following·call·format·is·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">myparser</span><span·class="p">:</span><span·class="nf">parse_and_scan</span><span·class="p"·data-group-id="3512307666-1">(</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·258,·SHA:·409d32c4299ed599a395320a95f7fda1558bd833a13da0944d3212af7db71347·...·]
 288 </span><span·class="nc">myparser</span><span·class="p">:</span><span·class="nf">parse_and_scan</span><span·class="p"·data-group-id="3512307666-3">(</span><span·class="p"·data-group-id="3512307666-4">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tokenizer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Args</span><span·class="p"·data-group-id="3512307666-4">}</span><span·class="p"·data-group-id="3512307666-3">)</span></code></pre><p>The·tokenizer·<code·class="inline">Function</code>·is·either·a·fun·or·a·tuple·<code·class="inline">{Mod,·Tokenizer}</code>.·The·call
289 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/2"><code·class="inline">apply(Function,·Args)</code></a>·or289 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/2"><code·class="inline">apply(Function,·Args)</code></a>·or
290 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/2"><code·class="inline">apply({Mod,·Tokenizer},·Args)</code></a>·is·executed·whenever·a·new·token·is290 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/2"><code·class="inline">apply({Mod,·Tokenizer},·Args)</code></a>·is·executed·whenever·a·new·token·is
291 needed.·This,·for·example,·makes·it·possible·to·parse·from·a·file,·token·by291 needed.·This,·for·example,·makes·it·possible·to·parse·from·a·file,·token·by
292 token.</p><p>The·tokenizer·used·above·has·to·be·implemented·so·as·to·return·one·of·the292 token.</p><p>The·tokenizer·used·above·has·to·be·implemented·so·as·to·return·one·of·the
293 following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2340360821-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tokens</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EndPosition</span><span·class="p"·data-group-id="2340360821-1">}</span><span·class="w">293 following:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2939836022-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tokens</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EndPosition</span><span·class="p"·data-group-id="2939836022-1">}</span><span·class="w">
294 </span><span·class="p"·data-group-id="2340360821-2">{</span><span·class="ss">eof</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EndPosition</span><span·class="p"·data-group-id="2340360821-2">}</span><span·class="w">294 </span><span·class="p"·data-group-id="2939836022-2">{</span><span·class="ss">eof</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EndPosition</span><span·class="p"·data-group-id="2939836022-2">}</span><span·class="w">
295 </span><span·class="p"·data-group-id="2340360821-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error_description</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EndPosition</span><span·class="p"·data-group-id="23403[·...·truncated·by·diffoscope;·len:·5,·SHA:·0538b84781731f7e693005c0536d3b531d69e5396571431a87836948e8ecbabc·...·]-3">}</span></code></pre><p>This·conforms·to·the·format·used·by·the·scanner·in·the·Erlang·<code·class="inline">io</code>·library295 </span><span·class="p"·data-group-id="2939836022-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error_description</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EndPosition</span><span·class="p"·data-group-id="29398[·...·truncated·by·diffoscope;·len:·5,·SHA:·850e79665d8ac8608cf3a320d95f3b254b83a211d467a141dfe41f2f78cd1374·...·]-3">}</span></code></pre><p>This·conforms·to·the·format·used·by·the·scanner·in·the·Erlang·<code·class="inline">io</code>·library
296 module.</p><p>If·<code·class="inline">{eof,·EndPosition}</code>·is·returned·immediately,·the·call·to·<code·class="inline">parse_and_scan/1</code>296 module.</p><p>If·<code·class="inline">{eof,·EndPosition}</code>·is·returned·immediately,·the·call·to·<code·class="inline">parse_and_scan/1</code>
297 returns·<code·class="inline">{ok,·eof}</code>.·If·<code·class="inline">{eof,·EndPosition}</code>·is·returned·before·the·parser297 returns·<code·class="inline">{ok,·eof}</code>.·If·<code·class="inline">{eof,·EndPosition}</code>·is·returned·before·the·parser
298 expects·end·of·input,·<code·class="inline">parse_and_scan/1</code>·will,·of·course,·return·an·error298 expects·end·of·input,·<code·class="inline">parse_and_scan/1</code>·will,·of·course,·return·an·error
299 message·(see·above).·Otherwise·<code·class="inline">{ok,·Result}</code>·is·returned.</p><h2·id="module-more-examples"·class="section-heading">299 message·(see·above).·Otherwise·<code·class="inline">{ok,·Result}</code>·is·returned.</p><h2·id="module-more-examples"·class="section-heading">
300 ··<a·href="#module-more-examples"·class="hover-link">300 ··<a·href="#module-more-examples"·class="hover-link">
301 ····<i·class="ri-link-m"·aria-hidden="true"></i>301 ····<i·class="ri-link-m"·aria-hidden="true"></i>
302 ··</a>302 ··</a>
Offset 338, 44 lines modifiedOffset 338, 44 lines modified
338 </span><span·class="n">Terminals</span><span·class="w">338 </span><span·class="n">Terminals</span><span·class="w">
339 </span><span·class="ss">atom</span><span·class="w">·</span><span·class="nb">float</span><span·class="w">·</span><span·class="ss">integer</span><span·class="w">·</span><span·class="ss">reserved_symbol</span><span·class="w">·</span><span·class="ss">reserved_word</span><span·class="w">·</span><span·class="ss">string</span><span·class="w">·</span><span·class="ss">char</span><span·class="w">·</span><span·class="ss">var</span><span·class="w">339 </span><span·class="ss">atom</span><span·class="w">·</span><span·class="nb">float</span><span·class="w">·</span><span·class="ss">integer</span><span·class="w">·</span><span·class="ss">reserved_symbol</span><span·class="w">·</span><span·class="ss">reserved_word</span><span·class="w">·</span><span·class="ss">string</span><span·class="w">·</span><span·class="ss">char</span><span·class="w">·</span><span·class="ss">var</span><span·class="w">
340 </span><span·class="ss">&#39;-&gt;&#39;</span><span·class="w">·</span><span·class="ss">&#39;:&#39;</span><span·class="w">·</span><span·class="ss">dot</span><span·class="p">.</span><span·class="w">340 </span><span·class="ss">&#39;-&gt;&#39;</span><span·class="w">·</span><span·class="ss">&#39;:&#39;</span><span·class="w">·</span><span·class="ss">dot</span><span·class="p">.</span><span·class="w">
341 </span><span·class="n">Rootsymbol</span><span·class="w">·</span><span·class="ss">grammar</span><span·class="p">.</span><span·class="w">341 </span><span·class="n">Rootsymbol</span><span·class="w">·</span><span·class="ss">grammar</span><span·class="p">.</span><span·class="w">
342 </span><span·class="n">Endsymbol</span><span·class="w">·</span><span·class="ss">&#39;$end&#39;</span><span·class="p">.</span><span·class="w">342 </span><span·class="n">Endsymbol</span><span·class="w">·</span><span·class="ss">&#39;$end&#39;</span><span·class="p">.</span><span·class="w">
343 </span><span·class="ss">grammar</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">declaration</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">343 </span><span·class="ss">grammar</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">declaration</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
344 </span><span·class="ss">grammar</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">rule</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">344 </span><span·class="ss">grammar</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">rule</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
345 </span><span·class="ss">declaration</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="ss">symbols</span><span·class="w">·</span><span·class="nc">dot</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-1">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="5174066123-1">}</span><span·class="p">.</span><span·class="w">345 </span><span·class="ss">declaration</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="ss">symbols</span><span·class="w">·</span><span·class="nc">dot</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-1">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="4055621005-1">}</span><span·class="p">.</span><span·class="w">
346 </span><span·class="ss">rule</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">head</span><span·class="w">·</span><span·class="ss">&#39;-&gt;&#39;</span><span·class="w">·</span><span·class="ss">symbols</span><span·class="w">·</span><span·class="ss">attached_code</span><span·class="w">·</span><span·class="nc">dot</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-2">{</span><span·class="ss">rule</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·80,·SHA:·080de8954f660889bbf151b787385f910e36e4949f2cdbe6c7ca28719fe2e02d·...·]-3">]</span><span·class="p">,</span><span·class="w">346 </span><span·class="ss">rule</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">head</span><span·class="w">·</span><span·class="ss">&#39;-&gt;&#39;</span><span·class="w">·</span><span·class="ss">symbols</span><span·class="w">·</span><span·class="ss">attached_code</span><span·class="w">·</span><span·class="nc">dot</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-2">{</span><span·class="ss">rule</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-3">[</span><span·class="ss">&#39;$1&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·80,·SHA:·1d3ec6f3ca290351eaa20652b7c0b02bfdab955cce68a90a76d01fe700009559·...·]-3">]</span><span·class="p">,</span><span·class="w">
347 ········</span><span·class="ss">&#39;$4&#39;</span><span·class="p"·data-group-id="5174066123-2">}</span><span·class="p">.</span><span·class="w">347 ········</span><span·class="ss">&#39;$4&#39;</span><span·class="p"·data-group-id="4055621005-2">}</span><span·class="p">.</span><span·class="w">
348 </span><span·class="ss">head</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">348 </span><span·class="ss">head</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
349 </span><span·class="ss">symbols</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-4">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-4">]</span><span·class="p">.</span><span·class="w">349 </span><span·class="ss">symbols</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-4">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-4">]</span><span·class="p">.</span><span·class="w">
350 </span><span·class="ss">symbols</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="ss">symbols</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-5">[</span><span·class="ss">&#39;$1&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="5174066123-5">]</span><span·class="p">.</span><span·class="w">350 </span><span·class="ss">symbols</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">symbol</span><span·class="w">·</span><span·class="ss">symbols</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-5">[</span><span·class="ss">&#39;$1&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="4055621005-5">]</span><span·class="p">.</span><span·class="w">
351 </span><span·class="ss">attached_code</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;:&#39;</span><span·class="w">·</span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-6">{</span><span·class="ss">erlang_code</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="5174066123-6">}</span><span·class="p">.</span><span·class="w">351 </span><span·class="ss">attached_code</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;:&#39;</span><span·class="w">·</span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-6">{</span><span·class="ss">erlang_code</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="4055621005-6">}</span><span·class="p">.</span><span·class="w">
352 </span><span·class="ss">attached_code</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;$empty&#39;</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-7">{</span><span·class="ss">erlang_code</span><span·class="p">,</span><span·class="w">352 </span><span·class="ss">attached_code</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;$empty&#39;</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-7">{</span><span·class="ss">erlang_code</span><span·class="p">,</span><span·class="w">
353 ·················</span><span·class="p"·data-group-id="5174066123-8">[</span><span·class="p"·data-group-id="5174066123-9">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$undefined[·...·truncated·by·diffoscope;·len:·159,·SHA:·e70ca551d956c25bfc34aa39d260a9fe86ec4dbae97a90e27c0e37ec27fb3ace·...·]-7">}</span><span·class="p">.</span><span·class="w">353 ·················</span><span·class="p"·data-group-id="4055621005-8">[</span><span·class="p"·data-group-id="4055621005-9">{</span><span·class="ss">atom</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$undefined[·...·truncated·by·diffoscope;·len:·159,·SHA:·4cdc970a5ce9a2bb1f1da47e0a55c151285b1ad1b262c996504b1d3aaa3a08b7·...·]-7">}</span><span·class="p">.</span><span·class="w">
354 </span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">token</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-10">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-10">]</span><span·class="p">.</span><span·class="w">354 </span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">token</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-10">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-10">]</span><span·class="p">.</span><span·class="w">
355 </span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">token</span><span·class="w">·</span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-11">[</span><span·class="ss">&#39;$1&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="5174066123-11">]</span><span·class="p">.</span><span·class="w">355 </span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">token</span><span·class="w">·</span><span·class="ss">tokens</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-11">[</span><span·class="ss">&#39;$1&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="4055621005-11">]</span><span·class="p">.</span><span·class="w">
356 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">var</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-12">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-12">)</span><span·class="p">.</span><span·class="w">356 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">var</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-12">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-12">)</span><span·class="p">.</span><span·class="w">
357 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">atom</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-13">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-13">)</span><span·class="p">.</span><span·class="w">357 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">atom</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-13">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-13">)</span><span·class="p">.</span><span·class="w">
358 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">integer</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-14">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-14">)</span><span·class="p">.</span><span·class="w">358 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">integer</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-14">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-14">)</span><span·class="p">.</span><span·class="w">
359 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">reserved_word</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-15">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-15">)</span><span·class="p">.</span><span·class="w">359 </span><span·class="ss">symbol</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">reserved_word</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-15">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-15">)</span><span·class="p">.</span><span·class="w">
360 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">var</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">360 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">var</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
361 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">atom</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">361 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">atom</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
362 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nb">float</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">362 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nb">float</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
363 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">integer</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">363 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">integer</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
364 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">string</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">364 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">string</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
365 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">char</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">365 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">char</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p">.</span><span·class="w">
366 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">reserved_symbol</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-16">{</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-17">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-17">)</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·207,·SHA:·1b047747eb68f85c89d6dba41150fe668ec4542d53f4975e6917d3dbbfa7db84·...·]-16">}</span><span·class="p">.</span><span·class="w">366 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">reserved_symbol</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-16">{</span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-17">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-17">)</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·207,·SHA:·89d4a28ffc433284ff9443b6afdaabf78eaa20655901bf2df6ed88adc12d9d8f·...·]-16">}</span><span·class="p">.</span><span·class="w">
367 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">reserved_word</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-19">{</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-20">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5174066123-20">)</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·207,·SHA:·ee785dcb9d1bd442a4fd6b37c5a719cd5168c0a9b0a0dc87cdb4b6182d0b7530·...·]-19">}</span><span·class="p">.</span><span·class="w">367 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">reserved_word</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-19">{</span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-20">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="4055621005-20">)</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·207,·SHA:·62c5a8ad78c316f82683a7037fa565cf2a5d52f0d83418476119bb61378c55d5·...·]-19">}</span><span·class="p">.</span><span·class="w">
368 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;-&gt;&#39;</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-22">{</span><span·class="ss">&#39;-&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">line_of</span><span·class="p"·data-group-id="5174066123-23">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·70,·SHA:·32a5d11c1f66cb2d04ea988de85c91e46c9a4b1d4b9c9444a79e261c2cc1fb04·...·]-22">}</span><span·class="p">.</span><span·class="w">368 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;-&gt;&#39;</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-22">{</span><span·class="ss">&#39;-&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">line_of</span><span·class="p"·data-group-id="4055621005-23">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·70,·SHA:·64b3cd16fba60dba71591546a5a19e30ee64b64c67b541867a9a156095309b75·...·]-22">}</span><span·class="p">.</span><span·class="w">
369 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;:&#39;</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5174066123-24">{</span><span·class="ss">&#39;:&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">line_of</span><span·class="p"·data-group-id="5174066123-25">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·6b2a3818420144e8a98613955caedb76f1d2e50d62d529306a90368f36335b92·...·]-24">}</span><span·class="p">.</span><span·class="w">369 </span><span·class="ss">token</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">&#39;:&#39;</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4055621005-24">{</span><span·class="ss">&#39;:&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">line_of</span><span·class="p"·data-group-id="4055621005-25">(</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·66,·SHA:·2885bd01c10aa1291b56247634cb6692386cb1c43903d6160fcdb7e5fed03eee·...·]-24">}</span><span·class="p">.</span><span·class="w">
370 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">code</span><span·class="p">.</span><span·class="w">370 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">code</span><span·class="p">.</span><span·class="w">
371 </span><span·class="nf">value_of</span><span·class="p"·data-group-id="5174066123-26">(</span><span·class="n">Token</span><span·class="p"·data-group-id="5174066123-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">371 </span><span·class="nf">value_of</span><span·class="p"·data-group-id="4055621005-26">(</span><span·class="n">Token</span><span·class="p"·data-group-id="4055621005-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
372 ····</span><span·class="nf">element</span><span·class="p"·data-group-id="5174066123-27">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Token</span><span·class="p"·data-group-id="5174066123-27">)</span><span·class="p">.</span><span·class="w">372 ····</span><span·class="nf">element</span><span·class="p"·data-group-id="4055621005-27">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Token</span><span·class="p"·data-group-id="4055621005-27">)</span><span·class="p">.</span><span·class="w">
373 </span><span·class="nf">line_of</span><span·class="p"·data-group-id="5174066123-28">(</span><span·class="n">Token</span><span·class="p"·data-group-id="5174066123-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">373 </span><span·class="nf">line_of</span><span·class="p"·data-group-id="4055621005-28">(</span><span·class="n">Token</span><span·class="p"·data-group-id="4055621005-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
374 ····</span><span·class="nf">element</span><span·class="p"·data-group-id="5174066123-29">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Token</span><span·class="p"·data-group-id="5174066123-29">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>The·symbols·<code·class="inline">'-&gt;'</code>,·and·<code·class="inline">':'</code>·have·to·be·treated·in·a·special·way,·as·they·are374 ····</span><span·class="nf">element</span><span·class="p"·data-group-id="4055621005-29">(</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Token</span><span·class="p"·data-group-id="4055621005-29">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>The·symbols·<code·class="inline">'-&gt;'</code>,·and·<code·class="inline">':'</code>·have·to·be·treated·in·a·special·way,·as·they·are
375 meta·symbols·of·the·grammar·notation,·as·well·as·terminal·symbols·of·the·Yecc375 meta·symbols·of·the·grammar·notation,·as·well·as·terminal·symbols·of·the·Yecc
376 grammar.</p></blockquote><p>5.·The·file·<code·class="inline">erl_parse.yrl</code>·in·the·<code·class="inline">lib/stdlib/src</code>·directory·contains·the376 grammar.</p></blockquote><p>5.·The·file·<code·class="inline">erl_parse.yrl</code>·in·the·<code·class="inline">lib/stdlib/src</code>·directory·contains·the
377 grammar·for·Erlang.</p><blockquote><h4·class="info">Note</h4><p>Syntactic·tests·are·used·in·the·code·associated·with·some·rules,·and·an·error377 grammar·for·Erlang.</p><blockquote><h4·class="info">Note</h4><p>Syntactic·tests·are·used·in·the·code·associated·with·some·rules,·and·an·error
378 is·thrown·(and·caught·by·the·generated·parser·to·produce·an·error·message)378 is·thrown·(and·caught·by·the·generated·parser·to·produce·an·error·message)
Max diff block lines reached; 223/50211 bytes (0.44%) of diff not shown.
651 B
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/.build
    
Offset 14, 15 lines modifiedOffset 14, 15 lines modified
14 dist/lato-latin-300-normal-YUMVEFOL.woff214 dist/lato-latin-300-normal-YUMVEFOL.woff2
15 dist/lato-latin-400-normal-W7754I4D.woff215 dist/lato-latin-400-normal-W7754I4D.woff2
16 dist/lato-latin-700-normal-2XVSBPG4.woff216 dist/lato-latin-700-normal-2XVSBPG4.woff2
17 dist/lato-latin-ext-300-normal-VPGGJKJL.woff217 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
18 dist/lato-latin-ext-400-normal-N27NCBWW.woff218 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
19 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff219 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
20 dist/remixicon-NKANDIL5.woff220 dist/remixicon-NKANDIL5.woff2
21 dist/search_data-E998F0E5.js21 dist/search_data-118C23D3.js
22 dist/sidebar_items-FB06B32D.js22 dist/sidebar_items-FB06B32D.js
23 index.html23 index.html
24 notes.html24 notes.html
25 public_key.html25 public_key.html
26 public_key_app.html26 public_key_app.html
27 public_key_records.html27 public_key_records.html
28 search.html28 search.html
374 KB
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/public_key.epub
2.42 KB
zipinfo {}
    
Offset 1, 16 lines modifiedOffset 1, 16 lines modified
1 Zip·file·size:·95950·bytes,·number·of·entries:·141 Zip·file·size:·95954·bytes,·number·of·entries:·14
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:20·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx···123453·b-·defN·24-Oct-11·20:20·OEBPS/using_public_key.xhtml3 ?rw-r--r--··2.0·unx···123453·b-·defN·24-Oct-11·20:59·OEBPS/using_public_key.xhtml
4 ?rw-r--r--··2.0·unx······726·b-·defN·24-Oct-11·20:20·OEBPS/title.xhtml4 ?rw-r--r--··2.0·unx······726·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
5 ?rw-r--r--··2.0·unx····64574·b-·defN·24-Oct-11·20:20·OEBPS/public_key_records.xhtml5 ?rw-r--r--··2.0·unx····64574·b-·defN·24-Oct-11·20:59·OEBPS/public_key_records.xhtml
6 ?rw-r--r--··2.0·unx·····4198·b-·defN·24-Oct-11·20:20·OEBPS/public_key_app.xhtml6 ?rw-r--r--··2.0·unx·····4198·b-·defN·24-Oct-11·20:59·OEBPS/public_key_app.xhtml
7 ?rw-r--r--··2.0·unx···201058·b-·defN·24-Oct-11·20:20·OEBPS/public_key.xhtml7 ?rw-r--r--··2.0·unx···201058·b-·defN·24-Oct-11·20:59·OEBPS/public_key.xhtml
8 ?rw-r--r--··2.0·unx····69214·b-·defN·24-Oct-11·20:20·OEBPS/notes.xhtml8 ?rw-r--r--··2.0·unx····69214·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
9 ?rw-r--r--··2.0·unx·····1240·b-·defN·24-Oct-11·20:20·OEBPS/nav.xhtml9 ?rw-r--r--··2.0·unx·····1240·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-erlang-2EWSTWER.css10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-CB7BJMUW.js11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
12 ?rw-r--r--··2.0·unx·····1854·b-·defN·24-Oct-11·20:20·OEBPS/content.opf12 ?rw-r--r--··2.0·unx·····1854·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
13 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:20·OEBPS/assets/logo.png13 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
14 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:20·META-INF/container.xml14 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
15 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:20·META-INF/com.apple.ibooks.display-options.xml15 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
16 14·files,·489485·bytes·uncompressed,·94204·bytes·compressed:··80.8%16 14·files,·489485·bytes·uncompressed,·94208·bytes·compressed:··80.8%
38.2 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
199 KB
OEBPS/using_public_key.xhtml
Max HTML report size reached
95.9 KB
OEBPS/public_key_records.xhtml
Max HTML report size reached
36.9 KB
OEBPS/public_key.xhtml
Max HTML report size reached
1.25 KB
OEBPS/content.opf
1.22 KB
OEBPS/content.opf
Max HTML report size reached
37.0 KB
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/public_key.html
    
Offset 3319, 22 lines modifiedOffset 3319, 22 lines modified
3319 certificates·include·policies·the·constrained·policy·set·with3319 certificates·include·policies·the·constrained·policy·set·with
3320 potential·qualifiers·will·be·returned,·these·values·are·derived·from3320 potential·qualifiers·will·be·returned,·these·values·are·derived·from
3321 the·policy·tree·created·as·part·of·the·path·validation·algorithm.·The3321 the·policy·tree·created·as·part·of·the·path·validation·algorithm.·The
3322 constrained·set·can·be·constrained·only·by·the·Certificate·Authorities3322 constrained·set·can·be·constrained·only·by·the·Certificate·Authorities
3323 or·also·by·the·user·when·the·option·<code·class="inline">policy_set</code>·is·provided·to·this3323 or·also·by·the·user·when·the·option·<code·class="inline">policy_set</code>·is·provided·to·this
3324 function.·The·qualifiers·convey·information·about·the·valid·policy·and3324 function.·The·qualifiers·convey·information·about·the·valid·policy·and
3325 is·intended·as·information·to·end·users.</p><p>Available·options:</p><ul><li><p><strong>{verify_fun,·{fun(),·InitialUserState::term()}</strong>·-·The·fun·must·be3325 is·intended·as·information·to·end·users.</p><p>Available·options:</p><ul><li><p><strong>{verify_fun,·{fun(),·InitialUserState::term()}</strong>·-·The·fun·must·be
3326 defined·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="6463345059-1">(</span><span·class="n">OtpCert</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="64633[·...·truncated·by·diffoscope;·len:·58,·SHA:·54a77c05bf4665072cf212d12b1425146fa94e5486841cd37b4c51298d24e5a6·...·]-2">}</span><span·class="p">,</span><span·class="w">3326 defined·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="9010607187-1">(</span><span·class="n">OtpCert</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="90106[·...·truncated·by·diffoscope;·len:·58,·SHA:·58a58fb09ab19c90c00086d0a932f4cd90cb6681f400fa702f939a060d2a2e7c·...·]-2">}</span><span·class="p">,</span><span·class="w">
3327 ····</span><span·class="n">Event</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="6463345059-3">{</span><span·class="ss">bad_cert</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><[·...·truncated·by·diffoscope;·len:·537,·SHA:·76c141bad1fc2ef23eb4724d3233d039b9e5d9e1ec772a449ac1209cadd1c4bb·...·]-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3327 ····</span><span·class="n">Event</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9010607187-3">{</span><span·class="ss">bad_cert</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span><[·...·truncated·by·diffoscope;·len:·537,·SHA:·cd1f0aa925ed8ca19914c266510f50bab45c1c456f182dd020b6a13837b310ca·...·]-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3328 ·············</span><span·class="p"·data-group-id="6463345059-7">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="6463345059-8">{</span><span·class="p"·data-group-id="64[·...·truncated·by·diffoscope;·len:·61,·SHA:·b0b56f0df229326d3271fb3eac90bff8e717e6446cf2c02852c73ac266b021f7·...·]-7">}</span><span·class="p">,</span><span·class="w">3328 ·············</span><span·class="p"·data-group-id="9010607187-7">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="9010607187-8">{</span><span·class="p"·data-group-id="90[·...·truncated·by·diffoscope;·len:·61,·SHA:·79a45d6b431673399d50f5f0547b0009233a0951d4a3fecd8fde5012020ca7bc·...·]-7">}</span><span·class="p">,</span><span·class="w">
3329 ····</span><span·class="n">InitialUserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="6463345059-9">(</span><span·class="p"·data-group-id="6463345059-9">)</span><span·class="p"·data-group-id="6463345059-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3329 ····</span><span·class="n">InitialUserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="9010607187-9">(</span><span·class="p"·data-group-id="9010607187-9">)</span><span·class="p"·data-group-id="9010607187-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3330 ··</span><span·class="p"·data-group-id="6463345059-10">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span>[·...·truncated·by·diffoscope;·len:·149,·SHA:·5b18bab31081a92f9094767bf49d51b6d968d83afc44a51f23ba1ad66b9c74dd·...·]-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3330 ··</span><span·class="p"·data-group-id="9010607187-10">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span>[·...·truncated·by·diffoscope;·len:·149,·SHA:·d0cd6e5bf5c2f3d3bb4c1c595c9b5123cb583e47c5680c1a1c1162da52fe1d5a·...·]-10">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3331 ··</span><span·class="p"·data-group-id="6463345059-12">{</span><span·class="ss">valid_peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</[·...·truncated·by·diffoscope;·len:·154,·SHA:·89df7fbfda31c0416a902cd476b1348588e905fa2e72629306840dcbeb4b62d7·...·]-12">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3331 ··</span><span·class="p"·data-group-id="9010607187-12">{</span><span·class="ss">valid_peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</[·...·truncated·by·diffoscope;·len:·154,·SHA:·0490cc0fb05106837ae879fc6b63e3a5e4b3ee002a7621d712491702a49c8838·...·]-12">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3332 ··</span><span·class="p"·data-group-id="6463345059-14">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><spa[·...·truncated·by·diffoscope;·len:·145,·SHA:·c937515d30c8be7ab291ac95faa98de30aea08127b9537fc0821125133d162d9·...·]-14">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3332 ··</span><span·class="p"·data-group-id="9010607187-14">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><spa[·...·truncated·by·diffoscope;·len:·145,·SHA:·2dea4024aa6b2b243e731773c8ecbff40401fc2b29980355885298dd0f0f2e57·...·]-14">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3333 ··</span><span·class="p"·data-group-id="6463345059-16">{</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</spa[·...·truncated·by·diffoscope;·len:·151,·SHA:·5a0171302c5e41c6ccebf566edd8a7e6b7f6f329adb572c842a69ecaaae5ebdc·...·]-16">}</span><span·class="p">.</span></code></pre><p>If·the·verify·callback·fun·returns·<code·class="inline">{fail,·Reason}</code>,·the·verification·process3333 ··</span><span·class="p"·data-group-id="9010607187-16">{</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</spa[·...·truncated·by·diffoscope;·len:·151,·SHA:·fcf8c063398c61ebed3cd32ef6f4f2b825eb4133b25add810c6fc13fc1abc30f·...·]-16">}</span><span·class="p">.</span></code></pre><p>If·the·verify·callback·fun·returns·<code·class="inline">{fail,·Reason}</code>,·the·verification·process
3334 is·immediately·stopped.·If·the·verify·callback·fun·returns3334 is·immediately·stopped.·If·the·verify·callback·fun·returns
3335 <code·class="inline">{valid,·UserState}</code>,·the·verification·process·is·continued.·This·can·be·used3335 <code·class="inline">{valid,·UserState}</code>,·the·verification·process·is·continued.·This·can·be·used
3336 to·accept·specific·path·validation·errors,·such·as·<code·class="inline">selfsigned_peer</code>,·as·well3336 to·accept·specific·path·validation·errors,·such·as·<code·class="inline">selfsigned_peer</code>,·as·well
3337 as·verifying·application-specific·extensions.·If·called·with·an·extension3337 as·verifying·application-specific·extensions.·If·called·with·an·extension
3338 unknown·to·the·user·application,·the·return·value·<code·class="inline">{unknown,·UserState}</code>·is·to3338 unknown·to·the·user·application,·the·return·value·<code·class="inline">{unknown,·UserState}</code>·is·to
3339 be·used.</p><blockquote><h4·class="warning">Warning</h4><p>Note·that·user·defined·custom·<code·class="inline">verify_fun</code>·may·alter·original·path3339 be·used.</p><blockquote><h4·class="warning">Warning</h4><p>Note·that·user·defined·custom·<code·class="inline">verify_fun</code>·may·alter·original·path
3340 validation·error·(e.g·<code·class="inline">selfsigned_peer</code>).·Use·with·caution.</p></blockquote></li><li><p><strong>{max_path_length,·integer()}</strong>·-·The·<code·class="inline">max_path_length</code>·is·the·maximum3340 validation·error·(e.g·<code·class="inline">selfsigned_peer</code>).·Use·with·caution.</p></blockquote></li><li><p><strong>{max_path_length,·integer()}</strong>·-·The·<code·class="inline">max_path_length</code>·is·the·maximum
Offset 3491, 17 lines modifiedOffset 3491, 17 lines modified
3491 certificate·is·in·agreement·with·at·least·one·of·the·<em>Reference·Identifier</em>·that3491 certificate·is·in·agreement·with·at·least·one·of·the·<em>Reference·Identifier</em>·that
3492 the·client·expects·to·be·connected·to.</p><p>The·function·is·intended·to·be·added·as·an·extra·client·check·of·the3492 the·client·expects·to·be·connected·to.</p><p>The·function·is·intended·to·be·added·as·an·extra·client·check·of·the
3493 peer·certificate·when·performing3493 peer·certificate·when·performing
3494 <a·href="#pkix_path_validation/3">public_key:pkix_path_validation/3</a></p><p>See·<a·href="https://tools.ietf.org/html/rfc6125">RFC·6125</a>·for·detailed·information3494 <a·href="#pkix_path_validation/3">public_key:pkix_path_validation/3</a></p><p>See·<a·href="https://tools.ietf.org/html/rfc6125">RFC·6125</a>·for·detailed·information
3495 about·hostname·verification.·The3495 about·hostname·verification.·The
3496 <a·href="using_public_key.html#verify_hostname">User's·Guide</a>·and3496 <a·href="using_public_key.html#verify_hostname">User's·Guide</a>·and
3497 <a·href="using_public_key.html#verify_hostname_examples">code·examples</a>·describes·this3497 <a·href="using_public_key.html#verify_hostname_examples">code·examples</a>·describes·this
3498 function·more·detailed.</p><p>The·option·funs·are·described·here:</p><ul><li><p><strong><code·class="inline">match_fun</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="0383779265-1">(</span><span·class="n">ReferenceId</span><span·class="p">:</span><span·class="p">:</span><span·class="n">ReferenceId</span><span·class="p"·data-group-id="0383779265-2">(</span><span·class="p"·data-group-id="0383779265-2">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">FQDN</span><span·class="p">:</span><span·class="p">:</span><span·class="nf">string</span><span·class="p"·data-group-id="0383779265-3">(</span><span·class="p"·data-group-id="0383779265-3">)</span><span·class="p">,</span><span·class="w"> 
3499 ····</span><span·class="n">PresentedId</span><span·class="p">:</span><span·class="p">:</span><span·class="p"·data-group-id="0383779265-4">{</span><span·class="ss">dNSName</span><span·class="p">,</span><span·class="nf">string</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·509,·SHA:·3918a5806674ef5edd924485cff67742128821747445e9494db9fd285a15cd70·...·]</span><span·class="w">3498 function·more·detailed.</p><p>The·option·funs·are·described·here:</p><ul><li><p><strong><code·class="inline">match_fun</code></strong></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="2564441132-1[·...·truncated·by·diffoscope;·len:·532,·SHA:·1d7f025dc43b6c99686bff5adcda884386f90ad796123173bbac9466b98a6960·...·]</span><span·class="w">
 3499 ····</span><span·class="n">PresentedId</span><span·class="p">:</span><span·class="p">:</span><span·class="p"·data-group-id="2564441132-4">{</span><span·class="ss">dNSName</span><span·class="p">,</span><span·class="nf">string</span><span·class="p"·data-group-id="2564441132-5">(</span><span·class="p"·data-group-id="2564441132-5">)</span><span·class="p"·data-group-id="2564441132-4">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="2564441132-6">{</span><span·class="ss">uniformResourceIdentifier</span><span·class="p">,</span><span·class="nf">string</span><span·class="p"·data-group-id="2564441132-7">(</span><span·class="p"·data-group-id="2564441132-7">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3500 ·················</span><span·class="p"·data-group-id="0383779265-8">{</span><span·class="ss">iPAddress</span><span·class="p">,</span><span·class="nf">list</span><span·class="p"·data-group-id="0383779265-9">(</span><span·class="nf">byte</span><span·class="p"·data-group-id="0383779265-10">(</span><span·class="p[·...·truncated·by·diffoscope;·len:·953,·SHA:·a44eae64c075ac2ec586a65173db510ae43e2448ba5e6ed60ce16ccaef4a12d9·...·]-1">)</span></code></pre><p>This·function·replaces·the·default·host·name·matching·rules.·The·fun·should3500 ·················</span><span·class="p"·data-group-id="2564441132-8">{</span><span·class="ss">iPAddress</span><span·class="p">,</span><span·class="nf">list</span><span·class="p"·data-group-id="2564441132-9">(</span><span·class="nf">byte</span><span·class="p"·data-group-id="2564441132-10">(</span><span·class="p[·...·truncated·by·diffoscope;·len:·953,·SHA:·686b198296527df6e8d7b3dfe3e6265048ff4725d8a353f73e489ce2218b83a9·...·]-1">)</span></code></pre><p>This·function·replaces·the·default·host·name·matching·rules.·The·fun·should
3501 return·a·boolean·to·tell·if·the·Reference·ID·and·Presented·ID·matches·or·not.3501 return·a·boolean·to·tell·if·the·Reference·ID·and·Presented·ID·matches·or·not.
3502 The·match·fun·can·also·return·a·third·value,·value,·the·atom·<code·class="inline">default</code>,·if·the3502 The·match·fun·can·also·return·a·third·value,·value,·the·atom·<code·class="inline">default</code>,·if·the
3503 default·matching·rules·shall·apply.·This·makes·it·possible·to·augment·the3503 default·matching·rules·shall·apply.·This·makes·it·possible·to·augment·the
3504 tests·with·a·special·case:</p><pre><code·class="text">fun(....)·-&gt;·true;···%·My·special·case3504 tests·with·a·special·case:</p><pre><code·class="text">fun(....)·-&gt;·true;···%·My·special·case
3505 ···(_,·_)·-&gt;·default·%·all·others·falls·back·to·the·inherit·tests3505 ···(_,·_)·-&gt;·default·%·all·others·falls·back·to·the·inherit·tests
3506 end</code></pre><p>See·<a·href="#pkix_verify_hostname_match_fun/1"><code·class="inline">pkix_verify_hostname_match_fun/1</code></a>·for·a·function·that·takes·a·protocol3506 end</code></pre><p>See·<a·href="#pkix_verify_hostname_match_fun/1"><code·class="inline">pkix_verify_hostname_match_fun/1</code></a>·for·a·function·that·takes·a·protocol
3507 name·as·argument·and·returns·a·<code·class="inline">fun/2</code>·suitable·for·this·option·and3507 name·as·argument·and·returns·a·<code·class="inline">fun/2</code>·suitable·for·this·option·and
Offset 3693, 21 lines modifiedOffset 3693, 21 lines modified
3693 ····································revocation_status_undetermined·|3693 ····································revocation_status_undetermined·|
3694 ····································{revocation_status_undetermined,·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}·|3694 ····································{revocation_status_undetermined,·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()}·|
3695 ····································{revoked,·<a·href="#t:crl_reason/0">crl_reason</a>()}.</pre>3695 ····································{revoked,·<a·href="#t:crl_reason/0">crl_reason</a>()}.</pre>
  
3696 ······</div>3696 ······</div>
  
3697 <p>Performs·CRL·validation.·It·is·intended·to·be·called·from·the·verify·fun·of3697 <p>Performs·CRL·validation.·It·is·intended·to·be·called·from·the·verify·fun·of
3698 <a·href="#pkix_path_validation/3">pkix_path_validation/3·</a>.</p><p>Available·options:</p><ul><li><p><strong>{update_crl,·fun()}</strong>·-·The·fun·has·the·following·type·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6147021136-1">(</span><span·class="o">#</span><span·class="ss">&#39;DistributionPoint&#39;</span><span·class="p"·data-group-id="6147021136-2">{</span><span·class="p"·data-group-id="6147021136-2">}</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·215,·SHA:·b0ee746f12de1b0a5e04a55c98f281159490a66460b0b998a5f0d4081b81b4ec·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3698 <a·href="#pkix_path_validation/3">pkix_path_validation/3·</a>.</p><p>Available·options:</p><ul><li><p><strong>{update_crl,·fun()}</strong>·-·The·fun·has·the·following·type·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="0888403293-1">(</span><span·class="o">#</span><span·class="ss">&#39;DistributionPoint&#39;</span><span·class="p"·data-group-id="0888403293-2">{</span><span·class="p"·data-group-id="0888403293-2">}</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·215,·SHA:·5ab7b87beedfe2f2ba96e4dd30e392ce73eb7fc597b87d102668cf30b48dd215·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3699 ········</span><span·class="o">#</span><span·class="ss">&#39;CertificateList&#39;</span><span·class="p"·data-group-id="6147021136-4">{</span><span·class="p"·data-group-id="6147021136-4">}</span></code></pre><p>The·fun·uses·the·information·in·the·distribution·point·to·access·the·latest3699 ········</span><span·class="o">#</span><span·class="ss">&#39;CertificateList&#39;</span><span·class="p"·data-group-id="0888403293-4">{</span><span·class="p"·data-group-id="0888403293-4">}</span></code></pre><p>The·fun·uses·the·information·in·the·distribution·point·to·access·the·latest
3700 possible·version·of·the·CRL.·If·this·fun·is·not·specified,·Public·Key·uses·the3700 possible·version·of·the·CRL.·If·this·fun·is·not·specified,·Public·Key·uses·the
3701 default·implementation:</p><pre><code·class="text">·fun(_DP,·CRL)·-&gt;·CRL·end</code></pre></li><li><p><strong>{issuer_fun,·fun()}</strong>·-·The·fun·has·the·following·type·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="1482607834-1">(</span><span·class="o">#</span><span·class="ss">&#39;DistributionPoint&#39;</span><span·class="p"·data-group-id="1482607834-2">{</span><span·class="p"·data-group-id="1482607834-2">}</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·162,·SHA:·6fdd3f637d91674c35fc02ed7db19a018919b3f8493bfd0ebcdc1cee81c19eb0·...·]-3">}</span><span·class="p">,</span><span·class="w">3701 default·implementation:</p><pre><code·class="text">·fun(_DP,·CRL)·-&gt;·CRL·end</code></pre></li><li><p><strong>{issuer_fun,·fun()}</strong>·-·The·fun·has·the·following·type·specification:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="4280260222-1">(</span><span·class="o">#</span><span·class="ss">&#39;DistributionPoint&#39;</span><span·class="p"·data-group-id="4280260222-2">{</span><span·class="p"·data-group-id="4280260222-2">}</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·162,·SHA:·3bcc00f0e11004c4ba13439bb67e5deabd0dcb5f8956401b76a75e2f165e09ea·...·]-3">}</span><span·class="p">,</span><span·class="w">
3702 ····</span><span·class="p"·data-group-id="1482607834-4">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="p"·data-group-id="1482607834-5">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="1482607834-6">{</span><span·class="p"·data-group-id="1482607834-6">}</span><span·class="p"·data-group-id="1482607834-5">]</span><span·class="p"·data-group-id="1482607834-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="1482607834-7">(</span><span·class="p"·data-group-id="1482607834-7">)</span><span·class="p"·data-group-id="1482607834-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
3703 ··</span><span·class="p"·data-group-id="1482607834-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="1482607834-9">{</sp[·...·truncated·by·diffoscope;·len:·394,·SHA:·f2b8c87768b05aa75c456905b7a874801716d6fbcac4eac1d35218b58685af8c·...·]3702 ····</span><span·class="p"·data-group-id="4280260222-4">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="p"·data-group-id="4280260222-5">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><sp[·...·truncated·by·diffoscope;·len:·512,·SHA:·49c4d40bb07a4f5b56f9f221d5984979b2d0ff344c5296b666edc48b712597c6·...·]
 3703 ··</span><span·class="p"·data-group-id="4280260222-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="4280260222-9">{</span><span·class="p"·data-group-id="4280260222-9">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4280260222-10">[</span><span·class="ss">der_encoded</span><span·class="p"·data-group-id="4280260222-10">]</span><span·class="p"·data-group-id="4280260222-8">}</span></code></pre><p>The·fun·returns·the·root·certificate·and·certificate·chain·that·has·signed·the
3704 CRL.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8757032400-1">(</span><span·class="n">DP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CRL</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Issuer</span><span·class="p">,</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·430,·SHA:·baa8b97a4e692565396d2c1e5b3dca670b7107dd000b80459806b4194fa3fcc9·...·]-2">}</span></code></pre></li><li><p><strong>{undetermined_details,·boolean()}</strong>·-·Defaults·to·false.·When·revocation3704 CRL.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="9173028182-1">(</span><span·class="n">DP</span><span·class="p">,</span><span·class="w">·</span><span·class="n">CRL</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Issuer</span><span·class="p">,</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·430,·SHA:·6e38787bc865a1860145b7120ca1b55e1d6c672c98b06d9c3c40947ca49a8165·...·]-2">}</span></code></pre></li><li><p><strong>{undetermined_details,·boolean()}</strong>·-·Defaults·to·false.·When·revocation
3705 status·cannot·be·determined,·and·this·option·is·set·to·true,·details·of·why·no3705 status·cannot·be·determined,·and·this·option·is·set·to·true,·details·of·why·no
3706 CRLs·where·accepted·are·included·in·the·return·value.</p></li></ul>3706 CRLs·where·accepted·are·included·in·the·return·value.</p></li></ul>
3707 ··</section>3707 ··</section>
3708 </section>3708 </section>
3709 <section·class="detail"·id="pkix_dist_point/1">3709 <section·class="detail"·id="pkix_dist_point/1">
  
3710 ··<div·class="detail-header">3710 ··<div·class="detail-header">
Offset 4047, 26 lines modifiedOffset 4047, 26 lines modified
4047 certificate,·but·makes·the·certificate·useful·for·both·roles.</p><p>Explanation·of·the·options·used·to·customize·certificates·in·the·generated4047 certificate,·but·makes·the·certificate·useful·for·both·roles.</p><p>Explanation·of·the·options·used·to·customize·certificates·in·the·generated
4048 chains:</p><ul><li><p><strong>{digest,·digest_type()}</strong>·-·Hash·algorithm·to·be·used·for·signing·the4048 chains:</p><ul><li><p><strong>{digest,·digest_type()}</strong>·-·Hash·algorithm·to·be·used·for·signing·the
4049 certificate·together·with·the·key·option.·Defaults·to·sha·that·is·sha1.</p></li><li><p><strong>{key,··ec_params()|·{rsa,·Size:pos_integer(),·Prime::pos_integer()}·|·private_key()}</strong>·-·Parameters·to·be·used·to·call4049 certificate·together·with·the·key·option.·Defaults·to·sha·that·is·sha1.</p></li><li><p><strong>{key,··ec_params()|·{rsa,·Size:pos_integer(),·Prime::pos_integer()}·|·private_key()}</strong>·-·Parameters·to·be·used·to·call
4050 public_key:generate_key/1,·to·generate·a·key,·or·an·existing·key.·Defaults·to4050 public_key:generate_key/1,·to·generate·a·key,·or·an·existing·key.·Defaults·to
4051 generating·an·ECDSA·key.·Note·this·could·fail·if·Erlang/OTP·is·compiled·with·a4051 generating·an·ECDSA·key.·Note·this·could·fail·if·Erlang/OTP·is·compiled·with·a
4052 very·old·cryptolib.</p></li><li><p><strong>{validity,·{From::erlang:timestamp(),·To::erlang:timestamp()}}</strong>·-·The4052 very·old·cryptolib.</p></li><li><p><strong>{validity,·{From::erlang:timestamp(),·To::erlang:timestamp()}}</strong>·-·The
4053 validity·period·of·the·certificate.</p></li><li><p><strong>{extensions,·[#'Extension'{}]}</strong>·-·Extensions·to·include·in·the4053 validity·period·of·the·certificate.</p></li><li><p><strong>{extensions,·[#'Extension'{}]}</strong>·-·Extensions·to·include·in·the
4054 certificate.</p><p>Default·extensions·included·in·CA·certificates·if·not·otherwise·specified·are:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0508015417-1">[</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="0508015417-2">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-keyUsage&#39;</span><span·class="p">,</span><span·class="w">4054 certificate.</p><p>Default·extensions·included·in·CA·certificates·if·not·otherwise·specified·are:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6200416051-1">[</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="6200416051-2">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-keyUsage&#39;</span><span·class="p">,</span><span·class="w">
4055 ··············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0508015417-3">[</span><span·class="ss">keyCertSign</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cRLSign</span><span·class="p"·data-group-id="0508015417-3">]</span><span·class="p">,</span><span·class="w">4055 ··············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6200416051-3">[</span><span·class="ss">keyCertSign</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cRLSign</span><span·class="p"·data-group-id="6200416051-3">]</span><span·class="p">,</span><span·class="w">
4056 ··············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="0508015417-2">}</span><span·class="p">,</span><span·class="w">4056 ··············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="6200416051-2">}</span><span·class="p">,</span><span·class="w">
4057 </span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="0508015417-4">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-basicConstraints&#39;</span><span·class="p">,</span><span·class="w">4057 </span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="6200416051-4">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-basicConstraints&#39;</span><span·class="p">,</span><span·class="w">
4058 ·············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;BasicConstraints&#39;</span><span·class="p"·data-group-id="0508015417-5">{</span><span·class="ss">cA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="0508015417-5">}</span><span·class="p">,</span><span·class="w">4058 ·············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;BasicConstraints&#39;</span><span·class="p"·data-group-id="6200416051-5">{</span><span·class="ss">cA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="6200416051-5">}</span><span·class="p">,</span><span·class="w">
4059 ·············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="0508015417-4">}</span><span·class="p"·data-group-id="0508015417-1">]</span></code></pre><p>Default·extensions·included·in·the·server·peer·cert·if·not·otherwise·specified4059 ·············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="6200416051-4">}</span><span·class="p"·data-group-id="6200416051-1">]</span></code></pre><p>Default·extensions·included·in·the·server·peer·cert·if·not·otherwise·specified
4060 are:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8421973717-1">[</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="8421973717-2">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-keyUsage&#39;</span><span·class="p">,</span><span·class="w">4060 are:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0802038839-1">[</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="0802038839-2">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-keyUsage&#39;</span><span·class="p">,</span><span·class="w">
4061 ··············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8421973717-3">[</span><span·class="ss">digitalSignature</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">keyAgreement</span><span·class="p"·data-group-id="8421973717-3">]</span><span·class="p">,</span><span·class="w">4061 ··············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0802038839-3">[</span><span·class="ss">digitalSignature</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">keyAgreement</span><span·class="p"·data-group-id="0802038839-3">]</span><span·class="p">,</span><span·class="w">
4062 ··············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8421973717-2">}</span><span·class="p">,</span><span·class="w">4062 ··············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="0802038839-2">}</span><span·class="p">,</span><span·class="w">
4063 </span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="8421973717-4">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-subjectAltName&#39;</span><span·class="p">,</span><span·class="w">4063 </span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="0802038839-4">{</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">&#39;id-ce-subjectAltName&#39;</span><span·class="p">,</span><span·class="w">
4064 ·············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8421973717-5">[</span><span·class="p"·data-group-id="8421973717-6">{</span><span·class="ss">dNSName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Hostname</span><span·class="p"·data-group-id="8421973717-6">}</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·ff4b53c6ce6cbaedca895b7e26ab8c44414243eccd86e3242079a7279457c669·...·]-5">]</span><span·class="p">,</span><span·class="w">4064 ·············</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0802038839-5">[</span><span·class="p"·data-group-id="0802038839-6">{</span><span·class="ss">dNSName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Hostname</span><span·class="p"·data-group-id="0802038839-6">}</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·0e28f2eeb06263cb6fbaf452c4d8f044e27c90904fa0e04c3ae575a5d2a40fd6·...·]-5">]</span><span·class="p">,</span><span·class="w">
4065 ·············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8421973717-4">}</span><span·class="p"·data-group-id="8421973717-1">]</span></code></pre><p>Hostname·is·the·result·of·calling·net_adm:localhost()·in·the·Erlang·node·where4065 ·············</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="0802038839-4">}</span><span·class="p"·data-group-id="0802038839-1">]</span></code></pre><p>Hostname·is·the·result·of·calling·net_adm:localhost()·in·the·Erlang·node·where
4066 this·function·is·called.</p></li></ul><blockquote><h4·class="info">Note</h4><p>Note·that·the·generated·certificates·and·keys·does·not·provide·a·formally4066 this·function·is·called.</p></li></ul><blockquote><h4·class="info">Note</h4><p>Note·that·the·generated·certificates·and·keys·does·not·provide·a·formally
4067 correct·PKIX-trust-chain·and·they·cannot·be·used·to·achieve·real·security.4067 correct·PKIX-trust-chain·and·they·cannot·be·used·to·achieve·real·security.
4068 This·function·is·provided·for·testing·purposes·only.</p></blockquote>4068 This·function·is·provided·for·testing·purposes·only.</p></blockquote>
4069 ··</section>4069 ··</section>
4070 </section>4070 </section>
4071 <section·class="detail"·id="pkix_test_root_cert/2">4071 <section·class="detail"·id="pkix_test_root_cert/2">
  
96.2 KB
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/public_key_records.html
    
Offset 125, 428 lines modifiedOffset 125, 428 lines modified
125 ····<span>Public-Key·Records</span>125 ····<span>Public-Key·Records</span>
126 ··</h1>126 ··</h1>
  
127 <p>This·chapter·briefly·describes·Erlang·records·derived·from·ASN.1·specifications127 <p>This·chapter·briefly·describes·Erlang·records·derived·from·ASN.1·specifications
128 used·to·handle·public·key·infrastructure.·The·scope·is·to·describe·the·data128 used·to·handle·public·key·infrastructure.·The·scope·is·to·describe·the·data
129 types·of·each·component,·not·the·semantics.·For·information·on·the·semantics,129 types·of·each·component,·not·the·semantics.·For·information·on·the·semantics,
130 refer·to·the·relevant·standards·and·RFCs·linked·in·the·sections·below.</p><p>Use·the·following·include·directive·to·get·access·to·the·records·and·constant130 refer·to·the·relevant·standards·and·RFCs·linked·in·the·sections·below.</p><p>Use·the·following·include·directive·to·get·access·to·the·records·and·constant
131 macros·described·in·the·following·sections:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="3773693497-1">(</span><span·class="s">&quot;public_key/include/public_key.hrl&quot;</span><span·class="p"·data-group-id="3773693497-1">)</span><span·class="p">.</span></code></pre><h2·id="data-types"·class="section-heading">131 macros·described·in·the·following·sections:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="9311015930-1">(</span><span·class="s">&quot;public_key/include/public_key.hrl&quot;</span><span·class="p"·data-group-id="9311015930-1">)</span><span·class="p">.</span></code></pre><h2·id="data-types"·class="section-heading">
132 ··<a·href="#data-types"·class="hover-link">132 ··<a·href="#data-types"·class="hover-link">
133 ····<i·class="ri-link-m"·aria-hidden="true"></i>133 ····<i·class="ri-link-m"·aria-hidden="true"></i>
134 ··</a>134 ··</a>
135 ··<span·class="text">Data·Types</span>135 ··<span·class="text">Data·Types</span>
136 </h2>136 </h2>
137 <p>Common·non-standard·Erlang·data·types·used·to·describe·the·record·fields·in·the137 <p>Common·non-standard·Erlang·data·types·used·to·describe·the·record·fields·in·the
138 following·sections·and·which·are·not·defined·in·the·Public·Key138 following·sections·and·which·are·not·defined·in·the·Public·Key
139 <a·href="public_key.html">Reference·Manual</a>·follows·here:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">time</span><span·class="p"·data-group-id="7735604563-1">(</span><span·class="p"·data-group-id="7735604563-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">utc_time</span><span·class="p"·data-group-id="7735604563-2">(</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·231,·SHA:·6fb783ba6e261cd3ef0f7ed4f328cc1a121cced1a62bd7f019d472ff36172fad·...·]-3">)</span><span·class="w">139 <a·href="public_key.html">Reference·Manual</a>·follows·here:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">time</span><span·class="p"·data-group-id="2349423981-1">(</span><span·class="p"·data-group-id="2349423981-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">utc_time</span><span·class="p"·data-group-id="2349423981-2">(</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·231,·SHA:·3d70c6005200ef6d3dd6f9b419daa7c1bd2afd49decba5a733a6404dad398b48·...·]-3">)</span><span·class="w">
  
140 </span><span·class="nf">utc_time</span><span·class="p"·data-group-id="7735604563-4">(</span><span·class="p"·data-group-id="7735604563-4">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7735604563-5">{</span><span·class="ss">utcTime</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·113,·SHA:·ccf223e6b16bf460026f1d6cc6061cc44de1c10bbe31dd0317e0cd8834186487·...·]-5">}</span><span·class="w">140 </span><span·class="nf">utc_time</span><span·class="p"·data-group-id="2349423981-4">(</span><span·class="p"·data-group-id="2349423981-4">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2349423981-5">{</span><span·class="ss">utcTime</span><span·class="p">,</span>[·...·truncated·by·diffoscope;·len:·113,·SHA:·ba0d2126f194f2d0b1f1126816ae2c93f4bc5d279c5f120be8be1ef8d5bd7406·...·]-5">}</span><span·class="w">
  
141 </span><span·class="nf">general_time</span><span·class="p"·data-group-id="7735604563-6">(</span><span·class="p"·data-group-id="7735604563-6">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7735604563-7">{</span><span·class="ss">generalTime</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·118,·SHA:·29b8e8ff1fb99ed8eed0710fa5da1d65b3da4d95fbf82c67a077da01c428fe63·...·]-7">}</span><span·class="w">141 </span><span·class="nf">general_time</span><span·class="p"·data-group-id="2349423981-6">(</span><span·class="p"·data-group-id="2349423981-6">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2349423981-7">{</span><span·class="ss">generalTime</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·118,·SHA:·a483c3b192cd4116dd5bd852c88615f5220a6949100be79c265b30b8ef090808·...·]-7">}</span><span·class="w">
  
142 </span><span·class="nf">general_name</span><span·class="p"·data-group-id="7735604563-8">(</span><span·class="p"·data-group-id="7735604563-8">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7735604563-9">{</span><span·class="ss">rfc822Name</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·205,·SHA:·c71eabfba869054ffa5ff9e7922928b05d917c988d9ce926be06b8e4dd34a641·...·]-9">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">142 </span><span·class="nf">general_name</span><span·class="p"·data-group-id="2349423981-8">(</span><span·class="p"·data-group-id="2349423981-8">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2349423981-9">{</span><span·class="ss">rfc822Name</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·205,·SHA:·9de545c5f9cb71acb5048aee12670307651e30d3b68a3829ab3366dbf6404d07·...·]-9">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
143 ·················</span><span·class="p"·data-group-id="7735604563-11">{</span><span·class="ss">dNSName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-12">(</span><span·class="p"·data-group-id="7735604563-12">)</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·c47e132bcb91d7affb5cce38c3058968c51c94fd79d06397ff6add0ee3a1573f·...·]-11">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">143 ·················</span><span·class="p"·data-group-id="2349423981-11">{</span><span·class="ss">dNSName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-12">(</span><span·class="p"·data-group-id="2349423981-12">)</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·f1d0a1606415083aad704d75d93ec2234e8aeee9b09f87f5c82076fbdf179089·...·]-11">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
144 ·················</span><span·class="p"·data-group-id="7735604563-13">{</span><span·class="ss">x400Address</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-14">(</span><span·class="p"·data-group-id="7735604563-14">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">144 ·················</span><span·class="p"·data-group-id="2349423981-13">{</span><span·class="ss">x400Address</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-14">(</span><span·class="p"·data-group-id="2349423981-14">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
145 ·················</span><span·class="p"·data-group-id="7735604563-15">{</span><span·class="ss">directoryName</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7735604563-16">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·379,·SHA:·d717a1707ef40df0dcd2d6233698fa5b14c025a005cd4b64a10d749d8ebbfefa·...·]-15">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">145 ·················</span><span·class="p"·data-group-id="2349423981-15">{</span><span·class="ss">directoryName</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2349423981-16">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·379,·SHA:·cd12188c5bd3cc255fb20d28e86185eebbd9fe80c5d39198ae92df7e8f69341c·...·]-15">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
146 ·················</span><span·class="p"·data-group-id="7735604563-19">{</span><span·class="ss">ediPartyName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">special_string</span><span·class="p"·data-group-id="7735604563-20">(</span><span·class="p"·data-group-id="7735604563-20">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·55cdccaaee35a14998f21865f5669f03c70e4e14451116c2243721c3ef1fd404·...·]-19">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">146 ·················</span><span·class="p"·data-group-id="2349423981-19">{</span><span·class="ss">ediPartyName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">special_string</span><span·class="p"·data-group-id="2349423981-20">(</span><span·class="p"·data-group-id="2349423981-20">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·eb973708b39c0a9d92dc535a2c94085be8cc7aca914724f87866f4c350825db9·...·]-19">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
147 ·················</span><span·class="p"·data-group-id="7735604563-21">{</span><span·class="ss">ediPartyName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">special_string</span><span·class="p"·data-group-id="7735604563-22">(</span><span·class="p"·data-group-id="7735604563-22">)</span><sp[·...·truncated·by·diffoscope;·len:·232,·SHA:·92da45859bdbe0aa711cba247a349aa2efbe4c7ebf699c5ad2ad0ad8a37410aa·...·]-21">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">147 ·················</span><span·class="p"·data-group-id="2349423981-21">{</span><span·class="ss">ediPartyName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">special_string</span><span·class="p"·data-group-id="2349423981-22">(</span><span·class="p"·data-group-id="2349423981-22">)</span><sp[·...·truncated·by·diffoscope;·len:·232,·SHA:·398b8f1a3a30de1d6e3621980b1b6d37242863f8b46219fc2609f7697e0d1997·...·]-21">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
148 ·················</span><span·class="p"·data-group-id="7735604563-24">{</span><span·class="ss">uniformResourceIdentifier</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-25">(</span><span·class="p"·data-group-id="7735604563-25">)</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·0bfc46a97988d8f78bd6eb2a820f8804ca4bc5ba39dad50d5727f1d0e343c754·...·]-24">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">148 ·················</span><span·class="p"·data-group-id="2349423981-24">{</span><span·class="ss">uniformResourceIdentifier</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-25">(</span><span·class="p"·data-group-id="2349423981-25">)</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·ee81e9510ba1f15bfbcd338ea242162a67525de94d00e4820b19b07832ed20b4·...·]-24">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
149 ·················</span><span·class="p"·data-group-id="7735604563-26">{</span><span·class="ss">iPAddress</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-27">(</span><span·class="p"·data-group-id="7735604563-27">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·2f492320789be819f58402de570ae0bc1612eb5be7b846277da6909c0bea2c79·...·]-26">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">149 ·················</span><span·class="p"·data-group-id="2349423981-26">{</span><span·class="ss">iPAddress</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-27">(</span><span·class="p"·data-group-id="2349423981-27">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·8b4a4e7bc326c28799f674cc9cfb9fb8f88d44b6f598ac44e83fffb754857431·...·]-26">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
150 ·················</span><span·class="p"·data-group-id="7735604563-28">{</span><span·class="ss">registeredId</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">oid</span><span·class="p"·data-group-id="7735604563-29">(</span><span·class="p"·data-group-id="7735604563-29">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·2f492320789be819f58402de570ae0bc1612eb5be7b846277da6909c0bea2c79·...·]-28">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">150 ·················</span><span·class="p"·data-group-id="2349423981-28">{</span><span·class="ss">registeredId</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">oid</span><span·class="p"·data-group-id="2349423981-29">(</span><span·class="p"·data-group-id="2349423981-29">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·8b4a4e7bc326c28799f674cc9cfb9fb8f88d44b6f598ac44e83fffb754857431·...·]-28">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
151 ·················</span><span·class="p"·data-group-id="7735604563-30">{</span><span·class="ss">otherName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="7735604563-31">(</span><span·class="p"·data-group-id="7735604563-31">)</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·c47e132bcb91d7affb5cce38c3058968c51c94fd79d06397ff6add0ee3a1573f·...·]-30">}</span><span·class="w">151 ·················</span><span·class="p"·data-group-id="2349423981-30">{</span><span·class="ss">otherName</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="2349423981-31">(</span><span·class="p"·data-group-id="2349423981-31">)</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·f1d0a1606415083aad704d75d93ec2234e8aeee9b09f87f5c82076fbdf179089·...·]-30">}</span><span·class="w">
  
152 </span><span·class="nf">special_string</span><span·class="p"·data-group-id="7735604563-32">(</span><span·class="p"·data-group-id="7735604563-32">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7735604563-33">{</span><span·class="ss">teletexString</span><span·class="p">[·...·truncated·by·diffoscope;·len:·211,·SHA:·176527f01342ef12115ff009651d5f137eed69c71c7b22b7abd02881e4123e82·...·]-33">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">152 </span><span·class="nf">special_string</span><span·class="p"·data-group-id="2349423981-32">(</span><span·class="p"·data-group-id="2349423981-32">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2349423981-33">{</span><span·class="ss">teletexString</span><span·class="p">[·...·truncated·by·diffoscope;·len:·211,·SHA:·552439fd46fc3494cb2d033a06df1c7c52e47710f20b2465ce28b7c0fe46e95f·...·]-33">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
153 ·153 ·
154 ···················</span><span·class="p"·data-group-id="7735604563-35">{</span><span·class="ss">printableString</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-36">(</span><span·class="p"·data-group-id="7735604563-36">)</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·714603123f6630566cfa41c9867bcc39a4ba331e2aba2e8c57bebeb62b8174b1·...·]-35">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">154 ···················</span><span·class="p"·data-group-id="2349423981-35">{</span><span·class="ss">printableString</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-36">(</span><span·class="p"·data-group-id="2349423981-36">)</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·507e9d6878cf798bda818afd07464ab8fb5e74f884eb89043a69b6ee10b5e1db·...·]-35">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
155 ···················</span><span·class="p"·data-group-id="7735604563-37">{</span><span·class="ss">universalString</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-38">(</span><span·class="p"·data-group-id="7735604563-38">)</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·714603123f6630566cfa41c9867bcc39a4ba331e2aba2e8c57bebeb62b8174b1·...·]-37">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">155 ···················</span><span·class="p"·data-group-id="2349423981-37">{</span><span·class="ss">universalString</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-38">(</span><span·class="p"·data-group-id="2349423981-38">)</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·507e9d6878cf798bda818afd07464ab8fb5e74f884eb89043a69b6ee10b5e1db·...·]-37">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
156 ···················</span><span·class="p"·data-group-id="7735604563-39">{</span><span·class="ss">utf8String</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="7735604563-40">(</span><span·class="p"·data-group-id="7735604563-40">)</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·215493f916fc77f8c6f04bcff7d3e9b61076f7794b0775f1d710300d6132e236·...·]-39">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">156 ···················</span><span·class="p"·data-group-id="2349423981-39">{</span><span·class="ss">utf8String</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="2349423981-40">(</span><span·class="p"·data-group-id="2349423981-40">)</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·57ff38e06280f9f2649fdce36312ea58f66a972ff27aa04cb1f10cb629ce2afa·...·]-39">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
  
157 ···················</span><span·class="p"·data-group-id="7735604563-41">{</span><span·class="ss">bmpString</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="7735604563-42">(</span><span·class="p"·data-group-id="7735604563-42">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·2f492320789be819f58402de570ae0bc1612eb5be7b846277da6909c0bea2c79·...·]-41">}</span><span·class="w">157 ···················</span><span·class="p"·data-group-id="2349423981-41">{</span><span·class="ss">bmpString</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2349423981-42">(</span><span·class="p"·data-group-id="2349423981-42">)</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·8b4a4e7bc326c28799f674cc9cfb9fb8f88d44b6f598ac44e83fffb754857431·...·]-41">}</span><span·class="w">
  
158 </span><span·class="nf">dist_reason</span><span·class="p"·data-group-id="7735604563-43">(</span><span·class="p"·data-group-id="7735604563-43">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">unused</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">keyCompromise</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">cACompromise</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">affiliationChanged</span><span·class="w">·</span><span·class="p">|</span><span·class="w">158 </span><span·class="nf">dist_reason</span><span·class="p"·data-group-id="2349423981-43">(</span><span·class="p"·data-group-id="2349423981-43">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">unused</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">keyCompromise</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">cACompromise</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">affiliationChanged</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
159 ················</span><span·class="ss">cessationOfOperation</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">certificateHold</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">privilegeWithdrawn</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">aACompromise</span><span·class="w">159 ················</span><span·class="ss">cessationOfOperation</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">certificateHold</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">privilegeWithdrawn</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">aACompromise</span><span·class="w">
  
160 </span><span·class="n">OID_macro</span><span·class="p"·data-group-id="7735604563-44">(</span><span·class="p"·data-group-id="7735604563-44">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="n">OID_name</span><span·class="p"·data-group-id="7735604563-45">(</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·0bfc46a97988d8f78bd6eb2a820f8804ca4bc5ba39dad50d5727f1d0e343c754·...·]-45">)</span><span·class="w">160 </span><span·class="n">OID_macro</span><span·class="p"·data-group-id="2349423981-44">(</span><span·class="p"·data-group-id="2349423981-44">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="n">OID_name</span><span·class="p"·data-group-id="2349423981-45">(</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·ee81e9510ba1f15bfbcd338ea242162a67525de94d00e4820b19b07832ed20b4·...·]-45">)</span><span·class="w">
  
161 </span><span·class="n">OID_name</span><span·class="p"·data-group-id="7735604563-46">(</span><span·class="p"·data-group-id="7735604563-46">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="7735604563-47">(</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·63a3c829e552f022fc72e652a74da867f4d7035307ee4b13a36140b9c69879fa·...·]-47">)</span></code></pre><h2·id="rsa"·class="section-heading">161 </span><span·class="n">OID_name</span><span·class="p"·data-group-id="2349423981-46">(</span><span·class="p"·data-group-id="2349423981-46">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="2349423981-47">(</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·a1316811657aeda461ac9fdeb7e04d8be2083cc16c0f7b04ce33353925bbee04·...·]-47">)</span></code></pre><h2·id="rsa"·class="section-heading">
162 ··<a·href="#rsa"·class="hover-link">162 ··<a·href="#rsa"·class="hover-link">
163 ····<i·class="ri-link-m"·aria-hidden="true"></i>163 ····<i·class="ri-link-m"·aria-hidden="true"></i>
164 ··</a>164 ··</a>
165 ··<span·class="text">RSA</span>165 ··<span·class="text">RSA</span>
166 </h2>166 </h2>
167 <p>Erlang·representation·of167 <p>Erlang·representation·of
168 <a·href="http://www.ietf.org/rfc/rfc3447.txt">Rivest-Shamir-Adleman·cryptosystem·(RSA)</a>168 <a·href="http://www.ietf.org/rfc/rfc3447.txt">Rivest-Shamir-Adleman·cryptosystem·(RSA)</a>
169 keys·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">&#39;RSAPublicKey&#39;</span><span·class="p"·data-group-id="4516816852-1">{</span><span·class="w">169 keys·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">&#39;RSAPublicKey&#39;</span><span·class="p"·data-group-id="4646334565-1">{</span><span·class="w">
170 ···</span><span·class="ss">modulus</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·pos_integer()</span><span·class="w">170 ···</span><span·class="ss">modulus</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·pos_integer()</span><span·class="w">
171 ···</span><span·class="ss">publicExponent</span><span·class="w">·</span><span·class="c1">%·pos_integer()</span><span·class="w">171 ···</span><span·class="ss">publicExponent</span><span·class="w">·</span><span·class="c1">%·pos_integer()</span><span·class="w">
172 ··</span><span·class="p"·data-group-id="4516816852-1">}</span><span·class="p">.</span><span·class="w">172 ··</span><span·class="p"·data-group-id="4646334565-1">}</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="o">#</span><span·class="ss">&#39;RSAPrivateKey&#39;</span><span·class="p"·data-group-id="4516816852-2">{</span><span·class="w">173 </span><span·class="o">#</span><span·class="ss">&#39;RSAPrivateKey&#39;</span><span·class="p"·data-group-id="4646334565-2">{</span><span·class="w">
174 ···</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·two-prime·|·multi</span><span·class="w">174 ···</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·two-prime·|·multi</span><span·class="w">
175 ···</span><span·class="ss">modulus</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·pos_integer()</span><span·class="w">175 ···</span><span·class="ss">modulus</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·pos_integer()</span><span·class="w">
176 ···</span><span·class="ss">publicExponent</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·pos_integer()</span><span·class="w">176 ···</span><span·class="ss">publicExponent</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·pos_integer()</span><span·class="w">
177 ···</span><span·class="ss">privateExponent</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·pos_integer()</span><span·class="w">177 ···</span><span·class="ss">privateExponent</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·pos_integer()</span><span·class="w">
178 ···</span><span·class="ss">prime1</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·pos_integer()</span><span·class="w">178 ···</span><span·class="ss">prime1</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·pos_integer()</span><span·class="w">
179 ···</span><span·class="ss">prime2</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·pos_integer()</span><span·class="w">179 ···</span><span·class="ss">prime2</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·pos_integer()</span><span·class="w">
180 ···</span><span·class="ss">exponent1</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·pos_integer()</span><span·class="w">180 ···</span><span·class="ss">exponent1</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·pos_integer()</span><span·class="w">
181 ···</span><span·class="ss">exponent2</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·pos_integer()</span><span·class="w">181 ···</span><span·class="ss">exponent2</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·pos_integer()</span><span·class="w">
182 ···</span><span·class="ss">coefficient</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%·pos_integer()</span><span·class="w">182 ···</span><span·class="ss">coefficient</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%·pos_integer()</span><span·class="w">
183 ···</span><span·class="ss">otherPrimeInfos</span><span·class="w">··</span><span·class="c1">%·[#OtherPrimeInfo{}]·|·asn1_NOVALUE</span><span·class="w">183 ···</span><span·class="ss">otherPrimeInfos</span><span·class="w">··</span><span·class="c1">%·[#OtherPrimeInfo{}]·|·asn1_NOVALUE</span><span·class="w">
184 ··</span><span·class="p"·data-group-id="4516816852-2">}</span><span·class="p">.</span><span·class="w">184 ··</span><span·class="p"·data-group-id="4646334565-2">}</span><span·class="p">.</span><span·class="w">
  
185 </span><span·class="o">#</span><span·class="ss">&#39;OtherPrimeInfo&#39;</span><span·class="p"·data-group-id="4516816852-3">{</span><span·class="w">185 </span><span·class="o">#</span><span·class="ss">&#39;OtherPrimeInfo&#39;</span><span·class="p"·data-group-id="4646334565-3">{</span><span·class="w">
186 ···</span><span·class="ss">prime</span><span·class="p">,</span><span·class="w">···········</span><span·class="c1">%·pos_integer()</span><span·class="w">186 ···</span><span·class="ss">prime</span><span·class="p">,</span><span·class="w">···········</span><span·class="c1">%·pos_integer()</span><span·class="w">
187 ···</span><span·class="ss">exponent</span><span·class="p">,</span><span·class="w">········</span><span·class="c1">%·pos_integer()</span><span·class="w">187 ···</span><span·class="ss">exponent</span><span·class="p">,</span><span·class="w">········</span><span·class="c1">%·pos_integer()</span><span·class="w">
188 ···</span><span·class="ss">coefficient</span><span·class="w">······</span><span·class="c1">%·pos_integer()</span><span·class="w">188 ···</span><span·class="ss">coefficient</span><span·class="w">······</span><span·class="c1">%·pos_integer()</span><span·class="w">
189 ··</span><span·class="p"·data-group-id="4516816852-3">}</span><span·class="p">.</span><span·class="w">189 ··</span><span·class="p"·data-group-id="4646334565-3">}</span><span·class="p">.</span><span·class="w">
  
190 </span><span·class="o">#</span><span·class="ss">&#39;RSASSA-PSS-params&#39;</span><span·class="p"·data-group-id="4516816852-4">{</span><span·class="w">190 </span><span·class="o">#</span><span·class="ss">&#39;RSASSA-PSS-params&#39;</span><span·class="p"·data-group-id="4646334565-4">{</span><span·class="w">
191 ···</span><span·class="ss">hashAlgorithm</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%·#&#39;HashAlgorithm&#39;{}},</span><span·class="w">191 ···</span><span·class="ss">hashAlgorithm</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%·#&#39;HashAlgorithm&#39;{}},</span><span·class="w">
192 ···</span><span·class="ss">maskGenAlgorithm</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·#&#39;MaskGenAlgorithm&#39;{}},</span><span·class="w">192 ···</span><span·class="ss">maskGenAlgorithm</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·#&#39;MaskGenAlgorithm&#39;{}},</span><span·class="w">
193 ···</span><span·class="ss">saltLength</span><span·class="p">,</span><span·class="w">········</span><span·class="c1">%·pos_integer(),</span><span·class="w">193 ···</span><span·class="ss">saltLength</span><span·class="p">,</span><span·class="w">········</span><span·class="c1">%·pos_integer(),</span><span·class="w">
194 ···</span><span·class="ss">trailerField</span><span·class="p">,</span><span·class="w">······</span><span·class="c1">%·pos_integer()</span><span·class="w">194 ···</span><span·class="ss">trailerField</span><span·class="p">,</span><span·class="w">······</span><span·class="c1">%·pos_integer()</span><span·class="w">
195 ··</span><span·class="p"·data-group-id="4516816852-4">}</span><span·class="p">.</span><span·class="w">195 ··</span><span·class="p"·data-group-id="4646334565-4">}</span><span·class="p">.</span><span·class="w">
  
196 </span><span·class="o">#</span><span·class="ss">&#39;HashAlgorithm&#39;</span><span·class="p"·data-group-id="4516816852-5">{</span><span·class="w">196 </span><span·class="o">#</span><span·class="ss">&#39;HashAlgorithm&#39;</span><span·class="p"·data-group-id="4646334565-5">{</span><span·class="w">
197 ···</span><span·class="ss">algorithm</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·oid()</span><span·class="w">197 ···</span><span·class="ss">algorithm</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·oid()</span><span·class="w">
198 ···</span><span·class="ss">parameters</span><span·class="w">··</span><span·class="c1">%·defaults·to·asn1_NOVALUE</span><span·class="w">198 ···</span><span·class="ss">parameters</span><span·class="w">··</span><span·class="c1">%·defaults·to·asn1_NOVALUE</span><span·class="w">
199 ··</span><span·class="p"·data-group-id="4516816852-5">}</span><span·class="p">.</span><span·class="w">199 ··</span><span·class="p"·data-group-id="4646334565-5">}</span><span·class="p">.</span><span·class="w">
  
200 </span><span·class="o">#</span><span·class="ss">&#39;MaskGenAlgorithm&#39;</span><span·class="p"·data-group-id="4516816852-6">{</span><span·class="w">200 </span><span·class="o">#</span><span·class="ss">&#39;MaskGenAlgorithm&#39;</span><span·class="p"·data-group-id="4646334565-6">{</span><span·class="w">
201 ···</span><span·class="ss">algorithm</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·oid()</span><span·class="w">201 ···</span><span·class="ss">algorithm</span><span·class="p">,</span><span·class="w">··</span><span·class="c1">%·oid()</span><span·class="w">
202 ···</span><span·class="ss">parameters</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·defaults·to·asn1_NOVALUE</span><span·class="w">202 ···</span><span·class="ss">parameters</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·defaults·to·asn1_NOVALUE</span><span·class="w">
203 ··</span><span·class="p"·data-group-id="4516816852-6">}</span><span·class="p">.</span></code></pre><h2·id="dsa"·class="section-heading">203 ··</span><span·class="p"·data-group-id="4646334565-6">}</span><span·class="p">.</span></code></pre><h2·id="dsa"·class="section-heading">
204 ··<a·href="#dsa"·class="hover-link">204 ··<a·href="#dsa"·class="hover-link">
205 ····<i·class="ri-link-m"·aria-hidden="true"></i>205 ····<i·class="ri-link-m"·aria-hidden="true"></i>
206 ··</a>206 ··</a>
207 ··<span·class="text">DSA</span>207 ··<span·class="text">DSA</span>
208 </h2>208 </h2>
209 <p>Erlang·representation·of209 <p>Erlang·representation·of
210 <a·href="http://www.ietf.org/rfc/rfc6979.txt">Digital·Signature·Algorithm·(DSA)</a>·keys</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">&#39;DSAPrivateKey&#39;</span><span·class="p"·data-group-id="2034765563-1">{</span><span·class="w">210 <a·href="http://www.ietf.org/rfc/rfc6979.txt">Digital·Signature·Algorithm·(DSA)</a>·keys</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">&#39;DSAPrivateKey&#39;</span><span·class="p"·data-group-id="0002240971-1">{</span><span·class="w">
211 ···</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">······</span><span·class="c1">%·pos_integer()</span><span·class="w">211 ···</span><span·class="ss">version</span><span·class="p">,</span><span·class="w">······</span><span·class="c1">%·pos_integer()</span><span·class="w">
212 ···</span><span·class="ss">p</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">212 ···</span><span·class="ss">p</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">
213 ···</span><span·class="ss">q</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">213 ···</span><span·class="ss">q</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">
214 ···</span><span·class="ss">g</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">214 ···</span><span·class="ss">g</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">
215 ···</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">215 ···</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·pos_integer()</span><span·class="w">
216 ···</span><span·class="ss">x</span><span·class="w">·············</span><span·class="c1">%·pos_integer()</span><span·class="w">216 ···</span><span·class="ss">x</span><span·class="w">·············</span><span·class="c1">%·pos_integer()</span><span·class="w">
217 ··</span><span·class="p"·data-group-id="2034765563-1">}</span><span·class="p">.</span><span·class="w">217 ··</span><span·class="p"·data-group-id="0002240971-1">}</span><span·class="p">.</span><span·class="w">
  
218 </span><span·class="o">#</span><span·class="ss">&#39;Dss-Parms&#39;</span><span·class="p"·data-group-id="2034765563-2">{</span><span·class="w">218 </span><span·class="o">#</span><span·class="ss">&#39;Dss-Parms&#39;</span><span·class="p"·data-group-id="0002240971-2">{</span><span·class="w">
219 ···</span><span·class="ss">p</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·pos_integer()</span><span·class="w">219 ···</span><span·class="ss">p</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·pos_integer()</span><span·class="w">
220 ···</span><span·class="ss">q</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·pos_integer()</span><span·class="w">220 ···</span><span·class="ss">q</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·pos_integer()</span><span·class="w">
221 ···</span><span·class="ss">g</span><span·class="w">··········</span><span·class="c1">%·pos_integer()</span><span·class="w">221 ···</span><span·class="ss">g</span><span·class="w">··········</span><span·class="c1">%·pos_integer()</span><span·class="w">
222 ··</span><span·class="p"·data-group-id="2034765563-2">}</span><span·class="p">.</span></code></pre><h2·id="ecdsa-and-eddsa"·class="section-heading">222 ··</span><span·class="p"·data-group-id="0002240971-2">}</span><span·class="p">.</span></code></pre><h2·id="ecdsa-and-eddsa"·class="section-heading">
223 ··<a·href="#ecdsa-and-eddsa"·class="hover-link">223 ··<a·href="#ecdsa-and-eddsa"·class="hover-link">
224 ····<i·class="ri-link-m"·aria-hidden="true"></i>224 ····<i·class="ri-link-m"·aria-hidden="true"></i>
225 ··</a>225 ··</a>
Max diff block lines reached; 65872/98351 bytes (66.98%) of diff not shown.
640 B
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-E998F0E5.js"></script>124 <script·src="dist/search_data-118C23D3.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
200 KB
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/using_public_key.html
    
Offset 144, 290 lines modifiedOffset 144, 290 lines modified
144 ignored.·Attributes,·if·present,·are·ignored·except·for·<code·class="inline">Proc-Type</code>·and144 ignored.·Attributes,·if·present,·are·ignored·except·for·<code·class="inline">Proc-Type</code>·and
145 <code·class="inline">DEK-Info</code>,·which·are·used·when·<code·class="inline">DER</code>·data·is·encrypted.</p><h3·id="dsa-private-key"·class="section-heading">145 <code·class="inline">DEK-Info</code>,·which·are·used·when·<code·class="inline">DER</code>·data·is·encrypted.</p><h3·id="dsa-private-key"·class="section-heading">
146 ··<a·href="#dsa-private-key"·class="hover-link">146 ··<a·href="#dsa-private-key"·class="hover-link">
147 ····<i·class="ri-link-m"·aria-hidden="true"></i>147 ····<i·class="ri-link-m"·aria-hidden="true"></i>
148 ··</a>148 ··</a>
149 ··<span·class="text">DSA·Private·Key</span>149 ··<span·class="text">DSA·Private·Key</span>
150 </h3>150 </h3>
151 <p>A·DSA·private·key·can·look·as·follows:</p><blockquote><h4·class="info">Note</h4><p>File·handling·is·not·done·by·the·Public·Key·application.</p></blockquote><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="5659804309-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PemBin</span><span·class="p"·data-group-id="5659804309-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·215,·SHA:·7ddce59102046d122aa47074ed3997cef7142de6f7700997dac1df85040f6d9c·...·]-2">)</span><span·class="p">.</span><span·class="w">151 <p>A·DSA·private·key·can·look·as·follows:</p><blockquote><h4·class="info">Note</h4><p>File·handling·is·not·done·by·the·Public·Key·application.</p></blockquote><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="2990255072-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PemBin</span><span·class="p"·data-group-id="2990255072-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·215,·SHA:·1c84dfb9a77a37e3021953d81bc1e86fcfab8b68d5a483d6e983bd744ecd653a·...·]-2">)</span><span·class="p">.</span><span·class="w">
152 </span><span·class="p"·data-group-id="5659804309-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;-----BEGIN·DSA·PRIVATE·KEY-----\nMIIBuw&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·c[·...·truncated·by·diffoscope;·len:·683,·SHA:·fd6378b22b66bcacf093110cc0611e2b88202ee367a83082e17739766cb7462d·...·]-2">)</span><span·class="p">.</span><span·class="w">152 </span><span·class="p"·data-group-id="2990255072-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;-----BEGIN·DSA·PRIVATE·KEY-----\nMIIBuw&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·c[·...·truncated·by·diffoscope;·len:·683,·SHA:·c9089595cd401c13cbc485db873d2578ab8ae2164b122139517b6a361f8c7209·...·]-2">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p"·data-group-id="0021189568-3">[</span><span·class="p"·data-group-id="0021189568-4">{</span><span·class="ss">&#39;DSAPrivateKey&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">187</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">183</span><span·class="p">,</span><span·class="w">153 </span><span·class="p"·data-group-id="1679711954-3">[</span><span·class="p"·data-group-id="1679711954-4">{</span><span·class="ss">&#39;DSAPrivateKey&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">187</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">183</span><span·class="p">,</span><span·class="w">
154 ····················</span><span·class="mi">179</span><span·class="p">,</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">217</span><span·class="p">,</span><span·class="mi">37</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">157</span><span·class="p">,</span><span·class="mi">21</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="w">154 ····················</span><span·class="mi">179</span><span·class="p">,</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">217</span><span·class="p">,</span><span·class="mi">37</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">144</span><span·class="p">,</span><span·class="mi">157</span><span·class="p">,</span><span·class="mi">21</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="w">
155 ····················</span><span·class="mi">162</span><span·class="p">,</span><span·class="mi">207</span><span·class="p">,</span><span·class="mi">61</span><span·class="p">,</span><span·class="mi">246</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">155 ····················</span><span·class="mi">162</span><span·class="p">,</span><span·class="mi">207</span><span·class="p">,</span><span·class="mi">61</span><span·class="p">,</span><span·class="mi">246</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
156 ····················</span><span·class="ss">not_encrypted</span><span·class="p"·data-group-id="0021189568-4">}</span><span·class="p"·data-group-id="0021189568-3">]</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><sp[·...·truncated·by·diffoscope;·len:·243,·SHA:·b82ad3030e71341f6a1944eb9f2230e90ea5c8bb69d0dec3cc4fdee39f48de9d·...·]5-1">)</span><span·class="p">.</span><span·class="w">156 ····················</span><span·class="ss">not_encrypted</span><span·class="p"·data-group-id="1679711954-4">}</span><span·class="p"·data-group-id="1679711954-3">]</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><sp[·...·truncated·by·diffoscope;·len:·243,·SHA:·2987fa8acea8b86289fd2d8d8b760c3ea9a9c7ba5fa3457f515c6cd045329148·...·]5-1">)</span><span·class="p">.</span><span·class="w">
157 </span><span·class="o">#</span><span·class="ss">&#39;DSAPrivateKey&#39;</span><span·class="p"·data-group-id="1869043585-2">{</span><span·class="ss">version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">157 </span><span·class="o">#</span><span·class="ss">&#39;DSAPrivateKey&#39;</span><span·class="p"·data-group-id="3559759845-2">{</span><span·class="ss">version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
158 ·················</span><span·class="ss">p</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">12900045185019966618</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">6593</span><span·class="p">,</span><span·class="w">158 ·················</span><span·class="ss">p</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">12900045185019966618</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">6593</span><span·class="p">,</span><span·class="w">
159 ·················</span><span·class="ss">q</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1216700114794736143432235288305776850295620488937</span><span·class="p">,</span><span·class="w">159 ·················</span><span·class="ss">q</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1216700114794736143432235288305776850295620488937</span><span·class="p">,</span><span·class="w">
160 ·················</span><span·class="ss">g</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">10442040227452349332</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">47213</span><span·class="p">,</span><span·class="w">160 ·················</span><span·class="ss">g</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">10442040227452349332</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">47213</span><span·class="p">,</span><span·class="w">
161 ·················</span><span·class="ss">y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">87256807980030509074</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">403143</span><span·class="p">,</span><span·class="w">161 ·················</span><span·class="ss">y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">87256807980030509074</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">403143</span><span·class="p">,</span><span·class="w">
162 ·················</span><span·class="ss">x</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">510968529856012146351317363807366575075645839654</span><span·class="p"·data-group-id="1869043585-2">}</span></code></pre><h3·id="rsa-private-key-with-password"·class="section-heading">162 ·················</span><span·class="ss">x</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">510968529856012146351317363807366575075645839654</span><span·class="p"·data-group-id="3559759845-2">}</span></code></pre><h3·id="rsa-private-key-with-password"·class="section-heading">
163 ··<a·href="#rsa-private-key-with-password"·class="hover-link">163 ··<a·href="#rsa-private-key-with-password"·class="hover-link">
164 ····<i·class="ri-link-m"·aria-hidden="true"></i>164 ····<i·class="ri-link-m"·aria-hidden="true"></i>
165 ··</a>165 ··</a>
166 ··<span·class="text">RSA·Private·Key·with·Password</span>166 ··<span·class="text">RSA·Private·Key·with·Password</span>
167 </h3>167 </h3>
168 <p>An·RSA·private·key·encrypted·with·a·password·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="0129912501-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PemBin</span><span·class="p"·data-group-id="0129912501-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·215,·SHA:·06f8d0f5020efd4d9c29a62f9e1f85306fc90ea002f697ef2482b9310f6bb4c2·...·]-2">)</span><span·class="p">.</span><span·class="w">168 <p>An·RSA·private·key·encrypted·with·a·password·can·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="1965477459-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PemBin</span><span·class="p"·data-group-id="1965477459-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·215,·SHA:·3a09bc4efe8573027baaeeaf586648e0163aede5cee6a2c6a121610327b54ad6·...·]-2">)</span><span·class="p">.</span><span·class="w">
169 </span><span·class="p"·data-group-id="0129912501-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Bag·Attribute&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><s[·...·truncated·by·diffoscope;·len:·656,·SHA:·b84ac191413b0f82f620edaa8e45d00456e4114de4ecb2c429307ccde0c1e09d·...·]-2">)</span><span·class="p">.</span><span·class="w">169 </span><span·class="p"·data-group-id="1965477459-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Bag·Attribute&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><s[·...·truncated·by·diffoscope;·len:·656,·SHA:·0543fd19799c09354ad7ad9f78099a33288c1ff55e302a566699012ea26c1d34·...·]-2">)</span><span·class="p">.</span><span·class="w">
170 </span><span·class="p"·data-group-id="5741847237-3">[</span><span·class="p"·data-group-id="5741847237-4">{</span><span·class="ss">&#39;RSAPrivateKey&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">224</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">117</span><span·class="p">,</span><span·class="mi">203</span><span·class="p">,</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">40</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">126</span><span·class="p">,</span><span·class="w">170 </span><span·class="p"·data-group-id="2594429452-3">[</span><span·class="p"·data-group-id="2594429452-4">{</span><span·class="ss">&#39;RSAPrivateKey&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">224</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">117</span><span·class="p">,</span><span·class="mi">203</span><span·class="p">,</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">40</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">126</span><span·class="p">,</span><span·class="w">
171 ····················</span><span·class="mi">221</span><span·class="p">,</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">154</span><span·class="p">,</span><span·class="mi">249</span><span·class="p">,</span><span·class="mi">85</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">202</span><span·class="p">,</span><span·class="mi">251</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="w">171 ····················</span><span·class="mi">221</span><span·class="p">,</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">154</span><span·class="p">,</span><span·class="mi">249</span><span·class="p">,</span><span·class="mi">85</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">202</span><span·class="p">,</span><span·class="mi">251</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="w">
172 ····················</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">120</span><span·class="p">,</span><span·class="mi">57</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">89</span><span·class="p">,</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">172 ····················</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">120</span><span·class="p">,</span><span·class="mi">57</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">89</span><span·class="p">,</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
173 ··················</span><span·class="p"·data-group-id="5741847237-5">{</span><span·class="s">&quot;DES-EDE3-CBC&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;kÙeø¼pµL&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5741847237-5">}</span><span[·...·truncated·by·diffoscope;·len:·716,·SHA:·62c96372ccea9fa617a205fc7c8f56d306dec5474efd923c7126f38e3569c454·...·]-1">)</span><span·class="p">.</span><span·class="w">173 ··················</span><span·class="p"·data-group-id="2594429452-5">{</span><span·class="s">&quot;DES-EDE3-CBC&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;kÙeø¼pµL&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2594429452-5">}</span><span[·...·truncated·by·diffoscope;·len:·716,·SHA:·598cf950a4fd3a4480a149cc9db25079cdd304640be6dde8575e4c61746508e4·...·]-1">)</span><span·class="p">.</span><span·class="w">
174 </span><span·class="o">#</span><span·class="ss">&#39;RSAPrivateKey&#39;</span><span·class="p"·data-group-id="8707649501-2">{</span><span·class="ss">version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;two-prime&#39;</span><span·class="p">,</span><span·class="w">174 </span><span·class="o">#</span><span·class="ss">&#39;RSAPrivateKey&#39;</span><span·class="p"·data-group-id="2479760293-2">{</span><span·class="ss">version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">&#39;two-prime&#39;</span><span·class="p">,</span><span·class="w">
175 ·················</span><span·class="ss">modulus</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1112355156729921663373</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">2737107</span><span·class="p">,</span><span·class="w">175 ·················</span><span·class="ss">modulus</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1112355156729921663373</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">2737107</span><span·class="p">,</span><span·class="w">
176 ·················</span><span·class="ss">publicExponent</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">65537</span><span·class="p">,</span><span·class="w">176 ·················</span><span·class="ss">publicExponent</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">65537</span><span·class="p">,</span><span·class="w">
177 ·················</span><span·class="ss">privateExponent</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">58064406231183</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">2239766033</span><span·class="p">,</span><span·class="w">177 ·················</span><span·class="ss">privateExponent</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">58064406231183</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">2239766033</span><span·class="p">,</span><span·class="w">
178 ·················</span><span·class="ss">prime1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">11034766614656598484098</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">7326883017</span><span·class="p">,</span><span·class="w">178 ·················</span><span·class="ss">prime1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">11034766614656598484098</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">7326883017</span><span·class="p">,</span><span·class="w">
179 ·················</span><span·class="ss">prime2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">10080459293561036618240</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">77738643771</span><span·class="p">,</span><span·class="w">179 ·················</span><span·class="ss">prime2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">10080459293561036618240</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">77738643771</span><span·class="p">,</span><span·class="w">
180 ·················</span><span·class="ss">exponent1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">77928819327425934607</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">22152984217</span><span·class="p">,</span><span·class="w">180 ·················</span><span·class="ss">exponent1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">77928819327425934607</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">22152984217</span><span·class="p">,</span><span·class="w">
181 ·················</span><span·class="ss">exponent2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">36287623121853605733</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">20588523793</span><span·class="p">,</span><span·class="w">181 ·················</span><span·class="ss">exponent2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">36287623121853605733</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">20588523793</span><span·class="p">,</span><span·class="w">
182 ·················</span><span·class="ss">coefficient</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">924840412626098444</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">41820968343</span><span·class="p">,</span><span·class="w">182 ·················</span><span·class="ss">coefficient</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">924840412626098444</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="mi">41820968343</span><span·class="p">,</span><span·class="w">
183 ·················</span><span·class="ss">otherPrimeInfos</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">asn1_NOVALUE</span><span·class="p"·data-group-id="8707649501-2">}</span></code></pre><h3·id="x509-certificates"·class="section-heading">183 ·················</span><span·class="ss">otherPrimeInfos</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">asn1_NOVALUE</span><span·class="p"·data-group-id="2479760293-2">}</span></code></pre><h3·id="x509-certificates"·class="section-heading">
184 ··<a·href="#x509-certificates"·class="hover-link">184 ··<a·href="#x509-certificates"·class="hover-link">
185 ····<i·class="ri-link-m"·aria-hidden="true"></i>185 ····<i·class="ri-link-m"·aria-hidden="true"></i>
186 ··</a>186 ··</a>
187 ··<span·class="text">X509·Certificates</span>187 ··<span·class="text">X509·Certificates</span>
188 </h3>188 </h3>
189 <p>The·following·is·an·example·of·X509·certificates:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="0350411076-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PemBin</span><span·class="p"·data-group-id="0350411076-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·219,·SHA:·a5e52acf9c5ad25e6cd72983612e6760d2763ee41f3c9187edb615cd24f682c3·...·]-2">)</span><span·class="p">.</span><span·class="w">189 <p>The·following·is·an·example·of·X509·certificates:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="7320910011-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PemBin</span><span·class="p"·data-group-id="7320910011-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·219,·SHA:·e78c1718e6b3ec8492c73120be76086e02a85a88b6319f64735d1a3cc80a95b1·...·]-2">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="p"·data-group-id="0350411076-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;-----BEGIN·CERTIFICATE-----\nMIIC7jCCAl&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·c[·...·truncated·by·diffoscope;·len:·740,·SHA:·9eab574c2f677b41a837088c6701088d407046169e41dcba2506956a96011629·...·]-2">)</span><span·class="p">.</span><span·class="w">190 </span><span·class="p"·data-group-id="7320910011-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;-----BEGIN·CERTIFICATE-----\nMIIC7jCCAl&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·c[·...·truncated·by·diffoscope;·len:·740,·SHA:·fc5d30be5791f4c7823cedcaac52eb281fa2db3d419dbd0d6169d7ad24421672·...·]-2">)</span><span·class="p">.</span><span·class="w">
191 </span><span·class="p"·data-group-id="0743671146-3">[</span><span·class="p"·data-group-id="0743671146-4">{</span><span·class="ss">&#39;Certificate&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">238</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">87</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">191 </span><span·class="p"·data-group-id="0522071967-3">[</span><span·class="p"·data-group-id="0522071967-4">{</span><span·class="ss">&#39;Certificate&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">238</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">87</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
192 ··················</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">145</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">191</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">120</span><span·class="p">,</span><span·class="mi">150</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="w">192 ··················</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">145</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">214</span><span·class="p">,</span><span·class="mi">191</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">120</span><span·class="p">,</span><span·class="mi">150</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="w">
193 ··················</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">193 ··················</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
194 ················</span><span·class="ss">not_encrypted</span><span·class="p"·data-group-id="0743671146-4">}</span><span·class="p">,</span><span·class="w">194 ················</span><span·class="ss">not_encrypted</span><span·class="p"·data-group-id="0522071967-4">}</span><span·class="p">,</span><span·class="w">
195 ·</span><span·class="p"·data-group-id="0743671146-5">{</span><span·class="ss">&#39;Certificate&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">200</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">195 ·</span><span·class="p"·data-group-id="0522071967-5">{</span><span·class="ss">&#39;Certificate&#39;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">200</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">130</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">160</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
196 ··················</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">42</span><span·class="p">,</span><span·class="mi">134</span><span·class="p">,</span><span·class="mi">72</span><span·class="p">,</span><span·class="mi">134</span><span·class="p">,</span><span·class="mi">247</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">196 ··················</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">13</span><span·class="p">,</span><span·class="mi">6</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">42</span><span·class="p">,</span><span·class="mi">134</span><span·class="p">,</span><span·class="mi">72</span><span·class="p">,</span><span·class="mi">134</span><span·class="p">,</span><span·class="mi">247</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
197 ················</span><span·class="ss">not_encrypted</span><span·class="p"·data-group-id="0743671146-5">}</span><span·class="p"·data-group-id="0743671146-3">]</span></code></pre><p>Certificates·can·be·decoded·as·usual:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">Cert</span><span·c[·...·truncated·by·diffoscope;·len:·290,·SHA:·804950698282fc209a3fad09600d5abafb537ecd92cabd47adcb09c82074432c·...·]-1">)</span><span·class="p">.</span><span·class="w">197 ················</span><span·class="ss">not_encrypted</span><span·class="p"·data-group-id="0522071967-5">}</span><span·class="p"·data-group-id="0522071967-3">]</span></code></pre><p>Certificates·can·be·decoded·as·usual:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">Cert</span><span·c[·...·truncated·by·diffoscope;·len:·290,·SHA:·a6af098ce10924abdf57dca80d81bf071df61b11e16dd2e57e112a90aaa9d71f·...·]-1">)</span><span·class="p">.</span><span·class="w">
198 </span><span·class="o">#</span><span·class="ss">&#39;Certificate&#39;</span><span·class="p"·data-group-id="8652678985-2">{</span><span·class="w">198 </span><span·class="o">#</span><span·class="ss">&#39;Certificate&#39;</span><span·class="p"·data-group-id="3975223466-2">{</span><span·class="w">
199 ····</span><span·class="ss">tbsCertificate</span><span·class="w">·</span><span·class="o">=</span><span·class="w">199 ····</span><span·class="ss">tbsCertificate</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
200 ········</span><span·class="o">#</span><span·class="ss">&#39;TBSCertificate&#39;</span><span·class="p"·data-group-id="8652678985-3">{</span><span·class="w">200 ········</span><span·class="o">#</span><span·class="ss">&#39;TBSCertificate&#39;</span><span·class="p"·data-group-id="3975223466-3">{</span><span·class="w">
201 ············</span><span·class="ss">version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">v3</span><span·class="p">,</span><span·class="ss">serialNumber</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">16614168075301976214</span><span·class="p">,</span><span·class="w">201 ············</span><span·class="ss">version</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">v3</span><span·class="p">,</span><span·class="ss">serialNumber</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">16614168075301976214</span><span·class="p">,</span><span·class="w">
202 ············</span><span·class="ss">signature</span><span·class="w">·</span><span·class="o">=</span><span·class="w">202 ············</span><span·class="ss">signature</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
203 ················</span><span·class="o">#</span><span·class="ss">&#39;AlgorithmIdentifier&#39;</span><span·class="p"·data-group-id="8652678985-4">{</span><span·class="w">203 ················</span><span·class="o">#</span><span·class="ss">&#39;AlgorithmIdentifier&#39;</span><span·class="p"·data-group-id="3975223466-4">{</span><span·class="w">
204 ····················</span><span·class="ss">algorithm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-5">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span·[·...·truncated·by·diffoscope;·len:·133,·SHA:·bb4695d13b35f2f5af6bdbb687a45ecb84bcb1b160f3abb00c5456dae9529dc6·...·]-5">}</span><span·class="p">,</span><span·class="w">204 ····················</span><span·class="ss">algorithm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-5">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span·[·...·truncated·by·diffoscope;·len:·133,·SHA:·304eee99e2481c639154b46962749660c07415b64362e27928ac53bb0f246adb·...·]-5">}</span><span·class="p">,</span><span·class="w">
205 ····················</span><span·class="ss">parameters</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-4">}</span><span·class="p">,</span><span·class="w">205 ····················</span><span·class="ss">parameters</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-4">}</span><span·class="p">,</span><span·class="w">
206 ············</span><span·class="ss">issuer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">206 ············</span><span·class="ss">issuer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
207 ················</span><span·class="p"·data-group-id="8652678985-6">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="w">207 ················</span><span·class="p"·data-group-id="3975223466-6">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="w">
208 ····················</span><span·class="p"·data-group-id="8652678985-7">[</span><span·class="p"·data-group-id="8652678985-8">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-9">{</span><span·class="w">208 ····················</span><span·class="p"·data-group-id="3975223466-7">[</span><span·class="p"·data-group-id="3975223466-8">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-9">{</span><span·class="w">
209 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-10">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8652678985-10">}</span><span·class="p">,</span><span·class="w">209 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-10">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="3975223466-10">}</span><span·class="p">,</span><span·class="w">
210 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-9">}</span><span·class="p"·data-group-id="8652678985-8">]</span><span·class="p">,</span><span·class="w">210 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-9">}</span><span·class="p"·data-group-id="3975223466-8">]</span><span·class="p">,</span><span·class="w">
211 ·····················</span><span·class="p"·data-group-id="8652678985-11">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-12">{</span><span·class="w">211 ·····················</span><span·class="p"·data-group-id="3975223466-11">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-12">{</span><span·class="w">
212 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-13">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">11</span><span·class="p"·data-group-id="8652678985-13">}</span><span·class="p">,</span><span·class="w">212 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-13">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">11</span><span·class="p"·data-group-id="3975223466-13">}</span><span·class="p">,</span><span·class="w">
213 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">10</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-12">}</span><span·class="p"·data-group-id="8652678985-11">]</span><span·class="p">,</span><span·class="w">213 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">10</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-12">}</span><span·class="p"·data-group-id="3975223466-11">]</span><span·class="p">,</span><span·class="w">
214 ·····················</span><span·class="p"·data-group-id="8652678985-14">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-15">{</span><span·class="w">214 ·····················</span><span·class="p"·data-group-id="3975223466-14">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-15">{</span><span·class="w">
215 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-16">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="8652678985-16">}</span><span·class="p">,</span><span·class="w">215 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-16">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="3975223466-16">}</span><span·class="p">,</span><span·class="w">
216 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-15">}</span><span·class="p"·data-group-id="8652678985-14">]</span><span·class="p">,</span><span·class="w">216 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-15">}</span><span·class="p"·data-group-id="3975223466-14">]</span><span·class="p">,</span><span·class="w">
217 ·····················</span><span·class="p"·data-group-id="8652678985-17">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-18">{</span><span·class="w">217 ·····················</span><span·class="p"·data-group-id="3975223466-17">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-18">{</span><span·class="w">
218 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-19">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="8652678985-19">}</span><span·class="p">,</span><span·class="w">218 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-19">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="3975223466-19">}</span><span·class="p">,</span><span·class="w">
219 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">104</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-18">}</span><span·class="p"·data-group-id="8652678985-17">]</span><span·class="p">,</span><span·class="w">219 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">104</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-18">}</span><span·class="p"·data-group-id="3975223466-17">]</span><span·class="p">,</span><span·class="w">
220 ·····················</span><span·class="p"·data-group-id="8652678985-20">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-21">{</span><span·class="w">220 ·····················</span><span·class="p"·data-group-id="3975223466-20">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-21">{</span><span·class="w">
221 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-22">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="8652678985-22">}</span><span·class="p">,</span><span·class="w">221 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-22">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3975223466-22">}</span><span·class="p">,</span><span·class="w">
222 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-21">}</span><span·class="p"·data-group-id="8652678985-20">]</span><span·class="p">,</span><span·class="w">222 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-21">}</span><span·class="p"·data-group-id="3975223466-20">]</span><span·class="p">,</span><span·class="w">
223 ·····················</span><span·class="p"·data-group-id="8652678985-23">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-24">{</span><span·class="w">223 ·····················</span><span·class="p"·data-group-id="3975223466-23">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-24">{</span><span·class="w">
224 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-25">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·134,·SHA:·8a3e1e5455cca38c7237271cdfb6ed846c0cc9d972966fc66faadab6558f4ff1·...·]-25">}</span><span·class="p">,</span><span·class="w">224 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-25">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·134,·SHA:·16d1d82f73e28edf69fc0e07a95f9028b01ff5a1a1ac997a03ff19e1d730adf3·...·]-25">}</span><span·class="p">,</span><span·class="w">
225 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">112</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">64</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-24">}</span><span·class="p"·data-group-id="8652678985-23">]</span><span·class="p"·data-group-id="8652678985-7">]</span><span·class="p"·data-group-id="8652678985-6">}</span><span·class="p">,</span><span·class="w">225 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">112</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">64</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-24">}</span><span·class="p"·data-group-id="3975223466-23">]</span><span·class="p"·data-group-id="3975223466-7">]</span><span·class="p"·data-group-id="3975223466-6">}</span><span·class="p">,</span><span·class="w">
226 ············</span><span·class="ss">validity</span><span·class="w">·</span><span·class="o">=</span><span·class="w">226 ············</span><span·class="ss">validity</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
227 ················</span><span·class="o">#</span><span·class="ss">&#39;Validity&#39;</span><span·class="p"·data-group-id="8652678985-26">{</span><span·class="w">227 ················</span><span·class="o">#</span><span·class="ss">&#39;Validity&#39;</span><span·class="p"·data-group-id="3975223466-26">{</span><span·class="w">
228 ····················</span><span·class="ss">notBefore</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-27">{</span><span·class="ss">utcTime</span><span·class="p">,</span><span·class="s">&quot;080109082929Z&quot;</span><span·class="p"·data-group-id="8652678985-27">}</span><span·class="p">,</span><span·class="w">228 ····················</span><span·class="ss">notBefore</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-27">{</span><span·class="ss">utcTime</span><span·class="p">,</span><span·class="s">&quot;080109082929Z&quot;</span><span·class="p"·data-group-id="3975223466-27">}</span><span·class="p">,</span><span·class="w">
229 ····················</span><span·class="ss">notAfter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-28">{</span><span·class="ss">utcTime</span><span·class="p">,</span><span·class="s">&quot;080208082929Z&quot;</span><span·class="p"·data-group-id="8652678985-28">}</span><span·class="p"·data-group-id="8652678985-26">}</span><span·class="p">,</span><span·class="w">229 ····················</span><span·class="ss">notAfter</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-28">{</span><span·class="ss">utcTime</span><span·class="p">,</span><span·class="s">&quot;080208082929Z&quot;</span><span·class="p"·data-group-id="3975223466-28">}</span><span·class="p"·data-group-id="3975223466-26">}</span><span·class="p">,</span><span·class="w">
230 ············</span><span·class="ss">subject</span><span·class="w">·</span><span·class="o">=</span><span·class="w">230 ············</span><span·class="ss">subject</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
231 ················</span><span·class="p"·data-group-id="8652678985-29">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="w">231 ················</span><span·class="p"·data-group-id="3975223466-29">{</span><span·class="ss">rdnSequence</span><span·class="p">,</span><span·class="w">
232 ····················</span><span·class="p"·data-group-id="8652678985-30">[</span><span·class="p"·data-group-id="8652678985-31">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-32">{</span><span·class="w">232 ····················</span><span·class="p"·data-group-id="3975223466-30">[</span><span·class="p"·data-group-id="3975223466-31">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-32">{</span><span·class="w">
233 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-33">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="8652678985-33">}</span><span·class="p">,</span><span·class="w">233 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-33">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="3975223466-33">}</span><span·class="p">,</span><span·class="w">
234 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-32">}</span><span·class="p"·data-group-id="8652678985-31">]</span><span·class="p">,</span><span·class="w">234 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-32">}</span><span·class="p"·data-group-id="3975223466-31">]</span><span·class="p">,</span><span·class="w">
235 ·····················</span><span·class="p"·data-group-id="8652678985-34">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-35">{</span><span·class="w">235 ·····················</span><span·class="p"·data-group-id="3975223466-34">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-35">{</span><span·class="w">
236 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-36">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">11</span><span·class="p"·data-group-id="8652678985-36">}</span><span·class="p">,</span><span·class="w">236 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-36">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">11</span><span·class="p"·data-group-id="3975223466-36">}</span><span·class="p">,</span><span·class="w">
237 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">10</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-35">}</span><span·class="p"·data-group-id="8652678985-34">]</span><span·class="p">,</span><span·class="w">237 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">10</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">103</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">84</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-35">}</span><span·class="p"·data-group-id="3975223466-34">]</span><span·class="p">,</span><span·class="w">
238 ·····················</span><span·class="p"·data-group-id="8652678985-37">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-38">{</span><span·class="w">238 ·····················</span><span·class="p"·data-group-id="3975223466-37">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-38">{</span><span·class="w">
239 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-39">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="8652678985-39">}</span><span·class="p">,</span><span·class="w">239 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-39">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">10</span><span·class="p"·data-group-id="3975223466-39">}</span><span·class="p">,</span><span·class="w">
240 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-38">}</span><span·class="p"·data-group-id="8652678985-37">]</span><span·class="p">,</span><span·class="w">240 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">115</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">110</span><span·class="p">,</span><span·class="mi">32</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-38">}</span><span·class="p"·data-group-id="3975223466-37">]</span><span·class="p">,</span><span·class="w">
241 ·····················</span><span·class="p"·data-group-id="8652678985-40">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-41">{</span><span·class="w">241 ·····················</span><span·class="p"·data-group-id="3975223466-40">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-41">{</span><span·class="w">
242 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-42">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="8652678985-42">}</span><span·class="p">,</span><span·class="w">242 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-42">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="3975223466-42">}</span><span·class="p">,</span><span·class="w">
243 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">104</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-41">}</span><span·class="p"·data-group-id="8652678985-40">]</span><span·class="p">,</span><span·class="w">243 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">104</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">108</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-41">}</span><span·class="p"·data-group-id="3975223466-40">]</span><span·class="p">,</span><span·class="w">
244 ·····················</span><span·class="p"·data-group-id="8652678985-43">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-44">{</span><span·class="w">244 ·····················</span><span·class="p"·data-group-id="3975223466-43">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-44">{</span><span·class="w">
245 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-45">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="8652678985-45">}</span><span·class="p">,</span><span·class="w">245 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-45">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3975223466-45">}</span><span·class="p">,</span><span·class="w">
246 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-44">}</span><span·class="p"·data-group-id="8652678985-43">]</span><span·class="p">,</span><span·class="w">246 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">19</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-44">}</span><span·class="p"·data-group-id="3975223466-43">]</span><span·class="p">,</span><span·class="w">
247 ·····················</span><span·class="p"·data-group-id="8652678985-46">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="8652678985-47">{</span><span·class="w">247 ·····················</span><span·class="p"·data-group-id="3975223466-46">[</span><span·class="o">#</span><span·class="ss">&#39;AttributeTypeAndValue&#39;</span><span·class="p"·data-group-id="3975223466-47">{</span><span·class="w">
248 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-48">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·134,·SHA:·8a3e1e5455cca38c7237271cdfb6ed846c0cc9d972966fc66faadab6558f4ff1·...·]-48">}</span><span·class="p">,</span><span·class="w">248 ··························</span><span·class="ss">type</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-48">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·134,·SHA:·16d1d82f73e28edf69fc0e07a95f9028b01ff5a1a1ac997a03ff19e1d730adf3·...·]-48">}</span><span·class="p">,</span><span·class="w">
249 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">112</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">64</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-47">}</span><span·class="p"·data-group-id="8652678985-46">]</span><span·class="p"·data-group-id="8652678985-30">]</span><span·class="p"·data-group-id="8652678985-29">}</span><span·class="p">,</span><span·class="w">249 ··························</span><span·class="ss">value</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">22</span><span·class="p">,</span><span·class="mi">112</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">101</span><span·class="p">,</span><span·class="mi">114</span><span·class="p">,</span><span·class="mi">64</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-47">}</span><span·class="p"·data-group-id="3975223466-46">]</span><span·class="p"·data-group-id="3975223466-30">]</span><span·class="p"·data-group-id="3975223466-29">}</span><span·class="p">,</span><span·class="w">
250 ············</span><span·class="ss">subjectPublicKeyInfo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">250 ············</span><span·class="ss">subjectPublicKeyInfo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
251 ················</span><span·class="o">#</span><span·class="ss">&#39;SubjectPublicKeyInfo&#39;</span><span·class="p"·data-group-id="8652678985-49">{</span><span·class="w">251 ················</span><span·class="o">#</span><span·class="ss">&#39;SubjectPublicKeyInfo&#39;</span><span·class="p"·data-group-id="3975223466-49">{</span><span·class="w">
252 ····················</span><span·class="ss">algorithm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">252 ····················</span><span·class="ss">algorithm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
253 ························</span><span·class="o">#</span><span·class="ss">&#39;AlgorithmIdentifier&#39;</span><span·class="p"·data-group-id="8652678985-50">{</span><span·class="w">253 ························</span><span·class="o">#</span><span·class="ss">&#39;AlgorithmIdentifier&#39;</span><span·class="p"·data-group-id="3975223466-50">{</span><span·class="w">
254 ····························</span><span·class="ss">algorithm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-51">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·134,·SHA:·b75a11415060523621b00b1bd4690e9c745482fd6d2c90a0169ad62f6ab7c0e0·...·]-51">}</span><span·class="p">,</span><span·class="w">254 ····························</span><span·class="ss">algorithm</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-51">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">840</span><span·class="p">,</span><span·class="mi">113549</span><span·class="p">,</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·134,·SHA:·8b42e4c9eb5eaa83d15fe0792172f57b7b9660d8acfca806f28d99781415dd77·...·]-51">}</span><span·class="p">,</span><span·class="w">
255 ····························</span><span·class="ss">parameters</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8652678985-50">}</span><span·class="p">,</span><span·class="w">255 ····························</span><span·class="ss">parameters</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3975223466-50">}</span><span·class="p">,</span><span·class="w">
256 ····················</span><span·class="ss">subjectPublicKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">256 ····················</span><span·class="ss">subjectPublicKey</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
257 ························</span><span·class="p"·data-group-id="8652678985-52">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">137</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·751,·SHA:·62e58f1e077057f248ccf9a70d7124294e31bd544d6b062be294f62b39530236·...·]-49">}</span><span·class="p">,</span><span·class="w">257 ························</span><span·class="p"·data-group-id="3975223466-52">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">129</span><span·class="p">,</span><span·class="mi">137</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·751,·SHA:·29001fb322f6bb19fcd02888a42fd13b1b74b12605c2ad9715aa2e29702477c8·...·]-49">}</span><span·class="p">,</span><span·class="w">
258 ············</span><span·class="ss">issuerUniqueID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">258 ············</span><span·class="ss">issuerUniqueID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
259 ············</span><span·class="ss">subjectUniqueID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">259 ············</span><span·class="ss">subjectUniqueID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">asn1_NOVALUE</span><span·class="p">,</span><span·class="w">
260 ············</span><span·class="ss">extensions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">260 ············</span><span·class="ss">extensions</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
261 ················</span><span·class="p"·data-group-id="8652678985-53">[</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="8652678985-54">{</span><span·class="w">261 ················</span><span·class="p"·data-group-id="3975223466-53">[</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="3975223466-54">{</span><span·class="w">
262 ·····················</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-55">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">19</span><span·class="p"·data-group-id="8652678985-55">}</span><span·class="p">,</span><span·class="w">262 ·····················</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-55">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">19</span><span·class="p"·data-group-id="3975223466-55">}</span><span·class="p">,</span><span·class="w">
263 ·····················</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">263 ·····················</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">
264 ·····················</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-56">[</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·cla[·...·truncated·by·diffoscope;·len:·86,·SHA:·dc94dd5a44c749f4fe3b0cd036cc1b0660d90f4144e5f5e438cb27e8167605d0·...·]-54">}</span><span·class="p">,</span><span·class="w">264 ·····················</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-56">[</span><span·class="mi">48</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">255</span><span·cla[·...·truncated·by·diffoscope;·len:·86,·SHA:·b957fa912f7fca36a46f83fdcf1bcb05d56a16dbdfbc36b767e3016472fc0fdb·...·]-54">}</span><span·class="p">,</span><span·class="w">
265 ·················</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="8652678985-57">{</span><span·class="w">265 ·················</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="3975223466-57">{</span><span·class="w">
266 ·····················</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-58">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">15</span><span·class="p"·data-group-id="8652678985-58">}</span><span·class="p">,</span><span·class="w">266 ·····················</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-58">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">15</span><span·class="p"·data-group-id="3975223466-58">}</span><span·class="p">,</span><span·class="w">
267 ·····················</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">267 ·····················</span><span·class="ss">critical</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">
268 ·····················</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-59">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="8652678985-59">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·6e0fe8076010bda42d361c7d7904c42c373344592e943f98cdd9c89ec991da36·...·]-57">}</span><span·class="p">,</span><span·class="w">268 ·····················</span><span·class="ss">extnValue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-59">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3975223466-59">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·c65605b7350464f7a49417cfe59ecddb92bf5f2b738cdd9750ac5a080969bd1e·...·]-57">}</span><span·class="p">,</span><span·class="w">
269 ·················</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="8652678985-60">{</span><span·class="w">269 ·················</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="3975223466-60">{</span><span·class="w">
270 ·····················</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8652678985-61">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">14</span><span·class="p"·data-group-id="8652678985-61">}</span><span·class="p">,</span><span·class="w">270 ·····················</span><span·class="ss">extnID</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3975223466-61">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">29</span><span·class="p">,</span><span·class="mi">14</span><span·class="p"·data-group-id="3975223466-61">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 114564/204289 bytes (56.08%) of diff not shown.
644 B
./usr/share/doc/erlang-doc/html/lib/reltool-1.0.1/doc/html/.build
    
Offset 14, 15 lines modifiedOffset 14, 15 lines modified
14 dist/lato-latin-300-normal-YUMVEFOL.woff214 dist/lato-latin-300-normal-YUMVEFOL.woff2
15 dist/lato-latin-400-normal-W7754I4D.woff215 dist/lato-latin-400-normal-W7754I4D.woff2
16 dist/lato-latin-700-normal-2XVSBPG4.woff216 dist/lato-latin-700-normal-2XVSBPG4.woff2
17 dist/lato-latin-ext-300-normal-VPGGJKJL.woff217 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
18 dist/lato-latin-ext-400-normal-N27NCBWW.woff218 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
19 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff219 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
20 dist/remixicon-NKANDIL5.woff220 dist/remixicon-NKANDIL5.woff2
21 dist/search_data-780E66E8.js21 dist/search_data-A7BB32CF.js
22 dist/sidebar_items-DF937488.js22 dist/sidebar_items-DF937488.js
23 index.html23 index.html
24 notes.html24 notes.html
25 reltool.html25 reltool.html
26 reltool_examples.html26 reltool_examples.html
27 reltool_intro.html27 reltool_intro.html
28 reltool_usage.html28 reltool_usage.html
412 KB
./usr/share/doc/erlang-doc/html/lib/reltool-1.0.1/doc/html/reltool.epub
2.4 KB
zipinfo {}
    
Offset 1, 16 lines modifiedOffset 1, 16 lines modified
1 Zip·file·size:·63277·bytes,·number·of·entries:·141 Zip·file·size:·63282·bytes,·number·of·entries:·14
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:20·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······718·b-·defN·24-Oct-11·20:20·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······718·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx····17091·b-·defN·24-Oct-11·20:20·OEBPS/reltool_usage.xhtml4 ?rw-r--r--··2.0·unx····17091·b-·defN·24-Oct-11·20:59·OEBPS/reltool_usage.xhtml
5 ?rw-r--r--··2.0·unx·····3354·b-·defN·24-Oct-11·20:20·OEBPS/reltool_intro.xhtml5 ?rw-r--r--··2.0·unx·····3354·b-·defN·24-Oct-11·20:59·OEBPS/reltool_intro.xhtml
6 ?rw-r--r--··2.0·unx···193613·b-·defN·24-Oct-11·20:20·OEBPS/reltool_examples.xhtml6 ?rw-r--r--··2.0·unx···193613·b-·defN·24-Oct-11·20:59·OEBPS/reltool_examples.xhtml
7 ?rw-r--r--··2.0·unx···100551·b-·defN·24-Oct-11·20:20·OEBPS/reltool.xhtml7 ?rw-r--r--··2.0·unx···100551·b-·defN·24-Oct-11·20:59·OEBPS/reltool.xhtml
8 ?rw-r--r--··2.0·unx····40198·b-·defN·24-Oct-11·20:20·OEBPS/notes.xhtml8 ?rw-r--r--··2.0·unx····40198·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
9 ?rw-r--r--··2.0·unx·····1198·b-·defN·24-Oct-11·20:20·OEBPS/nav.xhtml9 ?rw-r--r--··2.0·unx·····1198·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-erlang-2EWSTWER.css10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-CB7BJMUW.js11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
12 ?rw-r--r--··2.0·unx·····1817·b-·defN·24-Oct-11·20:20·OEBPS/content.opf12 ?rw-r--r--··2.0·unx·····1817·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
13 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:20·OEBPS/assets/logo.png13 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
14 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:20·META-INF/container.xml14 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
15 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:20·META-INF/com.apple.ibooks.display-options.xml15 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
16 14·files,·381708·bytes·uncompressed,·61549·bytes·compressed:··83.9%16 14·files,·381708·bytes·uncompressed,·61554·bytes·compressed:··83.9%
36.7 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
372 KB
OEBPS/reltool_examples.xhtml
Max HTML report size reached
1.23 KB
OEBPS/content.opf
1.2 KB
OEBPS/content.opf
Max HTML report size reached
372 KB
./usr/share/doc/erlang-doc/html/lib/reltool-1.0.1/doc/html/reltool_examples.html
    
Offset 131, 508 lines modifiedOffset 131, 508 lines modified
131 ··</a>131 ··</a>
132 ··<span·class="text">Start·and·stop·windows·and·servers</span>132 ··<span·class="text">Start·and·stop·windows·and·servers</span>
133 </h2>133 </h2>
134 <p>The·main·process·in·Reltool·is·the·server.·It·can·be·used·as·it·is·or·be·used134 <p>The·main·process·in·Reltool·is·the·server.·It·can·be·used·as·it·is·or·be·used
135 via·the·GUI·frontend·process.·When·the·GUI·is·started,·a·server·process·will135 via·the·GUI·frontend·process.·When·the·GUI·is·started,·a·server·process·will
136 automatically·be·started.·The·GUI·process·is·started·with·<a·href="reltool.html#start/0"><code·class="inline">reltool:start/0</code></a>,136 automatically·be·started.·The·GUI·process·is·started·with·<a·href="reltool.html#start/0"><code·class="inline">reltool:start/0</code></a>,
137 <a·href="reltool.html#start/1"><code·class="inline">reltool:start/1</code></a>·or·<a·href="reltool.html#start_link/1"><code·class="inline">reltool:start_link/1</code></a>.·The·pid·of·its·server·can·be137 <a·href="reltool.html#start/1"><code·class="inline">reltool:start/1</code></a>·or·<a·href="reltool.html#start_link/1"><code·class="inline">reltool:start_link/1</code></a>.·The·pid·of·its·server·can·be
138 obtained·with·<a·href="reltool.html#start_link/1"><code·class="inline">reltool:get_server/1</code></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">20</span><span·class="w">·</span><span·class="p"·data-group-id="2282990534-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">9.0</span><span·class="p"·data-group-id="2282990534-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="2282990534-2">[</span><span·class="ss">source</[·...·truncated·by·diffoscope;·len:·1131,·SHA:·4ef10ab2ab499997c9ab18e0b9b2860e7ebf6b2621c23d655379c5ca31421d44·...·]-6">]</span><span·class="w">138 obtained·with·<a·href="reltool.html#start_link/1"><code·class="inline">reltool:get_server/1</code></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">20</span><span·class="w">·</span><span·class="p"·data-group-id="6284970187-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">9.0</span><span·class="p"·data-group-id="6284970187-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="6284970187-2">[</span><span·class="ss">source</[·...·truncated·by·diffoscope;·len:·1131,·SHA:·658b3de792f93287c39fde8dee8cc460785b97b7ad3ba4a02fe46611580ca56d·...·]-6">]</span><span·class="w">
139 </span><span·class="p"·data-group-id="2282990534-7">[</span><span·class="ss">hipe</span><span·class="p"·data-group-id="2282990534-7">]</span><span·class="w">·</span><span·class="p"·data-group-id="2282990534-8">[</span><span·class="ss">kernel</span><span·class="o">-</span><span·class="nc">poll<[·...·truncated·by·diffoscope;·len:·100,·SHA:·79a052beae09fbc880d39ad0b32d68bf020dc95623c1e4ba5cb1e5a3a8849a5b·...·]-8">]</span><span·class="w">139 </span><span·class="p"·data-group-id="6284970187-7">[</span><span·class="ss">hipe</span><span·class="p"·data-group-id="6284970187-7">]</span><span·class="w">·</span><span·class="p"·data-group-id="6284970187-8">[</span><span·class="ss">kernel</span><span·class="o">-</span><span·class="nc">poll<[·...·truncated·by·diffoscope;·len:·100,·SHA:·3db29050c2a6e83d9e27dc60dfb01255fac2d35d0a1463aaa1b3bea01dee3ade·...·]-8">]</span><span·class="w">
140 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V9</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="2282990534-9">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2282990534-9">)</span><span·class="w">140 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V9</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="6284970187-9">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="6284970187-9">)</span><span·class="w">
141 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="gp·unselectable">141 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="gp·unselectable">
142 1&gt;·</span><span·class="p"·data-group-id="2282990534-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Win</span><span·class="p"·data-group-id="2282990534-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·280,·SHA:·530556f9445f4b024bf64554fdb68ff112e7c9eee94831d17e0f5a429e359f41·...·]-11">)</span><span·class="p">.</span><span·class="w">142 1&gt;·</span><span·class="p"·data-group-id="6284970187-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Win</span><span·class="p"·data-group-id="6284970187-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·280,·SHA:·758f97f17c61114763c5a23d8a1d51b6df7e80acb12d2be2d2de8b7b4f4a98ba·...·]-11">)</span><span·class="p">.</span><span·class="w">
143 </span><span·class="p"·data-group-id="2282990534-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.36</span><span·class="p">.</span><span·class="mi">01</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2282990534-13">}</span><span·class="gp·unselectable">143 </span><span·class="p"·data-group-id="6284970187-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.36</span><span·class="p">.</span><span·class="mi">01</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6284970187-13">}</span><span·class="gp·unselectable">
144 2&gt;·</span><span·class="p"·data-group-id="2282990534-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server</span><span·class="p"·data-group-id="2282990534-14">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·206,·SHA:·7fa3f552358fea2c14be9ae7b2ecb5d131309394dfb4c5fdad8b7a00ff2a1bc0·...·]-15">)</span><span·class="p">.</span><span·class="w">144 2&gt;·</span><span·class="p"·data-group-id="6284970187-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server</span><span·class="p"·data-group-id="6284970187-14">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·206,·SHA:·1b9d607fab1e6dd4e44523d86a9aa4c8814aa32a299bc3962413d27152774958·...·]-15">)</span><span·class="p">.</span><span·class="w">
145 </span><span·class="p"·data-group-id="2282990534-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.37</span><span·class="p">.</span><span·class="mi">01</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2282990534-16">}</span><span·class="gp·unselectable">145 </span><span·class="p"·data-group-id="6284970187-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.37</span><span·class="p">.</span><span·class="mi">01</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6284970187-16">}</span><span·class="gp·unselectable">
146 3&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="2282990534-17">(</span><span·class="n">Server</span><span·class="p"·data-group-id="2282990534-17">)</span><span·class="p">.</span><span·class="w">146 3&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="6284970187-17">(</span><span·class="n">Server</span><span·class="p"·data-group-id="6284970187-17">)</span><span·class="p">.</span><span·class="w">
147 </span><span·class="p"·data-group-id="2282990534-18">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2282990534-19">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="2282990534-20">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·125,·SHA:·ded43af1824616319e71a8bc6da6544d77d826c632e1b28d508ca6ad323f620f·...·]-18">}</span><span·class="w">147 </span><span·class="p"·data-group-id="6284970187-18">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6284970187-19">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="6284970187-20">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·125,·SHA:·6498bafa7dae393d76a3c2929096a0f2e1ad9552477d924787aec81e9e61678a·...·]-18">}</span><span·class="w">
148 </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="gp·unselectable">148 </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="gp·unselectable">
149 4&gt;·</span><span·class="p"·data-group-id="2282990534-21">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server2</span><span·class="p"·data-group-id="2282990534-21">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·291,·SHA:·6e598031ab36fdee0ace03fc46e9916a16a1fa6d75b1ff1d1d96d6033dbffb07·...·]-22">)</span><span·class="p">.</span><span·class="w">149 4&gt;·</span><span·class="p"·data-group-id="6284970187-21">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server2</span><span·class="p"·data-group-id="6284970187-21">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·291,·SHA:·06ac9a6405dd35309841e50390aeaded95439121f617af1b4cdada8a27ecba97·...·]-22">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="p"·data-group-id="2282990534-24">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.6535</span><span·class="p">.</span><span·class="mi">01</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2282990534-24">}</span><span·class="gp·unselectable">150 </span><span·class="p"·data-group-id="6284970187-24">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.6535</span><span·class="p">.</span><span·class="mi">01</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6284970187-24">}</span><span·class="gp·unselectable">
151 5&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="2282990534-25">(</span><span·class="n">Server2</span><span·class="p"·data-group-id="2282990534-25">)</span><span·class="p">.</span><span·class="w">151 5&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="6284970187-25">(</span><span·class="n">Server2</span><span·class="p"·data-group-id="6284970187-25">)</span><span·class="p">.</span><span·class="w">
152 </span><span·class="p"·data-group-id="2282990534-26">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2282990534-27">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="2282990534-28">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·125,·SHA:·5057b7a4a3c36460d0a7d3235c3bea51b190758504b7bd1659db452fd989bb1d·...·]-26">}</span><span·class="gp·unselectable">152 </span><span·class="p"·data-group-id="6284970187-26">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6284970187-27">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="6284970187-28">[</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·125,·SHA:·e6cb2719bf8110aad0ab865cf6613c9f670d787c61af8836566b982569455b09·...·]-26">}</span><span·class="gp·unselectable">
153 6&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="2282990534-29">(</span><span·class="n">Server2</span><span·class="p"·data-group-id="2282990534-29">)</span><span·class="p">.</span><span·class="w">153 6&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="6284970187-29">(</span><span·class="n">Server2</span><span·class="p"·data-group-id="6284970187-29">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="ss">ok</span></code></pre><h2·id="inspecting-the-configuration"·class="section-heading">154 </span><span·class="ss">ok</span></code></pre><h2·id="inspecting-the-configuration"·class="section-heading">
155 ··<a·href="#inspecting-the-configuration"·class="hover-link">155 ··<a·href="#inspecting-the-configuration"·class="hover-link">
156 ····<i·class="ri-link-m"·aria-hidden="true"></i>156 ····<i·class="ri-link-m"·aria-hidden="true"></i>
157 ··</a>157 ··</a>
158 ··<span·class="text">Inspecting·the·configuration</span>158 ··<span·class="text">Inspecting·the·configuration</span>
159 </h2>159 </h2>
160 <pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">20</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">9.0</span><span·class="p"·data-group-id="9197069385-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-2">[</span><span·class="ss">source</s[·...·truncated·by·diffoscope;·len:·1130,·SHA:·18c28cdac137831816e1cf3d04b14e7c278ee9d1b172216345c251c9362b8858·...·]-6">]</span><span·class="w">160 <pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">20</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">9.0</span><span·class="p"·data-group-id="9894828597-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-2">[</span><span·class="ss">source</s[·...·truncated·by·diffoscope;·len:·1130,·SHA:·25952b7fc0538b34e584656cf6b20ef142676ca5d0db67f8de9a25eec63f2b06·...·]-6">]</span><span·class="w">
161 </span><span·class="p"·data-group-id="9197069385-7">[</span><span·class="ss">hipe</span><span·class="p"·data-group-id="9197069385-7">]</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-8">[</span><span·class="ss">kernel</span><span·class="o">-</span><span·class="nc">poll</[·...·truncated·by·diffoscope;·len:·99,·SHA:·f56ed80d31dbd3fa7e25387bda8345d0d7ca476fa0dd922406deb2ec40b5a66d·...·]-8">]</span><span·class="w">161 </span><span·class="p"·data-group-id="9894828597-7">[</span><span·class="ss">hipe</span><span·class="p"·data-group-id="9894828597-7">]</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-8">[</span><span·class="ss">kernel</span><span·class="o">-</span><span·class="nc">poll</[·...·truncated·by·diffoscope;·len:·99,·SHA:·e78b7ccc4e575d5f4cf211909f8b60b147ae182fabcbd205a1254d84a9aba930·...·]-8">]</span><span·class="w">
162 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V9</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="9197069385-9">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="9197069385-9">)</span><span·class="w">162 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V9</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="9894828597-9">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="9894828597-9">)</span><span·class="w">
163 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="gp·unselectable">163 </span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="gp·unselectable">
164 1&gt;·</span><span·class="n">Config</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-10">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-11">[</span><span·class="p"·data-group-id="9197069385-12">{</span><span·class="ss">escript</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·501,·SHA:·720e54ff0d8b739146892fe095c5bc5effd30e4db650e7f29163c1a4c3f733c0·...·]-12">}</span><span·class="p">,</span><span·class="w">164 1&gt;·</span><span·class="n">Config</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-10">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-11">[</span><span·class="p"·data-group-id="9894828597-12">{</span><span·class="ss">escript</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·501,·SHA:·ea7d53225d1c5464d565628b669f7b6b7af614ecaaf603a3ae70b85dc123c83e·...·]-12">}</span><span·class="p">,</span><span·class="w">
165 »       »       ···</span><span·class="p"·data-group-id="9197069385-15">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-16">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·287,·SHA:·45e24c193bf2f046d5d62d6d8cc77c33675d0d7ddb5e86f9712c275c3ab1ae14·...·]-15">}</span><span·class="p">,</span><span·class="w">165 »       »       ···</span><span·class="p"·data-group-id="9894828597-15">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-16">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·287,·SHA:·60908cbf02f5e621a57efcc060d13e7b94ed75723c954f7a58a01327d280b277·...·]-15">}</span><span·class="p">,</span><span·class="w">
166 »       »       ···</span><span·class="p"·data-group-id="9197069385-18">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-19">[</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·288,·SHA:·ea31dc90fe347baabba4c00603cb40bfca1d23bb7c8f9022ff6bb8a354bd4b79·...·]-18">}</span><span·class="p">,</span><span·class="w">166 »       »       ···</span><span·class="p"·data-group-id="9894828597-18">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-19">[</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·288,·SHA:·11dacf7f0cc439b4c3048bd4590fa4f24560c84b3baed362ad8d85f18d86b8a3·...·]-18">}</span><span·class="p">,</span><span·class="w">
167 »       »       ···</span><span·class="p"·data-group-id="9197069385-21">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-22">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·285,·SHA:·32b55224e1f829a3c8c1007901f7fa62ee8ec511ca74bc4d8ca864bdf0503b42·...·]-21">}</span><span·class="p">,</span><span·class="w">167 »       »       ···</span><span·class="p"·data-group-id="9894828597-21">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-22">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·285,·SHA:·f32da1ccde97237b129e24e1d75f975c477c5e3de8334adb0dc8b7e57df6db52·...·]-21">}</span><span·class="p">,</span><span·class="w">
168 »       »       ···</span><span·class="p"·data-group-id="9197069385-24">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-25">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·295,·SHA:·7525317411e41871ceb5f2fa3ec4210e1e99cef5f4eca9a9f8938671f9ce6313·...·]-24">}</span><span·class="p">,</span><span·class="w">168 »       »       ···</span><span·class="p"·data-group-id="9894828597-24">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-25">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·295,·SHA:·06c7d5f2f3786fa43d51db2e817fb893e5f039cd9557a07a34854241e145ad7e·...·]-24">}</span><span·class="p">,</span><span·class="w">
169 »       »       ···</span><span·class="p"·data-group-id="9197069385-27">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9197069385-28">[</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·402,·SHA:·057b57e4b9d8a62503eda66027d8ad0280ba405c528f9a2df7189b63843efbd1·...·]-10">}</span><span·class="p">.</span><span·class="w">169 »       »       ···</span><span·class="p"·data-group-id="9894828597-27">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9894828597-28">[</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·402,·SHA:·5ffbf330e5032689f35a63bcfefe66e6dbffb04f3f6538ced0b98a30e174d069·...·]-10">}</span><span·class="p">.</span><span·class="w">
170 </span><span·class="p"·data-group-id="9197069385-30">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-31">[</span><span·class="p"·data-group-id="9197069385-32">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·405,·SHA:·4850bc81deb9006c34c7cb1713141dd54fec6a2d52a9ea2d24161788caf931f6·...·]-32">}</span><span·class="p">,</span><span·class="w">170 </span><span·class="p"·data-group-id="9894828597-30">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-31">[</span><span·class="p"·data-group-id="9894828597-32">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·405,·SHA:·61cfa284f5b6ab5a61998a087d5c24c22d2306641023f44eeef524cb257bffe6·...·]-32">}</span><span·class="p">,</span><span·class="w">
171 ······</span><span·class="p"·data-group-id="9197069385-35">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-36">[</span><span·class="p"·data-group-id="9197069385-37">{</span><span·class="ss">incl_[·...·truncated·by·diffoscope;·len:·215,·SHA:·49119e3cd3282c3ca6bbbdf05f248a5cd9dd142b447e63721bb2e109fa88202f·...·]-35">}</span><span·class="p">,</span><span·class="w">171 ······</span><span·class="p"·data-group-id="9894828597-35">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-36">[</span><span·class="p"·data-group-id="9894828597-37">{</span><span·class="ss">incl_[·...·truncated·by·diffoscope;·len:·215,·SHA:·1111ac2a827862b36543d83c45255582361936e3af5e62e815495748d64c39ae·...·]-35">}</span><span·class="p">,</span><span·class="w">
172 ······</span><span·class="p"·data-group-id="9197069385-38">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-39">[</span><span·class="p"·data-group-id="9197069385-40">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·216,·SHA:·ad2c59c3597f7a044556517b0d85069b0ca20fb883d664b7a09f51d53839b0d7·...·]-38">}</span><span·class="p">,</span><span·class="w">172 ······</span><span·class="p"·data-group-id="9894828597-38">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-39">[</span><span·class="p"·data-group-id="9894828597-40">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·216,·SHA:·f6bbe259fe87ff9bc9a29d15c203904e187eb184aff6e6d6312ce0892fee34c1·...·]-38">}</span><span·class="p">,</span><span·class="w">
173 ······</span><span·class="p"·data-group-id="9197069385-41">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-42">[</span><span·class="p"·data-group-id="9197069385-43">{</span><span·class="ss">incl_co[·...·truncated·by·diffoscope;·len:·213,·SHA:·e1c01a4bff3b7e576b357bc135587049ac84d1793248ceec7e90c88eafd429b6·...·]-41">}</span><span·class="p">,</span><span·class="w">173 ······</span><span·class="p"·data-group-id="9894828597-41">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-42">[</span><span·class="p"·data-group-id="9894828597-43">{</span><span·class="ss">incl_co[·...·truncated·by·diffoscope;·len:·213,·SHA:·7c6691b82fce8a8b0daf13da4bd507dd21b566a4a88152c7d3dd3b1d9c2a3d1c·...·]-41">}</span><span·class="p">,</span><span·class="w">
174 ······</span><span·class="p"·data-group-id="9197069385-44">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-45">[</span><span·class="p"·data-group-id="9197069385-46">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·223,·SHA:·50a010d99a3eaa62551001cc77491c2af6b5fd87f401d21fba3273adcd6531dd·...·]-44">}</span><span·class="p">,</span><span·class="w">174 ······</span><span·class="p"·data-group-id="9894828597-44">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-45">[</span><span·class="p"·data-group-id="9894828597-46">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·223,·SHA:·2d2d886a7976131b55af82741c0544592ddbefd700f541c473927a9f3c482082·...·]-44">}</span><span·class="p">,</span><span·class="w">
175 ······</span><span·class="p"·data-group-id="9197069385-47">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-48">[</span><span·class="p"·data-group-id="9197069385-49">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·330,·SHA:·a061358cabf4d920e292b1f1d082408f0d2dfb04a6458d4da18929bbcf0a168a·...·]-30">}</span><span·class="w">175 ······</span><span·class="p"·data-group-id="9894828597-47">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-48">[</span><span·class="p"·data-group-id="9894828597-49">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·330,·SHA:·3d2453ab43f3dac38fe1e6248f5322dbb4f6c0c6706d40326f470e1d5db408ac·...·]-30">}</span><span·class="w">
176 </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="gp·unselectable">176 </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="gp·unselectable">
177 2&gt;·</span><span·class="p"·data-group-id="9197069385-50">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server</span><span·class="p"·data-group-id="9197069385-50">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·318,·SHA:·b7abce54e436dccc8c00a30b7d9c0f65e12d418588c2d5d63cb97426298a9225·...·]-51">)</span><span·class="p">.</span><span·class="w">177 2&gt;·</span><span·class="p"·data-group-id="9894828597-50">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Server</span><span·class="p"·data-group-id="9894828597-50">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·318,·SHA:·06594b4855c3edc7abbe83ba9d3058249fa7f75148ff2537e7c203377baaf6f3·...·]-51">)</span><span·class="p">.</span><span·class="w">
178 </span><span·class="p"·data-group-id="9197069385-53">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.66</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9197069385-53">}</span><span·class="w">178 </span><span·class="p"·data-group-id="9894828597-53">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.66</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9894828597-53">}</span><span·class="w">
179 </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="gp·unselectable">179 </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="gp·unselectable">
180 3&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9197069385-54">(</span><span·class="n">Server</span><span·class="p"·data-group-id="9197069385-54">)</span><span·class="p">.</span><span·class="w">180 3&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9894828597-54">(</span><span·class="n">Server</span><span·class="p"·data-group-id="9894828597-54">)</span><span·class="p">.</span><span·class="w">
181 </span><span·class="p"·data-group-id="9197069385-55">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-56">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-57">[</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·b8190ad4207d9a21e8c63c584670c098123d35b3b72cf7060c0b69f166ba9842·...·]-58">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">181 </span><span·class="p"·data-group-id="9894828597-55">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-56">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-57">[</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·af15d37b470f7473c54e685bdf11d09c7807edc4c20af5b98ae2bfd6fd71dae7·...·]-58">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">
182 ···················</span><span·class="p"·data-group-id="9197069385-59">[</span><span·class="p"·data-group-id="9197069385-60">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9197069385-60">}</span><span·class="p"·data-group-id="9197069[·...·truncated·by·diffoscope;·len:·57,·SHA:·e886000946ec98e9baed1719af707958fcc1c50bbf251f00186b976cc1160567·...·]-58">}</span><span·class="p">,</span><span·class="w">182 ···················</span><span·class="p"·data-group-id="9894828597-59">[</span><span·class="p"·data-group-id="9894828597-60">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9894828597-60">}</span><span·class="p"·data-group-id="9894828[·...·truncated·by·diffoscope;·len:·57,·SHA:·2b28fb5156d99aed28ecbf21112dbede2d5635ee73877470ea507e3f8833c460·...·]-58">}</span><span·class="p">,</span><span·class="w">
183 ··········</span><span·class="p"·data-group-id="9197069385-61">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-62">[</span><span·class="p"·data-group-id="9197069385-63">{</span><span·class="ss">incl_[·...·truncated·by·diffoscope;·len:·215,·SHA:·6d3ad1c899f237c1d096088f2d5bfded407bc19cdf37b9170725f56a658972fa·...·]-61">}</span><span·class="p">,</span><span·class="w">183 ··········</span><span·class="p"·data-group-id="9894828597-61">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-62">[</span><span·class="p"·data-group-id="9894828597-63">{</span><span·class="ss">incl_[·...·truncated·by·diffoscope;·len:·215,·SHA:·9b96cad7977da5abdbe233fa5011e6ad90621b077ea79968c1cddc640523425f·...·]-61">}</span><span·class="p">,</span><span·class="w">
184 ··········</span><span·class="p"·data-group-id="9197069385-64">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-65">[</span><span·class="p"·data-group-id="9197069385-66">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·216,·SHA:·7b9c2bd06dee27cf5e35a2147e2803525ba35e0c85c149b7efadb119a6c16378·...·]-64">}</span><span·class="p">,</span><span·class="w">184 ··········</span><span·class="p"·data-group-id="9894828597-64">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-65">[</span><span·class="p"·data-group-id="9894828597-66">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·216,·SHA:·a372374f901354d10d934d82d0b89c55873d3f38364b9bac27ecd6482bc3a7e8·...·]-64">}</span><span·class="p">,</span><span·class="w">
185 ··········</span><span·class="p"·data-group-id="9197069385-67">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-68">[</span><span·class="p"·data-group-id="9197069385-69">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·223,·SHA:·55c4092daf1d89cb1bf85bb7d206b591752eb5c2dac0b9a7f683b608ffa1eca5·...·]-67">}</span><span·class="p">,</span><span·class="w">185 ··········</span><span·class="p"·data-group-id="9894828597-67">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-68">[</span><span·class="p"·data-group-id="9894828597-69">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·223,·SHA:·046ae5292768a60bcb4cefb2cc1feb46d9bea2ccbb7b00eb3a61b12ff8f3a8dc·...·]-67">}</span><span·class="p">,</span><span·class="w">
186 ··········</span><span·class="p"·data-group-id="9197069385-70">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-71">[</span><span·class="p"·data-group-id="9197069385-72">{</span><span·class="ss">incl_co[·...·truncated·by·diffoscope;·len:·213,·SHA:·eaa0765858378b9994dc0920637b08501fe4637b3c2f6709600ca7d9d868778c·...·]-70">}</span><span·class="p">,</span><span·class="w">186 ··········</span><span·class="p"·data-group-id="9894828597-70">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-71">[</span><span·class="p"·data-group-id="9894828597-72">{</span><span·class="ss">incl_co[·...·truncated·by·diffoscope;·len:·213,·SHA:·6a3f33f74fa488fedea5a5681a0487bfabd4e904b62f3e3765127d4f2f0ae918·...·]-70">}</span><span·class="p">,</span><span·class="w">
187 ··········</span><span·class="p"·data-group-id="9197069385-73">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-74">[</span><span·class="p"·data-group-id="9197069385-75">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·384,·SHA:·6686cd9578d42cf85fd2aaa45731f76903e038da05cae2c4f6604eb50340a08e·...·]-55">}</span><span·class="w">187 ··········</span><span·class="p"·data-group-id="9894828597-73">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-74">[</span><span·class="p"·data-group-id="9894828597-75">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·384,·SHA:·2da73f87fd821ede8264a6ace0eea96f58bea3b780cf982c776943e0039dbc74·...·]-55">}</span><span·class="w">
188 </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="gp·unselectable">188 </span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="gp·unselectable">
189 4&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9197069385-76">(</span><span·class="n">Server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="9197069385-76">)</span><span·class="p">.</span><span·class="w">189 4&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9894828597-76">(</span><span·class="n">Server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="9894828597-76">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="p"·data-group-id="9197069385-77">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-78">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-79">[</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·b8190ad4207d9a21e8c63c584670c098123d35b3b72cf7060c0b69f166ba9842·...·]-80">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">190 </span><span·class="p"·data-group-id="9894828597-77">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-78">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-79">[</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·af15d37b470f7473c54e685bdf11d09c7807edc4c20af5b98ae2bfd6fd71dae7·...·]-80">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">
191 ···················</span><span·class="p"·data-group-id="9197069385-81">[</span><span·class="p"·data-group-id="9197069385-82">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9197069385-82">}</span><span·class="p"·data-group-id="9197069[·...·truncated·by·diffoscope;·len:·57,·SHA:·beb6694c2cd7edcbad8f6980ed7b2008549ee41dcf1a25776f1643e34ede7b9c·...·]-80">}</span><span·class="p">,</span><span·class="w">191 ···················</span><span·class="p"·data-group-id="9894828597-81">[</span><span·class="p"·data-group-id="9894828597-82">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9894828597-82">}</span><span·class="p"·data-group-id="9894828[·...·truncated·by·diffoscope;·len:·57,·SHA:·03bd4f3fc671bbe16e12afa91a691bc0165a1c3cbd7053f534c9158df9cef4b9·...·]-80">}</span><span·class="p">,</span><span·class="w">
192 ··········</span><span·class="p"·data-group-id="9197069385-83">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-84">[</span><span·class="p"·data-group-id="9197069385-85">{</span><span·class="ss">incl_[·...·truncated·by·diffoscope;·len:·215,·SHA:·d16579f7d013083a72392f6d7e3e65db25d387165f6145a932f86887afd070cb·...·]-83">}</span><span·class="p">,</span><span·class="w">192 ··········</span><span·class="p"·data-group-id="9894828597-83">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-84">[</span><span·class="p"·data-group-id="9894828597-85">{</span><span·class="ss">incl_[·...·truncated·by·diffoscope;·len:·215,·SHA:·0f53dae808756f179c38a5bcdcd57e3ec104b66a7cbff7b9da76d0e7cbd1e69c·...·]-83">}</span><span·class="p">,</span><span·class="w">
193 ··········</span><span·class="p"·data-group-id="9197069385-86">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-87">[</span><span·class="p"·data-group-id="9197069385-88">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·216,·SHA:·ada59242a1fbf7a70b655d060a2dabeb51110d6ad5cfa3a9fc18056fac7a27e1·...·]-86">}</span><span·class="p">,</span><span·class="w">193 ··········</span><span·class="p"·data-group-id="9894828597-86">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-87">[</span><span·class="p"·data-group-id="9894828597-88">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·216,·SHA:·4978da7a1c913a0ed9deb283f0770288387076d7018a3eca8ce86c7db3a3c4a6·...·]-86">}</span><span·class="p">,</span><span·class="w">
194 ··········</span><span·class="p"·data-group-id="9197069385-89">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-90">[</span><span·class="p"·data-group-id="9197069385-91">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·223,·SHA:·e6187beb959df7cd6775e5532be12afbc37546d31cffacaaa323cc12450d3945·...·]-89">}</span><span·class="p">,</span><span·class="w">194 ··········</span><span·class="p"·data-group-id="9894828597-89">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-90">[</span><span·class="p"·data-group-id="9894828597-91">{</span><span·class="s[·...·truncated·by·diffoscope;·len:·223,·SHA:·c556f4bbef88d7ee906ea46213f7cfa9356677e314f385df137efc5b96110b6c·...·]-89">}</span><span·class="p">,</span><span·class="w">
195 ··········</span><span·class="p"·data-group-id="9197069385-92">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-93">[</span><span·class="p"·data-group-id="9197069385-94">{</span><span·class="ss">incl_co[·...·truncated·by·diffoscope;·len:·213,·SHA:·a79180401a116630cc945235edd1b521c01c90e28256711c344059d727fabd60·...·]-92">}</span><span·class="p">,</span><span·class="w">195 ··········</span><span·class="p"·data-group-id="9894828597-92">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-93">[</span><span·class="p"·data-group-id="9894828597-94">{</span><span·class="ss">incl_co[·...·truncated·by·diffoscope;·len:·213,·SHA:·46e0519590d37acf43113275f68cb0df7d454116e9b9f19c4ea5b4d13251d471·...·]-92">}</span><span·class="p">,</span><span·class="w">
196 ··········</span><span·class="p"·data-group-id="9197069385-95">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-96">[</span><span·class="p"·data-group-id="9197069385-97">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·384,·SHA:·8982925465b9513dcbaab993ab806d4fe2007704441119bbc57ec729dee07c7e·...·]-77">}</span><span·class="w">196 ··········</span><span·class="p"·data-group-id="9894828597-95">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-96">[</span><span·class="p"·data-group-id="9894828597-97">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·384,·SHA:·53d2868491a244d70d81dd8807ad16880a0a1e8cda7316b7e24cd47f672d77c2·...·]-77">}</span><span·class="w">
197 </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="gp·unselectable">197 </span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="gp·unselectable">
198 5&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9197069385-98">(</span><span·class="n">Server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="9197069385-98">)</span><span·class="p">.</span><span·class="w">198 5&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9894828597-98">(</span><span·class="n">Server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="9894828597-98">)</span><span·class="p">.</span><span·class="w">
199 </span><span·class="p"·data-group-id="9197069385-99">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-100">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-101">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·185,·SHA:·f0a9c19dd2ed1846a905433350bfb70bf50ea6c90540020bef2da7caad78e247·...·]-102">}</span><span·class="p">,</span><span·class="w">199 </span><span·class="p"·data-group-id="9894828597-99">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-100">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-101">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·185,·SHA:·b9654c3e29b70521a23727f84266a6564a9200a9b12c7ed0a0f46473c5918be8·...·]-102">}</span><span·class="p">,</span><span·class="w">
200 ··········</span><span·class="p"·data-group-id="9197069385-103">{</span><span·class="ss">lib_dirs</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-104">[</span><span·class="p"·data-group-id="9197069385-104">]</span><span·class="p"·data-group-id="9197069385-103">}</span><span·class="p">,</span><span·class="w">200 ··········</span><span·class="p"·data-group-id="9894828597-103">{</span><span·class="ss">lib_dirs</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-104">[</span><span·class="p"·data-group-id="9894828597-104">]</span><span·class="p"·data-group-id="9894828597-103">}</span><span·class="p">,</span><span·class="w">
201 ··········</span><span·class="p"·data-group-id="9197069385-105">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">201 ··········</span><span·class="p"·data-group-id="9894828597-105">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">
202 ···················</span><span·class="p"·data-group-id="9197069385-106">[</span><span·class="p"·data-group-id="9197069385-107">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9197069385-107">}</span><span·class="p"·data-group-id="9197[·...·truncated·by·diffoscope;·len:·61,·SHA:·8b0e34bac20939bb2d7f47dfa2d4b8608aa12148b264b4c585fb71241caa13d8·...·]-105">}</span><span·class="p">,</span><span·class="w">202 ···················</span><span·class="p"·data-group-id="9894828597-106">[</span><span·class="p"·data-group-id="9894828597-107">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9894828597-107">}</span><span·class="p"·data-group-id="9894[·...·truncated·by·diffoscope;·len:·61,·SHA:·3628a7f23ff35fd87fb62761741955e1e95b61b7d2764d34c0323488201926fa·...·]-105">}</span><span·class="p">,</span><span·class="w">
203 ··········</span><span·class="p"·data-group-id="9197069385-108">{</span><span·class="ss">mod_cond</span><span·class="p">,</span><span·class="ss">all</span><span·class="p"·data-group-id="9197069385-108">}</span><span·class="p">,</span><span·class="w">203 ··········</span><span·class="p"·data-group-id="9894828597-108">{</span><span·class="ss">mod_cond</span><span·class="p">,</span><span·class="ss">all</span><span·class="p"·data-group-id="9894828597-108">}</span><span·class="p">,</span><span·class="w">
204 ··········</span><span·class="p"·data-group-id="9197069385-109">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">derived</span><span·class="p"·data-group-id="9197069385-109">}</span><span·class="p">,</span><span·class="w">204 ··········</span><span·class="p"·data-group-id="9894828597-109">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">derived</span><span·class="p"·data-group-id="9894828597-109">}</span><span·class="p">,</span><span·class="w">
205 ··········</span><span·class="p"·data-group-id="9197069385-110">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">205 ··········</span><span·class="p"·data-group-id="9894828597-110">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">inets</span><span·class="p">,</span><span·class="w">
206 ···············</span><span·class="p"·data-group-id="9197069385-111">[</span><span·class="p"·data-group-id="9197069385-112">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9197069385-112">}</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·501,·SHA:·ba39c2773efe7839c04b250ab0285e52ad4ceef41addab731a533ed8262f2942·...·]-110">}</span><span·class="p">,</span><span·class="w">206 ···············</span><span·class="p"·data-group-id="9894828597-111">[</span><span·class="p"·data-group-id="9894828597-112">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9894828597-112">}</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·501,·SHA:·ed97fa9200c981a9eafa4cba113431fc1e51685ef92c57c26f1a9f7a61a5280a·...·]-110">}</span><span·class="p">,</span><span·class="w">
207 ··········</span><span·class="p"·data-group-id="9197069385-115">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-116">[</span><span·class="p"·data-group-id="9197069385-117">{</span><span·class="ss">i[·...·truncated·by·diffoscope;·len:·221,·SHA:·cd01a8293f3655f0d2d5614432f7a58eee322742c82617f5229ee0561f6691b6·...·]-115">}</span><span·class="p">,</span><span·class="w">207 ··········</span><span·class="p"·data-group-id="9894828597-115">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">mnesia</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-116">[</span><span·class="p"·data-group-id="9894828597-117">{</span><span·class="ss">i[·...·truncated·by·diffoscope;·len:·221,·SHA:·48cac90dacf2e782c8c15216681f0c1f4d92ce4d074fcfb2decd09d06beb364a·...·]-115">}</span><span·class="p">,</span><span·class="w">
208 ··········</span><span·class="p"·data-group-id="9197069385-118">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-119">[</span><span·class="p"·data-group-id="9197069385-120">{</span><span·class[·...·truncated·by·diffoscope;·len:·228,·SHA:·4cecad1eb044fb589b05088f867c9585d8e03af62b8a57705ddab34b086800b6·...·]-118">}</span><span·class="p">,</span><span·class="w">208 ··········</span><span·class="p"·data-group-id="9894828597-118">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">runtime_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-119">[</span><span·class="p"·data-group-id="9894828597-120">{</span><span·class[·...·truncated·by·diffoscope;·len:·228,·SHA:·e9f4e5e7dc99c2722427ac1ea4f6975bb48f38c9c0b8993d93d7b12369fad350·...·]-118">}</span><span·class="p">,</span><span·class="w">
209 ··········</span><span·class="p"·data-group-id="9197069385-121">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-122">[</span><span·class="p"·data-group-id="9197069385-123">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·218,·SHA:·07b1e6164b06d6c630f8c4550b67214bf749a016f0ded58ee334df7cb4428d3a·...·]-121">}</span><span·class="p">,</span><span·class="w">209 ··········</span><span·class="p"·data-group-id="9894828597-121">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-122">[</span><span·class="p"·data-group-id="9894828597-123">{</span><span·class="ss">incl[·...·truncated·by·diffoscope;·len:·218,·SHA:·09a6d012cbb24fe2b166d56a0eac7f727b83dd8e3bda8e3cc632f2e71389d19b·...·]-121">}</span><span·class="p">,</span><span·class="w">
210 ··········</span><span·class="p"·data-group-id="9197069385-124">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-125">[</span><span·class="p"·data-group-id="9197069385-126">{</span><span·class=[·...·truncated·by·diffoscope;·len:·227,·SHA:·3f38d69452979030a8aa2cb2e16c674b3f889fbd3486911fa483e5fb8b412f05·...·]-124">}</span><span·class="p">,</span><span·class="w">210 ··········</span><span·class="p"·data-group-id="9894828597-124">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">syntax_tools</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-125">[</span><span·class="p"·data-group-id="9894828597-126">{</span><span·class=[·...·truncated·by·diffoscope;·len:·227,·SHA:·9a5da1d4120d825f31913a3b9697e277bef05227ca8048d36cab9478cc7cde01·...·]-124">}</span><span·class="p">,</span><span·class="w">
211 ··········</span><span·class="p"·data-group-id="9197069385-127">{</span><span·class="ss">boot_rel</span><span·class="p">,</span><span·class="s">&quot;start_clean&quot;</span><span·class="p"·data-group-id="9197069385-127">}</span><span·class="p">,</span><span·class="w">211 ··········</span><span·class="p"·data-group-id="9894828597-127">{</span><span·class="ss">boot_rel</span><span·class="p">,</span><span·class="s">&quot;start_clean&quot;</span><span·class="p"·data-group-id="9894828597-127">}</span><span·class="p">,</span><span·class="w">
212 ··········</span><span·class="p"·data-group-id="9197069385-128">{</span><span·class="ss">rel</span><span·class="p">,</span><span·class="s">&quot;start_clean&quot;</span><span·class="p">,</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-129">[</[·...·truncated·by·diffoscope;·len:·101,·SHA:·8187840ec232117269e1d9ecbaf155bb88c241d72f90ad6e34cf81963b7d2f94·...·]-128">}</span><span·class="p">,</span><span·class="w">212 ··········</span><span·class="p"·data-group-id="9894828597-128">{</span><span·class="ss">rel</span><span·class="p">,</span><span·class="s">&quot;start_clean&quot;</span><span·class="p">,</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-129">[</[·...·truncated·by·diffoscope;·len:·101,·SHA:·301a485167b32ddda037dde7ba7971ebf00f7dd187f231e7020774368db3dd92·...·]-128">}</span><span·class="p">,</span><span·class="w">
213 ··········</span><span·class="p"·data-group-id="9197069385-130">{</span><span·class="ss">rel</span><span·class="p">,</span><span·class="s">&quot;start_sasl&quot;</span><span·class="p">,</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-131">[</s[·...·truncated·by·diffoscope;·len:·128,·SHA:·3a42932c9bd54c295280c15d8205c394cbb8a858b086ea6d089ba391f9f8c235·...·]-130">}</span><span·class="p">,</span><span·class="w">213 ··········</span><span·class="p"·data-group-id="9894828597-130">{</span><span·class="ss">rel</span><span·class="p">,</span><span·class="s">&quot;start_sasl&quot;</span><span·class="p">,</span><span·class="s">&quot;1.0&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-131">[</s[·...·truncated·by·diffoscope;·len:·128,·SHA:·00c4c536ce9da012dcade8aa5b29f711edd1521812f95ef3023efeae6fb88c47·...·]-130">}</span><span·class="p">,</span><span·class="w">
214 ··········</span><span·class="p"·data-group-id="9197069385-132">{</span><span·class="ss">emu_name</span><span·class="p">,</span><span·class="s">&quot;beam&quot;</span><span·class="p"·data-group-id="9197069385-132">}</span><span·class="p">,</span><span·class="w">214 ··········</span><span·class="p"·data-group-id="9894828597-132">{</span><span·class="ss">emu_name</span><span·class="p">,</span><span·class="s">&quot;beam&quot;</span><span·class="p"·data-group-id="9894828597-132">}</span><span·class="p">,</span><span·class="w">
215 ··········</span><span·class="p"·data-group-id="9197069385-133">{</span><span·class="ss">relocatable</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9197069385-133">}</span><span·class="p">,</span><span·class="w">215 ··········</span><span·class="p"·data-group-id="9894828597-133">{</span><span·class="ss">relocatable</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="9894828597-133">}</span><span·class="p">,</span><span·class="w">
216 ··········</span><span·class="p"·data-group-id="9197069385-134">{</span><span·class="ss">profile</span><span·class="p">,</span><span·class="ss">development</span><span·class="p"·data-group-id="9197069385-134">}</span><span·class="p">,</span><span·class="w">216 ··········</span><span·class="p"·data-group-id="9894828597-134">{</span><span·class="ss">profile</span><span·class="p">,</span><span·class="ss">development</span><span·class="p"·data-group-id="9894828597-134">}</span><span·class="p">,</span><span·class="w">
217 ··········</span><span·class="p"·data-group-id="9197069385-135">{</span><span·class="ss">incl_sys_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-136">[</span><span·class="s">&quot;.*&quot;</span><span·class="p"·data-group-id="9197069385-136">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·02e5b4acd8a5255d621c0225c65ee1e8c978a482407fd7c83293286de6ad3a25·...·]-135">}</span><span·class="p">,</span><span·class="w">217 ··········</span><span·class="p"·data-group-id="9894828597-135">{</span><span·class="ss">incl_sys_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-136">[</span><span·class="s">&quot;.*&quot;</span><span·class="p"·data-group-id="9894828597-136">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·9929b59f48f0cd0ff38970fe9a4f2d8d6196c6d9e409e72ccef0ac2b49fe1d58·...·]-135">}</span><span·class="p">,</span><span·class="w">
218 ··········</span><span·class="p"·data-group-id="9197069385-137">{</span><span·class="ss">excl_sys_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-138">[</span><span·class="p"·data-group-id="9197069385-138">]</span><span·class="p"·data-group-id="9197069385-137">}</span><span·class="p">,</span><span·class="w">218 ··········</span><span·class="p"·data-group-id="9894828597-137">{</span><span·class="ss">excl_sys_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-138">[</span><span·class="p"·data-group-id="9894828597-138">]</span><span·class="p"·data-group-id="9894828597-137">}</span><span·class="p">,</span><span·class="w">
219 ··········</span><span·class="p"·data-group-id="9197069385-139">{</span><span·class="ss">incl_app_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-140">[</span><span·class="s">&quot;.*&quot;</span><span·class="p"·data-group-id="9197069385-140">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·02e5b4acd8a5255d621c0225c65ee1e8c978a482407fd7c83293286de6ad3a25·...·]-139">}</span><span·class="p">,</span><span·class="w">219 ··········</span><span·class="p"·data-group-id="9894828597-139">{</span><span·class="ss">incl_app_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-140">[</span><span·class="s">&quot;.*&quot;</span><span·class="p"·data-group-id="9894828597-140">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·9929b59f48f0cd0ff38970fe9a4f2d8d6196c6d9e409e72ccef0ac2b49fe1d58·...·]-139">}</span><span·class="p">,</span><span·class="w">
220 ··········</span><span·class="p"·data-group-id="9197069385-141">{</span><span·class="ss">excl_app_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-142">[</span><span·class="p"·data-group-id="9197069385-142">]</span><span·class="p"·data-group-id="9197069385-141">}</span><span·class="p">,</span><span·class="w">220 ··········</span><span·class="p"·data-group-id="9894828597-141">{</span><span·class="ss">excl_app_filters</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-142">[</span><span·class="p"·data-group-id="9894828597-142">]</span><span·class="p"·data-group-id="9894828597-141">}</span><span·class="p">,</span><span·class="w">
221 ··········</span><span·class="p"·data-group-id="9197069385-143">{</span><span·class="ss">rel_app_type</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9197069385-143">}</span><span·class="p">,</span><span·class="w">221 ··········</span><span·class="p"·data-group-id="9894828597-143">{</span><span·class="ss">rel_app_type</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9894828597-143">}</span><span·class="p">,</span><span·class="w">
222 ··········</span><span·class="p"·data-group-id="9197069385-144">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9197069385-144">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·clas[·...·truncated·by·diffoscope;·len:·141,·SHA:·93493cee7b03eaeee510191bccd6ae599af412ae456c6297ebd199203bed8d9f·...·]-99">}</span><span·class="w">222 ··········</span><span·class="p"·data-group-id="9894828597-144">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9894828597-144">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·clas[·...·truncated·by·diffoscope;·len:·141,·SHA:·55af552c3cf0b4fc56a278a96c5b56d0b4f90c75b37c00a71e0cd75a4a185384·...·]-99">}</span><span·class="w">
223 </span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="gp·unselectable">223 </span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="gp·unselectable">
224 6&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9197069385-145">(</span><span·class="n">Server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="9197069385-145">)</span><span·class="p">.</span><span·class="w">224 6&gt;·</span><span·class="nc">reltool</span><span·class="p">:</span><span·class="nf">get_config</span><span·class="p"·data-group-id="9894828597-145">(</span><span·class="n">Server</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="9894828597-145">)</span><span·class="p">.</span><span·class="w">
225 </span><span·class="p"·data-group-id="9197069385-146">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-147">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-148">[</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·186,·SHA:·d958fd8ef3243c7613a8896ae3b2ee549b76012509c5f2920c2403254f15fb80·...·]-149">}</span><span·class="p">,</span><span·class="w">225 </span><span·class="p"·data-group-id="9894828597-146">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-147">{</span><span·class="ss">sys</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-148">[</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·186,·SHA:·3d0badfec73774f33831641d68881daa5d1c8b14c2d5fcdc67aba256fb3cf253·...·]-149">}</span><span·class="p">,</span><span·class="w">
226 ··········</span><span·class="p"·data-group-id="9197069385-150">{</span><span·class="ss">lib_dirs</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-151">[</span><span·class="p"·data-group-id="9197069385-151">]</span><span·class="p"·data-group-id="9197069385-150">}</span><span·class="p">,</span><span·class="w">226 ··········</span><span·class="p"·data-group-id="9894828597-150">{</span><span·class="ss">lib_dirs</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-151">[</span><span·class="p"·data-group-id="9894828597-151">]</span><span·class="p"·data-group-id="9894828597-150">}</span><span·class="p">,</span><span·class="w">
227 ··········</span><span·class="p"·data-group-id="9197069385-152">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">227 ··········</span><span·class="p"·data-group-id="9894828597-152">{</span><span·class="ss">escript</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/reltool-0.7.3/examples/display_args&quot;</span><span·class="p">,</span><span·class="w">
228 ···················</span><span·class="p"·data-group-id="9197069385-153">[</span><span·class="p"·data-group-id="9197069385-154">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9197069385-154">}</span><span·class="p"·data-group-id="9197[·...·truncated·by·diffoscope;·len:·61,·SHA:·02f7feed9b798c2e79761f65a57695b4798dfb96029754a1fe6f03cb64adc7b4·...·]-152">}</span><span·class="p">,</span><span·class="w">228 ···················</span><span·class="p"·data-group-id="9894828597-153">[</span><span·class="p"·data-group-id="9894828597-154">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">include</span><span·class="p"·data-group-id="9894828597-154">}</span><span·class="p"·data-group-id="9894[·...·truncated·by·diffoscope;·len:·61,·SHA:·be2d34a125bce2fb570e3d6f9d337da0061bf99befca82ea2ec1ff10603669a7·...·]-152">}</span><span·class="p">,</span><span·class="w">
229 ··········</span><span·class="p"·data-group-id="9197069385-155">{</span><span·class="ss">mod_cond</span><span·class="p">,</span><span·class="ss">all</span><span·class="p"·data-group-id="9197069385-155">}</span><span·class="p">,</span><span·class="w">229 ··········</span><span·class="p"·data-group-id="9894828597-155">{</span><span·class="ss">mod_cond</span><span·class="p">,</span><span·class="ss">all</span><span·class="p"·data-group-id="9894828597-155">}</span><span·class="p">,</span><span·class="w">
230 ··········</span><span·class="p"·data-group-id="9197069385-156">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">derived</span><span·class="p"·data-group-id="9197069385-156">}</span><span·class="p">,</span><span·class="w">230 ··········</span><span·class="p"·data-group-id="9894828597-156">{</span><span·class="ss">incl_cond</span><span·class="p">,</span><span·class="ss">derived</span><span·class="p"·data-group-id="9894828597-156">}</span><span·class="p">,</span><span·class="w">
231 ··········</span><span·class="p"·data-group-id="9197069385-157">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-158">[</span><span·class="p"·data-group-id="9197069385-159">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">231 ··········</span><span·class="p"·data-group-id="9894828597-157">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-158">[</span><span·class="p"·data-group-id="9894828597-159">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">
232 ······················</span><span·class="p"·data-group-id="9197069385-160">[</span><span·class="p"·data-group-id="9197069385-161">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="s">&quot;10.0&quot;</span><span·class="p"·data-group-id="9197069385-161">}</span><span·class="p">,</span><span·class="w">232 ······················</span><span·class="p"·data-group-id="9894828597-160">[</span><span·class="p"·data-group-id="9894828597-161">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="s">&quot;10.0&quot;</span><span·class="p"·data-group-id="9894828597-161">}</span><span·class="p">,</span><span·class="w">
233 ·······················</span><span·class="p"·data-group-id="9197069385-162">{</span><span·class="ss">lib_dir</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/erts-10.0&quot;</span><span·class="p"·data-group-id="9197069385-162">}</span><span·class="p">,</span><span·class="w">233 ·······················</span><span·class="p"·data-group-id="9894828597-162">{</span><span·class="ss">lib_dir</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/erts-10.0&quot;</span><span·class="p"·data-group-id="9894828597-162">}</span><span·class="p">,</span><span·class="w">
234 ·······················</span><span·class="p"·data-group-id="9197069385-163">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erl_prim_loader</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-164">[</span><span·class="p"·data-group-id="9197069385-164">]</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·c29b8b48530af25f06a3cd91954b67aac9c6c933319a36151d9beb5327ce7241·...·]-163">}</span><span·class="p">,</span><span·class="w">234 ·······················</span><span·class="p"·data-group-id="9894828597-163">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erl_prim_loader</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-164">[</span><span·class="p"·data-group-id="9894828597-164">]</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·70fd34b825590e9022f608a249125e64eeb8cc61923c2b756771d14782ab75fb·...·]-163">}</span><span·class="p">,</span><span·class="w">
235 ·······················</span><span·class="p"·data-group-id="9197069385-165">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erl_tracer</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-166">[</span><span·class="p"·data-group-id="9197069385-166">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·7b186e9564a79c765f71465b1ccf8b8fe81f9458c9a90dd0942a61f613112bf2·...·]-165">}</span><span·class="p">,</span><span·class="w">235 ·······················</span><span·class="p"·data-group-id="9894828597-165">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erl_tracer</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-166">[</span><span·class="p"·data-group-id="9894828597-166">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·9951e7b05aea426f05a0ded670d17f5572dc628f9c6eee31cca8376ef6d02138·...·]-165">}</span><span·class="p">,</span><span·class="w">
236 ·······················</span><span·class="p"·data-group-id="9197069385-167">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-168">[</span><span·class="p"·data-group-id="9197069385-168">]</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·a5be5e75e3b126374c311fef3eadaf6b7ecabc159b6541ebcc52947f64ec7835·...·]-167">}</span><span·class="p">,</span><span·class="w">236 ·······················</span><span·class="p"·data-group-id="9894828597-167">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-168">[</span><span·class="p"·data-group-id="9894828597-168">]</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·888375b28dc930ec5a561d094d7362f073172505428fd278519962f26c694775·...·]-167">}</span><span·class="p">,</span><span·class="w">
237 ·······················</span><span·class="p"·data-group-id="9197069385-169">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_code_purger</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-170">[</span><span·class="p"·data-group-id="9197069385-170">]</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·0790d7eaadfdf07fed626cdd5966cf040c6bf92ef09b5cdc3267db48c1dc88e0·...·]-169">}</span><span·class="p">,</span><span·class="w">237 ·······················</span><span·class="p"·data-group-id="9894828597-169">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_code_purger</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-170">[</span><span·class="p"·data-group-id="9894828597-170">]</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·22475bde4544f62bc012e4e32856f8501321327ed8dd67750110e25393f79cc6·...·]-169">}</span><span·class="p">,</span><span·class="w">
238 ·······················</span><span·class="p"·data-group-id="9197069385-171">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_dirty_process_signal_handler</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-172">[</span><span·class="p"·data-group-id="9197069385-172"[·...·truncated·by·diffoscope;·len:·50,·SHA:·f22fafa965eae41017fcc4de64a33ade523e77248adc344cda936268fceca3c0·...·]-171">}</span><span·class="p">,</span><span·class="w">238 ·······················</span><span·class="p"·data-group-id="9894828597-171">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_dirty_process_signal_handler</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-172">[</span><span·class="p"·data-group-id="9894828597-172"[·...·truncated·by·diffoscope;·len:·50,·SHA:·ea48a1a15007e74f19690863bbb0382f7065f1c6060f385f492f040db352a2bf·...·]-171">}</span><span·class="p">,</span><span·class="w">
239 ·······················</span><span·class="p"·data-group-id="9197069385-173">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_internal</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-174">[</span><span·class="p"·data-group-id="9197069385-174">]</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·e558eefd61d6d83c581a6b4dbbf375b5743032aa15e29e013a57f719d947fed7·...·]-173">}</span><span·class="p">,</span><span·class="w">239 ·······················</span><span·class="p"·data-group-id="9894828597-173">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_internal</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-174">[</span><span·class="p"·data-group-id="9894828597-174">]</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·f5486aeb914df00b7a35517a8c6ea5a450ede087ab8dfa35bd98f96056dfe15c·...·]-173">}</span><span·class="p">,</span><span·class="w">
240 ·······················</span><span·class="p"·data-group-id="9197069385-175">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_literal_area_collector</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-176">[</span><span·class="p"·data-group-id="9197069385-176">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·3e05cb379ef62ca8c2935c91fede1404d2f8619dc7806b29b37763891c20a898·...·]-175">}</span><span·class="p">,</span><span·class="w">240 ·······················</span><span·class="p"·data-group-id="9894828597-175">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erts_literal_area_collector</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-176">[</span><span·class="p"·data-group-id="9894828597-176">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·e67b93e1ec8d0c7fec880142303cbc6663a31dc03a2f5d43e4566d11d8845d6a·...·]-175">}</span><span·class="p">,</span><span·class="w">
241 ·······················</span><span·class="p"·data-group-id="9197069385-177">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">init</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-178">[</span><span·class="p"·data-group-id="9197069385-178">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·e830dc7861e7b99dffd13594950be27c49a3c01b9c80adbe55c6f5ddd6109212·...·]-177">}</span><span·class="p">,</span><span·class="w">241 ·······················</span><span·class="p"·data-group-id="9894828597-177">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">init</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-178">[</span><span·class="p"·data-group-id="9894828597-178">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·0472b37412886a9d596470351a7883f29b818a2677ffd285234876f49fd56bfd·...·]-177">}</span><span·class="p">,</span><span·class="w">
242 ·······················</span><span·class="p"·data-group-id="9197069385-179">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erl_init</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9197069385-179">}</span><span·class="p">,</span><span·class="w">242 ·······················</span><span·class="p"·data-group-id="9894828597-179">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">erl_init</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9894828597-179">}</span><span·class="p">,</span><span·class="w">
243 ·······················</span><span·class="p"·data-group-id="9197069385-180">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9197069385-180">}</span><span·class="p">,</span><span·class="w">243 ·······················</span><span·class="p"·data-group-id="9894828597-180">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9894828597-180">}</span><span·class="p">,</span><span·class="w">
244 ·······················</span><span·class="p"·data-group-id="9197069385-181">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9197069385-181">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·clas[·...·truncated·by·diffoscope;·len:·196,·SHA:·e24534d6a6d46de51ec8fc5e202519376b4c7c514fedc9cd08f33d07e893a9a9·...·]-157">}</span><span·class="p">,</span><span·class="w">244 ·······················</span><span·class="p"·data-group-id="9894828597-181">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9894828597-181">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·clas[·...·truncated·by·diffoscope;·len:·196,·SHA:·f1e061f55a72ad8f50f0648038bcb0a0902580b2795f579ea3d1bd2e16bedaf7·...·]-157">}</span><span·class="p">,</span><span·class="w">
245 ··········</span><span·class="p"·data-group-id="9197069385-182">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">compiler</span><span·class="p">,</span><span·class="w">245 ··········</span><span·class="p"·data-group-id="9894828597-182">{</span><span·class="ss">app</span><span·class="p">,</span><span·class="ss">compiler</span><span·class="p">,</span><span·class="w">
246 ···············</span><span·class="p"·data-group-id="9197069385-183">[</span><span·class="p"·data-group-id="9197069385-184">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="s">&quot;7.0.4&quot;</span><span·class="p"·data-group-id="9197069385-184">}</span><span·class="p">,</span><span·class="w">246 ···············</span><span·class="p"·data-group-id="9894828597-183">[</span><span·class="p"·data-group-id="9894828597-184">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="s">&quot;7.0.4&quot;</span><span·class="p"·data-group-id="9894828597-184">}</span><span·class="p">,</span><span·class="w">
247 ················</span><span·class="p"·data-group-id="9197069385-185">{</span><span·class="ss">lib_dir</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/compiler-7.0.4&quot;</span><span·class="p"·data-group-id="9197069385-185">}</span><span·class="p">,</span><span·class="w">247 ················</span><span·class="p"·data-group-id="9894828597-185">{</span><span·class="ss">lib_dir</span><span·class="p">,</span><span·class="s">&quot;/usr/local/lib/erlang/lib/compiler-7.0.4&quot;</span><span·class="p"·data-group-id="9894828597-185">}</span><span·class="p">,</span><span·class="w">
248 ················</span><span·class="p"·data-group-id="9197069385-186">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_a</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-187">[</span><span·class="p"·data-group-id="9197069385-187">]</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·a5be5e75e3b126374c311fef3eadaf6b7ecabc159b6541ebcc52947f64ec7835·...·]-186">}</span><span·class="p">,</span><span·class="w">248 ················</span><span·class="p"·data-group-id="9894828597-186">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_a</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-187">[</span><span·class="p"·data-group-id="9894828597-187">]</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·23,·SHA:·888375b28dc930ec5a561d094d7362f073172505428fd278519962f26c694775·...·]-186">}</span><span·class="p">,</span><span·class="w">
249 ················</span><span·class="p"·data-group-id="9197069385-188">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_asm</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-189">[</span><span·class="p"·data-group-id="9197069385-189">]</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·94759fb159b1c09befc1cf66b27970960abcb71572589e763f9e4eb198557032·...·]-188">}</span><span·class="p">,</span><span·class="w">249 ················</span><span·class="p"·data-group-id="9894828597-188">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_asm</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-189">[</span><span·class="p"·data-group-id="9894828597-189">]</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·4228c9d2f1e67f877138b7e867e2d0c0e5640a12f603f3b8c06be9fadedf2b3b·...·]-188">}</span><span·class="p">,</span><span·class="w">
250 ················</span><span·class="p"·data-group-id="9197069385-190">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_block</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-191">[</span><span·class="p"·data-group-id="9197069385-191">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·7b186e9564a79c765f71465b1ccf8b8fe81f9458c9a90dd0942a61f613112bf2·...·]-190">}</span><span·class="p">,</span><span·class="w">250 ················</span><span·class="p"·data-group-id="9894828597-190">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_block</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-191">[</span><span·class="p"·data-group-id="9894828597-191">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·9951e7b05aea426f05a0ded670d17f5572dc628f9c6eee31cca8376ef6d02138·...·]-190">}</span><span·class="p">,</span><span·class="w">
251 ················</span><span·class="p"·data-group-id="9197069385-192">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_bs</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-193">[</span><span·class="p"·data-group-id="9197069385-193">]</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·8544cc4858772980e68c33fa0b29b17436afd977485b6eefbc25fbb0dd551fa9·...·]-192">}</span><span·class="p">,</span><span·class="w">251 ················</span><span·class="p"·data-group-id="9894828597-192">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_bs</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-193">[</span><span·class="p"·data-group-id="9894828597-193">]</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·e4a8d9255269e20f3e4b3ce62776a9fc9148429beea3714f3e78efbe8637b857·...·]-192">}</span><span·class="p">,</span><span·class="w">
252 ················</span><span·class="p"·data-group-id="9197069385-194">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_bsm</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-195">[</span><span·class="p"·data-group-id="9197069385-195">]</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·94759fb159b1c09befc1cf66b27970960abcb71572589e763f9e4eb198557032·...·]-194">}</span><span·class="p">,</span><span·class="w">252 ················</span><span·class="p"·data-group-id="9894828597-194">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_bsm</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-195">[</span><span·class="p"·data-group-id="9894828597-195">]</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·4228c9d2f1e67f877138b7e867e2d0c0e5640a12f603f3b8c06be9fadedf2b3b·...·]-194">}</span><span·class="p">,</span><span·class="w">
253 ················</span><span·class="p"·data-group-id="9197069385-196">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_clean</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-197">[</span><span·class="p"·data-group-id="9197069385-197">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·7b186e9564a79c765f71465b1ccf8b8fe81f9458c9a90dd0942a61f613112bf2·...·]-196">}</span><span·class="p">,</span><span·class="w">253 ················</span><span·class="p"·data-group-id="9894828597-196">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_clean</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-197">[</span><span·class="p"·data-group-id="9894828597-197">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·9951e7b05aea426f05a0ded670d17f5572dc628f9c6eee31cca8376ef6d02138·...·]-196">}</span><span·class="p">,</span><span·class="w">
254 ················</span><span·class="p"·data-group-id="9197069385-198">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_dead</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-199">[</span><span·class="p"·data-group-id="9197069385-199">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·d974aeeb7891decb2d0381559a4b8b361f68ab40a9458a2c40f951d1056db55b·...·]-198">}</span><span·class="p">,</span><span·class="w">254 ················</span><span·class="p"·data-group-id="9894828597-198">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_dead</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-199">[</span><span·class="p"·data-group-id="9894828597-199">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·5bcb22907c2bfbb3c191108797735b787a95705cd77859bdefb16e846755d7c8·...·]-198">}</span><span·class="p">,</span><span·class="w">
255 ················</span><span·class="p"·data-group-id="9197069385-200">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_dict</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-201">[</span><span·class="p"·data-group-id="9197069385-201">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·d974aeeb7891decb2d0381559a4b8b361f68ab40a9458a2c40f951d1056db55b·...·]-200">}</span><span·class="p">,</span><span·class="w">255 ················</span><span·class="p"·data-group-id="9894828597-200">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_dict</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-201">[</span><span·class="p"·data-group-id="9894828597-201">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·5bcb22907c2bfbb3c191108797735b787a95705cd77859bdefb16e846755d7c8·...·]-200">}</span><span·class="p">,</span><span·class="w">
256 ················</span><span·class="p"·data-group-id="9197069385-202">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_disasm</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-203">[</span><span·class="p"·data-group-id="9197069385-203">]</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·650db812d182710230b8f756757172334a2b4134084b508e1e0759e450041d95·...·]-202">}</span><span·class="p">,</span><span·class="w">256 ················</span><span·class="p"·data-group-id="9894828597-202">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_disasm</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-203">[</span><span·class="p"·data-group-id="9894828597-203">]</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·4c3068030dd38a1e5b4ba6f3524abc81c2664c82ea9f38c1ce47fc9c0f8babcb·...·]-202">}</span><span·class="p">,</span><span·class="w">
257 ················</span><span·class="p"·data-group-id="9197069385-204">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_except</span><span·class="p">,</span><span·class="p"·data-group-id="9197069385-205">[</span><span·class="p"·data-group-id="9197069385-205">]</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·650db812d182710230b8f756757172334a2b4134084b508e1e0759e450041d95·...·]-204">}</span><span·class="p">,</span><span·class="w">257 ················</span><span·class="p"·data-group-id="9894828597-204">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="ss">beam_except</span><span·class="p">,</span><span·class="p"·data-group-id="9894828597-205">[</span><span·class="p"·data-group-id="9894828597-205">]</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·4c3068030dd38a1e5b4ba6f3524abc81c2664c82ea9f38c1ce47fc9c0f8babcb·...·]-204">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 221163/380606 bytes (58.11%) of diff not shown.
632 B
./usr/share/doc/erlang-doc/html/lib/reltool-1.0.1/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-780E66E8.js"></script>124 <script·src="dist/search_data-A7BB32CF.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
214 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/dbg.html
    
Offset 127, 129 lines modifiedOffset 127, 129 lines modified
127 ··</h1>127 ··</h1>
  
  
128 ····<section·id="moduledoc">128 ····<section·id="moduledoc">
129 <p>The·Text·Based·Trace·Facility</p><p>This·module·implements·a·text·based·interface·to·the129 <p>The·Text·Based·Trace·Facility</p><p>This·module·implements·a·text·based·interface·to·the
130 <a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#process/4"><code·class="inline">trace:process/4</code></a>,·<a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#port/4"><code·class="inline">trace:port/4</code></a>,·and·<a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#function/4"><code·class="inline">trace:function/4</code></a>·BIFs,130 <a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#process/4"><code·class="inline">trace:process/4</code></a>,·<a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#port/4"><code·class="inline">trace:port/4</code></a>,·and·<a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#function/4"><code·class="inline">trace:function/4</code></a>·BIFs,
131 simplifying·tracing·of·functions,·processes,·ports,·and·messages.</p><p>To·quickly·get·started·on·tracing·function·calls·you·can·use·the131 simplifying·tracing·of·functions,·processes,·ports,·and·messages.</p><p>To·quickly·get·started·on·tracing·function·calls·you·can·use·the
132 following·code·in·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="1801240612-1">(</span><span·class="p"·data-group-id="1801240612-1">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·Start·the·default·trace·message·receiver</span><span·class="w">132 following·code·in·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="8548022594-1">(</span><span·class="p"·data-group-id="8548022594-1">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·Start·the·default·trace·message·receiver</span><span·class="w">
133 </span><span·class="p"·data-group-id="1801240612-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1801240612-2">}</span><span·class="gp·unselectable">133 </span><span·class="p"·data-group-id="8548022594-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8548022594-2">}</span><span·class="gp·unselectable">
134 2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="1801240612-3">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c</span><span·class="p"·data-group-id="1801240612-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Set·upp·call·tracing·on·all·processes</span><span·class="w">134 2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="8548022594-3">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c</span><span·class="p"·data-group-id="8548022594-3">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Set·upp·call·tracing·on·all·processes</span><span·class="w">
135 </span><span·class="p"·data-group-id="1801240612-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1801240612-5">[</span><span·class="p"·data-group-id="1801240612-6">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonode[·...·truncated·by·diffoscope;·len:·211,·SHA:·41170cd96471078cbf15e5bbbd3729b90cc901aea529de536b4c287f9081fa27·...·]-4">}</span><span·class="gp·unselectable">135 </span><span·class="p"·data-group-id="8548022594-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8548022594-5">[</span><span·class="p"·data-group-id="8548022594-6">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonode[·...·truncated·by·diffoscope;·len:·211,·SHA:·0fa1f93f84bc335f5f9f96771788ba837e36da96fb32c05f6e55167af6a28903·...·]-4">}</span><span·class="gp·unselectable">
136 3&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="1801240612-7">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">seq</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cx</span><span·class="p"·data-group-id="1801240612-7">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%··Set·up·call·and·exception·tracing·on·lists:seq/2,3</span><span·class="w">136 3&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="8548022594-7">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">seq</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">cx</span><span·class="p"·data-group-id="8548022594-7">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%··Set·up·call·and·exception·tracing·on·lists:seq/2,3</span><span·class="w">
137 </span><span·class="p"·data-group-id="1801240612-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1801240612-9">[</span><span·class="p"·data-group-id="1801240612-10">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonod[·...·truncated·by·diffoscope;·len:·423,·SHA:·3323e45334a3c1119c338ef568557d651b8479cdc42901da49910e38c137b639·...·]-8">}</span><span·class="gp·unselectable">137 </span><span·class="p"·data-group-id="8548022594-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8548022594-9">[</span><span·class="p"·data-group-id="8548022594-10">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonod[·...·truncated·by·diffoscope;·len:·423,·SHA:·2959d78da3ba6da03805d85b0553e5dd28a31fab89bf63e449b4a8ae56a667d2·...·]-8">}</span><span·class="gp·unselectable">
138 4&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="1801240612-12">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p"·data-group-id="1801240612-12">)</span><span·class="p">.</span><span·class="w">138 4&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="8548022594-12">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p"·data-group-id="8548022594-12">)</span><span·class="p">.</span><span·class="w">
139 </span><span·class="p"·data-group-id="1801240612-13">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1801240612-13">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·885,·SHA:·3a74dd4de1f73dc5a1c4083136b0d4414548f6115cf1f05c90dbdf9d76236bd1·...·]-15">)</span><span·class="w">139 </span><span·class="p"·data-group-id="8548022594-13">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8548022594-13">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·885,·SHA:·140083a23d8e2c820f945b0dba0d7101de6a9f1a6a087697eb516eb4dc4d5278·...·]-15">)</span><span·class="w">
140 </span><span·class="p"·data-group-id="1801240612-18">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class=[·...·truncated·by·diffoscope;·len:·275,·SHA:·7222691c25ddfc22d5ab493cd5bb7692d965021761a9c73cc2923555b3bd98c3·...·]-18">]</span><span·class="w">140 </span><span·class="p"·data-group-id="8548022594-18">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class=[·...·truncated·by·diffoscope;·len:·275,·SHA:·f9a1c9af684e652ed8a5dcd2f20a242fee04a7a5de3a454b3cb4bc31a7d80828·...·]-18">]</span><span·class="w">
141 </span><span·class="p"·data-group-id="1801240612-19">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1801240612-19">)</span><span·class="w">·</span><span·class="ss">returne[·...·truncated·by·diffoscope;·len:·851,·SHA:·1b4d84316e99b10f52c9bc9c0d8559f4627d498d9ba799aac94214acd972ca7d·...·]-20">]</span></code></pre><p>The·utilities·are·also·suitable·to·use·in·system·testing·on·large·systems,·where141 </span><span·class="p"·data-group-id="8548022594-19">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8548022594-19">)</span><span·class="w">·</span><span·class="ss">returne[·...·truncated·by·diffoscope;·len:·851,·SHA:·90754664b86533f5fe03f09d492e4d1bfa69f957b5aa91744c5dd84889d5a731·...·]-20">]</span></code></pre><p>The·utilities·are·also·suitable·to·use·in·system·testing·on·large·systems,·where
142 other·tools·have·too·severe·impact·on·the·system·performance.·Some·primitive142 other·tools·have·too·severe·impact·on·the·system·performance.·Some·primitive
143 support·for·sequential·tracing·is·also·included;·see·the143 support·for·sequential·tracing·is·also·included;·see·the
144 <a·href="dbg.html#advanced">advanced·topics</a>·section.</p><h2·id="module-simple-tracing-from-the-shell-with-no-prior-set-up"·class="section-heading">144 <a·href="dbg.html#advanced">advanced·topics</a>·section.</p><h2·id="module-simple-tracing-from-the-shell-with-no-prior-set-up"·class="section-heading">
145 ··<a·href="#module-simple-tracing-from-the-shell-with-no-prior-set-up"·class="hover-link">145 ··<a·href="#module-simple-tracing-from-the-shell-with-no-prior-set-up"·class="hover-link">
146 ····<i·class="ri-link-m"·aria-hidden="true"></i>146 ····<i·class="ri-link-m"·aria-hidden="true"></i>
147 ··</a>147 ··</a>
148 ··<span·class="text">Simple·tracing·from·the·shell·with·no·prior·set·up</span>148 ··<span·class="text">Simple·tracing·from·the·shell·with·no·prior·set·up</span>
149 </h2>149 </h2>
150 <p>To·trace·a·call·to·a·function·with·minimal·fuss,·call·<a·href="#c/3"><code·class="inline">dbg:c(Module,·Name,·Arguments)</code></a>.·<a·href="#c/3"><code·class="inline">dbg:c/3</code></a>·starts·a·temporary·trace150 <p>To·trace·a·call·to·a·function·with·minimal·fuss,·call·<a·href="#c/3"><code·class="inline">dbg:c(Module,·Name,·Arguments)</code></a>.·<a·href="#c/3"><code·class="inline">dbg:c/3</code></a>·starts·a·temporary·trace
151 receiver,·enables·all·trace·flags,·and·calls·the·designated·function151 receiver,·enables·all·trace·flags,·and·calls·the·designated·function
152 from·a·temporary·process.·For·example,·here·is·how·to·trace·a·call152 from·a·temporary·process.·For·example,·here·is·how·to·trace·a·call
153 to·<a·href="../../../../lib/kernel-10.0.1/doc/html/application.html#which_applications/0"><code·class="inline">application:which_applications/0</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">c</span><span·class="p"·data-group-id="4187134310-1">(</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">which_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4187134310-2">[</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·6c86ce75834c1fa1b5a11944e95a3972c4a55b7a6cbba1d6be71f0d84b365f17·...·]-1">)</span><span·class="p">.</span><span·class="w">153 to·<a·href="../../../../lib/kernel-10.0.1/doc/html/application.html#which_applications/0"><code·class="inline">application:which_applications/0</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">c</span><span·class="p"·data-group-id="5160466401-1">(</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">which_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5160466401-2">[</span><span·cl[·...·truncated·by·diffoscope;·len:·86,·SHA:·db89a9fb9940b10c4e2f23ae0ae78eefa21c84bebeac2fdcd04adbf463d7fbf6·...·]-1">)</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p"·data-group-id="4187134310-3">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4187134310-3">)</span><span·class="w">·</span><span·class="o">&lt;</span[·...·truncated·by·diffoscope;·len:·338,·SHA:·71344d94981dc08ce016c3eb3160d7dc570b5e2b79243993c6d097d1dd78e0ae·...·]-5">{</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">154 </span><span·class="p"·data-group-id="5160466401-3">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5160466401-3">)</span><span·class="w">·</span><span·class="o">&lt;</span[·...·truncated·by·diffoscope;·len:·338,·SHA:·cbcffc1f2cec9f05a5ee0606d709299765919d2d6c489479799b43f1d0771985·...·]-5">{</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
155 ····································</span><span·class="p"·data-group-id="4187134310-6">[</span><span·class="ss">alias</span><span·class="p">|</span><span·class="w">155 ····································</span><span·class="p"·data-group-id="5160466401-6">[</span><span·class="ss">alias</span><span·class="p">|</span><span·class="w">
156 ·····································</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.0</span><span·class="p">.</span><span·class="mf">11779.270031856</span><span·class="p">.</span><span·class="mf">1478295555.230456</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4187134310-6">]</span><span·class="p"·data-group-id="4187134310-5">}</span><span·class="p">,</span><span·class="w">156 ·····································</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.0</span><span·class="p">.</span><span·class="mf">11779.270031856</span><span·class="p">.</span><span·class="mf">1478295555.230456</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5160466401-6">]</span><span·class="p"·data-group-id="5160466401-5">}</span><span·class="p">,</span><span·class="w">
157 ···································</span><span·class="ss">which_applications</span><span·class="p"·data-group-id="4187134310-4">}</span><span·class="w">·</span><span·class="p"·data-group-id="4187134310-7">(</span><span·class="n">Timestamp</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="4187134310-8">{</span><span·class="mi">1710</span><span·class="p">,</span><span·class="w">157 ···································</span><span·class="ss">which_applications</span><span·class="p"·data-group-id="5160466401-4">}</span><span·class="w">·</span><span·class="p"·data-group-id="5160466401-7">(</span><span·class="n">Timestamp</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5160466401-8">{</span><span·class="mi">1710</span><span·class="p">,</span><span·class="w">
158 ····································································</span><span·class="mi">847802</span><span·class="p">,</span><span·class="w">158 ····································································</span><span·class="mi">847802</span><span·class="p">,</span><span·class="w">
159 ····································································</span><span·class="mi">479222</span><span·class="p"·data-group-id="4187134310-8">}</span><span·class="p"·data-group-id="4187134310-7">)</span><span·class="w">159 ····································································</span><span·class="mi">479222</span><span·class="p"·data-group-id="5160466401-8">}</span><span·class="p"·data-group-id="5160466401-7">)</span><span·class="w">
160 </span><span·class="p"·data-group-id="4187134310-9">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4187134310-9">)</span><span·class="w">·</span><span·class="ss">out</span[·...·truncated·by·diffoscope;·len:·707,·SHA:·271c6aa42c30b54c4399e67d5b6d6dbf31350fbdd7ae859687706ad5276aec80·...·]-11">)</span><span·class="w">160 </span><span·class="p"·data-group-id="5160466401-9">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5160466401-9">)</span><span·class="w">·</span><span·class="ss">out</span[·...·truncated·by·diffoscope;·len:·707,·SHA:·210b88eb660a673556da7de28536ab5aaeda7614f1e8b03204a1f2ee0d178c90·...·]-11">)</span><span·class="w">
161 </span><span·class="p"·data-group-id="4187134310-13">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4187134310-13">)</span><span·class="w">·</span><span·class="ss">in</spa[·...·truncated·by·diffoscope;·len:·708,·SHA:·fd1e156019573b96e014fb7afffdb2656cc73795e9fe01d0fbb43492d0bf42f0·...·]-15">)</span><span·class="w">161 </span><span·class="p"·data-group-id="5160466401-13">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5160466401-13">)</span><span·class="w">·</span><span·class="ss">in</spa[·...·truncated·by·diffoscope;·len:·708,·SHA:·8a00e7efc347090451e24bbb0de2ea878952df62c3e967585baddcde46850597·...·]-15">)</span><span·class="w">
162 </span><span·class="p"·data-group-id="4187134310-17">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4187134310-17">)</span><span·class="w">·</span><span·class="p">&lt;&lt;[·...·truncated·by·diffoscope;·len:·492,·SHA:·4180813e542cbf23585f02385286f7ed3227f0ecfb2d4f1e3a20caa70044c04d·...·]-19">]</span><span·class="p">,</span><span·class="w">162 </span><span·class="p"·data-group-id="5160466401-17">(</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5160466401-17">)</span><span·class="w">·</span><span·class="p">&lt;&lt;[·...·truncated·by·diffoscope;·len:·492,·SHA:·9595ec0ba70811390be6a0697719aff49826194f91e455a44a25815f0f2067c9·...·]-19">]</span><span·class="p">,</span><span·class="w">
163 ···············</span><span·class="p"·data-group-id="4187134310-20">[</span><span·class="p"·data-group-id="4187134310-21">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·2422bbbc88e63d76df3834db20b4f81e83b4fc573387415022164cb1cb321d0c·...·]-21">}</span><span·class="p">,</span><span·class="w">163 ···············</span><span·class="p"·data-group-id="5160466401-20">[</span><span·class="p"·data-group-id="5160466401-21">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·6b0fed2b7de09b80616bb4fc5e5aa9b6273616a82713a679e168b1291c615178·...·]-21">}</span><span·class="p">,</span><span·class="w">
164 ················</span><span·class="p"·data-group-id="4187134310-22">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="4187134310-22">}</span><span·clas[·...·truncated·by·diffoscope;·len:·297,·SHA:·5b37acd731489ff546a8c5c7a73d75c990b5d828fadce4a93badfef88eaf2688·...·]-24">{</span><span·class="mi">1710</span><span·class="p">,</span><span·class="w">164 ················</span><span·class="p"·data-group-id="5160466401-22">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="5160466401-22">}</span><span·clas[·...·truncated·by·diffoscope;·len:·297,·SHA:·1953302c147d17784b8d0ba4a70a38deb1ec2a5b57417fa1c68dc98dcbc93421·...·]-24">{</span><span·class="mi">1710</span><span·class="p">,</span><span·class="w">
165 ···································································</span><span·class="mi">847802</span><span·class="p">,</span><span·class="w">165 ···································································</span><span·class="mi">847802</span><span·class="p">,</span><span·class="w">
166 ···································································</span><span·class="mi">479274</span><span·class="p"·data-group-id="4187134310-24">}</span><span·class="p"·data-group-id="4187134310-23">)</span><span·class="w">166 ···································································</span><span·class="mi">479274</span><span·class="p"·data-group-id="5160466401-24">}</span><span·class="p"·data-group-id="5160466401-23">)</span><span·class="w">
167 </span><span·class="p"·data-group-id="4187134310-25">[</span><span·class="p"·data-group-id="4187134310-26">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·2422bbbc88e63d76df3834db20b4f81e83b4fc573387415022164cb1cb321d0c·...·]-26">}</span><span·class="p">,</span><span·class="w">167 </span><span·class="p"·data-group-id="5160466401-25">[</span><span·class="p"·data-group-id="5160466401-26">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·6b0fed2b7de09b80616bb4fc5e5aa9b6273616a82713a679e168b1291c615178·...·]-26">}</span><span·class="p">,</span><span·class="w">
168 ·</span><span·class="p"·data-group-id="4187134310-27">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="4187134310-27">}</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·2422bbbc88e63d76df3834db20b4f81e83b4fc573387415022164cb1cb321d0c·...·]-25">]</span></code></pre><p>Four·trace·events·are·generated:</p><ul><li>A·send·event·(<code·class="inline">!</code>)·for·the·sending·of·a·request·from·the·current·process168 ·</span><span·class="p"·data-group-id="5160466401-27">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="5160466401-27">}</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·6b0fed2b7de09b80616bb4fc5e5aa9b6273616a82713a679e168b1291c615178·...·]-25">]</span></code></pre><p>Four·trace·events·are·generated:</p><ul><li>A·send·event·(<code·class="inline">!</code>)·for·the·sending·of·a·request·from·the·current·process
169 to·the·<code·class="inline">application_controller</code>·process.</li><li>A·schedule-out·event·(<code·class="inline">out</code>)·when·the·current·process·schedules·out·while169 to·the·<code·class="inline">application_controller</code>·process.</li><li>A·schedule-out·event·(<code·class="inline">out</code>)·when·the·current·process·schedules·out·while
170 waiting·in·a·<code·class="inline">receive</code>·for·the·reply·to·arrive.</li><li>A·schedule-in·event·(<code·class="inline">in</code>)·when·the·current·process·is·scheduled·in·when170 waiting·in·a·<code·class="inline">receive</code>·for·the·reply·to·arrive.</li><li>A·schedule-in·event·(<code·class="inline">in</code>)·when·the·current·process·is·scheduled·in·when
171 reply·has·arrived.</li><li>A·<code·class="inline">receive</code>·event·(<code·class="inline">&lt;&lt;</code>)·when·the·current·process·retrieves·the·reply·from171 reply·has·arrived.</li><li>A·<code·class="inline">receive</code>·event·(<code·class="inline">&lt;&lt;</code>)·when·the·current·process·retrieves·the·reply·from
172 the·<code·class="inline">application_controller</code>·process.</li></ul><p>The·<a·href="#c/4"><code·class="inline">dbg:c/4</code></a>·function·has·a·fourth·argument·for·specifying·the·trace·flags.172 the·<code·class="inline">application_controller</code>·process.</li></ul><p>The·<a·href="#c/4"><code·class="inline">dbg:c/4</code></a>·function·has·a·fourth·argument·for·specifying·the·trace·flags.
173 Here·is·how·to·only·show·message·sending·and·receiving:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">c</span><span·class="p"·data-group-id="5609763657-1">(</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">which_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5609763657-2">[</span><span·cl[·...·truncated·by·diffoscope;·len:·158,·SHA:·4eae85bd1db97fae1f8324d51c8b30097dea68e79f7316507b2c8d25241cefd1·...·]7-1">)</span><span·class="p">.</span><span·class="w">173 Here·is·how·to·only·show·message·sending·and·receiving:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">c</span><span·class="p"·data-group-id="2748459117-1">(</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">which_applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2748459117-2">[</span><span·cl[·...·truncated·by·diffoscope;·len:·158,·SHA:·9cd56afd2172062035b3264bd14082e4d6fdc1d845393f6899acc42140601ebd·...·]7-1">)</span><span·class="p">.</span><span·class="w">
174 </span><span·class="p"·data-group-id="5609763657-3">(</span><span·class="o">&lt;</span><span·class="mf">0.96</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5609763657-3">)</span><span·class="w">·</span><span·class="o">&lt;</span[·...·truncated·by·diffoscope;·len:·337,·SHA:·77bec3b725078cf49d8acc84649c4526398251dfb73b2d6b3c9f2e54fbfbe49c·...·]7-5">{</span><span·class="o">&lt;</span><span·class="mf">0.96</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">174 </span><span·class="p"·data-group-id="2748459117-3">(</span><span·class="o">&lt;</span><span·class="mf">0.96</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2748459117-3">)</span><span·class="w">·</span><span·class="o">&lt;</span[·...·truncated·by·diffoscope;·len:·337,·SHA:·21bb88a821853d32d5b29ca495610f5d360ab39a39811404cdae87fc851c0bd6·...·]7-5">{</span><span·class="o">&lt;</span><span·class="mf">0.96</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
175 ····································</span><span·class="p"·data-group-id="5609763657-6">[</span><span·class="ss">alias</span><span·class="p">|</span><span·class="w">175 ····································</span><span·class="p"·data-group-id="2748459117-6">[</span><span·class="ss">alias</span><span·class="p">|</span><span·class="w">
176 ·····································</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.0</span><span·class="p">.</span><span·class="mf">12291.270031856</span><span·class="p">.</span><span·class="mf">1478295555.230496</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5609763657-6">]</span><span·class="p"·data-group-id="5609763657-5">}</span><span·class="p">,</span><span·class="w">176 ·····································</span><span·class="p">#</span><span·class="n">Ref</span><span·class="o">&lt;</span><span·class="mf">0.0</span><span·class="p">.</span><span·class="mf">12291.270031856</span><span·class="p">.</span><span·class="mf">1478295555.230496</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2748459117-6">]</span><span·class="p"·data-group-id="2748459117-5">}</span><span·class="p">,</span><span·class="w">
177 ···································</span><span·class="ss">which_applications</span><span·class="p"·data-group-id="5609763657-4">}</span><span·class="w">177 ···································</span><span·class="ss">which_applications</span><span·class="p"·data-group-id="2748459117-4">}</span><span·class="w">
178 </span><span·class="p"·data-group-id="5609763657-7">(</span><span·class="o">&lt;</span><span·class="mf">0.96</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5609763657-7">)</span><span·class="w">·</span><span·class="p">&lt;&lt;</[·...·truncated·by·diffoscope;·len:·487,·SHA:·5a08bef2f80b98e89a07b55b366faaff6a804dce7358c83b41f40530c03cf824·...·]7-9">]</span><span·class="p">,</span><span·class="w">178 </span><span·class="p"·data-group-id="2748459117-7">(</span><span·class="o">&lt;</span><span·class="mf">0.96</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2748459117-7">)</span><span·class="w">·</span><span·class="p">&lt;&lt;</[·...·truncated·by·diffoscope;·len:·487,·SHA:·76e2a6ebed794577564d404ab5a052bb67e444858d2dc1edb0d385e72d03f599·...·]7-9">]</span><span·class="p">,</span><span·class="w">
179 ···············</span><span·class="p"·data-group-id="5609763657-10">[</span><span·class="p"·data-group-id="5609763657-11">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·30,·SHA:·747bc5958f2aa6c1a57ef402f21ebe8e9f1ca8c7772c303aba5d8e904a9633ec·...·]7-11">}</span><span·class="p">,</span><span·class="w">179 ···············</span><span·class="p"·data-group-id="2748459117-10">[</span><span·class="p"·data-group-id="2748459117-11">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·30,·SHA:·23cf19123a828e0ccb6fda44421660527923ed8361c6e663f8fc4849390002ea·...·]7-11">}</span><span·class="p">,</span><span·class="w">
180 ················</span><span·class="p"·data-group-id="5609763657-12">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="5609763657-12">}</span><span·clas[·...·truncated·by·diffoscope;·len:·84,·SHA:·03e019cf487ad97cfddf86f39d18609b585e91711142c6f9ddd6606619c63e41·...·]7-8">}</span><span·class="w">180 ················</span><span·class="p"·data-group-id="2748459117-12">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="2748459117-12">}</span><span·clas[·...·truncated·by·diffoscope;·len:·84,·SHA:·76bc6550cd6640ce0e862dc0f81f8566c984c57762a4be14798401a0ad6070f7·...·]7-8">}</span><span·class="w">
181 </span><span·class="p"·data-group-id="5609763657-13">[</span><span·class="p"·data-group-id="5609763657-14">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·30,·SHA:·747bc5958f2aa6c1a57ef402f21ebe8e9f1ca8c7772c303aba5d8e904a9633ec·...·]7-14">}</span><span·class="p">,</span><span·class="w">181 </span><span·class="p"·data-group-id="2748459117-13">[</span><span·class="p"·data-group-id="2748459117-14">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;5.2.1&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·30,·SHA:·23cf19123a828e0ccb6fda44421660527923ed8361c6e663f8fc4849390002ea·...·]7-14">}</span><span·class="p">,</span><span·class="w">
182 ·</span><span·class="p"·data-group-id="5609763657-15">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="5609763657-15">}</span><span·clas[·...·truncated·by·diffoscope;·len:·30,·SHA:·747bc5958f2aa6c1a57ef402f21ebe8e9f1ca8c7772c303aba5d8e904a9633ec·...·]7-13">]</span></code></pre><h2·id="module-tracing-from-the-shell"·class="section-heading">182 ·</span><span·class="p"·data-group-id="2748459117-15">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;ERTS··CXC·138·10&quot;</span><span·class="p">,</span><span·class="s">&quot;9.2.2&quot;</span><span·class="p"·data-group-id="2748459117-15">}</span><span·clas[·...·truncated·by·diffoscope;·len:·30,·SHA:·23cf19123a828e0ccb6fda44421660527923ed8361c6e663f8fc4849390002ea·...·]7-13">]</span></code></pre><h2·id="module-tracing-from-the-shell"·class="section-heading">
183 ··<a·href="#module-tracing-from-the-shell"·class="hover-link">183 ··<a·href="#module-tracing-from-the-shell"·class="hover-link">
184 ····<i·class="ri-link-m"·aria-hidden="true"></i>184 ····<i·class="ri-link-m"·aria-hidden="true"></i>
185 ··</a>185 ··</a>
186 ··<span·class="text">Tracing·from·the·shell</span>186 ··<span·class="text">Tracing·from·the·shell</span>
187 </h2>187 </h2>
188 <p>Another·way·of·tracing·from·the·shell·is·to·explicitly·start·a·<em>tracer</em>·and188 <p>Another·way·of·tracing·from·the·shell·is·to·explicitly·start·a·<em>tracer</em>·and
189 set·the·<em>trace·flags</em>·of·your·choice·on·the·processes·you·want·to·trace.189 set·the·<em>trace·flags</em>·of·your·choice·on·the·processes·you·want·to·trace.
190 For·example,·here·is·how·to·trace·messages·and·process·events:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0855423628-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0855423628-2">(</span><span·class="p"·data-group-id="0855423628-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="k">receive</[·...·truncated·by·diffoscope;·len:·554,·SHA:·017c594096c418004973c3715ee198eb7d3adb6bed3f837791e3c6ebb0028f6e·...·]-1">)</span><span·class="p">.</span><span·class="w">190 For·example,·here·is·how·to·trace·messages·and·process·events:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="2613144205-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="2613144205-2">(</span><span·class="p"·data-group-id="2613144205-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="k">receive</[·...·truncated·by·diffoscope;·len:·554,·SHA:·33d354e197885a8751d4632989e5e2967381730ca5e598b6ddbe15ae8527e763·...·]-1">)</span><span·class="p">.</span><span·class="w">
191 </span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">191 </span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
192 2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="0855423628-4">(</span><span·class="p"·data-group-id="0855423628-4">)</span><span·class="p">.</span><span·class="w">192 2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="2613144205-4">(</span><span·class="p"·data-group-id="2613144205-4">)</span><span·class="p">.</span><span·class="w">
193 </span><span·class="p"·data-group-id="0855423628-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0855423628-5">}</span><span·class="gp·unselectable">193 </span><span·class="p"·data-group-id="2613144205-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2613144205-5">}</span><span·class="gp·unselectable">
194 3&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="0855423628-6">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0855423628-7">[</span><span·class="ss">m</span><span·class="p">,</span><span·class="ss">procs</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·65,·SHA:·b80fde99d74d81b63dc72aaeb7ff88cce495cb69780d98cc6eddf601f887f474·...·]-6">)</span><span·class="p">.</span><span·class="w">194 3&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="2613144205-6">(</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2613144205-7">[</span><span·class="ss">m</span><span·class="p">,</span><span·class="ss">procs</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·65,·SHA:·dc589692d43366e83adc0d812a380f1f9b15c02f6ae2406d9c9e67f425058c32·...·]-6">)</span><span·class="p">.</span><span·class="w">
195 </span><span·class="p"·data-group-id="0855423628-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0855423628-9">[</span><span·class="p"·data-group-id="0855423628-10">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonod[·...·truncated·by·diffoscope;·len:·212,·SHA:·26d60ad00fefbcdc7ab29b3e10e4cfaaab27203821eaafe7620c4d141fbd44d6·...·]-8">}</span><span·class="gp·unselectable">195 </span><span·class="p"·data-group-id="2613144205-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2613144205-9">[</span><span·class="p"·data-group-id="2613144205-10">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonod[·...·truncated·by·diffoscope;·len:·212,·SHA:·507d65b5ee7066ea2b3005385c5ea4659c005814cac1a4c2acec345af677c1ce·...·]-8">}</span><span·class="gp·unselectable">
196 4&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0855423628-11">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0855423628-12">(</span><span·class="p"·data-group-id="0855423628-12">)</span><span·class="p">,</span><span·class="ss">hello</span><span·class="p"·data-group-id="0855423628-11">}</span><span·class="p">.</span><span·class="w">196 4&gt;·</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="2613144205-11">{</span><span·class="nf">self</span><span·class="p"·data-group-id="2613144205-12">(</span><span·class="p"·data-group-id="2613144205-12">)</span><span·class="p">,</span><span·class="ss">hello</span><span·class="p"·data-group-id="2613144205-11">}</span><span·class="p">.</span><span·class="w">
197 </span><span·class="p"·data-group-id="0855423628-13">(</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0855423628-13">)</span><span·class="w">·</span><span·class="p">&lt;&lt;[·...·truncated·by·diffoscope;·len:·310,·SHA:·49da96e12eea2658c7a134be170c66a43f3759c13316cbc9b1b7b8156e196f0d·...·]-14">}</span><span·class="w">197 </span><span·class="p"·data-group-id="2613144205-13">(</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2613144205-13">)</span><span·class="w">·</span><span·class="p">&lt;&lt;[·...·truncated·by·diffoscope;·len:·310,·SHA:·696dc60fca3676bef05e491eea99f21edc3ef35197977add72b3fc334a58bd2a·...·]-14">}</span><span·class="w">
198 </span><span·class="p"·data-group-id="0855423628-15">{</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">hello</span><span·class="p"·data-group-id="0855423628-15">}</span><span·class="w">198 </span><span·class="p"·data-group-id="2613144205-15">{</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="ss">hello</span><span·class="p"·data-group-id="2613144205-15">}</span><span·class="w">
199 </span><span·class="p"·data-group-id="0855423628-16">(</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0855423628-16">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="nf">hello</span><span·class="w">199 </span><span·class="p"·data-group-id="2613144205-16">(</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2613144205-16">)</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="nf">hello</span><span·class="w">
200 </span><span·class="p"·data-group-id="0855423628-17">(</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0855423628-17">)</span><span·class="w">·</span><span·class="nb">exit</span><span·class="w">·</span><span·class="ss">normal</span><span·class="gp·unselectable">200 </span><span·class="p"·data-group-id="2613144205-17">(</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2613144205-17">)</span><span·class="w">·</span><span·class="nb">exit</span><span·class="w">·</span><span·class="ss">normal</span><span·class="gp·unselectable">
201 5&gt;·</span><span·class="nf">flush</span><span·class="p"·data-group-id="0855423628-18">(</span><span·class="p"·data-group-id="0855423628-18">)</span><span·class="p">.</span><span·class="w">201 5&gt;·</span><span·class="nf">flush</span><span·class="p"·data-group-id="2613144205-18">(</span><span·class="p"·data-group-id="2613144205-18">)</span><span·class="p">.</span><span·class="w">
202 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">202 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">
203 </span><span·class="ss">ok</span></code></pre><p>In·order·to·trace·functions·call,·in·addition·to·enabling·the·<code·class="inline">call</code>·trace·flag203 </span><span·class="ss">ok</span></code></pre><p>In·order·to·trace·functions·call,·in·addition·to·enabling·the·<code·class="inline">call</code>·trace·flag
204 for·the·process,·it·is·also·necessary·to·set·a·<em>trace·pattern</em>·for·the·functions204 for·the·process,·it·is·also·necessary·to·set·a·<em>trace·pattern</em>·for·the·functions
205 to·trace.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="6812596942-1">(</span><span·class="p"·data-group-id="6812596942-1">)</span><span·class="p">.</span><span·class="w">205 to·trace.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="5752259145-1">(</span><span·class="p"·data-group-id="5752259145-1">)</span><span·class="p">.</span><span·class="w">
206 </span><span·class="p"·data-group-id="6812596942-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6812596942-2">}</span><span·class="gp·unselectable">206 </span><span·class="p"·data-group-id="5752259145-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5752259145-2">}</span><span·class="gp·unselectable">
207 2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="6812596942-3">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">call</span><span·class="p"·data-group-id="6812596942-3">)</span><span·class="p">.</span><span·class="w">207 2&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="5752259145-3">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">call</span><span·class="p"·data-group-id="5752259145-3">)</span><span·class="p">.</span><span·class="w">
208 </span><span·class="p"·data-group-id="6812596942-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6812596942-5">[</span><span·class="p"·data-group-id="6812596942-6">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonode[·...·truncated·by·diffoscope;·len:·211,·SHA:·e7541244d37d298500c79a7b75cf6d109c12d5184092491ce173c4ed02f7377b·...·]-4">}</span><span·class="gp·unselectable">208 </span><span·class="p"·data-group-id="5752259145-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5752259145-5">[</span><span·class="p"·data-group-id="5752259145-6">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonode[·...·truncated·by·diffoscope;·len:·211,·SHA:·923d4df9d3629bf715f65d7f5ebfb30f39fd8b7e67e952317f31982407a2a0c7·...·]-4">}</span><span·class="gp·unselectable">
209 3&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="6812596942-7">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">last</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·139,·SHA:·fafa646e554d679d806087c10051770b70448ec657c900ed369c5ddde046d41d·...·]-7">)</span><span·class="p">.</span><span·class="w">209 3&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="5752259145-7">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">last</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·139,·SHA:·6d5cec1c67835e2c6f3923e1de973756f5c1e9215a33820a64eb4262c3ae5526·...·]-7">)</span><span·class="p">.</span><span·class="w">
210 </span><span·class="p"·data-group-id="6812596942-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6812596942-10">[</span><span·class="p"·data-group-id="6812596942-11">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nono[·...·truncated·by·diffoscope;·len:·214,·SHA:·a27f3208f85598ff6525bd5a5cd6e702827f6f631d0ca12aadbd93af79bdf26b·...·]-9">}</span><span·class="gp·unselectable">210 </span><span·class="p"·data-group-id="5752259145-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5752259145-10">[</span><span·class="p"·data-group-id="5752259145-11">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nono[·...·truncated·by·diffoscope;·len:·214,·SHA:·e8bea90f0d8912775f00f7bcfc631d20d436a702d1ad94536d4f89030417df31·...·]-9">}</span><span·class="gp·unselectable">
211 4&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">last</span><span·class="p"·data-group-id="6812596942-12">(</span><span·class="p"·data-group-id="6812596942-13">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">d</span><span·c[·...·truncated·by·diffoscope;·len:·137,·SHA:·a359683c9f6d586504d36436e3f17f45ec8a7728c909af5e24fcc10e078281cd·...·]-12">)</span><span·class="p">.</span><span·class="w">211 4&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">last</span><span·class="p"·data-group-id="5752259145-12">(</span><span·class="p"·data-group-id="5752259145-13">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">d</span><span·c[·...·truncated·by·diffoscope;·len:·137,·SHA:·a88134ce3c2e6db852de3ab517c1aa6bbe4b136473cd3fa8653651d00ab4dfa0·...·]-12">)</span><span·class="p">.</span><span·class="w">
212 </span><span·class="p"·data-group-id="6812596942-14">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6812596942-14">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·533,·SHA:·79f84a024117a99d10c703a70f21cd1f8929b9949af7f8c7f41c662bdcf1dab9·...·]-15">)</span><span·class="w">212 </span><span·class="p"·data-group-id="5752259145-14">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5752259145-14">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·533,·SHA:·f8182901016487be7b1d213ee6d9c577e8a74c9ff54fbf3ca70f287b335c5ca7·...·]-15">)</span><span·class="w">
213 </span><span·class="ss">e</span><span·class="gp·unselectable">213 </span><span·class="ss">e</span><span·class="gp·unselectable">
214 5&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="6812596942-17">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">last</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6812596942-18">[</span><span·class="p"·data-group-id="6812596942-19">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="6812596942-20">[</span><span·class="p"·data-group-id="6812596942-20">]</span><span·class="p">,</span><span·class="p"·data-group-id="6812596942-21">[</span><span·class="p"·data-group-id="6812596942-22">{</span><span·class="ss">return_trace</span><span·class="p"·data-group-id="6812596942-22">}</span><span·class="p"·data-group-id="6812596942-21">]</span><span·class="p"·data-group-id="6812596942-19">}</span><span·class="p"·data-group-id="6812596942-18">]</span><span·class="p"·data-group-id="6812596942-17">)</span><span·class="p">.</span><span·class="w"> 
215 </span><span·class="p"·data-group-id="6812596942-23">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6812596942-24">[</span><span·class="p"·data-group-id="6812596942-25">{</span><span·class="ss">matched</span><span·[·...·truncated·by·diffoscope;·len:·504,·SHA:·74b9f62f0328440080afa84fc3ed05f9137d3e0d8fc7db5ae2f704a30aa6bd21·...·]">214 5&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="5752259145-17">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">last</span><span·c[·...·truncated·by·diffoscope;·len:·865,·SHA:·9eaa405dfca9446ca92a7c1cd03c06c77e83428498aa0e92d3f61ee4075005be·...·]">
 215 </span><span·class="p"·data-group-id="5752259145-23">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5752259145-24">[</span><span·class="p"·data-group-id="5752259145-25">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">nonode@nohost</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5752259145-25">}</span><span·class="p">,</span><span·class="p"·data-group-id="5752259145-26">{</span><span·class="ss">saved</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5752259145-26">}</span><span·class="p"·data-group-id="5752259145-24">]</span><span·class="p"·data-group-id="5752259145-23">}</span><span·class="gp·unselectable">
216 6&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">last</span><span·class="p"·data-group-id="6812596942-27">(</span><span·class="p"·data-group-id="6812596942-28">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">d</span><span·c[·...·truncated·by·diffoscope;·len:·137,·SHA:·10bbd13d892e0db17848c40131e656e9cfdcca5f493204543183279810206c27·...·]-27">)</span><span·class="p">.</span><span·class="w">216 6&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">last</span><span·class="p"·data-group-id="5752259145-27">(</span><span·class="p"·data-group-id="5752259145-28">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p">,</span><span·class="ss">d</span><span·c[·...·truncated·by·diffoscope;·len:·137,·SHA:·0e975f3174ac1af6ed05d477d32741f7e446ecf572688f61777d9b178a1c8f63·...·]-27">)</span><span·class="p">.</span><span·class="w">
217 </span><span·class="p"·data-group-id="6812596942-29">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6812596942-29">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·533,·SHA:·85a6757e7e0e7291a77a5403c902654bca5b1e9b9106ecc9396b1b1865fcdcb9·...·]-30">)</span><span·class="w">217 </span><span·class="p"·data-group-id="5752259145-29">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5752259145-29">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·533,·SHA:·d23ca994f5e7b7f9c7ebaa5ef61cf4479eaad673e9318c2c39d7472f3f0ab4fe·...·]-30">)</span><span·class="w">
218 </span><span·class="p"·data-group-id="6812596942-32">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6812596942-32">)</span><span·class="w">·</span><span·class="ss">returned</span><span·class="w">·</span><span·class="ss">from</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">last</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">e</span><span·class="w">218 </span><span·class="p"·data-group-id="5752259145-32">(</span><span·class="o">&lt;</span><span·class="mf">0.88</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5752259145-32">)</span><span·class="w">·</span><span·class="ss">returned</span><span·class="w">·</span><span·class="ss">from</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">last</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">e</span><span·class="w">
219 </span><span·class="ss">e</span></code></pre><p><a·href=""·id="advanced"></a></p><h2·id="module-advanced-topics-combining-with-seq_trace"·class="section-heading">219 </span><span·class="ss">e</span></code></pre><p><a·href=""·id="advanced"></a></p><h2·id="module-advanced-topics-combining-with-seq_trace"·class="section-heading">
220 ··<a·href="#module-advanced-topics-combining-with-seq_trace"·class="hover-link">220 ··<a·href="#module-advanced-topics-combining-with-seq_trace"·class="hover-link">
221 ····<i·class="ri-link-m"·aria-hidden="true"></i>221 ····<i·class="ri-link-m"·aria-hidden="true"></i>
222 ··</a>222 ··</a>
223 ··<span·class="text">Advanced·topics·-·combining·with·seq_trace</span>223 ··<span·class="text">Advanced·topics·-·combining·with·seq_trace</span>
224 </h2>224 </h2>
225 <p>The·<code·class="inline">dbg</code>·module·is·primarily·targeted·towards·tracing·through·the225 <p>The·<code·class="inline">dbg</code>·module·is·primarily·targeted·towards·tracing·through·the
226 <a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#process/4"><code·class="inline">trace:process/4</code></a>·function.·It·is·sometimes·desired·to·trace·messages·in·a·more226 <a·href="../../../../lib/kernel-10.0.1/doc/html/trace.html#process/4"><code·class="inline">trace:process/4</code></a>·function.·It·is·sometimes·desired·to·trace·messages·in·a·more
227 delicate·way,·which·can·be·done·with·the·help·of·the·<a·href="../../../../lib/kernel-10.0.1/doc/html/seq_trace.html"><code·class="inline">seq_trace</code></a>·module.</p><p><a·href="../../../../lib/kernel-10.0.1/doc/html/seq_trace.html"><code·class="inline">seq_trace</code></a>·implements·sequential·tracing·(known·in·the·AXE10·world,·and227 delicate·way,·which·can·be·done·with·the·help·of·the·<a·href="../../../../lib/kernel-10.0.1/doc/html/seq_trace.html"><code·class="inline">seq_trace</code></a>·module.</p><p><a·href="../../../../lib/kernel-10.0.1/doc/html/seq_trace.html"><code·class="inline">seq_trace</code></a>·implements·sequential·tracing·(known·in·the·AXE10·world,·and
228 sometimes·called·&quot;forlopp·tracing&quot;).·<code·class="inline">dbg</code>·can·interpret·messages·generated·from228 sometimes·called·&quot;forlopp·tracing&quot;).·<code·class="inline">dbg</code>·can·interpret·messages·generated·from
229 <code·class="inline">seq_trace</code>·and·the·same·tracer·function·for·both·types·of·tracing·can·be·used.229 <code·class="inline">seq_trace</code>·and·the·same·tracer·function·for·both·types·of·tracing·can·be·used.
230 The·<code·class="inline">seq_trace</code>·messages·can·also·be·sent·to·a·trace·port·for·further·analysis.</p><p>As·a·match·specification·can·turn·on·sequential·tracing,·the·combination·of230 The·<code·class="inline">seq_trace</code>·messages·can·also·be·sent·to·a·trace·port·for·further·analysis.</p><p>As·a·match·specification·can·turn·on·sequential·tracing,·the·combination·of
231 <code·class="inline">dbg</code>·and·<code·class="inline">seq_trace</code>·can·be·powerful.·This·brief·example·shows·a·session231 <code·class="inline">dbg</code>·and·<code·class="inline">seq_trace</code>·can·be·powerful.·This·brief·example·shows·a·session
232 where·sequential·tracing·is·used·to·trace·the·<code·class="inline">dbg</code>·module·and·the·trace·itself:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="2691256954-1">(</span><span·class="p"·data-group-id="2691256954-1">)</span><span·class="p">.</span><span·class="w">232 where·sequential·tracing·is·used·to·trace·the·<code·class="inline">dbg</code>·module·and·the·trace·itself:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tracer</span><span·class="p"·data-group-id="9470894576-1">(</span><span·class="p"·data-group-id="9470894576-1">)</span><span·class="p">.</span><span·class="w">
233 </span><span·class="p"·data-group-id="2691256954-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2691256954-2">}</span><span·class="gp·unselectable">233 </span><span·class="p"·data-group-id="9470894576-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9470894576-2">}</span><span·class="gp·unselectable">
234 2&gt;·</span><span·class="p"·data-group-id="2691256954-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tracer</span><span·class="p"·data-group-id="2691256954-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·173,·SHA:·49c2a8983d34584cbcee01f50aa5292584458516b600222079b8b49b4e250a16·...·]-4">)</span><span·class="p">.</span><span·class="w">234 2&gt;·</span><span·class="p"·data-group-id="9470894576-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tracer</span><span·class="p"·data-group-id="9470894576-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·173,·SHA:·e3347965029aff4951c815fe826a86d47e1bd7e6ba82549699196c2d6a2084fd·...·]-4">)</span><span·class="p">.</span><span·class="w">
235 </span><span·class="p"·data-group-id="2691256954-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2691256954-5">}</span><span·class="gp·unselectable">235 </span><span·class="p"·data-group-id="9470894576-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.31</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9470894576-5">}</span><span·class="gp·unselectable">
236 3&gt;·</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_system_tracer</span><span·class="p"·data-group-id="2691256954-6">(</span><span·class="n">Tracer</span><span·class="p"·data-group-id="2691256954-6">)</span><span·class="p">.</span><span·class="w">236 3&gt;·</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_system_tracer</span><span·class="p"·data-group-id="9470894576-6">(</span><span·class="n">Tracer</span><span·class="p"·data-group-id="9470894576-6">)</span><span·class="p">.</span><span·class="w">
237 </span><span·class="ss">false</span><span·class="gp·unselectable">237 </span><span·class="ss">false</span><span·class="gp·unselectable">
238 4&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="2691256954-7">(</span><span·class="ss">dbg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_tracer</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·918,·SHA:·c1fba9586484f30f5ca7fb1d15e52801911725cbbe2b0be8d06c7b11ac54a13f·...·]-7">)</span><span·class="p">.</span><span·class="w">238 4&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">tp</span><span·class="p"·data-group-id="9470894576-7">(</span><span·class="ss">dbg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_tracer</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·918,·SHA:·b7917c569faddf94a54d855d26b7521618058d58bf991d2a4b3c02b19feb55e5·...·]-7">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="p"·data-group-id="2691256954-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2691256954-15">[</span><span·class="p"·data-group-id="2691256954-16">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">non[·...·truncated·by·diffoscope;·len:·425,·SHA:·a555e3f64c5b823f4378bd6c13a901606023634517c3198b13bf17bc202804e6·...·]-14">}</span><span·class="gp·unselectable">239 </span><span·class="p"·data-group-id="9470894576-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9470894576-15">[</span><span·class="p"·data-group-id="9470894576-16">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">non[·...·truncated·by·diffoscope;·len:·425,·SHA:·59695571e0a1823d3317d2daacd9cafe91981eaf901be816cfc575a9e41ae835·...·]-14">}</span><span·class="gp·unselectable">
240 5&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="2691256954-18">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">call</span><span·class="p"·data-group-id="2691256954-18">)</span><span·class="p">.</span><span·class="w">240 5&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">p</span><span·class="p"·data-group-id="9470894576-18">(</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">call</span><span·class="p"·data-group-id="9470894576-18">)</span><span·class="p">.</span><span·class="w">
241 </span><span·class="p"·data-group-id="2691256954-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2691256954-20">[</span><span·class="p"·data-group-id="2691256954-21">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">non[·...·truncated·by·diffoscope;·len:·216,·SHA:·2020024a1f6b3f2af076182e0ce09d6a9fd9d77e85dc7056d6a0eacc5ed84815·...·]-19">}</span><span·class="gp·unselectable">241 </span><span·class="p"·data-group-id="9470894576-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9470894576-20">[</span><span·class="p"·data-group-id="9470894576-21">{</span><span·class="ss">matched</span><span·class="p">,</span><span·class="ss">non[·...·truncated·by·diffoscope;·len:·216,·SHA:·06725a6f3ce4bbba9f8e4da608264ee96351e68c13247b92ab5cd364ad3f9c25·...·]-19">}</span><span·class="gp·unselectable">
242 6&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">get_tracer</span><span·class="p"·data-group-id="2691256954-22">(</span><span·class="p"·data-group-id="2691256954-22">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="2691256954[·...·truncated·by·diffoscope;·len:·162,·SHA:·b7575dd55b9be0fbec76bca8306bf4198e0a21c3082b9e6757def2c45fe02212·...·]-23">)</span><span·class="p">.</span><span·class="w">242 6&gt;·</span><span·class="nc">dbg</span><span·class="p">:</span><span·class="nf">get_tracer</span><span·class="p"·data-group-id="9470894576-22">(</span><span·class="p"·data-group-id="9470894576-22">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">seq_trace</span><span·class="p">:</span><span·class="nf">set_token</span><span·class="p"·data-group-id="9470894576[·...·truncated·by·diffoscope;·len:·162,·SHA:·309cfa5e2d66944864d06f2745f7d61434bf66d93a4f998ec9992e5ecb7e029b·...·]-23">)</span><span·class="p">.</span><span·class="w">
243 </span><span·class="p"·data-group-id="2691256954-25">(</span><span·class="o">&lt;</span><span·class="mf">0.25</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2691256954-25">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·208,·SHA:·7f3f35b97e4713f9cfa831f6dfc006ad1c7f6bda9cce93aadbe72533368c9dea·...·]-26">)</span><span·class="w">243 </span><span·class="p"·data-group-id="9470894576-25">(</span><span·class="o">&lt;</span><span·class="mf">0.25</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9470894576-25">)</span><span·class="w">·</span><span·class="ss">call</s[·...·truncated·by·diffoscope;·len:·208,·SHA:·5201f947afce32d4bbdd51ac2d0cb5504b1b1ba5f5c94ce78d40c7acbf00170e·...·]-26">)</span><span·class="w">
244 </span><span·class="n">SeqTrace</span><span·class="w">·</span><span·class="p"·data-group-id="2691256954-27">[</span><span·class="mi">0</span><span·class="p"·data-group-id="2691256954-27">]</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2691256954-28">(</span><span·class="o">&lt;</span><span·class="mf">0.25</sp[·...·truncated·by·diffoscope;·len:·1035,·SHA:·c0fe4ae73bc741ebc5e701d93b5aab07593e8f5460c50958ec0c1f1bc4c0b75b·...·]-30">]</span><span·class="w">244 </span><span·class="n">SeqTrace</span><span·class="w">·</span><span·class="p"·data-group-id="9470894576-27">[</span><span·class="mi">0</span><span·class="p"·data-group-id="9470894576-27">]</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9470894576-28">(</span><span·class="o">&lt;</span><span·class="mf">0.25</sp[·...·truncated·by·diffoscope;·len:·1035,·SHA:·1f5694e7a8f8e546b2681aeae87d4d4e86e086ad916a870181b16155a9ca2dd1·...·]-30">]</span><span·class="w">
245 </span><span·class="n">SeqTrace</span><span·class="w">·</span><span·class="p"·data-group-id="2691256954-32">[</span><span·class="mi">0</span><span·class="p"·data-group-id="2691256954-32">]</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2691256954-33">(</span><span·class="o">&lt;</span><span·class="mf">0.30</sp[·...·truncated·by·diffoscope;·len:·1186,·SHA:·ecd403435d001821ae13125750a3134084fcb4ee54c4c1b99b199414ff2eb172·...·]-36">]</span><span·class="w">245 </span><span·class="n">SeqTrace</span><span·class="w">·</span><span·class="p"·data-group-id="9470894576-32">[</span><span·class="mi">0</span><span·class="p"·data-group-id="9470894576-32">]</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9470894576-33">(</span><span·class="o">&lt;</span><span·class="mf">0.30</sp[·...·truncated·by·diffoscope;·len:·1186,·SHA:·38ac229580132207e020cf42fcdce2ac3fa3f4fafae166905e6788f09ce04ca9·...·]-36">]</span><span·class="w">
246 </span><span·class="p"·data-group-id="2691256954-38">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·c[·...·truncated·by·diffoscope;·len:·135,·SHA:·cc208712f7be19a982ccfe6dde9edc615181f4bc1e99a1af50ccf5653b8fd31c·...·]-38">}</span></code></pre><p>This·session·sets·the·system_tracer·to·the·same·process·as·the246 </span><span·class="p"·data-group-id="9470894576-38">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.30</span><span·class="p">.</span><span·c[·...·truncated·by·diffoscope;·len:·135,·SHA:·f4cb425106dab1cf44f30669a0900125a843d15abfd9af902819ed57f618a86d·...·]-38">}</span></code></pre><p>This·session·sets·the·system_tracer·to·the·same·process·as·the
247 ordinary·tracer·process·(i.·e.·&lt;0.31.0&gt;)·and·sets·the·trace·pattern247 ordinary·tracer·process·(i.·e.·&lt;0.31.0&gt;)·and·sets·the·trace·pattern
248 for·the·function·<code·class="inline">dbg:get_tracer</code>·to·one·that·has·the·action·of248 for·the·function·<code·class="inline">dbg:get_tracer</code>·to·one·that·has·the·action·of
249 setting·a·sequential·token.·When·the·function·is·called·by·a·traced249 setting·a·sequential·token.·When·the·function·is·called·by·a·traced
250 process·(all·processes·are·traced·in·this·case),·the·process·gets250 process·(all·processes·are·traced·in·this·case),·the·process·gets
Max diff block lines reached; 129535/219136 bytes (59.11%) of diff not shown.
11.4 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/dyntrace.html
    
Offset 853, 22 lines modifiedOffset 853, 22 lines modified
853 ··········<pre·translate="no"><span·class="attribute">-spec</span>·restore_tag(true·|·{<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()·|·[]})·->·true.</pre>853 ··········<pre·translate="no"><span·class="attribute">-spec</span>·restore_tag(true·|·{<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()·|·[]})·->·true.</pre>
  
854 ······</div>854 ······</div>
  
855 <p>Restores·the·previous·state·of·user·tags·and·their·spreading·as·it·was·before·a855 <p>Restores·the·previous·state·of·user·tags·and·their·spreading·as·it·was·before·a
856 call·to·<a·href="#spread_tag/1"><code·class="inline">spread_tag/1</code></a>.</p><p>Note·that·the·restoring·is·not·limited·to·the·same·process;·one·can856 call·to·<a·href="#spread_tag/1"><code·class="inline">spread_tag/1</code></a>.</p><p>Note·that·the·restoring·is·not·limited·to·the·same·process;·one·can
857 utilize·this·to·turn·off·spreding·in·one·process·and·restore·it·in·a857 utilize·this·to·turn·off·spreding·in·one·process·and·restore·it·in·a
858 newly·created·process·that·is·is·actually·going·to·send·messages:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="4784873618-1">(</span><span·class="p"·data-group-id="4784873618-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">858 newly·created·process·that·is·is·actually·going·to·send·messages:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="6683724020-1">(</span><span·class="p"·data-group-id="6683724020-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
859 ····</span><span·class="n">TagData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">spread_tag</span><span·class="p"·data-group-id="4784873618-2">(</span><span·class="ss">false</span><span·class="p"·data-group-id="4784873618-2">)</span><span·class="p">,</span><span·class="w">859 ····</span><span·class="n">TagData</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">spread_tag</span><span·class="p"·data-group-id="6683724020-2">(</span><span·class="ss">false</span><span·class="p"·data-group-id="6683724020-2">)</span><span·class="p">,</span><span·class="w">
860 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="4784873618-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4784873618-4">(</span><span·class="p"·data-group-id="4784873618-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">860 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6683724020-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6683724020-4">(</span><span·class="p"·data-group-id="6683724020-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
861 ·············</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">restore_tag</span><span·class="p"·data-group-id="4784873618-5">(</span><span·class="n">TagData</span><span·class="p"·data-group-id="4784873618-5">)</span><span·class="p">,</span><span·class="w">861 ·············</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">restore_tag</span><span·class="p"·data-group-id="6683724020-5">(</span><span·class="n">TagData</span><span·class="p"·data-group-id="6683724020-5">)</span><span·class="p">,</span><span·class="w">
862 ·············</span><span·class="nf">do_something</span><span·class="p"·data-group-id="4784873618-6">(</span><span·class="p"·data-group-id="4784873618-6">)</span><span·class="w">862 ·············</span><span·class="nf">do_something</span><span·class="p"·data-group-id="6683724020-6">(</span><span·class="p"·data-group-id="6683724020-6">)</span><span·class="w">
863 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="4784873618-3">)</span><span·class="p">,</span><span·class="w">863 ··········</span><span·class="k">end</span><span·class="p"·data-group-id="6683724020-3">)</span><span·class="p">,</span><span·class="w">
864 ····</span><span·class="nf">do_something_else</span><span·class="p"·data-group-id="4784873618-7">(</span><span·class="p"·data-group-id="4784873618-7">)</span><span·class="p">,</span><span·class="w">864 ····</span><span·class="nf">do_something_else</span><span·class="p"·data-group-id="6683724020-7">(</span><span·class="p"·data-group-id="6683724020-7">)</span><span·class="p">,</span><span·class="w">
865 ····</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">restore_tag</span><span·class="p"·data-group-id="4784873618-8">(</span><span·class="n">TagData</span><span·class="p"·data-group-id="4784873618-8">)</span><span·class="p">.</span></code></pre><p>Correctly·handling·user·tags·and·their·spreading·might·take·some·effort,·as865 ····</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">restore_tag</span><span·class="p"·data-group-id="6683724020-8">(</span><span·class="n">TagData</span><span·class="p"·data-group-id="6683724020-8">)</span><span·class="p">.</span></code></pre><p>Correctly·handling·user·tags·and·their·spreading·might·take·some·effort,·as
866 Erlang·programs·tend·to·send·and·receive·messages·so·that·sometimes·the·user·tag866 Erlang·programs·tend·to·send·and·receive·messages·so·that·sometimes·the·user·tag
867 gets·lost·due·to·various·things,·like·double·receives·or·communication·with·a867 gets·lost·due·to·various·things,·like·double·receives·or·communication·with·a
868 port·(ports·do·not·handle·user·tags,·in·the·same·way·as·they·do·not·handle868 port·(ports·do·not·handle·user·tags,·in·the·same·way·as·they·do·not·handle
869 regular·sequential·trace·tokens).</p>869 regular·sequential·trace·tokens).</p>
870 ··</section>870 ··</section>
871 </section>871 </section>
872 <section·class="detail"·id="spread_tag/1">872 <section·class="detail"·id="spread_tag/1">
Offset 907, 20 lines modifiedOffset 907, 20 lines modified
907 <a·href="#restore_tag/1"><code·class="inline">restore_tag/1</code></a>,·one·can·enable·or·disable·spreading·of·user907 <a·href="#restore_tag/1"><code·class="inline">restore_tag/1</code></a>,·one·can·enable·or·disable·spreading·of·user
908 tags·to·other·processes·and·then·restore·the·previous·state·of·the·user·tag.·The908 tags·to·other·processes·and·then·restore·the·previous·state·of·the·user·tag.·The
909 TagData·returned·from·this·call·contains·all·previous·information·so·the·state909 TagData·returned·from·this·call·contains·all·previous·information·so·the·state
910 (including·any·previously·spread·user·tags)·will·be·completely·restored·by·a910 (including·any·previously·spread·user·tags)·will·be·completely·restored·by·a
911 later·call·to·<a·href="#restore_tag/1"><code·class="inline">restore_tag/1</code></a>.</p><p>The·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>·module·already·spreads·tags,·so·there·is·no·need·to·manually·call911 later·call·to·<a·href="#restore_tag/1"><code·class="inline">restore_tag/1</code></a>.</p><p>The·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>·module·already·spreads·tags,·so·there·is·no·need·to·manually·call
912 this·function·to·get·user·tags·spread·to·the·<code·class="inline">efile</code>·driver·through·that·module.</p><p>The·most·use·of·this·function·would·be·if·one,·for·example,·uses·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html"><code·class="inline">io</code></a>·module912 this·function·to·get·user·tags·spread·to·the·<code·class="inline">efile</code>·driver·through·that·module.</p><p>The·most·use·of·this·function·would·be·if·one,·for·example,·uses·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html"><code·class="inline">io</code></a>·module
913 to·communicate·with·an·I/O-server·for·a·regular·file,·such·as·in·the·following913 to·communicate·with·an·I/O-server·for·a·regular·file,·such·as·in·the·following
914 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="5551770226-1">(</span><span·class="p"·data-group-id="5551770226-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">914 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">f</span><span·class="p"·data-group-id="9045080234-1">(</span><span·class="p"·data-group-id="9045080234-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
915 ···</span><span·class="p"·data-group-id="5551770226-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="5551770226-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·389,·SHA:·c5000451e06bdc93fb6fb5a41d8296e95bcfed61e56e68d5c787409108ac1f41·...·]-3">)</span><span·class="p">,</span><span·class="w">915 ···</span><span·class="p"·data-group-id="9045080234-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·class="p"·data-group-id="9045080234-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·389,·SHA:·0d341cb316f790774fa9d9cd68a8fb676dd15d311afe2cfe50f2f9a9501b3f22·...·]-3">)</span><span·class="p">,</span><span·class="w">
916 ···</span><span·class="n">Saved</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">spread_tag</span><span·class="p"·data-group-id="5551770226-5">(</span><span·class="ss">true</span><span·class="p"·data-group-id="5551770226-5">)</span><span·class="p">,</span><span·class="w">916 ···</span><span·class="n">Saved</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">spread_tag</span><span·class="p"·data-group-id="9045080234-5">(</span><span·class="ss">true</span><span·class="p"·data-group-id="9045080234-5">)</span><span·class="p">,</span><span·class="w">
917 ···</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5551770226-6">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Hello·world!&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5551770226-7">[</span><span·class="p[·...·truncated·by·diffoscope;·len:·80,·SHA:·6fd541b72d1123b724523fa4c9110526e555193671a070785f8c9622f5c75ee5·...·]-6">)</span><span·class="p">,</span><span·class="w">917 ···</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9045080234-6">(</span><span·class="n">F</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Hello·world!&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9045080234-7">[</span><span·class="p[·...·truncated·by·diffoscope;·len:·80,·SHA:·6b2b47643a2264144e1a00f00d44b445adb69ad6bf82476befb27f3134e40e38·...·]-6">)</span><span·class="p">,</span><span·class="w">
918 ···</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">restore_tag</span><span·class="p"·data-group-id="5551770226-8">(</span><span·class="n">Saved</span><span·class="p"·data-group-id="5551770226-8">)</span><span·class="p">,</span><span·class="w">918 ···</span><span·class="nc">dyntrace</span><span·class="p">:</span><span·class="nf">restore_tag</span><span·class="p"·data-group-id="9045080234-8">(</span><span·class="n">Saved</span><span·class="p"·data-group-id="9045080234-8">)</span><span·class="p">,</span><span·class="w">
919 ···</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5551770226-9">(</span><span·class="n">F</span><span·class="p"·data-group-id="5551770226-9">)</span><span·class="p">.</span></code></pre><p>In·this·example,·any·user·tag·set·in·the·calling·process·will·be·spread·to·the919 ···</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="9045080234-9">(</span><span·class="n">F</span><span·class="p"·data-group-id="9045080234-9">)</span><span·class="p">.</span></code></pre><p>In·this·example,·any·user·tag·set·in·the·calling·process·will·be·spread·to·the
920 I/O-server·when·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#format/3"><code·class="inline">io:format/3</code></a>·call·is·done.</p>920 I/O-server·when·the·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#format/3"><code·class="inline">io:format/3</code></a>·call·is·done.</p>
921 ··</section>921 ··</section>
922 </section>922 </section>
  
923 ····</div>923 ····</div>
924 ··</section>924 ··</section>
  
50.6 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/instrument.html
    
Offset 351, 16 lines modifiedOffset 351, 16 lines modified
  
351 ······</div>351 ······</div>
  
352 <p>A·histogram·of·block·sizes·where·each·interval's·upper·bound·is·twice·as·high·as352 <p>A·histogram·of·block·sizes·where·each·interval's·upper·bound·is·twice·as·high·as
353 the·one·before·it.</p><p>The·upper·bound·of·the·first·interval·is·provided·by·the·function·that·returned353 the·one·before·it.</p><p>The·upper·bound·of·the·first·interval·is·provided·by·the·function·that·returned
354 the·histogram,·and·the·last·interval·has·no·upper·bound.</p><p>For·example,·the·histogram·below·has·40·(<code·class="inline">message</code>)·blocks·between·128-256·bytes354 the·histogram,·and·the·last·interval·has·no·upper·bound.</p><p>For·example,·the·histogram·below·has·40·(<code·class="inline">message</code>)·blocks·between·128-256·bytes
355 in·size,·78·blocks·between·256-512·bytes,2·blocks·between·512-1024·bytes,·and·2355 in·size,·78·blocks·between·256-512·bytes,2·blocks·between·512-1024·bytes,·and·2
356 blocks·between·1-2KB.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">instrument</span><span·class="p">:</span><span·class="nf">allocations</span><span·class="p"·data-group-id="0850437473-1">(</span><span·class="p"·data-group-id="0850437473-2">#{</span><span·class="w">·</span><span·class="ss">histogram_start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">128</span><span·class="p[·...·truncated·by·diffoscope;·len:·292,·SHA:·f35eb1682b45c66488e73a5dc40ddf6fade6105d449e8a26fe90659add9a560c·...·]3-1">)</span><span·class="p">.</span><span·class="w">356 blocks·between·1-2KB.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">instrument</span><span·class="p">:</span><span·class="nf">allocations</span><span·class="p"·data-group-id="7739868003-1">(</span><span·class="p"·data-group-id="7739868003-2">#{</span><span·class="w">·</span><span·class="ss">histogram_start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">128</span><span·class="p[·...·truncated·by·diffoscope;·len:·292,·SHA:·738db93dad873ff0be1689a32e6fc6cee276366f534b5d5db18b03e92d02d3df·...·]3-1">)</span><span·class="p">.</span><span·class="w">
357 </span><span·class="p"·data-group-id="0850437473-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0850437473-4">{</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·c[·...·truncated·by·diffoscope;·len:·1359,·SHA:·7a6da526a2e76c078c0a29ea6cda18298bd865a76fd456986d12b7488a2eccb8·...·]3-3">}</span></code></pre>357 </span><span·class="p"·data-group-id="7739868003-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7739868003-4">{</span><span·class="mi">128</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·c[·...·truncated·by·diffoscope;·len:·1359,·SHA:·44ba1345edf4da9dde6a0a6358a5d2ab9e7e645e380b9dd4b4fff9f3c7e107da·...·]3-3">}</span></code></pre>
358 ··</section>358 ··</section>
359 </section>359 </section>
360 <section·class="detail"·id="t:carrier_info_list/0">360 <section·class="detail"·id="t:carrier_info_list/0">
  
361 ··<div·class="detail-header">361 ··<div·class="detail-header">
362 ····<a·href="#t:carrier_info_list/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">362 ····<a·href="#t:carrier_info_list/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">
363 ······<i·class="ri-link-m"·aria-hidden="true"></i>363 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 492, 38 lines modifiedOffset 492, 38 lines modified
492 to·an·allocator·of·a·different·type.</p><p>Defaults·to·all·<code·class="inline">alloc_util</code>·allocators.</p></li><li><p><strong><code·class="inline">scheduler_ids</code></strong>·-·The·scheduler·ids·whose·allocator·instances·will·be492 to·an·allocator·of·a·different·type.</p><p>Defaults·to·all·<code·class="inline">alloc_util</code>·allocators.</p></li><li><p><strong><code·class="inline">scheduler_ids</code></strong>·-·The·scheduler·ids·whose·allocator·instances·will·be
493 searched.·A·scheduler·id·of·0·will·refer·to·the·global·instance·that·is·not493 searched.·A·scheduler·id·of·0·will·refer·to·the·global·instance·that·is·not
494 tied·to·any·particular·scheduler.·Defaults·to·all·schedulers·and·the·global494 tied·to·any·particular·scheduler.·Defaults·to·all·schedulers·and·the·global
495 instance.</p></li><li><p><strong><code·class="inline">histogram_start</code></strong>·-·The·upper·bound·of·the·first·interval·in·the·allocated495 instance.</p></li><li><p><strong><code·class="inline">histogram_start</code></strong>·-·The·upper·bound·of·the·first·interval·in·the·allocated
496 block·size·histograms.·Defaults·to·128.</p></li><li><p><strong><code·class="inline">histogram_width</code></strong>·-·The·number·of·intervals·in·the·allocated·block·size496 block·size·histograms.·Defaults·to·128.</p></li><li><p><strong><code·class="inline">histogram_width</code></strong>·-·The·number·of·intervals·in·the·allocated·block·size
497 histograms.·Defaults·to·18.</p></li><li><p><strong><code·class="inline">flags</code></strong>·-·Controls·how·to·group·the·output,·for·example·showing497 histograms.·Defaults·to·18.</p></li><li><p><strong><code·class="inline">flags</code></strong>·-·Controls·how·to·group·the·output,·for·example·showing
498 allocations·on·a·per-process·basis·(when·possible)·rather·than·only·a498 allocations·on·a·per-process·basis·(when·possible)·rather·than·only·a
499 NIF/driver-basis.·Defaults·to·<code·class="inline">[]</code>.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">instrument</span><span·class="p">:</span><span·class="nf">allocations</span><span·class="p"·data-group-id="7996605896-1">(</span><span·class="p"·data-group-id="7996605896-2">#{</span><span·class="w">·</span><span·class="ss">histogram_start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">128</span><span·class="p[·...·truncated·by·diffoscope;·len:·293,·SHA:·6f8109762b60d8e0159b08663363ce134115c50117016be52484356a39062b2f·...·]-1">)</span><span·class="p">.</span><span·class="w">499 NIF/driver-basis.·Defaults·to·<code·class="inline">[]</code>.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">instrument</span><span·class="p">:</span><span·class="nf">allocations</span><span·class="p"·data-group-id="9131400290-1">(</span><span·class="p"·data-group-id="9131400290-2">#{</span><span·class="w">·</span><span·class="ss">histogram_start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">128</span><span·class="p[·...·truncated·by·diffoscope;·len:·293,·SHA:·c291bcc67781d518edb29e0f4f87d1c0339cb783188651d70133649448ddfdb6·...·]-1">)</span><span·class="p">.</span><span·class="w">
500 </span><span·class="p"·data-group-id="7996605896-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7996605896-4">{</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">500 </span><span·class="p"·data-group-id="9131400290-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9131400290-4">{</span><span·class="mi">128</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
501 ·····</span><span·class="p"·data-group-id="7996605896-5">#{</span><span·class="ss">udp_inet</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">501 ·····</span><span·class="p"·data-group-id="9131400290-5">#{</span><span·class="ss">udp_inet</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
502 ···········</span><span·class="p"·data-group-id="7996605896-6">#{</span><span·class="ss">driver_event_state</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-7">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·743,·SHA:·57e013f2f1220a6ccfa57b9c9a3f739c6f50f84e81e133813f89314eb9f60597·...·]-6">}</span><span·class="p">,</span><span·class="w">502 ···········</span><span·class="p"·data-group-id="9131400290-6">#{</span><span·class="ss">driver_event_state</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-7">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·743,·SHA:·bbd251e438d9bd212acc41e6a5af5f071496f6e30611935025bc7d087cbe66de·...·]-6">}</span><span·class="p">,</span><span·class="w">
503 ·······</span><span·class="ss">system</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">503 ·······</span><span·class="ss">system</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
504 ···········</span><span·class="p"·data-group-id="7996605896-8">#{</span><span·class="ss">heap</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-9">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><s[·...·truncated·by·diffoscope;·len:·677,·SHA:·0b9baadf9db2a967a976ad3f8e4a6b1e242e6784dc0ed6f792cfc5e101486e90·...·]-9">}</span><span·class="p">,</span><span·class="w">504 ···········</span><span·class="p"·data-group-id="9131400290-8">#{</span><span·class="ss">heap</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-9">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><s[·...·truncated·by·diffoscope;·len:·677,·SHA:·35038c6771588c7e27f782fc4859d116cb272d4a8be5a4ab5f33f3f856f0da01·...·]-9">}</span><span·class="p">,</span><span·class="w">
505 ·············</span><span·class="ss">db_term</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-10">{</span><span·class="mi">271</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">52</span><span·class="p">,</span><span·class="mi">80</span><span·cl[·...·truncated·by·diffoscope;·len:·523,·SHA:·d43a5211acd93df40c8f2508662cd2afcd157964147e54220f491274689f936f·...·]-10">}</span><span·class="p">,</span><span·class="w">505 ·············</span><span·class="ss">db_term</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-10">{</span><span·class="mi">271</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">52</span><span·class="p">,</span><span·class="mi">80</span><span·cl[·...·truncated·by·diffoscope;·len:·523,·SHA:·5e919c897a851231971e318613576f22f4ed113f80a06c9c29d4fcf63c26151a·...·]-10">}</span><span·class="p">,</span><span·class="w">
506 ·············</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-11">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">3</span><span·class=[·...·truncated·by·diffoscope;·len:·524,·SHA:·7ce3fd319debb218bac7d255cdc3545c742129da34f1509dfeb440a5a249531b·...·]-11">}</span><span·class="p">,</span><span·class="w">506 ·············</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-11">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">3</span><span·class=[·...·truncated·by·diffoscope;·len:·524,·SHA:·9f21b0ed0068b5b864f556fb3fa1d13af98e04e63bc35a9cfc2cf7c22f699c35·...·]-11">}</span><span·class="p">,</span><span·class="w">
507 ·············</span><span·class="ss">binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-12">{</span><span·class="mi">18</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">7</span><span·class[·...·truncated·by·diffoscope;·len:·520,·SHA:·28fe69cbb014752958794ce5cb7288cc1ed41b0c9a507b1ff90001ba209f0e6a·...·]-12">}</span><span·class="p">,</span><span·class="w">507 ·············</span><span·class="ss">binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-12">{</span><span·class="mi">18</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">7</span><span·class[·...·truncated·by·diffoscope;·len:·520,·SHA:·a8f9c8c7ec8cb3bc759091d3f6c09f308230d456957cd47af9c8e88e16692786·...·]-12">}</span><span·class="p">,</span><span·class="w">
508 ·············</span><span·class="ss">message</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-13">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">40</span><span·class="p">,</span><span·class="mi">78</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">2</span><span·clas[·...·truncated·by·diffoscope;·len:·521,·SHA:·27aa1246f9c5643db00db16b9fb00bff8c6fc23acbf37a5673f4f20544026ce1·...·]-13">}</span><span·class="p">,</span><span·class="w">508 ·············</span><span·class="ss">message</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-13">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">40</span><span·class="p">,</span><span·class="mi">78</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">2</span><span·clas[·...·truncated·by·diffoscope;·len:·521,·SHA:·511fdef92c688dc025bfe2e13452be67b73025153cdefc4a0c6efcc4e56bd75c·...·]-13">}</span><span·class="p">,</span><span·class="w">
509 ·············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-8">}</span><span·class="w">509 ·············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-8">}</span><span·class="w">
510 ·······</span><span·class="ss">spawn_forker</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">510 ·······</span><span·class="ss">spawn_forker</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
511 ···········</span><span·class="p"·data-group-id="7996605896-14">#{</span><span·class="ss">driver_select_data_state</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">511 ···········</span><span·class="p"·data-group-id="9131400290-14">#{</span><span·class="ss">driver_select_data_state</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
512 ·················</span><span·class="p"·data-group-id="7996605896-15">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·573,·SHA:·b904383eb9d9228a2787d3ae45fffb82a770840ef94abf08c244e9fb18b183b9·...·]-14">}</span><span·class="p">,</span><span·class="w">512 ·················</span><span·class="p"·data-group-id="9131400290-15">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·573,·SHA:·ae0f1fe9a893f84bbc6f2a8cea000a21e1199faaf9a666f7ee22d9e1e3bde75f·...·]-14">}</span><span·class="p">,</span><span·class="w">
513 ·······</span><span·class="ss">ram_file_drv</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-16">#{</span><span·class="ss">drv_binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-17">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0<[·...·truncated·by·diffoscope;·len:·738,·SHA:·fa2915d314979fb188bd731393c4673716a6f23da8a1440df6f0733953aa03d1·...·]-16">}</span><span·class="p">,</span><span·class="w">513 ·······</span><span·class="ss">ram_file_drv</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-16">#{</span><span·class="ss">drv_binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-17">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0<[·...·truncated·by·diffoscope;·len:·738,·SHA:·b52212ebad5fd1c6b4bd4e76867714e664cbe9003c75a6fe828f127d0391c979·...·]-16">}</span><span·class="p">,</span><span·class="w">
514 ·······</span><span·class="ss">prim_file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">514 ·······</span><span·class="ss">prim_file</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
515 ···········</span><span·class="p"·data-group-id="7996605896-18">#{</span><span·class="ss">process_specific_data</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-19">{</span><span·class="mi">2</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·695,·SHA:·f1d1d302bded232636d23a89abbefb3ce53357370bdd0995fbb398d5b2ebd6f7·...·]-19">}</span><span·class="p">,</span><span·class="w">515 ···········</span><span·class="p"·data-group-id="9131400290-18">#{</span><span·class="ss">process_specific_data</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-19">{</span><span·class="mi">2</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·695,·SHA:·43c2e563bfbc701633a9d9dc8fbaa2d324e851f296ae6fddb14072fdbe58173c·...·]-19">}</span><span·class="p">,</span><span·class="w">
516 ·············</span><span·class="ss">nif_trap_export_entry</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-20">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·519,·SHA:·800d00c1d4fae0ef5ded88f34e68894c7c2d207060686aa85a3d2e15ac810b85·...·]-20">}</span><span·class="p">,</span><span·class="w">516 ·············</span><span·class="ss">nif_trap_export_entry</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-20">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·519,·SHA:·f7b3d6dff35d5c694c4fb1f8c21ec7ceb1e4c0a6858ed59b114e87522fc0b24d·...·]-20">}</span><span·class="p">,</span><span·class="w">
517 ·············</span><span·class="ss">monitor_extended</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-21">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·519,·SHA:·800d00c1d4fae0ef5ded88f34e68894c7c2d207060686aa85a3d2e15ac810b85·...·]-21">}</span><span·class="p">,</span><span·class="w">517 ·············</span><span·class="ss">monitor_extended</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-21">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·519,·SHA:·f7b3d6dff35d5c694c4fb1f8c21ec7ceb1e4c0a6858ed59b114e87522fc0b24d·...·]-21">}</span><span·class="p">,</span><span·class="w">
518 ·············</span><span·class="ss">drv_binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-22">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·519,·SHA:·e6bd5357d780b9622fa215c6de9353bd0d6c825987555c9fa955697214cdbfb3·...·]-22">}</span><span·class="p">,</span><span·class="w">518 ·············</span><span·class="ss">drv_binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-22">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·519,·SHA:·ea20c75cd4260d3632786174d390486c8de8f61977b279e724e3aa35a5cf5511·...·]-22">}</span><span·class="p">,</span><span·class="w">
519 ·············</span><span·class="ss">binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-23">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·573,·SHA:·64e64df510048b9ab46a402974dd55e479614679183d6b9f101443a4861a52c2·...·]-18">}</span><span·class="p">,</span><span·class="w">519 ·············</span><span·class="ss">binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-23">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·573,·SHA:·d95e68acdca8437298634718b7fb43a79aeaf9aa64e340636b228c1b99ba15c3·...·]-18">}</span><span·class="p">,</span><span·class="w">
520 ·······</span><span·class="ss">prim_buffer</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">520 ·······</span><span·class="ss">prim_buffer</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
521 ···········</span><span·class="p"·data-group-id="7996605896-24">#{</span><span·class="ss">nif_internal</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-25">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">[·...·truncated·by·diffoscope;·len:·686,·SHA:·21c0524c78e6f0f7e42ddcd3aefdb688d6e56b300c38e0f618c5e1c49f258f6b·...·]-25">}</span><span·class="p">,</span><span·class="w">521 ···········</span><span·class="p"·data-group-id="9131400290-24">#{</span><span·class="ss">nif_internal</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-25">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">[·...·truncated·by·diffoscope;·len:·686,·SHA:·ce1b449cd3ce3212b02c4f6140e26010666e493b7360fbc9c5ddcdc4178cfa6a·...·]-25">}</span><span·class="p">,</span><span·class="w">
522 ·············</span><span·class="ss">binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7996605896-26">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·733,·SHA:·dc36ba1a431ecb819d0ded6961ea236e33e699ddd7a1fd9c39490662dc719176·...·]-3">}</span></code></pre>522 ·············</span><span·class="ss">binary</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9131400290-26">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class=[·...·truncated·by·diffoscope;·len:·733,·SHA:·d276a6500928fb83867a4728d3fb0c440d38970eab6e9863d4e0829cb8d7ad8c·...·]-3">}</span></code></pre>
523 ··</section>523 ··</section>
524 </section>524 </section>
525 <section·class="detail"·id="carriers/0">525 <section·class="detail"·id="carriers/0">
  
526 ··<div·class="detail-header">526 ··<div·class="detail-header">
527 ····<a·href="#carriers/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">527 ····<a·href="#carriers/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
528 ······<i·class="ri-link-m"·aria-hidden="true"></i>528 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 592, 23 lines modifiedOffset 592, 23 lines modified
592 allocator·type·and·scheduler·id.</p><p>If·the·specified·allocator·types·are·not·enabled,·the·call·will·fail·with592 allocator·type·and·scheduler·id.</p><p>If·the·specified·allocator·types·are·not·enabled,·the·call·will·fail·with
593 <code·class="inline">{error,·not_enabled}</code>.</p><p>The·following·options·can·be·used:</p><ul><li><p><strong><code·class="inline">allocator_types</code></strong>·-·The·allocator·types·that·will·be·searched.·Defaults·to593 <code·class="inline">{error,·not_enabled}</code>.</p><p>The·following·options·can·be·used:</p><ul><li><p><strong><code·class="inline">allocator_types</code></strong>·-·The·allocator·types·that·will·be·searched.·Defaults·to
594 all·<code·class="inline">alloc_util</code>·allocators.</p></li><li><p><strong><code·class="inline">scheduler_ids</code></strong>·-·The·scheduler·ids·whose·allocator·instances·will·be594 all·<code·class="inline">alloc_util</code>·allocators.</p></li><li><p><strong><code·class="inline">scheduler_ids</code></strong>·-·The·scheduler·ids·whose·allocator·instances·will·be
595 searched.·A·scheduler·id·of·0·will·refer·to·the·global·instance·that·is·not595 searched.·A·scheduler·id·of·0·will·refer·to·the·global·instance·that·is·not
596 tied·to·any·particular·scheduler.·Defaults·to·all·schedulers·and·the·global596 tied·to·any·particular·scheduler.·Defaults·to·all·schedulers·and·the·global
597 instance.</p></li><li><p><strong><code·class="inline">histogram_start</code></strong>·-·The·upper·bound·of·the·first·interval·in·the·free597 instance.</p></li><li><p><strong><code·class="inline">histogram_start</code></strong>·-·The·upper·bound·of·the·first·interval·in·the·free
598 block·size·histograms.·Defaults·to·512.</p></li><li><p><strong><code·class="inline">histogram_width</code></strong>·-·The·number·of·intervals·in·the·free·block·size598 block·size·histograms.·Defaults·to·512.</p></li><li><p><strong><code·class="inline">histogram_width</code></strong>·-·The·number·of·intervals·in·the·free·block·size
599 histograms.·Defaults·to·14.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">instrument</span><span·class="p">:</span><span·class="nf">carriers</span><span·class="p"·data-group-id="0311328794-1">(</span><span·class="p"·data-group-id="0311328794-2">#{</span><span·class="w">·</span><span·class="ss">histogram_start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">512</span><span·class="p[·...·truncated·by·diffoscope;·len:·292,·SHA:·86c7c3b560e836bafb18556fb03690c95f08c72c88d9bb5d497b06920e5438d6·...·]-1">)</span><span·class="p">.</span><span·class="w">599 histograms.·Defaults·to·14.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">instrument</span><span·class="p">:</span><span·class="nf">carriers</span><span·class="p"·data-group-id="5999931690-1">(</span><span·class="p"·data-group-id="5999931690-2">#{</span><span·class="w">·</span><span·class="ss">histogram_start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">512</span><span·class="p[·...·truncated·by·diffoscope;·len:·292,·SHA:·0b08b46a8d32603a1c75b15575cf0834aa6d7b53a328f00e8a55413e50d15632·...·]-1">)</span><span·class="p">.</span><span·class="w">
600 </span><span·class="p"·data-group-id="0311328794-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0311328794-4">{</span><span·class="mi">512</span><span·class="p">,</span><span·class="w">600 </span><span·class="p"·data-group-id="5999931690-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5999931690-4">{</span><span·class="mi">512</span><span·class="p">,</span><span·class="w">
601 ·····</span><span·class="p"·data-group-id="0311328794-5">[</span><span·class="p"·data-group-id="0311328794-6">{</span><span·class="ss">driver_alloc</span><span·class="p">,</span><span·class="ss">false</span><span·class="p">,</span><span·class="mi">262144</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">601 ·····</span><span·class="p"·data-group-id="5999931690-5">[</span><span·class="p"·data-group-id="5999931690-6">{</span><span·class="ss">driver_alloc</span><span·class="p">,</span><span·class="ss">false</span><span·class="p">,</span><span·class="mi">262144</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
602 ····················</span><span·class="p"·data-group-id="0311328794-7">[</span><span·class="p"·data-group-id="0311328794-8">{</span><span·class="ss">driver_alloc</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">32784</span><span·class="p"·data-group-id="0311328794-8[·...·truncated·by·diffoscope;·len:·51,·SHA:·01199209036b4597c266e0808736d2da4deef4c71e482a29dd7f18358661dcb8·...·]-7">]</span><span·class="p">,</span><span·class="w">602 ····················</span><span·class="p"·data-group-id="5999931690-7">[</span><span·class="p"·data-group-id="5999931690-8">{</span><span·class="ss">driver_alloc</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">32784</span><span·class="p"·data-group-id="5999931690-8[·...·truncated·by·diffoscope;·len:·51,·SHA:·893178e7a16d4fe2fc63efed8a5770913da3edf266c417db5edf74c1433528ce·...·]-7">]</span><span·class="p">,</span><span·class="w">
603 ····················</span><span·class="p"·data-group-id="0311328794-9">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·228,·SHA:·82173f9120dee5949c5b1da78cadcf320d208b0030e616d8d4dd52fd94d684c1·...·]-6">}</span><span·class="p">,</span><span·class="w">603 ····················</span><span·class="p"·data-group-id="5999931690-9">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·228,·SHA:·610740ee4c5b5eb415fa4fd8344c31a06e46896e7b437f026126f45771709992·...·]-6">}</span><span·class="p">,</span><span·class="w">
604 ······</span><span·class="p"·data-group-id="0311328794-10">{</span><span·class="ss">binary_alloc</span><span·class="p">,</span><span·class="ss">false</span><span·class="p">,</span><span·class="mi">32768</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">604 ······</span><span·class="p"·data-group-id="5999931690-10">{</span><span·class="ss">binary_alloc</span><span·class="p">,</span><span·class="ss">false</span><span·class="p">,</span><span·class="mi">32768</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
605 ····················</span><span·class="p"·data-group-id="0311328794-11">[</span><span·class="p"·data-group-id="0311328794-12">{</span><span·class="ss">binary_alloc</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">4304</span><span·class="p"·data-group-id="0311328794[·...·truncated·by·diffoscope;·len:·54,·SHA:·abd797cb2c342893422ad6c88343c7e340074b8a63242003d7adbca02e16bd16·...·]-11">]</span><span·class="p">,</span><span·class="w">605 ····················</span><span·class="p"·data-group-id="5999931690-11">[</span><span·class="p"·data-group-id="5999931690-12">{</span><span·class="ss">binary_alloc</span><span·class="p">,</span><span·class="mi">15</span><span·class="p">,</span><span·class="mi">4304</span><span·class="p"·data-group-id="5999931690[·...·truncated·by·diffoscope;·len:·54,·SHA:·5154faef8bf1c8ca49095029f8f048cbfce69dcac058dd9e744c182ac6e9f576·...·]-11">]</span><span·class="p">,</span><span·class="w">
606 ····················</span><span·class="p"·data-group-id="0311328794-13">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class=[·...·truncated·by·diffoscope;·len:·230,·SHA:·6c31cff98cb43af9d886d5977c1c1fa597fa8b1954b2969f181f7f396083cd3a·...·]-10">}</span><span·class="p">,</span><span·class="w">606 ····················</span><span·class="p"·data-group-id="5999931690-13">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class=[·...·truncated·by·diffoscope;·len:·230,·SHA:·fe32c4bd623e6a9a71418d3914c929b7129bd0513e65dff040b800a71dd0c73d·...·]-10">}</span><span·class="p">,</span><span·class="w">
607 ······</span><span·class="p"·data-group-id="0311328794-14">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0311328794-14">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class[·...·truncated·by·diffoscope;·len:·136,·SHA:·9779fbda0eb110c53da455235a1ca043048ff6bc08439685944ad4953f5e1954·...·]-3">}</span></code></pre>607 ······</span><span·class="p"·data-group-id="5999931690-14">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="5999931690-14">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class[·...·truncated·by·diffoscope;·len:·136,·SHA:·5d91659b062b74131aeed9d11e449d36d8948756c55bd9e96711ecd6ed1640c4·...·]-3">}</span></code></pre>
608 ··</section>608 ··</section>
609 </section>609 </section>
  
610 ····</div>610 ····</div>
611 ··</section>611 ··</section>
  
612 ····<footer·class="footer">612 ····<footer·class="footer">
92.3 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/lttng.html
    
Offset 146, 40 lines modifiedOffset 146, 40 lines modified
146 $·make</code></pre><h2·id="dyntrace-tracepoints"·class="section-heading">146 $·make</code></pre><h2·id="dyntrace-tracepoints"·class="section-heading">
147 ··<a·href="#dyntrace-tracepoints"·class="hover-link">147 ··<a·href="#dyntrace-tracepoints"·class="hover-link">
148 ····<i·class="ri-link-m"·aria-hidden="true"></i>148 ····<i·class="ri-link-m"·aria-hidden="true"></i>
149 ··</a>149 ··</a>
150 ··<span·class="text">Dyntrace·Tracepoints</span>150 ··<span·class="text">Dyntrace·Tracepoints</span>
151 </h2>151 </h2>
152 <p>All·tracepoints·are·in·the·domain·of·<code·class="inline">org_erlang_dyntrace</code></p><p>All·Erlang·types·are·the·string·equivalent·in·LTTng.</p><p><em>process_spawn</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">parent·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">procs</code>·and152 <p>All·tracepoints·are·in·the·domain·of·<code·class="inline">org_erlang_dyntrace</code></p><p>All·Erlang·types·are·the·string·equivalent·in·LTTng.</p><p><em>process_spawn</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">parent·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">procs</code>·and
153 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">process_spawn</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9763553756-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="p"·data-group-id="9763553756-1">}</span><span·[·...·truncated·by·diffoscope;·len:·731,·SHA:·b7e93d5ca60db538f1505ff2f1b89b6707136d9799200bda9e3a8e67813a1712·...·]-2">}</span></code></pre><p><em>process_link</em></p><ul><li><code·class="inline">to·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">from·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><p><code·class="inline">type·:·string</code>·::·<code·class="inline">&quot;link&quot;·|·&quot;unlink&quot;</code></p></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">procs</code>·and153 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">process_spawn</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3468970494-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="p"·data-group-id="3468970494-1">}</span><span·[·...·truncated·by·diffoscope;·len:·731,·SHA:·17354f4d006cecb7cc3086787c5597a31325fc17256b5973634c4af3ef3f224d·...·]-2">}</span></code></pre><p><em>process_link</em></p><ul><li><code·class="inline">to·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">from·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><p><code·class="inline">type·:·string</code>·::·<code·class="inline">&quot;link&quot;·|·&quot;unlink&quot;</code></p></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">procs</code>·and
154 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">process_link:·{·cpu_id·=·3·},·{·from·=·&quot;&lt;0.130.0&gt;&quot;,·to·=·&quot;&lt;0.131.0&gt;&quot;,·type·=·&quot;link&quot;·}</code></pre><p><em>process_exit</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">reason·:·string</code>·::·Exit·reason.·Ex.·<code·class="inline">&quot;normal&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">procs</code>·and154 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">process_link:·{·cpu_id·=·3·},·{·from·=·&quot;&lt;0.130.0&gt;&quot;,·to·=·&quot;&lt;0.131.0&gt;&quot;,·type·=·&quot;link&quot;·}</code></pre><p><em>process_exit</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">reason·:·string</code>·::·Exit·reason.·Ex.·<code·class="inline">&quot;normal&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">procs</code>·and
155 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">process_exit:·{·cpu_id·=·3·},·{·pid·=·&quot;&lt;0.130.0&gt;&quot;,·reason·=·&quot;normal&quot;·}</code></pre><p><em>process_register</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">name·:·string</code>·::·Registered·name.·Ex.·<code·class="inline">&quot;logger&quot;</code></li><li><p><code·class="inline">type·:·string</code>·::·<code·class="inline">&quot;register&quot;·|·&quot;unregister&quot;</code></p></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">process_register</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2166492432-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="2166492432-1">}</span><span·[·...·truncated·by·diffoscope;·len:·703,·SHA:·ecc7dd196a10655333f99ceeb2dadf4727334bb8e3e3f09d7ca59bc073df167d·...·]-2">}</span></code></pre><p><em>process_scheduled</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">type·:·string</code>·::155 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">process_exit:·{·cpu_id·=·3·},·{·pid·=·&quot;&lt;0.130.0&gt;&quot;,·reason·=·&quot;normal&quot;·}</code></pre><p><em>process_register</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">name·:·string</code>·::·Registered·name.·Ex.·<code·class="inline">&quot;logger&quot;</code></li><li><p><code·class="inline">type·:·string</code>·::·<code·class="inline">&quot;register&quot;·|·&quot;unregister&quot;</code></p></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">process_register</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="6286520003-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="6286520003-1">}</span><span·[·...·truncated·by·diffoscope;·len:·703,·SHA:·5d134b54d110bb9b7a9b87da21865abfcd0fdadb74a1a0dfc4c9fbd3ad7b684e·...·]-2">}</span></code></pre><p><em>process_scheduled</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">type·:·string</code>·::
156 <code·class="inline">&quot;in&quot;·|·&quot;out&quot;·|·&quot;in_exiting&quot;·|·&quot;out_exiting&quot;·|·&quot;out_exited&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">running</code>·and156 <code·class="inline">&quot;in&quot;·|·&quot;out&quot;·|·&quot;in_exiting&quot;·|·&quot;out_exiting&quot;·|·&quot;out_exited&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">running</code>·and
157 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">process_scheduled</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5433407879-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="5433407879-1">}</span><span·c[·...·truncated·by·diffoscope;·len:·715,·SHA:·d517f7ec4587f611575a590bd4f31d45483805f3f8c5b5c21c43776d4c4c3f6a·...·]-2">}</span></code></pre><p><em>port_open</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">driver·:·string</code>·::·Driver·name.·Ex.·<code·class="inline">&quot;tcp_inet&quot;</code></li><li><code·class="inline">port·:·string</code>·::·Port·ID.·Ex.·<code·class="inline">&quot;#Port&lt;0.1031&gt;&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">ports</code>·and157 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">process_scheduled</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5014497551-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="5014497551-1">}</span><span·c[·...·truncated·by·diffoscope;·len:·715,·SHA:·d5ef4755a86184b2f3729de59d23649f38102ee82c6e87f546c49525011c2507·...·]-2">}</span></code></pre><p><em>port_open</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">driver·:·string</code>·::·Driver·name.·Ex.·<code·class="inline">&quot;tcp_inet&quot;</code></li><li><code·class="inline">port·:·string</code>·::·Port·ID.·Ex.·<code·class="inline">&quot;#Port&lt;0.1031&gt;&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">ports</code>·and
158 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">port_open:·{·cpu_id·=·5·},·{·pid·=·&quot;&lt;0.131.0&gt;&quot;,·driver·=·&quot;'/bin/sh·-s·unix:cmd'&quot;,·port·=·&quot;#Port&lt;0.1887&gt;&quot;·}</code></pre><p><em>port_exit</em></p><ul><li><code·class="inline">port·:·string</code>·::·Port·ID.·Ex.·<code·class="inline">&quot;#Port&lt;0.1031&gt;&quot;</code></li><li><code·class="inline">reason·:·string</code>·::·Exit·reason.·Ex.·<code·class="inline">&quot;normal&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">ports</code>·and158 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">port_open:·{·cpu_id·=·5·},·{·pid·=·&quot;&lt;0.131.0&gt;&quot;,·driver·=·&quot;'/bin/sh·-s·unix:cmd'&quot;,·port·=·&quot;#Port&lt;0.1887&gt;&quot;·}</code></pre><p><em>port_exit</em></p><ul><li><code·class="inline">port·:·string</code>·::·Port·ID.·Ex.·<code·class="inline">&quot;#Port&lt;0.1031&gt;&quot;</code></li><li><code·class="inline">reason·:·string</code>·::·Exit·reason.·Ex.·<code·class="inline">&quot;normal&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">ports</code>·and
159 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">port_exit:·{·cpu_id·=·5·},·{·port·=·&quot;#Port&lt;0.1887&gt;&quot;,·reason·=·&quot;normal&quot;·}</code></pre><p><em>port_link</em></p><ul><li><code·class="inline">to·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">from·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><p><code·class="inline">type·:·string</code>·::·<code·class="inline">&quot;link&quot;·|·&quot;unlink&quot;</code></p></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">ports</code>·and159 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">port_exit:·{·cpu_id·=·5·},·{·port·=·&quot;#Port&lt;0.1887&gt;&quot;,·reason·=·&quot;normal&quot;·}</code></pre><p><em>port_link</em></p><ul><li><code·class="inline">to·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">from·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><p><code·class="inline">type·:·string</code>·::·<code·class="inline">&quot;link&quot;·|·&quot;unlink&quot;</code></p></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">ports</code>·and
160 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">port_link</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="0294539947-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="0294539947-1">}</span><span·[·...·truncated·by·diffoscope;·len:·723,·SHA:·2e9e3c07931fe45e5723aa3e5306e05f70c85276310d703c23ab3ec088dfb36a·...·]-2">}</span></code></pre><p><em>port_scheduled</em></p><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">running</code>·and160 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">port_link</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9245468686-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="9245468686-1">}</span><span·[·...·truncated·by·diffoscope;·len:·723,·SHA:·5087d7ba7bf142361a4e374aebe3cac6f768dba3aa0bf3821298ba45f5be78c8·...·]-2">}</span></code></pre><p><em>port_scheduled</em></p><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">running</code>·and
161 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><ul><li><code·class="inline">port·:·string</code>·::·Port·ID.·Ex.·<code·class="inline">&quot;#Port&lt;0.1031&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Callback.·Ex.·<code·class="inline">&quot;open&quot;</code></li><li><code·class="inline">type·:·string</code>·::161 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><ul><li><code·class="inline">port·:·string</code>·::·Port·ID.·Ex.·<code·class="inline">&quot;#Port&lt;0.1031&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Callback.·Ex.·<code·class="inline">&quot;open&quot;</code></li><li><code·class="inline">type·:·string</code>·::
162 <code·class="inline">&quot;in&quot;·|·&quot;out&quot;·|·&quot;in_exiting&quot;·|·&quot;out_exiting&quot;·|·&quot;out_exited&quot;</code></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">port_scheduled</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="8518988968-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="8518988968-1">}</span><span·[·...·truncated·by·diffoscope;·len:·712,·SHA:·654a2b7106652e20075d7d3e2e0ae312c3b045548e5969c725e3073b2c776f93·...·]-2">}</span></code></pre><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">running</code>·and162 <code·class="inline">&quot;in&quot;·|·&quot;out&quot;·|·&quot;in_exiting&quot;·|·&quot;out_exiting&quot;·|·&quot;out_exited&quot;</code></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">port_scheduled</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5921882925-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="5921882925-1">}</span><span·[·...·truncated·by·diffoscope;·len:·712,·SHA:·b78dec425d8672bba2e9cb353a3db359a0c13cee1bd6ecc87549d4190c85b606·...·]-2">}</span></code></pre><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">running</code>·and
163 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p><em>function_call</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">depth·:·integer</code>·::·Stack·depth.·Ex.·<code·class="inline">0</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">call</code>·and163 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p><em>function_call</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">depth·:·integer</code>·::·Stack·depth.·Ex.·<code·class="inline">0</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">call</code>·and
164 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">function_call</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3786137260-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="3786137260-1">}</span><span·[·...·truncated·by·diffoscope;·len:·740,·SHA:·faa9885b4c80bca5a039049866c508b921f6b7f33e6988436a63c4721a416dcd·...·]-2">}</span></code></pre><p><em>function_return</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">depth·:·integer</code>·::·Stack·depth.·Ex.·<code·class="inline">0</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">call</code>·or·<code·class="inline">return_to</code>·and164 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">function_call</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1757119577-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="1757119577-1">}</span><span·[·...·truncated·by·diffoscope;·len:·740,·SHA:·5280a3ccf9a76041663abfb140b03ab18001afc5fcfe448e8b84002830aa4997·...·]-2">}</span></code></pre><p><em>function_return</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">depth·:·integer</code>·::·Stack·depth.·Ex.·<code·class="inline">0</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">call</code>·or·<code·class="inline">return_to</code>·and
165 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">function_return</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="0374649852-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="0374649852-1">}</span><span·[·...·truncated·by·diffoscope;·len:·720,·SHA:·e41ec4c89ab3095a319b8a4890d85f2fc6628fcfe20c9e4aee291b328a030995·...·]-2">}</span></code></pre><p><em>function_exception</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">class·:·string</code>·::·Error·reason.·Ex.·<code·class="inline">&quot;error&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">call</code>·and165 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">function_return</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5341285248-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="5341285248-1">}</span><span·[·...·truncated·by·diffoscope;·len:·720,·SHA:·fe098cd9923717aca7a6dcc6aab7bbf136e8955cb0ca7c2b06c54c957804169c·...·]-2">}</span></code></pre><p><em>function_exception</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">entry·:·string</code>·::·Code·Location.·Ex.·<code·class="inline">&quot;lists:sort/1&quot;</code></li><li><code·class="inline">class·:·string</code>·::·Error·reason.·Ex.·<code·class="inline">&quot;error&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">call</code>·and
166 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">function_exception</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3173280772-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="3173280772-1">}</span><span·[·...·truncated·by·diffoscope;·len:·718,·SHA:·89f76e7e65643a3bbb6026380cb96997f1416968ec2a7ac30d2dd1e1352dbded·...·]-2">}</span></code></pre><p><em>message_send</em></p><ul><li><code·class="inline">from·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">to·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">message·:·string</code>·::·Message·sent.·Ex.·<code·class="inline">&quot;{&lt;0.162.0&gt;,ok}&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">send</code>·and166 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">function_exception</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="1518252388-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">5</span><span·class="w">·</span><span·class="p"·data-group-id="1518252388-1">}</span><span·[·...·truncated·by·diffoscope;·len:·718,·SHA:·04d9bbae4f47ff8323baece63a0d0dee6fe91ff1312b0bfd59fce6f9b5d5e442·...·]-2">}</span></code></pre><p><em>message_send</em></p><ul><li><code·class="inline">from·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">to·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">message·:·string</code>·::·Message·sent.·Ex.·<code·class="inline">&quot;{&lt;0.162.0&gt;,ok}&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">send</code>·and
167 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">message_send:·{·cpu_id·=·3·},·{·from·=·&quot;#Port&lt;0.1938&gt;&quot;,·to·=·&quot;&lt;0.160.0&gt;&quot;,·message·=·&quot;{#Port&lt;0.1938&gt;,eof}&quot;·}</code></pre><p><em>message_receive</em></p><ul><li><code·class="inline">to·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">message·:·string</code>·::·Message·received.·Ex.·<code·class="inline">&quot;{&lt;0.162.0&gt;,ok}&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">'receive'</code>·and167 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">message_send:·{·cpu_id·=·3·},·{·from·=·&quot;#Port&lt;0.1938&gt;&quot;,·to·=·&quot;&lt;0.160.0&gt;&quot;,·message·=·&quot;{#Port&lt;0.1938&gt;,eof}&quot;·}</code></pre><p><em>message_receive</em></p><ul><li><code·class="inline">to·:·string</code>·::·Process·ID·or·Port·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">message·:·string</code>·::·Message·received.·Ex.·<code·class="inline">&quot;{&lt;0.162.0&gt;,ok}&quot;</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">'receive'</code>·and
168 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">message_receive:·{·cpu_id·=·7·},·{·to·=·&quot;&lt;0.167.0&gt;&quot;,·message·=·&quot;{&lt;0.165.0&gt;,ok}&quot;·}</code></pre><p><em>gc_minor_start</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">need·:·integer</code>·::·Heap·need.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and168 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">message_receive:·{·cpu_id·=·7·},·{·to·=·&quot;&lt;0.167.0&gt;&quot;,·message·=·&quot;{&lt;0.165.0&gt;,ok}&quot;·}</code></pre><p><em>gc_minor_start</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">need·:·integer</code>·::·Heap·need.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and
169 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gc_minor_start</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2395328071-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="2395328071-1">}</span><span·[·...·truncated·by·diffoscope;·len:·858,·SHA:·32a2454afee566263010da17a639cc100cfc58a2f7a3471409a99598f8ad36aa·...·]-2">}</span></code></pre><p><em>gc_minor_end</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">reclaimed·:·integer</code>·::·Heap·reclaimed.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and169 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gc_minor_start</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="9152466376-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="9152466376-1">}</span><span·[·...·truncated·by·diffoscope;·len:·858,·SHA:·cf0089c1be60daf193f5879f53a956d073d666c25406f57b0e22f123d2784757·...·]-2">}</span></code></pre><p><em>gc_minor_end</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">reclaimed·:·integer</code>·::·Heap·reclaimed.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and
170 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="c">gc_minor_end:·{·cpu_id·=·0·},·{·pid·=·&quot;&lt;0.172.0&gt;&quot;,·reclaimed·=·120,·heap·=·1598,·old_heap·=·1598·}</code></pre><p><em>gc_major_start</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">need·:·integer</code>·::·Heap·need.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and170 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="c">gc_minor_end:·{·cpu_id·=·0·},·{·pid·=·&quot;&lt;0.172.0&gt;&quot;,·reclaimed·=·120,·heap·=·1598,·old_heap·=·1598·}</code></pre><p><em>gc_major_start</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">need·:·integer</code>·::·Heap·need.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and
171 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gc_major_start</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2470295822-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="2470295822-1">}</span><span·[·...·truncated·by·diffoscope;·len:·862,·SHA:·486b1e9c29b00c270c9e68eb9fa4477abd7aafefe828488fcbd0b907af6c3c48·...·]-2">}</span></code></pre><p><em>gc_major_end</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">reclaimed·:·integer</code>·::·Heap·reclaimed.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and171 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">gc_major_start</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="3842651093-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="3842651093-1">}</span><span·[·...·truncated·by·diffoscope;·len:·862,·SHA:·3f2e65aabb969ea49a5b03d9128c22ccf73471870d3387f2615bdc8f0c4950fe·...·]-2">}</span></code></pre><p><em>gc_major_end</em></p><ul><li><code·class="inline">pid·:·string</code>·::·Process·ID.·Ex.·<code·class="inline">&quot;&lt;0.131.0&gt;&quot;</code></li><li><code·class="inline">reclaimed·:·integer</code>·::·Heap·reclaimed.·Ex.·<code·class="inline">2</code></li><li><code·class="inline">heap·:·integer</code>·::·Young·heap·word·size.·Ex.·<code·class="inline">233</code></li><li><code·class="inline">old_heap·:·integer</code>·::·Old·heap·word·size.·Ex.·<code·class="inline">233</code></li></ul><p>Available·through·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>·with·trace·flag·<code·class="inline">garbage_collection</code>·and
172 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">gc_major_end:·{·cpu_id·=·0·},·{·pid·=·&quot;&lt;0.172.0&gt;&quot;,·reclaimed·=·240,·heap·=·4185,·old_heap·=·0·}</code></pre><h2·id="beam-tracepoints"·class="section-heading">172 <code·class="inline">{tracer,dyntrace,[]}</code>·as·tracer·module.</p><p>Example:</p><pre><code·class="text">gc_major_end:·{·cpu_id·=·0·},·{·pid·=·&quot;&lt;0.172.0&gt;&quot;,·reclaimed·=·240,·heap·=·4185,·old_heap·=·0·}</code></pre><h2·id="beam-tracepoints"·class="section-heading">
173 ··<a·href="#beam-tracepoints"·class="hover-link">173 ··<a·href="#beam-tracepoints"·class="hover-link">
174 ····<i·class="ri-link-m"·aria-hidden="true"></i>174 ····<i·class="ri-link-m"·aria-hidden="true"></i>
175 ··</a>175 ··</a>
176 ··<span·class="text">BEAM·Tracepoints</span>176 ··<span·class="text">BEAM·Tracepoints</span>
177 </h2>177 </h2>
178 <p>All·tracepoints·are·in·the·domain·of·<code·class="inline">org_erlang_otp</code></p><p>All·Erlang·types·are·the·string·equivalent·in·LTTng.</p><p><em>driver_init</em></p><ul><li><code·class="inline">driver·:·string</code>·::·Driver·name.·Ex.·<code·class="inline">&quot;tcp_inet&quot;</code></li><li><code·class="inline">major·:·integer</code>·::·Major·version.·Ex.·<code·class="inline">3</code></li><li><code·class="inline">minor·:·integer</code>·::·Minor·version.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">flags·:·integer</code>·::·Flags.·Ex.·<code·class="inline">1</code></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">driver_init</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="2434661299-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="p"·data-group-id="2434661299-1">}</span><span·[·...·truncated·by·diffoscope;·len:·19389,·SHA:·fa50da66b39bdfe9d96869301f26e35fd4b0a7e19bb3e84fb34a1c49a65fbbe9·...·]-2">}</span></code></pre><p><em>carrier_create</em></p><ul><li><code·class="inline">type·:·string</code>·::·Carrier·type.·Ex.·<code·class="inline">&quot;ets_alloc&quot;</code></li><li><code·class="inline">instance·:·integer</code>·::·Allocator·instance.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">size·:·integer</code>·::·Carrier·size.·Ex.·<code·class="inline">262144</code></li><li><code·class="inline">mbc_carriers·:·integer</code>·::·Number·of·multiblock·carriers·in·instance.·Ex.·<code·class="inline">3</code></li><li><code·class="inline">mbc_carriers_size·:·integer</code>·::·Total·size·of·multiblock·blocks·carriers·in178 <p>All·tracepoints·are·in·the·domain·of·<code·class="inline">org_erlang_otp</code></p><p>All·Erlang·types·are·the·string·equivalent·in·LTTng.</p><p><em>driver_init</em></p><ul><li><code·class="inline">driver·:·string</code>·::·Driver·name.·Ex.·<code·class="inline">&quot;tcp_inet&quot;</code></li><li><code·class="inline">major·:·integer</code>·::·Major·version.·Ex.·<code·class="inline">3</code></li><li><code·class="inline">minor·:·integer</code>·::·Minor·version.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">flags·:·integer</code>·::·Flags.·Ex.·<code·class="inline">1</code></li></ul><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">driver_init</span><span·class="p">:</span><span·class="w">·</span><span·class="p"·data-group-id="5229147837-1">{</span><span·class="w">·</span><span·class="ss">cpu_id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">2</span><span·class="w">·</span><span·class="p"·data-group-id="5229147837-1">}</span><span·[·...·truncated·by·diffoscope;·len:·19389,·SHA:·72d0a0a226d80be2bcc15f585632fc21ba357b2d9cb226a8f0b9f7efdc5302d1·...·]-2">}</span></code></pre><p><em>carrier_create</em></p><ul><li><code·class="inline">type·:·string</code>·::·Carrier·type.·Ex.·<code·class="inline">&quot;ets_alloc&quot;</code></li><li><code·class="inline">instance·:·integer</code>·::·Allocator·instance.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">size·:·integer</code>·::·Carrier·size.·Ex.·<code·class="inline">262144</code></li><li><code·class="inline">mbc_carriers·:·integer</code>·::·Number·of·multiblock·carriers·in·instance.·Ex.·<code·class="inline">3</code></li><li><code·class="inline">mbc_carriers_size·:·integer</code>·::·Total·size·of·multiblock·blocks·carriers·in
179 instance.·Ex.·<code·class="inline">1343488</code></li><li><code·class="inline">mbc_blocks·:·integer</code>·::·Number·of·multiblock·blocks·in·instance.·Ex.·<code·class="inline">122</code></li><li><code·class="inline">mbc_blocks_size·:·integer</code>·::·Total·size·of·all·multiblock·blocks·in179 instance.·Ex.·<code·class="inline">1343488</code></li><li><code·class="inline">mbc_blocks·:·integer</code>·::·Number·of·multiblock·blocks·in·instance.·Ex.·<code·class="inline">122</code></li><li><code·class="inline">mbc_blocks_size·:·integer</code>·::·Total·size·of·all·multiblock·blocks·in
180 instance.·Ex.·<code·class="inline">285296</code></li><li><code·class="inline">sbc_carriers·:·integer</code>·::·Number·of·singleblock·carriers·in·instance.·Ex.180 instance.·Ex.·<code·class="inline">285296</code></li><li><code·class="inline">sbc_carriers·:·integer</code>·::·Number·of·singleblock·carriers·in·instance.·Ex.
181 <code·class="inline">1</code></li><li><code·class="inline">sbc_carriers_size·:·integer</code>·::·Total·size·of·singleblock·blocks·carriers·in181 <code·class="inline">1</code></li><li><code·class="inline">sbc_carriers_size·:·integer</code>·::·Total·size·of·singleblock·blocks·carriers·in
182 instance.·Ex.·<code·class="inline">1343488</code></li><li><code·class="inline">sbc_blocks·:·integer</code>·::·Number·of·singleblocks·in·instance.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">sbc_blocks_size·:·integer</code>·::·Total·size·of·all·singleblock·blocks·in182 instance.·Ex.·<code·class="inline">1343488</code></li><li><code·class="inline">sbc_blocks·:·integer</code>·::·Number·of·singleblocks·in·instance.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">sbc_blocks_size·:·integer</code>·::·Total·size·of·all·singleblock·blocks·in
183 instance.·Ex.·<code·class="inline">285296</code></li></ul><p>Example:</p><pre><code·class="c">carrier_create:·{·cpu_id·=·2·},·{·type·=·&quot;ets_alloc&quot;,·instance·=·7,·size·=·2097152,·mbc_carriers·=·4,·mbc_carriers_size·=·3440640,·mbc_blocks·=·526,·mbc_blocks_size·=·1278576,·sbc_carriers·=·0,·sbc_carriers_size·=·0,·sbc_blocks·=·0,·sbc_blocks_size·=·0·}</code></pre><p><em>carrier_destroy</em></p><ul><li><code·class="inline">type·:·string</code>·::·Carrier·type.·Ex.·<code·class="inline">&quot;ets_alloc&quot;</code></li><li><code·class="inline">instance·:·integer</code>·::·Allocator·instance.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">size·:·integer</code>·::·Carrier·size.·Ex.·<code·class="inline">262144</code></li><li><code·class="inline">mbc_carriers·:·integer</code>·::·Number·of·multiblock·carriers·in·instance.·Ex.·<code·class="inline">3</code></li><li><code·class="inline">mbc_carriers_size·:·integer</code>·::·Total·size·of·multiblock·blocks·carriers·in183 instance.·Ex.·<code·class="inline">285296</code></li></ul><p>Example:</p><pre><code·class="c">carrier_create:·{·cpu_id·=·2·},·{·type·=·&quot;ets_alloc&quot;,·instance·=·7,·size·=·2097152,·mbc_carriers·=·4,·mbc_carriers_size·=·3440640,·mbc_blocks·=·526,·mbc_blocks_size·=·1278576,·sbc_carriers·=·0,·sbc_carriers_size·=·0,·sbc_blocks·=·0,·sbc_blocks_size·=·0·}</code></pre><p><em>carrier_destroy</em></p><ul><li><code·class="inline">type·:·string</code>·::·Carrier·type.·Ex.·<code·class="inline">&quot;ets_alloc&quot;</code></li><li><code·class="inline">instance·:·integer</code>·::·Allocator·instance.·Ex.·<code·class="inline">1</code></li><li><code·class="inline">size·:·integer</code>·::·Carrier·size.·Ex.·<code·class="inline">262144</code></li><li><code·class="inline">mbc_carriers·:·integer</code>·::·Number·of·multiblock·carriers·in·instance.·Ex.·<code·class="inline">3</code></li><li><code·class="inline">mbc_carriers_size·:·integer</code>·::·Total·size·of·multiblock·blocks·carriers·in
184 instance.·Ex.·<code·class="inline">1343488</code></li><li><code·class="inline">mbc_blocks·:·integer</code>·::·Number·of·multiblock·blocks·in·instance.·Ex.·<code·class="inline">122</code></li><li><code·class="inline">mbc_blocks_size·:·integer</code>·::·Total·size·of·all·multiblock·blocks·in184 instance.·Ex.·<code·class="inline">1343488</code></li><li><code·class="inline">mbc_blocks·:·integer</code>·::·Number·of·multiblock·blocks·in·instance.·Ex.·<code·class="inline">122</code></li><li><code·class="inline">mbc_blocks_size·:·integer</code>·::·Total·size·of·all·multiblock·blocks·in
185 instance.·Ex.·<code·class="inline">285296</code></li><li><code·class="inline">sbc_carriers·:·integer</code>·::·Number·of·singleblock·carriers·in·instance.·Ex.185 instance.·Ex.·<code·class="inline">285296</code></li><li><code·class="inline">sbc_carriers·:·integer</code>·::·Number·of·singleblock·carriers·in·instance.·Ex.
Offset 194, 18 lines modifiedOffset 194, 18 lines modified
194 <p>An·example·of·process·tracing·of·<code·class="inline">os_mon</code>·and·friends.</p><p>Clean·start·of·lttng·in·a·bash·shell.</p><pre><code·class="text">$·lttng·create·erlang-demo194 <p>An·example·of·process·tracing·of·<code·class="inline">os_mon</code>·and·friends.</p><p>Clean·start·of·lttng·in·a·bash·shell.</p><pre><code·class="text">$·lttng·create·erlang-demo
195 Spawning·a·session·daemon195 Spawning·a·session·daemon
196 Session·erlang-demo·created.196 Session·erlang-demo·created.
197 Traces·will·be·written·in·/home/egil/lttng-traces/erlang-demo-20160526-165920</code></pre><p>Start·an·Erlang·node·with·lttng·enabled.</p><pre><code·class="text">$·erl197 Traces·will·be·written·in·/home/egil/lttng-traces/erlang-demo-20160526-165920</code></pre><p>Start·an·Erlang·node·with·lttng·enabled.</p><pre><code·class="text">$·erl
198 Erlang/OTP·19·[erts-8.0]·[source-4d7b24d]·[64-bit]·[smp:8:8]·[async-threads:10]·[hipe]·[kernel-poll:false]·[lttng]198 Erlang/OTP·19·[erts-8.0]·[source-4d7b24d]·[64-bit]·[smp:8:8]·[async-threads:10]·[hipe]·[kernel-poll:false]·[lttng]
  
199 Eshell·V8.0··(abort·with·^G)199 Eshell·V8.0··(abort·with·^G)
200 1&gt;</code></pre><p>Load·the·<code·class="inline">dyntrace</code>·module.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">l</span><span·class="p"·data-group-id="6155580071-1">(</span><span·class="ss">dyntrace</span><span·class="p"·data-group-id="6155580071-1">)</span><span·class="p">.</span><span·class="w">200 1&gt;</code></pre><p>Load·the·<code·class="inline">dyntrace</code>·module.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">l</span><span·class="p"·data-group-id="9821443271-1">(</span><span·class="ss">dyntrace</span><span·class="p"·data-group-id="9821443271-1">)</span><span·class="p">.</span><span·class="w">
201 </span><span·class="p"·data-group-id="6155580071-2">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">dyntrace</span><span·class="p"·data-group-id="6155580071-2">}</span></code></pre><p>All·tracepoints·via·dyntrace·are·now·visible·and·can·be·listed·through201 </span><span·class="p"·data-group-id="9821443271-2">{</span><span·class="ss">module</span><span·class="p">,</span><span·class="ss">dyntrace</span><span·class="p"·data-group-id="9821443271-2">}</span></code></pre><p>All·tracepoints·via·dyntrace·are·now·visible·and·can·be·listed·through
202 <code·class="inline">lttng·list·-u</code>.</p><p>Enable·the·process_register·LTTng·tracepoint·for·Erlang.</p><pre><code·class="text">$·lttng·enable-event·-u·org_erlang_dyntrace:process_register202 <code·class="inline">lttng·list·-u</code>.</p><p>Enable·the·process_register·LTTng·tracepoint·for·Erlang.</p><pre><code·class="text">$·lttng·enable-event·-u·org_erlang_dyntrace:process_register
203 UST·event·org_erlang_dyntrace:process_register·created·in·channel·channel0</code></pre><p>Enable·process·tracing·for·new·processes·and·use·<code·class="inline">dyntrace</code>·as·tracer·backend.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="0769174677-1">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="ss">true</span><span·class="p">,</span><span·class="p"·data-group-id="0769174677-2">[</span><span·class="ss">procs</span><span·class="p">,</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·391,·SHA:·f748b32b817735b24da9ca4062178e6861431a0c5e5c8b800f808bb7722878f2·...·]-1">)</span><span·class="p">.</span><span·class="w">203 UST·event·org_erlang_dyntrace:process_register·created·in·channel·channel0</code></pre><p>Enable·process·tracing·for·new·processes·and·use·<code·class="inline">dyntrace</code>·as·tracer·backend.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="6949874980-1">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="ss">true</span><span·class="p">,</span><span·class="p"·data-group-id="6949874980-2">[</span><span·class="ss">procs</span><span·class="p">,</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·391,·SHA:·f66ab7a37fef9ba3aad1136ec6ced5b5b6564bb61e4e707e3c169786de07b972·...·]-1">)</span><span·class="p">.</span><span·class="w">
204 </span><span·class="mi">0</span></code></pre><p>Start·LTTng·tracing.</p><pre><code·class="text">$·lttng·start204 </span><span·class="mi">0</span></code></pre><p>Start·LTTng·tracing.</p><pre><code·class="text">$·lttng·start
205 Tracing·started·for·session·erlang-demo</code></pre><p>Start·the·<code·class="inline">os_mon</code>·application·in·Erlang.</p><pre><code·class="text">3&gt;·application:ensure_all_started(os_mon).205 Tracing·started·for·session·erlang-demo</code></pre><p>Start·the·<code·class="inline">os_mon</code>·application·in·Erlang.</p><pre><code·class="text">3&gt;·application:ensure_all_started(os_mon).
206 {ok,[sasl,os_mon]}</code></pre><p>Stop·LTTng·tracing·and·view·the·result.</p><pre><code·class="text">$·lttng·stop206 {ok,[sasl,os_mon]}</code></pre><p>Stop·LTTng·tracing·and·view·the·result.</p><pre><code·class="text">$·lttng·stop
207 Tracing·stopped·for·session·erlang-demo207 Tracing·stopped·for·session·erlang-demo
208 $·lttng·view208 $·lttng·view
209 [17:20:42.561168759]·(+?.?????????)·elxd1168lx9·org_erlang_dyntrace:process_register:·\209 [17:20:42.561168759]·(+?.?????????)·elxd1168lx9·org_erlang_dyntrace:process_register:·\
210 ····{·cpu_id·=·5·},·{·pid·=·&quot;&lt;0.66.0&gt;&quot;,·name·=·&quot;sasl_sup&quot;,·type·=·&quot;register&quot;·}210 ····{·cpu_id·=·5·},·{·pid·=·&quot;&lt;0.66.0&gt;&quot;,·name·=·&quot;sasl_sup&quot;,·type·=·&quot;register&quot;·}
13.0 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/msacc.html
    
Offset 127, 29 lines modifiedOffset 127, 29 lines modified
127 ··</h1>127 ··</h1>
  
  
128 ····<section·id="moduledoc">128 ····<section·id="moduledoc">
129 <p>Convenience·functions·for·microstate·accounting</p><p>This·module·implements·some·convenience·functions·for·analyzing·microstate129 <p>Convenience·functions·for·microstate·accounting</p><p>This·module·implements·some·convenience·functions·for·analyzing·microstate
130 accounting·data.·For·details·about·how·to·use·the·basic·API·and·what·the130 accounting·data.·For·details·about·how·to·use·the·basic·API·and·what·the
131 different·states·represent,·see131 different·states·represent,·see
132 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#statistics_microstate_accounting"><code·class="inline">erlang:statistics(microstate_accounting)</code></a>.</p><p><a·href=""·id="msacc_print_example"></a></p><p><em>Basic·Scenario</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9898095175-1">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="9898095175-1">)</span><span·class="p">.</span><span·class="w">132 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#statistics_microstate_accounting"><code·class="inline">erlang:statistics(microstate_accounting)</code></a>.</p><p><a·href=""·id="msacc_print_example"></a></p><p><em>Basic·Scenario</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="0431703911-1">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="0431703911-1">)</span><span·class="p">.</span><span·class="w">
133 </span><span·class="ss">ok</span><span·class="gp·unselectable">133 </span><span·class="ss">ok</span><span·class="gp·unselectable">
134 2&gt;·</span><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="9898095175-2">(</span><span·class="p"·data-group-id="9898095175-2">)</span><span·class="p">.</span><span·class="w">134 2&gt;·</span><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="0431703911-2">(</span><span·class="p"·data-group-id="0431703911-2">)</span><span·class="p">.</span><span·class="w">
135 </span><span·class="n">Average</span><span·class="w">·</span><span·class="ss">thread</span><span·class="w">·</span><span·class="ss">real</span><span·class="o">-</span><span·class="ss">time</span><span·class="w">····</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">1000513</span><span·class="w">·</span><span·class="ss">us</span><span·class="w">135 </span><span·class="n">Average</span><span·class="w">·</span><span·class="ss">thread</span><span·class="w">·</span><span·class="ss">real</span><span·class="o">-</span><span·class="ss">time</span><span·class="w">····</span><span·class="p">:</span><span·class="w">·</span><span·class="mi">1000513</span><span·class="w">·</span><span·class="ss">us</span><span·class="w">
136 </span><span·class="n">Accumulated</span><span·class="w">·</span><span·class="ss">system</span><span·class="w">·</span><span·class="ss">run</span><span·class="o">-</span><span·class="ss">time</span><span·class="w">·</span><span·class="p">:</span><span·class="w">····</span><span·class="mi">2213</span><span·class="w">·</span><span·class="ss">us</span><span·class="w">136 </span><span·class="n">Accumulated</span><span·class="w">·</span><span·class="ss">system</span><span·class="w">·</span><span·class="ss">run</span><span·class="o">-</span><span·class="ss">time</span><span·class="w">·</span><span·class="p">:</span><span·class="w">····</span><span·class="mi">2213</span><span·class="w">·</span><span·class="ss">us</span><span·class="w">
137 </span><span·class="n">Average</span><span·class="w">·</span><span·class="ss">scheduler</span><span·class="w">·</span><span·class="ss">run</span><span·class="o">-</span><span·class="ss">time</span><span·class="w">··</span><span·class="p">:</span><span·class="w">····</span><span·class="mi">1076</span><span·class="w">·</span><span·class="ss">us</span><span·class="w">137 </span><span·class="n">Average</span><span·class="w">·</span><span·class="ss">scheduler</span><span·class="w">·</span><span·class="ss">run</span><span·class="o">-</span><span·class="ss">time</span><span·class="w">··</span><span·class="p">:</span><span·class="w">····</span><span·class="mi">1076</span><span·class="w">·</span><span·class="ss">us</span><span·class="w">
  
138 ········</span><span·class="n">Thread</span><span·class="w">······</span><span·class="ss">aux</span><span·class="w">·</span><span·class="ss">check_io</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·······</span><span·class="ss">gc</span><span·class="w">····</span><span·class="ss">other</span><span·class="w">·····</span><span·class="ss">port</span><span·class="w">····</span><span·class="ss">sleep</span><span·class="w">138 ········</span><span·class="n">Thread</span><span·class="w">······</span><span·class="ss">aux</span><span·class="w">·</span><span·class="ss">check_io</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·······</span><span·class="ss">gc</span><span·class="w">····</span><span·class="ss">other</span><span·class="w">·····</span><span·class="ss">port</span><span·class="w">····</span><span·class="ss">sleep</span><span·class="w">
  
139 </span><span·class="n">Stats</span><span·class="w">·</span><span·class="ss">per</span><span·class="w">·</span><span·class="nc">thread</span><span·class="p">:</span><span·class="w">139 </span><span·class="n">Stats</span><span·class="w">·</span><span·class="ss">per</span><span·class="w">·</span><span·class="nc">thread</span><span·class="p">:</span><span·class="w">
140 ·····</span><span·class="nf">async</span><span·class="p"·data-group-id="9898095175-3">(</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="9898095175-3">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%··100.00%</span><span·class="w">140 ·····</span><span·class="nf">async</span><span·class="p"·data-group-id="0431703911-3">(</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="0431703911-3">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%··100.00%</span><span·class="w">
141 ·····</span><span·class="nf">async</span><span·class="p"·data-group-id="9898095175-4">(</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9898095175-4">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%··100.00%</span><span·class="w">141 ·····</span><span·class="nf">async</span><span·class="p"·data-group-id="0431703911-4">(</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0431703911-4">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%··100.00%</span><span·class="w">
142 ·······</span><span·class="nf">aux</span><span·class="p"·data-group-id="9898095175-5">(</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9898095175-5">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%···99.99%</span><span·class="w">142 ·······</span><span·class="nf">aux</span><span·class="p"·data-group-id="0431703911-5">(</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0431703911-5">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%···99.99%</span><span·class="w">
143 ·</span><span·class="nf">scheduler</span><span·class="p"·data-group-id="9898095175-6">(</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9898095175-6">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.03%····0.13%····0.00%····0.01%····0.00%···99.82%</span><span·class="w">143 ·</span><span·class="nf">scheduler</span><span·class="p"·data-group-id="0431703911-6">(</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0431703911-6">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.03%····0.13%····0.00%····0.01%····0.00%···99.82%</span><span·class="w">
144 ·</span><span·class="nf">scheduler</span><span·class="p"·data-group-id="9898095175-7">(</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="9898095175-7">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.03%····0.00%···99.97%</span><span·class="w">144 ·</span><span·class="nf">scheduler</span><span·class="p"·data-group-id="0431703911-7">(</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="0431703911-7">)</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.03%····0.00%···99.97%</span><span·class="w">
  
145 </span><span·class="n">Stats</span><span·class="w">·</span><span·class="ss">per</span><span·class="w">·</span><span·class="nc">type</span><span·class="p">:</span><span·class="w">145 </span><span·class="n">Stats</span><span·class="w">·</span><span·class="ss">per</span><span·class="w">·</span><span·class="nc">type</span><span·class="p">:</span><span·class="w">
146 ·········</span><span·class="ss">async</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%··100.00%</span><span·class="w">146 ·········</span><span·class="ss">async</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%··100.00%</span><span·class="w">
147 ···········</span><span·class="ss">aux</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%···99.99%</span><span·class="w">147 ···········</span><span·class="ss">aux</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.00%····0.00%····0.00%····0.00%····0.00%···99.99%</span><span·class="w">
148 ·····</span><span·class="ss">scheduler</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.02%····0.06%····0.00%····0.02%····0.00%···99.89%</span><span·class="w">148 ·····</span><span·class="ss">scheduler</span><span·class="w">····</span><span·class="mf">0.00</span><span·class="c1">%····0.02%····0.06%····0.00%····0.02%····0.00%···99.89%</span><span·class="w">
149 </span><span·class="ss">ok</span></code></pre><p>This·first·command·enables·microstate·accounting·for·1000·milliseconds.·See149 </span><span·class="ss">ok</span></code></pre><p>This·first·command·enables·microstate·accounting·for·1000·milliseconds.·See
150 <a·href="#start/0"><code·class="inline">start/0</code></a>,·<a·href="#stop/0"><code·class="inline">stop/0</code></a>,·<a·href="#reset/0"><code·class="inline">reset/0</code></a>,·and·<a·href="#start/1"><code·class="inline">start/1</code></a>·for·more·details.·The·second150 <a·href="#start/0"><code·class="inline">start/0</code></a>,·<a·href="#stop/0"><code·class="inline">stop/0</code></a>,·<a·href="#reset/0"><code·class="inline">reset/0</code></a>,·and·<a·href="#start/1"><code·class="inline">start/1</code></a>·for·more·details.·The·second
Offset 941, 15 lines modifiedOffset 941, 15 lines modified
  
941 ······</div>941 ······</div>
  
942 <p>Print·the·given·microstate·statistics·values·to·standard·out.·With·many·states942 <p>Print·the·given·microstate·statistics·values·to·standard·out.·With·many·states
943 this·can·be·verbose.·See·the·top·of·this·reference·manual·for·a·brief943 this·can·be·verbose.·See·the·top·of·this·reference·manual·for·a·brief
944 description·of·what·the·fields·mean.</p><p>It·is·possible·to·print·more·specific·types·of·statistics·by·first·manipulating944 description·of·what·the·fields·mean.</p><p>It·is·possible·to·print·more·specific·types·of·statistics·by·first·manipulating
945 the·<code·class="inline">DataOrStats</code>·using·<a·href="#stats/2"><code·class="inline">stats/2</code></a>.·For·instance·if·you·want·to·print·the945 the·<code·class="inline">DataOrStats</code>·using·<a·href="#stats/2"><code·class="inline">stats/2</code></a>.·For·instance·if·you·want·to·print·the
946 percentage·of·run-time·for·each·thread·you·can·do:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="0335224687-1">(</span><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">stats</span><span·class="p"·data-group-id="0335224687-2">(</span><span·class="ss">runtime</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">msa[·...·truncated·by·diffoscope;·len:·1322,·SHA:·f66d87e789f3b1abb834d05333f0b3e765ebbeaecad20d0d9ea428136bee95f1·...·]6-1">)</span><span·class="p">.</span></code></pre><p><em>Options</em></p><ul><li><strong><code·class="inline">system</code></strong>·-·Print·percentage·of·time·spent·in·each·state·out·of·system·time946 percentage·of·run-time·for·each·thread·you·can·do:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">print</span><span·class="p"·data-group-id="7515350330-1">(</span><span·class="nc">msacc</span><span·class="p">:</span><span·class="nf">stats</span><span·class="p"·data-group-id="7515350330-2">(</span><span·class="ss">runtime</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">msa[·...·truncated·by·diffoscope;·len:·1322,·SHA:·fd7da9bca1c92cdc7396559ad4ded6dae6e35804ae24ce433f34ac697266c0d3·...·]6-1">)</span><span·class="p">.</span></code></pre><p><em>Options</em></p><ul><li><strong><code·class="inline">system</code></strong>·-·Print·percentage·of·time·spent·in·each·state·out·of·system·time
947 as·well·as·thread·time.·Default:·false.</li></ul>947 as·well·as·thread·time.·Default:·false.</li></ul>
948 ··</section>948 ··</section>
949 </section>949 </section>
950 <section·class="detail"·id="print/3">950 <section·class="detail"·id="print/3">
  
951 ··<div·class="detail-header">951 ··<div·class="detail-header">
952 ····<a·href="#print/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">952 ····<a·href="#print/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
442 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/runtime_tools.epub
3.27 KB
zipinfo {}
    
Offset 1, 22 lines modifiedOffset 1, 22 lines modified
1 Zip·file·size:·119430·bytes,·number·of·entries:·201 Zip·file·size:·119421·bytes,·number·of·entries:·20
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:18·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:57·mimetype
3 ?rw-r--r--··2.0·unx······726·b-·defN·24-Oct-11·20:18·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······726·b-·defN·24-Oct-11·20:57·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx·····4128·b-·defN·24-Oct-11·20:18·OEBPS/systemtap.xhtml4 ?rw-r--r--··2.0·unx·····4128·b-·defN·24-Oct-11·20:57·OEBPS/systemtap.xhtml
5 ?rw-r--r--··2.0·unx·····7225·b-·defN·24-Oct-11·20:18·OEBPS/system_information.xhtml5 ?rw-r--r--··2.0·unx·····7225·b-·defN·24-Oct-11·20:57·OEBPS/system_information.xhtml
6 ?rw-r--r--··2.0·unx····23919·b-·defN·24-Oct-11·20:18·OEBPS/scheduler.xhtml6 ?rw-r--r--··2.0·unx····23919·b-·defN·24-Oct-11·20:57·OEBPS/scheduler.xhtml
7 ?rw-r--r--··2.0·unx·····1492·b-·defN·24-Oct-11·20:18·OEBPS/runtime_tools_app.xhtml7 ?rw-r--r--··2.0·unx·····1492·b-·defN·24-Oct-11·20:57·OEBPS/runtime_tools_app.xhtml
8 ?rw-r--r--··2.0·unx····71901·b-·defN·24-Oct-11·20:18·OEBPS/notes.xhtml8 ?rw-r--r--··2.0·unx····71901·b-·defN·24-Oct-11·20:57·OEBPS/notes.xhtml
9 ?rw-r--r--··2.0·unx·····1588·b-·defN·24-Oct-11·20:18·OEBPS/nav.xhtml9 ?rw-r--r--··2.0·unx·····1588·b-·defN·24-Oct-11·20:57·OEBPS/nav.xhtml
10 ?rw-r--r--··2.0·unx····46179·b-·defN·24-Oct-11·20:18·OEBPS/msacc.xhtml10 ?rw-r--r--··2.0·unx····46179·b-·defN·24-Oct-11·20:57·OEBPS/msacc.xhtml
11 ?rw-r--r--··2.0·unx····58687·b-·defN·24-Oct-11·20:18·OEBPS/lttng.xhtml11 ?rw-r--r--··2.0·unx····58687·b-·defN·24-Oct-11·20:57·OEBPS/lttng.xhtml
12 ?rw-r--r--··2.0·unx····45571·b-·defN·24-Oct-11·20:18·OEBPS/instrument.xhtml12 ?rw-r--r--··2.0·unx····45571·b-·defN·24-Oct-11·20:57·OEBPS/instrument.xhtml
13 ?rw-r--r--··2.0·unx····43200·b-·defN·24-Oct-11·20:18·OEBPS/dyntrace.xhtml13 ?rw-r--r--··2.0·unx····43200·b-·defN·24-Oct-11·20:57·OEBPS/dyntrace.xhtml
14 ?rw-r--r--··2.0·unx·····3687·b-·defN·24-Oct-11·20:18·OEBPS/dtrace.xhtml14 ?rw-r--r--··2.0·unx·····3687·b-·defN·24-Oct-11·20:57·OEBPS/dtrace.xhtml
15 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-erlang-2EWSTWER.css15 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-erlang-2EWSTWER.css
16 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:18·OEBPS/dist/epub-CB7BJMUW.js16 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:57·OEBPS/dist/epub-CB7BJMUW.js
17 ?rw-r--r--··2.0·unx···250840·b-·defN·24-Oct-11·20:18·OEBPS/dbg.xhtml17 ?rw-r--r--··2.0·unx···250840·b-·defN·24-Oct-11·20:57·OEBPS/dbg.xhtml
18 ?rw-r--r--··2.0·unx·····2670·b-·defN·24-Oct-11·20:18·OEBPS/content.opf18 ?rw-r--r--··2.0·unx·····2670·b-·defN·24-Oct-11·20:57·OEBPS/content.opf
19 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:18·OEBPS/assets/logo.png19 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:57·OEBPS/assets/logo.png
20 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:18·META-INF/container.xml20 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:57·META-INF/container.xml
21 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:18·META-INF/com.apple.ibooks.display-options.xml21 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:57·META-INF/com.apple.ibooks.display-options.xml
22 20·files,·584981·bytes·uncompressed,·117020·bytes·compressed:··80.0%22 20·files,·584981·bytes·uncompressed,·117011·bytes·compressed:··80.0%
53.7 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
2.49 KB
OEBPS/scheduler.xhtml
    
Offset 488, 15 lines modifiedOffset 488, 15 lines modified
488 ······</div>488 ······</div>
  
489 <p>Measure·utilization·for·normal·and·dirty-cpu·schedulers·during·<code·class="inline">Seconds</code>489 <p>Measure·utilization·for·normal·and·dirty-cpu·schedulers·during·<code·class="inline">Seconds</code>
490 seconds,·and·then·return·the·result.</p><p>Will·automatically·first·enable·and·then·disable490 seconds,·and·then·return·the·result.</p><p>Will·automatically·first·enable·and·then·disable
491 <a·href="../../../../lib/../erts/doc/html/erlang.html#system_flag_scheduler_wall_time"><code·class="inline">scheduler_wall_time</code></a>.</p><p>Calculate·scheduler·utilizations·for·the·time·interval·from·when·<code·class="inline">Sample</code>·was491 <a·href="../../../../lib/../erts/doc/html/erlang.html#system_flag_scheduler_wall_time"><code·class="inline">scheduler_wall_time</code></a>.</p><p>Calculate·scheduler·utilizations·for·the·time·interval·from·when·<code·class="inline">Sample</code>·was
492 taken·and·&quot;now&quot;.·The·same·as·calling492 taken·and·&quot;now&quot;.·The·same·as·calling
493 <code·class="inline">scheduler:utilization(Sample,·scheduler:sample_all())</code>.</p><blockquote><h4·class="info">Note</h4><p>This·function·is·<em>not·recommended</em>·as·it's·so·easy·to·get·invalid·results493 <code·class="inline">scheduler:utilization(Sample,·scheduler:sample_all())</code>.</p><blockquote><h4·class="info">Note</h4><p>This·function·is·<em>not·recommended</em>·as·it's·so·easy·to·get·invalid·results
494 without·noticing.·In·particular·do·not·do·this:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nc">scheduler</samp><samp·class="p">:</samp><samp·class="nf">utilization</samp><samp·class="p"·data-group-id="2482035751-1">(</samp><samp·class="nc">scheduler</samp><samp·class="p">:</samp><samp·class="nf">sample</samp><samp·class="p"·data-group-id="2482035751-2">(</samp><samp·class="p"·data-group-id="2482035751-2">)</samp><samp·class="p"·data-group-id="2482035751-1">)</samp><samp·class="p">.</samp><samp·class="w">·</samp><samp·class="c1">%·DO·NOT·DO·THIS!</samp></code></pre><p>The·above·example·takes·two·samples·in·rapid·succession·and·calculates·the494 without·noticing.·In·particular·do·not·do·this:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nc">scheduler</samp><samp·class="p">:</samp><samp·class="nf">utilization</samp><samp·class="p"·data-group-id="4983090456-1">(</samp><samp·class="nc">scheduler</samp><samp·class="p">:</samp><samp·class="nf">sample</samp><samp·class="p"·data-group-id="4983090456-2">(</samp><samp·class="p"·data-group-id="4983090456-2">)</samp><samp·class="p"·data-group-id="4983090456-1">)</samp><samp·class="p">.</samp><samp·class="w">·</samp><samp·class="c1">%·DO·NOT·DO·THIS!</samp></code></pre><p>The·above·example·takes·two·samples·in·rapid·succession·and·calculates·the
495 scheduler·utilization·between·them.·The·resulting·values·will·probably·be·more495 scheduler·utilization·between·them.·The·resulting·values·will·probably·be·more
496 misleading·than·informative.</p><p>Instead·use·<a·href="#utilization/2"><code·class="inline">scheduler:utilization/2</code></a>·and·call496 misleading·than·informative.</p><p>Instead·use·<a·href="#utilization/2"><code·class="inline">scheduler:utilization/2</code></a>·and·call
497 <a·href="#get_sample/0"><code·class="inline">get_sample/0</code></a>·to·get·samples·with·some·time·in·between.</p></blockquote>497 <a·href="#get_sample/0"><code·class="inline">get_sample/0</code></a>·to·get·samples·with·some·time·in·between.</p></blockquote>
498 ··</section>498 ··</section>
499 </section>499 </section>
500 <section·class="detail"·id="utilization/2">500 <section·class="detail"·id="utilization/2">
  
12.9 KB
OEBPS/msacc.xhtml
Max HTML report size reached
92.2 KB
OEBPS/lttng.xhtml
Max HTML report size reached
50.5 KB
OEBPS/instrument.xhtml
Max HTML report size reached
11.3 KB
OEBPS/dyntrace.xhtml
Max HTML report size reached
214 KB
OEBPS/dbg.xhtml
Max HTML report size reached
1.24 KB
OEBPS/content.opf
1.21 KB
OEBPS/content.opf
Max HTML report size reached
2.6 KB
./usr/share/doc/erlang-doc/html/lib/runtime_tools-2.1/doc/html/scheduler.html
    
Offset 609, 15 lines modifiedOffset 609, 15 lines modified
609 ······</div>609 ······</div>
  
610 <p>Measure·utilization·for·normal·and·dirty-cpu·schedulers·during·<code·class="inline">Seconds</code>610 <p>Measure·utilization·for·normal·and·dirty-cpu·schedulers·during·<code·class="inline">Seconds</code>
611 seconds,·and·then·return·the·result.</p><p>Will·automatically·first·enable·and·then·disable611 seconds,·and·then·return·the·result.</p><p>Will·automatically·first·enable·and·then·disable
612 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#system_flag_scheduler_wall_time"><code·class="inline">scheduler_wall_time</code></a>.</p><p>Calculate·scheduler·utilizations·for·the·time·interval·from·when·<code·class="inline">Sample</code>·was612 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#system_flag_scheduler_wall_time"><code·class="inline">scheduler_wall_time</code></a>.</p><p>Calculate·scheduler·utilizations·for·the·time·interval·from·when·<code·class="inline">Sample</code>·was
613 taken·and·&quot;now&quot;.·The·same·as·calling613 taken·and·&quot;now&quot;.·The·same·as·calling
614 <code·class="inline">scheduler:utilization(Sample,·scheduler:sample_all())</code>.</p><blockquote><h4·class="info">Note</h4><p>This·function·is·<em>not·recommended</em>·as·it's·so·easy·to·get·invalid·results614 <code·class="inline">scheduler:utilization(Sample,·scheduler:sample_all())</code>.</p><blockquote><h4·class="info">Note</h4><p>This·function·is·<em>not·recommended</em>·as·it's·so·easy·to·get·invalid·results
615 without·noticing.·In·particular·do·not·do·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">scheduler</span><span·class="p">:</span><span·class="nf">utilization</span><span·class="p"·data-group-id="3150663312-1">(</span><span·class="nc">scheduler</span><span·class="p">:</span><span·class="nf">sample</span><span·class="p"·data-group-id="3150663312-2">(</span><span·class="p"·data-group-id="3150663312-2">)</span><span·class="p"·data-group-id="3150663312-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·DO·NOT·DO·THIS!</span></code></pre><p>The·above·example·takes·two·samples·in·rapid·succession·and·calculates·the615 without·noticing.·In·particular·do·not·do·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">scheduler</span><span·class="p">:</span><span·class="nf">utilization</span><span·class="p"·data-group-id="7311141561-1">(</span><span·class="nc">scheduler</span><span·class="p">:</span><span·class="nf">sample</span><span·class="p"·data-group-id="7311141561-2">(</span><span·class="p"·data-group-id="7311141561-2">)</span><span·class="p"·data-group-id="7311141561-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·DO·NOT·DO·THIS!</span></code></pre><p>The·above·example·takes·two·samples·in·rapid·succession·and·calculates·the
616 scheduler·utilization·between·them.·The·resulting·values·will·probably·be·more616 scheduler·utilization·between·them.·The·resulting·values·will·probably·be·more
617 misleading·than·informative.</p><p>Instead·use·<a·href="#utilization/2"><code·class="inline">scheduler:utilization/2</code></a>·and·call617 misleading·than·informative.</p><p>Instead·use·<a·href="#utilization/2"><code·class="inline">scheduler:utilization/2</code></a>·and·call
618 <a·href="#get_sample/0"><code·class="inline">get_sample/0</code></a>·to·get·samples·with·some·time·in·between.</p></blockquote>618 <a·href="#get_sample/0"><code·class="inline">get_sample/0</code></a>·to·get·samples·with·some·time·in·between.</p></blockquote>
619 ··</section>619 ··</section>
620 </section>620 </section>
621 <section·class="detail"·id="utilization/2">621 <section·class="detail"·id="utilization/2">
  
622 B
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/.build
    
Offset 16, 15 lines modifiedOffset 16, 15 lines modified
16 dist/lato-latin-300-normal-YUMVEFOL.woff216 dist/lato-latin-300-normal-YUMVEFOL.woff2
17 dist/lato-latin-400-normal-W7754I4D.woff217 dist/lato-latin-400-normal-W7754I4D.woff2
18 dist/lato-latin-700-normal-2XVSBPG4.woff218 dist/lato-latin-700-normal-2XVSBPG4.woff2
19 dist/lato-latin-ext-300-normal-VPGGJKJL.woff219 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
20 dist/lato-latin-ext-400-normal-N27NCBWW.woff220 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
21 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff221 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
22 dist/remixicon-NKANDIL5.woff222 dist/remixicon-NKANDIL5.woff2
23 dist/search_data-95FEDC9E.js23 dist/search_data-51E6247B.js
24 dist/sidebar_items-EAF2F83F.js24 dist/sidebar_items-EAF2F83F.js
25 error_logging.html25 error_logging.html
26 index.html26 index.html
27 notes.html27 notes.html
28 rb.html28 rb.html
29 rel.html29 rel.html
30 release_handler.html30 release_handler.html
35.1 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/appup.html
    
Offset 217, 29 lines modifiedOffset 217, 29 lines modified
217 that·is,·if·a·process·using·the·module·spontaneously·switches·to·new·code,·or217 that·is,·if·a·process·using·the·module·spontaneously·switches·to·new·code,·or
218 if·it·is·&quot;static&quot;.·When·doing·an·advanced·update·and·upgrade,·the·new·version218 if·it·is·&quot;static&quot;.·When·doing·an·advanced·update·and·upgrade,·the·new·version
219 of·a·dynamic·module·is·loaded·before·the·process·is·asked·to·change·code.·When219 of·a·dynamic·module·is·loaded·before·the·process·is·asked·to·change·code.·When
220 downgrading,·the·process·is·asked·to·change·code·before·loading·the·new220 downgrading,·the·process·is·asked·to·change·code·before·loading·the·new
221 version.·For·static·modules,·the·new·version·is·loaded·before·the·process·is221 version.·For·static·modules,·the·new·version·is·loaded·before·the·process·is
222 asked·to·change·code,·both·in·the·case·of·upgrading·and·downgrading.·Callback222 asked·to·change·code,·both·in·the·case·of·upgrading·and·downgrading.·Callback
223 modules·are·dynamic.</p></li></ul><p><code·class="inline">update</code>·with·argument·<code·class="inline">supervisor</code>·is·used·when·changing·the·start223 modules·are·dynamic.</p></li></ul><p><code·class="inline">update</code>·with·argument·<code·class="inline">supervisor</code>·is·used·when·changing·the·start
224 specification·of·a·supervisor.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8387767561-1">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="8387767561-1">}</span><span·class="w">224 specification·of·a·supervisor.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0737472252-1">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="0737472252-1">}</span><span·class="w">
225 </span><span·class="p"·data-group-id="8387767561-2">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="8387767561-2">}</span><span·class="w">225 </span><span·class="p"·data-group-id="0737472252-2">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="0737472252-2">}</span><span·class="w">
226 </span><span·class="p"·data-group-id="8387767561-3">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrePurge</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·153,·SHA:·86ef312d843b4378eff1a2f38d8df69342ef07d1202c70b2838f3d660a0ecdf8·...·]-3">}</span><span·class="w">226 </span><span·class="p"·data-group-id="0737472252-3">{</span><span·class="nb">load_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">PrePurge</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·153,·SHA:·e0f5e31aadb45c94abd66c6f06a624def099e729d5066f155b91ba59b060cb31·...·]-3">}</span><span·class="w">
227 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8387767561-4">(</span><span·class="p"·data-group-id="8387767561-4">)</span><span·class="w">227 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0737472252-4">(</span><span·class="p"·data-group-id="0737472252-4">)</span><span·class="w">
228 ··</span><span·class="n">PrePurge</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PostPurge</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">soft_purge</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">brutal_purge</span><span·class="w">228 ··</span><span·class="n">PrePurge</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">PostPurge</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">soft_purge</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">brutal_purge</span><span·class="w">
229 ··</span><span·class="n">DepMods</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8387767561-5">[</span><span·class="n">Mod</span><span·class="p"·data-group-id="8387767561-5">]</span></code></pre><p>Simple·code·replacement·of·the·module·<code·class="inline">Mod</code>.</p><p>For·a·description·of·<code·class="inline">PrePurge</code>·and·<code·class="inline">PostPurge</code>,·see·<code·class="inline">update</code>·above.</p><p><code·class="inline">DepMods</code>·defaults·to·<code·class="inline">[]</code>·and·defines·which·other·modules·<code·class="inline">Mod</code>·is·dependent229 ··</span><span·class="n">DepMods</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0737472252-5">[</span><span·class="n">Mod</span><span·class="p"·data-group-id="0737472252-5">]</span></code></pre><p>Simple·code·replacement·of·the·module·<code·class="inline">Mod</code>.</p><p>For·a·description·of·<code·class="inline">PrePurge</code>·and·<code·class="inline">PostPurge</code>,·see·<code·class="inline">update</code>·above.</p><p><code·class="inline">DepMods</code>·defaults·to·<code·class="inline">[]</code>·and·defines·which·other·modules·<code·class="inline">Mod</code>·is·dependent
230 on.·In·the·<code·class="inline">relup</code>·file,·instructions·for·loading·these·modules·come·before·the230 on.·In·the·<code·class="inline">relup</code>·file,·instructions·for·loading·these·modules·come·before·the
231 instruction·for·loading·<code·class="inline">Mod</code>·when·upgrading,·and·conversely·when·downgrading.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6243533743-1">{</span><span·class="ss">add_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="6243533743-1">}</span><span·class="w">231 instruction·for·loading·<code·class="inline">Mod</code>·when·upgrading,·and·conversely·when·downgrading.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3983362935-1">{</span><span·class="ss">add_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="3983362935-1">}</span><span·class="w">
232 </span><span·class="p"·data-group-id="6243533743-2">{</span><span·class="ss">add_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="6243533743-2">}</span><span·class="w">232 </span><span·class="p"·data-group-id="3983362935-2">{</span><span·class="ss">add_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="3983362935-2">}</span><span·class="w">
233 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="6243533743-3">(</span><span·class="p"·data-group-id="6243533743-3">)</span><span·class="w">233 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="3983362935-3">(</span><span·class="p"·data-group-id="3983362935-3">)</span><span·class="w">
234 ··</span><span·class="n">DepMods</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6243533743-4">[</span><span·class="n">Mod</span><span·class="p"·data-group-id="6243533743-4">]</span></code></pre><p>Loads·a·new·module·<code·class="inline">Mod</code>.</p><p><code·class="inline">DepMods</code>·defaults·to·<code·class="inline">[]</code>·and·defines·which·other·modules·<code·class="inline">Mod</code>·is·dependent234 ··</span><span·class="n">DepMods</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3983362935-4">[</span><span·class="n">Mod</span><span·class="p"·data-group-id="3983362935-4">]</span></code></pre><p>Loads·a·new·module·<code·class="inline">Mod</code>.</p><p><code·class="inline">DepMods</code>·defaults·to·<code·class="inline">[]</code>·and·defines·which·other·modules·<code·class="inline">Mod</code>·is·dependent
235 on.·In·the·<code·class="inline">relup</code>·file,·instructions·related·to·these·modules·come·before·the235 on.·In·the·<code·class="inline">relup</code>·file,·instructions·related·to·these·modules·come·before·the
236 instruction·for·loading·<code·class="inline">Mod</code>·when·upgrading,·and·conversely·when·downgrading.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2288688483-1">{</span><span·class="nb">delete_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="2288688483-1">}</span><span·class="w">236 instruction·for·loading·<code·class="inline">Mod</code>·when·upgrading,·and·conversely·when·downgrading.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0592118730-1">{</span><span·class="nb">delete_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p"·data-group-id="0592118730-1">}</span><span·class="w">
237 </span><span·class="p"·data-group-id="2288688483-2">{</span><span·class="nb">delete_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="2288688483-2">}</span><span·class="w">237 </span><span·class="p"·data-group-id="0592118730-2">{</span><span·class="nb">delete_module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DepMods</span><span·class="p"·data-group-id="0592118730-2">}</span><span·class="w">
238 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="2288688483-3">(</span><span·class="p"·data-group-id="2288688483-3">)</span></code></pre><p>Deletes·a·module·<code·class="inline">Mod</code>·using·the·low-level·instructions·<code·class="inline">remove</code>·and·<code·class="inline">purge</code>.</p><p><code·class="inline">DepMods</code>·defaults·to·<code·class="inline">[]</code>·and·defines·which·other·modules·<code·class="inline">Mod</code>·is·dependent238 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="0592118730-3">(</span><span·class="p"·data-group-id="0592118730-3">)</span></code></pre><p>Deletes·a·module·<code·class="inline">Mod</code>·using·the·low-level·instructions·<code·class="inline">remove</code>·and·<code·class="inline">purge</code>.</p><p><code·class="inline">DepMods</code>·defaults·to·<code·class="inline">[]</code>·and·defines·which·other·modules·<code·class="inline">Mod</code>·is·dependent
239 on.·In·the·<code·class="inline">relup</code>·file,·instructions·related·to·these·modules·come·before·the239 on.·In·the·<code·class="inline">relup</code>·file,·instructions·related·to·these·modules·come·before·the
240 instruction·for·removing·<code·class="inline">Mod</code>·when·upgrading,·and·conversely·when·downgrading.</p><pre><code·class="text">{add_application,·Application}240 instruction·for·removing·<code·class="inline">Mod</code>·when·upgrading,·and·conversely·when·downgrading.</p><pre><code·class="text">{add_application,·Application}
241 {add_application,·Application,·Type}241 {add_application,·Application,·Type}
242 ··Application·=·atom()242 ··Application·=·atom()
243 ··Type·=·permanent·|·transient·|·temporary·|·load·|·none</code></pre><p>Adding·an·application·means·that·the·modules·defined·by·the·<code·class="inline">modules</code>·key·in·the243 ··Type·=·permanent·|·transient·|·temporary·|·load·|·none</code></pre><p>Adding·an·application·means·that·the·modules·defined·by·the·<code·class="inline">modules</code>·key·in·the
244 <code·class="inline">.app</code>·file·are·loaded·using·<code·class="inline">add_module</code>.</p><p><code·class="inline">Type</code>·defaults·to·<code·class="inline">permanent</code>·and·specifies·the·start·type·of·the·application.244 <code·class="inline">.app</code>·file·are·loaded·using·<code·class="inline">add_module</code>.</p><p><code·class="inline">Type</code>·defaults·to·<code·class="inline">permanent</code>·and·specifies·the·start·type·of·the·application.
245 If·<code·class="inline">Type·=·permanent·|·transient·|·temporary</code>,·the·application·is·loaded·and245 If·<code·class="inline">Type·=·permanent·|·transient·|·temporary</code>,·the·application·is·loaded·and
Offset 258, 62 lines modifiedOffset 258, 62 lines modified
258 application·is·not·loaded·and·not·started,·although·the·code·for·its·modules·is258 application·is·not·loaded·and·not·started,·although·the·code·for·its·modules·is
259 loaded.</p><h3·id="low-level-instructions"·class="section-heading">259 loaded.</p><h3·id="low-level-instructions"·class="section-heading">
260 ··<a·href="#low-level-instructions"·class="hover-link">260 ··<a·href="#low-level-instructions"·class="hover-link">
261 ····<i·class="ri-link-m"·aria-hidden="true"></i>261 ····<i·class="ri-link-m"·aria-hidden="true"></i>
262 ··</a>262 ··</a>
263 ··<span·class="text">Low-Level·Instructions</span>263 ··<span·class="text">Low-Level·Instructions</span>
264 </h3>264 </h3>
265 <pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5660510857-1">{</span><span·class="ss">load_object_code</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5660510857-2">{</span><span·class="n">App</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Vsn<[·...·truncated·by·diffoscope;·len:·280,·SHA:·e34f4a8fcfa3dece69e04903723f28af3f2285c25b2015a31815b920b8948548·...·]-1">}</span><span·class="w">265 <pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5856105424-1">{</span><span·class="ss">load_object_code</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5856105424-2">{</span><span·class="n">App</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Vsn<[·...·truncated·by·diffoscope;·len:·280,·SHA:·4b4fe40425f35ac54beb7f96be7fe5222dbc197e0442983374327d3010320306·...·]-1">}</span><span·class="w">
266 ··</span><span·class="n">App</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="5660510857-4">(</span><span·class="p"·data-group-id="5660510857-4">)</span><span·class="w">266 ··</span><span·class="n">App</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="5856105424-4">(</span><span·class="p"·data-group-id="5856105424-4">)</span><span·class="w">
267 ··</span><span·class="n">Vsn</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="5660510857-5">(</span><span·class="p"·data-group-id="5660510857-5">)</span></code></pre><p>Reads·each·<code·class="inline">Mod</code>·from·directory·<code·class="inline">App-Vsn/ebin</code>·as·a·binary.·It·does·not·load·the267 ··</span><span·class="n">Vsn</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="5856105424-5">(</span><span·class="p"·data-group-id="5856105424-5">)</span></code></pre><p>Reads·each·<code·class="inline">Mod</code>·from·directory·<code·class="inline">App-Vsn/ebin</code>·as·a·binary.·It·does·not·load·the
268 modules.·The·instruction·is·to·be·placed·first·in·the·script·to·read·all·new268 modules.·The·instruction·is·to·be·placed·first·in·the·script·to·read·all·new
269 code·from·the·file·to·make·the·suspend-load-resume·cycle·less·time-consuming.</p><pre><code·class="text">point_of_no_return</code></pre><p>If·a·crash·occurs·after·this·instruction,·the·system·cannot·recover·and·is269 code·from·the·file·to·make·the·suspend-load-resume·cycle·less·time-consuming.</p><pre><code·class="text">point_of_no_return</code></pre><p>If·a·crash·occurs·after·this·instruction,·the·system·cannot·recover·and·is
270 restarted·from·the·old·release·version.·The·instruction·must·only·occur·once·in270 restarted·from·the·old·release·version.·The·instruction·must·only·occur·once·in
271 a·script.·It·is·to·be·placed·after·all·<code·class="inline">load_object_code</code>·instructions.</p><pre><code·class="text">{load,·{Mod,·PrePurge,·PostPurge}}271 a·script.·It·is·to·be·placed·after·all·<code·class="inline">load_object_code</code>·instructions.</p><pre><code·class="text">{load,·{Mod,·PrePurge,·PostPurge}}
272 ··Mod·=·atom()272 ··Mod·=·atom()
273 ··PrePurge·=·PostPurge·=·soft_purge·|·brutal_purge</code></pre><p>Before·this·instruction·occurs,·<code·class="inline">Mod</code>·must·have·been·loaded·using273 ··PrePurge·=·PostPurge·=·soft_purge·|·brutal_purge</code></pre><p>Before·this·instruction·occurs,·<code·class="inline">Mod</code>·must·have·been·loaded·using
274 <code·class="inline">load_object_code</code>.·This·instruction·loads·the·module.·<code·class="inline">PrePurge</code>·is·ignored.274 <code·class="inline">load_object_code</code>.·This·instruction·loads·the·module.·<code·class="inline">PrePurge</code>·is·ignored.
275 For·a·description·of·<code·class="inline">PostPurge</code>,·see·the·high-level·instruction·<code·class="inline">update</code>275 For·a·description·of·<code·class="inline">PostPurge</code>,·see·the·high-level·instruction·<code·class="inline">update</code>
276 earlier.</p><pre><code·class="text">{remove,·{Mod,·PrePurge,·PostPurge}}276 earlier.</p><pre><code·class="text">{remove,·{Mod,·PrePurge,·PostPurge}}
277 ··Mod·=·atom()277 ··Mod·=·atom()
278 ··PrePurge·=·PostPurge·=·soft_purge·|·brutal_purge</code></pre><p>Makes·the·current·version·of·<code·class="inline">Mod</code>·old.·<code·class="inline">PrePurge</code>·is·ignored.·For·a·description278 ··PrePurge·=·PostPurge·=·soft_purge·|·brutal_purge</code></pre><p>Makes·the·current·version·of·<code·class="inline">Mod</code>·old.·<code·class="inline">PrePurge</code>·is·ignored.·For·a·description
279 of·<code·class="inline">PostPurge</code>,·see·the·high-level·instruction·<code·class="inline">update</code>·earlier.</p><pre><code·class="text">{purge,·[Mod]}279 of·<code·class="inline">PostPurge</code>,·see·the·high-level·instruction·<code·class="inline">update</code>·earlier.</p><pre><code·class="text">{purge,·[Mod]}
280 ··Mod·=·atom()</code></pre><p>Purges·each·module·<code·class="inline">Mod</code>,·that·is,·removes·the·old·code.·Notice·that·any·process280 ··Mod·=·atom()</code></pre><p>Purges·each·module·<code·class="inline">Mod</code>,·that·is,·removes·the·old·code.·Notice·that·any·process
281 executing·purged·code·is·killed.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8699799037-1">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8699799037-2">[</span><span·class="n">Mod</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·300,·SHA:·0d12bbdc830ac2b62e0acf09c0e97b71529ef65315e335edf7ea3f20970144e5·...·]-1">}</span><span·class="w">281 executing·purged·code·is·killed.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4979508359-1">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4979508359-2">[</span><span·class="n">Mod</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·300,·SHA:·7121c74b070e8027690beb34990af3f4afa2f57fedeee57413a74275f41e1e8d·...·]-1">}</span><span·class="w">
282 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8699799037-4">(</span><span·class="p"·data-group-id="8699799037-4">)</span><span·class="w">282 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4979508359-4">(</span><span·class="p"·data-group-id="4979508359-4">)</span><span·class="w">
283 ··</span><span·class="n">Timeout</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="8699799037-5">(</span><span·class="p"·data-group-id="8699799037-5">)</span><span·class="o">&gt;</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">default</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">infinity</span></code></pre><p>Tries·to·suspend·all·processes·using·a·module·<code·class="inline">Mod</code>.·If·a·process·does·not283 ··</span><span·class="n">Timeout</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="4979508359-5">(</span><span·class="p"·data-group-id="4979508359-5">)</span><span·class="o">&gt;</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">default</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">infinity</span></code></pre><p>Tries·to·suspend·all·processes·using·a·module·<code·class="inline">Mod</code>.·If·a·process·does·not
284 respond,·it·is·ignored.·This·can·cause·the·process·to·die,·either·because·it284 respond,·it·is·ignored.·This·can·cause·the·process·to·die,·either·because·it
285 crashes·when·it·spontaneously·switches·to·new·code,·or·as·a·result·of·a·purge285 crashes·when·it·spontaneously·switches·to·new·code,·or·as·a·result·of·a·purge
286 operation.·If·no·<code·class="inline">Timeout</code>·is·specified·or·<code·class="inline">default</code>·is·specified,·the·default286 operation.·If·no·<code·class="inline">Timeout</code>·is·specified·or·<code·class="inline">default</code>·is·specified,·the·default
287 value·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/sys.html#suspend/1"><code·class="inline">sys:suspend</code></a>·is·used.</p><pre><code·class="text">{resume,·[Mod]}287 value·for·<a·href="../../../../lib/stdlib-6.0.1/doc/html/sys.html#suspend/1"><code·class="inline">sys:suspend</code></a>·is·used.</p><pre><code·class="text">{resume,·[Mod]}
288 ··Mod·=·atom()</code></pre><p>Resumes·all·suspended·processes·using·a·module·<code·class="inline">Mod</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8709160868-1">{</span><span·class="ss">code_change</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8709160868-2">[</span><span·class="p"·data-group-id="8709160868-3">{</span><span·class="n">Mod</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·204,·SHA:·7f33d4ec9493ba249202f10284ed7ad1421992207b1e34f6cc83ce5b339c3e2c·...·]-1">}</span><span·class="w">288 ··Mod·=·atom()</code></pre><p>Resumes·all·suspended·processes·using·a·module·<code·class="inline">Mod</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4681014435-1">{</span><span·class="ss">code_change</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4681014435-2">[</span><span·class="p"·data-group-id="4681014435-3">{</span><span·class="n">Mod</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·204,·SHA:·43b7a6e6c907fb736b9f56fbd234f0d1447fb8512be94745cf02383722938c2a·...·]-1">}</span><span·class="w">
289 </span><span·class="p"·data-group-id="8709160868-4">{</span><span·class="ss">code_change</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8709160868-5">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·279,·SHA:·971284da2564a093b1d3eff8cf5beaa95810c1cd1413dcd43f6b168f38d7595a·...·]-4">}</span><span·class="w">289 </span><span·class="p"·data-group-id="4681014435-4">{</span><span·class="ss">code_change</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4681014435-5">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·279,·SHA:·bf98ee12161bf24607a000afd43936f4363b18308b1b55feef8a2d69f3018cd8·...·]-4">}</span><span·class="w">
290 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8709160868-7">(</span><span·class="p"·data-group-id="8709160868-7">)</span><span·class="w">290 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4681014435-7">(</span><span·class="p"·data-group-id="4681014435-7">)</span><span·class="w">
291 ··</span><span·class="n">Mode</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">up</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">down</span><span·class="w">291 ··</span><span·class="n">Mode</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">up</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">down</span><span·class="w">
292 ··</span><span·class="n">Extra</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="8709160868-8">(</span><span·class="p"·data-group-id="8709160868-8">)</span></code></pre><p><code·class="inline">Mode</code>·defaults·to·<code·class="inline">up</code>·and·specifies·if·it·is·an·upgrade·or·downgrade.·This292 ··</span><span·class="n">Extra</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4681014435-8">(</span><span·class="p"·data-group-id="4681014435-8">)</span></code></pre><p><code·class="inline">Mode</code>·defaults·to·<code·class="inline">up</code>·and·specifies·if·it·is·an·upgrade·or·downgrade.·This
293 instruction·sends·a·<code·class="inline">code_change</code>·system·message·to·all·processes·using·a·module293 instruction·sends·a·<code·class="inline">code_change</code>·system·message·to·all·processes·using·a·module
294 <code·class="inline">Mod</code>·by·calling·function·<a·href="../../../../lib/stdlib-6.0.1/doc/html/sys.html#change_code/4"><code·class="inline">sys:change_code</code></a>,·passing·term294 <code·class="inline">Mod</code>·by·calling·function·<a·href="../../../../lib/stdlib-6.0.1/doc/html/sys.html#change_code/4"><code·class="inline">sys:change_code</code></a>,·passing·term
295 <code·class="inline">Extra</code>·as·argument.</p><pre><code·class="text">{stop,·[Mod]}295 <code·class="inline">Extra</code>·as·argument.</p><pre><code·class="text">{stop,·[Mod]}
296 ··Mod·=·atom()</code></pre><p>Stops·all·processes·using·a·module·<code·class="inline">Mod</code>·by·calling296 ··Mod·=·atom()</code></pre><p>Stops·all·processes·using·a·module·<code·class="inline">Mod</code>·by·calling
297 <a·href="../../../../lib/stdlib-6.0.1/doc/html/supervisor.html#terminate_child/2"><code·class="inline">supervisor:terminate_child/2</code></a>.·This·instruction·is·useful·when·the·simplest·way297 <a·href="../../../../lib/stdlib-6.0.1/doc/html/supervisor.html#terminate_child/2"><code·class="inline">supervisor:terminate_child/2</code></a>.·This·instruction·is·useful·when·the·simplest·way
298 to·change·code·is·to·stop·and·restart·the·processes·that·run·the·code.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4696479705-1">{</span><span·class="ss">start</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4696479705-2">[</span><span·class="n">Mod</span><span·class="p"·data-group-id="4696479705-2">]</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·d8140936ad3f44dd16fb054fa6ee80ef83e28beff73823f5a810205f3ec60ffd·...·]-1">}</span><span·class="w">298 to·change·code·is·to·stop·and·restart·the·processes·that·run·the·code.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8283512663-1">{</span><span·class="ss">start</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8283512663-2">[</span><span·class="n">Mod</span><span·class="p"·data-group-id="8283512663-2">]</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·7d3e1abe335c6cd3c1c4e05281522d0ef807a1f16c7cb7258f980be045383bb3·...·]-1">}</span><span·class="w">
299 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4696479705-3">(</span><span·class="p"·data-group-id="4696479705-3">)</span></code></pre><p>Starts·all·stopped·processes·using·a·module·<code·class="inline">Mod</code>·by·calling299 ··</span><span·class="n">Mod</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8283512663-3">(</span><span·class="p"·data-group-id="8283512663-3">)</span></code></pre><p>Starts·all·stopped·processes·using·a·module·<code·class="inline">Mod</code>·by·calling
300 <a·href="../../../../lib/stdlib-6.0.1/doc/html/supervisor.html#restart_child/2"><code·class="inline">supervisor:restart_child/2</code></a>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3959547697-1">{</span><span·class="ss">sync_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3959547697-2">[</span><span·class="n">Node</span[·...·truncated·by·diffoscope;·len:·94,·SHA:·41a0dd1578991907e4a3decf01b944c6cd44f01d7de061736fe4916c04d13676·...·]7-1">}</span><span·class="w">300 <a·href="../../../../lib/stdlib-6.0.1/doc/html/supervisor.html#restart_child/2"><code·class="inline">supervisor:restart_child/2</code></a>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4900301727-1">{</span><span·class="ss">sync_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4900301727-2">[</span><span·class="n">Node</span[·...·truncated·by·diffoscope;·len:·94,·SHA:·db4728a806c56b5bf935a760b04e29ba53d94e85b39f2e91153e39dfb13d2ae9·...·]7-1">}</span><span·class="w">
301 </span><span·class="p"·data-group-id="3959547697-3">{</span><span·class="ss">sync_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3959547697-4">{</span><span·class="n">M</span><s[·...·truncated·by·diffoscope;·len:·235,·SHA:·2af584b04e8f5fa21d511eb1b9a232ecf4ce92825d644fef3725b6cd02add771·...·]7-3">}</span><span·class="w">301 </span><span·class="p"·data-group-id="4900301727-3">{</span><span·class="ss">sync_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Id</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4900301727-4">{</span><span·class="n">M</span><s[·...·truncated·by·diffoscope;·len:·235,·SHA:·d2964fafbdfa75e6b9c690c49e86bce50bbd6cf1ea55ceb332172f791a3f4953·...·]7-3">}</span><span·class="w">
302 ··</span><span·class="n">Id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="3959547697-5">(</span><span·class="p"·data-group-id="3959547697-5">)</span><span·class="w">302 ··</span><span·class="n">Id</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="4900301727-5">(</span><span·class="p"·data-group-id="4900301727-5">)</span><span·class="w">
303 ··</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="3959547697-6">(</span><span·class="p"·data-group-id="3959547697-6">)</span><span·class="w">303 ··</span><span·class="n">Node</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">node</span><span·class="p"·data-group-id="4900301727-6">(</span><span·class="p"·data-group-id="4900301727-6">)</span><span·class="w">
304 ··</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="3959547697-7">(</span><span·class="p"·data-group-id="3959547697-7">)</span><span·class="w">304 ··</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="4900301727-7">(</span><span·class="p"·data-group-id="4900301727-7">)</span><span·class="w">
305 ··</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3959547697-8">[</span><span·class="nf">term</span><span·class="p"·data-group-id="3959547697-9">(</span><span·class="p"·data-group-id="3959547697-9">)</span><span·class="p"·data-group-id="3959547697-8">]</span></code></pre><p><a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,·F,·A)</code></a>·must·return·a·list·of·nodes.</p><p>This·instruction·synchronizes·the·release·installation·with·other·nodes.·Each305 ··</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4900301727-8">[</span><span·class="nf">term</span><span·class="p"·data-group-id="4900301727-9">(</span><span·class="p"·data-group-id="4900301727-9">)</span><span·class="p"·data-group-id="4900301727-8">]</span></code></pre><p><a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,·F,·A)</code></a>·must·return·a·list·of·nodes.</p><p>This·instruction·synchronizes·the·release·installation·with·other·nodes.·Each
306 <code·class="inline">Node</code>·must·evaluate·this·command·with·the·same·<code·class="inline">Id</code>.·The·local·node·waits·for306 <code·class="inline">Node</code>·must·evaluate·this·command·with·the·same·<code·class="inline">Id</code>.·The·local·node·waits·for
307 all·other·nodes·to·evaluate·the·instruction·before·execution·continues.·If·a307 all·other·nodes·to·evaluate·the·instruction·before·execution·continues.·If·a
308 node·goes·down,·it·is·considered·to·be·an·unrecoverable·error,·and·the·local308 node·goes·down,·it·is·considered·to·be·an·unrecoverable·error,·and·the·local
309 node·is·restarted·from·the·old·release.·There·is·no·time-out·for·this309 node·is·restarted·from·the·old·release.·There·is·no·time-out·for·this
310 instruction,·which·means·that·it·can·hang·forever.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9294078212-1">{</span><span·class="nb">apply</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9294078212-2">{</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·cl[·...·truncated·by·diffoscope;·len:·158,·SHA:·7bff17cc3dbb66eb52d8e13a45d51c7fb8fe8d2bf095c5fc97c0746bf590501d·...·]-1">}</span><span·class="w">310 instruction,·which·means·that·it·can·hang·forever.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8874417050-1">{</span><span·class="nb">apply</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8874417050-2">{</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F</span><span·cl[·...·truncated·by·diffoscope;·len:·158,·SHA:·d6483963436e559aeca6801faf09efdd7b9d88a9279210e08b548fe2c176780f·...·]-1">}</span><span·class="w">
311 ··</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="9294078212-3">(</span><span·class="p"·data-group-id="9294078212-3">)</span><span·class="w">311 ··</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8874417050-3">(</span><span·class="p"·data-group-id="8874417050-3">)</span><span·class="w">
312 ··</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9294078212-4">[</span><span·class="nf">term</span><span·class="p"·data-group-id="9294078212-5">(</span><span·class="p"·data-group-id="9294078212-5">)</span><span·class="p"·data-group-id="9294078212-4">]</span></code></pre><p>Evaluates·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,·F,·A)</code></a>.</p><p>If·the·instruction·appears·before·instruction·<code·class="inline">point_of_no_return</code>,·a·failure·is312 ··</span><span·class="n">A</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8874417050-4">[</span><span·class="nf">term</span><span·class="p"·data-group-id="8874417050-5">(</span><span·class="p"·data-group-id="8874417050-5">)</span><span·class="p"·data-group-id="8874417050-4">]</span></code></pre><p>Evaluates·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,·F,·A)</code></a>.</p><p>If·the·instruction·appears·before·instruction·<code·class="inline">point_of_no_return</code>,·a·failure·is
313 caught.·<a·href="release_handler.html#install_release/1"><code·class="inline">release_handler:install_release/1</code></a>·then·returns313 caught.·<a·href="release_handler.html#install_release/1"><code·class="inline">release_handler:install_release/1</code></a>·then·returns
314 <code·class="inline">{error,{'EXIT',Reason}}</code>,·unless·<code·class="inline">{error,Error}</code>·is·thrown·or·returned.·Then·it314 <code·class="inline">{error,{'EXIT',Reason}}</code>,·unless·<code·class="inline">{error,Error}</code>·is·thrown·or·returned.·Then·it
315 returns·<code·class="inline">{error,Error}</code>.</p><p>If·the·instruction·appears·after·instruction·<code·class="inline">point_of_no_return</code>·and·the315 returns·<code·class="inline">{error,Error}</code>.</p><p>If·the·instruction·appears·after·instruction·<code·class="inline">point_of_no_return</code>·and·the
316 function·call·fails,·the·system·is·restarted.</p><pre><code·class="text">restart_new_emulator</code></pre><p>This·instruction·is·used·when·the·application·ERTS,·Kernel,·STDLIB,·or·SASL·is316 function·call·fails,·the·system·is·restarted.</p><pre><code·class="text">restart_new_emulator</code></pre><p>This·instruction·is·used·when·the·application·ERTS,·Kernel,·STDLIB,·or·SASL·is
317 upgraded.·It·shuts·down·the·current·emulator·and·starts·a·new·one.·All·processes317 upgraded.·It·shuts·down·the·current·emulator·and·starts·a·new·one.·All·processes
318 are·terminated·gracefully,·and·the·new·version·of·ERTS,·Kernel,·STDLIB,·and·SASL318 are·terminated·gracefully,·and·the·new·version·of·ERTS,·Kernel,·STDLIB,·and·SASL
319 are·used·when·the·emulator·restarts.·Only·one·<code·class="inline">restart_new_emulator</code>·instruction319 are·used·when·the·emulator·restarts.·Only·one·<code·class="inline">restart_new_emulator</code>·instruction
17.4 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/error_logging.html
    
Offset 304, 50 lines modifiedOffset 304, 50 lines modified
304 ········ok</code></pre><h3·id="show-reports"·class="section-heading">304 ········ok</code></pre><h3·id="show-reports"·class="section-heading">
305 ··<a·href="#show-reports"·class="hover-link">305 ··<a·href="#show-reports"·class="hover-link">
306 ····<i·class="ri-link-m"·aria-hidden="true"></i>306 ····<i·class="ri-link-m"·aria-hidden="true"></i>
307 ··</a>307 ··</a>
308 ··<span·class="text">Show·Reports</span>308 ··<span·class="text">Show·Reports</span>
309 </h3>309 </h3>
310 <p>Use·function·<a·href="rb.html#show/1"><code·class="inline">rb:show(Number)</code></a>·to·show·details·of·a·specific310 <p>Use·function·<a·href="rb.html#show/1"><code·class="inline">rb:show(Number)</code></a>·to·show·details·of·a·specific
311 report:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nc">rb</span><span·class="p">:</span><span·class="nf">show</span><span·class="p"·data-group-id="6335403472-1">(</span><span·class="mi">4</span><span·class="p"·data-group-id="6335403472-1">)</span><span·class="p">.</span><span·class="w">311 report:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nc">rb</span><span·class="p">:</span><span·class="nf">show</span><span·class="p"·data-group-id="1356382662-1">(</span><span·class="mi">4</span><span·class="p"·data-group-id="1356382662-1">)</span><span·class="p">.</span><span·class="w">
  
312 </span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="w">··</span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">···································</span><span·class="mi">1996</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">16</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">36</span><span·class="w">312 </span><span·class="n">PROGRESS</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="w">··</span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">···································</span><span·class="mi">1996</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">16</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">36</span><span·class="w">
313 </span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">=</span><span·class="w">313 </span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
314 </span><span·class="ss">supervisor</span><span·class="w">·····················································</span><span·class="p"·data-group-id="6335403472-2">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">sasl_sup</span><span·class="p"·data-group-id="6335403472-2">}</span><span·class="w">314 </span><span·class="ss">supervisor</span><span·class="w">·····················································</span><span·class="p"·data-group-id="1356382662-2">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">sasl_sup</span><span·class="p"·data-group-id="1356382662-2">}</span><span·class="w">
315 </span><span·class="ss">started</span><span·class="w">315 </span><span·class="ss">started</span><span·class="w">
316 </span><span·class="p"·data-group-id="6335403472-3">[</span><span·class="p"·data-group-id="6335403472-4">{</span><span·class="ss">pid</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.24</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span[·...·truncated·by·diffoscope;·len:·41,·SHA:·16d124c851129c0d4d88527a89e47770924e5351d8f33083393524621107c94c·...·]2-4">}</span><span·class="p">,</span><span·class="w">316 </span><span·class="p"·data-group-id="1356382662-3">[</span><span·class="p"·data-group-id="1356382662-4">{</span><span·class="ss">pid</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.24</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span[·...·truncated·by·diffoscope;·len:·41,·SHA:·08151ea8db8144702694188559abcc601f564254290a5df9e8f209e229e0c027·...·]2-4">}</span><span·class="p">,</span><span·class="w">
317 </span><span·class="p"·data-group-id="6335403472-5">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="ss">release_handler</span><span·class="p"·data-group-id="6335403472-5">}</span><span·class="p">,</span><span·class="w">317 </span><span·class="p"·data-group-id="1356382662-5">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="ss">release_handler</span><span·class="p"·data-group-id="1356382662-5">}</span><span·class="p">,</span><span·class="w">
318 </span><span·class="p"·data-group-id="6335403472-6">{</span><span·class="ss">mfa</span><span·class="p">,</span><span·class="p"·data-group-id="6335403472-7">{</span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="ss">start_link</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·190,·SHA:·3f0059e5bae80c2cea5818d736b40f8738bcc6f5d90e15f4998f36bdcb49aa38·...·]2-6">}</span><span·class="p">,</span><span·class="w">318 </span><span·class="p"·data-group-id="1356382662-6">{</span><span·class="ss">mfa</span><span·class="p">,</span><span·class="p"·data-group-id="1356382662-7">{</span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="ss">start_link</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·190,·SHA:·b84e97c1c369f634c1b360671b5295bc06870b30fb04b44733c44b2c984ecd5d·...·]2-6">}</span><span·class="p">,</span><span·class="w">
319 </span><span·class="p"·data-group-id="6335403472-9">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="ss">permanent</span><span·class="p"·data-group-id="6335403472-9">}</span><span·class="p">,</span><span·class="w">319 </span><span·class="p"·data-group-id="1356382662-9">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="ss">permanent</span><span·class="p"·data-group-id="1356382662-9">}</span><span·class="p">,</span><span·class="w">
320 </span><span·class="p"·data-group-id="6335403472-10">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="mi">2000</span><span·class="p"·data-group-id="6335403472-10">}</span><span·class="p">,</span><span·class="w">320 </span><span·class="p"·data-group-id="1356382662-10">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="mi">2000</span><span·class="p"·data-group-id="1356382662-10">}</span><span·class="p">,</span><span·class="w">
321 </span><span·class="p"·data-group-id="6335403472-11">{</span><span·class="ss">child_type</span><span·class="p">,</span><span·class="ss">worker</span><span·class="p"·data-group-id="6335403472-11">}</span><span·class="p"·data-group-id="6335403472-3">]</span><span·class="w">321 </span><span·class="p"·data-group-id="1356382662-11">{</span><span·class="ss">child_type</span><span·class="p">,</span><span·class="ss">worker</span><span·class="p"·data-group-id="1356382662-11">}</span><span·class="p"·data-group-id="1356382662-3">]</span><span·class="w">
  
322 </span><span·class="ss">ok</span><span·class="gp·unselectable">322 </span><span·class="ss">ok</span><span·class="gp·unselectable">
323 8&gt;·</span><span·class="nc">rb</span><span·class="p">:</span><span·class="nf">show</span><span·class="p"·data-group-id="6335403472-12">(</span><span·class="mi">9</span><span·class="p"·data-group-id="6335403472-12">)</span><span·class="p">.</span><span·class="w">323 8&gt;·</span><span·class="nc">rb</span><span·class="p">:</span><span·class="nf">show</span><span·class="p"·data-group-id="1356382662-12">(</span><span·class="mi">9</span><span·class="p"·data-group-id="1356382662-12">)</span><span·class="p">.</span><span·class="w">
  
324 </span><span·class="n">CRASH</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="w">··</span><span·class="o">&lt;</span><span·class="mf">0.24</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">······································</span><span·class="mi">1996</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">16</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">21</span><span·class="w">324 </span><span·class="n">CRASH</span><span·class="w">·</span><span·class="n">REPORT</span><span·class="w">··</span><span·class="o">&lt;</span><span·class="mf">0.24</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">······································</span><span·class="mi">1996</span><span·class="o">-</span><span·class="mi">10</span><span·class="o">-</span><span·class="mi">16</span><span·class="w">·</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">16</span><span·class="p">:</span><span·class="mi">21</span><span·class="w">
325 </span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">=</span><span·class="w">325 </span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">==</span><span·class="o">=</span><span·class="w">
326 </span><span·class="n">Crashing</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">326 </span><span·class="n">Crashing</span><span·class="w">·</span><span·class="ss">process</span><span·class="w">
327 </span><span·class="ss">pid</span><span·class="w">·································································</span><span·class="o">&lt;</span><span·class="mf">0.24</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">327 </span><span·class="ss">pid</span><span·class="w">·································································</span><span·class="o">&lt;</span><span·class="mf">0.24</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">
328 </span><span·class="ss">registered_name</span><span·class="w">··············································</span><span·class="ss">release_handler</span><span·class="w">328 </span><span·class="ss">registered_name</span><span·class="w">··············································</span><span·class="ss">release_handler</span><span·class="w">
329 </span><span·class="ss">error_info</span><span·class="w">·····························</span><span·class="p"·data-group-id="6335403472-13">{</span><span·class="ss">undef</span><span·class="p">,</span><span·class="p"·data-group-id="6335403472-14">{</span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="ss">mbj_func</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·195,·SHA:·8ecd2535decfdd821e9f655233d36093d5ad29e36d445901bb460939c41d930e·...·]2-13">}</span><span·class="w">329 </span><span·class="ss">error_info</span><span·class="w">·····························</span><span·class="p"·data-group-id="1356382662-13">{</span><span·class="ss">undef</span><span·class="p">,</span><span·class="p"·data-group-id="1356382662-14">{</span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="ss">mbj_func</span><span·class="p">,</span><span·c[·...·truncated·by·diffoscope;·len:·195,·SHA:·74caec7b277bd08b398cfa988a9fbf09f497d9e0bb322f276356d3faf679eb18·...·]2-13">}</span><span·class="w">
330 </span><span·class="ss">initial_call</span><span·class="w">330 </span><span·class="ss">initial_call</span><span·class="w">
331 </span><span·class="p"·data-group-id="6335403472-16">{</span><span·class="ss">gen</span><span·class="p">,</span><span·class="ss">init_it</span><span·class="p">,</span><span·class="w">331 </span><span·class="p"·data-group-id="1356382662-16">{</span><span·class="ss">gen</span><span·class="p">,</span><span·class="ss">init_it</span><span·class="p">,</span><span·class="w">
332 </span><span·class="p"·data-group-id="6335403472-17">[</span><span·class="ss">gen_server</span><span·class="p">,</span><span·class="w">332 </span><span·class="p"·data-group-id="1356382662-17">[</span><span·class="ss">gen_server</span><span·class="p">,</span><span·class="w">
333 </span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">333 </span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
334 </span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">334 </span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="w">
335 </span><span·class="p"·data-group-id="6335403472-18">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">register</span><span·class="p"·data-group-id="6335403472-18">}</span><span·class="p">,</span><span·class="w">335 </span><span·class="p"·data-group-id="1356382662-18">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">register</span><span·class="p"·data-group-id="1356382662-18">}</span><span·class="p">,</span><span·class="w">
336 </span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="w">336 </span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="w">
337 </span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="w">337 </span><span·class="ss">release_handler</span><span·class="p">,</span><span·class="w">
338 </span><span·class="p"·data-group-id="6335403472-19">[</span><span·class="p"·data-group-id="6335403472-19">]</span><span·class="p">,</span><span·class="w">338 </span><span·class="p"·data-group-id="1356382662-19">[</span><span·class="p"·data-group-id="1356382662-19">]</span><span·class="p">,</span><span·class="w">
339 </span><span·class="p"·data-group-id="6335403472-20">[</span><span·class="p"·data-group-id="6335403472-20">]</span><span·class="p"·data-group-id="6335403472-17">]</span><span·class="p"·data-group-id="6335403472-16">}</span><span·class="w">339 </span><span·class="p"·data-group-id="1356382662-20">[</span><span·class="p"·data-group-id="1356382662-20">]</span><span·class="p"·data-group-id="1356382662-17">]</span><span·class="p"·data-group-id="1356382662-16">}</span><span·class="w">
340 </span><span·class="ss">ancestors</span><span·class="w">················································</span><span·class="p"·data-group-id="6335403472-21">[</span><span·class="ss">sasl_sup</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.18</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="6335403472-21">]</span><span·class="w">340 </span><span·class="ss">ancestors</span><span·class="w">················································</span><span·class="p"·data-group-id="1356382662-21">[</span><span·class="ss">sasl_sup</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.18</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1356382662-21">]</span><span·class="w">
341 </span><span·class="ss">messages</span><span·class="w">··································································</span><span·class="p"·data-group-id="6335403472-22">[</span><span·class="p"·data-group-id="6335403472-22">]</span><span·class="w">341 </span><span·class="ss">messages</span><span·class="w">··································································</span><span·class="p"·data-group-id="1356382662-22">[</span><span·class="p"·data-group-id="1356382662-22">]</span><span·class="w">
342 </span><span·class="ss">links</span><span·class="w">····················································</span><span·class="p"·data-group-id="6335403472-23">[</span><span·class="o">&lt;</span><span·class="mf">0.23</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·93,·SHA:·117119073baf9b9d9e3f65fc7641d3e4dcf5678d9bda59efb417224d1f76e471·...·]2-23">]</span><span·class="w">342 </span><span·class="ss">links</span><span·class="w">····················································</span><span·class="p"·data-group-id="1356382662-23">[</span><span·class="o">&lt;</span><span·class="mf">0.23</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.20</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·93,·SHA:·be0a4bd9784c10442bc2679e1dd612b6dc0f2e2d7c6c0aed00f00918ed3ec6ca·...·]2-23">]</span><span·class="w">
343 </span><span·class="ss">dictionary</span><span·class="w">································································</span><span·class="p"·data-group-id="6335403472-24">[</span><span·class="p"·data-group-id="6335403472-24">]</span><span·class="w">343 </span><span·class="ss">dictionary</span><span·class="w">································································</span><span·class="p"·data-group-id="1356382662-24">[</span><span·class="p"·data-group-id="1356382662-24">]</span><span·class="w">
344 </span><span·class="ss">trap_exit</span><span·class="w">······························································</span><span·class="ss">false</span><span·class="w">344 </span><span·class="ss">trap_exit</span><span·class="w">······························································</span><span·class="ss">false</span><span·class="w">
345 </span><span·class="ss">status</span><span·class="w">·······························································</span><span·class="ss">running</span><span·class="w">345 </span><span·class="ss">status</span><span·class="w">·······························································</span><span·class="ss">running</span><span·class="w">
346 </span><span·class="ss">heap_size</span><span·class="w">································································</span><span·class="mi">610</span><span·class="w">346 </span><span·class="ss">heap_size</span><span·class="w">································································</span><span·class="mi">610</span><span·class="w">
347 </span><span·class="ss">stack_size</span><span·class="w">·······························································</span><span·class="mi">142</span><span·class="w">347 </span><span·class="ss">stack_size</span><span·class="w">·······························································</span><span·class="mi">142</span><span·class="w">
348 </span><span·class="ss">reductions</span><span·class="w">································································</span><span·class="mi">54</span><span·class="w">348 </span><span·class="ss">reductions</span><span·class="w">································································</span><span·class="mi">54</span><span·class="w">
  
349 </span><span·class="ss">ok</span></code></pre><h3·id="search-reports"·class="section-heading">349 </span><span·class="ss">ok</span></code></pre><h3·id="search-reports"·class="section-heading">
7.73 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/rel.html
    
Offset 136, 19 lines modifiedOffset 136, 19 lines modified
136 (<code·class="inline">.script</code>,·<code·class="inline">.boot</code>)·and·release·upgrade·files·(<code·class="inline">relup</code>).</p><h2·id="file-syntax"·class="section-heading">136 (<code·class="inline">.script</code>,·<code·class="inline">.boot</code>)·and·release·upgrade·files·(<code·class="inline">relup</code>).</p><h2·id="file-syntax"·class="section-heading">
137 ··<a·href="#file-syntax"·class="hover-link">137 ··<a·href="#file-syntax"·class="hover-link">
138 ····<i·class="ri-link-m"·aria-hidden="true"></i>138 ····<i·class="ri-link-m"·aria-hidden="true"></i>
139 ··</a>139 ··</a>
140 ··<span·class="text">File·Syntax</span>140 ··<span·class="text">File·Syntax</span>
141 </h2>141 </h2>
142 <p>The·release·resource·file·is·to·be·called·<code·class="inline">Name.rel</code>.</p><p>The·<code·class="inline">.rel</code>·file·contains·one·single·Erlang·term,·which·is·called·a·<em>release142 <p>The·release·resource·file·is·to·be·called·<code·class="inline">Name.rel</code>.</p><p>The·<code·class="inline">.rel</code>·file·contains·one·single·Erlang·term,·which·is·called·a·<em>release
143 specification</em>.·The·file·has·the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0379937647-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0379937647-2">{</span><span·class="n">RelName</span><span·class="p">,</span><span·class="n">Vsn</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·276,·SHA:·76ba5e7cbbbb2520989366dbee6b87b86db17ca82c5b2c27e496e68c2d61bacd·...·]-3">}</span><span·class="p">,</span><span·class="w">143 specification</em>.·The·file·has·the·following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5100774079-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5100774079-2">{</span><span·class="n">RelName</span><span·class="p">,</span><span·class="n">Vsn</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·276,·SHA:·e9ba2ecf49140b1cff220c12fbd50955dcc775f95ce49221ee0b5778478d7cd3·...·]-3">}</span><span·class="p">,</span><span·class="w">
144 ··</span><span·class="p"·data-group-id="0379937647-4">[</span><span·class="p"·data-group-id="0379937647-5">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p"·data-group-id="0379937647-5">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">144 ··</span><span·class="p"·data-group-id="5100774079-4">[</span><span·class="p"·data-group-id="5100774079-5">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p"·data-group-id="5100774079-5">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
145 ···</span><span·class="p"·data-group-id="0379937647-6">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="0379937647-6">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">145 ···</span><span·class="p"·data-group-id="5100774079-6">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p"·data-group-id="5100774079-6">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
146 ···</span><span·class="p"·data-group-id="0379937647-7">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IncApps</span><span·class="p"·data-group-id="0379937647-7">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">146 ···</span><span·class="p"·data-group-id="5100774079-7">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IncApps</span><span·class="p"·data-group-id="5100774079-7">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
147 ···</span><span·class="p"·data-group-id="0379937647-8">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·177,·SHA:·20c521d1dde0d0e7a3d2ecde9a5e7a74aedea5668b42440f212350f51c8b136b·...·]-1">}</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">RelName·=·string()</code></strong>·-·Release·name.</p></li><li><p><strong><code·class="inline">Vsn·=·string()</code></strong>·-·Release·version.</p></li><li><p><strong><code·class="inline">EVsn·=·string()</code></strong>·-·ERTS·version·the·release·is·intended·for.</p></li><li><p><strong><code·class="inline">Application·=·atom()</code></strong>·-·Name·of·an·application·included·in·the·release.</p></li><li><p><strong><code·class="inline">AppVsn·=·string()</code></strong>·-·Version·of·an·application·included·in·the·release.</p></li><li><p><strong><code·class="inline">Type·=·permanent·|·transient·|·temporary·|·load·|·none</code></strong>·-·Start·type·of147 ···</span><span·class="p"·data-group-id="5100774079-8">{</span><span·class="n">Application</span><span·class="p">,</span><span·class="w">·</span><span·class="n">AppVsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Type</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·177,·SHA:·290fa9c61337ae1343ce900e5e3fd9db7f6013f21da41acd29871dbf67baeb1e·...·]-1">}</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">RelName·=·string()</code></strong>·-·Release·name.</p></li><li><p><strong><code·class="inline">Vsn·=·string()</code></strong>·-·Release·version.</p></li><li><p><strong><code·class="inline">EVsn·=·string()</code></strong>·-·ERTS·version·the·release·is·intended·for.</p></li><li><p><strong><code·class="inline">Application·=·atom()</code></strong>·-·Name·of·an·application·included·in·the·release.</p></li><li><p><strong><code·class="inline">AppVsn·=·string()</code></strong>·-·Version·of·an·application·included·in·the·release.</p></li><li><p><strong><code·class="inline">Type·=·permanent·|·transient·|·temporary·|·load·|·none</code></strong>·-·Start·type·of
148 an·application·included·in·the·release.</p><p>If·<code·class="inline">Type·=·permanent·|·transient·|·temporary</code>,·the·application·is·loaded·and148 an·application·included·in·the·release.</p><p>If·<code·class="inline">Type·=·permanent·|·transient·|·temporary</code>,·the·application·is·loaded·and
149 started·in·the·corresponding·way,·see·<a·href="../../../../lib/kernel-10.0.1/doc/html/application.html"><code·class="inline">application</code></a>.</p><p>If·<code·class="inline">Type·=·load</code>,·the·application·is·only·loaded.</p><p>If·<code·class="inline">Type·=·none</code>,·the·application·is·not·loaded·and·not·started,·although·the149 started·in·the·corresponding·way,·see·<a·href="../../../../lib/kernel-10.0.1/doc/html/application.html"><code·class="inline">application</code></a>.</p><p>If·<code·class="inline">Type·=·load</code>,·the·application·is·only·loaded.</p><p>If·<code·class="inline">Type·=·none</code>,·the·application·is·not·loaded·and·not·started,·although·the
150 code·for·its·modules·is·loaded.</p><p>Defaults·to·<code·class="inline">permanent</code></p></li><li><p><strong><code·class="inline">IncApps·=·[atom()]</code></strong>·-·A·list·of·applications·that·are·included·by·an150 code·for·its·modules·is·loaded.</p><p>Defaults·to·<code·class="inline">permanent</code></p></li><li><p><strong><code·class="inline">IncApps·=·[atom()]</code></strong>·-·A·list·of·applications·that·are·included·by·an
151 application·included·in·the·release.·The·list·must·be·a·subset·of·the·included151 application·included·in·the·release.·The·list·must·be·a·subset·of·the·included
152 applications·specified·in·the·application·resource·file·(<code·class="inline">Application.app</code>)152 applications·specified·in·the·application·resource·file·(<code·class="inline">Application.app</code>)
153 and·overrides·this·value.·Defaults·to·the·same·value·as·in·the·application153 and·overrides·this·value.·Defaults·to·the·same·value·as·in·the·application
154 resource·file.</p></li></ul><blockquote><h4·class="info">Note</h4><p>The·list·of·applications·must·contain·the·Kernel·and·STDLIB·applications.</p></blockquote><h2·id="see-also"·class="section-heading">154 resource·file.</p></li></ul><blockquote><h4·class="info">Note</h4><p>The·list·of·applications·must·contain·the·Kernel·and·STDLIB·applications.</p></blockquote><h2·id="see-also"·class="section-heading">
4.37 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/release_handler.html
    
Offset 1080, 16 lines modifiedOffset 1080, 16 lines modified
1080 updated·(<code·class="inline">Bool==true</code>)·or·if·only·code·paths·for·modified·applications·are·to1080 updated·(<code·class="inline">Bool==true</code>)·or·if·only·code·paths·for·modified·applications·are·to
1081 be·updated·(<code·class="inline">Bool==false</code>,·default).·This·option·has·only·effect·for·other1081 be·updated·(<code·class="inline">Bool==false</code>,·default).·This·option·has·only·effect·for·other
1082 application·directories·than·the·default·<code·class="inline">$ROOT/lib/App-Vsn</code>,·that·is,1082 application·directories·than·the·default·<code·class="inline">$ROOT/lib/App-Vsn</code>,·that·is,
1083 application·directories·specified·in·argument·<code·class="inline">AppDirs</code>·in·a·call·to1083 application·directories·specified·in·argument·<code·class="inline">AppDirs</code>·in·a·call·to
1084 <a·href="#create_RELEASES/4"><code·class="inline">create_RELEASES/4</code></a>·or·<a·href="#set_unpacked/2"><code·class="inline">set_unpacked/2</code></a>.</p><p><em>Example:</em></p><p>In·the·current·version·<code·class="inline">CurVsn</code>·of·a·release,·the·application·directory·of1084 <a·href="#create_RELEASES/4"><code·class="inline">create_RELEASES/4</code></a>·or·<a·href="#set_unpacked/2"><code·class="inline">set_unpacked/2</code></a>.</p><p><em>Example:</em></p><p>In·the·current·version·<code·class="inline">CurVsn</code>·of·a·release,·the·application·directory·of
1085 <code·class="inline">myapp</code>·is·<code·class="inline">$ROOT/lib/myapp-1.0</code>.·A·new·version·<code·class="inline">NewVsn</code>·is·unpacked·outside1085 <code·class="inline">myapp</code>·is·<code·class="inline">$ROOT/lib/myapp-1.0</code>.·A·new·version·<code·class="inline">NewVsn</code>·is·unpacked·outside
1086 the·release·handler·and·the·release·handler·is·informed·about·this·with·a·call1086 the·release·handler·and·the·release·handler·is·informed·about·this·with·a·call
1087 as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">release_handler</span><span·class="p">:</span><span·class="nf">set_unpacked</span><span·class="p"·data-group-id="5663627858-1">(</span><span·class="n">RelFile</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5663627858-2">[</span><span·class="p"·data-group-id="5663627858-3">{</span><span·class="ss">myapp</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·353,·SHA:·ee4e697a64807d085fa8562feb25e93e0886f5cfd227bcc0f307850af57a1576·...·]-1">)</span><span·class="p">.</span><span·class="w">1087 as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">release_handler</span><span·class="p">:</span><span·class="nf">set_unpacked</span><span·class="p"·data-group-id="2294669880-1">(</span><span·class="n">RelFile</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2294669880-2">[</span><span·class="p"·data-group-id="2294669880-3">{</span><span·class="ss">myapp</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·353,·SHA:·83791f3101cd0baa1456dd0acf2c5cff4cf6a65e376c03f64d8d56614134a99d·...·]-1">)</span><span·class="p">.</span><span·class="w">
1088 </span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5663627858-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">NewVsn</span><span·class="p"·data-group-id="5663627858-4">}</span></code></pre><p>If·<code·class="inline">NewVsn</code>·is·installed·with·option·<code·class="inline">{update_paths,true}</code>,·then1088 </span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2294669880-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">NewVsn</span><span·class="p"·data-group-id="2294669880-4">}</span></code></pre><p>If·<code·class="inline">NewVsn</code>·is·installed·with·option·<code·class="inline">{update_paths,true}</code>,·then
1089 <a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#lib_dir/1"><code·class="inline">code:lib_dir(myapp)</code></a>·returns·<code·class="inline">/home/user/myapp-1.0</code>.</p></li></ul><blockquote><h4·class="info">Note</h4><p>Installing·a·new·release·can·be·time·consuming·if·there·are·many·processes·in1089 <a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#lib_dir/1"><code·class="inline">code:lib_dir(myapp)</code></a>·returns·<code·class="inline">/home/user/myapp-1.0</code>.</p></li></ul><blockquote><h4·class="info">Note</h4><p>Installing·a·new·release·can·be·time·consuming·if·there·are·many·processes·in
1090 the·system.·The·reason·is·that·each·process·must·be·checked·for·references·to1090 the·system.·The·reason·is·that·each·process·must·be·checked·for·references·to
1091 old·code·before·a·module·can·be·purged.·This·check·can·lead·to·garbage1091 old·code·before·a·module·can·be·purged.·This·check·can·lead·to·garbage
1092 collections·and·copying·of·data.</p><p>To·speed·up·the·execution·of·<a·href="#install_release/1"><code·class="inline">install_release</code></a>,·first1092 collections·and·copying·of·data.</p><p>To·speed·up·the·execution·of·<a·href="#install_release/1"><code·class="inline">install_release</code></a>,·first
1093 call·<a·href="#check_install_release/1"><code·class="inline">check_install_release</code></a>,·using·option1093 call·<a·href="#check_install_release/1"><code·class="inline">check_install_release</code></a>,·using·option
1094 <code·class="inline">purge</code>.·This·does·the·same·check·for·old·code.·Then·purges·all·modules·that1094 <code·class="inline">purge</code>.·This·does·the·same·check·for·old·code.·Then·purges·all·modules·that
1095 can·be·soft-purged.·The·purged·modules·do·then·no·longer·have·any·old·code,1095 can·be·soft-purged.·The·purged·modules·do·then·no·longer·have·any·old·code,
134 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/sasl.epub
3.39 KB
zipinfo {}
Max HTML report size reached
54.0 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
11.0 KB
OEBPS/script.xhtml
Max HTML report size reached
4.27 KB
OEBPS/release_handler.xhtml
Max HTML report size reached
7.62 KB
OEBPS/rel.xhtml
Max HTML report size reached
17.3 KB
OEBPS/error_logging.xhtml
Max HTML report size reached
1.2 KB
OEBPS/content.opf
1.17 KB
OEBPS/content.opf
Max HTML report size reached
35.0 KB
OEBPS/appup.xhtml
Max HTML report size reached
11.1 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/script.html
    
Offset 138, 28 lines modifiedOffset 138, 28 lines modified
138 files.</p><h2·id="file-syntax"·class="section-heading">138 files.</p><h2·id="file-syntax"·class="section-heading">
139 ··<a·href="#file-syntax"·class="hover-link">139 ··<a·href="#file-syntax"·class="hover-link">
140 ····<i·class="ri-link-m"·aria-hidden="true"></i>140 ····<i·class="ri-link-m"·aria-hidden="true"></i>
141 ··</a>141 ··</a>
142 ··<span·class="text">File·Syntax</span>142 ··<span·class="text">File·Syntax</span>
143 </h2>143 </h2>
144 <p>The·boot·script·is·stored·in·a·file·with·extension·<code·class="inline">.script</code>.·The·file·has·the144 <p>The·boot·script·is·stored·in·a·file·with·extension·<code·class="inline">.script</code>.·The·file·has·the
145 following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4358480643-1">{</span><span·class="ss">script</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4358480643-2">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Vsn</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·61137bde3d9363472b2da051079ac544e4fe6f419f816d84cc0aa2fb458e108b·...·]-2">}</span><span·class="p">,</span><span·class="w">145 following·syntax:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5808508891-1">{</span><span·class="ss">script</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5808508891-2">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Vsn</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·798bdd5559b5002efe5853d19739b68c571f83e6b4a9e133fa74be903cb29e12·...·]-2">}</span><span·class="p">,</span><span·class="w">
146 ·</span><span·class="p"·data-group-id="4358480643-3">[</span><span·class="w">146 ·</span><span·class="p"·data-group-id="5808508891-3">[</span><span·class="w">
147 ··</span><span·class="p"·data-group-id="4358480643-4">{</span><span·class="ss">progress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loading</span><span·class="p"·data-group-id="4358480643-4">}</span><span·class="p">,</span><span·class="w">147 ··</span><span·class="p"·data-group-id="5808508891-4">{</span><span·class="ss">progress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loading</span><span·class="p"·data-group-id="5808508891-4">}</span><span·class="p">,</span><span·class="w">
148 ··</span><span·class="p"·data-group-id="4358480643-5">{</span><span·class="ss">preLoaded</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4358480643-6">[</span><span·class="n">Mod1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod2</spa[·...·truncated·by·diffoscope;·len:·216,·SHA:·d4635537a33332af1bf4e538ad1fc0df6293cd05ea928fabfd91568219b4bd1b·...·]-5">}</span><span·class="p">,</span><span·class="w">148 ··</span><span·class="p"·data-group-id="5808508891-5">{</span><span·class="ss">preLoaded</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5808508891-6">[</span><span·class="n">Mod1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod2</spa[·...·truncated·by·diffoscope;·len:·216,·SHA:·25d6f0e8b730ad012f6dd4889494374a26f686a32342effdc19feaefddfa934c·...·]-5">}</span><span·class="p">,</span><span·class="w">
149 ··</span><span·class="p"·data-group-id="4358480643-7">{</span><span·class="ss">path</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4358480643-8">[</span><span·class="n">Dir1</span><span·class="p">,</span><span·class="s">&quot;$ROOT/Dir&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·180,·SHA:·a336250c1638ec7f8706eb37959b93713707b6b2241722a0ad0d6864ffea168b·...·]-7">}</span><span·class="p">.</span><span·class="w">149 ··</span><span·class="p"·data-group-id="5808508891-7">{</span><span·class="ss">path</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5808508891-8">[</span><span·class="n">Dir1</span><span·class="p">,</span><span·class="s">&quot;$ROOT/Dir&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·180,·SHA:·ab55d936fc7713098fdd4048563dd1a75e52f7dbd6d367ae85b2ded0f05cc0e4·...·]-7">}</span><span·class="p">.</span><span·class="w">
150 ··</span><span·class="p"·data-group-id="4358480643-9">{</span><span·class="ss">primLoad</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4358480643-10">[</span><span·class="n">Mod1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod2</spa[·...·truncated·by·diffoscope;·len:·217,·SHA:·6782cb94e17ba3fee5d2f6e90851f7680ed573ce11e57d1197cfd606dd949b0a·...·]-9">}</span><span·class="p">,</span><span·class="w">150 ··</span><span·class="p"·data-group-id="5808508891-9">{</span><span·class="ss">primLoad</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5808508891-10">[</span><span·class="n">Mod1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mod2</spa[·...·truncated·by·diffoscope;·len:·217,·SHA:·f3779e09b5333fdd5ea87685413d3e2c140d97cfcba3d01232b2281cf73901e5·...·]-9">}</span><span·class="p">,</span><span·class="w">
151 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">151 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
152 ··</span><span·class="p"·data-group-id="4358480643-11">{</span><span·class="ss">kernel_load_completed</span><span·class="p"·data-group-id="4358480643-11">}</span><span·class="p">,</span><span·class="w">152 ··</span><span·class="p"·data-group-id="5808508891-11">{</span><span·class="ss">kernel_load_completed</span><span·class="p"·data-group-id="5808508891-11">}</span><span·class="p">,</span><span·class="w">
153 ··</span><span·class="p"·data-group-id="4358480643-12">{</span><span·class="ss">progress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loaded</span><span·class="p"·data-group-id="4358480643-12">}</span><span·class="p">,</span><span·class="w">153 ··</span><span·class="p"·data-group-id="5808508891-12">{</span><span·class="ss">progress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">loaded</span><span·class="p"·data-group-id="5808508891-12">}</span><span·class="p">,</span><span·class="w">
154 ··</span><span·class="p"·data-group-id="4358480643-13">{</span><span·class="ss">kernelProcess</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4358480643-14">{</span><span·class="n">Mod[·...·truncated·by·diffoscope;·len:·252,·SHA:·f5218736a833996053e68c7f98485eb707bbc4b210fe49ba426f7c2dc7476b32·...·]-13">}</span><span·class="p">,</span><span·class="w">154 ··</span><span·class="p"·data-group-id="5808508891-13">{</span><span·class="ss">kernelProcess</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5808508891-14">{</span><span·class="n">Mod[·...·truncated·by·diffoscope;·len:·252,·SHA:·3430e2ba436c539792bd503c753a47f8eb879b1da10ffa700bf16de3cc334d4a·...·]-13">}</span><span·class="p">,</span><span·class="w">
155 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">155 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
156 ··</span><span·class="p"·data-group-id="4358480643-15">{</span><span·class="nb">apply</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4358480643-16">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Func</span><[·...·truncated·by·diffoscope;·len:·169,·SHA:·c3aca52b5eb0d262a2d0d81780c237d92a90d0836a56b7a390e1fc6132e61918·...·]-15">}</span><span·class="p">,</span><span·class="w">156 ··</span><span·class="p"·data-group-id="5808508891-15">{</span><span·class="nb">apply</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5808508891-16">{</span><span·class="n">Mod</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Func</span><[·...·truncated·by·diffoscope;·len:·169,·SHA:·f9514c1e13a819c81b0339fab6e4d13f5619a78a68f4915d77e167ed930da498·...·]-15">}</span><span·class="p">,</span><span·class="w">
157 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">157 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
158 ··</span><span·class="p"·data-group-id="4358480643-17">{</span><span·class="ss">progress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">started</span><span·class="p"·data-group-id="4358480643-17">}</span><span·class="p"·data-group-id="4358480643-3">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·ffd82bdfd3b34dea7f4e0bc539ba3305fe2c544fe47c5d8db427fcb12849a06e·...·]-1">}</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">Name·=·string()</code></strong>·-·Defines·the·system·name.</p></li><li><p><strong><code·class="inline">Vsn·=·string()</code></strong>·-·Defines·the·system·version.</p></li><li><p><strong><code·class="inline">{progress,·Term}</code></strong>·-·Sets·the·&quot;progress&quot;·of·the·initialization·program.158 ··</span><span·class="p"·data-group-id="5808508891-17">{</span><span·class="ss">progress</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">started</span><span·class="p"·data-group-id="5808508891-17">}</span><span·class="p"·data-group-id="5808508891-3">]</span><span·class="p"[·...·truncated·by·diffoscope;·len:·26,·SHA:·683886977daf29a9749818b1009ff1c2a51ece58d0a8c8607fee0ac04620bb5d·...·]-1">}</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">Name·=·string()</code></strong>·-·Defines·the·system·name.</p></li><li><p><strong><code·class="inline">Vsn·=·string()</code></strong>·-·Defines·the·system·version.</p></li><li><p><strong><code·class="inline">{progress,·Term}</code></strong>·-·Sets·the·&quot;progress&quot;·of·the·initialization·program.
159 The·<a·href="../../../../erts-15.0.1/doc/html/init.html#get_status/0"><code·class="inline">init:get_status/0</code></a>·function·returns·the·current·value·of·the·progress,159 The·<a·href="../../../../erts-15.0.1/doc/html/init.html#get_status/0"><code·class="inline">init:get_status/0</code></a>·function·returns·the·current·value·of·the·progress,
160 which·is·<code·class="inline">{InternalStatus,Term}</code>.</p></li><li><p><strong><code·class="inline">{path,·[Dir]}</code></strong>·-·<code·class="inline">Dir</code>·is·a·string.·This·argument·sets·the·load·path·of160 which·is·<code·class="inline">{InternalStatus,Term}</code>.</p></li><li><p><strong><code·class="inline">{path,·[Dir]}</code></strong>·-·<code·class="inline">Dir</code>·is·a·string.·This·argument·sets·the·load·path·of
161 the·system·to·<code·class="inline">[Dir]</code>.·The·load·path·used·to·load·modules·is·obtained·from·the161 the·system·to·<code·class="inline">[Dir]</code>.·The·load·path·used·to·load·modules·is·obtained·from·the
162 initial·load·path,·which·is·given·in·the·script·file,·together·with·any·path162 initial·load·path,·which·is·given·in·the·script·file,·together·with·any·path
163 flags·that·were·supplied·in·the·command-line·arguments.·The·command-line163 flags·that·were·supplied·in·the·command-line·arguments.·The·command-line
164 arguments·modify·the·path·as·follows:</p><ul><li><code·class="inline">-pa·Dir1·Dir2·...·DirN</code>·adds·the·directories164 arguments·modify·the·path·as·follows:</p><ul><li><code·class="inline">-pa·Dir1·Dir2·...·DirN</code>·adds·the·directories
165 <code·class="inline">DirN,·DirN-1,·...,·Dir2,·Dir1</code>·to·the·front·of·the·initial·load·path.</li><li><code·class="inline">-pz·Dir1·Dir2·...·DirN</code>·adds·the·directories·<code·class="inline">Dir1,·Dir2,·...,·DirN</code>·to·the165 <code·class="inline">DirN,·DirN-1,·...,·Dir2,·Dir1</code>·to·the·front·of·the·initial·load·path.</li><li><code·class="inline">-pz·Dir1·Dir2·...·DirN</code>·adds·the·directories·<code·class="inline">Dir1,·Dir2,·...,·DirN</code>·to·the
626 B
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-95FEDC9E.js"></script>124 <script·src="dist/search_data-51E6247B.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
620 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp.epub
12.3 KB
zipinfo {}
Max HTML report size reached
193 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
5.39 KB
OEBPS/snmpm.xhtml
Max HTML report size reached
23.9 KB
OEBPS/snmpa.xhtml
Max HTML report size reached
2.4 KB
OEBPS/snmp_pdus.xhtml
    
Offset 25, 16 lines modifiedOffset 25, 16 lines modified
25 ······<section·id="moduledoc"·class="docstring">25 ······<section·id="moduledoc"·class="docstring">
26 <p>Encode·and·Decode·Functions·for·SNMP·PDUs</p><p>RFC1157,·RFC1905·and/or·RFC2272·should·be·studied·carefully·before·using·this26 <p>Encode·and·Decode·Functions·for·SNMP·PDUs</p><p>RFC1157,·RFC1905·and/or·RFC2272·should·be·studied·carefully·before·using·this
27 module,·<code·class="inline">snmp_pdus</code>.</p><p>The·module·<code·class="inline">snmp_pdus</code>·contains·functions·for·encoding·and·decoding·of·SNMP27 module,·<code·class="inline">snmp_pdus</code>.</p><p>The·module·<code·class="inline">snmp_pdus</code>·contains·functions·for·encoding·and·decoding·of·SNMP
28 protocol·data·units·(PDUs).·In·short,·this·module·converts·a·list·of·bytes·to28 protocol·data·units·(PDUs).·In·short,·this·module·converts·a·list·of·bytes·to
29 Erlang·record·representations·and·vice·versa.·The·record·definitions·can·be29 Erlang·record·representations·and·vice·versa.·The·record·definitions·can·be
30 found·in·the·file·<code·class="inline">snmp/include/snmp_types.hrl</code>.·If·snmpv3·is·used,·the·module30 found·in·the·file·<code·class="inline">snmp/include/snmp_types.hrl</code>.·If·snmpv3·is·used,·the·module
31 that·includes·<code·class="inline">snmp_types.hrl</code>·must·define·the·constant·<code·class="inline">SNMP_USE_V3</code>·before·the31 that·includes·<code·class="inline">snmp_types.hrl</code>·must·define·the·constant·<code·class="inline">SNMP_USE_V3</code>·before·the
32 header·file·is·included.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p">-</samp><samp·class="na">define</samp><samp·class="p"·data-group-id="5848074923-1">(</samp><samp·class="n">SNMP_USE_V3</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">true</samp><samp·class="p"·data-group-id="5848074923-1">)</samp><samp·class="p">.</samp><samp·class="w">32 header·file·is·included.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p">-</samp><samp·class="na">define</samp><samp·class="p"·data-group-id="9055139244-1">(</samp><samp·class="n">SNMP_USE_V3</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">true</samp><samp·class="p"·data-group-id="9055139244-1">)</samp><samp·class="p">.</samp><samp·class="w">
33 </samp><samp·class="p">-</samp><samp·class="na">include_lib</samp><samp·class="p"·data-group-id="5848074923-2">(</samp><samp·class="s">&quot;snmp/include/snmp_types.hrl&quot;</samp><samp·class="p"·data-group-id="5848074923-2">)</samp><samp·class="p">.</samp></code></pre><p>Encoding·and·decoding·must·be·done·explicitly·when·writing·your·own·Net·if33 </samp><samp·class="p">-</samp><samp·class="na">include_lib</samp><samp·class="p"·data-group-id="9055139244-2">(</samp><samp·class="s">&quot;snmp/include/snmp_types.hrl&quot;</samp><samp·class="p"·data-group-id="9055139244-2">)</samp><samp·class="p">.</samp></code></pre><p>Encoding·and·decoding·must·be·done·explicitly·when·writing·your·own·Net·if
34 process.</p>34 process.</p>
35 ······</section>35 ······</section>
  
  
36 ······<section·id="summary"·class="details-list">36 ······<section·id="summary"·class="details-list">
37 ········<h1·class="section-heading">Summary</h1>37 ········<h1·class="section-heading">Summary</h1>
38 <div·class="summary-types·summary">38 <div·class="summary-types·summary">
7.26 KB
OEBPS/snmp_mib_compiler.xhtml
Max HTML report size reached
7.0 KB
OEBPS/snmp_manager_config_files.xhtml
Max HTML report size reached
19.8 KB
OEBPS/snmp_instr_functions.xhtml
Max HTML report size reached
6.5 KB
OEBPS/snmp_index.xhtml
Max HTML report size reached
174 KB
OEBPS/snmp_impl_example_agent.xhtml
Max HTML report size reached
18.8 KB
OEBPS/snmp_generic.xhtml
Max HTML report size reached
34.8 KB
OEBPS/snmp_config.xhtml
Max HTML report size reached
43.5 KB
OEBPS/snmp_app.xhtml
Max HTML report size reached
6.77 KB
OEBPS/snmp_agent_funct_descr.xhtml
Max HTML report size reached
20.6 KB
OEBPS/snmp_agent_config_files.xhtml
Max HTML report size reached
30.0 KB
OEBPS/snmp_advanced_agent.xhtml
Max HTML report size reached
10.2 KB
OEBPS/snmp.xhtml
Max HTML report size reached
3.66 KB
OEBPS/content.opf
3.63 KB
OEBPS/content.opf
Max HTML report size reached
10.3 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp.html
    
Offset 3339, 16 lines modifiedOffset 3339, 16 lines modified
3339 ······<div·class="specs">3339 ······<div·class="specs">
  
3340 ··········<pre·translate="no"><span·class="attribute">-spec</span>·print_version_info(Prefix)·->·<a·href="#t:void/0">void</a>()·when·Prefix·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>().</pre>3340 ··········<pre·translate="no"><span·class="attribute">-spec</span>·print_version_info(Prefix)·->·<a·href="#t:void/0">void</a>()·when·Prefix·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>().</pre>
  
3341 ······</div>3341 ······</div>
  
3342 <p>Utility·function(s)·to·produce·a·formatted·printout·of·the·versions·info3342 <p>Utility·function(s)·to·produce·a·formatted·printout·of·the·versions·info
3343 generated·by·the·<code·class="inline">versions1</code>·function</p><p>This·is·the·same·as·doing,·e.g.:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">···········</span><span·class="p"·data-group-id="8860616218-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p"·data-group-id="8860616218-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">versions1</span><span·class="p"·data-group-id="8860616218-2">(</span><span·class="p"·data-group-id="8860616218-2">)</span><span·class="p">,</span><span·class="w"> 
3344 ···········</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">print_versions</span><span·class="p"·data-group-id="8860616218-3">(</span><span·class="n">V</span><span·class="p"·data-group-id="8860616218-3">)</span><span·class="p">.<[·...·truncated·by·diffoscope;·len:·18,·SHA:·aa6285803019735a1e142dd0f052e377f4e11767187e5c1060f3bd4bfb9428ac·...·]>3343 generated·by·the·<code·class="inline">versions1</code>·function</p><p>This·is·the·same·as·doing,·e.g.:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">···········</span><span·class="p"·data-group-id="0920359806-1">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·438,·SHA:·4d9ed6835f4fc20d72ee3a8517998a5bb77ffcd7d387fac19d2a795ba5064eb5·...·]>
 3344 ···········</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">print_versions</span><span·class="p"·data-group-id="0920359806-3">(</span><span·class="n">V</span><span·class="p"·data-group-id="0920359806-3">)</span><span·class="p">.</span></code></pre>
3345 ··</section>3345 ··</section>
3346 </section>3346 </section>
3347 <section·class="detail"·id="print_versions/1">3347 <section·class="detail"·id="print_versions/1">
  
3348 ··<div·class="detail-header">3348 ··<div·class="detail-header">
3349 ····<a·href="#print_versions/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3349 ····<a·href="#print_versions/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3350 ······<i·class="ri-link-m"·aria-hidden="true"></i>3350 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 3401, 16 lines modifiedOffset 3401, 16 lines modified
3401 ····························Prefix·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),3401 ····························Prefix·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),
3402 ····························Versions·::·[VersionInfo],3402 ····························Versions·::·[VersionInfo],
3403 ····························VersionInfo·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>3403 ····························VersionInfo·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3404 ······</div>3404 ······</div>
  
3405 <p>Utility·function·to·produce·a·formatted·printout·of·the·versions·info·generated3405 <p>Utility·function·to·produce·a·formatted·printout·of·the·versions·info·generated
3406 by·the·<code·class="inline">versions1</code>·and·<code·class="inline">versions2</code>·functions</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">···········</span><span·class="p"·data-group-id="0896570720-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p"·data-group-id="0896570720-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">versions1</span><span·class="p"·data-group-id="0896570720-2">(</span><span·class="p"·data-group-id="0896570720-2">)</span><span·class="p">,</span><span·class="w"> 
3407 ···········</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">print_versions</span><span·class="p"·data-group-id="0896570720-3">(</span><span·class="n">V</span><span·class="p"·data-group-id="0896570720-3">)</span><span·class="p">.<[·...·truncated·by·diffoscope;·len:·18,·SHA:·aa6285803019735a1e142dd0f052e377f4e11767187e5c1060f3bd4bfb9428ac·...·]>3406 by·the·<code·class="inline">versions1</code>·and·<code·class="inline">versions2</code>·functions</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">···········</span><span·class="p"·data-group-id="4323760131-1">{</span><span·[·...·truncated·by·diffoscope;·len:·447,·SHA:·c09d5af2193049855d57f812f49f0227cd15836aaa46550cd6d9504598fc5ecd·...·]>
 3407 ···········</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">print_versions</span><span·class="p"·data-group-id="4323760131-3">(</span><span·class="n">V</span><span·class="p"·data-group-id="4323760131-3">)</span><span·class="p">.</span></code></pre>
3408 ··</section>3408 ··</section>
3409 </section>3409 </section>
3410 <section·class="detail"·id="read_mib/1">3410 <section·class="detail"·id="read_mib/1">
  
3411 ··<div·class="detail-header">3411 ··<div·class="detail-header">
3412 ····<a·href="#read_mib/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3412 ····<a·href="#read_mib/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3413 ······<i·class="ri-link-m"·aria-hidden="true"></i>3413 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 3538, 25 lines modifiedOffset 3538, 25 lines modified
3538 ·······················TraceOpt·::·{timestamp,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()}·|·TargetOpt.</pre>3538 ·······················TraceOpt·::·{timestamp,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()}·|·TargetOpt.</pre>
  
3539 ······</div>3539 ······</div>
  
3540 <p>This·function·is·used·to·set·up·trace·on·function(s)·for·the·given·module·or3540 <p>This·function·is·used·to·set·up·trace·on·function(s)·for·the·given·module·or
3541 modules.</p><p>The·example·below·sets·up·trace·on·the·exported·functions·(default)·of·module3541 modules.</p><p>The·example·below·sets·up·trace·on·the·exported·functions·(default)·of·module
3542 <code·class="inline">snmp_generic</code>·and·all·functions·of·module·<code·class="inline">snmp_generic_mnesia</code>.·With·return3542 <code·class="inline">snmp_generic</code>·and·all·functions·of·module·<code·class="inline">snmp_generic_mnesia</code>.·With·return
3543 values·(which·is·default)·and·timestamps·in·both·cases·(which·is·also·default):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»    ··</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">enable_trace</span><span·class="p"·data-group-id="1298472204-1">(</span><span·class="p"·data-group-id="1298472204-1">)</span><span·class="p">,</span><span·class="w">3543 values·(which·is·default)·and·timestamps·in·both·cases·(which·is·also·default):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»    ··</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">enable_trace</span><span·class="p"·data-group-id="1456894603-1">(</span><span·class="p"·data-group-id="1456894603-1">)</span><span·class="p">,</span><span·class="w">
3544 »       ··</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">set_trace</span><span·class="p"·data-group-id="1298472204-2">(</span><span·class="p"·data-group-id="1298472204-3">[</span><span·class="ss">snmp_generic</span><span·class="p">,</span><span·class="w">3544 »       ··</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">set_trace</span><span·class="p"·data-group-id="1456894603-2">(</span><span·class="p"·data-group-id="1456894603-3">[</span><span·class="ss">snmp_generic</span><span·class="p">,</span><span·class="w">
3545 ··························</span><span·class="p"·data-group-id="1298472204-4">{</span><span·class="ss">snmp_generic_mnesia</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1298472204-5">[</span><span·class="p"·data-group-id="1298472204-6">{</span><span·class="ss">scope</span><span·cla[·...·truncated·by·diffoscope;·len:·329,·SHA:·ba3f7515591e53549f629d3cddd483553137ebb3a78f39fb9258e26ecdb1b93c·...·]-2">)</span><span·class="p">,</span><span·class="w">3545 ··························</span><span·class="p"·data-group-id="1456894603-4">{</span><span·class="ss">snmp_generic_mnesia</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1456894603-5">[</span><span·class="p"·data-group-id="1456894603-6">{</span><span·class="ss">scope</span><span·cla[·...·truncated·by·diffoscope;·len:·329,·SHA:·b09e8672cab1d3c2e5bb8ba9a56ef5440e8b6a9a92e569bedd3e0f40b34fd05f·...·]-2">)</span><span·class="p">,</span><span·class="w">
3546 »       ··</span><span·class="p">.</span><span·class="w">3546 »       ··</span><span·class="p">.</span><span·class="w">
3547 »       ··</span><span·class="p">.</span><span·class="w">3547 »       ··</span><span·class="p">.</span><span·class="w">
3548 »       ··</span><span·class="p">.</span><span·class="w">3548 »       ··</span><span·class="p">.</span><span·class="w">
3549 ··········</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">set_trace</span><span·class="p"·data-group-id="1298472204-7">(</span><span·class="ss">snmp_generic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disable</span><span·class="p"·data-group-id="1298472204-7">)</span><span·class="p">,</span><span·class="w">3549 ··········</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">set_trace</span><span·class="p"·data-group-id="1456894603-7">(</span><span·class="ss">snmp_generic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disable</span><span·class="p"·data-group-id="1456894603-7">)</span><span·class="p">,</span><span·class="w">
3550 »       ··</span><span·class="p">.</span><span·class="w">3550 »       ··</span><span·class="p">.</span><span·class="w">
3551 »       ··</span><span·class="p">.</span><span·class="w">3551 »       ··</span><span·class="p">.</span><span·class="w">
3552 »       ··</span><span·class="p">.</span><span·class="w">3552 »       ··</span><span·class="p">.</span><span·class="w">
3553 »       ··</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">disable_trace</span><span·class="p"·data-group-id="1298472204-8">(</span><span·class="p"·data-group-id="1298472204-8">)</span><span·class="p">,</span></code></pre>3553 »       ··</span><span·class="nc">snmp</span><span·class="p">:</span><span·class="nf">disable_trace</span><span·class="p"·data-group-id="1456894603-8">(</span><span·class="p"·data-group-id="1456894603-8">)</span><span·class="p">,</span></code></pre>
3554 ··</section>3554 ··</section>
3555 </section>3555 </section>
3556 <section·class="detail"·id="start/0">3556 <section·class="detail"·id="start/0">
  
3557 ··<div·class="detail-header">3557 ··<div·class="detail-header">
3558 ····<a·href="#start/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3558 ····<a·href="#start/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3559 ······<i·class="ri-link-m"·aria-hidden="true"></i>3559 ······<i·class="ri-link-m"·aria-hidden="true"></i>
30.1 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_advanced_agent.html
    
Offset 325, 74 lines modifiedOffset 325, 74 lines modified
325 ·······::=·{·empTable·1·}325 ·······::=·{·empTable·1·}
326 ·······EmpEntry·::=326 ·······EmpEntry·::=
327 ··············SEQUENCE·{327 ··············SEQUENCE·{
328 ··················empDepNo·········INTEGER,328 ··················empDepNo·········INTEGER,
329 ··················empName··········DisplayString,329 ··················empName··········DisplayString,
330 ··················empTelNo·········DisplayString,330 ··················empTelNo·········DisplayString,
331 ··················empStatus········RowStatus331 ··················empStatus········RowStatus
332 ··············}</code></pre><p>The·corresponding·Mnesia·table·is·specified·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="5600772627-1">(</span><span·class="p"·data-group-id="5600772627-2">[</span><span·class="p"·data-group-id="5600772627-3">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">employees</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·ec6c899bb94411dc7e010bb1c7c2c41ab300f47ecf063cbed65adec3bf05104f·...·]-3">}</span><span·class="p">,</span><span·class="w">332 ··············}</code></pre><p>The·corresponding·Mnesia·table·is·specified·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4967425585-1">(</span><span·class="p"·data-group-id="4967425585-2">[</span><span·class="p"·data-group-id="4967425585-3">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">employees</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·616008c8a7cf2feb226117a4f2632403997ec963e8fc197ae63da8e92d084a7e·...·]-3">}</span><span·class="p">,</span><span·class="w">
333 ·····················</span><span·class="p"·data-group-id="5600772627-4">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5600772627-5">[</span><span·class="p"·data-group-id="5600772627-6">{</span><span·class="ss">key</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·385,·SHA:·169fa94608074d6e5df91c3fe364556915d3ba6c86d09c6ba9e153a33edf2370·...·]-4">}</span><span·class="p">,</span><span·class="w">333 ·····················</span><span·class="p"·data-group-id="4967425585-4">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4967425585-5">[</span><span·class="p"·data-group-id="4967425585-6">{</span><span·class="ss">key</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·385,·SHA:·d84513e09324084e5bbad3de2b0c5ad6954aaaa4e161c2beeea3eda172ae7ef1·...·]-4">}</span><span·class="p">,</span><span·class="w">
334 ·····················</span><span·class="p"·data-group-id="5600772627-8">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5600772627-9">[</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">telno</[·...·truncated·by·diffoscope;·len:·287,·SHA:·5c41833fa39bcc056e5d7ece39dff89892001b7931f958e9d7dafb82a4a3e787·...·]-1">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>In·the·Mnesia·tables,·the·two·key·columns·are·stored·as·a·tuple·with·two334 ·····················</span><span·class="p"·data-group-id="4967425585-8">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4967425585-9">[</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">telno</[·...·truncated·by·diffoscope;·len:·287,·SHA:·395d8978095fc834e38aad4b698612e8d7689b62987f6c9a108243d46b70ee99·...·]-1">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>In·the·Mnesia·tables,·the·two·key·columns·are·stored·as·a·tuple·with·two
335 elements.·Therefore,·the·arity·of·the·table·is·3.</p></blockquote><h3·id="instrumentation-functions"·class="section-heading">335 elements.·Therefore,·the·arity·of·the·table·is·3.</p></blockquote><h3·id="instrumentation-functions"·class="section-heading">
336 ··<a·href="#instrumentation-functions"·class="hover-link">336 ··<a·href="#instrumentation-functions"·class="hover-link">
337 ····<i·class="ri-link-m"·aria-hidden="true"></i>337 ····<i·class="ri-link-m"·aria-hidden="true"></i>
338 ··</a>338 ··</a>
339 ··<span·class="text">Instrumentation·Functions</span>339 ··<span·class="text">Instrumentation·Functions</span>
340 </h3>340 </h3>
341 <p>The·MIB·table·shown·in·the·previous·section·can·be·compiled·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="1787319500-1">(</span><span·class="s">&quot;EmpMIB&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1787319500-2">[</span><span·class="p"·data-group-id="1787319500-3">{</span><span·class="ss">db</span><span·class="[·...·truncated·by·diffoscope;·len:·212,·SHA:·c477f26db10ab4849515a3404b44a0b4995acce6a611ec0a818ad85906bcd785·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·is·all·that·has·to·be·done!·Now·the·manager·can·read,·add,·and·modify341 <p>The·MIB·table·shown·in·the·previous·section·can·be·compiled·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="7814507037-1">(</span><span·class="s">&quot;EmpMIB&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7814507037-2">[</span><span·class="p"·data-group-id="7814507037-3">{</span><span·class="ss">db</span><span·class="[·...·truncated·by·diffoscope;·len:·212,·SHA:·7c4f60bedf040dce79b4510938fa3828f0823d66e499f30c54c43836a173ffde·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·is·all·that·has·to·be·done!·Now·the·manager·can·read,·add,·and·modify
342 rows.·Also,·you·can·use·the·ordinary·Mnesia·API·to·access·the·table·from·your342 rows.·Also,·you·can·use·the·ordinary·Mnesia·API·to·access·the·table·from·your
343 programs.·The·only·explicit·action·is·to·create·the·Mnesia·table,·an·action·the343 programs.·The·only·explicit·action·is·to·create·the·Mnesia·table,·an·action·the
344 user·has·to·perform·in·order·to·create·the·required·table·schemas.</p><h3·id="adding-own-actions"·class="section-heading">344 user·has·to·perform·in·order·to·create·the·required·table·schemas.</p><h3·id="adding-own-actions"·class="section-heading">
345 ··<a·href="#adding-own-actions"·class="hover-link">345 ··<a·href="#adding-own-actions"·class="hover-link">
346 ····<i·class="ri-link-m"·aria-hidden="true"></i>346 ····<i·class="ri-link-m"·aria-hidden="true"></i>
347 ··</a>347 ··</a>
348 ··<span·class="text">Adding·Own·Actions</span>348 ··<span·class="text">Adding·Own·Actions</span>
349 </h3>349 </h3>
350 <p>It·is·often·necessary·to·take·some·specific·action·when·a·table·is·modified.350 <p>It·is·often·necessary·to·take·some·specific·action·when·a·table·is·modified.
351 This·is·accomplished·with·an·instrumentation·function.·It·executes·some·specific351 This·is·accomplished·with·an·instrumentation·function.·It·executes·some·specific
352 code·when·the·table·is·set,·and·passes·all·other·requests·down·to·the352 code·when·the·table·is·set,·and·passes·all·other·requests·down·to·the
353 pre-defined·function.</p><p>The·following·example·illustrates·this·idea:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">emp_table</span><span·class="p"·data-group-id="7424279251-1">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="7424279251-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">353 pre-defined·function.</p><p>The·following·example·illustrates·this·idea:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">emp_table</span><span·class="p"·data-group-id="9146569794-1">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="9146569794-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
354 ····</span><span·class="nf">notify_internal_resources</span><span·class="p"·data-group-id="7424279251-2">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="7424279251-2">)</span><span·class="p">,</span><span·class="w">354 ····</span><span·class="nf">notify_internal_resources</span><span·class="p"·data-group-id="9146569794-2">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="9146569794-2">)</span><span·class="p">,</span><span·class="w">
355 ····</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="7424279251-3">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·252,·SHA:·d5ac7a3c49205e234ec47f75195f13173a47f4abff497395bf7eac21cd848793·...·]-3">)</span><span·class="p">;</span><span·class="w">355 ····</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="9146569794-3">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·252,·SHA:·df239cfa12190e228cdf3c9a17e3249be5b66a6c09d87894916fc2b66ba6901e·...·]-3">)</span><span·class="p">;</span><span·class="w">
356 </span><span·class="nf">emp_table</span><span·class="p"·data-group-id="7424279251-5">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="7424279251-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">356 </span><span·class="nf">emp_table</span><span·class="p"·data-group-id="9146569794-5">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="9146569794-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
357 ····</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="7424279251-6">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·250,·SHA:·9ef7f498ffadab9ab9062955d4416050d15c9a4c8301c8ce151356faab0e0e9e·...·]-6">)</span><span·class="p">.</span></code></pre><p>The·default·instrumentation·functions·are·defined·in·the·module·<code·class="inline">snmp_generic</code>.357 ····</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="9146569794-6">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·250,·SHA:·1522850d14a42e455808148cb541a853aa0f12bc72590f382daa5db1b260969c·...·]-6">)</span><span·class="p">.</span></code></pre><p>The·default·instrumentation·functions·are·defined·in·the·module·<code·class="inline">snmp_generic</code>.
358 Refer·to·the·Reference·Manual,·section·SNMP,·module·<code·class="inline">snmp_generic</code>·for·details.</p><h3·id="extending-the-mnesia-table"·class="section-heading">358 Refer·to·the·Reference·Manual,·section·SNMP,·module·<code·class="inline">snmp_generic</code>·for·details.</p><h3·id="extending-the-mnesia-table"·class="section-heading">
359 ··<a·href="#extending-the-mnesia-table"·class="hover-link">359 ··<a·href="#extending-the-mnesia-table"·class="hover-link">
360 ····<i·class="ri-link-m"·aria-hidden="true"></i>360 ····<i·class="ri-link-m"·aria-hidden="true"></i>
361 ··</a>361 ··</a>
362 ··<span·class="text">Extending·the·Mnesia·Table</span>362 ··<span·class="text">Extending·the·Mnesia·Table</span>
363 </h3>363 </h3>
364 <p>A·table·may·contain·columns·that·are·used·internally,·but·should·not·be·visible364 <p>A·table·may·contain·columns·that·are·used·internally,·but·should·not·be·visible
365 to·a·manager.·These·internal·columns·must·be·the·last·columns·in·the·table.·The365 to·a·manager.·These·internal·columns·must·be·the·last·columns·in·the·table.·The
366 <code·class="inline">set</code>·operation·will·not·work·with·this·arrangement,·because·there·are·columns366 <code·class="inline">set</code>·operation·will·not·work·with·this·arrangement,·because·there·are·columns
367 that·the·agent·does·not·know·about.·This·situation·is·handled·by·adding·values367 that·the·agent·does·not·know·about.·This·situation·is·handled·by·adding·values
368 for·the·internal·columns·in·the·<code·class="inline">set</code>·function.</p><p>To·illustrate·this,·suppose·we·extend·our·Mnesia·<code·class="inline">empTable</code>·with·one·internal368 for·the·internal·columns·in·the·<code·class="inline">set</code>·function.</p><p>To·illustrate·this,·suppose·we·extend·our·Mnesia·<code·class="inline">empTable</code>·with·one·internal
369 column.·We·create·it·as·before,·but·with·an·arity·of·4,·by·adding·another369 column.·We·create·it·as·before,·but·with·an·arity·of·4,·by·adding·another
370 attribute.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="4385539239-1">(</span><span·class="p"·data-group-id="4385539239-2">[</span><span·class="p"·data-group-id="4385539239-3">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">employees</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·225669e5f636a2e0c28df7dae4756d18f3f4def8797bfa1af2d129d3f594e46e·...·]-3">}</span><span·class="p">,</span><span·class="w">370 attribute.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">mnesia</span><span·class="p">:</span><span·class="nf">create_table</span><span·class="p"·data-group-id="7724944375-1">(</span><span·class="p"·data-group-id="7724944375-2">[</span><span·class="p"·data-group-id="7724944375-3">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">employees</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·c7ecf4a57465c62a23834728497ebe73b92eedc5663d0f769a41036dee8638b4·...·]-3">}</span><span·class="p">,</span><span·class="w">
371 ·····················</span><span·class="p"·data-group-id="4385539239-4">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4385539239-5">[</span><span·class="p"·data-group-id="4385539239-6">{</span><span·class="ss">key</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·385,·SHA:·9b501cff53ab8368a4b684acd8cf6526d492866a172ff3eeb07cb9212a387367·...·]-4">}</span><span·class="p">,</span><span·class="w">371 ·····················</span><span·class="p"·data-group-id="7724944375-4">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7724944375-5">[</span><span·class="p"·data-group-id="7724944375-6">{</span><span·class="ss">key</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·385,·SHA:·798e5898997e1abe2d7f4ccba56fbe505e90588060e122bf9eaf89b388d1947e·...·]-4">}</span><span·class="p">,</span><span·class="w">
372 ·····················</span><span·class="p"·data-group-id="4385539239-8">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4385539239-9">{</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">telno</[·...·truncated·by·diffoscope;·len:·371,·SHA:·0d2e0c6f31127fcd19b43dc1fc029788bcb9b1fb1363403ff2100853465c0bf6·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·last·column·is·the·internal·column.·When·performing·a·<code·class="inline">set</code>·operation,·which372 ·····················</span><span·class="p"·data-group-id="7724944375-8">{</span><span·class="ss">attributes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7724944375-9">{</span><span·class="ss">key</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">telno</[·...·truncated·by·diffoscope;·len:·371,·SHA:·9e34ee918074b486d1ec87f138cfec0baf35a938eb6c080215b188fc4df16ebd·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·last·column·is·the·internal·column.·When·performing·a·<code·class="inline">set</code>·operation,·which
373 creates·a·row,·we·must·give·a·value·to·the·internal·column.·The·instrumentation373 creates·a·row,·we·must·give·a·value·to·the·internal·column.·The·instrumentation
374 functions·will·now·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6535034192-1">(</span><span·class="ss">createAndGo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="6535034192-1">)</span><span·class="p">.</span><span·class="w">374 functions·will·now·look·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="5868156297-1">(</span><span·class="ss">createAndGo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="5868156297-1">)</span><span·class="p">.</span><span·class="w">
375 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6535034192-2">(</span><span·class="ss">createAndWait</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="6535034192-2">)</span><span·class="p">.</span><span·class="w">375 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="5868156297-2">(</span><span·class="ss">createAndWait</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="5868156297-2">)</span><span·class="p">.</span><span·class="w">
  
376 </span><span·class="nf">emp_table</span><span·class="p"·data-group-id="6535034192-3">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6535034192-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">376 </span><span·class="nf">emp_table</span><span·class="p"·data-group-id="5868156297-3">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="5868156297-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
377 ··</span><span·class="nf">notify_internal_resources</span><span·class="p"·data-group-id="6535034192-4">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6535034192-4">)</span><span·class="p">,</span><span·class="w">377 ··</span><span·class="nf">notify_internal_resources</span><span·class="p"·data-group-id="5868156297-4">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="5868156297-4">)</span><span·class="p">,</span><span·class="w">
378 ··</span><span·class="n">NewCols</span><span·class="w">·</span><span·class="o">=</span><span·class="w">378 ··</span><span·class="n">NewCols</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
379 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">is_row_created</span><span·class="p"·data-group-id="6535034192-5">(</span><span·class="ss">empTable</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6535034192-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">379 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">is_row_created</span><span·class="p"·data-group-id="5868156297-5">(</span><span·class="ss">empTable</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="5868156297-5">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
380 ······</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Cols</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="6535034192-6">[</span><span·class="p"·data-group-id="6535034192-7">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;internal&quot;</span><span·class="p"·data-group-id="6535034192-7">}</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·120965a6abb30406d9d5eefeab76e7f0d254dcfeea6b3ff0903195e503cd5f90·...·]-6">]</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·add·internal·column</span><span·class="w">380 ······</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Cols</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="5868156297-6">[</span><span·class="p"·data-group-id="5868156297-7">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;internal&quot;</span><span·class="p"·data-group-id="5868156297-7">}</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·f8a7802e7d7fc7216d67bfa3bed0dc692a8fc8ba97bbad4a2a72bd82331186ed·...·]-6">]</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·add·internal·column</span><span·class="w">
381 ······</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Cols</span><span·class="w">······················</span><span·class="c1">%·keep·original·cols</span><span·class="w">381 ······</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Cols</span><span·class="w">······················</span><span·class="c1">%·keep·original·cols</span><span·class="w">
382 ··</span><span·class="k">end</span><span·class="p">,</span><span·class="w">382 ··</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
383 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="6535034192-8">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewCols</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·255,·SHA:·5a08f53ef2663a627ac0943cf6c148ef7ea00e6439dce0a7563aa1a7d58bca29·...·]-8">)</span><span·class="p">;</span><span·class="w">383 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="5868156297-8">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewCols</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·255,·SHA:·590e9234145e126fdc5c5a7e726bef6d886974fb6a37a8bfa68623c1e306406e·...·]-8">)</span><span·class="p">;</span><span·class="w">
384 </span><span·class="nf">emp_table</span><span·class="p"·data-group-id="6535034192-10">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6535034192-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">384 </span><span·class="nf">emp_table</span><span·class="p"·data-group-id="5868156297-10">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="5868156297-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
385 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="6535034192-11">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·253,·SHA:·266fe1283fa4b33223159eab2eb44321c09ce78bc63e3faaaca9cb70af5bd27b·...·]-11">)</span><span·class="p">.</span><span·class="w">385 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="5868156297-11">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·253,·SHA:·2112b8e9664de84cbe64d448da6bf37e66a7f1cc179ff971c97eadf6c9f92793·...·]-11">)</span><span·class="p">.</span><span·class="w">
  
386 </span><span·class="nf">is_row_created</span><span·class="p"·data-group-id="6535034192-13">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6535034192-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">386 </span><span·class="nf">is_row_created</span><span·class="p"·data-group-id="5868156297-13">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="5868156297-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
387 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">get_status_col</span><span·class="p"·data-group-id="6535034192-14">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6535034192-14">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">387 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">get_status_col</span><span·class="p"·data-group-id="5868156297-14">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="5868156297-14">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
388 ····</span><span·class="p"·data-group-id="6535034192-15">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">createAndGo</span><span·class="p"·data-group-id="6535034192-15">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">388 ····</span><span·class="p"·data-group-id="5868156297-15">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">createAndGo</span><span·class="p"·data-group-id="5868156297-15">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
389 ····</span><span·class="p"·data-group-id="6535034192-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">createAndWait</span><span·class="p"·data-group-id="6535034192-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">389 ····</span><span·class="p"·data-group-id="5868156297-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="ss">createAndWait</span><span·class="p"·data-group-id="5868156297-16">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
390 ····</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">390 ····</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">
391 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>If·a·row·is·created,·we·always·set·the·internal·column·to·<code·class="inline">&quot;internal&quot;</code>.</p><h2·id="deviations-from-the-standard"·class="section-heading">391 ··</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>If·a·row·is·created,·we·always·set·the·internal·column·to·<code·class="inline">&quot;internal&quot;</code>.</p><h2·id="deviations-from-the-standard"·class="section-heading">
392 ··<a·href="#deviations-from-the-standard"·class="hover-link">392 ··<a·href="#deviations-from-the-standard"·class="hover-link">
393 ····<i·class="ri-link-m"·aria-hidden="true"></i>393 ····<i·class="ri-link-m"·aria-hidden="true"></i>
394 ··</a>394 ··</a>
395 ··<span·class="text">Deviations·from·the·Standard</span>395 ··<span·class="text">Deviations·from·the·Standard</span>
396 </h2>396 </h2>
20.7 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_agent_config_files.html
    
Offset 146, 27 lines modifiedOffset 146, 27 lines modified
146 ····<i·class="ri-link-m"·aria-hidden="true"></i>146 ····<i·class="ri-link-m"·aria-hidden="true"></i>
147 ··</a>147 ··</a>
148 ··<span·class="text">Agent·Information</span>148 ··<span·class="text">Agent·Information</span>
149 </h2>149 </h2>
150 <p>The·agent·information·should·be·stored·in·a·file·called·<code·class="inline">agent.conf</code>.</p><p>Each·entry·is·a·tuple·of·size·two:</p><p><code·class="inline">{AgentVariable,·Value}.</code></p><ul><li><code·class="inline">AgentVariable</code>·is·one·of·the·variables·in·SNMP-FRAMEWORK-MIB·or·one·of·the150 <p>The·agent·information·should·be·stored·in·a·file·called·<code·class="inline">agent.conf</code>.</p><p>Each·entry·is·a·tuple·of·size·two:</p><p><code·class="inline">{AgentVariable,·Value}.</code></p><ul><li><code·class="inline">AgentVariable</code>·is·one·of·the·variables·in·SNMP-FRAMEWORK-MIB·or·one·of·the
151 internal·variables·<code·class="inline">intAgentUDPPort</code>,·which·defines·which·UDP·port·the·agent151 internal·variables·<code·class="inline">intAgentUDPPort</code>,·which·defines·which·UDP·port·the·agent
152 listens·to,·or·<code·class="inline">intAgentTransports</code>,·which·defines·the·transport·domains·and152 listens·to,·or·<code·class="inline">intAgentTransports</code>,·which·defines·the·transport·domains·and
153 addresses·of·the·agent.</li><li><code·class="inline">Value</code>·is·the·value·for·the·variable.</li></ul><p>The·following·example·shows·an·<code·class="inline">agent.conf</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1724664801-1">{</span><span·class="ss">intAgentUDPPort</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4000</span><span·class="p"·data-group-id="1724664801-1">}</span><span·class="p">.</span><span·class="w">153 addresses·of·the·agent.</li><li><code·class="inline">Value</code>·is·the·value·for·the·variable.</li></ul><p>The·following·example·shows·an·<code·class="inline">agent.conf</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3878957285-1">{</span><span·class="ss">intAgentUDPPort</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4000</span><span·class="p"·data-group-id="3878957285-1">}</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p"·data-group-id="1724664801-2">{</span><span·class="ss">intAgentTransports</span><span·class="p">,</span><span·class="w">154 </span><span·class="p"·data-group-id="3878957285-2">{</span><span·class="ss">intAgentTransports</span><span·class="p">,</span><span·class="w">
155 ·</span><span·class="p"·data-group-id="1724664801-3">[</span><span·class="p"·data-group-id="1724664801-4">{</span><span·class="ss">transportDomainUdpIpv4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1724664801-5">{</span><span·class="mi">141</span><span·c[·...·truncated·by·diffoscope;·len:·238,·SHA:·cef6b6cb778379abcb008519dc419ab813b28441f8ca250b75d6ddd30deda119·...·]-4">}</span><span·class="p">,</span><span·class="w">155 ·</span><span·class="p"·data-group-id="3878957285-3">[</span><span·class="p"·data-group-id="3878957285-4">{</span><span·class="ss">transportDomainUdpIpv4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3878957285-5">{</span><span·class="mi">141</span><span·c[·...·truncated·by·diffoscope;·len:·238,·SHA:·f3cd8e028be22df33eb4284687c4b40ff61df51da218353520816635c5bc6425·...·]-4">}</span><span·class="p">,</span><span·class="w">
156 ··</span><span·class="p"·data-group-id="1724664801-6">{</span><span·class="ss">transportDomainUdpIpv6</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1724664801-7">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·481,·SHA:·dfbe306b5b050c8a9c6fe08078cab8c6793187867d328f1a4b4afbdf659b8861·...·]-2">}</span><span·class="p">.</span><span·class="w">156 ··</span><span·class="p"·data-group-id="3878957285-6">{</span><span·class="ss">transportDomainUdpIpv6</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3878957285-7">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="[·...·truncated·by·diffoscope;·len:·481,·SHA:·c117516dc75b41f3249b5527fae232aca431859259ec00cc8b5db3aa6a10b3bf·...·]-2">}</span><span·class="p">.</span><span·class="w">
157 </span><span·class="p"·data-group-id="1724664801-8">{</span><span·class="ss">snmpEngineID</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;mbj&#39;s·engine&quot;</span><span·class="p"·data-group-id="1724664801-8">}</span><span·class="p">.</span><span·class="w">157 </span><span·class="p"·data-group-id="3878957285-8">{</span><span·class="ss">snmpEngineID</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;mbj&#39;s·engine&quot;</span><span·class="p"·data-group-id="3878957285-8">}</span><span·class="p">.</span><span·class="w">
158 </span><span·class="p"·data-group-id="1724664801-9">{</span><span·class="ss">snmpEngineMaxMessageSize</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">484</span><span·class="p"·data-group-id="1724664801-9">}</span><span·class="p">.</span></code></pre><p>These·are·the·supp[·...·truncated·by·diffoscope;·len:·443,·SHA:·1d52bb0a81851186ebb49d81e41a4465e92a48444a8404ca34de58f127b9c61b·...·]-1">}</span><span·class="p">.</span><span·class="w">·····················</span><span·class="c1">%·Mandatory</span><span·class="w">158 </span><span·class="p"·data-group-id="3878957285-9">{</span><span·class="ss">snmpEngineMaxMessageSize</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">484</span><span·class="p"·data-group-id="3878957285-9">}</span><span·class="p">.</span></code></pre><p>These·are·the·supp[·...·truncated·by·diffoscope;·len:·443,·SHA:·5b21c6c5860d0e8c7091c8472217e5c2d0356d014b134c6a15af7bfd5a6d451e·...·]-1">}</span><span·class="p">.</span><span·class="w">·····················</span><span·class="c1">%·Mandatory</span><span·class="w">
159 ······</span><span·class="p"·data-group-id="3031744676-3">{</span><span·class="ss">snmpEngineMaxMessageSize</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">snmp_framework_mib</span><span·class="p">:</span><span·class="nf">max_message_size</span><span·class="p"·data-group-id="3[·...·truncated·by·diffoscope;·len:·115,·SHA:·ca566472d7538b7c9a6fbc9645cabe70ce2389298cdf23cef3a309411937137b·...·]-3">}</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·Mandatory</span><span·class="w">159 ······</span><span·class="p"·data-group-id="4745444132-3">{</span><span·class="ss">snmpEngineMaxMessageSize</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">snmp_framework_mib</span><span·class="p">:</span><span·class="nf">max_message_size</span><span·class="p"·data-group-id="4[·...·truncated·by·diffoscope;·len:·115,·SHA:·547ec43a846e4bd601b7f6131927e7b4e24817e6947aca1440a2a15543538daa·...·]-3">}</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·Mandatory</span><span·class="w">
160 ······</span><span·class="p"·data-group-id="3031744676-5">{</span><span·class="ss">intAgentUDPPort</span><span·class="p">,</span><span·class="w">··········</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">port_number</span><span·class="p"·data-group-id="3031744676-6">(</span><span·class="p"·data-group-id="3031744676-6">)</span><span·class="p"·data-group-id="3031744676-5">}</span><span·class="p">.</span><span·class="w">······················</span><span·class="c1">%·Optional</span><span·class="w"> 
161 ······</span><span·class="p"·data-group-id="3031744676-7">{</span><span·class="ss">intAgentTransports</span><span·class="p">,</span><span·class="w">·······</span><span·class="p"·data-group-id="3031744676-8">[</span><span·class="nc">snmpa_conf</span><span·class="p">:</span><span·class="nf">intAgentTr[·...·truncated·by·diffoscope;·len:·439,·SHA:·a8632cd443d2a40475cbba73743d4563626391f16905178cab5b5f0801720752·...·]160 ······</span><span·class="p"·data-group-id="4745444132-5">{</span><span·class="ss">intAgentUDPPort</span><span·class="p">,</span><span·class="w">··········</span><span·class="nc">inet</span><span·class="p">:</span><span·class="nf">port_number</span><span·class="p"·data-group-id="4745444132-6">(</spa[·...·truncated·by·diffoscope;·len:·227,·SHA:·1ffb39448abe1c693dd8577357087c0d2d8bd246dc0c759ee02931ea7795272f·...·]
 161 ······</span><span·class="p"·data-group-id="4745444132-7">{</span><span·class="ss">intAgentTransports</span><span·class="p">,</span><span·class="w">·······</span><span·class="p"·data-group-id="4745444132-8">[</span><span·class="nc">snmpa_conf</span><span·class="p">:</span><span·class="nf">intAgentTransport</span><span·class="p"·data-group-id="4745444132-9">(</span><span·class="p"·data-group-id="4745444132-9">)</span><span·class="p"·data-group-id="4745444132-8">]</span><span·class="p"·data-group-id="4745444132-7">}</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·Mandatory</span></code></pre><p>If·a·&quot;traditional&quot;·transport·is·specified·(without·explicit·<code·class="inline">Kind</code>,·handling
162 both·requests·and·traps)·for·a·transport·domain,·its·<em>not</em>·possible·to·also162 both·requests·and·traps)·for·a·transport·domain,·its·<em>not</em>·possible·to·also
163 specify·a·transport·(for·that·domain)·with·a·specific·<code·class="inline">Kind</code>.·This·is·for163 specify·a·transport·(for·that·domain)·with·a·specific·<code·class="inline">Kind</code>.·This·is·for
164 example,·<em>not</em>·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p"·data-group-id="3555926876-1">[</span><span·class="p"·data-group-id="3555926876-2">{</span><span·class="ss">transportDomainUdpIpv4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3555926876-3">{</span><span·class="p"·data-group-id="3555926876-4">{</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">213</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">24</span><span·class="p"·data-group-id="3555926876-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4000</span><span·class="p"·data-group-id="3555926876-3">}</span><span·class="p"·data-group-id="3555926876-2">}</span><span·class="p">,</span><span·class="w"> 
165 ··</span><span·class="p"·data-group-id="3555926876-5">{</span><span·class="ss">transportDomainUdpIpv4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3555926876-6">{</span><span·class="p"·data-group-id="3555926876-7">{<[·...·truncated·by·diffoscope;·len:·665,·SHA:·d22305133c4ad873d2d31f75a215f6c45bf0ae10d5345d3525af2a63c49f6a63·...·]164 example,·<em>not</em>·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p"·data-group-id="1250662068-1">[</span><span·class="p"·data-group-id="1250662068-2">{</span><span·class="ss">transportDomainUdpIpv4</spa[·...·truncated·by·diffoscope;·len:·609,·SHA:·39e7e36d160d9aa38c2635b25ebaeff399501cfbc023d34613f8d9afcbcad3d6·...·]
 165 ··</span><span·class="p"·data-group-id="1250662068-5">{</span><span·class="ss">transportDomainUdpIpv4</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1250662068-6">{</span><span·class="p"·data-group-id="1250662068-7">{</span><span·class="mi">141</span><span·class="p">,</span><span·class="mi">213</span><span·class="p">,</span><span·class="mi">11</span><span·class="p">,</span><span·class="mi">24</span><span·class="p"·data-group-id="1250662068-7">}</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4001</span><span·class="p"·data-group-id="1250662068-6">}</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">trap_sender</span><span·class="p"·data-group-id="1250662068-5">}</span><span·class="p"·data-group-id="1250662068-1">]</span><span·class="p">.</span></code></pre><p>Note·that·only·one·transport·per·kind·for·each·transport·domain·can·be
166 configured.</p><p><code·class="inline">PortInfo</code>·<code·class="inline">system</code>·is·used·to·indicate·that·the·'system'·should·choose·(the·way166 configured.</p><p><code·class="inline">PortInfo</code>·<code·class="inline">system</code>·is·used·to·indicate·that·the·'system'·should·choose·(the·way
167 port·number·'0'·(zero)·is·normally·used).·Port·info·'0'·(zero)·cannot·be·used167 port·number·'0'·(zero)·is·normally·used).·Port·info·'0'·(zero)·cannot·be·used
168 for·this,·since·it·is·(internally)·used·to·represent·the·'default'·port·number.</p><p>In·the·traditional·transport·entries,·when·the·<code·class="inline">Addr</code>·value·does·not·contain·a168 for·this,·since·it·is·(internally)·used·to·represent·the·'default'·port·number.</p><p>In·the·traditional·transport·entries,·when·the·<code·class="inline">Addr</code>·value·does·not·contain·a
169 port·number,·the·value·of·<code·class="inline">intAgentUDPPort</code>·is·used.</p><p>Note·that·the·(new)·extended·transport·entries·(including·<code·class="inline">Kind</code>·and·<code·class="inline">Opts</code>)169 port·number,·the·value·of·<code·class="inline">intAgentUDPPort</code>·is·used.</p><p>Note·that·the·(new)·extended·transport·entries·(including·<code·class="inline">Kind</code>·and·<code·class="inline">Opts</code>)
170 <em>must</em>·specify·port-info·as·they·ignore·any·value·specified·by170 <em>must</em>·specify·port-info·as·they·ignore·any·value·specified·by
171 <code·class="inline">intAgentUDPPort</code>.</p><p><code·class="inline">Opts</code>·is·the·same·as·for·the·<a·href="snmp_config.html#agent_ni_opts">net-if</a>·process171 <code·class="inline">intAgentUDPPort</code>.</p><p><code·class="inline">Opts</code>·is·the·same·as·for·the·<a·href="snmp_config.html#agent_ni_opts">net-if</a>·process
172 <em>and</em>·takes·precedence·(for·that·transport)·if·present.·The·point·is·that·each172 <em>and</em>·takes·precedence·(for·that·transport)·if·present.·The·point·is·that·each
Offset 184, 20 lines modifiedOffset 184, 20 lines modified
184 <code·class="inline">vacmContextTable</code>·in·the·SNMP-VIEW-BASED-ACM-MIB.</p><p>Each·entry·is·a·term:</p><p><code·class="inline">ContextName.</code></p><ul><li><code·class="inline">ContextName</code>·is·a·string.</li></ul><p><a·href=""·id="system_information"></a></p><h2·id="system-information"·class="section-heading">184 <code·class="inline">vacmContextTable</code>·in·the·SNMP-VIEW-BASED-ACM-MIB.</p><p>Each·entry·is·a·term:</p><p><code·class="inline">ContextName.</code></p><ul><li><code·class="inline">ContextName</code>·is·a·string.</li></ul><p><a·href=""·id="system_information"></a></p><h2·id="system-information"·class="section-heading">
185 ··<a·href="#system-information"·class="hover-link">185 ··<a·href="#system-information"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">System·Information</span>188 ··<span·class="text">System·Information</span>
189 </h2>189 </h2>
190 <p>The·system·information·should·be·stored·in·a·file·called·<code·class="inline">standard.conf</code>.</p><p>Each·entry·is·a·tuple·of·size·two:</p><p><code·class="inline">{SystemVariable,·Value}.</code></p><ul><li><code·class="inline">SystemVariable</code>·is·one·of·the·variables·in·the·system·group,·or190 <p>The·system·information·should·be·stored·in·a·file·called·<code·class="inline">standard.conf</code>.</p><p>Each·entry·is·a·tuple·of·size·two:</p><p><code·class="inline">{SystemVariable,·Value}.</code></p><ul><li><code·class="inline">SystemVariable</code>·is·one·of·the·variables·in·the·system·group,·or
191 <code·class="inline">snmpEnableAuthenTraps</code>.</li><li><code·class="inline">Value</code>·is·the·value·for·the·variable.</li></ul><p>The·following·example·shows·a·valid·<code·class="inline">standard.conf</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1620600228-1">{</span><span·class="ss">sysDescr</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Erlang·SNMP·agent&quot;</span><span·class="p"·data-group-id="1620600228-1">}</span><span·class="p">.</span><span·class="w">191 <code·class="inline">snmpEnableAuthenTraps</code>.</li><li><code·class="inline">Value</code>·is·the·value·for·the·variable.</li></ul><p>The·following·example·shows·a·valid·<code·class="inline">standard.conf</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1382982599-1">{</span><span·class="ss">sysDescr</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Erlang·SNMP·agent&quot;</span><span·class="p"·data-group-id="1382982599-1">}</span><span·class="p">.</span><span·class="w">
192 </span><span·class="p"·data-group-id="1620600228-2">{</span><span·class="ss">sysObjectID</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1620600228-3">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·118,·SHA:·9b15fad904ba96d7301d5c4c4068236ea0814e332b152443669bc1decc43fbdb·...·]-2">}</span><span·class="p">.</span><span·class="w">192 </span><span·class="p"·data-group-id="1382982599-2">{</span><span·class="ss">sysObjectID</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1382982599-3">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·118,·SHA:·d38454425b4fe25c8d582ef9571f79b9ff2e17b33226cce59d48dc0595d3027f·...·]-2">}</span><span·class="p">.</span><span·class="w">
193 </span><span·class="p"·data-group-id="1620600228-4">{</span><span·class="ss">sysContact</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;(mbj,eklas)@erlang.ericsson.se&quot;</span><span·class="p"·data-group-id="1620600228-4">}</span><span·class="p">.</span><span·class="w">193 </span><span·class="p"·data-group-id="1382982599-4">{</span><span·class="ss">sysContact</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;(mbj,eklas)@erlang.ericsson.se&quot;</span><span·class="p"·data-group-id="1382982599-4">}</span><span·class="p">.</span><span·class="w">
194 </span><span·class="p"·data-group-id="1620600228-5">{</span><span·class="ss">sysName</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;test&quot;</span><span·class="p"·data-group-id="1620600228-5">}</span><span·class="p">.</span><span·class="w">194 </span><span·class="p"·data-group-id="1382982599-5">{</span><span·class="ss">sysName</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;test&quot;</span><span·class="p"·data-group-id="1382982599-5">}</span><span·class="p">.</span><span·class="w">
195 </span><span·class="p"·data-group-id="1620600228-6">{</span><span·class="ss">sysServices</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">72</span><span·class="p"·data-group-id="1620600228-6">}</span><span·class="p">.</span><span·class="w">195 </span><span·class="p"·data-group-id="1382982599-6">{</span><span·class="ss">sysServices</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">72</span><span·class="p"·data-group-id="1382982599-6">}</span><span·class="p">.</span><span·class="w">
196 </span><span·class="p"·data-group-id="1620600228-7">{</span><span·class="ss">snmpEnableAuthenTraps</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">enabled</span><span·class="p"·data-group-id="1620600228-7">}</span><span·class="p">.</span></code></pre><p>A·value·must·be·provided·for·all·variables,·which·lack·default·values·in·the196 </span><span·class="p"·data-group-id="1382982599-7">{</span><span·class="ss">snmpEnableAuthenTraps</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">enabled</span><span·class="p"·data-group-id="1382982599-7">}</span><span·class="p">.</span></code></pre><p>A·value·must·be·provided·for·all·variables,·which·lack·default·values·in·the
197 MIB.</p><p><a·href=""·id="community"></a></p><h2·id="communities"·class="section-heading">197 MIB.</p><p><a·href=""·id="community"></a></p><h2·id="communities"·class="section-heading">
198 ··<a·href="#communities"·class="hover-link">198 ··<a·href="#communities"·class="hover-link">
199 ····<i·class="ri-link-m"·aria-hidden="true"></i>199 ····<i·class="ri-link-m"·aria-hidden="true"></i>
200 ··</a>200 ··</a>
201 ··<span·class="text">Communities</span>201 ··<span·class="text">Communities</span>
202 </h2>202 </h2>
203 <p>The·community·information·should·be·stored·in·a·file·called·<code·class="inline">community.conf</code>.·It203 <p>The·community·information·should·be·stored·in·a·file·called·<code·class="inline">community.conf</code>.·It
6.86 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_agent_funct_descr.html
    
Offset 304, 15 lines modifiedOffset 304, 15 lines modified
304 This·MIB·can·be·used·with·any·SNMP·version.</li><li>SNMP-COMMUNITY-MIB,·which·defines·managed·objects·for·coexistence·of·SNMPv1304 This·MIB·can·be·used·with·any·SNMP·version.</li><li>SNMP-COMMUNITY-MIB,·which·defines·managed·objects·for·coexistence·of·SNMPv1
305 and·SNMPv2c·with·SNMPv3.·This·MIB·is·only·useful·if·SNMPv1·or·SNMPv2c·is·used,305 and·SNMPv2c·with·SNMPv3.·This·MIB·is·only·useful·if·SNMPv1·or·SNMPv2c·is·used,
306 possibly·in·combination·with·SNMPv3.</li><li>SNMP-USER-BASED-SM-MIB,·which·defines·managed·objects·for·authentication·and306 possibly·in·combination·with·SNMPv3.</li><li>SNMP-USER-BASED-SM-MIB,·which·defines·managed·objects·for·authentication·and
307 privacy.·This·MIB·is·only·useful·with·SNMPv3.</li></ul><p>All·of·these·MIBs·should·be·loaded·into·the·Master·Agent.·Once·loaded,·these307 privacy.·This·MIB·is·only·useful·with·SNMPv3.</li></ul><p>All·of·these·MIBs·should·be·loaded·into·the·Master·Agent.·Once·loaded,·these
308 MIBs·are·always·available·in·all·contexts.</p><p>The·ASN.1·code,·the·Erlang·source·code,·and·the·generated·<code·class="inline">.hrl</code>·files·for·them308 MIBs·are·always·available·in·all·contexts.</p><p>The·ASN.1·code,·the·Erlang·source·code,·and·the·generated·<code·class="inline">.hrl</code>·files·for·them
309 are·provided·in·the·distribution·and·are·placed·in·the·directories·<code·class="inline">mibs</code>,309 are·provided·in·the·distribution·and·are·placed·in·the·directories·<code·class="inline">mibs</code>,
310 <code·class="inline">src</code>,·and·<code·class="inline">include</code>,·respectively,·in·the·<code·class="inline">snmp</code>·application.</p><p>The·<code·class="inline">.hrl</code>·files·are·generated·with·<a·href="snmpc.html#mib_to_hrl/1"><code·class="inline">snmpc:mib_to_hrl/1</code></a>.·Include·these·files·in310 <code·class="inline">src</code>,·and·<code·class="inline">include</code>,·respectively,·in·the·<code·class="inline">snmp</code>·application.</p><p>The·<code·class="inline">.hrl</code>·files·are·generated·with·<a·href="snmpc.html#mib_to_hrl/1"><code·class="inline">snmpc:mib_to_hrl/1</code></a>.·Include·these·files·in
311 your·code·as·in·the·following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4713135590-1">(</span><span·class="s">&quot;snmp/include/SNMPv2-MIB.hrl&quot;</span><span·class="p"·data-group-id="4713135590-1">)</span><span·class="p">.</span></code></pre><p>The·initial·values·for·the·managed·objects·defined·in·these·tables,·are·read·at311 your·code·as·in·the·following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4784079551-1">(</span><span·class="s">&quot;snmp/include/SNMPv2-MIB.hrl&quot;</span><span·class="p"·data-group-id="4784079551-1">)</span><span·class="p">.</span></code></pre><p>The·initial·values·for·the·managed·objects·defined·in·these·tables,·are·read·at
312 start-up·from·a·set·of·configuration·files.·These·are·described·in312 start-up·from·a·set·of·configuration·files.·These·are·described·in
313 <a·href="snmp_config.html">Configuration·Files</a>.</p><h3·id="standard-mib-and-snmpv2-mib"·class="section-heading">313 <a·href="snmp_config.html">Configuration·Files</a>.</p><h3·id="standard-mib-and-snmpv2-mib"·class="section-heading">
314 ··<a·href="#standard-mib-and-snmpv2-mib"·class="hover-link">314 ··<a·href="#standard-mib-and-snmpv2-mib"·class="hover-link">
315 ····<i·class="ri-link-m"·aria-hidden="true"></i>315 ····<i·class="ri-link-m"·aria-hidden="true"></i>
316 ··</a>316 ··</a>
317 ··<span·class="text">STANDARD-MIB·and·SNMPv2-MIB</span>317 ··<span·class="text">STANDARD-MIB·and·SNMPv2-MIB</span>
318 </h3>318 </h3>
Offset 465, 17 lines modifiedOffset 465, 17 lines modified
465 ····<i·class="ri-link-m"·aria-hidden="true"></i>465 ····<i·class="ri-link-m"·aria-hidden="true"></i>
466 ··</a>466 ··</a>
467 ··<span·class="text">Notifications</span>467 ··<span·class="text">Notifications</span>
468 </h2>468 </h2>
469 <p>Notifications·are·defined·in·SMIv1·with·the·TRAP-TYPE·macro·in·the·definition·of469 <p>Notifications·are·defined·in·SMIv1·with·the·TRAP-TYPE·macro·in·the·definition·of
470 an·MIB·(see·RFC1215).·The·corresponding·macro·in·SMIv2·is·NOTIFICATION-TYPE.470 an·MIB·(see·RFC1215).·The·corresponding·macro·in·SMIv2·is·NOTIFICATION-TYPE.
471 When·an·application·decides·to·send·a·notification,·it·calls·one·of·the471 When·an·application·decides·to·send·a·notification,·it·calls·one·of·the
472 following·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">send_notification</span><span·class="p"·data-group-id="4012128236-1">(</span><span·class="n">Agent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Notification</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Receiver</span><span·class="w">472 following·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">send_notification</span><span·class="p"·data-group-id="0707694456-1">(</span><span·class="n">Agent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Notification</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Receiver</span><span·class="w">
473 ·······················</span><span·class="p"·data-group-id="4012128236-2">[</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NotifyName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContextName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Varbind[·...·truncated·by·diffoscope;·len:·101,·SHA:·677f94c5c543185b6b6e450f9e2196915a1469ed3c4a1d76626208f54133e0d4·...·]6-1">)</span><span·class="w">473 ·······················</span><span·class="p"·data-group-id="0707694456-2">[</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NotifyName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContextName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Varbind[·...·truncated·by·diffoscope;·len:·101,·SHA:·9db7fd9d6168406a733c5037c148d8168bb1919cf36332c66ef8bc348574717d·...·]6-1">)</span><span·class="w">
474 </span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">send_trap</span><span·class="p"·data-group-id="4012128236-3">(</span><span·class="n">Agent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Notification</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Community</span><span·class="w">·</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·285,·SHA:·6a29fb67fa49b16279d513569faa9009c3bfe7c70406df9b9ce36569f7a7847c·...·]6-3">)</span></code></pre><p>providing·the·registered·name·or·process·identifier·of·the·agent·where·the·MIB,474 </span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">send_trap</span><span·class="p"·data-group-id="0707694456-3">(</span><span·class="n">Agent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Notification</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Community</span><span·class="w">·</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·285,·SHA:·73e09ef805d43672caee13b314222edbba5add0f93ac2742a6e24e4e075528d6·...·]6-3">)</span></code></pre><p>providing·the·registered·name·or·process·identifier·of·the·agent·where·the·MIB,
475 which·defines·the·notification·is·loaded·and·the·symbolic·name·of·the475 which·defines·the·notification·is·loaded·and·the·symbolic·name·of·the
476 notification.</p><p>If·the·<code·class="inline">send_notification/3,4</code>·function·is·used,·all·management·targets·are476 notification.</p><p>If·the·<code·class="inline">send_notification/3,4</code>·function·is·used,·all·management·targets·are
477 selected,·as·defined·in·RFC2273.·The·<code·class="inline">Receiver</code>·parameter·defines·where·the477 selected,·as·defined·in·RFC2273.·The·<code·class="inline">Receiver</code>·parameter·defines·where·the
478 agent·should·send·information·about·the·delivery·of·inform·requests.</p><p>If·the·<code·class="inline">send_notification/5</code>·function·is·used,·an·<code·class="inline">NotifyName</code>·must·be·provided.478 agent·should·send·information·about·the·delivery·of·inform·requests.</p><p>If·the·<code·class="inline">send_notification/5</code>·function·is·used,·an·<code·class="inline">NotifyName</code>·must·be·provided.
479 This·parameter·is·used·as·an·index·in·the·<code·class="inline">snmpNotifyTable</code>,·and·the·management479 This·parameter·is·used·as·an·index·in·the·<code·class="inline">snmpNotifyTable</code>,·and·the·management
480 targets·defined·by·that·single·entry·is·used.</p><p>The·<code·class="inline">send_notification/6</code>·function·is·the·most·general·version·of·the·function.480 targets·defined·by·that·single·entry·is·used.</p><p>The·<code·class="inline">send_notification/6</code>·function·is·the·most·general·version·of·the·function.
481 A·<code·class="inline">ContextName</code>·must·be·specified,·from·which·the·notification·will·be·sent.·If481 A·<code·class="inline">ContextName</code>·must·be·specified,·from·which·the·notification·will·be·sent.·If
43.6 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_app.html
    
Offset 136, 59 lines modifiedOffset 136, 59 lines modified
136 ··<a·href="#configuration"·class="hover-link">136 ··<a·href="#configuration"·class="hover-link">
137 ····<i·class="ri-link-m"·aria-hidden="true"></i>137 ····<i·class="ri-link-m"·aria-hidden="true"></i>
138 ··</a>138 ··</a>
139 ··<span·class="text">Configuration</span>139 ··<span·class="text">Configuration</span>
140 </h2>140 </h2>
141 <p>The·following·configuration·parameters·are·defined·for·the·SNMP·application.141 <p>The·following·configuration·parameters·are·defined·for·the·SNMP·application.
142 Refer·to·application(3)·for·more·information·about·configuration·parameters.</p><p>The·snmp·part·of·the·config·file·specifying·the·configuration·parameters·is142 Refer·to·application(3)·for·more·information·about·configuration·parameters.</p><p>The·snmp·part·of·the·config·file·specifying·the·configuration·parameters·is
143 basically·the·following·tuple:</p><pre><code·class="text">······{snmp,·snmp_components_config()}</code></pre><p>A·minimal·config·file·for·starting·a·node·with·both·a·manager·and·an·agent:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="5157637452-1">[</span><span·class="p"·data-group-id="5157637452-2">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">143 basically·the·following·tuple:</p><pre><code·class="text">······{snmp,·snmp_components_config()}</code></pre><p>A·minimal·config·file·for·starting·a·node·with·both·a·manager·and·an·agent:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="2035035028-1">[</span><span·class="p"·data-group-id="2035035028-2">{</span><span·class="ss">snmp</span><span·class="p">,</span><span·class="w">
144 ········</span><span·class="p"·data-group-id="5157637452-3">[</span><span·class="p"·data-group-id="5157637452-4">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5157637452-5">[</span><span·class="p"·data-group-id="5157637452-6">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/agent/db&quot;</span><span·class="p"·data-group-id="5157637452-6">}</span><span·class="p">,</span><span·class="w"> 
145 ··················</span><span·class="p"·data-group-id="5157637452-7">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5157637452-8">[</span><span·class="p"·data-group-id="5157637452-9">{</span><span·class="ss">dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/agent/conf&quot;</span><span·class="p"·data-group-id="5157637452-9">}</span><span·class="p"·data-group-id="5157637452-8">]</span><span·class="p"·data-group-id="5157637452-7">}</span><span·class="p"·data-group-id="5157637452-5">]</span><span·class="p"·data-group-id="5157637452-4">}</span><span·class="p">,</span><span·class="w"> 
146 ·········</span><span·class="p"·data-group-id="5157637452-10">{</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5157637452-11">[</span><span·class="p"·data-group-id="5157637452-12">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5157637452-13">[</span><span·class="p"·data-group-id="5157637452-14">{</span><span·class="ss">dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/manager/conf&quot;</span><span·class="p"·data-group-id="5157637452-14">}</span><span·class="p">,</span><span·class="w"> 
147 ······························</span><span·class="p"·data-group-id="5157637452-15">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/manager/db&quot;</span><span·class="p"·data-group-id="515763745[·...·truncated·by·diffoscope;·len:·329,·SHA:·a53daa21d43aed70ee80ca0f4faaf5b1b1cd60cceb5ec0c17ba8ceaeeea30638·...·]</span><span·class="w">144 ········</span><span·class="p"·data-group-id="2035035028-3">[</span><span·class="p"·data-group-id="2035035028-4">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2035035028-5">[</span><span·class="[·...·truncated·by·diffoscope;·len:·241,·SHA:·14f4d37a28d804117300e806b2833fcda361c1693bb03848037a15ecfeaa8216·...·]</span><span·class="w">
 145 ··················</span><span·class="p"·data-group-id="2035035028-7">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2035035028-8">[</span><span·class="p"·data-group-id="2035035028-9">{</span><span·class="ss">dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/agent/conf&quot;</span><span·class="p"·data-group-id="2035035028-9">}</span><span·class="p"·data-group-id="2035035028-8">]</span><span·class="p"·data-group-id="2035035028-7">}</span><span·class="p"·data-group-id="2035035028-5">]</span><span·class="p"·data-group-id="2035035028-4">}</span><span·class="p">,</span><span·class="w">
 146 ·········</span><span·class="p"·data-group-id="2035035028-10">{</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2035035028-11">[</span><span·class="p"·data-group-id="2035035028-12">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2035035028-13">[</span><span·class="p"·data-group-id="2035035028-14">{</span><span·class="ss">dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/manager/conf&quot;</span><span·class="p"·data-group-id="2035035028-14">}</span><span·class="p">,</span><span·class="w">
 147 ······························</span><span·class="p"·data-group-id="2035035028-15">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/snmp/manager/db&quot;</span><span·class="p"·data-group-id="2035035028-15">}</span><span·class="p"·data-group-id="2035035028-13">]</span><span·class="p"·data-group-id="2035035028-12">}</span><span·class="p"·data-group-id="2035035028-11">]</span><span·class="p"·data-group-id="2035035028-10">}</span><span·class="p"·data-group-id="2035035028-3">]</span><span·class="p"·data-group-id="2035035028-2">}</span><span·class="w">
148 ········</span><span·class="p"·data-group-id="5157637452-1">]</span><span·class="w">148 ········</span><span·class="p"·data-group-id="2035035028-1">]</span><span·class="w">
149 ·······</span><span·class="p">}</span><span·class="w">149 ·······</span><span·class="p">}</span><span·class="w">
150 ······</span><span·class="p">]</span><span·class="p">.</span></code></pre><p>Each·snmp·component·has·its·own·set·of·configuration·parameters,·even·though150 ······</span><span·class="p">]</span><span·class="p">.</span></code></pre><p>Each·snmp·component·has·its·own·set·of·configuration·parameters,·even·though
151 some·of·the·types·are·common·to·both·components.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nf">snmp_components_config</span><span·class="p"·data-group-id="9775196638-1">(</span><span·class="p"·data-group-id="9775196638-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9775196638-2">[</span><span·class="nf">snmp_component_config</span><span·class="p"·data-group-id="9775196638-3">(</span><span·class="p"·data-group-id="9775196638-3">)</span><span·class="p"·data-group-id="9775196638-2">]</span><span·class="w"> 
152 ······</span><span·class="nf">snmp_component_config</span><span·class="p"·data-group-id="9775196638-4">(</span><span·class="p"·data-group-id="9775196638-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="9775196638-5">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">agent_options</span><span·class="p"·data-group-id="9775196638-6">(</span><span·class="p"·data-group-id="9775196638-6">)</span><span·class="p"·data-group-id="9775196638-5">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="9775196638-7">{</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">manager_options</span><span·class="p"·data-group-id="9775196638-8">(</span><span·class="p"·data-group-id="9775196638-8">)</span><span·class="p"·data-group-id="9775196638-7">}</span><span·class="w"> 
153 ······</span><span·class="nf">agent_options</span><span·class="p"·data-group-id="9775196638-9">(</span><span·class="p"·data-group-id="9775196638-9">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9775196638-10">[</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="9775196638-11">(</span><span·class="p"·data-group-id="9775196638-11">)</span><span·class="p"·data-group-id="9775196638-10">]</span><span·class="w"> 
154 ······</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="9775196638-12">(</span><span·class="p"·data-group-id="9775196638-12">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·358,·SHA:·f4320ace338a45b3c82c8fd2fb791454b246034c9d5f73032918850ab4cc2ae5·...·]</span><span·class="w">151 some·of·the·types·are·common·to·both·components.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nf">snmp_components_config</span><span·class="p"·data-group-id="0182524074-1">(</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·351,·SHA:·b45bc93e7a1eac9b7e0b3fec024299d5e21ccbe4cd04007714d6e7c80a40d75b·...·]</span><span·class="w">
 152 ······</span><span·class="nf">snmp_component_config</span><span·class="p"·data-group-id="0182524074-4">(</span><span·class="p"·data-group-id="0182524074-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0182524074-5">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">agent_options</span><span·class="p"·data-group-id="0182524074-6">(</span><span·class="p"·data-group-id="0182524074-6">)</span><span·class="p"·data-group-id="0182524074-5">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="0182524074-7">{</span><span·class="ss">manager</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">manager_options</span><span·class="p"·data-group-id="0182524074-8">(</span><span·class="p"·data-group-id="0182524074-8">)</span><span·class="p"·data-group-id="0182524074-7">}</span><span·class="w">
 153 ······</span><span·class="nf">agent_options</span><span·class="p"·data-group-id="0182524074-9">(</span><span·class="p"·data-group-id="0182524074-9">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0182524074-10">[</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="0182524074-11">(</span><span·class="p"·data-group-id="0182524074-11">)</span><span·class="p"·data-group-id="0182524074-10">]</span><span·class="w">
 154 ······</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="0182524074-12">(</span><span·class="p"·data-group-id="0182524074-12">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0182524074-13">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="w">·····</span><span·class="nf">restart_type</span><span·class="p"·data-group-id="0182524074-14">(</span><span·class="p"·data-group-id="0182524074-14">)</span><span·class="p"·data-group-id="0182524074-13">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
155 ·······················</span><span·class="p"·data-group-id="9775196638-15">{</span><span·class="ss">agent_type</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">agent_type</span><span·class="p"·data-group-id="9775196638-16">(</span><span·class="p"·data-group-id="9775196638-16">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·9af24bd376ba392572c938ed58ea55a4f174b554cca85ea140b9433cf6028432·...·]-15">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">155 ·······················</span><span·class="p"·data-group-id="0182524074-15">{</span><span·class="ss">agent_type</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">agent_type</span><span·class="p"·data-group-id="0182524074-16">(</span><span·class="p"·data-group-id="0182524074-16">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·44ba950ee2a0ecf84f50bdef426f1631f4f857685499067d6c13b2a3840f74b8·...·]-15">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
156 ·······················</span><span·class="p"·data-group-id="9775196638-17">{</span><span·class="ss">agent_verbosity</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">verbosity</span><span·class="p"·data-group-id="9775196638-18">(</span><span·class="p"·data-group-id="9775196638-18">)</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·8cc143a1e09f26dfe481f688b2966eef934a8d13101cb3d134e94269c24d1067·...·]-17">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">156 ·······················</span><span·class="p"·data-group-id="0182524074-17">{</span><span·class="ss">agent_verbosity</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">verbosity</span><span·class="p"·data-group-id="0182524074-18">(</span><span·class="p"·data-group-id="0182524074-18">)</span><spa[·...·truncated·by·diffoscope;·len:·37,·SHA:·e92f8b39c98d9a67bf76e5ce80ba9aa00b9685fb4f517972eacde181d5da617f·...·]-17">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">
157 ·······················</span><span·class="p"·data-group-id="9775196638-19">{</span><span·class="ss">discovery</span><span·class="p">,</span><span·class="w">········</span><span·class="nf">agent_discovery</span><span·class="p"·data-group-id="9775196638-20">(</span><span·class="p"·data-group-id="9775196638-20">)</span><span·class="p"·data-group-id="9775196638-19">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w"> 
158 ·······················</span><span·class="p"·data-group-id="9775196638-21">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">versions</span><span·class="p"·data-group-id="9775196638-22">(</span><span·class="p"·data-group-id="9775196638-22">)</span><span[·...·truncated·by·diffoscope;·len:·72,·SHA:·aab0b16bde9c41f1c8806b3f4a1c34dcceb303c7e20dfd884329b78d74a9eab2·...·]··</span><span·class="p">|</span><span·class="w">157 ·······················</span><span·class="p"·data-group-id="0182524074-19">{</span><span·class="ss">discovery</span><span·class="p">,</span><span·class="w">········</span><span·class="nf">agent_discovery</span><span·class="p"·data-group-id="0182524074-20">(</span><span·class="p"·data-group-id="0182524074-20">)</spa[·...·truncated·by·diffoscope;·len:·72,·SHA:·edf2b2b23479619aec754ed2c622487c258e86a5a8c0a175a5db8dad0284aa30·...·]··</span><span·class="p">|</span><span·class="w">
 158 ·······················</span><span·class="p"·data-group-id="0182524074-21">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">versions</span><span·class="p"·data-group-id="0182524074-22">(</span><span·class="p"·data-group-id="0182524074-22">)</span><span·class="p"·data-group-id="0182524074-21">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">
159 ·······················</span><span·class="p"·data-group-id="9775196638-23">{</span><span·class="ss">gb_max_vbs</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">gb_max_vbs</span><span·class="p"·data-group-id="9775196638-24">(</span><span·class="p"·data-group-id="9775196638-24">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·9af24bd376ba392572c938ed58ea55a4f174b554cca85ea140b9433cf6028432·...·]-23">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">159 ·······················</span><span·class="p"·data-group-id="0182524074-23">{</span><span·class="ss">gb_max_vbs</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">gb_max_vbs</span><span·class="p"·data-group-id="0182524074-24">(</span><span·class="p"·data-group-id="0182524074-24">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·44ba950ee2a0ecf84f50bdef426f1631f4f857685499067d6c13b2a3840f74b8·...·]-23">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
160 ·······················</span><span·class="p"·data-group-id="9775196638-25">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">priority</span><span·class="p"·data-group-id="9775196638-26">(</span><span·class="p"·data-group-id="9775196638-26">)</span><span·class="p"·data-group-id="9775196638-25">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w"> 
161 ·······················</span><span·class="p"·data-group-id="9775196638-27">{</span><span·class="ss">multi_threaded</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">multi_threaded</span><span·class="p"·data-group-id="9775196638-28">(</span><span·class="p"·data-group-id="9775196638-28">)</span[·...·truncated·by·diffoscope;·len:·71,·SHA:·b7cf64704595244eb1723101f52d6c868fb23216c05ad19fab8d9ad72a81a535·...·]···</span><span·class="p">|</span><span·class="w">160 ·······················</span><span·class="p"·data-group-id="0182524074-25">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">priority</span><span·class="p"·data-group-id="0182524074-26">(</span><span·class="p"·data-group-id="0182524074-26">)</span><span[·...·truncated·by·diffoscope;·len:·71,·SHA:·6b96ea5f4f8d04f5fc24e12f4f10cfd5f5f6af06690e7425347dbe482bfafa9f·...·]···</span><span·class="p">|</span><span·class="w">
 161 ·······················</span><span·class="p"·data-group-id="0182524074-27">{</span><span·class="ss">multi_threaded</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">multi_threaded</span><span·class="p"·data-group-id="0182524074-28">(</span><span·class="p"·data-group-id="0182524074-28">)</span><span·class="p"·data-group-id="0182524074-27">}</span><span·class="w">···</span><span·class="p">|</span><span·class="w">
162 ·······················</span><span·class="p"·data-group-id="9775196638-29">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">db_dir</span><span·class="p"·data-group-id="9775196638-30">(</span><span·class="p"·data-group-id="9775196638-30">)</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·c0ce805de947368d4dfd7531e1bfeed0e40046e78cb0dabdd04b3dccd4280594·...·]-29">}</span><span·class="w">···········</span><span·class="p">|</span><span·class="w">162 ·······················</span><span·class="p"·data-group-id="0182524074-29">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">db_dir</span><span·class="p"·data-group-id="0182524074-30">(</span><span·class="p"·data-group-id="0182524074-30">)</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·111f46c1db61f172c2549722153d5248b63b19a79d0bdf501bc1b57f7e748ba7·...·]-29">}</span><span·class="w">···········</span><span·class="p">|</span><span·class="w">
163 ·······················</span><span·class="p"·data-group-id="9775196638-31">{</span><span·class="ss">db_init_error</span><span·class="p">,</span><span·class="w">····</span><span·class="nf">db_init_error</span><span·class="p"·data-group-id="9775196638-32">(</span><span·class="p"·data-group-id="9775196638-32">)</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·3fdbabbec6233c2d44a242360d535e647de893fa665750949676260cdb3debfb·...·]-31">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">163 ·······················</span><span·class="p"·data-group-id="0182524074-31">{</span><span·class="ss">db_init_error</span><span·class="p">,</span><span·class="w">····</span><span·class="nf">db_init_error</span><span·class="p"·data-group-id="0182524074-32">(</span><span·class="p"·data-group-id="0182524074-32">)</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·4cb274c8a718a8878488869eb95956e9929d8b06c9b3f816c43a5bc8dd9403cf·...·]-31">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">
164 ·······················</span><span·class="p"·data-group-id="9775196638-33">{</span><span·class="ss">local_db</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">local_db</span><span·class="p"·data-group-id="9775196638-34">(</span><span·class="p"·data-group-id="9775196638-34">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·461f0ebdb2f017f541447a4df407a1abafa3b2701af77c688f43e5c2df617b54·...·]-33">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">164 ·······················</span><span·class="p"·data-group-id="0182524074-33">{</span><span·class="ss">local_db</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">local_db</span><span·class="p"·data-group-id="0182524074-34">(</span><span·class="p"·data-group-id="0182524074-34">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·e361e146ec8bab99d67c29d26236aaa76ecbea4d330bbd6dce54ba6a2e16b933·...·]-33">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">
165 ·······················</span><span·class="p"·data-group-id="9775196638-35">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_net_if</span><span·class="p"·data-group-id="9775196638-36">(</span><span·class="p"·data-group-id="9775196638-36">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·0c05eb52313ba8a4660679dfa1bf0c2d4de6e0fc65fde1e845f9eb35442cef27·...·]-35">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">165 ·······················</span><span·class="p"·data-group-id="0182524074-35">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_net_if</span><span·class="p"·data-group-id="0182524074-36">(</span><span·class="p"·data-group-id="0182524074-36">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·1610e0966609a9c150fd0e10a19964f581acb5e8ed2b7c25ac7ce27f4ece02eb·...·]-35">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
166 ·······················</span><span·class="p"·data-group-id="9775196638-37">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">mibs</span><span·class="p"·data-group-id="9775196638-38">(</span><span·class="p"·data-group-id="9775196638-38">)</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·68611822dc70199fa3390580cdf3291f6f4b4a10a0a6c8935980234c5779ab72·...·]-37">}</span><span·class="w">·············</span><span·class="p">|</span><span·class="w">166 ·······················</span><span·class="p"·data-group-id="0182524074-37">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">mibs</span><span·class="p"·data-group-id="0182524074-38">(</span><span·class="p"·data-group-id="0182524074-38">)</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·b3376b3e8a6310d0f6b52352dc7db6963d8fcfb323c9024d1e8373f6b74e8d54·...·]-37">}</span><span·class="w">·············</span><span·class="p">|</span><span·class="w">
167 ·······················</span><span·class="p"·data-group-id="9775196638-39">{</span><span·class="ss">mib_storage</span><span·class="p">,</span><span·class="w">······</span><span·class="nf">mib_storage</span><span·class="p"·data-group-id="9775196638-40">(</span><span·class="p"·data-group-id="9775196638-40">)</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·61368b1fd5552467eb02ad0a408e538eeedfcdc511eb93cb9c88d516d5a8e7b9·...·]-39">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">167 ·······················</span><span·class="p"·data-group-id="0182524074-39">{</span><span·class="ss">mib_storage</span><span·class="p">,</span><span·class="w">······</span><span·class="nf">mib_storage</span><span·class="p"·data-group-id="0182524074-40">(</span><span·class="p"·data-group-id="0182524074-40">)</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·8a9ecf9291285112c2008cc71ec920a42e024cb4e29a03301012093feada225a·...·]-39">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">
168 ·······················</span><span·class="p"·data-group-id="9775196638-41">{</span><span·class="ss">mib_server</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">mib_server</span><span·class="p"·data-group-id="9775196638-42">(</span><span·class="p"·data-group-id="9775196638-42">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·9af24bd376ba392572c938ed58ea55a4f174b554cca85ea140b9433cf6028432·...·]-41">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">168 ·······················</span><span·class="p"·data-group-id="0182524074-41">{</span><span·class="ss">mib_server</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">mib_server</span><span·class="p"·data-group-id="0182524074-42">(</span><span·class="p"·data-group-id="0182524074-42">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·44ba950ee2a0ecf84f50bdef426f1631f4f857685499067d6c13b2a3840f74b8·...·]-41">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
169 ·······················</span><span·class="p"·data-group-id="9775196638-43">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="9775196638-44">(</span><span·class="p"·data-group-id="9775196638-44">)</span><span·class="p"·data-group-id="9775196638-43">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w"> 
170 ·······················</span><span·class="p"·data-group-id="9775196638-45">{</span><span·class="ss">error_report_mod</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">error_report_mod</span><span·class="p"·data-group-id="9775196638-46">(</span><span·class="p"·data-group-id="9775196638-46">)</sp[·...·truncated·by·diffoscope;·len:·73,·SHA:·669520bb91dd70235f0008fb8e1ee39e1c6952bab49f4edfc3178010386d1a65·...·]·</span><span·class="p">|</span><span·class="w">169 ·······················</span><span·class="p"·data-group-id="0182524074-43">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="0182524074-44">(</span><span·class="p"·data-group-id="0182524074-44">)</spa[·...·truncated·by·diffoscope;·len:·73,·SHA:·9eea0125f369c6581c74c0cc325c556171d8bb4a509b0066f53ed082ffbc0597·...·]·</span><span·class="p">|</span><span·class="w">
 170 ·······················</span><span·class="p"·data-group-id="0182524074-45">{</span><span·class="ss">error_report_mod</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">error_report_mod</span><span·class="p"·data-group-id="0182524074-46">(</span><span·class="p"·data-group-id="0182524074-46">)</span><span·class="p"·data-group-id="0182524074-45">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
171 ·······················</span><span·class="p"·data-group-id="9775196638-47">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">note_store</span><span·class="p"·data-group-id="9775196638-48">(</span><span·class="p"·data-group-id="9775196638-48">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·9af24bd376ba392572c938ed58ea55a4f174b554cca85ea140b9433cf6028432·...·]-47">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">171 ·······················</span><span·class="p"·data-group-id="0182524074-47">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">note_store</span><span·class="p"·data-group-id="0182524074-48">(</span><span·class="p"·data-group-id="0182524074-48">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·44ba950ee2a0ecf84f50bdef426f1631f4f857685499067d6c13b2a3840f74b8·...·]-47">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
172 ·······················</span><span·class="p"·data-group-id="9775196638-49">{</span><span·class="ss">symbolic_store</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">symbolic_store</span><span·class="p"·data-group-id="9775196638-50">(</span><span·class="p"·data-group-id="9775196638-50">)</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·72ab785f339b3c3146c5e46bbcb346ae7e4f30dcdaec07a753faf9f280febb9c·...·]-49">}</span><span·class="w">···</span><span·class="p">|</span><span·class="w">172 ·······················</span><span·class="p"·data-group-id="0182524074-49">{</span><span·class="ss">symbolic_store</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">symbolic_store</span><span·class="p"·data-group-id="0182524074-50">(</span><span·class="p"·data-group-id="0182524074-50">)</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·fbb5372ccb86703169ff1966c5411e790a52eb5e9af9ff10c8b2366154535591·...·]-49">}</span><span·class="w">···</span><span·class="p">|</span><span·class="w">
173 ·······················</span><span·class="p"·data-group-id="9775196638-51">{</span><span·class="ss">target_cache</span><span·class="p">,</span><span·class="w">·····</span><span·class="nf">target_cache</span><span·class="p"·data-group-id="9775196638-52">(</span><span·class="p"·data-group-id="9775196638-52">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·0c05eb52313ba8a4660679dfa1bf0c2d4de6e0fc65fde1e845f9eb35442cef27·...·]-51">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">173 ·······················</span><span·class="p"·data-group-id="0182524074-51">{</span><span·class="ss">target_cache</span><span·class="p">,</span><span·class="w">·····</span><span·class="nf">target_cache</span><span·class="p"·data-group-id="0182524074-52">(</span><span·class="p"·data-group-id="0182524074-52">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·1610e0966609a9c150fd0e10a19964f581acb5e8ed2b7c25ac7ce27f4ece02eb·...·]-51">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
174 ·······················</span><span·class="p"·data-group-id="9775196638-53">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_config</span><span·class="p"·data-group-id="9775196638-54">(</span><span·class="p"·data-group-id="9775196638-54">)</span><span·class="p"·data-group-id="9775196638-53">}</span><span·class="w"> 
175 ······</span><span·class="nf">manager_options</span><span·class="p"·data-group-id="9775196638-55">(</span><span·class="p"·data-group-id="9775196638-55">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9775196638-56">[</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="9775196638-57">(</span><span·class="p"·data-group-id="9775196638-57">)</span><span·class="p"·data-group-id="9775196638-56">]</span><span·class="w"> 
176 ······</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="9775196638-58">(</span><span·class="p"·data-group-id="9775196638-58">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·361,·SHA:·7ae13959b9e9f958f61e94d93ce7e4ff0f5cb97ae50c8ba1d8f42c9affe829bb·...·]</span><span·class="w">174 ·······················</span><span·class="p"·data-group-id="0182524074-53">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_config</span><span·class="p"·data-group-id="0182524074-54">(</span>[·...·truncated·by·diffoscope;·len:·101,·SHA:·19d98f6b7b4d0c7982bbb36477ceda1354ede152f075fa33b070eb93c0e00939·...·]</span><span·class="w">
 175 ······</span><span·class="nf">manager_options</span><span·class="p"·data-group-id="0182524074-55">(</span><span·class="p"·data-group-id="0182524074-55">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0182524074-56">[</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="0182524074-57">(</span><span·class="p"·data-group-id="0182524074-57">)</span><span·class="p"·data-group-id="0182524074-56">]</span><span·class="w">
 176 ······</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="0182524074-58">(</span><span·class="p"·data-group-id="0182524074-58">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0182524074-59">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">restart_type</span><span·class="p"·data-group-id="0182524074-60">(</span><span·class="p"·data-group-id="0182524074-60">)</span><span·class="p"·data-group-id="0182524074-59">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">
177 ·························</span><span·class="p"·data-group-id="9775196638-61">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_net_if</span><span·class="p"·data-group-id="9775196638-62">(</span><span·class="p"·data-group-id="9775196638-62"[·...·truncated·by·diffoscope;·len:·50,·SHA:·087734aa1be0603b94b9b5b319d6780547dcfe2a9800213fe48d2c5117858eff·...·]-61">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">177 ·························</span><span·class="p"·data-group-id="0182524074-61">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_net_if</span><span·class="p"·data-group-id="0182524074-62">(</span><span·class="p"·data-group-id="0182524074-62"[·...·truncated·by·diffoscope;·len:·50,·SHA:·a060db1ab961aa04019b745483ba8c714559c534a1d1ecb8608e89b9bba7a999·...·]-61">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
178 ·························</span><span·class="p"·data-group-id="9775196638-63">{</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">server</span><span·class="p"·data-group-id="9775196638-64">(</span><span·class="p"·data-group-id="9775196638-64">)</span><span·class="p"·data-group-id="9775196638-63">}</span><span·class="w">··········</span><span·class="p">|</span><span·class="w"> 
179 ·························</span><span·class="p"·data-group-id="9775196638-65">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">···············</span><span·class="nf">note_store</span><span·class="p"·data-group-id="9775196638-66">(</span><span·class="p"·data-group-id="9775196638-66">)</span><span·class="p"·data-group-id="9775196638-65">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w"> 
180 ·························</span><span·class="p"·data-group-id="9775196638-67">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_config</span><span·class="p"·data-group-id="9775196638-68">(</span><span·class="p"·data-group-id="9775196638-68"[·...·truncated·by·diffoscope;·len:·79,·SHA:·4548ff4a1718a09414556d6694b508ced6a9d62450f48cef8536db808c697a41·...·]··</span><span·class="p">|</span><span·class="w">178 ·························</span><span·class="p"·data-group-id="0182524074-63">{</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">server</span><span·class="p"·data-group-id="0182524074-64">(</span><span·class="p"·data-group-id="0182524074-64">)</span[·...·truncated·by·diffoscope;·len:·79,·SHA:·2674eb98ed711b832e602d69ea4489d2bc32fdff87c2bcbf875e5961e4c3d900·...·]··</span><span·class="p">|</span><span·class="w">
 179 ·························</span><span·class="p"·data-group-id="0182524074-65">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">···············</span><span·class="nf">note_store</span><span·class="p"·data-group-id="0182524074-66">(</span><span·class="p"·data-group-id="0182524074-66">)</span><span·class="p"·data-group-id="0182524074-65">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">
 180 ·························</span><span·class="p"·data-group-id="0182524074-67">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_config</span><span·class="p"·data-group-id="0182524074-68">(</span><span·class="p"·data-group-id="0182524074-68">)</span><span·class="p"·data-group-id="0182524074-67">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
181 ·························</span><span·class="p"·data-group-id="9775196638-69">{</span><span·class="ss">inform_request_behaviour</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">manager_irb</span><span·class="p"·data-group-id="9775196638-70">(</span><span·class="p"·data-group-id="9775196638-70">)<[·...·truncated·by·diffoscope;·len:·47,·SHA:·1735085f47103b0efb0cdfaf4823e20ec694344ed446e5db47c5cae2e687c997·...·]-69">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">181 ·························</span><span·class="p"·data-group-id="0182524074-69">{</span><span·class="ss">inform_request_behaviour</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">manager_irb</span><span·class="p"·data-group-id="0182524074-70">(</span><span·class="p"·data-group-id="0182524074-70">)<[·...·truncated·by·diffoscope;·len:·47,·SHA:·6a860057ee7fec40d121607e4e0de3465fee86a0e761f5def0c4d2fa95c23577·...·]-69">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
182 ·························</span><span·class="p"·data-group-id="9775196638-71">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·····················</span><span·class="nf">manager_mibs</span><span·class="p"·data-group-id="9775196638-72">(</span><span·class="p"·data-group-id="9775196638-72">)[·...·truncated·by·diffoscope;·len:·48,·SHA:·fa638dee972de3a487bc10993d041977112ab8f4b2960d3319b48cc20259fe60·...·]-71">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">182 ·························</span><span·class="p"·data-group-id="0182524074-71">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·····················</span><span·class="nf">manager_mibs</span><span·class="p"·data-group-id="0182524074-72">(</span><span·class="p"·data-group-id="0182524074-72">)[·...·truncated·by·diffoscope;·len:·48,·SHA:·09c6d6d66f8a24d4476bfc3d4314322c5ec0b23f6184438d6a7b45aa4dcd99b9·...·]-71">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">
183 ·························</span><span·class="p"·data-group-id="9775196638-73">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">priority</span><span·class="p"·data-group-id="9775196638-74">(</span><span·class="p"·data-group-id="9775196638-74">)</span><span·class="p"·data-group-id="9775196638-73">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w"> 
184 ·························</span><span·class="p"·data-group-id="9775196638-75">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··········</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="9775196638-76">(</span><span·class="p"·data-group-id="9775196638-76[·...·truncated·by·diffoscope;·len:·80,·SHA:·ab636ca7592de3b9101354276c93b3d6bbfa35ba083456dfb65b12cf9e97818e·...·]·</span><span·class="p">|</span><span·class="w">183 ·························</span><span·class="p"·data-group-id="0182524074-73">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">priority</span><span·class="p"·data-group-id="0182524074-74">(</span><span·class="p"·data-group-id="0182524074-74">)</sp[·...·truncated·by·diffoscope;·len:·80,·SHA:·ac9291872cd9c88da4dfe9d95fadcea7d4b12d1c9ea01fb9d1c78beadb376d4f·...·]·</span><span·class="p">|</span><span·class="w">
 184 ·························</span><span·class="p"·data-group-id="0182524074-75">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··········</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="0182524074-76">(</span><span·class="p"·data-group-id="0182524074-76">)</span><span·class="p"·data-group-id="0182524074-75">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
185 ·························</span><span·class="p"·data-group-id="9775196638-77">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">versions</span><span·class="p"·data-group-id="9775196638-78">(</span><span·class="p"·data-group-id="9775196638-78">)</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·b1af7fdfe54d3f43cf33361c7e71d59713f6f5f39bfda4af84b40cb8ff0d4d2b·...·]-77">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">185 ·························</span><span·class="p"·data-group-id="0182524074-77">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">versions</span><span·class="p"·data-group-id="0182524074-78">(</span><span·class="p"·data-group-id="0182524074-78">)</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·b444c357c010216d5e7cb89a1921fd97fcaede164ab554129be7655ec5394f3c·...·]-77">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">
186 ·························</span><span·class="p"·data-group-id="9775196638-79">{</span><span·class="ss">def_user_mod</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">def_user_module</span><span·class="p"·data-group-id="9775196638-80">(</span><span·class="p"·data-group-id="9775196638-80">)</span><span·class="w">··</span><span·class="p">|</span><span·class="w">186 ·························</span><span·class="p"·data-group-id="0182524074-79">{</span><span·class="ss">def_user_mod</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">def_user_module</span><span·class="p"·data-group-id="0182524074-80">(</span><span·class="p"·data-group-id="0182524074-80">)</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
187 ·························</span><span·class="p"·data-group-id="9775196638-81">{</span><span·class="ss">def_user_data</span><span·class="p">,</span><span·class="w">············</span><span·class="nf">def_user_data</span><span·class="p"·data-group-id="9775196638-82">(</span><span·class="p"·data-group-id="9775196638-82">[·...·truncated·by·diffoscope;·len:·49,·SHA:·9b689c8aa0d0d12fa1ac58ba1a05dc9886d02cb73a6212503dce41327343d5ab·...·]-81">}</span></code></pre><p><a·href=""·id="agent_opts_and_types"></a></p><p>Agent·specific·config·options·and·types:</p><ul><li><p><strong><code·class="inline"·id="agent_type">agent_type()·=·master·|·sub·&lt;optional&gt;</code></strong>·-·If·<code·class="inline">master</code>,187 ·························</span><span·class="p"·data-group-id="0182524074-81">{</span><span·class="ss">def_user_data</span><span·class="p">,</span><span·class="w">············</span><span·class="nf">def_user_data</span><span·class="p"·data-group-id="0182524074-82">(</span><span·class="p"·data-group-id="0182524074-82">[·...·truncated·by·diffoscope;·len:·49,·SHA:·4ed7e64c12292d2413a77f467cfa8392eeb2fbf4c6dfb73623ed4c50ad9f9a39·...·]-81">}</span></code></pre><p><a·href=""·id="agent_opts_and_types"></a></p><p>Agent·specific·config·options·and·types:</p><ul><li><p><strong><code·class="inline"·id="agent_type">agent_type()·=·master·|·sub·&lt;optional&gt;</code></strong>·-·If·<code·class="inline">master</code>,
188 one·master·agent·is·started.·Otherwise,·no·agents·are·started.</p><p>Default·is·<code·class="inline">master</code>.</p></li><li><p><strong><code·class="inline"·id="agent_disco">agent_discovery()·=·[agent_discovery_opt()]·&lt;optional&gt;</code></strong>·-188 one·master·agent·is·started.·Otherwise,·no·agents·are·started.</p><p>Default·is·<code·class="inline">master</code>.</p></li><li><p><strong><code·class="inline"·id="agent_disco">agent_discovery()·=·[agent_discovery_opt()]·&lt;optional&gt;</code></strong>·-
189 <code·class="inline">agent_discovery_opt()·=·{terminating,·agent_terminating_discovery_opts()}·|·{originating,·agent_originating_discovery_opts()}</code></p><p>The·<code·class="inline">terminating</code>·options·effects·discovery·initiated·by·a·manager.</p><p>The·<code·class="inline">originating</code>·options·effects·discovery·initiated·by·this·agent.</p><p>For·defaults·see·the·options·in·<code·class="inline">agent_discovery_opt()</code>.</p></li><li><p><strong><code·class="inline"·id="agent_term_disco_opts">agent_terminating_discovery_opts()·=·[agent_terminating_discovery_opt()]·&lt;optional&gt;</code></strong>·-189 <code·class="inline">agent_discovery_opt()·=·{terminating,·agent_terminating_discovery_opts()}·|·{originating,·agent_originating_discovery_opts()}</code></p><p>The·<code·class="inline">terminating</code>·options·effects·discovery·initiated·by·a·manager.</p><p>The·<code·class="inline">originating</code>·options·effects·discovery·initiated·by·this·agent.</p><p>For·defaults·see·the·options·in·<code·class="inline">agent_discovery_opt()</code>.</p></li><li><p><strong><code·class="inline"·id="agent_term_disco_opts">agent_terminating_discovery_opts()·=·[agent_terminating_discovery_opt()]·&lt;optional&gt;</code></strong>·-
190 <code·class="inline">agent_terminating_discovery_opt()·=·{enable,·boolean()}·|·{stage2,·discovery·|·plain}·|·{trigger_username,·string()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">terminating</code>·in·this·agent·(i.e.190 <code·class="inline">agent_terminating_discovery_opt()·=·{enable,·boolean()}·|·{stage2,·discovery·|·plain}·|·{trigger_username,·string()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">terminating</code>·in·this·agent·(i.e.
191 initiated·by·a·manager).</p><p>The·default·values·for·the·<code·class="inline">terminating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li><li>stage2:·<code·class="inline">discovery</code></li><li>trigger_username:·<code·class="inline">&quot;&quot;</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_orig_disco_opts">agent_originating_discovery_opts()·=·[agent_originating_discovery_opt()]·&lt;optional&gt;</code></strong>·-191 initiated·by·a·manager).</p><p>The·default·values·for·the·<code·class="inline">terminating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li><li>stage2:·<code·class="inline">discovery</code></li><li>trigger_username:·<code·class="inline">&quot;&quot;</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_orig_disco_opts">agent_originating_discovery_opts()·=·[agent_originating_discovery_opt()]·&lt;optional&gt;</code></strong>·-
192 <code·class="inline">agent_originating_discovery_opt()·=·{enable,·boolean()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">originating</code>·in·this·agent.</p><p>The·default·values·for·the·<code·class="inline">originating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_mt">multi_threaded()·=·bool()·|·extended·&lt;optional&gt;</code></strong>·-·If192 <code·class="inline">agent_originating_discovery_opt()·=·{enable,·boolean()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">originating</code>·in·this·agent.</p><p>The·default·values·for·the·<code·class="inline">originating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_mt">multi_threaded()·=·bool()·|·extended·&lt;optional&gt;</code></strong>·-·If
193 <code·class="inline">true</code>·(or·<code·class="inline">extended</code>),·the·agent·is·multi-threaded,·with·one·thread·for·each193 <code·class="inline">true</code>·(or·<code·class="inline">extended</code>),·the·agent·is·multi-threaded,·with·one·thread·for·each
194 get·request.</p><p>The·value·<code·class="inline">extended</code>·means·that·a·special·'process'·is·also·created·intended194 get·request.</p><p>The·value·<code·class="inline">extended</code>·means·that·a·special·'process'·is·also·created·intended
34.9 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_config.html
    
Offset 141, 49 lines modifiedOffset 141, 49 lines modified
141 <a·href="snmp_agent_config_files.html">Definition·of·Agent·Configuration·Files</a>·for·more141 <a·href="snmp_agent_config_files.html">Definition·of·Agent·Configuration·Files</a>·for·more
142 information).</li><li>the·<em>database·directory</em>·stores·the·internal·database·files.</li></ul><p>The·following·directory·must·exist·in·the·system·to·run·the·manager:</p><ul><li>the·<em>configuration·directory</em>·stores·all·configuration·files·used·by·the142 information).</li><li>the·<em>database·directory</em>·stores·the·internal·database·files.</li></ul><p>The·following·directory·must·exist·in·the·system·to·run·the·manager:</p><ul><li>the·<em>configuration·directory</em>·stores·all·configuration·files·used·by·the
143 manager·(refer·to·the·chapter143 manager·(refer·to·the·chapter
144 <a·href="snmp_manager_config_files.html">Definition·of·Manager·Configuration·Files</a>·for144 <a·href="snmp_manager_config_files.html">Definition·of·Manager·Configuration·Files</a>·for
145 more·information).</li><li>the·<em>database·directory</em>·stores·the·internal·database·files.</li></ul><p>The·agent·and·manager·uses·(application)·configuration·parameters·to·find·out145 more·information).</li><li>the·<em>database·directory</em>·stores·the·internal·database·files.</li></ul><p>The·agent·and·manager·uses·(application)·configuration·parameters·to·find·out
146 where·these·directories·are·located.·The·parameters·should·be·defined·in·an146 where·these·directories·are·located.·The·parameters·should·be·defined·in·an
147 Erlang·system·configuration·file.·The·following·configuration·parameters·are147 Erlang·system·configuration·file.·The·following·configuration·parameters·are
148 defined·for·the·SNMP·application:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nf">agent_options</span><span·class="p"·data-group-id="0646603790-1">(</span><span·class="p"·data-group-id="0646603790-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0646603790-2">[</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="0646603790-3">(</span><span·class="p"·data-group-id="0646603790-3">)</span><span·class="p"·data-group-id="0646603790-2">]</span><span·class="w"> 
149 ······</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="0646603790-4">(</span><span·class="p"·data-group-id="0646603790-4">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·352,·SHA:·2a4ef7ed5f058ca6f4f658c68032cc72a243cfb4490c5a53aeb57a3aa1be6b71·...·]</span><span·class="w">148 defined·for·the·SNMP·application:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="nf">agent_options</span><span·class="p"·data-group-id="9495084554-1">(</span><span·class="p"·data-group-id="9495084554-1">)</span[·...·truncated·by·diffoscope;·len:·314,·SHA:·2c6601578051e2fa1348658f1439cb205065e4b65eb3ecc941ca52a656ca8d45·...·]</span><span·class="w">
 149 ······</span><span·class="nf">agent_option</span><span·class="p"·data-group-id="9495084554-4">(</span><span·class="p"·data-group-id="9495084554-4">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9495084554-5">{</span><span·class="ss">restart_type</span><span·class="p">,</span><span·class="w">·····</span><span·class="nf">restart_type</span><span·class="p"·data-group-id="9495084554-6">(</span><span·class="p"·data-group-id="9495084554-6">)</span><span·class="p"·data-group-id="9495084554-5">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
150 ·······················</span><span·class="p"·data-group-id="0646603790-7">{</span><span·class="ss">agent_type</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">agent_type</span><span·class="p"·data-group-id="0646603790-8">(</span><span·class="p"·data-group-id="0646603790-8">)</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·67729e71a5cab3101ccf900cbe83c9686b85178e03c05dfe3a283498a6b6ad6f·...·]-7">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">150 ·······················</span><span·class="p"·data-group-id="9495084554-7">{</span><span·class="ss">agent_type</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">agent_type</span><span·class="p"·data-group-id="9495084554-8">(</span><span·class="p"·data-group-id="9495084554-8">)</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·9c985a2fbfae7e23bac350b964993bde000d295f028bb591c9b5db84c44192d0·...·]-7">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
151 ·······················</span><span·class="p"·data-group-id="0646603790-9">{</span><span·class="ss">agent_verbosity</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">verbosity</span><span·class="p"·data-group-id="0646603790-10">(</span><span·class="p"·data-group-id="0646603790-10">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·f5ebab75a6dee44d05d4408443fc9ee492db4dfd5197d51677b8da06e3d55cad·...·]-9">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">151 ·······················</span><span·class="p"·data-group-id="9495084554-9">{</span><span·class="ss">agent_verbosity</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">verbosity</span><span·class="p"·data-group-id="9495084554-10">(</span><span·class="p"·data-group-id="9495084554-10">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·eeb803ca7d04446bda50d43ebd93727915c2909141ce79c6584b96017cfc4444·...·]-9">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">
152 ·······················</span><span·class="p"·data-group-id="0646603790-11">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">versions</span><span·class="p"·data-group-id="0646603790-12">(</span><span·class="p"·data-group-id="0646603790-12">)</span><span·class="p"·data-group-id="0646603790-11">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w"> 
153 ·······················</span><span·class="p"·data-group-id="0646603790-13">{</span><span·class="ss">discovery</span><span·class="p">,</span><span·class="w">········</span><span·class="nf">agent_discovery</span><span·class="p"·data-group-id="0646603790-14">(</span><span·class="p"·data-group-id="0646603790-14">)</spa[·...·truncated·by·diffoscope;·len:·72,·SHA:·6a3a4fe42ffa56c5fcbc0e7027a23c49bfc366ccec08185ba6b9da1c3fb15a59·...·]··</span><span·class="p">|</span><span·class="w">152 ·······················</span><span·class="p"·data-group-id="9495084554-11">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">versions</span><span·class="p"·data-group-id="9495084554-12">(</span><span·class="p"·data-group-id="9495084554-12">)</span><span[·...·truncated·by·diffoscope;·len:·72,·SHA:·c0973dad9d76e9deb4f397a1fb5206c491355b405756bd68884bbf8baaf234a6·...·]··</span><span·class="p">|</span><span·class="w">
 153 ·······················</span><span·class="p"·data-group-id="9495084554-13">{</span><span·class="ss">discovery</span><span·class="p">,</span><span·class="w">········</span><span·class="nf">agent_discovery</span><span·class="p"·data-group-id="9495084554-14">(</span><span·class="p"·data-group-id="9495084554-14">)</span><span·class="p"·data-group-id="9495084554-13">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
154 ·······················</span><span·class="p"·data-group-id="0646603790-15">{</span><span·class="ss">gb_max_vbs</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">gb_max_vbs</span><span·class="p"·data-group-id="0646603790-16">(</span><span·class="p"·data-group-id="0646603790-16">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·fdcebb723ba78b925b3f7ff6f2a79295f6b5f5c5dd5a7c1e9d393a0e56e03962·...·]-15">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">154 ·······················</span><span·class="p"·data-group-id="9495084554-15">{</span><span·class="ss">gb_max_vbs</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">gb_max_vbs</span><span·class="p"·data-group-id="9495084554-16">(</span><span·class="p"·data-group-id="9495084554-16">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·ce3af580a2e7258153cf9a136e0c4b64bb62d1c397a147c7bd9d4210b0f40591·...·]-15">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
155 ·······················</span><span·class="p"·data-group-id="0646603790-17">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">priority</span><span·class="p"·data-group-id="0646603790-18">(</span><span·class="p"·data-group-id="0646603790-18">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·f5ebab75a6dee44d05d4408443fc9ee492db4dfd5197d51677b8da06e3d55cad·...·]-17">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">155 ·······················</span><span·class="p"·data-group-id="9495084554-17">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">priority</span><span·class="p"·data-group-id="9495084554-18">(</span><span·class="p"·data-group-id="9495084554-18">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·eeb803ca7d04446bda50d43ebd93727915c2909141ce79c6584b96017cfc4444·...·]-17">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">
156 ·······················</span><span·class="p"·data-group-id="0646603790-19">{</span><span·class="ss">multi_threaded</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">multi_threaded</span><span·class="p"·data-group-id="0646603790-20">(</span><span·class="p"·data-group-id="0646603790-20">)</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·0de247aa8b2d2b0ad8466879fc1c96123b0489b1d0c5fa8bfef2bbffbce287fc·...·]-19">}</span><span·class="w">···</span><span·class="p">|</span><span·class="w">156 ·······················</span><span·class="p"·data-group-id="9495084554-19">{</span><span·class="ss">multi_threaded</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">multi_threaded</span><span·class="p"·data-group-id="9495084554-20">(</span><span·class="p"·data-group-id="9495084554-20">)</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·562b702175d0545b4adeb9f4d490b81d870133002847202f6bf18d753f711e64·...·]-19">}</span><span·class="w">···</span><span·class="p">|</span><span·class="w">
157 ·······················</span><span·class="p"·data-group-id="0646603790-21">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">db_dir</span><span·class="p"·data-group-id="0646603790-22">(</span><span·class="p"·data-group-id="0646603790-22">)</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·fccba50c10ce1f22d7edd7e01de00131554216b5ca6f33e7e51605f8dcf3a9cd·...·]-21">}</span><span·class="w">···········</span><span·class="p">|</span><span·class="w">157 ·······················</span><span·class="p"·data-group-id="9495084554-21">{</span><span·class="ss">db_dir</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">db_dir</span><span·class="p"·data-group-id="9495084554-22">(</span><span·class="p"·data-group-id="9495084554-22">)</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·ec03ee1bf13f7f11c6111126a5bd197bc853e9493380a438673f6d4c5f25f2da·...·]-21">}</span><span·class="w">···········</span><span·class="p">|</span><span·class="w">
158 ·······················</span><span·class="p"·data-group-id="0646603790-23">{</span><span·class="ss">db_init_error</span><span·class="p">,</span><span·class="w">····</span><span·class="nf">db_init_error</span><span·class="p"·data-group-id="0646603790-24">(</span><span·class="p"·data-group-id="0646603790-24">)</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·7077a98d1d6fe0b7d815ae1aa3a7817688fe6d707cee11b25a5b45f1d14cadbf·...·]-23">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">158 ·······················</span><span·class="p"·data-group-id="9495084554-23">{</span><span·class="ss">db_init_error</span><span·class="p">,</span><span·class="w">····</span><span·class="nf">db_init_error</span><span·class="p"·data-group-id="9495084554-24">(</span><span·class="p"·data-group-id="9495084554-24">)</span>[·...·truncated·by·diffoscope;·len:·41,·SHA:·0344aea98a9330b9edd945db41750a43f883cea25e6b4bf23941baea42f425f9·...·]-23">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">
159 ·······················</span><span·class="p"·data-group-id="0646603790-25">{</span><span·class="ss">local_db</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">local_db</span><span·class="p"·data-group-id="0646603790-26">(</span><span·class="p"·data-group-id="0646603790-26">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·f5ebab75a6dee44d05d4408443fc9ee492db4dfd5197d51677b8da06e3d55cad·...·]-25">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">159 ·······················</span><span·class="p"·data-group-id="9495084554-25">{</span><span·class="ss">local_db</span><span·class="p">,</span><span·class="w">·········</span><span·class="nf">local_db</span><span·class="p"·data-group-id="9495084554-26">(</span><span·class="p"·data-group-id="9495084554-26">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·eeb803ca7d04446bda50d43ebd93727915c2909141ce79c6584b96017cfc4444·...·]-25">}</span><span·class="w">·········</span><span·class="p">|</span><span·class="w">
160 ·······················</span><span·class="p"·data-group-id="0646603790-27">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_net_if</span><span·class="p"·data-group-id="0646603790-28">(</span><span·class="p"·data-group-id="0646603790-28">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·75a895063a41312e06895999ffbbb3b546282aef02f621b60d9e84ee190755b2·...·]-27">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">160 ·······················</span><span·class="p"·data-group-id="9495084554-27">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_net_if</span><span·class="p"·data-group-id="9495084554-28">(</span><span·class="p"·data-group-id="9495084554-28">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·94e7ea7a51dc4fd3efd02d52ce3c1a03b8a7e48f0ff1af79fda9a6fcf9176dfa·...·]-27">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
161 ·······················</span><span·class="p"·data-group-id="0646603790-29">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">mibs</span><span·class="p"·data-group-id="0646603790-30">(</span><span·class="p"·data-group-id="0646603790-30">)</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·04307204025b44628ffa89960be00315c6e0c415f338b735ffdcfff7bf73a603·...·]-29">}</span><span·class="w">·············</span><span·class="p">|</span><span·class="w">161 ·······················</span><span·class="p"·data-group-id="9495084554-29">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">mibs</span><span·class="p"·data-group-id="9495084554-30">(</span><span·class="p"·data-group-id="9495084554-30">)</span><span·cla[·...·truncated·by·diffoscope;·len:·32,·SHA:·8af43024a60b20ffec8ba72475bbc35e924d12b51772bb5f03c199f967916063·...·]-29">}</span><span·class="w">·············</span><span·class="p">|</span><span·class="w">
162 ·······················</span><span·class="p"·data-group-id="0646603790-31">{</span><span·class="ss">mib_storage</span><span·class="p">,</span><span·class="w">······</span><span·class="nf">mib_storage</span><span·class="p"·data-group-id="0646603790-32">(</span><span·class="p"·data-group-id="0646603790-32">)</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·00cd6d4a9e4b7eb2a9283d4d59f427bc7571dd264fbc83e230d8614eb62d178c·...·]-31">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">162 ·······················</span><span·class="p"·data-group-id="9495084554-31">{</span><span·class="ss">mib_storage</span><span·class="p">,</span><span·class="w">······</span><span·class="nf">mib_storage</span><span·class="p"·data-group-id="9495084554-32">(</span><span·class="p"·data-group-id="9495084554-32">)</span><s[·...·truncated·by·diffoscope;·len:·39,·SHA:·7e259e1a37f47b80633f10e824cecd649aa5bdca6cbe9b28b98f123a27a0b9bb·...·]-31">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">
163 ·······················</span><span·class="p"·data-group-id="0646603790-33">{</span><span·class="ss">mib_server</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">mib_server</span><span·class="p"·data-group-id="0646603790-34">(</span><span·class="p"·data-group-id="0646603790-34">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·fdcebb723ba78b925b3f7ff6f2a79295f6b5f5c5dd5a7c1e9d393a0e56e03962·...·]-33">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">163 ·······················</span><span·class="p"·data-group-id="9495084554-33">{</span><span·class="ss">mib_server</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">mib_server</span><span·class="p"·data-group-id="9495084554-34">(</span><span·class="p"·data-group-id="9495084554-34">)</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·ce3af580a2e7258153cf9a136e0c4b64bb62d1c397a147c7bd9d4210b0f40591·...·]-33">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
164 ·······················</span><span·class="p"·data-group-id="0646603790-35">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="0646603790-36">(</span><span·class="p"·data-group-id="0646603790-36">)</span><span·class="p"·data-group-id="0646603790-35">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w"> 
165 ·······················</span><span·class="p"·data-group-id="0646603790-37">{</span><span·class="ss">error_report_mod</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">error_report_mod</span><span·class="p"·data-group-id="0646603790-38">(</span><span·class="p"·data-group-id="0646603790-38">)</span><span·class="p"·data-group-id="0646603790-37">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w"> 
166 ·······················</span><span·class="p"·data-group-id="0646603790-39">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">note_store</span><span·class="p"·data-group-id="0646603790-40">(</span><span·class="p"·data-group-id="0646603790-40">)</span><span·class="p"·data-group-id="0646603790-39">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w"> 
167 ·······················</span><span·class="p"·data-group-id="0646603790-41">{</span><span·class="ss">symbolic_store</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">symbolic_store</span><span·class="p"·data-group-id="0646603790-42">(</span><span·class="p"·data-group-id="0646603790-42">)</span[·...·truncated·by·diffoscope;·len:·72,·SHA:·cc7ac0ac2c40be965f2411273f9531f114e81948d548e1c808c187481d7f37ed·...·]··</span><span·class="p">|</span><span·class="w">164 ·······················</span><span·class="p"·data-group-id="9495084554-35">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="9495084554-36">(</span><span·class="p"·data-group-id="9495084554-36">)</spa[·...·truncated·by·diffoscope;·len:·72,·SHA:·2462fdc64e38a9e01df5ef8d16f52d39f3a536063f579dcd2e848e7740e937e3·...·]··</span><span·class="p">|</span><span·class="w">
 165 ·······················</span><span·class="p"·data-group-id="9495084554-37">{</span><span·class="ss">error_report_mod</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">error_report_mod</span><span·class="p"·data-group-id="9495084554-38">(</span><span·class="p"·data-group-id="9495084554-38">)</span><span·class="p"·data-group-id="9495084554-37">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
 166 ·······················</span><span·class="p"·data-group-id="9495084554-39">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">·······</span><span·class="nf">note_store</span><span·class="p"·data-group-id="9495084554-40">(</span><span·class="p"·data-group-id="9495084554-40">)</span><span·class="p"·data-group-id="9495084554-39">}</span><span·class="w">·······</span><span·class="p">|</span><span·class="w">
 167 ·······················</span><span·class="p"·data-group-id="9495084554-41">{</span><span·class="ss">symbolic_store</span><span·class="p">,</span><span·class="w">···</span><span·class="nf">symbolic_store</span><span·class="p"·data-group-id="9495084554-42">(</span><span·class="p"·data-group-id="9495084554-42">)</span><span·class="p"·data-group-id="9495084554-41">}</span><span·class="w">···</span><span·class="p">|</span><span·class="w">
168 ·······················</span><span·class="p"·data-group-id="0646603790-43">{</span><span·class="ss">target_cache</span><span·class="p">,</span><span·class="w">·····</span><span·class="nf">target_cache</span><span·class="p"·data-group-id="0646603790-44">(</span><span·class="p"·data-group-id="0646603790-44">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·75a895063a41312e06895999ffbbb3b546282aef02f621b60d9e84ee190755b2·...·]-43">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">168 ·······················</span><span·class="p"·data-group-id="9495084554-43">{</span><span·class="ss">target_cache</span><span·class="p">,</span><span·class="w">·····</span><span·class="nf">target_cache</span><span·class="p"·data-group-id="9495084554-44">(</span><span·class="p"·data-group-id="9495084554-44">)</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·94e7ea7a51dc4fd3efd02d52ce3c1a03b8a7e48f0ff1af79fda9a6fcf9176dfa·...·]-43">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
169 ·······················</span><span·class="p"·data-group-id="0646603790-45">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_config</span><span·class="p"·data-group-id="0646603790-46">(</span><span·class="p"·data-group-id="0646603790-46">)</span><span·class="p"·data-group-id="0646603790-45">}</span><span·class="w"> 
170 ······</span><span·class="nf">manager_options</span><span·class="p"·data-group-id="0646603790-47">(</span><span·class="p"·data-group-id="0646603790-47">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·217,·SHA:·29a986b538fa931f9bfeb2b930511be3522a761d3efeef164178094478a8e238·...·]</span><span·class="w">169 ·······················</span><span·class="p"·data-group-id="9495084554-45">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···········</span><span·class="nf">agent_config</span><span·class="p"·data-group-id="9495084554-46">(</span>[·...·truncated·by·diffoscope;·len:·101,·SHA:·9387874a7e35aca293624b1f0d64fb42c0fda708cc72a2edb78826246cd32f49·...·]</span><span·class="w">
 170 ······</span><span·class="nf">manager_options</span><span·class="p"·data-group-id="9495084554-47">(</span><span·class="p"·data-group-id="9495084554-47">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9495084554-48">[</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="9495084554-49">(</span><span·class="p"·data-group-id="9495084554-49">)</span><span·class="p"·data-group-id="9495084554-48">]</span><span·class="w">
171 ······</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="0646603790-50">(</span><span·class="p"·data-group-id="0646603790-50">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0646603790-51">{</span><span·class="ss">restart_type</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·228,·SHA:·485fbf2ed793ea513e344d69ac074ecec943d927ddb9d9e16af383f03fde7387·...·]-51">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">171 ······</span><span·class="nf">manager_option</span><span·class="p"·data-group-id="9495084554-50">(</span><span·class="p"·data-group-id="9495084554-50">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9495084554-51">{</span><span·class="ss">restart_type</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·228,·SHA:·898359b4211ec4537f04c48571c8df708c480211b9b56495d837bec4c56f0247·...·]-51">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">
172 ·························</span><span·class="p"·data-group-id="0646603790-53">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_net_if</span><span·class="p"·data-group-id="0646603790-54">(</span><span·class="p"·data-group-id="0646603790-54"[·...·truncated·by·diffoscope;·len:·50,·SHA:·54b5c5a0947b748793e06ea9745ca04f75bce7ce1076103c9149ea7e1a26cd89·...·]-53">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">172 ·························</span><span·class="p"·data-group-id="9495084554-53">{</span><span·class="ss">net_if</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_net_if</span><span·class="p"·data-group-id="9495084554-54">(</span><span·class="p"·data-group-id="9495084554-54"[·...·truncated·by·diffoscope;·len:·50,·SHA:·16994245dd3913bf9b909ed28ecc5204a5afb7755b60b7816bf13cc4322e7e32·...·]-53">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
173 ·························</span><span·class="p"·data-group-id="0646603790-55">{</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">server</span><span·class="p"·data-group-id="0646603790-56">(</span><span·class="p"·data-group-id="0646603790-56">)</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·0de247aa8b2d2b0ad8466879fc1c96123b0489b1d0c5fa8bfef2bbffbce287fc·...·]-55">}</span><span·class="w">··········</span><span·class="p">|</span><span·class="w">173 ·························</span><span·class="p"·data-group-id="9495084554-55">{</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">server</span><span·class="p"·data-group-id="9495084554-56">(</span><span·class="p"·data-group-id="9495084554-56">)</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·562b702175d0545b4adeb9f4d490b81d870133002847202f6bf18d753f711e64·...·]-55">}</span><span·class="w">··········</span><span·class="p">|</span><span·class="w">
174 ·························</span><span·class="p"·data-group-id="0646603790-57">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">···············</span><span·class="nf">note_store</span><span·class="p"·data-group-id="0646603790-58">(</span><span·class="p"·data-group-id="0646603790-58">)</[·...·truncated·by·diffoscope;·len:·46,·SHA:·a51897e83a3b1e796a348aeb4143c42ef8eda27accb5c2ab61e00384d344797f·...·]-57">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">174 ·························</span><span·class="p"·data-group-id="9495084554-57">{</span><span·class="ss">note_store</span><span·class="p">,</span><span·class="w">···············</span><span·class="nf">note_store</span><span·class="p"·data-group-id="9495084554-58">(</span><span·class="p"·data-group-id="9495084554-58">)</[·...·truncated·by·diffoscope;·len:·46,·SHA:·447cb688f49b6b28002f6d65150b64c29fd5ac13249f37977028756dfdab39d0·...·]-57">}</span><span·class="w">······</span><span·class="p">|</span><span·class="w">
175 ·························</span><span·class="p"·data-group-id="0646603790-59">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_config</span><span·class="p"·data-group-id="0646603790-60">(</span><span·class="p"·data-group-id="0646603790-60"[·...·truncated·by·diffoscope;·len:·50,·SHA:·54b5c5a0947b748793e06ea9745ca04f75bce7ce1076103c9149ea7e1a26cd89·...·]-59">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">175 ·························</span><span·class="p"·data-group-id="9495084554-59">{</span><span·class="ss">config</span><span·class="p">,</span><span·class="w">···················</span><span·class="nf">manager_config</span><span·class="p"·data-group-id="9495084554-60">(</span><span·class="p"·data-group-id="9495084554-60"[·...·truncated·by·diffoscope;·len:·50,·SHA:·16994245dd3913bf9b909ed28ecc5204a5afb7755b60b7816bf13cc4322e7e32·...·]-59">}</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
176 ·························</span><span·class="p"·data-group-id="0646603790-61">{</span><span·class="ss">inform_request_behaviour</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">manager_irb</span><span·class="p"·data-group-id="0646603790-62">(</span><span·class="p"·data-group-id="0646603790-62">)<[·...·truncated·by·diffoscope;·len:·47,·SHA:·9d65ff9c7888fc8e4c0af6078623cfad00ce8a58e7db4c9138851f4d32d8449d·...·]-61">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">176 ·························</span><span·class="p"·data-group-id="9495084554-61">{</span><span·class="ss">inform_request_behaviour</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">manager_irb</span><span·class="p"·data-group-id="9495084554-62">(</span><span·class="p"·data-group-id="9495084554-62">)<[·...·truncated·by·diffoscope;·len:·47,·SHA:·e052a7ce4acd82e49e467d75fbbdf2020b4b210b9c3f6693a70b121204ee8df7·...·]-61">}</span><span·class="w">·····</span><span·class="p">|</span><span·class="w">
177 ·························</span><span·class="p"·data-group-id="0646603790-63">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·····················</span><span·class="nf">manager_mibs</span><span·class="p"·data-group-id="0646603790-64">(</span><span·class="p"·data-group-id="0646603790-64">)[·...·truncated·by·diffoscope;·len:·48,·SHA:·e2c979def1218ed446c78b5d30e271c31c89ccba2c4f049d4ca60d12134d5e54·...·]-63">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">177 ·························</span><span·class="p"·data-group-id="9495084554-63">{</span><span·class="ss">mibs</span><span·class="p">,</span><span·class="w">·····················</span><span·class="nf">manager_mibs</span><span·class="p"·data-group-id="9495084554-64">(</span><span·class="p"·data-group-id="9495084554-64">)[·...·truncated·by·diffoscope;·len:·48,·SHA:·2d0cff7ce94122ab61605b234197246f2c5a72831fe556d764c79e91b7f411af·...·]-63">}</span><span·class="w">····</span><span·class="p">|</span><span·class="w">
178 ·························</span><span·class="p"·data-group-id="0646603790-65">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">priority</span><span·class="p"·data-group-id="0646603790-66">(</span><span·class="p"·data-group-id="0646603790-66">)</span><span·class="p"·data-group-id="0646603790-65">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w"> 
179 ·························</span><span·class="p"·data-group-id="0646603790-67">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··········</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="0646603790-68">(</span><span·class="p"·data-group-id="0646603790-68">)</span><span·class="p"·data-group-id="0646603790-67">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w"> 
180 ·························</span><span·class="p"·data-group-id="0646603790-69">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">versions</span><span·class="p"·data-group-id="0646603790-70">(</span><span·class="p"·data-group-id="0646603790-70">)</sp[·...·truncated·by·diffoscope;·len:·47,·SHA:·3c14f94fa61d284432c5b175b1f85be6cd0fe9d0cb2d39c516a833988ad7f8a2·...·]">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">178 ·························</span><span·class="p"·data-group-id="9495084554-65">{</span><span·class="ss">priority</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">priority</span><span·class="p"·data-group-id="9495084554-66">(</span><span·class="p"·data-group-id="9495084554-66">)</sp[·...·truncated·by·diffoscope;·len:·47,·SHA:·cd91480db583d6800337d2219b6669588607823360c15cd807c10235e474b738·...·]">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">
 179 ·························</span><span·class="p"·data-group-id="9495084554-67">{</span><span·class="ss">audit_trail_log</span><span·class="p">,</span><span·class="w">··········</span><span·class="nf">audit_trail_log</span><span·class="p"·data-group-id="9495084554-68">(</span><span·class="p"·data-group-id="9495084554-68">)</span><span·class="p"·data-group-id="9495084554-67">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
 180 ·························</span><span·class="p"·data-group-id="9495084554-69">{</span><span·class="ss">versions</span><span·class="p">,</span><span·class="w">·················</span><span·class="nf">versions</span><span·class="p"·data-group-id="9495084554-70">(</span><span·class="p"·data-group-id="9495084554-70">)</span><span·class="p"·data-group-id="9495084554-69">}</span><span·class="w">········</span><span·class="p">|</span><span·class="w">
181 ·························</span><span·class="p"·data-group-id="0646603790-71">{</span><span·class="ss">def_user_mod</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">def_user_module</span><span·class="p"·data-group-id="0646603790-72">(</span><span·class="p"·data-group-id="0646603790-72">)</span><span·class="w">··</span><span·class="p">|</span><span·class="w">181 ·························</span><span·class="p"·data-group-id="9495084554-71">{</span><span·class="ss">def_user_mod</span><span·class="p">,</span><span·class="w">·············</span><span·class="nf">def_user_module</span><span·class="p"·data-group-id="9495084554-72">(</span><span·class="p"·data-group-id="9495084554-72">)</span><span·class="w">··</span><span·class="p">|</span><span·class="w">
182 ·························</span><span·class="p"·data-group-id="0646603790-73">{</span><span·class="ss">def_user_data</span><span·class="p">,</span><span·class="w">············</span><span·class="nf">def_user_data</span><span·class="p"·data-group-id="0646603790-74">(</span><span·class="p"·data-group-id="0646603790-74">[·...·truncated·by·diffoscope;·len:·49,·SHA:·e45d741d7e745fea2318d17ea28b327d8299fdd07aaba36508f19ddd2c9d0384·...·]-73">}</span></code></pre><p><a·href=""·id="agent_opts_and_types"></a></p><p>Agent·specific·config·options·and·types:</p><ul><li><p><strong><code·class="inline"·id="agent_type">agent_type()·=·master·|·sub·&lt;optional&gt;</code></strong>·-·If·<code·class="inline">master</code>,182 ·························</span><span·class="p"·data-group-id="9495084554-73">{</span><span·class="ss">def_user_data</span><span·class="p">,</span><span·class="w">············</span><span·class="nf">def_user_data</span><span·class="p"·data-group-id="9495084554-74">(</span><span·class="p"·data-group-id="9495084554-74">[·...·truncated·by·diffoscope;·len:·49,·SHA:·325c15fc53373353419e51171c390c21fde9d4ef0bdb156a0080c674fcd8b267·...·]-73">}</span></code></pre><p><a·href=""·id="agent_opts_and_types"></a></p><p>Agent·specific·config·options·and·types:</p><ul><li><p><strong><code·class="inline"·id="agent_type">agent_type()·=·master·|·sub·&lt;optional&gt;</code></strong>·-·If·<code·class="inline">master</code>,
183 one·master·agent·is·started.·Otherwise,·no·agents·are·started.</p><p>Default·is·<code·class="inline">master</code>.</p></li><li><p><strong><code·class="inline"·id="agent_disco">agent_discovery()·=·[agent_discovery_opt()]·&lt;optional&gt;</code></strong>·-183 one·master·agent·is·started.·Otherwise,·no·agents·are·started.</p><p>Default·is·<code·class="inline">master</code>.</p></li><li><p><strong><code·class="inline"·id="agent_disco">agent_discovery()·=·[agent_discovery_opt()]·&lt;optional&gt;</code></strong>·-
184 <code·class="inline">agent_discovery_opt()·=·{terminating,·agent_terminating_discovery_opts()}·|·{originating,·agent_originating_discovery_opts()}</code></p><p>The·<code·class="inline">terminating</code>·options·effects·discovery·initiated·by·a·manager.</p><p>The·<code·class="inline">originating</code>·options·effects·discovery·initiated·by·this·agent.</p><p>For·defaults·see·the·options·in·<code·class="inline">agent_discovery_opt()</code>.</p></li><li><p><strong><code·class="inline"·id="agent_term_disco_opts">agent_terminating_discovery_opts()·=·[agent_terminating_discovery_opt()]·&lt;optional&gt;</code></strong>·-184 <code·class="inline">agent_discovery_opt()·=·{terminating,·agent_terminating_discovery_opts()}·|·{originating,·agent_originating_discovery_opts()}</code></p><p>The·<code·class="inline">terminating</code>·options·effects·discovery·initiated·by·a·manager.</p><p>The·<code·class="inline">originating</code>·options·effects·discovery·initiated·by·this·agent.</p><p>For·defaults·see·the·options·in·<code·class="inline">agent_discovery_opt()</code>.</p></li><li><p><strong><code·class="inline"·id="agent_term_disco_opts">agent_terminating_discovery_opts()·=·[agent_terminating_discovery_opt()]·&lt;optional&gt;</code></strong>·-
185 <code·class="inline">agent_terminating_discovery_opt()·=·{enable,·boolean()}·|·{stage2,·discovery·|·plain}·|·{trigger_username,·string()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">terminating</code>·in·this·agent·(i.e.185 <code·class="inline">agent_terminating_discovery_opt()·=·{enable,·boolean()}·|·{stage2,·discovery·|·plain}·|·{trigger_username,·string()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">terminating</code>·in·this·agent·(i.e.
186 initiated·by·a·manager).</p><p>The·default·values·for·the·<code·class="inline">terminating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li><li>stage2:·<code·class="inline">discovery</code></li><li>trigger_username:·<code·class="inline">&quot;&quot;</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_orig_disco_opts">agent_originating_discovery_opts()·=·[agent_originating_discovery_opt()]·&lt;optional&gt;</code></strong>·-186 initiated·by·a·manager).</p><p>The·default·values·for·the·<code·class="inline">terminating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li><li>stage2:·<code·class="inline">discovery</code></li><li>trigger_username:·<code·class="inline">&quot;&quot;</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_orig_disco_opts">agent_originating_discovery_opts()·=·[agent_originating_discovery_opt()]·&lt;optional&gt;</code></strong>·-
187 <code·class="inline">agent_originating_discovery_opt()·=·{enable,·boolean()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">originating</code>·in·this·agent.</p><p>The·default·values·for·the·<code·class="inline">originating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_mt">multi_threaded()·=·bool()·|·extended&lt;optional&gt;</code></strong>·-·If·<code·class="inline">true</code>187 <code·class="inline">agent_originating_discovery_opt()·=·{enable,·boolean()}</code></p><p>These·are·options·effecting·discovery·<code·class="inline">originating</code>·in·this·agent.</p><p>The·default·values·for·the·<code·class="inline">originating</code>·discovery·options·are:</p><ul><li>enable:·<code·class="inline">true</code></li></ul></li><li><p><strong><code·class="inline"·id="agent_mt">multi_threaded()·=·bool()·|·extended&lt;optional&gt;</code></strong>·-·If·<code·class="inline">true</code>
188 (or·<code·class="inline">extended</code>),·the·agent·is·multi-threaded,·with·one·thread·for·each·get188 (or·<code·class="inline">extended</code>),·the·agent·is·multi-threaded,·with·one·thread·for·each·get
189 request.</p><p>The·value·<code·class="inline">extended</code>·means·that·a·special·'process'·is·also·created·intended189 request.</p><p>The·value·<code·class="inline">extended</code>·means·that·a·special·'process'·is·also·created·intended
18.9 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_generic.html
    
Offset 158, 49 lines modifiedOffset 158, 49 lines modified
158 Mnesia·table·<code·class="inline">snmp_variables</code>·which·must·be·a·table·with·two·attributes·(not·a158 Mnesia·table·<code·class="inline">snmp_variables</code>·which·must·be·a·table·with·two·attributes·(not·a
159 Mnesia·SNMP·table).·The·SNMP·tables·are·stored·in·Mnesia·tables·with·the·same159 Mnesia·SNMP·table).·The·SNMP·tables·are·stored·in·Mnesia·tables·with·the·same
160 names·as·the·SNMP·tables.·All·functions·assume·that·a·Mnesia·table·exists·with160 names·as·the·SNMP·tables.·All·functions·assume·that·a·Mnesia·table·exists·with
161 the·correct·name·and·attributes.·It·is·the·programmer's·responsibility·to·ensure161 the·correct·name·and·attributes.·It·is·the·programmer's·responsibility·to·ensure
162 this.·Specifically,·if·variables·are·stored·in·Mnesia,·the·table162 this.·Specifically,·if·variables·are·stored·in·Mnesia,·the·table
163 <code·class="inline">snmp_variables</code>·must·be·created·by·the·programmer.·The·record·definition·for163 <code·class="inline">snmp_variables</code>·must·be·created·by·the·programmer.·The·record·definition·for
164 this·table·is·defined·in·the·file·<code·class="inline">snmp/include/snmp_types.hrl</code>.</p><p>If·an·instrumentation·function·in·the·association·file·for·a·variable·<code·class="inline">myVar</code>164 this·table·is·defined·in·the·file·<code·class="inline">snmp/include/snmp_types.hrl</code>.</p><p>If·an·instrumentation·function·in·the·association·file·for·a·variable·<code·class="inline">myVar</code>
165 does·not·have·a·name·when·compiling·an·MIB,·the·compiler·generates·an·entry.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0576245729-1">{</span><span·class="ss">myVar</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0576245729-2">{</span><span·class="ss">snmp_generic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">vari[·...·truncated·by·diffoscope;·len:·1107,·SHA:·f6417efecb668899f8b20e1f51e5baee5f857c28f19845a47d4ca2b21825819f·...·]-4">}</span><span·class="p">}</span><span·class="p">.</span></code></pre><h2·id="module-example"·class="section-heading">165 does·not·have·a·name·when·compiling·an·MIB,·the·compiler·generates·an·entry.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0233518074-1">{</span><span·class="ss">myVar</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0233518074-2">{</span><span·class="ss">snmp_generic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">vari[·...·truncated·by·diffoscope;·len:·1107,·SHA:·bc265d2c223c57feeef6d52c7b6bfbb0ebd389301379ffeffb3ed677c13788c8·...·]-4">}</span><span·class="p">}</span><span·class="p">.</span></code></pre><h2·id="module-example"·class="section-heading">
166 ··<a·href="#module-example"·class="hover-link">166 ··<a·href="#module-example"·class="hover-link">
167 ····<i·class="ri-link-m"·aria-hidden="true"></i>167 ····<i·class="ri-link-m"·aria-hidden="true"></i>
168 ··</a>168 ··</a>
169 ··<span·class="text">Example</span>169 ··<span·class="text">Example</span>
170 </h2>170 </h2>
171 <p>The·following·example·shows·an·implementation·of·a·table·which·is·stored·in171 <p>The·following·example·shows·an·implementation·of·a·table·which·is·stored·in
172 Mnesia,·but·with·some·checks·performed·at·set-request·operations.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8712163243-1">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8712163243-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···</span><span·class="c1">%·pass·unchanged</span><span·class="w">172 Mnesia,·but·with·some·checks·performed·at·set-request·operations.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8835277502-1">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8835277502-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···</span><span·class="c1">%·pass·unchanged</span><span·class="w">
173 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8712163243-2">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8712163243-2">)</span><span·class="p">.</span><span·class="w">173 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8835277502-2">(</span><span·class="ss">new</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8835277502-2">)</span><span·class="p">.</span><span·class="w">
  
174 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8712163243-3">(</span><span·class="ss">delete</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8712163243-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···</span><span·class="c1">%·pass·unchanged</span><span·class="w">174 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8835277502-3">(</span><span·class="ss">delete</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8835277502-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···</span><span·class="c1">%·pass·unchanged</span><span·class="w">
175 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8712163243-4">(</span><span·class="ss">delete</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8712163243-4">)</span><span·class="p">.</span><span·class="w">175 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8835277502-4">(</span><span·class="ss">delete</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8835277502-4">)</span><span·class="p">.</span><span·class="w">
  
176 </span><span·class="c1">%%·change·row</span><span·class="w">176 </span><span·class="c1">%%·change·row</span><span·class="w">
177 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8712163243-5">(</span><span·class="ss">is_set_ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·70,·SHA:·9830139f9029142ca6de2c1de1e9c2e18e3539e515a915e91c3e8870861e2520·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">177 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8835277502-5">(</span><span·class="ss">is_set_ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·70,·SHA:·e20750aa8eee141a3c87badc9aa310903e975a834ffd1748978110ef61623e57·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
178 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8712163243-6">(</span><span·class="ss">is_set_ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">178 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8835277502-6">(</span><span·class="ss">is_set_ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">
179 ·······························</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8712163243-6">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">179 ·······························</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8835277502-6">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
180 ····</span><span·class="p"·data-group-id="8712163243-7">{</span><span·class="ss">noError</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="8712163243-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 ····</span><span·class="p"·data-group-id="8835277502-7">{</span><span·class="ss">noError</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="8835277502-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ······</span><span·class="nc">myApplication</span><span·class="p">:</span><span·class="nf">is_set_ok</span><span·class="p"·data-group-id="8712163243-8">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="8712163243-8">)</span><span·class="p">;</span><span·class="w">181 ······</span><span·class="nc">myApplication</span><span·class="p">:</span><span·class="nf">is_set_ok</span><span·class="p"·data-group-id="8835277502-8">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="8835277502-8">)</span><span·class="p">;</span><span·class="w">
182 ····</span><span·class="n">Err</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 ····</span><span·class="n">Err</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ······</span><span·class="n">Err</span><span·class="w">183 ······</span><span·class="n">Err</span><span·class="w">
184 ··</span><span·class="k">end</span><span·class="p">;</span><span·class="w">184 ··</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
  
185 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8712163243-9">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·64,·SHA:·d0f768713f91f3cb16b1946ea216b7cf907da24d448d536aebc393be48f2cca1·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">185 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8835277502-9">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·64,·SHA:·029019dca468d7b51450b2c21f9fd0564c3dffcdd02aed4b7ab52e1db107704a·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
186 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8712163243-10">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">186 ··</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8835277502-10">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">
187 ·······························</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8712163243-10">)</span><span·class="p">,</span><span·class="w">187 ·······························</span><span·class="n">NameDb</span><span·class="p"·data-group-id="8835277502-10">)</span><span·class="p">,</span><span·class="w">
188 ····</span><span·class="p"·data-group-id="8712163243-11">{</span><span·class="ss">noError</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="8712163243-11">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 ····</span><span·class="p"·data-group-id="8835277502-11">{</span><span·class="ss">noError</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p"·data-group-id="8835277502-11">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ······</span><span·class="c1">%·Now·the·row·is·updated,·tell·the·application</span><span·class="w">189 ······</span><span·class="c1">%·Now·the·row·is·updated,·tell·the·application</span><span·class="w">
190 ······</span><span·class="nc">myApplication</span><span·class="p">:</span><span·class="nf">update</span><span·class="p"·data-group-id="8712163243-12">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="8712163243-12">)</span><span·class="p">;</span><span·class="w">190 ······</span><span·class="nc">myApplication</span><span·class="p">:</span><span·class="nf">update</span><span·class="p"·data-group-id="8835277502-12">(</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="8835277502-12">)</span><span·class="p">;</span><span·class="w">
191 ····</span><span·class="n">Err</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 ····</span><span·class="n">Err</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ······</span><span·class="n">Err</span><span·class="w">192 ······</span><span·class="n">Err</span><span·class="w">
193 ··</span><span·class="k">end</span><span·class="p">;</span><span·class="w">193 ··</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
  
194 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8712163243-13">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·63,·SHA:·870a7ab48193896de844cd052b943c06334c9f0f7358eb688f1da91cf3370baa·...·]-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···</span><span·class="c1">%·pass·unchanged</span><span·class="w">194 </span><span·class="nf">myTable_func</span><span·class="p"·data-group-id="8835277502-13">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·63,·SHA:·170ad3f6ad69da0d86a8182f64f9333807b4466cb5d7a8949f1ab74c12a04459·...·]-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">···</span><span·class="c1">%·pass·unchanged</span><span·class="w">
195 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8712163243-14">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·992,·SHA:·b83629686caac4280dd735e959515bd4ba64878406f80588405120241b667f2f·...·]-1">}</span><span·class="p">.</span></code></pre>195 ··</span><span·class="nc">snmp_generic</span><span·class="p">:</span><span·class="nf">table_func</span><span·class="p"·data-group-id="8835277502-14">(</span><span·class="n">Op</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·992,·SHA:·2b92ae3e69041e478ef4719be4fb7d3bd5cb7a4a17cb3582eaa350acce080338·...·]-1">}</span><span·class="p">.</span></code></pre>
196 ····</section>196 ····</section>
  
197 </div>197 </div>
  
198 ··<section·id="summary"·class="details-list">198 ··<section·id="summary"·class="details-list">
199 ····<h1·class="section-heading">199 ····<h1·class="section-heading">
200 ······<a·class="hover-link"·href="#summary">200 ······<a·class="hover-link"·href="#summary">
174 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_impl_example_agent.html
    
Offset 226, 62 lines modifiedOffset 226, 62 lines modified
226 ··</a>226 ··</a>
227 ··<span·class="text">Default·Implementation</span>227 ··<span·class="text">Default·Implementation</span>
228 </h2>228 </h2>
229 <p>Without·writing·any·instrumentation·functions,·we·can·compile·the·MIB·and·use229 <p>Without·writing·any·instrumentation·functions,·we·can·compile·the·MIB·and·use
230 the·default·implementation·of·it.·Recall·that·MIBs·imported·by·&quot;EX1-MIB.mib&quot;230 the·default·implementation·of·it.·Recall·that·MIBs·imported·by·&quot;EX1-MIB.mib&quot;
231 must·be·present·and·compiled·in·the·current·directory231 must·be·present·and·compiled·in·the·current·directory
232 (&quot;./STANDARD-MIB.bin&quot;,&quot;./RFC1213-MIB.bin&quot;)·when·compiling.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">unix</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">.</span><span·class="o">/</span><span·class="ss">sys</span><span·class="gp·unselectable">232 (&quot;./STANDARD-MIB.bin&quot;,&quot;./RFC1213-MIB.bin&quot;)·when·compiling.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">unix</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">config</span><span·class="w">·</span><span·class="p">.</span><span·class="o">/</span><span·class="ss">sys</span><span·class="gp·unselectable">
233 1&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8700385341-1">(</span><span·class="ss">snmp</span><span·class="p"·data-group-id="8700385341-1">)</span><span·class="p">.</span><span·class="w">233 1&gt;·</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3335641653-1">(</span><span·class="ss">snmp</span><span·class="p"·data-group-id="3335641653-1">)</span><span·class="p">.</span><span·class="w">
234 </span><span·class="ss">ok</span><span·class="gp·unselectable">234 </span><span·class="ss">ok</span><span·class="gp·unselectable">
235 2&gt;·</span><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="8700385341-2">(</span><span·class="s">&quot;EX1-MIB&quot;</span><span·class="p"·data-group-id="8700385341-2">)</span><span·class="p">.</span><span·class="w">235 2&gt;·</span><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="3335641653-2">(</span><span·class="s">&quot;EX1-MIB&quot;</span><span·class="p"·data-group-id="3335641653-2">)</span><span·class="p">.</span><span·class="w">
236 </span><span·class="n">No</span><span·class="w">·</span><span·class="ss">accessfunction</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">&#39;friendsTable&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">using</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">.</span><span·class="w">236 </span><span·class="n">No</span><span·class="w">·</span><span·class="ss">accessfunction</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">&#39;friendsTable&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">using</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">.</span><span·class="w">
237 </span><span·class="n">No</span><span·class="w">·</span><span·class="ss">accessfunction</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">&#39;myName&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">using</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">.</span><span·class="w">237 </span><span·class="n">No</span><span·class="w">·</span><span·class="ss">accessfunction</span><span·class="w">·</span><span·class="ss">for</span><span·class="w">·</span><span·class="ss">&#39;myName&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">using</span><span·class="w">·</span><span·class="ss">default</span><span·class="p">.</span><span·class="w">
238 </span><span·class="p"·data-group-id="8700385341-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;EX1-MIB.bin&quot;</span><span·class="p"·data-group-id="8700385341-3">}</span><span·class="gp·unselectable">238 </span><span·class="p"·data-group-id="3335641653-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;EX1-MIB.bin&quot;</span><span·class="p"·data-group-id="3335641653-3">}</span><span·class="gp·unselectable">
239 3&gt;·</span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">load_mibs</span><span·class="p"·data-group-id="8700385341-4">(</span><span·class="ss">snmp_master_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8700385341-5">[</span><span·class="s">&quot;EX1-MIB&quot;</span><span·class="p"·data-group-id="8700385341-5">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·8562b3b04da572efc1d3b2b24ec722a662b01680a0b1df7599a82746d20c8563·...·]-4">)</span><span·class="p">.</span><span·class="w">239 3&gt;·</span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">load_mibs</span><span·class="p"·data-group-id="3335641653-4">(</span><span·class="ss">snmp_master_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3335641653-5">[</span><span·class="s">&quot;EX1-MIB&quot;</span><span·class="p"·data-group-id="3335641653-5">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·8e283a0250c0bbc18e7fb163f0f765037dd5c537755bc489b5c7281cf0692a60·...·]-4">)</span><span·class="p">.</span><span·class="w">
240 </span><span·class="ss">ok</span></code></pre><p>This·MIB·is·now·loaded·into·the·agent,·and·a·manager·can·ask·questions.·As·an240 </span><span·class="ss">ok</span></code></pre><p>This·MIB·is·now·loaded·into·the·agent,·and·a·manager·can·ask·questions.·As·an
241 example·of·this,·we·start·another·Erlang·system·and·the·simple·Erlang·manager·in241 example·of·this,·we·start·another·Erlang·system·and·the·simple·Erlang·manager·in
242 the·toolkit:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="5621236865-1">(</span><span·class="p"·data-group-id="5621236865-2">[</span><span·class="p"·data-group-id="5621236865-3">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="s">&quot;dront.ericsson.se&quot;</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·249,·SHA:·a87e03c74457608ae91eae8ba1eeb29d1920863e598e2527ae8979757e27c7d9·...·]5-4">}</span><span·class="p">,</span><span·class="w">242 the·toolkit:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4073188515-1">(</span><span·class="p"·data-group-id="4073188515-2">[</span><span·class="p"·data-group-id="4073188515-3">{</span><span·class="ss">agent</span><span·class="p">,</span><span·class="s">&quot;dront.ericsson.se&quot;</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·249,·SHA:·8eb2f94d84a857e903bf8de61ca304aa139fe6b5b9efa31e6bf8d4825a916976·...·]5-4">}</span><span·class="p">,</span><span·class="w">
243 ·</span><span·class="c1">%%·making·it·understand·symbolic·names:·{mibs,[&quot;EX1-MIB&quot;,&quot;STANDARD-MIB&quot;]}]).</span><span·class="w">243 ·</span><span·class="c1">%%·making·it·understand·symbolic·names:·{mibs,[&quot;EX1-MIB&quot;,&quot;STANDARD-MIB&quot;]}]).</span><span·class="w">
244 </span><span·class="p"·data-group-id="5621236865-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.89</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·11,·SHA:·124923fddc990d653a45147eee995fe93fd964900095711d64c5d5b9b1e5ce43·...·]5-5">}</span><span·class="w">244 </span><span·class="p"·data-group-id="4073188515-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.89</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·11,·SHA:·c09e295756da915d956fa5990e0184db578f7267db22c87e5442b99fabc41ebc·...·]5-5">}</span><span·class="w">
245 </span><span·class="c1">%%·a·get-next·request·with·one·OID.</span><span·class="gp·unselectable">245 </span><span·class="c1">%%·a·get-next·request·with·one·OID.</span><span·class="gp·unselectable">
246 2&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="5621236865-6">(</span><span·class="p"·data-group-id="5621236865-7">[</span><span·class="p"·data-group-id="5621236865-8">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">6</span><span[·...·truncated·by·diffoscope;·len:·288,·SHA:·cf14c11b9160daba5765bd5e02898840f8b8b1a06113dcb7fc066a28ae404f05·...·]5-6">)</span><span·class="p">.</span><span·class="w">246 2&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="4073188515-6">(</span><span·class="p"·data-group-id="4073188515-7">[</span><span·class="p"·data-group-id="4073188515-8">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">6</span><span[·...·truncated·by·diffoscope;·len:·288,·SHA:·6d2bf622070a6ae82bda516b988ff44699ee0c64b0329377d4e4c8eb63bdb675·...·]5-6">)</span><span·class="p">.</span><span·class="w">
247 </span><span·class="ss">ok</span><span·class="w">247 </span><span·class="ss">ok</span><span·class="w">
248 </span><span·class="gt">*·Got·PDU:</span><span·class="w">248 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
249 </span><span·class="p"·data-group-id="5621236865-9">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-9">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·0082c10c87a848f17bd64ae6ae3db115b54489e9ace7643e74f3d51762566309·...·]5-10">]</span><span·class="w">249 </span><span·class="p"·data-group-id="4073188515-9">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-9">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·819ef6e055424c5c47f8f5c0e3ff2e19f2e19213b4ef3d4a55857caee3fc23c8·...·]5-10">]</span><span·class="w">
250 </span><span·class="c1">%%·A·set-request·(now·using·symbolic·names·for·convenience)</span><span·class="gp·unselectable">250 </span><span·class="c1">%%·A·set-request·(now·using·symbolic·names·for·convenience)</span><span·class="gp·unselectable">
251 3&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">s</span><span·class="p"·data-group-id="5621236865-11">(</span><span·class="p"·data-group-id="5621236865-12">[</span><span·class="p"·data-group-id="5621236865-13">{</span><span·class="p"·data-group-id="5621236865-14">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">[·...·truncated·by·diffoscope;·len:·299,·SHA:·b6beddf9167c9aa95180643984d6e228be97b3d5881249e91fa5ac3b64f39471·...·]5-11">)</span><span·class="p">.</span><span·class="w">251 3&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">s</span><span·class="p"·data-group-id="4073188515-11">(</span><span·class="p"·data-group-id="4073188515-12">[</span><span·class="p"·data-group-id="4073188515-13">{</span><span·class="p"·data-group-id="4073188515-14">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">[·...·truncated·by·diffoscope;·len:·299,·SHA:·e0bdbe9af2c8d722ae568d2c568c60eefcacce6dc22685dcf8c84857aeb5edc7·...·]5-11">)</span><span·class="p">.</span><span·class="w">
252 </span><span·class="ss">ok</span><span·class="w">252 </span><span·class="ss">ok</span><span·class="w">
253 </span><span·class="gt">*·Got·PDU:</span><span·class="w">253 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
254 </span><span·class="p"·data-group-id="5621236865-15">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-15">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="w">254 </span><span·class="p"·data-group-id="4073188515-15">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-15">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="w">
255 </span><span·class="c1">%%·Try·the·same·get-next·request·again</span><span·class="gp·unselectable">255 </span><span·class="c1">%%·Try·the·same·get-next·request·again</span><span·class="gp·unselectable">
256 4&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="5621236865-16">(</span><span·class="p"·data-group-id="5621236865-17">[</span><span·class="p"·data-group-id="5621236865-18">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">6</span><s[·...·truncated·by·diffoscope;·len:·293,·SHA:·6325e16603e2ac1ca062b3fe3776b893ee6f46bd31e113032a8063449146d8c8·...·]5-16">)</span><span·class="p">.</span><span·class="w">256 4&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="4073188515-16">(</span><span·class="p"·data-group-id="4073188515-17">[</span><span·class="p"·data-group-id="4073188515-18">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">6</span><s[·...·truncated·by·diffoscope;·len:·293,·SHA:·96acc7cac64dfb24c3bc6962e84223bd335d101a5f2234b25f97a1d7180566fd·...·]5-16">)</span><span·class="p">.</span><span·class="w">
257 </span><span·class="ss">ok</span><span·class="w">257 </span><span·class="ss">ok</span><span·class="w">
258 </span><span·class="gt">*·Got·PDU:</span><span·class="w">258 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
259 </span><span·class="p"·data-group-id="5621236865-19">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-19">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="w">259 </span><span·class="p"·data-group-id="4073188515-19">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-19">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="w">
260 </span><span·class="c1">%%·...·and·we·got·the·new·value.</span><span·class="w">260 </span><span·class="c1">%%·...·and·we·got·the·new·value.</span><span·class="w">
261 </span><span·class="c1">%%·you·can·event·do·row·operations.·How·to·add·a·row:</span><span·class="gp·unselectable">261 </span><span·class="c1">%%·you·can·event·do·row·operations.·How·to·add·a·row:</span><span·class="gp·unselectable">
262 5&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">s</span><span·class="p"·data-group-id="5621236865-20">(</span><span·class="p"·data-group-id="5621236865-21">[</span><span·class="p"·data-group-id="5621236865-22">{</span><span·class="p"·data-group-id="5621236865-23">[</span><span·class="ss">fName</span><span·class="p">,</span><span·class="mi">0[·...·truncated·by·diffoscope;·len:·1099,·SHA:·48e3854c21eefa44e81c443f13de6fa8fb92540a05bc9589ee1ef53d9183ef3f·...·]5-20">)</span><span·class="p">.</span><span·class="w">262 5&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">s</span><span·class="p"·data-group-id="4073188515-20">(</span><span·class="p"·data-group-id="4073188515-21">[</span><span·class="p"·data-group-id="4073188515-22">{</span><span·class="p"·data-group-id="4073188515-23">[</span><span·class="ss">fName</span><span·class="p">,</span><span·class="mi">0[·...·truncated·by·diffoscope;·len:·1099,·SHA:·4cdda5380022fdd2533bcd4879dd5962e6c77f2dcf90b25e3bd8864ba07d0645·...·]5-20">)</span><span·class="p">.</span><span·class="w">
263 ·</span><span·class="c1">%%·createAndGo</span><span·class="w">263 ·</span><span·class="c1">%%·createAndGo</span><span·class="w">
264 </span><span·class="ss">ok</span><span·class="w">264 </span><span·class="ss">ok</span><span·class="w">
265 </span><span·class="gt">*·Got·PDU:</span><span·class="w">265 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
266 </span><span·class="p"·data-group-id="5621236865-28">[</span><span·class="ss">fName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-28">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="w">266 </span><span·class="p"·data-group-id="4073188515-28">[</span><span·class="ss">fName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-28">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="w">
267 </span><span·class="p"·data-group-id="5621236865-29">[</span><span·class="ss">fAddress</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-29">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;home&quot;</span><span·class="w">267 </span><span·class="p"·data-group-id="4073188515-29">[</span><span·class="ss">fAddress</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-29">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;home&quot;</span><span·class="w">
268 </span><span·class="p"·data-group-id="5621236865-30">[</span><span·class="ss">fStatus</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-30">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="gp·unselectable">268 </span><span·class="p"·data-group-id="4073188515-30">[</span><span·class="ss">fStatus</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-30">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="gp·unselectable">
269 6&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="5621236865-31">(</span><span·class="p"·data-group-id="5621236865-32">[</span><span·class="p"·data-group-id="5621236865-33">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-33">[·...·truncated·by·diffoscope;·len:·102,·SHA:·fe846647c34ed2ce37a43a63e4327b48562b0286a28fb9127b10873b1805a007·...·]5-31">)</span><span·class="p">.</span><span·class="w">269 6&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="4073188515-31">(</span><span·class="p"·data-group-id="4073188515-32">[</span><span·class="p"·data-group-id="4073188515-33">[</span><span·class="ss">myName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-33">[·...·truncated·by·diffoscope;·len:·102,·SHA:·3c6565f69c4fd1a750ec8959f6438f46ae01a2540b7bd8e4ab16c5b2b5a97d66·...·]5-31">)</span><span·class="p">.</span><span·class="w">
270 </span><span·class="ss">ok</span><span·class="w">270 </span><span·class="ss">ok</span><span·class="w">
271 </span><span·class="gt">*·Got·PDU:</span><span·class="w">271 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
272 </span><span·class="p"·data-group-id="5621236865-34">[</span><span·class="ss">fName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-34">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="gp·unselectable">272 </span><span·class="p"·data-group-id="4073188515-34">[</span><span·class="ss">fName</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-34">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;Martin&quot;</span><span·class="gp·unselectable">
273 7&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="5621236865-35">(</span><span·class="p"·data-group-id="5621236865-35">)</span><span·class="p">.</span><span·class="w">273 7&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="4073188515-35">(</span><span·class="p"·data-group-id="4073188515-35">)</span><span·class="p">.</span><span·class="w">
274 </span><span·class="ss">ok</span><span·class="w">274 </span><span·class="ss">ok</span><span·class="w">
275 </span><span·class="gt">*·Got·PDU:</span><span·class="w">275 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
276 </span><span·class="p"·data-group-id="5621236865-36">[</span><span·class="ss">fAddress</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-36">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;home&quot;</span><span·class="gp·unselectable">276 </span><span·class="p"·data-group-id="4073188515-36">[</span><span·class="ss">fAddress</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-36">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;home&quot;</span><span·class="gp·unselectable">
277 8&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="5621236865-37">(</span><span·class="p"·data-group-id="5621236865-37">)</span><span·class="p">.</span><span·class="w">277 8&gt;·</span><span·class="nc">snmp_test_mgr</span><span·class="p">:</span><span·class="nf">gn</span><span·class="p"·data-group-id="4073188515-37">(</span><span·class="p"·data-group-id="4073188515-37">)</span><span·class="p">.</span><span·class="w">
278 </span><span·class="ss">ok</span><span·class="w">278 </span><span·class="ss">ok</span><span·class="w">
279 </span><span·class="gt">*·Got·PDU:</span><span·class="w">279 </span><span·class="gt">*·Got·PDU:</span><span·class="w">
280 </span><span·class="p"·data-group-id="5621236865-38">[</span><span·class="ss">fStatus</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5621236865-38">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">280 </span><span·class="p"·data-group-id="4073188515-38">[</span><span·class="ss">fStatus</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4073188515-38">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">
281 </span><span·class="mi">9</span><span·class="o">&gt;</span></code></pre><h2·id="manual-implementation"·class="section-heading">281 </span><span·class="mi">9</span><span·class="o">&gt;</span></code></pre><h2·id="manual-implementation"·class="section-heading">
282 ··<a·href="#manual-implementation"·class="hover-link">282 ··<a·href="#manual-implementation"·class="hover-link">
283 ····<i·class="ri-link-m"·aria-hidden="true"></i>283 ····<i·class="ri-link-m"·aria-hidden="true"></i>
284 ··</a>284 ··</a>
285 ··<span·class="text">Manual·Implementation</span>285 ··<span·class="text">Manual·Implementation</span>
286 </h2>286 </h2>
287 <p>The·following·example·shows·a·&quot;manual&quot;·implementation·of·the·EX1-MIB·in·Erlang.287 <p>The·following·example·shows·a·&quot;manual&quot;·implementation·of·the·EX1-MIB·in·Erlang.
Offset 291, 247 lines modifiedOffset 291, 247 lines modified
291 <code·class="inline">friendsTable</code>.·Each·row·is·a·4-tuple.</p><blockquote><h4·class="info">Note</h4><p>There·are·more·efficient·ways·to·create·tables·manually,·i.e.·to·use·the291 <code·class="inline">friendsTable</code>.·Each·row·is·a·4-tuple.</p><blockquote><h4·class="info">Note</h4><p>There·are·more·efficient·ways·to·create·tables·manually,·i.e.·to·use·the
292 module·<code·class="inline">snmp_index</code>.</p></blockquote><h3·id="code"·class="section-heading">292 module·<code·class="inline">snmp_index</code>.</p></blockquote><h3·id="code"·class="section-heading">
293 ··<a·href="#code"·class="hover-link">293 ··<a·href="#code"·class="hover-link">
294 ····<i·class="ri-link-m"·aria-hidden="true"></i>294 ····<i·class="ri-link-m"·aria-hidden="true"></i>
295 ··</a>295 ··</a>
296 ··<span·class="text">Code</span>296 ··<span·class="text">Code</span>
297 </h3>297 </h3>
298 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6130740562-1">(</span><span·class="ss">ex1</span><span·class="p"·data-group-id="6130740562-1">)</span><span·class="p">.</span><span·class="w">298 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0095270561-1">(</span><span·class="ss">ex1</span><span·class="p"·data-group-id="0095270561-1">)</span><span·class="p">.</span><span·class="w">
299 </span><span·class="p">-</span><span·class="na">author</span><span·class="p"·data-group-id="6130740562-2">(</span><span·class="ss">&#39;dummy@flop.org&#39;</span><span·class="p"·data-group-id="6130740562-2">)</span><span·class="p">.</span><span·class="w">299 </span><span·class="p">-</span><span·class="na">author</span><span·class="p"·data-group-id="0095270561-2">(</span><span·class="ss">&#39;dummy@flop.org&#39;</span><span·class="p"·data-group-id="0095270561-2">)</span><span·class="p">.</span><span·class="w">
300 </span><span·class="c1">%%·External·exports</span><span·class="w">300 </span><span·class="c1">%%·External·exports</span><span·class="w">
301 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6130740562-3">(</span><span·class="p"·data-group-id="6130740562-4">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_name</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·381,·SHA:·8fb7b0f594b58283ea9547e17a5473dfca1a88200f394045b5cc8b480aa936c2·...·]-3">)</span><span·class="p">.</span><span·class="w">301 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0095270561-3">(</span><span·class="p"·data-group-id="0095270561-4">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_name</span><span·class="p">/</span>[·...·truncated·by·diffoscope;·len:·381,·SHA:·bbc7232e8ef8fd22ec9ce8da024437d0fa997863e4e6341dda33a705d08d076e·...·]-3">)</span><span·class="p">.</span><span·class="w">
302 </span><span·class="c1">%%·Internal·exports</span><span·class="w">302 </span><span·class="c1">%%·Internal·exports</span><span·class="w">
303 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6130740562-5">(</span><span·class="p"·data-group-id="6130740562-6">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6130740562-6">]</span><span·class="p"·data-group-id="6130740562-5">)</span><span·class="p">.</span><span·class="w">303 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0095270561-5">(</span><span·class="p"·data-group-id="0095270561-6">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0095270561-6">]</span><span·class="p"·data-group-id="0095270561-5">)</span><span·class="p">.</span><span·class="w">
304 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-7">(</span><span·class="ss">status_col</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="6130740562-7">)</span><span·class="p">.</span><span·class="w">304 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-7">(</span><span·class="ss">status_col</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="0095270561-7">)</span><span·class="p">.</span><span·class="w">
305 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-8">(</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="6130740562-8">)</span><span·class="p">.</span><span·class="w">305 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-8">(</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0095270561-8">)</span><span·class="p">.</span><span·class="w">
306 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-9">(</span><span·class="ss">notInService</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="6130740562-9">)</span><span·class="p">.</span><span·class="w">306 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-9">(</span><span·class="ss">notInService</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="0095270561-9">)</span><span·class="p">.</span><span·class="w">
307 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-10">(</span><span·class="ss">notReady</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="6130740562-10">)</span><span·class="p">.</span><span·class="w">307 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-10">(</span><span·class="ss">notReady</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="0095270561-10">)</span><span·class="p">.</span><span·class="w">
308 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-11">(</span><span·class="ss">createAndGo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="6130740562-11">)</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·Action;·written,·not·read</span><span·class="w">308 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-11">(</span><span·class="ss">createAndGo</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="0095270561-11">)</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·Action;·written,·not·read</span><span·class="w">
309 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-12">(</span><span·class="ss">createAndWait</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="6130740562-12">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Action;·written,·not·read</span><span·class="w">309 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-12">(</span><span·class="ss">createAndWait</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="0095270561-12">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Action;·written,·not·read</span><span·class="w">
310 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="6130740562-13">(</span><span·class="ss">destroy</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">6</span><span·class="p"·data-group-id="6130740562-13">)</span><span·class="p">.</span><span·class="w">·······</span><span·class="c1">%·Action;·written,·not·read</span><span·class="w">310 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="0095270561-13">(</span><span·class="ss">destroy</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">6</span><span·class="p"·data-group-id="0095270561-13">)</span><span·class="p">.</span><span·class="w">·······</span><span·class="c1">%·Action;·written,·not·read</span><span·class="w">
311 </span><span·class="nf">start</span><span·class="p"·data-group-id="6130740562-14">(</span><span·class="p"·data-group-id="6130740562-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">311 </span><span·class="nf">start</span><span·class="p"·data-group-id="0095270561-14">(</span><span·class="p"·data-group-id="0095270561-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
312 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="6130740562-15">(</span><span·class="ss">ex1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6130740562-16">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·67,·SHA:·b23a07bcdce83dbebf154d35f76d52c0a8a3ccedd738484038985c9e7d396a04·...·]-15">)</span><span·class="p">.</span><span·class="w">312 ····</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0095270561-15">(</span><span·class="ss">ex1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0095270561-16">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·67,·SHA:·a62be77eaeac93e73cb7b3ed7afdafb51c9652c57dbce865e00fb8277e4b2b1d·...·]-15">)</span><span·class="p">.</span><span·class="w">
313 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">313 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">
314 </span><span·class="c1">%%·Instrumentation·function·for·variable·myName.</span><span·class="w">314 </span><span·class="c1">%%·Instrumentation·function·for·variable·myName.</span><span·class="w">
315 </span><span·class="c1">%%·Returns:·(get)·{value,·Name}</span><span·class="w">315 </span><span·class="c1">%%·Returns:·(get)·{value,·Name}</span><span·class="w">
316 </span><span·class="c1">%%··········(set)·noError</span><span·class="w">316 </span><span·class="c1">%%··········(set)·noError</span><span·class="w">
317 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">317 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">
318 </span><span·class="nf">my_name</span><span·class="p"·data-group-id="6130740562-17">(</span><span·class="nb">get</span><span·class="p"·data-group-id="6130740562-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">318 </span><span·class="nf">my_name</span><span·class="p"·data-group-id="0095270561-17">(</span><span·class="nb">get</span><span·class="p"·data-group-id="0095270561-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
319 ····</span><span·class="ss">ex1_server</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6130740562-18">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6130740562-19">(</span><span·class="p"·data-group-id="6130740562-19">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_my_name</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·72144b41b524ec571ba758f7b7a2f8e86c0f58864a31869860ccb913350f7de8·...·]-18">}</span><span·class="p">,</span><span·class="w">319 ····</span><span·class="ss">ex1_server</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0095270561-18">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0095270561-19">(</span><span·class="p"·data-group-id="0095270561-19">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_my_name</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·c9d7edcf062bd56b3bcfc49664d183ebf6569c75619441469ee3f0f8232a6596·...·]-18">}</span><span·class="p">,</span><span·class="w">
320 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">wait_answer</span><span·class="p"·data-group-id="6130740562-20">(</span><span·class="p"·data-group-id="6130740562-20">)</span><span·class="p">,</span><span·class="w">320 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">wait_answer</span><span·class="p"·data-group-id="0095270561-20">(</span><span·class="p"·data-group-id="0095270561-20">)</span><span·class="p">,</span><span·class="w">
321 ····</span><span·class="p"·data-group-id="6130740562-21">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="6130740562-21">}</span><span·class="p">.</span><span·class="w">321 ····</span><span·class="p"·data-group-id="0095270561-21">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p"·data-group-id="0095270561-21">}</span><span·class="p">.</span><span·class="w">
322 </span><span·class="nf">my_name</span><span·class="p"·data-group-id="6130740562-22">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewName</span><span·class="p"·data-group-id="6130740562-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">322 </span><span·class="nf">my_name</span><span·class="p"·data-group-id="0095270561-22">(</span><span·class="ss">set</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewName</span><span·class="p"·data-group-id="0095270561-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
323 ····</span><span·class="ss">ex1_server</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="6130740562-23">{</span><span·class="nf">self</span><span·class="p"·data-group-id="6130740562-24">(</span><span·class="p"·data-group-id="6130740562-24">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6130740562-25">{</[·...·truncated·by·diffoscope;·len:·213,·SHA:·12f125bc85d8b6b3b41ef346f303d026d0edf1b9bc00a20336ac8c065ae95309·...·]-23">}</span><span·class="p">,</span><span·class="w">323 ····</span><span·class="ss">ex1_server</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0095270561-23">{</span><span·class="nf">self</span><span·class="p"·data-group-id="0095270561-24">(</span><span·class="p"·data-group-id="0095270561-24">)</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0095270561-25">{</[·...·truncated·by·diffoscope;·len:·213,·SHA:·18a60199828cad8b6b0ae433e6088cd3dbc0595db1c171a750013564e85286d5·...·]-23">}</span><span·class="p">,</span><span·class="w">
324 ····</span><span·class="ss">noError</span><span·class="p">.</span><span·class="w">324 ····</span><span·class="ss">noError</span><span·class="p">.</span><span·class="w">
325 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">325 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">
326 </span><span·class="c1">%%·Instrumentation·function·for·table·friendsTable.</span><span·class="w">326 </span><span·class="c1">%%·Instrumentation·function·for·table·friendsTable.</span><span·class="w">
327 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">327 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">
328 </span><span·class="nf">friends_table</span><span·class="p"·data-group-id="6130740562-26">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6130740562-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">328 </span><span·class="nf">friends_table</span><span·class="p"·data-group-id="0095270561-26">(</span><span·class="nb">get</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="0095270561-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
329 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_row</span><span·class="p"·data-group-id="6130740562-27">(</span><span·class="n">RowIndex</span><span·class="p"·data-group-id="6130740562-27">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">329 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_row</span><span·class="p"·data-group-id="0095270561-27">(</span><span·class="n">RowIndex</span><span·class="p"·data-group-id="0095270561-27">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
330 ···</span><span·class="p"·data-group-id="6130740562-28">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="6130740562-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">330 ···</span><span·class="p"·data-group-id="0095270561-28">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="0095270561-28">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
331 ········</span><span·class="nf">get_cols</span><span·class="p"·data-group-id="6130740562-29">(</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="6130740562-29">)</span><span·class="p">;</span><span·class="w">331 ········</span><span·class="nf">get_cols</span><span·class="p"·data-group-id="0095270561-29">(</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="0095270561-29">)</span><span·class="p">;</span><span·class="w">
332 ···</span><span·class="p">_</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">332 ···</span><span·class="p">_</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">
333 ········</span><span·class="p"·data-group-id="6130740562-30">{</span><span·class="ss">noValue</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">noSuchInstance</span><span·class="p"·data-group-id="6130740562-30">}</span><span·class="w">333 ········</span><span·class="p"·data-group-id="0095270561-30">{</span><span·class="ss">noValue</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">noSuchInstance</span><span·class="p"·data-group-id="0095270561-30">}</span><span·class="w">
334 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">334 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
335 </span><span·class="nf">friends_table</span><span·class="p"·data-group-id="6130740562-31">(</span><span·class="ss">get_next</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="6130740562-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">335 </span><span·class="nf">friends_table</span><span·class="p"·data-group-id="0095270561-31">(</span><span·class="ss">get_next</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RowIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cols</span><span·class="p"·data-group-id="0095270561-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
336 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_next_row</span><span·class="p"·data-group-id="6130740562-32">(</span><span·class="n">RowIndex</span><span·class="p"·data-group-id="6130740562-32">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">336 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_next_row</span><span·class="p"·data-group-id="0095270561-32">(</span><span·class="n">RowIndex</span><span·class="p"·data-group-id="0095270561-32">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
337 ···</span><span·class="p"·data-group-id="6130740562-33">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="6130740562-33">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">337 ···</span><span·class="p"·data-group-id="0095270561-33">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="0095270561-33">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
338 ········</span><span·class="nf">get_next_cols</span><span·class="p"·data-group-id="6130740562-34">(</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="6130740562-34">)</span><span·class="p">;</span><span·class="w">338 ········</span><span·class="nf">get_next_cols</span><span·class="p"·data-group-id="0095270561-34">(</span><span·class="n">Cols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="0095270561-34">)</span><span·class="p">;</span><span·class="w">
339 ···</span><span·class="p">_</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">339 ···</span><span·class="p">_</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">
340 ·······</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_next_row</span><span·class="p"·data-group-id="6130740562-35">(</span><span·class="p"·data-group-id="6130740562-36">[</span><span·class="p"·data-group-id="6130740562-36">]</span><span·class="p"·data-group-id="6130740562-35">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">340 ·······</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">get_next_row</span><span·class="p"·data-group-id="0095270561-35">(</span><span·class="p"·data-group-id="0095270561-36">[</span><span·class="p"·data-group-id="0095270561-36">]</span><span·class="p"·data-group-id="0095270561-35">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
341 ·····</span><span·class="p"·data-group-id="6130740562-37">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="6130740562-37">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">341 ·····</span><span·class="p"·data-group-id="0095270561-37">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="0095270561-37">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
342 ·········</span><span·class="c1">%·Get·next·cols·from·first·row.</span><span·class="w">342 ·········</span><span·class="c1">%·Get·next·cols·from·first·row.</span><span·class="w">
343 ·········</span><span·class="n">NewCols</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">add_one_to_cols</span><span·class="p"·data-group-id="6130740562-38">(</span><span·class="n">Cols</span><span·class="p"·data-group-id="6130740562-38">)</span><span·class="p">,</span><span·class="w">343 ·········</span><span·class="n">NewCols</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">add_one_to_cols</span><span·class="p"·data-group-id="0095270561-38">(</span><span·class="n">Cols</span><span·class="p"·data-group-id="0095270561-38">)</span><span·class="p">,</span><span·class="w">
344 ·········</span><span·class="nf">get_next_cols</span><span·class="p"·data-group-id="6130740562-39">(</span><span·class="n">NewCols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="6130740562-39">)</span><span·class="p">;</span><span·class="w">344 ·········</span><span·class="nf">get_next_cols</span><span·class="p"·data-group-id="0095270561-39">(</span><span·class="n">NewCols</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Row</span><span·class="p"·data-group-id="0095270561-39">)</span><span·class="p">;</span><span·class="w">
345 ·····</span><span·class="p">_</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">345 ·····</span><span·class="p">_</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">
346 ········</span><span·class="nf">end_of_table</span><span·class="p"·data-group-id="6130740562-40">(</span><span·class="n">Cols</span><span·class="p"·data-group-id="6130740562-40">)</span><span·class="w">346 ········</span><span·class="nf">end_of_table</span><span·class="p"·data-group-id="0095270561-40">(</span><span·class="n">Cols</span><span·class="p"·data-group-id="0095270561-40">)</span><span·class="w">
347 ········</span><span·class="k">end</span><span·class="w">347 ········</span><span·class="k">end</span><span·class="w">
348 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">348 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
349 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">349 </span><span·class="c1">%%----------------------------------------------------------------</span><span·class="w">
350 </span><span·class="c1">%%·If·RowStatus·is·set,·then:</span><span·class="w">350 </span><span·class="c1">%%·If·RowStatus·is·set,·then:</span><span·class="w">
351 </span><span·class="c1">%%····*)·If·set·to·destroy,·check·that·row·does·exist</span><span·class="w">351 </span><span·class="c1">%%····*)·If·set·to·destroy,·check·that·row·does·exist</span><span·class="w">
352 </span><span·class="c1">%%····*)·If·set·to·createAndGo,·check·that·row·does·not·exist·AND</span><span·class="w">352 </span><span·class="c1">%%····*)·If·set·to·createAndGo,·check·that·row·does·not·exist·AND</span><span·class="w">
353 </span><span·class="c1">%%·········that·all·columns·are·given·values.</span><span·class="w">353 </span><span·class="c1">%%·········that·all·columns·are·given·values.</span><span·class="w">
354 </span><span·class="c1">%%····*)·Otherwise,·error·(for·simplicity).</span><span·class="w">354 </span><span·class="c1">%%····*)·Otherwise,·error·(for·simplicity).</span><span·class="w">
Max diff block lines reached; 127865/177777 bytes (71.92%) of diff not shown.
6.6 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_index.html
    
Offset 131, 21 lines modifiedOffset 131, 21 lines modified
131 <p>Abstract·Data·Type·for·SNMP·Indexing</p><p>The·module·<code·class="inline">snmp_index</code>·implements·an·Abstract·Data·Type·(ADT)·for·an·SNMP·index131 <p>Abstract·Data·Type·for·SNMP·Indexing</p><p>The·module·<code·class="inline">snmp_index</code>·implements·an·Abstract·Data·Type·(ADT)·for·an·SNMP·index
132 structure·for·SNMP·tables.·It·is·implemented·as·an·ets·table·of·the·ordered_set132 structure·for·SNMP·tables.·It·is·implemented·as·an·ets·table·of·the·ordered_set
133 data-type,·which·means·that·all·operations·are·O(log·n).·In·the·table,·the·key133 data-type,·which·means·that·all·operations·are·O(log·n).·In·the·table,·the·key
134 is·an·ASN.1·OBJECT·IDENTIFIER.</p><p>This·index·is·used·to·separate·the·implementation·of·the·SNMP·ordering·from·the134 is·an·ASN.1·OBJECT·IDENTIFIER.</p><p>This·index·is·used·to·separate·the·implementation·of·the·SNMP·ordering·from·the
135 actual·implementation·of·the·table.·The·SNMP·ordering,·that·is·implementation·of135 actual·implementation·of·the·table.·The·SNMP·ordering,·that·is·implementation·of
136 GET·NEXT,·is·implemented·in·this·module.</p><p>For·example,·suppose·there·is·an·SNMP·table,·which·is·best·implemented·in·Erlang136 GET·NEXT,·is·implemented·in·this·module.</p><p>For·example,·suppose·there·is·an·SNMP·table,·which·is·best·implemented·in·Erlang
137 as·one·process·per·SNMP·table·row.·Suppose·further·that·the·INDEX·in·the·SNMP137 as·one·process·per·SNMP·table·row.·Suppose·further·that·the·INDEX·in·the·SNMP
138 table·is·an·OCTET·STRING.·The·index·structure·would·be·created·as·follows:</p><pre><code·class="text">snmp_index:new(string)</code></pre><p>For·each·new·process·we·create,·we·insert·an·item·in·an·<code·class="inline">snmp_index</code>·structure:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">new_process</span><span·class="p"·data-group-id="0651332972-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SnmpIndex</span><span·class="p"·data-group-id="0651332972-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 table·is·an·OCTET·STRING.·The·index·structure·would·be·created·as·follows:</p><pre><code·class="text">snmp_index:new(string)</code></pre><p>For·each·new·process·we·create,·we·insert·an·item·in·an·<code·class="inline">snmp_index</code>·structure:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">new_process</span><span·class="p"·data-group-id="5402219982-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SnmpIndex</span><span·class="p"·data-group-id="5402219982-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ··</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_process</span><span·class="p"·data-group-id="0651332972-2">(</span><span·class="p"·data-group-id="0651332972-2">)</span><span·class="p">,</span><span·class="w">139 ··</span><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_process</span><span·class="p"·data-group-id="5402219982-2">(</span><span·class="p"·data-group-id="5402219982-2">)</span><span·class="p">,</span><span·class="w">
140 ··</span><span·class="n">NewSnmpIndex</span><span·class="w">·</span><span·class="o">=</span><span·class="w">140 ··</span><span·class="n">NewSnmpIndex</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
141 ····</span><span·class="nc">snmp_index</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="0651332972-3">(</span><span·class="n">SnmpIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="0651332972-3">)</span><span·class="p">,</span><span·class="w">141 ····</span><span·class="nc">snmp_index</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="5402219982-3">(</span><span·class="n">SnmpIndex</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="5402219982-3">)</span><span·class="p">,</span><span·class="w">
142 ··</span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="o">&gt;</span></code></pre><p>With·this·structure,·we·can·now·map·an·OBJECT·IDENTIFIER·in·e.g.·a·GET·NEXT142 ··</span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="o">&gt;</span></code></pre><p>With·this·structure,·we·can·now·map·an·OBJECT·IDENTIFIER·in·e.g.·a·GET·NEXT
143 request,·to·the·correct·process:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">get_next_pid</span><span·class="p"·data-group-id="6848263166-1">(</span><span·class="n">Oid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SnmpIndex</span><span·class="p"·data-group-id="6848263166-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">143 request,·to·the·correct·process:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">get_next_pid</span><span·class="p"·data-group-id="6992280437-1">(</span><span·class="n">Oid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SnmpIndex</span><span·class="p"·data-group-id="6992280437-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
144 ··</span><span·class="p"·data-group-id="6848263166-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6848263166-3">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·clas[·...·truncated·by·diffoscope;·len:·458,·SHA:·52637a04d117a720741f1b00041dcc66d2d6575a0ebff81b0a4a6630bd4e9595·...·]-4">)</span><span·class="p">,</span><span·class="w">144 ··</span><span·class="p"·data-group-id="6992280437-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6992280437-3">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·clas[·...·truncated·by·diffoscope;·len:·458,·SHA:·ae45e07be9612b6de4788e3f52cc0aa7d796ac0dc18552211ed82e1f4f46c971·...·]-4">)</span><span·class="p">,</span><span·class="w">
145 ··</span><span·class="n">Pid</span><span·class="p">.</span></code></pre><h2·id="module-warnings"·class="section-heading">145 ··</span><span·class="n">Pid</span><span·class="p">.</span></code></pre><h2·id="module-warnings"·class="section-heading">
146 ··<a·href="#module-warnings"·class="hover-link">146 ··<a·href="#module-warnings"·class="hover-link">
147 ····<i·class="ri-link-m"·aria-hidden="true"></i>147 ····<i·class="ri-link-m"·aria-hidden="true"></i>
148 ··</a>148 ··</a>
149 ··<span·class="text">Warnings</span>149 ··<span·class="text">Warnings</span>
150 </h2>150 </h2>
151 <blockquote><h4·class="warning">Warning</h4><p><a·href=""·id="1"></a>·All·API·functions·that·update·the·index·return·a·<code·class="inline">NewIndex</code>·term.151 <blockquote><h4·class="warning">Warning</h4><p><a·href=""·id="1"></a>·All·API·functions·that·update·the·index·return·a·<code·class="inline">NewIndex</code>·term.
19.9 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_instr_functions.html
    
Offset 210, 17 lines modifiedOffset 210, 17 lines modified
210 accessible),·and·the·table·has·three·rows.·The·instrumentation·function·for·this210 accessible),·and·the·table·has·three·rows.·The·instrumentation·function·for·this
211 table·is·called·<code·class="inline">my_table</code>.</p><p><a·href=""·id="getnext1"></a></p><p><img·src="assets/getnext1.gif"·alt="Contents·of·my_table"·title="Contents·of·my_table"/></p><blockquote><h4·class="info">Note</h4><p>N/A·means·not·accessible.</p></blockquote><p>The·manager·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry.3.1.1,211 table·is·called·<code·class="inline">my_table</code>.</p><p><a·href=""·id="getnext1"></a></p><p><img·src="assets/getnext1.gif"·alt="Contents·of·my_table"·title="Contents·of·my_table"/></p><blockquote><h4·class="info">Note</h4><p>N/A·means·not·accessible.</p></blockquote><p>The·manager·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry.3.1.1,
212 ·········myTable.myTableEntry.5.1.1·}</code></pre><p>Since·both·operations·involve·the·1.1·index,·this·is·transformed·into·one·call212 ·········myTable.myTableEntry.5.1.1·}</code></pre><p>Since·both·operations·involve·the·1.1·index,·this·is·transformed·into·one·call
213 to·<code·class="inline">my_table</code>:</p><pre><code·class="text">my_table(get_next,·[1,·1],·[3,·5])</code></pre><p>In·this·call,·<code·class="inline">[1,·1]</code>·is·the·<code·class="inline">RowIndex</code>,·where·key·1·has·value·1,·and·key·2·has213 to·<code·class="inline">my_table</code>:</p><pre><code·class="text">my_table(get_next,·[1,·1],·[3,·5])</code></pre><p>In·this·call,·<code·class="inline">[1,·1]</code>·is·the·<code·class="inline">RowIndex</code>,·where·key·1·has·value·1,·and·key·2·has
214 value·1,·and·<code·class="inline">[3,·5]</code>·is·the·list·of·requested·columns.·The·function·should·now214 value·1,·and·<code·class="inline">[3,·5]</code>·is·the·list·of·requested·columns.·The·function·should·now
215 return·the·lexicographically·next·elements:</p><pre><code·class="text">[{[3,·1,·2],·d},·{[5,·1,·2],·f}]</code></pre><p>This·is·illustrated·in·the·following·table:</p><p><a·href=""·id="getnext2"></a></p><p><img·src="assets/getnext2.gif"·alt="GetNext·from·[3,1,1]·and·[5,1,1]."·title="GetNext·from·[3,1,1]·and·[5,1,1]."/></p><p>The·manager·now·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry.3.2.1,215 return·the·lexicographically·next·elements:</p><pre><code·class="text">[{[3,·1,·2],·d},·{[5,·1,·2],·f}]</code></pre><p>This·is·illustrated·in·the·following·table:</p><p><a·href=""·id="getnext2"></a></p><p><img·src="assets/getnext2.gif"·alt="GetNext·from·[3,1,1]·and·[5,1,1]."·title="GetNext·from·[3,1,1]·and·[5,1,1]."/></p><p>The·manager·now·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry.3.2.1,
216 ·········myTable.myTableEntry.5.2.1·}</code></pre><p>This·is·transformed·into·one·call·to·<code·class="inline">my_table</code>:</p><pre><code·class="text">my_table(get_next,·[2,·1],·[3,·5])</code></pre><p>The·function·should·now·return:</p><pre><code·class="text">[{[4,·1,·1],·b},·endOfTable]</code></pre><p>This·is·illustrated·in·the·following·table:</p><p><a·href=""·id="getnext3"></a></p><p><img·src="assets/getnext3.gif"·alt="GetNext·from·[3,2,1]·and·[5,2,1]."·title="GetNext·from·[3,2,1]·and·[5,2,1]."/></p><p>The·manager·now·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry.3.1.2,216 ·········myTable.myTableEntry.5.2.1·}</code></pre><p>This·is·transformed·into·one·call·to·<code·class="inline">my_table</code>:</p><pre><code·class="text">my_table(get_next,·[2,·1],·[3,·5])</code></pre><p>The·function·should·now·return:</p><pre><code·class="text">[{[4,·1,·1],·b},·endOfTable]</code></pre><p>This·is·illustrated·in·the·following·table:</p><p><a·href=""·id="getnext3"></a></p><p><img·src="assets/getnext3.gif"·alt="GetNext·from·[3,2,1]·and·[5,2,1]."·title="GetNext·from·[3,2,1]·and·[5,2,1]."/></p><p>The·manager·now·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry.3.1.2,
217 ·········myTable.myTableEntry.4.1.2·}</code></pre><p>This·will·be·transform·into·one·call·to·<code·class="inline">my_table</code>:</p><pre><code·class="text">my_table(get_next,·[1,·2],·[3,·4])</code></pre><p>The·function·should·now·return:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9194631138-1">[</span><span·class="p"·data-group-id="9194631138-2">{</span><span·class="p"·data-group-id="9194631138-3">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9194631138-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">g</span><span·class="p"·data-group-id="9194631138-2">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9194631138-4">{</span><span·class="p"·data-group-id="9194631138-5">[</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="9194631138-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">c</span><span·class="p"·data-group-id="9194631138-4">}</span><span·class="p"·data-group-id="9194631138-1">]</span></code></pre><p>This·is·illustrated·in·the·following·table:</p><p><a·href=""·id="getnext4"></a></p><p><img·src="assets/getnext4.gif"·alt="GetNext·from·[3,1,2]·and·[4,1,2]."·title="GetNext·from·[3,1,2]·and·[4,1,2]."/></p><p>The·manager·now·issues·the·following·<code·class="inline">getNext</code>·request:</p><pre><code·class="text">getNext{·myTable.myTableEntry, 
218 ·········myTable.myTableEntry.1.3.2·}</code></pre><p>This·will·be·transform·into·two·calls·to·<code·class="inline">my_table</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_table</span><span·class="p"·data-group-id="6225651202-1">(</span><span·class="ss">get_next</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6225651202-2">[</span><span·class="p"·data-group-id="6225651202-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6225651202-3">[</span><span·class="mi">0</span><span·class="p"·data-group-id="6225651202-3">]</span><span·class="p"·data-group-id="6225651202-1">)</span><span·class="w">·</span><span·class="ow">and</span><span·class="w"> 
219 </span><span·class="nf">my_table</span><span·class="p"·data-group-id="6225651202-4">(</span><span·class="ss">get_next</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6225651202-5">[</span><span·class="mi">3</span><span·[·...·truncated·by·diffoscope;·len:·447,·SHA:·381820193159449f8419db0731b8610433db6b06bbfc345c9d145dfafb15d50d·...·]217 ·········myTable.myTableEntry.4.1.2·}</code></pre><p>This·will·be·transform·into·one·call·to·<code·class="inline">my_table</code>:</p><pre><code·class="text">my_table(get_next,·[1,·2],·[3,·4])</code></pre><p>The·function·should·now·return:</p><pre><code·cl[·...·truncated·by·diffoscope;·len:·1463,·SHA:·a498e8141ca99e05d570fb4180f2800a7866fd36e7cac8e65f8ca9a6fabe2b21·...·]
 218 ·········myTable.myTableEntry.1.3.2·}</code></pre><p>This·will·be·transform·into·two·calls·to·<code·class="inline">my_table</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_table</span><span·class="p"·data-group-id="9771572877-1">(</span><span·class="ss">get_next</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9771572877-2">[</span><span·class="p"·data-group-id="9771572877-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9771572877-3">[</span><span·class="mi">0</span><span·class="p"·data-group-id="9771572877-3">]</span><span·class="p"·data-group-id="9771572877-1">)</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">
 219 </span><span·class="nf">my_table</span><span·class="p"·data-group-id="9771572877-4">(</span><span·class="ss">get_next</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9771572877-5">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="9771572877-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9771572877-6">[</span><span·class="mi">1</span><span·class="p"·data-group-id="9771572877-6">]</span><span·class="p"·data-group-id="9771572877-4">)</span></code></pre><p>The·function·should·now·return:</p><pre><code·class="text">[{[3,·1,·1],·a}]·and
220 [{[3,·1,·1],·a}]</code></pre><p>In·both·cases,·the·first·accessible·element·in·the·table·should·be·returned.·As220 [{[3,·1,·1],·a}]</code></pre><p>In·both·cases,·the·first·accessible·element·in·the·table·should·be·returned.·As
221 the·key·columns·are·not·accessible,·this·means·that·the·third·column·is·the221 the·key·columns·are·not·accessible,·this·means·that·the·third·column·is·the
222 first·row.</p><blockquote><h4·class="info">Note</h4><p>Normally,·the·functions·described·above·behave·exactly·as·shown,·but·they·are222 first·row.</p><blockquote><h4·class="info">Note</h4><p>Normally,·the·functions·described·above·behave·exactly·as·shown,·but·they·are
223 free·to·perform·other·actions.·For·example,·a·get-request·may·have·side223 free·to·perform·other·actions.·For·example,·a·get-request·may·have·side
224 effects·such·as·setting·some·other·variable,·perhaps·a·global·<code·class="inline">lastAccessed</code>224 effects·such·as·setting·some·other·variable,·perhaps·a·global·<code·class="inline">lastAccessed</code>
225 variable.</p></blockquote><h2·id="using-the-extraargument"·class="section-heading">225 variable.</p></blockquote><h2·id="using-the-extraargument"·class="section-heading">
226 ··<a·href="#using-the-extraargument"·class="hover-link">226 ··<a·href="#using-the-extraargument"·class="hover-link">
Offset 229, 25 lines modifiedOffset 229, 25 lines modified
229 ··<span·class="text">Using·the·ExtraArgument</span>229 ··<span·class="text">Using·the·ExtraArgument</span>
230 </h2>230 </h2>
231 <p>The·<code·class="inline">ListOfExtraArguments</code>·can·be·used·to·write·generic·functions.·This·list·is231 <p>The·<code·class="inline">ListOfExtraArguments</code>·can·be·used·to·write·generic·functions.·This·list·is
232 appended·to·the·standard·arguments·for·each·function.·Consider·two·read-only232 appended·to·the·standard·arguments·for·each·function.·Consider·two·read-only
233 variables·for·a·device,·<code·class="inline">ipAdr</code>·and·<code·class="inline">name</code>·with·object·identifiers·1.1.23.4·and233 variables·for·a·device,·<code·class="inline">ipAdr</code>·and·<code·class="inline">name</code>·with·object·identifiers·1.1.23.4·and
234 1.1.7·respectively.·To·access·these·variables,·one·could·implement·the·two234 1.1.7·respectively.·To·access·these·variables,·one·could·implement·the·two
235 Erlang·functions·<code·class="inline">ip_access</code>·and·<code·class="inline">name_access</code>,·which·will·be·in·the·MIB.·The235 Erlang·functions·<code·class="inline">ip_access</code>·and·<code·class="inline">name_access</code>,·which·will·be·in·the·MIB.·The
236 functions·could·be·specified·in·a·text·file·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7369286447-1">{</span><span·class="ss">ipAdr</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7369286447-2">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ip_acc[·...·truncated·by·diffoscope;·len:·258,·SHA:·977ae731730dffbc091fcde41814ec928b22baca46bc3c8a4ef3d6ba2d4524bd·...·]-1">}</span><span·class="p">.</span><span·class="w">236 functions·could·be·specified·in·a·text·file·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1210810162-1">{</span><span·class="ss">ipAdr</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1210810162-2">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ip_acc[·...·truncated·by·diffoscope;·len:·258,·SHA:·200f43dc8a3d7b3ad9853d3f3006449ea5c19c77abbf11a97224eaf850c23f9a·...·]-1">}</span><span·class="p">.</span><span·class="w">
237 </span><span·class="c1">%·Or·using·the·oid·syntax·for·&#39;name&#39;</span><span·class="w">237 </span><span·class="c1">%·Or·using·the·oid·syntax·for·&#39;name&#39;</span><span·class="w">
238 </span><span·class="p"·data-group-id="7369286447-4">{</span><span·class="p"·data-group-id="7369286447-5">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="7369286447-5">]</span><span[·...·truncated·by·diffoscope;·len:·460,·SHA:·9090dfb8bff5f3a390e9a595ef60f43e6e69b828d16c627903fe63f7292e80cf·...·]-4">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">ExtraArgument</code>·parameter·is·the·empty·list.·For·example,·when·the·agent238 </span><span·class="p"·data-group-id="1210810162-4">{</span><span·class="p"·data-group-id="1210810162-5">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="1210810162-5">]</span><span[·...·truncated·by·diffoscope;·len:·460,·SHA:·1a9a4e9f1bc87f80fb412208665be979ca6e4fb667c4a6b660da1b414ac7695e·...·]-4">}</span><span·class="p">.</span></code></pre><p>The·<code·class="inline">ExtraArgument</code>·parameter·is·the·empty·list.·For·example,·when·the·agent
239 receives·a·get-request·for·the·<code·class="inline">ipAdr</code>·variable,·a·call·will·be·made·to239 receives·a·get-request·for·the·<code·class="inline">ipAdr</code>·variable,·a·call·will·be·made·to
240 <code·class="inline">ip_access(get)</code>.·The·value·returned·by·this·function·is·the·answer·to·the240 <code·class="inline">ip_access(get)</code>.·The·value·returned·by·this·function·is·the·answer·to·the
241 get-request.</p><p>If·<code·class="inline">ip_access</code>·and·<code·class="inline">name_access</code>·are·implemented·similarly,·we·could·write·a241 get-request.</p><p>If·<code·class="inline">ip_access</code>·and·<code·class="inline">name_access</code>·are·implemented·similarly,·we·could·write·a
242 <code·class="inline">generic_access</code>·function·using·the·<code·class="inline">ListOfExtraArguments</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1228968213-1">{</span><span·class="ss">ipAdr</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1228968213-2">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">generi[·...·truncated·by·diffoscope;·len:·302,·SHA:·25794d9dc1f53eb141c689d7b5d071d4e2845519e40a3f4e20f711bdb0b68e2f·...·]-1">}</span><span·class="p">.</span><span·class="w">242 <code·class="inline">generic_access</code>·function·using·the·<code·class="inline">ListOfExtraArguments</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2030520847-1">{</span><span·class="ss">ipAdr</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2030520847-2">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">generi[·...·truncated·by·diffoscope;·len:·302,·SHA:·fc948fa833c2318f3c222d10688636c863e3ac8675f414c560bdd7e12dd91ada·...·]-1">}</span><span·class="p">.</span><span·class="w">
243 </span><span·class="c1">%·The·mnemonic·&#39;name&#39;·is·more·convenient·than·1.1.7</span><span·class="w">243 </span><span·class="c1">%·The·mnemonic·&#39;name&#39;·is·more·convenient·than·1.1.7</span><span·class="w">
244 </span><span·class="p"·data-group-id="1228968213-4">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1228968213-5">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">generic_access</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1228968213-6">[</span><span·class="ss">&#39;NAME&#39;</span><span·class="p"·data-group-id="1228968213-6">]</span><span·class="p"·data-group-id="1228968213-5">}</span><span·class="p"·data-group-id="1228968213-4">}</span><span·class="p">.</span></code></pre><p>When·the·agent·receives·the·same·get-request·as·above,·a·call·will·be·made·to 
245 <code·class="inline">generic_access(get,</code>'<code·class="inline">IPADR')</code>.</p><p>Yet·another·possibility,·closer·to·the·hardware,·could·be:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8275176532-1">{</span><sp[·...·truncated·by·diffoscope;·len:·577,·SHA:·600ba6483f08b813c018f6cbf81e9d12f4641b411f7439308e22702dbb05a47b·...·]244 </span><span·class="p"·data-group-id="2030520847-4">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2030520847-5">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class[·...·truncated·by·diffoscope;·len:·466,·SHA:·a0b2dd3f09c1e130c4bfbf196c1cf245db449125d68fd39bd78b6e2abe4385ee·...·]
 245 <code·class="inline">generic_access(get,</code>'<code·class="inline">IPADR')</code>.</p><p>Yet·another·possibility,·closer·to·the·hardware,·could·be:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7629617188-1">{</span><span·class="ss">ipAdr</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7629617188-2">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">generic_access</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7629617188-3">[</span><span·class="mi">16#2543</span><span·class="p"·data-group-id="7629617188-3">]</span><span·class="p"·data-group-id="7629617188-2">}</span><span·class="p"·data-group-id="7629617188-1">}</span><span·class="p">.</span><span·class="w">
246 </span><span·class="p"·data-group-id="8275176532-4">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8275176532-5">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">generic[·...·truncated·by·diffoscope;·len:·293,·SHA:·4112b684545ab307a2d0ed4a6f294d4444caaa2a949f186230fcf85f741e7824·...·]-4">}</span><span·class="p">.</span></code></pre><h2·id="default-instrumentation"·class="section-heading">246 </span><span·class="p"·data-group-id="7629617188-4">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7629617188-5">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">generic[·...·truncated·by·diffoscope;·len:·293,·SHA:·9d36d85d1d2b33bf1d78289b099479324997b85d3695fe41a3dbc0ec59a8fc4e·...·]-4">}</span><span·class="p">.</span></code></pre><h2·id="default-instrumentation"·class="section-heading">
247 ··<a·href="#default-instrumentation"·class="hover-link">247 ··<a·href="#default-instrumentation"·class="hover-link">
248 ····<i·class="ri-link-m"·aria-hidden="true"></i>248 ····<i·class="ri-link-m"·aria-hidden="true"></i>
249 ··</a>249 ··</a>
250 ··<span·class="text">Default·Instrumentation</span>250 ··<span·class="text">Default·Instrumentation</span>
251 </h2>251 </h2>
252 <p><a·href=""·id="snmp_3"></a></p><p>When·the·MIB·definition·work·is·finished,·there·are·two·major·issues·left.</p><ul><li>Implementing·the·MIB</li><li>Implementing·a·Manager·Application.</li></ul><p>Implementing·an·MIB·can·be·a·tedious·task.·Most·probably,·there·is·a·need·to252 <p><a·href=""·id="snmp_3"></a></p><p>When·the·MIB·definition·work·is·finished,·there·are·two·major·issues·left.</p><ul><li>Implementing·the·MIB</li><li>Implementing·a·Manager·Application.</li></ul><p>Implementing·an·MIB·can·be·a·tedious·task.·Most·probably,·there·is·a·need·to
253 test·the·agent·before·all·tables·and·variables·are·implemented.·In·this·case,253 test·the·agent·before·all·tables·and·variables·are·implemented.·In·this·case,
7.09 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_manager_config_files.html
    
Offset 145, 18 lines modifiedOffset 145, 18 lines modified
145 and·<code·class="inline">IpPort</code>·is·an·integer.</p><p>When·<code·class="inline">Addr</code>·does·not·contain·a·port·number,·the·value·of·<code·class="inline">port</code>·is·used.</p><p>When·a·<code·class="inline">Addr</code>·is·not·specified·i.e·by·using·only·a·<code·class="inline">Domain</code>·atom,·the145 and·<code·class="inline">IpPort</code>·is·an·integer.</p><p>When·<code·class="inline">Addr</code>·does·not·contain·a·port·number,·the·value·of·<code·class="inline">port</code>·is·used.</p><p>When·a·<code·class="inline">Addr</code>·is·not·specified·i.e·by·using·only·a·<code·class="inline">Domain</code>·atom,·the
146 host's·name·is·resolved·to·find·the·IP·address,·and·the·value·of·<code·class="inline">port</code>·is146 host's·name·is·resolved·to·find·the·IP·address,·and·the·value·of·<code·class="inline">port</code>·is
147 used.</p></li></ul></li><li><p><code·class="inline">port</code>·-·which·defines·which·UDP·port·the·manager·uses·for·communicating147 used.</p></li></ul></li><li><p><code·class="inline">port</code>·-·which·defines·which·UDP·port·the·manager·uses·for·communicating
148 with·agents.·<em>Mandatory</em>·if·<code·class="inline">transports</code>·does·not·define·a·port·number·for148 with·agents.·<em>Mandatory</em>·if·<code·class="inline">transports</code>·does·not·define·a·port·number·for
149 every·transport.</p></li><li><p><code·class="inline">engine_id</code>·-·The·<code·class="inline">SnmpEngineID</code>·as·defined·in·SNMP-FRAMEWORK-MIB.149 every·transport.</p></li><li><p><code·class="inline">engine_id</code>·-·The·<code·class="inline">SnmpEngineID</code>·as·defined·in·SNMP-FRAMEWORK-MIB.
150 <em>Mandatory</em>.</p></li><li><p><code·class="inline">max_message_size</code>·-·The·<code·class="inline">snmpEngineMaxMessageSize</code>·as·defined·in150 <em>Mandatory</em>.</p></li><li><p><code·class="inline">max_message_size</code>·-·The·<code·class="inline">snmpEngineMaxMessageSize</code>·as·defined·in
151 SNMP-FRAMEWORK-MIB.·<em>Mandatory</em>.</p></li></ul></li><li><p><code·class="inline">Value</code>·is·the·value·for·the·variable.</p></li></ul><p>The·legacy·and·intermediate·variables·<code·class="inline">address</code>·and·<code·class="inline">domain</code>·are·still·supported151 SNMP-FRAMEWORK-MIB.·<em>Mandatory</em>.</p></li></ul></li><li><p><code·class="inline">Value</code>·is·the·value·for·the·variable.</p></li></ul><p>The·legacy·and·intermediate·variables·<code·class="inline">address</code>·and·<code·class="inline">domain</code>·are·still·supported
152 so·old·configurations·will·work.</p><p>The·following·example·shows·a·<code·class="inline">manager.conf</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7825935490-1">{</span><span·class="ss">transports</span><span·class="p">,</span><span·class="w">·······</span><span·class="p"·data-group-id="7825935490-2">[</span><span·class="p"·data-group-id="7825935490-3">{</span><span·class="ss">transportDomainUdpIpv4<[·...·truncated·by·diffoscope;·len:·560,·SHA:·65fc8cbd06428bda8983d810bdbb269057394e000b10ae08a293951c5ff06a20·...·]0-3">}</span><span·class="p">,</span><span·class="w">152 so·old·configurations·will·work.</p><p>The·following·example·shows·a·<code·class="inline">manager.conf</code>·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5425271180-1">{</span><span·class="ss">transports</span><span·class="p">,</span><span·class="w">·······</span><span·class="p"·data-group-id="5425271180-2">[</span><span·class="p"·data-group-id="5425271180-3">{</span><span·class="ss">transportDomainUdpIpv4<[·...·truncated·by·diffoscope;·len:·560,·SHA:·a60be62413d9bda24dd151e72f9de60a7a2f228e859e3857bdd9c39c66c187d1·...·]0-3">}</span><span·class="p">,</span><span·class="w">
153 ····················</span><span·class="p"·data-group-id="7825935490-6">{</span><span·class="ss">transportDomainUdpIpv6</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7825935490-7">{</span><span·class="p"·data-group-id="7825935490-8">{</span><span·class="mi">0</span><span·cla[·...·truncated·by·diffoscope;·len:·662,·SHA:·faf0401a42a536951d08bcf6033e4974c369176bdde0396230c06e14f43beff6·...·]0-1">}</span><span·class="p">.</span><span·class="w">153 ····················</span><span·class="p"·data-group-id="5425271180-6">{</span><span·class="ss">transportDomainUdpIpv6</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5425271180-7">{</span><span·class="p"·data-group-id="5425271180-8">{</span><span·class="mi">0</span><span·cla[·...·truncated·by·diffoscope;·len:·662,·SHA:·3050be50cdcfdc5ef0605495ffe88c8436b354681f7a3f07da65d79379f09fb9·...·]0-1">}</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p"·data-group-id="7825935490-9">{</span><span·class="ss">engine_id</span><span·class="p">,</span><span·class="w">········</span><span·class="s">&quot;mgrEngine&quot;</span><span·class="p"·data-group-id="7825935490-9">}</span><span·class="p">.</span><span·class="w">154 </span><span·class="p"·data-group-id="5425271180-9">{</span><span·class="ss">engine_id</span><span·class="p">,</span><span·class="w">········</span><span·class="s">&quot;mgrEngine&quot;</span><span·class="p"·data-group-id="5425271180-9">}</span><span·class="p">.</span><span·class="w">
155 </span><span·class="p"·data-group-id="7825935490-10">{</span><span·class="ss">max_message_size</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">484</span><span·class="p"·data-group-id="7825935490-10">}</span><span·class="p">.</span></code></pre><p>The·value·of·<code·class="inline">engine_id</code>·is·a·string,·which·should·have·a·very·specific155 </span><span·class="p"·data-group-id="5425271180-10">{</span><span·class="ss">max_message_size</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">484</span><span·class="p"·data-group-id="5425271180-10">}</span><span·class="p">.</span></code></pre><p>The·value·of·<code·class="inline">engine_id</code>·is·a·string,·which·should·have·a·very·specific
156 structure.·See·RFC·2271/2571·for·details.</p><h2·id="users"·class="section-heading">156 structure.·See·RFC·2271/2571·for·details.</p><h2·id="users"·class="section-heading">
157 ··<a·href="#users"·class="hover-link">157 ··<a·href="#users"·class="hover-link">
158 ····<i·class="ri-link-m"·aria-hidden="true"></i>158 ····<i·class="ri-link-m"·aria-hidden="true"></i>
159 ··</a>159 ··</a>
160 ··<span·class="text">Users</span>160 ··<span·class="text">Users</span>
161 </h2>161 </h2>
162 <p>For·each·<em>manager·user</em>,·the·manager·needs·some·information.·This·information·is162 <p>For·each·<em>manager·user</em>,·the·manager·needs·some·information.·This·information·is
7.35 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_mib_compiler.html
    
Offset 137, 30 lines modifiedOffset 137, 30 lines modified
137 before·it·will·be·compiled.·This·text·file·must·have·the·same·name·as·the·MIB,137 before·it·will·be·compiled.·This·text·file·must·have·the·same·name·as·the·MIB,
138 but·with·the·suffix·<code·class="inline">.mib</code>.·This·is·necessary·for·handling·the·<code·class="inline">IMPORT</code>138 but·with·the·suffix·<code·class="inline">.mib</code>.·This·is·necessary·for·handling·the·<code·class="inline">IMPORT</code>
139 statement.</p><p>The·association·file,·which·contains·the·names·of·instrumentation·functions·for139 statement.</p><p>The·association·file,·which·contains·the·names·of·instrumentation·functions·for
140 the·MIB,·should·have·the·suffix·<code·class="inline">.funcs</code>.·If·the·compiler·does·not·find·the140 the·MIB,·should·have·the·suffix·<code·class="inline">.funcs</code>.·If·the·compiler·does·not·find·the
141 association·file,·it·gives·a·warning·message·and·uses·default·instrumentation141 association·file,·it·gives·a·warning·message·and·uses·default·instrumentation
142 functions.·(See·<a·href="snmp_instr_functions.html#snmp_3">Default·Instrumentation</a>·for142 functions.·(See·<a·href="snmp_instr_functions.html#snmp_3">Default·Instrumentation</a>·for
143 more·details).</p><p>The·MIB·compiler·is·started·with·a·call·to·<code·class="inline">snmpc:compile(&lt;mibname&gt;).</code>·For143 more·details).</p><p>The·MIB·compiler·is·started·with·a·call·to·<code·class="inline">snmpc:compile(&lt;mibname&gt;).</code>·For
144 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="3945939396-1">(</span><span·class="s">&quot;RFC1213-MIB&quot;</span><span·class="p"·data-group-id="3945939396-1">)</span><span·class="p">.</span></code></pre><p>The·output·is·a·new·file·which·is·called·<code·class="inline">&lt;mibname&gt;.bin</code>.</p><p>The·MIB·compiler·understands·both·SMIv1·and·SMIv2·MIBs.·It·uses·the144 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="5207235352-1">(</span><span·class="s">&quot;RFC1213-MIB&quot;</span><span·class="p"·data-group-id="5207235352-1">)</span><span·class="p">.</span></code></pre><p>The·output·is·a·new·file·which·is·called·<code·class="inline">&lt;mibname&gt;.bin</code>.</p><p>The·MIB·compiler·understands·both·SMIv1·and·SMIv2·MIBs.·It·uses·the
145 MODULE-IDENTITY·statement·to·determinate·if·the·MIB·is·written·in·SMI·version·1145 MODULE-IDENTITY·statement·to·determinate·if·the·MIB·is·written·in·SMI·version·1
146 or·2.</p><h2·id="importing-mibs"·class="section-heading">146 or·2.</p><h2·id="importing-mibs"·class="section-heading">
147 ··<a·href="#importing-mibs"·class="hover-link">147 ··<a·href="#importing-mibs"·class="hover-link">
148 ····<i·class="ri-link-m"·aria-hidden="true"></i>148 ····<i·class="ri-link-m"·aria-hidden="true"></i>
149 ··</a>149 ··</a>
150 ··<span·class="text">Importing·MIBs</span>150 ··<span·class="text">Importing·MIBs</span>
151 </h2>151 </h2>
152 <p>The·compiler·handles·the·<code·class="inline">IMPORT</code>·statement.·It·is·important·to·import·the152 <p>The·compiler·handles·the·<code·class="inline">IMPORT</code>·statement.·It·is·important·to·import·the
153 compiled·file·and·not·the·ASN.1·(source)·file.·A·MIB·must·be·recompiled·to·make153 compiled·file·and·not·the·ASN.1·(source)·file.·A·MIB·must·be·recompiled·to·make
154 changes·visible·to·other·MIBs·importing·it.</p><p>The·compiled·files·of·the·imported·MIBs·must·be·present·in·the·current154 changes·visible·to·other·MIBs·importing·it.</p><p>The·compiled·files·of·the·imported·MIBs·must·be·present·in·the·current
155 directory,·or·a·directory·in·the·current·path.·The·path·is·supplied·with·the155 directory,·or·a·directory·in·the·current·path.·The·path·is·supplied·with·the
156 <code·class="inline">{i,·Path}</code>·option,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="6313654534-1">(</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p">,</span><span·class="w">156 <code·class="inline">{i,·Path}</code>·option,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="2127661395-1">(</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p">,</span><span·class="w">
157 ·······</span><span·class="p"·data-group-id="6313654534-2">[</span><span·class="p"·data-group-id="6313654534-3">{</span><span·class="ss">i</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6313654534-4">[</span><span·class="s">&quot;friend_mibs/&quot;</span><span·cl[·...·truncated·by·diffoscope;·len:·292,·SHA:·332f852e3713299297bedb9445976129ba6fb0235c493148a73dac228a732270·...·]-1">)</span><span·class="p">.</span></code></pre><p>It·is·also·possible·to·import·MIBs·from·OTP·applications·in·an·<code·class="inline">&quot;include_lib&quot;</code>157 ·······</span><span·class="p"·data-group-id="2127661395-2">[</span><span·class="p"·data-group-id="2127661395-3">{</span><span·class="ss">i</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2127661395-4">[</span><span·class="s">&quot;friend_mibs/&quot;</span><span·cl[·...·truncated·by·diffoscope;·len:·292,·SHA:·95e43d9b1cafb1b24670ca065ce47002f9e32951d3cd9c82a301cbfa2d56c0f2·...·]-1">)</span><span·class="p">.</span></code></pre><p>It·is·also·possible·to·import·MIBs·from·OTP·applications·in·an·<code·class="inline">&quot;include_lib&quot;</code>
158 like·fashion·with·the·<code·class="inline">il</code>·option.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="2535147997-1">(</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p">,</span><span·class="w">158 like·fashion·with·the·<code·class="inline">il</code>·option.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmpc</span><span·class="p">:</span><span·class="nf">compile</span><span·class="p"·data-group-id="3475490851-1">(</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p">,</span><span·class="w">
159 ·······</span><span·class="p"·data-group-id="2535147997-2">[</span><span·class="p"·data-group-id="2535147997-3">{</span><span·class="ss">il</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2535147997-4">[</span><span·class="s">&quot;snmp/priv/mibs/&quot;</span><spa[·...·truncated·by·diffoscope;·len:·295,·SHA:·753181849204ca9321f48040b956a2cc811db62a7a21c4b7b7fe53cd4e46670a·...·]-1">)</span><span·class="p">.</span></code></pre><p>finds·the·latest·version·of·the·<code·class="inline">snmp</code>·and·<code·class="inline">myapp</code>·applications·in·the·OTP159 ·······</span><span·class="p"·data-group-id="3475490851-2">[</span><span·class="p"·data-group-id="3475490851-3">{</span><span·class="ss">il</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3475490851-4">[</span><span·class="s">&quot;snmp/priv/mibs/&quot;</span><spa[·...·truncated·by·diffoscope;·len:·295,·SHA:·367a628588cfb76e3a226c342beee9a0eb388655bb5f58fcfd0ec8879a8e986f·...·]-1">)</span><span·class="p">.</span></code></pre><p>finds·the·latest·version·of·the·<code·class="inline">snmp</code>·and·<code·class="inline">myapp</code>·applications·in·the·OTP
160 system·and·uses·the·expanded·paths·as·include·paths.</p><p>Note·that·an·SMIv2·MIB·can·import·an·SMIv1·MIB·and·vice·versa.</p><p>The·following·MIBs·are·built-ins·of·the·Erlang·SNMP·compiler:·SNMPv2-SMI,160 system·and·uses·the·expanded·paths·as·include·paths.</p><p>Note·that·an·SMIv2·MIB·can·import·an·SMIv1·MIB·and·vice·versa.</p><p>The·following·MIBs·are·built-ins·of·the·Erlang·SNMP·compiler:·SNMPv2-SMI,
161 RFC-1215,·RFC-1212,·SNMPv2-TC,·SNMPv2-CONF,·and·RFC1155-SMI.·They·cannot161 RFC-1215,·RFC-1212,·SNMPv2-TC,·SNMPv2-CONF,·and·RFC1155-SMI.·They·cannot
162 therefore·be·compiled·separately.</p><h2·id="mib-consistency-checking"·class="section-heading">162 therefore·be·compiled·separately.</p><h2·id="mib-consistency-checking"·class="section-heading">
163 ··<a·href="#mib-consistency-checking"·class="hover-link">163 ··<a·href="#mib-consistency-checking"·class="hover-link">
164 ····<i·class="ri-link-m"·aria-hidden="true"></i>164 ····<i·class="ri-link-m"·aria-hidden="true"></i>
165 ··</a>165 ··</a>
166 ··<span·class="text">MIB·Consistency·Checking</span>166 ··<span·class="text">MIB·Consistency·Checking</span>
2.43 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmp_pdus.html
    
Offset 130, 16 lines modifiedOffset 130, 16 lines modified
130 ····<section·id="moduledoc">130 ····<section·id="moduledoc">
131 <p>Encode·and·Decode·Functions·for·SNMP·PDUs</p><p>RFC1157,·RFC1905·and/or·RFC2272·should·be·studied·carefully·before·using·this131 <p>Encode·and·Decode·Functions·for·SNMP·PDUs</p><p>RFC1157,·RFC1905·and/or·RFC2272·should·be·studied·carefully·before·using·this
132 module,·<code·class="inline">snmp_pdus</code>.</p><p>The·module·<code·class="inline">snmp_pdus</code>·contains·functions·for·encoding·and·decoding·of·SNMP132 module,·<code·class="inline">snmp_pdus</code>.</p><p>The·module·<code·class="inline">snmp_pdus</code>·contains·functions·for·encoding·and·decoding·of·SNMP
133 protocol·data·units·(PDUs).·In·short,·this·module·converts·a·list·of·bytes·to133 protocol·data·units·(PDUs).·In·short,·this·module·converts·a·list·of·bytes·to
134 Erlang·record·representations·and·vice·versa.·The·record·definitions·can·be134 Erlang·record·representations·and·vice·versa.·The·record·definitions·can·be
135 found·in·the·file·<code·class="inline">snmp/include/snmp_types.hrl</code>.·If·snmpv3·is·used,·the·module135 found·in·the·file·<code·class="inline">snmp/include/snmp_types.hrl</code>.·If·snmpv3·is·used,·the·module
136 that·includes·<code·class="inline">snmp_types.hrl</code>·must·define·the·constant·<code·class="inline">SNMP_USE_V3</code>·before·the136 that·includes·<code·class="inline">snmp_types.hrl</code>·must·define·the·constant·<code·class="inline">SNMP_USE_V3</code>·before·the
137 header·file·is·included.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="4574577873-1">(</span><span·class="n">SNMP_USE_V3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="4574577873-1">)</span><span·class="p">.</span><span·class="w">137 header·file·is·included.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="4088757951-1">(</span><span·class="n">SNMP_USE_V3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="4088757951-1">)</span><span·class="p">.</span><span·class="w">
138 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4574577873-2">(</span><span·class="s">&quot;snmp/include/snmp_types.hrl&quot;</span><span·class="p"·data-group-id="4574577873-2">)</span><span·class="p">.</span></code></pre><p>Encoding·and·decoding·must·be·done·explicitly·when·writing·your·own·Net·if138 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4088757951-2">(</span><span·class="s">&quot;snmp/include/snmp_types.hrl&quot;</span><span·class="p"·data-group-id="4088757951-2">)</span><span·class="p">.</span></code></pre><p>Encoding·and·decoding·must·be·done·explicitly·when·writing·your·own·Net·if
139 process.</p>139 process.</p>
140 ····</section>140 ····</section>
  
141 </div>141 </div>
  
142 ··<section·id="summary"·class="details-list">142 ··<section·id="summary"·class="details-list">
143 ····<h1·class="section-heading">143 ····<h1·class="section-heading">
24.0 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmpa.html
    
Offset 3332, 16 lines modifiedOffset 3332, 16 lines modified
3332 ······················AgentName·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),3332 ······················AgentName·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>(),
3333 ······················Mib·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),3333 ······················Mib·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>(),
3334 ······················Reason·::·already_loaded·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>3334 ······················Reason·::·already_loaded·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3335 ······</div>3335 ······</div>
  
3336 <p>Load·a·single·<code·class="inline">Mib</code>·into·an·agent.·The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,3336 <p>Load·a·single·<code·class="inline">Mib</code>·into·an·agent.·The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,
3337 including·the·path·to·where·the·compiled·mib·is·found.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="1824434305-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="1824434305-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">3337 including·the·path·to·where·the·compiled·mib·is·found.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="0809021489-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="0809021489-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">
3338 ··········</span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">load_mib</span><span·class="p"·data-group-id="1824434305-2">(</span><span·class="ss">snmp_master_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;MY-MIB&quot;</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·d16d0e906c270d76a066cf9fdd69bb8946d01cd253dcdcdf1d60ba6a7f88bbcc·...·]-2">)</span><span·class="p">.</span></code></pre>3338 ··········</span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">load_mib</span><span·class="p"·data-group-id="0809021489-2">(</span><span·class="ss">snmp_master_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;MY-MIB&quot;</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·8ab6a744cd108cd41744f57170eedd003b5a0302ccf3f3ae3b3b34d846ed8ce4·...·]-2">)</span><span·class="p">.</span></code></pre>
3339 ··</section>3339 ··</section>
3340 </section>3340 </section>
3341 <section·class="detail"·id="load_mibs/1">3341 <section·class="detail"·id="load_mibs/1">
  
3342 ··<div·class="detail-header">3342 ··<div·class="detail-header">
3343 ····<a·href="#load_mibs/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3343 ····<a·href="#load_mibs/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3344 ······<i·class="ri-link-m"·aria-hidden="true"></i>3344 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 3449, 16 lines modifiedOffset 3449, 16 lines modified
3449 ·······················InternalReason·::·already_loaded·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>3449 ·······················InternalReason·::·already_loaded·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3450 ······</div>3450 ······</div>
  
3451 <p>Load·<code·class="inline">Mibs</code>·into·an·agent.·If·the·agent·cannot·load·all·MIBs·(the·default·value3451 <p>Load·<code·class="inline">Mibs</code>·into·an·agent.·If·the·agent·cannot·load·all·MIBs·(the·default·value
3452 of·the·<code·class="inline">Force</code>·argument·is·<code·class="inline">false</code>),·it·will·indicate·where·loading·was·aborted.3452 of·the·<code·class="inline">Force</code>·argument·is·<code·class="inline">false</code>),·it·will·indicate·where·loading·was·aborted.
3453 The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,·including·the·path·to·where·the·compiled3453 The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,·including·the·path·to·where·the·compiled
3454 mib·is·found.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="7097945783-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="7097945783-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">3454 mib·is·found.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="5519352116-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="5519352116-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">
3455 ··········</span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">load_mibs</span><span·class="p"·data-group-id="7097945783-2">(</span><span·class="ss">snmp_master_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7097945783-3">[</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·142,·SHA:·69e4ecd19ec100a08486467fdf62148ec4fc6a973103ecabb354ec7bce205089·...·]-2">)</span><span·class="p">.</span></code></pre><p>If·<code·class="inline">Force·=·true</code>·then·the·agent·will·continue·attempting·to·load·each·mib·even3455 ··········</span><span·class="nc">snmpa</span><span·class="p">:</span><span·class="nf">load_mibs</span><span·class="p"·data-group-id="5519352116-2">(</span><span·class="ss">snmp_master_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5519352116-3">[</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·142,·SHA:·6e1e88d08faefa299d151c506f3b822eb19455ec80572081eaa6ce0c497561f2·...·]-2">)</span><span·class="p">.</span></code></pre><p>If·<code·class="inline">Force·=·true</code>·then·the·agent·will·continue·attempting·to·load·each·mib·even
3456 after·failing·to·load·a·previous·mib.·Use·with·care.</p>3456 after·failing·to·load·a·previous·mib.·Use·with·care.</p>
3457 ··</section>3457 ··</section>
3458 </section>3458 </section>
3459 <section·class="detail"·id="log_to_io/1">3459 <section·class="detail"·id="log_to_io/1">
  
3460 ··<div·class="detail-header">3460 ··<div·class="detail-header">
3461 ····<a·href="#log_to_io/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3461 ····<a·href="#log_to_io/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 4561, 16 lines modifiedOffset 4561, 16 lines modified
4561 ·······························SubAgent·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0">pid</a>(),4561 ·······························SubAgent·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0">pid</a>(),
4562 ·······························Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>4562 ·······························Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
4563 ······</div>4563 ······</div>
  
4564 <p>Registers·a·sub-agent·under·a·sub-tree·of·another·agent.</p><p>It·is·easy·to·make·mistakes·when·registering·sub-agents·and·this·activity·should4564 <p>Registers·a·sub-agent·under·a·sub-tree·of·another·agent.</p><p>It·is·easy·to·make·mistakes·when·registering·sub-agents·and·this·activity·should
4565 be·done·carefully.·For·example,·a·strange·behaviour·would·result·from·the4565 be·done·carefully.·For·example,·a·strange·behaviour·would·result·from·the
4566 following·configuration:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmp_agent</span><span·class="p">:</span><span·class="nf">register_subagent</span><span·class="p"·data-group-id="0852880677-1">(</span><span·class="n">MAPid</span><span·class="p">,</span><span·class="p"·data-group-id="0852880677-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="0852880677-2">]</span><span·class="p">,</span><span·class="n">SA1</span><span·class="p"·data-group-id="0852880677-1">)</span><span·class="p">,</span><span·class="w"> 
4567 </span><span·class="nc">snmp_agent</span><span·class="p">:</span><span·class="nf">register_subagent</span><span·class="p"·data-group-id="0852880677-3">(</span><span·class="n">SA1</span><span·class="p">,</span><span·class="p"·data-group-id="0852880677-4">[<[·...·truncated·by·diffoscope;·len:·476,·SHA:·4b9a308a015f0db5ec611eec37661ed136760416c8a62197358e23e8fd7e3608·...·]4566 following·configuration:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">snmp_agent</span><span·class="p">:</span><span·class="nf">register_subagent</span><span·class="p"·data-group-id="4549718947-1">(</span><span·class="n">MAPid</span>[·...·truncated·by·diffoscope;·len:·445,·SHA:·57ff9dba90e57545ab2d7e4d85532e1ccf14105fd480d936ac94d00ae26d36d4·...·]
 4567 </span><span·class="nc">snmp_agent</span><span·class="p">:</span><span·class="nf">register_subagent</span><span·class="p"·data-group-id="4549718947-3">(</span><span·class="n">SA1</span><span·class="p">,</span><span·class="p"·data-group-id="4549718947-4">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="4549718947-4">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SA2</span><span·class="p"·data-group-id="4549718947-3">)</span><span·class="p">.</span></code></pre><p><code·class="inline">SA2</code>·will·not·get·requests·starting·with·object·identifier·<code·class="inline">[1,2,3]</code>·since
4568 <code·class="inline">SA1</code>·does·not.</p>4568 <code·class="inline">SA1</code>·does·not.</p>
4569 ··</section>4569 ··</section>
4570 </section>4570 </section>
4571 <section·class="detail"·id="restart_set_worker/0">4571 <section·class="detail"·id="restart_set_worker/0">
  
4572 ··<div·class="detail-header">4572 ··<div·class="detail-header">
4573 ····<a·href="#restart_set_worker/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">4573 ····<a·href="#restart_set_worker/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 5007, 28 lines modifiedOffset 5007, 28 lines modified
5007 function·call·according·to·the·value·of·<code·class="inline">Recv</code>.</li></ul><p>If·<code·class="inline">Receiver</code>·has·the·value·<code·class="inline">{Tag,·Recv}</code>,·the·delivery·is·done·according·to5007 function·call·according·to·the·value·of·<code·class="inline">Recv</code>.</li></ul><p>If·<code·class="inline">Receiver</code>·has·the·value·<code·class="inline">{Tag,·Recv}</code>,·the·delivery·is·done·according·to
5008 <code·class="inline">Recv</code>:</p><ul><li><p><code·class="inline">pid()·|·atom()</code>·-·The·info·will·be·delivered·in·the·following·messages:</p><ul><li><p><code·class="inline">{snmp_targets,·Tag,·Addresses}</code></p><p>This·inform·the·user·which·target·addresses·the·notification·was·sent·to.</p></li><li><p><code·class="inline">{snmp_notification,·Tag,·{got_response,·Address}}</code></p><p>This·informs·the·user·that·this·target·address·acknowledged·the5008 <code·class="inline">Recv</code>:</p><ul><li><p><code·class="inline">pid()·|·atom()</code>·-·The·info·will·be·delivered·in·the·following·messages:</p><ul><li><p><code·class="inline">{snmp_targets,·Tag,·Addresses}</code></p><p>This·inform·the·user·which·target·addresses·the·notification·was·sent·to.</p></li><li><p><code·class="inline">{snmp_notification,·Tag,·{got_response,·Address}}</code></p><p>This·informs·the·user·that·this·target·address·acknowledged·the
5009 notification.</p></li><li><p><code·class="inline">{snmp_notification,·Tag,·{no_response,·Address}}</code></p><p>This·informs·the·user·that·this·target·address·did·not·acknowledge5009 notification.</p></li><li><p><code·class="inline">{snmp_notification,·Tag,·{no_response,·Address}}</code></p><p>This·informs·the·user·that·this·target·address·did·not·acknowledge
5010 notification.</p></li></ul><p>The·notification·is·sent·as·an·Inform-Request·to·each·target·address·in5010 notification.</p></li></ul><p>The·notification·is·sent·as·an·Inform-Request·to·each·target·address·in
5011 <code·class="inline">Addresses</code>·and·if·there·are·no·targets·for·which·an·Inform-Request·is·sent,5011 <code·class="inline">Addresses</code>·and·if·there·are·no·targets·for·which·an·Inform-Request·is·sent,
5012 <code·class="inline">Addresses</code>·is·the·empty·list·<code·class="inline">[]</code>.</p><p>The·<code·class="inline">receiver</code>·will·first·be·sent·the·<code·class="inline">snmp_targets</code>·message,·and·then·for5012 <code·class="inline">Addresses</code>·is·the·empty·list·<code·class="inline">[]</code>.</p><p>The·<code·class="inline">receiver</code>·will·first·be·sent·the·<code·class="inline">snmp_targets</code>·message,·and·then·for
5013 each·address·in·<code·class="inline">Addresses</code>·list,·one·of·the·two·<code·class="inline">snmp_notification</code>·messages.</p></li><li><p><code·class="inline">{Mod,·Func,·Args}</code>·-·The·info·will·be·delivered·via·the·function·call:</p><p><code·class="inline">Mod:Func([Msg·|·Args])</code></p><p>where·<code·class="inline">Msg</code>·has·the·same·content·and·purpose·as·the·messages·descrived·above.</p></li></ul><p><code·class="inline">Address</code>·is·a·management·target·address·and·<code·class="inline">Addresses</code>·is·a·list·of·management5013 each·address·in·<code·class="inline">Addresses</code>·list,·one·of·the·two·<code·class="inline">snmp_notification</code>·messages.</p></li><li><p><code·class="inline">{Mod,·Func,·Args}</code>·-·The·info·will·be·delivered·via·the·function·call:</p><p><code·class="inline">Mod:Func([Msg·|·Args])</code></p><p>where·<code·class="inline">Msg</code>·has·the·same·content·and·purpose·as·the·messages·descrived·above.</p></li></ul><p><code·class="inline">Address</code>·is·a·management·target·address·and·<code·class="inline">Addresses</code>·is·a·list·of·management
5014 target·addresses.·They·are·defined·as·followes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="n">Addresses</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5249271306-1">[</span><span·class="nf">address</span><span·class="p"·data-group-id="5249271306-2">(</span><span·class="p"·data-group-id="5249271306-2">)</span><span·class="p"·data-group-id="5249271306-1">]</span><span·class="w">5014 target·addresses.·They·are·defined·as·followes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">········</span><span·class="n">Addresses</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5083325802-1">[</span><span·class="nf">address</span><span·class="p"·data-group-id="5083325802-2">(</span><span·class="p"·data-group-id="5083325802-2">)</span><span·class="p"·data-group-id="5083325802-1">]</span><span·class="w">
5015 ········</span><span·class="n">Address</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">address</span><span·class="p"·data-group-id="5249271306-3">(</span><span·class="p"·data-group-id="5249271306-3">)</span><span·class="w">5015 ········</span><span·class="n">Address</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">address</span><span·class="p"·data-group-id="5083325802-3">(</span><span·class="p"·data-group-id="5083325802-3">)</span><span·class="w">
 5016 ········</span><span·class="nf">address</span><span·class="p"·data-group-id="5083325802-4">(</span><span·class="p"·data-group-id="5083325802-4">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">v1_address</span><span·class="p"·data-group-id="5083325802-5">(</span><span·class="p"·data-group-id="5083325802-5">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">v3_address</span><span·class="p"·data-group-id="5083325802-6">(</span><span·class="p"·data-group-id="5083325802-6">)</span><span·class="w">
5016 ········</span><span·class="nf">address</span><span·class="p"·data-group-id="5249271306-4">(</span><span·class="p"·data-group-id="5249271306-4">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">v1_address</span><span·class="p"·data-group-id="5249271306-5">(</span><span·class="p"·data-group-id="5249271306-5">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">v3_address</span><span·class="p"·data-group-id="5249271306-6">(</span><span·class="p"·data-group-id="5249271306-6">)</span><span·class="w"> 
5017 ········</span><span·class="nf">v1_address</span><span·class="p"·data-group-id="5249271306-7">(</span><span·class="p"·data-group-id="5249271306-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5249271306-8">{</span><span·class="n">TDomain</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TAddress</span><span·class="p"·data-group-id="5249271306-8">}</span><span·class="w"> 
5018 ········</span><span·class="nf">v3_address</span><span·class="p"·data-group-id="5249271306-9">(</span><span·class="p"·data-group-id="5249271306-9">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5249271306-10">{</span><span·cl[·...·truncated·by·diffoscope;·len:·333,·SHA:·f193aaa89a3d89080e56289055fa6a4fe22b7ad7d4a599d2d509abbc9fc4a03c·...·]">}</span><span·class="w">5017 ········</span><span·class="nf">v1_address</span><span·class="p"·data-group-id="5083325802-7">(</span><span·class="p"·data-group-id="5083325802-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5083325802-8">{</span><span·cla[·...·truncated·by·diffoscope;·len:·143,·SHA:·096be8419b2b6c60cd1e555efc19e4c37746672383f15530878192407ae78f59·...·]">}</span><span·class="w">
 5018 ········</span><span·class="nf">v3_address</span><span·class="p"·data-group-id="5083325802-9">(</span><span·class="p"·data-group-id="5083325802-9">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5083325802-10">{</span><span·class="p"·data-group-id="5083325802-11">{</span><span·class="n">TDomain</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TAddress</span><span·class="p"·data-group-id="5083325802-11">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V3MsgData</span><span·class="p"·data-group-id="5083325802-10">}</span><span·class="w">
5019 ········</span><span·class="n">TDomain</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tdoamin</span><span·class="p"·data-group-id="5249271306-12">(</span><span·class="p"·data-group-id="5249271306-12">)</span><span·class="w">5019 ········</span><span·class="n">TDomain</span><span·class="w">····</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">tdoamin</span><span·class="p"·data-group-id="5083325802-12">(</span><span·class="p"·data-group-id="5083325802-12">)</span><span·class="w">
5020 ········</span><span·class="n">TAddress</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">taddress</span><span·class="p"·data-group-id="5249271306-13">(</span><span·class="p"·data-group-id="5249271306-13">)</span><span·class="w">5020 ········</span><span·class="n">TAddress</span><span·class="w">···</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">taddress</span><span·class="p"·data-group-id="5083325802-13">(</span><span·class="p"·data-group-id="5083325802-13">)</span><span·class="w">
5021 ········</span><span·class="nf">tdomain</span><span·class="p"·data-group-id="5249271306-14">(</span><span·class="p"·data-group-id="5249271306-14">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">oid</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">snmpUDPDomain</span><span·class="w">5021 ········</span><span·class="nf">tdomain</span><span·class="p"·data-group-id="5083325802-14">(</span><span·class="p"·data-group-id="5083325802-14">)</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="n">The</span><span·class="w">·</span><span·class="ss">oid</span><span·class="w">·</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">snmpUDPDomain</span><span·class="w">
5022 ·····················</span><span·class="n">This</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">only</span><span·class="w">·</span><span·class="ss">supported</span><span·class="w">·</span><span·class="ss">transport</span><span·class="w">·</span><span·class="ss">domain</span><span·class="p">.</span><span·class="w">5022 ·····················</span><span·class="n">This</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">only</span><span·class="w">·</span><span·class="ss">supported</span><span·class="w">·</span><span·class="ss">transport</span><span·class="w">·</span><span·class="ss">domain</span><span·class="p">.</span><span·class="w">
5023 ········</span><span·class="nf">taddress</span><span·class="p"·data-group-id="5249271306-15">(</span><span·class="p"·data-group-id="5249271306-15">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5249271306-16">[</span><span·class="n">A1</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·377,·SHA:·c3a3e3db60e41d795ec1e9f10fcebf62718bacaae4ca79b9a7eb89246ece8ffc·...·]-16">]</span><span·class="w">5023 ········</span><span·class="nf">taddress</span><span·class="p"·data-group-id="5083325802-15">(</span><span·class="p"·data-group-id="5083325802-15">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5083325802-16">[</span><span·class="n">A1</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·377,·SHA:·b04c1f48fc957c27f176529d3f27efe90566eff561a9f644f6a6239b862dd397·...·]-16">]</span><span·class="w">
5024 ·····················</span><span·class="n">The</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">·</span><span·class="ss">first</span><span·class="w">·</span><span·class="ss">bytes</span><span·class="w">·</span><span·class="ss">makes</span><span·class="w">·</span><span·class="ss">up</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">IP</span><span·class="o">-</span><span·class="ss">address</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">last</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">5024 ·····················</span><span·class="n">The</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">·</span><span·class="ss">first</span><span·class="w">·</span><span·class="ss">bytes</span><span·class="w">·</span><span·class="ss">makes</span><span·class="w">·</span><span·class="ss">up</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">IP</span><span·class="o">-</span><span·class="ss">address</span><span·class="w">·</span><span·class="ow">and</span><span·class="w">·</span><span·class="ss">the</span><span·class="w">·</span><span·class="ss">last</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
5025 ·····················</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">UDP</span><span·class="o">-</span><span·class="ss">port</span><span·class="w">·</span><span·class="ss">number</span><span·class="p">.</span><span·class="w">5025 ·····················</span><span·class="ss">the</span><span·class="w">·</span><span·class="n">UDP</span><span·class="o">-</span><span·class="ss">port</span><span·class="w">·</span><span·class="ss">number</span><span·class="p">.</span><span·class="w">
5026 ········</span><span·class="n">V3MsgData</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">v3_msg_data</span><span·class="p"·data-group-id="5249271306-17">(</span><span·class="p"·data-group-id="5249271306-17">)</span><span·class="w">5026 ········</span><span·class="n">V3MsgData</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">v3_msg_data</span><span·class="p"·data-group-id="5083325802-17">(</span><span·class="p"·data-group-id="5083325802-17">)</span><span·class="w">
5027 ········</span><span·class="nf">v3_msg_data</span><span·class="p"·data-group-id="5249271306-18">(</span><span·class="p"·data-group-id="5249271306-18">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="5249271306-19">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·200d1af12811fb852aaa92d628eb6b61dfa704b2f06409d1fca6f9d1f6d72b68·...·]-19">)</span></code></pre><p>If·<code·class="inline">Receiver</code>·is·a·<a·href="#t:notification_delivery_info/0"><code·class="inline">notification_delivery_info/0</code></a>·record,·then·the·information5027 ········</span><span·class="nf">v3_msg_data</span><span·class="p"·data-group-id="5083325802-18">(</span><span·class="p"·data-group-id="5083325802-18">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="5083325802-19">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·1eb704b7e185770ad46997d9d2c13e00fce2f9802dffba3c48e72ba61a7f5e72·...·]-19">)</span></code></pre><p>If·<code·class="inline">Receiver</code>·is·a·<a·href="#t:notification_delivery_info/0"><code·class="inline">notification_delivery_info/0</code></a>·record,·then·the·information
5028 about·the·notification·delivery·will·be·delivered·to·the·<code·class="inline">receiver</code>·via·the5028 about·the·notification·delivery·will·be·delivered·to·the·<code·class="inline">receiver</code>·via·the
5029 callback·functions·defined·by·the·<a·href="snmpa_notification_delivery_info_receiver.html"><code·class="inline">snmpa_notification_delivery_info_receiver</code></a>5029 callback·functions·defined·by·the·<a·href="snmpa_notification_delivery_info_receiver.html"><code·class="inline">snmpa_notification_delivery_info_receiver</code></a>
5030 behaviour·according·to·the·content·of·the·<a·href="#t:notification_delivery_info/0"><code·class="inline">notification_delivery_info/0</code></a>5030 behaviour·according·to·the·content·of·the·<a·href="#t:notification_delivery_info/0"><code·class="inline">notification_delivery_info/0</code></a>
5031 record.</p><p>The·optional·argument·<code·class="inline">Varbinds</code>·defines·values·for·the·objects·in·the5031 record.</p><p>The·optional·argument·<code·class="inline">Varbinds</code>·defines·values·for·the·objects·in·the
5032 notification.·If·no·value·is·given·for·an·object,·the·<code·class="inline">Agent</code>·performs·a5032 notification.·If·no·value·is·given·for·an·object,·the·<code·class="inline">Agent</code>·performs·a
5033 get-operation·to·retrieve·the·value.</p><p><code·class="inline">Varbinds</code>·is·a·list·of·<code·class="inline">Varbind</code>,·where·each·<code·class="inline">Varbind</code>·is·one·of:</p><ul><li><code·class="inline">{Variable,·Value}</code>,·where·<code·class="inline">Variable</code>·is·the·symbolic·name·of·a·scalar5033 get-operation·to·retrieve·the·value.</p><p><code·class="inline">Varbinds</code>·is·a·list·of·<code·class="inline">Varbind</code>,·where·each·<code·class="inline">Varbind</code>·is·one·of:</p><ul><li><code·class="inline">{Variable,·Value}</code>,·where·<code·class="inline">Variable</code>·is·the·symbolic·name·of·a·scalar
5034 variable·referred·to·in·the·notification·specification.</li><li><code·class="inline">{Column,·RowIndex,·Value}</code>,·where·<code·class="inline">Column</code>·is·the·symbolic·name·of·a·column5034 variable·referred·to·in·the·notification·specification.</li><li><code·class="inline">{Column,·RowIndex,·Value}</code>,·where·<code·class="inline">Column</code>·is·the·symbolic·name·of·a·column
5.49 KB
./usr/share/doc/erlang-doc/html/lib/snmp-5.16/doc/html/snmpm.html
    
Offset 2004, 16 lines modifiedOffset 2004, 16 lines modified
2004 ······<div·class="specs">2004 ······<div·class="specs">
  
2005 ··········<pre·translate="no"><span·class="attribute">-spec</span>·load_mib(MibName)·->·ok·|·{error,·Reason}·when·MibName·::·<a·href="snmp.html#t:mib_name/0">snmp:mib_name</a>(),·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>2005 ··········<pre·translate="no"><span·class="attribute">-spec</span>·load_mib(MibName)·->·ok·|·{error,·Reason}·when·MibName·::·<a·href="snmp.html#t:mib_name/0">snmp:mib_name</a>(),·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
2006 ······</div>2006 ······</div>
  
2007 <p>Load·a·<code·class="inline">Mib</code>·into·the·manager.·The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,·including2007 <p>Load·a·<code·class="inline">Mib</code>·into·the·manager.·The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,·including
2008 the·path·to·where·the·compiled·mib·is·found.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="0268943265-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="0268943265-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">2008 the·path·to·where·the·compiled·mib·is·found.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="4035339506-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="4035339506-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">
2009 ··········</span><span·class="nc">snmpm</span><span·class="p">:</span><span·class="nf">load_mib</span><span·class="p"·data-group-id="0268943265-2">(</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p"·data-group-id="0268943265-2">)</span><span·class="p">.</span></code></pre>2009 ··········</span><span·class="nc">snmpm</span><span·class="p">:</span><span·class="nf">load_mib</span><span·class="p"·data-group-id="4035339506-2">(</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p"·data-group-id="4035339506-2">)</span><span·class="p">.</span></code></pre>
2010 ··</section>2010 ··</section>
2011 </section>2011 </section>
2012 <section·class="detail"·id="log_to_io/1">2012 <section·class="detail"·id="log_to_io/1">
  
2013 ··<div·class="detail-header">2013 ··<div·class="detail-header">
2014 ····<a·href="#log_to_io/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2014 ····<a·href="#log_to_io/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2015 ······<i·class="ri-link-m"·aria-hidden="true"></i>2015 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 3584, 16 lines modifiedOffset 3584, 16 lines modified
3584 ······<div·class="specs">3584 ······<div·class="specs">
  
3585 ··········<pre·translate="no"><span·class="attribute">-spec</span>·unload_mib(MibName)·->·ok·|·{error,·Reason}·when·MibName·::·<a·href="snmp.html#t:mib_name/0">snmp:mib_name</a>(),·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>3585 ··········<pre·translate="no"><span·class="attribute">-spec</span>·unload_mib(MibName)·->·ok·|·{error,·Reason}·when·MibName·::·<a·href="snmp.html#t:mib_name/0">snmp:mib_name</a>(),·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
3586 ······</div>3586 ······</div>
  
3587 <p>Unload·a·<code·class="inline">Mib</code>·from·the·manager.·The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,·including3587 <p>Unload·a·<code·class="inline">Mib</code>·from·the·manager.·The·<code·class="inline">MibName</code>·is·the·name·of·the·Mib,·including
3588 the·path·to·where·the·compiled·mib·is·found.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="3858109132-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="3858109132-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">3588 the·path·to·where·the·compiled·mib·is·found.·For·example,</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··········</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">priv_dir</span><span·class="p"·data-group-id="7744618176-1">(</span><span·class="ss">my_app</span><span·class="p"·data-group-id="7744618176-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;/mibs/&quot;</span><span·class="p">,</span><span·class="w">
3589 ··········</span><span·class="nc">snmpm</span><span·class="p">:</span><span·class="nf">unload_mib</span><span·class="p"·data-group-id="3858109132-2">(</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p"·data-group-id="3858109132-2">)</span><span·class="p">.</span></code></pre>3589 ··········</span><span·class="nc">snmpm</span><span·class="p">:</span><span·class="nf">unload_mib</span><span·class="p"·data-group-id="7744618176-2">(</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;MY-MIB&quot;</span><span·class="p"·data-group-id="7744618176-2">)</span><span·class="p">.</span></code></pre>
3590 ··</section>3590 ··</section>
3591 </section>3591 </section>
3592 <section·class="detail"·id="unregister_agent/2">3592 <section·class="detail"·id="unregister_agent/2">
  
3593 ··<div·class="detail-header">3593 ··<div·class="detail-header">
3594 ····<a·href="#unregister_agent/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">3594 ····<a·href="#unregister_agent/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
3595 ······<i·class="ri-link-m"·aria-hidden="true"></i>3595 ······<i·class="ri-link-m"·aria-hidden="true"></i>
617 B
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/.build
    
Offset 18, 15 lines modifiedOffset 18, 15 lines modified
18 dist/lato-latin-300-normal-YUMVEFOL.woff218 dist/lato-latin-300-normal-YUMVEFOL.woff2
19 dist/lato-latin-400-normal-W7754I4D.woff219 dist/lato-latin-400-normal-W7754I4D.woff2
20 dist/lato-latin-700-normal-2XVSBPG4.woff220 dist/lato-latin-700-normal-2XVSBPG4.woff2
21 dist/lato-latin-ext-300-normal-VPGGJKJL.woff221 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
22 dist/lato-latin-ext-400-normal-N27NCBWW.woff222 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
23 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff223 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
24 dist/remixicon-NKANDIL5.woff224 dist/remixicon-NKANDIL5.woff2
25 dist/search_data-8ECD707F.js25 dist/search_data-86E587B3.js
26 dist/sidebar_items-BA6ACF7A.js26 dist/sidebar_items-BA6ACF7A.js
27 hardening.html27 hardening.html
28 index.html28 index.html
29 introduction.html29 introduction.html
30 notes.html30 notes.html
31 search.html31 search.html
32 ssh.html32 ssh.html
61.3 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/configurations.html
    
Offset 138, 31 lines modifiedOffset 138, 31 lines modified
138 the·<a·href="configure_algos.html">Configuring·algorithms·in·SSH</a>·chapter.</p><h2·id="options-configuration"·class="section-heading">138 the·<a·href="configure_algos.html">Configuring·algorithms·in·SSH</a>·chapter.</p><h2·id="options-configuration"·class="section-heading">
139 ··<a·href="#options-configuration"·class="hover-link">139 ··<a·href="#options-configuration"·class="hover-link">
140 ····<i·class="ri-link-m"·aria-hidden="true"></i>140 ····<i·class="ri-link-m"·aria-hidden="true"></i>
141 ··</a>141 ··</a>
142 ··<span·class="text">Options·configuration</span>142 ··<span·class="text">Options·configuration</span>
143 </h2>143 </h2>
144 <p>There·are·from·OTP-23.0·two·main·ways·to·set·an·option:</p><ul><li><p>Like·before,·in·the·<code·class="inline">Options</code>·parameter·in·the·Erlang·code·in·a·call·to·for144 <p>There·are·from·OTP-23.0·two·main·ways·to·set·an·option:</p><ul><li><p>Like·before,·in·the·<code·class="inline">Options</code>·parameter·in·the·Erlang·code·in·a·call·to·for
145 example·<a·href="ssh.html#daemon/3"><code·class="inline">ssh:daemon/3</code></a>·or·<a·href="ssh.html#connect/3"><code·class="inline">ssh:connect/3</code></a>·or·any·of·their·variants.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="4131251137-1">(</span><span·class="mi">22</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4131251137-2">[</span><span·class="p"·data-group-id="4131251137-3">{</span><span·class="ss">user</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·625,·SHA:·efedaaae090d1d53d539902ffcac5461077a87f10fa794ea5618ce45e67b0d82·...·]-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">145 example·<a·href="ssh.html#daemon/3"><code·class="inline">ssh:daemon/3</code></a>·or·<a·href="ssh.html#connect/3"><code·class="inline">ssh:connect/3</code></a>·or·any·of·their·variants.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="7703486221-1">(</span><span·class="mi">22</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7703486221-2">[</span><span·class="p"·data-group-id="7703486221-3">{</span><span·class="ss">user</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·625,·SHA:·b7336cc92e4b79e9a649cbcf1c91207631eb7477d2c49d639b9c50244aed2265·...·]-1">{</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">
146 ·</span><span·class="p"·data-group-id="1205112420-2">[</span><span·class="p"·data-group-id="1205112420-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SSH-2·for·Erlang/OTP&quot;</span><span·class="p"·data-group-id="1205112420-3">}</span><span·class="p">,</span><span·class="w">146 ·</span><span·class="p"·data-group-id="4314877796-2">[</span><span·class="p"·data-group-id="4314877796-3">{</span><span·class="ss">description</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;SSH-2·for·Erlang/OTP&quot;</span><span·class="p"·data-group-id="4314877796-3">}</span><span·class="p">,</span><span·class="w">
147 ··</span><span·class="p"·data-group-id="1205112420-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.9&quot;</span><span·class="p"·data-group-id="1205112420-4">}</span><span·class="p">,</span><span·class="w">147 ··</span><span·class="p"·data-group-id="4314877796-4">{</span><span·class="ss">vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.9&quot;</span><span·class="p"·data-group-id="4314877796-4">}</span><span·class="p">,</span><span·class="w">
148 ··</span><span·class="p"·data-group-id="1205112420-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1205112420-6">[</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">148 ··</span><span·class="p"·data-group-id="4314877796-5">{</span><span·class="ss">modules</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4314877796-6">[</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">
149 ········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">149 ········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
150 ·········</span><span·class="ss">ssh_xfer</span><span·class="p"·data-group-id="1205112420-6">]</span><span·class="p"·data-group-id="1205112420-5">}</span><span·class="p">,</span><span·class="w">150 ·········</span><span·class="ss">ssh_xfer</span><span·class="p"·data-group-id="4314877796-6">]</span><span·class="p"·data-group-id="4314877796-5">}</span><span·class="p">,</span><span·class="w">
151 ··</span><span·class="p"·data-group-id="1205112420-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1205112420-8">[</span><span·class="p"·data-group-id="1205112420-8">]</span><span·class="p"·data-group-id="1205112420-7">}</span><span·class="p">,</span><span·class="w">151 ··</span><span·class="p"·data-group-id="4314877796-7">{</span><span·class="ss">registered</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4314877796-8">[</span><span·class="p"·data-group-id="4314877796-8">]</span><span·class="p"·data-group-id="4314877796-7">}</span><span·class="p">,</span><span·class="w">
152 ··</span><span·class="p"·data-group-id="1205112420-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1205112420-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·267,·SHA:·8816b79e03609a2e8322b07e977c46464eb7c19bccf5c52c070330df1b439b22·...·]-9">}</span><span·class="p">,</span><span·class="w">152 ··</span><span·class="p"·data-group-id="4314877796-9">{</span><span·class="ss">applications</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4314877796-10">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">s[·...·truncated·by·diffoscope;·len:·267,·SHA:·27301869f0bfdc7caa1bf84d8125c52b514547ea7798ee14eea34f190b29b4aa·...·]-9">}</span><span·class="p">,</span><span·class="w">
153 ··</span><span·class="p"·data-group-id="1205112420-11">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1205112420-12">[</span><span·class="p"·data-group-id="1205112420-13">{</span><span·class="ss">user</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·129,·SHA:·0884a63297fd71e2c1369f5448f3068c9a847ef38e8a99d6580094d7c0acadea·...·]-13">}</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;·HERE</span><span·class="w">153 ··</span><span·class="p"·data-group-id="4314877796-11">{</span><span·class="ss">env</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4314877796-12">[</span><span·class="p"·data-group-id="4314877796-13">{</span><span·class="ss">user</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·129,·SHA:·4012a1aca772cf847ced3c6904a84e0cd3335e5e03c50e81479bb99987db3437·...·]-13">}</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;·HERE</span><span·class="w">
154 ··</span><span·class="p"·data-group-id="1205112420-14">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1205112420-15">{</span><span·class="ss">ssh_app</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·178,·SHA:·ec931cff3c6c8e7d83e91bcea3976e9a29d517167b0860e5c8f787964eced457·...·]-14">}</span><span·class="p">,</span><span·class="w">154 ··</span><span·class="p"·data-group-id="4314877796-14">{</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4314877796-15">{</span><span·class="ss">ssh_app</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·178,·SHA:·afe0452532e8b6e3704cb135b79b49332387cf3975bdeac0473cf033f1ca8c7c·...·]-14">}</span><span·class="p">,</span><span·class="w">
155 ·······</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre></li><li><p>In·a·.config·file:</p><pre><code·class="text">erl·-config·ex1</code></pre><p>where·<code·class="inline">ex1.config</code>·contains:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5525612958-1">[</span><span·class="w">155 ·······</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre></li><li><p>In·a·.config·file:</p><pre><code·class="text">erl·-config·ex1</code></pre><p>where·<code·class="inline">ex1.config</code>·contains:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9072579938-1">[</span><span·class="w">
156 </span><span·class="p"·data-group-id="5525612958-2">{</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5525612958-3">[</span><span·class="p"·data-group-id="5525612958-4">{</span><span·class="ss">user</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·207,·SHA:·ed4ffe1d31d8352c199b4dcae53bf77ba29456f15f3aa109b62a23eef2f95cda·...·]8-2">}</span><span·class="w">156 </span><span·class="p"·data-group-id="9072579938-2">{</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9072579938-3">[</span><span·class="p"·data-group-id="9072579938-4">{</span><span·class="ss">user</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·207,·SHA:·ae86e8819f6aa8ac1214861b75796a08aacb193f4ef891c40c4e798f170ceb0b·...·]8-2">}</span><span·class="w">
157 </span><span·class="p"·data-group-id="5525612958-1">]</span><span·class="p">.</span></code></pre></li></ul><p>If·the·option·is·intended·only·for·a·server·or·for·a·client,·it·may·be·set·in157 </span><span·class="p"·data-group-id="9072579938-1">]</span><span·class="p">.</span></code></pre></li></ul><p>If·the·option·is·intended·only·for·a·server·or·for·a·client,·it·may·be·set·in
158 this·way:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1137064920-1">[</span><span·class="w">158 this·way:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7097159338-1">[</span><span·class="w">
159 </span><span·class="p"·data-group-id="1137064920-2">{</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1137064920-3">[</span><span·class="p"·data-group-id="1137064920-4">{</span><span·class="ss">server_options</span><span·class="p">,</span><span·class="p"·data-group-id="1137064920-5">[</span><span·class="p"·data-group-id="1137064920-6">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="1137064920-6">}</span><span·class="p"·data-group-id="1137064920-5">]</span><span·class="p"·data-group-id="1137064920-4">}</span><span·class="p">,</span><span·class="w"> 
160 ·······</span><span·class="p"·data-group-id="1137064920-7">{</span><span·class="ss">client_options</span><span·class="p">,</span><span·class="p"·data-group-id="1137064920-8">[</span><span·class="p"·data-group-id="1137064920-9">{</span><span·class="ss">user[·...·truncated·by·diffoscope;·len:·245,·SHA:·4f6b970494fc4ed511521e68964965880e779cc6f350302e753e1d2bb4d87577·...·]</span><span·class="w">159 </span><span·class="p"·data-group-id="7097159338-2">{</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7097159338-3">[</span><span·class="p"·data-group-id="7097159338-4">{</span><span·class="ss[·...·truncated·by·diffoscope;·len:·443,·SHA:·55ef07b70eaab04fe84af87aa1a2de447124644de1baa86b03db489d627e21e6·...·]</span><span·class="w">
 160 ·······</span><span·class="p"·data-group-id="7097159338-7">{</span><span·class="ss">client_options</span><span·class="p">,</span><span·class="p"·data-group-id="7097159338-8">[</span><span·class="p"·data-group-id="7097159338-9">{</span><span·class="ss">user</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;bar&quot;</span><span·class="p"·data-group-id="7097159338-9">}</span><span·class="p"·data-group-id="7097159338-8">]</span><span·class="p"·data-group-id="7097159338-7">}</span><span·class="w">
161 </span><span·class="p"·data-group-id="1137064920-3">]</span><span·class="p">.</span></code></pre><p>A·server·(daemon)·will·use·the·user·name·<code·class="inline">foo</code>,·and·a·client·will·use·the·name161 </span><span·class="p"·data-group-id="7097159338-3">]</span><span·class="p">.</span></code></pre><p>A·server·(daemon)·will·use·the·user·name·<code·class="inline">foo</code>,·and·a·client·will·use·the·name
162 <code·class="inline">bar</code>.</p></li></ul><h2·id="precedence"·class="section-heading">162 <code·class="inline">bar</code>.</p></li></ul><h2·id="precedence"·class="section-heading">
163 ··<a·href="#precedence"·class="hover-link">163 ··<a·href="#precedence"·class="hover-link">
164 ····<i·class="ri-link-m"·aria-hidden="true"></i>164 ····<i·class="ri-link-m"·aria-hidden="true"></i>
165 ··</a>165 ··</a>
166 ··<span·class="text">Precedence</span>166 ··<span·class="text">Precedence</span>
167 </h2>167 </h2>
168 <p>If·an·option·is·set·in·more·than·one·way,·what·happens?</p><p>There·is·an·ordering,·which·is:</p><ul><li>Level·0:·Hard-coded·default·values·in·the·OTP·SSH·source·code</li><li>Level·1:·<a·href="../../../../lib/kernel-10.0.1/doc/html/config.html">OTP·Configuration·Parameters</a></li><li>Level·2:·Options·in·the·<a·href="../../../../lib/kernel-10.0.1/doc/html/config.html">OTP·Configuration·Parameters</a>168 <p>If·an·option·is·set·in·more·than·one·way,·what·happens?</p><p>There·is·an·ordering,·which·is:</p><ul><li>Level·0:·Hard-coded·default·values·in·the·OTP·SSH·source·code</li><li>Level·1:·<a·href="../../../../lib/kernel-10.0.1/doc/html/config.html">OTP·Configuration·Parameters</a></li><li>Level·2:·Options·in·the·<a·href="../../../../lib/kernel-10.0.1/doc/html/config.html">OTP·Configuration·Parameters</a>
Offset 225, 96 lines modifiedOffset 225, 96 lines modified
225 ··························'aes192-cbc','aes128-cbc','3des-cbc']}]},225 ··························'aes192-cbc','aes128-cbc','3des-cbc']}]},
226 ·{mac,[{client2server,['hmac-sha2-256','hmac-sha2-512',226 ·{mac,[{client2server,['hmac-sha2-256','hmac-sha2-512',
227 ·······················'hmac-sha1']},227 ·······················'hmac-sha1']},
228 ·······{server2client,['hmac-sha2-256','hmac-sha2-512',228 ·······{server2client,['hmac-sha2-256','hmac-sha2-512',
229 ·······················'hmac-sha1']}]},229 ·······················'hmac-sha1']}]},
230 ·{compression,[{client2server,[none,'zlib@openssh.com',zlib]},230 ·{compression,[{client2server,[none,'zlib@openssh.com',zlib]},
231 ···············{server2client,[none,'zlib@openssh.com',zlib]}]}]</code></pre><p>Note·that·the·algorithms·in·the·file·<code·class="inline">ex2.config</code>·is·not·yet·applied.·They·will231 ···············{server2client,[none,'zlib@openssh.com',zlib]}]}]</code></pre><p>Note·that·the·algorithms·in·the·file·<code·class="inline">ex2.config</code>·is·not·yet·applied.·They·will
232 be·when·we·start·ssh:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5797772215-1">(</span><span·class="p"·data-group-id="5797772215-1">)</span><span·class="p">.</span><span·class="w">232 be·when·we·start·ssh:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4145821651-1">(</span><span·class="p"·data-group-id="4145821651-1">)</span><span·class="p">.</span><span·class="w">
233 </span><span·class="ss">ok</span><span·class="gp·unselectable">233 </span><span·class="ss">ok</span><span·class="gp·unselectable">
234 3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">default_algorithms</span><span·class="p"·data-group-id="5797772215-2">(</span><span·class="p"·data-group-id="5797772215-2">)</span><span·class="p">.</span><span·class="w">234 3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">default_algorithms</span><span·class="p"·data-group-id="4145821651-2">(</span><span·class="p"·data-group-id="4145821651-2">)</span><span·class="p">.</span><span·class="w">
235 </span><span·class="p"·data-group-id="5797772215-3">[</span><span·class="p"·data-group-id="5797772215-4">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-5">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·69,·SHA:·d6c2aa7615d1139b164fc5a9607fe4c6f999c566da231a441b0e8a062147f21a·...·]-4">}</span><span·class="p">,</span><span·class="w">235 </span><span·class="p"·data-group-id="4145821651-3">[</span><span·class="p"·data-group-id="4145821651-4">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-5">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·69,·SHA:·971504b26a79651bd89bd76a12629eb894ab97981847841a24907d78f8318292·...·]-4">}</span><span·class="p">,</span><span·class="w">
236 ·</span><span·class="p"·data-group-id="5797772215-6">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-7">[</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p"·data-group-id="5797772215-7">]</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·f508d617b8f916f6833beacc3f70bf6dc81424335a8f80b5554aa894b1e8588c·...·]-6">}</span><span·class="p">,</span><span·class="w">236 ·</span><span·class="p"·data-group-id="4145821651-6">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-7">[</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p"·data-group-id="4145821651-7">]</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·86ff4847d6926436349e526c8bfc1fd8430e8d40d7462d19bda2932a28bec419·...·]-6">}</span><span·class="p">,</span><span·class="w">
237 ·</span><span·class="p"·data-group-id="5797772215-8">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-9">[</span><span·class="p"·data-group-id="5797772215-10">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·181,·SHA:·bd4e02afd7594153b97b04c86b02c616bfceef083073fbd66a78fc63d0b3eeff·...·]-10">}</span><span·class="p">,</span><span·class="w">237 ·</span><span·class="p"·data-group-id="4145821651-8">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-9">[</span><span·class="p"·data-group-id="4145821651-10">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class=[·...·truncated·by·diffoscope;·len:·181,·SHA:·e8fc1f7daf47e4cb618b6267f1f3c83309580ac44de4dfa2fa68bf12d7f28fd6·...·]-10">}</span><span·class="p">,</span><span·class="w">
238 ··········</span><span·class="p"·data-group-id="5797772215-12">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-13">[</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p"·data-group-id="5797772215-13">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·128,·SHA:·b9cea9c400739e75d2cf05cb5372cf4f64f75337ea9377c1edd2659a1019090c·...·]-8">}</span><span·class="p">,</span><span·class="w">238 ··········</span><span·class="p"·data-group-id="4145821651-12">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-13">[</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p"·data-group-id="4145821651-13">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·128,·SHA:·7ef477e9063697a62ca81a31273e937603a44b29115a83802b46cb5e1b0c2449·...·]-8">}</span><span·class="p">,</span><span·class="w">
239 ·</span><span·class="p"·data-group-id="5797772215-14">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-15">[</span><span·class="p"·data-group-id="5797772215-16">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·1e7897d505abae3963c8bbeefa0981118c275f64c3abb794258601bbe7eea80f·...·]-16">}</span><span·class="p">,</span><span·class="w">239 ·</span><span·class="p"·data-group-id="4145821651-14">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-15">[</span><span·class="p"·data-group-id="4145821651-16">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·179,·SHA:·051c78d3a85b6b27301f288e6892cb5ffa4d4c6541dcd89acc6b5253bcd9430c·...·]-16">}</span><span·class="p">,</span><span·class="w">
240 ·······</span><span·class="p"·data-group-id="5797772215-18">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-19">[</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="5797772215-19">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·128,·SHA:·047c2cfb0d40819d33a2c11a6acc530bb17ec65af8d82c3ff3a1a0325c064f33·...·]-14">}</span><span·class="p">,</span><span·class="w">240 ·······</span><span·class="p"·data-group-id="4145821651-18">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-19">[</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="4145821651-19">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·128,·SHA:·c70142ed0821c24aa1a325e35b23ff6809a5730de4dde2871b5e3f0824a4a9f6·...·]-14">}</span><span·class="p">,</span><span·class="w">
241 ·</span><span·class="p"·data-group-id="5797772215-20">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-21">[</span><span·class="p"·data-group-id="5797772215-22">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·466a231bd04f07cab9ce8205a40741aa9757e147b75e45e3facd21befebf3b9c·...·]-22">}</span><span·class="p">,</span><span·class="w">241 ·</span><span·class="p"·data-group-id="4145821651-20">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-21">[</span><span·class="p"·data-group-id="4145821651-22">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·ae7b3af13654e5e852d14b750c98f7e130663518365d1343033cfa0157dd4635·...·]-22">}</span><span·class="p">,</span><span·class="w">
242 ···············</span><span·class="p"·data-group-id="5797772215-24">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5797772215-25">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·0119c1160d10430991b244f728f10fd30c4bb93342ad6069c231378d71fcd2e8·...·]-3">]</span><span·class="w">242 ···············</span><span·class="p"·data-group-id="4145821651-24">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="4145821651-25">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·3faef99f3825fb84746b023fee3935e89de0cab6aaa8d7464805ef0af7d834e2·...·]-3">]</span><span·class="w">
243 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><p>We·see·that·the·algorithm·set·is·changed·to·the·one·in·the·<code·class="inline">ex2.config</code>.·Since243 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><p>We·see·that·the·algorithm·set·is·changed·to·the·one·in·the·<code·class="inline">ex2.config</code>.·Since
244 <code·class="inline">compression</code>·is·not·specified·in·the·file,·the·hard-coded·default·is·still·used244 <code·class="inline">compression</code>·is·not·specified·in·the·file,·the·hard-coded·default·is·still·used
245 for·that·entry.</p><h4>Establishing·a·connection·(ssh:connect·et·al)·or·starting·a·daemon·(ssh:daemon)</h4><p>Both·when·the·client·establishes·a·connection·with·ssh:connect·or·other245 for·that·entry.</p><h4>Establishing·a·connection·(ssh:connect·et·al)·or·starting·a·daemon·(ssh:daemon)</h4><p>Both·when·the·client·establishes·a·connection·with·ssh:connect·or·other
246 functions,·or·a·daemon·is·started·with·ssh:daemon,·the·option·lists·in·the246 functions,·or·a·daemon·is·started·with·ssh:daemon,·the·option·lists·in·the
247 function·calls·are·also·used.</p><p>If·a·client·is·started·(ssh:connect·et·al),·the·environment·variable247 function·calls·are·also·used.</p><p>If·a·client·is·started·(ssh:connect·et·al),·the·environment·variable
248 <code·class="inline">client_options</code>·is·used.·Similarly·for·a·daemon·the·<code·class="inline">server_options</code>·variable248 <code·class="inline">client_options</code>·is·used.·Similarly·for·a·daemon·the·<code·class="inline">server_options</code>·variable
249 is·handled.</p><p>If·any·<a·href="ssh.html#t:preferred_algorithms_common_option/0">preferred_algorithms</a>·is249 is·handled.</p><p>If·any·<a·href="ssh.html#t:preferred_algorithms_common_option/0">preferred_algorithms</a>·is
250 present,·the·one·with·the·highest·level·is·used,·that·is,·the·<code·class="inline">Option</code>·list250 present,·the·one·with·the·highest·level·is·used,·that·is,·the·<code·class="inline">Option</code>·list
251 parameter·has·the·highest·priority.·Then·the251 parameter·has·the·highest·priority.·Then·the
252 <a·href="ssh.html#t:modify_algorithms_common_option/0">modify_algorithms</a>·on·all·levels·in252 <a·href="ssh.html#t:modify_algorithms_common_option/0">modify_algorithms</a>·on·all·levels·in
253 order·starting·with·level·0·are·applied.</p><p>We·continue·the·example·above·by·connecting·to·a·server·and·modifying·the·<code·class="inline">kex</code>253 order·starting·with·level·0·are·applied.</p><p>We·continue·the·example·above·by·connecting·to·a·server·and·modifying·the·<code·class="inline">kex</code>
254 algorithm·set.·We·remove·the·only·one·(<code·class="inline">'ecdh-sha2-nistp384'</code>)·and·add254 algorithm·set.·We·remove·the·only·one·(<code·class="inline">'ecdh-sha2-nistp384'</code>)·and·add
255 <code·class="inline">'curve25519-sha256@libssh.org'</code>·by·appending·it·to·the·now·empty·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="p"·data-group-id="5862471831-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="5862471831-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh</span><span·cl[·...·truncated·by·diffoscope;·len:·88,·SHA:·1c049e5cd939cc2fdcddd514de109f19b0a2846be8a239332e58633197c6f8f1·...·]-2">(</span><span·class="ss">loopback</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">22</span><span·class="p">,</span><span·class="w">255 <code·class="inline">'curve25519-sha256@libssh.org'</code>·by·appending·it·to·the·now·empty·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="p"·data-group-id="2424987149-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="2424987149-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh</span><span·cl[·...·truncated·by·diffoscope;·len:·88,·SHA:·673cd43617f0cf3160556eb67f3861336a3734948708020bca9ae59669444ef3·...·]-2">(</span><span·class="ss">loopback</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">22</span><span·class="p">,</span><span·class="w">
256 ························</span><span·class="p"·data-group-id="5862471831-3">[</span><span·class="p"·data-group-id="5862471831-4">{</span><span·class="ss">modify_algorithms</span><span·class="p">,</span><span·class="w">256 ························</span><span·class="p"·data-group-id="2424987149-3">[</span><span·class="p"·data-group-id="2424987149-4">{</span><span·class="ss">modify_algorithms</span><span·class="p">,</span><span·class="w">
257 ·································</span><span·class="p"·data-group-id="5862471831-5">[</span><span·class="p"·data-group-id="5862471831-6">{</span><span·class="ss">rm</span><span·class="p">,</span><span·class="w">257 ·································</span><span·class="p"·data-group-id="2424987149-5">[</span><span·class="p"·data-group-id="2424987149-6">{</span><span·class="ss">rm</span><span·class="p">,</span><span·class="w">
258 ·····································</span><span·class="p"·data-group-id="5862471831-7">[</span><span·class="w">·</span><span·class="p"·data-group-id="5862471831-8">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="5862471831-9">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><[·...·truncated·by·diffoscope;·len:·170,·SHA:·4769ee31c5fff8b6990fba4299fa9bdfbab05b8e6321f24ade4d48918b9c69b1·...·]-7">]</span><span·class="w">258 ·····································</span><span·class="p"·data-group-id="2424987149-7">[</span><span·class="w">·</span><span·class="p"·data-group-id="2424987149-8">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="2424987149-9">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><[·...·truncated·by·diffoscope;·len:·170,·SHA:·4b2f8da17b98afe1d71e84c96e0983f33899fc1c12f69258cbfb87f4aafb0002·...·]-7">]</span><span·class="w">
259 »       »       »       »       ··</span><span·class="p"·data-group-id="5862471831-6">}</span><span·class="p">,</span><span·class="w">259 »       »       »       »       ··</span><span·class="p"·data-group-id="2424987149-6">}</span><span·class="p">,</span><span·class="w">
260 ··································</span><span·class="p"·data-group-id="5862471831-10">{</span><span·class="ss">append</span><span·class="p">,</span><span·class="w">260 ··································</span><span·class="p"·data-group-id="2424987149-10">{</span><span·class="ss">append</span><span·class="p">,</span><span·class="w">
261 »       »       »       ·············</span><span·class="p"·data-group-id="5862471831-11">[</span><span·class="w">·</span><span·class="p"·data-group-id="5862471831-12">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="5862471831-13">[</span><span·class="ss">&#39;curve25519-sha256@libssh.org[·...·truncated·by·diffoscope;·len:·185,·SHA:·3f8b6cf98789f2362d8cf54b365f4bc1a51b7d53a530e585148068b0b3d356de·...·]-11">]</span><span·class="w">261 »       »       »       ·············</span><span·class="p"·data-group-id="2424987149-11">[</span><span·class="w">·</span><span·class="p"·data-group-id="2424987149-12">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="2424987149-13">[</span><span·class="ss">&#39;curve25519-sha256@libssh.org[·...·truncated·by·diffoscope;·len:·185,·SHA:·26f5946fc7a64f65c879e24e215fb98a1bfa0d19eb036651c6fc1aa28977ed11·...·]-11">]</span><span·class="w">
262 »       »       »       »       ··</span><span·class="p"·data-group-id="5862471831-10">}</span><span·class="w">262 »       »       »       »       ··</span><span·class="p"·data-group-id="2424987149-10">}</span><span·class="w">
263 »       »       »       »       ·</span><span·class="p"·data-group-id="5862471831-5">]</span><span·class="w">263 »       »       »       »       ·</span><span·class="p"·data-group-id="2424987149-5">]</span><span·class="w">
264 »       ·················</span><span·class="p"·data-group-id="5862471831-4">}</span><span·class="w">264 »       ·················</span><span·class="p"·data-group-id="2424987149-4">}</span><span·class="w">
265 ························</span><span·class="p"·data-group-id="5862471831-3">]</span><span·class="p"·data-group-id="5862471831-2">)</span><span·class="p">.</span><span·class="w">265 ························</span><span·class="p"·data-group-id="2424987149-3">]</span><span·class="p"·data-group-id="2424987149-2">)</span><span·class="p">.</span><span·class="w">
266 </span><span·class="p"·data-group-id="5862471831-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&gt;</span><span·class="mf">0.118</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5862471831-14">}</span></code></pre><p>We·check·which·algorithms·are·negotiated·by·the·client·and·the·server,·and·note266 </span><span·class="p"·data-group-id="2424987149-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&gt;</span><span·class="mf">0.118</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2424987149-14">}</span></code></pre><p>We·check·which·algorithms·are·negotiated·by·the·client·and·the·server,·and·note
267 that·the·(only)·<code·class="inline">kex</code>·algorithm·<code·class="inline">'curve25519-sha256@libssh.org'</code>·was·selected:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connection_info</span><span·class="p"·data-group-id="6101498124-1">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">algorithms</span><span·class="p"·data-group-id="6101498124-1">)</span><span·class="p">.</span><span·class="w">267 that·the·(only)·<code·class="inline">kex</code>·algorithm·<code·class="inline">'curve25519-sha256@libssh.org'</code>·was·selected:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connection_info</span><span·class="p"·data-group-id="6084719845-1">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">algorithms</span><span·class="p"·data-group-id="6084719845-1">)</span><span·class="p">.</span><span·class="w">
268 </span><span·class="p"·data-group-id="6101498124-2">{</span><span·class="ss">algorithms</span><span·class="p">,</span><span·class="p"·data-group-id="6101498124-3">[</span><span·class="p"·data-group-id="6101498124-4">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="ss">&#3[·...·truncated·by·diffoscope;·len:·83,·SHA:·fe789f22d24f758f9a1b7a1d79d0ab7cb3e194e6dbb37fddb6973e6cd398bae1·...·]-4">}</span><span·class="p">,</span><span·class="w">268 </span><span·class="p"·data-group-id="6084719845-2">{</span><span·class="ss">algorithms</span><span·class="p">,</span><span·class="p"·data-group-id="6084719845-3">[</span><span·class="p"·data-group-id="6084719845-4">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="ss">&#3[·...·truncated·by·diffoscope;·len:·83,·SHA:·79a8b79475bba9223fc0f8a0b585b0725f1e01e9af5622ae3455f4fb02ee3d9f·...·]-4">}</span><span·class="p">,</span><span·class="w">
269 ·············</span><span·class="p"·data-group-id="6101498124-5">{</span><span·class="ss">hkey</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p"·data-group-id="6101498124-5">}</span><span·class="p">,</span><span·class="w">269 ·············</span><span·class="p"·data-group-id="6084719845-5">{</span><span·class="ss">hkey</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p"·data-group-id="6084719845-5">}</span><span·class="p">,</span><span·class="w">
270 ·············</span><span·class="p"·data-group-id="6101498124-6">{</span><span·class="ss">send_mac</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="6101498124-6">}</span><span·class="p">,</span><span·class="w">270 ·············</span><span·class="p"·data-group-id="6084719845-6">{</span><span·class="ss">send_mac</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="6084719845-6">}</span><span·class="p">,</span><span·class="w">
271 ·············</span><span·class="p"·data-group-id="6101498124-7">{</span><span·class="ss">recv_mac</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="6101498124-7">}</span><span·class="p">,</span><span·class="w">271 ·············</span><span·class="p"·data-group-id="6084719845-7">{</span><span·class="ss">recv_mac</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="6084719845-7">}</span><span·class="p">,</span><span·class="w">
272 ·············</span><span·class="p"·data-group-id="6101498124-8">{</span><span·class="ss">encrypt</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p"·data-group-id="6101498124-8">}</span><span·class="p">,</span><span·class="w">272 ·············</span><span·class="p"·data-group-id="6084719845-8">{</span><span·class="ss">encrypt</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p"·data-group-id="6084719845-8">}</span><span·class="p">,</span><span·class="w">
273 ·············</span><span·class="p"·data-group-id="6101498124-9">{</span><span·class="ss">decrypt</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p"·data-group-id="6101498124-9">}</span><span·class="p">,</span><span·class="w">273 ·············</span><span·class="p"·data-group-id="6084719845-9">{</span><span·class="ss">decrypt</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p"·data-group-id="6084719845-9">}</span><span·class="p">,</span><span·class="w">
274 ·············</span><span·class="p"·data-group-id="6101498124-10">{</span><span·class="ss">compress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="6101498124-10">}</span><span·class="p">,</span><span·class="w">274 ·············</span><span·class="p"·data-group-id="6084719845-10">{</span><span·class="ss">compress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="6084719845-10">}</span><span·class="p">,</span><span·class="w">
275 ·············</span><span·class="p"·data-group-id="6101498124-11">{</span><span·class="ss">decompress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="6101498124-11">}</span><span·class="p">,</span><span·class="w">275 ·············</span><span·class="p"·data-group-id="6084719845-11">{</span><span·class="ss">decompress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="6084719845-11">}</span><span·class="p">,</span><span·class="w">
276 ·············</span><span·class="p"·data-group-id="6101498124-12">{</span><span·class="ss">send_ext_info</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="6101498124-12">}</span><span·class="p">,</span><span·class="w">276 ·············</span><span·class="p"·data-group-id="6084719845-12">{</span><span·class="ss">send_ext_info</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="6084719845-12">}</span><span·class="p">,</span><span·class="w">
277 ·············</span><span·class="p"·data-group-id="6101498124-13">{</span><span·class="ss">recv_ext_info</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6101498124-13">}</span><span·class="p"·data-group-id="6101498124-3">]</span><span·class="p"·data-group-id="6101498[·...·truncated·by·diffoscope;·len:·3,·SHA:·6affdae3b3c1aa6aa7689e9b6a7b3225a636aa1ac0025f490cca1285ceaf1487·...·]-2">}</span></code></pre><h4>Example·of·modify_algorithms·handling</h4><p>We·will·now·check·if·the277 ·············</span><span·class="p"·data-group-id="6084719845-13">{</span><span·class="ss">recv_ext_info</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="6084719845-13">}</span><span·class="p"·data-group-id="6084719845-3">]</span><span·class="p"·data-group-id="6084719[·...·truncated·by·diffoscope;·len:·3,·SHA:·3d34f102d1708fc5edd3111144f78764b4d7b745cb5450815780545495df1e68·...·]-2">}</span></code></pre><h4>Example·of·modify_algorithms·handling</h4><p>We·will·now·check·if·the
278 <a·href="ssh.html#t:modify_algorithms_common_option/0">modify_algorithms</a>·on·a·lower·level278 <a·href="ssh.html#t:modify_algorithms_common_option/0">modify_algorithms</a>·on·a·lower·level
279 is·applied·to·a279 is·applied·to·a
280 <a·href="ssh.html#t:preferred_algorithms_common_option/0">preferred_algorithms</a>·on·a·higher280 <a·href="ssh.html#t:preferred_algorithms_common_option/0">preferred_algorithms</a>·on·a·higher
281 level.·We·will·do·that·by·enabling·the·<code·class="inline">ssh-dss</code>·algorithm·that·is·supported,281 level.·We·will·do·that·by·enabling·the·<code·class="inline">ssh-dss</code>·algorithm·that·is·supported,
282 but·not·in·the·default·set.</p><p>The·config·file·<code·class="inline">ex3.config</code>·has·the·contents:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2588144929-1">[</span><span·class="w">282 but·not·in·the·default·set.</p><p>The·config·file·<code·class="inline">ex3.config</code>·has·the·contents:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2403405770-1">[</span><span·class="w">
283 ·</span><span·class="p"·data-group-id="2588144929-2">{</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2588144929-3">[</span><span·class="p"·data-group-id="2588144929-4">{</span><span·class="ss">modify_algorithms</span><span·class="p">,</span><span·class="w">283 ·</span><span·class="p"·data-group-id="2403405770-2">{</span><span·class="ss">ssh</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2403405770-3">[</span><span·class="p"·data-group-id="2403405770-4">{</span><span·class="ss">modify_algorithms</span><span·class="p">,</span><span·class="w">
284 ·········</span><span·class="p"·data-group-id="2588144929-5">[</span><span·class="w">·</span><span·class="p"·data-group-id="2588144929-6">{</span><span·class="ss">prepend</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2588144929-7">[</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·480,·SHA:·33d5fb0a3723986002aabb2a8f69aa2d6e0339dafa68877fed3d738e2d4eda08·...·]-5">]</span><span·class="w">284 ·········</span><span·class="p"·data-group-id="2403405770-5">[</span><span·class="w">·</span><span·class="p"·data-group-id="2403405770-6">{</span><span·class="ss">prepend</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2403405770-7">[</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·480,·SHA:·97e711429ed5e4d9d27ba7a53d8d4e737ebe958c6808ceca1974666da7e3b566·...·]-5">]</span><span·class="w">
285 ········</span><span·class="p"·data-group-id="2588144929-4">}</span><span·class="p"·data-group-id="2588144929-3">]</span><span·class="p"·data-group-id="2588144929-2">}</span><span·class="w">285 ········</span><span·class="p"·data-group-id="2403405770-4">}</span><span·class="p"·data-group-id="2403405770-3">]</span><span·class="p"·data-group-id="2403405770-2">}</span><span·class="w">
286 </span><span·class="p"·data-group-id="2588144929-1">]</span><span·class="p">.</span></code></pre><p>A·newly·started·erlang·shell·shows·that·no·<code·class="inline">'ssh-dss'</code>·is·present·in·the286 </span><span·class="p"·data-group-id="2403405770-1">]</span><span·class="p">.</span></code></pre><p>A·newly·started·erlang·shell·shows·that·no·<code·class="inline">'ssh-dss'</code>·is·present·in·the
287 <code·class="inline">public_key</code>·entry:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="5383748804-1">(</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">default_algorithms</span><span·class="p"·data-group-id="5383748804-2">(</span><span·[·...·truncated·by·diffoscope;·len:·88,·SHA:·94e329c3395e841f176276fed470d32b8f7bb287a58e274700f950f0ac42ea20·...·]-1">)</span><span·class="p">.</span><span·class="w">287 <code·class="inline">public_key</code>·entry:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="8462202303-1">(</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">default_algorithms</span><span·class="p"·data-group-id="8462202303-2">(</span><span·[·...·truncated·by·diffoscope;·len:·88,·SHA:·a368040a3211453038982f2a4bb8ea55bd3a91185f37813de6e41e5ef2c97215·...·]-1">)</span><span·class="p">.</span><span·class="w">
288 </span><span·class="p"·data-group-id="5383748804-3">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">288 </span><span·class="p"·data-group-id="8462202303-3">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
289 ·</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-ed25519&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-ed448&#39;</span><span·class="p">,</span><span·class="w">289 ·</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-ed25519&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-ed448&#39;</span><span·class="p">,</span><span·class="w">
290 ·</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p"·data-group-id="5383748804-3">]</span><span·class="w">290 ·</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p"·data-group-id="8462202303-3">]</span><span·class="w">
291 </span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>A·call·to·<a·href="ssh.html#connect/3"><code·class="inline">ssh:connect/3</code></a>·removes·all·algorithms·but·one·of·each·type:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4335641409-1">(</span><span·class="p"·data-group-id="4335641409-1">)</span><span·class="p">.</span><span·class="w">291 </span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>A·call·to·<a·href="ssh.html#connect/3"><code·class="inline">ssh:connect/3</code></a>·removes·all·algorithms·but·one·of·each·type:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7431345478-1">(</span><span·class="p"·data-group-id="7431345478-1">)</span><span·class="p">.</span><span·class="w">
292 </span><span·class="ss">ok</span><span·class="gp·unselectable">292 </span><span·class="ss">ok</span><span·class="gp·unselectable">
293 3&gt;·</span><span·class="p"·data-group-id="4335641409-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="4335641409-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh</span><span·cl[·...·truncated·by·diffoscope;·len:·88,·SHA:·1fdd9047008d32e3faff69040cfc846c39492f39f5c1d2879c3d2170915af0c2·...·]-3">(</span><span·class="ss">loopback</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">22</span><span·class="p">,</span><span·class="w">293 3&gt;·</span><span·class="p"·data-group-id="7431345478-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="7431345478-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh</span><span·cl[·...·truncated·by·diffoscope;·len:·88,·SHA:·42046037da1aee362307a0257255b661fe753d0aea26833f2ab1796d9a2f0965·...·]-3">(</span><span·class="ss">loopback</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">22</span><span·class="p">,</span><span·class="w">
294 ························</span><span·class="p"·data-group-id="4335641409-4">[</span><span·class="p"·data-group-id="4335641409-5">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">294 ························</span><span·class="p"·data-group-id="7431345478-4">[</span><span·class="p"·data-group-id="7431345478-5">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">
295 ·························</span><span·class="p"·data-group-id="4335641409-6">[</span><span·class="p"·data-group-id="4335641409-7">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4335641409-8">[</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;[·...·truncated·by·diffoscope;·len:·101,·SHA:·eb3f35fe0862b129c7f6a9da00e96a77e41fb29e26f1e9695806e3c709aa0ccc·...·]-7">}</span><span·class="p">,</span><span·class="w">295 ·························</span><span·class="p"·data-group-id="7431345478-6">[</span><span·class="p"·data-group-id="7431345478-7">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7431345478-8">[</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;[·...·truncated·by·diffoscope;·len:·101,·SHA:·39a4218978fb31c86a381f28176a06956d8858df4d621c7a6fa7ab9741e9e5b0·...·]-7">}</span><span·class="p">,</span><span·class="w">
296 »       »       »       ··</span><span·class="p"·data-group-id="4335641409-9">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4335641409-10">[</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p"·data-group-id="4335641409-10">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·39c3e22bebe69ad55f531b3c9ce2579b0f8125cb18cd1bd6734a0f5d5281f6e2·...·]-9">}</span><span·class="p">,</span><span·class="w">296 »       »       »       ··</span><span·class="p"·data-group-id="7431345478-9">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7431345478-10">[</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p"·data-group-id="7431345478-10">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·97fbe477953659741d1b6d9615721921467e2a4cf6b318e026ba397f5caa0780·...·]-9">}</span><span·class="p">,</span><span·class="w">
297 »       »       ··········</span><span·class="p"·data-group-id="4335641409-11">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4335641409-12">[</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="4335641[·...·truncated·by·diffoscope;·len:·57,·SHA:·6a48c2e9b79309f8ed1279db0b3550a2e69b748f9cee423155e616ae3579bcf7·...·]-11">}</span><span·class="p">,</span><span·class="w">297 »       »       ··········</span><span·class="p"·data-group-id="7431345478-11">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7431345478-12">[</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="7431345[·...·truncated·by·diffoscope;·len:·57,·SHA:·4f0425ef8c1080f56580e9cdb288e5cd51f204eed79b4f09057574ffea2f5932·...·]-11">}</span><span·class="p">,</span><span·class="w">
298 »       »       »       ··</span><span·class="p"·data-group-id="4335641409-13">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4335641409-14">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p"·data-group-id="4335641409-14">]</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·37a5425d2749734499dbbd945adf1fd9d914fb845b4d5c0666eb0bad1650b98d·...·]-13">}</span><span·class="p">,</span><span·class="w">298 »       »       »       ··</span><span·class="p"·data-group-id="7431345478-13">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7431345478-14">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p"·data-group-id="7431345478-14">]</span><sp[·...·truncated·by·diffoscope;·len:·38,·SHA:·c72d6b6a86b2788480cabb62d590daed95e59efe47bd1e57fd20e39907b4f854·...·]-13">}</span><span·class="p">,</span><span·class="w">
299 »       »       »       ··</span><span·class="p"·data-group-id="4335641409-15">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4335641409-16">[</span><span·class="ss">none</span><span·class="p"·data-group-id="4335641409-16">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·e387f991d32d8206c2a1fe2bebcf19a7d3d63f7d6a27f3b5f273c126147ed9a6·...·]-15">}</span><span·class="w">299 »       »       »       ··</span><span·class="p"·data-group-id="7431345478-15">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7431345478-16">[</span><span·class="ss">none</span><span·class="p"·data-group-id="7431345478-16">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·c93ffe7897403319738265e0e6dd50aa6a1d10599419445c72db4f627972adc1·...·]-15">}</span><span·class="w">
300 »       »       »       ··</span><span·class="p"·data-group-id="4335641409-6">]</span><span·class="p"·data-group-id="4335641409-5">}</span><span·class="w">300 »       »       »       ··</span><span·class="p"·data-group-id="7431345478-6">]</span><span·class="p"·data-group-id="7431345478-5">}</span><span·class="w">
301 »       »       »       ·</span><span·class="p"·data-group-id="4335641409-4">]</span><span·class="p"·data-group-id="4335641409-3">)</span><span·class="p">.</span><span·class="w">301 »       »       »       ·</span><span·class="p"·data-group-id="7431345478-4">]</span><span·class="p"·data-group-id="7431345478-3">)</span><span·class="p">.</span><span·class="w">
302 </span><span·class="p"·data-group-id="4335641409-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.101</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4335641409-17">}</span><span·class="gp·unselectable">302 </span><span·class="p"·data-group-id="7431345478-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.101</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7431345478-17">}</span><span·class="gp·unselectable">
303 4&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connection_info</span><span·class="p"·data-group-id="4335641409-18">(</span><span·class="n">C</span><span·class="p">,</span><span·class="ss">algorithms</span><span·class="p"·data-group-id="4335641409-18">)</span><span·class="p">.</span><span·class="w">303 4&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connection_info</span><span·class="p"·data-group-id="7431345478-18">(</span><span·class="n">C</span><span·class="p">,</span><span·class="ss">algorithms</span><span·class="p"·data-group-id="7431345478-18">)</span><span·class="p">.</span><span·class="w">
304 </span><span·class="p"·data-group-id="4335641409-19">{</span><span·class="ss">algorithms</span><span·class="p">,</span><span·class="p"·data-group-id="4335641409-20">[</span><span·class="p"·data-group-id="4335641409-21">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·77,·SHA:·05a4feec11b227846cf8b3c20bffddfe9b34026e9b4953847316d7494de09ab6·...·]-21">}</span><span·class="p">,</span><span·class="w">304 </span><span·class="p"·data-group-id="7431345478-19">{</span><span·class="ss">algorithms</span><span·class="p">,</span><span·class="p"·data-group-id="7431345478-20">[</span><span·class="p"·data-group-id="7431345478-21">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·77,·SHA:·96727f71fbaacb8171ddd565ac1829ca6e51340fa1c1286cb703e6a6632fe22e·...·]-21">}</span><span·class="p">,</span><span·class="w">
305 ·············</span><span·class="p"·data-group-id="4335641409-22">{</span><span·class="ss">hkey</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="4335641409-22">}</span><span·class="p">,</span><span·class="w">305 ·············</span><span·class="p"·data-group-id="7431345478-22">{</span><span·class="ss">hkey</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="7431345478-22">}</span><span·class="p">,</span><span·class="w">
306 ·············</span><span·class="p"·data-group-id="4335641409-23">{</span><span·class="ss">send_mac</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="4335641409-23">}</span><span·class="p">,</span><span·class="w">306 ·············</span><span·class="p"·data-group-id="7431345478-23">{</span><span·class="ss">send_mac</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="7431345478-23">}</span><span·class="p">,</span><span·class="w">
307 ·············</span><span·class="p"·data-group-id="4335641409-24">{</span><span·class="ss">recv_mac</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="4335641409-24">}</span><span·class="p">,</span><span·class="w">307 ·············</span><span·class="p"·data-group-id="7431345478-24">{</span><span·class="ss">recv_mac</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="7431345478-24">}</span><span·class="p">,</span><span·class="w">
308 ·············</span><span·class="p"·data-group-id="4335641409-25">{</span><span·class="ss">encrypt</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="4335641409-25">}</span><span·class="p">,</span><span·class="w">308 ·············</span><span·class="p"·data-group-id="7431345478-25">{</span><span·class="ss">encrypt</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="7431345478-25">}</span><span·class="p">,</span><span·class="w">
309 ·············</span><span·class="p"·data-group-id="4335641409-26">{</span><span·class="ss">decrypt</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="4335641409-26">}</span><span·class="p">,</span><span·class="w">309 ·············</span><span·class="p"·data-group-id="7431345478-26">{</span><span·class="ss">decrypt</span><span·class="p">,</span><span·class="ss">&#39;chacha20-poly1305@openssh.com&#39;</span><span·class="p"·data-group-id="7431345478-26">}</span><span·class="p">,</span><span·class="w">
310 ·············</span><span·class="p"·data-group-id="4335641409-27">{</span><span·class="ss">compress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="4335641409-27">}</span><span·class="p">,</span><span·class="w">310 ·············</span><span·class="p"·data-group-id="7431345478-27">{</span><span·class="ss">compress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="7431345478-27">}</span><span·class="p">,</span><span·class="w">
311 ·············</span><span·class="p"·data-group-id="4335641409-28">{</span><span·class="ss">decompress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="4335641409-28">}</span><span·class="p">,</span><span·class="w">311 ·············</span><span·class="p"·data-group-id="7431345478-28">{</span><span·class="ss">decompress</span><span·class="p">,</span><span·class="ss">none</span><span·class="p"·data-group-id="7431345478-28">}</span><span·class="p">,</span><span·class="w">
312 ·············</span><span·class="p"·data-group-id="4335641409-29">{</span><span·class="ss">send_ext_info</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="4335641409-29">}</span><span·class="p">,</span><span·class="w">312 ·············</span><span·class="p"·data-group-id="7431345478-29">{</span><span·class="ss">send_ext_info</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="7431345478-29">}</span><span·class="p">,</span><span·class="w">
313 ·············</span><span·class="p"·data-group-id="4335641409-30">{</span><span·class="ss">recv_ext_info</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="4335641409-30">}</span><span·class="p"·data-group-id="4335641409-20">]</span><span·class="p"·data-group-id="43356[·...·truncated·by·diffoscope;·len:·5,·SHA:·49dba9929872f5eaaaaf4b72b6157ded7b17716d5b750566c6f849ec86ab0444·...·]-19">}</span><span·class="w">313 ·············</span><span·class="p"·data-group-id="7431345478-30">{</span><span·class="ss">recv_ext_info</span><span·class="p">,</span><span·class="ss">true</span><span·class="p"·data-group-id="7431345478-30">}</span><span·class="p"·data-group-id="7431345478-20">]</span><span·class="p"·data-group-id="74313[·...·truncated·by·diffoscope;·len:·5,·SHA:·0f26e14852db847d86c4ce68ae5869b1851fca19674d2de1cec729427fda7022·...·]-19">}</span><span·class="w">
314 </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p>But·<code·class="inline">'ssh-dss'</code>·is·selected·although·the·call·inserted·<em>only</em>314 </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p>But·<code·class="inline">'ssh-dss'</code>·is·selected·although·the·call·inserted·<em>only</em>
315 <code·class="inline">'ecdsa-sha2-nistp256'</code>·as·acceptable.</p><p>This·example·showed·that·we·could·augment·the·set·of·algorithms·with·a315 <code·class="inline">'ecdsa-sha2-nistp256'</code>·as·acceptable.</p><p>This·example·showed·that·we·could·augment·the·set·of·algorithms·with·a
316 config-file·without·the·need·to·change·the·actual·call.</p><p>For·demonstration·purposes·we·used·<code·class="inline">prepend</code>·instead·of·<code·class="inline">append</code>.·This·forces316 config-file·without·the·need·to·change·the·actual·call.</p><p>For·demonstration·purposes·we·used·<code·class="inline">prepend</code>·instead·of·<code·class="inline">append</code>.·This·forces
317 the·negotiation·to·select·<code·class="inline">ssh-dss</code>·since·the·the·full·list·of·public·key317 the·negotiation·to·select·<code·class="inline">ssh-dss</code>·since·the·the·full·list·of·public·key
318 algorithms·was·<code·class="inline">['ssh-dss','ecdsa-sha2-nistp256']</code>.·Normally·it·is·safer·to318 algorithms·was·<code·class="inline">['ssh-dss','ecdsa-sha2-nistp256']</code>.·Normally·it·is·safer·to
Max diff block lines reached; 8/62603 bytes (0.01%) of diff not shown.
124 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/configure_algos.html
    
Offset 166, 37 lines modifiedOffset 166, 37 lines modified
166 ··</a>166 ··</a>
167 ··<span·class="text">The·SSH·app's·mechanism</span>167 ··<span·class="text">The·SSH·app's·mechanism</span>
168 </h3>168 </h3>
169 <p>The·set·of·algorithms·that·the·SSH·app·uses·by·default·depends·on·the·algorithms169 <p>The·set·of·algorithms·that·the·SSH·app·uses·by·default·depends·on·the·algorithms
170 supported·by·the:</p><ul><li><a·href="../../../../lib/crypto-5.5/doc/html/crypto.html"><code·class="inline">crypto</code></a>·app,</li><li>The·cryptolib·OTP·is·linked·with,·usually·the·one·the·OS·uses,·probably170 supported·by·the:</p><ul><li><a·href="../../../../lib/crypto-5.5/doc/html/crypto.html"><code·class="inline">crypto</code></a>·app,</li><li>The·cryptolib·OTP·is·linked·with,·usually·the·one·the·OS·uses,·probably
171 OpenSSL,</li><li>and·finally·what·the·SSH·app·implements</li></ul><p>Due·to·this,·it·impossible·to·list·in·documentation·what·algorithms·that·are171 OpenSSL,</li><li>and·finally·what·the·SSH·app·implements</li></ul><p>Due·to·this,·it·impossible·to·list·in·documentation·what·algorithms·that·are
172 available·in·a·certain·installation.</p><p>There·is·an·important·command·to·list·the·actual·algorithms·and·their·ordering:172 available·in·a·certain·installation.</p><p>There·is·an·important·command·to·list·the·actual·algorithms·and·their·ordering:
173 <a·href="ssh.html#default_algorithms/0"><code·class="inline">ssh:default_algorithms/0</code></a>.</p><pre·id="example_default_algorithms"><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">0&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">default_algorithms</span><span·class="p"·data-group-id="1416528726-1">(</span><span·class="p"·data-group-id="1416528726-1">)</span><span·class="p">.</span><span·class="w">173 <a·href="ssh.html#default_algorithms/0"><code·class="inline">ssh:default_algorithms/0</code></a>.</p><pre·id="example_default_algorithms"><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">0&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">default_algorithms</span><span·class="p"·data-group-id="9411794965-1">(</span><span·class="p"·data-group-id="9411794965-1">)</span><span·class="p">.</span><span·class="w">
174 </span><span·class="p"·data-group-id="1416528726-2">[</span><span·class="p"·data-group-id="1416528726-3">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-4">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdh-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">174 </span><span·class="p"·data-group-id="9411794965-2">[</span><span·class="p"·data-group-id="9411794965-3">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-4">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdh-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
175 ·······</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha256&#39;</span><span·class="p">,</span><span·class="w">175 ·······</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha256&#39;</span><span·class="p">,</span><span·class="w">
176 ·······</span><span·class="ss">&#39;diffie-hellman-group16-sha512&#39;</span><span·class="p">,</span><span·class="w">176 ·······</span><span·class="ss">&#39;diffie-hellman-group16-sha512&#39;</span><span·class="p">,</span><span·class="w">
177 ·······</span><span·class="ss">&#39;diffie-hellman-group18-sha512&#39;</span><span·class="p">,</span><span·class="w">177 ·······</span><span·class="ss">&#39;diffie-hellman-group18-sha512&#39;</span><span·class="p">,</span><span·class="w">
178 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p">,</span><span·class="w">178 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p">,</span><span·class="w">
179 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha1&#39;</span><span·class="p">,</span><span·class="w">179 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha1&#39;</span><span·class="p">,</span><span·class="w">
180 ·······</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha1&#39;</span><span·class="p"·data-group-id="1416528726-4">]</span><span·class="p"·data-group-id="1416528726-3">}</span><span·class="p">,</span><span·class="w">180 ·······</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha1&#39;</span><span·class="p"·data-group-id="9411794965-4">]</span><span·class="p"·data-group-id="9411794965-3">}</span><span·class="p">,</span><span·class="w">
181 ·</span><span·class="p"·data-group-id="1416528726-5">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-6">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">181 ·</span><span·class="p"·data-group-id="9411794965-5">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-6">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
182 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">182 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">
183 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="1416528726-6">]</span><span·class="p"·data-group-id="1416528726-5">}</span><span·class="p">,</span><span·class="w">183 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="9411794965-6">]</span><span·class="p"·data-group-id="9411794965-5">}</span><span·class="p">,</span><span·class="w">
184 ·</span><span·class="p"·data-group-id="1416528726-7">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-8">[</span><span·class="p"·data-group-id="1416528726-9">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·1a6dd0f4fb172d119636f48bf04fc3a88ca04da3e7b7439dd8f436d0eff0aba4·...·]-10">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">184 ·</span><span·class="p"·data-group-id="9411794965-7">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-8">[</span><span·class="p"·data-group-id="9411794965-9">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·49468be2ba689fc7175ceca7ea21757c0a8c866a33124a84fb336f056b8ae43c·...·]-10">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">
185 ··························</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">185 ··························</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">
186 ··························</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="1416528726-10">]</span><span·class="p"·data-group-id="1416528726-9">}</span><span·class="p">,</span><span·class="w">186 ··························</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="9411794965-10">]</span><span·class="p"·data-group-id="9411794965-9">}</span><span·class="p">,</span><span·class="w">
187 ··········</span><span·class="p"·data-group-id="1416528726-11">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-12">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="w">187 ··········</span><span·class="p"·data-group-id="9411794965-11">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-12">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="w">
188 ··························</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="w">188 ··························</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="w">
189 ··························</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="1416528726-12">]</span><span·class="p"·data-group-id="1416528726-11">}</span><span·class="p"·data-group-id="1416528726-8">]</span><span·class="p"·data-group-id="1416528726-7">}</span><span·class="p">,</span><span·class="w">189 ··························</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="9411794965-12">]</span><span·class="p"·data-group-id="9411794965-11">}</span><span·class="p"·data-group-id="9411794965-8">]</span><span·class="p"·data-group-id="9411794965-7">}</span><span·class="p">,</span><span·class="w">
190 ·</span><span·class="p"·data-group-id="1416528726-13">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-14">[</span><span·class="p"·data-group-id="1416528726-15">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·1a6dd0f4fb172d119636f48bf04fc3a88ca04da3e7b7439dd8f436d0eff0aba4·...·]-16">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">190 ·</span><span·class="p"·data-group-id="9411794965-13">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-14">[</span><span·class="p"·data-group-id="9411794965-15">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·49468be2ba689fc7175ceca7ea21757c0a8c866a33124a84fb336f056b8ae43c·...·]-16">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
191 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="1416528726-16">]</span><span·class="p"·data-group-id="1416528726-15">}</span><span·class="p">,</span><span·class="w">191 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="9411794965-16">]</span><span·class="p"·data-group-id="9411794965-15">}</span><span·class="p">,</span><span·class="w">
192 ·······</span><span·class="p"·data-group-id="1416528726-17">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-18">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">192 ·······</span><span·class="p"·data-group-id="9411794965-17">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-18">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
193 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="1416528726-18">]</span><span·class="p"·data-group-id="1416528726-17">}</span><span·class="p"·data-group-id="1416528726-14">]</span><span·class="p"·data-group-id="1416528726-13">}</span><span·class="p">,</span><span·class="w">193 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="9411794965-18">]</span><span·class="p"·data-group-id="9411794965-17">}</span><span·class="p"·data-group-id="9411794965-14">]</span><span·class="p"·data-group-id="9411794965-13">}</span><span·class="p">,</span><span·class="w">
194 ·</span><span·class="p"·data-group-id="1416528726-19">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-20">[</span><span·class="p"·data-group-id="1416528726-21">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·d6938bd8769d5a37aa47437ffb3d74dc68a099f8ff6f92e4bb8a6068049c9e6a·...·]-21">}</span><span·class="p">,</span><span·class="w">194 ·</span><span·class="p"·data-group-id="9411794965-19">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-20">[</span><span·class="p"·data-group-id="9411794965-21">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·f02a5e006b10b9397ca10d71d53c4ee37d70347bc63832b397a54a736f94088a·...·]-21">}</span><span·class="p">,</span><span·class="w">
195 ···············</span><span·class="p"·data-group-id="1416528726-23">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="1416528726-24">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·646b6f296ec9cd4f0e7d624adfb7000edbdb481933c4d50edbe560144a84ca80·...·]-2">]</span></code></pre><p>To·change·the·algorithm·list,·there·are·two·options·which·can·be·used·in195 ···············</span><span·class="p"·data-group-id="9411794965-23">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="9411794965-24">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·1510418d47219a5ec97dbfe034f3af48e1abe8cfcd403f9d6e220ab9cb8cb0be·...·]-2">]</span></code></pre><p>To·change·the·algorithm·list,·there·are·two·options·which·can·be·used·in
196 <a·href="ssh.html#connect/3">ssh:connect/2,3,4</a>·and·<a·href="ssh.html#daemon/2">ssh:daemon/2,3</a>.·The196 <a·href="ssh.html#connect/3">ssh:connect/2,3,4</a>·and·<a·href="ssh.html#daemon/2">ssh:daemon/2,3</a>.·The
197 options·could·of·course·be·used·in·all·other·functions·that·initiates197 options·could·of·course·be·used·in·all·other·functions·that·initiates
198 connections.</p><p>The·options·are198 connections.</p><p>The·options·are
199 <a·href="ssh.html#t:preferred_algorithms_common_option/0">preferred_algorithms</a>·and199 <a·href="ssh.html#t:preferred_algorithms_common_option/0">preferred_algorithms</a>·and
200 <a·href="ssh.html#t:modify_algorithms_common_option/0">modify_algorithms</a>.·The·first·one200 <a·href="ssh.html#t:modify_algorithms_common_option/0">modify_algorithms</a>.·The·first·one
201 replaces·the·default·set,·while·the·latter·modifies·the·default·set.</p><h2·id="replacing-the-default-set-preferred_algorithms"·class="section-heading">201 replaces·the·default·set,·while·the·latter·modifies·the·default·set.</p><h2·id="replacing-the-default-set-preferred_algorithms"·class="section-heading">
202 ··<a·href="#replacing-the-default-set-preferred_algorithms"·class="hover-link">202 ··<a·href="#replacing-the-default-set-preferred_algorithms"·class="hover-link">
Offset 211, 264 lines modifiedOffset 211, 264 lines modified
211 friends·does.</p><h3·id="example-1"·class="section-heading">211 friends·does.</p><h3·id="example-1"·class="section-heading">
212 ··<a·href="#example-1"·class="hover-link">212 ··<a·href="#example-1"·class="hover-link">
213 ····<i·class="ri-link-m"·aria-hidden="true"></i>213 ····<i·class="ri-link-m"·aria-hidden="true"></i>
214 ··</a>214 ··</a>
215 ··<span·class="text">Example·1</span>215 ··<span·class="text">Example·1</span>
216 </h3>216 </h3>
217 <p>Replace·the·kex·algorithms·list·with·the·single·algorithm217 <p>Replace·the·kex·algorithms·list·with·the·single·algorithm
218 <code·class="inline">'diffie-hellman-group14-sha256'</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">chk_algos_opts</span><span·class="p"·data-group-id="5479530467-1">(</span><span·class="w">218 <code·class="inline">'diffie-hellman-group14-sha256'</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">chk_algos_opts</span><span·class="p"·data-group-id="8478386131-1">(</span><span·class="w">
219 ···············</span><span·class="p"·data-group-id="5479530467-2">[</span><span·class="p"·data-group-id="5479530467-3">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">219 ···············</span><span·class="p"·data-group-id="8478386131-2">[</span><span·class="p"·data-group-id="8478386131-3">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">
220 ·····················</span><span·class="p"·data-group-id="5479530467-4">[</span><span·class="p"·data-group-id="5479530467-5">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5479530467-6">[</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#[·...·truncated·by·diffoscope;·len:·104,·SHA:·4b64400a818d2404209140c30ca56157b4a33cfa4655c743bd183c3ec685ec82·...·]-5">}</span><span·class="w">220 ·····················</span><span·class="p"·data-group-id="8478386131-4">[</span><span·class="p"·data-group-id="8478386131-5">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8478386131-6">[</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#[·...·truncated·by·diffoscope;·len:·104,·SHA:·7aa4329b5516a2ebe90df6408fc5c522f37b205b7a56a0312b24a472275e112d·...·]-5">}</span><span·class="w">
221 ·····················</span><span·class="p"·data-group-id="5479530467-4">]</span><span·class="w">221 ·····················</span><span·class="p"·data-group-id="8478386131-4">]</span><span·class="w">
222 ················</span><span·class="p"·data-group-id="5479530467-3">}</span><span·class="w">222 ················</span><span·class="p"·data-group-id="8478386131-3">}</span><span·class="w">
223 ··············</span><span·class="p"·data-group-id="5479530467-2">]</span><span·class="p"·data-group-id="5479530467-1">)</span><span·class="p">.</span><span·class="w">223 ··············</span><span·class="p"·data-group-id="8478386131-2">]</span><span·class="p"·data-group-id="8478386131-1">)</span><span·class="p">.</span><span·class="w">
224 </span><span·class="p"·data-group-id="5479530467-7">[</span><span·class="p"·data-group-id="5479530467-8">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-9">[</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p[·...·truncated·by·diffoscope;·len:·80,·SHA:·14857b0919e368fe1a96dad6a6c97e405f64c612966c866faf690b9f543ff542·...·]-8">}</span><span·class="p">,</span><span·class="w">224 </span><span·class="p"·data-group-id="8478386131-7">[</span><span·class="p"·data-group-id="8478386131-8">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-9">[</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p[·...·truncated·by·diffoscope;·len:·80,·SHA:·ffc03459bc934eb7847cfa74fdecbeb8e1bc43ffe00791b2b2939de6aba13c7b·...·]-8">}</span><span·class="p">,</span><span·class="w">
225 ·</span><span·class="p"·data-group-id="5479530467-10">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-11">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">225 ·</span><span·class="p"·data-group-id="8478386131-10">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-11">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
226 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">226 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">
227 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="5479530467-11">]</span><span·class="p"·data-group-id="5479530467-10">}</span><span·class="p">,</span><span·class="w">227 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="8478386131-11">]</span><span·class="p"·data-group-id="8478386131-10">}</span><span·class="p">,</span><span·class="w">
228 ·</span><span·class="p"·data-group-id="5479530467-12">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-13">[</span><span·class="p"·data-group-id="5479530467-14">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·2c38bb43e4e18d6ae510ed978342e29957ef7d47b194bd8dadd170e1992b8f45·...·]-15">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">228 ·</span><span·class="p"·data-group-id="8478386131-12">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-13">[</span><span·class="p"·data-group-id="8478386131-14">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·325c4775b90f50c0a34946a6d1ebbbd097608dc872265da818726c13571be4ac·...·]-15">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">
229 ··························</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">229 ··························</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="w">
230 ··························</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="5479530467-15">]</span><span·class="p"·data-group-id="5479530467-14">}</span><span·class="p">,</span><span·class="w">230 ··························</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="8478386131-15">]</span><span·class="p"·data-group-id="8478386131-14">}</span><span·class="p">,</span><span·class="w">
231 ··········</span><span·class="p"·data-group-id="5479530467-16">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-17">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="w">231 ··········</span><span·class="p"·data-group-id="8478386131-16">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-17">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="w">
232 ··························</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="w">232 ··························</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="w">
233 ··························</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="5479530467-17">]</span><span·class="p"·data-group-id="5479530467-16">}</span><span·class="p"·data-group-id="5479530467-13">]</span><span·class="p"·data-group-id="5479530467-12">}</span><span·class="p">,</span><span·class="w">233 ··························</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="8478386131-17">]</span><span·class="p"·data-group-id="8478386131-16">}</span><span·class="p"·data-group-id="8478386131-13">]</span><span·class="p"·data-group-id="8478386131-12">}</span><span·class="p">,</span><span·class="w">
234 ·</span><span·class="p"·data-group-id="5479530467-18">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-19">[</span><span·class="p"·data-group-id="5479530467-20">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·2237e11705dc6472fc226ace205f40bab7fa3bd901afc43a823d3b308ac6bf36·...·]-21">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">234 ·</span><span·class="p"·data-group-id="8478386131-18">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-19">[</span><span·class="p"·data-group-id="8478386131-20">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·96b7a938d982f854dfed38aae6c86b088f1d06f79b022bff5173b6a514989d0a·...·]-21">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
235 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="5479530467-21">]</span><span·class="p"·data-group-id="5479530467-20">}</span><span·class="p">,</span><span·class="w">235 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="8478386131-21">]</span><span·class="p"·data-group-id="8478386131-20">}</span><span·class="p">,</span><span·class="w">
236 ·······</span><span·class="p"·data-group-id="5479530467-22">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-23">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">236 ·······</span><span·class="p"·data-group-id="8478386131-22">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-23">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
237 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="5479530467-23">]</span><span·class="p"·data-group-id="5479530467-22">}</span><span·class="p"·data-group-id="5479530467-19">]</span><span·class="p"·data-group-id="5479530467-18">}</span><span·class="p">,</span><span·class="w">237 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="8478386131-23">]</span><span·class="p"·data-group-id="8478386131-22">}</span><span·class="p"·data-group-id="8478386131-19">]</span><span·class="p"·data-group-id="8478386131-18">}</span><span·class="p">,</span><span·class="w">
238 ·</span><span·class="p"·data-group-id="5479530467-24">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-25">[</span><span·class="p"·data-group-id="5479530467-26">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·242ec33a849f9428d18ced024230ee6686f0dfaa575390798d4c34657508267e·...·]-26">}</span><span·class="p">,</span><span·class="w">238 ·</span><span·class="p"·data-group-id="8478386131-24">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-25">[</span><span·class="p"·data-group-id="8478386131-26">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·6bb979b8ffc74d1c9cbedfa2cafc8aa5047efa1b86ca443afd247a391cd9b445·...·]-26">}</span><span·class="p">,</span><span·class="w">
239 ···············</span><span·class="p"·data-group-id="5479530467-28">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5479530467-29">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·5b63d9da47bee3da250312f210230c04a96a33e974edf8d0f685cdb459e69f2d·...·]-7">]</span></code></pre><p>Note·that·the·unmentioned·lists·(<code·class="inline">public_key</code>,·<code·class="inline">cipher</code>,·<code·class="inline">mac</code>·and239 ···············</span><span·class="p"·data-group-id="8478386131-28">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="8478386131-29">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·6ef8ea2ed4a80eec9e80f0ac1bf330820cbedc1c81b81d3f83eff5cf1f275fc0·...·]-7">]</span></code></pre><p>Note·that·the·unmentioned·lists·(<code·class="inline">public_key</code>,·<code·class="inline">cipher</code>,·<code·class="inline">mac</code>·and
240 <code·class="inline">compression</code>)·are·unchanged.</p><h3·id="example-2"·class="section-heading">240 <code·class="inline">compression</code>)·are·unchanged.</p><h3·id="example-2"·class="section-heading">
241 ··<a·href="#example-2"·class="hover-link">241 ··<a·href="#example-2"·class="hover-link">
242 ····<i·class="ri-link-m"·aria-hidden="true"></i>242 ····<i·class="ri-link-m"·aria-hidden="true"></i>
243 ··</a>243 ··</a>
244 ··<span·class="text">Example·2</span>244 ··<span·class="text">Example·2</span>
245 </h3>245 </h3>
246 <p>In·the·lists·that·are·divided·in·two·for·the·two·directions·(for·example·<code·class="inline">cipher</code>)·it·is246 <p>In·the·lists·that·are·divided·in·two·for·the·two·directions·(for·example·<code·class="inline">cipher</code>)·it·is
247 possible·to·change·both·directions·at·once:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">chk_algos_opts</span><span·class="p"·data-group-id="0798454433-1">(</span><span·class="w">247 possible·to·change·both·directions·at·once:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">chk_algos_opts</span><span·class="p"·data-group-id="3318988410-1">(</span><span·class="w">
248 ···············</span><span·class="p"·data-group-id="0798454433-2">[</span><span·class="p"·data-group-id="0798454433-3">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">248 ···············</span><span·class="p"·data-group-id="3318988410-2">[</span><span·class="p"·data-group-id="3318988410-3">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">
249 ·····················</span><span·class="p"·data-group-id="0798454433-4">[</span><span·class="p"·data-group-id="0798454433-5">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-6">[</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·0d09a1763d64a09248b29327ae0f017c1f5a608936eb7c9341c33d599c95a7c0·...·]-5">}</span><span·class="w">249 ·····················</span><span·class="p"·data-group-id="3318988410-4">[</span><span·class="p"·data-group-id="3318988410-5">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-6">[</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·64,·SHA:·9a6171033075398412ed7f750687b8a051fb499d2a8a11af3e62dac47eaa155e·...·]-5">}</span><span·class="w">
250 ·····················</span><span·class="p"·data-group-id="0798454433-4">]</span><span·class="w">250 ·····················</span><span·class="p"·data-group-id="3318988410-4">]</span><span·class="w">
251 ················</span><span·class="p"·data-group-id="0798454433-3">}</span><span·class="w">251 ················</span><span·class="p"·data-group-id="3318988410-3">}</span><span·class="w">
252 ··············</span><span·class="p"·data-group-id="0798454433-2">]</span><span·class="p"·data-group-id="0798454433-1">)</span><span·class="p">.</span><span·class="w">252 ··············</span><span·class="p"·data-group-id="3318988410-2">]</span><span·class="p"·data-group-id="3318988410-1">)</span><span·class="p">.</span><span·class="w">
253 </span><span·class="p"·data-group-id="0798454433-7">[</span><span·class="p"·data-group-id="0798454433-8">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-9">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdh-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">253 </span><span·class="p"·data-group-id="3318988410-7">[</span><span·class="p"·data-group-id="3318988410-8">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-9">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdh-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
254 ·······</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha256&#39;</span><span·class="p">,</span><span·class="w">254 ·······</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha256&#39;</span><span·class="p">,</span><span·class="w">
255 ·······</span><span·class="ss">&#39;diffie-hellman-group16-sha512&#39;</span><span·class="p">,</span><span·class="w">255 ·······</span><span·class="ss">&#39;diffie-hellman-group16-sha512&#39;</span><span·class="p">,</span><span·class="w">
256 ·······</span><span·class="ss">&#39;diffie-hellman-group18-sha512&#39;</span><span·class="p">,</span><span·class="w">256 ·······</span><span·class="ss">&#39;diffie-hellman-group18-sha512&#39;</span><span·class="p">,</span><span·class="w">
257 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p">,</span><span·class="w">257 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p">,</span><span·class="w">
258 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha1&#39;</span><span·class="p">,</span><span·class="w">258 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha1&#39;</span><span·class="p">,</span><span·class="w">
259 ·······</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha1&#39;</span><span·class="p"·data-group-id="0798454433-9">]</span><span·class="p"·data-group-id="0798454433-8">}</span><span·class="p">,</span><span·class="w">259 ·······</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha1&#39;</span><span·class="p"·data-group-id="3318988410-9">]</span><span·class="p"·data-group-id="3318988410-8">}</span><span·class="p">,</span><span·class="w">
260 ·</span><span·class="p"·data-group-id="0798454433-10">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-11">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">260 ·</span><span·class="p"·data-group-id="3318988410-10">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-11">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
261 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">261 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">
262 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="0798454433-11">]</span><span·class="p"·data-group-id="0798454433-10">}</span><span·class="p">,</span><span·class="w">262 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="3318988410-11">]</span><span·class="p"·data-group-id="3318988410-10">}</span><span·class="p">,</span><span·class="w">
263 ·</span><span·class="p"·data-group-id="0798454433-12">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-13">[</span><span·class="p"·data-group-id="0798454433-14">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·183,·SHA:·2f2294d03f5c525f1f49dba38f8a241eb043e6be443b27adf1f7b8624f875427·...·]-14">}</span><span·class="p">,</span><span·class="w">263 ·</span><span·class="p"·data-group-id="3318988410-12">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-13">[</span><span·class="p"·data-group-id="3318988410-14">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·183,·SHA:·4b11b645d2d08fce03177bbc3b812bbb399ddecd351df14a037a3c0c86d25704·...·]-14">}</span><span·class="p">,</span><span·class="w">
264 ··········</span><span·class="p"·data-group-id="0798454433-16">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-17">[</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p"·data-group-id="0798454433-17">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·129,·SHA:·c84735946174050d86f07a6fd3500b915cad73850bf3f63061db0df2b6f467be·...·]-12">}</span><span·class="p">,</span><span·class="w">264 ··········</span><span·class="p"·data-group-id="3318988410-16">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-17">[</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p"·data-group-id="3318988410-17">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·129,·SHA:·9b80fa46e3562d11fe45ce873fd264a73d3fa3a7e2e683a68747bbf25c70c4de·...·]-12">}</span><span·class="p">,</span><span·class="w">
265 ·</span><span·class="p"·data-group-id="0798454433-18">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-19">[</span><span·class="p"·data-group-id="0798454433-20">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·80f09407e2b9583f06803c4cdc084e4ce01e560a30f79c7bf16102a3147bea52·...·]-21">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">265 ·</span><span·class="p"·data-group-id="3318988410-18">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-19">[</span><span·class="p"·data-group-id="3318988410-20">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·c59225d191fdcf1c10f17c42edc090b8b55e8e3e64ff25c17b4055ea344d5b9c·...·]-21">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
266 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="0798454433-21">]</span><span·class="p"·data-group-id="0798454433-20">}</span><span·class="p">,</span><span·class="w">266 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="3318988410-21">]</span><span·class="p"·data-group-id="3318988410-20">}</span><span·class="p">,</span><span·class="w">
267 ·······</span><span·class="p"·data-group-id="0798454433-22">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-23">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">267 ·······</span><span·class="p"·data-group-id="3318988410-22">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-23">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
268 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="0798454433-23">]</span><span·class="p"·data-group-id="0798454433-22">}</span><span·class="p"·data-group-id="0798454433-19">]</span><span·class="p"·data-group-id="0798454433-18">}</span><span·class="p">,</span><span·class="w">268 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="3318988410-23">]</span><span·class="p"·data-group-id="3318988410-22">}</span><span·class="p"·data-group-id="3318988410-19">]</span><span·class="p"·data-group-id="3318988410-18">}</span><span·class="p">,</span><span·class="w">
269 ·</span><span·class="p"·data-group-id="0798454433-24">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-25">[</span><span·class="p"·data-group-id="0798454433-26">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·d68e4c1a726b2b4f99aab3954d53a29562db7a9d1b9b05d738ba8e4d84415c1c·...·]-26">}</span><span·class="p">,</span><span·class="w">269 ·</span><span·class="p"·data-group-id="3318988410-24">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-25">[</span><span·class="p"·data-group-id="3318988410-26">{</span><span·class="ss">client2server</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·298,·SHA:·e255040d5c869f44bc84226a6d8a7d0d7f33df54b0e7e104314041a6beee8b1f·...·]-26">}</span><span·class="p">,</span><span·class="w">
270 ···············</span><span·class="p"·data-group-id="0798454433-28">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="0798454433-29">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·7bc1fe90cef466789bbcb399dadc1f7864234da4c8bb47387999c915493b7915·...·]-7">]</span></code></pre><p>Note·that·both·lists·in·<code·class="inline">cipher</code>·has·been·changed·to·the·provided·value270 ···············</span><span·class="p"·data-group-id="3318988410-28">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="3318988410-29">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">&#39;zlib@openssh.com&#39;</span><span·class="p">[·...·truncated·by·diffoscope;·len:·293,·SHA:·8a06165a61ef86a84d26668bf5290b91969833716f1528d5d3f4225f0926cb51·...·]-7">]</span></code></pre><p>Note·that·both·lists·in·<code·class="inline">cipher</code>·has·been·changed·to·the·provided·value
271 (<code·class="inline">'aes128-ctr'</code>).</p><h3·id="example-3"·class="section-heading">271 (<code·class="inline">'aes128-ctr'</code>).</p><h3·id="example-3"·class="section-heading">
272 ··<a·href="#example-3"·class="hover-link">272 ··<a·href="#example-3"·class="hover-link">
273 ····<i·class="ri-link-m"·aria-hidden="true"></i>273 ····<i·class="ri-link-m"·aria-hidden="true"></i>
274 ··</a>274 ··</a>
275 ··<span·class="text">Example·3</span>275 ··<span·class="text">Example·3</span>
276 </h3>276 </h3>
277 <p>In·the·lists·that·are·divided·in·two·for·the·two·directions·(for·example·<code·class="inline">cipher</code>)·it·is277 <p>In·the·lists·that·are·divided·in·two·for·the·two·directions·(for·example·<code·class="inline">cipher</code>)·it·is
278 possible·to·change·only·one·of·the·directions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">chk_algos_opts</span><span·class="p"·data-group-id="0251127035-1">(</span><span·class="w">278 possible·to·change·only·one·of·the·directions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">chk_algos_opts</span><span·class="p"·data-group-id="4142975559-1">(</span><span·class="w">
279 ···············</span><span·class="p"·data-group-id="0251127035-2">[</span><span·class="p"·data-group-id="0251127035-3">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">279 ···············</span><span·class="p"·data-group-id="4142975559-2">[</span><span·class="p"·data-group-id="4142975559-3">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">
280 ·····················</span><span·class="p"·data-group-id="0251127035-4">[</span><span·class="p"·data-group-id="0251127035-5">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="0251127035-6">[</span><span·class="p"·data-group-id="0251127035-7">{</span><span·class="ss">clie[·...·truncated·by·diffoscope;·len:·337,·SHA:·76df936d7310d6044bef37c124c67e7109371b8cf74ba94a5e34082951f974e0·...·]-5">}</span><span·class="w">280 ·····················</span><span·class="p"·data-group-id="4142975559-4">[</span><span·class="p"·data-group-id="4142975559-5">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="4142975559-6">[</span><span·class="p"·data-group-id="4142975559-7">{</span><span·class="ss">clie[·...·truncated·by·diffoscope;·len:·337,·SHA:·9dc041dcc7c31b5d001337fc145f35e555f863f320cd68673cac4e2510fc091d·...·]-5">}</span><span·class="w">
281 ·····················</span><span·class="p"·data-group-id="0251127035-4">]</span><span·class="w">281 ·····················</span><span·class="p"·data-group-id="4142975559-4">]</span><span·class="w">
282 ················</span><span·class="p"·data-group-id="0251127035-3">}</span><span·class="w">282 ················</span><span·class="p"·data-group-id="4142975559-3">}</span><span·class="w">
283 ··············</span><span·class="p"·data-group-id="0251127035-2">]</span><span·class="p"·data-group-id="0251127035-1">)</span><span·class="p">.</span><span·class="w">283 ··············</span><span·class="p"·data-group-id="4142975559-2">]</span><span·class="p"·data-group-id="4142975559-1">)</span><span·class="p">.</span><span·class="w">
284 </span><span·class="p"·data-group-id="0251127035-9">[</span><span·class="p"·data-group-id="0251127035-10">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="0251127035-11">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdh-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">284 </span><span·class="p"·data-group-id="4142975559-9">[</span><span·class="p"·data-group-id="4142975559-10">{</span><span·class="ss">kex</span><span·class="p">,</span><span·class="p"·data-group-id="4142975559-11">[</span><span·class="ss">&#39;ecdh-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdh-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
285 ·······</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha256&#39;</span><span·class="p">,</span><span·class="w">285 ·······</span><span·class="ss">&#39;ecdh-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha256&#39;</span><span·class="p">,</span><span·class="w">
286 ·······</span><span·class="ss">&#39;diffie-hellman-group16-sha512&#39;</span><span·class="p">,</span><span·class="w">286 ·······</span><span·class="ss">&#39;diffie-hellman-group16-sha512&#39;</span><span·class="p">,</span><span·class="w">
287 ·······</span><span·class="ss">&#39;diffie-hellman-group18-sha512&#39;</span><span·class="p">,</span><span·class="w">287 ·······</span><span·class="ss">&#39;diffie-hellman-group18-sha512&#39;</span><span·class="p">,</span><span·class="w">
288 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p">,</span><span·class="w">288 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha256&#39;</span><span·class="p">,</span><span·class="w">
289 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha1&#39;</span><span·class="p">,</span><span·class="w">289 ·······</span><span·class="ss">&#39;diffie-hellman-group14-sha1&#39;</span><span·class="p">,</span><span·class="w">
290 ·······</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha1&#39;</span><span·class="p"·data-group-id="0251127035-11">]</span><span·class="p"·data-group-id="0251127035-10">}</span><span·class="p">,</span><span·class="w">290 ·······</span><span·class="ss">&#39;diffie-hellman-group-exchange-sha1&#39;</span><span·class="p"·data-group-id="4142975559-11">]</span><span·class="p"·data-group-id="4142975559-10">}</span><span·class="p">,</span><span·class="w">
291 ·</span><span·class="p"·data-group-id="0251127035-12">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="0251127035-13">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">291 ·</span><span·class="p"·data-group-id="4142975559-12">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="4142975559-13">[</span><span·class="ss">&#39;ecdsa-sha2-nistp384&#39;</span><span·class="p">,</span><span·class="ss">&#39;ecdsa-sha2-nistp521&#39;</span><span·class="p">,</span><span·class="w">
292 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">292 ··············</span><span·class="ss">&#39;ecdsa-sha2-nistp256&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span·class="ss">&#39;rsa-sha2-256&#39;</span><span·class="p">,</span><span·class="w">
293 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="0251127035-13">]</span><span·class="p"·data-group-id="0251127035-12">}</span><span·class="p">,</span><span·class="w">293 ··············</span><span·class="ss">&#39;rsa-sha2-512&#39;</span><span·class="p">,</span><span·class="ss">&#39;ssh-dss&#39;</span><span·class="p"·data-group-id="4142975559-13">]</span><span·class="p"·data-group-id="4142975559-12">}</span><span·class="p">,</span><span·class="w">
294 ·</span><span·class="p"·data-group-id="0251127035-14">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="0251127035-15">[</span><span·class="p"·data-group-id="0251127035-16">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·183,·SHA:·995342166000d1cde6bdacace931b344d6225d61c662f87d45476562537ea4ff·...·]-16">}</span><span·class="p">,</span><span·class="w">294 ·</span><span·class="p"·data-group-id="4142975559-14">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="4142975559-15">[</span><span·class="p"·data-group-id="4142975559-16">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·183,·SHA:·eee7c5e31724b88627baa7e1a356f473a563fcb2b4a8e7e94c1ab433265852de·...·]-16">}</span><span·class="p">,</span><span·class="w">
295 ··········</span><span·class="p"·data-group-id="0251127035-18">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="0251127035-19">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="w">295 ··········</span><span·class="p"·data-group-id="4142975559-18">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="4142975559-19">[</span><span·class="ss">&#39;aes256-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes256-ctr&#39;</span><span·class="p">,</span><span·class="w">
296 ··························</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="w">296 ··························</span><span·class="ss">&#39;aes192-ctr&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-gcm@openssh.com&#39;</span><span·class="p">,</span><span·class="ss">&#39;aes128-ctr&#39;</span><span·class="p">,</span><span·class="w">
297 ··························</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="0251127035-19">]</span><span·class="p"·data-group-id="0251127035-18">}</span><span·class="p"·data-group-id="0251127035-15">]</span><span·class="p"·data-group-id="0251127035-14">}</span><span·class="p">,</span><span·class="w">297 ··························</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·class="p"·data-group-id="4142975559-19">]</span><span·class="p"·data-group-id="4142975559-18">}</span><span·class="p"·data-group-id="4142975559-15">]</span><span·class="p"·data-group-id="4142975559-14">}</span><span·class="p">,</span><span·class="w">
298 ·</span><span·class="p"·data-group-id="0251127035-20">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="0251127035-21">[</span><span·class="p"·data-group-id="0251127035-22">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·78ac7e70c8d0a7a856f228a1d06c866e2278838706c833fa4b80be7277e88989·...·]-23">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">298 ·</span><span·class="p"·data-group-id="4142975559-20">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="4142975559-21">[</span><span·class="p"·data-group-id="4142975559-22">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·81c9e2e98db140adc85149aa29749f725c3a7a5e3b6701e6065654c38e385468·...·]-23">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha2-512&#39;</span><span·class="p">,</span><span·class="w">
299 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="0251127035-23">]</span><span·class="p"·data-group-id="0251127035-22">}</span><span·class="p">,</span><span·class="w">299 ·······················</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p"·data-group-id="4142975559-23">]</span><span·class="p"·data-group-id="4142975559-22">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 68817/127315 bytes (54.05%) of diff not shown.
11.2 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/hardening.html
    
Offset 210, 24 lines modifiedOffset 210, 24 lines modified
210 ··<span·class="text">Verifying·the·remote·client·in·a·daemon·(server)</span>210 ··<span·class="text">Verifying·the·remote·client·in·a·daemon·(server)</span>
211 </h2>211 </h2>
212 <ul><li><p><strong>Password·checking</strong>·-·The·default·password·checking·is·with·the·list·in·the212 <ul><li><p><strong>Password·checking</strong>·-·The·default·password·checking·is·with·the·list·in·the
213 <a·href="ssh.html#option-user_passwords">user_passwords</a>·option·in·the·SSH·daemon.·It213 <a·href="ssh.html#option-user_passwords">user_passwords</a>·option·in·the·SSH·daemon.·It
214 could·be·replaced·with·a·<a·href="ssh.html#option-pwdfun">pwdfun</a>·plugin.·The·arity214 could·be·replaced·with·a·<a·href="ssh.html#option-pwdfun">pwdfun</a>·plugin.·The·arity
215 four·variant·(<a·href="ssh.html#t:pwdfun_4/0"><code·class="inline">pwdfun_4()</code></a>)·can·also·be·used·for215 four·variant·(<a·href="ssh.html#t:pwdfun_4/0"><code·class="inline">pwdfun_4()</code></a>)·can·also·be·used·for
216 introducing·delays·after·failed·password·checking·attempts.·Here·is·a·simple216 introducing·delays·after·failed·password·checking·attempts.·Here·is·a·simple
217 example·of·such·a·pwdfun:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="1098462604-1">(</span><span·class="n">User</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">PeerAddress</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·0fea7845902914759a2a169a96c1c766e557196d9e4a2c9ee56fb2559d59a8a3·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">217 example·of·such·a·pwdfun:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="5938510923-1">(</span><span·class="n">User</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">PeerAddress</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·e0e9c57f14bb8f33d3903aafe4ed10b6a178ea515a03c84b13868bb2e02e615d·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
218 ········</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="1098462604-2">(</span><span·class="p"·data-group-id="1098462604-3">{</span><span·class="n">User</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="1098462604-3">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·185,·SHA:·625b55d16bf88ed632d76419e799ba8f8aa60e46d007dd1c0dfc323c1fb31bac·...·]-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">218 ········</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="5938510923-2">(</span><span·class="p"·data-group-id="5938510923-3">{</span><span·class="n">User</span><span·class="p">,</span><span·class="n">Password</span><span·class="p"·data-group-id="5938510923-3">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·185,·SHA:·a416c426498335b5398c86700a50f4137e1346f0be4fad85422e8889b8b04be9·...·]-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
219 ············</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">219 ············</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
220 ················</span><span·class="p"·data-group-id="1098462604-5">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p"·data-group-id="1098462604-5">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·Reset·delay·time</span><span·class="w">220 ················</span><span·class="p"·data-group-id="5938510923-5">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p"·data-group-id="5938510923-5">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·Reset·delay·time</span><span·class="w">
221 ············</span><span·class="ss">false</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">State</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 ············</span><span·class="ss">false</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">State</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 ················</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">sleep</span><span·class="p"·data-group-id="1098462604-6">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="1098462604-6">)</span><span·class="p">,</span><span·class="w">222 ················</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">sleep</span><span·class="p"·data-group-id="5938510923-6">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="5938510923-6">)</span><span·class="p">,</span><span·class="w">
223 ················</span><span·class="p"·data-group-id="1098462604-7">{</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2000</span><span·class="p"·data-group-id="1098462604-7">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·Next·delay·is·2000·ms</span><span·class="w">223 ················</span><span·class="p"·data-group-id="5938510923-7">{</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2000</span><span·class="p"·data-group-id="5938510923-7">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·Next·delay·is·2000·ms</span><span·class="w">
224 ············</span><span·class="ss">false</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="1098462604-8">(</span><span·class="n">State</span><span·class="p"·data-group-id="1098462604-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">224 ············</span><span·class="ss">false</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_integer</span><span·class="p"·data-group-id="5938510923-8">(</span><span·class="n">State</span><span·class="p"·data-group-id="5938510923-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
225 ················</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">sleep</span><span·class="p"·data-group-id="1098462604-9">(</span><span·class="n">State</span><span·class="p"·data-group-id="1098462604-9">)</span><span·class="p">,</span><span·class="w">225 ················</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">sleep</span><span·class="p"·data-group-id="5938510923-9">(</span><span·class="n">State</span><span·class="p"·data-group-id="5938510923-9">)</span><span·class="p">,</span><span·class="w">
226 ················</span><span·class="p"·data-group-id="1098462604-10">{</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="o">*</span><span·class="n">State</span><span·class="p"·data-group-id="1098462604-10">}</span><span·class="w">·</span><span·class="c1">%·Double·the·delay·for·each·failure</span><span·class="w">226 ················</span><span·class="p"·data-group-id="5938510923-10">{</span><span·class="ss">false</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="o">*</span><span·class="n">State</span><span·class="p"·data-group-id="5938510923-10">}</span><span·class="w">·</span><span·class="c1">%·Double·the·delay·for·each·failure</span><span·class="w">
227 ········</span><span·class="k">end</span><span·class="w">227 ········</span><span·class="k">end</span><span·class="w">
228 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>If·a·public·key·is·used·for·logging·in,·there·is·normally·no·checking·of·the228 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>If·a·public·key·is·used·for·logging·in,·there·is·normally·no·checking·of·the
229 user·name.·It·could·be·enabled·by·setting·the·option229 user·name.·It·could·be·enabled·by·setting·the·option
230 <a·href="ssh.html#option-pk_check_user"><code·class="inline">pk_check_user</code></a>·to·<code·class="inline">true</code>.·In·that·case·the230 <a·href="ssh.html#option-pk_check_user"><code·class="inline">pk_check_user</code></a>·to·<code·class="inline">true</code>.·In·that·case·the
231 pwdfun·will·get·the·atom·<code·class="inline">pubkey</code>·in·the·password·argument.</p></li></ul><h2·id="hardening-in-the-cryptographic-area"·class="section-heading">231 pwdfun·will·get·the·atom·<code·class="inline">pubkey</code>·in·the·password·argument.</p></li></ul><h2·id="hardening-in-the-cryptographic-area"·class="section-heading">
232 ··<a·href="#hardening-in-the-cryptographic-area"·class="hover-link">232 ··<a·href="#hardening-in-the-cryptographic-area"·class="hover-link">
233 ····<i·class="ri-link-m"·aria-hidden="true"></i>233 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 288, 15 lines modifiedOffset 288, 15 lines modified
288 ··<span·class="text">The·id·string</span>288 ··<span·class="text">The·id·string</span>
289 </h3>289 </h3>
290 <p>One·way·to·reduce·the·risk·of·intrusion·is·to·not·convey·which·software·and290 <p>One·way·to·reduce·the·risk·of·intrusion·is·to·not·convey·which·software·and
291 which·version·the·intruder·is·connected·to.·This·limits·the·risk·of·an·intruder291 which·version·the·intruder·is·connected·to.·This·limits·the·risk·of·an·intruder
292 exploiting·known·faults·or·peculiarities·learned·by·reading·the·public·code.</p><p>Each·SSH·client·or·daemon·presents·themselves·to·each·other·with·brand·and292 exploiting·known·faults·or·peculiarities·learned·by·reading·the·public·code.</p><p>Each·SSH·client·or·daemon·presents·themselves·to·each·other·with·brand·and
293 version.·This·may·look·like</p><pre><code·class="text">SSH-2.0-Erlang/4.10</code></pre><p>or</p><pre><code·class="text">SSH-2.0-OpenSSH_7.6p1·Ubuntu-4ubuntu0.3</code></pre><p>This·brand·and·version·may·be·changed·with·the·option293 version.·This·may·look·like</p><pre><code·class="text">SSH-2.0-Erlang/4.10</code></pre><p>or</p><pre><code·class="text">SSH-2.0-OpenSSH_7.6p1·Ubuntu-4ubuntu0.3</code></pre><p>This·brand·and·version·may·be·changed·with·the·option
294 <a·href="ssh.html#t:id_string_common_option/0">id_string</a>.·We·start·a·daemon·with·that294 <a·href="ssh.html#t:id_string_common_option/0">id_string</a>.·We·start·a·daemon·with·that
295 option:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">daemon</span><span·class="p"·data-group-id="1720379025-1">(</span><span·class="mi">1234</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1720379025-2">[</span><span·class="p"·data-group-id="1720379025-3">{</span><span·class="ss">id_string</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·339,·SHA:·2d1bb8c883fbdde111dc0bb23a49f8d58c548ebacdd6868d7c985897ecf00673·...·]-1">)</span><span·class="p">.</span></code></pre><p>and·the·daemon·will·present·itself·as:</p><pre><code·class="text">SSH-2.0-hi·there</code></pre><p>It·is·possible·to·replace·the·string·with·one·randomly·generated·for·each295 option:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">daemon</span><span·class="p"·data-group-id="3578355594-1">(</span><span·class="mi">1234</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3578355594-2">[</span><span·class="p"·data-group-id="3578355594-3">{</span><span·class="ss">id_string</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·339,·SHA:·769bdf3335fcbdde443ae65d74bcde4bbad7ea348e63d2d8a2e99b51b11a6559·...·]-1">)</span><span·class="p">.</span></code></pre><p>and·the·daemon·will·present·itself·as:</p><pre><code·class="text">SSH-2.0-hi·there</code></pre><p>It·is·possible·to·replace·the·string·with·one·randomly·generated·for·each
296 connection·attempt.·See·the·reference·manual·for296 connection·attempt.·See·the·reference·manual·for
297 <a·href="ssh.html#t:id_string_common_option/0">id_string</a>.</p><h2·id="client-connection-options"·class="section-heading">297 <a·href="ssh.html#t:id_string_common_option/0">id_string</a>.</p><h2·id="client-connection-options"·class="section-heading">
298 ··<a·href="#client-connection-options"·class="hover-link">298 ··<a·href="#client-connection-options"·class="hover-link">
299 ····<i·class="ri-link-m"·aria-hidden="true"></i>299 ····<i·class="ri-link-m"·aria-hidden="true"></i>
300 ··</a>300 ··</a>
301 ··<span·class="text">Client·connection·options</span>301 ··<span·class="text">Client·connection·options</span>
302 </h2>302 </h2>
624 B
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-8ECD707F.js"></script>124 <script·src="dist/search_data-86E587B3.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
501 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/ssh.epub
4.57 KB
zipinfo {}
Max HTML report size reached
77.9 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
203 KB
OEBPS/using_ssh.xhtml
Max HTML report size reached
4.58 KB
OEBPS/ssh_agent.xhtml
Max HTML report size reached
13.3 KB
OEBPS/ssh.xhtml
Max HTML report size reached
11.1 KB
OEBPS/hardening.xhtml
Max HTML report size reached
1.2 KB
OEBPS/content.opf
1.17 KB
OEBPS/content.opf
Max HTML report size reached
124 KB
OEBPS/configure_algos.xhtml
Max HTML report size reached
61.2 KB
OEBPS/configurations.xhtml
Max HTML report size reached
13.4 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/ssh.html
    
Offset 3651, 22 lines modifiedOffset 3651, 22 lines modified
  
3651 ··········<pre·translate="no"><span·class="attribute">-type</span>·double_algs(AlgType)·::·[{client2server,·[AlgType]}·|·{server2client,·[AlgType]}]·|·[AlgType].</pre>3651 ··········<pre·translate="no"><span·class="attribute">-type</span>·double_algs(AlgType)·::·[{client2server,·[AlgType]}·|·{server2client,·[AlgType]}]·|·[AlgType].</pre>
  
3652 ······</div>3652 ······</div>
  
3653 <p>List·of·algorithms·to·use·in·the·algorithm·negotiation.·The·default3653 <p>List·of·algorithms·to·use·in·the·algorithm·negotiation.·The·default
3654 <a·href="#t:algs_list/0"><code·class="inline">algs_list/0</code></a>·can·be·obtained·from·<a·href="#default_algorithms/0"><code·class="inline">default_algorithms/0</code></a>.</p><p>If·an·alg_entry()·is·missing·in·the·algs_list(),·the·default·value·is·used·for3654 <a·href="#t:algs_list/0"><code·class="inline">algs_list/0</code></a>·can·be·obtained·from·<a·href="#default_algorithms/0"><code·class="inline">default_algorithms/0</code></a>.</p><p>If·an·alg_entry()·is·missing·in·the·algs_list(),·the·default·value·is·used·for
3655 that·entry.</p><p>Here·is·an·example·of·this·option:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»  ··</span><span·class="p"·data-group-id="5108473248-1">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">3655 that·entry.</p><p>Here·is·an·example·of·this·option:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">»  ··</span><span·class="p"·data-group-id="8254921537-1">{</span><span·class="ss">preferred_algorithms</span><span·class="p">,</span><span·class="w">
3656 »       ··</span><span·class="p"·data-group-id="5108473248-2">[</span><span·class="p"·data-group-id="5108473248-3">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="5108473248-4">[</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·130,·SHA:·04a2f140a4f8521d38b3fc4f5887c390638d4e7b4c8eda8f8490aec486e92949·...·]-3">}</span><span·class="p">,</span><span·class="w">3656 »       ··</span><span·class="p"·data-group-id="8254921537-2">[</span><span·class="p"·data-group-id="8254921537-3">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="p"·data-group-id="8254921537-4">[</span><span·class="ss">&#39;ssh-rsa&#39;</span><span·class="p">,</span><span[·...·truncated·by·diffoscope;·len:·130,·SHA:·4dc127a414f5b33487b61cc265154ff79da13beca1d02ec6494111290a6f52a0·...·]-3">}</span><span·class="p">,</span><span·class="w">
3657 »       ··</span><span·class="p"·data-group-id="5108473248-5">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="5108473248-6">[</span><span·class="p"·data-group-id="5108473248-7">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·178,·SHA:·f6e71eeb4747eb17edcad2ccd371056a498fcc3ebd40e71986489fb50b1745b4·...·]-7">}</span><span·class="p">,</span><span·class="w">3657 »       ··</span><span·class="p"·data-group-id="8254921537-5">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="p"·data-group-id="8254921537-6">[</span><span·class="p"·data-group-id="8254921537-7">{</span><span·class="ss">client2server</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·178,·SHA:·fc73fd4b3dad441283abd847ead5181d3a55303a2f3a1b0c24f40ca481a6441a·...·]-7">}</span><span·class="p">,</span><span·class="w">
3658 ··········</span><span·class="p"·data-group-id="5108473248-9">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="5108473248-10">[</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·cla[·...·truncated·by·diffoscope;·len:·192,·SHA:·91dfdf6f9b85ffa8fc322e8cdc9f6790832718ff56e16a94f058401c5640097e·...·]-5">}</span><span·class="p">,</span><span·class="w">3658 ··········</span><span·class="p"·data-group-id="8254921537-9">{</span><span·class="ss">server2client</span><span·class="p">,</span><span·class="p"·data-group-id="8254921537-10">[</span><span·class="ss">&#39;aes128-cbc&#39;</span><span·class="p">,</span><span·class="ss">&#39;3des-cbc&#39;</span><span·cla[·...·truncated·by·diffoscope;·len:·192,·SHA:·d6cbcb69b9b11dcb080ffeef7182a8d868e041ff6d95e24a390f6d4b36c948b0·...·]-5">}</span><span·class="p">,</span><span·class="w">
3659 »       ··</span><span·class="p"·data-group-id="5108473248-11">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="5108473248-12">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p[·...·truncated·by·diffoscope;·len:·81,·SHA:·fde171c1587d17e545c6a6eae3f7d467df26419ad18a73a08bd6d9a4e6ac5067·...·]-11">}</span><span·class="p">,</span><span·class="w">3659 »       ··</span><span·class="p"·data-group-id="8254921537-11">{</span><span·class="ss">mac</span><span·class="p">,</span><span·class="p"·data-group-id="8254921537-12">[</span><span·class="ss">&#39;hmac-sha2-256&#39;</span><span·class="p">,</span><span·class="ss">&#39;hmac-sha1&#39;</span><span·class="p[·...·truncated·by·diffoscope;·len:·81,·SHA:·b925dad45430f6a622b4fcf13722e5da5e9252a36351afbb43b771a5da8d43d8·...·]-11">}</span><span·class="p">,</span><span·class="w">
3660 »       ··</span><span·class="p"·data-group-id="5108473248-13">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="5108473248-14">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">zlib</span><span·class="p"·data-group-id="510847324[·...·truncated·by·diffoscope;·len:·55,·SHA:·efcead24912806fdb55e16f6e3b12a79af9dbdc5d314b7686ca568ebd014542e·...·]-13">}</span><span·class="w">3660 »       ··</span><span·class="p"·data-group-id="8254921537-13">{</span><span·class="ss">compression</span><span·class="p">,</span><span·class="p"·data-group-id="8254921537-14">[</span><span·class="ss">none</span><span·class="p">,</span><span·class="ss">zlib</span><span·class="p"·data-group-id="825492153[·...·truncated·by·diffoscope;·len:·55,·SHA:·b8215b6fd5ac4caad9d3fb786f2c9602669d792f3b935ca9569a663341a64ab8·...·]-13">}</span><span·class="w">
3661 »       ··</span><span·class="p"·data-group-id="5108473248-2">]</span><span·class="w">3661 »       ··</span><span·class="p"·data-group-id="8254921537-2">]</span><span·class="w">
3662 »       ··</span><span·class="p"·data-group-id="5108473248-1">}</span></code></pre><p>The·example·specifies·different·algorithms·in·the·two·directions·(client2server3662 »       ··</span><span·class="p"·data-group-id="8254921537-1">}</span></code></pre><p>The·example·specifies·different·algorithms·in·the·two·directions·(client2server
3663 and·server2client),·for·cipher·but·specifies·the·same·algorithms·for·mac·and3663 and·server2client),·for·cipher·but·specifies·the·same·algorithms·for·mac·and
3664 compression·in·both·directions.·The·kex·(key·exchange)·is·implicit·but3664 compression·in·both·directions.·The·kex·(key·exchange)·is·implicit·but
3665 public_key·is·set·explicitly.</p><p>For·background·and·more·examples·see·the3665 public_key·is·set·explicitly.</p><p>For·background·and·more·examples·see·the
3666 <a·href="configure_algos.html#introduction">User's·Guide</a>.</p><p>If·an·algorithm·name·occurs·more·than·once·in·a·list,·the·behaviour·is3666 <a·href="configure_algos.html#introduction">User's·Guide</a>.</p><p>If·an·algorithm·name·occurs·more·than·once·in·a·list,·the·behaviour·is
3667 undefined.·The·tags·in·the·property·lists·are·also·assumed·to·occur·at·most·one3667 undefined.·The·tags·in·the·property·lists·are·also·assumed·to·occur·at·most·one
3668 time.</p><blockquote><h4·class="warning">Warning</h4><p>Changing·the·values·can·make·a·connection·less·secure.·Do·not·change·unless3668 time.</p><blockquote><h4·class="warning">Warning</h4><p>Changing·the·values·can·make·a·connection·less·secure.·Do·not·change·unless
3669 you·know·exactly·what·you·are·doing.·If·you·do·not·understand·the·values·then3669 you·know·exactly·what·you·are·doing.·If·you·do·not·understand·the·values·then
Offset 5555, 29 lines modifiedOffset 5555, 29 lines modified
5555 ·································StringOrString·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()].</pre>5555 ·································StringOrString·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()·|·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()].</pre>
  
5556 ······</div>5556 ······</div>
  
5557 <p>hostkey_fingerprint([DigestType],·HostKey)·-&gt;5557 <p>hostkey_fingerprint([DigestType],·HostKey)·-&gt;
5558 [string()]hostkey_fingerprint(DigestType,·HostKey)·-&gt;·string()</p><p>Calculates·a·ssh·fingerprint·from·a·public·host·key·as·openssh·does.</p><p>The·algorithm·in·<a·href="#hostkey_fingerprint/1"><code·class="inline">hostkey_fingerprint/1</code></a>·is·md5·to·be5558 [string()]hostkey_fingerprint(DigestType,·HostKey)·-&gt;·string()</p><p>Calculates·a·ssh·fingerprint·from·a·public·host·key·as·openssh·does.</p><p>The·algorithm·in·<a·href="#hostkey_fingerprint/1"><code·class="inline">hostkey_fingerprint/1</code></a>·is·md5·to·be
5559 compatible·with·older·ssh-keygen·commands.·The·string·from·the·second·variant·is5559 compatible·with·older·ssh-keygen·commands.·The·string·from·the·second·variant·is
5560 prepended·by·the·algorithm·name·in·uppercase·as·in·newer·ssh-keygen·commands.</p><p>Examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="9945709285-1">(</span><span·class="n">Key</span><span·class="p"·data-group-id="9945709285-1">)</span><span·class="p">.</span><span·class="w">5560 prepended·by·the·algorithm·name·in·uppercase·as·in·newer·ssh-keygen·commands.</p><p>Examples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="2866921882-1">(</span><span·class="n">Key</span><span·class="p"·data-group-id="2866921882-1">)</span><span·class="p">.</span><span·class="w">
5561 ·</span><span·class="s">&quot;f5:64:a6:c1:5a:cb:9f:0a:10:46:a2:5c:3e:2f:57:84&quot;</span><span·class="w">5561 ·</span><span·class="s">&quot;f5:64:a6:c1:5a:cb:9f:0a:10:46:a2:5c:3e:2f:57:84&quot;</span><span·class="w">
  
5562 ·</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="9945709285-2">(</span><span·class="nb">md5</span><span·class="p">,</span><span·class="n">Key</span><span·class="p"·data-group-id="9945709285-2">)</span><span·class="p">.</span><span·class="w">5562 ·</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="2866921882-2">(</span><span·class="nb">md5</span><span·class="p">,</span><span·class="n">Key</span><span·class="p"·data-group-id="2866921882-2">)</span><span·class="p">.</span><span·class="w">
5563 ·</span><span·class="s">&quot;MD5:f5:64:a6:c1:5a:cb:9f:0a:10:46:a2:5c:3e:2f:57:84&quot;</span><span·class="w">5563 ·</span><span·class="s">&quot;MD5:f5:64:a6:c1:5a:cb:9f:0a:10:46:a2:5c:3e:2f:57:84&quot;</span><span·class="w">
  
5564 ·</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="9945709285-3">(</span><span·class="ss">sha</span><span·class="p">,</span><span·class="n">Key</span><span·class="p"·data-group-id="9945709285-3">)</span><span·class="p">.</span><span·class="w">5564 ·</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="2866921882-3">(</span><span·class="ss">sha</span><span·class="p">,</span><span·class="n">Key</span><span·class="p"·data-group-id="2866921882-3">)</span><span·class="p">.</span><span·class="w">
5565 ·</span><span·class="s">&quot;SHA1:bSLY/C4QXLDL/Iwmhyg0PGW9UbY&quot;</span><span·class="w">5565 ·</span><span·class="s">&quot;SHA1:bSLY/C4QXLDL/Iwmhyg0PGW9UbY&quot;</span><span·class="w">
  
5566 ·</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="9945709285-4">(</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="n">Key</span><span·class="p"·data-group-id="9945709285-4">)</span><span·class="p">.</span><span·class="w">5566 ·</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="2866921882-4">(</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="n">Key</span><span·class="p"·data-group-id="2866921882-4">)</span><span·class="p">.</span><span·class="w">
5567 ·</span><span·class="s">&quot;SHA256:aZGXhabfbf4oxglxltItWeHU7ub3Dc31NcNw2cMJePQ&quot;</span><span·class="w">5567 ·</span><span·class="s">&quot;SHA256:aZGXhabfbf4oxglxltItWeHU7ub3Dc31NcNw2cMJePQ&quot;</span><span·class="w">
  
5568 ·</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="9945709285-5">(</span><span·class="p"·data-group-id="9945709285-6">[</span><span·class="ss">sha</span><span·class="p">,</span><span·class="ss">sha256</span><span·class="p"·data-group-id="9945709285-6">]</span><span·class="p">,</span><span·class="n">Key</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·8a0018afe05c45a4ce8b7267c38797b6a6a997e7d7b58b5c16df6ddb882b3fa3·...·]-5">)</span><span·class="p">.</span><span·class="w">5568 ·</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">hostkey_fingerprint</span><span·class="p"·data-group-id="2866921882-5">(</span><span·class="p"·data-group-id="2866921882-6">[</span><span·class="ss">sha</span><span·class="p">,</span><span·class="ss">sha256</span><span·class="p"·data-group-id="2866921882-6">]</span><span·class="p">,</span><span·class="n">Key</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·720e36dd6e9bf522c3207dacb85dc2840e548207ea26ae440a056b3b7ff8ac83·...·]-5">)</span><span·class="p">.</span><span·class="w">
5569 ·</span><span·class="p"·data-group-id="9945709285-7">[</span><span·class="s">&quot;SHA1:bSLY/C4QXLDL/Iwmhyg0PGW9UbY&quot;</span><span·class="p">,</span><span·class="w">5569 ·</span><span·class="p"·data-group-id="2866921882-7">[</span><span·class="s">&quot;SHA1:bSLY/C4QXLDL/Iwmhyg0PGW9UbY&quot;</span><span·class="p">,</span><span·class="w">
5570 ··</span><span·class="s">&quot;SHA256:aZGXhabfbf4oxglxltItWeHU7ub3Dc31NcNw2cMJePQ&quot;</span><span·class="p"·data-group-id="9945709285-7">]</span></code></pre>5570 ··</span><span·class="s">&quot;SHA256:aZGXhabfbf4oxglxltItWeHU7ub3Dc31NcNw2cMJePQ&quot;</span><span·class="p"·data-group-id="2866921882-7">]</span></code></pre>
5571 ··</section>5571 ··</section>
5572 </section>5572 </section>
5573 <section·class="detail"·id="set_sock_opts/2">5573 <section·class="detail"·id="set_sock_opts/2">
  
5574 ··<div·class="detail-header">5574 ··<div·class="detail-header">
5575 ····<a·href="#set_sock_opts/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">5575 ····<a·href="#set_sock_opts/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
5576 ······<i·class="ri-link-m"·aria-hidden="true"></i>5576 ······<i·class="ri-link-m"·aria-hidden="true"></i>
4.57 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/ssh_agent.html
    
Offset 131, 19 lines modifiedOffset 131, 19 lines modified
131 <p>Callback·module·for·using·an·SSH·agent·instead·of·the·default·ssh_file·callback.</p><p>This·module·defines·a·callback·handler·for·the·communication·with·an131 <p>Callback·module·for·using·an·SSH·agent·instead·of·the·default·ssh_file·callback.</p><p>This·module·defines·a·callback·handler·for·the·communication·with·an
132 <a·href="https://tools.ietf.org/html/draft-miller-ssh-agent-02">SSH·Agent</a>·and·can·be132 <a·href="https://tools.ietf.org/html/draft-miller-ssh-agent-02">SSH·Agent</a>·and·can·be
133 used·to·replace·the·<a·href="ssh_file.html">default·callback</a>.·This·allows·to·issue133 used·to·replace·the·<a·href="ssh_file.html">default·callback</a>.·This·allows·to·issue
134 signing·requests·to·an·agent·that·stores·SSH·private·keys·to·perform134 signing·requests·to·an·agent·that·stores·SSH·private·keys·to·perform
135 authentication.</p><p>Ssh_agent·implements·the·<a·href="ssh_client_key_api.html"><code·class="inline">ssh_client_key_api</code></a>,·to·allow·it·to·be·used·by135 authentication.</p><p>Ssh_agent·implements·the·<a·href="ssh_client_key_api.html"><code·class="inline">ssh_client_key_api</code></a>,·to·allow·it·to·be·used·by
136 setting·the·option·<a·href="ssh.html#t:key_cb_common_option/0"><code·class="inline">key_cb</code></a>·when·starting·a136 setting·the·option·<a·href="ssh.html#t:key_cb_common_option/0"><code·class="inline">key_cb</code></a>·when·starting·a
137 client·(with·for·example·<a·href="ssh.html#connect/3">ssh:connect</a>,137 client·(with·for·example·<a·href="ssh.html#connect/3">ssh:connect</a>,
138 <a·href="ssh.html#shell/1">ssh:shell</a>·).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="0844622563-1">{</span><span·class="ss">key_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0844622563-2">{</span><span·class="ss">ssh_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·178,·SHA:·d95e349b9901a460ec8e1e99cd01bcdb1eeb823230a338bbfcb679d2786eafb2·...·]-1">}</span></code></pre><p>The·agent·communication·is·established·through·a·UNIX·domain·socket.·By·default,138 <a·href="ssh.html#shell/1">ssh:shell</a>·).</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="4157120684-1">{</span><span·class="ss">key_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4157120684-2">{</span><span·class="ss">ssh_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·178,·SHA:·41210af4a5576183c95c2622276ff9ac21c1f8aa85b9240223cbfe8a6b655902·...·]-1">}</span></code></pre><p>The·agent·communication·is·established·through·a·UNIX·domain·socket.·By·default,
139 the·socket·path·will·be·fetched·from·the·<code·class="inline">SSH_AUTH_SOCK</code>·environment·variable,139 the·socket·path·will·be·fetched·from·the·<code·class="inline">SSH_AUTH_SOCK</code>·environment·variable,
140 which·is·the·default·socket·path·in·the·agent·implementation·of140 which·is·the·default·socket·path·in·the·agent·implementation·of
141 <a·href="http://www.openssh.com">OpenSSH</a>.</p><p><a·href=""·id="SOCKET_PATH"></a>·In·order·to·set·a·different·socket·path·the·<code·class="inline">socket_path</code>141 <a·href="http://www.openssh.com">OpenSSH</a>.</p><p><a·href=""·id="SOCKET_PATH"></a>·In·order·to·set·a·different·socket·path·the·<code·class="inline">socket_path</code>
142 option·can·be·set.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="5398441251-1">{</span><span·class="ss">key_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5398441251-2">{</span><span·class="ss">ssh_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·400,·SHA:·c7fc3fc97c5c6d52ff1ffb2e44c30720784aeaf2f81081dc48eb98b38798dd27·...·]-1">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>The·functions·are·<em>Callbacks</em>·for·the·SSH·app.·They·are·not·intended·to·be142 option·can·be·set.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="3014775005-1">{</span><span·class="ss">key_cb</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3014775005-2">{</span><span·class="ss">ssh_agent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·400,·SHA:·d2ec85c62b9cb9c1621272f6122e664dff79bd8b6e47ee6933be0a768e1cb4a6·...·]-1">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>The·functions·are·<em>Callbacks</em>·for·the·SSH·app.·They·are·not·intended·to·be
143 called·from·the·user's·code!</p></blockquote>143 called·from·the·user's·code!</p></blockquote>
144 ····</section>144 ····</section>
  
145 </div>145 </div>
  
146 ··<section·id="summary"·class="details-list">146 ··<section·id="summary"·class="details-list">
147 ····<h1·class="section-heading">147 ····<h1·class="section-heading">
203 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/using_ssh.html
    
Offset 136, 17 lines modifiedOffset 136, 17 lines modified
136 user-interaction.</p><h2·id="using-the-erlang-ssh-terminal-client"·class="section-heading">136 user-interaction.</p><h2·id="using-the-erlang-ssh-terminal-client"·class="section-heading">
137 ··<a·href="#using-the-erlang-ssh-terminal-client"·class="hover-link">137 ··<a·href="#using-the-erlang-ssh-terminal-client"·class="hover-link">
138 ····<i·class="ri-link-m"·aria-hidden="true"></i>138 ····<i·class="ri-link-m"·aria-hidden="true"></i>
139 ··</a>139 ··</a>
140 ··<span·class="text">Using·the·Erlang·ssh·Terminal·Client</span>140 ··<span·class="text">Using·the·Erlang·ssh·Terminal·Client</span>
141 </h2>141 </h2>
142 <p>The·user·<code·class="inline">otptest</code>,·which·has·bash·as·default·shell,·uses·the·<a·href="ssh.html#shell/1"><code·class="inline">ssh:shell/1</code></a>142 <p>The·user·<code·class="inline">otptest</code>,·which·has·bash·as·default·shell,·uses·the·<a·href="ssh.html#shell/1"><code·class="inline">ssh:shell/1</code></a>
143 client·to·connect·to·the·<strong>OpenSSH</strong>·daemon·running·on·a·host·called·<strong>ssh.example.com</strong>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9134991330-1">(</span><span·class="p"·data-group-id="9134991330-1">)</span><span·class="p">.</span><span·class="w">143 client·to·connect·to·the·<strong>OpenSSH</strong>·daemon·running·on·a·host·called·<strong>ssh.example.com</strong>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8750014892-1">(</span><span·class="p"·data-group-id="8750014892-1">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="ss">ok</span><span·class="gp·unselectable">144 </span><span·class="ss">ok</span><span·class="gp·unselectable">
145 2&gt;·</span><span·class="p"·data-group-id="9134991330-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class="p"·data-group-id="9134991330-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·213,·SHA:·a75048a3b1f42371b18eb876b0ece75c09a6e9dffaf6a0ea44392a96d5d2fcbf·...·]-3">)</span><span·class="p">.</span><span·class="w">145 2&gt;·</span><span·class="p"·data-group-id="8750014892-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class="p"·data-group-id="8750014892-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·213,·SHA:·ad2d248c971d7b6c56971c12f0ad6b800cb280f371411b496ffd7b4019291256·...·]-3">)</span><span·class="p">.</span><span·class="w">
146 </span><span·class="ss">otptest@ssh</span><span·class="p">.</span><span·class="ss">example</span><span·class="p">.</span><span·class="nc">com</span><span·class="p">:</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">pwd</span><span·class="w">146 </span><span·class="ss">otptest@ssh</span><span·class="p">.</span><span·class="ss">example</span><span·class="p">.</span><span·class="nc">com</span><span·class="p">:</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">pwd</span><span·class="w">
147 </span><span·class="o">/</span><span·class="ss">home</span><span·class="o">/</span><span·class="ss">otptest</span><span·class="w">147 </span><span·class="o">/</span><span·class="ss">home</span><span·class="o">/</span><span·class="ss">otptest</span><span·class="w">
148 </span><span·class="ss">otptest@ssh</span><span·class="p">.</span><span·class="ss">example</span><span·class="p">.</span><span·class="nc">com</span><span·class="p">:</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nb">exit</span><span·class="w">148 </span><span·class="ss">otptest@ssh</span><span·class="p">.</span><span·class="ss">example</span><span·class="p">.</span><span·class="nc">com</span><span·class="p">:</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nb">exit</span><span·class="w">
149 </span><span·class="ss">logout</span><span·class="w">149 </span><span·class="ss">logout</span><span·class="w">
150 </span><span·class="mi">3</span><span·class="o">&gt;</span></code></pre><h2·id="running-an-erlang-ssh-daemon"·class="section-heading">150 </span><span·class="mi">3</span><span·class="o">&gt;</span></code></pre><h2·id="running-an-erlang-ssh-daemon"·class="section-heading">
151 ··<a·href="#running-an-erlang-ssh-daemon"·class="hover-link">151 ··<a·href="#running-an-erlang-ssh-daemon"·class="hover-link">
152 ····<i·class="ri-link-m"·aria-hidden="true"></i>152 ····<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 157, 33 lines modifiedOffset 157, 33 lines modified
157 directory·containing·a·host·key·file·and·it·defaults·to·<code·class="inline">/etc/ssh</code>.·For·details,157 directory·containing·a·host·key·file·and·it·defaults·to·<code·class="inline">/etc/ssh</code>.·For·details,
158 see·Section·Configuration·in·<a·href="ssh_app.html">ssh</a>.</p><blockquote><h4·class="info">Note</h4><p>Normally,·the·<code·class="inline">/etc/ssh</code>·directory·is·only·readable·by·root.</p></blockquote><p>The·option·<a·href="ssh_file.html#t:user_dir_common_option/0"><code·class="inline">user_dir</code></a>·defaults·to158 see·Section·Configuration·in·<a·href="ssh_app.html">ssh</a>.</p><blockquote><h4·class="info">Note</h4><p>Normally,·the·<code·class="inline">/etc/ssh</code>·directory·is·only·readable·by·root.</p></blockquote><p>The·option·<a·href="ssh_file.html#t:user_dir_common_option/0"><code·class="inline">user_dir</code></a>·defaults·to
159 directory·<code·class="inline">~/.ssh</code>.</p><p><em>Step·1.</em>·To·run·the·example·without·root·privileges,·generate·new·keys·and·host159 directory·<code·class="inline">~/.ssh</code>.</p><p><em>Step·1.</em>·To·run·the·example·without·root·privileges,·generate·new·keys·and·host
160 keys:</p><pre><code·class="text">$bash&gt;·ssh-keygen·-t·rsa·-f·/tmp/ssh_daemon/ssh_host_rsa_key160 keys:</p><pre><code·class="text">$bash&gt;·ssh-keygen·-t·rsa·-f·/tmp/ssh_daemon/ssh_host_rsa_key
161 [...]161 [...]
162 $bash&gt;·ssh-keygen·-t·rsa·-f·/tmp/otptest_user/.ssh/id_rsa162 $bash&gt;·ssh-keygen·-t·rsa·-f·/tmp/otptest_user/.ssh/id_rsa
163 [...]</code></pre><p><em>Step·2.</em>·Create·the·file·<code·class="inline">/tmp/otptest_user/.ssh/authorized_keys</code>·and·add·the163 [...]</code></pre><p><em>Step·2.</em>·Create·the·file·<code·class="inline">/tmp/otptest_user/.ssh/authorized_keys</code>·and·add·the
164 content·of·<code·class="inline">/tmp/otptest_user/.ssh/id_rsa.pub</code>.</p><p><a·href=""·id="start-daemon-step3"></a></p><p><em>Step·3.</em>·Start·the·Erlang·<code·class="inline">ssh</code>·daemon:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2012099563-1">(</span><span·class="p"·data-group-id="2012099563-1">)</span><span·class="p">.</span><span·class="w">164 content·of·<code·class="inline">/tmp/otptest_user/.ssh/id_rsa.pub</code>.</p><p><a·href=""·id="start-daemon-step3"></a></p><p><em>Step·3.</em>·Start·the·Erlang·<code·class="inline">ssh</code>·daemon:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9900906488-1">(</span><span·class="p"·data-group-id="9900906488-1">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="ss">ok</span><span·class="gp·unselectable">165 </span><span·class="ss">ok</span><span·class="gp·unselectable">
166 2&gt;·</span><span·class="p"·data-group-id="2012099563-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sshd</span><span·class="p"·data-group-id="2012099563-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·481,·SHA:·cd7a354dce4684a9dcd5708fe555b035e46b2b4d81ad85e2844657641cd84e9c·...·]-5">}</span><span·class="p">,</span><span·class="w">166 2&gt;·</span><span·class="p"·data-group-id="9900906488-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sshd</span><span·class="p"·data-group-id="9900906488-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·481,·SHA:·22b6cf69401d9d27cb034275ca8a64d4d57471d4612ed2961aa84eaa8fad5978·...·]-5">}</span><span·class="p">,</span><span·class="w">
167 ··································</span><span·class="p"·data-group-id="2012099563-6">{</span><span·class="ss">user_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/otptest_user/.ssh&quot;</span><span·class="p"·data-group-id="2012099563-6">}</span><span·class="p"·data-group-id="2012099563-4"[·...·truncated·by·diffoscope;·len:·50,·SHA:·f664b06067a00680b1c02604a09954768a03eee524e795cf46efd350a305b0f5·...·]-3">)</span><span·class="p">.</span><span·class="w">167 ··································</span><span·class="p"·data-group-id="9900906488-6">{</span><span·class="ss">user_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/tmp/otptest_user/.ssh&quot;</span><span·class="p"·data-group-id="9900906488-6">}</span><span·class="p"·data-group-id="9900906488-4"[·...·truncated·by·diffoscope;·len:·50,·SHA:·df909c47f042fcd4d2408540853dd73d8244edc2c6e22dc0cbc627fc184f8832·...·]-3">)</span><span·class="p">.</span><span·class="w">
168 </span><span·class="p"·data-group-id="2012099563-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.54</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2012099563-7">}</span><span·class="w">168 </span><span·class="p"·data-group-id="9900906488-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.54</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9900906488-7">}</span><span·class="w">
169 </span><span·class="mi">3</span><span·class="o">&gt;</span></code></pre><p><em>Step·4.</em>·Use·the·<strong>OpenSSH</strong>·client·from·a·shell·to·connect·to·the·Erlang·<code·class="inline">ssh</code>169 </span><span·class="mi">3</span><span·class="o">&gt;</span></code></pre><p><em>Step·4.</em>·Use·the·<strong>OpenSSH</strong>·client·from·a·shell·to·connect·to·the·Erlang·<code·class="inline">ssh</code>
170 daemon:</p><pre><code·class="text">$bash&gt;·ssh·ssh.example.com·-p·8989··-i·/tmp/otptest_user/.ssh/id_rsa·\170 daemon:</p><pre><code·class="text">$bash&gt;·ssh·ssh.example.com·-p·8989··-i·/tmp/otptest_user/.ssh/id_rsa·\
171 ··················-o·UserKnownHostsFile=/tmp/otptest_user/.ssh/known_hosts171 ··················-o·UserKnownHostsFile=/tmp/otptest_user/.ssh/known_hosts
172 The·authenticity·of·host·'ssh.example.com'·can't·be·established.172 The·authenticity·of·host·'ssh.example.com'·can't·be·established.
173 RSA·key·fingerprint·is·14:81:80:50:b1:1f:57:dd:93:a8:2d:2f:dd:90:ae:a8.173 RSA·key·fingerprint·is·14:81:80:50:b1:1f:57:dd:93:a8:2d:2f:dd:90:ae:a8.
174 Are·you·sure·you·want·to·continue·connecting·(yes/no)?·yes174 Are·you·sure·you·want·to·continue·connecting·(yes/no)?·yes
175 Warning:·Permanently·added·'ssh.example.com'·(RSA)·to·the·list·of·known·hosts.175 Warning:·Permanently·added·'ssh.example.com'·(RSA)·to·the·list·of·known·hosts.
176 Eshell·V5.10··(abort·with·^G)176 Eshell·V5.10··(abort·with·^G)
177 1&gt;</code></pre><p>There·are·two·ways·of·shutting·down·an·<code·class="inline">ssh</code>·daemon,·see·<em>Step·5a</em>·and·<em>Step177 1&gt;</code></pre><p>There·are·two·ways·of·shutting·down·an·<code·class="inline">ssh</code>·daemon,·see·<em>Step·5a</em>·and·<em>Step
178 5b</em>.</p><p><em>Step·5a.</em>·Shut·down·the·Erlang·<code·class="inline">ssh</code>·daemon·so·that·it·stops·the·listener·but178 5b</em>.</p><p><em>Step·5a.</em>·Shut·down·the·Erlang·<code·class="inline">ssh</code>·daemon·so·that·it·stops·the·listener·but
179 leaves·existing·connections,·started·by·the·listener,·operational:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">stop_listener</span><span·class="p"·data-group-id="8919594131-1">(</span><span·class="n">Sshd</span><span·class="p"·data-group-id="8919594131-1">)</span><span·class="p">.</span><span·class="w">179 leaves·existing·connections,·started·by·the·listener,·operational:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">stop_listener</span><span·class="p"·data-group-id="2702282370-1">(</span><span·class="n">Sshd</span><span·class="p"·data-group-id="2702282370-1">)</span><span·class="p">.</span><span·class="w">
180 </span><span·class="ss">ok</span><span·class="w">180 </span><span·class="ss">ok</span><span·class="w">
181 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><p><em>Step·5b.</em>·Shut·down·the·Erlang·<code·class="inline">ssh</code>·daemon·so·that·it·stops·the·listener·and181 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><p><em>Step·5b.</em>·Shut·down·the·Erlang·<code·class="inline">ssh</code>·daemon·so·that·it·stops·the·listener·and
182 all·connections·started·by·the·listener:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">stop_daemon</span><span·class="p"·data-group-id="9643008340-1">(</span><span·class="n">Sshd</span><span·class="p"·data-group-id="9643008340-1">)</span><span·class="p">.</span><span·class="w">182 all·connections·started·by·the·listener:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">stop_daemon</span><span·class="p"·data-group-id="0407390289-1">(</span><span·class="n">Sshd</span><span·class="p"·data-group-id="0407390289-1">)</span><span·class="p">.</span><span·class="w">
183 </span><span·class="ss">ok</span><span·class="w">183 </span><span·class="ss">ok</span><span·class="w">
184 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><h2·id="one-time-execution"·class="section-heading">184 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><h2·id="one-time-execution"·class="section-heading">
185 ··<a·href="#one-time-execution"·class="hover-link">185 ··<a·href="#one-time-execution"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">One-Time·Execution</span>188 ··<span·class="text">One-Time·Execution</span>
189 </h2>189 </h2>
Offset 191, 74 lines modifiedOffset 191, 74 lines modified
191 ··<a·href="#erlang-client-contacting-os-standard-ssh-server"·class="hover-link">191 ··<a·href="#erlang-client-contacting-os-standard-ssh-server"·class="hover-link">
192 ····<i·class="ri-link-m"·aria-hidden="true"></i>192 ····<i·class="ri-link-m"·aria-hidden="true"></i>
193 ··</a>193 ··</a>
194 ··<span·class="text">Erlang·client·contacting·OS·standard·ssh·server</span>194 ··<span·class="text">Erlang·client·contacting·OS·standard·ssh·server</span>
195 </h3>195 </h3>
196 <p>In·the·following·example,·the·Erlang·shell·is·the·client·process·that·receives196 <p>In·the·following·example,·the·Erlang·shell·is·the·client·process·that·receives
197 the·channel·replies·as·Erlang·messages.</p><p>Do·an·one-time·execution·of·a·remote·OS·command·(&quot;pwd&quot;)·over·<code·class="inline">ssh</code>·to·the·ssh197 the·channel·replies·as·Erlang·messages.</p><p>Do·an·one-time·execution·of·a·remote·OS·command·(&quot;pwd&quot;)·over·<code·class="inline">ssh</code>·to·the·ssh
198 server·of·the·OS·at·the·host·&quot;ssh.example.com&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4680846295-1">(</span><span·class="p"·data-group-id="4680846295-1">)</span><span·class="p">.</span><span·class="w">198 server·of·the·OS·at·the·host·&quot;ssh.example.com&quot;:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9742142017-1">(</span><span·class="p"·data-group-id="9742142017-1">)</span><span·class="p">.</span><span·class="w">
199 </span><span·class="ss">ok</span><span·class="gp·unselectable">199 </span><span·class="ss">ok</span><span·class="gp·unselectable">
200 2&gt;·</span><span·class="p"·data-group-id="4680846295-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p"·data-group-id="4680846295-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·455,·SHA:·9352c1343df6f7c2c3b5b3ecbdec29cbced4d787580ab0a8eb30aeb92bdab95c·...·]-3">)</span><span·class="p">.</span><span·class="w">200 2&gt;·</span><span·class="p"·data-group-id="9742142017-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p"·data-group-id="9742142017-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·455,·SHA:·bb4db0ae62928a751034948f08d35141022ef77d50336c63cd7e811721d7c631·...·]-3">)</span><span·class="p">.</span><span·class="w">
201 </span><span·class="p"·data-group-id="4680846295-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4680846295-5">}</span><span·class="gp·unselectable">201 </span><span·class="p"·data-group-id="9742142017-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9742142017-5">}</span><span·class="gp·unselectable">
202 3&gt;·</span><span·class="p"·data-group-id="4680846295-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p"·data-group-id="4680846295-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·308,·SHA:·4343cbd4a0f92bb501ed0f11f82195f1a7356f4b4eea36391dd8deb948669d90·...·]-7">)</span><span·class="p">.</span><span·class="w">202 3&gt;·</span><span·class="p"·data-group-id="9742142017-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p"·data-group-id="9742142017-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·308,·SHA:·f8a01ee03a5608ddc924ae1f439249ac69435d6150707c7ba488f5dbccdd6778·...·]-7">)</span><span·class="p">.</span><span·class="w">
203 </span><span·class="p"·data-group-id="4680846295-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4680846295-8">}</span><span·class="gp·unselectable">203 </span><span·class="p"·data-group-id="9742142017-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="9742142017-8">}</span><span·class="gp·unselectable">
204 4&gt;·</span><span·class="ss">success</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh_connection</span><span·class="p">:</span><span·class="nf">exec</span><span·class="p"·data-group-id="4680846295-9">(</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;pwd&quot;</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·89,·SHA:·5e2907b461651815fba2dd9a7b9bf141c22b64b545d3993ea81c6b13f2cc7d39·...·]-9">)</span><span·class="p">.</span><span·class="gp·unselectable">204 4&gt;·</span><span·class="ss">success</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh_connection</span><span·class="p">:</span><span·class="nf">exec</span><span·class="p"·data-group-id="9742142017-9">(</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;pwd&quot;</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·89,·SHA:·b9fb0ace6ab8000824100e00d12a0e7d8250376b38d12d3015cd1f4e5234c607·...·]-9">)</span><span·class="p">.</span><span·class="gp·unselectable">
205 5&gt;·</span><span·class="nf">flush</span><span·class="p"·data-group-id="4680846295-10">(</span><span·class="p"·data-group-id="4680846295-10">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Get·all·pending·messages.·NOTE:·ordering·may·vary!</span><span·class="w">205 5&gt;·</span><span·class="nf">flush</span><span·class="p"·data-group-id="9742142017-10">(</span><span·class="p"·data-group-id="9742142017-10">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Get·all·pending·messages.·NOTE:·ordering·may·vary!</span><span·class="w">
206 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="4680846295-11">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·387,·SHA:·f742d620fab0a002330bfb880035510aed99e0d7c0c383c026857572587d6cb4·...·]-11">}</span><span·class="w">206 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="9742142017-11">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·387,·SHA:·ee6bea2a3e75052f187ea8e9e25c9ea7c829fe2ae41cdf3be875089ab11362f2·...·]-11">}</span><span·class="w">
207 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="4680846295-13">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·201,·SHA:·ca227927ac9ff9d65e66eece4d533b2771b0640a744f6fd2777d706f345ac515·...·]-13">}</span><span·class="w">207 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="9742142017-13">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·201,·SHA:·d4ea43fd3e4d4a367cca5f741b19c9d2304f4b883c429be70c97f8a466dc0145·...·]-13">}</span><span·class="w">
208 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="4680846295-15">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·258,·SHA:·d7e703340f76a4979c8bbdca76cf6cc0a87172e253bdc6b9fac51a31fd802c33·...·]-15">}</span><span·class="w">208 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="9742142017-15">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·258,·SHA:·ca50b38c46d4b287211b7789fe94a476062f98f5758920d21ddda4faeb8ede67·...·]-15">}</span><span·class="w">
209 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="4680846295-17">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·204,·SHA:·6633fdee08f2c1fe88bbf556375a59dd563c5c59784c44154ec45e4029a1d137·...·]-17">}</span><span·class="w">209 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="9742142017-17">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·204,·SHA:·550ee69204d0ae6028845dca34738600bef31262b0752ea30b011d679947de80·...·]-17">}</span><span·class="w">
210 </span><span·class="ss">ok</span><span·class="gp·unselectable">210 </span><span·class="ss">ok</span><span·class="gp·unselectable">
211 6&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connection_info</span><span·class="p"·data-group-id="4680846295-19">(</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">channels</span><span·class="p"·data-group-id="4680846295-19">)</span><span·class="p">.</span><span·class="w">211 6&gt;·</span><span·class="nc">ssh</span><span·class="p">:</span><span·class="nf">connection_info</span><span·class="p"·data-group-id="9742142017-19">(</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">channels</span><span·class="p"·data-group-id="9742142017-19">)</span><span·class="p">.</span><span·class="w">
212 </span><span·class="p"·data-group-id="4680846295-20">{</span><span·class="ss">channels</span><span·class="p">,</span><span·class="p"·data-group-id="4680846295-21">[</span><span·class="p"·data-group-id="4680846295-21">]</span><span·class="p"·data-group-id="4680846295-20">}</span><span·class="w">212 </span><span·class="p"·data-group-id="9742142017-20">{</span><span·class="ss">channels</span><span·class="p">,</span><span·class="p"·data-group-id="9742142017-21">[</span><span·class="p"·data-group-id="9742142017-21">]</span><span·class="p"·data-group-id="9742142017-20">}</span><span·class="w">
213 </span><span·class="mi">7</span><span·class="o">&gt;</span></code></pre><p>See·<a·href="ssh_connection.html"><code·class="inline">ssh_connection</code></a>·and·<a·href="ssh_connection.html#exec/4"><code·class="inline">ssh_connection:exec/4</code></a>·for·finding·documentation·of213 </span><span·class="mi">7</span><span·class="o">&gt;</span></code></pre><p>See·<a·href="ssh_connection.html"><code·class="inline">ssh_connection</code></a>·and·<a·href="ssh_connection.html#exec/4"><code·class="inline">ssh_connection:exec/4</code></a>·for·finding·documentation·of
214 the·channel·messages.</p><p>To·collect·the·channel·messages·in·a·program,·use·<code·class="inline">receive...end</code>·instead·of214 the·channel·messages.</p><p>To·collect·the·channel·messages·in·a·program,·use·<code·class="inline">receive...end</code>·instead·of
215 <code·class="inline">flush/1</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="k">receive</span><span·class="gp·unselectable">215 <code·class="inline">flush/1</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="k">receive</span><span·class="gp·unselectable">
216 5&gt;·</span><span·class="w">····</span><span·class="p"·data-group-id="5996659657-1">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5996659657-2">{</span><span·class="ss">da[·...·truncated·by·diffoscope;·len:·335,·SHA:·3c6aa24920912a809747838dc8cdf644fa6999eca7c3b9d9d8527d9dbdba49ab·...·]-1">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Type</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="gp·unselectable">216 5&gt;·</span><span·class="w">····</span><span·class="p"·data-group-id="7246426211-1">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7246426211-2">{</span><span·class="ss">da[·...·truncated·by·diffoscope;·len:·335,·SHA:·90dc9dc7192fdce4bb451484464e515cd4f990577fdd2f83670889058fa5b5b7·...·]-1">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Type</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="gp·unselectable">
217 5&gt;·</span><span·class="w">········</span><span·class="p"·data-group-id="5996659657-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Result</span><span·class="p"·data-group-id="5996659657-3">}</span><span·class="gp·unselectable">217 5&gt;·</span><span·class="w">········</span><span·class="p"·data-group-id="7246426211-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Result</span><span·class="p"·data-group-id="7246426211-3">}</span><span·class="gp·unselectable">
218 5&gt;·</span><span·class="w">····</span><span·class="p"·data-group-id="5996659657-4">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5996659657-5">{</span><span·class="ss">da[·...·truncated·by·diffoscope;·len:·335,·SHA:·f87eb297e3a4afd9207359bf58c7aded0698c74888a0287d10b86dcde869e638·...·]-4">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Type</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="gp·unselectable">218 5&gt;·</span><span·class="w">····</span><span·class="p"·data-group-id="7246426211-4">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7246426211-5">{</span><span·class="ss">da[·...·truncated·by·diffoscope;·len:·335,·SHA:·badf9a4b2b8edda57ce23fef847a1b63e5334bc46432ba59f996c10f59fc23f9·...·]-4">}</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Type</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="gp·unselectable">
219 5&gt;·</span><span·class="w">········</span><span·class="p"·data-group-id="5996659657-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Result</span><span·class="p"·data-group-id="5996659657-6">}</span><span·class="gp·unselectable">219 5&gt;·</span><span·class="w">········</span><span·class="p"·data-group-id="7246426211-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Result</span><span·class="p"·data-group-id="7246426211-6">}</span><span·class="gp·unselectable">
220 5&gt;·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">220 5&gt;·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
221 </span><span·class="p"·data-group-id="5996659657-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/home/otptest\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5996659657-7">}</span><span·class="w">221 </span><span·class="p"·data-group-id="7246426211-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/home/otptest\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7246426211-7">}</span><span·class="w">
222 </span><span·class="mi">6</span><span·class="o">&gt;</span></code></pre><p>Note·that·only·the·exec·channel·is·closed·after·the·one-time·execution.·The222 </span><span·class="mi">6</span><span·class="o">&gt;</span></code></pre><p>Note·that·only·the·exec·channel·is·closed·after·the·one-time·execution.·The
223 connection·is·still·up·and·can·handle·previously·opened·channels.·It·is·also223 connection·is·still·up·and·can·handle·previously·opened·channels.·It·is·also
224 possible·to·open·a·new·channel:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·try·to·open·a·new·channel·to·check·if·the·ConnectionRef·is·still·open</span><span·class="gp·unselectable">224 possible·to·open·a·new·channel:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·try·to·open·a·new·channel·to·check·if·the·ConnectionRef·is·still·open</span><span·class="gp·unselectable">
225 7&gt;·</span><span·class="p"·data-group-id="1143684204-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewChannelId</span><span·class="p"·data-group-id="1143684204-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·311,·SHA:·025a358855364454cf5317868c8ae3a8225c5f035a56ac37ab5593d7a5f2bfc1·...·]-2">)</span><span·class="p">.</span><span·class="w">225 7&gt;·</span><span·class="p"·data-group-id="5553253236-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewChannelId</span><span·class="p"·data-group-id="5553253236-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·311,·SHA:·eb945cbf972f6b97621ccda4938158eb209cd740f580d4095887e06167075187·...·]-2">)</span><span·class="p">.</span><span·class="w">
226 </span><span·class="p"·data-group-id="1143684204-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="1143684204-3">}</span><span·class="w">226 </span><span·class="p"·data-group-id="5553253236-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5553253236-3">}</span><span·class="w">
227 </span><span·class="mi">8</span><span·class="o">&gt;</span></code></pre><p>To·close·the·connection,·call·the·function227 </span><span·class="mi">8</span><span·class="o">&gt;</span></code></pre><p>To·close·the·connection,·call·the·function
228 <a·href="ssh.html#close/1"><code·class="inline">ssh:close(ConnectionRef)</code></a>.·As·an·alternative,·set·the·option228 <a·href="ssh.html#close/1"><code·class="inline">ssh:close(ConnectionRef)</code></a>.·As·an·alternative,·set·the·option
229 <a·href="ssh.html#t:max_idle_time_common_option/0"><code·class="inline">{idle_time,·1}</code></a>·when·opening·the229 <a·href="ssh.html#t:max_idle_time_common_option/0"><code·class="inline">{idle_time,·1}</code></a>·when·opening·the
230 connection.·This·will·cause·the·connection·to·be·closed·automatically·when·there230 connection.·This·will·cause·the·connection·to·be·closed·automatically·when·there
231 are·no·channels·open·for·the·specified·time·period,·in·this·case·1·ms.</p><h3·id="os-standard-client-and-erlang-daemon-server"·class="section-heading">231 are·no·channels·open·for·the·specified·time·period,·in·this·case·1·ms.</p><h3·id="os-standard-client-and-erlang-daemon-server"·class="section-heading">
232 ··<a·href="#os-standard-client-and-erlang-daemon-server"·class="hover-link">232 ··<a·href="#os-standard-client-and-erlang-daemon-server"·class="hover-link">
233 ····<i·class="ri-link-m"·aria-hidden="true"></i>233 ····<i·class="ri-link-m"·aria-hidden="true"></i>
234 ··</a>234 ··</a>
235 ··<span·class="text">OS·standard·client·and·Erlang·daemon·(server)</span>235 ··<span·class="text">OS·standard·client·and·Erlang·daemon·(server)</span>
236 </h3>236 </h3>
237 <p>An·Erlang·SSH·daemon·could·be·called·for·one-time·execution·of·a·&quot;command&quot;.·The237 <p>An·Erlang·SSH·daemon·could·be·called·for·one-time·execution·of·a·&quot;command&quot;.·The
238 &quot;command&quot;·must·be·as·if·entered·into·the·erlang·shell,·that·is·a·sequence·of238 &quot;command&quot;·must·be·as·if·entered·into·the·erlang·shell,·that·is·a·sequence·of
239 Erlang·<a·href="../../../../doc/system/expressions.html">expressions</a>·ended·by·a·period·(.).·Variables239 Erlang·<a·href="../../../../doc/system/expressions.html">expressions</a>·ended·by·a·period·(.).·Variables
240 bound·in·that·sequence·will·keep·their·bindings·throughout·the·expression240 bound·in·that·sequence·will·keep·their·bindings·throughout·the·expression
241 sequence.·The·bindings·are·disposed·when·the·result·is·returned.</p><p>Here·is·an·example·of·a·suitable·expression·sequence:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="p"·data-group-id="2372400918-1">(</span><span·class="n">A</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="2372400918-1">)</span><span·class="p">.</span></code></pre><p>It·evaluates·to·<code·class="inline">true</code>·if·submitted·to·the·Erlang·daemon·started·in241 sequence.·The·bindings·are·disposed·when·the·result·is·returned.</p><p>Here·is·an·example·of·a·suitable·expression·sequence:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">B</span><span·class="o">=</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="o">==</span><span·class="w">·</span><span·class="p"·data-group-id="9407956776-1">(</span><span·class="n">A</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">B</span><span·class="p"·data-group-id="9407956776-1">)</span><span·class="p">.</span></code></pre><p>It·evaluates·to·<code·class="inline">true</code>·if·submitted·to·the·Erlang·daemon·started·in
242 <a·href="using_ssh.html#start-daemon-step3">Step·3</a>·above:</p><pre><code·class="text">$bash&gt;·ssh·ssh.example.com·-p·8989·&quot;A=1,·B=2,·3·==·(A·+·B).&quot;242 <a·href="using_ssh.html#start-daemon-step3">Step·3</a>·above:</p><pre><code·class="text">$bash&gt;·ssh·ssh.example.com·-p·8989·&quot;A=1,·B=2,·3·==·(A·+·B).&quot;
243 true243 true
244 $bash&gt;</code></pre><p>The·same·example·but·now·using·the·Erlang·ssh·client·to·contact·the·Erlang244 $bash&gt;</code></pre><p>The·same·example·but·now·using·the·Erlang·ssh·client·to·contact·the·Erlang
245 server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="2798187841-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p"·data-group-id="2798187841-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·457,·SHA:·b67c9cf98a4cc377a96421de34ab10606b816b39e07f1f9bd3c1cb3c1ef7e6ae·...·]-2">)</span><span·class="p">.</span><span·class="w">245 server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="5660089687-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ConnectionRef</span><span·class="p"·data-group-id="5660089687-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·457,·SHA:·af588696d7c3fd570010e2ebf60c9c59ba29f450b5475343b7efa9daf9617c3f·...·]-2">)</span><span·class="p">.</span><span·class="w">
246 </span><span·class="p"·data-group-id="2798187841-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2798187841-4">}</span><span·class="gp·unselectable">246 </span><span·class="p"·data-group-id="5660089687-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5660089687-4">}</span><span·class="gp·unselectable">
247 2&gt;·</span><span·class="p"·data-group-id="2798187841-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p"·data-group-id="2798187841-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·308,·SHA:·289166506781fe019d963d59b6b06d5bfec0e27e575c7ad5b14eb47b41a70e18·...·]-6">)</span><span·class="p">.</span><span·class="w">247 2&gt;·</span><span·class="p"·data-group-id="5660089687-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p"·data-group-id="5660089687-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·308,·SHA:·89326edb9d210e07e1ab23ea5e1c02ba110120278f13cc1cc32fe94d8654e344·...·]-6">)</span><span·class="p">.</span><span·class="w">
248 </span><span·class="p"·data-group-id="2798187841-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="2798187841-7">}</span><span·class="gp·unselectable">248 </span><span·class="p"·data-group-id="5660089687-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5660089687-7">}</span><span·class="gp·unselectable">
249 3&gt;·</span><span·class="ss">success</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh_connection</span><span·class="p">:</span><span·class="nf">exec</span><span·class="p"·data-group-id="2798187841-8">(</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p">,</span><span·class="w">249 3&gt;·</span><span·class="ss">success</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssh_connection</span><span·class="p">:</span><span·class="nf">exec</span><span·class="p"·data-group-id="5660089687-8">(</span><span·class="n">ConnectionRef</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ChannelId</span><span·class="p">,</span><span·class="w">
250 ·································</span><span·class="s">&quot;A=1,·B=2,·3·==·(A·+·B).&quot;</span><span·class="p">,</span><span·class="w">250 ·································</span><span·class="s">&quot;A=1,·B=2,·3·==·(A·+·B).&quot;</span><span·class="p">,</span><span·class="w">
251 ·································</span><span·class="ss">infinity</span><span·class="p"·data-group-id="2798187841-8">)</span><span·class="p">.</span><span·class="w">251 ·································</span><span·class="ss">infinity</span><span·class="p"·data-group-id="5660089687-8">)</span><span·class="p">.</span><span·class="w">
252 </span><span·class="ss">success</span><span·class="gp·unselectable">252 </span><span·class="ss">success</span><span·class="gp·unselectable">
253 4&gt;·</span><span·class="nf">flush</span><span·class="p"·data-group-id="2798187841-9">(</span><span·class="p"·data-group-id="2798187841-9">)</span><span·class="p">.</span><span·class="w">253 4&gt;·</span><span·class="nf">flush</span><span·class="p"·data-group-id="5660089687-9">(</span><span·class="p"·data-group-id="5660089687-9">)</span><span·class="p">.</span><span·class="w">
254 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="2798187841-10">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·377,·SHA:·e4d949868cb28a3e919f289c7fc5f9ae8a058d64954aec67cd553e71b4621481·...·]-10">}</span><span·class="w">254 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="5660089687-10">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·377,·SHA:·0199e72a90aafc967b51025225bb1df49b2d13e163e1ea96f7bbe8468fd068a3·...·]-10">}</span><span·class="w">
255 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="2798187841-12">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·259,·SHA:·a5e991bd64ec587f49a8863515355b67c6a9295138771326e76933fbf75a816f·...·]-12">}</span><span·class="w">255 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="5660089687-12">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·259,·SHA:·a27eed960b2a90fe26c03d9152f30cac0341c7bc840b5bdd61167312563997ad·...·]-12">}</span><span·class="w">
256 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="2798187841-14">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·202,·SHA:·2e32ecf79c5ed9f7a7456d43624af21d15a94e06e6d96a13ba0d2abe366592ce·...·]-14">}</span><span·class="w">256 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="5660089687-14">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·202,·SHA:·49489ac35abb7bbb2ba8ead5eadbdafca50920f45592a7051bd826b3beb89bda·...·]-14">}</span><span·class="w">
257 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="2798187841-16">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·205,·SHA:·87e329852210d5570de7774faaf30d35fcb7df2e94dac31432831e2b77d618b6·...·]-16">}</span><span·class="w">257 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="5660089687-16">{</span><span·class="ss">ssh_cm</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.216</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p">,</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·205,·SHA:·6db953fb2080ac6d399f14470364f5d6fe4cf0c8374eee42892efbc1641ddbdf·...·]-16">}</span><span·class="w">
258 </span><span·class="ss">ok</span><span·class="w">258 </span><span·class="ss">ok</span><span·class="w">
259 </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p>Note·that·Erlang·shell·specific·functions·and·control·sequences·like·for·example259 </span><span·class="mi">5</span><span·class="o">&gt;</span></code></pre><p>Note·that·Erlang·shell·specific·functions·and·control·sequences·like·for·example
260 <code·class="inline">h().</code>·are·not·supported.</p><h3·id="i-o-from-a-function-called-in-an-erlang-ssh-daemon"·class="section-heading">260 <code·class="inline">h().</code>·are·not·supported.</p><h3·id="i-o-from-a-function-called-in-an-erlang-ssh-daemon"·class="section-heading">
261 ··<a·href="#i-o-from-a-function-called-in-an-erlang-ssh-daemon"·class="hover-link">261 ··<a·href="#i-o-from-a-function-called-in-an-erlang-ssh-daemon"·class="hover-link">
262 ····<i·class="ri-link-m"·aria-hidden="true"></i>262 ····<i·class="ri-link-m"·aria-hidden="true"></i>
263 ··</a>263 ··</a>
264 ··<span·class="text">I/O·from·a·function·called·in·an·Erlang·ssh·daemon</span>264 ··<span·class="text">I/O·from·a·function·called·in·an·Erlang·ssh·daemon</span>
Offset 271, 44 lines modifiedOffset 271, 44 lines modified
Max diff block lines reached; 158392/208038 bytes (76.14%) of diff not shown.
451 KB
./usr/share/doc/erlang-doc/html/lib/ssl-11.2.1/doc/html/ssl.epub
3.2 KB
zipinfo {}
    
Offset 1, 21 lines modifiedOffset 1, 21 lines modified
1 Zip·file·size:·196922·bytes,·number·of·entries:·191 Zip·file·size:·196916·bytes,·number·of·entries:·19
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:20·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx···168089·b-·defN·24-Oct-11·20:20·OEBPS/using_ssl.xhtml3 ?rw-r--r--··2.0·unx···168089·b-·defN·24-Oct-11·20:59·OEBPS/using_ssl.xhtml
4 ?rw-r--r--··2.0·unx······712·b-·defN·24-Oct-11·20:20·OEBPS/title.xhtml4 ?rw-r--r--··2.0·unx······712·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
5 ?rw-r--r--··2.0·unx····72646·b-·defN·24-Oct-11·20:20·OEBPS/standards_compliance.xhtml5 ?rw-r--r--··2.0·unx····72646·b-·defN·24-Oct-11·20:59·OEBPS/standards_compliance.xhtml
6 ?rw-r--r--··2.0·unx····20991·b-·defN·24-Oct-11·20:20·OEBPS/ssl_session_cache_api.xhtml6 ?rw-r--r--··2.0·unx····20991·b-·defN·24-Oct-11·20:59·OEBPS/ssl_session_cache_api.xhtml
7 ?rw-r--r--··2.0·unx·····8162·b-·defN·24-Oct-11·20:20·OEBPS/ssl_protocol.xhtml7 ?rw-r--r--··2.0·unx·····8162·b-·defN·24-Oct-11·20:59·OEBPS/ssl_protocol.xhtml
8 ?rw-r--r--··2.0·unx····24253·b-·defN·24-Oct-11·20:20·OEBPS/ssl_distribution.xhtml8 ?rw-r--r--··2.0·unx····24253·b-·defN·24-Oct-11·20:59·OEBPS/ssl_distribution.xhtml
9 ?rw-r--r--··2.0·unx····16383·b-·defN·24-Oct-11·20:20·OEBPS/ssl_crl_cache_api.xhtml9 ?rw-r--r--··2.0·unx····16383·b-·defN·24-Oct-11·20:59·OEBPS/ssl_crl_cache_api.xhtml
10 ?rw-r--r--··2.0·unx·····7348·b-·defN·24-Oct-11·20:20·OEBPS/ssl_crl_cache.xhtml10 ?rw-r--r--··2.0·unx·····7348·b-·defN·24-Oct-11·20:59·OEBPS/ssl_crl_cache.xhtml
11 ?rw-r--r--··2.0·unx····10795·b-·defN·24-Oct-11·20:20·OEBPS/ssl_app.xhtml11 ?rw-r--r--··2.0·unx····10795·b-·defN·24-Oct-11·20:59·OEBPS/ssl_app.xhtml
12 ?rw-r--r--··2.0·unx···300516·b-·defN·24-Oct-11·20:20·OEBPS/ssl.xhtml12 ?rw-r--r--··2.0·unx···300516·b-·defN·24-Oct-11·20:59·OEBPS/ssl.xhtml
13 ?rw-r--r--··2.0·unx···215883·b-·defN·24-Oct-11·20:20·OEBPS/notes.xhtml13 ?rw-r--r--··2.0·unx···215883·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
14 ?rw-r--r--··2.0·unx·····1569·b-·defN·24-Oct-11·20:20·OEBPS/nav.xhtml14 ?rw-r--r--··2.0·unx·····1569·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
15 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-erlang-2EWSTWER.css15 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
16 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:20·OEBPS/dist/epub-CB7BJMUW.js16 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
17 ?rw-r--r--··2.0·unx·····2608·b-·defN·24-Oct-11·20:20·OEBPS/content.opf17 ?rw-r--r--··2.0·unx·····2608·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
18 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:20·OEBPS/assets/logo.png18 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
19 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:20·META-INF/container.xml19 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
20 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:20·META-INF/com.apple.ibooks.display-options.xml20 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
21 19·files,·873123·bytes·uncompressed,·194556·bytes·compressed:··77.7%21 19·files,·873123·bytes·uncompressed,·194550·bytes·compressed:··77.7%
53.0 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
290 KB
OEBPS/using_ssl.xhtml
Max HTML report size reached
22.8 KB
OEBPS/ssl_distribution.xhtml
Max HTML report size reached
80.4 KB
OEBPS/ssl.xhtml
Max HTML report size reached
1.2 KB
OEBPS/content.opf
1.17 KB
OEBPS/content.opf
Max HTML report size reached
80.5 KB
./usr/share/doc/erlang-doc/html/lib/ssl-11.2.1/doc/html/ssl.html
    
Offset 127, 17 lines modifiedOffset 127, 17 lines modified
127 ··</h1>127 ··</h1>
  
  
128 ····<section·id="moduledoc">128 ····<section·id="moduledoc">
129 <p>Interface·functions·for·TLS·(Transport·Layer·Security),129 <p>Interface·functions·for·TLS·(Transport·Layer·Security),
130 and·DTLS·(Datagram·Transport·Layer·Security).</p><blockquote><h4·class="info">Note</h4><p>The·applications·name·is·still·SSL·due·to·the·fact·that·the·first·versions·of·the·TLS·protcol130 and·DTLS·(Datagram·Transport·Layer·Security).</p><blockquote><h4·class="info">Note</h4><p>The·applications·name·is·still·SSL·due·to·the·fact·that·the·first·versions·of·the·TLS·protcol
131 were·named·SSL·(Secure·Socket·Layer),·however,·no·version·of·the·old·SSL·protocol·are·supported,131 were·named·SSL·(Secure·Socket·Layer),·however,·no·version·of·the·old·SSL·protocol·are·supported,
132 by·this·application.</p></blockquote><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2266285685-1">(</span><span·class="p"·data-group-id="2266285685-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="2266285685-2">(</span><span·class="s">&quot;google.com&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">443</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2266285685-3">[</span><span·class="p"·data-group-id="2266285685-4">{</span><span·class="ss">verify</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">verify_peer</span><span·class="p"·data-group-id="2266285685-4">}</span><span·class="p">,</span><span·class="w"> 
133 ····</span><span·class="p"·data-group-id="2266285685-5">{</span><span·class="ss">cacerts</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf">cacerts_get</span><span·class="p"·data-group-id="2266285685-6">(</span><span·class="p"·data-group-id="2266285685-6">)</span><span·class="p"·data-group-id="2266285685-5">}</span><span·class="p"·data-group-id="2266285685-3">]</span><span·class="p"·data-group-id="2266285685-2">)</span><span·class="p">.</span><span·class="w"> 
134 </span><span·class="p"·data-group-id="2266285685-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2266285685-8">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·513,·SHA:·70fc46c10472a5e97edd54c4a4341c4662d928bcb6369f39c73da6e7b033a4d1·...·]>132 by·this·application.</p></blockquote><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="81[·...·truncated·by·diffoscope;·len:·735,·SHA:·fd56491c4262aa717feaa269d4fd3dc1fd0fd49319b9ea93dc7014a4cf6feb84·...·]>
 133 ····</span><span·class="p"·data-group-id="8162266653-5">{</span><span·class="ss">cacerts</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf">cacerts_get</span><span·class="p"·data-group-id="8162266653-6">(</span><span·class="p"·data-group-id="8162266653-6">)</span><span·class="p"·data-group-id="8162266653-5">}</span><span·class="p"·data-group-id="8162266653-3">]</span><span·class="p"·data-group-id="8162266653-2">)</span><span·class="p">.</span><span·class="w">
 134 </span><span·class="p"·data-group-id="8162266653-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8162266653-8">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8162266653-9">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="8162266653-9">]</span><span·class="p"·data-group-id="8162266653-8">}</span><span·class="p"·data-group-id="8162266653-7">}</span></code></pre><p>See·<a·href="using_ssl.html">Using·SSL</a>·for·detailed·usage·and·more·examples·of·this·API.</p><p>Special·Erlang·node·configuration·for·the·application·can·be·found·in·<a·href="ssl_app.html">ssl·application·reference</a>.</p>
135 ····</section>135 ····</section>
  
136 </div>136 </div>
  
137 ··<section·id="summary"·class="details-list">137 ··<section·id="summary"·class="details-list">
138 ····<h1·class="section-heading">138 ····<h1·class="section-heading">
139 ······<a·class="hover-link"·href="#summary">139 ······<a·class="hover-link"·href="#summary">
Offset 2525, 35 lines modifiedOffset 2525, 35 lines modified
2525 these·algorithms·where·implicitly·chosen·and·partly·derived·from·the·cipher2525 these·algorithms·where·implicitly·chosen·and·partly·derived·from·the·cipher
2526 suite.</p><p>In·TLS-1.2·a·somewhat·more·explicit·negotiation·is·made·possible·using·a·list·of2526 suite.</p><p>In·TLS-1.2·a·somewhat·more·explicit·negotiation·is·made·possible·using·a·list·of
2527 {<a·href="#t:hash/0"><code·class="inline">hash/0</code></a>,·<a·href="#t:sign_algo/0"><code·class="inline">sign_algo/0</code></a>}·pairs.</p><p>In·TLS-1.3·these·algorithm·pairs·are·replaced·by·so·called·signature·schemes2527 {<a·href="#t:hash/0"><code·class="inline">hash/0</code></a>,·<a·href="#t:sign_algo/0"><code·class="inline">sign_algo/0</code></a>}·pairs.</p><p>In·TLS-1.3·these·algorithm·pairs·are·replaced·by·so·called·signature·schemes
2528 <a·href="#t:sign_scheme/0"><code·class="inline">sign_scheme/0</code></a>·and·completely·decoupled·from·the·cipher·suite.</p><p>Signature·algorithms·used·for·certificates·may·be·overridden·by·the2528 <a·href="#t:sign_scheme/0"><code·class="inline">sign_scheme/0</code></a>·and·completely·decoupled·from·the·cipher·suite.</p><p>Signature·algorithms·used·for·certificates·may·be·overridden·by·the
2529 [signature·schemes]·supplied·by·the2529 [signature·schemes]·supplied·by·the
2530 <code·class="inline">signature_algs_cert</code>·option.</p><p>TLS-1.2·default·is·Default_TLS_12_Alg_Pairs·interleaved·with·rsa_pss_schemes2530 <code·class="inline">signature_algs_cert</code>·option.</p><p>TLS-1.2·default·is·Default_TLS_12_Alg_Pairs·interleaved·with·rsa_pss_schemes
2531 since·ssl-11.0·(OTP·25)·pss_pss·is·prefered·over·pss_rsae·that·is·prefered·over2531 since·ssl-11.0·(OTP·25)·pss_pss·is·prefered·over·pss_rsae·that·is·prefered·over
2532 rsa</p><p><code·class="inline">Default_TLS_12_Alg_Pairs·=</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0380700723-1">[</span><span·class="w">2532 rsa</p><p><code·class="inline">Default_TLS_12_Alg_Pairs·=</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0558268667-1">[</span><span·class="w">
2533 </span><span·class="c1">%%·SHA2</span><span·class="w">2533 </span><span·class="c1">%%·SHA2</span><span·class="w">
2534 </span><span·class="p"·data-group-id="0380700723-2">{</span><span·class="ss">sha512</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ecdsa</span><span·class="p"·data-group-id="0380700723-2">}</span><span·class="p">,</span><span·class="w">2534 </span><span·class="p"·data-group-id="0558268667-2">{</span><span·class="ss">sha512</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ecdsa</span><span·class="p"·data-group-id="0558268667-2">}</span><span·class="p">,</span><span·class="w">
2535 </span><span·class="p"·data-group-id="0380700723-3">{</span><span·class="ss">sha512</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rsa</span><span·class="p"·data-group-id="0380700723-3">}</span><span·class="p">,</span><span·class="w">2535 </span><span·class="p"·data-group-id="0558268667-3">{</span><span·class="ss">sha512</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rsa</span><span·class="p"·data-group-id="0558268667-3">}</span><span·class="p">,</span><span·class="w">
2536 </span><span·class="p"·data-group-id="0380700723-4">{</span><span·class="ss">sha384</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ecdsa</span><span·class="p"·data-group-id="0380700723-4">}</span><span·class="p">,</span><span·class="w">2536 </span><span·class="p"·data-group-id="0558268667-4">{</span><span·class="ss">sha384</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ecdsa</span><span·class="p"·data-group-id="0558268667-4">}</span><span·class="p">,</span><span·class="w">
2537 </span><span·class="p"·data-group-id="0380700723-5">{</span><span·class="ss">sha384</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rsa</span><span·class="p"·data-group-id="0380700723-5">}</span><span·class="p">,</span><span·class="w">2537 </span><span·class="p"·data-group-id="0558268667-5">{</span><span·class="ss">sha384</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rsa</span><span·class="p"·data-group-id="0558268667-5">}</span><span·class="p">,</span><span·class="w">
2538 </span><span·class="p"·data-group-id="0380700723-6">{</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ecdsa</span><span·class="p"·data-group-id="0380700723-6">}</span><span·class="p">,</span><span·class="w">2538 </span><span·class="p"·data-group-id="0558268667-6">{</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ecdsa</span><span·class="p"·data-group-id="0558268667-6">}</span><span·class="p">,</span><span·class="w">
2539 </span><span·class="p"·data-group-id="0380700723-7">{</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rsa</span><span·class="p"·data-group-id="0380700723-7">}</span><span·class="w">2539 </span><span·class="p"·data-group-id="0558268667-7">{</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rsa</span><span·class="p"·data-group-id="0558268667-7">}</span><span·class="w">
2540 </span><span·class="p"·data-group-id="0380700723-1">]</span></code></pre><p>Support·for·{md5,·rsa}·was·removed·from·the·the·TLS-1.2·default·in·ssl-8.02540 </span><span·class="p"·data-group-id="0558268667-1">]</span></code></pre><p>Support·for·{md5,·rsa}·was·removed·from·the·the·TLS-1.2·default·in·ssl-8.0
2541 (OTP·22)·and·support·for·SHA1·{sha,·<em>}·and·SHA224·{sha224,·</em>}·was·removed·in2541 (OTP·22)·and·support·for·SHA1·{sha,·<em>}·and·SHA224·{sha224,·</em>}·was·removed·in
2542 ssl-11.0·(OTP·26)</p><p><code·class="inline">rsa_pss_schemes·=</code></p><pre><code·class="text">[rsa_pss_pss_sha512,2542 ssl-11.0·(OTP·26)</p><p><code·class="inline">rsa_pss_schemes·=</code></p><pre><code·class="text">[rsa_pss_pss_sha512,
2543 rsa_pss_pss_sha384,2543 rsa_pss_pss_sha384,
2544 rsa_pss_pss_sha256,2544 rsa_pss_pss_sha256,
2545 rsa_pss_rsae_sha512,2545 rsa_pss_rsae_sha512,
2546 rsa_pss_rsae_sha384,2546 rsa_pss_rsae_sha384,
2547 rsa_pss_rsae_sha256]</code></pre><p><code·class="inline">TLS_13_Legacy_Schemes·=</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p"·data-group-id="1179811568-1">[</span><span·class="w">2547 rsa_pss_rsae_sha256]</code></pre><p><code·class="inline">TLS_13_Legacy_Schemes·=</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="p"·data-group-id="6171270987-1">[</span><span·class="w">
2548 ·</span><span·class="c1">%%·Legacy·algorithms·only·applicable·to·certificate·signatures</span><span·class="w">2548 ·</span><span·class="c1">%%·Legacy·algorithms·only·applicable·to·certificate·signatures</span><span·class="w">
2549 </span><span·class="ss">rsa_pkcs1_sha512</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%%·Corresponds·to·{sha512,·rsa}</span><span·class="w">2549 </span><span·class="ss">rsa_pkcs1_sha512</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%%·Corresponds·to·{sha512,·rsa}</span><span·class="w">
2550 </span><span·class="ss">rsa_pkcs1_sha384</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%%·Corresponds·to·{sha384,·rsa}</span><span·class="w">2550 </span><span·class="ss">rsa_pkcs1_sha384</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%%·Corresponds·to·{sha384,·rsa}</span><span·class="w">
2551 </span><span·class="ss">rsa_pkcs1_sha256</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%%·Corresponds·to·{sha256,·rsa}</span><span·class="w">2551 </span><span·class="ss">rsa_pkcs1_sha256</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%%·Corresponds·to·{sha256,·rsa}</span><span·class="w">
2552 </span><span·class="p"·data-group-id="1179811568-1">]</span></code></pre><p><code·class="inline">Default_TLS_13_Schemes·=</code></p><pre><code·class="text">·[2552 </span><span·class="p"·data-group-id="6171270987-1">]</span></code></pre><p><code·class="inline">Default_TLS_13_Schemes·=</code></p><pre><code·class="text">·[
2553 ·%%·EDDSA2553 ·%%·EDDSA
2554 eddsa_ed25519,2554 eddsa_ed25519,
2555 eddsa_ed4482555 eddsa_ed448
  
2556 %%·ECDSA2556 %%·ECDSA
2557 ecdsa_secp521r1_sha512,2557 ecdsa_secp521r1_sha512,
2558 ecdsa_secp384r1_sha384,2558 ecdsa_secp384r1_sha384,
Offset 2632, 16 lines modifiedOffset 2632, 16 lines modified
  
2632 ······<div·class="specs">2632 ······<div·class="specs">
  
2633 ··········<pre·translate="no"><span·class="attribute">-type</span>·anchor_fun()·::·fun().</pre>2633 ··········<pre·translate="no"><span·class="attribute">-type</span>·anchor_fun()·::·fun().</pre>
  
2634 ······</div>2634 ······</div>
  
2635 <p>Claim·an·intermediate·CA·in·the·chain·as·trusted.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nf">fun</span><span·class="p"·data-group-id="9708083284-1">(</span><span·class="n">Chain</span><span·class="p">:</span><span·class="p">:</span><span·class="p"·data-group-id="9708083284-2">[</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf">der_encoded</span><span·class=[·...·truncated·by·diffoscope;·len:·188,·SHA:·d71a235ddb562272ce01beb69bbe60a9c6dd909fa7eb58b165fccd345766eb28·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">2635 <p>Claim·an·intermediate·CA·in·the·chain·as·trusted.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nf">fun</span><span·class="p"·data-group-id="2929289765-1">(</span><span·class="n">Chain</span><span·class="p">:</span><span·class="p">:</span><span·class="p"·data-group-id="2929289765-2">[</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf">der_encoded</span><span·class=[·...·truncated·by·diffoscope;·len:·188,·SHA:·069fae1cf6eb7343b683b014d051b9903de121eeaad2ad42f5dc6cafdf69a3f3·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
2636 ····</span><span·class="p"·data-group-id="9708083284-4">{</span><span·class="ss">trusted_ca</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DerCert</span><span·class="p">:</span><span·class="p">:</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf"[·...·truncated·by·diffoscope;·len:·166,·SHA:·dd25aa428af84d2624dede2eff684f01669fb6cd08f2ff998fcd9589654d16c3·...·]-4">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">unknown_ca</span><span·class="p">.</span></code></pre><p>··TLS·then·performs·<a·href="../../../../lib/public_key-1.16.1/doc/html/public_key.html#pkix_path_validation/3"><code·class="inline">public_key:pkix_path_validation/3</code></a>·with·the·selected·CA·as·trusted·anchor·and2636 ····</span><span·class="p"·data-group-id="2929289765-4">{</span><span·class="ss">trusted_ca</span><span·class="p">,</span><span·class="w">·</span><span·class="n">DerCert</span><span·class="p">:</span><span·class="p">:</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf"[·...·truncated·by·diffoscope;·len:·166,·SHA:·a634fdda122e1471b72b7885d04d8152a77081dc31d23071db8264d32c99f71a·...·]-4">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">unknown_ca</span><span·class="p">.</span></code></pre><p>··TLS·then·performs·<a·href="../../../../lib/public_key-1.16.1/doc/html/public_key.html#pkix_path_validation/3"><code·class="inline">public_key:pkix_path_validation/3</code></a>·with·the·selected·CA·as·trusted·anchor·and
2637 ··the·rest·of·the·chain.</p>2637 ··the·rest·of·the·chain.</p>
2638 ··</section>2638 ··</section>
2639 </section>2639 </section>
2640 <section·class="detail"·id="t:cert_key_conf/0">2640 <section·class="detail"·id="t:cert_key_conf/0">
  
2641 ··<div·class="detail-header">2641 ··<div·class="detail-header">
2642 ····<a·href="#t:cert_key_conf/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">2642 ····<a·href="#t:cert_key_conf/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">
Offset 3645, 28 lines modifiedOffset 3645, 28 lines modified
3645 options.·For·examples·see·<a·href="using_ssl.html">the·Users·Guide</a></p><blockquote><h4·class="info">Note</h4><p><code·class="inline">eddsa</code>·certificates·are·only·supported·by·TLS-1.3·that·does·not·support·<code·class="inline">dsa</code>3645 options.·For·examples·see·<a·href="using_ssl.html">the·Users·Guide</a></p><blockquote><h4·class="info">Note</h4><p><code·class="inline">eddsa</code>·certificates·are·only·supported·by·TLS-1.3·that·does·not·support·<code·class="inline">dsa</code>
3646 certificates.·<code·class="inline">rsa_pss_pss</code>·(RSA·certificates·using·Probabilistic·Signature3646 certificates.·<code·class="inline">rsa_pss_pss</code>·(RSA·certificates·using·Probabilistic·Signature
3647 Scheme)·are·supported·in·TLS-1.2·and·TLS-1.3,·but·some·TLS-1.2·implementations3647 Scheme)·are·supported·in·TLS-1.2·and·TLS-1.3,·but·some·TLS-1.2·implementations
3648 may·not·support·<code·class="inline">rsa_pss_pss</code>.</p></blockquote></li><li><p><strong>{depth,·AllowedCertChainLen}</strong>·-·Limits·the·accepted·number·of·certificates·in·the·certificate·chain.</p><p>certificate_revoked··Maximum·number·of·non-self-issued·intermediate·certificates·that·can·follow·the3648 may·not·support·<code·class="inline">rsa_pss_pss</code>.</p></blockquote></li><li><p><strong>{depth,·AllowedCertChainLen}</strong>·-·Limits·the·accepted·number·of·certificates·in·the·certificate·chain.</p><p>certificate_revoked··Maximum·number·of·non-self-issued·intermediate·certificates·that·can·follow·the
3649 peer·certificate·in·a·valid·certification·path.·So,·if·depth·is·0·the·PEER·must3649 peer·certificate·in·a·valid·certification·path.·So,·if·depth·is·0·the·PEER·must
3650 be·signed·by·the·trusted·ROOT-CA·directly;·if·1·the·path·can·be·PEER,·CA,3650 be·signed·by·the·trusted·ROOT-CA·directly;·if·1·the·path·can·be·PEER,·CA,
3651 ROOT-CA;·if·2·the·path·can·be·PEER,·CA,·CA,·ROOT-CA,·and·so·on.·The·default3651 ROOT-CA;·if·2·the·path·can·be·PEER,·CA,·CA,·ROOT-CA,·and·so·on.·The·default
3652 value·is·10.·Used·to·mitigate·DoS·attack·possibilities.</p></li><li><p><strong>{verify_fun,··Verify}</strong>·-·Customize·certificate·path·validation</p><p>The·verification·fun·is·to·be·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="9690627527-1">(</span><span·class="n">OtpCert</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="96906[·...·truncated·by·diffoscope;·len:·58,·SHA:·fc1eb65fd3c57a0a0c79a5729be503e91f0498dc24a1365e4c838b41c71ed7b4·...·]-2">}</span><span·class="p">,</span><span·class="w">3652 value·is·10.·Used·to·mitigate·DoS·attack·possibilities.</p></li><li><p><strong>{verify_fun,··Verify}</strong>·-·Customize·certificate·path·validation</p><p>The·verification·fun·is·to·be·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="8898006176-1">(</span><span·class="n">OtpCert</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="88980[·...·truncated·by·diffoscope;·len:·58,·SHA:·2d3a7c2f98f93352623032147e215137f33a1a1b142b60046d7c11666ce67506·...·]-2">}</span><span·class="p">,</span><span·class="w">
3653 ····</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InitialUserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="9690627527-3">(</span><span·class="p"·data-group-id="9690627527-3">)</span><span·class="p"·data-group-id="9690627527-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3653 ····</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InitialUserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="8898006176-3">(</span><span·class="p"·data-group-id="8898006176-3">)</span><span·class="p"·data-group-id="8898006176-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3654 ··</span><span·class="p"·data-group-id="9690627527-4">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><[·...·truncated·by·diffoscope;·len:·146,·SHA:·9f793ef5c4a7cba6213ec11fad36628c551d70492bd3fe67db33d7184330bde7·...·]-4">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3654 ··</span><span·class="p"·data-group-id="8898006176-4">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><[·...·truncated·by·diffoscope;·len:·146,·SHA:·65a088100fa62621484b7b232f9e2efe1746074e5628a1266a62b39c2a5190b8·...·]-4">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3655 ··</span><span·class="p"·data-group-id="9690627527-6">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span[·...·truncated·by·diffoscope;·len:·661,·SHA:·2d61ae7a8eb862a65c89da09ea37ca98a134803fc3d2678b029c5dbfb727b77e·...·]-8">}</span><span·class="p">.</span><span·class="w">3655 ··</span><span·class="p"·data-group-id="8898006176-6">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span[·...·truncated·by·diffoscope;·len:·661,·SHA:·837698bfb7662f4c3b6455e2146f9c9edac7659a54fcdb7a8709a0cfb12377fb·...·]-8">}</span><span·class="p">.</span><span·class="w">
  
3656 </span><span·class="nf">fun</span><span·class="p"·data-group-id="9690627527-10">(</span><span·class="n">OtpCert</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="9690[·...·truncated·by·diffoscope;·len:·435,·SHA:·51271cdde818f7c36a1a14d68938a331306996cfdf543506918588fa901544d9·...·]-12">)</span><span·class="p">,</span><span·class="w">3656 </span><span·class="nf">fun</span><span·class="p"·data-group-id="8898006176-10">(</span><span·class="n">OtpCert</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;OTPCertificate&#39;</span><span·class="p"·data-group-id="8898[·...·truncated·by·diffoscope;·len:·435,·SHA:·24e1e433bcc44abb14464c6f3785f68cbc1082ba941e1ade54cb4a232b67e644·...·]-12">)</span><span·class="p">,</span><span·class="w">
3657 ····</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InitialUserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="9690627527-13">(</span><span·class="p"·data-group-id="9690627527-13">)</span><span·class="p"·data-group-id="9690627527-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3657 ····</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">InitialUserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><span·class="p"·data-group-id="8898006176-13">(</span><span·class="p"·data-group-id="8898006176-13">)</span><span·class="p"·data-group-id="8898006176-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3658 ··</span><span·class="p"·data-group-id="9690627527-14">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span>[·...·truncated·by·diffoscope;·len:·149,·SHA:·ae563b240d81797488ae0169655f3d1f963338a323d38755832bdaa409e66357·...·]-14">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3658 ··</span><span·class="p"·data-group-id="8898006176-14">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span>[·...·truncated·by·diffoscope;·len:·149,·SHA:·bffd2829781ee11b2dba95c17c63b9858dad625a7b46b4c1c3ce568bbb13295a·...·]-14">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3659 ··</span><span·class="p"·data-group-id="9690627527-16">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><spa[·...·truncated·by·diffoscope;·len:·668,·SHA:·f381ee4bfd4e2a9f5b3e8d824542086490e447e1afcea598bb39dd59af7cf30c·...·]-18">}</span><span·class="p">.</span><span·class="w">3659 ··</span><span·class="p"·data-group-id="8898006176-16">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">term</span><spa[·...·truncated·by·diffoscope;·len:·668,·SHA:·7d214f1f3b61df9ce7bd42d7a5b678106e0763a3ba8cb16093f0360c158555e0·...·]-18">}</span><span·class="p">.</span><span·class="w">
  
3660 </span><span·class="n">Types</span><span·class="p">:</span><span·class="w">3660 </span><span·class="n">Types</span><span·class="p">:</span><span·class="w">
3661 ······</span><span·class="n">Event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9690627527-20">{</span><span·class="ss">bad_cert</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span>[·...·truncated·by·diffoscope;·len:·95,·SHA:·7801d3f1d6d85d95eb55f6d21051dcfa4749a634947c61ec13fe757af267c0e5·...·]-21">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3661 ······</span><span·class="n">Event</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8898006176-20">{</span><span·class="ss">bad_cert</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">atom</span>[·...·truncated·by·diffoscope;·len:·95,·SHA:·c678488629a630c5833c7d92a07b8c1132f085bdf3008ad40eb4a44ee142389e·...·]-21">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3662 ··············</span><span·class="p"·data-group-id="9690627527-22">{</span><span·class="ss">revoked</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="9690627527-23">(</span><span·class="p"·data-group-id="9690627527-23">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·77,·SHA:·bd2dd03d9cda24be33d9eaa166dcf177060f5820c8ec6f46e513b195d418c184·...·]-20">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3662 ··············</span><span·class="p"·data-group-id="8898006176-22">{</span><span·class="ss">revoked</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">atom</span><span·class="p"·data-group-id="8898006176-23">(</span><span·class="p"·data-group-id="8898006176-23">)</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·77,·SHA:·9938526c74cc6b94aa8598a8397548fdc02b8272548b5b0464315b4d3edfd3b2·...·]-20">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3663 ······</span><span·class="p"·data-group-id="9690627527-24">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="9690627527-25">{</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·cb21db28e7ba063fb9c89c59f1a91b747ddc0a91fb83d66f1d462877dbde5b96·...·]-24">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3663 ······</span><span·class="p"·data-group-id="8898006176-24">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Extension&#39;</span><span·class="p"·data-group-id="8898006176-25">{</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·64,·SHA:·51f25275dd99092245774879512be91eac15ffae8b91f5c48cde758d63d325f0·...·]-24">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3664 ··············</span><span·class="ss">valid</span><span·class="w">·</span><span·class="p">|</span><span·class="w">3664 ··············</span><span·class="ss">valid</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
3665 ··············</span><span·class="ss">valid_peer</span></code></pre><p>The·verification·fun·is·called·during·the·X509-path·validation·when·an·error·or3665 ··············</span><span·class="ss">valid_peer</span></code></pre><p>The·verification·fun·is·called·during·the·X509-path·validation·when·an·error·or
3666 an·extension·unknown·to·the·SSL·application·is·encountered.·It·is·also·called3666 an·extension·unknown·to·the·SSL·application·is·encountered.·It·is·also·called
3667 when·a·certificate·is·considered·valid·by·the·path·validation·to·allow·access·to3667 when·a·certificate·is·considered·valid·by·the·path·validation·to·allow·access·to
3668 each·certificate·in·the·path·to·the·user·application.·It·differentiates·between3668 each·certificate·in·the·path·to·the·user·application.·It·differentiates·between
3669 the·peer·certificate·and·the·CA·certificates·by·using·<code·class="inline">valid_peer</code>·or·<code·class="inline">valid</code>·as3669 the·peer·certificate·and·the·CA·certificates·by·using·<code·class="inline">valid_peer</code>·or·<code·class="inline">valid</code>·as
3670 <code·class="inline">Event</code>·argument·to·the·verification·fun.·See·the3670 <code·class="inline">Event</code>·argument·to·the·verification·fun.·See·the
Offset 3674, 33 lines modifiedOffset 3674, 33 lines modified
3674 of·<code·class="inline">#'OTPCertificate'{}</code>·and·<code·class="inline">#'Extension'{}</code>.</p><ul><li>If·the·verify·callback·fun·returns·<code·class="inline">{fail,·Reason}</code>,·the·verification·process3674 of·<code·class="inline">#'OTPCertificate'{}</code>·and·<code·class="inline">#'Extension'{}</code>.</p><ul><li>If·the·verify·callback·fun·returns·<code·class="inline">{fail,·Reason}</code>,·the·verification·process
3675 is·immediately·stopped,·an·alert·is·sent·to·the·peer,·and·the·TLS/DTLS3675 is·immediately·stopped,·an·alert·is·sent·to·the·peer,·and·the·TLS/DTLS
3676 handshake·terminates.</li><li>If·the·verify·callback·fun·returns·<code·class="inline">{valid,·UserState}</code>,·the·verification3676 handshake·terminates.</li><li>If·the·verify·callback·fun·returns·<code·class="inline">{valid,·UserState}</code>,·the·verification
3677 process·continues.</li><li>If·the·verify·callback·fun·always·returns·<code·class="inline">{valid,·UserState}</code>,·the·TLS/DTLS3677 process·continues.</li><li>If·the·verify·callback·fun·always·returns·<code·class="inline">{valid,·UserState}</code>,·the·TLS/DTLS
3678 handshake·does·not·terminate·regarding·verification·failures·and·the3678 handshake·does·not·terminate·regarding·verification·failures·and·the
3679 connection·is·established.</li><li>If·called·with·an·extension·unknown·to·the·user·application,·return·value3679 connection·is·established.</li><li>If·called·with·an·extension·unknown·to·the·user·application,·return·value
3680 <code·class="inline">{unknown,·UserState}</code>·is·to·be·used.</li></ul><p>Note·that·if·the·fun·returns·<code·class="inline">unknown</code>·for·an·extension·marked·as·critical,3680 <code·class="inline">{unknown,·UserState}</code>·is·to·be·used.</li></ul><p>Note·that·if·the·fun·returns·<code·class="inline">unknown</code>·for·an·extension·marked·as·critical,
3681 validation·will·fail.</p><p>Default·option·<code·class="inline">verify_fun</code>·in·<code·class="inline">verify_peer·mode</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6282794348-1">{</span><span·class="nf">fun</span><span·class="p"·data-group-id="6282794348-2">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="6282794348-3">{</span><span·class="ss">bad_cert</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·318,·SHA:·4e156fdc8b84db5c17cb3594e849382beccd8f31b05d2bf3a829688c568c55ba·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3681 validation·will·fail.</p><p>Default·option·<code·class="inline">verify_fun</code>·in·<code·class="inline">verify_peer·mode</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5183242761-1">{</span><span·class="nf">fun</span><span·class="p"·data-group-id="5183242761-2">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="5183242761-3">{</span><span·class="ss">bad_cert</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·318,·SHA:·cb55d65a188db48a7bad9c2099637ca7d6a077182467ee8320003907fbfbf846·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3682 ···</span><span·class="p"·data-group-id="6282794348-4">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="6282794348-4">}</span><span·class="p">;</span><span·class="w">3682 ···</span><span·class="p"·data-group-id="5183242761-4">{</span><span·class="ss">fail</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="5183242761-4">}</span><span·class="p">;</span><span·class="w">
3683 ····</span><span·class="p"·data-group-id="6282794348-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="6282794348-6">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·146,·SHA:·7a48131684eae969501e5e692eceef5faff7c3bfad6ef9f9845f11c11a105e67·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3683 ····</span><span·class="p"·data-group-id="5183242761-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="5183242761-6">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·146,·SHA:·f032cbc78673a2b6cc547cce3e1a69dcf30b24af7c66f7e7ba1f99de0648f2f0·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3684 ···</span><span·class="p"·data-group-id="6282794348-7">{</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="6282794348-7">}</span><span·class="p">;</span><span·class="w">3684 ···</span><span·class="p"·data-group-id="5183242761-7">{</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="5183242761-7">}</span><span·class="p">;</span><span·class="w">
3685 ····</span><span·class="p"·data-group-id="6282794348-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="6282794348-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3685 ····</span><span·class="p"·data-group-id="5183242761-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="5183242761-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3686 ···</span><span·class="p"·data-group-id="6282794348-9">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="6282794348-9">}</span><span·class="p">;</span><span·class="w">3686 ···</span><span·class="p"·data-group-id="5183242761-9">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="5183242761-9">}</span><span·class="p">;</span><span·class="w">
3687 ····</span><span·class="p"·data-group-id="6282794348-10">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid_peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="6282794348-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3687 ····</span><span·class="p"·data-group-id="5183242761-10">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid_peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="5183242761-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3688 ·······</span><span·class="p"·data-group-id="6282794348-11">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="6282794348-11">}</span><span·class="w">3688 ·······</span><span·class="p"·data-group-id="5183242761-11">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="5183242761-11">}</span><span·class="w">
3689 ·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6282794348-12">[</span><span·class="p"·data-group-id="6282794348-12">]</span><span·class="p"·data-group-id="6282794348-1">}</span></code></pre><p>Default·option·<code·class="inline">verify_fun</code>·in·mode·<code·class="inline">verify_none</code>:</p><pre[·...·truncated·by·diffoscope;·len:·580,·SHA:·2a3b1b2bf4401b0a841f4a62eb7478f1f9e70596a0fe25e59dccab37c1ec32ca·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3689 ·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5183242761-12">[</span><span·class="p"·data-group-id="5183242761-12">]</span><span·class="p"·data-group-id="5183242761-1">}</span></code></pre><p>Default·option·<code·class="inline">verify_fun</code>·in·mode·<code·class="inline">verify_none</code>:</p><pre[·...·truncated·by·diffoscope;·len:·580,·SHA:·49a93f143925cef3f797528c3e94f31218e1312ee4a63bcf53ff9135dab8275c·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3690 ···</span><span·class="p"·data-group-id="7734755631-4">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-4">}</span><span·class="p">;</span><span·class="w">3690 ···</span><span·class="p"·data-group-id="7112907074-4">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-4">}</span><span·class="p">;</span><span·class="w">
3691 ····</span><span·class="p"·data-group-id="7734755631-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="7734755631-6">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Extensi[·...·truncated·by·diffoscope;·len:·426,·SHA:·46672dbe140e936931c1e65c1bad6413232d897f746ab75cf950c588690dce10·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3691 ····</span><span·class="p"·data-group-id="7112907074-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="7112907074-6">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">&#39;Extensi[·...·truncated·by·diffoscope;·len:·426,·SHA:·5f24a80aaa238420ba51d896f7f0b142b56235d6ee0a46b6641aa844b2e65b8c·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3692 ···</span><span·class="p"·data-group-id="7734755631-8">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-8">}</span><span·class="p">;</span><span·class="w">3692 ···</span><span·class="p"·data-group-id="7112907074-8">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-8">}</span><span·class="p">;</span><span·class="w">
3693 ····</span><span·class="p"·data-group-id="7734755631-9">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="7734755631-10">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·147,·SHA:·ca0395c3d44bee81512ae67de93128d4723b36e0306f36ac4b7f479b7583b2eb·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3693 ····</span><span·class="p"·data-group-id="7112907074-9">(</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="7112907074-10">{</span><span·class="ss">extension</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·147,·SHA:·2c71ada9008112781c416275743118df0fd779d0c38c0d8f6e87fdb4ed086376·...·]-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3694 ···</span><span·class="p"·data-group-id="7734755631-11">{</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-11">}</span><span·class="p">;</span><span·class="w">3694 ···</span><span·class="p"·data-group-id="7112907074-11">{</span><span·class="ss">unknown</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-11">}</span><span·class="p">;</span><span·class="w">
3695 ····</span><span·class="p"·data-group-id="7734755631-12">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3695 ····</span><span·class="p"·data-group-id="7112907074-12">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3696 ···</span><span·class="p"·data-group-id="7734755631-13">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-13">}</span><span·class="p">;</span><span·class="w">3696 ···</span><span·class="p"·data-group-id="7112907074-13">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-13">}</span><span·class="p">;</span><span·class="w">
3697 ····</span><span·class="p"·data-group-id="7734755631-14">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid_peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3697 ····</span><span·class="p"·data-group-id="7112907074-14">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">valid_peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3698 ·······</span><span·class="p"·data-group-id="7734755631-15">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7734755631-15">}</span><span·class="w">3698 ·······</span><span·class="p"·data-group-id="7112907074-15">{</span><span·class="ss">valid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">UserState</span><span·class="p"·data-group-id="7112907074-15">}</span><span·class="w">
Max diff block lines reached; 34180/82268 bytes (41.55%) of diff not shown.
22.9 KB
./usr/share/doc/erlang-doc/html/lib/ssl-11.2.1/doc/html/ssl_distribution.html
    
Offset 143, 22 lines modifiedOffset 143, 22 lines modified
143 </h2>143 </h2>
144 <p>Boot·scripts·are·built·using·the·<code·class="inline">systools</code>·utility·in·the·SASL·application.·For144 <p>Boot·scripts·are·built·using·the·<code·class="inline">systools</code>·utility·in·the·SASL·application.·For
145 more·information·on·<code·class="inline">systools</code>,·see·the·SASL·documentation.·This·is·only·an145 more·information·on·<code·class="inline">systools</code>,·see·the·SASL·documentation.·This·is·only·an
146 example·of·what·can·be·done.</p><p>The·simplest·boot·script·possible·includes·only·the·Kernel·and·STDLIB146 example·of·what·can·be·done.</p><p>The·simplest·boot·script·possible·includes·only·the·Kernel·and·STDLIB
147 applications.·Such·a·script·is·located·in·the·<code·class="inline">bin</code>·directory·of·the·Erlang147 applications.·Such·a·script·is·located·in·the·<code·class="inline">bin</code>·directory·of·the·Erlang
148 distribution.·The·source·for·the·script·is·found·under·the·Erlang·installation148 distribution.·The·source·for·the·script·is·found·under·the·Erlang·installation
149 top·directory·under·<code·class="inline">releases/&lt;OTP·version&gt;/start_clean.rel</code>.</p><p>Do·the·following:</p><ul><li>Copy·that·script·to·another·location·(and·preferably·another·name).</li><li>Add·the·applications·Crypto,·Public·Key,·and·SSL·with·their·current·version149 top·directory·under·<code·class="inline">releases/&lt;OTP·version&gt;/start_clean.rel</code>.</p><p>Do·the·following:</p><ul><li>Copy·that·script·to·another·location·(and·preferably·another·name).</li><li>Add·the·applications·Crypto,·Public·Key,·and·SSL·with·their·current·version
150 numbers·after·the·STDLIB·application.</li></ul><p>The·following·shows·an·example·<code·class="inline">.rel</code>·file·with·TLS·added:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="4983867489-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4983867489-2">{</span><span·class="s">&quot;OTP··APN·181·01&quot;</span><span·class="p">,</span><span·class="s">&quot;R15A&q[·...·truncated·by·diffoscope;·len:·320,·SHA:·ee120d5818c97818fc04dd1847f7ec0232799e4ccabf57dab3d553e5371143a5·...·]-3">}</span><span·class="p">,</span><span·class="w">150 numbers·after·the·STDLIB·application.</li></ul><p>The·following·shows·an·example·<code·class="inline">.rel</code>·file·with·TLS·added:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="p"·data-group-id="3320291888-1">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3320291888-2">{</span><span·class="s">&quot;OTP··APN·181·01&quot;</span><span·class="p">,</span><span·class="s">&quot;R15A&q[·...·truncated·by·diffoscope;·len:·320,·SHA:·98a43af574771f55de8db4bbdda3f813951fa842f01a7cba4c3000a844de7340·...·]-3">}</span><span·class="p">,</span><span·class="w">
151 ······</span><span·class="p"·data-group-id="4983867489-4">[</span><span·class="p"·data-group-id="4983867489-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;2.15&quot;</span><span·class="p"·data-group-id="4983867489-5">}</span><span·class="p">,</span><span·class="w">151 ······</span><span·class="p"·data-group-id="3320291888-4">[</span><span·class="p"·data-group-id="3320291888-5">{</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="s">&quot;2.15&quot;</span><span·class="p"·data-group-id="3320291888-5">}</span><span·class="p">,</span><span·class="w">
152 ······</span><span·class="p"·data-group-id="4983867489-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;1.18&quot;</span><span·class="p"·data-group-id="4983867489-6">}</span><span·class="p">,</span><span·class="w">152 ······</span><span·class="p"·data-group-id="3320291888-6">{</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="s">&quot;1.18&quot;</span><span·class="p"·data-group-id="3320291888-6">}</span><span·class="p">,</span><span·class="w">
153 ······</span><span·class="p"·data-group-id="4983867489-7">{</span><span·class="ss">crypto</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.0.3&quot;</span><span·class="p"·data-group-id="4983867489-7">}</span><span·class="p">,</span><span·class="w">153 ······</span><span·class="p"·data-group-id="3320291888-7">{</span><span·class="ss">crypto</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2.0.3&quot;</span><span·class="p"·data-group-id="3320291888-7">}</span><span·class="p">,</span><span·class="w">
154 ······</span><span·class="p"·data-group-id="4983867489-8">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;0.12&quot;</span><span·class="p"·data-group-id="4983867489-8">}</span><span·class="p">,</span><span·class="w">154 ······</span><span·class="p"·data-group-id="3320291888-8">{</span><span·class="ss">public_key</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;0.12&quot;</span><span·class="p"·data-group-id="3320291888-8">}</span><span·class="p">,</span><span·class="w">
155 ······</span><span·class="p"·data-group-id="4983867489-9">{</span><span·class="ss">asn1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.0&quot;</span><span·class="p"·data-group-id="4983867489-9">}</span><span·class="p">,</span><span·class="w">155 ······</span><span·class="p"·data-group-id="3320291888-9">{</span><span·class="ss">asn1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;4.0&quot;</span><span·class="p"·data-group-id="3320291888-9">}</span><span·class="p">,</span><span·class="w">
156 ······</span><span·class="p"·data-group-id="4983867489-10">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.0&quot;</span><span·class="p"·data-group-id="4983867489-10">}</span><span·class="w">156 ······</span><span·class="p"·data-group-id="3320291888-10">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;5.0&quot;</span><span·class="p"·data-group-id="3320291888-10">}</span><span·class="w">
157 ······</span><span·class="p"·data-group-id="4983867489-4">]</span><span·class="p"·data-group-id="4983867489-1">}</span><span·class="p">.</span></code></pre><p>The·version·numbers·differ·in·your·system.·Whenever·one·of·the·applications157 ······</span><span·class="p"·data-group-id="3320291888-4">]</span><span·class="p"·data-group-id="3320291888-1">}</span><span·class="p">.</span></code></pre><p>The·version·numbers·differ·in·your·system.·Whenever·one·of·the·applications
158 included·in·the·script·is·upgraded,·change·the·script.</p><p>Do·the·following:</p><ul><li><p>Build·the·boot·script.</p><p>Assuming·the·<code·class="inline">.rel·file</code>·is·stored·in·a·file·<code·class="inline">start_ssl.rel</code>·in·the·current158 included·in·the·script·is·upgraded,·change·the·script.</p><p>Do·the·following:</p><ul><li><p>Build·the·boot·script.</p><p>Assuming·the·<code·class="inline">.rel·file</code>·is·stored·in·a·file·<code·class="inline">start_ssl.rel</code>·in·the·current
159 directory,·a·boot·script·can·be·built·as·follows:</p></li></ul><pre><code·class="text">···1&gt;·systools:make_script(&quot;start_ssl&quot;,[]).</code></pre><p>There·is·now·a·<code·class="inline">start_ssl.boot</code>·file·in·the·current·directory.</p><p>Do·the·following:</p><ul><li>Test·the·boot·script.·To·do·this,·start·Erlang·with·the·<code·class="inline">-boot</code>·command-line159 directory,·a·boot·script·can·be·built·as·follows:</p></li></ul><pre><code·class="text">···1&gt;·systools:make_script(&quot;start_ssl&quot;,[]).</code></pre><p>There·is·now·a·<code·class="inline">start_ssl.boot</code>·file·in·the·current·directory.</p><p>Do·the·following:</p><ul><li>Test·the·boot·script.·To·do·this,·start·Erlang·with·the·<code·class="inline">-boot</code>·command-line
160 parameter·specifying·this·boot·script·(with·its·full·path,·but·without·the160 parameter·specifying·this·boot·script·(with·its·full·path,·but·without·the
161 <code·class="inline">.boot</code>·suffix).·In·UNIX·it·can·look·as·follows:</li></ul><pre><code·class="text">$·erl·-boot·/home/me/ssl/start_ssl161 <code·class="inline">.boot</code>·suffix).·In·UNIX·it·can·look·as·follows:</li></ul><pre><code·class="text">$·erl·-boot·/home/me/ssl/start_ssl
162 Erlang·(BEAM)·emulator·version·5.0162 Erlang·(BEAM)·emulator·version·5.0
  
163 Eshell·V5.0··(abort·with·^G)163 Eshell·V5.0··(abort·with·^G)
Offset 197, 19 lines modifiedOffset 197, 19 lines modified
197 function·body·cannot·be·compiled·when·consulting·a·file.·Also·the·encoding197 function·body·cannot·be·compiled·when·consulting·a·file.·Also·the·encoding
198 of·the·file·can·be·specified·as·defined·by·module·<a·href="../../../../lib/stdlib-6.0.1/doc/html/epp.html"><code·class="inline">epp</code></a>.</p></blockquote><blockquote><h4·class="warning">Warning</h4><p>Do·not·tamper·with·the·socket·options·<code·class="inline">list</code>,·<code·class="inline">binary</code>,·<code·class="inline">active</code>,·<code·class="inline">packet</code>,198 of·the·file·can·be·specified·as·defined·by·module·<a·href="../../../../lib/stdlib-6.0.1/doc/html/epp.html"><code·class="inline">epp</code></a>.</p></blockquote><blockquote><h4·class="warning">Warning</h4><p>Do·not·tamper·with·the·socket·options·<code·class="inline">list</code>,·<code·class="inline">binary</code>,·<code·class="inline">active</code>,·<code·class="inline">packet</code>,
199 <code·class="inline">nodelay</code>·and·<code·class="inline">deliver</code>·since·they·are·used·by·the·distribution·protocol·handler199 <code·class="inline">nodelay</code>·and·<code·class="inline">deliver</code>·since·they·are·used·by·the·distribution·protocol·handler
200 itself.·Other·raw·socket·options·such·as·<code·class="inline">packet_size</code>·may·interfere·severely,200 itself.·Other·raw·socket·options·such·as·<code·class="inline">packet_size</code>·may·interfere·severely,
201 so·beware!</p></blockquote><p>For·TLS·to·work,·at·least·a·public·key·and·a·certificate·must·be·specified·for201 so·beware!</p></blockquote><p>For·TLS·to·work,·at·least·a·public·key·and·a·certificate·must·be·specified·for
202 the·server·side.·In·the·following·example,·the·PEM·file202 the·server·side.·In·the·following·example,·the·PEM·file
203 <code·class="inline">&quot;/home/me/ssl/erlserver.pem&quot;</code>·contains·both·the·server·certificate·and·its203 <code·class="inline">&quot;/home/me/ssl/erlserver.pem&quot;</code>·contains·both·the·server·certificate·and·its
204 private·key.</p><p>Create·a·file·named·for·example·<code·class="inline">&quot;/home/me/ssl/ssl_test@myhost.conf&quot;</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8731936926-1">[</span><span·class="p"·data-group-id="8731936926-2">{</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">204 private·key.</p><p>Create·a·file·named·for·example·<code·class="inline">&quot;/home/me/ssl/ssl_test@myhost.conf&quot;</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4814829533-1">[</span><span·class="p"·data-group-id="4814829533-2">{</span><span·class="ss">server</span><span·class="p">,</span><span·class="w">
205 ··</span><span·class="p"·data-group-id="8731936926-3">[</span><span·class="p"·data-group-id="8731936926-4">{</span><span·class="ss">certfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/me/ssl/erlserver.pem&quot;</span><span·class="p"·data-group-id="873193692[·...·truncated·by·diffoscope;·len:·1,·SHA:·e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683·...·]-4">}</span><span·class="p">,</span><span·class="w">205 ··</span><span·class="p"·data-group-id="4814829533-3">[</span><span·class="p"·data-group-id="4814829533-4">{</span><span·class="ss">certfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;/home/me/ssl/erlserver.pem&quot;</span><span·class="p"·data-group-id="481482953[·...·truncated·by·diffoscope;·len:·1,·SHA:·4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce·...·]-4">}</span><span·class="p">,</span><span·class="w">
206 ···</span><span·class="p"·data-group-id="8731936926-5">{</span><span·class="ss">secure_renegotiate</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8731936926-5">}</span><span·class="p"·data-group-id="8731936926-3">]</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·333af831afb55a2247a00fde61e2a7baf15bf2dcb8f66497254377042991a3bb·...·]-2">}</span><span·class="p">,</span><span·class="w">206 ···</span><span·class="p"·data-group-id="4814829533-5">{</span><span·class="ss">secure_renegotiate</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="4814829533-5">}</span><span·class="p"·data-group-id="4814829533-3">]</span><span·clas[·...·truncated·by·diffoscope;·len:·31,·SHA:·5d857c5c11dbefb1ab6a53e0e0153f6af71d119f63c955bbe1d73793500ac817·...·]-2">}</span><span·class="p">,</span><span·class="w">
207 ·</span><span·class="p"·data-group-id="8731936926-6">{</span><span·class="ss">client</span><span·class="p">,</span><span·class="w">207 ·</span><span·class="p"·data-group-id="4814829533-6">{</span><span·class="ss">client</span><span·class="p">,</span><span·class="w">
208 ··</span><span·class="p"·data-group-id="8731936926-7">[</span><span·class="p"·data-group-id="8731936926-8">{</span><span·class="ss">secure_renegotiate</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="8731936926-8">}</span><span·clas[·...·truncated·by·diffoscope;·len:·137,·SHA:·b82020a4afa5113b1e45d9f011f62bf5a9394f6edf2376107d1b47a47f5cd25b·...·]-1">]</span><span·class="p">.</span></code></pre><p>And·then·start·the·node·like·this·(line·breaks·in·the·command·are·for208 ··</span><span·class="p"·data-group-id="4814829533-7">[</span><span·class="p"·data-group-id="4814829533-8">{</span><span·class="ss">secure_renegotiate</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="4814829533-8">}</span><span·clas[·...·truncated·by·diffoscope;·len:·137,·SHA:·9a5d0a7e85ea7c7f9df67355a60f9eb76f4f57f59c6c5887cb81ff379713345f·...·]-1">]</span><span·class="p">.</span></code></pre><p>And·then·start·the·node·like·this·(line·breaks·in·the·command·are·for
209 readability,·and·shall·not·be·there·when·typed):</p><pre><code·class="text">$·erl·-boot·/home/me/ssl/start_ssl·-proto_dist·inet_tls209 readability,·and·shall·not·be·there·when·typed):</p><pre><code·class="text">$·erl·-boot·/home/me/ssl/start_ssl·-proto_dist·inet_tls
210 ··-ssl_dist_optfile·&quot;/home/me/ssl/ssl_test@myhost.conf&quot;210 ··-ssl_dist_optfile·&quot;/home/me/ssl/ssl_test@myhost.conf&quot;
211 ··-sname·ssl_test</code></pre><p>The·options·in·the·<code·class="inline">{server,·Opts}</code>·tuple·are·used·when·calling211 ··-sname·ssl_test</code></pre><p>The·options·in·the·<code·class="inline">{server,·Opts}</code>·tuple·are·used·when·calling
212 <a·href="ssl.html#handshake/3"><code·class="inline">ssl:handshake/3</code></a>,·and·the·options·in·the·<code·class="inline">{client,·Opts}</code>·tuple·are·used·when212 <a·href="ssl.html#handshake/3"><code·class="inline">ssl:handshake/3</code></a>,·and·the·options·in·the·<code·class="inline">{client,·Opts}</code>·tuple·are·used·when
213 calling·<a·href="ssl.html#connect/4"><code·class="inline">ssl:connect/4</code></a>.</p><p>For·the·client,·the·option·<code·class="inline">{server_name_indication,·atom_to_list(TargetNode)}</code>213 calling·<a·href="ssl.html#connect/4"><code·class="inline">ssl:connect/4</code></a>.</p><p>For·the·client,·the·option·<code·class="inline">{server_name_indication,·atom_to_list(TargetNode)}</code>
214 is·added·when·connecting.·This·makes·it·possible·to·use·the·client·option214 is·added·when·connecting.·This·makes·it·possible·to·use·the·client·option
215 <code·class="inline">{verify,·verify_peer}</code>,·and·the·client·will·verify·that·the·certificate·matches215 <code·class="inline">{verify,·verify_peer}</code>,·and·the·client·will·verify·that·the·certificate·matches
Offset 257, 27 lines modifiedOffset 257, 27 lines modified
257 in·that·variable·and·are·then·interpreted·as·command-line·arguments·for·all257 in·that·variable·and·are·then·interpreted·as·command-line·arguments·for·all
258 subsequent·invocations·of·Erlang.</p><p>In·a·Unix·(Bourne)·shell,·it·can·look·as·follows·(line·breaks·are·for258 subsequent·invocations·of·Erlang.</p><p>In·a·Unix·(Bourne)·shell,·it·can·look·as·follows·(line·breaks·are·for
259 readability,·they·are·not·to·be·there·when·typed):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="n">ERL_FLAGS</span><span·class="o">=</span><span·class="s">&quot;-boot·/home/me/ssl/start_ssl·-proto_dist·inet_tls259 readability,·they·are·not·to·be·there·when·typed):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="n">ERL_FLAGS</span><span·class="o">=</span><span·class="s">&quot;-boot·/home/me/ssl/start_ssl·-proto_dist·inet_tls
260 ··-ssl_dist_opt·server_certfile·/home/me/ssl/erlserver.pem260 ··-ssl_dist_opt·server_certfile·/home/me/ssl/erlserver.pem
261 ··-ssl_dist_opt·server_secure_renegotiate·true·client_secure_renegotiate·true&quot;</span><span·class="w">261 ··-ssl_dist_opt·server_secure_renegotiate·true·client_secure_renegotiate·true&quot;</span><span·class="w">
262 </span><span·class="sc">$·</span><span·class="ss">export</span><span·class="w">·</span><span·class="n">ERL_FLAGS</span><span·class="w">262 </span><span·class="sc">$·</span><span·class="ss">export</span><span·class="w">·</span><span·class="n">ERL_FLAGS</span><span·class="w">
263 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">sname</span><span·class="w">·</span><span·class="ss">ssl_test</span><span·class="w">263 </span><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">sname</span><span·class="w">·</span><span·class="ss">ssl_test</span><span·class="w">
264 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="4474970814-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="4474970814-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.[·...·truncated·by·diffoscope;·len:·156,·SHA:·b5d406ef09d96afc4463180981aeedb5f66c7b620fbb0698a46017c3517c63bc·...·]-2">]</span><span·class="w">264 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="9476260697-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="9476260697-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.[·...·truncated·by·diffoscope;·len:·156,·SHA:·43ac5f7ae6cf0c24b7374bbd0e3a4b114fa77ba4a741f72a3fdf75e8255b370b·...·]-2">]</span><span·class="w">
  
265 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="4474970814-3">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="4474970814-3">)</span><span·class="gp·unselectable">265 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">··</span><span·class="p"·data-group-id="9476260697-3">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="9476260697-3">)</span><span·class="gp·unselectable">
266 (ssl_test@myhost)1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_arguments</span><span·class="p"·data-group-id="4474970814-4">(</span><span·class="p"·data-group-id="4474970814-4">)</span><span·class="p">.</span><span·class="w">266 (ssl_test@myhost)1&gt;·</span><span·class="nc">init</span><span·class="p">:</span><span·class="nf">get_arguments</span><span·class="p"·data-group-id="9476260697-4">(</span><span·class="p"·data-group-id="9476260697-4">)</span><span·class="p">.</span><span·class="w">
267 </span><span·class="p"·data-group-id="4474970814-5">[</span><span·class="p"·data-group-id="4474970814-6">{</span><span·class="ss">root</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-7">[</span><span·class="s">&quot;/usr/local/erlang&quot;</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·7c353dc1933276ce266ef2388a833d2138789fe6af335ef04eb1283005a97b77·...·]-6">}</span><span·class="p">,</span><span·class="w">267 </span><span·class="p"·data-group-id="9476260697-5">[</span><span·class="p"·data-group-id="9476260697-6">{</span><span·class="ss">root</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-7">[</span><span·class="s">&quot;/usr/local/erlang&quot;</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·0867efedbfb7c1dedd797d371eb4d5edc96f128215d4d3928c8a26fde27ae00a·...·]-6">}</span><span·class="p">,</span><span·class="w">
268 ·</span><span·class="p"·data-group-id="4474970814-8">{</span><span·class="ss">progname</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-9">[</span><span·class="s">&quot;erl·&quot;</span><span·class="p"·data-group-id="4474970814-9">]</span><span·class="p"·data-group-id="44[·...·truncated·by·diffoscope;·len:·8,·SHA:·ec16c11bf511800e9aa76d54aebfb69e323d9e1ccdce219d5f255b7bf737f1d8·...·]-8">}</span><span·class="p">,</span><span·class="w">268 ·</span><span·class="p"·data-group-id="9476260697-8">{</span><span·class="ss">progname</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-9">[</span><span·class="s">&quot;erl·&quot;</span><span·class="p"·data-group-id="9476260697-9">]</span><span·class="p"·data-group-id="94[·...·truncated·by·diffoscope;·len:·8,·SHA:·b4d0790df75e0897c7258ac5ff9051951cb3c3b2d43fa682432fa73f36b9fda3·...·]-8">}</span><span·class="p">,</span><span·class="w">
269 ·</span><span·class="p"·data-group-id="4474970814-10">{</span><span·class="ss">sname</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-11">[</span><span·class="s">&quot;ssl_test&quot;</span><span·class="p"·data-group-id="4474970814-11">]</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·41a2692a18f7bc017c01126e99eafb1cd9ba332ae9948274352472be603700ce·...·]-10">}</span><span·class="p">,</span><span·class="w">269 ·</span><span·class="p"·data-group-id="9476260697-10">{</span><span·class="ss">sname</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-11">[</span><span·class="s">&quot;ssl_test&quot;</span><span·class="p"·data-group-id="9476260697-11">]</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·12,·SHA:·5d7f97efae8fd94b26ff9f4c3473a6de49f0917207872ac0b3319390f51f6650·...·]-10">}</span><span·class="p">,</span><span·class="w">
270 ·</span><span·class="p"·data-group-id="4474970814-12">{</span><span·class="ss">boot</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-13">[</span><span·class="s">&quot;/home/me/ssl/start_ssl&quot;</span><span·class="p"·data-group-id="4474970814-13">]</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·6fb31c48e0d4fe933ef0ba87b4860d0a19a36a411f2fb9819a9c899b601212bd·...·]-12">}</span><span·class="p">,</span><span·class="w">270 ·</span><span·class="p"·data-group-id="9476260697-12">{</span><span·class="ss">boot</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-13">[</span><span·class="s">&quot;/home/me/ssl/start_ssl&quot;</span><span·class="p"·data-group-id="9476260697-13">]</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·052e73578376abccf78639863a5b8111f848c99ce06ffdd885f17e90b8ac22a8·...·]-12">}</span><span·class="p">,</span><span·class="w">
271 ·</span><span·class="p"·data-group-id="4474970814-14">{</span><span·class="ss">proto_dist</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-15">[</span><span·class="s">&quot;inet_tls&quot;</span><span·class="p"·data-group-id="4474970814-15">]</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·0202ac37bd5fec3996ab1d4373c6ee6ea43377b8d28a24ff6d6eeb13fa555f32·...·]-14">}</span><span·class="p">,</span><span·class="w">271 ·</span><span·class="p"·data-group-id="9476260697-14">{</span><span·class="ss">proto_dist</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-15">[</span><span·class="s">&quot;inet_tls&quot;</span><span·class="p"·data-group-id="9476260697-15">]</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·e7c1d2332fec7cfa2d66d6a388500c890b90c5758ff24d8bda385ab580b4c0ee·...·]-14">}</span><span·class="p">,</span><span·class="w">
272 ·</span><span·class="p"·data-group-id="4474970814-16">{</span><span·class="ss">ssl_dist_opt</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-17">[</span><span·class="s">&quot;server_certfile&quot;</span><span·class="p">,</span><span·class="s">&quot;/home/me/ssl/erlserver.[·...·truncated·by·diffoscope;·len:·111,·SHA:·c90d712bd8c4cfb7ee80a7689afb651decee33a69298d204e3e25fba6b7d63f5·...·]-16">}</span><span·class="p">,</span><span·class="w">272 ·</span><span·class="p"·data-group-id="9476260697-16">{</span><span·class="ss">ssl_dist_opt</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-17">[</span><span·class="s">&quot;server_certfile&quot;</span><span·class="p">,</span><span·class="s">&quot;/home/me/ssl/erlserver.[·...·truncated·by·diffoscope;·len:·111,·SHA:·bd3feb77d6d52aa52a69e5e158f1d427711c7fd1490ab3a9a060e1d3618240a3·...·]-16">}</span><span·class="p">,</span><span·class="w">
273 ·</span><span·class="p"·data-group-id="4474970814-18">{</span><span·class="ss">ssl_dist_opt</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-19">[</span><span·class="s">&quot;server_secure_renegotiate&quot;</span><span·class="p">,</span><span·class="s">&quot;true&quot;</span><span·class="p">,</span><span·class="w">273 ·</span><span·class="p"·data-group-id="9476260697-18">{</span><span·class="ss">ssl_dist_opt</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-19">[</span><span·class="s">&quot;server_secure_renegotiate&quot;</span><span·class="p">,</span><span·class="s">&quot;true&quot;</span><span·class="p">,</span><span·class="w">
274 ················</span><span·class="s">&quot;client_secure_renegotiate&quot;</span><span·class="p">,</span><span·class="s">&quot;true&quot;</span><span·class="p"·data-group-id="4474970814-19">]</span><span·class="w">274 ················</span><span·class="s">&quot;client_secure_renegotiate&quot;</span><span·class="p">,</span><span·class="s">&quot;true&quot;</span><span·class="p"·data-group-id="9476260697-19">]</span><span·class="w">
275 ·</span><span·class="p"·data-group-id="4474970814-20">{</span><span·class="ss">home</span><span·class="p">,</span><span·class="p"·data-group-id="4474970814-21">[</span><span·class="s">&quot;/home/me&quot;</span><span·class="p"·data-group-id="4474970814-21">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·b82ea2e84b40b6095f14556f0921c64a359419cdb7b0384e4c981f8d0d0b8e02·...·]-20">}</span><span·class="p">]</span></code></pre><p>The·<code·class="inline">init:get_arguments()</code>·call·verifies·that·the·correct·arguments·are·supplied275 ·</span><span·class="p"·data-group-id="9476260697-20">{</span><span·class="ss">home</span><span·class="p">,</span><span·class="p"·data-group-id="9476260697-21">[</span><span·class="s">&quot;/home/me&quot;</span><span·class="p"·data-group-id="9476260697-21">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·4a99d16392fa3ad437d746bddb638ab651b80d39e53359faf5d68812a94c1241·...·]-20">}</span><span·class="p">]</span></code></pre><p>The·<code·class="inline">init:get_arguments()</code>·call·verifies·that·the·correct·arguments·are·supplied
276 to·the·emulator.</p><h2·id="using-tls-distribution-over-ipv6"·class="section-heading">276 to·the·emulator.</p><h2·id="using-tls-distribution-over-ipv6"·class="section-heading">
277 ··<a·href="#using-tls-distribution-over-ipv6"·class="hover-link">277 ··<a·href="#using-tls-distribution-over-ipv6"·class="hover-link">
278 ····<i·class="ri-link-m"·aria-hidden="true"></i>278 ····<i·class="ri-link-m"·aria-hidden="true"></i>
279 ··</a>279 ··</a>
280 ··<span·class="text">Using·TLS·distribution·over·IPv6</span>280 ··<span·class="text">Using·TLS·distribution·over·IPv6</span>
281 </h2>281 </h2>
282 <p>It·is·possible·to·use·TLS·distribution·over·IPv6·instead·of·IPv4.·To·do·this,282 <p>It·is·possible·to·use·TLS·distribution·over·IPv6·instead·of·IPv4.·To·do·this,
291 KB
./usr/share/doc/erlang-doc/html/lib/ssl-11.2.1/doc/html/using_ssl.html
    
Offset 145, 112 lines modifiedOffset 145, 112 lines modified
145 examples,·are·provided·using·the·<a·href="ssl.html#t:cert_key_conf/0"><code·class="inline">ssl:cert_key_conf/0</code></a>·supplied·in·the·<code·class="inline">certs_keys</code>145 examples,·are·provided·using·the·<a·href="ssl.html#t:cert_key_conf/0"><code·class="inline">ssl:cert_key_conf/0</code></a>·supplied·in·the·<code·class="inline">certs_keys</code>
146 introduced·in·OTP·25.</p></blockquote><h2·id="basic-client"·class="section-heading">146 introduced·in·OTP·25.</p></blockquote><h2·id="basic-client"·class="section-heading">
147 ··<a·href="#basic-client"·class="hover-link">147 ··<a·href="#basic-client"·class="hover-link">
148 ····<i·class="ri-link-m"·aria-hidden="true"></i>148 ····<i·class="ri-link-m"·aria-hidden="true"></i>
149 ··</a>149 ··</a>
150 ··<span·class="text">Basic·Client</span>150 ··<span·class="text">Basic·Client</span>
151 </h2>151 </h2>
152 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2489912597-1">(</span><span·class="p"·data-group-id="2489912597-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="2489912597-2">(</span><span·class="s">&quot;google.com&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">443</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2489912597-3">[</span><span·class="p"·data-group-id="2489912597-4">{</span><span·class="ss">verify</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">verify_peer</span><span·class="p"·data-group-id="2489912597-4">}</span><span·class="p">,</span><span·class="w"> 
153 ····</span><span·class="p"·data-group-id="2489912597-5">{</span><span·class="ss">cacerts</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf">cacerts_get</span><span·class="p"·data-group-id="2489912597-6">(</span><span·class="p"·data-group-id="2489912597-6">)</span><span·class="p"·data-group-id="2489912597-5">}</span><span·class="p"·data-group-id="2489912597-3">]</span><span·class="p"·data-group-id="2489912597-2">)</span><span·class="p">.</span><span·class="w"> 
154 ···</span><span·class="p"·data-group-id="2489912597-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2489912597-8">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·336,·SHA:·423f7a2b1d03bf5147f330812867ea8891cf1659dfcc9a2917b582da4187b294·...·]">152 <pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><spa[·...·truncated·by·diffoscope;·len:·763,·SHA:·9bd5a9f8c564fd02fbcb136ec8b48606feedaba252710dd73d64aa0c63e3911e·...·]">
 153 ····</span><span·class="p"·data-group-id="7971742947-5">{</span><span·class="ss">cacerts</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">public_key</span><span·class="p">:</span><span·class="nf">cacerts_get</span><span·class="p"·data-group-id="7971742947-6">(</span><span·class="p"·data-group-id="7971742947-6">)</span><span·class="p"·data-group-id="7971742947-5">}</span><span·class="p"·data-group-id="7971742947-3">]</span><span·class="p"·data-group-id="7971742947-2">)</span><span·class="p">.</span><span·class="w">
 154 ···</span><span·class="p"·data-group-id="7971742947-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7971742947-8">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7971742947-9">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="7971742947-9">]</span><span·class="p"·data-group-id="7971742947-8">}</span><span·class="p"·data-group-id="7971742947-7">}</span></code></pre><h2·id="basic-connection"·class="section-heading">
155 ··<a·href="#basic-connection"·class="hover-link">155 ··<a·href="#basic-connection"·class="hover-link">
156 ····<i·class="ri-link-m"·aria-hidden="true"></i>156 ····<i·class="ri-link-m"·aria-hidden="true"></i>
157 ··</a>157 ··</a>
158 ··<span·class="text">Basic·Connection</span>158 ··<span·class="text">Basic·Connection</span>
159 </h2>159 </h2>
160 <p><em>Step·1:</em>·Start·the·server·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8940303494-1">(</span><span·class="p"·data-group-id="8940303494-1">)</span><span·class="p">.</span><span·class="w">160 <p><em>Step·1:</em>·Start·the·server·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9340746435-1">(</span><span·class="p"·data-group-id="9340746435-1">)</span><span·class="p">.</span><span·class="w">
161 </span><span·class="ss">ok</span></code></pre><p><em>Step·2:</em>·with·alternative·certificates,·in·this·example·the·EDDSA·certificate161 </span><span·class="ss">ok</span></code></pre><p><em>Step·2:</em>·with·alternative·certificates,·in·this·example·the·EDDSA·certificate
162 will·be·preferred·if·TLS-1.3·is·negotiated·and·the·RSA·certificate·will·always162 will·be·preferred·if·TLS-1.3·is·negotiated·and·the·RSA·certificate·will·always
163 be·used·for·TLS-1.2·as·it·does·not·support·the·EDDSA·algorithm:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0192233186-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ListenSocket</span><span·class="p"·data-group-id="0192233186-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">163 be·used·for·TLS-1.2·as·it·does·not·support·the·EDDSA·algorithm:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5022837647-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ListenSocket</span><span·class="p"·data-group-id="5022837647-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
164 </span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="0192233186-2">(</span><span·class="mi">9999</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0192233186-3">[</span><span·class="p"·data-group-id="0192233186-4">{</span><span·class="ss">certs_keys</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·124,·SHA:·d6940815d785b8510619b240da2a43d2987dd52729814a3143a9099958f023b9·...·]-6">#{</span><span·class="ss">certfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;eddsacert.pem&quot;</span><span·class="p">,</span><span·class="w">164 </span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">listen</span><span·class="p"·data-group-id="5022837647-2">(</span><span·class="mi">9999</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5022837647-3">[</span><span·class="p"·data-group-id="5022837647-4">{</span><span·class="ss">certs_keys</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·124,·SHA:·7954a6509bf59d35b235c2c3f9b9b4550e2848049b812a4e97f3ab312fb51fc9·...·]-6">#{</span><span·class="ss">certfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;eddsacert.pem&quot;</span><span·class="p">,</span><span·class="w">
165 ··································</span><span·class="ss">keyfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;eddsakey.pem&quot;</span><span·class="p"·data-group-id="0192233186-6">}</span><span·class="p">,</span><span·class="w">165 ··································</span><span·class="ss">keyfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;eddsakey.pem&quot;</span><span·class="p"·data-group-id="5022837647-6">}</span><span·class="p">,</span><span·class="w">
166 »       »       »       ········</span><span·class="p"·data-group-id="0192233186-7">#{</span><span·class="ss">certfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;rsacert.pem&quot;</span><span·class="p">,</span><span·class="w">166 »       »       »       ········</span><span·class="p"·data-group-id="5022837647-7">#{</span><span·class="ss">certfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;rsacert.pem&quot;</span><span·class="p">,</span><span·class="w">
167 ··································</span><span·class="ss">keyfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;rsakey.pem&quot;</span><span·class="p">,</span><span·class="w">167 ··································</span><span·class="ss">keyfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;rsakey.pem&quot;</span><span·class="p">,</span><span·class="w">
168 »       »       »       ··········</span><span·class="ss">password</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;foobar&quot;</span><span·class="p"·data-group-id="0192233186-7">}</span><span·class="w">168 »       »       »       ··········</span><span·class="ss">password</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;foobar&quot;</span><span·class="p"·data-group-id="5022837647-7">}</span><span·class="w">
169 »       »       »       ·······</span><span·class="p"·data-group-id="0192233186-5">]</span><span·class="p"·data-group-id="0192233186-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="0192233186-8">{</span><span·class="ss">reuseaddr</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</[·...·truncated·by·diffoscope;·len:·152,·SHA:·643cee45c0886c9e0466889c6342ff5c79ed3f4bf17de43e2d0e457740f0a36f·...·]-2">)</span><span·class="p">.</span><span·class="w">169 »       »       »       ·······</span><span·class="p"·data-group-id="5022837647-5">]</span><span·class="p"·data-group-id="5022837647-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="5022837647-8">{</span><span·class="ss">reuseaddr</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</[·...·truncated·by·diffoscope;·len:·152,·SHA:·f3d36dcc1fc5e4aaa1011160eeb4117276e3e32d0e693c821d97b40082f0962b·...·]-2">)</span><span·class="p">.</span><span·class="w">
170 </span><span·class="p"·data-group-id="0192233186-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0192233186-10">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0192233186-11">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0192233186-11">]</span><span·class="p"·data-group-id="0192233186-10">}</span><span·class="p"·data-group-id="0192233186-9">}</span></code></pre><p><em>Step·3:</em>·Do·a·transport·accept·on·the·TLS·listen·socket:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">3</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6553910206-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TLSTransportSocket</span><span·class="p"·data-group-id="6553910206-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">transport_accept</span><span·class="p"·data-group-id="6553910206-2">(</span><span·class="n">ListenSocket</span><span·class="p"·data-group-id="6553910206-2">)</span><span·class="p">.</span><span·class="w"> 
171 </span><span·class="p"·data-group-id="6553910206-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6553910206-4">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6553910206-5">[</sp[·...·truncated·by·diffoscope;·len:·365,·SHA:·26edaa0bdd053abd78b5b071f173c8164484dd36642f2e8cd7d56441f2ab3811·...·]170 </span><span·class="p"·data-group-id="5022837647-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5022837647-10">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5022837647-11">[</[·...·truncated·by·diffoscope;·len:·1065,·SHA:·0d93e6bb184c1c866c72b42b535e408bdd3aecd44b16b07004d0b7cc3fc783d0·...·]
 171 </span><span·class="p"·data-group-id="9056268651-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9056268651-4">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9056268651-5">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9056268651-5">]</span><span·class="p"·data-group-id="9056268651-4">}</span><span·class="p"·data-group-id="9056268651-3">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>ssl:transport_accept/1·and·ssl:handshake/2·are·separate·functions·so·that·the
172 handshake·part·can·be·called·in·a·new·erlang·process·dedicated·to·handling·the172 handshake·part·can·be·called·in·a·new·erlang·process·dedicated·to·handling·the
173 connection</p></blockquote><p><em>Step·4:</em>·Start·the·client·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6279788391-1">(</span><span·class="p"·data-group-id="6279788391-1">)</span><span·class="p">.</span><span·class="w">173 connection</p></blockquote><p><em>Step·4:</em>·Start·the·client·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3815588632-1">(</span><span·class="p"·data-group-id="3815588632-1">)</span><span·class="p">.</span><span·class="w">
174 </span><span·class="ss">ok</span></code></pre><p>Be·sure·to·configure·trusted·certificates·to·use·for·server·certificate174 </span><span·class="ss">ok</span></code></pre><p>Be·sure·to·configure·trusted·certificates·to·use·for·server·certificate
175 verification.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2838084126-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Socket</span><span·class="p"·data-group-id="2838084126-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·117,·SHA:·532fa28db11100949213c68cdac26e01139222bd501b0fa06f4b87947209b629·...·]-2">(</span><span·class="s">&quot;localhost&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">9999</span><span·class="p">,</span><span·class="w">175 verification.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7788763410-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Socket</span><span·class="p"·data-group-id="7788763410-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·117,·SHA:·9118e50a232eb03c9af33766df7b533307bbdf451846104f17a9aedd3c314d7d·...·]-2">(</span><span·class="s">&quot;localhost&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">9999</span><span·class="p">,</span><span·class="w">
176 ······</span><span·class="p"·data-group-id="2838084126-3">[</span><span·class="p"·data-group-id="2838084126-4">{</span><span·class="ss">verify</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">verify_peer</span><span·class="p"·data-group-id="2838084126-4">}</span><span·class="p">,</span><span·class="w">176 ······</span><span·class="p"·data-group-id="7788763410-3">[</span><span·class="p"·data-group-id="7788763410-4">{</span><span·class="ss">verify</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">verify_peer</span><span·class="p"·data-group-id="7788763410-4">}</span><span·class="p">,</span><span·class="w">
177 ······</span><span·class="p"·data-group-id="2838084126-5">{</span><span·class="ss">cacertfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cacerts.pem&quot;</span><span·class="p"·data-group-id="2838084126-5">}</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·381,·SHA:·1a5ae1ff02f87babba504a7fdb7a3bc3518ce9ea984ef798a1c3ee9847abffba·...·]-2">)</span><span·class="p">.</span><span·class="w">177 ······</span><span·class="p"·data-group-id="7788763410-5">{</span><span·class="ss">cacertfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cacerts.pem&quot;</span><span·class="p"·data-group-id="7788763410-5">}</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·381,·SHA:·5325e1358a572087689428c686be98f9ddad663a010e8cb2eaed072cd12a9aab·...·]-2">)</span><span·class="p">.</span><span·class="w">
178 </span><span·class="p"·data-group-id="2838084126-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2838084126-8">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2838084126-9">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="2838084126-9">]</span><span·class="p"·data-group-id="2838084126-8">}</span><span·class="p"·data-group-id="2838084126-7">}</span></code></pre><p><em>Step·5:</em>·Do·the·TLS·handshake:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">4</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="6777062614-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Socket</span><span·class="p"·data-group-id="6777062614-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">handshake</span><span·class="p"·data-group-id="6777062614-2">(</span><span·class="n">TLSTransportSocket</span><span·class="p"·data-group-id="6777062614-2">)</span><span·class="p">.</span><span·class="w"> 
179 </span><span·class="p"·data-group-id="6777062614-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6777062614-4">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6777062614-5">[</sp[·...·truncated·by·diffoscope;·len:·360,·SHA:·db1b05b555304ee4f9202ae4cf7a81afbb6afb9c456f34dbb0dd748266e890ac·...·]178 </span><span·class="p"·data-group-id="7788763410-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7788763410-8">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7788763410-9">[</sp[·...·truncated·by·diffoscope;·len:·1022,·SHA:·c87f69796bbc45873e7fb2d90b093a8f0f625fe640c9ca6e6dabd1a1cab5f155·...·]
 179 </span><span·class="p"·data-group-id="6132190657-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6132190657-4">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6132190657-5">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6132190657-5">]</span><span·class="p"·data-group-id="6132190657-4">}</span><span·class="p"·data-group-id="6132190657-3">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>A·real·server·should·use·ssl:handshake/2·that·has·a·timeout·to·avoid·DoS
180 attacks.·In·the·example·the·timeout·defaults·to·infinty.</p></blockquote><p><em>Step·6:</em>·Send·a·message·over·TLS:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="1930549555-1">(</span><span·class="n">Socket</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="1930549555-1">)</span><span·class="p">.</span><span·class="w">180 attacks.·In·the·example·the·timeout·defaults·to·infinty.</p></blockquote><p><em>Step·6:</em>·Send·a·message·over·TLS:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="1577979876-1">(</span><span·class="n">Socket</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="1577979876-1">)</span><span·class="p">.</span><span·class="w">
181 </span><span·class="ss">ok</span></code></pre><p><em>Step·7:</em>·Flush·the·shell·message·queue·to·see·that·the·message·sent·on·the181 </span><span·class="ss">ok</span></code></pre><p><em>Step·7:</em>·Flush·the·shell·message·queue·to·see·that·the·message·sent·on·the
182 server·side·is·recived·by·the·client·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">3</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">flush</span><span·class="p"·data-group-id="3890345917-1">(</span><span·class="p"·data-group-id="3890345917-1">)</span><span·class="p">.</span><span·class="w">182 server·side·is·recived·by·the·client·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">3</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">flush</span><span·class="p"·data-group-id="8583430084-1">(</span><span·class="p"·data-group-id="8583430084-1">)</span><span·class="p">.</span><span·class="w">
183 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="3890345917-2">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="3890345917-3">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="3890345917-4">[</span><span·class="p">.</s[·...·truncated·by·diffoscope;·len:·261,·SHA:·d9180d833e0a7ea38a6d3bb401d367ae9d2cd024515f52fc6bf64c33e45fa4de·...·]-2">}</span><span·class="w">183 </span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="8583430084-2">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="8583430084-3">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="8583430084-4">[</span><span·class="p">.</s[·...·truncated·by·diffoscope;·len:·261,·SHA:·2713b3ca32d1d3c3d9d48cb05a05ca4be00671fa5e2f12d978fcfea72adeec9c·...·]-2">}</span><span·class="w">
184 </span><span·class="ss">ok</span></code></pre><h2·id="upgrade-example-tls-only"·class="section-heading">184 </span><span·class="ss">ok</span></code></pre><h2·id="upgrade-example-tls-only"·class="section-heading">
185 ··<a·href="#upgrade-example-tls-only"·class="hover-link">185 ··<a·href="#upgrade-example-tls-only"·class="hover-link">
186 ····<i·class="ri-link-m"·aria-hidden="true"></i>186 ····<i·class="ri-link-m"·aria-hidden="true"></i>
187 ··</a>187 ··</a>
188 ··<span·class="text">Upgrade·Example·-·TLS·only</span>188 ··<span·class="text">Upgrade·Example·-·TLS·only</span>
189 </h2>189 </h2>
190 <p>Upgrading·a·a·TCP/IP·connection·to·a·TLS·connections·is·mostly·used·when·there190 <p>Upgrading·a·a·TCP/IP·connection·to·a·TLS·connections·is·mostly·used·when·there
191 is·a·desire·have·unencrypted·communication·first·and·then·later·secure·the191 is·a·desire·have·unencrypted·communication·first·and·then·later·secure·the
192 communication·channel·by·using·TLS.·Note·that·the·client·and·server·need·to192 communication·channel·by·using·TLS.·Note·that·the·client·and·server·need·to
193 agree·to·do·the·upgrade·in·the·protocol·doing·the·communication.·This·is·concept193 agree·to·do·the·upgrade·in·the·protocol·doing·the·communication.·This·is·concept
194 is·often·referenced·as·<code·class="inline">STARTLS</code>·and·used·in·many·protocols·such·as·<code·class="inline">SMTP</code>,194 is·often·referenced·as·<code·class="inline">STARTLS</code>·and·used·in·many·protocols·such·as·<code·class="inline">SMTP</code>,
195 <code·class="inline">FTPS</code>·and·<code·class="inline">HTTPS</code>·via·a·proxy.</p><blockquote><h4·class="warning">Warning</h4><p>Maximum·security·recommendations·are·however·moving·away·from·such·solutions.</p></blockquote><p>To·upgrade·to·a·TLS·connection:</p><p><em>Step·1:</em>·Start·the·server·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3285359798-1">(</span><span·class="p"·data-group-id="3285359798-1">)</span><span·class="p">.</span><span·class="w">195 <code·class="inline">FTPS</code>·and·<code·class="inline">HTTPS</code>·via·a·proxy.</p><blockquote><h4·class="warning">Warning</h4><p>Maximum·security·recommendations·are·however·moving·away·from·such·solutions.</p></blockquote><p>To·upgrade·to·a·TLS·connection:</p><p><em>Step·1:</em>·Start·the·server·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4919655032-1">(</span><span·class="p"·data-group-id="4919655032-1">)</span><span·class="p">.</span><span·class="w">
196 ··</span><span·class="ss">ok</span></code></pre><p><em>Step·2:</em>·Create·a·normal·TCP·listen·socket·and·ensure·<code·class="inline">active</code>·is·set·to196 ··</span><span·class="ss">ok</span></code></pre><p><em>Step·2:</em>·Create·a·normal·TCP·listen·socket·and·ensure·<code·class="inline">active</code>·is·set·to
197 <code·class="inline">false</code>·and·not·set·to·any·active·mode·otherwise·TLS·handshake·messages·can·be197 <code·class="inline">false</code>·and·not·set·to·any·active·mode·otherwise·TLS·handshake·messages·can·be
198 delivered·to·the·wrong·process.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8808938015-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ListenSocket</span><span·class="p"·data-group-id="8808938015-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·469,·SHA:·b35beb6abe54b17987db02562463764f4141407dfc8618c0f147353ee1268de5·...·]-4">}</span><span·class="p">,</span><span·class="w">198 delivered·to·the·wrong·process.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8754532130-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ListenSocket</span><span·class="p"·data-group-id="8754532130-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·469,·SHA:·3f8b17fd9139ee2472e19864b79123a1ca5fa7cf2d2b64f514f880a1bc906808·...·]-4">}</span><span·class="p">,</span><span·class="w">
199 ··</span><span·class="p"·data-group-id="8808938015-5">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8808938015-5">}</span><span·class="p"·data-group-id="8808938015-3">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·85040b4ab740994c1de48a722acfab256ad657f79bfd143d5cea3382c0977592·...·]-2">)</span><span·class="p">.</span><span·class="w">199 ··</span><span·class="p"·data-group-id="8754532130-5">{</span><span·class="ss">active</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8754532130-5">}</span><span·class="p"·data-group-id="8754532130-3">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·bf1a3d4c759b854a3261d8777832ef8fc553953a3b8fe8961d829ba6d239fa57·...·]-2">)</span><span·class="p">.</span><span·class="w">
200 ··</span><span·class="p"·data-group-id="8808938015-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.475</span><span·class="o">&gt;</span><span·class="p"·data-group-id="8808938015-6">}</span></code></pre><p><em>Step·3:</em>·Accept·client·connection:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">3</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0524831239-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Socket</span><span·class="p"·data-group-id="0524831239-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">accept</span><span·class="p"·data-group-id="0524831239-2">(</span><span·class="n">ListenSocket</span><span·class="p"·data-group-id="0524831239-2">)</span><span·class="p">.</span><span·class="w"> 
201 ··</span><span·class="p"·data-group-id="0524831239-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.476</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0524831239-3">}</span></code></pre><p><em>Step·4:</em>·Start·the·client·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9717359557-1">(</span><span·class="p"·data-group-id="9717359557-1">)</span><span·class="p">.</span><span·class="w"> 
202 ··</span><span·class="ss">ok</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3856525337-1">{</span[·...·truncated·by·diffoscope;·len:·1823,·SHA:·2fd498bff65a73e1b79d1700fcfb927efe500de77700c5735c5b143c290ebb1d·...·]</span><span·class="w">200 ··</span><span·class="p"·data-group-id="8754532130-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.475</span><span·class="o">&gt;</span><span·cl[·...·truncated·by·diffoscope;·len:·809,·SHA:·fd1c67a2238e3ac44a2e90927351361dd450dc71695c7a99ed2655aec86e06d2·...·]</span><span·class="w">
 201 ··</span><span·class="p"·data-group-id="0661017137-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">#</span><span·class="n">Port</span><span·class="o">&lt;</span><span·class="mf">0.476</span><span·class="o">&gt;</span><span·class="p"·data-group-id="0661017137-3">}</span></code></pre><p><em>Step·4:</em>·Start·the·client·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4082781823-1">(</span><span·class="p"·data-group-id="4082781823-1">)</span><span·class="p">.</span><span·class="w">
 202 ··</span><span·class="ss">ok</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">2</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0807127063-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Socket</span><span·class="p"·data-group-id="0807127063-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">gen_tcp</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="0807127063-2">(</span><span·class="s">&quot;localhost&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">9999</span><span·class="p">,</span><span·class="w">··</span><span·class="p"·data-group-id="0807127063-3">[</span><span·class="p"·data-group-id="0807127063-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="0807127063-2">)</span><span·class="p">.</span></code></pre><p><em>Step·5:</em>·Do·the·TLS·handshake:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">4</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0014021843-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TLSSocket</span><span·class="p"·data-group-id="0014021843-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">handshake</span><span·class="p"·data-group-id="0014021843-2">(</span><span·class="n">Socket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0014021843-3">[</span><span·class="p"·data-group-id="0014021843-4">{</span><span·class="ss">verify</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">verify_peer</span><span·class="p"·data-group-id="0014021843-4">}</span><span·class="p">,</span><span·class="w">
203 ··</span><span·class="p"·data-group-id="7306177878-5">{</span><span·class="ss">fail_if_no_peer_cert</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="7306177878-5">}</span><span·class="p">,</span><span·class="w">203 ··</span><span·class="p"·data-group-id="0014021843-5">{</span><span·class="ss">fail_if_no_peer_cert</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="0014021843-5">}</span><span·class="p">,</span><span·class="w">
204 ··</span><span·class="p"·data-group-id="7306177878-6">{</span><span·class="ss">cacertfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cacerts.pem&quot;</span><span·class="p"·data-group-id="7306177878-6">}</span><span·class="p">,</span><span·class="w">204 ··</span><span·class="p"·data-group-id="0014021843-6">{</span><span·class="ss">cacertfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cacerts.pem&quot;</span><span·class="p"·data-group-id="0014021843-6">}</span><span·class="p">,</span><span·class="w">
205 ··</span><span·class="p"·data-group-id="7306177878-7">{</span><span·class="ss">certs_keys</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7306177878-8">[</span><span·class="p"·data-group-id="7306177878-9">#{</span><span·class="ss">certfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;cert.pem&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">keyfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;key.pem&quot;</span><span·class="p"·data-group-id="7306177878-9">}</span><span·class="p"·data-group-id="7306177878-8">]</span><span·class="p"·data-group-id="7306177878-7">}</span><span·class="p"·data-group-id="7306177878-3">]</span><span·class="p"·data-group-id="7306177878-2">)</span><span·class="p">.</span><span·class="w"> 
206 ··</span><span·class="p"·data-group-id="7306177878-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7306177878-11">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="7306177878-12">[</span><span·class="p">.<[·...·truncated·by·diffoscope;·len:·319,·SHA:·5deb94de646fee0799c57c934a3f96fe90332cd2e66e95b63234ef4fa4da8684·...·]205 ··</span><span·class="p"·data-group-id="0014021843-7">{</span><span·class="ss">certs_keys</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0014021843-8">[</span><span·class="p"·data-group-id="0014021843-9">#{</span><span·class="ss">certfile</span><span·class="[·...·truncated·by·diffoscope;·len:·608,·SHA:·df15862dea680068debea1e72234dace8caa4ee61ba22e14916f6f41a5a63b25·...·]
 206 ··</span><span·class="p"·data-group-id="0014021843-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0014021843-11">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="0014021843-12">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0014021843-12">]</span><span·class="p"·data-group-id="0014021843-11">}</span><span·class="p"·data-group-id="0014021843-10">}</span></code></pre><p><em>Step·6:</em>·Upgrade·to·a·TLS·connection.·The·client·and·server·must·agree·upon·the
207 upgrade.·The·server·must·be·prepared·to·be·a·TLS·server·before·the·client·can·do207 upgrade.·The·server·must·be·prepared·to·be·a·TLS·server·before·the·client·can·do
208 a·successful·connect.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">3</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2957563029-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TLSSocket</span><span·class="p"·data-group-id="2957563029-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·468,·SHA:·c7a61aa34eaa375e7d269e76266f5f2b3ad999b75c10acbe1e0faedbddb13706·...·]9-4">}</span><span·class="p">,</span><span·class="w">208 a·successful·connect.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">3</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="p"·data-group-id="3317601719-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">TLSSocket</span><span·class="p"·data-group-id="3317601719-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·468,·SHA:·edc4e96b9ef6b10a8a5d3dbf0ae7a5c275a9ee445864b2c0d9bd75d21ac12d92·...·]9-4">}</span><span·class="p">,</span><span·class="w">
209 ··</span><span·class="p"·data-group-id="2957563029-5">{</span><span·class="ss">cacertfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cacerts.pem&quot;</span><span·class="p"·data-group-id="2957563029-5">}</span><span·class="p">,</span><span·class="w">209 ··</span><span·class="p"·data-group-id="3317601719-5">{</span><span·class="ss">cacertfile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;cacerts.pem&quot;</span><span·class="p"·data-group-id="3317601719-5">}</span><span·class="p">,</span><span·class="w">
210 ··</span><span·class="p"·data-group-id="2957563029-6">{</span><span·class="ss">certs_keys</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2957563029-7">[</span><span·class="p"·data-group-id="2957563029-8">#{</span><span·class="ss">certfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;cert.pem&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">keyfile</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;key.pem&quot;</span><span·class="p"·data-group-id="2957563029-8">}</span><span·class="p"·data-group-id="2957563029-7">]</span><span·class="p"·data-group-id="2957563029-6">}</span><span·class="p"·data-group-id="2957563029-3">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p"·data-group-id="2957563029-2">)</span><span·class="p">.</span><span·class="w"> 
211 </span><span·class="p"·data-group-id="2957563029-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2957563029-10">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="2957[·...·truncated·by·diffoscope;·len:·784,·SHA:·e1df74f204912428a5efb06b402a7438d608a79bc422b06889ee5a4651c17d5e·...·]">)</span><span·class="p">.</span><span·class="w">210 ··</span><span·class="p"·data-group-id="3317601719-6">{</span><span·class="ss">certs_keys</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3317601719-7">[</span><span·class="p"·data-group-id="3317601719-8">#{</span><span[·...·truncated·by·diffoscope;·len:·678,·SHA:·2a248a77bc91c2219b67979b24eaaf0cf08d8a1f3db67d8453239c0b96d2fdaa·...·]">)</span><span·class="p">.</span><span·class="w">
 211 </span><span·class="p"·data-group-id="3317601719-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3317601719-10">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="3317601719-11">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="3317601719-11">]</span><span·class="p"·data-group-id="3317601719-10">}</span><span·class="p"·data-group-id="3317601719-9">}</span></code></pre><p><em>Step·7:</em>·Send·a·message·over·TLS:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">4</span><span·class="w">·</span><span·class="ss">client</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">send</span><span·class="p"·data-group-id="7438848282-1">(</span><span·class="n">TLSSocket</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="7438848282-1">)</span><span·class="p">.</span><span·class="w">
212 ······</span><span·class="ss">ok</span></code></pre><p><em>Step·8:</em>·Set·<code·class="inline">active·once</code>·on·the·TLS·socket:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">setopts</span><span·class="p"·data-group-id="9098662794-1">(</span><span·class="n">TLSSocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9098662794-2">[</span><span·class="p"·data-group-id="9098662794-3">{</span><span·class="ss">active</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·205,·SHA:·924d14254342cb5cc4a858d19a43ed1aba961d78f61d00ab9ee962d9f5cc2a1c·...·]-1">)</span><span·class="p">.</span><span·class="w">212 ······</span><span·class="ss">ok</span></code></pre><p><em>Step·8:</em>·Set·<code·class="inline">active·once</code>·on·the·TLS·socket:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">setopts</span><span·class="p"·data-group-id="5987025897-1">(</span><span·class="n">TLSSocket</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5987025897-2">[</span><span·class="p"·data-group-id="5987025897-3">{</span><span·class="ss">active</span><span·class="p">,<[·...·truncated·by·diffoscope;·len:·205,·SHA:·d5619440e5363537ffccee5ef92dcaa3a2e18919d0d228f55b0fa59a96a4e9f8·...·]-1">)</span><span·class="p">.</span><span·class="w">
213 ······</span><span·class="ss">ok</span></code></pre><p><em>Step·9:</em>·Flush·the·shell·message·queue·to·see·that·the·message·sent·on·the213 ······</span><span·class="ss">ok</span></code></pre><p><em>Step·9:</em>·Flush·the·shell·message·queue·to·see·that·the·message·sent·on·the
214 client·side·is·recived·by·the·server·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">flush</span><span·class="p"·data-group-id="4423280392-1">(</span><span·class="p"·data-group-id="4423280392-1">)</span><span·class="p">.</span><span·class="w">214 client·side·is·recived·by·the·server·side:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">5</span><span·class="w">·</span><span·class="ss">server</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nf">flush</span><span·class="p"·data-group-id="6431985001-1">(</span><span·class="p"·data-group-id="6431985001-1">)</span><span·class="p">.</span><span·class="w">
215 ······</span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="4423280392-2">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="4423280392-3">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="4423280392-4">[</span><span·class="p">.</s[·...·truncated·by·diffoscope;·len:·261,·SHA:·63a7d4755540cf57fd805f35176685fe1eaca1960a0b7e840039f103a7ce57ac·...·]-2">}</span><span·class="w">215 ······</span><span·class="n">Shell</span><span·class="w">·</span><span·class="ss">got</span><span·class="w">·</span><span·class="p"·data-group-id="6431985001-2">{</span><span·class="ss">ssl</span><span·class="p">,</span><span·class="p"·data-group-id="6431985001-3">{</span><span·class="ss">sslsocket</span><span·class="p">,</span><span·class="p"·data-group-id="6431985001-4">[</span><span·class="p">.</s[·...·truncated·by·diffoscope;·len:·261,·SHA:·2babc91bd5657aa56aa46887b5c3152ec8bd5334d189657dfefd470192e10d90·...·]-2">}</span><span·class="w">
216 ······</span><span·class="ss">ok</span></code></pre><h2·id="customizing-cipher-suites"·class="section-heading">216 ······</span><span·class="ss">ok</span></code></pre><h2·id="customizing-cipher-suites"·class="section-heading">
217 ··<a·href="#customizing-cipher-suites"·class="hover-link">217 ··<a·href="#customizing-cipher-suites"·class="hover-link">
218 ····<i·class="ri-link-m"·aria-hidden="true"></i>218 ····<i·class="ri-link-m"·aria-hidden="true"></i>
219 ··</a>219 ··</a>
220 ··<span·class="text">Customizing·cipher·suites</span>220 ··<span·class="text">Customizing·cipher·suites</span>
221 </h2>221 </h2>
222 <p>Fetch·default·cipher·suite·list·for·a·TLS/DTLS·version.·Change·default·to·all·to222 <p>Fetch·default·cipher·suite·list·for·a·TLS/DTLS·version.·Change·default·to·all·to
223 get·all·possible·cipher·suites.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="w">·</span><span·class="n">Default</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">cipher_suites</span><span·class="p"·data-group-id="4489040752-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;tlsv1.2&#39;</span><span·class="p"·data-group-id="4489040752-1">)</span><span·class="p">.</span><span·class="w">223 get·all·possible·cipher·suites.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="w">·</span><span·class="n">Default</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">cipher_suites</span><span·class="p"·data-group-id="0672687052-1">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;tlsv1.2&#39;</span><span·class="p"·data-group-id="0672687052-1">)</span><span·class="p">.</span><span·class="w">
224 ····</span><span·class="p"·data-group-id="4489040752-2">[</span><span·class="p"·data-group-id="4489040752-3">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_256_gcm</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdhe_ecdsa</span><span·class="p">,</span><span·class="w">224 ····</span><span·class="p"·data-group-id="0672687052-2">[</span><span·class="p"·data-group-id="0672687052-3">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_256_gcm</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdhe_ecdsa</span><span·class="p">,</span><span·class="w">
225 ····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aead</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha384</span><span·class="p"·data-group-id="4489040752-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="4489040752-2">]</span></code></pre><p>In·OTP·20·it·is·desirable·to·remove·all·cipher·suites·that·uses·rsa·key·exchange225 ····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aead</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha384</span><span·class="p"·data-group-id="0672687052-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0672687052-2">]</span></code></pre><p>In·OTP·20·it·is·desirable·to·remove·all·cipher·suites·that·uses·rsa·key·exchange
226 (removed·from·default·in·21)</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">NoRSA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">226 (removed·from·default·in·21)</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">NoRSA</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
227 ····</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">filter_cipher_suites</span><span·class="p"·data-group-id="3624770288-1">(</span><span·class="n">Default</span><span·class="p">,</span><span·class="w">227 ····</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">filter_cipher_suites</span><span·class="p"·data-group-id="6915386017-1">(</span><span·class="n">Default</span><span·class="p">,</span><span·class="w">
228 ····························</span><span·class="p"·data-group-id="3624770288-2">[</span><span·class="p"·data-group-id="3624770288-3">{</span><span·class="ss">key_exchange</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3624770288-4">(</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·51,·SHA:·326f6cf585f94596ecbb7c7a2da18d23eaf095d6a714563f39e715f6de3c9d48·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">;</span><span·class="w">228 ····························</span><span·class="p"·data-group-id="6915386017-2">[</span><span·class="p"·data-group-id="6915386017-3">{</span><span·class="ss">key_exchange</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6915386017-4">(</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·51,·SHA:·98ce9f04cf93a6944b23b0d800e79026d21a74fdb7c91f2e40f6d13ec2bc41b7·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="p">;</span><span·class="w">
229 »       »       »       ························</span><span·class="p"·data-group-id="3624770288-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="3624770288-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">229 »       »       »       ························</span><span·class="p"·data-group-id="6915386017-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="6915386017-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="w">
230 »       »       »       ····················</span><span·class="k">end</span><span·class="p"·data-group-id="3624770288-3">}</span><span·class="p"·data-group-id="3624770288-2">]</span><span·class="p"·data-group-id="3624770288-1">)</span><span·class="p">.</span><span·class="w">230 »       »       »       ····················</span><span·class="k">end</span><span·class="p"·data-group-id="6915386017-3">}</span><span·class="p"·data-group-id="6915386017-2">]</span><span·class="p"·data-group-id="6915386017-1">)</span><span·class="p">.</span><span·class="w">
231 ····</span><span·class="p"·data-group-id="3624770288-6">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="3624770288-6">]</span></code></pre><p>Pick·just·a·few·suites</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Suites</span><span·class="w">·</span><span·class="o">=</span><span·class="w">231 ····</span><span·class="p"·data-group-id="6915386017-6">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6915386017-6">]</span></code></pre><p>Pick·just·a·few·suites</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="n">Suites</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
232 ····</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">filter_cipher_suites</span><span·class="p"·data-group-id="4937739133-1">(</span><span·class="n">Default</span><span·class="p">,</span><span·class="w">232 ····</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">filter_cipher_suites</span><span·class="p"·data-group-id="4706839621-1">(</span><span·class="n">Default</span><span·class="p">,</span><span·class="w">
233 ····························</span><span·class="p"·data-group-id="4937739133-2">[</span><span·class="p"·data-group-id="4937739133-3">{</span><span·class="ss">key_exchange</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4937739133-4">(</span><span·class="ss">e[·...·truncated·by·diffoscope;·len:·57,·SHA:·cacd519975a23d37c2f3055b360df2e774385d9b24ebb55593e27efc08801e91·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">233 ····························</span><span·class="p"·data-group-id="4706839621-2">[</span><span·class="p"·data-group-id="4706839621-3">{</span><span·class="ss">key_exchange</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4706839621-4">(</span><span·class="ss">e[·...·truncated·by·diffoscope;·len:·57,·SHA:·21671266e9c8e330cad676b2bc80a209395687108ddb129c8e7ff95c5fd733c1·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
234 »       »       »       ························</span><span·class="p"·data-group-id="4937739133-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="4937739133-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">234 »       »       »       ························</span><span·class="p"·data-group-id="4706839621-5">(</span><span·class="p">_</span><span·class="p"·data-group-id="4706839621-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">false</span><span·class="w">
235 »       »       »       ····················</span><span·class="k">end</span><span·class="p"·data-group-id="4937739133-3">}</span><span·class="p">,</span><span·class="w">235 »       »       »       ····················</span><span·class="k">end</span><span·class="p"·data-group-id="4706839621-3">}</span><span·class="p">,</span><span·class="w">
236 ·····························</span><span·class="p"·data-group-id="4937739133-6">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4937739133-7">(</span><span·class="ss">aes_128_cbc</span><span·class="p"·data-group-id="4937739133-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">236 ·····························</span><span·class="p"·data-group-id="4706839621-6">{</span><span·class="ss">cipher</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4706839621-7">(</span><span·class="ss">aes_128_cbc</span><span·class="p"·data-group-id="4706839621-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
237 »       »       »       ··················</span><span·class="p"·data-group-id="4937739133-8">(</span><span·class="p">_</span><span·class="p"·data-group-id="4937739133-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="ss">false</span><span·class="w">237 »       »       »       ··················</span><span·class="p"·data-group-id="4706839621-8">(</span><span·class="p">_</span><span·class="p"·data-group-id="4706839621-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="ss">false</span><span·class="w">
238 »       »       »       ··············</span><span·class="k">end</span><span·class="p"·data-group-id="4937739133-6">}</span><span·class="p"·data-group-id="4937739133-2">]</span><span·class="p"·data-group-id="4937739133-1">)</span><span·class="p">.</span><span·class="w">238 »       »       »       ··············</span><span·class="k">end</span><span·class="p"·data-group-id="4706839621-6">}</span><span·class="p"·data-group-id="4706839621-2">]</span><span·class="p"·data-group-id="4706839621-1">)</span><span·class="p">.</span><span·class="w">
239 ····</span><span·class="p"·data-group-id="4937739133-9">[</span><span·class="p"·data-group-id="4937739133-10">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="w">239 ····</span><span·class="p"·data-group-id="4706839621-9">[</span><span·class="p"·data-group-id="4706839621-10">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="w">
240 ·····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p"·data-group-id="4937739133-10">}</span><span·class="p">,</span><span·class="w">240 ·····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p"·data-group-id="4706839621-10">}</span><span·class="p">,</span><span·class="w">
241 ·····</span><span·class="p"·data-group-id="4937739133-11">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">241 ·····</span><span·class="p"·data-group-id="4706839621-11">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">
242 ·····</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">default_prf</span><span·class="p"·data-group-id="4937739133-11">}</span><span·class="p"·data-group-id="4937739133-9">]</span></code></pre><p>Make·some·particular·suites·the·most·preferred,·or·least·preferred·by·changing242 ·····</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">default_prf</span><span·class="p"·data-group-id="4706839621-11">}</span><span·class="p"·data-group-id="4706839621-9">]</span></code></pre><p>Make·some·particular·suites·the·most·preferred,·or·least·preferred·by·changing
243 prepend·to·append.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">prepend_cipher_suites</span><span·class="p"·data-group-id="5508515985-1">(</span><span·class="n">Suites</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Default</span><span·class="p"·data-group-id="5508515985-1">)</span><span·class="p">.</span><span·class="w">243 prepend·to·append.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="nc">ssl</span><span·class="p">:</span><span·class="nf">prepend_cipher_suites</span><span·class="p"·data-group-id="0899347712-1">(</span><span·class="n">Suites</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Default</span><span·class="p"·data-group-id="0899347712-1">)</span><span·class="p">.</span><span·class="w">
244 ··</span><span·class="p"·data-group-id="5508515985-2">[</span><span·class="p"·data-group-id="5508515985-3">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="w">244 ··</span><span·class="p"·data-group-id="0899347712-2">[</span><span·class="p"·data-group-id="0899347712-3">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="w">
245 ·····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p"·data-group-id="5508515985-3">}</span><span·class="p">,</span><span·class="w">245 ·····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha256</span><span·class="p"·data-group-id="0899347712-3">}</span><span·class="p">,</span><span·class="w">
246 ···</span><span·class="p"·data-group-id="5508515985-4">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">246 ···</span><span·class="p"·data-group-id="0899347712-4">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_128_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdh_ecdsa</span><span·class="p">,</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha</span><span·class="p">,</span><span·class="w">
247 ·····</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">default_prf</span><span·class="p"·data-group-id="5508515985-4">}</span><span·class="p">,</span><span·class="w">247 ·····</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">default_prf</span><span·class="p"·data-group-id="0899347712-4">}</span><span·class="p">,</span><span·class="w">
248 ···</span><span·class="p"·data-group-id="5508515985-5">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_256_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdhe_ecdsa</span><span·class="p">,</span><span·class="w">248 ···</span><span·class="p"·data-group-id="0899347712-5">#{</span><span·class="ss">cipher</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">aes_256_cbc</span><span·class="p">,</span><span·class="ss">key_exchange</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ecdhe_ecdsa</span><span·class="p">,</span><span·class="w">
249 ·····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha384</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha384</span><span·class="p"·data-group-id="5508515985-5">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="5508515985-2">]</span></code></pre><h2·id="customizing-signature-algorithms-tls-1-2-schemes-tls-1-3"·class="section-heading">249 ·····</span><span·class="ss">mac</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha384</span><span·class="p">,</span><span·class="ss">prf</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">sha384</span><span·class="p"·data-group-id="0899347712-5">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="0899347712-2">]</span></code></pre><h2·id="customizing-signature-algorithms-tls-1-2-schemes-tls-1-3"·class="section-heading">
250 ··<a·href="#customizing-signature-algorithms-tls-1-2-schemes-tls-1-3"·class="hover-link">250 ··<a·href="#customizing-signature-algorithms-tls-1-2-schemes-tls-1-3"·class="hover-link">
251 ····<i·class="ri-link-m"·aria-hidden="true"></i>251 ····<i·class="ri-link-m"·aria-hidden="true"></i>
252 ··</a>252 ··</a>
253 ··<span·class="text">Customizing·signature·algorithms(TLS-1.2)/schemes(TLS-1.3)</span>253 ··<span·class="text">Customizing·signature·algorithms(TLS-1.2)/schemes(TLS-1.3)</span>
254 </h2>254 </h2>
255 <p>Starting·from·TLS-1.2·signature·algorithms·(called·signature·schemes·in·TLS-1.3)255 <p>Starting·from·TLS-1.2·signature·algorithms·(called·signature·schemes·in·TLS-1.3)
256 is·something·that·can·be·negotiated·and·hence·also·configured.·These256 is·something·that·can·be·negotiated·and·hence·also·configured.·These
Offset 260, 70 lines modifiedOffset 260, 70 lines modified
260 versions·are·supported·the·configuration·can·be·a·mix·of·these·as·both260 versions·are·supported·the·configuration·can·be·a·mix·of·these·as·both
261 versions·might·be·negotiated.·All·<code·class="inline">rsa_pss</code>·based·schemes·are·back·ported·to261 versions·might·be·negotiated.·All·<code·class="inline">rsa_pss</code>·based·schemes·are·back·ported·to
262 TLS-1.2·and·can·be·used·also·in·a·TLS-1.2·configuration.·In·TLS-1.2·the262 TLS-1.2·and·can·be·used·also·in·a·TLS-1.2·configuration.·In·TLS-1.2·the
263 signature·algorithms·chosen·by·the·server·will·also·be·affected·by·the·chiper263 signature·algorithms·chosen·by·the·server·will·also·be·affected·by·the·chiper
264 suite·that·is·chosen,·which·is·not·the·case·in·TLS-1.3.</p></blockquote><p>Using·the·function·<a·href="ssl.html#signature_algs/2"><code·class="inline">ssl:signature_algs/2</code></a>·will·let·you·inspect·different·aspects264 suite·that·is·chosen,·which·is·not·the·case·in·TLS-1.3.</p></blockquote><p>Using·the·function·<a·href="ssl.html#signature_algs/2"><code·class="inline">ssl:signature_algs/2</code></a>·will·let·you·inspect·different·aspects
265 of·possible·configurations·for·your·system.·For·example·if·TLS-1.3·and·TLS-1.2265 of·possible·configurations·for·your·system.·For·example·if·TLS-1.3·and·TLS-1.2
Max diff block lines reached; 217933/297353 bytes (73.29%) of diff not shown.
628 B
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/.build
    
Offset 26, 15 lines modifiedOffset 26, 15 lines modified
26 dist/lato-latin-300-normal-YUMVEFOL.woff226 dist/lato-latin-300-normal-YUMVEFOL.woff2
27 dist/lato-latin-400-normal-W7754I4D.woff227 dist/lato-latin-400-normal-W7754I4D.woff2
28 dist/lato-latin-700-normal-2XVSBPG4.woff228 dist/lato-latin-700-normal-2XVSBPG4.woff2
29 dist/lato-latin-ext-300-normal-VPGGJKJL.woff229 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
30 dist/lato-latin-ext-400-normal-N27NCBWW.woff230 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
31 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff231 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
32 dist/remixicon-NKANDIL5.woff232 dist/remixicon-NKANDIL5.woff2
33 dist/search_data-FDA2E906.js33 dist/search_data-0EFEC9CF.js
34 dist/sidebar_items-29333280.js34 dist/sidebar_items-29333280.js
35 edlin.html35 edlin.html
36 edlin_expand.html36 edlin_expand.html
37 epp.html37 epp.html
38 erl_anno.html38 erl_anno.html
39 erl_error.html39 erl_error.html
40 erl_eval.html40 erl_eval.html
125 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/argparse.html
    
Offset 143, 60 lines modifiedOffset 143, 60 lines modified
143 ··</a>143 ··</a>
144 ··<span·class="text">Quick·start</span>144 ··<span·class="text">Quick·start</span>
145 </h2>145 </h2>
146 <p><code·class="inline">argparse</code>·is·designed·to·work·with·<a·href="../../../../erts-15.0.1/doc/html/escript_cmd.html"><code·class="inline">escript</code></a>.·The146 <p><code·class="inline">argparse</code>·is·designed·to·work·with·<a·href="../../../../erts-15.0.1/doc/html/escript_cmd.html"><code·class="inline">escript</code></a>.·The
147 example·below·is·a·fully·functioning·Erlang·program·accepting·two·command·line147 example·below·is·a·fully·functioning·Erlang·program·accepting·two·command·line
148 arguments·and·printing·their·product.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ch">#!/usr/bin/env·escript148 arguments·and·printing·their·product.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ch">#!/usr/bin/env·escript
149 </span><span·class="w">149 </span><span·class="w">
150 </span><span·class="nf">main</span><span·class="p"·data-group-id="0953452644-1">(</span><span·class="n">Args</span><span·class="p"·data-group-id="0953452644-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">150 </span><span·class="nf">main</span><span·class="p"·data-group-id="5205551947-1">(</span><span·class="n">Args</span><span·class="p"·data-group-id="5205551947-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
151 ····</span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="0953452644-2">(</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">cli</span><span·class="p"·data-group-id="0953452644-3">(</span><span·class="p"·data-group-id="0953452644-3">)</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·305,·SHA:·4f999928f1d3586682eb900e49625e9d6c9f0cc59da3c1096f0460f291189791·...·]-2">)</span><span·class="p">.</span><span·class="w">151 ····</span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="5205551947-2">(</span><span·class="n">Args</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">cli</span><span·class="p"·data-group-id="5205551947-3">(</span><span·class="p"·data-group-id="5205551947-3">)</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·305,·SHA:·d338fdf7e565ad393fe4a3a0f9fe676ccd685f190fa44dd8fcd04cc16bb23203·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
152 </span><span·class="nf">cli</span><span·class="p"·data-group-id="0953452644-5">(</span><span·class="p"·data-group-id="0953452644-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">152 </span><span·class="nf">cli</span><span·class="p"·data-group-id="5205551947-5">(</span><span·class="p"·data-group-id="5205551947-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
153 ····</span><span·class="p"·data-group-id="0953452644-6">#{</span><span·class="w">153 ····</span><span·class="p"·data-group-id="5205551947-6">#{</span><span·class="w">
154 ········</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0953452644-7">[</span><span·class="w">154 ········</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5205551947-7">[</span><span·class="w">
155 ············</span><span·class="p"·data-group-id="0953452644-8">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">left</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·123,·SHA:·6d5ac1e9e75eb53a25d8f9247c75cea14d312dd1a19bb2940f0305d8fb5f6786·...·]-8">}</span><span·class="p">,</span><span·class="w">155 ············</span><span·class="p"·data-group-id="5205551947-8">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">left</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·123,·SHA:·0e3424336f3f1a72ae08cc1df09f15cc615c655cfef5ae5e57e4d4c4ca7e619e·...·]-8">}</span><span·class="p">,</span><span·class="w">
156 ············</span><span·class="p"·data-group-id="0953452644-9">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">right</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·124,·SHA:·4030e92ed3d4d7d4644e8b7edb5a3e7cc39a5a8956fb3cae9b9828ad2c0706bf·...·]-9">}</span><span·class="w">156 ············</span><span·class="p"·data-group-id="5205551947-9">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">right</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">type</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·124,·SHA:·1cf93025e8e0b760bb97704e3f04a013baec396b89b9484ce0844eaa75dc1e15·...·]-9">}</span><span·class="w">
157 ········</span><span·class="p"·data-group-id="0953452644-7">]</span><span·class="p">,</span><span·class="w">157 ········</span><span·class="p"·data-group-id="5205551947-7">]</span><span·class="p">,</span><span·class="w">
158 ········</span><span·class="ss">handler</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">158 ········</span><span·class="ss">handler</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">
159 ············</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="0953452644-10">(</span><span·class="p"·data-group-id="0953452644-11">#{</span><span·class="ss">left</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Left</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·223,·SHA:·6a2630b7fb5a2a5a17f128efd91ec571ac21c8256bb6c62d27ecccce7d810794·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">159 ············</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="5205551947-10">(</span><span·class="p"·data-group-id="5205551947-11">#{</span><span·class="ss">left</span><span·class="w">·</span><span·class="p">:=</span><span·class="w">·</span><span·class="n">Left</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·223,·SHA:·aee95cc0cdbbe2a8d274ecab08611c3275a845b3c7d54966d5785f91e3e67887·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
160 ················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0953452644-12">(</span><span·class="s">&quot;</span><span·class="si">~b</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0953452644-13">[</span><span·class="n">Left<[·...·truncated·by·diffoscope;·len:·201,·SHA:·29ee6d9f6ba538c4b29e8603469a1b512453d6a26c0a3cf7d801b6df803a6b0b·...·]-12">)</span><span·class="w">160 ················</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5205551947-12">(</span><span·class="s">&quot;</span><span·class="si">~b</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5205551947-13">[</span><span·class="n">Left<[·...·truncated·by·diffoscope;·len:·201,·SHA:·577edad8111d1c319e7c1ba30cdbfaf093f03d9b223a74d0cf3eabe9132b2b29·...·]-12">)</span><span·class="w">
161 ············</span><span·class="k">end</span><span·class="w">161 ············</span><span·class="k">end</span><span·class="w">
162 ····</span><span·class="p"·data-group-id="0953452644-6">}</span><span·class="p">.</span></code></pre><p>Running·this·script·with·no·arguments·results·in·an·error,·accompanied·by·the162 ····</span><span·class="p"·data-group-id="5205551947-6">}</span><span·class="p">.</span></code></pre><p>Running·this·script·with·no·arguments·results·in·an·error,·accompanied·by·the
163 usage·information.</p><p>The·<code·class="inline">cli</code>·function·defines·a·single·command·with·embedded·handler·accepting·a163 usage·information.</p><p>The·<code·class="inline">cli</code>·function·defines·a·single·command·with·embedded·handler·accepting·a
164 map.·Keys·of·the·map·are·argument·names·as·defined·by·the·<code·class="inline">argument</code>·field·of164 map.·Keys·of·the·map·are·argument·names·as·defined·by·the·<code·class="inline">argument</code>·field·of
165 the·command,·<code·class="inline">left</code>·and·<code·class="inline">right</code>·in·the·example.·Values·are·taken·from·the165 the·command,·<code·class="inline">left</code>·and·<code·class="inline">right</code>·in·the·example.·Values·are·taken·from·the
166 command·line,·and·converted·into·integers,·as·requested·by·the·type166 command·line,·and·converted·into·integers,·as·requested·by·the·type
167 specification.·Both·arguments·in·the·example·above·are·required·(and·therefore167 specification.·Both·arguments·in·the·example·above·are·required·(and·therefore
168 defined·as·positional).</p><h2·id="module-command-hierarchy"·class="section-heading">168 defined·as·positional).</p><h2·id="module-command-hierarchy"·class="section-heading">
169 ··<a·href="#module-command-hierarchy"·class="hover-link">169 ··<a·href="#module-command-hierarchy"·class="hover-link">
170 ····<i·class="ri-link-m"·aria-hidden="true"></i>170 ····<i·class="ri-link-m"·aria-hidden="true"></i>
171 ··</a>171 ··</a>
172 ··<span·class="text">Command·hierarchy</span>172 ··<span·class="text">Command·hierarchy</span>
173 </h2>173 </h2>
174 <p>A·command·may·contain·nested·commands,·forming·a·hierarchy.·Arguments·defined·at174 <p>A·command·may·contain·nested·commands,·forming·a·hierarchy.·Arguments·defined·at
175 the·upper·level·command·are·automatically·added·to·all·nested·commands.·Nested175 the·upper·level·command·are·automatically·added·to·all·nested·commands.·Nested
176 commands·example·(assuming·<code·class="inline">progname</code>·is·<code·class="inline">nested</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">cli</span><span·class="p"·data-group-id="4357992231-1">(</span><span·class="p"·data-group-id="4357992231-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">176 commands·example·(assuming·<code·class="inline">progname</code>·is·<code·class="inline">nested</code>):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">cli</span><span·class="p"·data-group-id="2464169664-1">(</span><span·class="p"·data-group-id="2464169664-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
177 ··</span><span·class="p"·data-group-id="4357992231-2">#{</span><span·class="w">177 ··</span><span·class="p"·data-group-id="2464169664-2">#{</span><span·class="w">
178 ····</span><span·class="c1">%%·top·level·argument·applicable·to·all·commands</span><span·class="w">178 ····</span><span·class="c1">%%·top·level·argument·applicable·to·all·commands</span><span·class="w">
179 ····</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-3">[</span><span·class="p"·data-group-id="4357992231-4">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">top</span><span·class="p"·data-group-id="4357992231-4">}</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·8f949fb0d66a4ef45c162e3a105958749ebc5290307e9efd4336ca68e4745436·...·]-3">]</span><span·class="p">,</span><span·class="w">179 ····</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-3">[</span><span·class="p"·data-group-id="2464169664-4">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">top</span><span·class="p"·data-group-id="2464169664-4">}</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·f6f2a0bafd044212e6b916efea3c81950744295b27e3b3a53dd474d817431846·...·]-3">]</span><span·class="p">,</span><span·class="w">
180 ······</span><span·class="ss">commands</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-5">#{</span><span·class="w">180 ······</span><span·class="ss">commands</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-5">#{</span><span·class="w">
181 ········</span><span·class="s">&quot;first&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-6">#{</span><span·class="w">181 ········</span><span·class="s">&quot;first&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-6">#{</span><span·class="w">
182 ··········</span><span·class="c1">%%·argument·applicable·to·&quot;first&quot;·command·and</span><span·class="w">182 ··········</span><span·class="c1">%%·argument·applicable·to·&quot;first&quot;·command·and</span><span·class="w">
183 ··········</span><span·class="c1">%%··all·commands·nested·into·&quot;first&quot;</span><span·class="w">183 ··········</span><span·class="c1">%%··all·commands·nested·into·&quot;first&quot;</span><span·class="w">
184 ··········</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-7">[</span><span·class="p"·data-group-id="4357992231-8">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">mid</span><span·class="p"·data-group-id="4357992231-8">}</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·8f949fb0d66a4ef45c162e3a105958749ebc5290307e9efd4336ca68e4745436·...·]-7">]</span><span·class="p">,</span><span·class="w">184 ··········</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-7">[</span><span·class="p"·data-group-id="2464169664-8">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">mid</span><span·class="p"·data-group-id="2464169664-8">}</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·f6f2a0bafd044212e6b916efea3c81950744295b27e3b3a53dd474d817431846·...·]-7">]</span><span·class="p">,</span><span·class="w">
185 ··········</span><span·class="ss">commands</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-9">#{</span><span·class="w">185 ··········</span><span·class="ss">commands</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-9">#{</span><span·class="w">
186 ············</span><span·class="s">&quot;second&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-10">#{</span><span·class="w">186 ············</span><span·class="s">&quot;second&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-10">#{</span><span·class="w">
187 ··············</span><span·class="c1">%%·argument·only·applicable·for·&quot;second&quot;·command</span><span·class="w">187 ··············</span><span·class="c1">%%·argument·only·applicable·for·&quot;second&quot;·command</span><span·class="w">
188 ··············</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-11">[</span><span·class="p"·data-group-id="4357992231-12">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">bottom</span><span·class="p"·data-group-id="4357992231-12[·...·truncated·by·diffoscope;·len:·51,·SHA:·6d8519b8f04a4c3a7795d948532807345e40efb62e63f8df8599ca19d862a7f9·...·]-11">]</span><span·class="p">,</span><span·class="w">188 ··············</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-11">[</span><span·class="p"·data-group-id="2464169664-12">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">bottom</span><span·class="p"·data-group-id="2464169664-12[·...·truncated·by·diffoscope;·len:·51,·SHA:·cd2b8de8cc95ab3b96c474088b79b650f9528147d1c41bd879cd3514629c80ec·...·]-11">]</span><span·class="p">,</span><span·class="w">
189 ··············</span><span·class="ss">handler</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4357992231-13">(</span><span·class="n">A</span><span·class="p"·data-group-id="4357992231-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span[·...·truncated·by·diffoscope;·len:·386,·SHA:·0e2cccbda8b49e7a84fd068d53d94d76b5756da657d9372b98f971df53560673·...·]-14">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">189 ··············</span><span·class="ss">handler</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2464169664-13">(</span><span·class="n">A</span><span·class="p"·data-group-id="2464169664-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span[·...·truncated·by·diffoscope;·len:·386,·SHA:·ba1a6f0e684f6d4621ced67e94d0c82e636e09621d2581912b9eee137d14f252·...·]-14">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
190 ··········</span><span·class="p"·data-group-id="4357992231-10">}</span><span·class="w">190 ··········</span><span·class="p"·data-group-id="2464169664-10">}</span><span·class="w">
191 ········</span><span·class="p"·data-group-id="4357992231-9">}</span><span·class="w">191 ········</span><span·class="p"·data-group-id="2464169664-9">}</span><span·class="w">
192 ······</span><span·class="p"·data-group-id="4357992231-6">}</span><span·class="w">192 ······</span><span·class="p"·data-group-id="2464169664-6">}</span><span·class="w">
193 ····</span><span·class="p"·data-group-id="4357992231-5">}</span><span·class="w">193 ····</span><span·class="p"·data-group-id="2464169664-5">}</span><span·class="w">
194 ··</span><span·class="p"·data-group-id="4357992231-2">}</span><span·class="p">.</span></code></pre><p>In·the·example·above,·a·3-level·hierarchy·is·defined.·First·is·the·script·itself194 ··</span><span·class="p"·data-group-id="2464169664-2">}</span><span·class="p">.</span></code></pre><p>In·the·example·above,·a·3-level·hierarchy·is·defined.·First·is·the·script·itself
195 (<code·class="inline">nested</code>),·accepting·the·only·argument·<code·class="inline">top</code>.·Since·it·has·no·associated195 (<code·class="inline">nested</code>),·accepting·the·only·argument·<code·class="inline">top</code>.·Since·it·has·no·associated
196 handler,·<a·href="#run/3"><code·class="inline">run/3</code></a>·will·not·accept·user·input·omitting·nested·command·selection.196 handler,·<a·href="#run/3"><code·class="inline">run/3</code></a>·will·not·accept·user·input·omitting·nested·command·selection.
197 For·this·example,·user·has·to·supply·5·arguments·in·the·command·line,·two·being197 For·this·example,·user·has·to·supply·5·arguments·in·the·command·line,·two·being
198 command·names,·and·another·3·-·required·positional·arguments:</p><pre><code·class="text">./nested.erl·one·first·second·two·three198 command·names,·and·another·3·-·required·positional·arguments:</p><pre><code·class="text">./nested.erl·one·first·second·two·three
199 #{top·=&gt;·&quot;one&quot;,mid·=&gt;·&quot;two&quot;,bottom·=&gt;·&quot;three&quot;}</code></pre><p>Commands·have·preference·over·positional·argument·values.·In·the·example·above,199 #{top·=&gt;·&quot;one&quot;,mid·=&gt;·&quot;two&quot;,bottom·=&gt;·&quot;three&quot;}</code></pre><p>Commands·have·preference·over·positional·argument·values.·In·the·example·above,
200 commands·and·positional·arguments·are·interleaving,·and·<code·class="inline">argparse</code>·matches200 commands·and·positional·arguments·are·interleaving,·and·<code·class="inline">argparse</code>·matches
201 command·name·first.</p><h2·id="module-arguments"·class="section-heading">201 command·name·first.</p><h2·id="module-arguments"·class="section-heading">
Offset 206, 22 lines modifiedOffset 206, 22 lines modified
206 ··<span·class="text">Arguments</span>206 ··<span·class="text">Arguments</span>
207 </h2>207 </h2>
208 <p><code·class="inline">argparse</code>·supports·positional·and·optional·arguments.·Optional·arguments,·or208 <p><code·class="inline">argparse</code>·supports·positional·and·optional·arguments.·Optional·arguments,·or
209 options·for·short,·must·be·prefixed·with·a·special·character·(<code·class="inline">-</code>·is·the·default209 options·for·short,·must·be·prefixed·with·a·special·character·(<code·class="inline">-</code>·is·the·default
210 on·all·operating·systems).·Both·options·and·positional·arguments·have·1·or·more210 on·all·operating·systems).·Both·options·and·positional·arguments·have·1·or·more
211 associated·values.·See·<a·href="#t:argument/0"><code·class="inline">argument·specification</code></a>·to·find·more211 associated·values.·See·<a·href="#t:argument/0"><code·class="inline">argument·specification</code></a>·to·find·more
212 details·about·supported·combinations.</p><p>In·the·user·input,·short·options·may·be·concatenated·with·their·values.·Long212 details·about·supported·combinations.</p><p>In·the·user·input,·short·options·may·be·concatenated·with·their·values.·Long
213 options·support·values·separated·by·<code·class="inline">=</code>.·Consider·this·definition:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">cli</span><span·class="p"·data-group-id="1185261195-1">(</span><span·class="p"·data-group-id="1185261195-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">213 options·support·values·separated·by·<code·class="inline">=</code>.·Consider·this·definition:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">cli</span><span·class="p"·data-group-id="4061230985-1">(</span><span·class="p"·data-group-id="4061230985-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
214 ··</span><span·class="p"·data-group-id="1185261195-2">#{</span><span·class="w">214 ··</span><span·class="p"·data-group-id="4061230985-2">#{</span><span·class="w">
215 ····</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="1185261195-3">[</span><span·class="w">215 ····</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4061230985-3">[</span><span·class="w">
216 ······</span><span·class="p"·data-group-id="1185261195-4">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">long</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">long</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·131,·SHA:·f4c3d451d7996a662932679d851561fad22d9d7775c1e216c269053a572de2f5·...·]5-4">}</span><span·class="p">,</span><span·class="w">216 ······</span><span·class="p"·data-group-id="4061230985-4">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">long</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">long</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·131,·SHA:·d9c70e45085a23e6d7300115a6003cba970024ad28e2860f5519c8e162f28e18·...·]5-4">}</span><span·class="p">,</span><span·class="w">
217 ······</span><span·class="p"·data-group-id="1185261195-5">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">short</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">short</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·119,·SHA:·42f26105a4ad1804d5a5bae6b03d489b5f067a29fd396b10bb0d1143430dcb5d·...·]5-5">}</span><span·class="w">217 ······</span><span·class="p"·data-group-id="4061230985-5">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">short</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">short</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·119,·SHA:·0fbff1f5ac0dba88d18a9f4add159e597a78eadb23747c31dc60523b61ac0546·...·]5-5">}</span><span·class="w">
218 ····</span><span·class="p"·data-group-id="1185261195-3">]</span><span·class="p">,</span><span·class="w">218 ····</span><span·class="p"·data-group-id="4061230985-3">]</span><span·class="p">,</span><span·class="w">
219 ····</span><span·class="ss">handler</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="1185261195-6">(</span><span·class="n">Args</span><span·class="p"·data-group-id="1185261195-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</spa[·...·truncated·by·diffoscope;·len:·386,·SHA:·b8d7fdcd0159da41263ac4788ce63d6723ea82df60c3a28d715992767775e74a·...·]5-7">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">219 ····</span><span·class="ss">handler</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4061230985-6">(</span><span·class="n">Args</span><span·class="p"·data-group-id="4061230985-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</spa[·...·truncated·by·diffoscope;·len:·386,·SHA:·ab8cfa5c6126347dfec3033a06c0724c85e1e7b34004bb61216b6e40a18f6b41·...·]5-7">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
220 ··</span><span·class="p"·data-group-id="1185261195-2">}</span><span·class="p">.</span></code></pre><p>Running·<code·class="inline">./args·--long=VALUE</code>·prints·<code·class="inline">#{long·=&gt;·&quot;VALUE&quot;}</code>,·running220 ··</span><span·class="p"·data-group-id="4061230985-2">}</span><span·class="p">.</span></code></pre><p>Running·<code·class="inline">./args·--long=VALUE</code>·prints·<code·class="inline">#{long·=&gt;·&quot;VALUE&quot;}</code>,·running
221 <code·class="inline">./args·-sVALUE</code>·prints·<code·class="inline">#{short·=&gt;·&quot;VALUE&quot;}</code></p><p><code·class="inline">argparse</code>·supports·boolean·flags·concatenation:·it·is·possible·to·shorten221 <code·class="inline">./args·-sVALUE</code>·prints·<code·class="inline">#{short·=&gt;·&quot;VALUE&quot;}</code></p><p><code·class="inline">argparse</code>·supports·boolean·flags·concatenation:·it·is·possible·to·shorten
222 <code·class="inline">-r·-f·-v</code>·to·<code·class="inline">-rfv</code>.</p><p>Shortened·option·names·are·not·supported:·it·is·not·possible·to·use·<code·class="inline">--my-argum</code>222 <code·class="inline">-r·-f·-v</code>·to·<code·class="inline">-rfv</code>.</p><p>Shortened·option·names·are·not·supported:·it·is·not·possible·to·use·<code·class="inline">--my-argum</code>
223 instead·of·<code·class="inline">--my-argument-name</code>·even·when·such·option·can·be·unambiguously223 instead·of·<code·class="inline">--my-argument-name</code>·even·when·such·option·can·be·unambiguously
224 found.</p>224 found.</p>
225 ····</section>225 ····</section>
  
226 </div>226 </div>
Offset 604, 119 lines modifiedOffset 604, 119 lines modified
604 as·optional.·Optional·arguments·do·not·have·specific·order·and·may·appear604 as·optional.·Optional·arguments·do·not·have·specific·order·and·may·appear
605 anywhere·in·the·command·line.·Positional·arguments·are·ordered·the·same·way·as605 anywhere·in·the·command·line.·Positional·arguments·are·ordered·the·same·way·as
606 they·appear·in·the·arguments·list·of·the·command·specification.</p><p>By·default,·all·positional·arguments·must·be·present·in·the·command·line.·The606 they·appear·in·the·arguments·list·of·the·command·specification.</p><p>By·default,·all·positional·arguments·must·be·present·in·the·command·line.·The
607 parser·will·return·an·error·otherwise.·Options,·however,·may·be·omitted,·in607 parser·will·return·an·error·otherwise.·Options,·however,·may·be·omitted,·in
608 which·case·resulting·argument·map·will·either·contain·the·default·value,·or·not608 which·case·resulting·argument·map·will·either·contain·the·default·value,·or·not
609 have·the·key·at·all.</p><ul><li><p><strong><code·class="inline">name</code></strong>·-·Sets·the·argument·name·in·the·parsed·argument·map.·If·<code·class="inline">help</code>·is609 have·the·key·at·all.</p><ul><li><p><strong><code·class="inline">name</code></strong>·-·Sets·the·argument·name·in·the·parsed·argument·map.·If·<code·class="inline">help</code>·is
610 not·defined,·name·is·also·used·to·generate·the·default·usage·message.</p></li><li><p><strong><code·class="inline">short</code></strong>·-·Defines·a·short·(single·character)·form·of·an·optional·argument.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Define·a·command·accepting·argument·named·myarg,·with·short·form·$a:</span><span·class="gp·unselectable">610 not·defined,·name·is·also·used·to·generate·the·default·usage·message.</p></li><li><p><strong><code·class="inline">short</code></strong>·-·Defines·a·short·(single·character)·form·of·an·optional·argument.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Define·a·command·accepting·argument·named·myarg,·with·short·form·$a:</span><span·class="gp·unselectable">
611 1&gt;·</span><span·class="n">Cmd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7792696181-1">#{</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7792696181-2">[</span><span·class="p"·data-group-id="7792696181-3">#{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·442,·SHA:·61c8086bb1bb3233403b52e5f3688cdb5ab500809de03bb817c6addc0520c3af·...·]-1">}</span><span·class="p">.</span><span·class="w">611 1&gt;·</span><span·class="n">Cmd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4945056974-1">#{</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4945056974-2">[</span><span·class="p"·data-group-id="4945056974-3">#{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·442,·SHA:·a3caf94dc0ff21f9d64343ae2f38da65229797de245dca52648b18bb501023b1·...·]-1">}</span><span·class="p">.</span><span·class="w">
612 </span><span·class="c1">%%·Parse·command·line·&quot;-a·str&quot;:</span><span·class="gp·unselectable">612 </span><span·class="c1">%%·Parse·command·line·&quot;-a·str&quot;:</span><span·class="gp·unselectable">
613 2&gt;·</span><span·class="p"·data-group-id="7792696181-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·620,·SHA:·78758d51146fcbe5b04015eb6c4f46aa67a328315a3443f64354910fb3d355e1·...·]-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">613 2&gt;·</span><span·class="p"·data-group-id="4945056974-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·620,·SHA:·584d2122a43edad852a8cfdd3ed0060e16aee094c7a548c632ce687ff5bee955·...·]-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">
  
614 </span><span·class="p"·data-group-id="7792696181-7">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;str&quot;</span><span·class="p"·data-group-id="7792696181-7">}</span><span·class="w">614 </span><span·class="p"·data-group-id="4945056974-7">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;str&quot;</span><span·class="p"·data-group-id="4945056974-7">}</span><span·class="w">
  
615 </span><span·class="c1">%%·Option·value·can·be·concatenated·with·the·switch:·&quot;-astr&quot;</span><span·class="gp·unselectable">615 </span><span·class="c1">%%·Option·value·can·be·concatenated·with·the·switch:·&quot;-astr&quot;</span><span·class="gp·unselectable">
616 3&gt;·</span><span·class="p"·data-group-id="7792696181-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·539,·SHA:·5e0f54ad5c5808a8d0b6e146cef41680cc167aaa5803d075f00d7875bca8afcb·...·]-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">616 3&gt;·</span><span·class="p"·data-group-id="4945056974-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·539,·SHA:·34ceb93adb72a557baa56a50ad0dfcc6a2a34f961c27cc3ce6abd27f698c0f7c·...·]-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">
  
617 </span><span·class="p"·data-group-id="7792696181-11">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;str&quot;</span><span·class="p"·data-group-id="7792696181-11">}</span></code></pre><p>By·default·all·options·expect·a·single·value·following·the·option·switch.·The617 </span><span·class="p"·data-group-id="4945056974-11">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;str&quot;</span><span·class="p"·data-group-id="4945056974-11">}</span></code></pre><p>By·default·all·options·expect·a·single·value·following·the·option·switch.·The
618 only·exception·is·an·option·of·a·boolean·type.</p></li><li><p><strong><code·class="inline">long</code></strong>·-·Defines·a·long·form·of·an·optional·argument.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Cmd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8625167564-1">#{</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8625167564-2">[</span><span·class="p"·data-group-id="8625167564-3">#{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·454,·SHA:·bcd05e8cdb72392592462bd50fa57641770db401f3d5544e834af0c5f88b626b·...·]-1">}</span><span·class="p">.</span><span·class="w">618 only·exception·is·an·option·of·a·boolean·type.</p></li><li><p><strong><code·class="inline">long</code></strong>·-·Defines·a·long·form·of·an·optional·argument.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Cmd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3276341550-1">#{</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3276341550-2">[</span><span·class="p"·data-group-id="3276341550-3">#{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·454,·SHA:·b73cfeb1b2112c444100ef2fecec568a077e120dea2d6988a176ffd3fbb6d46f·...·]-1">}</span><span·class="p">.</span><span·class="w">
619 </span><span·class="c1">%%·Parse·command·line·&quot;-name·Erlang&quot;:</span><span·class="gp·unselectable">619 </span><span·class="c1">%%·Parse·command·line·&quot;-name·Erlang&quot;:</span><span·class="gp·unselectable">
620 2&gt;·</span><span·class="p"·data-group-id="8625167564-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·626,·SHA:·b9ffd892e56818a78ba892549fdf8f58701275416c9c4b1f59a1a02ee3471bc3·...·]-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">620 2&gt;·</span><span·class="p"·data-group-id="3276341550-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·626,·SHA:·509817370277d0bd2ec6435ecbbb90e76129154361c15ac78f6a07561799aeae·...·]-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">
  
621 </span><span·class="p"·data-group-id="8625167564-7">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;Erlang&quot;</span><span·class="p"·data-group-id="8625167564-7">}</span><span·class="w">621 </span><span·class="p"·data-group-id="3276341550-7">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;Erlang&quot;</span><span·class="p"·data-group-id="3276341550-7">}</span><span·class="w">
622 </span><span·class="c1">%%·Or·use·&quot;=&quot;·to·separate·the·switch·and·the·value:</span><span·class="gp·unselectable">622 </span><span·class="c1">%%·Or·use·&quot;=&quot;·to·separate·the·switch·and·the·value:</span><span·class="gp·unselectable">
623 3&gt;·</span><span·class="p"·data-group-id="8625167564-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·546,·SHA:·8d81bbbf043fec9b8da800386a6dc2933e51007d32c14bab300047f1e1474983·...·]-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">623 3&gt;·</span><span·class="p"·data-group-id="3276341550-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·546,·SHA:·c78d35260c202e2714dd4a56275a9a08de45aed09ac319d912ef35cfd916c465·...·]-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArgMap</span><span·class="p">.</span><span·class="w">
  
624 </span><span·class="p"·data-group-id="8625167564-11">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;Erlang&quot;</span><span·class="p"·data-group-id="8625167564-11">}</span></code></pre><p>If·neither·<code·class="inline">short</code>·not·<code·class="inline">long</code>·is·defined,·the·argument·is·treated·as624 </span><span·class="p"·data-group-id="3276341550-11">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;Erlang&quot;</span><span·class="p"·data-group-id="3276341550-11">}</span></code></pre><p>If·neither·<code·class="inline">short</code>·not·<code·class="inline">long</code>·is·defined,·the·argument·is·treated·as
625 positional.</p></li><li><p><strong><code·class="inline">required</code></strong>·-·Forces·the·parser·to·expect·the·argument·to·be·present·in·the625 positional.</p></li><li><p><strong><code·class="inline">required</code></strong>·-·Forces·the·parser·to·expect·the·argument·to·be·present·in·the
626 command·line.·By·default,·all·positional·argument·are·required,·and·all626 command·line.·By·default,·all·positional·argument·are·required,·and·all
627 options·are·not.</p></li><li><p><strong><code·class="inline">default</code></strong>·-·Specifies·the·default·value·to·put·in·the·parsed·argument·map627 options·are·not.</p></li><li><p><strong><code·class="inline">default</code></strong>·-·Specifies·the·default·value·to·put·in·the·parsed·argument·map
628 if·the·value·is·not·supplied·in·the·command·line.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="4005517363-1">(</span><span·class="p"·data-group-id="4005517363-2">[</span><span·class="p"·data-group-id="4005517363-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4005517363-3">#{</span><span·class="ss">arguments[·...·truncated·by·diffoscope;·len:·702,·SHA:·2607bec1337bb7625a709c8dceb9252aaedeecd6411b146559780a8e926ebe96·...·]-1">)</span><span·class="p">.</span><span·class="w">628 if·the·value·is·not·supplied·in·the·command·line.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="5725125768-1">(</span><span·class="p"·data-group-id="5725125768-2">[</span><span·class="p"·data-group-id="5725125768-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5725125768-3">#{</span><span·class="ss">arguments[·...·truncated·by·diffoscope;·len:·702,·SHA:·bcfa5614ea6028327cf3528e096c1205f1ec3cea5be58e96a6a5a63c773778f1·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
629 </span><span·class="p"·data-group-id="4005517363-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4005517363-7">#{</span><span·class="p"·data-group-id="4005517363-7">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">629 </span><span·class="p"·data-group-id="5725125768-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5725125768-7">#{</span><span·class="p"·data-group-id="5725125768-7">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
630 2&gt;·</span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="4005517363-8">(</span><span·class="p"·data-group-id="4005517363-9">[</span><span·class="p"·data-group-id="4005517363-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4005517363-10">#{</span><span·class="ss">argument[·...·truncated·by·diffoscope;·len:·901,·SHA:·0216474d83e65fae34ace19421bdce7c77d2e956286f481aaa23cf861e942b67·...·]-8">)</span><span·class="p">.</span><span·class="w">630 2&gt;·</span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="5725125768-8">(</span><span·class="p"·data-group-id="5725125768-9">[</span><span·class="p"·data-group-id="5725125768-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5725125768-10">#{</span><span·class="ss">argument[·...·truncated·by·diffoscope;·len:·901,·SHA:·580399dc0b607fe051c8cc1dca25b9f85e6f37023397284d35d056231b42f60e·...·]-8">)</span><span·class="p">.</span><span·class="w">
  
631 </span><span·class="p"·data-group-id="4005517363-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4005517363-14">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;d[·...·truncated·by·diffoscope;·len:·56,·SHA:·2c6d50eb9f81f2fb10f0ebe68fc79c050f10c6359eae70bc65e5d7a8333190b2·...·]-14">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre></li><li><p><strong><code·class="inline">type</code></strong>·-·Defines·type·conversion·and·validation·routine.·The·default·is631 </span><span·class="p"·data-group-id="5725125768-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5725125768-14">#{</span><span·class="ss">myarg</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;d[·...·truncated·by·diffoscope;·len:·56,·SHA:·e6595904a4ffaa0cce8a1bb3bef990601ad913c2d8d128c3273dbe81f81228d9·...·]-14">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre></li><li><p><strong><code·class="inline">type</code></strong>·-·Defines·type·conversion·and·validation·routine.·The·default·is
632 <code·class="inline">string</code>,·assuming·no·conversion.</p></li><li><p><strong><code·class="inline">nargs</code></strong>·-·Defines·the·number·of·following·arguments·to·consume·from·the632 <code·class="inline">string</code>,·assuming·no·conversion.</p></li><li><p><strong><code·class="inline">nargs</code></strong>·-·Defines·the·number·of·following·arguments·to·consume·from·the
633 command·line.·By·default,·the·parser·consumes·the·next·argument·and·converts633 command·line.·By·default,·the·parser·consumes·the·next·argument·and·converts
634 it·into·an·Erlang·term·according·to·the·specified·type.</p><ul><li><p><strong><a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pos_integer/0"><code·class="inline">pos_integer/0</code></a></strong>·-·Consume·exactly·this·number·of·positional·arguments,634 it·into·an·Erlang·term·according·to·the·specified·type.</p><ul><li><p><strong><a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pos_integer/0"><code·class="inline">pos_integer/0</code></a></strong>·-·Consume·exactly·this·number·of·positional·arguments,
635 fail·if·there·is·not·enough.·Value·in·the·argument·map·contains·a·list·of635 fail·if·there·is·not·enough.·Value·in·the·argument·map·contains·a·list·of
636 exactly·this·length.·Example,·defining·a·positional·argument·expecting·3636 exactly·this·length.·Example,·defining·a·positional·argument·expecting·3
637 integer·values:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Cmd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4517646989-1">#{</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4517646989-2">[</span><span·class="p"·data-group-id="4517646989-3">#{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·623,·SHA:·20854dfe8e2728af1fe655098d35bfe3b0b07fdc54df27b90b686cdc1256993a·...·]-1">}</span><span·class="p">,</span><span·class="w">637 integer·values:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Cmd</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0578427224-1">#{</span><span·class="ss">arguments</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0578427224-2">[</span><span·class="p"·data-group-id="0578427224-3">#{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·623,·SHA:·61fda3febccbeb744f0cb65e58ce130f4cfa3ab971e1af20e3bd51d56c92973f·...·]-1">}</span><span·class="p">,</span><span·class="w">
638 </span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="4517646989-4">(</span><span·class="p"·data-group-id="4517646989-5">[</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·191,·SHA:·6bb6e0bb5ddf802276be74e4973388857ea45de509e192a4ddaed66eb9de004e·...·]-4">)</span><span·class="p">.</span><span·class="w">638 </span><span·class="nc">argparse</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="0578427224-4">(</span><span·class="p"·data-group-id="0578427224-5">[</span><span·class="s">&quot;1&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;2&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·191,·SHA:·58983041ca04fdf7ce62e5515e2c1705b6b362a020cfa67157b36599826c422d·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
Max diff block lines reached; 68380/128013 bytes (53.42%) of diff not shown.
25.0 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/array.html
    
Offset 132, 22 lines modifiedOffset 132, 22 lines modified
132 is·used·for·entries·that·have·not·been·explicitly·set.</p><p>Arrays·uses·<em>zero</em>-based·indexing.·This·is·a·deliberate·design·choice·and132 is·used·for·entries·that·have·not·been·explicitly·set.</p><p>Arrays·uses·<em>zero</em>-based·indexing.·This·is·a·deliberate·design·choice·and
133 differs·from·other·Erlang·data·structures,·for·example,·tuples.</p><p>Unless·specified·by·the·user·when·the·array·is·created,·the·default·value·is·the133 differs·from·other·Erlang·data·structures,·for·example,·tuples.</p><p>Unless·specified·by·the·user·when·the·array·is·created,·the·default·value·is·the
134 atom·<code·class="inline">undefined</code>.·There·is·no·difference·between·an·unset·entry·and·an·entry134 atom·<code·class="inline">undefined</code>.·There·is·no·difference·between·an·unset·entry·and·an·entry
135 that·has·been·explicitly·set·to·the·same·value·as·the·default·one·(compare135 that·has·been·explicitly·set·to·the·same·value·as·the·default·one·(compare
136 <a·href="#reset/2"><code·class="inline">reset/2</code></a>).·If·you·need·to·differentiate·between·unset·and·set·entries,·ensure136 <a·href="#reset/2"><code·class="inline">reset/2</code></a>).·If·you·need·to·differentiate·between·unset·and·set·entries,·ensure
137 that·the·default·value·cannot·be·confused·with·the·values·of·set·entries.</p><p>The·array·never·shrinks·automatically.·If·an·index·<code·class="inline">I</code>·has·been·used·to·set·an137 that·the·default·value·cannot·be·confused·with·the·values·of·set·entries.</p><p>The·array·never·shrinks·automatically.·If·an·index·<code·class="inline">I</code>·has·been·used·to·set·an
138 entry·successfully,·all·indices·in·the·range·<code·class="inline">[0,I]</code>·stay·accessible·unless·the138 entry·successfully,·all·indices·in·the·range·<code·class="inline">[0,I]</code>·stay·accessible·unless·the
139 array·size·is·explicitly·changed·by·calling·<a·href="#resize/2"><code·class="inline">resize/2</code></a>.</p><p><em>Examples:</em></p><p>Create·a·fixed-size·array·with·entries·0-9·set·to·<code·class="inline">undefined</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="8550424109-1">(</span><span·class="mi">10</span><span·class="p"·data-group-id="8550424109-1">)</span><span·class="p">.</span><span·class="w">139 array·size·is·explicitly·changed·by·calling·<a·href="#resize/2"><code·class="inline">resize/2</code></a>.</p><p><em>Examples:</em></p><p>Create·a·fixed-size·array·with·entries·0-9·set·to·<code·class="inline">undefined</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="2057377630-1">(</span><span·class="mi">10</span><span·class="p"·data-group-id="2057377630-1">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="mi">10</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">size</span><span·class="p"·data-group-id="8550424109-2">(</span><span·class="n">A0</span><span·class="p"·data-group-id="8550424109-2">)</span><span·class="p">.</span></code></pre><p>Create·an·extendible·array·and·set·entry·17·to·<code·class="inline">true</code>,·causing·the·array·to·grow140 </span><span·class="mi">10</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">size</span><span·class="p"·data-group-id="2057377630-2">(</span><span·class="n">A0</span><span·class="p"·data-group-id="2057377630-2">)</span><span·class="p">.</span></code></pre><p>Create·an·extendible·array·and·set·entry·17·to·<code·class="inline">true</code>,·causing·the·array·to·grow
141 automatically:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="1242811167-1">(</span><span·class="mi">17</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><spa[·...·truncated·by·diffoscope;·len:·143,·SHA:·0ca4066f528ba4f9a08958f488d3a746fd884f0eb9023bbdd7932f6dde0c037e·...·]-1">)</span><span·class="p">.</span><span·class="w">141 automatically:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="0088871468-1">(</span><span·class="mi">17</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><spa[·...·truncated·by·diffoscope;·len:·143,·SHA:·1c99f28440c5f67fea8db17f7ceea20fbd51b2f59a21dd1f2ed6ab73fc2836f3·...·]-1">)</span><span·class="p">.</span><span·class="w">
142 </span><span·class="mi">18</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">size</span><span·class="p"·data-group-id="1242811167-3">(</span><span·class="n">A1</span><span·class="p"·data-group-id="1242811167-3">)</span><span·class="p">.</span></code></pre><p>Read·back·a·stored·value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">true</span><span·class[·...·truncated·by·diffoscope;·len:·862,·SHA:·e217bdfb6b3a6c07c543c702205be2fb8689126a9a9270ce9b66a3648deb5c6e·...·]-1">)</span></code></pre><p>Accessing·an·entry·beyond·the·last·set·entry·also·returns·the·default·value,·if142 </span><span·class="mi">18</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">size</span><span·class="p"·data-group-id="0088871468-3">(</span><span·class="n">A1</span><span·class="p"·data-group-id="0088871468-3">)</span><span·class="p">.</span></code></pre><p>Read·back·a·stored·value:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">true</span><span·class[·...·truncated·by·diffoscope;·len:·862,·SHA:·d98562b7132071efa03ce4f4cc024eee12382a03e2fd151d8a4f85878a184c2a·...·]-1">)</span></code></pre><p>Accessing·an·entry·beyond·the·last·set·entry·also·returns·the·default·value,·if
143 the·array·does·not·have·fixed·size:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">undefined</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="1429458976-1">(</span><span·class="mi">18</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A1</span><span·class="p"·data-group-id="1429458976-1">)</span><span·class="p">.</span></code></pre><p>&quot;Sparse&quot;·functions·ignore·defaul[·...·truncated·by·diffoscope;·len:·515,·SHA:·9961b6b1b509176a231134a8f875e261ad37ae3bf17ac8b326534983ba9bb8ad·...·]-1">)</span><span·class="p">.</span><span·class="w">143 the·array·does·not·have·fixed·size:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">undefined</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="5681272681-1">(</span><span·class="mi">18</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A1</span><span·class="p"·data-group-id="5681272681-1">)</span><span·class="p">.</span></code></pre><p>&quot;Sparse&quot;·functions·ignore·defaul[·...·truncated·by·diffoscope;·len:·515,·SHA:·f25fde892204db0be535c751405605864dc5746598dc200a72a3672dee11f96c·...·]-1">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="p"·data-group-id="1964209462-2">[</span><span·class="p"·data-group-id="1964209462-3">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="1964209462-3">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1964209462-4">{</span><span·class="mi">17</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="1964209462-4">}</span><span·class="p"·data-group-id="1964209462-2">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">sparse_to_orddict</span><span·class="p"·data-group-id="1964209462-5">(</span><span·class="n">A2</span><span·class="p"·data-group-id="1964209462-5">)</span><span·class="p">.</span></code></pre><p>An·extendible·array·can·be·made·fixed-size·later:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">A3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">fix</span><span·class="p"·data-group-id="6865334585-1">(</span><span·class="n">A2</span><span·class="p"·data-group-id="6865334585-1">)</span><span·class="p">.</span></code></pre><p>A·fixed-size·array·does·not·grow·automatically·and·does·not·allow·accesses 
145 beyond·the·last·set·entry:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7768112871-1">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7768112871-2">{</span><span·clas[·...·truncated·by·diffoscope;·len:·805,·SHA:·896635799d2111771d6b4b9512ed3a9c26db3656939b9c4b6cfc1d14c83b4583·...·]144 </span><span·class="p"·data-group-id="8229747979-2">[</span><span·class="p"·data-group-id="8229747979-3">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="8229747979[·...·truncated·by·diffoscope;·len:·1181,·SHA:·f6950f58fca3b3e9a31b1820500e7fbf18d1534205c6b49e1bd77e9d7c9daec6·...·]
 145 beyond·the·last·set·entry:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7326319676-1">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7326319676-2">{</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7326319676-2">}</span><span·class="p"·data-group-id="7326319676-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7326319676-3">(</span><span·class="k">catch</span><span·class="w">·</span><span·class="nc">array</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="7326319676-4">(</span><span·class="mi">18</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A3</span><span·class="p"·data-group-id="7326319676-4">)</span><span·class="p"·data-group-id="7326319676-3">)</span><span·class="p">.</span><span·class="w">
146 </span><span·class="p"·data-group-id="7768112871-5">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7768112871-6">{</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7768112871-[·...·truncated·by·diffoscope;·len:·567,·SHA:·99b2063a269b3402201fcd3ef1d7d3a8ff8e7a39c301a2f676c36505a5611e58·...·]-7">)</span><span·class="p">.</span></code></pre>146 </span><span·class="p"·data-group-id="7326319676-5">{</span><span·class="ss">&#39;EXIT&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="7326319676-6">{</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7326319676-[·...·truncated·by·diffoscope;·len:·567,·SHA:·1511c3a4af92e459e20434720a59c67ac649da2c146e4efdd8328321bb225270·...·]-7">)</span><span·class="p">.</span></code></pre>
147 ····</section>147 ····</section>
  
148 </div>148 </div>
  
149 ··<section·id="summary"·class="details-list">149 ··<section·id="summary"·class="details-list">
150 ····<h1·class="section-heading">150 ····<h1·class="section-heading">
151 ······<a·class="hover-link"·href="#summary">151 ······<a·class="hover-link"·href="#summary">
Offset 1180, 15 lines modifiedOffset 1180, 15 lines modified
1180 ······</div>1180 ······</div>
  
1181 <p>Creates·a·new·array·according·to·the·specified·options.·By·default,·the·array·is1181 <p>Creates·a·new·array·according·to·the·specified·options.·By·default,·the·array·is
1182 extendible·and·has·initial·size·zero.·Array·indices·start·at·<code·class="inline">0</code>.</p><p><code·class="inline">Options</code>·is·a·single·term·or·a·list·of·terms,·selected·from·the·following:</p><ul><li><p><strong><code·class="inline">N::integer()·&gt;=·0</code>·or·<code·class="inline">{size,·N::integer()·&gt;=·0}</code></strong>·-·Specifies·the·initial1182 extendible·and·has·initial·size·zero.·Array·indices·start·at·<code·class="inline">0</code>.</p><p><code·class="inline">Options</code>·is·a·single·term·or·a·list·of·terms,·selected·from·the·following:</p><ul><li><p><strong><code·class="inline">N::integer()·&gt;=·0</code>·or·<code·class="inline">{size,·N::integer()·&gt;=·0}</code></strong>·-·Specifies·the·initial
1183 array·size;·this·also·implies·<code·class="inline">{fixed,·true}</code>.·If·<code·class="inline">N</code>·is·not·a·non-negative1183 array·size;·this·also·implies·<code·class="inline">{fixed,·true}</code>.·If·<code·class="inline">N</code>·is·not·a·non-negative
1184 integer,·the·call·fails·with·reason·<code·class="inline">badarg</code>.</p></li><li><p><strong><code·class="inline">fixed</code>·or·<code·class="inline">{fixed,·true}</code></strong>·-·Creates·a·fixed-size·array.·See·also·<a·href="#fix/1"><code·class="inline">fix/1</code></a>.</p></li><li><p><strong><code·class="inline">{fixed,·false}</code></strong>·-·Creates·an·extendible·(non-fixed-size)·array.</p></li><li><p><strong><code·class="inline">{default,·Value}</code></strong>·-·Sets·the·default·value·for·the·array·to·<code·class="inline">Value</code>.</p></li></ul><p>Options·are·processed·in·the·order·they·occur·in·the·list,·that·is,·later1184 integer,·the·call·fails·with·reason·<code·class="inline">badarg</code>.</p></li><li><p><strong><code·class="inline">fixed</code>·or·<code·class="inline">{fixed,·true}</code></strong>·-·Creates·a·fixed-size·array.·See·also·<a·href="#fix/1"><code·class="inline">fix/1</code></a>.</p></li><li><p><strong><code·class="inline">{fixed,·false}</code></strong>·-·Creates·an·extendible·(non-fixed-size)·array.</p></li><li><p><strong><code·class="inline">{default,·Value}</code></strong>·-·Sets·the·default·value·for·the·array·to·<code·class="inline">Value</code>.</p></li></ul><p>Options·are·processed·in·the·order·they·occur·in·the·list,·that·is,·later
1185 options·have·higher·precedence.</p><p>The·default·value·is·used·as·the·value·of·uninitialized·entries,·and·cannot·be1185 options·have·higher·precedence.</p><p>The·default·value·is·used·as·the·value·of·uninitialized·entries,·and·cannot·be
1186 changed·once·the·array·has·been·created.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="1682848743-1">(</span><span·class="mi">100</span><span·class="p"·data-group-id="1682848743-1">)</span></code></pre><p>creates·a·fixed-size·array·of·size·100.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">array</span><span·class="p">:<[·...·truncated·by·diffoscope;·len:·1390,·SHA:·e6f0c2c7344c94d5293ff358e9396c8e08f28b2f92e1be5dac7ff91ac1fe6b50·...·]3-1">)</span></code></pre><p>creates·an·extendible·array·with·initial·size·10·whose·default·value·is·<code·class="inline">-1</code>.</p><p>See·also·<a·href="#fix/1"><code·class="inline">fix/1</code></a>,·<a·href="#from_list/2"><code·class="inline">from_list/2</code></a>,·<a·href="#get/2"><code·class="inline">get/2</code></a>,·<a·href="#new/0"><code·class="inline">new/0</code></a>,·<a·href="#new/2"><code·class="inline">new/2</code></a>,·<a·href="#set/3"><code·class="inline">set/3</code></a>.</p>1186 changed·once·the·array·has·been·created.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="9092419021-1">(</span><span·class="mi">100</span><span·class="p"·data-group-id="9092419021-1">)</span></code></pre><p>creates·a·fixed-size·array·of·size·100.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">array</span><span·class="p">:<[·...·truncated·by·diffoscope;·len:·1390,·SHA:·36cf501ab0f581088e462de0e3a642145fe898c9fe6ff504b4878288a17e5df6·...·]3-1">)</span></code></pre><p>creates·an·extendible·array·with·initial·size·10·whose·default·value·is·<code·class="inline">-1</code>.</p><p>See·also·<a·href="#fix/1"><code·class="inline">fix/1</code></a>,·<a·href="#from_list/2"><code·class="inline">from_list/2</code></a>,·<a·href="#get/2"><code·class="inline">get/2</code></a>,·<a·href="#new/0"><code·class="inline">new/0</code></a>,·<a·href="#new/2"><code·class="inline">new/2</code></a>,·<a·href="#set/3"><code·class="inline">set/3</code></a>.</p>
1187 ··</section>1187 ··</section>
1188 </section>1188 </section>
1189 <section·class="detail"·id="new/2">1189 <section·class="detail"·id="new/2">
  
1190 ··<div·class="detail-header">1190 ··<div·class="detail-header">
1191 ····<a·href="#new/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1191 ····<a·href="#new/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1192 ······<i·class="ri-link-m"·aria-hidden="true"></i>1192 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1213, 15 lines modifiedOffset 1213, 15 lines modified
1213 ······</div>1213 ······</div>
  
1214 <p>Creates·a·new·array·according·to·the·specified·size·and·options.</p><p>If·<code·class="inline">Size</code>·is·not·a·non-negative·integer,·the·call·fails·with·reason·<code·class="inline">badarg</code>.1214 <p>Creates·a·new·array·according·to·the·specified·size·and·options.</p><p>If·<code·class="inline">Size</code>·is·not·a·non-negative·integer,·the·call·fails·with·reason·<code·class="inline">badarg</code>.
1215 By·default,·the·array·has·fixed·size.·Notice·that·any·size·specifications·in1215 By·default,·the·array·has·fixed·size.·Notice·that·any·size·specifications·in
1216 <code·class="inline">Options</code>·override·parameter·<code·class="inline">Size</code>.</p><p>If·<code·class="inline">Options</code>·is·a·list,·this·is·equivalent·to1216 <code·class="inline">Options</code>·override·parameter·<code·class="inline">Size</code>.</p><p>If·<code·class="inline">Options</code>·is·a·list,·this·is·equivalent·to
1217 <a·href="#new/1"><code·class="inline">new([{size,·Size}·|·Options])</code></a>,·otherwise·it·is·equivalent·to1217 <a·href="#new/1"><code·class="inline">new([{size,·Size}·|·Options])</code></a>,·otherwise·it·is·equivalent·to
1218 <a·href="#new/1"><code·class="inline">new([{size,·Size}·|·[Options]])</code></a>.·However,·using·this·function1218 <a·href="#new/1"><code·class="inline">new([{size,·Size}·|·[Options]])</code></a>.·However,·using·this·function
1219 directly·is·more·efficient.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="1560728117-1">(</span><span·class="mi">100</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1560728117-2">{</span><span·class="ss">default</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·68,·SHA:·d4e54e879d213403d79d492460c27167ad83954ae189db5ea1844c21b9018048·...·]-1">)</span></code></pre><p>creates·a·fixed-size·array·of·size·100,·whose·default·value·is·<code·class="inline">0</code>.</p><p>See·also·<a·href="#new/1"><code·class="inline">new/1</code></a>.</p>1219 directly·is·more·efficient.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">array</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="8415899020-1">(</span><span·class="mi">100</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8415899020-2">{</span><span·class="ss">default</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·68,·SHA:·85c8226a3dbe9971d9ffe494cbcd94c8f1b0a2495283011efc8a6c49cbde3a32·...·]-1">)</span></code></pre><p>creates·a·fixed-size·array·of·size·100,·whose·default·value·is·<code·class="inline">0</code>.</p><p>See·also·<a·href="#new/1"><code·class="inline">new/1</code></a>.</p>
1220 ··</section>1220 ··</section>
1221 </section>1221 </section>
1222 <section·class="detail"·id="relax/1">1222 <section·class="detail"·id="relax/1">
  
1223 ··<div·class="detail-header">1223 ··<div·class="detail-header">
1224 ····<a·href="#relax/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1224 ····<a·href="#relax/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1225 ······<i·class="ri-link-m"·aria-hidden="true"></i>1225 ······<i·class="ri-link-m"·aria-hidden="true"></i>
7.27 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/assert_hrl.html
    
Offset 128, 15 lines modifiedOffset 128, 15 lines modified
128 <p>Assert·macros.</p><h2·id="description"·class="section-heading">128 <p>Assert·macros.</p><h2·id="description"·class="section-heading">
129 ··<a·href="#description"·class="hover-link">129 ··<a·href="#description"·class="hover-link">
130 ····<i·class="ri-link-m"·aria-hidden="true"></i>130 ····<i·class="ri-link-m"·aria-hidden="true"></i>
131 ··</a>131 ··</a>
132 ··<span·class="text">Description</span>132 ··<span·class="text">Description</span>
133 </h2>133 </h2>
134 <p>The·include·file·<code·class="inline">assert.hrl</code>·provides·macros·for·inserting·assertions·in·your134 <p>The·include·file·<code·class="inline">assert.hrl</code>·provides·macros·for·inserting·assertions·in·your
135 program·code.</p><p>Include·the·following·directive·in·the·module·from·which·the·function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6307943228-1">(</span><span·class="s">&quot;stdlib/include/assert.hrl&quot;</span><span·class="p"·data-group-id="6307943228-1">)</span><span·class="p">.</span></code></pre><p>When·an·assertion·succeeds,·the·assert·macro·yields·the·atom·<code·class="inline">ok</code>.·When·an135 program·code.</p><p>Include·the·following·directive·in·the·module·from·which·the·function·is·called:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="6229817539-1">(</span><span·class="s">&quot;stdlib/include/assert.hrl&quot;</span><span·class="p"·data-group-id="6229817539-1">)</span><span·class="p">.</span></code></pre><p>When·an·assertion·succeeds,·the·assert·macro·yields·the·atom·<code·class="inline">ok</code>.·When·an
136 assertion·fails,·an·exception·of·type·<code·class="inline">error</code>·is·generated.·The·associated·error136 assertion·fails,·an·exception·of·type·<code·class="inline">error</code>·is·generated.·The·associated·error
137 term·has·the·form·<code·class="inline">{Macro,·Info}</code>.·<code·class="inline">Macro</code>·is·the·macro·name,·for·example,137 term·has·the·form·<code·class="inline">{Macro,·Info}</code>.·<code·class="inline">Macro</code>·is·the·macro·name,·for·example,
138 <code·class="inline">assertEqual</code>.·<code·class="inline">Info</code>·is·a·list·of·tagged·values,·such·as138 <code·class="inline">assertEqual</code>.·<code·class="inline">Info</code>·is·a·list·of·tagged·values,·such·as
139 <code·class="inline">[{module,·M},·{line,·L},·...]</code>,·which·gives·more·information·about·the·location139 <code·class="inline">[{module,·M},·{line,·L},·...]</code>,·which·gives·more·information·about·the·location
140 and·cause·of·the·exception.·All·entries·in·the·<code·class="inline">Info</code>·list·are·optional;·do·not140 and·cause·of·the·exception.·All·entries·in·the·<code·class="inline">Info</code>·list·are·optional;·do·not
141 rely·programmatically·on·any·of·them·being·present.</p><p>Each·assert·macro·has·a·corresponding·version·with·an·extra·argument,·for·adding141 rely·programmatically·on·any·of·them·being·present.</p><p>Each·assert·macro·has·a·corresponding·version·with·an·extra·argument,·for·adding
142 comments·to·assertions.·These·can·for·example·be·printed·as·part·of·error142 comments·to·assertions.·These·can·for·example·be·printed·as·part·of·error
Offset 156, 15 lines modifiedOffset 156, 15 lines modified
156 ····<i·class="ri-link-m"·aria-hidden="true"></i>156 ····<i·class="ri-link-m"·aria-hidden="true"></i>
157 ··</a>157 ··</a>
158 ··<span·class="text">Macros</span>158 ··<span·class="text">Macros</span>
159 </h2>159 </h2>
160 <ul><li><p><strong><code·class="inline">assert(BoolExpr)</code></strong></p></li><li><p><strong><code·class="inline">assert(BoolExpr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">BoolExpr</code>·completes·normally160 <ul><li><p><strong><code·class="inline">assert(BoolExpr)</code></strong></p></li><li><p><strong><code·class="inline">assert(BoolExpr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">BoolExpr</code>·completes·normally
161 returning·<code·class="inline">true</code>.</p></li><li><p><strong><code·class="inline">assertNot(BoolExpr)</code></strong></p></li><li><p><strong><code·class="inline">assertNot(BoolExpr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">BoolExpr</code>·completes·normally161 returning·<code·class="inline">true</code>.</p></li><li><p><strong><code·class="inline">assertNot(BoolExpr)</code></strong></p></li><li><p><strong><code·class="inline">assertNot(BoolExpr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">BoolExpr</code>·completes·normally
162 returning·<code·class="inline">false</code>.</p></li><li><p><strong><code·class="inline">assertMatch(GuardedPattern,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertMatch(GuardedPattern,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>·completes162 returning·<code·class="inline">false</code>.</p></li><li><p><strong><code·class="inline">assertMatch(GuardedPattern,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertMatch(GuardedPattern,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>·completes
163 normally·yielding·a·value·that·matches·<code·class="inline">GuardedPattern</code>,·for·example:</p><pre><code·class="text">?assertMatch({bork,·_},·f())</code></pre><p>Notice·that·a·guard·<code·class="inline">when·...</code>·can·be·included:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">?</span><span·class="nf">assertMatch</span><span·class="p"·data-group-id="6394881216-1">(</span><span·class="p"·data-group-id="6394881216-2">{</span><span·class="ss">bork</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="6394881216-2">}</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·391,·SHA:·88aad3fafa87e7d5cfbd988f8648f52e052e1c8edad5851735fb1d47b9cc2481·...·]-1">)</span></code></pre></li><li><p><strong><code·class="inline">assertNotMatch(GuardedPattern,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertNotMatch(GuardedPattern,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>163 normally·yielding·a·value·that·matches·<code·class="inline">GuardedPattern</code>,·for·example:</p><pre><code·class="text">?assertMatch({bork,·_},·f())</code></pre><p>Notice·that·a·guard·<code·class="inline">when·...</code>·can·be·included:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">?</span><span·class="nf">assertMatch</span><span·class="p"·data-group-id="1597967258-1">(</span><span·class="p"·data-group-id="1597967258-2">{</span><span·class="ss">bork</span><span·class="p">,</span><span·class="w">·</span><span·class="n">X</span><span·class="p"·data-group-id="1597967258-2">}</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·391,·SHA:·ea5e5bbd550a05ae4b2bea4a9398d23c2363b227b4367d531883a72105adb49d·...·]-1">)</span></code></pre></li><li><p><strong><code·class="inline">assertNotMatch(GuardedPattern,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertNotMatch(GuardedPattern,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>
164 completes·normally·yielding·a·value·that·does·not·match·<code·class="inline">GuardedPattern</code>.</p><p>As·in·<code·class="inline">assertMatch</code>,·<code·class="inline">GuardedPattern</code>·can·have·a·<code·class="inline">when</code>·part.</p></li><li><p><strong><code·class="inline">assertEqual(ExpectedValue,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertEqual(ExpectedValue,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>·completes164 completes·normally·yielding·a·value·that·does·not·match·<code·class="inline">GuardedPattern</code>.</p><p>As·in·<code·class="inline">assertMatch</code>,·<code·class="inline">GuardedPattern</code>·can·have·a·<code·class="inline">when</code>·part.</p></li><li><p><strong><code·class="inline">assertEqual(ExpectedValue,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertEqual(ExpectedValue,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>·completes
165 normally·yielding·a·value·that·is·exactly·equal·to·<code·class="inline">ExpectedValue</code>.</p></li><li><p><strong><code·class="inline">assertNotEqual(ExpectedValue,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertNotEqual(ExpectedValue,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>165 normally·yielding·a·value·that·is·exactly·equal·to·<code·class="inline">ExpectedValue</code>.</p></li><li><p><strong><code·class="inline">assertNotEqual(ExpectedValue,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertNotEqual(ExpectedValue,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>
166 completes·normally·yielding·a·value·that·is·not·exactly·equal·to166 completes·normally·yielding·a·value·that·is·not·exactly·equal·to
167 <code·class="inline">ExpectedValue</code>.</p></li><li><p><strong><code·class="inline">assertException(Class,·Term,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertException(Class,·Term,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>167 <code·class="inline">ExpectedValue</code>.</p></li><li><p><strong><code·class="inline">assertException(Class,·Term,·Expr)</code></strong></p></li><li><p><strong><code·class="inline">assertException(Class,·Term,·Expr,·Comment)</code></strong>·-·Tests·that·<code·class="inline">Expr</code>
168 completes·abnormally·with·an·exception·of·type·<code·class="inline">Class</code>·and·with·the·associated168 completes·abnormally·with·an·exception·of·type·<code·class="inline">Class</code>·and·with·the·associated
169 <code·class="inline">Term</code>.·The·assertion·fails·if·<code·class="inline">Expr</code>·raises·a·different·exception·or·if·it169 <code·class="inline">Term</code>.·The·assertion·fails·if·<code·class="inline">Expr</code>·raises·a·different·exception·or·if·it
170 completes·normally·returning·any·value.</p><p>Notice·that·both·<code·class="inline">Class</code>·and·<code·class="inline">Term</code>·can·be·guarded·patterns,·as·in170 completes·normally·returning·any·value.</p><p>Notice·that·both·<code·class="inline">Class</code>·and·<code·class="inline">Term</code>·can·be·guarded·patterns,·as·in
8.39 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/base64.html
    
Offset 667, 23 lines modifiedOffset 667, 23 lines modified
667 ····················Data·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>667 ····················Data·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>
  
668 ······</div>668 ······</div>
  
669 <p>Decodes·a·base64·string·encoded·using·the·standard·alphabet·according·to669 <p>Decodes·a·base64·string·encoded·using·the·standard·alphabet·according·to
670 <a·href="https://datatracker.ietf.org/doc/html/rfc4648#section-4">RFC·4648·Section·4</a>·to670 <a·href="https://datatracker.ietf.org/doc/html/rfc4648#section-4">RFC·4648·Section·4</a>·to
671 plain·ASCII.</p><p>The·function·will·strips·away·any·whitespace·characters·and·check·for·the671 plain·ASCII.</p><p>The·function·will·strips·away·any·whitespace·characters·and·check·for·the
672 the·correct·number·of·<code·class="inline">=</code>·padding·characters·at·the·end·of·the·encoded·string.</p><p>See·<a·href="#t:decode_options/0"><code·class="inline">decode_options/0</code></a>·for·details·on·which·options·can·be·passed.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="7270129945-1">(</span><span·class="s">&quot;AQIDBA==&quot;</span><span·class="p"·data-group-id="7270129945-1">)</span><span·class="p">.</span><span·class="w">672 the·correct·number·of·<code·class="inline">=</code>·padding·characters·at·the·end·of·the·encoded·string.</p><p>See·<a·href="#t:decode_options/0"><code·class="inline">decode_options/0</code></a>·for·details·on·which·options·can·be·passed.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="4276117087-1">(</span><span·class="s">&quot;AQIDBA==&quot;</span><span·class="p"·data-group-id="4276117087-1">)</span><span·class="p">.</span><span·class="w">
673 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">673 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
674 2&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="7270129945-2">(</span><span·class="s">&quot;AQ·ID·BA==&quot;</span><span·class="p"·data-group-id="7270129945-2">)</span><span·class="p">.</span><span·class="w">674 2&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="4276117087-2">(</span><span·class="s">&quot;AQ·ID·BA==&quot;</span><span·class="p"·data-group-id="4276117087-2">)</span><span·class="p">.</span><span·class="w">
675 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">675 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
676 3&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="7270129945-3">(</span><span·class="s">&quot;AQIDBA=&quot;</span><span·class="p"·data-group-id="7270129945-3">)</span><span·class="p">.</span><span·class="w">676 3&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="4276117087-3">(</span><span·class="s">&quot;AQIDBA=&quot;</span><span·class="p"·data-group-id="4276117087-3">)</span><span·class="p">.</span><span·class="w">
677 </span><span·class="gt">**·exception·error:·missing_padding677 </span><span·class="gt">**·exception·error:·missing_padding
678 ·····in·function··base64:decode_list/7·(base64.erl,·line·734)678 ·····in·function··base64:decode_list/7·(base64.erl,·line·734)
679 ········***·data·to·decode·is·missing·final·=·padding·characters,·if·this·is·intended,·use·the·`padding·=&gt;·false`·option</span><span·class="gp·unselectable">679 ········***·data·to·decode·is·missing·final·=·padding·characters,·if·this·is·intended,·use·the·`padding·=&gt;·false`·option</span><span·class="gp·unselectable">
680 4&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="7270129945-4">(</span><span·class="s">&quot;AQIDBA=&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7270129945-5">#{</span><span·class="w">·</span><span·class="ss">padding</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·188,·SHA:·b3f5eb3d2fcbc5968ef19964a12b149db2f9acf285e2065e245b7fb801b27b50·...·]-4">)</span><span·class="p">.</span><span·class="w">680 4&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="4276117087-4">(</span><span·class="s">&quot;AQIDBA=&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4276117087-5">#{</span><span·class="w">·</span><span·class="ss">padding</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·188,·SHA:·cc144ba50c17c19b37c7f18ced3ca0e6a0ceb36f9949315e77a2f9a36f63c426·...·]-4">)</span><span·class="p">.</span><span·class="w">
681 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span></code></pre>681 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span></code></pre>
682 ··</section>682 ··</section>
683 </section>683 </section>
684 <section·class="detail"·id="decode_to_string/1">684 <section·class="detail"·id="decode_to_string/1">
  
685 ··<div·class="detail-header">685 ··<div·class="detail-header">
686 ····<a·href="#decode_to_string/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">686 ····<a·href="#decode_to_string/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 930, 17 lines modifiedOffset 930, 17 lines modified
930 ·························Data·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>930 ·························Data·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>
  
931 ······</div>931 ······</div>
  
932 <p>Decodes·a·base64·&quot;mime&quot;·string·encoded·using·the·standard·alphabet·according·to932 <p>Decodes·a·base64·&quot;mime&quot;·string·encoded·using·the·standard·alphabet·according·to
933 <a·href="https://datatracker.ietf.org/doc/html/rfc4648#section-4">RFC·4648·Section·4</a>·to933 <a·href="https://datatracker.ietf.org/doc/html/rfc4648#section-4">RFC·4648·Section·4</a>·to
934 plain·ASCII.</p><p>The·function·will·strips·away·any·illegal·characters.·It·does·<em>not</em>·check·for·the934 plain·ASCII.</p><p>The·function·will·strips·away·any·illegal·characters.·It·does·<em>not</em>·check·for·the
935 the·correct·number·of·<code·class="inline">=</code>·padding·characters·at·the·end·of·the·encoded·string.</p><p>See·<a·href="#t:decode_options/0"><code·class="inline">decode_options/0</code></a>·for·details·on·which·options·can·be·passed.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">mime_decode</span><span·class="p"·data-group-id="3989962208-1">(</span><span·class="s">&quot;AQIDBA==&quot;</span><span·class="p"·data-group-id="3989962208-1">)</span><span·class="p">.</span><span·class="w">935 the·correct·number·of·<code·class="inline">=</code>·padding·characters·at·the·end·of·the·encoded·string.</p><p>See·<a·href="#t:decode_options/0"><code·class="inline">decode_options/0</code></a>·for·details·on·which·options·can·be·passed.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">mime_decode</span><span·class="p"·data-group-id="9324501173-1">(</span><span·class="s">&quot;AQIDBA==&quot;</span><span·class="p"·data-group-id="9324501173-1">)</span><span·class="p">.</span><span·class="w">
936 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">936 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
937 2&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">mime_decode</span><span·class="p"·data-group-id="3989962208-2">(</span><span·class="s">&quot;AQIDB=A=&quot;</span><span·class="p"·data-group-id="3989962208-2">)</span><span·class="p">.</span><span·class="w">937 2&gt;·</span><span·class="nc">base64</span><span·class="p">:</span><span·class="nf">mime_decode</span><span·class="p"·data-group-id="9324501173-2">(</span><span·class="s">&quot;AQIDB=A=&quot;</span><span·class="p"·data-group-id="9324501173-2">)</span><span·class="p">.</span><span·class="w">
938 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span></code></pre>938 </span><span·class="p">&lt;&lt;</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">&gt;&gt;</span></code></pre>
939 ··</section>939 ··</section>
940 </section>940 </section>
941 <section·class="detail"·id="mime_decode_to_string/1">941 <section·class="detail"·id="mime_decode_to_string/1">
  
942 ··<div·class="detail-header">942 ··<div·class="detail-header">
943 ····<a·href="#mime_decode_to_string/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">943 ····<a·href="#mime_decode_to_string/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
25.3 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/beam_lib.html
    
Offset 147, 16 lines modifiedOffset 147, 16 lines modified
147 <a·href="#strip_files/1"><code·class="inline">strip_files/1</code></a>,·and/or·<a·href="#strip_release/1"><code·class="inline">strip_release/1</code></a>.</p><h2·id="module-reconstruct-source-code"·class="section-heading">147 <a·href="#strip_files/1"><code·class="inline">strip_files/1</code></a>,·and/or·<a·href="#strip_release/1"><code·class="inline">strip_release/1</code></a>.</p><h2·id="module-reconstruct-source-code"·class="section-heading">
148 ··<a·href="#module-reconstruct-source-code"·class="hover-link">148 ··<a·href="#module-reconstruct-source-code"·class="hover-link">
149 ····<i·class="ri-link-m"·aria-hidden="true"></i>149 ····<i·class="ri-link-m"·aria-hidden="true"></i>
150 ··</a>150 ··</a>
151 ··<span·class="text">Reconstruct·Source·Code</span>151 ··<span·class="text">Reconstruct·Source·Code</span>
152 </h2>152 </h2>
153 <p>The·following·example·shows·how·to·reconstruct·Erlang·source·code·from·the·debug153 <p>The·following·example·shows·how·to·reconstruct·Erlang·source·code·from·the·debug
154 information·in·a·BEAM·file·<code·class="inline">Beam</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5618750135-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5618750135-2">{</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="5618750135-3">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·921,·SHA:·7b55a90867e06a3b93cb14f84b82f7fc44015c728e5272624e34dfa8b11c7f92·...·]-6">)</span><span·class="p">.</span><span·class="w">154 information·in·a·BEAM·file·<code·class="inline">Beam</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4210506330-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4210506330-2">{</span><span·class="p">_</span><span·class="p">,</span><span·class="p"·data-group-id="4210506330-3">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·921,·SHA:·258dee0696fbf6614102a5775690d3440231094e106a8c6e9dc985a0d8880e93·...·]-6">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="5618750135-8">(</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5618750135-9">[</span><span·class="nc">erl_pr[·...·truncated·by·diffoscope;·len:·493,·SHA:·c7980f1fcdcf4960ad4526642661a8d43652739dd2dc3ed9e3bf5064bf2643e0·...·]-8">)</span><span·class="p">.</span></code></pre><h2·id="module-encrypted-debug-information"·class="section-heading">155 </span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="4210506330-8">(</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4210506330-9">[</span><span·class="nc">erl_pr[·...·truncated·by·diffoscope;·len:·493,·SHA:·1ad07f0a29d60538f47f7f54541804ad1ad709222a4b799220e921f9e74afee2·...·]-8">)</span><span·class="p">.</span></code></pre><h2·id="module-encrypted-debug-information"·class="section-heading">
156 ··<a·href="#module-encrypted-debug-information"·class="hover-link">156 ··<a·href="#module-encrypted-debug-information"·class="hover-link">
157 ····<i·class="ri-link-m"·aria-hidden="true"></i>157 ····<i·class="ri-link-m"·aria-hidden="true"></i>
158 ··</a>158 ··</a>
159 ··<span·class="text">Encrypted·Debug·Information</span>159 ··<span·class="text">Encrypted·Debug·Information</span>
160 </h2>160 </h2>
161 <p>The·debug·information·can·be·encrypted·to·keep·the·source·code·secret,·but·still161 <p>The·debug·information·can·be·encrypted·to·keep·the·source·code·secret,·but·still
162 be·able·to·use·tools·such·as·Debugger·or·Xref.</p><p>To·use·encrypted·debug·information,·a·key·must·be·provided·to·the·compiler·and162 be·able·to·use·tools·such·as·Debugger·or·Xref.</p><p>To·use·encrypted·debug·information,·a·key·must·be·provided·to·the·compiler·and
Offset 178, 21 lines modifiedOffset 178, 21 lines modified
178 ··</a>178 ··</a>
179 ··<span·class="text">.erlang.crypt</span>179 ··<span·class="text">.erlang.crypt</span>
180 </h2>180 </h2>
181 <p><code·class="inline">beam_lib</code>·searches·for·<code·class="inline">.erlang.crypt</code>·in·the·current·directory,·then·the181 <p><code·class="inline">beam_lib</code>·searches·for·<code·class="inline">.erlang.crypt</code>·in·the·current·directory,·then·the
182 <a·href="../../../../erts-15.0.1/doc/html/init.html#home">user's·home·directory</a>·and·then182 <a·href="../../../../erts-15.0.1/doc/html/init.html#home">user's·home·directory</a>·and·then
183 <a·href="filename.html#user_config"><code·class="inline">filename:basedir(user_config,·&quot;erlang&quot;)</code></a>.·If·the183 <a·href="filename.html#user_config"><code·class="inline">filename:basedir(user_config,·&quot;erlang&quot;)</code></a>.·If·the
184 file·is·found·and·contains·a·key,·<code·class="inline">beam_lib</code>·implicitly·creates·a·crypto·key·fun184 file·is·found·and·contains·a·key,·<code·class="inline">beam_lib</code>·implicitly·creates·a·crypto·key·fun
185 and·registers·it.</p><p>File·<code·class="inline">.erlang.crypt</code>·is·to·contain·a·single·list·of·tuples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0317833523-1">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·67,·SHA:·ea42578cc7273ceba5c13f7de2fbe4f19eb2cfa029727636874e88ddae62b392·...·]-1">}</span></code></pre><p><code·class="inline">Mode</code>·is·the·type·of·crypto·algorithm;·currently,·the·only·allowed·value·is185 and·registers·it.</p><p>File·<code·class="inline">.erlang.crypt</code>·is·to·contain·a·single·list·of·tuples:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8052101206-1">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·67,·SHA:·ac20721ef6a0dd4c1efc6bb7a49fb350368ccf48de724b274fb34e671225bacd·...·]-1">}</span></code></pre><p><code·class="inline">Mode</code>·is·the·type·of·crypto·algorithm;·currently,·the·only·allowed·value·is
186 <code·class="inline">des3_cbc</code>.·<code·class="inline">Module</code>·is·either·an·atom,·in·which·case·<code·class="inline">Key</code>·is·only·used·for·the186 <code·class="inline">des3_cbc</code>.·<code·class="inline">Module</code>·is·either·an·atom,·in·which·case·<code·class="inline">Key</code>·is·only·used·for·the
187 module·<code·class="inline">Module</code>,·or·<code·class="inline">[]</code>,·in·which·case·<code·class="inline">Key</code>·is·used·for·all·modules.·<code·class="inline">Key</code>·is187 module·<code·class="inline">Module</code>,·or·<code·class="inline">[]</code>,·in·which·case·<code·class="inline">Key</code>·is·used·for·all·modules.·<code·class="inline">Key</code>·is
188 the·non-empty·key·string.</p><p><code·class="inline">Key</code>·in·the·first·tuple·where·both·<code·class="inline">Mode</code>·and·<code·class="inline">Module</code>·match·is·used.</p><p>The·following·is·an·example·of·an·<code·class="inline">.erlang.crypt</code>·file·that·returns·the·same·key188 the·non-empty·key·string.</p><p><code·class="inline">Key</code>·in·the·first·tuple·where·both·<code·class="inline">Mode</code>·and·<code·class="inline">Module</code>·match·is·used.</p><p>The·following·is·an·example·of·an·<code·class="inline">.erlang.crypt</code>·file·that·returns·the·same·key
189 for·all·modules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4888106437-1">[</span><span·class="p"·data-group-id="4888106437-2">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">des3_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·303,·SHA:·9bcb8d6569ebd89339bcfc6b48960fc94a340f1d52fecb6111b71f4ae55d6f20·...·]-1">]</span><span·class="p">.</span></code></pre><p>The·following·is·a·slightly·more·complicated·example·of·an·<code·class="inline">.erlang.crypt</code>189 for·all·modules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9773643645-1">[</span><span·class="p"·data-group-id="9773643645-2">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">des3_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·303,·SHA:·2d8f64fcdb4b9edd867ded33a586f11a91e7300cfd70221e9abc649f4f5bd14b·...·]-1">]</span><span·class="p">.</span></code></pre><p>The·following·is·a·slightly·more·complicated·example·of·an·<code·class="inline">.erlang.crypt</code>
190 providing·one·key·for·module·<code·class="inline">t</code>·and·another·key·for·all·other·modules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2290216176-1">[</span><span·class="p"·data-group-id="2290216176-2">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">des3_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">t<[·...·truncated·by·diffoscope;·len:·136,·SHA:·d911c516cf5e583aaf7d0ab50b2658e93c1869e7e0c36391cf323321a060aa08·...·]-2">}</span><span·class="p">,</span><span·class="w">190 providing·one·key·for·module·<code·class="inline">t</code>·and·another·key·for·all·other·modules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1223584252-1">[</span><span·class="p"·data-group-id="1223584252-2">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">des3_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">t<[·...·truncated·by·diffoscope;·len:·136,·SHA:·faf4c7602d9029f1c847a8746c4ef86b9a1b9a2ebc964a01481ce927018de2dd·...·]-2">}</span><span·class="p">,</span><span·class="w">
191 ·</span><span·class="p"·data-group-id="2290216176-3">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">des3_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2290216176-4">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·250,·SHA:·58825228da2a28f99188aa56c17d53de818cc385e83b0bb615ad08f31f60bdcb·...·]-1">]</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>Do·not·use·any·of·the·keys·in·these·examples.·Use·your·own·keys.</p></blockquote>191 ·</span><span·class="p"·data-group-id="1223584252-3">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">des3_cbc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1223584252-4">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·250,·SHA:·b9b6404001bf932d1b80797be193bcc91b413f561322ec7021b91ed74148a52c·...·]-1">]</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>Do·not·use·any·of·the·keys·in·these·examples.·Use·your·own·keys.</p></blockquote>
192 ····</section>192 ····</section>
  
193 </div>193 </div>
  
194 ··<section·id="summary"·class="details-list">194 ··<section·id="summary"·class="details-list">
195 ····<h1·class="section-heading">195 ····<h1·class="section-heading">
196 ······<a·class="hover-link"·href="#summary">196 ······<a·class="hover-link"·href="#summary">
Offset 1552, 19 lines modifiedOffset 1552, 19 lines modified
1552 ························when·CryptoKeyFun·::·<a·href="#t:crypto_fun/0">crypto_fun</a>(),·Reason·::·badfun·|·exists·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1552 ························when·CryptoKeyFun·::·<a·href="#t:crypto_fun/0">crypto_fun</a>(),·Reason·::·badfun·|·exists·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1553 ······</div>1553 ······</div>
  
1554 <p>Registers·an·unary·fun·that·is·called·if·<code·class="inline">beam_lib</code>·must·read·an·<code·class="inline">debug_info</code>1554 <p>Registers·an·unary·fun·that·is·called·if·<code·class="inline">beam_lib</code>·must·read·an·<code·class="inline">debug_info</code>
1555 chunk·that·has·been·encrypted.·The·fun·is·held·in·a·process·that·is·started·by1555 chunk·that·has·been·encrypted.·The·fun·is·held·in·a·process·that·is·started·by
1556 the·function.</p><p>If·a·fun·is·already·registered·when·attempting·to·register·a·fun,1556 the·function.</p><p>If·a·fun·is·already·registered·when·attempting·to·register·a·fun,
1557 <code·class="inline">{error,·exists}</code>·is·returned.</p><p>The·fun·must·handle·the·following·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">CryptoKeyFun</span><span·class="p"·data-group-id="0156000184-1">(</span><span·class="ss">init</span><span·class="p"·data-group-id="0156000184-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span><sp[·...·truncated·by·diffoscope;·len:·509,·SHA:·fdfa76187d4703101d34ef30c33ac7f9d6bce13ebcc5e1bf125eb157d4ee5b57·...·]-3">}</span></code></pre><p>Called·when·the·fun·is·registered,·in·the·process·that·holds·the·fun.·Here·the1557 <code·class="inline">{error,·exists}</code>·is·returned.</p><p>The·fun·must·handle·the·following·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">CryptoKeyFun</span><span·class="p"·data-group-id="1208295530-1">(</span><span·class="ss">init</span><span·class="p"·data-group-id="1208295530-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">|</span><sp[·...·truncated·by·diffoscope;·len:·509,·SHA:·77015be419d19041db5dce505926b0d14850450b4a3efdb5df9b0594876e7232·...·]-3">}</span></code></pre><p>Called·when·the·fun·is·registered,·in·the·process·that·holds·the·fun.·Here·the
1558 crypto·key·fun·can·do·any·necessary·initializations.·If·<code·class="inline">{ok,·NewCryptoKeyFun}</code>1558 crypto·key·fun·can·do·any·necessary·initializations.·If·<code·class="inline">{ok,·NewCryptoKeyFun}</code>
1559 is·returned,·<code·class="inline">NewCryptoKeyFun</code>·is·registered·instead·of·<code·class="inline">CryptoKeyFun</code>.·If1559 is·returned,·<code·class="inline">NewCryptoKeyFun</code>·is·registered·instead·of·<code·class="inline">CryptoKeyFun</code>.·If
1560 <code·class="inline">{error,·Term}</code>·is·returned,·the·registration·is·aborted·and1560 <code·class="inline">{error,·Term}</code>·is·returned,·the·registration·is·aborted·and
1561 <a·href="#crypto_key_fun/1"><code·class="inline">crypto_key_fun/1</code></a>·also·returns·<code·class="inline">{error,·Term}</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">CryptoKeyFun</span><span·class="p"·data-group-id="4485277376-1">(</span><span·class="p"·data-group-id="4485277376-2">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</[·...·truncated·by·diffoscope;·len:·178,·SHA:·aebdb8785a3e6c12acc99b3bcb50bca383ef1a7b7e74aa6fb7245fed739fc7a6·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Key</span></code></pre><p>Called·when·the·key·is·needed·for·module·<code·class="inline">Module</code>·in·the·file·named·<code·class="inline">Filename</code>.1561 <a·href="#crypto_key_fun/1"><code·class="inline">crypto_key_fun/1</code></a>·also·returns·<code·class="inline">{error,·Term}</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">CryptoKeyFun</span><span·class="p"·data-group-id="7504628109-1">(</span><span·class="p"·data-group-id="7504628109-2">{</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</[·...·truncated·by·diffoscope;·len:·178,·SHA:·a6c44295a6d0813557118be7262fd1ca426f5584d6f81b128df4016951533c90·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Key</span></code></pre><p>Called·when·the·key·is·needed·for·module·<code·class="inline">Module</code>·in·the·file·named·<code·class="inline">Filename</code>.
1562 <code·class="inline">Mode</code>·is·the·type·of·crypto·algorithm;·currently,·the·only·possible·value·is1562 <code·class="inline">Mode</code>·is·the·type·of·crypto·algorithm;·currently,·the·only·possible·value·is
1563 <code·class="inline">des3_cbc</code>.·The·call·is·to·fail·(raise·an·exception)·if·no·key·is·available.</p><pre><code·class="text">CryptoKeyFun(clear)·-&gt;·term()</code></pre><p>Called·before·the·fun·is·unregistered.·Here·any·cleaning·up·can·be·done.·The1563 <code·class="inline">des3_cbc</code>.·The·call·is·to·fail·(raise·an·exception)·if·no·key·is·available.</p><pre><code·class="text">CryptoKeyFun(clear)·-&gt;·term()</code></pre><p>Called·before·the·fun·is·unregistered.·Here·any·cleaning·up·can·be·done.·The
1564 return·value·is·not·important,·but·is·passed·back·to·the·caller·of1564 return·value·is·not·important,·but·is·passed·back·to·the·caller·of
1565 <a·href="#clear_crypto_key_fun/0"><code·class="inline">clear_crypto_key_fun/0</code></a>·as·part·of·its·return·value.</p>1565 <a·href="#clear_crypto_key_fun/0"><code·class="inline">clear_crypto_key_fun/0</code></a>·as·part·of·its·return·value.</p>
1566 ··</section>1566 ··</section>
1567 </section>1567 </section>
1568 <section·class="detail"·id="diff_dirs/2">1568 <section·class="detail"·id="diff_dirs/2">
Offset 1923, 22 lines modifiedOffset 1923, 22 lines modified
  
1923 ······</div>1923 ······</div>
  
1924 <p>Returns·the·module·version·or·versions.·A·version·is·defined·by·module·attribute1924 <p>Returns·the·module·version·or·versions.·A·version·is·defined·by·module·attribute
1925 <code·class="inline">-vsn(Vsn)</code>.</p><p>If·this·attribute·is·not·specified,·the·version·defaults·to·the1925 <code·class="inline">-vsn(Vsn)</code>.</p><p>If·this·attribute·is·not·specified,·the·version·defaults·to·the
1926 checksum·of·the·module.·Notice·that·if·version·<code·class="inline">Vsn</code>·is·not·a·list,·it·is·made1926 checksum·of·the·module.·Notice·that·if·version·<code·class="inline">Vsn</code>·is·not·a·list,·it·is·made
1927 into·one,·that·is·<code·class="inline">{ok,{Module,[Vsn]}}</code>·is·returned.·If·there·are·many·<code·class="inline">-vsn</code>1927 into·one,·that·is·<code·class="inline">{ok,{Module,[Vsn]}}</code>·is·returned.·If·there·are·many·<code·class="inline">-vsn</code>
1928 module·attributes,·the·result·is·the·concatenated·list·of·versions.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="8266499300-1">(</span><span·class="ss">a</span><span·class="p"·data-group-id="8266499300-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·-vsn(1).</span><span·class="w">1928 module·attributes,·the·result·is·the·concatenated·list·of·versions.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="3539097336-1">(</span><span·class="ss">a</span><span·class="p"·data-group-id="3539097336-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·-vsn(1).</span><span·class="w">
1929 </span><span·class="p"·data-group-id="8266499300-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-4">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·143,·SHA:·49ad2fc5279942fdd95169f17577f022a0392d0f88b0fc1b9ddddc62d412fe2d·...·]-2">}</span><span·class="gp·unselectable">1929 </span><span·class="p"·data-group-id="3539097336-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-4">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·143,·SHA:·ef23c3deec645fd9a20744dfce19fa50149b24b66d4e11302f9a3ebcd38cb647·...·]-2">}</span><span·class="gp·unselectable">
1930 2&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="8266499300-5">(</span><span·class="ss">b</span><span·class="p"·data-group-id="8266499300-5">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·-vsn([1]).</span><span·class="w">1930 2&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="3539097336-5">(</span><span·class="ss">b</span><span·class="p"·data-group-id="3539097336-5">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·-vsn([1]).</span><span·class="w">
1931 </span><span·class="p"·data-group-id="8266499300-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-7">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-8">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·143,·SHA:·77fed5f8cd37684d662b68475700feb8207bfc56df0fcaac3d2f911c5a00e575·...·]-6">}</span><span·class="gp·unselectable">1931 </span><span·class="p"·data-group-id="3539097336-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-7">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-8">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·143,·SHA:·a1bffffbc8736a23aea83a1b42b9785d1d8a67e74fc5509a4004b7d2cc084504·...·]-6">}</span><span·class="gp·unselectable">
1932 3&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="8266499300-9">(</span><span·class="ss">c</span><span·class="p"·data-group-id="8266499300-9">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·-vsn([1]).·-vsn(2).</span><span·class="w">1932 3&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="3539097336-9">(</span><span·class="ss">c</span><span·class="p"·data-group-id="3539097336-9">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·-vsn([1]).·-vsn(2).</span><span·class="w">
1933 </span><span·class="p"·data-group-id="8266499300-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-11">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-12">[</span><span·class="mi">1</span><[·...·truncated·by·diffoscope;·len:·197,·SHA:·8832c2b51acd105152e8a45a22e337b83b28b93966b89e5eb64ed795ca11b4c0·...·]-10">}</span><span·class="gp·unselectable">1933 </span><span·class="p"·data-group-id="3539097336-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-11">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-12">[</span><span·class="mi">1</span><[·...·truncated·by·diffoscope;·len:·197,·SHA:·5d763681b928b0d34e59993768a27be034417b774563891713845894dcd58c15·...·]-10">}</span><span·class="gp·unselectable">
1934 4&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="8266499300-13">(</span><span·class="ss">d</span><span·class="p"·data-group-id="8266499300-13">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·no·-vsn·attribute</span><span·class="w">1934 4&gt;·</span><span·class="nc">beam_lib</span><span·class="p">:</span><span·class="nf">version</span><span·class="p"·data-group-id="3539097336-13">(</span><span·class="ss">d</span><span·class="p"·data-group-id="3539097336-13">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·no·-vsn·attribute</span><span·class="w">
1935 </span><span·class="p"·data-group-id="8266499300-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-15">{</span><span·class="ss">d</span><span·class="p">,</span><span·class="p"·data-group-id="8266499300-16">[</span><span·class="mi">275613208[·...·truncated·by·diffoscope;·len:·186,·SHA:·378564d3f34787080dc01d031d0e266b5f263b200fb94e739c1fd075d12b08ca·...·]-14">}</span></code></pre>1935 </span><span·class="p"·data-group-id="3539097336-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-15">{</span><span·class="ss">d</span><span·class="p">,</span><span·class="p"·data-group-id="3539097336-16">[</span><span·class="mi">275613208[·...·truncated·by·diffoscope;·len:·186,·SHA:·8c37b469abfb1a6cf33df7745fe17f977bc46d6aff28788a3a9a4d352f0f516f·...·]-14">}</span></code></pre>
1936 ··</section>1936 ··</section>
1937 </section>1937 </section>
  
1938 ····</div>1938 ····</div>
1939 ··</section>1939 ··</section>
  
1940 ····<footer·class="footer">1940 ····<footer·class="footer">
92.4 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/binary.html
    
Offset 639, 15 lines modifiedOffset 639, 15 lines modified
  
639 ······<div·class="specs">639 ······<div·class="specs">
  
640 ··········<pre·translate="no"><span·class="attribute">-spec</span>·bin_to_list(Subject)·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0">byte</a>()]·when·Subject·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>640 ··········<pre·translate="no"><span·class="attribute">-spec</span>·bin_to_list(Subject)·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0">byte</a>()]·when·Subject·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>
  
641 ······</div>641 ······</div>
  
642 <p>Converts·<code·class="inline">Subject</code>·to·a·list·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a>s,·each·representing·the·value·of·one·byte.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">bin_to_list</span><span·class="p"·data-group-id="0702263346-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0702263346-1">)</span><span·class="p">.</span><span·class="w">642 <p>Converts·<code·class="inline">Subject</code>·to·a·list·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a>s,·each·representing·the·value·of·one·byte.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">bin_to_list</span><span·class="p"·data-group-id="6535643535-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6535643535-1">)</span><span·class="p">.</span><span·class="w">
643 </span><span·class="s">&quot;erlang&quot;</span><span·class="w">643 </span><span·class="s">&quot;erlang&quot;</span><span·class="w">
644 </span><span·class="c1">%%·or·[101,114,108,97,110,103]·in·list·notation.</span></code></pre>644 </span><span·class="c1">%%·or·[101,114,108,97,110,103]·in·list·notation.</span></code></pre>
645 ··</section>645 ··</section>
646 </section>646 </section>
647 <section·class="detail"·id="bin_to_list/2">647 <section·class="detail"·id="bin_to_list/2">
  
648 ··<div·class="detail-header">648 ··<div·class="detail-header">
Offset 705, 15 lines modifiedOffset 705, 15 lines modified
705 ·····················when·Subject·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·Pos·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·Len·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>().</pre>705 ·····················when·Subject·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·Pos·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·Len·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>().</pre>
  
706 ······</div>706 ······</div>
  
707 <p>Converts·<code·class="inline">Subject</code>·to·a·list·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a>s,·each·representing·the·value·of·one707 <p>Converts·<code·class="inline">Subject</code>·to·a·list·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:byte/0"><code·class="inline">byte/0</code></a>s,·each·representing·the·value·of·one
708 byte.·<code·class="inline">PosLen</code>·or·alternatively·<code·class="inline">Pos</code>·and·<code·class="inline">Len</code>·denote·which·part·of·the708 byte.·<code·class="inline">PosLen</code>·or·alternatively·<code·class="inline">Pos</code>·and·<code·class="inline">Len</code>·denote·which·part·of·the
709 <code·class="inline">Subject</code>·binary·to·convert.·By·default,·the·entire·<code·class="inline">Subject</code>·binary·is709 <code·class="inline">Subject</code>·binary·to·convert.·By·default,·the·entire·<code·class="inline">Subject</code>·binary·is
710 converted.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">bin_to_list</span><span·class="p"·data-group-id="0532101293-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0532101293-2">{</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·138,·SHA:·f6b39a5833c3a0b887d0baff8b21deb6e18db87f1adaab92ae3d34da9760f34f·...·]-1">)</span><span·class="p">.</span><span·class="w">710 converted.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">bin_to_list</span><span·class="p"·data-group-id="8461269388-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8461269388-2">{</span><span·class="mi">1</span><span[·...·truncated·by·diffoscope;·len:·138,·SHA:·0475e4a466693abef711b1315f8cc71794788a9416dee1f59d7e15076974427b·...·]-1">)</span><span·class="p">.</span><span·class="w">
711 </span><span·class="s">&quot;rla&quot;</span><span·class="w">711 </span><span·class="s">&quot;rla&quot;</span><span·class="w">
712 </span><span·class="c1">%%·or·[114,108,97]·in·list·notation.</span></code></pre><p>If·<code·class="inline">PosLen</code>·or·alternatively·<code·class="inline">Pos</code>·and·<code·class="inline">Len</code>·in·any·way·reference·outside·the712 </span><span·class="c1">%%·or·[114,108,97]·in·list·notation.</span></code></pre><p>If·<code·class="inline">PosLen</code>·or·alternatively·<code·class="inline">Pos</code>·and·<code·class="inline">Len</code>·in·any·way·reference·outside·the
713 binary,·a·<code·class="inline">badarg</code>·exception·is·raised.</p>713 binary,·a·<code·class="inline">badarg</code>·exception·is·raised.</p>
714 ··</section>714 ··</section>
715 </section>715 </section>
716 <section·class="detail"·id="compile_pattern/1">716 <section·class="detail"·id="compile_pattern/1">
  
Offset 847, 15 lines modifiedOffset 847, 15 lines modified
  
847 ······<div·class="specs">847 ······<div·class="specs">
  
848 ··········<pre·translate="no"><span·class="attribute">-spec</span>·decode_hex(Bin)·->·Bin2·when·Bin·::·<<_:_*16>>,·Bin2·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>848 ··········<pre·translate="no"><span·class="attribute">-spec</span>·decode_hex(Bin)·->·Bin2·when·Bin·::·<<_:_*16>>,·Bin2·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>().</pre>
  
849 ······</div>849 ······</div>
  
850 <p>Decodes·a·hex·encoded·binary·into·a·binary.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_hex</span><span·class="p"·data-group-id="6736517116-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;66&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6736517116-1">)</span><span·class="p">.</span><span·class="w">850 <p>Decodes·a·hex·encoded·binary·into·a·binary.</p><p><em>Example</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_hex</span><span·class="p"·data-group-id="6173565159-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;66&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6173565159-1">)</span><span·class="p">.</span><span·class="w">
851 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;f&quot;</span><span·class="p">&gt;&gt;</span></code></pre>851 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;f&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
852 ··</section>852 ··</section>
853 </section>853 </section>
854 <section·class="detail"·id="decode_unsigned/1">854 <section·class="detail"·id="decode_unsigned/1">
  
855 ··<div·class="detail-header">855 ··<div·class="detail-header">
856 ····<a·href="#decode_unsigned/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">856 ····<a·href="#decode_unsigned/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 913, 19 lines modifiedOffset 913, 19 lines modified
913 ·····························Subject·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),913 ·····························Subject·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),
914 ·····························Endianness·::·big·|·little,914 ·····························Endianness·::·big·|·little,
915 ·····························Unsigned·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>().</pre>915 ·····························Unsigned·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>().</pre>
  
916 ······</div>916 ······</div>
  
917 <p>Converts·the·binary·digit·representation,·in·big·endian·or·little·endian,·of·a917 <p>Converts·the·binary·digit·representation,·in·big·endian·or·little·endian,·of·a
918 positive·integer·in·<code·class="inline">Subject</code>·to·an·Erlang·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_unsigned</span><span·class="p"·data-group-id="1228695237-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1228695237-1">)</span><span·class="p">.</span><span·class="w">918 positive·integer·in·<code·class="inline">Subject</code>·to·an·Erlang·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0"><code·class="inline">integer/0</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_unsigned</span><span·class="p"·data-group-id="0506084237-1">(</span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0506084237-1">)</span><span·class="p">.</span><span·class="w">
919 </span><span·class="mi">11111111</span><span·class="gp·unselectable">919 </span><span·class="mi">11111111</span><span·class="gp·unselectable">
920 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_unsigned</span><span·class="p"·data-group-id="1228695237-2">(</span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·70,·SHA:·c176313d27cd52932c63a29b074ab17fcd11fa47eb5a8944031c6c90f365d60c·...·]237-2">)</span><span·class="p">.</span><span·class="w">920 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_unsigned</span><span·class="p"·data-group-id="0506084237-2">(</span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·70,·SHA:·e7994e7e719361e46ce91dbfa86f6b124e4bb15748becdb8e6598070f19df8a4·...·]237-2">)</span><span·class="p">.</span><span·class="w">
921 </span><span·class="mi">11111111</span><span·class="gp·unselectable">921 </span><span·class="mi">11111111</span><span·class="gp·unselectable">
922 3&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_unsigned</span><span·class="p"·data-group-id="1228695237-3">(</span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·73,·SHA:·10697c45e1226c84a65fe22963078279b4e1f9abd5b27886c095201a7799c8c4·...·]237-3">)</span><span·class="p">.</span><span·class="w">922 3&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">decode_unsigned</span><span·class="p"·data-group-id="0506084237-3">(</span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·73,·SHA:·19d077df80041df0d1c4c94000bed31b68572cd3c1a4310f1390001f3857f524·...·]237-3">)</span><span·class="p">.</span><span·class="w">
923 </span><span·class="mi">13077161</span></code></pre>923 </span><span·class="mi">13077161</span></code></pre>
924 ··</section>924 ··</section>
925 </section>925 </section>
926 <section·class="detail"·id="encode_hex/1">926 <section·class="detail"·id="encode_hex/1">
  
927 ··<div·class="detail-header">927 ··<div·class="detail-header">
928 ····<a·href="#encode_hex/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">928 ····<a·href="#encode_hex/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 980, 21 lines modifiedOffset 980, 21 lines modified
  
980 ··········<pre·translate="no"><span·class="attribute">-spec</span>·encode_hex(Bin,·Case)·->·Bin2980 ··········<pre·translate="no"><span·class="attribute">-spec</span>·encode_hex(Bin,·Case)·->·Bin2
981 ····················when·Bin·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·Case·::·lowercase·|·uppercase,·Bin2·::·<<_:_*16>>.</pre>981 ····················when·Bin·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·Case·::·lowercase·|·uppercase,·Bin2·::·<<_:_*16>>.</pre>
  
982 ······</div>982 ······</div>
  
983 <p>Encodes·a·binary·into·a·hex·encoded·binary·using·the·specified·case·for·the983 <p>Encodes·a·binary·into·a·hex·encoded·binary·using·the·specified·case·for·the
984 hexadecimal·digits·&quot;a&quot;·to·&quot;f&quot;.</p><p>The·default·case·is·<code·class="inline">uppercase</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="3262086924-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;f&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3262086924-1">)</span><span·class="p">.</span><span·class="w">984 hexadecimal·digits·&quot;a&quot;·to·&quot;f&quot;.</p><p>The·default·case·is·<code·class="inline">uppercase</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="8940236543-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;f&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8940236543-1">)</span><span·class="p">.</span><span·class="w">
985 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;66&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">985 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;66&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
986 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="3262086924-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3262086924-2">)</span><span·class="p">.</span><span·class="w">986 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="8940236543-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8940236543-2">)</span><span·class="p">.</span><span·class="w">
987 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;2F&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">987 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;2F&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
988 3&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="3262086924-3">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">lowercase</span><span·class="p"·data-group-id="3262086924-3">)</span><span·class="p">.</span><span·class="w">988 3&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="8940236543-3">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">lowercase</span><span·class="p"·data-group-id="8940236543-3">)</span><span·class="p">.</span><span·class="w">
989 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;2f&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">989 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;2f&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
990 4&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="3262086924-4">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">uppercase</span><span·class="p"·data-group-id="3262086924-4">)</span><span·class="p">.</span><span·class="w">990 4&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_hex</span><span·class="p"·data-group-id="8940236543-4">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">uppercase</span><span·class="p"·data-group-id="8940236543-4">)</span><span·class="p">.</span><span·class="w">
991 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;2F&quot;</span><span·class="p">&gt;&gt;</span></code></pre>991 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;2F&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
992 ··</section>992 ··</section>
993 </section>993 </section>
994 <section·class="detail"·id="encode_unsigned/1">994 <section·class="detail"·id="encode_unsigned/1">
  
995 ··<div·class="detail-header">995 ··<div·class="detail-header">
996 ····<a·href="#encode_unsigned/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">996 ····<a·href="#encode_unsigned/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1049, 19 lines modifiedOffset 1049, 19 lines modified
  
1049 ··········<pre·translate="no"><span·class="attribute">-spec</span>·encode_unsigned(Unsigned,·Endianness)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()1049 ··········<pre·translate="no"><span·class="attribute">-spec</span>·encode_unsigned(Unsigned,·Endianness)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()
1050 ·························when·Unsigned·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·Endianness·::·big·|·little.</pre>1050 ·························when·Unsigned·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·Endianness·::·big·|·little.</pre>
  
1051 ······</div>1051 ······</div>
  
1052 <p>Converts·a·positive·integer·to·the·smallest·possible·representation·in·a·binary1052 <p>Converts·a·positive·integer·to·the·smallest·possible·representation·in·a·binary
1053 digit·representation,·either·big·endian·or·little·endian.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_unsigned</span><span·class="p"·data-group-id="4648349583-1">(</span><span·class="mi">11111111</span><span·class="p"·data-group-id="4648349583-1">)</span><span·class="p">.</span><span·class="w">1053 digit·representation,·either·big·endian·or·little·endian.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_unsigned</span><span·class="p"·data-group-id="1433767524-1">(</span><span·class="mi">11111111</span><span·class="p"·data-group-id="1433767524-1">)</span><span·class="p">.</span><span·class="w">
1054 </span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">1054 </span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
1055 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_unsigned</span><span·class="p"·data-group-id="4648349583-2">(</span><span·class="mi">11111111</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">big</span><span·class="p"·data-group-id="4648349583-2">)</span><span·class="p">.</span><span·class="w">1055 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_unsigned</span><span·class="p"·data-group-id="1433767524-2">(</span><span·class="mi">11111111</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">big</span><span·class="p"·data-group-id="1433767524-2">)</span><span·class="p">.</span><span·class="w">
1056 </span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">1056 </span><span·class="p">&lt;&lt;</span><span·class="mi">169</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">199</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
1057 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_unsigned</span><span·class="p"·data-group-id="4648349583-3">(</span><span·class="mi">11111111</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">little</span><span·class="p"·data-group-id="4648349583-3">)</span><span·class="p">.</span><span·class="w">1057 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">encode_unsigned</span><span·class="p"·data-group-id="1433767524-3">(</span><span·class="mi">11111111</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">little</span><span·class="p"·data-group-id="1433767524-3">)</span><span·class="p">.</span><span·class="w">
1058 </span><span·class="p">&lt;&lt;</span><span·class="mi">199</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">169</span><span·class="p">&gt;&gt;</span></code></pre>1058 </span><span·class="p">&lt;&lt;</span><span·class="mi">199</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">169</span><span·class="p">&gt;&gt;</span></code></pre>
1059 ··</section>1059 ··</section>
1060 </section>1060 </section>
1061 <section·class="detail"·id="first/1">1061 <section·class="detail"·id="first/1">
  
1062 ··<div·class="detail-header">1062 ··<div·class="detail-header">
1063 ····<a·href="#first/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1063 ····<a·href="#first/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1177, 17 lines modifiedOffset 1177, 17 lines modified
1177 ······<div·class="specs">1177 ······<div·class="specs">
  
1178 ··········<pre·translate="no"><span·class="attribute">-spec</span>·longest_common_prefix(Binaries)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>()·when·Binaries·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·...].</pre>1178 ··········<pre·translate="no"><span·class="attribute">-spec</span>·longest_common_prefix(Binaries)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>()·when·Binaries·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>(),·...].</pre>
  
1179 ······</div>1179 ······</div>
  
1180 <p>Returns·the·length·of·the·longest·common·prefix·of·the·binaries·in·list1180 <p>Returns·the·length·of·the·longest·common·prefix·of·the·binaries·in·list
1181 <code·class="inline">Binaries</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">longest_common_prefix</span><span·class="p"·data-group-id="6042491818-1">(</span><span·class="p"·data-group-id="6042491818-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span[·...·truncated·by·diffoscope;·len:·169,·SHA:·9d21353d92b1f67942b5d6990e236fca31d8248680087ef035f2bf311e363642·...·]-1">)</span><span·class="p">.</span><span·class="w">1181 <code·class="inline">Binaries</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">longest_common_prefix</span><span·class="p"·data-group-id="1737154010-1">(</span><span·class="p"·data-group-id="1737154010-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span[·...·truncated·by·diffoscope;·len:·169,·SHA:·092af6be2d7790075482e26f860946b386c375c04b30bd7dcdfea4e64ba38320·...·]-1">)</span><span·class="p">.</span><span·class="w">
1182 </span><span·class="mi">2</span><span·class="gp·unselectable">1182 </span><span·class="mi">2</span><span·class="gp·unselectable">
1183 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">longest_common_prefix</span><span·class="p"·data-group-id="6042491818-3">(</span><span·class="p"·data-group-id="6042491818-4">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span[·...·truncated·by·diffoscope;·len:·165,·SHA:·38896289b0ab5f422a55caeff288fe7fb24c1c12af1c6170d80709df8040d45e·...·]-3">)</span><span·class="p">.</span><span·class="w">1183 2&gt;·</span><span·class="nc">binary</span><span·class="p">:</span><span·class="nf">longest_common_prefix</span><span·class="p"·data-group-id="1737154010-3">(</span><span·class="p"·data-group-id="1737154010-4">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;erlang&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span[·...·truncated·by·diffoscope;·len:·165,·SHA:·9e2207b35001e25f4694525fc0f90c5f5e265f2077995cee572c2e744c37b473·...·]-3">)</span><span·class="p">.</span><span·class="w">
1184 </span><span·class="mi">0</span></code></pre><p>If·<code·class="inline">Binaries</code>·is·not·a·flat·non-empty·list·of·binaries,·a·<code·class="inline">badarg</code>·exception·is1184 </span><span·class="mi">0</span></code></pre><p>If·<code·class="inline">Binaries</code>·is·not·a·flat·non-empty·list·of·binaries,·a·<code·class="inline">badarg</code>·exception·is
1185 raised.</p>1185 raised.</p>
1186 ··</section>1186 ··</section>
1187 </section>1187 </section>
1188 <section·class="detail"·id="longest_common_suffix/1">1188 <section·class="detail"·id="longest_common_suffix/1">
  
1189 ··<div·class="detail-header">1189 ··<div·class="detail-header">
Max diff block lines reached; 71823/94432 bytes (76.06%) of diff not shown.
2.2 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/c.html
    
Offset 1751, 15 lines modifiedOffset 1751, 15 lines modified
1751 ················Options·::·[Option]·|·Option,1751 ················Options·::·[Option]·|·Option,
1752 ················Option·::·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html#t:option/0">compile:option</a>(),1752 ················Option·::·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html#t:option/0">compile:option</a>(),
1753 ················Module·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:module/0">module</a>().</pre>1753 ················Module·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:module/0">module</a>().</pre>
  
1754 ······</div>1754 ······</div>
  
1755 <p>Compiles·and·then·loads·the·code·for·a·file·on·all·nodes.·<code·class="inline">Options</code>·defaults·to1755 <p>Compiles·and·then·loads·the·code·for·a·file·on·all·nodes.·<code·class="inline">Options</code>·defaults·to
1756 <code·class="inline">[]</code>.·Compilation·is·equivalent·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="8629386419-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="8629386419-2">[</span><sp[·...·truncated·by·diffoscope;·len:·215,·SHA:·2456193e0e303fb6a426be4c8a90e348db08b40bb91b577c1e0a3aa6b4312c1d·...·]-1">)</span></code></pre>1756 <code·class="inline">[]</code>.·Compilation·is·equivalent·to:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">compile</span><span·class="p">:</span><span·class="nf">file</span><span·class="p"·data-group-id="6917015881-1">(</span><span·class="n">File</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Options</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="p"·data-group-id="6917015881-2">[</span><sp[·...·truncated·by·diffoscope;·len:·215,·SHA:·8699652100f33f7539636a7714ae438bf08941da9529c2c339f4147f8bdc065f·...·]-1">)</span></code></pre>
1757 ··</section>1757 ··</section>
1758 </section>1758 </section>
1759 <section·class="detail"·id="ni/0">1759 <section·class="detail"·id="ni/0">
  
1760 ··<div·class="detail-header">1760 ··<div·class="detail-header">
1761 ····<a·href="#ni/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1761 ····<a·href="#ni/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1762 ······<i·class="ri-link-m"·aria-hidden="true"></i>1762 ······<i·class="ri-link-m"·aria-hidden="true"></i>
12.2 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/calendar.html
    
Offset 1841, 18 lines modifiedOffset 1841, 18 lines modified
1841 ····································Option·::·{unit,·<a·href="#t:rfc3339_time_unit/0">rfc3339_time_unit</a>()}.</pre>1841 ····································Option·::·{unit,·<a·href="#t:rfc3339_time_unit/0">rfc3339_time_unit</a>()}.</pre>
  
1842 ······</div>1842 ······</div>
  
1843 <p>Converts·an·RFC·3339·timestamp·into·system·time.·The·data·format·of·RFC·33391843 <p>Converts·an·RFC·3339·timestamp·into·system·time.·The·data·format·of·RFC·3339
1844 timestamps·is·described·by·<a·href="https://www.ietf.org/rfc/rfc3339.txt">RFC·3339</a>.1844 timestamps·is·described·by·<a·href="https://www.ietf.org/rfc/rfc3339.txt">RFC·3339</a>.
1845 Starting·from·OTP·25.1,·the·minutes·part·of·the·time·zone·is·optional.</p><p>Valid·option:</p><ul><li><strong><code·class="inline">{unit,·Unit}</code></strong>·-·The·time·unit·of·the·return·value.·The·default·is1845 Starting·from·OTP·25.1,·the·minutes·part·of·the·time·zone·is·optional.</p><p>Valid·option:</p><ul><li><strong><code·class="inline">{unit,·Unit}</code></strong>·-·The·time·unit·of·the·return·value.·The·default·is
1846 <code·class="inline">second</code>.</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">rfc3339_to_system_time</span><span·class="p"·data-group-id="3233514605-1">(</span><span·class="s">&quot;2018-02-01T16:17:58+01:00&quot;</span><span·class="p"·data-group-id="3233514605-1">)</span><span·class="p">.</span><span·class="w">1846 <code·class="inline">second</code>.</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">rfc3339_to_system_time</span><span·class="p"·data-group-id="3942880538-1">(</span><span·class="s">&quot;2018-02-01T16:17:58+01:00&quot;</span><span·class="p"·data-group-id="3942880538-1">)</span><span·class="p">.</span><span·class="w">
1847 </span><span·class="mi">1517498278</span><span·class="gp·unselectable">1847 </span><span·class="mi">1517498278</span><span·class="gp·unselectable">
1848 2&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">rfc3339_to_system_time</span><span·class="p"·data-group-id="3233514605-2">(</span><span·class="s">&quot;2018-02-01·15:18:02.088Z&quot;</span><span·class="p">,</span><span·class="w">1848 2&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">rfc3339_to_system_time</span><span·class="p"·data-group-id="3942880538-2">(</span><span·class="s">&quot;2018-02-01·15:18:02.088Z&quot;</span><span·class="p">,</span><span·class="w">
1849 ···</span><span·class="p"·data-group-id="3233514605-3">[</span><span·class="p"·data-group-id="3233514605-4">{</span><span·class="ss">unit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">nanosecond</span><span·class="p"·data-group-id="3233514605-4">}</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·75,·SHA:·99b6f38d3783a8b7ad3cba711aa2b93056389a6dc131114c67cbb92ea0e79911·...·]-2">)</span><span·class="p">.</span><span·class="w">1849 ···</span><span·class="p"·data-group-id="3942880538-3">[</span><span·class="p"·data-group-id="3942880538-4">{</span><span·class="ss">unit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">nanosecond</span><span·class="p"·data-group-id="3942880538-4">}</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·75,·SHA:·c0acfee8bbb63c7774a29d34858a0927742e1b4059c9190924ce8e06c3349459·...·]-2">)</span><span·class="p">.</span><span·class="w">
1850 </span><span·class="mi">1517498282088000000</span></code></pre>1850 </span><span·class="mi">1517498282088000000</span></code></pre>
1851 ··</section>1851 ··</section>
1852 </section>1852 </section>
1853 <section·class="detail"·id="seconds_to_daystime/1">1853 <section·class="detail"·id="seconds_to_daystime/1">
  
1854 ··<div·class="detail-header">1854 ··<div·class="detail-header">
1855 ····<a·href="#seconds_to_daystime/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1855 ····<a·href="#seconds_to_daystime/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 2014, 24 lines modifiedOffset 2014, 24 lines modified
2014 interpreted·as·local·time.·A·non-empty·string·is·included·as·is.·The·time·unit2014 interpreted·as·local·time.·A·non-empty·string·is·included·as·is.·The·time·unit
2015 of·the·integer·is·the·same·as·the·one·of·<code·class="inline">Time</code>.</p></li><li><p><strong><code·class="inline">{time_designator,·Character}</code></strong>·-·The·character·used·as·time·designator,2015 of·the·integer·is·the·same·as·the·one·of·<code·class="inline">Time</code>.</p></li><li><p><strong><code·class="inline">{time_designator,·Character}</code></strong>·-·The·character·used·as·time·designator,
2016 that·is,·the·date·and·time·separator.·The·default·is·<code·class="inline">$T</code>.</p></li><li><p><strong><code·class="inline">{unit,·Unit}</code></strong>·-·The·time·unit·of·<code·class="inline">Time</code>.·The·default·is·<code·class="inline">second</code>.·If·some2016 that·is,·the·date·and·time·separator.·The·default·is·<code·class="inline">$T</code>.</p></li><li><p><strong><code·class="inline">{unit,·Unit}</code></strong>·-·The·time·unit·of·<code·class="inline">Time</code>.·The·default·is·<code·class="inline">second</code>.·If·some
2017 other·unit·is·given·(<code·class="inline">millisecond</code>,·<code·class="inline">microsecond</code>,·<code·class="inline">nanosecond</code>,·or·<code·class="inline">native</code>),2017 other·unit·is·given·(<code·class="inline">millisecond</code>,·<code·class="inline">microsecond</code>,·<code·class="inline">nanosecond</code>,·or·<code·class="inline">native</code>),
2018 the·formatted·string·includes·a·fraction·of·a·second.·The·number·of·fractional2018 the·formatted·string·includes·a·fraction·of·a·second.·The·number·of·fractional
2019 second·digits·is·three,·six,·or·nine·depending·on·what·time·unit·is·chosen.2019 second·digits·is·three,·six,·or·nine·depending·on·what·time·unit·is·chosen.
2020 For·<code·class="inline">native</code>·three·fractional·digits·are·included.·Notice·that·trailing·zeros2020 For·<code·class="inline">native</code>·three·fractional·digits·are·included.·Notice·that·trailing·zeros
2021 are·not·removed·from·the·fraction.</p></li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3480056797-1">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3480056797-2">(</span><span·class="ss">second</span><span·class="p"·data-group-id="3480056797-2">)</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·e23d4e1af2b479a85cd0506f713af677ec63009c84d4cf93ac5ae735052a1225·...·]-1">)</span><span·class="p">.</span><span·class="w">2021 are·not·removed·from·the·fraction.</p></li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3408640370-1">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3408640370-2">(</span><span·class="ss">second</span><span·class="p"·data-group-id="3408640370-2">)</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·5bc6b4589557f9f198c444eb6c1155b5b543f8cf5d8425921bcca4e95091c335·...·]-1">)</span><span·class="p">.</span><span·class="w">
2022 </span><span·class="s">&quot;2018-04-23T14:56:28+02:00&quot;</span><span·class="gp·unselectable">2022 </span><span·class="s">&quot;2018-04-23T14:56:28+02:00&quot;</span><span·class="gp·unselectable">
2023 2&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3480056797-3">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3480056797-4">(</span><span·class="ss">second</span><span·class="p"·data-group-id="3480056797-4">)</span><span·class="p">,</span><span·class="w">2023 2&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3408640370-3">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3408640370-4">(</span><span·class="ss">second</span><span·class="p"·data-group-id="3408640370-4">)</span><span·class="p">,</span><span·class="w">
2024 ···</span><span·class="p"·data-group-id="3480056797-5">[</span><span·class="p"·data-group-id="3480056797-6">{</span><span·class="ss">offset</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;-02:00&quot;</span><span·class="p"·data-group-id="3480056797-6">}</span><span·class[·...·truncated·by·diffoscope;·len:·83,·SHA:·21ee367e0f6d3b9ac9a7ec671e5e1f629663e67df0c6c65871766f080ffa248f·...·]-3">)</span><span·class="p">.</span><span·class="w">2024 ···</span><span·class="p"·data-group-id="3408640370-5">[</span><span·class="p"·data-group-id="3408640370-6">{</span><span·class="ss">offset</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;-02:00&quot;</span><span·class="p"·data-group-id="3408640370-6">}</span><span·class[·...·truncated·by·diffoscope;·len:·83,·SHA:·6713f1eca890e57b42acd8e34df65a310b4c0ba718060ad6def766fc8566e26c·...·]-3">)</span><span·class="p">.</span><span·class="w">
2025 </span><span·class="s">&quot;2018-04-23T10:56:52-02:00&quot;</span><span·class="gp·unselectable">2025 </span><span·class="s">&quot;2018-04-23T10:56:52-02:00&quot;</span><span·class="gp·unselectable">
2026 3&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3480056797-7">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3480056797-8">(</span><span·class="ss">second</span><span·class="p"·data-group-id="3480056797-8">)</span><span·class="p">,</span><span·class="w">2026 3&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3408640370-7">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3408640370-8">(</span><span·class="ss">second</span><span·class="p"·data-group-id="3408640370-8">)</span><span·class="p">,</span><span·class="w">
2027 ···</span><span·class="p"·data-group-id="3480056797-9">[</span><span·class="p"·data-group-id="3480056797-10">{</span><span·class="ss">offset</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">7200</span><span·class="p"·data-group-id="3480056797-10">}</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·da205aa07a503ccf455adc54a9fe3c872c4d3f9bc29236facd06f9e048ba78f1·...·]-7">)</span><span·class="p">.</span><span·class="w">2027 ···</span><span·class="p"·data-group-id="3408640370-9">[</span><span·class="p"·data-group-id="3408640370-10">{</span><span·class="ss">offset</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">7200</span><span·class="p"·data-group-id="3408640370-10">}</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·fc4abb072f9ea7ea9fe4c6f5f3fd3b9138c3672a73e160d02c7d52c9efb4891a·...·]-7">)</span><span·class="p">.</span><span·class="w">
2028 </span><span·class="s">&quot;2018-04-23T10:57:05-02:00&quot;</span><span·class="gp·unselectable">2028 </span><span·class="s">&quot;2018-04-23T10:57:05-02:00&quot;</span><span·class="gp·unselectable">
2029 4&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3480056797-11">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3480056797-12">(</span><span·class="ss">millisecond</span><span·class="p"·data-group-id="3480056797-12">)</span><span·class="p">,</span><span·class="w">2029 4&gt;·</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">system_time_to_rfc3339</span><span·class="p"·data-group-id="3408640370-11">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_time</span><span·class="p"·data-group-id="3408640370-12">(</span><span·class="ss">millisecond</span><span·class="p"·data-group-id="3408640370-12">)</span><span·class="p">,</span><span·class="w">
2030 ···</span><span·class="p"·data-group-id="3480056797-13">[</span><span·class="p"·data-group-id="3480056797-14">{</span><span·class="ss">unit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">millisecond</span><span·class="p"·data-group-id="3480056797-14">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·619,·SHA:·ea4b104af009be1d624cba3f3e8a6431311de8b8b63829f71e82946bc4f4450d·...·]-11">)</span><span·class="p">.</span><span·class="w">2030 ···</span><span·class="p"·data-group-id="3408640370-13">[</span><span·class="p"·data-group-id="3408640370-14">{</span><span·class="ss">unit</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">millisecond</span><span·class="p"·data-group-id="3408640370-14">}</span><span·class="p">[·...·truncated·by·diffoscope;·len:·619,·SHA:·3eff0e94c4b85edf3b774313e55845cd94d7374f85bd015647706d974ec679c1·...·]-11">)</span><span·class="p">.</span><span·class="w">
2031 </span><span·class="s">&quot;2018-04-23·12:57:20.482Z&quot;</span></code></pre>2031 </span><span·class="s">&quot;2018-04-23·12:57:20.482Z&quot;</span></code></pre>
2032 ··</section>2032 ··</section>
2033 </section>2033 </section>
2034 <section·class="detail"·id="system_time_to_universal_time/2">2034 <section·class="detail"·id="system_time_to_universal_time/2">
  
2035 ··<div·class="detail-header">2035 ··<div·class="detail-header">
2036 ····<a·href="#system_time_to_universal_time/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2036 ····<a·href="#system_time_to_universal_time/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
25.3 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/dets.html
    
Offset 1910, 22 lines modifiedOffset 1910, 22 lines modified
  
1910 ··········<pre·translate="no"><span·class="attribute">-spec</span>·lookup(Name,·Key)·->·Objects·|·{error,·Reason}1910 ··········<pre·translate="no"><span·class="attribute">-spec</span>·lookup(Name,·Key)·->·Objects·|·{error,·Reason}
1911 ················when·Name·::·<a·href="#t:tab_name/0">tab_name</a>(),·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Objects·::·[<a·href="#t:object/0">object</a>()],·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1911 ················when·Name·::·<a·href="#t:tab_name/0">tab_name</a>(),·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Objects·::·[<a·href="#t:object/0">object</a>()],·Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1912 ······</div>1912 ······</div>
  
1913 <p>Returns·a·list·of·all·objects·with·key·<code·class="inline">Key</code>·stored·in·table·<code·class="inline">Name</code>,·for1913 <p>Returns·a·list·of·all·objects·with·key·<code·class="inline">Key</code>·stored·in·table·<code·class="inline">Name</code>,·for
1914 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">open_file</span><span·class="p"·data-group-id="1201532353-1">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1201532353-2">[</span><span·class="p"·data-group-id="1201532353-3">{</span><span·class="ss">type</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·196,·SHA:·e409a0b88dea3f459453857d1803ec43183ead63d40307c36e5f91f2a2a7ba56·...·]-1">)</span><span·class="p">.</span><span·class="w">1914 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">open_file</span><span·class="p"·data-group-id="1005748055-1">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1005748055-2">[</span><span·class="p"·data-group-id="1005748055-3">{</span><span·class="ss">type</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·196,·SHA:·33f24b30be1a5dcb718027fbe591158f915cc4cff8876098a26ae41c8b88ace3·...·]-1">)</span><span·class="p">.</span><span·class="w">
1915 </span><span·class="p"·data-group-id="1201532353-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">abc</span><span·class="p"·data-group-id="1201532353-4">}</span><span·class="gp·unselectable">1915 </span><span·class="p"·data-group-id="1005748055-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">abc</span><span·class="p"·data-group-id="1005748055-4">}</span><span·class="gp·unselectable">
1916 3&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1201532353-5">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1201532353-6">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·110,·SHA:·d66840e79a635c77cc9216d0e26365460ddc042f0d5ea264ea19b95106bb1656·...·]-5">)</span><span·class="p">.</span><span·class="w">1916 3&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1005748055-5">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1005748055-6">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·110,·SHA:·11cdac572feecde8452450359b83742428a1b0bb533766ac9cedc1b95bff2387·...·]-5">)</span><span·class="p">.</span><span·class="w">
1917 </span><span·class="ss">ok</span><span·class="gp·unselectable">1917 </span><span·class="ss">ok</span><span·class="gp·unselectable">
1918 4&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1201532353-7">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1201532353-8">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·110,·SHA:·cd946dd7aa41fde9a758750c3c9e2aa5cc2dbad8781363dc7f24bfb43820c722·...·]-7">)</span><span·class="p">.</span><span·class="w">1918 4&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1005748055-7">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1005748055-8">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·110,·SHA:·d96d6ba6d219524eab6c0fb7a13738cc5cab9c7e5bfe0efa37cdc0ab8b1a9730·...·]-7">)</span><span·class="p">.</span><span·class="w">
1919 </span><span·class="ss">ok</span><span·class="gp·unselectable">1919 </span><span·class="ss">ok</span><span·class="gp·unselectable">
1920 5&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="1201532353-9">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1201532353-9">)</span><span·class="p">.</span><span·class="w">1920 5&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="1005748055-9">(</span><span·class="ss">abc</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1005748055-9">)</span><span·class="p">.</span><span·class="w">
1921 </span><span·class="p"·data-group-id="1201532353-10">[</span><span·class="p"·data-group-id="1201532353-11">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="1201532353-11">}</span><sp[·...·truncated·by·diffoscope;·len:·293,·SHA:·7d6663ed07b6b4f9afdcd2630807038c4e91e58d233a4acf770c554440136b86·...·]-10">]</span></code></pre><p>If·the·table·type·is·<code·class="inline">set</code>,·the·function·returns·either·the·empty·list·or·a·list1921 </span><span·class="p"·data-group-id="1005748055-10">[</span><span·class="p"·data-group-id="1005748055-11">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="1005748055-11">}</span><sp[·...·truncated·by·diffoscope;·len:·293,·SHA:·fc503064aaa509c6dcac35bfd67076d489d6f25c1a58d6d3cecc83604efa3193·...·]-10">]</span></code></pre><p>If·the·table·type·is·<code·class="inline">set</code>,·the·function·returns·either·the·empty·list·or·a·list
1922 with·one·object,·as·there·cannot·be·more·than·one·object·with·a·given·key.·If1922 with·one·object,·as·there·cannot·be·more·than·one·object·with·a·given·key.·If
1923 the·table·type·is·<code·class="inline">bag</code>·or·<code·class="inline">duplicate_bag</code>,·the·function·returns·a·list·of1923 the·table·type·is·<code·class="inline">bag</code>·or·<code·class="inline">duplicate_bag</code>,·the·function·returns·a·list·of
1924 arbitrary·length.</p><p>Notice·that·the·order·of·objects·returned·is·unspecified.·In·particular,·the1924 arbitrary·length.</p><p>Notice·that·the·order·of·objects·returned·is·unspecified.·In·particular,·the
1925 order·in·which·objects·were·inserted·is·not·reflected.</p>1925 order·in·which·objects·were·inserted·is·not·reflected.</p>
1926 ··</section>1926 ··</section>
1927 </section>1927 </section>
1928 <section·class="detail"·id="match/1">1928 <section·class="detail"·id="match/1">
Offset 2774, 19 lines modifiedOffset 2774, 19 lines modified
2774 by·<code·class="inline">qlc</code>:</p><ul><li>Simple·filters·are·translated·into·equivalent·match·specifications.</li><li>More·complicated·filters·must·be·applied·to·all·objects·returned·by2774 by·<code·class="inline">qlc</code>:</p><ul><li>Simple·filters·are·translated·into·equivalent·match·specifications.</li><li>More·complicated·filters·must·be·applied·to·all·objects·returned·by
2775 <a·href="#select/3"><code·class="inline">select/3</code></a>·given·a·match·specification·that·matches·all2775 <a·href="#select/3"><code·class="inline">select/3</code></a>·given·a·match·specification·that·matches·all
2776 objects.</li></ul></li><li><p><code·class="inline">{select,·``t:match_spec/0``}</code>·-·As·for·<code·class="inline">select</code>,·the·table·is·traversed·by2776 objects.</li></ul></li><li><p><code·class="inline">{select,·``t:match_spec/0``}</code>·-·As·for·<code·class="inline">select</code>,·the·table·is·traversed·by
2777 calling·<a·href="#select/3"><code·class="inline">dets:select/3</code></a>·and·<a·href="#select/1"><code·class="inline">dets:select/1</code></a>.·The·difference·is·that·the·match2777 calling·<a·href="#select/3"><code·class="inline">dets:select/3</code></a>·and·<a·href="#select/1"><code·class="inline">dets:select/1</code></a>.·The·difference·is·that·the·match
2778 specification·is·specified·explicitly.·This·is·how·to·state·match2778 specification·is·specified·explicitly.·This·is·how·to·state·match
2779 specifications·that·cannot·easily·be·expressed·within·the·syntax·provided·by2779 specifications·that·cannot·easily·be·expressed·within·the·syntax·provided·by
2780 <code·class="inline">qlc</code>.</p></li></ul><p>The·following·example·uses·an·explicit·match·specification·to·traverse·the2780 <code·class="inline">qlc</code>.</p></li></ul><p>The·following·example·uses·an·explicit·match·specification·to·traverse·the
2781 table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">open_file</span><span·class="p"·data-group-id="0546884421-1">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0546884421-2">[</span><span·class="p"·data-group-id="0546884421-2">]</span><span·class="p"·data-group-id="0546884421-1">)</span><span·class="p">,</span><span·class="w">2781 table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">open_file</span><span·class="p"·data-group-id="7815120941-1">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7815120941-2">[</span><span·class="p"·data-group-id="7815120941-2">]</span><span·class="p"·data-group-id="7815120941-1">)</span><span·class="p">,</span><span·class="w">
2782 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="0546884421-3">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0546884421-4">[</span><span·class="p"·data-group-id="0546884421-5">{</span><span·class="mi">1</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·777,·SHA:·0170212250321e7bcab21895e5de4d2c78fda2fc7f03258e77e9de01095d4242·...·]1-3">)</span><span·class="p">,</span><span·class="w">2782 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="7815120941-3">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7815120941-4">[</span><span·class="p"·data-group-id="7815120941-5">{</span><span·class="mi">1</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·777,·SHA:·896b8e1699fc3f5651ff9c977a877acc11608c696c9da32e1fa5c9e385979111·...·]1-3">)</span><span·class="p">,</span><span·class="w">
2783 </span><span·class="n">MS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0546884421-9">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0546884421-10">(</span><span·class="p"·data-group-id="0546884421-11">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·993,·SHA:·2d55300d4248142f50f384a5c2c8175b96f63d2ba2e61e7f9dc7dbd8a1028ede·...·]1-9">)</span><span·class="p">,</span><span·class="w">2783 </span><span·class="n">MS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="7815120941-9">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7815120941-10">(</span><span·class="p"·data-group-id="7815120941-11">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">Y</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·993,·SHA:·39323cb9815456bc8b294d6fb8e1279685cf7382407aa1f91e299d34705f219e·...·]1-9">)</span><span·class="p">,</span><span·class="w">
2784 </span><span·class="n">QH1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">table</span><span·class="p"·data-group-id="0546884421-15">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0546884421-16">[</span><span·class="p"·data-group-id="0546884421-17">{</span><span·class="ss">traverse</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·2206,·SHA:·b834ad0431c108b424cf1481d0d42cd213bbe2f8d1e83aeba88ec2a68673e80c·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·latter·example·is·equivalent·to·the·former,·which·can·be·verified·using2784 </span><span·class="n">QH1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dets</span><span·class="p">:</span><span·class="nf">table</span><span·class="p"·data-group-id="7815120941-15">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7815120941-16">[</span><span·class="p"·data-group-id="7815120941-17">{</span><span·class="ss">traverse</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·2206,·SHA:·977fed4c055138256051ea8bd9c4b7dbc898a8c3bfa1c70cb2c2ec6402bca36b·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·latter·example·is·equivalent·to·the·former,·which·can·be·verified·using
2785 function·<a·href="qlc.html#info/1"><code·class="inline">qlc:info/1</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="5513512523-1">(</span><span·class="n">QH1</span><span·class="p"·data-group-id="5513512523-1">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">info</span><s[·...·truncated·by·diffoscope;·len:·118,·SHA:·a7521e8ccc58c2462f751851e19b100c5c3e3c0fd1713b49806d3417dd1e846f·...·]-2">)</span><span·class="p">.</span><span·class="w">2785 function·<a·href="qlc.html#info/1"><code·class="inline">qlc:info/1</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">info</span><span·class="p"·data-group-id="0641718066-1">(</span><span·class="n">QH1</span><span·class="p"·data-group-id="0641718066-1">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">info</span><s[·...·truncated·by·diffoscope;·len:·118,·SHA:·62d050928436968a0a663b4a93d599ee0af6d83068c7df5387f2c3b6e9ff3b4e·...·]-2">)</span><span·class="p">.</span><span·class="w">
2786 </span><span·class="ss">true</span></code></pre><p><a·href="qlc.html#info/1"><code·class="inline">qlc:info/1</code></a>·returns·information·about·a·query·handle.·In·this·case·identical2786 </span><span·class="ss">true</span></code></pre><p><a·href="qlc.html#info/1"><code·class="inline">qlc:info/1</code></a>·returns·information·about·a·query·handle.·In·this·case·identical
2787 information·is·returned·for·the·two·query·handles.</p>2787 information·is·returned·for·the·two·query·handles.</p>
2788 ··</section>2788 ··</section>
2789 </section>2789 </section>
2790 <section·class="detail"·id="to_ets/2">2790 <section·class="detail"·id="to_ets/2">
  
2791 ··<div·class="detail-header">2791 ··<div·class="detail-header">
Offset 2852, 15 lines modifiedOffset 2852, 15 lines modified
2852 ······················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>2852 ······················Reason·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
2853 ······</div>2853 ······</div>
  
2854 <p>Applies·<code·class="inline">Fun</code>·to·each·object·stored·in·table·<code·class="inline">Name</code>·in·some·unspecified·order.2854 <p>Applies·<code·class="inline">Fun</code>·to·each·object·stored·in·table·<code·class="inline">Name</code>·in·some·unspecified·order.
2855 Different·actions·are·taken·depending·on·the·return·value·of·<code·class="inline">Fun</code>.·The2855 Different·actions·are·taken·depending·on·the·return·value·of·<code·class="inline">Fun</code>.·The
2856 following·<code·class="inline">Fun</code>·return·values·are·allowed:</p><ul><li><p><strong><code·class="inline">continue</code></strong>·-·Continue·to·perform·the·traversal.·For·example,·the·following2856 following·<code·class="inline">Fun</code>·return·values·are·allowed:</p><ul><li><p><strong><code·class="inline">continue</code></strong>·-·Continue·to·perform·the·traversal.·For·example,·the·following
2857 function·can·be·used·to·print·the·contents·of·a·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="2948266339-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="2948266339-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><[·...·truncated·by·diffoscope;·len:·381,·SHA:·a818f5aa003abd15513d6a45faf4c28c9fd6f4a99d5fa2cf7c8f403a4b8df73f·...·]-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span></code></pre></li><li><p><strong><code·class="inline">{continue,·Val}</code></strong>·-·Continue·the·traversal·and·accumulate·<code·class="inline">Val</code>.·The2857 function·can·be·used·to·print·the·contents·of·a·table:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="1954000833-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="1954000833-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><[·...·truncated·by·diffoscope;·len:·381,·SHA:·f649497639c50f56876e22ee10491dcaff0e5195e5c8d364b4dc00a8eb3810a1·...·]-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">continue</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span></code></pre></li><li><p><strong><code·class="inline">{continue,·Val}</code></strong>·-·Continue·the·traversal·and·accumulate·<code·class="inline">Val</code>.·The
2858 following·function·is·supplied·to·collect·all·objects·of·a·table·in·a·list:</p><pre><code·class="text">fun(X)·-&gt;·{continue,·X}·end.</code></pre></li><li><p><strong><code·class="inline">{done,·Value}</code></strong>·-·Terminate·the·traversal·and·return·<code·class="inline">[Value·|·Acc]</code>.</p></li></ul><p>Any·other·value·<code·class="inline">OtherValue</code>·returned·by·<code·class="inline">Fun</code>·terminates·the·traversal·and·is2858 following·function·is·supplied·to·collect·all·objects·of·a·table·in·a·list:</p><pre><code·class="text">fun(X)·-&gt;·{continue,·X}·end.</code></pre></li><li><p><strong><code·class="inline">{done,·Value}</code></strong>·-·Terminate·the·traversal·and·return·<code·class="inline">[Value·|·Acc]</code>.</p></li></ul><p>Any·other·value·<code·class="inline">OtherValue</code>·returned·by·<code·class="inline">Fun</code>·terminates·the·traversal·and·is
2859 returned·immediately.</p>2859 returned·immediately.</p>
2860 ··</section>2860 ··</section>
2861 </section>2861 </section>
2862 <section·class="detail"·id="update_counter/3">2862 <section·class="detail"·id="update_counter/3">
  
2863 ··<div·class="detail-header">2863 ··<div·class="detail-header">
19.5 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/dict.html
    
Offset 134, 21 lines modifiedOffset 134, 21 lines modified
134 do·not·compare·equal·(<code·class="inline">==</code>).</p><h2·id="module-notes"·class="section-heading">134 do·not·compare·equal·(<code·class="inline">==</code>).</p><h2·id="module-notes"·class="section-heading">
135 ··<a·href="#module-notes"·class="hover-link">135 ··<a·href="#module-notes"·class="hover-link">
136 ····<i·class="ri-link-m"·aria-hidden="true"></i>136 ····<i·class="ri-link-m"·aria-hidden="true"></i>
137 ··</a>137 ··</a>
138 ··<span·class="text">Notes</span>138 ··<span·class="text">Notes</span>
139 </h2>139 </h2>
140 <p><a·href=""·id="notes"></a></p><p>Functions·<code·class="inline">append</code>·and·<code·class="inline">append_list</code>·are·included·so·that·keyed·values·can·be140 <p><a·href=""·id="notes"></a></p><p>Functions·<code·class="inline">append</code>·and·<code·class="inline">append_list</code>·are·included·so·that·keyed·values·can·be
141 stored·in·a·list·<em>accumulator</em>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">D0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="7467009393-1">(</span><span·class="p"·data-group-id="7467009393-1">)</span><span·class="p">,</span><span·class="w">141 stored·in·a·list·<em>accumulator</em>,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">D0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="0901043424-1">(</span><span·class="p"·data-group-id="0901043424-1">)</span><span·class="p">,</span><span·class="w">
142 ··</span><span·class="n">D1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">store</span><span·class="p"·data-group-id="7467009393-2">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7467009393-3">[</span><span·class="p"·data-group-id="7467009393-3">]</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·63,·SHA:·40b68815cbcdfc96c1a53cc4584678e05625c64d1a69bd237fb839189d4b3957·...·]-2">)</span><span·class="p">,</span><span·class="w">142 ··</span><span·class="n">D1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">store</span><span·class="p"·data-group-id="0901043424-2">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0901043424-3">[</span><span·class="p"·data-group-id="0901043424-3">]</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·63,·SHA:·867ebae2af1ba25f4808f72aa27ae06fe89c90639fd9ff535049d53b4e725e25·...·]-2">)</span><span·class="p">,</span><span·class="w">
143 ··</span><span·class="n">D2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7467009393-4">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p"·data-group-id="7467009393-4">)</span><span·class="p">,</span><span·class="w">143 ··</span><span·class="n">D2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="0901043424-4">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p"·data-group-id="0901043424-4">)</span><span·class="p">,</span><span·class="w">
144 ··</span><span·class="n">D3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7467009393-5">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p"·data-group-id="7467009393-5">)</span><span·class="p">,</span><span·class="w">144 ··</span><span·class="n">D3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="0901043424-5">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p"·data-group-id="0901043424-5">)</span><span·class="p">,</span><span·class="w">
145 ··</span><span·class="n">D4</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7467009393-6">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D3</span><span·class="p"·data-group-id="7467009393-6">)</span><span·class="p">,</span><span·class="w">145 ··</span><span·class="n">D4</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="0901043424-6">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D3</span><span·class="p"·data-group-id="0901043424-6">)</span><span·class="p">,</span><span·class="w">
146 ··</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="7467009393-7">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D4</span><span·class="p"·data-group-id="7467009393-7">)</span><span·class="p">.</span><span·class="w">146 ··</span><span·class="nc">dict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="0901043424-7">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D4</span><span·class="p"·data-group-id="0901043424-7">)</span><span·class="p">.</span><span·class="w">
147 </span><span·class="p"·data-group-id="7467009393-8">[</span><span·class="ss">f1</span><span·class="p">,</span><span·class="ss">f2</span><span·class="p">,</span><span·class="ss">f3</span><span·class="p"·data-group-id="7467009393-8">]</span></code></pre><p>This·saves·the·trouble·of·first·fetching·a·keyed·value,·appending·a·new·value·to147 </span><span·class="p"·data-group-id="0901043424-8">[</span><span·class="ss">f1</span><span·class="p">,</span><span·class="ss">f2</span><span·class="p">,</span><span·class="ss">f3</span><span·class="p"·data-group-id="0901043424-8">]</span></code></pre><p>This·saves·the·trouble·of·first·fetching·a·keyed·value,·appending·a·new·value·to
148 the·list·of·stored·values,·and·storing·the·result.</p><p>Function·<code·class="inline">fetch</code>·is·to·be·used·if·the·key·is·known·to·be·in·the·dictionary,148 the·list·of·stored·values,·and·storing·the·result.</p><p>Function·<code·class="inline">fetch</code>·is·to·be·used·if·the·key·is·known·to·be·in·the·dictionary,
149 otherwise·function·<code·class="inline">find</code>.</p><h2·id="module-see-also"·class="section-heading">149 otherwise·function·<code·class="inline">find</code>.</p><h2·id="module-see-also"·class="section-heading">
150 ··<a·href="#module-see-also"·class="hover-link">150 ··<a·href="#module-see-also"·class="hover-link">
151 ····<i·class="ri-link-m"·aria-hidden="true"></i>151 ····<i·class="ri-link-m"·aria-hidden="true"></i>
152 ··</a>152 ··</a>
153 ··<span·class="text">See·Also</span>153 ··<span·class="text">See·Also</span>
154 </h2>154 </h2>
Offset 901, 18 lines modifiedOffset 901, 18 lines modified
  
901 ······</div>901 ······</div>
  
902 <p>Merges·two·dictionaries,·<code·class="inline">Dict1</code>·and·<code·class="inline">Dict2</code>,·to·create·a·new·dictionary.·All902 <p>Merges·two·dictionaries,·<code·class="inline">Dict1</code>·and·<code·class="inline">Dict2</code>,·to·create·a·new·dictionary.·All
903 the·<code·class="inline">Key</code>-<code·class="inline">Value</code>·pairs·from·both·dictionaries·are·included·in·the·new903 the·<code·class="inline">Key</code>-<code·class="inline">Value</code>·pairs·from·both·dictionaries·are·included·in·the·new
904 dictionary.·If·a·key·occurs·in·both·dictionaries,·<code·class="inline">Fun</code>·is·called·with·the·key904 dictionary.·If·a·key·occurs·in·both·dictionaries,·<code·class="inline">Fun</code>·is·called·with·the·key
905 and·both·values·to·return·a·new·value.·<code·class="inline">merge</code>·can·be·defined·as·follows,·but·is905 and·both·values·to·return·a·new·value.·<code·class="inline">merge</code>·can·be·defined·as·follows,·but·is
906 faster:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">merge</span><span·class="p"·data-group-id="1375803891-1">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p"·data-group-id="1375803891-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">906 faster:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">merge</span><span·class="p"·data-group-id="7962649915-1">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p"·data-group-id="7962649915-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
907 ····</span><span·class="nf">fold</span><span·class="p"·data-group-id="1375803891-2">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="1375803891-3">(</span><span·class="n">K</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V1</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·80,·SHA:·33b564a7dcfd05aa216559f172357bd13fc8bfda018e16084e05d276b59740ef·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">907 ····</span><span·class="nf">fold</span><span·class="p"·data-group-id="7962649915-2">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7962649915-3">(</span><span·class="n">K</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V1</span><span·class="p">,</span><span·cla[·...·truncated·by·diffoscope;·len:·80,·SHA:·1e72059d04b8d53f491e111d930be617cbfbcb02508147a9c964e2ddfe9ccf02·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
908 ·················</span><span·class="nf">update</span><span·class="p"·data-group-id="1375803891-4">(</span><span·class="n">K</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="1375803891-5">(</span><span·class="n">V2</span><span·class="p"·data-group-id="13[·...·truncated·by·diffoscope;·len:·634,·SHA:·1c451ef3d06ddc6d3ae878e71786c26c0c9773389145a9ed43d4b40499c7089a·...·]-4">)</span><span·class="w">908 ·················</span><span·class="nf">update</span><span·class="p"·data-group-id="7962649915-4">(</span><span·class="n">K</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7962649915-5">(</span><span·class="n">V2</span><span·class="p"·data-group-id="79[·...·truncated·by·diffoscope;·len:·634,·SHA:·a7de98527bdf6b695cd19809bacbb655fd16c380a0108800b2904cbdc0d6269e·...·]-4">)</span><span·class="w">
909 ·········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p"·data-group-id="1375803891-2">)</span><span·class="p">.</span></code></pre>909 ·········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p"·data-group-id="7962649915-2">)</span><span·class="p">.</span></code></pre>
910 ··</section>910 ··</section>
911 </section>911 </section>
912 <section·class="detail"·id="new/0">912 <section·class="detail"·id="new/0">
  
913 ··<div·class="detail-header">913 ··<div·class="detail-header">
914 ····<a·href="#new/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">914 ····<a·href="#new/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
915 ······<i·class="ri-link-m"·aria-hidden="true"></i>915 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1117, 16 lines modifiedOffset 1117, 16 lines modified
1117 ····················Fun·::·fun((Value1·::·Value)·->·Value2·::·Value),1117 ····················Fun·::·fun((Value1·::·Value)·->·Value2·::·Value),
1118 ····················Initial·::·Value.</pre>1118 ····················Initial·::·Value.</pre>
  
1119 ······</div>1119 ······</div>
  
1120 <p>Updates·a·value·in·a·dictionary·by·calling·<code·class="inline">Fun</code>·on·the·value·to·get·a·new1120 <p>Updates·a·value·in·a·dictionary·by·calling·<code·class="inline">Fun</code>·on·the·value·to·get·a·new
1121 value.·If·<code·class="inline">Key</code>·is·not·present·in·the·dictionary,·<code·class="inline">Initial</code>·is·stored·as·the1121 value.·If·<code·class="inline">Key</code>·is·not·present·in·the·dictionary,·<code·class="inline">Initial</code>·is·stored·as·the
1122 first·value.·For·example,·<a·href="#append/3"><code·class="inline">append/3</code></a>·can·be·defined·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append</span><span·class="p"·data-group-id="4467563489-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="4467563489-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1122 first·value.·For·example,·<a·href="#append/3"><code·class="inline">append/3</code></a>·can·be·defined·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append</span><span·class="p"·data-group-id="8783622056-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Val</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="8783622056-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1123 ····</span><span·class="nf">update</span><span·class="p"·data-group-id="4467563489-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4467563489-3">(</span><span·class="n">Old</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·673,·SHA:·c2d525b3e31ed2e9349859f439712ae4b030fbd64cb8e9873ac27910cd680059·...·]-2">)</span><span·class="p">.</span></code></pre>1123 ····</span><span·class="nf">update</span><span·class="p"·data-group-id="8783622056-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="8783622056-3">(</span><span·class="n">Old</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·673,·SHA:·12b29be8487696825915a5d1ef27685f65c9894245aec2e566d4872419d5dd0d·...·]-2">)</span><span·class="p">.</span></code></pre>
1124 ··</section>1124 ··</section>
1125 </section>1125 </section>
1126 <section·class="detail"·id="update_counter/3">1126 <section·class="detail"·id="update_counter/3">
  
1127 ··<div·class="detail-header">1127 ··<div·class="detail-header">
1128 ····<a·href="#update_counter/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1128 ····<a·href="#update_counter/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1129 ······<i·class="ri-link-m"·aria-hidden="true"></i>1129 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1149, 16 lines modifiedOffset 1149, 16 lines modified
1149 ··········<pre·translate="no"><span·class="attribute">-spec</span>·update_counter(Key,·Increment,·Dict1)·->·Dict21149 ··········<pre·translate="no"><span·class="attribute">-spec</span>·update_counter(Key,·Increment,·Dict1)·->·Dict2
1150 ························when·Dict1·::·<a·href="#t:dict/2">dict</a>(Key,·Value),·Dict2·::·<a·href="#t:dict/2">dict</a>(Key,·Value),·Increment·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:number/0">number</a>().</pre>1150 ························when·Dict1·::·<a·href="#t:dict/2">dict</a>(Key,·Value),·Dict2·::·<a·href="#t:dict/2">dict</a>(Key,·Value),·Increment·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:number/0">number</a>().</pre>
  
1151 ······</div>1151 ······</div>
  
1152 <p>Adds·<code·class="inline">Increment</code>·to·the·value·associated·with·<code·class="inline">Key</code>·and·stores·this·value.·If1152 <p>Adds·<code·class="inline">Increment</code>·to·the·value·associated·with·<code·class="inline">Key</code>·and·stores·this·value.·If
1153 <code·class="inline">Key</code>·is·not·present·in·the·dictionary,·<code·class="inline">Increment</code>·is·stored·as·the·first1153 <code·class="inline">Key</code>·is·not·present·in·the·dictionary,·<code·class="inline">Increment</code>·is·stored·as·the·first
1154 value.</p><p>This·can·be·defined·as·follows,·but·is·faster:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">update_counter</span><span·class="p"·data-group-id="0262845067-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Incr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="0262845067-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1154 value.</p><p>This·can·be·defined·as·follows,·but·is·faster:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">update_counter</span><span·class="p"·data-group-id="3166350678-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Incr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D</span><span·class="p"·data-group-id="3166350678-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1155 ····</span><span·class="nf">update</span><span·class="p"·data-group-id="0262845067-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="0262845067-3">(</span><span·class="n">Old</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·462,·SHA:·13a6856a6682428c2a680a396bb50f6f1e3714eaf6129f7c9600e580ca206ae2·...·]-2">)</span><span·class="p">.</span></code></pre>1155 ····</span><span·class="nf">update</span><span·class="p"·data-group-id="3166350678-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3166350678-3">(</span><span·class="n">Old</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·462,·SHA:·6925dead116b5825b20575f2abfa6b480e60410042d90f2426ad02ae5e6a7863·...·]-2">)</span><span·class="p">.</span></code></pre>
1156 ··</section>1156 ··</section>
1157 </section>1157 </section>
  
1158 ····</div>1158 ····</div>
1159 ··</section>1159 ··</section>
  
1160 ····<footer·class="footer">1160 ····<footer·class="footer">
2.84 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/epp.html
    
Offset 136, 15 lines modifiedOffset 136, 15 lines modified
136 <code·class="inline">Latin-1</code>·and·<code·class="inline">UTF-8</code>,·where·the·case·of·the·characters·can·be·chosen·freely.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·coding:·utf-8</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·For·this·file·we·have·chosen·encoding·=·Latin-1</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·-*-·coding:·latin-1·-*-</span></code></pre><h2·id="module-error-information"·class="section-heading">136 <code·class="inline">Latin-1</code>·and·<code·class="inline">UTF-8</code>,·where·the·case·of·the·characters·can·be·chosen·freely.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·coding:·utf-8</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·For·this·file·we·have·chosen·encoding·=·Latin-1</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·-*-·coding:·latin-1·-*-</span></code></pre><h2·id="module-error-information"·class="section-heading">
137 ··<a·href="#module-error-information"·class="hover-link">137 ··<a·href="#module-error-information"·class="hover-link">
138 ····<i·class="ri-link-m"·aria-hidden="true"></i>138 ····<i·class="ri-link-m"·aria-hidden="true"></i>
139 ··</a>139 ··</a>
140 ··<span·class="text">Error·Information</span>140 ··<span·class="text">Error·Information</span>
141 </h2>141 </h2>
142 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O142 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O
143 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0658328327-1">{</span><span·class="n">ErrorLine</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="06583283[·...·truncated·by·diffoscope;·len:·369,·SHA:·62434f9373e94c90ce7bf2d6466a24d26b469d43ccc34b71513aa12f3adc7ccc·...·]-1">)</span></code></pre><h2·id="module-see-also"·class="section-heading">143 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8473905433-1">{</span><span·class="n">ErrorLine</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="84739054[·...·truncated·by·diffoscope;·len:·369,·SHA:·ce645bd070f369d344ae5023cf7b2dbdc5ffe6693e05dfd045f9426bc7d6b302·...·]-1">)</span></code></pre><h2·id="module-see-also"·class="section-heading">
144 ··<a·href="#module-see-also"·class="hover-link">144 ··<a·href="#module-see-also"·class="hover-link">
145 ····<i·class="ri-link-m"·aria-hidden="true"></i>145 ····<i·class="ri-link-m"·aria-hidden="true"></i>
146 ··</a>146 ··</a>
147 ··<span·class="text">See·Also</span>147 ··<span·class="text">See·Also</span>
148 </h2>148 </h2>
149 <p><a·href="erl_parse.html"><code·class="inline">erl_parse</code></a></p>149 <p><a·href="erl_parse.html"><code·class="inline">erl_parse</code></a></p>
150 ····</section>150 ····</section>
25.8 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/erl_error.html
    
Offset 313, 15 lines modifiedOffset 313, 15 lines modified
313 ······<div·class="specs">313 ······<div·class="specs">
  
314 ··········<pre·translate="no"><span·class="attribute">-type</span>·format_fun()·::·fun((<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·<a·href="#t:column/0">column</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:iolist/0">iolist</a>()).</pre>314 ··········<pre·translate="no"><span·class="attribute">-type</span>·format_fun()·::·fun((<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·<a·href="#t:column/0">column</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:iolist/0">iolist</a>()).</pre>
  
315 ······</div>315 ······</div>
  
316 <p>A·fun·used·to·format·function·arguments·for·BIF·and·function·calls.·By·default316 <p>A·fun·used·to·format·function·arguments·for·BIF·and·function·calls.·By·default
317 the·following·fun·will·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="2679953337-1">(</span><span·class="n">Term</span><span·class="p">,</span><span·class="w">·</span><span·class="n">I</span><span·class="p"·data-group-id="2679953337-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·418,·SHA:·556a87dd473e2ebb0995a7d9931d9e4c2aec69b0787a0594b92588035ea03f3d·...·]-2">)</span><span·class="w">·</span><span·class="k">end</span></code></pre>317 the·following·fun·will·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="4615961461-1">(</span><span·class="n">Term</span><span·class="p">,</span><span·class="w">·</span><span·class="n">I</span><span·class="p"·data-group-id="4615961461-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·418,·SHA:·3da883dddb004ad448e43ca443ef406c1e236305d3c5af7e395ce83cf0fb7661·...·]-2">)</span><span·class="w">·</span><span·class="k">end</span></code></pre>
318 ··</section>318 ··</section>
319 </section>319 </section>
320 <section·class="detail"·id="t:format_options/0">320 <section·class="detail"·id="t:format_options/0">
  
321 ··<div·class="detail-header">321 ··<div·class="detail-header">
322 ····<a·href="#t:format_options/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">322 ····<a·href="#t:format_options/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·type">
323 ······<i·class="ri-link-m"·aria-hidden="true"></i>323 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 434, 31 lines modifiedOffset 434, 31 lines modified
434 <p>This·callback·is·called·when·<a·href="#format_exception/4"><code·class="inline">format_exception/4</code></a>·or·similar·functionality·wants434 <p>This·callback·is·called·when·<a·href="#format_exception/4"><code·class="inline">format_exception/4</code></a>·or·similar·functionality·wants
435 to·provide·extra·information·about·an·error.·The·<code·class="inline">Module</code>:<code·class="inline">Function</code>·called·is435 to·provide·extra·information·about·an·error.·The·<code·class="inline">Module</code>:<code·class="inline">Function</code>·called·is
436 the·one·specificed·by·the·<code·class="inline">error_info</code>·map.</p><p>The·function·should·return·a·map·with·additional·information·about·what·have436 the·one·specificed·by·the·<code·class="inline">error_info</code>·map.</p><p>The·function·should·return·a·map·with·additional·information·about·what·have
437 caused·the·exception.·The·possible·keys·of·the·map·are:</p><ul><li><p><strong><code·class="inline">ArgumentPosition·=·pos_integer()</code></strong>·-·The·position·of·the·argument·that437 caused·the·exception.·The·possible·keys·of·the·map·are:</p><ul><li><p><strong><code·class="inline">ArgumentPosition·=·pos_integer()</code></strong>·-·The·position·of·the·argument·that
438 caused·the·error·starting·at·1.</p></li><li><p><strong><code·class="inline">general</code></strong>·-·An·error·that·is·not·associated·with·any·argument·caused·the438 caused·the·error·starting·at·1.</p></li><li><p><strong><code·class="inline">general</code></strong>·-·An·error·that·is·not·associated·with·any·argument·caused·the
439 error.</p></li><li><p><strong><code·class="inline">reason</code></strong>·-·If·the·<code·class="inline">Reason</code>·should·be·printed·differently·than·the·default439 error.</p></li><li><p><strong><code·class="inline">reason</code></strong>·-·If·the·<code·class="inline">Reason</code>·should·be·printed·differently·than·the·default
440 way.</p></li></ul><p>If·the·text·returned·includes·new-lines,·<a·href="#format_exception/4"><code·class="inline">format_exception/4</code></a>·will·indent·the440 way.</p></li></ul><p>If·the·text·returned·includes·new-lines,·<a·href="#format_exception/4"><code·class="inline">format_exception/4</code></a>·will·indent·the
441 text·correctly.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3343696826-1">(</span><span·class="ss">my_error_module</span><span·class="p"·data-group-id="3343696826-1">)</span><span·class="p">.</span><span·class="w">441 text·correctly.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8243497317-1">(</span><span·class="ss">my_error_module</span><span·class="p"·data-group-id="8243497317-1">)</span><span·class="p">.</span><span·class="w">
442 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3343696826-2">(</span><span·class="p"·data-group-id="3343696826-3">[</span><span·class="ss">atom_to_string</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">format_error</span><span·clas[·...·truncated·by·diffoscope;·len:·133,·SHA:·373971ed84f3ed3877e9375cbb13c0d0378938b09b5fff82a410f5fdbf3374fe·...·]-2">)</span><span·class="p">.</span><span·class="w">442 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8243497317-2">(</span><span·class="p"·data-group-id="8243497317-3">[</span><span·class="ss">atom_to_string</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">format_error</span><span·clas[·...·truncated·by·diffoscope;·len:·133,·SHA:·ebb185505c297528b96cd43da264f05489ef5adf5789fd9ef19e8fcf0dc605b8·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
443 </span><span·class="nf">atom_to_string</span><span·class="p"·data-group-id="3343696826-4">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="3343696826-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_atom</span><span·class="p"·data-group-id="3343696826-5">(</s[·...·truncated·by·diffoscope;·len:·71,·SHA:·670f4f8658baa18e1b99f71d46f46dcbdb230acc550c85b51b827d86951a5a85·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">443 </span><span·class="nf">atom_to_string</span><span·class="p"·data-group-id="8243497317-4">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="8243497317-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_atom</span><span·class="p"·data-group-id="8243497317-5">(</s[·...·truncated·by·diffoscope;·len:·71,·SHA:·b19bc1bf57e7f6feb39bb30fc984688f23eaf7de4fb5bd06ef035bfc59421e88·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
444 ··</span><span·class="nf">atom_to_list</span><span·class="p"·data-group-id="3343696826-6">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="3343696826-6">)</span><span·class="p">;</span><span·class="w">444 ··</span><span·class="nf">atom_to_list</span><span·class="p"·data-group-id="8243497317-6">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="8243497317-6">)</span><span·class="p">;</span><span·class="w">
445 </span><span·class="nf">atom_to_string</span><span·class="p"·data-group-id="3343696826-7">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="3343696826-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">445 </span><span·class="nf">atom_to_string</span><span·class="p"·data-group-id="8243497317-7">(</span><span·class="n">Arg</span><span·class="p"·data-group-id="8243497317-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
446 ··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="3343696826-8">(</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p"·data-group-id="3343696826-9">[</span><span·class="n">Arg</span><span·class="p"·data-group-id="3343696826-9">]</span><span·class="p">,</span><span·class="w">446 ··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">error</span><span·class="p"·data-group-id="8243497317-8">(</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p"·data-group-id="8243497317-9">[</span><span·class="n">Arg</span><span·class="p"·data-group-id="8243497317-9">]</span><span·class="p">,</span><span·class="w">
447 ···············</span><span·class="p"·data-group-id="3343696826-10">[</span><span·class="p"·data-group-id="3343696826-11">{</span><span·class="ss">error_info</span><span·class="p">,</span><span·class="p"·data-group-id="3343696826-12">#{</span><span·class="w">·</span><span·class="ss">module</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">447 ···············</span><span·class="p"·data-group-id="8243497317-10">[</span><span·class="p"·data-group-id="8243497317-11">{</span><span·class="ss">error_info</span><span·class="p">,</span><span·class="p"·data-group-id="8243497317-12">#{</span><span·class="w">·</span><span·class="ss">module</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">
448 ·······························</span><span·class="ss">cause</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3343696826-13">#{</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;should·be·an·atom&quot;</span><span·class="w">·</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·226,·SHA:·1f12b0d2843f1e10ff3219924b4bd3d639d43a704b9fd45483d22c1324bc67bb·...·]-8">)</span><span·class="p">.</span><span·class="w">448 ·······························</span><span·class="ss">cause</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8243497317-13">#{</span><span·class="w">·</span><span·class="mi">1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;should·be·an·atom&quot;</span><span·class="w">·</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·226,·SHA:·9b6f416e0d35b3e65a2602d79f2a119f838059b3b9f05169eee5b08e02c899cf·...·]-8">)</span><span·class="p">.</span><span·class="w">
  
449 </span><span·class="nf">format_error</span><span·class="p"·data-group-id="3343696826-14">(</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3343696826-15">[</span><span·class="p"·data-group-id="3343696826-16">{</span><span·class="p">_</span><span·class="n">M</span>[·...·truncated·by·diffoscope;·len:·393,·SHA:·d3a2d460fea8c0c76768d95c01a38940259e659809e3240a56212713196870a9·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">449 </span><span·class="nf">format_error</span><span·class="p"·data-group-id="8243497317-14">(</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8243497317-15">[</span><span·class="p"·data-group-id="8243497317-16">{</span><span·class="p">_</span><span·class="n">M</span>[·...·truncated·by·diffoscope;·len:·393,·SHA:·2bde6dfb7dd0f1629307b833630ea65916dec7ef44c1a965b16ae844f2ff5ceb·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
450 ··</span><span·class="n">ErrorInfo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="3343696826-17">(</span><span·class="ss">error_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3343696826-18">#{</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·74,·SHA:·685b953d178f8a6fd2bb90e221aad4353add7b83548b293446236918c694f6e6·...·]-17">)</span><span·class="p">,</span><span·class="w">450 ··</span><span·class="n">ErrorInfo</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="8243497317-17">(</span><span·class="ss">error_info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8243497317-18">#{</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·74,·SHA:·b8354b67d075f8b32a397c7d2aa37715a41a016ebd67af1e591fa5f4b0d48570·...·]-17">)</span><span·class="p">,</span><span·class="w">
451 ··</span><span·class="n">ErrorMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="3343696826-19">(</span><span·class="ss">cause</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorInfo</span><span·class="p"·data-group-id="3343696826-19">)</span><span·class="p">,</span><span·class="w">451 ··</span><span·class="n">ErrorMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="8243497317-19">(</span><span·class="ss">cause</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorInfo</span><span·class="p"·data-group-id="8243497317-19">)</span><span·class="p">,</span><span·class="w">
452 ··</span><span·class="n">ErrorMap</span><span·class="p"·data-group-id="3343696826-20">#{</span><span·class="w">·</span><span·class="ss">general</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;optional·general·information&quot;</span><span·class="p">,</span><span·class="w">452 ··</span><span·class="n">ErrorMap</span><span·class="p"·data-group-id="8243497317-20">#{</span><span·class="w">·</span><span·class="ss">general</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;optional·general·information&quot;</span><span·class="p">,</span><span·class="w">
453 ·············</span><span·class="ss">reason</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3343696826-21">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">:·</span><span·class="si">~p</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3343696826-22">[</span><span·class="o">?</s[·...·truncated·by·diffoscope;·len:·582,·SHA:·caaf1e719feedc168fffeac54302fb159ed9eae7f540643afaf360e5ca28fddc·...·]-1">)</span><span·class="p">.</span><span·class="w">453 ·············</span><span·class="ss">reason</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8243497317-21">(</span><span·class="s">&quot;</span><span·class="si">~p</span><span·class="s">:·</span><span·class="si">~p</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8243497317-22">[</span><span·class="o">?</s[·...·truncated·by·diffoscope;·len:·582,·SHA:·370f5a0c50f2f5ca1f1b501c57c41be2d9998428fc1b057bddfa930f3430aac6·...·]-1">)</span><span·class="p">.</span><span·class="w">
454 </span><span·class="p"·data-group-id="0926237442-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">my_error_module</span><span·class="p"·data-group-id="0926237442-2">}</span><span·class="gp·unselectable">454 </span><span·class="p"·data-group-id="5097928006-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">my_error_module</span><span·class="p"·data-group-id="5097928006-2">}</span><span·class="gp·unselectable">
455 2&gt;·</span><span·class="nc">my_error_module</span><span·class="p">:</span><span·class="nf">atom_to_string</span><span·class="p"·data-group-id="0926237442-3">(</span><span·class="mi">1</span><span·class="p"·data-group-id="0926237442-3">)</span><span·class="p">.</span><span·class="w">455 2&gt;·</span><span·class="nc">my_error_module</span><span·class="p">:</span><span·class="nf">atom_to_string</span><span·class="p"·data-group-id="5097928006-3">(</span><span·class="mi">1</span><span·class="p"·data-group-id="5097928006-3">)</span><span·class="p">.</span><span·class="w">
456 </span><span·class="gt">**·exception·error:·my_error_module:·badarg456 </span><span·class="gt">**·exception·error:·my_error_module:·badarg
457 ·····in·function··my_error_module:atom_to_string/1457 ·····in·function··my_error_module:atom_to_string/1
458 ········called·as·my_error_module:atom_to_string(1)458 ········called·as·my_error_module:atom_to_string(1)
459 ········***·argument·1:·should·be·an·atom459 ········***·argument·1:·should·be·an·atom
460 ········***·optional·general·information</span></code></pre>460 ········***·optional·general·information</span></code></pre>
461 ··</section>461 ··</section>
462 </section>462 </section>
Offset 538, 26 lines modifiedOffset 538, 26 lines modified
538 ······························StackTrace·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:stacktrace/0">erlang:stacktrace</a>(),538 ······························StackTrace·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:stacktrace/0">erlang:stacktrace</a>(),
539 ······························Options·::·<a·href="#t:format_options/0">format_options</a>().</pre>539 ······························Options·::·<a·href="#t:format_options/0">format_options</a>().</pre>
  
540 ······</div>540 ······</div>
  
541 <p>Format·the·error·reason·and·stack·back-trace·caught·using·<code·class="inline">try</code>·...·<code·class="inline">catch</code>·in541 <p>Format·the·error·reason·and·stack·back-trace·caught·using·<code·class="inline">try</code>·...·<code·class="inline">catch</code>·in
542 the·same·style·as·the·shell·formats·them.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">try</span><span·class="w">542 the·same·style·as·the·shell·formats·them.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">try</span><span·class="w">
543 ····</span><span·class="nf">do_something</span><span·class="p"·data-group-id="6047425686-1">(</span><span·class="p"·data-group-id="6047425686-1">)</span><span·class="w">543 ····</span><span·class="nf">do_something</span><span·class="p"·data-group-id="9647080542-1">(</span><span·class="p"·data-group-id="9647080542-1">)</span><span·class="w">
544 </span><span·class="k">catch</span><span·class="w">544 </span><span·class="k">catch</span><span·class="w">
545 ····</span><span·class="n">C</span><span·class="p">:</span><span·class="n">R</span><span·class="p">:</span><span·class="n">Stk</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">545 ····</span><span·class="n">C</span><span·class="p">:</span><span·class="n">R</span><span·class="p">:</span><span·class="n">Stk</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
546 ········</span><span·class="n">Message</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erl_error</span><span·class="p">:</span><span·class="nf">format_exception</span><span·class="p"·data-group-id="6047425686-2">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stk</span><span·class="p"·data-group-id="6047425686-2">)</span><span·class="p">,</span><span·class="w">546 ········</span><span·class="n">Message</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erl_error</span><span·class="p">:</span><span·class="nf">format_exception</span><span·class="p"·data-group-id="9647080542-2">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stk</span><span·class="p"·data-group-id="9647080542-2">)</span><span·class="p">,</span><span·class="w">
547 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6047425686-3">(</span><span·class="n">LogFile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~ts\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6047425686-4">[</span><span·class="n"[·...·truncated·by·diffoscope;·len:·109,·SHA:·81da40c364c3a11d3f84a129819d0b93e0359bbcfc150420ceb1a414494292a7·...·]-3">)</span><span·class="w">547 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9647080542-3">(</span><span·class="n">LogFile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~ts\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9647080542-4">[</span><span·class="n"[·...·truncated·by·diffoscope;·len:·109,·SHA:·21d62534c1e7995c5f214a4f5c8ab2db373f03e77a70fdbf7cf3fa9ab8a41797·...·]-3">)</span><span·class="w">
548 </span><span·class="k">end</span></code></pre><p>If·<code·class="inline">error_info</code>·is·provided·with·the·exception,·<code·class="inline">format_exception</code>·will·use·that548 </span><span·class="k">end</span></code></pre><p>If·<code·class="inline">error_info</code>·is·provided·with·the·exception,·<code·class="inline">format_exception</code>·will·use·that
549 information·to·provide·additional·information·about·the·exception.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">try</span><span·class="w">549 information·to·provide·additional·information·about·the·exception.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">try</span><span·class="w">
550 ··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">raise</span><span·class="p"·data-group-id="5342456688-1">(</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p"·data-group-id="5342456688-2">[</span><span·class="p"·data-group-id="5342456688-2">]</span><span·class="p">,</span><span·class="p"·data-group-id="5342456688-3">[</spa[·...·truncated·by·diffoscope;·len:·367,·SHA:·a3d69fc4701953052a966b7d600b05003b4dd3fe0eaff3a7c487b0d580a8e816·...·]-1">)</span><span·class="w">550 ··</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">raise</span><span·class="p"·data-group-id="5625556230-1">(</span><span·class="ss">badarg</span><span·class="p">,</span><span·class="p"·data-group-id="5625556230-2">[</span><span·class="p"·data-group-id="5625556230-2">]</span><span·class="p">,</span><span·class="p"·data-group-id="5625556230-3">[</spa[·...·truncated·by·diffoscope;·len:·367,·SHA:·211770c8ed3007b4780a5d7d674d902cec6c763b7ff91b9f8454684cd3b59f5b·...·]-1">)</span><span·class="w">
551 </span><span·class="k">catch</span><span·class="w">551 </span><span·class="k">catch</span><span·class="w">
552 ····</span><span·class="n">C</span><span·class="p">:</span><span·class="n">R</span><span·class="p">:</span><span·class="n">Stk</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">552 ····</span><span·class="n">C</span><span·class="p">:</span><span·class="n">R</span><span·class="p">:</span><span·class="n">Stk</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
553 ········</span><span·class="n">Message</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erl_error</span><span·class="p">:</span><span·class="nf">format_exception</span><span·class="p"·data-group-id="5342456688-6">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stk</span><span·class="p"·data-group-id="5342456688-6">)</span><span·class="p">,</span><span·class="w">553 ········</span><span·class="n">Message</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erl_error</span><span·class="p">:</span><span·class="nf">format_exception</span><span·class="p"·data-group-id="5625556230-6">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Stk</span><span·class="p"·data-group-id="5625556230-6">)</span><span·class="p">,</span><span·class="w">
554 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5342456688-7">(</span><span·class="n">LogFile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~ts\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5342456688-8">[</span><span·class="n">[·...·truncated·by·diffoscope;·len:·108,·SHA:·97f16404f7484723b033ac52001421fee960ae00d7e7d348dab087278a15019a·...·]-7">)</span><span·class="w">554 ········</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="5625556230-7">(</span><span·class="n">LogFile</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~ts\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5625556230-8">[</span><span·class="n">[·...·truncated·by·diffoscope;·len:·108,·SHA:·08a5511bcdf9b2c73381dc984f3aecd28d28326b16fa9cd5db4918f01fe907c1·...·]-7">)</span><span·class="w">
555 </span><span·class="k">end</span></code></pre><p>See·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#error/3"><code·class="inline">erlang:error/3</code></a>·for·details·on·how·to·raise·an·exception·with·<code·class="inline">error_info</code>555 </span><span·class="k">end</span></code></pre><p>See·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#error/3"><code·class="inline">erlang:error/3</code></a>·for·details·on·how·to·raise·an·exception·with·<code·class="inline">error_info</code>
556 included.</p>556 included.</p>
557 ··</section>557 ··</section>
558 </section>558 </section>
  
559 ····</div>559 ····</div>
560 ··</section>560 ··</section>
8.41 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/erl_eval.html
    
Offset 137, 35 lines modifiedOffset 137, 35 lines modified
137 ··<span·class="text">Local·Function·Handler</span>137 ··<span·class="text">Local·Function·Handler</span>
138 </h2>138 </h2>
139 <p>During·evaluation·of·a·function,·no·calls·can·be·made·to·local·functions.·An139 <p>During·evaluation·of·a·function,·no·calls·can·be·made·to·local·functions.·An
140 undefined·function·error·would·be·generated.·However,·the·optional·argument140 undefined·function·error·would·be·generated.·However,·the·optional·argument
141 <code·class="inline">LocalFunctionHandler</code>·can·be·used·to·define·a·function·that·is·called·when141 <code·class="inline">LocalFunctionHandler</code>·can·be·used·to·define·a·function·that·is·called·when
142 there·is·a·call·to·a·local·function.·The·argument·can·have·the·following142 there·is·a·call·to·a·local·function.·The·argument·can·have·the·following
143 formats:</p><ul><li><p><strong><code·class="inline">{value,Func}</code></strong>·-·This·defines·a·local·function·handler·that·is·called143 formats:</p><ul><li><p><strong><code·class="inline">{value,Func}</code></strong>·-·This·defines·a·local·function·handler·that·is·called
144 with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Func</span><span·class="p"·data-group-id="2138743122-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arguments</span><span·class="p"·data-group-id="2138743122-1">)</span></code></pre><p><code·class="inline">Name</code>·is·the·name·of·the·local·function·(an·atom)·and·<code·class="inline">Arguments</code>·is·a·list144 with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Func</span><span·class="p"·data-group-id="2158231938-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arguments</span><span·class="p"·data-group-id="2158231938-1">)</span></code></pre><p><code·class="inline">Name</code>·is·the·name·of·the·local·function·(an·atom)·and·<code·class="inline">Arguments</code>·is·a·list
145 of·the·<em>evaluated</em>·arguments.·The·function·handler·returns·the·value·of·the145 of·the·<em>evaluated</em>·arguments.·The·function·handler·returns·the·value·of·the
146 local·function.·In·this·case,·the·current·bindings·cannot·be·accessed.·To146 local·function.·In·this·case,·the·current·bindings·cannot·be·accessed.·To
147 signal·an·error,·the·function·handler·calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a>·with·a147 signal·an·error,·the·function·handler·calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a>·with·a
148 suitable·exit·value.</p></li><li><p><strong><code·class="inline">{eval,Func}</code></strong>·-·This·defines·a·local·function·handler·that·is·called·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Func</span><span·class="p"·data-group-id="0426696596-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arguments</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bindings</span><span·class="p"·data-group-id="0426696596-1">)</span></code></pre><p><code·class="inline">Name</code>·is·the·name·of·the·local·function·(an·atom),·<code·class="inline">Arguments</code>·is·a·list·of148 suitable·exit·value.</p></li><li><p><strong><code·class="inline">{eval,Func}</code></strong>·-·This·defines·a·local·function·handler·that·is·called·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Func</span><span·class="p"·data-group-id="7874109212-1">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arguments</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bindings</span><span·class="p"·data-group-id="7874109212-1">)</span></code></pre><p><code·class="inline">Name</code>·is·the·name·of·the·local·function·(an·atom),·<code·class="inline">Arguments</code>·is·a·list·of
149 the·<em>unevaluated</em>·arguments,·and·<code·class="inline">Bindings</code>·are·the·current·variable·bindings.149 the·<em>unevaluated</em>·arguments,·and·<code·class="inline">Bindings</code>·are·the·current·variable·bindings.
150 The·function·handler·returns:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4312805432-1">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="n">Value</span><span·class="p">,</span><span·class="n">NewBindings</span><span·class="p"·data-group-id="4312805432-1">}</span></code></pre><p><code·class="inline">Value</code>·is·the·value·of·the·local·function·and·<code·class="inline">NewBindings</code>·are·the·updated150 The·function·handler·returns:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9219493556-1">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="n">Value</span><span·class="p">,</span><span·class="n">NewBindings</span><span·class="p"·data-group-id="9219493556-1">}</span></code></pre><p><code·class="inline">Value</code>·is·the·value·of·the·local·function·and·<code·class="inline">NewBindings</code>·are·the·updated
151 variable·bindings.·In·this·case,·the·function·handler·must·itself·evaluate·all151 variable·bindings.·In·this·case,·the·function·handler·must·itself·evaluate·all
152 the·function·arguments·and·manage·the·bindings.·To·signal·an·error,·the152 the·function·arguments·and·manage·the·bindings.·To·signal·an·error,·the
153 function·handler·calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a>·with·a·suitable·exit·value.</p></li><li><p><strong><code·class="inline">none</code></strong>·-·There·is·no·local·function·handler.</p></li></ul><h2·id="module-non-local-function-handler"·class="section-heading">153 function·handler·calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a>·with·a·suitable·exit·value.</p></li><li><p><strong><code·class="inline">none</code></strong>·-·There·is·no·local·function·handler.</p></li></ul><h2·id="module-non-local-function-handler"·class="section-heading">
154 ··<a·href="#module-non-local-function-handler"·class="hover-link">154 ··<a·href="#module-non-local-function-handler"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">Non-Local·Function·Handler</span>157 ··<span·class="text">Non-Local·Function·Handler</span>
158 </h2>158 </h2>
159 <p>The·optional·argument·<code·class="inline">NonLocalFunctionHandler</code>·can·be·used·to·define·a·function159 <p>The·optional·argument·<code·class="inline">NonLocalFunctionHandler</code>·can·be·used·to·define·a·function
160 that·is·called·in·the·following·cases:</p><ul><li>A·functional·object·(fun)·is·called.</li><li>A·built-in·function·is·called.</li><li>A·function·is·called·using·the·<code·class="inline">M:F</code>·syntax,·where·<code·class="inline">M</code>·and·<code·class="inline">F</code>·are·atoms·or160 that·is·called·in·the·following·cases:</p><ul><li>A·functional·object·(fun)·is·called.</li><li>A·built-in·function·is·called.</li><li>A·function·is·called·using·the·<code·class="inline">M:F</code>·syntax,·where·<code·class="inline">M</code>·and·<code·class="inline">F</code>·are·atoms·or
161 expressions.</li><li>An·operator·<code·class="inline">Op/A</code>·is·called·(this·is·handled·as·a·call·to·function161 expressions.</li><li>An·operator·<code·class="inline">Op/A</code>·is·called·(this·is·handled·as·a·call·to·function
162 <code·class="inline">erlang:Op/A</code>).</li></ul><p>Exceptions·are·calls·to·<code·class="inline">erlang:apply/2,3</code>;·neither·of·the·function·handlers·are162 <code·class="inline">erlang:Op/A</code>).</li></ul><p>Exceptions·are·calls·to·<code·class="inline">erlang:apply/2,3</code>;·neither·of·the·function·handlers·are
163 called·for·such·calls.·The·argument·can·have·the·following·formats:</p><ul><li><p><strong><code·class="inline">{value,Func}</code></strong>·-·This·defines·a·non-local·function·handler.·The·function163 called·for·such·calls.·The·argument·can·have·the·following·formats:</p><ul><li><p><strong><code·class="inline">{value,Func}</code></strong>·-·This·defines·a·non-local·function·handler.·The·function
164 may·be·called·with·two·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Func</span><span·class="p"·data-group-id="1749142207-1">(</span><span·class="n">FuncSpec</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arguments</span><span·class="p"·data-group-id="1749142207-1">)</span></code></pre><p>or·three·arguments:</p><pre><code·class="makeup·erlang[·...·truncated·by·diffoscope;·len:·324,·SHA:·fbd7f85a901cf5e0d412bf52fdfee8e6987a945083399b90cc34a0b0a5a04062·...·]-1">)</span></code></pre><p><code·class="inline">Anno</code>·is·the·<a·href="erl_anno.html#t:anno/0"><code·class="inline">erl_anno:anno()</code></a>·of·the·node,·<code·class="inline">FuncSpec</code>164 may·be·called·with·two·arguments:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Func</span><span·class="p"·data-group-id="6562787889-1">(</span><span·class="n">FuncSpec</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arguments</span><span·class="p"·data-group-id="6562787889-1">)</span></code></pre><p>or·three·arguments:</p><pre><code·class="makeup·erlang[·...·truncated·by·diffoscope;·len:·324,·SHA:·d99ba6050e818c8fe81ac0331e79ca6c44d7d27a3405f710b381659c7b9fcba2·...·]-1">)</span></code></pre><p><code·class="inline">Anno</code>·is·the·<a·href="erl_anno.html#t:anno/0"><code·class="inline">erl_anno:anno()</code></a>·of·the·node,·<code·class="inline">FuncSpec</code>
165 is·the·name·of·the·function·on·the·form·<code·class="inline">{Module,Function}</code>·or·a·fun,·and165 is·the·name·of·the·function·on·the·form·<code·class="inline">{Module,Function}</code>·or·a·fun,·and
166 <code·class="inline">Arguments</code>·is·a·list·of·the·<em>evaluated</em>·arguments.·The·function·handler166 <code·class="inline">Arguments</code>·is·a·list·of·the·<em>evaluated</em>·arguments.·The·function·handler
167 returns·the·value·of·the·function.·To·signal·an·error,·the·function·handler167 returns·the·value·of·the·function.·To·signal·an·error,·the·function·handler
168 calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a>·with·a·suitable·exit·value.</p></li><li><p><strong><code·class="inline">none</code></strong>·-·There·is·no·non-local·function·handler.</p></li></ul><blockquote><h4·class="info">Note</h4><p>For·calls·such·as·<code·class="inline">erlang:apply(Fun,·Args)</code>·or168 calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#exit/1"><code·class="inline">exit/1</code></a>·with·a·suitable·exit·value.</p></li><li><p><strong><code·class="inline">none</code></strong>·-·There·is·no·non-local·function·handler.</p></li></ul><blockquote><h4·class="info">Note</h4><p>For·calls·such·as·<code·class="inline">erlang:apply(Fun,·Args)</code>·or
169 <code·class="inline">erlang:apply(Module,·Function,·Args)</code>,·the·call·of·the·non-local·function169 <code·class="inline">erlang:apply(Module,·Function,·Args)</code>,·the·call·of·the·non-local·function
170 handler·corresponding·to·the·call·to·<code·class="inline">erlang:apply/2,3</code>·itself170 handler·corresponding·to·the·call·to·<code·class="inline">erlang:apply/2,3</code>·itself
171 (<code·class="inline">Func({erlang,·apply},·[Fun,·Args])</code>·or171 (<code·class="inline">Func({erlang,·apply},·[Fun,·Args])</code>·or
2.44 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/erl_lint.html
    
Offset 135, 15 lines modifiedOffset 135, 15 lines modified
135 your·own·Erlang·compiler.</p><h2·id="module-error-information"·class="section-heading">135 your·own·Erlang·compiler.</p><h2·id="module-error-information"·class="section-heading">
136 ··<a·href="#module-error-information"·class="hover-link">136 ··<a·href="#module-error-information"·class="hover-link">
137 ····<i·class="ri-link-m"·aria-hidden="true"></i>137 ····<i·class="ri-link-m"·aria-hidden="true"></i>
138 ··</a>138 ··</a>
139 ··<span·class="text">Error·Information</span>139 ··<span·class="text">Error·Information</span>
140 </h2>140 </h2>
141 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O141 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O
142 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4114009286-1">{</span><span·class="n">ErrorLine</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="41140092[·...·truncated·by·diffoscope;·len:·369,·SHA:·3ead8f72f2c6107ed7056cc4d8195f7d76403345d22dc8aa44f995c5da455593·...·]-1">)</span></code></pre><h2·id="module-see-also"·class="section-heading">142 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9458998069-1">{</span><span·class="n">ErrorLine</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="94589980[·...·truncated·by·diffoscope;·len:·369,·SHA:·49481c4a3ef8768183dd5beb950cb9ac18ac11b6c0291e760aabe657ee25bcba·...·]-1">)</span></code></pre><h2·id="module-see-also"·class="section-heading">
143 ··<a·href="#module-see-also"·class="hover-link">143 ··<a·href="#module-see-also"·class="hover-link">
144 ····<i·class="ri-link-m"·aria-hidden="true"></i>144 ····<i·class="ri-link-m"·aria-hidden="true"></i>
145 ··</a>145 ··</a>
146 ··<span·class="text">See·Also</span>146 ··<span·class="text">See·Also</span>
147 </h2>147 </h2>
148 <p><a·href="epp.html"><code·class="inline">epp</code></a>,·<a·href="erl_parse.html"><code·class="inline">erl_parse</code></a></p>148 <p><a·href="epp.html"><code·class="inline">epp</code></a>,·<a·href="erl_parse.html"><code·class="inline">erl_parse</code></a></p>
149 ····</section>149 ····</section>
2.59 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/erl_parse.html
    
Offset 134, 15 lines modifiedOffset 134, 15 lines modified
134 (see·the·<a·href="erl_scan.html"><code·class="inline">erl_scan</code></a>)·module.</p><h2·id="module-error-information"·class="section-heading">134 (see·the·<a·href="erl_scan.html"><code·class="inline">erl_scan</code></a>)·module.</p><h2·id="module-error-information"·class="section-heading">
135 ··<a·href="#module-error-information"·class="hover-link">135 ··<a·href="#module-error-information"·class="hover-link">
136 ····<i·class="ri-link-m"·aria-hidden="true"></i>136 ····<i·class="ri-link-m"·aria-hidden="true"></i>
137 ··</a>137 ··</a>
138 ··<span·class="text">Error·Information</span>138 ··<span·class="text">Error·Information</span>
139 </h2>139 </h2>
140 <p>ErrorInfo·is·the·standard·ErrorInfo·structure·that·is·returned·from·all·I/O·modules.140 <p>ErrorInfo·is·the·standard·ErrorInfo·structure·that·is·returned·from·all·I/O·modules.
141 The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2875336546-1">{</span><span·class="n">ErrorLine</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="287533654[·...·truncated·by·diffoscope;·len:·368,·SHA:·c83a2e5a436a0bb9063e430cd605a809a8b0e74be1924b56cfb57ee3ec54aa13·...·]-1">)</span></code></pre><h2·id="module-see-also"·class="section-heading">141 The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2177018957-1">{</span><span·class="n">ErrorLine</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="217701895[·...·truncated·by·diffoscope;·len:·368,·SHA:·c40eb1ad96b0fca816a1e2448e5132047d5a91256edb76cd218fc2832954e37e·...·]-1">)</span></code></pre><h2·id="module-see-also"·class="section-heading">
142 ··<a·href="#module-see-also"·class="hover-link">142 ··<a·href="#module-see-also"·class="hover-link">
143 ····<i·class="ri-link-m"·aria-hidden="true"></i>143 ····<i·class="ri-link-m"·aria-hidden="true"></i>
144 ··</a>144 ··</a>
145 ··<span·class="text">See·Also</span>145 ··<span·class="text">See·Also</span>
146 </h2>146 </h2>
147 <p><a·href="erl_anno.html"><code·class="inline">erl_anno</code></a>,·<a·href="erl_scan.html"><code·class="inline">erl_scan</code></a>,·<a·href="io.html"><code·class="inline">io</code></a>,·section·<a·href="../../../../erts-15.0.1/doc/html/absform.html">The·Abstract·Format</a>147 <p><a·href="erl_anno.html"><code·class="inline">erl_anno</code></a>,·<a·href="erl_scan.html"><code·class="inline">erl_scan</code></a>,·<a·href="io.html"><code·class="inline">io</code></a>,·section·<a·href="../../../../erts-15.0.1/doc/html/absform.html">The·Abstract·Format</a>
148 in·the·ERTS·User's·Guide.</p>148 in·the·ERTS·User's·Guide.</p>
2.46 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/erl_scan.html
    
Offset 132, 15 lines modifiedOffset 132, 15 lines modified
132 tokens.</p><h2·id="module-error-information"·class="section-heading">132 tokens.</p><h2·id="module-error-information"·class="section-heading">
133 ··<a·href="#module-error-information"·class="hover-link">133 ··<a·href="#module-error-information"·class="hover-link">
134 ····<i·class="ri-link-m"·aria-hidden="true"></i>134 ····<i·class="ri-link-m"·aria-hidden="true"></i>
135 ··</a>135 ··</a>
136 ··<span·class="text">Error·Information</span>136 ··<span·class="text">Error·Information</span>
137 </h2>137 </h2>
138 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O138 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O
139 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0426693965-1">{</span><span·class="n">ErrorLocation</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="0426[·...·truncated·by·diffoscope;·len:·373,·SHA:·9bd1dbb7305077810dec8452c62b8c61b83d1d784bcd3b87c96ced1972353b60·...·]-1">)</span></code></pre><h2·id="module-notes"·class="section-heading">139 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4625206854-1">{</span><span·class="n">ErrorLocation</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="4625[·...·truncated·by·diffoscope;·len:·373,·SHA:·60ce0ad8d6e4bbc7e4087e04baa6301e1392b0466856221279ed51e15c48d0e2·...·]-1">)</span></code></pre><h2·id="module-notes"·class="section-heading">
140 ··<a·href="#module-notes"·class="hover-link">140 ··<a·href="#module-notes"·class="hover-link">
141 ····<i·class="ri-link-m"·aria-hidden="true"></i>141 ····<i·class="ri-link-m"·aria-hidden="true"></i>
142 ··</a>142 ··</a>
143 ··<span·class="text">Notes</span>143 ··<span·class="text">Notes</span>
144 </h2>144 </h2>
145 <p>The·continuation·of·the·first·call·to·the·re-entrant·input·functions·must·be145 <p>The·continuation·of·the·first·call·to·the·re-entrant·input·functions·must·be
146 <code·class="inline">[]</code>.·For·a·complete·description·of·how·the·re-entrant·input·scheme·works,·see146 <code·class="inline">[]</code>.·For·a·complete·description·of·how·the·re-entrant·input·scheme·works,·see
13.2 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/erl_tar.html
    
Offset 1287, 22 lines modifiedOffset 1287, 22 lines modified
1287 storage·handling·function.</p><p>Parameter·<code·class="inline">UserData</code>·is·typically·the·result·of·opening·a·low-level·structure1287 storage·handling·function.</p><p>Parameter·<code·class="inline">UserData</code>·is·typically·the·result·of·opening·a·low-level·structure
1288 like·a·file·descriptor·or·an·SFTP·channel·id.·The·different·<code·class="inline">Fun</code>·clauses1288 like·a·file·descriptor·or·an·SFTP·channel·id.·The·different·<code·class="inline">Fun</code>·clauses
1289 operate·on·that·very·term.</p><p>The·following·are·the·fun·clauses·parameter·lists:</p><ul><li><p><strong><code·class="inline">(write,·{UserData,DataToWrite})</code></strong>·-·Writes·term·<code·class="inline">DataToWrite</code>·using1289 operate·on·that·very·term.</p><p>The·following·are·the·fun·clauses·parameter·lists:</p><ul><li><p><strong><code·class="inline">(write,·{UserData,DataToWrite})</code></strong>·-·Writes·term·<code·class="inline">DataToWrite</code>·using
1290 <code·class="inline">UserData</code>.</p></li><li><p><strong><code·class="inline">(close,·UserData)</code></strong>·-·Closes·the·access.</p></li><li><p><strong><code·class="inline">(read2,·{UserData,Size})</code></strong>·-·Reads·using·<code·class="inline">UserData</code>·but·only·<code·class="inline">Size</code>·bytes.1290 <code·class="inline">UserData</code>.</p></li><li><p><strong><code·class="inline">(close,·UserData)</code></strong>·-·Closes·the·access.</p></li><li><p><strong><code·class="inline">(read2,·{UserData,Size})</code></strong>·-·Reads·using·<code·class="inline">UserData</code>·but·only·<code·class="inline">Size</code>·bytes.
1291 Notice·that·there·is·only·an·arity-2·read·function,·not·an·arity-1·function.</p></li><li><p><strong><code·class="inline">(position,{UserData,Position})</code></strong>·-·Sets·the·position·of·<code·class="inline">UserData</code>·as1291 Notice·that·there·is·only·an·arity-2·read·function,·not·an·arity-1·function.</p></li><li><p><strong><code·class="inline">(position,{UserData,Position})</code></strong>·-·Sets·the·position·of·<code·class="inline">UserData</code>·as
1292 defined·for·files·in·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#position/2"><code·class="inline">file:position/2</code></a></p></li></ul><p><em>Example:</em></p><p>The·following·is·a·complete·<code·class="inline">Fun</code>·parameter·for·reading·and·writing·on·files1292 defined·for·files·in·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#position/2"><code·class="inline">file:position/2</code></a></p></li></ul><p><em>Example:</em></p><p>The·following·is·a·complete·<code·class="inline">Fun</code>·parameter·for·reading·and·writing·on·files
1293 using·the·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">ExampleFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">1293 using·the·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">ExampleFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
1294 ···</span><span·class="nf">fun</span><span·class="p"·data-group-id="3042276704-1">(</span><span·class="ss">write</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3042276704-2">{</span><span·class="n">Fd</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·429,·SHA:·6928166b7a7b191d8b3916493e8ddb74e1815a84e1dc15e87bfb03ba1cab2e34·...·]4-3">)</span><span·class="p">;</span><span·class="w">1294 ···</span><span·class="nf">fun</span><span·class="p"·data-group-id="0076169624-1">(</span><span·class="ss">write</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0076169624-2">{</span><span·class="n">Fd</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·429,·SHA:·a11c02233fdf9af04ef1fdd3b445cb85221d8a762f2989ed3b4ced365f56c80c·...·]4-3">)</span><span·class="p">;</span><span·class="w">
1295 ······</span><span·class="p"·data-group-id="3042276704-4">(</span><span·class="ss">position</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3042276704-5">{</span><span·class="n">Fd</span><span·class="p">,</span><span·class="n">Pos</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·432,·SHA:·8041f390616a55157453b7a7d8a3cff269f6af534484c1588bf5c7640f4fec31·...·]4-6">)</span><span·class="p">;</span><span·class="w">1295 ······</span><span·class="p"·data-group-id="0076169624-4">(</span><span·class="ss">position</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0076169624-5">{</span><span·class="n">Fd</span><span·class="p">,</span><span·class="n">Pos</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·432,·SHA:·0bc444d150e859720f13126718ec43823c2e2a6088e65f501d52512875eaa0eb·...·]4-6">)</span><span·class="p">;</span><span·class="w">
1296 ······</span><span·class="p"·data-group-id="3042276704-7">(</span><span·class="ss">read2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3042276704-8">{</span><span·class="n">Fd</span><span·class="p">,</span><span·class="n">Size</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·427,·SHA:·5bbea258dbff21d2be31275c4de96ad6376f6249cbac771cec82e06a68389d60·...·]4-9">)</span><span·class="p">;</span><span·class="w">1296 ······</span><span·class="p"·data-group-id="0076169624-7">(</span><span·class="ss">read2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0076169624-8">{</span><span·class="n">Fd</span><span·class="p">,</span><span·class="n">Size</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·427,·SHA:·c2f5fe7c513f82cc2296ce554217871fa5f8e163927fce75a3a89d22207a7298·...·]4-9">)</span><span·class="p">;</span><span·class="w">
1297 ······</span><span·class="p"·data-group-id="3042276704-10">(</span><span·class="ss">close</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="3042276704-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·199,·SHA:·d1ef3b0d785f1b8346ce68dc8227f1c77219572417c8b8da6f6ea9ca03ef9b53·...·]4-11">)</span><span·class="w">1297 ······</span><span·class="p"·data-group-id="0076169624-10">(</span><span·class="ss">close</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Fd</span><span·class="p"·data-group-id="0076169624-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·199,·SHA:·c90c98b6341c2ef75ebe0b73b61e68baa693e5099b4cebddcb2126d24b88b099·...·]4-11">)</span><span·class="w">
1298 ···</span><span·class="k">end</span></code></pre><p>Here·<code·class="inline">Fd</code>·was·specified·to·function·<a·href="#init/3"><code·class="inline">init/3</code></a>·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8778490148-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Fd</span><span·class="p"·data-group-id="8778490148-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·[·...·truncated·by·diffoscope;·len:·287,·SHA:·bdf5dec8e269d817a620392dc7b98091e03098302fdd7948c56f3d94b2b7f06c·...·]-2">)</span><span·class="p">.</span><span·class="w">1298 ···</span><span·class="k">end</span></code></pre><p>Here·<code·class="inline">Fd</code>·was·specified·to·function·<a·href="#init/3"><code·class="inline">init/3</code></a>·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3939056337-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Fd</span><span·class="p"·data-group-id="3939056337-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·[·...·truncated·by·diffoscope;·len:·287,·SHA:·802ee4588cb5d8a9894f29af8fe1bf4c9c28ba1ec8f414fb5db7cc2c34f7d568·...·]-2">)</span><span·class="p">.</span><span·class="w">
1299 </span><span·class="p"·data-group-id="8778490148-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TarDesc</span><span·class="p"·data-group-id="8778490148-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erl_tar</spa[·...·truncated·by·diffoscope;·len:·974,·SHA:·cd35edd6dfccf189fffcd62f40468a8089cb6e19d0d58c13ec6951bdd2208143·...·]-1">)</span><span·class="p">,</span><span·class="w">1299 </span><span·class="p"·data-group-id="3939056337-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TarDesc</span><span·class="p"·data-group-id="3939056337-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">erl_tar</spa[·...·truncated·by·diffoscope;·len:·974,·SHA:·74d254d067f1cbf6f7441ce1ef9bdf27b6350690fe0f6d5cf9fc8a12be07a829·...·]-1">)</span><span·class="p">,</span><span·class="w">
1300 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">1300 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">,</span><span·class="w">
1301 </span><span·class="nc">erl_tar</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="8179458600-2">(</span><span·class="n">TarDesc</span><span·class="p"·data-group-id="8179458600-2">)</span></code></pre><p>When·the·<code·class="inline">erl_tar</code>·core·wants·to,·for·example,·write·a·piece·of·<code·class="inline">Data</code>,·it·would1301 </span><span·class="nc">erl_tar</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="9886115382-2">(</span><span·class="n">TarDesc</span><span·class="p"·data-group-id="9886115382-2">)</span></code></pre><p>When·the·<code·class="inline">erl_tar</code>·core·wants·to,·for·example,·write·a·piece·of·<code·class="inline">Data</code>,·it·would
1302 call·<code·class="inline">ExampleFun(write,·{UserData,Data})</code>.</p><blockquote><h4·class="info">Note</h4><p>This·example·with·the·<code·class="inline">file</code>·module·operations·is·not·necessary·to·use1302 call·<code·class="inline">ExampleFun(write,·{UserData,Data})</code>.</p><blockquote><h4·class="info">Note</h4><p>This·example·with·the·<code·class="inline">file</code>·module·operations·is·not·necessary·to·use
1303 directly,·as·that·is·what·function·<a·href="#open/2"><code·class="inline">open/2</code></a>·in·principle·does.</p></blockquote><blockquote><h4·class="warning">Warning</h4><p>The·<code·class="inline">TarDescriptor</code>·term·is·not·a·file·descriptor.·You·are·advised·not·to·rely1303 directly,·as·that·is·what·function·<a·href="#open/2"><code·class="inline">open/2</code></a>·in·principle·does.</p></blockquote><blockquote><h4·class="warning">Warning</h4><p>The·<code·class="inline">TarDescriptor</code>·term·is·not·a·file·descriptor.·You·are·advised·not·to·rely
1304 on·the·specific·contents·of·this·term,·as·it·can·change·in·future·Erlang/OTP1304 on·the·specific·contents·of·this·term,·as·it·can·change·in·future·Erlang/OTP
1305 releases·when·more·features·are·added·to·this·module.</p></blockquote>1305 releases·when·more·features·are·added·to·this·module.</p></blockquote>
1306 ··</section>1306 ··</section>
1307 </section>1307 </section>
1308 <section·class="detail"·id="open/2">1308 <section·class="detail"·id="open/2">
70.9 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/escript.html
    
Offset 518, 75 lines modifiedOffset 518, 75 lines modified
518 <code·class="inline">shebang</code>·defaults·to·<code·class="inline">&quot;/usr/bin/env·escript&quot;</code>.·The·<code·class="inline">comment</code>·defaults·to518 <code·class="inline">shebang</code>·defaults·to·<code·class="inline">&quot;/usr/bin/env·escript&quot;</code>.·The·<code·class="inline">comment</code>·defaults·to
519 <code·class="inline">&quot;This·is·an·-*-·erlang·-*-·file&quot;</code>.·The·created·escript·can·either·be·returned519 <code·class="inline">&quot;This·is·an·-*-·erlang·-*-·file&quot;</code>.·The·created·escript·can·either·be·returned
520 as·a·binary·or·written·to·file.</p><p>As·an·example·of·how·the·function·can·be·used,·we·create·an·interpreted·escript520 as·a·binary·or·written·to·file.</p><p>As·an·example·of·how·the·function·can·be·used,·we·create·an·interpreted·escript
521 that·uses·<code·class="inline">emu_args</code>·to·set·some·emulator·flag.·In·this·case,·it·happens·to·set521 that·uses·<code·class="inline">emu_args</code>·to·set·some·emulator·flag.·In·this·case,·it·happens·to·set
522 number·of·schedulers·with·<code·class="inline">+S3</code>.·We·also·extract·the·different·sections·from·the522 number·of·schedulers·with·<code·class="inline">+S3</code>.·We·also·extract·the·different·sections·from·the
523 newly·created·script:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Source</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;%%·Demo\nmain(_Args)·-&gt;\n····io:format(\&quot;</span><span·class="si">~p</span><span·class="s">\&quot;,[erlang:system_info(schedulers)]).\n&quot;</span><span·class="p">.</span><span·class="w">523 newly·created·script:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Source</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;%%·Demo\nmain(_Args)·-&gt;\n····io:format(\&quot;</span><span·class="si">~p</span><span·class="s">\&quot;,[erlang:system_info(schedulers)]).\n&quot;</span><span·class="p">.</span><span·class="w">
524 </span><span·class="s">&quot;%%·Demo\nmain(_Args)·-&gt;\n····io:format(erlang:system_info(schedulers)).\n&quot;</span><span·class="gp·unselectable">524 </span><span·class="s">&quot;%%·Demo\nmain(_Args)·-&gt;\n····io:format(erlang:system_info(schedulers)).\n&quot;</span><span·class="gp·unselectable">
525 &gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0587047019-1">(</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0587047019-2">[</span><span·class="n">Source</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·76,·SHA:·f919b4d299678bdd053654329a67d15b09745e23b09d5325f0824b6528e7fc52·...·]-1">)</span><span·class="p">.</span><span·class="w">525 &gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9428791314-1">(</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="s">\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9428791314-2">[</span><span·class="n">Source</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·76,·SHA:·d11f34bd669b4e4c4a346beb884ce134877527595615b58459e0acd6ca4b8387·...·]-1">)</span><span·class="p">.</span><span·class="w">
526 </span><span·class="c1">%%·Demo</span><span·class="w">526 </span><span·class="c1">%%·Demo</span><span·class="w">
527 </span><span·class="nf">main</span><span·class="p"·data-group-id="0587047019-3">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="0587047019-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">527 </span><span·class="nf">main</span><span·class="p"·data-group-id="9428791314-3">(</span><span·class="p">_</span><span·class="n">Args</span><span·class="p"·data-group-id="9428791314-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
528 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0587047019-4">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="0587047019-5">(</span><span·class="ss">schedulers</span><span·class="p"·data-group-id="0587047019-5">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·baa42ced14d7b73c21fb1aecca31e3e0fe8f0b5dd7c371b3d65192feae3c7dd9·...·]-4">)</span><span·class="p">.</span><span·class="w">528 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="9428791314-4">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="9428791314-5">(</span><span·class="ss">schedulers</span><span·class="p"·data-group-id="9428791314-5">)</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·35b560076fd838520c977a30a1023c232244e10bde7cb9a6b97491c04dc16228·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
529 </span><span·class="ss">ok</span><span·class="gp·unselectable">529 </span><span·class="ss">ok</span><span·class="gp·unselectable">
530 &gt;·</span><span·class="p"·data-group-id="0587047019-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="0587047019-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·630,·SHA:·941c8dfb8b689059cd205adcb95770ab80f52f120c1fe5a86b6d8e66c8ef6a69·...·]-9">}</span><span·class="p">,</span><span·class="w">530 &gt;·</span><span·class="p"·data-group-id="9428791314-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="9428791314-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·630,·SHA:·df6d5187e9c6bebf0c51542c47cb1461692beee69528b9b6bb2c624108644da5·...·]-9">}</span><span·class="p">,</span><span·class="w">
531 ······································</span><span·class="p"·data-group-id="0587047019-10">{</span><span·class="ss">source</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="0587047019-11">(</span><span·class="n">Source</span><span·class="p"·data-group-id="058[·...·truncated·by·diffoscope;·len:·168,·SHA:·9c9c31de78d55de8dd0691170dce018ef66498cd327b994bb27a5f051c7dd921·...·]-7">)</span><span·class="p">.</span><span·class="w">531 ······································</span><span·class="p"·data-group-id="9428791314-10">{</span><span·class="ss">source</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="9428791314-11">(</span><span·class="n">Source</span><span·class="p"·data-group-id="942[·...·truncated·by·diffoscope;·len:·168,·SHA:·4dc8baffeb1c41478b1b85ca65b130261c48080390a7861f01e108798d4ed773·...·]-7">)</span><span·class="p">.</span><span·class="w">
532 </span><span·class="p"·data-group-id="0587047019-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;#!/usr/bin/env·escript\n%%·This·is·an·-*-·erlang·-*-·file\n%%!+S3&quot;</span><span·class="p">.</span><span·class="p">.</span><spa[·...·truncated·by·diffoscope;·len:·92,·SHA:·c4d7132526fa289301203cdeea2c8006f8186f4ae7bcf5d3399a9f311408a228·...·]-12">}</span><span·class="gp·unselectable">532 </span><span·class="p"·data-group-id="9428791314-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;#!/usr/bin/env·escript\n%%·This·is·an·-*-·erlang·-*-·file\n%%!+S3&quot;</span><span·class="p">.</span><span·class="p">.</span><spa[·...·truncated·by·diffoscope;·len:·92,·SHA:·65ad6dbca1cbd56210562c10d2563b551797a007c34b5fe3a9177c2af7cca079·...·]-12">}</span><span·class="gp·unselectable">
533 &gt;·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write_file</span><span·class="p"·data-group-id="0587047019-13">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="0587047019-13">)</span><span·class="p">.</span><span·class="w">533 &gt;·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write_file</span><span·class="p"·data-group-id="9428791314-13">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·class="p"·data-group-id="9428791314-13">)</span><span·class="p">.</span><span·class="w">
534 </span><span·class="ss">ok</span><span·class="gp·unselectable">534 </span><span·class="ss">ok</span><span·class="gp·unselectable">
535 &gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="0587047019-14">(</span><span·class="s">&quot;escript·demo.escript&quot;</span><span·class="p"·data-group-id="0587047019-14">)</span><span·class="p">.</span><span·class="w">535 &gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="9428791314-14">(</span><span·class="s">&quot;escript·demo.escript&quot;</span><span·class="p"·data-group-id="9428791314-14">)</span><span·class="p">.</span><span·class="w">
536 </span><span·class="s">&quot;3&quot;</span><span·class="gp·unselectable">536 </span><span·class="s">&quot;3&quot;</span><span·class="gp·unselectable">
537 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">extract</span><span·class="p"·data-group-id="0587047019-15">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0587047019-16">[</span><span·class="p"·data-group-id="0587047019-16">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·269539f318340733ba9d821195e365d31e45fbc83a4eea4417aee3a1789225d1·...·]-15">)</span><span·class="p">.</span><span·class="w">537 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">extract</span><span·class="p"·data-group-id="9428791314-15">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9428791314-16">[</span><span·class="p"·data-group-id="9428791314-16">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·58d6714d8da6f10cdf28afceb536c7b83a5d139129da22691492b3d050427b44·...·]-15">)</span><span·class="p">.</span><span·class="w">
538 </span><span·class="p"·data-group-id="0587047019-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0587047019-18">[</span><span·class="p"·data-group-id="0587047019-19">{</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="ss">def[·...·truncated·by·diffoscope;·len:·544,·SHA:·31b54f4b0334dcaafd626bb5825feac587d36b46515d9c71b823fe23d7730adf·...·]-21">}</span><span·class="p">,</span><span·class="w">538 </span><span·class="p"·data-group-id="9428791314-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9428791314-18">[</span><span·class="p"·data-group-id="9428791314-19">{</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="ss">def[·...·truncated·by·diffoscope;·len:·544,·SHA:·b5711cdddae27cc8a0ffddc93d4d1ef4327a0c55f5dd2c016e029e859184032b·...·]-21">}</span><span·class="p">,</span><span·class="w">
539 ·····</span><span·class="p"·data-group-id="0587047019-22">{</span><span·class="ss">source</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;%%·Demo\nmain(_Args)·-&gt;\n····io:format(erlang:system_info(schedu&quot;</span><span·class="p">.</span><span·class="p">.</spa[·...·truncated·by·diffoscope;·len:·508,·SHA:·1721ec5ffc4546a5041ca86465c91fa32ae686b362a378199bd789cbf8574526·...·]-1">(</span><span·class="s">&quot;demo.erl&quot;</span><span·class="p">,</span><span·class="w">539 ·····</span><span·class="p"·data-group-id="9428791314-22">{</span><span·class="ss">source</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;%%·Demo\nmain(_Args)·-&gt;\n····io:format(erlang:system_info(schedu&quot;</span><span·class="p">.</span><span·class="p">.</spa[·...·truncated·by·diffoscope;·len:·508,·SHA:·1edf07bd78a611cddb6cb9e5aafed9d95bcd86175925ec0be15436711c596dbf·...·]-1">(</span><span·class="s">&quot;demo.erl&quot;</span><span·class="p">,</span><span·class="w">
540 ··················</span><span·class="p"·data-group-id="6770290970-2">[</span><span·class="s">&quot;%%·demo.erl\n-module(demo).\n-export([main/1]).\n\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Source</span><span·class="p"·data-group-id="6770290970-2">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·cf69d5aea614bcc19a24b1125d00198db599b4c43d085dc7a94e5d9cb355b7d7·...·]-1">)</span><span·class="p">.</span><span·class="w">540 ··················</span><span·class="p"·data-group-id="6854118527-2">[</span><span·class="s">&quot;%%·demo.erl\n-module(demo).\n-export([main/1]).\n\n&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Source</span><span·class="p"·data-group-id="6854118527-2">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·856e284b4b54b4332c0224dc1aa54388690868d33c20f52799a8f5bede976cc2·...·]-1">)</span><span·class="p">.</span><span·class="w">
541 </span><span·class="ss">ok</span><span·class="gp·unselectable">541 </span><span·class="ss">ok</span><span·class="gp·unselectable">
542 &gt;·</span><span·class="p"·data-group-id="6770290970-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BeamCode</span><span·class="p"·data-group-id="6770290970-3">}</span><span[·...·truncated·by·diffoscope;·len:·553,·SHA:·18e2b1a5281a92314ac20b7aa081e3be0b12de6aff96e376a260b2e5024e9fb7·...·]-4">)</span><span·class="p">.</span><span·class="w">542 &gt;·</span><span·class="p"·data-group-id="6854118527-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BeamCode</span><span·class="p"·data-group-id="6854118527-3">}</span><span[·...·truncated·by·diffoscope;·len:·553,·SHA:·83cafcecb74928ae519daf824a91835b7fc922ac63ea8268015fd1edb1919bb8·...·]-4">)</span><span·class="p">.</span><span·class="w">
543 </span><span·class="p"·data-group-id="6770290970-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">demo</span><span·class="p">,</span><span·class="w">543 </span><span·class="p"·data-group-id="6854118527-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">demo</span><span·class="p">,</span><span·class="w">
544 ····</span><span·class="p">&lt;&lt;</span><span·class="mi">70</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">544 ····</span><span·class="p">&lt;&lt;</span><span·class="mi">70</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
545 ······</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">100</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6770290970-6">}</span><span·class="gp·unselectable">545 ······</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">100</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6854118527-6">}</span><span·class="gp·unselectable">
546 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="6770290970-7">(</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6770290970-8">[</span><span·class="p"·data-group-id="6770290970-9">{</span><span·class="ss">beam</span><span·cla[·...·truncated·by·diffoscope;·len:·217,·SHA:·102ba47dcb3129289811b370c03e144e3d33929b82fb1f3068d3e0429446ab98·...·]-7">)</span><span·class="p">.</span><span·class="w">546 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="6854118527-7">(</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6854118527-8">[</span><span·class="p"·data-group-id="6854118527-9">{</span><span·class="ss">beam</span><span·cla[·...·truncated·by·diffoscope;·len:·217,·SHA:·095674a88b1eb416e3e28a47e198ad09a4fe270243b13d4739a71c7ead9cf816·...·]-7">)</span><span·class="p">.</span><span·class="w">
547 </span><span·class="ss">ok</span><span·class="gp·unselectable">547 </span><span·class="ss">ok</span><span·class="gp·unselectable">
548 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">extract</span><span·class="p"·data-group-id="6770290970-10">(</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6770290970-11">[</span><span·class="p"·data-group-id="6770290970-11">]</span><span·class="p"·data-group-id="6770290970-10">)</span><span·class="p">.</span><span·class="w"> 
549 </span><span·class="p"·data-group-id="6770290970-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6770290970-13">[</span><span·class="p"·data-group-id="6770290970-14">{</span><span·class="ss">shebang</span><span·[·...·truncated·by·diffoscope;·len:·611,·SHA:·d1c0e8352e1db3e356248a46858928a6e036ee17ccceb337e1bccfe754b0a6a8·...·]</span><span·class="w">548 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">extract</span><span·class="p"·data-group-id="6854118527-10">(</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·167,·SHA:·c4e4a16672fee42f0356de2eaec5d1db0ff7ef4ee182dffb82a221ac3f746036·...·]</span><span·class="w">
 549 </span><span·class="p"·data-group-id="6854118527-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="6854118527-13">[</span><span·class="p"·data-group-id="6854118527-14">{</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="6854118527-14">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6854118527-15">{</span><span·class="ss">comment</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="6854118527-15">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6854118527-16">{</span><span·class="ss">emu_args</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="6854118527-16">}</span><span·class="p">,</span><span·class="w">
550 ·····</span><span·class="p"·data-group-id="6770290970-17">{</span><span·class="ss">beam</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">70</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">68</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="w">550 ·····</span><span·class="p"·data-group-id="6854118527-17">{</span><span·class="ss">beam</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">70</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">68</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="w">
551 ·············</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6770290970-17">}</span><span·class="p"·data-group-id="6770290970-13">]</span><span·class="p"·data-group-id="6770290970-12">}</span><span·class="gp·unselectable">551 ·············</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6854118527-17">}</span><span·class="p"·data-group-id="6854118527-13">]</span><span·class="p"·data-group-id="6854118527-12">}</span><span·class="gp·unselectable">
552 &gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="6770290970-18">(</span><span·class="s">&quot;escript·demo.beam&quot;</span><span·class="p"·data-group-id="6770290970-18">)</span><span·class="p">.</span><span·class="w">552 &gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">cmd</span><span·class="p"·data-group-id="6854118527-18">(</span><span·class="s">&quot;escript·demo.beam&quot;</span><span·class="p"·data-group-id="6854118527-18">)</span><span·class="p">.</span><span·class="w">
553 </span><span·class="s">&quot;true&quot;</span></code></pre><p>Here·we·create·an·archive·script·containing·both·Erlang·code·and·Beam·code,·then553 </span><span·class="s">&quot;true&quot;</span></code></pre><p>Here·we·create·an·archive·script·containing·both·Erlang·code·and·Beam·code,·then
554 we·iterate·over·all·files·in·the·archive·and·collect·their·contents·and·some554 we·iterate·over·all·files·in·the·archive·and·collect·their·contents·and·some
555 information·about·them:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="1646736851-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SourceCode</span><span·class="p"·data-group-id="1646736851-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·218,·SHA:·0a5ff42f98198f9b197dd2c6417af2a831da772699557acb4c0e41f3e7fd1ad8·...·]51-2">)</span><span·class="p">.</span><span·class="w">555 information·about·them:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="3618632451-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">SourceCode</span><span·class="p"·data-group-id="3618632451-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·218,·SHA:·079822d53e8555da02f090d713aca9838ebd30dda24d5adecd39c07ec63627af·...·]51-2">)</span><span·class="p">.</span><span·class="w">
556 </span><span·class="p"·data-group-id="1646736851-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;%%·demo.erl\n-module(demo).\n-export([main/1]).\n\n%%·Demo\nmain(_Arg&quot;</span><span·class="p">.</span><span·class="p">.</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·7a185e3a51c3375209d59f7445b8333f4db872a775ccaa2f0d09d0a9781417f0·...·]51-3">}</span><span·class="gp·unselectable">556 </span><span·class="p"·data-group-id="3618632451-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;%%·demo.erl\n-module(demo).\n-export([main/1]).\n\n%%·Demo\nmain(_Arg&quot;</span><span·class="p">.</span><span·class="p">.</span><[·...·truncated·by·diffoscope;·len:·93,·SHA:·ecefe74e96409aa1fc66af157ea6e6f7259c092991797775f83f8bdd3538f7d1·...·]51-3">}</span><span·class="gp·unselectable">
557 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="1646736851-4">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">557 &gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="3618632451-4">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">
558 ·················</span><span·class="p"·data-group-id="1646736851-5">[</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="w">558 ·················</span><span·class="p"·data-group-id="3618632451-5">[</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="w">
559 ··················</span><span·class="p"·data-group-id="1646736851-6">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1646736851-7">[</span><span·class="p"·data-group-id="1646736851-8">{</span><span·class="s">&quot;demo.erl&quot;</span><span·[·...·truncated·by·diffoscope;·len:·114,·SHA:·8f46211b7b244906f520453caca063e17a5abb6764533d32a1b128455d8162a0·...·]51-8">}</span><span·class="p">,</span><span·class="w">559 ··················</span><span·class="p"·data-group-id="3618632451-6">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3618632451-7">[</span><span·class="p"·data-group-id="3618632451-8">{</span><span·class="s">&quot;demo.erl&quot;</span><span·[·...·truncated·by·diffoscope;·len:·114,·SHA:·6f0ef31c4144cfb832deec737fa47543e7a21a4e46329edaddf449b7c3c2a69f·...·]51-8">}</span><span·class="p">,</span><span·class="w">
560 ·····························</span><span·class="p"·data-group-id="1646736851-9">{</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BeamCode</span><span·class="p"·data-group-id="1646736851-9">}</span><span·class="p"·data-group-id="1646736851-7">]</span><span[·...·truncated·by·diffoscope;·len:·296,·SHA:·c99587232b8bef4981923270dbacd7efd25539e3a873d382c27a8be9c3b875e1·...·]51-4">)</span><span·class="p">.</span><span·class="w">560 ·····························</span><span·class="p"·data-group-id="3618632451-9">{</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BeamCode</span><span·class="p"·data-group-id="3618632451-9">}</span><span·class="p"·data-group-id="3618632451-7">]</span><span[·...·truncated·by·diffoscope;·len:·296,·SHA:·f10b851557421582052b04898af5a3371565cb5d64cf969891ea6cfd8f871fb8·...·]51-4">)</span><span·class="p">.</span><span·class="w">
561 </span><span·class="ss">ok</span><span·class="gp·unselectable">561 </span><span·class="ss">ok</span><span·class="gp·unselectable">
562 &gt;·</span><span·class="p"·data-group-id="1646736851-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1646736851-12">[</span><span·class="p"·data-group-id="1646736851-13">{</span><span·class="ss">shebang</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·563,·SHA:·45252200d20b32bc5547bcf96d2ef7035a28f7269edc8af21c3db42a82800e0d·...·]51-15">}</span><span·class="p">,</span><span·class="w">562 &gt;·</span><span·class="p"·data-group-id="3618632451-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3618632451-12">[</span><span·class="p"·data-group-id="3618632451-13">{</span><span·class="ss">shebang</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·563,·SHA:·6d92a864c4550ea3c1aecb2e1d88c20ca9b0be5a6ad957b780811a528a78c542·...·]51-15">}</span><span·class="p">,</span><span·class="w">
563 ·····</span><span·class="p"·data-group-id="1646736851-16">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArchiveBin</span><span·class="p"·data-group-id="1646736851-16">}</span><span·class="p"·data-group-id="1646736851-12">]</span><span·class="[·...·truncated·by·diffoscope;·len:·495,·SHA:·f880177b0934035d60d4ef70c430edc5ce26e0fc3b5ab16892296198572ac200·...·]51-17">)</span><span·class="p">.</span><span·class="w">563 ·····</span><span·class="p"·data-group-id="3618632451-16">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArchiveBin</span><span·class="p"·data-group-id="3618632451-16">}</span><span·class="p"·data-group-id="3618632451-12">]</span><span·class="[·...·truncated·by·diffoscope;·len:·495,·SHA:·c5b70c82e272920e51c768275001bbcacb296b9523c60dc44041bf6d83398555·...·]51-17">)</span><span·class="p">.</span><span·class="w">
564 </span><span·class="p"·data-group-id="1646736851-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1646736851-20">[</span><span·class="p"·data-group-id="1646736851-21">{</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="ss">def[·...·truncated·by·diffoscope;·len:·539,·SHA:·6a72e5886aff543eaf7334131e7d7b45fae091bc2e5a577c55f58de1972ad569·...·]51-23">}</span><span·class="p">,</span><span·class="w">564 </span><span·class="p"·data-group-id="3618632451-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3618632451-20">[</span><span·class="p"·data-group-id="3618632451-21">{</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="ss">def[·...·truncated·by·diffoscope;·len:·539,·SHA:·5320c7318acd1426814dd7c6bbf162154b378327add6332af40ee2390aa34d45·...·]51-23">}</span><span·class="p">,</span><span·class="w">
565 ·····</span><span·class="p"·data-group-id="1646736851-24">{</span><span·class="p"·data-group-id="1646736851-25">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="w">565 ·····</span><span·class="p"·data-group-id="3618632451-24">{</span><span·class="p"·data-group-id="3618632451-25">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="w">
566 ················</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">61</span><span·class="p">,</span><span·class="mi">93</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1646736851-25">}</span><span·class="p">]</span><span·class="p"·data-group-id="1646736851-24">}</span><span·class="gp·unselectable">566 ················</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">61</span><span·class="p">,</span><span·class="mi">93</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3618632451-25">}</span><span·class="p">]</span><span·class="p"·data-group-id="3618632451-24">}</span><span·class="gp·unselectable">
567 &gt;·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write_file</span><span·class="p"·data-group-id="1646736851-26">(</span><span·class="s">&quot;demo.zip&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArchiveBin</span><span·class="p"·data-group-id="1646736851-26">)</span><span·class="p">.</span><span·class="w">567 &gt;·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write_file</span><span·class="p"·data-group-id="3618632451-26">(</span><span·class="s">&quot;demo.zip&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArchiveBin</span><span·class="p"·data-group-id="3618632451-26">)</span><span·class="p">.</span><span·class="w">
568 </span><span·class="ss">ok</span><span·class="gp·unselectable">568 </span><span·class="ss">ok</span><span·class="gp·unselectable">
569 &gt;·</span><span·class="nc">zip</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="1646736851-27">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1646736851-28">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">I</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·1250,·SHA:·340b26a0307631665eda0f16b0eabc1738e6604948dc692d862c1d85952844ea·...·]51-27">)</span><span·class="p">.</span><span·class="w">569 &gt;·</span><span·class="nc">zip</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="3618632451-27">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="3618632451-28">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">I</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·1250,·SHA:·ed8aacf25ea090de6a35c612a2e223806d03be1f2df841102c6cb2862e71b7e6·...·]51-27">)</span><span·class="p">.</span><span·class="w">
570 </span><span·class="p"·data-group-id="1646736851-34">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1646736851-35">[</span><span·class="p"·data-group-id="1646736851-36">{</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">570 </span><span·class="p"·data-group-id="3618632451-34">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3618632451-35">[</span><span·class="p"·data-group-id="3618632451-36">{</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">
571 ······</span><span·class="p"·data-group-id="1646736851-37">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">748</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">571 ······</span><span·class="p"·data-group-id="3618632451-37">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">748</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">
572 ·················</span><span·class="p"·data-group-id="1646736851-38">{</span><span·class="p"·data-group-id="1646736851-39">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1646736851-39">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·0422b0bf9b2644e5ab2e0199024359c809cbe17e276c6f2e3a8c3a56e9af88b7·...·]51-38">}</span><span·class="p">,</span><span·class="w">572 ·················</span><span·class="p"·data-group-id="3618632451-38">{</span><span·class="p"·data-group-id="3618632451-39">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3618632451-39">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·a26272cb9cabb4f83974f88ec5c5dbdb0c2cb51e463561a7e57e8a0ba5088d99·...·]51-38">}</span><span·class="p">,</span><span·class="w">
573 ·················</span><span·class="p"·data-group-id="1646736851-41">{</span><span·class="p"·data-group-id="1646736851-42">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1646736851-42">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·88ffcf8ca9bbe3c5759a0a08fe64557d8103c5c6f4030b5242886568ca0bc42b·...·]51-41">}</span><span·class="p">,</span><span·class="w">573 ·················</span><span·class="p"·data-group-id="3618632451-41">{</span><span·class="p"·data-group-id="3618632451-42">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3618632451-42">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·8f96af6c6a8d730398f443151ada5983ff0da7c8b1b55723230db4b9683fa01e·...·]51-41">}</span><span·class="p">,</span><span·class="w">
574 ·················</span><span·class="p"·data-group-id="1646736851-44">{</span><span·class="p"·data-group-id="1646736851-45">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1646736851-45">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·208b38eaa5de3409d5dd51919e105878bf82a98006c9109b1f43a3f6ea7d2dac·...·]51-44">}</span><span·class="p">,</span><span·class="w">574 ·················</span><span·class="p"·data-group-id="3618632451-44">{</span><span·class="p"·data-group-id="3618632451-45">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3618632451-45">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·924be625d191215986da7dc3134d105ef8321132c4be194c8fa3cd431cff96be·...·]51-44">}</span><span·class="p">,</span><span·class="w">
575 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="1646736851-37">}</span><span·class="p">,</span><span·class="w">575 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3618632451-37">}</span><span·class="p">,</span><span·class="w">
576 ······</span><span·class="p">&lt;&lt;</span><span·class="mi">70</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">576 ······</span><span·class="p">&lt;&lt;</span><span·class="mi">70</span><span·class="p">,</span><span·class="mi">79</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">49</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">66</span><span·class="p">,</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">77</span><span·class="p">,</span><span·class="mi">65</span><span·class="p">,</span><span·class="mi">116</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">109</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
577 ········</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1646736851-36">}</span><span·class="p">,</span><span·class="w">577 ········</span><span·class="mi">83</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3618632451-36">}</span><span·class="p">,</span><span·class="w">
578 ·····</span><span·class="p"·data-group-id="1646736851-47">{</span><span·class="s">&quot;demo.erl&quot;</span><span·class="p">,</span><span·class="w">578 ·····</span><span·class="p"·data-group-id="3618632451-47">{</span><span·class="s">&quot;demo.erl&quot;</span><span·class="p">,</span><span·class="w">
579 ······</span><span·class="p"·data-group-id="1646736851-48">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">579 ······</span><span·class="p"·data-group-id="3618632451-48">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">
580 ·················</span><span·class="p"·data-group-id="1646736851-49">{</span><span·class="p"·data-group-id="1646736851-50">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1646736851-50">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·078bad26da0fcb923e2ab7eb33aca702a2de34178ab1133810967f089bc415a8·...·]51-49">}</span><span·class="p">,</span><span·class="w">580 ·················</span><span·class="p"·data-group-id="3618632451-49">{</span><span·class="p"·data-group-id="3618632451-50">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3618632451-50">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·e97388b94029b4bf75de808322ae42543f7020344f0bcd6a4128b9ead1368b9b·...·]51-49">}</span><span·class="p">,</span><span·class="w">
581 ·················</span><span·class="p"·data-group-id="1646736851-52">{</span><span·class="p"·data-group-id="1646736851-53">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1646736851-53">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·791ea80d6bd00a8723b62a9f8b761d4c75cac0e786a0b54e8b1cf474fb451b1c·...·]51-52">}</span><span·class="p">,</span><span·class="w">581 ·················</span><span·class="p"·data-group-id="3618632451-52">{</span><span·class="p"·data-group-id="3618632451-53">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3618632451-53">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·3488fb7600ac493aac5ee7b593774ea0314cb60e6119a2a91d0c1074ebc1e3dd·...·]51-52">}</span><span·class="p">,</span><span·class="w">
582 ·················</span><span·class="p"·data-group-id="1646736851-55">{</span><span·class="p"·data-group-id="1646736851-56">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1646736851-56">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·71badcacfd66a57f78cfff19790baddc139adc1fdf9fbd583424a6096587e5d1·...·]51-55">}</span><span·class="p">,</span><span·class="w">582 ·················</span><span·class="p"·data-group-id="3618632451-55">{</span><span·class="p"·data-group-id="3618632451-56">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3618632451-56">}</span[·...·truncated·by·diffoscope;·len:·297,·SHA:·60ed24d2557b23e315c2e948dd3a2abbf5ac1b9dc7b6532507c46d2c2983c15d·...·]51-55">}</span><span·class="p">,</span><span·class="w">
583 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="1646736851-48">}</span><span·class="p">,</span><span·class="w">583 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3618632451-48">}</span><span·class="p">,</span><span·class="w">
584 ······</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;%%·demo.erl\n-module(demo).\n-export([main/1]).\n\n%%·Demo\nmain(_Arg&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1646736851-47">}</span><span·class="p"·data-group-id="1646736851-35">]</span><span·class="p"·data-group-id="1646736851-34">}</span></code></pre>584 ······</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;%%·demo.erl\n-module(demo).\n-export([main/1]).\n\n%%·Demo\nmain(_Arg&quot;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3618632451-47">}</span><span·class="p"·data-group-id="3618632451-35">]</span><span·class="p"·data-group-id="3618632451-34">}</span></code></pre>
585 ··</section>585 ··</section>
586 </section>586 </section>
587 <section·class="detail"·id="extract/2">587 <section·class="detail"·id="extract/2">
  
588 ··<div·class="detail-header">588 ··<div·class="detail-header">
589 ····<a·href="#extract/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">589 ····<a·href="#extract/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
590 ······<i·class="ri-link-m"·aria-hidden="true"></i>590 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 611, 24 lines modifiedOffset 611, 24 lines modified
611 ······</div>611 ······</div>
  
612 <p>Parses·an·escript·and·extracts·its·sections.·This·is·the·reverse·of·<a·href="#create/2"><code·class="inline">create/2</code></a>.</p><p>All·sections·are·returned·even·if·they·do·not·exist·in·the·escript.·If·a612 <p>Parses·an·escript·and·extracts·its·sections.·This·is·the·reverse·of·<a·href="#create/2"><code·class="inline">create/2</code></a>.</p><p>All·sections·are·returned·even·if·they·do·not·exist·in·the·escript.·If·a
613 particular·section·happens·to·have·the·same·value·as·the·default·value,·the613 particular·section·happens·to·have·the·same·value·as·the·default·value,·the
614 extracted·value·is·set·to·the·atom·<code·class="inline">default</code>.·If·a·section·is·missing,·the614 extracted·value·is·set·to·the·atom·<code·class="inline">default</code>.·If·a·section·is·missing,·the
615 extracted·value·is·set·to·the·atom·<code·class="inline">undefined</code>.</p><p>Option·<code·class="inline">compile_source</code>·only·affects·the·result·if·the·escript·contains·<code·class="inline">source</code>615 extracted·value·is·set·to·the·atom·<code·class="inline">undefined</code>.</p><p>Option·<code·class="inline">compile_source</code>·only·affects·the·result·if·the·escript·contains·<code·class="inline">source</code>
616 code.·In·this·case·the·Erlang·code·is·automatically·compiled·and616 code.·In·this·case·the·Erlang·code·is·automatically·compiled·and
617 <code·class="inline">{source,·BeamCode}</code>·is·returned·instead·of·<code·class="inline">{source,·SourceCode}</code>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="3093882097-1">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">617 <code·class="inline">{source,·BeamCode}</code>·is·returned·instead·of·<code·class="inline">{source,·SourceCode}</code>.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">create</span><span·class="p"·data-group-id="9148317649-1">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">
618 ·················</span><span·class="p"·data-group-id="3093882097-2">[</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093882097-3">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·248,·SHA:·52b7ab2b5fe840b740385b535635f43df6d40f62363fe0513df6df83ca9f885c·...·]-5">}</span><span·class="p">,</span><span·class="w">618 ·················</span><span·class="p"·data-group-id="9148317649-2">[</span><span·class="ss">shebang</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9148317649-3">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·248,·SHA:·1ff714d5a7332cd32154185a42e65b972b454ab37a5a7665dbe2052228526ab5·...·]-5">}</span><span·class="p">,</span><span·class="w">
619 ······································</span><span·class="p"·data-group-id="3093882097-6">{</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BeamCode</span><span·class="p"·data-group-id="3093882097-6">}</span><span·class="p"·data-group-id="3093882097-4">]</span><span[·...·truncated·by·diffoscope;·len:·296,·SHA:·c6cc8df0430eb5772777cb0c1b71760c05528ab9e760582a1245b05ca3d1fc06·...·]-1">)</span><span·class="p">.</span><span·class="w">619 ······································</span><span·class="p"·data-group-id="9148317649-6">{</span><span·class="s">&quot;demo.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">BeamCode</span><span·class="p"·data-group-id="9148317649-6">}</span><span·class="p"·data-group-id="9148317649-4">]</span><span[·...·truncated·by·diffoscope;·len:·296,·SHA:·c66fb46f09042b2e5d60ce646760d1d987a64f74abedfe4fae758406a062f5fa·...·]-1">)</span><span·class="p">.</span><span·class="w">
620 </span><span·class="ss">ok</span><span·class="gp·unselectable">620 </span><span·class="ss">ok</span><span·class="gp·unselectable">
621 &gt;·</span><span·class="p"·data-group-id="3093882097-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093882097-9">[</span><span·class="p"·data-group-id="3093882097-10">{</span><span·class="ss">shebang</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·563,·SHA:·5f1605cf1d9f2a1d5f759994082223a7af7d4cf9f2f88b86cd8b1cba2a9e5071·...·]-12">}</span><span·class="p">,</span><span·class="w">621 &gt;·</span><span·class="p"·data-group-id="9148317649-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9148317649-9">[</span><span·class="p"·data-group-id="9148317649-10">{</span><span·class="ss">shebang</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·563,·SHA:·6ccc859eda7937759cbd1f205dd6be7bc22478cb38ae5fd499678586657c9873·...·]-12">}</span><span·class="p">,</span><span·class="w">
622 ·····</span><span·class="p"·data-group-id="3093882097-13">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArchiveBin</span><span·class="p"·data-group-id="3093882097-13">}</span><span·class="p"·data-group-id="3093882097-9">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·05d864ba4dc3aa15283980ceae9c076f2517d20325abfaccf6b85fe42eb20228·...·]-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">622 ·····</span><span·class="p"·data-group-id="9148317649-13">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ArchiveBin</span><span·class="p"·data-group-id="9148317649-13">}</span><span·class="p"·data-group-id="9148317649-9">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·083a09d2aa848bcc7af36a2691b50386cc4092670a70be564717f79343542d78·...·]-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
623 ··············</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">extract</span><span·class="p"·data-group-id="3093882097-14">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3093882097-15">[</span><span·class="p"·data-group-id="3093882097-15">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·c4e5bfa7d94ac5ff9db6cc940fc96fe0d83e48bacbcaa3ee622c3db4165f73d0·...·]-14">)</span><span·class="p">.</span><span·class="w">623 ··············</span><span·class="nc">escript</span><span·class="p">:</span><span·class="nf">extract</span><span·class="p"·data-group-id="9148317649-14">(</span><span·class="s">&quot;demo.escript&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9148317649-15">[</span><span·class="p"·data-group-id="9148317649-15">]</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·390aed5f805c28dcbbc9cbdcd71d988101e81631c7adb4858dba7fa633c0bfb2·...·]-14">)</span><span·class="p">.</span><span·class="w">
624 </span><span·class="p"·data-group-id="3093882097-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3093882097-17">[</span><span·class="p"·data-group-id="3093882097-18">{</span><span·class="p"·data-group-id="3093882097-19">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="w">624 </span><span·class="p"·data-group-id="9148317649-16">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9148317649-17">[</span><span·class="p"·data-group-id="9148317649-18">{</span><span·class="p"·data-group-id="9148317649-19">{</span><span·class="ss">archive</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">7</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">105</span><span·class="p">,</span><span·class="w">
625 ················</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">61</span><span·class="p">,</span><span·class="mi">93</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3093882097-19">}</span><span·class="w">625 ················</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">61</span><span·class="p">,</span><span·class="mi">93</span><span·class="p">,</span><span·class="mi">107</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">118</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="9148317649-19">}</span><span·class="w">
626 ·····</span><span·class="p"·data-group-id="3093882097-20">{</span><span·class="ss">emu_args</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="3093882097-20">}</span><span·class="p">]</span><span·class="p"·data-group-id="3093882097-18">}</span></code></pre>626 ·····</span><span·class="p"·data-group-id="9148317649-20">{</span><span·class="ss">emu_args</span><span·class="p">,</span><span·class="ss">undefined</span><span·class="p"·data-group-id="9148317649-20">}</span><span·class="p">]</span><span·class="p"·data-group-id="9148317649-18">}</span></code></pre>
627 ··</section>627 ··</section>
628 </section>628 </section>
629 <section·class="detail"·id="script_name/0">629 <section·class="detail"·id="script_name/0">
  
630 ··<div·class="detail-header">630 ··<div·class="detail-header">
631 ····<a·href="#script_name/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">631 ····<a·href="#script_name/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
632 ······<i·class="ri-link-m"·aria-hidden="true"></i>632 ······<i·class="ri-link-m"·aria-hidden="true"></i>
120 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/ets.html
    
Offset 216, 35 lines modifiedOffset 216, 35 lines modified
216 disallow·concurrent·updates·during·the·entire·traversal.</p><p>Moreover,·traversals·not·done·in·a·<em>safe</em>·way,·on·tables·where·keys·are·inserted216 disallow·concurrent·updates·during·the·entire·traversal.</p><p>Moreover,·traversals·not·done·in·a·<em>safe</em>·way,·on·tables·where·keys·are·inserted
217 or·deleted·during·the·traversal,·may·yield·the·following·undesired·effects:</p><ul><li>Any·key·may·be·missed.</li><li>Any·key·may·be·found·more·than·once.</li><li>The·traversal·may·fail·with·<code·class="inline">badarg</code>·exception·if·keys·are·deleted.</li></ul><p>A·table·traversal·is·<em>safe</em>·if·either</p><ul><li>the·table·is·of·type·<code·class="inline">ordered_set</code>.</li><li>the·entire·table·traversal·is·done·within·one·ETS·function·call.</li><li>function·<a·href="#safe_fixtable/2"><code·class="inline">safe_fixtable/2</code></a>·is·used·to·keep·the·table·fixated·during·the·entire217 or·deleted·during·the·traversal,·may·yield·the·following·undesired·effects:</p><ul><li>Any·key·may·be·missed.</li><li>Any·key·may·be·found·more·than·once.</li><li>The·traversal·may·fail·with·<code·class="inline">badarg</code>·exception·if·keys·are·deleted.</li></ul><p>A·table·traversal·is·<em>safe</em>·if·either</p><ul><li>the·table·is·of·type·<code·class="inline">ordered_set</code>.</li><li>the·entire·table·traversal·is·done·within·one·ETS·function·call.</li><li>function·<a·href="#safe_fixtable/2"><code·class="inline">safe_fixtable/2</code></a>·is·used·to·keep·the·table·fixated·during·the·entire
218 traversal.</li></ul><blockquote><h4·class="info">Note</h4><p>Even·though·the·access·of·a·single·object·is·always·guaranteed·to·be218 traversal.</li></ul><blockquote><h4·class="info">Note</h4><p>Even·though·the·access·of·a·single·object·is·always·guaranteed·to·be
219 <a·href="ets.html#module-concurrency">atomic·and·isolated</a>,·each·traversal·through·a·table·to219 <a·href="ets.html#module-concurrency">atomic·and·isolated</a>,·each·traversal·through·a·table·to
220 find·the·next·key·is·not·done·with·such·guarantees.·This·is·often·not·a220 find·the·next·key·is·not·done·with·such·guarantees.·This·is·often·not·a
221 problem,·but·may·cause·rare·subtle·&quot;unexpected&quot;·effects·if·a·concurrent221 problem,·but·may·cause·rare·subtle·&quot;unexpected&quot;·effects·if·a·concurrent
222 process·inserts·objects·during·a·traversal.·For·example,·consider·one·process222 process·inserts·objects·during·a·traversal.·For·example,·consider·one·process
223 doing</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="1642736014-1">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642736014-2">[</span><span·class="ss">ordered_set</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">named_ta[·...·truncated·by·diffoscope;·len:·104,·SHA:·8be165cdcb863caba3547957cde810795f7256932ca9f37a30be03eb89eced9a·...·]-1">)</span><span·class="p">,</span><span·class="w">223 doing</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="3541395275-1">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3541395275-2">[</span><span·class="ss">ordered_set</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">named_ta[·...·truncated·by·diffoscope;·len:·104,·SHA:·0321c94c58c3d724d807db9bd67eb5f804cdd0c4cbf47d8fdbf7fcde607fdca8·...·]-1">)</span><span·class="p">,</span><span·class="w">
224 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1642736014-3">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642736014-4">{</span><span·class="mi">1</span><span·class="p"·data-group-id="1642736014-4">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·9e02b1bf178f0112ac1955fee9e47e9d963e64fd14def71c57f23b548eb936e5·...·]-3">)</span><span·class="p">,</span><span·class="w">224 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="3541395275-3">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3541395275-4">{</span><span·class="mi">1</span><span·class="p"·data-group-id="3541395275-4">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·06ff2fc08194e83b59235ae69367a0b6bff2ccc7704fb2214d88ff43720a1e31·...·]-3">)</span><span·class="p">,</span><span·class="w">
225 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1642736014-5">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642736014-6">{</span><span·class="mi">2</span><span·class="p"·data-group-id="1642736014-6">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·9e02b1bf178f0112ac1955fee9e47e9d963e64fd14def71c57f23b548eb936e5·...·]-5">)</span><span·class="p">,</span><span·class="w">225 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="3541395275-5">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3541395275-6">{</span><span·class="mi">2</span><span·class="p"·data-group-id="3541395275-6">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·06ff2fc08194e83b59235ae69367a0b6bff2ccc7704fb2214d88ff43720a1e31·...·]-5">)</span><span·class="p">,</span><span·class="w">
226 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="1642736014-7">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1642736014-8">{</span><span·class="mi">3</span><span·class="p"·data-group-id="1642736014-8">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·9e02b1bf178f0112ac1955fee9e47e9d963e64fd14def71c57f23b548eb936e5·...·]-7">)</span><span·class="p">,</span></code></pre><p>A·concurrent·call·to·<code·class="inline">ets:first(t)</code>,·done·by·another·process,·may·then·in·rare226 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">insert</span><span·class="p"·data-group-id="3541395275-7">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3541395275-8">{</span><span·class="mi">3</span><span·class="p"·data-group-id="3541395275-8">}</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·06ff2fc08194e83b59235ae69367a0b6bff2ccc7704fb2214d88ff43720a1e31·...·]-7">)</span><span·class="p">,</span></code></pre><p>A·concurrent·call·to·<code·class="inline">ets:first(t)</code>,·done·by·another·process,·may·then·in·rare
227 cases·return·<code·class="inline">2</code>·even·though·<code·class="inline">2</code>·has·never·existed·in·the·table·ordered·as·the227 cases·return·<code·class="inline">2</code>·even·though·<code·class="inline">2</code>·has·never·existed·in·the·table·ordered·as·the
228 first·key.·In·the·same·way,·a·concurrent·call·to·<code·class="inline">ets:next(t,·1)</code>·may·return228 first·key.·In·the·same·way,·a·concurrent·call·to·<code·class="inline">ets:next(t,·1)</code>·may·return
229 <code·class="inline">3</code>·even·though·<code·class="inline">3</code>·never·existed·in·the·table·ordered·directly·after·<code·class="inline">1</code>.</p><p>Effects·like·this·are·improbable·but·possible.·The·probability·will·further·be229 <code·class="inline">3</code>·even·though·<code·class="inline">3</code>·never·existed·in·the·table·ordered·directly·after·<code·class="inline">1</code>.</p><p>Effects·like·this·are·improbable·but·possible.·The·probability·will·further·be
230 reduced·(if·not·vanish)·if·table·option230 reduced·(if·not·vanish)·if·table·option
231 <a·href="ets.html#new_2_write_concurrency"><code·class="inline">write_concurrency</code></a>·is·not·enabled.·This231 <a·href="ets.html#new_2_write_concurrency"><code·class="inline">write_concurrency</code></a>·is·not·enabled.·This
232 can·also·only·be·a·potential·concern·for·<code·class="inline">ordered_set</code>·where·the·traversal232 can·also·only·be·a·potential·concern·for·<code·class="inline">ordered_set</code>·where·the·traversal
233 order·is·defined.</p></blockquote><p>Traversals·using·<code·class="inline">match</code>·and·<code·class="inline">select</code>·functions·may·not·need·to·scan·the·entire233 order·is·defined.</p></blockquote><p>Traversals·using·<code·class="inline">match</code>·and·<code·class="inline">select</code>·functions·may·not·need·to·scan·the·entire
234 table·depending·on·how·the·key·is·specified.·A·match·pattern·with·a·<em>fully·bound234 table·depending·on·how·the·key·is·specified.·A·match·pattern·with·a·<em>fully·bound
235 key</em>·(without·any·match·variables)·will·optimize·the·operation·to·a·single·key235 key</em>·(without·any·match·variables)·will·optimize·the·operation·to·a·single·key
236 lookup·without·any·table·traversal·at·all.·For·<code·class="inline">ordered_set</code>·a·<em>partially·bound236 lookup·without·any·table·traversal·at·all.·For·<code·class="inline">ordered_set</code>·a·<em>partially·bound
237 key</em>·will·limit·the·traversal·to·only·scan·a·subset·of·the·table·based·on·term237 key</em>·will·limit·the·traversal·to·only·scan·a·subset·of·the·table·based·on·term
238 order.·A·partially·bound·key·is·either·a·list·or·a·tuple·with·a·prefix·that·is238 order.·A·partially·bound·key·is·either·a·list·or·a·tuple·with·a·prefix·that·is
239 fully·bound.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="3467845283-1">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="p"·data-group-id="3467845283-2">[</span><span·class="ss">ordered_set</span><span·class="p"·data-group-id="3467845283-2">]</span><span·class="p"·data-group-id="3467845283-1"[·...·truncated·by·diffoscope;·len:·546,·SHA:·aa83ac52e0c6f7253188b246dfff9cdbb73e422fe588ab3054d1ae02fa97016f·...·]-3">)</span><span·class="p">.</span><span·class="w">239 fully·bound.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">T</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="2015068126-1">(</span><span·class="ss">t</span><span·class="p">,</span><span·class="p"·data-group-id="2015068126-2">[</span><span·class="ss">ordered_set</span><span·class="p"·data-group-id="2015068126-2">]</span><span·class="p"·data-group-id="2015068126-1"[·...·truncated·by·diffoscope;·len:·546,·SHA:·d3eb068f6b9df2a330baad8923f5fafe332f193b1e043bd21dc7fbd4145c26c5·...·]-3">)</span><span·class="p">.</span><span·class="w">
240 </span><span·class="ss">true</span><span·class="gp·unselectable">240 </span><span·class="ss">true</span><span·class="gp·unselectable">
241 2&gt;·</span><span·class="c1">%%·Efficient·search·of·all·with·area·code·555</span><span·class="gp·unselectable">241 2&gt;·</span><span·class="c1">%%·Efficient·search·of·all·with·area·code·555</span><span·class="gp·unselectable">
242 2&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="3467845283-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="p"·data-group-id="3467845283-6">{</span><span·class="p"·data-group-id="3467845283-7">[</span><span·class="sc">$5</span><span·class="p">,</span><span·class="sc">$5</span><spa[·...·truncated·by·diffoscope;·len:·387,·SHA:·8f634ed9151bd755677535b28149dcbd2581adcc3c89a583c59ea0b9594d209f·...·]-5">)</span><span·class="p">.</span><span·class="w">242 2&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="2015068126-5">(</span><span·class="n">T</span><span·class="p">,</span><span·class="p"·data-group-id="2015068126-6">{</span><span·class="p"·data-group-id="2015068126-7">[</span><span·class="sc">$5</span><span·class="p">,</span><span·class="sc">$5</span><spa[·...·truncated·by·diffoscope;·len:·387,·SHA:·844cac1a84a79c7314e7b324f1777652dec70ad84db93e687ef36b14aa9d8553·...·]-5">)</span><span·class="p">.</span><span·class="w">
243 </span><span·class="p"·data-group-id="3467845283-8">[</span><span·class="p"·data-group-id="3467845283-9">[</span><span·class="s">&quot;1234&quot;</span><span·class="p">,</span><span·class="s">&quot;John·Smith&quot;</span><span·class="p"·data-group-id="3467845283-9">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·69c7ca04a84313e5fcb5419f5916714db00cf815ceb29f6700fe32ae320e4b20·...·]-8">]</span></code></pre><p><a·href=""·id="match_spec"></a></p><h2·id="module-match-specifications"·class="section-heading">243 </span><span·class="p"·data-group-id="2015068126-8">[</span><span·class="p"·data-group-id="2015068126-9">[</span><span·class="s">&quot;1234&quot;</span><span·class="p">,</span><span·class="s">&quot;John·Smith&quot;</span><span·class="p"·data-group-id="2015068126-9">]</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·21,·SHA:·036ce37cbebd466582854d4ca94a47303993ddf4b4715cf752845888961f4296·...·]-8">]</span></code></pre><p><a·href=""·id="match_spec"></a></p><h2·id="module-match-specifications"·class="section-heading">
244 ··<a·href="#module-match-specifications"·class="hover-link">244 ··<a·href="#module-match-specifications"·class="hover-link">
245 ····<i·class="ri-link-m"·aria-hidden="true"></i>245 ····<i·class="ri-link-m"·aria-hidden="true"></i>
246 ··</a>246 ··</a>
247 ··<span·class="text">Match·Specifications</span>247 ··<span·class="text">Match·Specifications</span>
248 </h2>248 </h2>
249 <p>Some·of·the·functions·use·a·<em>match·specification</em>,·<code·class="inline">match_spec</code>.·For·a·brief249 <p>Some·of·the·functions·use·a·<em>match·specification</em>,·<code·class="inline">match_spec</code>.·For·a·brief
250 explanation,·see·<a·href="#select/2"><code·class="inline">select/2</code></a>.·For·a·detailed·description,·see·section250 explanation,·see·<a·href="#select/2"><code·class="inline">select/2</code></a>.·For·a·detailed·description,·see·section
Offset 1932, 27 lines modifiedOffset 1932, 27 lines modified
1932 function.</p><p>The·parse·transform·is·provided·in·the·<code·class="inline">ms_transform</code>·module·and·the·source1932 function.</p><p>The·parse·transform·is·provided·in·the·<code·class="inline">ms_transform</code>·module·and·the·source
1933 <em>must</em>·include·file·<code·class="inline">ms_transform.hrl</code>·in·STDLIB·for·this·pseudo·function·to1933 <em>must</em>·include·file·<code·class="inline">ms_transform.hrl</code>·in·STDLIB·for·this·pseudo·function·to
1934 work.·Failing·to·include·the·hrl·file·in·the·source·results·in·a·runtime·error,1934 work.·Failing·to·include·the·hrl·file·in·the·source·results·in·a·runtime·error,
1935 not·a·compile·time·error.·The·include·file·is·easiest·included·by·adding·line1935 not·a·compile·time·error.·The·include·file·is·easiest·included·by·adding·line
1936 <code·class="inline">-include_lib(&quot;stdlib/include/ms_transform.hrl&quot;).</code>·to·the·source·file.</p><p>The·fun·is·very·restricted,·it·can·take·only·a·single·parameter·(the·object·to1936 <code·class="inline">-include_lib(&quot;stdlib/include/ms_transform.hrl&quot;).</code>·to·the·source·file.</p><p>The·fun·is·very·restricted,·it·can·take·only·a·single·parameter·(the·object·to
1937 match):·a·sole·variable·or·a·tuple.·It·must·use·the·<code·class="inline">is_</code>·guard·tests.·Language1937 match):·a·sole·variable·or·a·tuple.·It·must·use·the·<code·class="inline">is_</code>·guard·tests.·Language
1938 constructs·that·have·no·representation·in·a·match·specification·(<code·class="inline">if</code>,·<code·class="inline">case</code>,1938 constructs·that·have·no·representation·in·a·match·specification·(<code·class="inline">if</code>,·<code·class="inline">case</code>,
1939 <code·class="inline">receive</code>,·and·so·on)·are·not·allowed.</p><p>The·return·value·is·the·resulting·match·specification.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0160279396-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0160279396-2">(</span><span·class="p"·data-group-id="0160279396-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id="0160279396-3">}</span><span·class="p"·data-group-id="0160279396-2">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">3</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="k">end</span><span·class="p"·data-group-id="0160279396-1">)</span><span·class="p">.</span><span·class="w"> 
1940 </span><span·class="p"·data-group-id="0160279396-4">[</span><span·class="p"·data-group-id="0160279396-5">{</span><span·class="p"·data-group-id="0160279396-6">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</[·...·truncated·by·diffoscope;·len:·966,·SHA:·6512a58bc56514da614a26d290c21c0698364a742ef4ab7f4eecc60e063146fa·...·]</span><span·class="p">.</span><span·class="w">1939 <code·class="inline">receive</code>,·and·so·on)·are·not·allowed.</p><p>The·return·value·is·the·resulting·match·specification.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="[·...·truncated·by·diffoscope;·len:·827,·SHA:·da470d52ac67c0d99eb2fe2d29f5529eb5af6b0c3d85f175c1f1d18d00ea9b66·...·]</span><span·class="p">.</span><span·class="w">
 1940 </span><span·class="p"·data-group-id="9465848097-4">[</span><span·class="p"·data-group-id="9465848097-5">{</span><span·class="p"·data-group-id="9465848097-6">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="9465848097-6">}</span><span·class="p">,</span><span·class="p"·data-group-id="9465848097-7">[</span><span·class="p"·data-group-id="9465848097-8">{</span><span·class="ss">&#39;&gt;&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="9465848097-8">}</span><span·class="p"·data-group-id="9465848097-7">]</span><span·class="p">,</span><span·class="p"·data-group-id="9465848097-9">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="9465848097-9">]</span><span·class="p"·data-group-id="9465848097-5">}</span><span·class="p"·data-group-id="9465848097-4">]</span></code></pre><p>Variables·from·the·environment·can·be·imported,·so·that·the·following·works:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">X</span><span·class="o">=</span><span·class="mi">3</span><span·class="p">.</span><span·class="w">
1941 </span><span·class="mi">3</span><span·class="gp·unselectable">1941 </span><span·class="mi">3</span><span·class="gp·unselectable">
1942 3&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="7562153365-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7562153365-2">(</span><span·class="p"·data-group-id="7562153365-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·466,·SHA:·53db8c49b0652edb1b5a6d57c8a6cb1bfca1f71ff0d1908445edccaa12a20341·...·]-1">)</span><span·class="p">.</span><span·class="w">1942 3&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="4316721120-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4316721120-2">(</span><span·class="p"·data-group-id="4316721120-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·466,·SHA:·3859ddc13dbf8f72c362e2d627ded4b5046d2638362b1e54f27d44e1dc16987e·...·]-1">)</span><span·class="p">.</span><span·class="w">
1943 </span><span·class="p"·data-group-id="7562153365-4">[</span><span·class="p"·data-group-id="7562153365-5">{</span><span·class="p"·data-group-id="7562153365-6">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="7[·...·truncated·by·diffoscope;·len:·825,·SHA:·0709faeb7e39de8a7e430aa5f0f39bb77138b423ebaceac74a021653cb287dee·...·]-4">]</span></code></pre><p>The·imported·variables·are·replaced·by·match·specification·<code·class="inline">const</code>·expressions,1943 </span><span·class="p"·data-group-id="4316721120-4">[</span><span·class="p"·data-group-id="4316721120-5">{</span><span·class="p"·data-group-id="4316721120-6">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id="4[·...·truncated·by·diffoscope;·len:·825,·SHA:·565883330ee3f3895446a085c409ac768fca9443e57b822b6633febcd4f6afdd·...·]-4">]</span></code></pre><p>The·imported·variables·are·replaced·by·match·specification·<code·class="inline">const</code>·expressions,
1944 which·is·consistent·with·the·static·scoping·for·Erlang·funs.·However,·local·or1944 which·is·consistent·with·the·static·scoping·for·Erlang·funs.·However,·local·or
1945 global·function·calls·cannot·be·in·the·guard·or·body·of·the·fun.·Calls·to1945 global·function·calls·cannot·be·in·the·guard·or·body·of·the·fun.·Calls·to
1946 built-in·match·specification·functions·is·of·course·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="4652838794-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4652838794-2">(</span><span·class="p"·data-group-id="4652838794-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·674,·SHA:·560165c824273359bfa124fae830415dcc89755ae21c05e4d52a638d7642521e·...·]-1">)</span><span·class="p">.</span><span·class="w">1946 built-in·match·specification·functions·is·of·course·allowed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="1284468791-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1284468791-2">(</span><span·class="p"·data-group-id="1284468791-3">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·674,·SHA:·b417c8e7430c5d4eecae3a540b2f1c31e4175fabb4445b991a3f8bc021f4ca71·...·]-1">)</span><span·class="p">.</span><span·class="w">
1947 </span><span·class="n">Error</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">containing</span><span·class="w">·</span><span·class="ss">local</span><span·class="w">·</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="nf">calls</span><span·class="w">1947 </span><span·class="n">Error</span><span·class="p">:</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">containing</span><span·class="w">·</span><span·class="ss">local</span><span·class="w">·</span><span·class="n">Erlang</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="nf">calls</span><span·class="w">
1948 </span><span·class="p"·data-group-id="4652838794-5">(</span><span·class="ss">&#39;my_fun&#39;</span><span·class="w">·</span><span·class="ss">called</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">guard</span><span·class="p"·data-group-id="465283[·...·truncated·by·diffoscope;·len:·4,·SHA:·44f1bbc5b4c9e9a4c445554c93b8eb354c641a9c4aacb5f4f568182c63a471e2·...·]-5">)</span><span·class="w">·</span><span·class="ss">cannot</span><span·class="w">·</span><span·class="ss">be</span><span·class="w">·</span><span·class="ss">translated</span><span·class="w">·</span><span·class="ss">into</span><span·class="w">·</span><span·class="ss">match_spec</span><span·class="w">1948 </span><span·class="p"·data-group-id="1284468791-5">(</span><span·class="ss">&#39;my_fun&#39;</span><span·class="w">·</span><span·class="ss">called</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">guard</span><span·class="p"·data-group-id="128446[·...·truncated·by·diffoscope;·len:·4,·SHA:·1f29cebdfed9a64c3afe0a343e0889d0988263a2fa4e27d8909ac76f0327a1c5·...·]-5">)</span><span·class="w">·</span><span·class="ss">cannot</span><span·class="w">·</span><span·class="ss">be</span><span·class="w">·</span><span·class="ss">translated</span><span·class="w">·</span><span·class="ss">into</span><span·class="w">·</span><span·class="ss">match_spec</span><span·class="w">
1949 </span><span·class="p"·data-group-id="4652838794-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">transform_error</span><span·class="p"·data-group-id="4652838794-6">}</span><span·class="gp·unselectable">1949 </span><span·class="p"·data-group-id="1284468791-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">transform_error</span><span·class="p"·data-group-id="1284468791-6">}</span><span·class="gp·unselectable">
1950 5&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="4652838794-7">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4652838794-8">(</span><span·class="p"·data-group-id="4652838794-9">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·677,·SHA:·15673bdb88851e086d8831393ce728694de8dda61239f9831eb5386adbb8c55b·...·]-7">)</span><span·class="p">.</span><span·class="w">1950 5&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="1284468791-7">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1284468791-8">(</span><span·class="p"·data-group-id="1284468791-9">{</span><span·class="n">M</span><span·class="p">,</span><span·class="n">N</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·677,·SHA:·f4211d7dd1ec7c2feec8a4393634833577590a125bd98844d9ddf94f360e5eb3·...·]-7">)</span><span·class="p">.</span><span·class="w">
1951 </span><span·class="p"·data-group-id="4652838794-11">[</span><span·class="p"·data-group-id="4652838794-12">{</span><span·class="p"·data-group-id="4652838794-13">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·1059,·SHA:·1cf84317533599da39b708eb4402835907421a005c1ed84e7d62064d6b5f9996·...·]-11">]</span></code></pre><p>As·shown·by·the·example,·the·function·can·be·called·from·the·shell·also.·The·fun1951 </span><span·class="p"·data-group-id="1284468791-11">[</span><span·class="p"·data-group-id="1284468791-12">{</span><span·class="p"·data-group-id="1284468791-13">{</span><span·class="ss">&#39;$1&#39;</span><span·class="p">,</span><span·class="ss">&#39;$2&#39;</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·1059,·SHA:·1853c517894fd078a88717af61879851964e2d890ec9a85278c0fe45c725010d·...·]-11">]</span></code></pre><p>As·shown·by·the·example,·the·function·can·be·called·from·the·shell·also.·The·fun
1952 must·be·literally·in·the·call·when·used·from·the·shell·as·well.</p><blockquote><h4·class="warning">Warning</h4><p>If·the·<code·class="inline">parse_transform</code>·is·not·applied·to·a·module·that·calls·this·pseudo1952 must·be·literally·in·the·call·when·used·from·the·shell·as·well.</p><blockquote><h4·class="warning">Warning</h4><p>If·the·<code·class="inline">parse_transform</code>·is·not·applied·to·a·module·that·calls·this·pseudo
1953 function,·the·call·fails·in·runtime·(with·a·<code·class="inline">badarg</code>).·The·<code·class="inline">ets</code>·module1953 function,·the·call·fails·in·runtime·(with·a·<code·class="inline">badarg</code>).·The·<code·class="inline">ets</code>·module
1954 exports·a·function·with·this·name,·but·it·is·never·to·be·called·except·when1954 exports·a·function·with·this·name,·but·it·is·never·to·be·called·except·when
1955 using·the·function·in·the·shell.·If·the·<code·class="inline">parse_transform</code>·is·properly·applied1955 using·the·function·in·the·shell.·If·the·<code·class="inline">parse_transform</code>·is·properly·applied
1956 by·including·header·file·<code·class="inline">ms_transform.hrl</code>,·compiled·code·never·calls·the1956 by·including·header·file·<code·class="inline">ms_transform.hrl</code>,·compiled·code·never·calls·the
1957 function,·but·the·function·call·is·replaced·by·a·literal·match·specification.</p></blockquote><p>For·more·information,·see·<a·href="ms_transform.html"><code·class="inline">ms_transform</code></a>.</p>1957 function,·but·the·function·call·is·replaced·by·a·literal·match·specification.</p></blockquote><p>For·more·information,·see·<a·href="ms_transform.html"><code·class="inline">ms_transform</code></a>.</p>
1958 ··</section>1958 ··</section>
Offset 2569, 20 lines modifiedOffset 2569, 20 lines modified
  
2569 ··········<pre·translate="no"><span·class="attribute">-spec</span>·match(Table,·Pattern)·->·[Match]2569 ··········<pre·translate="no"><span·class="attribute">-spec</span>·match(Table,·Pattern)·->·[Match]
2570 ···············when·Table·::·<a·href="#t:table/0">table</a>(),·Pattern·::·<a·href="#t:match_pattern/0">match_pattern</a>(),·Match·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>2570 ···············when·Table·::·<a·href="#t:table/0">table</a>(),·Pattern·::·<a·href="#t:match_pattern/0">match_pattern</a>(),·Match·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>
  
2571 ······</div>2571 ······</div>
  
2572 <p>Matches·the·objects·in·table·<code·class="inline">Table</code>·against·pattern·<code·class="inline">Pattern</code>.</p><p>A·pattern·is·a·term·that·can·contain:</p><ul><li>Bound·parts·(Erlang·terms)</li><li><code·class="inline">'_'</code>·that·matches·any·Erlang·term</li><li>Pattern·variables·<code·class="inline">'$N'</code>,·where·<code·class="inline">N</code>=0,1,...</li></ul><p>The·function·returns·a·list·with·one·element·for·each·matching·object,·where2572 <p>Matches·the·objects·in·table·<code·class="inline">Table</code>·against·pattern·<code·class="inline">Pattern</code>.</p><p>A·pattern·is·a·term·that·can·contain:</p><ul><li>Bound·parts·(Erlang·terms)</li><li><code·class="inline">'_'</code>·that·matches·any·Erlang·term</li><li>Pattern·variables·<code·class="inline">'$N'</code>,·where·<code·class="inline">N</code>=0,1,...</li></ul><p>The·function·returns·a·list·with·one·element·for·each·matching·object,·where
2573 each·element·is·an·ordered·list·of·pattern·variable·bindings,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="1705098980-1">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="1705098980-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Matches·every·object·in·table</span><span·class="w">2573 each·element·is·an·ordered·list·of·pattern·variable·bindings,·for·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="0604941456-1">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="0604941456-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Matches·every·object·in·table</span><span·class="w">
2574 </span><span·class="p"·data-group-id="1705098980-2">[</span><span·class="p"·data-group-id="1705098980-3">[</span><span·class="p"·data-group-id="1705098980-4">{</span><span·class="ss">rufsen</span><span·class="p">,</span><span·class="ss">dog</span><span·class="p">,</span><span·class="mi">7</spa[·...·truncated·by·diffoscope;·len:·882,·SHA:·bc4c837e3dd5d22559b2371521f4ae0e8631e3debc2557c5471bfd7ca526b935·...·]-2">]</span><span·class="gp·unselectable">2574 </span><span·class="p"·data-group-id="0604941456-2">[</span><span·class="p"·data-group-id="0604941456-3">[</span><span·class="p"·data-group-id="0604941456-4">{</span><span·class="ss">rufsen</span><span·class="p">,</span><span·class="ss">dog</span><span·class="p">,</span><span·class="mi">7</spa[·...·truncated·by·diffoscope;·len:·882,·SHA:·c26a97014fa37580c5fc57a4cd9e178dda800c29fe856aeba2d0877dcb260ed8·...·]-2">]</span><span·class="gp·unselectable">
2575 7&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="1705098980-9">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1705098980-10">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">dog</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·133,·SHA:·a1a8610f741022e5d9ac28ff3ece2fc850d764d47aa7aba00bf1ab10d7290e6e·...·]-9">)</span><span·class="p">.</span><span·class="w">2575 7&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="0604941456-9">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0604941456-10">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">dog</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·133,·SHA:·31b8763b41d912d06bd14da7339615187164e84dac3a373d5178bcb1e80e15d4·...·]-9">)</span><span·class="p">.</span><span·class="w">
2576 </span><span·class="p"·data-group-id="1705098980-11">[</span><span·class="p"·data-group-id="1705098980-12">[</span><span·class="mi">7</span><span·class="p"·data-group-id="1705098980-12">]</span><span·class="p">,</span><span·class="p"·data-group-id="1705098980-13">[</span><span·class="mi">5</sp[·...·truncated·by·diffoscope;·len:·98,·SHA:·52da2035c35e3de1061a5903e4f0856b5b42847746e0eeeeb2ba2484d15e630e·...·]-11">]</span><span·class="gp·unselectable">2576 </span><span·class="p"·data-group-id="0604941456-11">[</span><span·class="p"·data-group-id="0604941456-12">[</span><span·class="mi">7</span><span·class="p"·data-group-id="0604941456-12">]</span><span·class="p">,</span><span·class="p"·data-group-id="0604941456-13">[</span><span·class="mi">5</sp[·...·truncated·by·diffoscope;·len:·98,·SHA:·18fc9b5559a94edda5b8e888a6d6ad178f9bc8768c939781ebad5c7f063a42ac·...·]-11">]</span><span·class="gp·unselectable">
2577 8&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="1705098980-14">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1705098980-15">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">cow</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·134,·SHA:·c557d2bcf3699b5013e4c2624827c4139c05d60b3d3850183ab14c2031921620·...·]-14">)</span><span·class="p">.</span><span·class="w">2577 8&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="0604941456-14">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0604941456-15">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="ss">cow</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·134,·SHA:·1650586676fffd08c34ec0dc6a53d313f0b9fb21f1c02096c3049c1a8c50148d·...·]-14">)</span><span·class="p">.</span><span·class="w">
2578 </span><span·class="p"·data-group-id="1705098980-16">[</span><span·class="p"·data-group-id="1705098980-16">]</span></code></pre><p>If·the·key·is·specified·in·the·pattern,·the·match·is·very·efficient.·If·the·key2578 </span><span·class="p"·data-group-id="0604941456-16">[</span><span·class="p"·data-group-id="0604941456-16">]</span></code></pre><p>If·the·key·is·specified·in·the·pattern,·the·match·is·very·efficient.·If·the·key
2579 is·not·specified,·that·is,·if·it·is·a·variable·or·an·underscore,·the·entire2579 is·not·specified,·that·is,·if·it·is·a·variable·or·an·underscore,·the·entire
2580 table·must·be·searched.·The·search·time·can·be·substantial·if·the·table·is·very2580 table·must·be·searched.·The·search·time·can·be·substantial·if·the·table·is·very
2581 large.</p><p>For·tables·of·type·<code·class="inline">ordered_set</code>,·the·result·is·in·the·same·order·as·in·a2581 large.</p><p>For·tables·of·type·<code·class="inline">ordered_set</code>,·the·result·is·in·the·same·order·as·in·a
2582 <code·class="inline">first</code>/<code·class="inline">next</code>·traversal.</p>2582 <code·class="inline">first</code>/<code·class="inline">next</code>·traversal.</p>
2583 ··</section>2583 ··</section>
2584 </section>2584 </section>
2585 <section·class="detail"·id="match/3">2585 <section·class="detail"·id="match/3">
Offset 2826, 18 lines modifiedOffset 2826, 18 lines modified
2826 use.</p><p>The·matching·is·executed·on·each·element·in·<code·class="inline">List</code>·and·the·function·returns·a2826 use.</p><p>The·matching·is·executed·on·each·element·in·<code·class="inline">List</code>·and·the·function·returns·a
2827 list·containing·all·results.·If·an·element·in·<code·class="inline">List</code>·does·not·match,·nothing·is2827 list·containing·all·results.·If·an·element·in·<code·class="inline">List</code>·does·not·match,·nothing·is
2828 returned·for·that·element.·The·length·of·the·result·list·is·therefore·equal·or2828 returned·for·that·element.·The·length·of·the·result·list·is·therefore·equal·or
2829 less·than·the·length·of·parameter·<code·class="inline">List</code>.</p><p><em>Example:</em></p><p>The·following·two·calls·give·the·same·result·(but·certainly·not·the·same2829 less·than·the·length·of·parameter·<code·class="inline">List</code>.</p><p><em>Example:</em></p><p>The·following·two·calls·give·the·same·result·(but·certainly·not·the·same
2830 execution·time):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Table</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="ss">new</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">2830 execution·time):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Table</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="ss">new</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
2831 </span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">2831 </span><span·class="n">MatchSpec</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
2832 </span><span·class="c1">%·The·following·call...</span><span·class="w">2832 </span><span·class="c1">%·The·following·call...</span><span·class="w">
2833 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_spec_run</span><span·class="p"·data-group-id="4357146817-1">(</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">tab2list</span><span·class="p"·data-group-id="4357146817-2">(</span><span·class="n">Table</span><span·class="p"·data-group-id="4357146817-2">)</span><span·class="p">,</span><span·class="w">2833 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_spec_run</span><span·class="p"·data-group-id="0802463057-1">(</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">tab2list</span><span·class="p"·data-group-id="0802463057-2">(</span><span·class="n">Table</span><span·class="p"·data-group-id="0802463057-2">)</span><span·class="p">,</span><span·class="w">
2834 ···················</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_spec_compile</span><span·class="p"·data-group-id="4357146817-3">(</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="4357146817-3">)</span><span·class="p"·data-group-id="4357146817-1">)</span><span·class="p">,</span><span·class="w">2834 ···················</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match_spec_compile</span><span·class="p"·data-group-id="0802463057-3">(</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="0802463057-3">)</span><span·class="p"·data-group-id="0802463057-1">)</span><span·class="p">,</span><span·class="w">
2835 </span><span·class="c1">%·...gives·the·same·result·as·the·more·common·(and·more·efficient)</span><span·class="w">2835 </span><span·class="c1">%·...gives·the·same·result·as·the·more·common·(and·more·efficient)</span><span·class="w">
2836 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="4357146817-4">(</span><span·class="n">Table</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="4357146817-4">)</span><span·class="p">,</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·function·has·limited·use·in·normal·code.·It·is·used·by·the·<a·href="dets.html"><code·class="inline">dets</code></a>2836 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="0802463057-4">(</span><span·class="n">Table</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MatchSpec</span><span·class="p"·data-group-id="0802463057-4">)</span><span·class="p">,</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·function·has·limited·use·in·normal·code.·It·is·used·by·the·<a·href="dets.html"><code·class="inline">dets</code></a>
2837 module·to·perform·the·<a·href="dets.html#select/1"><code·class="inline">dets:select/1</code></a>·operations·and·by·Mnesia·during2837 module·to·perform·the·<a·href="dets.html#select/1"><code·class="inline">dets:select/1</code></a>·operations·and·by·Mnesia·during
2838 transactions.</p></blockquote>2838 transactions.</p></blockquote>
2839 ··</section>2839 ··</section>
2840 </section>2840 </section>
2841 <section·class="detail"·id="member/2">2841 <section·class="detail"·id="member/2">
  
2842 ··<div·class="detail-header">2842 ··<div·class="detail-header">
Offset 3192, 27 lines modifiedOffset 3192, 27 lines modified
3192 <p>Restores·an·opaque·continuation·returned·by·<a·href="#select/3"><code·class="inline">select/3</code></a>·or·<a·href="#select/1"><code·class="inline">select/1</code></a>·if·the3192 <p>Restores·an·opaque·continuation·returned·by·<a·href="#select/3"><code·class="inline">select/3</code></a>·or·<a·href="#select/1"><code·class="inline">select/1</code></a>·if·the
3193 continuation·has·passed·through·external·term·format·(been·sent·between·nodes·or3193 continuation·has·passed·through·external·term·format·(been·sent·between·nodes·or
3194 stored·on·disk).</p><p>The·reason·for·this·function·is·that·continuation·terms·contain·compiled·match3194 stored·on·disk).</p><p>The·reason·for·this·function·is·that·continuation·terms·contain·compiled·match
3195 specifications·and·may·therefore·be·invalidated·if·converted·to·external·term3195 specifications·and·may·therefore·be·invalidated·if·converted·to·external·term
3196 format.·Given·that·the·original·match·specification·is·kept·intact,·the3196 format.·Given·that·the·original·match·specification·is·kept·intact,·the
3197 continuation·can·be·restored,·meaning·it·can·once·again·be·used·in·subsequent3197 continuation·can·be·restored,·meaning·it·can·once·again·be·used·in·subsequent
3198 <a·href="#select/1"><code·class="inline">select/1</code></a>·calls·even·though·it·has·been·stored·on·disk·or·on3198 <a·href="#select/1"><code·class="inline">select/1</code></a>·calls·even·though·it·has·been·stored·on·disk·or·on
3199 another·node.</p><p><em>Examples:</em></p><p>The·following·sequence·of·calls·may·fail:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T</span><span·class="o">=</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="8436896286-1">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="8436896286-2">[</span><span·class="p"·data-group-id="8436896286-2">]</span><span·class="p"·data-group-id="8436896286-1">)</span><span·class="p">,</span><span·class="w">3199 another·node.</p><p><em>Examples:</em></p><p>The·following·sequence·of·calls·may·fail:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T</span><span·class="o">=</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="7509673965-1">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="7509673965-2">[</span><span·class="p"·data-group-id="7509673965-2">]</span><span·class="p"·data-group-id="7509673965-1">)</span><span·class="p">,</span><span·class="w">
3200 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">3200 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
3201 </span><span·class="n">MS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="8436896286-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8436896286-4">(</span><span·class="p"·data-group-id="8436896286-5">{</span><span·class="n">N</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·722,·SHA:·40dc251f3a7108a171483b86ed43c8cb83e5fabb45605b6e9c7a6d2a8519e2df·...·]-3">)</span><span·class="p">,</span><span·class="w">3201 </span><span·class="n">MS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="7509673965-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7509673965-4">(</span><span·class="p"·data-group-id="7509673965-5">{</span><span·class="n">N</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·722,·SHA:·e45681c7ab0b5eb4726eb6b9057e8d1792d739e8e3b51f56a046adfd333b4668·...·]-3">)</span><span·class="p">,</span><span·class="w">
3202 </span><span·class="p"·data-group-id="8436896286-7">{</span><span·class="p">_</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="8436896286-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·clas[·...·truncated·by·diffoscope;·len:·309,·SHA:·3b4476887d458c167441dbd3e38976eb65061358482029f5a5f13cd06741e5b1·...·]-8">)</span><span·class="p">,</span><span·class="w">3202 </span><span·class="p"·data-group-id="7509673965-7">{</span><span·class="p">_</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="7509673965-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·clas[·...·truncated·by·diffoscope;·len:·309,·SHA:·85a4b18eb65815924821e7e06d9b30459fb5674d672ab4e36f31c946afcb4a35·...·]-8">)</span><span·class="p">,</span><span·class="w">
3203 </span><span·class="n">MaybeBroken</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="8436896286-9">(</span><span·class="nf">term_to_binary</span><span·class="p"·data-group-id="8436896286-10">(</span><span·class="n">C</span><span·class="p"·data-group-id="8436896286-10">)</span><span·class="p"·data-group-id="8436896286-9">)</span><span·class="p">,</span><span·class="w">3203 </span><span·class="n">MaybeBroken</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="7509673965-9">(</span><span·class="nf">term_to_binary</span><span·class="p"·data-group-id="7509673965-10">(</span><span·class="n">C</span><span·class="p"·data-group-id="7509673965-10">)</span><span·class="p"·data-group-id="7509673965-9">)</span><span·class="p">,</span><span·class="w">
3204 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="8436896286-11">(</span><span·class="n">MaybeBroken</span><span·class="p"·data-group-id="8436896286-11">)</span><span·class="p">.</span></code></pre><p>The·following·sequence·works,·as·the·call·to3204 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="7509673965-11">(</span><span·class="n">MaybeBroken</span><span·class="p"·data-group-id="7509673965-11">)</span><span·class="p">.</span></code></pre><p>The·following·sequence·works,·as·the·call·to
3205 <a·href="#repair_continuation/2"><code·class="inline">repair_continuation/2</code></a>·reestablishes·the3205 <a·href="#repair_continuation/2"><code·class="inline">repair_continuation/2</code></a>·reestablishes·the
3206 <code·class="inline">MaybeBroken</code>·continuation.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T</span><span·class="o">=</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="4036759851-1">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="4036759851-2">[</span><span·class="p"·data-group-id="4036759851-2">]</span><span·class="p"·data-group-id="4036759851-1">)</span><span·class="p">,</span><span·class="w">3206 <code·class="inline">MaybeBroken</code>·continuation.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">T</span><span·class="o">=</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="1207744194-1">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="1207744194-2">[</span><span·class="p"·data-group-id="1207744194-2">]</span><span·class="p"·data-group-id="1207744194-1">)</span><span·class="p">,</span><span·class="w">
3207 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">3207 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
3208 </span><span·class="n">MS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="4036759851-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4036759851-4">(</span><span·class="p"·data-group-id="4036759851-5">{</span><span·class="n">N</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·722,·SHA:·0a854298ce7a23ab58dd50d197b2e873a205b6fedafdb987a4f994e7f0602b06·...·]-3">)</span><span·class="p">,</span><span·class="w">3208 </span><span·class="n">MS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="1207744194-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1207744194-4">(</span><span·class="p"·data-group-id="1207744194-5">{</span><span·class="n">N</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·722,·SHA:·6e3cac8b9e287410e662c48dcd5bd4b5a4e69d25cc2d7cf861bb272c67bb3319·...·]-3">)</span><span·class="p">,</span><span·class="w">
3209 </span><span·class="p"·data-group-id="4036759851-7">{</span><span·class="p">_</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="4036759851-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·clas[·...·truncated·by·diffoscope;·len:·261,·SHA:·794373971c672217219339db7c721c060c3273ffc933751d1b56a0a7ce7d0d2e·...·]-8">)</span><span·class="p">,</span><span·class="w">3209 </span><span·class="p"·data-group-id="1207744194-7">{</span><span·class="p">_</span><span·class="p">,</span><span·class="n">C</span><span·class="p"·data-group-id="1207744194-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">ets</span><span·clas[·...·truncated·by·diffoscope;·len:·261,·SHA:·9acea8cb9848b3535a1506945b401669fc372dc07eb2dfaf764e6b80c07994e8·...·]-8">)</span><span·class="p">,</span><span·class="w">
3210 </span><span·class="n">MaybeBroken</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="4036759851-9">(</span><span·class="nf">term_to_binary</span><span·class="p"·data-group-id="4036759851-10">(</span><span·class="n">C</span><span·class="p"·data-group-id="4036759851-10">)</span><span·class="p"·data-group-id="4036759851-9">)</span><span·class="p">,</span><span·class="w">3210 </span><span·class="n">MaybeBroken</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary_to_term</span><span·class="p"·data-group-id="1207744194-9">(</span><span·class="nf">term_to_binary</span><span·class="p"·data-group-id="1207744194-10">(</span><span·class="n">C</span><span·class="p"·data-group-id="1207744194-10">)</span><span·class="p"·data-group-id="1207744194-9">)</span><span·class="p">,</span><span·class="w">
3211 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="4036759851-11">(</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">repair_continuation</span><span·class="p"·data-group-id="4036759851-12">(</span><span·class="n">MaybeBroken</span><span·class="p">,</span><span·class="n">MS</span><s[·...·truncated·by·diffoscope;·len:·93,·SHA:·e9cc9fd9d1856637fe6d10b2d10c53d17513dc71d0522e71210bb966c48c7a27·...·]-11">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·function·is·rarely·needed·in·application·code.·It·is·used·by·Mnesia·to3211 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="1207744194-11">(</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">repair_continuation</span><span·class="p"·data-group-id="1207744194-12">(</span><span·class="n">MaybeBroken</span><span·class="p">,</span><span·class="n">MS</span><s[·...·truncated·by·diffoscope;·len:·93,·SHA:·608c02b3f59da586a3c0f1f4e390d67cbe887173d14ffc651d9488ea15865cd6·...·]-11">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·function·is·rarely·needed·in·application·code.·It·is·used·by·Mnesia·to
3212 provide·distributed·<a·href="#select/3"><code·class="inline">select/3</code></a>·and·<a·href="#select/1"><code·class="inline">select/1</code></a>3212 provide·distributed·<a·href="#select/3"><code·class="inline">select/3</code></a>·and·<a·href="#select/1"><code·class="inline">select/1</code></a>
3213 sequences.·A·normal·application·would·either·use·Mnesia·or·keep·the3213 sequences.·A·normal·application·would·either·use·Mnesia·or·keep·the
Max diff block lines reached; 62106/122249 bytes (50.80%) of diff not shown.
18.8 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/file_sorter.html
    
Offset 191, 43 lines modifiedOffset 191, 43 lines modified
191 function·has·been·applied·to·all·of·the·results·or·an·error·occurs,·the·last191 function·has·been·applied·to·all·of·the·results·or·an·error·occurs,·the·last
192 function·is·called·with·argument·<code·class="inline">close</code>,·and·the·reply·is·returned·as·value·of192 function·is·called·with·argument·<code·class="inline">close</code>,·and·the·reply·is·returned·as·value·of
193 the·current·call·to·the·sort·or·merge·function.</p><p>If·a·function·is·specified·as·input·and·the·last·input·function·returns193 the·current·call·to·the·sort·or·merge·function.</p><p>If·a·function·is·specified·as·input·and·the·last·input·function·returns
194 <code·class="inline">{end_of_input,·Value}</code>,·the·function·specified·as·output·is·called·with194 <code·class="inline">{end_of_input,·Value}</code>,·the·function·specified·as·output·is·called·with
195 argument·<code·class="inline">{value,·Value}</code>.·This·makes·it·easy·to·initiate·the·sequence·of·output195 argument·<code·class="inline">{value,·Value}</code>.·This·makes·it·easy·to·initiate·the·sequence·of·output
196 functions·with·a·value·calculated·by·the·input·functions.</p><p>As·an·example,·consider·sorting·the·terms·on·a·disk·log·file.·A·function·that196 functions·with·a·value·calculated·by·the·input·functions.</p><p>As·an·example,·consider·sorting·the·terms·on·a·disk·log·file.·A·function·that
197 reads·chunks·from·the·disk·log·and·returns·a·list·of·binaries·is·used·as·input.197 reads·chunks·from·the·disk·log·and·returns·a·list·of·binaries·is·used·as·input.
198 The·results·are·collected·in·a·list·of·terms.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sort</span><span·class="p"·data-group-id="5419182257-1">(</span><span·class="n">Log</span><span·class="p"·data-group-id="5419182257-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">198 The·results·are·collected·in·a·list·of·terms.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sort</span><span·class="p"·data-group-id="9438524394-1">(</span><span·class="n">Log</span><span·class="p"·data-group-id="9438524394-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
199 ····</span><span·class="p"·data-group-id="5419182257-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="5419182257-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·696,·SHA:·e1d3140706e5646425b17af03565d7f2637257c8fd944e3d00cac61e511af599·...·]-3">)</span><span·class="p">,</span><span·class="w">199 ····</span><span·class="p"·data-group-id="9438524394-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="9438524394-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·696,·SHA:·e4167b570cb987431d5722b28fbdc71738ce7ace0e58cfe9659067fc619a0a19·...·]-3">)</span><span·class="p">,</span><span·class="w">
200 ····</span><span·class="n">Input</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">input</span><span·class="p"·data-group-id="5419182257-7">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start</span><span·class="p"·data-group-id="5419182257-7">)</span><span·class="p">,</span><span·class="w">200 ····</span><span·class="n">Input</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">input</span><span·class="p"·data-group-id="9438524394-7">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">start</span><span·class="p"·data-group-id="9438524394-7">)</span><span·class="p">,</span><span·class="w">
201 ····</span><span·class="n">Output</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">output</span><span·class="p"·data-group-id="5419182257-8">(</span><span·class="p"·data-group-id="5419182257-9">[</span><span·class="p"·data-group-id="5419182257-9">]</span><span·class="p"·data-group-id="5419182257-8">)</span><span·class="p">,</span><span·class="w">201 ····</span><span·class="n">Output</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">output</span><span·class="p"·data-group-id="9438524394-8">(</span><span·class="p"·data-group-id="9438524394-9">[</span><span·class="p"·data-group-id="9438524394-9">]</span><span·class="p"·data-group-id="9438524394-8">)</span><span·class="p">,</span><span·class="w">
202 ····</span><span·class="n">Reply</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file_sorter</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="5419182257-10">(</span><span·class="n">Input</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Output</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5419182257-11">{</span><span·class="ss">format</s[·...·truncated·by·diffoscope;·len:·151,·SHA:·9616d8de803977c569eab33cb08b8e6552e8063d343bd44d28bb994a37e60c87·...·]-10">)</span><span·class="p">,</span><span·class="w">202 ····</span><span·class="n">Reply</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file_sorter</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="9438524394-10">(</span><span·class="n">Input</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Output</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9438524394-11">{</span><span·class="ss">format</s[·...·truncated·by·diffoscope;·len:·151,·SHA:·555477b08f501e8fa5ca9d265083126d9226d2b011c1d14bc4f6dcf4b3e27451·...·]-10">)</span><span·class="p">,</span><span·class="w">
203 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="5419182257-12">(</span><span·class="n">Log</span><span·class="p"·data-group-id="5419182257-12">)</span><span·class="p">,</span><span·class="w">203 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="9438524394-12">(</span><span·class="n">Log</span><span·class="p"·data-group-id="9438524394-12">)</span><span·class="p">,</span><span·class="w">
204 ····</span><span·class="n">Reply</span><span·class="p">.</span><span·class="w">204 ····</span><span·class="n">Reply</span><span·class="p">.</span><span·class="w">
  
205 </span><span·class="nf">input</span><span·class="p"·data-group-id="5419182257-13">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cont</span><span·class="p"·data-group-id="5419182257-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 </span><span·class="nf">input</span><span·class="p"·data-group-id="9438524394-13">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cont</span><span·class="p"·data-group-id="9438524394-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="5419182257-14">(</span><span·class="ss">close</span><span·class="p"·data-group-id="5419182257-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">206 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="9438524394-14">(</span><span·class="ss">close</span><span·class="p"·data-group-id="9438524394-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
207 ············</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">207 ············</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
208 ·······</span><span·class="p"·data-group-id="5419182257-15">(</span><span·class="ss">read</span><span·class="p"·data-group-id="5419182257-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 ·······</span><span·class="p"·data-group-id="9438524394-15">(</span><span·class="ss">read</span><span·class="p"·data-group-id="9438524394-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">chunk</span><span·class="p"·data-group-id="5419182257-16">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cont</span><span·class="p"·data-group-id="5419182257-16">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">209 ············</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">disk_log</span><span·class="p">:</span><span·class="nf">chunk</span><span·class="p"·data-group-id="9438524394-16">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cont</span><span·class="p"·data-group-id="9438524394-16">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
210 ················</span><span·class="p"·data-group-id="5419182257-17">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="5419182257-17">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">210 ················</span><span·class="p"·data-group-id="9438524394-17">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="9438524394-17">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
211 ····················</span><span·class="p"·data-group-id="5419182257-18">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="5419182257-18">}</span><span·class="p">;</span><span·class="w">211 ····················</span><span·class="p"·data-group-id="9438524394-18">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="9438524394-18">}</span><span·class="p">;</span><span·class="w">
212 ················</span><span·class="p"·data-group-id="5419182257-19">{</span><span·class="n">Cont2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Terms</span><span·class="p"·data-group-id="5419182257-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">212 ················</span><span·class="p"·data-group-id="9438524394-19">{</span><span·class="n">Cont2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Terms</span><span·class="p"·data-group-id="9438524394-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
213 ····················</span><span·class="p"·data-group-id="5419182257-20">{</span><span·class="n">Terms</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">input</span><span·class="p"·data-group-id="5419182257-21">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·123,·SHA:·7da78b2ba58a81948bb8132a5e736fcba032beffb8a3224b6a160c1f8d1512f1·...·]-20">}</span><span·class="p">;</span><span·class="w">213 ····················</span><span·class="p"·data-group-id="9438524394-20">{</span><span·class="n">Terms</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">input</span><span·class="p"·data-group-id="9438524394-21">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·123,·SHA:·c7662f2174056a7e8f2a85c0ece9245ee6aa4962a3868f3058ede116b2ecc839·...·]-20">}</span><span·class="p">;</span><span·class="w">
214 ················</span><span·class="p"·data-group-id="5419182257-22">{</span><span·class="n">Cont2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Terms</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Badbytes</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9c35ccfaf22cf41f2e0923788aee132f93459a8d757577eaca5bad5cdf47903b·...·]-22">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 ················</span><span·class="p"·data-group-id="9438524394-22">{</span><span·class="n">Cont2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Terms</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Badbytes</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·2f1f2d7405fc5437f53b61df477f708fd3b0fe91d3c928be090b7dbd76803182·...·]-22">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ····················</span><span·class="p"·data-group-id="5419182257-23">{</span><span·class="n">Terms</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">input</span><span·class="p"·data-group-id="5419182257-24">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·123,·SHA:·a39a54b79cee87237148af51c68d5a38c144d555d7b4336bc853b45ce18b2404·...·]-23">}</span><span·class="p">;</span><span·class="w">215 ····················</span><span·class="p"·data-group-id="9438524394-23">{</span><span·class="n">Terms</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">input</span><span·class="p"·data-group-id="9438524394-24">(</span><span·class="n">Log</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·123,·SHA:·712914252379e31c4a0528ad88918d0e8c61b0ec4ca909f9a707629e3784374d·...·]-23">}</span><span·class="p">;</span><span·class="w">
216 ················</span><span·class="ss">eof</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 ················</span><span·class="ss">eof</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ····················</span><span·class="ss">end_of_input</span><span·class="w">217 ····················</span><span·class="ss">end_of_input</span><span·class="w">
218 ············</span><span·class="k">end</span><span·class="w">218 ············</span><span·class="k">end</span><span·class="w">
219 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">219 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
220 </span><span·class="nf">output</span><span·class="p"·data-group-id="5419182257-25">(</span><span·class="n">L</span><span·class="p"·data-group-id="5419182257-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">220 </span><span·class="nf">output</span><span·class="p"·data-group-id="9438524394-25">(</span><span·class="n">L</span><span·class="p"·data-group-id="9438524394-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
221 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="5419182257-26">(</span><span·class="ss">close</span><span·class="p"·data-group-id="5419182257-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">221 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="9438524394-26">(</span><span·class="ss">close</span><span·class="p"·data-group-id="9438524394-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
222 ············</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="5419182257-27">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="5419182257-28">(</span><span·class="n">L</span><span·class="p"·data-group-id="5419182257-28">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·45901e1b638f7882c1e207ae0995517d27b2b2686862c19464a524dc2d0b9004·...·]-27">)</span><span·class="p">;</span><span·class="w">222 ············</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="9438524394-27">(</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="9438524394-28">(</span><span·class="n">L</span><span·class="p"·data-group-id="9438524394-28">)</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·ef21a58b891d0a4a8f07fba99d5eea77ae453505d525c1a2131903d09947ed0f·...·]-27">)</span><span·class="p">;</span><span·class="w">
223 ·······</span><span·class="p"·data-group-id="5419182257-29">(</span><span·class="n">Terms</span><span·class="p"·data-group-id="5419182257-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 ·······</span><span·class="p"·data-group-id="9438524394-29">(</span><span·class="n">Terms</span><span·class="p"·data-group-id="9438524394-29">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ············</span><span·class="nf">output</span><span·class="p"·data-group-id="5419182257-30">(</span><span·class="p"·data-group-id="5419182257-31">[</span><span·class="n">Terms</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="5419182257-31">]</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·36994d107fccada20c8e54de521826958d72b891ae0859b801d729e32bcc750f·...·]-30">)</span><span·class="w">224 ············</span><span·class="nf">output</span><span·class="p"·data-group-id="9438524394-30">(</span><span·class="p"·data-group-id="9438524394-31">[</span><span·class="n">Terms</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="9438524394-31">]</span><[·...·truncated·by·diffoscope;·len:·40,·SHA:·32ccdd63634448de16b7e607f81b7d70c6ee992ba978a425db66bf720eaf2a65·...·]-30">)</span><span·class="w">
225 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>For·more·examples·of·functions·as·input·and·output,·see·the·end·of·the225 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>For·more·examples·of·functions·as·input·and·output,·see·the·end·of·the
226 <code·class="inline">file_sorter</code>·module;·the·<code·class="inline">term</code>·format·is·implemented·with·functions.</p><p>The·possible·values·of·<code·class="inline">Reason</code>·returned·when·an·error·occurs·are:</p><ul><li><code·class="inline">bad_object</code>,·<code·class="inline">{bad_object,·FileName}</code>·-·Applying·the·format·function·failed226 <code·class="inline">file_sorter</code>·module;·the·<code·class="inline">term</code>·format·is·implemented·with·functions.</p><p>The·possible·values·of·<code·class="inline">Reason</code>·returned·when·an·error·occurs·are:</p><ul><li><code·class="inline">bad_object</code>,·<code·class="inline">{bad_object,·FileName}</code>·-·Applying·the·format·function·failed
227 for·some·binary,·or·the·key(s)·could·not·be·extracted·from·some·term.</li><li><code·class="inline">{bad_term,·FileName}</code>·-·<a·href="io.html#read/2"><code·class="inline">io:read/2</code></a>·failed·to·read·some·term.</li><li><code·class="inline">{file_error,·FileName,·file:posix()}</code>·-·For·an·explanation·of227 for·some·binary,·or·the·key(s)·could·not·be·extracted·from·some·term.</li><li><code·class="inline">{bad_term,·FileName}</code>·-·<a·href="io.html#read/2"><code·class="inline">io:read/2</code></a>·failed·to·read·some·term.</li><li><code·class="inline">{file_error,·FileName,·file:posix()}</code>·-·For·an·explanation·of
228 <a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:posix/0"><code·class="inline">file:posix()</code></a>,·see·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>.</li><li><code·class="inline">{premature_eof,·FileName}</code>·-·End-of-file·was·encountered·inside·some·binary228 <a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:posix/0"><code·class="inline">file:posix()</code></a>,·see·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>.</li><li><code·class="inline">{premature_eof,·FileName}</code>·-·End-of-file·was·encountered·inside·some·binary
229 term.</li></ul>229 term.</li></ul>
230 ····</section>230 ····</section>
  
6.09 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/filelib.html
    
Offset 1026, 23 lines modifiedOffset 1026, 23 lines modified
1026 ································Cwd·::·<a·href="#t:filename_all/0">filename_all</a>(),1026 ································Cwd·::·<a·href="#t:filename_all/0">filename_all</a>(),
1027 ································SafeFilename·::·<a·href="#t:filename_all/0">filename_all</a>().</pre>1027 ································SafeFilename·::·<a·href="#t:filename_all/0">filename_all</a>().</pre>
  
1028 ······</div>1028 ······</div>
  
1029 <p>Sanitizes·the·relative·path·by·eliminating·&quot;..&quot;·and·&quot;.&quot;·components·to·protect1029 <p>Sanitizes·the·relative·path·by·eliminating·&quot;..&quot;·and·&quot;.&quot;·components·to·protect
1030 against·directory·traversal·attacks.</p><p>Either·returns·the·sanitized·path·name,·or·the·atom·<code·class="inline">unsafe</code>·if·the·path·is·unsafe.1030 against·directory·traversal·attacks.</p><p>Either·returns·the·sanitized·path·name,·or·the·atom·<code·class="inline">unsafe</code>·if·the·path·is·unsafe.
1031 The·path·is·considered·unsafe·in·the·following·circumstances:</p><ul><li>The·path·is·not·relative.</li><li>A·&quot;..&quot;·component·would·climb·up·above·the·root·of·the·relative·path.</li><li>A·symbolic·link·in·the·path·points·above·the·root·of·the·relative·path.</li></ul><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="8564318882-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="8564318882-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·167,·SHA:·9ccd59203254311a104f7de0513f370cc6c572ae521be3a8063c3625a5b5b5c1·...·]2-2">)</span><span·class="p">.</span><span·class="w">1031 The·path·is·considered·unsafe·in·the·following·circumstances:</p><ul><li>The·path·is·not·relative.</li><li>A·&quot;..&quot;·component·would·climb·up·above·the·root·of·the·relative·path.</li><li>A·symbolic·link·in·the·path·points·above·the·root·of·the·relative·path.</li></ul><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="9001047052-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="9001047052-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·167,·SHA:·2f6107f549f382be34d1376716291ae22cb58dc44d0d9d5d0b07abe7e2f9d225·...·]2-2">)</span><span·class="p">.</span><span·class="w">
1032 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">1032 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="gp·unselectable">
1033 2&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="8564318882-3">(</span><span·class="s">&quot;dir/sub_dir/..&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="8564318882-3">)</span><span·class="p">.</span><span·class="w">1033 2&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="9001047052-3">(</span><span·class="s">&quot;dir/sub_dir/..&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="9001047052-3">)</span><span·class="p">.</span><span·class="w">
1034 </span><span·class="s">&quot;dir&quot;</span><span·class="gp·unselectable">1034 </span><span·class="s">&quot;dir&quot;</span><span·class="gp·unselectable">
1035 3&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="8564318882-4">(</span><span·class="s">&quot;dir/..&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="8564318882-4">)</span><span·class="p">.</span><span·class="w">1035 3&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="9001047052-4">(</span><span·class="s">&quot;dir/..&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="9001047052-4">)</span><span·class="p">.</span><span·class="w">
1036 </span><span·class="p"·data-group-id="8564318882-5">[</span><span·class="p"·data-group-id="8564318882-5">]</span><span·class="gp·unselectable">1036 </span><span·class="p"·data-group-id="9001047052-5">[</span><span·class="p"·data-group-id="9001047052-5">]</span><span·class="gp·unselectable">
1037 4&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="8564318882-6">(</span><span·class="s">&quot;dir/../..&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="8564318882-6">)</span><span·class="p">.</span><span·class="w">1037 4&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="9001047052-6">(</span><span·class="s">&quot;dir/../..&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="9001047052-6">)</span><span·class="p">.</span><span·class="w">
1038 </span><span·class="ss">unsafe</span><span·class="gp·unselectable">1038 </span><span·class="ss">unsafe</span><span·class="gp·unselectable">
1039 5&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="8564318882-7">(</span><span·class="s">&quot;/abs/path&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="8564318882-7">)</span><span·class="p">.</span><span·class="w">1039 5&gt;·</span><span·class="nc">filelib</span><span·class="p">:</span><span·class="nf">safe_relative_path</span><span·class="p"·data-group-id="9001047052-7">(</span><span·class="s">&quot;/abs/path&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Cwd</span><span·class="p"·data-group-id="9001047052-7">)</span><span·class="p">.</span><span·class="w">
1040 </span><span·class="ss">unsafe</span></code></pre>1040 </span><span·class="ss">unsafe</span></code></pre>
1041 ··</section>1041 ··</section>
1042 </section>1042 </section>
1043 <section·class="detail"·id="wildcard/1">1043 <section·class="detail"·id="wildcard/1">
  
1044 ··<div·class="detail-header">1044 ··<div·class="detail-header">
1045 ····<a·href="#wildcard/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1045 ····<a·href="#wildcard/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
83.5 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/filename.html
    
Offset 522, 28 lines modifiedOffset 522, 28 lines modified
  
522 ··········<pre·translate="no"><span·class="attribute">-spec</span>·absname(Filename)·->·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename_all/0">file:filename_all</a>()·when·Filename·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>().</pre>522 ··········<pre·translate="no"><span·class="attribute">-spec</span>·absname(Filename)·->·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename_all/0">file:filename_all</a>()·when·Filename·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>().</pre>
  
523 ······</div>523 ······</div>
  
524 <p>Converts·a·relative·<code·class="inline">Filename</code>·and·returns·an·absolute·name.·No·attempt·is·made524 <p>Converts·a·relative·<code·class="inline">Filename</code>·and·returns·an·absolute·name.·No·attempt·is·made
525 to·create·the·shortest·absolute·name,·as·this·can·give·incorrect·results·on·file525 to·create·the·shortest·absolute·name,·as·this·can·give·incorrect·results·on·file
526 systems·that·allow·links.</p><p><em>Unix·examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">pwd</span><span·class="p"·data-group-id="5802340036-1">(</span><span·class="p"·data-group-id="5802340036-1">)</span><span·class="p">.</span><span·class="w">526 systems·that·allow·links.</p><p><em>Unix·examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">pwd</span><span·class="p"·data-group-id="9537540122-1">(</span><span·class="p"·data-group-id="9537540122-1">)</span><span·class="p">.</span><span·class="w">
527 </span><span·class="s">&quot;/usr/local&quot;</span><span·class="gp·unselectable">527 </span><span·class="s">&quot;/usr/local&quot;</span><span·class="gp·unselectable">
528 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="5802340036-2">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="5802340036-2">)</span><span·class="p">.</span><span·class="w">528 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="9537540122-2">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="9537540122-2">)</span><span·class="p">.</span><span·class="w">
529 </span><span·class="s">&quot;/usr/local/foo&quot;</span><span·class="gp·unselectable">529 </span><span·class="s">&quot;/usr/local/foo&quot;</span><span·class="gp·unselectable">
530 3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="5802340036-3">(</span><span·class="s">&quot;../x&quot;</span><span·class="p"·data-group-id="5802340036-3">)</span><span·class="p">.</span><span·class="w">530 3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="9537540122-3">(</span><span·class="s">&quot;../x&quot;</span><span·class="p"·data-group-id="9537540122-3">)</span><span·class="p">.</span><span·class="w">
531 </span><span·class="s">&quot;/usr/local/../x&quot;</span><span·class="gp·unselectable">531 </span><span·class="s">&quot;/usr/local/../x&quot;</span><span·class="gp·unselectable">
532 4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="5802340036-4">(</span><span·class="s">&quot;/&quot;</span><span·class="p"·data-group-id="5802340036-4">)</span><span·class="p">.</span><span·class="w">532 4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="9537540122-4">(</span><span·class="s">&quot;/&quot;</span><span·class="p"·data-group-id="9537540122-4">)</span><span·class="p">.</span><span·class="w">
533 </span><span·class="s">&quot;/&quot;</span></code></pre><p><em>Windows·examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">pwd</span><span·class="p"·data-group-id="7649297125-1">(</span><span·class="p"·data-group-id="7649297125-1">)</span><span·class="p">.</span><span·class="w">533 </span><span·class="s">&quot;/&quot;</span></code></pre><p><em>Windows·examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">pwd</span><span·class="p"·data-group-id="1936575051-1">(</span><span·class="p"·data-group-id="1936575051-1">)</span><span·class="p">.</span><span·class="w">
534 </span><span·class="s">&quot;D:/usr/local&quot;</span><span·class="gp·unselectable">534 </span><span·class="s">&quot;D:/usr/local&quot;</span><span·class="gp·unselectable">
535 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="7649297125-2">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="7649297125-2">)</span><span·class="p">.</span><span·class="w">535 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="1936575051-2">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="1936575051-2">)</span><span·class="p">.</span><span·class="w">
536 </span><span·class="s">&quot;D:/usr/local/foo&quot;</span><span·class="gp·unselectable">536 </span><span·class="s">&quot;D:/usr/local/foo&quot;</span><span·class="gp·unselectable">
537 3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="7649297125-3">(</span><span·class="s">&quot;../x&quot;</span><span·class="p"·data-group-id="7649297125-3">)</span><span·class="p">.</span><span·class="w">537 3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="1936575051-3">(</span><span·class="s">&quot;../x&quot;</span><span·class="p"·data-group-id="1936575051-3">)</span><span·class="p">.</span><span·class="w">
538 </span><span·class="s">&quot;D:/usr/local/../x&quot;</span><span·class="gp·unselectable">538 </span><span·class="s">&quot;D:/usr/local/../x&quot;</span><span·class="gp·unselectable">
539 4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="7649297125-4">(</span><span·class="s">&quot;/&quot;</span><span·class="p"·data-group-id="7649297125-4">)</span><span·class="p">.</span><span·class="w">539 4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">absname</span><span·class="p"·data-group-id="1936575051-4">(</span><span·class="s">&quot;/&quot;</span><span·class="p"·data-group-id="1936575051-4">)</span><span·class="p">.</span><span·class="w">
540 </span><span·class="s">&quot;D:/&quot;</span></code></pre>540 </span><span·class="s">&quot;D:/&quot;</span></code></pre>
541 ··</section>541 ··</section>
542 </section>542 </section>
543 <section·class="detail"·id="absname/2">543 <section·class="detail"·id="absname/2">
  
544 ··<div·class="detail-header">544 ··<div·class="detail-header">
545 ····<a·href="#absname/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">545 ····<a·href="#absname/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 675, 66 lines modifiedOffset 675, 66 lines modified
  
675 ······</div>675 ······</div>
  
676 <p><a·href=""·id="basedir_3_1"></a>·<a·href=""·id="basedir_3_2"></a></p><p>Returns·a·suitable·path,·or·paths,·for·a·given·type.·If·<code·class="inline">os</code>·is·not·set·in676 <p><a·href=""·id="basedir_3_1"></a>·<a·href=""·id="basedir_3_2"></a></p><p>Returns·a·suitable·path,·or·paths,·for·a·given·type.·If·<code·class="inline">os</code>·is·not·set·in
677 <code·class="inline">Opts</code>·the·function·will·default·to·the·native·option,·that·is·<code·class="inline">'linux'</code>,677 <code·class="inline">Opts</code>·the·function·will·default·to·the·native·option,·that·is·<code·class="inline">'linux'</code>,
678 <code·class="inline">'darwin'</code>·or·<code·class="inline">'windows'</code>,·as·understood·by·<a·href="../../../../lib/kernel-10.0.1/doc/html/os.html#type/0"><code·class="inline">os:type/0</code></a>.·Anything·not·recognized678 <code·class="inline">'darwin'</code>·or·<code·class="inline">'windows'</code>,·as·understood·by·<a·href="../../../../lib/kernel-10.0.1/doc/html/os.html#type/0"><code·class="inline">os:type/0</code></a>.·Anything·not·recognized
679 as·<code·class="inline">'darwin'</code>·or·<code·class="inline">'windows'</code>·is·interpreted·as·<code·class="inline">'linux'</code>.</p><p>The·options·<code·class="inline">'author'</code>·and·<code·class="inline">'version'</code>·are·only·used·with·<code·class="inline">'windows'</code>·option679 as·<code·class="inline">'darwin'</code>·or·<code·class="inline">'windows'</code>·is·interpreted·as·<code·class="inline">'linux'</code>.</p><p>The·options·<code·class="inline">'author'</code>·and·<code·class="inline">'version'</code>·are·only·used·with·<code·class="inline">'windows'</code>·option
680 mode.</p><ul><li><p><code·class="inline"·id="user_cache">user_cache</code></p><p>The·path·location·is·intended·for·transient·data·files·on·a·local·machine.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CACHE_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6305456267-1">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6305456267-2">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·85fec4d549cce4011c4a27adc8a70a94f214177c85ca62923cf900ee5295b0e5·...·]-1">)</span><span·class="p">.</span><span·class="w">680 mode.</p><ul><li><p><code·class="inline"·id="user_cache">user_cache</code></p><p>The·path·location·is·intended·for·transient·data·files·on·a·local·machine.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CACHE_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6998766574-1">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6998766574-2">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·2d7b43d0d5f0f8b7022e0b9d7705e662875e612b85614a8022f69b21d0eefa39·...·]-1">)</span><span·class="p">.</span><span·class="w">
681 </span><span·class="s">&quot;/home/otptest/.cache/my_application&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4926527887-1">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4926527887-2">#{</span><[·...·truncated·by·diffoscope;·len:·177,·SHA:·8fa2bf088bf1d55d00ae03ee67f14172ca7597779ca60eb29f1dae516c4eee0a·...·]-1">)</span><span·class="p">.</span><span·class="w">681 </span><span·class="s">&quot;/home/otptest/.cache/my_application&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="5439603365-1">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5439603365-2">#{</span><[·...·truncated·by·diffoscope;·len:·177,·SHA:·c5f1c006d55931e7d1e6013734aaacf8d71acda0e132f40983023273c772d247·...·]-1">)</span><span·class="p">.</span><span·class="w">
682 </span><span·class="s">&quot;/home/otptest/Library/Caches/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6786991027-1">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="6786991027-1">)</span><span·class="p">.</span><span·class="w">682 </span><span·class="s">&quot;/home/otptest/Library/Caches/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6069038594-1">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="6069038594-1">)</span><span·class="p">.</span><span·class="w">
683 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/Cache&quot;</span><span·class="gp·unselectable">683 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/Cache&quot;</span><span·class="gp·unselectable">
684 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6786991027-2">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="6786991027-2">)</span><span·class="p">.</span><span·class="w">684 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6069038594-2">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="6069038594-2">)</span><span·class="p">.</span><span·class="w">
685 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/Cache&quot;</span><span·class="gp·unselectable">685 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/Cache&quot;</span><span·class="gp·unselectable">
686 3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6786991027-3">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6786991027-4">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·183,·SHA:·7099f3affb31e9b477c1f15c97c1e885468c3f132acc9c81758909e693daf0dd·...·]-3">)</span><span·class="p">.</span><span·class="w">686 3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6069038594-3">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6069038594-4">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·183,·SHA:·da49c61196e5071931a878a7aeb2f30605855d55f51270f4d061ca7b08ee8400·...·]-3">)</span><span·class="p">.</span><span·class="w">
687 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/Cache&quot;</span><span·class="gp·unselectable">687 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/Cache&quot;</span><span·class="gp·unselectable">
688 4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6786991027-5">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6786991027-6">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·181,·SHA:·b23335ee0390f42e845e3357caeba406f90fa1dbbfa0aea388d49dca81c57e75·...·]-5">)</span><span·class="p">.</span><span·class="w">688 4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6069038594-5">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6069038594-6">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·181,·SHA:·34b62ecb2502c4e4da5c145dbaebdcace8a4b640b24e63fce2560842af455c6c·...·]-5">)</span><span·class="p">.</span><span·class="w">
689 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/1.2/Cache&quot;</span><span·class="gp·unselectable">689 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/1.2/Cache&quot;</span><span·class="gp·unselectable">
690 5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6786991027-7">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6786991027-8">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·304,·SHA:·2d47ec80ddcd7bf7093568f0714f42174fe50ff07188d4e194c2b853437e3850·...·]-7">)</span><span·class="p">.</span><span·class="w">690 5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6069038594-7">(</span><span·class="ss">user_cache</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6069038594-8">#{</span><span·clas[·...·truncated·by·diffoscope;·len:·304,·SHA:·c27f87ead11fcd05b782f240026dfd6af39256add9baca8e8b312d062dc7736a·...·]-7">)</span><span·class="p">.</span><span·class="w">
691 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/1.2/Cache&quot;</span></code></pre></li><li><p><code·class="inline"·id="user_config">user_config</code></p><p>The·path·location·is·intended·for·persistent·configuration·files.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CONFIG_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="0637420498-1">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0637420498-2">#{</span>[·...·truncated·by·diffoscope;·len:·177,·SHA:·a7e0b3370ba633635581768d4c44798e28e2c5dc7045ef576b52d33445a9d174·...·]-1">)</span><span·class="p">.</span><span·class="w">691 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/1.2/Cache&quot;</span></code></pre></li><li><p><code·class="inline"·id="user_config">user_config</code></p><p>The·path·location·is·intended·for·persistent·configuration·files.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CONFIG_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="8215175936-1">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8215175936-2">#{</span>[·...·truncated·by·diffoscope;·len:·177,·SHA:·3d5aaddf67808c711e3e2a4ef76a57a9bde68edf9cefb1fe228857be9af78587·...·]-1">)</span><span·class="p">.</span><span·class="w">
692 </span><span·class="s">&quot;/home/otptest/.config/my_application&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="7652233550-1">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7652233550-2">#{</span>[·...·truncated·by·diffoscope;·len:·178,·SHA:·0f008e1f65954cdb6e4b079d1b1bc0055d0313c7c95740988ec92f84dbad6366·...·]-1">)</span><span·class="p">.</span><span·class="w">692 </span><span·class="s">&quot;/home/otptest/.config/my_application&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6440594715-1">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6440594715-2">#{</span>[·...·truncated·by·diffoscope;·len:·178,·SHA:·ae3b5cf9bd850512b77070b439fc7d3fc8225f310cd8c740e5c49f12cceed40f·...·]-1">)</span><span·class="p">.</span><span·class="w">
693 </span><span·class="s">&quot;/home/otptest/Library/Application·Support/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="3479701245-1">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="3479701245-1">)</span><span·class="p">.</span><span·class="w">693 </span><span·class="s">&quot;/home/otptest/Library/Application·Support/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="0916447348-1">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="0916447348-1">)</span><span·class="p">.</span><span·class="w">
694 </span><span·class="s">&quot;c:/Users/otptest/AppData/Roaming/My·App&quot;</span><span·class="gp·unselectable">694 </span><span·class="s">&quot;c:/Users/otptest/AppData/Roaming/My·App&quot;</span><span·class="gp·unselectable">
695 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="3479701245-2">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3479701245-3">#{</span><span·cl[·...·truncated·by·diffoscope;·len:·330,·SHA:·9ef3f7a6f2a17f32f8a34a6c3660e3379b98d02c123cec86f5612c0fc61fcce3·...·]-2">)</span><span·class="p">.</span><span·class="w">695 2&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="0916447348-2">(</span><span·class="ss">user_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0916447348-3">#{</span><span·cl[·...·truncated·by·diffoscope;·len:·330,·SHA:·13c1d408ded10472a6d3503d519175d90518762e2f8cc8c5e57084e4ad6cc8ba·...·]-2">)</span><span·class="p">.</span><span·class="w">
696 </span><span·class="s">&quot;c:/Users/otptest/AppData/Roaming/Erlang/My·App/1.2&quot;</span></code></pre></li><li><p><code·class="inline"·id="user_data">user_data</code></p><p>The·path·location·is·intended·for·persistent·data·files.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_DATA_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="2544898201-1">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2544898201-2">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·36ea1ab480a507ad66b5fbc3dcd956502c542e0946b70974ac52b76ab6d89c52·...·]-1">)</span><span·class="p">.</span><span·class="w">696 </span><span·class="s">&quot;c:/Users/otptest/AppData/Roaming/Erlang/My·App/1.2&quot;</span></code></pre></li><li><p><code·class="inline"·id="user_data">user_data</code></p><p>The·path·location·is·intended·for·persistent·data·files.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_DATA_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="8393415230-1">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8393415230-2">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·0379019fe808ea3ff7eff9ce6e57a8e0bda8a904c1c34783ad65c5758aae7797·...·]-1">)</span><span·class="p">.</span><span·class="w">
697 </span><span·class="s">&quot;/home/otptest/.local/my_application&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="3033366086-1">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3033366086-2">#{</span><s[·...·truncated·by·diffoscope;·len:·176,·SHA:·372458ad8ad24705c88d21004d64c52fd74b8ea00773098e37fad46e38bce0b1·...·]-1">)</span><span·class="p">.</span><span·class="w">697 </span><span·class="s">&quot;/home/otptest/.local/my_application&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6159061874-1">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6159061874-2">#{</span><s[·...·truncated·by·diffoscope;·len:·176,·SHA:·0fd6c48533006a65da886aa4d4fb1ca5b4dceadbeb302145c079775e9dc2561a·...·]-1">)</span><span·class="p">.</span><span·class="w">
698 </span><span·class="s">&quot;/home/otptest/Library/Application·Support/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6931820282-1">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="6931820282-1">)</span><span·class="p">.</span><span·class="w">698 </span><span·class="s">&quot;/home/otptest/Library/Application·Support/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4911000330-1">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="4911000330-1">)</span><span·class="p">.</span><span·class="w">
699 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App&quot;</span><span·class="gp·unselectable">699 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App&quot;</span><span·class="gp·unselectable">
700 9&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="6931820282-2">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="6931820282-3">#{</span><span·class="ss">author</span><spa[·...·truncated·by·diffoscope;·len:·280,·SHA:·24e6db0fcff9b937cf4632409490c9a025fa9de913a2003aaa46b78edc7fa162·...·]-2">)</span><span·class="p">.</span><span·class="w">700 9&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4911000330-2">(</span><span·class="ss">user_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="4911000330-3">#{</span><span·class="ss">author</span><spa[·...·truncated·by·diffoscope;·len:·280,·SHA:·2129a561e415301e2258bcc32dee0e221978c106d59e16fd9a6232fb39e9b601·...·]-2">)</span><span·class="p">.</span><span·class="w">
701 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/1.2&quot;</span></code></pre></li><li><p><code·class="inline"·id="user_log">user_log</code></p><p>The·path·location·is·intended·for·transient·log·files·on·a·local·machine.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CACHE_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4908572465-1">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4908572465-2">#{</span><sp[·...·truncated·by·diffoscope;·len:·174,·SHA:·518f996bc898520e1158c3752233cf966b9ac37986711e19a5892624ab38de88·...·]-1">)</span><span·class="p">.</span><span·class="w">701 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/1.2&quot;</span></code></pre></li><li><p><code·class="inline"·id="user_log">user_log</code></p><p>The·path·location·is·intended·for·transient·log·files·on·a·local·machine.</p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CACHE_HOME</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="7421036070-1">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7421036070-2">#{</span><sp[·...·truncated·by·diffoscope;·len:·174,·SHA:·cc7f23e51b3706e173a7bf21a48e34988dd22b54b976e2d44777841ec9d34d8d·...·]-1">)</span><span·class="p">.</span><span·class="w">
702 </span><span·class="s">&quot;/home/otptest/.cache/my_application/log&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4581139733-1">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4581139733-2">#{</span><sp[·...·truncated·by·diffoscope;·len:·175,·SHA:·8a6c708f07bbb99872ff932a7a2648ab9c5c09e5bcd3a5c33f82fc819bee2c71·...·]-1">)</span><span·class="p">.</span><span·class="w">702 </span><span·class="s">&quot;/home/otptest/.cache/my_application/log&quot;</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="3209058502-1">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3209058502-2">#{</span><sp[·...·truncated·by·diffoscope;·len:·175,·SHA:·f7d9916ff01dcc8d972a7d203cdd58e34d9b046808b0b9b03f597d1dd19bae9d·...·]-1">)</span><span·class="p">.</span><span·class="w">
703 </span><span·class="s">&quot;/home/otptest/Library/Logs/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">12&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="1466345073-1">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="1466345073-1">)</span><span·class="p">.</span><span·class="w">703 </span><span·class="s">&quot;/home/otptest/Library/Logs/my_application&quot;</span></code></pre><p>On·Windows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">12&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4816548530-1">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p"·data-group-id="4816548530-1">)</span><span·class="p">.</span><span·class="w">
704 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/Logs&quot;</span><span·class="gp·unselectable">704 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/My·App/Logs&quot;</span><span·class="gp·unselectable">
705 13&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="1466345073-2">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1466345073-3">#{</span><span·class="ss">author</span><span[·...·truncated·by·diffoscope;·len:·279,·SHA:·d13c8b06d85bca86ced5888e65d189e2ed26224e80e26778d0672c605e21590c·...·]-2">)</span><span·class="p">.</span><span·class="w">705 13&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="4816548530-2">(</span><span·class="ss">user_log</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;My·App&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="4816548530-3">#{</span><span·class="ss">author</span><span[·...·truncated·by·diffoscope;·len:·279,·SHA:·29426cdd03ab44d66678ebd79aa5acd08b49042d691c8c64a963ffb6be4f4356·...·]-2">)</span><span·class="p">.</span><span·class="w">
706 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/1.2/Logs&quot;</span></code></pre></li><li><p><code·class="inline"·id="site_config">site_config</code></p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CONFIG_DIRS</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="2754368298-1">(</span><span·class="ss">site_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2754368298-2">#{</span>[·...·truncated·by·diffoscope;·len:·176,·SHA:·be4ab59876bff517f5210b3064acf78dae5c290d1240586067b2c5c1e109b4b4·...·]8-1">)</span><span·class="p">.</span><span·class="w">706 </span><span·class="s">&quot;c:/Users/otptest/AppData/Local/Erlang/My·App/1.2/Logs&quot;</span></code></pre></li><li><p><code·class="inline"·id="site_config">site_config</code></p><p>On·Linux:·Respects·the·os·environment·variable·<code·class="inline">XDG_CONFIG_DIRS</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="9249001288-1">(</span><span·class="ss">site_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9249001288-2">#{</span>[·...·truncated·by·diffoscope;·len:·176,·SHA:·dd95dced44be60e809e7a4dde74c099a879d47fc05794b913f7d23597873f11a·...·]8-1">)</span><span·class="p">.</span><span·class="w">
707 </span><span·class="p"·data-group-id="2754368298-3">[</span><span·class="s">&quot;/usr/local/share/my_application&quot;</span><span·class="p">,</span><span·class="w">707 </span><span·class="p"·data-group-id="9249001288-3">[</span><span·class="s">&quot;/usr/local/share/my_application&quot;</span><span·class="p">,</span><span·class="w">
708 ·</span><span·class="s">&quot;/usr/share/my_application&quot;</span><span·class="p"·data-group-id="2754368298-3">]</span><span·class="gp·unselectable">708 ·</span><span·class="s">&quot;/usr/share/my_application&quot;</span><span·class="p"·data-group-id="9249001288-3">]</span><span·class="gp·unselectable">
709 6&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">getenv</span><span·class="p"·data-group-id="2754368298-4">(</span><span·class="s">&quot;XDG_CONFIG_DIRS&quot;</span><span·class="p"·data-group-id="2754368298-4">)</span><span·class="p">.</span><span·class="w">709 6&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">getenv</span><span·class="p"·data-group-id="9249001288-4">(</span><span·class="s">&quot;XDG_CONFIG_DIRS&quot;</span><span·class="p"·data-group-id="9249001288-4">)</span><span·class="p">.</span><span·class="w">
710 </span><span·class="s">&quot;/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg&quot;</span><span·class="gp·unselectable">710 </span><span·class="s">&quot;/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg&quot;</span><span·class="gp·unselectable">
711 7&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="2754368298-5">(</span><span·class="ss">site_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2754368298-6">#{</span>[·...·truncated·by·diffoscope;·len:·176,·SHA:·7c8724951dbe8103c4e92b4edf78b2fd206b91cad6a0ebd7518e842afcb270f6·...·]8-5">)</span><span·class="p">.</span><span·class="w">711 7&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="9249001288-5">(</span><span·class="ss">site_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9249001288-6">#{</span>[·...·truncated·by·diffoscope;·len:·176,·SHA:·2e2b0431ceec83d8980ee364e8cdd775ce9b0d729bfb850733eef82e0a951f21·...·]8-5">)</span><span·class="p">.</span><span·class="w">
712 </span><span·class="p"·data-group-id="2754368298-7">[</span><span·class="s">&quot;/etc/xdg/xdg-ubuntu/my_application&quot;</span><span·class="p">,</span><span·class="w">712 </span><span·class="p"·data-group-id="9249001288-7">[</span><span·class="s">&quot;/etc/xdg/xdg-ubuntu/my_application&quot;</span><span·class="p">,</span><span·class="w">
713 ·</span><span·class="s">&quot;/usr/share/upstart/xdg/my_application&quot;</span><span·class="p">,</span><span·class="w">713 ·</span><span·class="s">&quot;/usr/share/upstart/xdg/my_application&quot;</span><span·class="p">,</span><span·class="w">
714 ·</span><span·class="s">&quot;/etc/xdg/my_application&quot;</span><span·class="p"·data-group-id="2754368298-7">]</span><span·class="gp·unselectable">714 ·</span><span·class="s">&quot;/etc/xdg/my_application&quot;</span><span·class="p"·data-group-id="9249001288-7">]</span><span·class="gp·unselectable">
715 8&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">unsetenv</span><span·class="p"·data-group-id="2754368298-8">(</span><span·class="s">&quot;XDG_CONFIG_DIRS&quot;</span><span·class="p"·data-group-id="2754368298-8">)</span><span·class="p">.</span><span·class="w">715 8&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">unsetenv</span><span·class="p"·data-group-id="9249001288-8">(</span><span·class="s">&quot;XDG_CONFIG_DIRS&quot;</span><span·class="p"·data-group-id="9249001288-8">)</span><span·class="p">.</span><span·class="w">
716 </span><span·class="ss">true</span><span·class="gp·unselectable">716 </span><span·class="ss">true</span><span·class="gp·unselectable">
717 9&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="2754368298-9">(</span><span·class="ss">site_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2754368298-10">#{</span[·...·truncated·by·diffoscope;·len:·178,·SHA:·c279be610b892aa45e0eae9452310f3ee89df51aaff21d88c635657ca95be992·...·]8-9">)</span><span·class="p">.</span><span·class="w">717 9&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="9249001288-9">(</span><span·class="ss">site_config</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9249001288-10">#{</span[·...·truncated·by·diffoscope;·len:·178,·SHA:·242ee65805aa624738e6b8f636a2d97ffbfe0e0bbefa788883a5e658f86d3b32·...·]8-9">)</span><span·class="p">.</span><span·class="w">
718 </span><span·class="p"·data-group-id="2754368298-11">[</span><span·class="s">&quot;/etc/xdg/my_application&quot;</span><span·class="p"·data-group-id="2754368298-11">]</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span>[·...·truncated·by·diffoscope;·len:·552,·SHA:·fa9916747fb831018cfd15ba60a6778cebd2085901465b7e2a5a650767dd2975·...·]-1">)</span><span·class="p">.</span><span·class="w">718 </span><span·class="p"·data-group-id="9249001288-11">[</span><span·class="s">&quot;/etc/xdg/my_application&quot;</span><span·class="p"·data-group-id="9249001288-11">]</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span>[·...·truncated·by·diffoscope;·len:·552,·SHA:·425feb18049e5f765806f151c702d3ff3280a374d75c1de52e94453cbe3a1be0·...·]-1">)</span><span·class="p">.</span><span·class="w">
719 </span><span·class="p"·data-group-id="6005833763-3">[</span><span·class="s">&quot;/Library/Application·Support/my_application&quot;</span><span·class="p"·data-group-id="6005833763-3">]</span></code></pre></li><li><p><code·class="inline"·id="site_data">site_data</code></p><p>On·Linux:·Respects·[·...·truncated·by·diffoscope;·len:·388,·SHA:·df9bc649b4b2bb19efec5e9a75a1efb25b51eed6257ce9d23c2744a668af1ffe·...·]-1">)</span><span·class="p">.</span><span·class="w">719 </span><span·class="p"·data-group-id="1622984567-3">[</span><span·class="s">&quot;/Library/Application·Support/my_application&quot;</span><span·class="p"·data-group-id="1622984567-3">]</span></code></pre></li><li><p><code·class="inline"·id="site_data">site_data</code></p><p>On·Linux:·Respects·[·...·truncated·by·diffoscope;·len:·388,·SHA:·68e413e963fdf93faac27bb26010e3dbf0dee78896462466c37db90a868ae160·...·]-1">)</span><span·class="p">.</span><span·class="w">
720 </span><span·class="s">&quot;/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/&quot;</span><span·class="gp·unselectable">720 </span><span·class="s">&quot;/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/&quot;</span><span·class="gp·unselectable">
721 11&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="3379691982-2">(</span><span·class="ss">site_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3379691982-3">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·f5f3f4c91f7b93f219dc1f228449632406ab51cfcc212caafb7d8c10cc0fcbdf·...·]-2">)</span><span·class="p">.</span><span·class="w">721 11&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="9259191835-2">(</span><span·class="ss">site_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9259191835-3">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·9360a97839b9dbd57ff260546ea9eab805a145def6f3098c5b7183a3895f0c55·...·]-2">)</span><span·class="p">.</span><span·class="w">
722 </span><span·class="p"·data-group-id="3379691982-4">[</span><span·class="s">&quot;/usr/share/ubuntu/my_application&quot;</span><span·class="p">,</span><span·class="w">722 </span><span·class="p"·data-group-id="9259191835-4">[</span><span·class="s">&quot;/usr/share/ubuntu/my_application&quot;</span><span·class="p">,</span><span·class="w">
723 ·</span><span·class="s">&quot;/usr/share/gnome/my_application&quot;</span><span·class="p">,</span><span·class="w">723 ·</span><span·class="s">&quot;/usr/share/gnome/my_application&quot;</span><span·class="p">,</span><span·class="w">
724 ·</span><span·class="s">&quot;/usr/local/share/my_application&quot;</span><span·class="p">,</span><span·class="w">724 ·</span><span·class="s">&quot;/usr/local/share/my_application&quot;</span><span·class="p">,</span><span·class="w">
725 ·</span><span·class="s">&quot;/usr/share/my_application&quot;</span><span·class="p"·data-group-id="3379691982-4">]</span><span·class="gp·unselectable">725 ·</span><span·class="s">&quot;/usr/share/my_application&quot;</span><span·class="p"·data-group-id="9259191835-4">]</span><span·class="gp·unselectable">
726 12&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">unsetenv</span><span·class="p"·data-group-id="3379691982-5">(</span><span·class="s">&quot;XDG_DATA_DIRS&quot;</span><span·class="p"·data-group-id="3379691982-5">)</span><span·class="p">.</span><span·class="w">726 12&gt;·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">unsetenv</span><span·class="p"·data-group-id="9259191835-5">(</span><span·class="s">&quot;XDG_DATA_DIRS&quot;</span><span·class="p"·data-group-id="9259191835-5">)</span><span·class="p">.</span><span·class="w">
727 </span><span·class="ss">true</span><span·class="gp·unselectable">727 </span><span·class="ss">true</span><span·class="gp·unselectable">
728 13&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="3379691982-6">(</span><span·class="ss">site_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3379691982-7">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·ae2931f6da305964f2c82af84a4bf777c491a71b944b2c874039b60af6eafd70·...·]-6">)</span><span·class="p">.</span><span·class="w">728 13&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group-id="9259191835-6">(</span><span·class="ss">site_data</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;my_application&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9259191835-7">#{</span><s[·...·truncated·by·diffoscope;·len:·175,·SHA:·8cbbb127a1c2d536d46bf9c360f513cadce209fab02e52d209ed7ef7cfb3d1d9·...·]-6">)</span><span·class="p">.</span><span·class="w">
729 </span><span·class="p"·data-group-id="3379691982-8">[</span><span·class="s">&quot;/usr/local/share/my_application&quot;</span><span·class="p">,</span><span·class="w">729 </span><span·class="p"·data-group-id="9259191835-8">[</span><span·class="s">&quot;/usr/local/share/my_application&quot;</span><span·class="p">,</span><span·class="w">
730 ·</span><span·class="s">&quot;/usr/share/my_application&quot;</span><span·class="p"·data-group-id="3379691982-8">]</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·436,·SHA:·691b63e7c62a9b572b781878496baee7381bc9593e3baa47123d8b41121ef629·...·]8-1">)</span><span·class="p">.</span><span·class="w">730 ·</span><span·class="s">&quot;/usr/share/my_application&quot;</span><span·class="p"·data-group-id="9259191835-8">]</span></code></pre><p>On·Darwin:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basedir</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·436,·SHA:·d1335056a9eadedb55cbd960be4b62c9a43f975f58dfa20b61eda5a10033efc7·...·]8-1">)</span><span·class="p">.</span><span·class="w">
731 </span><span·class="p"·data-group-id="3006741908-3">[</span><span·class="s">&quot;/Library/Application·Support/my_application&quot;</span><span·class="p"·data-group-id="3006741908-3">]</span></code></pre></li></ul>731 </span><span·class="p"·data-group-id="2053314938-3">[</span><span·class="s">&quot;/Library/Application·Support/my_application&quot;</span><span·class="p"·data-group-id="2053314938-3">]</span></code></pre></li></ul>
732 ··</section>732 ··</section>
733 </section>733 </section>
734 <section·class="detail"·id="basename/1">734 <section·class="detail"·id="basename/1">
  
735 ··<div·class="detail-header">735 ··<div·class="detail-header">
736 ····<a·href="#basename/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">736 ····<a·href="#basename/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
737 ······<i·class="ri-link-m"·aria-hidden="true"></i>737 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 755, 20 lines modifiedOffset 755, 20 lines modified
755 ······<div·class="specs">755 ······<div·class="specs">
  
756 ··········<pre·translate="no"><span·class="attribute">-spec</span>·basename(Filename)·->·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename_all/0">file:filename_all</a>()·when·Filename·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>().</pre>756 ··········<pre·translate="no"><span·class="attribute">-spec</span>·basename(Filename)·->·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename_all/0">file:filename_all</a>()·when·Filename·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>().</pre>
  
757 ······</div>757 ······</div>
  
758 <p>Returns·the·last·component·of·<code·class="inline">Filename</code>,·or·<code·class="inline">Filename</code>·itself·if·it·does·not758 <p>Returns·the·last·component·of·<code·class="inline">Filename</code>,·or·<code·class="inline">Filename</code>·itself·if·it·does·not
759 contain·any·directory·separators.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="8382038073-1">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="8382038073-1">)</span><span·class="p">.</span><span·class="w">759 contain·any·directory·separators.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="3542746452-1">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="3542746452-1">)</span><span·class="p">.</span><span·class="w">
760 </span><span·class="s">&quot;foo&quot;</span><span·class="gp·unselectable">760 </span><span·class="s">&quot;foo&quot;</span><span·class="gp·unselectable">
761 6&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="8382038073-2">(</span><span·class="s">&quot;/usr/foo&quot;</span><span·class="p"·data-group-id="8382038073-2">)</span><span·class="p">.</span><span·class="w">761 6&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="3542746452-2">(</span><span·class="s">&quot;/usr/foo&quot;</span><span·class="p"·data-group-id="3542746452-2">)</span><span·class="p">.</span><span·class="w">
762 </span><span·class="s">&quot;foo&quot;</span><span·class="gp·unselectable">762 </span><span·class="s">&quot;foo&quot;</span><span·class="gp·unselectable">
763 7&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="8382038073-3">(</span><span·class="s">&quot;/&quot;</span><span·class="p"·data-group-id="8382038073-3">)</span><span·class="p">.</span><span·class="w">763 7&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="3542746452-3">(</span><span·class="s">&quot;/&quot;</span><span·class="p"·data-group-id="3542746452-3">)</span><span·class="p">.</span><span·class="w">
764 </span><span·class="p"·data-group-id="8382038073-4">[</span><span·class="p"·data-group-id="8382038073-4">]</span></code></pre>764 </span><span·class="p"·data-group-id="3542746452-4">[</span><span·class="p"·data-group-id="3542746452-4">]</span></code></pre>
765 ··</section>765 ··</section>
766 </section>766 </section>
767 <section·class="detail"·id="basename/2">767 <section·class="detail"·id="basename/2">
  
768 ··<div·class="detail-header">768 ··<div·class="detail-header">
769 ····<a·href="#basename/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">769 ····<a·href="#basename/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
770 ······<i·class="ri-link-m"·aria-hidden="true"></i>770 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 791, 23 lines modifiedOffset 791, 23 lines modified
791 ··········<pre·translate="no"><span·class="attribute">-spec</span>·basename(Filename,·Ext)·->·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename_all/0">file:filename_all</a>()791 ··········<pre·translate="no"><span·class="attribute">-spec</span>·basename(Filename,·Ext)·->·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:filename_all/0">file:filename_all</a>()
792 ··················when·Filename·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>(),·Ext·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>().</pre>792 ··················when·Filename·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>(),·Ext·::·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#t:name_all/0">file:name_all</a>().</pre>
  
793 ······</div>793 ······</div>
  
794 <p>Returns·the·last·component·of·<code·class="inline">Filename</code>·with·extension·<code·class="inline">Ext</code>·stripped.</p><p>This·function·is·to·be·used·to·remove·a·(possible)·specific·extension.794 <p>Returns·the·last·component·of·<code·class="inline">Filename</code>·with·extension·<code·class="inline">Ext</code>·stripped.</p><p>This·function·is·to·be·used·to·remove·a·(possible)·specific·extension.
795 To·remove·an·existing·extension·when·you·are·unsure·which·one·it·is,·use795 To·remove·an·existing·extension·when·you·are·unsure·which·one·it·is,·use
796 <a·href="#rootname/1"><code·class="inline">rootname(basename(Filename))</code></a>.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="8837956747-1">(</span><span·class="s">&quot;~/src/kalle.erl&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.erl&quot;</span><span·class="p"·data-group-id="8837956747-1">)</span><span·class="p">.</span><span·class="w">796 <a·href="#rootname/1"><code·class="inline">rootname(basename(Filename))</code></a>.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="6698465480-1">(</span><span·class="s">&quot;~/src/kalle.erl&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.erl&quot;</span><span·class="p"·data-group-id="6698465480-1">)</span><span·class="p">.</span><span·class="w">
797 </span><span·class="s">&quot;kalle&quot;</span><span·class="gp·unselectable">797 </span><span·class="s">&quot;kalle&quot;</span><span·class="gp·unselectable">
798 9&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="8837956747-2">(</span><span·class="s">&quot;~/src/kalle.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.erl&quot;</span><span·class="p"·data-group-id="8837956747-2">)</span><span·class="p">.</span><span·class="w">798 9&gt;·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">basename</span><span·class="p"·data-group-id="6698465480-2">(</span><span·class="s">&quot;~/src/kalle.beam&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.erl&quot;</span><span·class="p"·data-group-id="6698465480-2">)</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 25998/85389 bytes (30.45%) of diff not shown.
6.77 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/gen_event.html
    
Offset 1350, 23 lines modifiedOffset 1350, 23 lines modified
  
1350 <p>This·function·is·called·by·a·<code·class="inline">gen_event</code>·process·in·in·order·to·format/limit·the1350 <p>This·function·is·called·by·a·<code·class="inline">gen_event</code>·process·in·in·order·to·format/limit·the
1351 server·state·for·debugging·and·logging·purposes.</p><p>It·is·called·in·the·following·situations:</p><ul><li>One·of·<a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·is·invoked·to·get·the1351 server·state·for·debugging·and·logging·purposes.</p><p>It·is·called·in·the·following·situations:</p><ul><li>One·of·<a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·is·invoked·to·get·the
1352 <code·class="inline">gen_event</code>·status.</li><li>The·event·handler·terminates·abnormally·and·<code·class="inline">gen_event</code>·logs·an·error.</li></ul><p>This·callback·is·used·to·limit·the·status·of·the·event·handler·returned·by1352 <code·class="inline">gen_event</code>·status.</li><li>The·event·handler·terminates·abnormally·and·<code·class="inline">gen_event</code>·logs·an·error.</li></ul><p>This·callback·is·used·to·limit·the·status·of·the·event·handler·returned·by
1353 <a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·or·sent·to·<a·href="../../../../lib/kernel-10.0.1/doc/html/logger.html"><code·class="inline">logger</code></a>.</p><p>The·callback·gets·a·map·<code·class="inline">Status</code>·describing·the·current·status·and·shall·return1353 <a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·or·sent·to·<a·href="../../../../lib/kernel-10.0.1/doc/html/logger.html"><code·class="inline">logger</code></a>.</p><p>The·callback·gets·a·map·<code·class="inline">Status</code>·describing·the·current·status·and·shall·return
1354 a·map·<code·class="inline">NewStatus</code>·with·the·same·keys,·but·it·may·transform·some·values.</p><p>Two·possible·use·cases·for·this·callback·is·to·remove·sensitive·information·from1354 a·map·<code·class="inline">NewStatus</code>·with·the·same·keys,·but·it·may·transform·some·values.</p><p>Two·possible·use·cases·for·this·callback·is·to·remove·sensitive·information·from
1355 the·state·to·prevent·it·from·being·printed·in·log·files,·or·to·compact·large1355 the·state·to·prevent·it·from·being·printed·in·log·files,·or·to·compact·large
1356 irrelevant·status·items·that·would·only·clutter·the·logs.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">format_status</span><span·class="p"·data-group-id="5235705331-1">(</span><span·class="n">Status</span><span·class="p"·data-group-id="5235705331-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1356 irrelevant·status·items·that·would·only·clutter·the·logs.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">format_status</span><span·class="p"·data-group-id="4195081819-1">(</span><span·class="n">Status</span><span·class="p"·data-group-id="4195081819-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1357 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="5235705331-2">(</span><span·class="w">1357 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="4195081819-2">(</span><span·class="w">
1358 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="5235705331-3">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="5235705331-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1358 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="4195081819-3">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="4195081819-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1359 ············</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">remove</span><span·class="p"·data-group-id="5235705331-4">(</span><span·class="ss">private_key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5235705331-4">)</span><span·class="p">;</span><span·class="w">1359 ············</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">remove</span><span·class="p"·data-group-id="4195081819-4">(</span><span·class="ss">private_key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="4195081819-4">)</span><span·class="p">;</span><span·class="w">
1360 ·······</span><span·class="p"·data-group-id="5235705331-5">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="5235705331-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Pass</[·...·truncated·by·diffoscope;·len:·99,·SHA:·b5c28779321d3be416a4e120067a210684c8ded5b44ef65a9269e5264e953677·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1360 ·······</span><span·class="p"·data-group-id="4195081819-5">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="4195081819-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Pass</[·...·truncated·by·diffoscope;·len:·99,·SHA:·299737390b1c32495cfeb3e8e3aa37cb5ad482969de9c71d1af7c3b1572b29d7·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1361 ············</span><span·class="p"·data-group-id="5235705331-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">removed</span><span·class="p"·data-group-id="5235705331-7">}</span><span·class="p">;</span><span·class="w">1361 ············</span><span·class="p"·data-group-id="4195081819-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">removed</span><span·class="p"·data-group-id="4195081819-7">}</span><span·class="p">;</span><span·class="w">
1362 ·······</span><span·class="p"·data-group-id="5235705331-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="5235705331-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1362 ·······</span><span·class="p"·data-group-id="4195081819-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="4195081819-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1363 ············</span><span·class="n">Value</span><span·class="w">1363 ············</span><span·class="n">Value</span><span·class="w">
1364 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Status</span><span·class="p"·data-group-id="5235705331-2">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·callback·is·optional,·so·event·handler·modules·need·not·export·it.·If·a1364 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Status</span><span·class="p"·data-group-id="4195081819-2">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·callback·is·optional,·so·event·handler·modules·need·not·export·it.·If·a
1365 handler·does·not·export·this·function,·the·<code·class="inline">gen_event</code>·module·uses·the·handler1365 handler·does·not·export·this·function,·the·<code·class="inline">gen_event</code>·module·uses·the·handler
1366 state·directly·for·the·purposes·described·below.</p><p>If·this·callback·is·exported·but·fails,·to·hide·possibly·sensitive·data,·the1366 state·directly·for·the·purposes·described·below.</p><p>If·this·callback·is·exported·but·fails,·to·hide·possibly·sensitive·data,·the
1367 default·function·will·instead·return·the·fact·that1367 default·function·will·instead·return·the·fact·that
1368 <a·href="#c:format_status/1"><code·class="inline">format_status/1</code></a>·has·crashed.</p></blockquote>1368 <a·href="#c:format_status/1"><code·class="inline">format_status/1</code></a>·has·crashed.</p></blockquote>
1369 ··</section>1369 ··</section>
1370 </section>1370 </section>
1371 <section·class="detail"·id="c:format_status/2">1371 <section·class="detail"·id="c:format_status/2">
78.0 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/gen_fsm.html
    
Offset 131, 170 lines modifiedOffset 131, 170 lines modified
131 <p>Deprecated·and·replaced·by·<a·href="gen_statem.html"><code·class="inline">gen_statem</code></a>.</p><h2·id="module-migration-to-gen_statem"·class="section-heading">131 <p>Deprecated·and·replaced·by·<a·href="gen_statem.html"><code·class="inline">gen_statem</code></a>.</p><h2·id="module-migration-to-gen_statem"·class="section-heading">
132 ··<a·href="#module-migration-to-gen_statem"·class="hover-link">132 ··<a·href="#module-migration-to-gen_statem"·class="hover-link">
133 ····<i·class="ri-link-m"·aria-hidden="true"></i>133 ····<i·class="ri-link-m"·aria-hidden="true"></i>
134 ··</a>134 ··</a>
135 ··<span·class="text">Migration·to·gen_statem</span>135 ··<span·class="text">Migration·to·gen_statem</span>
136 </h2>136 </h2>
137 <p>Here·follows·a·simple·example·of·turning·a·gen_fsm·into·a·<a·href="gen_statem.html"><code·class="inline">gen_statem</code></a>.·The137 <p>Here·follows·a·simple·example·of·turning·a·gen_fsm·into·a·<a·href="gen_statem.html"><code·class="inline">gen_statem</code></a>.·The
138 example·comes·from·the·previous·Users·Guide·for·<code·class="inline">gen_fsm</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7603414624-1">(</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="7603414624-1">)</span><span·class="p">.</span><span·class="w">138 example·comes·from·the·previous·Users·Guide·for·<code·class="inline">gen_fsm</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2876423020-1">(</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="2876423020-1">)</span><span·class="p">.</span><span·class="w">
139 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="7603414624-2">(</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="7603414624-2">)</span><span·class="p">.</span><span·class="w">139 </span><span·class="p">-</span><span·class="na">define</span><span·class="p"·data-group-id="2876423020-2">(</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_lock</span><span·class="p"·data-group-id="2876423020-2">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="c1">%-define(BEFORE_REWRITE,·true).</span><span·class="w">140 </span><span·class="c1">%-define(BEFORE_REWRITE,·true).</span><span·class="w">
141 </span><span·class="w">141 </span><span·class="w">
142 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-3">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-3">)</span><span·class="p">.</span><span·class="w">142 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-3">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-3">)</span><span·class="p">.</span><span·class="w">
143 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="7603414624-4">(</span><span·class="ss">gen_fsm</span><span·class="p"·data-group-id="7603414624-4">)</span><span·class="p">.</span><span·class="w">143 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="2876423020-4">(</span><span·class="ss">gen_fsm</span><span·class="p"·data-group-id="2876423020-4">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">144 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
145 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="7603414624-5">(</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="7603414624-5">)</span><span·class="p">.</span><span·class="w">145 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="2876423020-5">(</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="2876423020-5">)</span><span·class="p">.</span><span·class="w">
146 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">146 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
147 </span><span·class="w">147 </span><span·class="w">
148 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7603414624-6">(</span><span·class="p"·data-group-id="7603414624-7">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">button</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·248,·SHA:·6bf7edff6b6bd2e30b1b2e4252e72699fc9af84ce89c38d00bd4c638dd7d38e4·...·]-6">)</span><span·class="p">.</span><span·class="w">148 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2876423020-6">(</span><span·class="p"·data-group-id="2876423020-7">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">button</span><span·class="p">/</s[·...·truncated·by·diffoscope;·len:·248,·SHA:·3403732ba4e5625d67cf52654ac4e05813525cbcc0b744a81b36ee64b9aff026·...·]-6">)</span><span·class="p">.</span><span·class="w">
149 </span><span·class="w">149 </span><span·class="w">
150 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-8">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-8">)</span><span·class="p">.</span><span·class="w">150 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-8">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-8">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7603414624-9">(</span><span·class="p"·data-group-id="7603414624-10">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_sync_event</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">151 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2876423020-9">(</span><span·class="p"·data-group-id="2876423020-10">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_sync_event</span><span·class="p">/</span><span·class="mi">4</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">
152 »       ·</span><span·class="ss">handle_info</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="7603414624-10">]</span><span·class="p"·data-group-id="7603414624-9">)</span><span·class="p">.</span><span·class="w">152 »       ·</span><span·class="ss">handle_info</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi">4</span><span·class="p"·data-group-id="2876423020-10">]</span><span·class="p"·data-group-id="2876423020-9">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">153 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
154 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7603414624-11">(</span><span·class="p"·data-group-id="7603414624-12">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">callback_mode</span><span·class="p">/[·...·truncated·by·diffoscope;·len:·641,·SHA:·4cdc94e9b321c71d716cc084b44dbc18a97cf221619acd243a8e1105ab0ecc0b·...·]-11">)</span><span·class="p">.</span><span·class="w">154 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2876423020-11">(</span><span·class="p"·data-group-id="2876423020-12">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">callback_mode</span><span·class="p">/[·...·truncated·by·diffoscope;·len:·641,·SHA:·19a7f2684e69ebf8ff5890225235299a5144e5ddbc1a3a050fab44e5e9718ae1·...·]-11">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="c1">%%·Add·callback__mode/0</span><span·class="w">155 </span><span·class="c1">%%·Add·callback__mode/0</span><span·class="w">
156 </span><span·class="c1">%%·Change·arity·of·the·state·functions</span><span·class="w">156 </span><span·class="c1">%%·Change·arity·of·the·state·functions</span><span·class="w">
157 </span><span·class="c1">%%·Remove·handle_info/3</span><span·class="w">157 </span><span·class="c1">%%·Remove·handle_info/3</span><span·class="w">
158 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">158 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
159 </span><span·class="w">159 </span><span·class="w">
160 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-13">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-13">)</span><span·class="p">.</span><span·class="w">160 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-13">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-13">)</span><span·class="p">.</span><span·class="w">
161 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="7603414624-14">(</span><span·class="n">Code</span><span·class="p"·data-group-id="7603414624-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="2876423020-14">(</span><span·class="n">Code</span><span·class="p"·data-group-id="2876423020-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ····</span><span·class="nc">gen_fsm</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="7603414624-15">(</span><span·class="p"·data-group-id="7603414624-16">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="7603414624-16">}</sp[·...·truncated·by·diffoscope;·len:·376,·SHA:·42d1f70c2b90bb62dfda7d844eca1fdce93c9d8c91f4f3dfe77dc006d5946b63·...·]-15">)</span><span·class="p">.</span><span·class="w">162 ····</span><span·class="nc">gen_fsm</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="2876423020-15">(</span><span·class="p"·data-group-id="2876423020-16">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="w">·</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="2876423020-16">}</sp[·...·truncated·by·diffoscope;·len:·376,·SHA:·34de5001586021c39c329364df12f9281d6c566a0b3e7728473fe37ff435ec69·...·]-15">)</span><span·class="p">.</span><span·class="w">
163 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">163 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
164 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="7603414624-18">(</span><span·class="n">Code</span><span·class="p"·data-group-id="7603414624-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">164 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="2876423020-18">(</span><span·class="n">Code</span><span·class="p"·data-group-id="2876423020-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
165 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="7603414624-19">(</span><span·class="p"·data-group-id="7603414624-20">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="7603414624-20">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·352,·SHA:·a6ecfda084c79e3ea98815b4332a96f09b44ae60045db8d01ac80f08b1772a42·...·]-19">)</span><span·class="p">.</span><span·class="w">165 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="2876423020-19">(</span><span·class="p"·data-group-id="2876423020-20">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p"·data-group-id="2876423020-20">}</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·352,·SHA:·7e6ee130c80418515a8637df1a93aea4e7a7dad181f507fe633f6dd444e6872c·...·]-19">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">166 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
167 </span><span·class="w">167 </span><span·class="w">
168 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-22">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-22">)</span><span·class="p">.</span><span·class="w">168 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-22">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-22">)</span><span·class="p">.</span><span·class="w">
169 </span><span·class="nf">button</span><span·class="p"·data-group-id="7603414624-23">(</span><span·class="n">Digit</span><span·class="p"·data-group-id="7603414624-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 </span><span·class="nf">button</span><span·class="p"·data-group-id="2876423020-23">(</span><span·class="n">Digit</span><span·class="p"·data-group-id="2876423020-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ····</span><span·class="nc">gen_fsm</span><span·class="p">:</span><span·class="nf">send_event</span><span·class="p"·data-group-id="7603414624-24">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-25">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·121,·SHA:·9809f16a09a21e27a05dca768b07651aff7f57ce03be3f34c3e8a19ced5d7381·...·]-24">)</span><span·class="p">.</span><span·class="w">170 ····</span><span·class="nc">gen_fsm</span><span·class="p">:</span><span·class="nf">send_event</span><span·class="p"·data-group-id="2876423020-24">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-25">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·121,·SHA:·95587f5f95dbfa45df32c5f4f09617d58a4152e57f1e8218c5dd128f1c28a22b·...·]-24">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">171 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
172 </span><span·class="nf">button</span><span·class="p"·data-group-id="7603414624-26">(</span><span·class="n">Digit</span><span·class="p"·data-group-id="7603414624-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 </span><span·class="nf">button</span><span·class="p"·data-group-id="2876423020-26">(</span><span·class="n">Digit</span><span·class="p"·data-group-id="2876423020-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="7603414624-27">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-28">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Digit</spa[·...·truncated·by·diffoscope;·len:·97,·SHA:·a34be6c30393bb2c55afefe85b290d6f9187d6370d8b3070be4768779d439215·...·]-27">)</span><span·class="p">.</span><span·class="w">173 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">cast</span><span·class="p"·data-group-id="2876423020-27">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-28">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Digit</spa[·...·truncated·by·diffoscope;·len:·97,·SHA:·0a3a1a52c353f229083ae1373caf1c27197d4e83e354498462dc86d569317b1c·...·]-27">)</span><span·class="p">.</span><span·class="w">
174 ····</span><span·class="c1">%%·send_event·is·asynchronous·and·becomes·a·cast</span><span·class="w">174 ····</span><span·class="c1">%%·send_event·is·asynchronous·and·becomes·a·cast</span><span·class="w">
175 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">175 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
176 </span><span·class="w">176 </span><span·class="w">
177 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-29">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-29">)</span><span·class="p">.</span><span·class="w">177 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-29">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-29">)</span><span·class="p">.</span><span·class="w">
178 </span><span·class="nf">stop</span><span·class="p"·data-group-id="7603414624-30">(</span><span·class="p"·data-group-id="7603414624-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">stop</span><span·class="p"·data-group-id="2876423020-30">(</span><span·class="p"·data-group-id="2876423020-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="nc">gen_fsm</span><span·class="p">:</span><span·class="nf">sync_send_all_state_event</span><span·class="p"·data-group-id="7603414624-31">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="7603414624-31">)</span><span·class="p">.</span><span·class="w">179 ····</span><span·class="nc">gen_fsm</span><span·class="p">:</span><span·class="nf">sync_send_all_state_event</span><span·class="p"·data-group-id="2876423020-31">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="2876423020-31">)</span><span·class="p">.</span><span·class="w">
180 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">180 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
181 </span><span·class="nf">stop</span><span·class="p"·data-group-id="7603414624-32">(</span><span·class="p"·data-group-id="7603414624-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">181 </span><span·class="nf">stop</span><span·class="p"·data-group-id="2876423020-32">(</span><span·class="p"·data-group-id="2876423020-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
182 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7603414624-33">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="7603414624-33">)</span><span·class="p">.</span><span·class="w">182 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="2876423020-33">(</span><span·class="o">?</span><span·class="n">NAME</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="2876423020-33">)</span><span·class="p">.</span><span·class="w">
183 ····</span><span·class="c1">%%·sync_send·is·synchronous·and·becomes·call</span><span·class="w">183 ····</span><span·class="c1">%%·sync_send·is·synchronous·and·becomes·call</span><span·class="w">
184 ····</span><span·class="c1">%%·all_state·is·handled·by·callback·code·in·gen_statem</span><span·class="w">184 ····</span><span·class="c1">%%·all_state·is·handled·by·callback·code·in·gen_statem</span><span·class="w">
185 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">185 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
  
186 </span><span·class="nf">init</span><span·class="p"·data-group-id="7603414624-34">(</span><span·class="n">Code</span><span·class="p"·data-group-id="7603414624-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">186 </span><span·class="nf">init</span><span·class="p"·data-group-id="2876423020-34">(</span><span·class="n">Code</span><span·class="p"·data-group-id="2876423020-34">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
187 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="7603414624-35">(</span><span·class="p"·data-group-id="7603414624-35">)</span><span·class="p">,</span><span·class="w">187 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="2876423020-35">(</span><span·class="p"·data-group-id="2876423020-35">)</span><span·class="p">,</span><span·class="w">
188 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-36">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">remaining</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·124,·SHA:·9e026bf091106ec158b4b987ab17e5438c33f7742065a94ea3d69900b90bbf1c·...·]-36">}</span><span·class="p">,</span><span·class="w">188 ····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-36">#{</span><span·class="ss">code</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="n">Code</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">remaining</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·124,·SHA:·9dfadf022c340beffd6a691105167f3cc805c59b3ac0ac37ead2db69ba1f746f·...·]-36">}</span><span·class="p">,</span><span·class="w">
189 ····</span><span·class="p"·data-group-id="7603414624-37">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-37">}</span><span·class="p">.</span><span·class="w">189 ····</span><span·class="p"·data-group-id="2876423020-37">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-37">}</span><span·class="p">.</span><span·class="w">
190 </span><span·class="w">190 </span><span·class="w">
191 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-38">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-38">)</span><span·class="p">.</span><span·class="w">191 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-38">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-38">)</span><span·class="p">.</span><span·class="w">
192 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">192 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
193 </span><span·class="nf">callback_mode</span><span·class="p"·data-group-id="7603414624-39">(</span><span·class="p"·data-group-id="7603414624-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">193 </span><span·class="nf">callback_mode</span><span·class="p"·data-group-id="2876423020-39">(</span><span·class="p"·data-group-id="2876423020-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
194 ····</span><span·class="ss">state_functions</span><span·class="p">.</span><span·class="w">194 ····</span><span·class="ss">state_functions</span><span·class="p">.</span><span·class="w">
195 </span><span·class="c1">%%·state_functions·mode·is·the·mode·most·similar·to</span><span·class="w">195 </span><span·class="c1">%%·state_functions·mode·is·the·mode·most·similar·to</span><span·class="w">
196 </span><span·class="c1">%%·gen_fsm.·There·is·also·handle_event·mode·which·is</span><span·class="w">196 </span><span·class="c1">%%·gen_fsm.·There·is·also·handle_event·mode·which·is</span><span·class="w">
197 </span><span·class="c1">%%·a·fairly·different·concept.</span><span·class="w">197 </span><span·class="c1">%%·a·fairly·different·concept.</span><span·class="w">
198 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">198 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
199 </span><span·class="w">199 </span><span·class="w">
200 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-40">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-40">)</span><span·class="p">.</span><span·class="w">200 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-40">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-40">)</span><span·class="p">.</span><span·class="w">
201 </span><span·class="nf">locked</span><span·class="p"·data-group-id="7603414624-41">(</span><span·class="p"·data-group-id="7603414624-42">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Digit</span><span·class="p"·data-group-id="7603414624-42">}</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·98,·SHA:·d72499e8ba92b613df22898a515e2cc18abcd427ca7cb8246133c26f55b8cde6·...·]-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 </span><span·class="nf">locked</span><span·class="p"·data-group-id="2876423020-41">(</span><span·class="p"·data-group-id="2876423020-42">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Digit</span><span·class="p"·data-group-id="2876423020-42">}</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·98,·SHA:·2a689148ec068b5e75e6024a871b231e3e66a24dc439f2e86635c0bd2c0aaa0d·...·]-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">analyze_lock</span><span·class="p"·data-group-id="7603414624-43">(</span><span·class="n">Digit</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data0</span><span·class="p"·data-group-id="7603414624-43">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">202 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">analyze_lock</span><span·class="p"·data-group-id="2876423020-43">(</span><span·class="n">Digit</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data0</span><span·class="p"·data-group-id="2876423020-43">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
203 »       </span><span·class="p"·data-group-id="7603414624-44">{</span><span·class="ss">open</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9d25a3a83a585aa521e330f3a1b2019d35966e5ff1a9422031250d186c46aed4·...·]-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">203 »       </span><span·class="p"·data-group-id="2876423020-44">{</span><span·class="ss">open</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·7a0bca98425a1b28dc64bea788bd9d0613037258eac15fe9c29b8bd9c108e851·...·]-44">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
204 »       ····</span><span·class="p"·data-group-id="7603414624-45">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·74,·SHA:·368dc17fd3a58567e7db98d6f36120744214ef03763dec9aa7219e2fd6e0fd75·...·]-45">}</span><span·class="p">;</span><span·class="w">204 »       ····</span><span·class="p"·data-group-id="2876423020-45">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·74,·SHA:·e86ad4ba0198a49f7a1c58c9298b148d79186cd4535528b1b417ab188c54cb2f·...·]-45">}</span><span·class="p">;</span><span·class="w">
205 »       </span><span·class="p"·data-group-id="7603414624-46">{</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-46">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 »       </span><span·class="p"·data-group-id="2876423020-46">{</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-46">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 »       ····</span><span·class="p"·data-group-id="7603414624-47">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-47">}</span><span·class="w">206 »       ····</span><span·class="p"·data-group-id="2876423020-47">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-47">}</span><span·class="w">
207 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">207 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
208 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">208 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
209 </span><span·class="nf">locked</span><span·class="p"·data-group-id="7603414624-48">(</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-49">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Digit</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·150,·SHA:·cc6981997ec5d67dced158db7fc07fc90f44588d7aa4701792f0900fdbe78b81·...·]-48">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">209 </span><span·class="nf">locked</span><span·class="p"·data-group-id="2876423020-48">(</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-49">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="n">Digit</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·150,·SHA:·62e266591bb739f8c73824913de8b5543cb5eddf01ed5d3fb8873e22eec77ba2·...·]-48">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
210 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">analyze_lock</span><span·class="p"·data-group-id="7603414624-50">(</span><span·class="n">Digit</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data0</span><span·class="p"·data-group-id="7603414624-50">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">210 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">analyze_lock</span><span·class="p"·data-group-id="2876423020-50">(</span><span·class="n">Digit</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data0</span><span·class="p"·data-group-id="2876423020-50">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
211 »       </span><span·class="p"·data-group-id="7603414624-51">{</span><span·class="ss">open</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9d25a3a83a585aa521e330f3a1b2019d35966e5ff1a9422031250d186c46aed4·...·]-51">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">211 »       </span><span·class="p"·data-group-id="2876423020-51">{</span><span·class="ss">open</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·7a0bca98425a1b28dc64bea788bd9d0613037258eac15fe9c29b8bd9c108e851·...·]-51">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
212 »       ····</span><span·class="p"·data-group-id="7603414624-52">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·74,·SHA:·368dc17fd3a58567e7db98d6f36120744214ef03763dec9aa7219e2fd6e0fd75·...·]-52">}</span><span·class="p">;</span><span·class="w">212 »       ····</span><span·class="p"·data-group-id="2876423020-52">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·74,·SHA:·e86ad4ba0198a49f7a1c58c9298b148d79186cd4535528b1b417ab188c54cb2f·...·]-52">}</span><span·class="p">;</span><span·class="w">
213 »       </span><span·class="p"·data-group-id="7603414624-53">{</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-53">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">213 »       </span><span·class="p"·data-group-id="2876423020-53">{</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-53">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
214 »       ····</span><span·class="p"·data-group-id="7603414624-54">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-54">}</span><span·class="w">214 »       ····</span><span·class="p"·data-group-id="2876423020-54">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-54">}</span><span·class="w">
215 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">215 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
216 </span><span·class="nf">locked</span><span·class="p"·data-group-id="7603414624-55">(</span><span·class="p"·data-group-id="7603414624-56">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="7603414624-56">}</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·168,·SHA:·d1547ffbdb93c997d064eac8c59effb30b5dc227f2ea48596216c06dfaf19d50·...·]-55">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">216 </span><span·class="nf">locked</span><span·class="p"·data-group-id="2876423020-55">(</span><span·class="p"·data-group-id="2876423020-56">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="2876423020-56">}</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·168,·SHA:·8c2fc3bc76ef54d43d10415514d78be30476fe714c09340971efb54c0676f2d4·...·]-55">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
217 ····</span><span·class="nf">handle_call</span><span·class="p"·data-group-id="7603414624-57">(</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-57">)</span><span·class="p">;</span><span·class="w">217 ····</span><span·class="nf">handle_call</span><span·class="p"·data-group-id="2876423020-57">(</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-57">)</span><span·class="p">;</span><span·class="w">
218 </span><span·class="nf">locked</span><span·class="p"·data-group-id="7603414624-58">(</span><span·class="p"·data-group-id="7603414624-59">{</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7603414624-59">}</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·173,·SHA:·b42aca851ad34e4a0d09351e5570949c7a4b6e5b8d8e803da813c048266df51f·...·]-58">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">218 </span><span·class="nf">locked</span><span·class="p"·data-group-id="2876423020-58">(</span><span·class="p"·data-group-id="2876423020-59">{</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="2876423020-59">}</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·173,·SHA:·6135eb622317c510f5ae46500322b0297c8a5cde143088c77ec5c27bcd32dbf4·...·]-58">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
219 ····</span><span·class="nf">handle_info</span><span·class="p"·data-group-id="7603414624-60">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-60">)</span><span·class="p">.</span><span·class="w">219 ····</span><span·class="nf">handle_info</span><span·class="p"·data-group-id="2876423020-60">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-60">)</span><span·class="p">.</span><span·class="w">
220 </span><span·class="c1">%%·Arity·differs</span><span·class="w">220 </span><span·class="c1">%%·Arity·differs</span><span·class="w">
221 </span><span·class="c1">%%·All·state·events·are·dispatched·to·handle_call·and·handle_info·help</span><span·class="w">221 </span><span·class="c1">%%·All·state·events·are·dispatched·to·handle_call·and·handle_info·help</span><span·class="w">
222 </span><span·class="c1">%%·functions.·If·you·want·to·handle·a·call·or·cast·event·specifically</span><span·class="w">222 </span><span·class="c1">%%·functions.·If·you·want·to·handle·a·call·or·cast·event·specifically</span><span·class="w">
223 </span><span·class="c1">%%·for·this·state·you·would·add·a·special·clause·for·it·above.</span><span·class="w">223 </span><span·class="c1">%%·for·this·state·you·would·add·a·special·clause·for·it·above.</span><span·class="w">
224 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">224 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
225 </span><span·class="w">225 </span><span·class="w">
226 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-61">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-61">)</span><span·class="p">.</span><span·class="w">226 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-61">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-61">)</span><span·class="p">.</span><span·class="w">
227 </span><span·class="nf">open</span><span·class="p"·data-group-id="7603414624-62">(</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7603414624-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 </span><span·class="nf">open</span><span·class="p"·data-group-id="2876423020-62">(</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2876423020-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 ·····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="7603414624-63">(</span><span·class="p"·data-group-id="7603414624-63">)</span><span·class="p">,</span><span·class="w">228 ·····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="2876423020-63">(</span><span·class="p"·data-group-id="2876423020-63">)</span><span·class="p">,</span><span·class="w">
229 ····</span><span·class="p"·data-group-id="7603414624-64">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7603414624-64">}</span><span·class="p">;</span><span·class="w">229 ····</span><span·class="p"·data-group-id="2876423020-64">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2876423020-64">}</span><span·class="p">;</span><span·class="w">
230 </span><span·class="nf">open</span><span·class="p"·data-group-id="7603414624-65">(</span><span·class="p"·data-group-id="7603414624-66">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7603414624-66">}</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·69,·SHA:·3a1a1c938074774a1866b496124ea1f445b8febff5f6831d7efb1f3c6db28035·...·]-65">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">230 </span><span·class="nf">open</span><span·class="p"·data-group-id="2876423020-65">(</span><span·class="p"·data-group-id="2876423020-66">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="2876423020-66">}</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·69,·SHA:·86efef0ca2b0f72d721d1f2197c3736f13d51b48d2fadf4928d12b1f4685d7ac·...·]-65">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
231 ····</span><span·class="p"·data-group-id="7603414624-67">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-67">}</span><span·class="p">.</span><span·class="w">231 ····</span><span·class="p"·data-group-id="2876423020-67">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-67">}</span><span·class="p">.</span><span·class="w">
232 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">232 </span><span·class="p">-</span><span·class="na">else</span><span·class="p">.</span><span·class="w">
233 </span><span·class="nf">open</span><span·class="p"·data-group-id="7603414624-68">(</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-68">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">233 </span><span·class="nf">open</span><span·class="p"·data-group-id="2876423020-68">(</span><span·class="ss">timeout</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-68">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
234 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="7603414624-69">(</span><span·class="p"·data-group-id="7603414624-69">)</span><span·class="p">,</span><span·class="w">234 ····</span><span·class="nf">do_lock</span><span·class="p"·data-group-id="2876423020-69">(</span><span·class="p"·data-group-id="2876423020-69">)</span><span·class="p">,</span><span·class="w">
235 ····</span><span·class="p"·data-group-id="7603414624-70">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-70">}</span><span·class="p">;</span><span·class="w">235 ····</span><span·class="p"·data-group-id="2876423020-70">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-70">}</span><span·class="p">;</span><span·class="w">
236 </span><span·class="nf">open</span><span·class="p"·data-group-id="7603414624-71">(</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-72">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·145,·SHA:·2f55cb7e0e5ce6fe00bd18a6727df11d00a27c826d6d9115b0a467dbe251f6c8·...·]-71">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">236 </span><span·class="nf">open</span><span·class="p"·data-group-id="2876423020-71">(</span><span·class="ss">cast</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-72">{</span><span·class="ss">button</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·145,·SHA:·9d5faea6cdf05e8e34081976674b2eb5ae047f8c67e32425be2f2e84d1e0c49e·...·]-71">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
237 ····</span><span·class="p"·data-group-id="7603414624-73">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-73">}</span><span·class="p">;</span><span·class="w">237 ····</span><span·class="p"·data-group-id="2876423020-73">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">locked</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-73">}</span><span·class="p">;</span><span·class="w">
238 </span><span·class="nf">open</span><span·class="p"·data-group-id="7603414624-74">(</span><span·class="p"·data-group-id="7603414624-75">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="7603414624-75">}</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·168,·SHA:·d1547ffbdb93c997d064eac8c59effb30b5dc227f2ea48596216c06dfaf19d50·...·]-74">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">238 </span><span·class="nf">open</span><span·class="p"·data-group-id="2876423020-74">(</span><span·class="p"·data-group-id="2876423020-75">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="2876423020-75">}</span><span·class="p">,</spa[·...·truncated·by·diffoscope;·len:·168,·SHA:·8c2fc3bc76ef54d43d10415514d78be30476fe714c09340971efb54c0676f2d4·...·]-74">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
239 ····</span><span·class="nf">handle_call</span><span·class="p"·data-group-id="7603414624-76">(</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-76">)</span><span·class="p">;</span><span·class="w">239 ····</span><span·class="nf">handle_call</span><span·class="p"·data-group-id="2876423020-76">(</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-76">)</span><span·class="p">;</span><span·class="w">
240 </span><span·class="nf">open</span><span·class="p"·data-group-id="7603414624-77">(</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-77">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">240 </span><span·class="nf">open</span><span·class="p"·data-group-id="2876423020-77">(</span><span·class="ss">info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-77">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
241 ····</span><span·class="nf">handle_info</span><span·class="p"·data-group-id="7603414624-78">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-78">)</span><span·class="p">.</span><span·class="w">241 ····</span><span·class="nf">handle_info</span><span·class="p"·data-group-id="2876423020-78">(</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">open</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-78">)</span><span·class="p">.</span><span·class="w">
242 </span><span·class="c1">%%·Arity·differs</span><span·class="w">242 </span><span·class="c1">%%·Arity·differs</span><span·class="w">
243 </span><span·class="c1">%%·All·state·events·are·dispatched·to·handle_call·and·handle_info·help</span><span·class="w">243 </span><span·class="c1">%%·All·state·events·are·dispatched·to·handle_call·and·handle_info·help</span><span·class="w">
244 </span><span·class="c1">%%·functions.·If·you·want·to·handle·a·call·or·cast·event·specifically</span><span·class="w">244 </span><span·class="c1">%%·functions.·If·you·want·to·handle·a·call·or·cast·event·specifically</span><span·class="w">
245 </span><span·class="c1">%%·for·this·state·you·would·add·a·special·clause·for·it·above.</span><span·class="w">245 </span><span·class="c1">%%·for·this·state·you·would·add·a·special·clause·for·it·above.</span><span·class="w">
246 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">246 </span><span·class="p">-</span><span·class="na">endif</span><span·class="p">.</span><span·class="w">
247 </span><span·class="w">247 </span><span·class="w">
248 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="7603414624-79">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="7603414624-79">)</span><span·class="p">.</span><span·class="w">248 </span><span·class="p">-</span><span·class="na">ifdef</span><span·class="p"·data-group-id="2876423020-79">(</span><span·class="n">BEFORE_REWRITE</span><span·class="p"·data-group-id="2876423020-79">)</span><span·class="p">.</span><span·class="w">
249 </span><span·class="nf">handle_sync_event</span><span·class="p"·data-group-id="7603414624-80">(</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">StateName</span><s[·...·truncated·by·diffoscope;·len:·114,·SHA:·609b0697f0ad6288fcd85c7bc0b65d3e33e9a2c671fe2f402569f74ffe06a718·...·]-80">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">249 </span><span·class="nf">handle_sync_event</span><span·class="p"·data-group-id="2876423020-80">(</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">StateName</span><s[·...·truncated·by·diffoscope;·len:·114,·SHA:·d231645c1ee65d08976cbd803e41220b51ca4a03ac7eabdf5a298e2be2435152·...·]-80">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
250 ····</span><span·class="p"·data-group-id="7603414624-81">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·63,·SHA:·247ce290e3aa35cdf0ceb5dfab2ba7d5754b5b1f3760b33cd69beee52f23f783·...·]-81">}</span><span·class="p">.</span><span·class="w">250 ····</span><span·class="p"·data-group-id="2876423020-81">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">normal</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·63,·SHA:·21fc912d8887c28ff1e8c223b122767818dc9f47adefd21d2c4efa49c0f4b754·...·]-81">}</span><span·class="p">.</span><span·class="w">
  
251 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="7603414624-82">(</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-82">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">251 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="2876423020-82">(</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-82">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
252 ····</span><span·class="p"·data-group-id="7603414624-83">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-84">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·445,·SHA:·c5c27cccbf9f0a5975c7032ebe5a728ee31a4dc20dd6b69dc1563dc489d790c4·...·]-83">}</span><span·class="p">.</span><span·class="w">252 ····</span><span·class="p"·data-group-id="2876423020-83">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-84">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·445,·SHA:·9410e75abd24b018234c5a5093d2399a5d4441301cd4a08af7b3bb1583b82a57·...·]-83">}</span><span·class="p">.</span><span·class="w">
  
253 </span><span·class="nf">handle_info</span><span·class="p"·data-group-id="7603414624-86">(</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="7603414624-86">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">253 </span><span·class="nf">handle_info</span><span·class="p"·data-group-id="2876423020-86">(</span><span·class="n">Info</span><span·class="p">,</span><span·class="w">·</span><span·class="n">StateName</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2876423020-86">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
254 ····</span><span·class="p"·data-group-id="7603414624-87">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7603414624-88">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·524,·SHA:·20eae2d55dd50f7c18385d00f39de41f3cc6c3c5dd70c40e09edc95c4481f765·...·]-87">}</span><span·class="p">.</span><span·class="w">254 ····</span><span·class="p"·data-group-id="2876423020-87">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2876423020-88">{</span><span·class="ss">shutdown</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·524,·SHA:·5ec4ee18fb23ea826610b7371bacf1b58714c852f0426e82a282e44c3964aa55·...·]-87">}</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 18902/79686 bytes (23.72%) of diff not shown.
6.71 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/gen_server.html
    
Offset 1342, 23 lines modifiedOffset 1342, 23 lines modified
  
1342 <p>This·function·is·called·by·a·<code·class="inline">gen_server</code>·process·in·in·order·to·format/limit·the1342 <p>This·function·is·called·by·a·<code·class="inline">gen_server</code>·process·in·in·order·to·format/limit·the
1343 server·state·for·debugging·and·logging·purposes.</p><p>It·is·called·in·the·following·situations:</p><ul><li><a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·is·invoked·to·get·the·<code·class="inline">gen_server</code>1343 server·state·for·debugging·and·logging·purposes.</p><p>It·is·called·in·the·following·situations:</p><ul><li><a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·is·invoked·to·get·the·<code·class="inline">gen_server</code>
1344 status.</li><li>The·<code·class="inline">gen_server</code>·process·terminates·abnormally·and·logs·an·error.</li></ul><p>This·callback·is·used·to·limit·the·status·of·the·process·returned·by1344 status.</li><li>The·<code·class="inline">gen_server</code>·process·terminates·abnormally·and·logs·an·error.</li></ul><p>This·callback·is·used·to·limit·the·status·of·the·process·returned·by
1345 <a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·or·sent·to·<a·href="../../../../lib/kernel-10.0.1/doc/html/logger.html"><code·class="inline">logger</code></a>.</p><p>The·callback·gets·a·map·<code·class="inline">Status</code>·describing·the·current·status·and·shall·return1345 <a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·or·sent·to·<a·href="../../../../lib/kernel-10.0.1/doc/html/logger.html"><code·class="inline">logger</code></a>.</p><p>The·callback·gets·a·map·<code·class="inline">Status</code>·describing·the·current·status·and·shall·return
1346 a·map·<code·class="inline">NewStatus</code>·with·the·same·keys,·but·it·may·transform·some·values.</p><p>Two·possible·use·cases·for·this·callback·is·to·remove·sensitive·information·from1346 a·map·<code·class="inline">NewStatus</code>·with·the·same·keys,·but·it·may·transform·some·values.</p><p>Two·possible·use·cases·for·this·callback·is·to·remove·sensitive·information·from
1347 the·state·to·prevent·it·from·being·printed·in·log·files,·or·to·compact·large1347 the·state·to·prevent·it·from·being·printed·in·log·files,·or·to·compact·large
1348 irrelevant·status·items·that·would·only·clutter·the·logs.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">format_status</span><span·class="p"·data-group-id="2753382061-1">(</span><span·class="n">Status</span><span·class="p"·data-group-id="2753382061-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1348 irrelevant·status·items·that·would·only·clutter·the·logs.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">format_status</span><span·class="p"·data-group-id="4245976054-1">(</span><span·class="n">Status</span><span·class="p"·data-group-id="4245976054-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1349 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="2753382061-2">(</span><span·class="w">1349 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="4245976054-2">(</span><span·class="w">
1350 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="2753382061-3">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="2753382061-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1350 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="4245976054-3">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="4245976054-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1351 ············</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">remove</span><span·class="p"·data-group-id="2753382061-4">(</span><span·class="ss">private_key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2753382061-4">)</span><span·class="p">;</span><span·class="w">1351 ············</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">remove</span><span·class="p"·data-group-id="4245976054-4">(</span><span·class="ss">private_key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="4245976054-4">)</span><span·class="p">;</span><span·class="w">
1352 ·······</span><span·class="p"·data-group-id="2753382061-5">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="2753382061-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Pass</[·...·truncated·by·diffoscope;·len:·99,·SHA:·30668517a82177f94d59666fa500e9e9824591382a358ce4a0eba04c9fe27925·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1352 ·······</span><span·class="p"·data-group-id="4245976054-5">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="4245976054-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Pass</[·...·truncated·by·diffoscope;·len:·99,·SHA:·bab0dc62a1d20f3b9ac4246dd3a8fd9f1a8d859fe70331468361a217ce7f54b4·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1353 ············</span><span·class="p"·data-group-id="2753382061-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">removed</span><span·class="p"·data-group-id="2753382061-7">}</span><span·class="p">;</span><span·class="w">1353 ············</span><span·class="p"·data-group-id="4245976054-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">removed</span><span·class="p"·data-group-id="4245976054-7">}</span><span·class="p">;</span><span·class="w">
1354 ·······</span><span·class="p"·data-group-id="2753382061-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="2753382061-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1354 ·······</span><span·class="p"·data-group-id="4245976054-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="4245976054-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1355 ············</span><span·class="n">Value</span><span·class="w">1355 ············</span><span·class="n">Value</span><span·class="w">
1356 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Status</span><span·class="p"·data-group-id="2753382061-2">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·callback·is·optional,·so·callback·modules·need·not·export·it.·The1356 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Status</span><span·class="p"·data-group-id="4245976054-2">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·callback·is·optional,·so·callback·modules·need·not·export·it.·The
1357 <code·class="inline">gen_server</code>·module·provides·a·default·implementation·of·this·function·that1357 <code·class="inline">gen_server</code>·module·provides·a·default·implementation·of·this·function·that
1358 returns·the·callback·module·state.</p><p>If·this·callback·is·exported·but·fails,·to·hide·possibly·sensitive·data,·the1358 returns·the·callback·module·state.</p><p>If·this·callback·is·exported·but·fails,·to·hide·possibly·sensitive·data,·the
1359 default·function·will·instead·return·the·fact·that1359 default·function·will·instead·return·the·fact·that
1360 <a·href="#c:format_status/1"><code·class="inline">format_status/1</code></a>·has·crashed.</p></blockquote>1360 <a·href="#c:format_status/1"><code·class="inline">format_status/1</code></a>·has·crashed.</p></blockquote>
1361 ··</section>1361 ··</section>
1362 </section>1362 </section>
1363 <section·class="detail"·id="c:format_status/2">1363 <section·class="detail"·id="c:format_status/2">
56.6 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/gen_statem.html
    
Offset 251, 105 lines modifiedOffset 251, 105 lines modified
251 ····<i·class="ri-link-m"·aria-hidden="true"></i>251 ····<i·class="ri-link-m"·aria-hidden="true"></i>
252 ··</a>252 ··</a>
253 ··<span·class="text">Example</span>253 ··<span·class="text">Example</span>
254 </h2>254 </h2>
255 <p>The·following·example·shows·a·simple·pushbutton·model·for·a·toggling·pushbutton255 <p>The·following·example·shows·a·simple·pushbutton·model·for·a·toggling·pushbutton
256 implemented·with·<a·href="#t:callback_mode/0"><em>callback·mode</em></a>·<code·class="inline">state_functions</code>.·You256 implemented·with·<a·href="#t:callback_mode/0"><em>callback·mode</em></a>·<code·class="inline">state_functions</code>.·You
257 can·push·the·button·and·it·replies·if·it·went·on·or·off,·and·you·can·ask·for·a257 can·push·the·button·and·it·replies·if·it·went·on·or·off,·and·you·can·ask·for·a
258 count·of·how·many·times·it·has·been·pushed·to·switch·on.</p><p>The·following·is·the·complete·callback·module·file·<code·class="inline">pushbutton.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3788646799-1">(</span><span·class="ss">pushbutton</span><span·class="p"·data-group-id="3788646799-1">)</span><span·class="p">.</span><span·class="w">258 count·of·how·many·times·it·has·been·pushed·to·switch·on.</p><p>The·following·is·the·complete·callback·module·file·<code·class="inline">pushbutton.erl</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8633877961-1">(</span><span·class="ss">pushbutton</span><span·class="p"·data-group-id="8633877961-1">)</span><span·class="p">.</span><span·class="w">
259 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="3788646799-2">(</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="3788646799-2">)</span><span·class="p">.</span><span·class="w">259 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="8633877961-2">(</span><span·class="ss">gen_statem</span><span·class="p"·data-group-id="8633877961-2">)</span><span·class="p">.</span><span·class="w">
260 </span><span·class="w">260 </span><span·class="w">
261 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3788646799-3">(</span><span·class="p"·data-group-id="3788646799-4">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">push</span><span·class="p">/</span><span·class="mi">0</span><s[·...·truncated·by·diffoscope;·len:·299,·SHA:·bfca364274cd90290dbb49a8535e88787105d17209ad7f41a1e49806b5824b54·...·]-3">)</span><span·class="p">.</span><span·class="w">261 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8633877961-3">(</span><span·class="p"·data-group-id="8633877961-4">[</span><span·class="ss">start</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">push</span><span·class="p">/</span><span·class="mi">0</span><s[·...·truncated·by·diffoscope;·len:·299,·SHA:·ef40b5593d3dc58dae79c852492cbb98deaab62c27047f1e0cc562c3522d6694·...·]-3">)</span><span·class="p">.</span><span·class="w">
262 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3788646799-5">(</span><span·class="p"·data-group-id="3788646799-6">[</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·314,·SHA:·b69c4fcaa72c5bb8fc4fbfcf1f771701e5657beb3252d4875fb91ca9d541a993·...·]-5">)</span><span·class="p">.</span><span·class="w">262 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8633877961-5">(</span><span·class="p"·data-group-id="8633877961-6">[</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·314,·SHA:·985fe01b1984f5727a0e25190195fef2c4c24b004b7af48b844d799b55ad7723·...·]-5">)</span><span·class="p">.</span><span·class="w">
263 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3788646799-7">(</span><span·class="p"·data-group-id="3788646799-8">[</span><span·class="ss">on</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">off</span><span·class="p">/</span><span·class="mi">3</span><span·[·...·truncated·by·diffoscope;·len:·88,·SHA:·7cf8107c06e840671408c264d34137f29fb0fb8e5646a25963b5712714c491d8·...·]-7">)</span><span·class="p">.</span><span·class="w">263 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8633877961-7">(</span><span·class="p"·data-group-id="8633877961-8">[</span><span·class="ss">on</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">off</span><span·class="p">/</span><span·class="mi">3</span><span·[·...·truncated·by·diffoscope;·len:·88,·SHA:·68b9301788156d6c02a7b1c419bb62a138d4b4f4ac60b84baccaba20710fb00a·...·]-7">)</span><span·class="p">.</span><span·class="w">
  
264 </span><span·class="nf">name</span><span·class="p"·data-group-id="3788646799-9">(</span><span·class="p"·data-group-id="3788646799-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">pushbutton_statem</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·The·registered·server·name</span><span·class="w">264 </span><span·class="nf">name</span><span·class="p"·data-group-id="8633877961-9">(</span><span·class="p"·data-group-id="8633877961-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">pushbutton_statem</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·The·registered·server·name</span><span·class="w">
  
265 </span><span·class="c1">%%·API.··This·example·uses·a·registered·name·name()</span><span·class="w">265 </span><span·class="c1">%%·API.··This·example·uses·a·registered·name·name()</span><span·class="w">
266 </span><span·class="c1">%%·and·does·not·link·to·the·caller.</span><span·class="w">266 </span><span·class="c1">%%·and·does·not·link·to·the·caller.</span><span·class="w">
267 </span><span·class="nf">start</span><span·class="p"·data-group-id="3788646799-10">(</span><span·class="p"·data-group-id="3788646799-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">267 </span><span·class="nf">start</span><span·class="p"·data-group-id="8633877961-10">(</span><span·class="p"·data-group-id="8633877961-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
268 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3788646799-11">(</span><span·class="p"·data-group-id="3788646799-12">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="nf">name</span><span·class="p"·data-group-id="3788646799-13">(</span><span·class="p"·data-group-id="3788646799-13[·...·truncated·by·diffoscope;·len:·518,·SHA:·5e056de3a4b299bafc68eb3a6c6f4e7d14d9f41c9f193891dff190d399cb67b0·...·]-11">)</span><span·class="p">.</span><span·class="w">268 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8633877961-11">(</span><span·class="p"·data-group-id="8633877961-12">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="nf">name</span><span·class="p"·data-group-id="8633877961-13">(</span><span·class="p"·data-group-id="8633877961-13[·...·truncated·by·diffoscope;·len:·518,·SHA:·c8c07d3dd93fb668b5a05a305a9ff556e909f1cc356af579ca74cc0a5920b655·...·]-11">)</span><span·class="p">.</span><span·class="w">
269 </span><span·class="nf">push</span><span·class="p"·data-group-id="3788646799-16">(</span><span·class="p"·data-group-id="3788646799-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">269 </span><span·class="nf">push</span><span·class="p"·data-group-id="8633877961-16">(</span><span·class="p"·data-group-id="8633877961-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
270 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="3788646799-17">(</span><span·class="nf">name</span><span·class="p"·data-group-id="3788646799-18">(</span><span·class="p"·data-group-id="3788646799-18">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">push</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·806c8c5f86511047c30d73b0eb768f42144640e67ce39a3ee650e819ace303c2·...·]-17">)</span><span·class="p">.</span><span·class="w">270 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8633877961-17">(</span><span·class="nf">name</span><span·class="p"·data-group-id="8633877961-18">(</span><span·class="p"·data-group-id="8633877961-18">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">push</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·882809b505ea44c8a1d637ba76235fd10d9f2d8486ea7b6d33b2046f2b5ce32c·...·]-17">)</span><span·class="p">.</span><span·class="w">
271 </span><span·class="nf">get_count</span><span·class="p"·data-group-id="3788646799-19">(</span><span·class="p"·data-group-id="3788646799-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">271 </span><span·class="nf">get_count</span><span·class="p"·data-group-id="8633877961-19">(</span><span·class="p"·data-group-id="8633877961-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
272 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="3788646799-20">(</span><span·class="nf">name</span><span·class="p"·data-group-id="3788646799-21">(</span><span·class="p"·data-group-id="3788646799-21">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_count</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·5151ae975b3c53497ccb81011c4718fea176d4f60dcebd49f0b8ea2008571800·...·]-20">)</span><span·class="p">.</span><span·class="w">272 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8633877961-20">(</span><span·class="nf">name</span><span·class="p"·data-group-id="8633877961-21">(</span><span·class="p"·data-group-id="8633877961-21">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_count</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·25,·SHA:·61c4af3011dc4e53a44eafc594f89111c50ccba07e881039b4682abd0f558933·...·]-20">)</span><span·class="p">.</span><span·class="w">
273 </span><span·class="nf">stop</span><span·class="p"·data-group-id="3788646799-22">(</span><span·class="p"·data-group-id="3788646799-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">273 </span><span·class="nf">stop</span><span·class="p"·data-group-id="8633877961-22">(</span><span·class="p"·data-group-id="8633877961-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
274 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="3788646799-23">(</span><span·class="nf">name</span><span·class="p"·data-group-id="3788646799-24">(</span><span·class="p"·data-group-id="3788646799-24">)</span><span·class="p"·data-group-id="3788646799-23">)</span><span·class="p">.</span><span·class="w">274 ····</span><span·class="nc">gen_statem</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="8633877961-23">(</span><span·class="nf">name</span><span·class="p"·data-group-id="8633877961-24">(</span><span·class="p"·data-group-id="8633877961-24">)</span><span·class="p"·data-group-id="8633877961-23">)</span><span·class="p">.</span><span·class="w">
  
275 </span><span·class="c1">%%·Mandatory·callback·functions</span><span·class="w">275 </span><span·class="c1">%%·Mandatory·callback·functions</span><span·class="w">
276 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="3788646799-25">(</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·cl[·...·truncated·by·diffoscope;·len:·60,·SHA:·d7118d5c3469316463df16fc7234e86cc543914d351a7ae144be481f7ecef99f·...·]-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">276 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="8633877961-25">(</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·cl[·...·truncated·by·diffoscope;·len:·60,·SHA:·a8fefd37850b1097b412062c83cf080292f29da08894f2de87f55c43be8b581f·...·]-25">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
277 ····</span><span·class="ss">void</span><span·class="p">.</span><span·class="w">277 ····</span><span·class="ss">void</span><span·class="p">.</span><span·class="w">
278 </span><span·class="nf">code_change</span><span·class="p"·data-group-id="3788646799-26">(</span><span·class="p">_</span><span·class="n">Vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·109,·SHA:·21b2fb6b763ca0303616dd03e35e34b1f33e4fa14d38acb4649a03b55a66acb5·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">278 </span><span·class="nf">code_change</span><span·class="p"·data-group-id="8633877961-26">(</span><span·class="p">_</span><span·class="n">Vsn</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·109,·SHA:·f864bd4b08dd143276131e952f680e898a10e64ce87b4fa525ff214aecaddccc·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
279 ····</span><span·class="p"·data-group-id="3788646799-27">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-27">}</span><span·class="p">.</span><span·class="w">279 ····</span><span·class="p"·data-group-id="8633877961-27">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-27">}</span><span·class="p">.</span><span·class="w">
280 </span><span·class="nf">init</span><span·class="p"·data-group-id="3788646799-28">(</span><span·class="p"·data-group-id="3788646799-29">[</span><span·class="p"·data-group-id="3788646799-29">]</span><span·class="p"·data-group-id="3788646799-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">280 </span><span·class="nf">init</span><span·class="p"·data-group-id="8633877961-28">(</span><span·class="p"·data-group-id="8633877961-29">[</span><span·class="p"·data-group-id="8633877961-29">]</span><span·class="p"·data-group-id="8633877961-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
281 ····</span><span·class="c1">%%·Set·the·initial·state·+·data.··Data·is·used·only·as·a·counter.</span><span·class="w">281 ····</span><span·class="c1">%%·Set·the·initial·state·+·data.··Data·is·used·only·as·a·counter.</span><span·class="w">
282 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">off</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">282 ····</span><span·class="n">State</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">off</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
283 ····</span><span·class="p"·data-group-id="3788646799-30">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-30">}</span><span·class="p">.</span><span·class="w">283 ····</span><span·class="p"·data-group-id="8633877961-30">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-30">}</span><span·class="p">.</span><span·class="w">
284 </span><span·class="nf">callback_mode</span><span·class="p"·data-group-id="3788646799-31">(</span><span·class="p"·data-group-id="3788646799-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">state_functions</span><span·class="p">.</span><span·class="w">284 </span><span·class="nf">callback_mode</span><span·class="p"·data-group-id="8633877961-31">(</span><span·class="p"·data-group-id="8633877961-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">state_functions</span><span·class="p">.</span><span·class="w">
  
285 </span><span·class="c1">%%%·state·callback(s)</span><span·class="w">285 </span><span·class="c1">%%%·state·callback(s)</span><span·class="w">
  
286 </span><span·class="nf">off</span><span·class="p"·data-group-id="3788646799-32">(</span><span·class="p"·data-group-id="3788646799-33">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="3788646799-33">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·146,·SHA:·a3efa36b3d6ccd3f496a73329fb4e91c2c8306bb6029f81ba18dc1d650bdfbc9·...·]-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">286 </span><span·class="nf">off</span><span·class="p"·data-group-id="8633877961-32">(</span><span·class="p"·data-group-id="8633877961-33">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="8633877961-33">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·146,·SHA:·cf2bdf6b213b4aec861a49f78ff1a93f40693754cd1115d273d0fcbb34bbc749·...·]-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
287 ····</span><span·class="c1">%%·Go·to·&#39;on&#39;,·increment·count·and·reply</span><span·class="w">287 ····</span><span·class="c1">%%·Go·to·&#39;on&#39;,·increment·count·and·reply</span><span·class="w">
288 ····</span><span·class="c1">%%·that·the·resulting·status·is·&#39;on&#39;</span><span·class="w">288 ····</span><span·class="c1">%%·that·the·resulting·status·is·&#39;on&#39;</span><span·class="w">
289 ····</span><span·class="p"·data-group-id="3788646799-34">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">on</span><span·class="p">,</span><span·class="n">Data</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·362,·SHA:·109be4aa85018448c6c38ab52b2d6cd29a238ad8416ea577fa0ba661c28d25a5·...·]-34">}</span><span·class="p">;</span><span·class="w">289 ····</span><span·class="p"·data-group-id="8633877961-34">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">on</span><span·class="p">,</span><span·class="n">Data</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·362,·SHA:·b0e5c8b5cef97183ecad98ad98d627d5005cbcafe97904052c9691fd59b01a43·...·]-34">}</span><span·class="p">;</span><span·class="w">
290 </span><span·class="nf">off</span><span·class="p"·data-group-id="3788646799-37">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">290 </span><span·class="nf">off</span><span·class="p"·data-group-id="8633877961-37">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
291 ····</span><span·class="nf">handle_event</span><span·class="p"·data-group-id="3788646799-38">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-38">)</span><span·class="p">.</span><span·class="w">291 ····</span><span·class="nf">handle_event</span><span·class="p"·data-group-id="8633877961-38">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-38">)</span><span·class="p">.</span><span·class="w">
  
292 </span><span·class="nf">on</span><span·class="p"·data-group-id="3788646799-39">(</span><span·class="p"·data-group-id="3788646799-40">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="3788646799-40">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·146,·SHA:·a3efa36b3d6ccd3f496a73329fb4e91c2c8306bb6029f81ba18dc1d650bdfbc9·...·]-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">292 </span><span·class="nf">on</span><span·class="p"·data-group-id="8633877961-39">(</span><span·class="p"·data-group-id="8633877961-40">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="8633877961-40">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·146,·SHA:·cf2bdf6b213b4aec861a49f78ff1a93f40693754cd1115d273d0fcbb34bbc749·...·]-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
293 ····</span><span·class="c1">%%·Go·to·&#39;off&#39;·and·reply·that·the·resulting·status·is·&#39;off&#39;</span><span·class="w">293 ····</span><span·class="c1">%%·Go·to·&#39;off&#39;·and·reply·that·the·resulting·status·is·&#39;off&#39;</span><span·class="w">
294 ····</span><span·class="p"·data-group-id="3788646799-41">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">off</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="3788646799-42">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·315,·SHA:·49c985fc38ec78e684c1c7c7d2aea2f3e974c91384373c7b090b6076792a51a2·...·]-41">}</span><span·class="p">;</span><span·class="w">294 ····</span><span·class="p"·data-group-id="8633877961-41">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">off</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="8633877961-42">[</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·315,·SHA:·1a794654a91642bed5962479dcd4f983ff3146eb7005f13a341961298ec7cfa3·...·]-41">}</span><span·class="p">;</span><span·class="w">
295 </span><span·class="nf">on</span><span·class="p"·data-group-id="3788646799-44">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-44">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">295 </span><span·class="nf">on</span><span·class="p"·data-group-id="8633877961-44">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-44">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
296 ····</span><span·class="nf">handle_event</span><span·class="p"·data-group-id="3788646799-45">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-45">)</span><span·class="p">.</span><span·class="w">296 ····</span><span·class="nf">handle_event</span><span·class="p"·data-group-id="8633877961-45">(</span><span·class="n">EventType</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventContent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-45">)</span><span·class="p">.</span><span·class="w">
  
297 </span><span·class="c1">%%·Handle·events·common·to·all·states</span><span·class="w">297 </span><span·class="c1">%%·Handle·events·common·to·all·states</span><span·class="w">
298 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="3788646799-46">(</span><span·class="p"·data-group-id="3788646799-47">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="3788646799-47">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·151,·SHA:·610e242062e6449ff950fe832017e9a719361550233a073b5f0771b5fa6af177·...·]-46">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">298 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="8633877961-46">(</span><span·class="p"·data-group-id="8633877961-47">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="8633877961-47">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·151,·SHA:·06330b5d0c17f3338d3ddb94dda4f928cfba8115999f3ece65f4f8b9a4114f9c·...·]-46">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
299 ····</span><span·class="c1">%%·Reply·with·the·current·count</span><span·class="w">299 ····</span><span·class="c1">%%·Reply·with·the·current·count</span><span·class="w">
300 ····</span><span·class="p"·data-group-id="3788646799-48">{</span><span·class="ss">keep_state</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="3788646799-49">[</span><span·class="p"·data-group-id="3788646799-50">{</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·264,·SHA:·1be0608ae77adcb553188ad6716ed9ee62bf20ca2a80b81c6043c2dd3d809bfd·...·]-48">}</span><span·class="p">;</span><span·class="w">300 ····</span><span·class="p"·data-group-id="8633877961-48">{</span><span·class="ss">keep_state</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="8633877961-49">[</span><span·class="p"·data-group-id="8633877961-50">{</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·264,·SHA:·05a3723841268d657f72cf2d3fbb6ee167a876d55079c69fa4ac9f6bc2bb99ea·...·]-48">}</span><span·class="p">;</span><span·class="w">
301 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="3788646799-51">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-51">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">301 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="8633877961-51">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-51">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
302 ····</span><span·class="c1">%%·Ignore·all·other·events</span><span·class="w">302 ····</span><span·class="c1">%%·Ignore·all·other·events</span><span·class="w">
303 ····</span><span·class="p"·data-group-id="3788646799-52">{</span><span·class="ss">keep_state</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="3788646799-52">}</span><span·class="p">.</span></code></pre><p>The·following·is·a·shell·session·when·running·it:</p><[·...·truncated·by·diffoscope;·len:·271,·SHA:·fbd91291828bf7e910d6092d41968e01bf067ed942c9b85a2061d13d46ab670b·...·]-1">)</span><span·class="p">.</span><span·class="w">303 ····</span><span·class="p"·data-group-id="8633877961-52">{</span><span·class="ss">keep_state</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="8633877961-52">}</span><span·class="p">.</span></code></pre><p>The·following·is·a·shell·session·when·running·it:</p><[·...·truncated·by·diffoscope;·len:·271,·SHA:·1524ee8450cf932be449da2caa0f9c8271b4a67160423e1019dc765fea60d10f·...·]-1">)</span><span·class="p">.</span><span·class="w">
304 </span><span·class="p"·data-group-id="3128429129-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.36</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="3128429129-2">}</span><span·class="gp·unselectable">304 </span><span·class="p"·data-group-id="5186320467-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.36</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5186320467-2">}</span><span·class="gp·unselectable">
305 2&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">get_count</span><span·class="p"·data-group-id="3128429129-3">(</span><span·class="p"·data-group-id="3128429129-3">)</span><span·class="p">.</span><span·class="w">305 2&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">get_count</span><span·class="p"·data-group-id="5186320467-3">(</span><span·class="p"·data-group-id="5186320467-3">)</span><span·class="p">.</span><span·class="w">
306 </span><span·class="mi">0</span><span·class="gp·unselectable">306 </span><span·class="mi">0</span><span·class="gp·unselectable">
307 3&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">push</span><span·class="p"·data-group-id="3128429129-4">(</span><span·class="p"·data-group-id="3128429129-4">)</span><span·class="p">.</span><span·class="w">307 3&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">push</span><span·class="p"·data-group-id="5186320467-4">(</span><span·class="p"·data-group-id="5186320467-4">)</span><span·class="p">.</span><span·class="w">
308 </span><span·class="ss">on</span><span·class="gp·unselectable">308 </span><span·class="ss">on</span><span·class="gp·unselectable">
309 4&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">get_count</span><span·class="p"·data-group-id="3128429129-5">(</span><span·class="p"·data-group-id="3128429129-5">)</span><span·class="p">.</span><span·class="w">309 4&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">get_count</span><span·class="p"·data-group-id="5186320467-5">(</span><span·class="p"·data-group-id="5186320467-5">)</span><span·class="p">.</span><span·class="w">
310 </span><span·class="mi">1</span><span·class="gp·unselectable">310 </span><span·class="mi">1</span><span·class="gp·unselectable">
311 5&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">push</span><span·class="p"·data-group-id="3128429129-6">(</span><span·class="p"·data-group-id="3128429129-6">)</span><span·class="p">.</span><span·class="w">311 5&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">push</span><span·class="p"·data-group-id="5186320467-6">(</span><span·class="p"·data-group-id="5186320467-6">)</span><span·class="p">.</span><span·class="w">
312 </span><span·class="ss">off</span><span·class="gp·unselectable">312 </span><span·class="ss">off</span><span·class="gp·unselectable">
313 6&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">get_count</span><span·class="p"·data-group-id="3128429129-7">(</span><span·class="p"·data-group-id="3128429129-7">)</span><span·class="p">.</span><span·class="w">313 6&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">get_count</span><span·class="p"·data-group-id="5186320467-7">(</span><span·class="p"·data-group-id="5186320467-7">)</span><span·class="p">.</span><span·class="w">
314 </span><span·class="mi">1</span><span·class="gp·unselectable">314 </span><span·class="mi">1</span><span·class="gp·unselectable">
315 7&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="3128429129-8">(</span><span·class="p"·data-group-id="3128429129-8">)</span><span·class="p">.</span><span·class="w">315 7&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="5186320467-8">(</span><span·class="p"·data-group-id="5186320467-8">)</span><span·class="p">.</span><span·class="w">
316 </span><span·class="ss">ok</span><span·class="gp·unselectable">316 </span><span·class="ss">ok</span><span·class="gp·unselectable">
317 8&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">push</span><span·class="p"·data-group-id="3128429129-9">(</span><span·class="p"·data-group-id="3128429129-9">)</span><span·class="p">.</span><span·class="w">317 8&gt;·</span><span·class="nc">pushbutton</span><span·class="p">:</span><span·class="nf">push</span><span·class="p"·data-group-id="5186320467-9">(</span><span·class="p"·data-group-id="5186320467-9">)</span><span·class="p">.</span><span·class="w">
318 </span><span·class="gt">**·exception·exit:·{noproc,{gen_statem,call,[pushbutton_statem,push,infinity]}}318 </span><span·class="gt">**·exception·exit:·{noproc,{gen_statem,call,[pushbutton_statem,push,infinity]}}
319 ·····in·function··gen:do_for_proc/2·(gen.erl,·line·261)319 ·····in·function··gen:do_for_proc/2·(gen.erl,·line·261)
320 ·····in·call·from·gen_statem:call/3·(gen_statem.erl,·line·386)</span></code></pre><p>To·compare·styles,·here·follows·the·same·example·using320 ·····in·call·from·gen_statem:call/3·(gen_statem.erl,·line·386)</span></code></pre><p>To·compare·styles,·here·follows·the·same·example·using
321 <a·href="#t:callback_mode/0"><em>callback·mode</em></a>·<code·class="inline">handle_event_function</code>,·or·rather·the321 <a·href="#t:callback_mode/0"><em>callback·mode</em></a>·<code·class="inline">handle_event_function</code>,·or·rather·the
322 code·to·replace·after·function·<a·href="#c:init/1"><code·class="inline">init/1</code></a>·of·the·<code·class="inline">pushbutton.erl</code>322 code·to·replace·after·function·<a·href="#c:init/1"><code·class="inline">init/1</code></a>·of·the·<code·class="inline">pushbutton.erl</code>
323 example·file·above:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">callback_mode</span><span·class="p"·data-group-id="1255876544-1">(</span><span·class="p"·data-group-id="1255876544-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">handle_event_function</span><span·class="p">.</span><span·class="w">323 example·file·above:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">callback_mode</span><span·class="p"·data-group-id="4500518753-1">(</span><span·class="p"·data-group-id="4500518753-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">handle_event_function</span><span·class="p">.</span><span·class="w">
  
324 </span><span·class="c1">%%%·state·callback(s)</span><span·class="w">324 </span><span·class="c1">%%%·state·callback(s)</span><span·class="w">
  
325 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="1255876544-2">(</span><span·class="p"·data-group-id="1255876544-3">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="1255876544-3">}</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·218,·SHA:·51cff4b58740b928c369346c0f6a76c5116b65fab75d7cee5168bd8de4f81ff8·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">325 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="4500518753-2">(</span><span·class="p"·data-group-id="4500518753-3">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="4500518753-3">}</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·218,·SHA:·a05638dfa270b57102d625007db763dd084e9b57c85bd4be9fdc41b9bad911bc·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
326 ····</span><span·class="c1">%%·Go·to·&#39;on&#39;,·increment·count·and·reply</span><span·class="w">326 ····</span><span·class="c1">%%·Go·to·&#39;on&#39;,·increment·count·and·reply</span><span·class="w">
327 ····</span><span·class="c1">%%·that·the·resulting·status·is·&#39;on&#39;</span><span·class="w">327 ····</span><span·class="c1">%%·that·the·resulting·status·is·&#39;on&#39;</span><span·class="w">
328 ····</span><span·class="p"·data-group-id="1255876544-4">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">on</span><span·class="p">,</span><span·class="n">Data</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·357,·SHA:·cfb4a35935b2f65aa7e63a905fdc6864b45b749d67a96c1e1151ebbe29812e6e·...·]-4">}</span><span·class="p">;</span><span·class="w">328 ····</span><span·class="p"·data-group-id="4500518753-4">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">on</span><span·class="p">,</span><span·class="n">Data</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·357,·SHA:·32a6d95645449b35009a94c60b4c39e94d690b1310bd71b0aa4b5f22873858f7·...·]-4">}</span><span·class="p">;</span><span·class="w">
329 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="1255876544-7">(</span><span·class="p"·data-group-id="1255876544-8">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="1255876544-8">}</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·217,·SHA:·5c0cc377fa5bc6d90138a4737613b9d772766ddf05a3c3dca3058663f9ab88db·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">329 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="4500518753-7">(</span><span·class="p"·data-group-id="4500518753-8">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="4500518753-8">}</span><span·class="p">,</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·217,·SHA:·c065063c36f5991b9fb20558e009a05249d8325d2254ef4579c4777018ae1fe0·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
330 ····</span><span·class="c1">%%·Go·to·&#39;off&#39;·and·reply·that·the·resulting·status·is·&#39;off&#39;</span><span·class="w">330 ····</span><span·class="c1">%%·Go·to·&#39;off&#39;·and·reply·that·the·resulting·status·is·&#39;off&#39;</span><span·class="w">
331 ····</span><span·class="p"·data-group-id="1255876544-9">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">off</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="1255876544-10">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·314,·SHA:·d53b008a12b31bd7cab074954122417723be266d1fd0c954e31bfbafa96c68af·...·]-9">}</span><span·class="p">;</span><span·class="w">331 ····</span><span·class="p"·data-group-id="4500518753-9">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="ss">off</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="4500518753-10">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·314,·SHA:·81448b17be1f49138a906d735eab3162ca8e4f6b049d64949416ebd92c7e7cc7·...·]-9">}</span><span·class="p">;</span><span·class="w">
332 </span><span·class="c1">%%</span><span·class="w">332 </span><span·class="c1">%%</span><span·class="w">
333 </span><span·class="c1">%%·Event·handling·common·to·all·states</span><span·class="w">333 </span><span·class="c1">%%·Event·handling·common·to·all·states</span><span·class="w">
334 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="1255876544-12">(</span><span·class="p"·data-group-id="1255876544-13">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="1255876544-13">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·227,·SHA:·45c2d51bb7a59550b18ab105efd2183e46508331b84da755119be6e465bb537e·...·]-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">334 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="4500518753-12">(</span><span·class="p"·data-group-id="4500518753-13">{</span><span·class="ss">call</span><span·class="p">,</span><span·class="n">From</span><span·class="p"·data-group-id="4500518753-13">}</span><span·class="p">,</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·227,·SHA:·0f9126727e5efdbc554df3ab7f3c3e587bc92e9eb34f16f3f24df0b40db6574e·...·]-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
335 ····</span><span·class="c1">%%·Reply·with·the·current·count</span><span·class="w">335 ····</span><span·class="c1">%%·Reply·with·the·current·count</span><span·class="w">
336 ····</span><span·class="p"·data-group-id="1255876544-14">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="1255876544-15">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·316,·SHA:·b78b395f65f58cac3ed9d6f5ab8e53a9ebf3253e26ce94088e64a27295cfeec1·...·]-14">}</span><span·class="p">;</span><span·class="w">336 ····</span><span·class="p"·data-group-id="4500518753-14">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p">,</span><span·class="p"·data-group-id="4500518753-15">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·316,·SHA:·93a10a22529df68cf55e917078919a6deda4612430b7206893b25bfacfcb6bd8·...·]-14">}</span><span·class="p">;</span><span·class="w">
337 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="1255876544-17">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·55,·SHA:·d732d96f95bec9db1cbf7551d899a8d2d0954c7c1b9f9575b3f0203064ccd84f·...·]-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">337 </span><span·class="nf">handle_event</span><span·class="p"·data-group-id="4500518753-17">(</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·55,·SHA:·c4adfb7230c7b6c17c2aeaae416f43810db7196590dbc9e5a0081c0e019f574b·...·]-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
338 ····</span><span·class="c1">%%·Ignore·all·other·events</span><span·class="w">338 ····</span><span·class="c1">%%·Ignore·all·other·events</span><span·class="w">
339 ····</span><span·class="p"·data-group-id="1255876544-18">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="1255876544-18">}</span><span·class="p">.</span></code></pre><h2·id="module-see-also"·class="section-heading">339 ····</span><span·class="p"·data-group-id="4500518753-18">{</span><span·class="ss">next_state</span><span·class="p">,</span><span·class="n">State</span><span·class="p">,</span><span·class="n">Data</span><span·class="p"·data-group-id="4500518753-18">}</span><span·class="p">.</span></code></pre><h2·id="module-see-also"·class="section-heading">
340 ··<a·href="#module-see-also"·class="hover-link">340 ··<a·href="#module-see-also"·class="hover-link">
341 ····<i·class="ri-link-m"·aria-hidden="true"></i>341 ····<i·class="ri-link-m"·aria-hidden="true"></i>
342 ··</a>342 ··</a>
343 ··<span·class="text">See·Also</span>343 ··<span·class="text">See·Also</span>
344 </h2>344 </h2>
345 <p><a·href="gen_event.html"><code·class="inline">gen_event</code></a>,·<a·href="gen_fsm.html"><code·class="inline">gen_fsm</code></a>,·<a·href="gen_server.html"><code·class="inline">gen_server</code></a>,·<a·href="proc_lib.html"><code·class="inline">proc_lib</code></a>,·<a·href="supervisor.html"><code·class="inline">supervisor</code></a>,345 <p><a·href="gen_event.html"><code·class="inline">gen_event</code></a>,·<a·href="gen_fsm.html"><code·class="inline">gen_fsm</code></a>,·<a·href="gen_server.html"><code·class="inline">gen_server</code></a>,·<a·href="proc_lib.html"><code·class="inline">proc_lib</code></a>,·<a·href="supervisor.html"><code·class="inline">supervisor</code></a>,
346 <a·href="sys.html"><code·class="inline">sys</code></a>.</p>346 <a·href="sys.html"><code·class="inline">sys</code></a>.</p>
Offset 3213, 23 lines modifiedOffset 3213, 23 lines modified
3213 <a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·return·value·and·how·its·status3213 <a·href="sys.html#get_status/1"><code·class="inline">sys:get_status/1,2</code></a>·return·value·and·how·its·status
3214 appears·in·termination·error·logs·exports·an·instance·of3214 appears·in·termination·error·logs·exports·an·instance·of
3215 <a·href="#c:format_status/1"><code·class="inline">format_status/1</code></a>,·which·will·get·a·map·<code·class="inline">Status</code>·that3215 <a·href="#c:format_status/1"><code·class="inline">format_status/1</code></a>,·which·will·get·a·map·<code·class="inline">Status</code>·that
3216 describes·the·current·states·of·the·<code·class="inline">gen_statem</code>,·and·shall·return·a·map3216 describes·the·current·states·of·the·<code·class="inline">gen_statem</code>,·and·shall·return·a·map
3217 <code·class="inline">NewStatus</code>·containing·the·same·keys·as·the·input·map,·but·it·may·transform·some3217 <code·class="inline">NewStatus</code>·containing·the·same·keys·as·the·input·map,·but·it·may·transform·some
3218 values.</p><p>One·use·case·for·this·function·is·to·return·compact·alternative·state3218 values.</p><p>One·use·case·for·this·function·is·to·return·compact·alternative·state
3219 representations·to·avoid·having·large·state·terms·printed·in·log·files.·Another3219 representations·to·avoid·having·large·state·terms·printed·in·log·files.·Another
3220 is·to·hide·sensitive·data·from·being·written·to·the·error·log.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">format_status</span><span·class="p"·data-group-id="2976104778-1">(</span><span·class="n">Status</span><span·class="p"·data-group-id="2976104778-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3220 is·to·hide·sensitive·data·from·being·written·to·the·error·log.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">format_status</span><span·class="p"·data-group-id="2939075226-1">(</span><span·class="n">Status</span><span·class="p"·data-group-id="2939075226-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3221 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="2976104778-2">(</span><span·class="w">3221 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="2939075226-2">(</span><span·class="w">
3222 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="2976104778-3">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="2976104778-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3222 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="2939075226-3">(</span><span·class="ss">state</span><span·class="p">,</span><span·class="n">State</span><span·class="p"·data-group-id="2939075226-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3223 ············</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">remove</span><span·class="p"·data-group-id="2976104778-4">(</span><span·class="ss">private_key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2976104778-4">)</span><span·class="p">;</span><span·class="w">3223 ············</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">remove</span><span·class="p"·data-group-id="2939075226-4">(</span><span·class="ss">private_key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="2939075226-4">)</span><span·class="p">;</span><span·class="w">
3224 ·······</span><span·class="p"·data-group-id="2976104778-5">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="2976104778-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Pass</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·4b0c616b0031a31e638d8f924aa18064f1fdade99f9ddf8dc2d384aa0ebc749d·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3224 ·······</span><span·class="p"·data-group-id="2939075226-5">(</span><span·class="ss">message</span><span·class="p">,</span><span·class="p"·data-group-id="2939075226-6">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Pass</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·f14b37268df1272e5240d7afda4b0afe0b478cac31a88897ec88cc5c5374b61e·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3225 ············</span><span·class="p"·data-group-id="2976104778-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">removed</span><span·class="p"·data-group-id="2976104778-7">}</span><span·class="p">;</span><span·class="w">3225 ············</span><span·class="p"·data-group-id="2939075226-7">{</span><span·class="ss">password</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">removed</span><span·class="p"·data-group-id="2939075226-7">}</span><span·class="p">;</span><span·class="w">
3226 ·······</span><span·class="p"·data-group-id="2976104778-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="2976104778-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">3226 ·······</span><span·class="p"·data-group-id="2939075226-8">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="2939075226-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
3227 ············</span><span·class="n">Value</span><span·class="w">3227 ············</span><span·class="n">Value</span><span·class="w">
3228 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Status</span><span·class="p"·data-group-id="2976104778-2">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·callback·is·optional,·so·a·callback·module·does·not·need·to·export·it.3228 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Status</span><span·class="p"·data-group-id="2939075226-2">)</span><span·class="p">.</span></code></pre><blockquote><h4·class="info">Note</h4><p>This·callback·is·optional,·so·a·callback·module·does·not·need·to·export·it.
3229 The·<code·class="inline">gen_statem</code>·module·provides·a·default·implementation·of·this·function3229 The·<code·class="inline">gen_statem</code>·module·provides·a·default·implementation·of·this·function
3230 that·returns·<code·class="inline">{State,Data}</code>.</p><p>If·this·callback·is·exported·but·fails,·to·hide·possibly·sensitive·data,·the3230 that·returns·<code·class="inline">{State,Data}</code>.</p><p>If·this·callback·is·exported·but·fails,·to·hide·possibly·sensitive·data,·the
3231 default·function·will·instead·return·<code·class="inline">{State,Info}</code>,·where·<code·class="inline">Info</code>·says·nothing3231 default·function·will·instead·return·<code·class="inline">{State,Info}</code>,·where·<code·class="inline">Info</code>·says·nothing
3232 but·the·fact·that·<a·href="#c:format_status/2"><code·class="inline">format_status/2</code></a>·has·crashed.</p></blockquote>3232 but·the·fact·that·<a·href="#c:format_status/2"><code·class="inline">format_status/2</code></a>·has·crashed.</p></blockquote>
3233 ··</section>3233 ··</section>
Max diff block lines reached; 3786/57785 bytes (6.55%) of diff not shown.
175 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/io.html
    
Offset 144, 15 lines modifiedOffset 144, 15 lines modified
144 module.</p></blockquote><h2·id="module-error-information"·class="section-heading">144 module.</p></blockquote><h2·id="module-error-information"·class="section-heading">
145 ··<a·href="#module-error-information"·class="hover-link">145 ··<a·href="#module-error-information"·class="hover-link">
146 ····<i·class="ri-link-m"·aria-hidden="true"></i>146 ····<i·class="ri-link-m"·aria-hidden="true"></i>
147 ··</a>147 ··</a>
148 ··<span·class="text">Error·Information</span>148 ··<span·class="text">Error·Information</span>
149 </h2>149 </h2>
150 <p>The·<code·class="inline">ErrorInfo</code>·mentioned·in·this·module·is·the·standard·<code·class="inline">ErrorInfo</code>·structure150 <p>The·<code·class="inline">ErrorInfo</code>·mentioned·in·this·module·is·the·standard·<code·class="inline">ErrorInfo</code>·structure
151 that·is·returned·from·all·I/O·modules.·It·has·the·following·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1125001102-1">{</span><span·class="n">ErrorLocation</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="1125[·...·truncated·by·diffoscope;·len:·377,·SHA:·cb9c997e240bed8b164e10821ab1fe0599c67deaaae2bb0e6a46e333fd062d0f·...·]-1">)</span></code></pre>151 that·is·returned·from·all·I/O·modules.·It·has·the·following·format:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6130088715-1">{</span><span·class="n">ErrorLocation</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ErrorDescriptor</span><span·class="p"·data-group-id="6130[·...·truncated·by·diffoscope;·len:·377,·SHA:·ac6f13c754c7bab1d9c9bfc9d65bd63346b05ad1bba3de76a5df8a4cdb69c4bd·...·]-1">)</span></code></pre>
152 ····</section>152 ····</section>
  
153 </div>153 </div>
  
154 ··<section·id="summary"·class="details-list">154 ··<section·id="summary"·class="details-list">
155 ····<h1·class="section-heading">155 ····<h1·class="section-heading">
156 ······<a·class="hover-link"·href="#summary">156 ······<a·class="hover-link"·href="#summary">
Offset 1185, 20 lines modifiedOffset 1185, 20 lines modified
  
1185 ······</div>1185 ······</div>
  
1186 <p>The·default·standard·I/O·device·assigned·to·a·process.·This·device·is·used·when1186 <p>The·default·standard·I/O·device·assigned·to·a·process.·This·device·is·used·when
1187 no·<code·class="inline">IoDevice</code>·argument·is·specified·in·the·function·calls·in·this·module.</p><p>It·is·sometimes·desirable·to·use·an·explicit·<code·class="inline">IoDevice</code>·argument·that1187 no·<code·class="inline">IoDevice</code>·argument·is·specified·in·the·function·calls·in·this·module.</p><p>It·is·sometimes·desirable·to·use·an·explicit·<code·class="inline">IoDevice</code>·argument·that
1188 refers·to·the·default·I/O·device.·This·is·the·case·with·functions·that·can1188 refers·to·the·default·I/O·device.·This·is·the·case·with·functions·that·can
1189 access·either·a·file·or·the·default·I/O·device.·The·atom·<code·class="inline">standard_io</code>·has·this1189 access·either·a·file·or·the·default·I/O·device.·The·atom·<code·class="inline">standard_io</code>·has·this
1190 special·meaning.·The·following·example·illustrates·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">27&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="3279568111-1">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p"·data-group-id="3279568111-1">)</span><span·class="p">.</span><span·class="w">1190 special·meaning.·The·following·example·illustrates·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">27&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="6622523017-1">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p"·data-group-id="6622523017-1">)</span><span·class="p">.</span><span·class="w">
1191 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="ss">foo</span><span·class="p">.</span><span·class="w">1191 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="ss">foo</span><span·class="p">.</span><span·class="w">
1192 </span><span·class="p"·data-group-id="3279568111-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">foo</span><span·class="p"·data-group-id="3279568111-2">}</span><span·class="gp·unselectable">1192 </span><span·class="p"·data-group-id="6622523017-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">foo</span><span·class="p"·data-group-id="6622523017-2">}</span><span·class="gp·unselectable">
1193 28&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="3279568111-3">(</span><span·class="ss">standard_io</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p"·data-group-id="3279568111-3">)</span><span·class="p">.</span><span·class="w">1193 28&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">read</span><span·class="p"·data-group-id="6622523017-3">(</span><span·class="ss">standard_io</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p"·data-group-id="6622523017-3">)</span><span·class="p">.</span><span·class="w">
1194 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="ss">bar</span><span·class="p">.</span><span·class="w">1194 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="ss">bar</span><span·class="p">.</span><span·class="w">
1195 </span><span·class="p"·data-group-id="3279568111-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">bar</span><span·class="p"·data-group-id="3279568111-4">}</span></code></pre><p>By·default·all·I/O·sent·to·<code·class="inline">standard_io</code>·will·end·up·in·the·<a·href="#t:user/0"><code·class="inline">user</code></a>1195 </span><span·class="p"·data-group-id="6622523017-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">bar</span><span·class="p"·data-group-id="6622523017-4">}</span></code></pre><p>By·default·all·I/O·sent·to·<code·class="inline">standard_io</code>·will·end·up·in·the·<a·href="#t:user/0"><code·class="inline">user</code></a>
1196 I/O·device·of·the·node·that·spawned·the·calling·process.</p><p><code·class="inline">standard_io</code>·is·an·alias·for·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#group_leader/0"><code·class="inline">group_leader/0</code></a>,·so·in1196 I/O·device·of·the·node·that·spawned·the·calling·process.</p><p><code·class="inline">standard_io</code>·is·an·alias·for·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#group_leader/0"><code·class="inline">group_leader/0</code></a>,·so·in
1197 order·to·change·where·the·default·input/output·requests·are·sent·you·can·change1197 order·to·change·where·the·default·input/output·requests·are·sent·you·can·change
1198 the·group·leader·of·the·current·process·using1198 the·group·leader·of·the·current·process·using
1199 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#group_leader/2"><code·class="inline">group_leader(NewGroupLeader,·self())</code></a>.</p>1199 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#group_leader/2"><code·class="inline">group_leader(NewGroupLeader,·self())</code></a>.</p>
1200 ··</section>1200 ··</section>
1201 </section>1201 </section>
1202 <section·class="detail"·id="t:user/0">1202 <section·class="detail"·id="t:user/0">
Offset 1465, 41 lines modifiedOffset 1465, 41 lines modified
1465 parameter·is·ignored.·Leading·whitespace·characters·are·not·skipped.</p></li><li><p><strong><code·class="inline">#</code></strong>·-·An·integer·in·base·2-36·with·Erlang-style·base·prefix·(for1465 parameter·is·ignored.·Leading·whitespace·characters·are·not·skipped.</p></li><li><p><strong><code·class="inline">#</code></strong>·-·An·integer·in·base·2-36·with·Erlang-style·base·prefix·(for
1466 example,·<code·class="inline">&quot;16#ffff&quot;</code>)·is·expected.</p></li><li><p><strong><code·class="inline">f</code></strong>·-·A·floating·point·number·is·expected.·It·must·follow·the·Erlang1466 example,·<code·class="inline">&quot;16#ffff&quot;</code>)·is·expected.</p></li><li><p><strong><code·class="inline">f</code></strong>·-·A·floating·point·number·is·expected.·It·must·follow·the·Erlang
1467 floating·point·number·syntax.</p></li><li><p><strong><code·class="inline">s</code></strong>·-·A·string·of·non-whitespace·characters·is·read.·If·a·field·width1467 floating·point·number·syntax.</p></li><li><p><strong><code·class="inline">s</code></strong>·-·A·string·of·non-whitespace·characters·is·read.·If·a·field·width
1468 has·been·specified,·this·number·of·characters·are·read·and·all·trailing1468 has·been·specified,·this·number·of·characters·are·read·and·all·trailing
1469 whitespace·characters·are·stripped.·An·Erlang·string·(list·of·characters)·is1469 whitespace·characters·are·stripped.·An·Erlang·string·(list·of·characters)·is
1470 returned.</p><p>If·Unicode·translation·is·in·effect·(<code·class="inline">~ts</code>),·characters·&gt;·255·are·accepted,1470 returned.</p><p>If·Unicode·translation·is·in·effect·(<code·class="inline">~ts</code>),·characters·&gt;·255·are·accepted,
1471 otherwise·not.·With·the·translation·modifier,·the·returned·list·can·as·a1471 otherwise·not.·With·the·translation·modifier,·the·returned·list·can·as·a
1472 consequence·also·contain·integers·&gt;·255:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="3446380175-1">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="s">&quot;</span><span·class="p"·data-group-id="3446380175-1">)</span><span·class="p">.</span><span·class="w">1472 consequence·also·contain·integers·&gt;·255:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="9886407699-1">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="s">&quot;</span><span·class="p"·data-group-id="9886407699-1">)</span><span·class="p">.</span><span·class="w">
1473 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Characters</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">1473 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Characters</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">
1474 </span><span·class="p"·data-group-id="3446380175-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p"·data-group-id="3446380175-3">{</span><span·class="ss">fread</span><span·class="p">,</span><span·class="ss">string</span><span·class="p"·data-group-id="3446380175-3">[·...·truncated·by·diffoscope;·len:·49,·SHA:·b1e5228c75e1dfe046bce368d0fd2b757673e7fe617eab5bd9d9b88708a74628·...·]-2">}</span><span·class="gp·unselectable">1474 </span><span·class="p"·data-group-id="9886407699-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p"·data-group-id="9886407699-3">{</span><span·class="ss">fread</span><span·class="p">,</span><span·class="ss">string</span><span·class="p"·data-group-id="9886407699-3">[·...·truncated·by·diffoscope;·len:·49,·SHA:·0249c31dcc0c373192b988874658113b980b00562fad91b3b777c4192fad3893·...·]-2">}</span><span·class="gp·unselectable">
1475 2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="3446380175-4">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;~ts&quot;</span><span·class="p"·data-group-id="3446380175-4">)</span><span·class="p">.</span><span·class="w">1475 2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="9886407699-4">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;~ts&quot;</span><span·class="p"·data-group-id="9886407699-4">)</span><span·class="p">.</span><span·class="w">
1476 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Characters</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">1476 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Characters</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">
1477 </span><span·class="p"·data-group-id="3446380175-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3446380175-6">[</span><span·class="p"·data-group-id="3446380175-7">[</span><span·class="mi">1091</span><span·class="p">,</span><span·class="mi">1085</spa[·...·truncated·by·diffoscope;·len:·409,·SHA:·ac37926250acd59496ab597ef740933658f75787213d9acfb05997444fc80f58·...·]-5">}</span></code></pre></li><li><p><strong><code·class="inline">a</code></strong>·-·Similar·to·<code·class="inline">s</code>,·but·the·resulting·string·is·converted·into·an1477 </span><span·class="p"·data-group-id="9886407699-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="9886407699-6">[</span><span·class="p"·data-group-id="9886407699-7">[</span><span·class="mi">1091</span><span·class="p">,</span><span·class="mi">1085</spa[·...·truncated·by·diffoscope;·len:·409,·SHA:·63784c95e1c9ceb8c0e254f5a2d19033b13e87562a18dc3b828103f1b932ee1c·...·]-5">}</span></code></pre></li><li><p><strong><code·class="inline">a</code></strong>·-·Similar·to·<code·class="inline">s</code>,·but·the·resulting·string·is·converted·into·an
1478 atom.</p></li><li><p><strong><code·class="inline">c</code></strong>·-·The·number·of·characters·equal·to·the·field·width·are·read1478 atom.</p></li><li><p><strong><code·class="inline">c</code></strong>·-·The·number·of·characters·equal·to·the·field·width·are·read
1479 (default·is·1)·and·returned·as·an·Erlang·string.·However,·leading·and1479 (default·is·1)·and·returned·as·an·Erlang·string.·However,·leading·and
1480 trailing·whitespace·characters·are·not·omitted·as·they·are·with·<code·class="inline">s</code>.·All1480 trailing·whitespace·characters·are·not·omitted·as·they·are·with·<code·class="inline">s</code>.·All
1481 characters·are·returned.</p><p>The·Unicode·translation·modifier·works·as·with·<code·class="inline">s</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="0984940226-1">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;~c&quot;</span><span·class="p"·data-group-id="0984940226-1">)</span><span·class="p">.</span><span·class="w">1481 characters·are·returned.</p><p>The·Unicode·translation·modifier·works·as·with·<code·class="inline">s</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="2053982814-1">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;~c&quot;</span><span·class="p"·data-group-id="2053982814-1">)</span><span·class="p">.</span><span·class="w">
1482 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Character</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">1482 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Character</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">
1483 </span><span·class="p"·data-group-id="0984940226-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p"·data-group-id="0984940226-3">{</span><span·class="ss">fread</span><span·class="p">,</span><span·class="ss">string</span><span·class="p"·data-group-id="0984940226-3">[·...·truncated·by·diffoscope;·len:·49,·SHA:·d55185581ea32490d14f6e1ee115f9ff8e46d0c40ec82b34f620eb74f1adcfa2·...·]-2">}</span><span·class="gp·unselectable">1483 </span><span·class="p"·data-group-id="2053982814-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p"·data-group-id="2053982814-3">{</span><span·class="ss">fread</span><span·class="p">,</span><span·class="ss">string</span><span·class="p"·data-group-id="2053982814-3">[·...·truncated·by·diffoscope;·len:·49,·SHA:·79f3fabbe23401910dfa82cdc95c38aab8197f5bc89e03f4e2e6f4a0a61d7d98·...·]-2">}</span><span·class="gp·unselectable">
1484 2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="0984940226-4">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;~tc&quot;</span><span·class="p"·data-group-id="0984940226-4">)</span><span·class="p">.</span><span·class="w">1484 2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="2053982814-4">(</span><span·class="s">&quot;Prompt&gt;·&quot;</span><span·class="p">,</span><span·class="s">&quot;~tc&quot;</span><span·class="p"·data-group-id="2053982814-4">)</span><span·class="p">.</span><span·class="w">
1485 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Character</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">1485 </span><span·class="n">Prompt</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="n">Character</span><span·class="w">·</span><span·class="ss">beyond</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">·</span><span·class="ss">range</span><span·class="w">·</span><span·class="ow">not</span><span·class="w">·</span><span·class="ss">printable</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">this</span><span·class="w">·</span><span·class="ss">medium</span><span·class="o">&gt;</span><span·class="w">
1486 </span><span·class="p"·data-group-id="0984940226-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0984940226-6">[</span><span·class="p"·data-group-id="0984940226-7">[</span><span·class="mi">1091</span><span·class="p"·data-group-id="0984940226-7">]</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·ed3ecc47d8baa9efebaf2fe91226d7756edc4702afbf82747c340f709c67f656·...·]-5">}</span></code></pre></li><li><p><strong><code·class="inline">l</code></strong>·-·Returns·the·number·of·characters·that·have·been·scanned·up·to·that1486 </span><span·class="p"·data-group-id="2053982814-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2053982814-6">[</span><span·class="p"·data-group-id="2053982814-7">[</span><span·class="mi">1091</span><span·class="p"·data-group-id="2053982814-7">]</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·4b46f08cee701817c506fd4b111be62ea094d28e0f6596e5832203faf136fa2d·...·]-5">}</span></code></pre></li><li><p><strong><code·class="inline">l</code></strong>·-·Returns·the·number·of·characters·that·have·been·scanned·up·to·that
1487 point,·including·whitespace·characters.</p></li></ul>The·function·returns:<ul><li><p><strong><code·class="inline">{ok,·Terms}</code></strong>·-·The·read·was·successful·and·<code·class="inline">Terms</code>·is·the·list·of1487 point,·including·whitespace·characters.</p></li></ul>The·function·returns:<ul><li><p><strong><code·class="inline">{ok,·Terms}</code></strong>·-·The·read·was·successful·and·<code·class="inline">Terms</code>·is·the·list·of
1488 successfully·matched·and·read·items.</p></li><li><p><strong><code·class="inline">eof</code></strong>·-·End·of·file·was·encountered.</p></li><li><p><strong><code·class="inline">{error,·FreadError}</code></strong>·-·The·reading·failed·and·<code·class="inline">FreadError</code>·gives·a·hint1488 successfully·matched·and·read·items.</p></li><li><p><strong><code·class="inline">eof</code></strong>·-·End·of·file·was·encountered.</p></li><li><p><strong><code·class="inline">{error,·FreadError}</code></strong>·-·The·reading·failed·and·<code·class="inline">FreadError</code>·gives·a·hint
1489 about·the·error.</p></li><li><p><strong><code·class="inline">{error,·ErrorDescription}</code></strong>·-·The·read·operation·failed·and·parameter1489 about·the·error.</p></li><li><p><strong><code·class="inline">{error,·ErrorDescription}</code></strong>·-·The·read·operation·failed·and·parameter
1490 <code·class="inline">ErrorDescription</code>·gives·a·hint·about·the·error.</p></li></ul></li></ul><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">20&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="2965858358-1">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~f~f~f&quot;</span><span·class="p"·data-group-id="2965858358-1">)</span><span·class="p">.</span><span·class="w">1490 <code·class="inline">ErrorDescription</code>·gives·a·hint·about·the·error.</p></li></ul></li></ul><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">20&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="5849654510-1">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~f~f~f&quot;</span><span·class="p"·data-group-id="5849654510-1">)</span><span·class="p">.</span><span·class="w">
1491 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="mf">1.9</span><span·class="w">·</span><span·class="mf">35.5e3</span><span·class="w">·</span><span·class="mf">15.0</span><span·class="w">1491 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="mf">1.9</span><span·class="w">·</span><span·class="mf">35.5e3</span><span·class="w">·</span><span·class="mf">15.0</span><span·class="w">
1492 </span><span·class="p"·data-group-id="2965858358-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2965858358-3">[</span><span·class="mf">1.9</span><span·class="p">,</span><span·class="mf">3.55e4</span><span·class="p">,</span><span·class="mf">15.0</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·4a481498005e85767218c112f77211aca735bb5c4de540fabd602278366ecdf8·...·]-2">}</span><span·class="gp·unselectable">1492 </span><span·class="p"·data-group-id="5849654510-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5849654510-3">[</span><span·class="mf">1.9</span><span·class="p">,</span><span·class="mf">3.55e4</span><span·class="p">,</span><span·class="mf">15.0</spa[·...·truncated·by·diffoscope;·len:·96,·SHA:·f0bb8d9a5aec1e8edd0e06e5bc90d71d3b885209e8b115710d48ba2e0131c588·...·]-2">}</span><span·class="gp·unselectable">
1493 21&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="2965858358-4">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~10f~d&quot;</span><span·class="p"·data-group-id="2965858358-4">)</span><span·class="p">.</span><span·class="w">1493 21&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="5849654510-4">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;~10f~d&quot;</span><span·class="p"·data-group-id="5849654510-4">)</span><span·class="p">.</span><span·class="w">
1494 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="w">·····</span><span·class="mf">5.67899</span><span·class="w">1494 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="w">·····</span><span·class="mf">5.67899</span><span·class="w">
1495 </span><span·class="p"·data-group-id="2965858358-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2965858358-6">[</span><span·class="mf">5.678</span><span·class="p">,</span><span·class="mi">99</span><span·class="p"·data-group-id="2965858358-6">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·e0fb5a2ab34c3cefa2334a1e915d9557b55f8631ac80db1adc179ce3af2181bd·...·]-5">}</span><span·class="gp·unselectable">1495 </span><span·class="p"·data-group-id="5849654510-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="5849654510-6">[</span><span·class="mf">5.678</span><span·class="p">,</span><span·class="mi">99</span><span·class="p"·data-group-id="5849654510-6">]</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·e84bb9e08671c6806d5b0a9f07ee6b2a8b95134bf1998dd91aad052b259deaed·...·]-5">}</span><span·class="gp·unselectable">
1496 22&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="2965858358-7">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;:</span><span·class="si">~10s</span><span·class="s">:~10c:&quot;</span><span·class="p"·data-group-id="2965858358-7">)</span><span·class="p">.</span><span·class="w">1496 22&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="5849654510-7">(</span><span·class="ss">&#39;enter&gt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;:</span><span·class="si">~10s</span><span·class="s">:~10c:&quot;</span><span·class="p"·data-group-id="5849654510-7">)</span><span·class="p">.</span><span·class="w">
1497 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="p">:</span><span·class="w">···</span><span·class="ss">alan</span><span·class="w">···</span><span·class="p">:</span><span·class="w">···</span><span·class="ss">joe</span><span·class="w">····</span><span·class="p">:</span><span·class="w">1497 </span><span·class="ss">enter</span><span·class="o">&gt;</span><span·class="p">:</span><span·class="w">···</span><span·class="ss">alan</span><span·class="w">···</span><span·class="p">:</span><span·class="w">···</span><span·class="ss">joe</span><span·class="w">····</span><span·class="p">:</span><span·class="w">
1498 </span><span·class="p"·data-group-id="2965858358-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2965858358-9">[</span><span·class="s">&quot;alan&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·119,·SHA:·ff18ac5d31ecec6bd1cc3f5b54cf5772dbfd8a487885183faf7828f9669fee7a·...·]-8">}</span></code></pre>1498 </span><span·class="p"·data-group-id="5849654510-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5849654510-9">[</span><span·class="s">&quot;alan&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quo[·...·truncated·by·diffoscope;·len:·119,·SHA:·864af653420d478e2db6d21ffc7c1f07cd85f5697405ecad4e17b59f0fb46112·...·]-8">}</span></code></pre>
1499 ··</section>1499 ··</section>
1500 </section>1500 </section>
1501 <section·class="detail"·id="fwrite/1">1501 <section·class="detail"·id="fwrite/1">
  
1502 ··<div·class="detail-header">1502 ··<div·class="detail-header">
1503 ····<a·href="#fwrite/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1503 ····<a·href="#fwrite/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1504 ······<i·class="ri-link-m"·aria-hidden="true"></i>1504 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1580, 15 lines modifiedOffset 1580, 15 lines modified
  
1580 ······</div>1580 ······</div>
  
1581 <p>Writes·the·items·in·<code·class="inline">Data</code>·on·the·<a·href="#t:device/0"><code·class="inline">IoDevice</code></a>·in·accordance·with·<code·class="inline">Format</code>.</p><p><code·class="inline">Format</code>·contains·plain·characters·that·are·copied·to1581 <p>Writes·the·items·in·<code·class="inline">Data</code>·on·the·<a·href="#t:device/0"><code·class="inline">IoDevice</code></a>·in·accordance·with·<code·class="inline">Format</code>.</p><p><code·class="inline">Format</code>·contains·plain·characters·that·are·copied·to
1582 the·output·device,·and·control·sequences·for·formatting,·see·below.·If·<code·class="inline">Format</code>1582 the·output·device,·and·control·sequences·for·formatting,·see·below.·If·<code·class="inline">Format</code>
1583 is·an·atom·or·a·binary,·it·is·first·converted·to·a·list·with·the·aid·of1583 is·an·atom·or·a·binary,·it·is·first·converted·to·a·list·with·the·aid·of
1584 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#atom_to_list/1"><code·class="inline">atom_to_list/1</code></a>·or1584 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#atom_to_list/1"><code·class="inline">atom_to_list/1</code></a>·or
1585 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list/1</code></a>.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7534510753-1">(</span><span·class="s">&quot;Hello·world!</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7534510753-2">[</span><span·class="p"·data-group-id="753451[·...·truncated·by·diffoscope;·len:·57,·SHA:·b5c27bfee39682cb8ad4bd37c692911cd59685cba1ca89a84b6e80eab75ee628·...·]-1">)</span><span·class="p">.</span><span·class="w">1585 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#binary_to_list/1"><code·class="inline">binary_to_list/1</code></a>.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="4084802230-1">(</span><span·class="s">&quot;Hello·world!</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4084802230-2">[</span><span·class="p"·data-group-id="408480[·...·truncated·by·diffoscope;·len:·57,·SHA:·fcd2a65f7c5ec747c66825657c879591322c9ed001052e83599e6f3003b581de·...·]-1">)</span><span·class="p">.</span><span·class="w">
1586 </span><span·class="n">Hello</span><span·class="w">·</span><span·class="ss">world</span><span·class="o">!</span><span·class="w">1586 </span><span·class="n">Hello</span><span·class="w">·</span><span·class="ss">world</span><span·class="o">!</span><span·class="w">
1587 </span><span·class="ss">ok</span></code></pre><p>The·general·format·of·a·control·sequence·is·<code·class="inline">~F.P.PadModC</code>.</p><p>The·character·<code·class="inline">C</code>·determines·the·type·of·control·sequence·to·be·used.·It·is·the1587 </span><span·class="ss">ok</span></code></pre><p>The·general·format·of·a·control·sequence·is·<code·class="inline">~F.P.PadModC</code>.</p><p>The·character·<code·class="inline">C</code>·determines·the·type·of·control·sequence·to·be·used.·It·is·the
1588 only·required·field.·All·of·<code·class="inline">F</code>,·<code·class="inline">P</code>,·<code·class="inline">Pad</code>,·and·<code·class="inline">Mod</code>·are·optional.·For1588 only·required·field.·All·of·<code·class="inline">F</code>,·<code·class="inline">P</code>,·<code·class="inline">Pad</code>,·and·<code·class="inline">Mod</code>·are·optional.·For
1589 example,·to·use·a·<code·class="inline">#</code>·for·<code·class="inline">Pad</code>·but·use·the·default·values·for·<code·class="inline">F</code>·and·<code·class="inline">P</code>,·you1589 example,·to·use·a·<code·class="inline">#</code>·for·<code·class="inline">Pad</code>·but·use·the·default·values·for·<code·class="inline">F</code>·and·<code·class="inline">P</code>,·you
1590 can·write·<code·class="inline">~..#C</code>.</p><ul><li><p><code·class="inline">F</code>·is·the·<code·class="inline">field·width</code>·of·the·printed·argument.·A·negative·value·means·that1590 can·write·<code·class="inline">~..#C</code>.</p><ul><li><p><code·class="inline">F</code>·is·the·<code·class="inline">field·width</code>·of·the·printed·argument.·A·negative·value·means·that
1591 the·argument·is·left-justified·within·the·field,·otherwise·right-justified.·If1591 the·argument·is·left-justified·within·the·field,·otherwise·right-justified.·If
1592 no·field·width·is·specified,·the·required·print·width·is·used.·If·the·field1592 no·field·width·is·specified,·the·required·print·width·is·used.·If·the·field
Offset 1598, 33 lines modifiedOffset 1598, 33 lines modified
1598 print·width.</p></li><li><p><code·class="inline">Pad</code>·is·the·padding·character.·This·is·the·character·used·to·pad·the·printed1598 print·width.</p></li><li><p><code·class="inline">Pad</code>·is·the·padding·character.·This·is·the·character·used·to·pad·the·printed
1599 representation·of·the·argument·so·that·it·conforms·to·the·specified·field1599 representation·of·the·argument·so·that·it·conforms·to·the·specified·field
1600 width·and·precision.·Only·one·padding·character·can·be·specified·and,·whenever1600 width·and·precision.·Only·one·padding·character·can·be·specified·and,·whenever
1601 applicable,·it·is·used·for·both·the·field·width·and·precision.·The·default1601 applicable,·it·is·used·for·both·the·field·width·and·precision.·The·default
1602 padding·character·is·<code·class="inline">'·'</code>·(space).</p></li><li><p><code·class="inline">Mod</code>·is·the·control·sequence·modifier.·This·is·one·or·more·characters·that1602 padding·character·is·<code·class="inline">'·'</code>·(space).</p></li><li><p><code·class="inline">Mod</code>·is·the·control·sequence·modifier.·This·is·one·or·more·characters·that
1603 change·the·interpretation·of·<code·class="inline">Data</code>.</p><p>The·current·modifiers·are:</p><ul><li><p><strong><code·class="inline">t</code></strong>·-·For·Unicode·translation.</p></li><li><p><strong><code·class="inline">l</code></strong>·-·For·stopping·<code·class="inline">p</code>·and·<code·class="inline">P</code>·from·detecting·printable·characters.</p></li><li><p><strong><code·class="inline">k</code></strong>·-·For·use·with·<code·class="inline">p</code>,·<code·class="inline">P</code>,·<code·class="inline">w</code>,·and·<code·class="inline">W</code>·to·format·maps·in·map-key1603 change·the·interpretation·of·<code·class="inline">Data</code>.</p><p>The·current·modifiers·are:</p><ul><li><p><strong><code·class="inline">t</code></strong>·-·For·Unicode·translation.</p></li><li><p><strong><code·class="inline">l</code></strong>·-·For·stopping·<code·class="inline">p</code>·and·<code·class="inline">P</code>·from·detecting·printable·characters.</p></li><li><p><strong><code·class="inline">k</code></strong>·-·For·use·with·<code·class="inline">p</code>,·<code·class="inline">P</code>,·<code·class="inline">w</code>,·and·<code·class="inline">W</code>·to·format·maps·in·map-key
1604 <code·class="inline">ordered</code>·order·(see·<a·href="maps.html#t:iterator_order/0"><code·class="inline">maps:iterator_order/0</code></a>).</p></li><li><p><strong><code·class="inline">K</code></strong>·-·Similar·to·<code·class="inline">k</code>,·for·formatting·maps·in·map-key·order,·but·takes·an1604 <code·class="inline">ordered</code>·order·(see·<a·href="maps.html#t:iterator_order/0"><code·class="inline">maps:iterator_order/0</code></a>).</p></li><li><p><strong><code·class="inline">K</code></strong>·-·Similar·to·<code·class="inline">k</code>,·for·formatting·maps·in·map-key·order,·but·takes·an
1605 extra·argument·that·specifies·the·<a·href="maps.html#t:iterator_order/0"><code·class="inline">maps:iterator_order/0</code></a>.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7274979477-1">#{</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·clas[·...·truncated·by·diffoscope;·len:·156,·SHA:·142aeed30a2e9d5008478c5c90d603c2f8b1e709a2a8e7f436e4a159c5be6f74·...·]-1">}</span><span·class="p">.</span><span·class="w">1605 extra·argument·that·specifies·the·<a·href="maps.html#t:iterator_order/0"><code·class="inline">maps:iterator_order/0</code></a>.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1140083202-1">#{</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·clas[·...·truncated·by·diffoscope;·len:·156,·SHA:·a923018693f40a98234271a7859ee5e5cde56744adbbc5c0cfb784cd01726e1d·...·]-1">}</span><span·class="p">.</span><span·class="w">
1606 </span><span·class="p"·data-group-id="7274979477-2">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="p">=&gt;</span><span·[·...·truncated·by·diffoscope;·len:·84,·SHA:·4ecf34f99085c92dd329e1e375b1ed3c400394b16ee0120637298a5ee3eafc22·...·]-2">}</span><span·class="gp·unselectable">1606 </span><span·class="p"·data-group-id="1140083202-2">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="p">=&gt;</span><span·[·...·truncated·by·diffoscope;·len:·84,·SHA:·041dc9c06d85ec70bc606e44ecd28cf41ab2eb89b5627cfa3ce2fee08f44350a·...·]-2">}</span><span·class="gp·unselectable">
1607 &gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7274979477-3">(</span><span·class="s">&quot;~Kp</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7274979477-4">[</span><span·class="ss">reversed</span><span·class="p[·...·truncated·by·diffoscope;·len:·152,·SHA:·88a6f61a4594fde55c63ca289f64c627edcdcfcdfd54517d422ff82a8790dc29·...·]-3">)</span><span·class="p">.</span><span·class="w">1607 &gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="1140083202-3">(</span><span·class="s">&quot;~Kp</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1140083202-4">[</span><span·class="ss">reversed</span><span·class="p[·...·truncated·by·diffoscope;·len:·152,·SHA:·f8ba28fd5985f128d3b395b111e833f13fe8c631e5003b940e130274bce3fc9d·...·]-3">)</span><span·class="p">.</span><span·class="w">
1608 </span><span·class="p"·data-group-id="7274979477-5">#{</span><span·class="ss">b</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·[·...·truncated·by·diffoscope;·len:·84,·SHA:·13fbc2671ce838395bd254b31bc8313a0a8968887d042b41bebda3b6f2ca21a4·...·]-5">}</span><span·class="w">1608 </span><span·class="p"·data-group-id="1140083202-5">#{</span><span·class="ss">b</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·[·...·truncated·by·diffoscope;·len:·84,·SHA:·7d77f73c3048f1abde4d44f6aa2de80b6f7b87e85efdc2537227cb1a44bc3430·...·]-5">}</span><span·class="w">
1609 </span><span·class="ss">ok</span></code></pre></li></ul></li></ul><p>If·<code·class="inline">F</code>,·<code·class="inline">P</code>,·or·<code·class="inline">Pad</code>·is·a·<code·class="inline">*</code>·character,·the·next·argument·in·<code·class="inline">Data</code>·is·used·as1609 </span><span·class="ss">ok</span></code></pre></li></ul></li></ul><p>If·<code·class="inline">F</code>,·<code·class="inline">P</code>,·or·<code·class="inline">Pad</code>·is·a·<code·class="inline">*</code>·character,·the·next·argument·in·<code·class="inline">Data</code>·is·used·as
1610 the·value.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7239109246-1">(</span><span·class="s">&quot;~*.*.0f</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="7239109246-2">[</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·208,·SHA:·0fbbe6a831ae8511b0907ce4c1fa672bd376692e9ad47bba1e66b8e53e1478c7·...·]-1">)</span><span·class="p">.</span><span·class="w">1610 the·value.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1094548129-1">(</span><span·class="s">&quot;~*.*.0f</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1094548129-2">[</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·208,·SHA:·0634f11ccc5d8ab1dfeeec7423e3836f3eda53e37ce5c2d7f34fe8b1e0684293·...·]-1">)</span><span·class="p">.</span><span·class="w">
1611 </span><span·class="mf">003.14159</span><span·class="w">1611 </span><span·class="mf">003.14159</span><span·class="w">
1612 </span><span·class="ss">ok</span></code></pre><p>To·use·a·literal·<code·class="inline">*</code>·character·as·<code·class="inline">Pad</code>,·it·must·be·passed·as·an·argument:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="1316768344-1">(</span><span·class="s">&quot;~*.*.*f</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1316768344-2">[</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·282,·SHA:·808a7ae211dde365f63c6d10d985a2419dcfd4c75454dd9a04fd358c42eccaeb·...·]-1">)</span><span·class="p">.</span><span·class="w">1612 </span><span·class="ss">ok</span></code></pre><p>To·use·a·literal·<code·class="inline">*</code>·character·as·<code·class="inline">Pad</code>,·it·must·be·passed·as·an·argument:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="7466776105-1">(</span><span·class="s">&quot;~*.*.*f</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="7466776105-2">[</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·282,·SHA:·f1c738049993abe6a42ce32096218f5648fffb283574fb41d0ac4745282a5d5b·...·]-1">)</span><span·class="p">.</span><span·class="w">
1613 </span><span·class="o">*</span><span·class="o">*</span><span·class="mf">3.14159</span><span·class="w">1613 </span><span·class="o">*</span><span·class="o">*</span><span·class="mf">3.14159</span><span·class="w">
1614 </span><span·class="ss">ok</span></code></pre><p><em>Available·control·sequences:</em></p><ul><li><p><strong><code·class="inline">~</code></strong>·-·Character·<code·class="inline">~</code>·is·written.</p></li><li><p><strong><code·class="inline">c</code></strong>·-·The·argument·is·a·number·that·is·interpreted·as·an·ASCII·code.·The1614 </span><span·class="ss">ok</span></code></pre><p><em>Available·control·sequences:</em></p><ul><li><p><strong><code·class="inline">~</code></strong>·-·Character·<code·class="inline">~</code>·is·written.</p></li><li><p><strong><code·class="inline">c</code></strong>·-·The·argument·is·a·number·that·is·interpreted·as·an·ASCII·code.·The
1615 precision·is·the·number·of·times·the·character·is·printed·and·defaults·to·the1615 precision·is·the·number·of·times·the·character·is·printed·and·defaults·to·the
1616 field·width,·which·in·turn·defaults·to·1.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="6166282272-1">(</span><span·class="s">&quot;|~10.5c|</span><span·class="si">~-</span><span·class="s">10.5c|~5c|</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="61662[·...·truncated·by·diffoscope;·len:·285,·SHA:·8affcbe2391034b61982dfbb192796a5b2dbe8314df6ac7e0922f3b390727035·...·]-1">)</span><span·class="p">.</span><span·class="w">1616 field·width,·which·in·turn·defaults·to·1.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="6090702329-1">(</span><span·class="s">&quot;|~10.5c|</span><span·class="si">~-</span><span·class="s">10.5c|~5c|</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="60907[·...·truncated·by·diffoscope;·len:·285,·SHA:·a8ca3a6d19148fd8e9caa3ba6cf6700c2bcade084c1db257042dfb7ca6304be9·...·]-1">)</span><span·class="p">.</span><span·class="w">
1617 </span><span·class="p">|</span><span·class="w">·····</span><span·class="ss">aaaaa</span><span·class="p">|</span><span·class="ss">bbbbb</span><span·class="w">·····</span><span·class="p">|</span><span·class="ss">ccccc</span><span·class="p">|</span><span·class="w">1617 </span><span·class="p">|</span><span·class="w">·····</span><span·class="ss">aaaaa</span><span·class="p">|</span><span·class="ss">bbbbb</span><span·class="w">·····</span><span·class="p">|</span><span·class="ss">ccccc</span><span·class="p">|</span><span·class="w">
1618 </span><span·class="ss">ok</span></code></pre><p>If·the·Unicode·translation·modifier·(<code·class="inline">t</code>)·is·in·effect,·the·integer·argument1618 </span><span·class="ss">ok</span></code></pre><p>If·the·Unicode·translation·modifier·(<code·class="inline">t</code>)·is·in·effect,·the·integer·argument
1619 can·be·any·number·representing·a·valid·Unicode·codepoint,·otherwise·it·is·to1619 can·be·any·number·representing·a·valid·Unicode·codepoint,·otherwise·it·is·to
1620 be·an·integer·less·than·or·equal·to·255,·otherwise·it·is·masked·with·16#FF:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="3149113759-1">(</span><span·class="s">&quot;~tc</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3149113759-2">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="3149113759-[·...·truncated·by·diffoscope;·len:·51,·SHA:·01aadc3e1fe7b8609a68e63b89ed963898d591fd0d8ec717a09bc444ed1e4ba9·...·]9-1">)</span><span·class="p">.</span><span·class="w">1620 be·an·integer·less·than·or·equal·to·255,·otherwise·it·is·masked·with·16#FF:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="8705432079-1">(</span><span·class="s">&quot;~tc</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8705432079-2">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="8705432079-[·...·truncated·by·diffoscope;·len:·51,·SHA:·40e2cc124de1a326687fce5791835041314a21f683986fa1978b2dc8c5547ec1·...·]9-1">)</span><span·class="p">.</span><span·class="w">
1621 </span><span·class="err">\</span><span·class="ss">x</span><span·class="p"·data-group-id="3149113759-3">{</span><span·class="mi">400</span><span·class="p"·data-group-id="3149113759-3">}</span><span·class="w">1621 </span><span·class="err">\</span><span·class="ss">x</span><span·class="p"·data-group-id="8705432079-3">{</span><span·class="mi">400</span><span·class="p"·data-group-id="8705432079-3">}</span><span·class="w">
1622 </span><span·class="ss">ok</span><span·class="gp·unselectable">1622 </span><span·class="ss">ok</span><span·class="gp·unselectable">
1623 3&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="3149113759-4">(</span><span·class="s">&quot;~c</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3149113759-5">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="3149113759-5[·...·truncated·by·diffoscope;·len:·50,·SHA:·e868d9a69ea94098c814631b7d4466828b278d21e89f95fc2198995afd0ecd0f·...·]9-4">)</span><span·class="p">.</span><span·class="w">1623 3&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">fwrite</span><span·class="p"·data-group-id="8705432079-4">(</span><span·class="s">&quot;~c</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8705432079-5">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="8705432079-5[·...·truncated·by·diffoscope;·len:·50,·SHA:·505e47c58307e5f1c10162ef07a1102e0681156f490cbbbe8f5485dde985de69·...·]9-4">)</span><span·class="p">.</span><span·class="w">
1624 </span><span·class="err">^</span><span·class="p">@</span><span·class="w">1624 </span><span·class="err">^</span><span·class="p">@</span><span·class="w">
1625 </span><span·class="ss">ok</span></code></pre></li><li><p><strong><code·class="inline">f</code></strong>·-·The·argument·is·a·float·that·is·written·as·<code·class="inline">[-]ddd.ddd</code>,·where·the1625 </span><span·class="ss">ok</span></code></pre></li><li><p><strong><code·class="inline">f</code></strong>·-·The·argument·is·a·float·that·is·written·as·<code·class="inline">[-]ddd.ddd</code>,·where·the
1626 precision·is·the·number·of·digits·after·the·decimal·point.·The·default1626 precision·is·the·number·of·digits·after·the·decimal·point.·The·default
1627 precision·is·6·and·it·cannot·be·&lt;·1.</p></li><li><p><strong><code·class="inline">e</code></strong>·-·The·argument·is·a·float·that·is·written·as·<code·class="inline">[-]d.ddde+-ddd</code>,·where1627 precision·is·6·and·it·cannot·be·&lt;·1.</p></li><li><p><strong><code·class="inline">e</code></strong>·-·The·argument·is·a·float·that·is·written·as·<code·class="inline">[-]d.ddde+-ddd</code>,·where
1628 the·precision·is·the·number·of·digits·written.·The·default·precision·is·6·and1628 the·precision·is·the·number·of·digits·written.·The·default·precision·is·6·and
1629 it·cannot·be·&lt;·2.</p></li><li><p><strong><code·class="inline">g</code></strong>·-·The·argument·is·a·float·that·is·written·as·<code·class="inline">f</code>,·if·it·is·&gt;=·0.1·and1629 it·cannot·be·&lt;·2.</p></li><li><p><strong><code·class="inline">g</code></strong>·-·The·argument·is·a·float·that·is·written·as·<code·class="inline">f</code>,·if·it·is·&gt;=·0.1·and
Max diff block lines reached; 135241/179122 bytes (75.50%) of diff not shown.
13.3 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/io_lib.html
    
Offset 1028, 16 lines modifiedOffset 1028, 16 lines modified
1028 <p>Tries·to·read·<code·class="inline">String</code>·in·accordance·with·the·control·sequences·in·<code·class="inline">Format</code>.</p><p>For·a·detailed·description·of·the·available·formatting·options,·see·<a·href="io.html#fread/3"><code·class="inline">io:fread/3</code></a>.1028 <p>Tries·to·read·<code·class="inline">String</code>·in·accordance·with·the·control·sequences·in·<code·class="inline">Format</code>.</p><p>For·a·detailed·description·of·the·available·formatting·options,·see·<a·href="io.html#fread/3"><code·class="inline">io:fread/3</code></a>.
1029 It·is·assumed·that·<code·class="inline">String</code>·contains·whole·lines.</p><p>The·function·returns:</p><ul><li><p><strong><code·class="inline">{ok,·InputList,·LeftOverChars}</code></strong>·-·The·string·was·read.·<code·class="inline">InputList</code>·is·the1029 It·is·assumed·that·<code·class="inline">String</code>·contains·whole·lines.</p><p>The·function·returns:</p><ul><li><p><strong><code·class="inline">{ok,·InputList,·LeftOverChars}</code></strong>·-·The·string·was·read.·<code·class="inline">InputList</code>·is·the
1030 list·of·successfully·matched·and·read·items,·and·<code·class="inline">LeftOverChars</code>·are·the·input1030 list·of·successfully·matched·and·read·items,·and·<code·class="inline">LeftOverChars</code>·are·the·input
1031 characters·not·used.</p></li><li><p><strong><code·class="inline">{more,·RestFormat,·Nchars,·InputStack}</code></strong>·-·The·string·was·read,·but·more1031 characters·not·used.</p></li><li><p><strong><code·class="inline">{more,·RestFormat,·Nchars,·InputStack}</code></strong>·-·The·string·was·read,·but·more
1032 input·is·needed·to·complete·the·original·format·string.·<code·class="inline">RestFormat</code>·is·the1032 input·is·needed·to·complete·the·original·format·string.·<code·class="inline">RestFormat</code>·is·the
1033 remaining·format·string,·<code·class="inline">Nchars</code>·is·the·number·of·characters·scanned,·and1033 remaining·format·string,·<code·class="inline">Nchars</code>·is·the·number·of·characters·scanned,·and
1034 <code·class="inline">InputStack</code>·is·the·reversed·list·of·inputs·matched·up·to·that·point.</p></li><li><p><strong><code·class="inline">{error,·What}</code></strong>·-·The·read·operation·failed·and·parameter·<code·class="inline">What</code>·gives·a1034 <code·class="inline">InputStack</code>·is·the·reversed·list·of·inputs·matched·up·to·that·point.</p></li><li><p><strong><code·class="inline">{error,·What}</code></strong>·-·The·read·operation·failed·and·parameter·<code·class="inline">What</code>·gives·a
1035 hint·about·the·error.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="2077912138-1">(</span><span·class="s">&quot;~f~f~f&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;15.6·17.3e-6·24.5&quot;</span><span·class="p"·data-group-id="2077912138-1">)</span><span·class="p">.</span><span·class="w">1035 hint·about·the·error.</p></li></ul><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">fread</span><span·class="p"·data-group-id="0328468832-1">(</span><span·class="s">&quot;~f~f~f&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;15.6·17.3e-6·24.5&quot;</span><span·class="p"·data-group-id="0328468832-1">)</span><span·class="p">.</span><span·class="w">
1036 </span><span·class="p"·data-group-id="2077912138-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2077912138-3">[</span><span·class="mf">15.6</span><span·class="p">,</span><span·class="mf">1.73e-5</span><span·class="p">,</span><span·class="mf">24.5</s[·...·truncated·by·diffoscope;·len:·228,·SHA:·f6b24271f5c72d5902d0ac56f126dd93bc59c303dfdfb1c07f4c5a364a4571da·...·]-2">}</span></code></pre>1036 </span><span·class="p"·data-group-id="0328468832-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="0328468832-3">[</span><span·class="mf">15.6</span><span·class="p">,</span><span·class="mf">1.73e-5</span><span·class="p">,</span><span·class="mf">24.5</s[·...·truncated·by·diffoscope;·len:·228,·SHA:·d7ea38b5cae4cce6ef71fa9d984fee44a6e595f60d8f485177444466403b46a8·...·]-2">}</span></code></pre>
1037 ··</section>1037 ··</section>
1038 </section>1038 </section>
1039 <section·class="detail"·id="fread/3">1039 <section·class="detail"·id="fread/3">
  
1040 ··<div·class="detail-header">1040 ··<div·class="detail-header">
1041 ····<a·href="#fread/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1041 ····<a·href="#fread/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1042 ······<i·class="ri-link-m"·aria-hidden="true"></i>1042 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1534, 19 lines modifiedOffset 1534, 19 lines modified
1534 ······</div>1534 ······</div>
  
1535 <p>Returns·a·character·list·that·represents·<code·class="inline">Term</code>.·Option·<code·class="inline">Depth</code>·controls·the1535 <p>Returns·a·character·list·that·represents·<code·class="inline">Term</code>.·Option·<code·class="inline">Depth</code>·controls·the
1536 depth·of·the·structures·written.</p><p>When·the·specified·depth·is·reached,·everything·below·this·level·is·replaced·by1536 depth·of·the·structures·written.</p><p>When·the·specified·depth·is·reached,·everything·below·this·level·is·replaced·by
1537 &quot;<code·class="inline">...</code>&quot;.</p><p><code·class="inline">Depth</code>·defaults·to·-1,·which·means·no·limitation.·Option·<code·class="inline">CharsLimit</code>·puts·a1537 &quot;<code·class="inline">...</code>&quot;.</p><p><code·class="inline">Depth</code>·defaults·to·-1,·which·means·no·limitation.·Option·<code·class="inline">CharsLimit</code>·puts·a
1538 soft·limit·on·the·number·of·characters·returned.·When·the·number·of·characters·is1538 soft·limit·on·the·number·of·characters·returned.·When·the·number·of·characters·is
1539 reached,·remaining·structures·are·replaced·by·&quot;<code·class="inline">...</code>&quot;.·<code·class="inline">CharsLimit</code>·defaults·to·-1,1539 reached,·remaining·structures·are·replaced·by·&quot;<code·class="inline">...</code>&quot;.·<code·class="inline">CharsLimit</code>·defaults·to·-1,
1540 which·means·no·limit·on·the·number·of·characters·returned.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="5900762443-1">(</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="5900762443-2">(</span><span·class="p"·data-group-id="5900762443-3">{</span><span·class="mi">1</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·837,·SHA:·f4324bc8200c65cb152d580d97d6e7c1839ce8902a13f42477ae7706e6413c71·...·]-1">)</span><span·class="p">.</span><span·class="w">1540 which·means·no·limit·on·the·number·of·characters·returned.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="7719695615-1">(</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="7719695615-2">(</span><span·class="p"·data-group-id="7719695615-3">{</span><span·class="mi">1</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·837,·SHA:·6b2102068d118ded938af04642ec246f9718e6bc94e2ba99c99751f1788663ea·...·]-1">)</span><span·class="p">.</span><span·class="w">
1541 </span><span·class="s">&quot;{1,[2],[3],[4,5],6,7,8,9}&quot;</span><span·class="gp·unselectable">1541 </span><span·class="s">&quot;{1,[2],[3],[4,5],6,7,8,9}&quot;</span><span·class="gp·unselectable">
1542 2&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="5900762443-7">(</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="5900762443-8">(</span><span·class="p"·data-group-id="5900762443-9">{</span><span·class="mi">1</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·916,·SHA:·19bd31ff1ec7f0963e302d2cb4334c5f13d0c109d1efe08952b17a6cbef8ec06·...·]-7">)</span><span·class="p">.</span><span·class="w">1542 2&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="7719695615-7">(</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="7719695615-8">(</span><span·class="p"·data-group-id="7719695615-9">{</span><span·class="mi">1</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·916,·SHA:·5b7b16ae83aa7dc4d030ee7d2ae28413358c6d5ee9a03d41058cc56c914a6d07·...·]-7">)</span><span·class="p">.</span><span·class="w">
1543 </span><span·class="s">&quot;{1,[2],[3],[...],...}&quot;</span><span·class="gp·unselectable">1543 </span><span·class="s">&quot;{1,[2],[3],[...],...}&quot;</span><span·class="gp·unselectable">
1544 3&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="5900762443-13">(</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="5900762443-14">(</span><span·class="p"·data-group-id="5900762443-15">{</span><span·class="p"·data-group-id="5900762443-[·...·truncated·by·diffoscope;·len:·1089,·SHA:·31fdec8c0202bc38fa7395875a592e1a6973c5354dd65bd658cb71919c3c0577·...·]-13">)</span><span·class="p">.</span><span·class="w">1544 3&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="7719695615-13">(</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="7719695615-14">(</span><span·class="p"·data-group-id="7719695615-15">{</span><span·class="p"·data-group-id="7719695615-[·...·truncated·by·diffoscope;·len:·1089,·SHA:·64fea7d5a7fffd1bc137c700426613ae8b470757d1414bb096c56529a331fef5·...·]-13">)</span><span·class="p">.</span><span·class="w">
1545 </span><span·class="s">&quot;{[1,2|...],[4|...],...}&quot;</span></code></pre>1545 </span><span·class="s">&quot;{[1,2|...],[4|...],...}&quot;</span></code></pre>
1546 ··</section>1546 ··</section>
1547 </section>1547 </section>
1548 <section·class="detail"·id="write_atom/1">1548 <section·class="detail"·id="write_atom/1">
  
1549 ··<div·class="detail-header">1549 ··<div·class="detail-header">
1550 ····<a·href="#write_atom/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1550 ····<a·href="#write_atom/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
185 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/io_protocol.html
    
Offset 142, 16 lines modifiedOffset 142, 16 lines modified
142 I/O·server·communicates·with.</p><h2·id="protocol-basics"·class="section-heading">142 I/O·server·communicates·with.</p><h2·id="protocol-basics"·class="section-heading">
143 ··<a·href="#protocol-basics"·class="hover-link">143 ··<a·href="#protocol-basics"·class="hover-link">
144 ····<i·class="ri-link-m"·aria-hidden="true"></i>144 ····<i·class="ri-link-m"·aria-hidden="true"></i>
145 ··</a>145 ··</a>
146 ··<span·class="text">Protocol·Basics</span>146 ··<span·class="text">Protocol·Basics</span>
147 </h2>147 </h2>
148 <p>As·described·in·Robert's·paper,·I/O·servers·and·clients·communicate·using148 <p>As·described·in·Robert's·paper,·I/O·servers·and·clients·communicate·using
149 <code·class="inline">io_request</code>/<code·class="inline">io_reply</code>·tuples·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0331863209-1">{</span><span·class="ss">io_request</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReplyAs</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·72,·SHA:·8c458a000f85715d3cfd42849ab1faa23d9f1af3a7d9f0de451b2a571435f177·...·]-1">}</span><span·class="w">149 <code·class="inline">io_request</code>/<code·class="inline">io_reply</code>·tuples·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7125996487-1">{</span><span·class="ss">io_request</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReplyAs</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·72,·SHA:·e20cbecb52498ac00af88fea1ac8b55ff2c3a7003622bd292dbe1bcf072376ff·...·]-1">}</span><span·class="w">
150 </span><span·class="p"·data-group-id="0331863209-2">{</span><span·class="ss">io_reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReplyAs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p"·data-group-id="0331863209-2">}</span></code></pre><p>The·client·sends·an·<code·class="inline">io_request</code>·tuple·to·the·I/O·server·and·the·server150 </span><span·class="p"·data-group-id="7125996487-2">{</span><span·class="ss">io_reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReplyAs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reply</span><span·class="p"·data-group-id="7125996487-2">}</span></code></pre><p>The·client·sends·an·<code·class="inline">io_request</code>·tuple·to·the·I/O·server·and·the·server
151 eventually·sends·a·corresponding·<code·class="inline">io_reply</code>·tuple.</p><ul><li><p><code·class="inline">From</code>·is·the·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0"><code·class="inline">pid/0</code></a>·of·the·client,·the·process·which·the·I/O·server·sends151 eventually·sends·a·corresponding·<code·class="inline">io_reply</code>·tuple.</p><ul><li><p><code·class="inline">From</code>·is·the·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0"><code·class="inline">pid/0</code></a>·of·the·client,·the·process·which·the·I/O·server·sends
152 the·I/O·reply·to.</p></li><li><p><code·class="inline">ReplyAs</code>·can·be·any·datum·and·is·returned·in·the·corresponding·<code·class="inline">io_reply</code>.152 the·I/O·reply·to.</p></li><li><p><code·class="inline">ReplyAs</code>·can·be·any·datum·and·is·returned·in·the·corresponding·<code·class="inline">io_reply</code>.
153 The·<a·href="io.html"><code·class="inline">io</code></a>·module·monitors·the·I/O·server·and·uses·the·monitor·reference·as153 The·<a·href="io.html"><code·class="inline">io</code></a>·module·monitors·the·I/O·server·and·uses·the·monitor·reference·as
154 the·<code·class="inline">ReplyAs</code>·datum.·A·more·complicated·client·can·have·many·outstanding·I/O154 the·<code·class="inline">ReplyAs</code>·datum.·A·more·complicated·client·can·have·many·outstanding·I/O
155 requests·to·the·same·I/O·server·and·can·use·different·references·(or·something155 requests·to·the·same·I/O·server·and·can·use·different·references·(or·something
156 else)·to·differentiate·among·the·incoming·I/O·replies.·Element·<code·class="inline">ReplyAs</code>·is·to156 else)·to·differentiate·among·the·incoming·I/O·replies.·Element·<code·class="inline">ReplyAs</code>·is·to
157 be·considered·opaque·by·the·I/O·server.</p><p>Notice·that·the·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0"><code·class="inline">pid/0</code></a>·of·the·I/O·server·is·not·explicitly·present·in·tuple157 be·considered·opaque·by·the·I/O·server.</p><p>Notice·that·the·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:pid/0"><code·class="inline">pid/0</code></a>·of·the·I/O·server·is·not·explicitly·present·in·tuple
Offset 160, 16 lines modifiedOffset 160, 16 lines modified
160 part·and·eventually·sends·an·<code·class="inline">io_reply</code>·tuple·with·the·corresponding·<code·class="inline">Reply</code>160 part·and·eventually·sends·an·<code·class="inline">io_reply</code>·tuple·with·the·corresponding·<code·class="inline">Reply</code>
161 part.</p><h2·id="output-requests"·class="section-heading">161 part.</p><h2·id="output-requests"·class="section-heading">
162 ··<a·href="#output-requests"·class="hover-link">162 ··<a·href="#output-requests"·class="hover-link">
163 ····<i·class="ri-link-m"·aria-hidden="true"></i>163 ····<i·class="ri-link-m"·aria-hidden="true"></i>
164 ··</a>164 ··</a>
165 ··<span·class="text">Output·Requests</span>165 ··<span·class="text">Output·Requests</span>
166 </h2>166 </h2>
167 <p>To·output·characters·on·an·I/O·device,·the·following·<code·class="inline">Request</code>s·exist:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9231506890-1">{</span><span·class="ss">put_chars</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Characters</span><span·class="p"·data-group-id="9231506890-1">}</span><span·class="w">167 <p>To·output·characters·on·an·I/O·device,·the·following·<code·class="inline">Request</code>s·exist:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7762811263-1">{</span><span·class="ss">put_chars</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Characters</span><span·class="p"·data-group-id="7762811263-1">}</span><span·class="w">
168 </span><span·class="p"·data-group-id="9231506890-2">{</span><span·class="ss">put_chars</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·150,·SHA:·33eddfb13466971b177582285930187006a9daec2b31a6fb3ae160399f19709f·...·]-2">}</span></code></pre><ul><li><p><code·class="inline">Encoding</code>·is·<code·class="inline">unicode</code>·or·<code·class="inline">latin1</code>,·meaning·that·the·characters·are·(in·case168 </span><span·class="p"·data-group-id="7762811263-2">{</span><span·class="ss">put_chars</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·150,·SHA:·ea5a41cbccc656cc1ba0c34799985d27165e45b671a0f8521fbd8fe326b9450a·...·]-2">}</span></code></pre><ul><li><p><code·class="inline">Encoding</code>·is·<code·class="inline">unicode</code>·or·<code·class="inline">latin1</code>,·meaning·that·the·characters·are·(in·case
169 of·binaries)·encoded·as·UTF-8·or·ISO·Latin-1·(pure·bytes).·A·well-behaved·I/O169 of·binaries)·encoded·as·UTF-8·or·ISO·Latin-1·(pure·bytes).·A·well-behaved·I/O
170 server·is·also·to·return·an·error·indication·if·list·elements·contain170 server·is·also·to·return·an·error·indication·if·list·elements·contain
171 integers·&gt;·255·when·<code·class="inline">Encoding</code>·is·set·to·<code·class="inline">latin1</code>.</p><p>Notice·that·this·does·not·in·any·way·tell·how·characters·are·to·be·put·on·the171 integers·&gt;·255·when·<code·class="inline">Encoding</code>·is·set·to·<code·class="inline">latin1</code>.</p><p>Notice·that·this·does·not·in·any·way·tell·how·characters·are·to·be·put·on·the
172 I/O·device·or·handled·by·the·I/O·server.·Different·I/O·servers·can·handle·the172 I/O·device·or·handled·by·the·I/O·server.·Different·I/O·servers·can·handle·the
173 characters·however·they·want,·this·only·tells·the·I/O·server·which·format·the173 characters·however·they·want,·this·only·tells·the·I/O·server·which·format·the
174 data·is·expected·to·have.·In·the·<code·class="inline">Module</code>/<code·class="inline">Function</code>/<code·class="inline">Args</code>·case,·<code·class="inline">Encoding</code>174 data·is·expected·to·have.·In·the·<code·class="inline">Module</code>/<code·class="inline">Function</code>/<code·class="inline">Args</code>·case,·<code·class="inline">Encoding</code>
175 tells·which·format·the·designated·function·produces.</p><p>Notice·also·that·byte-oriented·data·is·simplest·sent·using·the·ISO·Latin-1175 tells·which·format·the·designated·function·produces.</p><p>Notice·also·that·byte-oriented·data·is·simplest·sent·using·the·ISO·Latin-1
Offset 187, 15 lines modifiedOffset 187, 15 lines modified
187 {error,·Error}</code></pre><ul><li><code·class="inline">Error</code>·describes·the·error·to·the·client,·which·can·do·whatever·it·wants·with187 {error,·Error}</code></pre><ul><li><code·class="inline">Error</code>·describes·the·error·to·the·client,·which·can·do·whatever·it·wants·with
188 it.·The·<a·href="io.html"><code·class="inline">io</code></a>·module·typically·returns·it·&quot;as·is&quot;.</li></ul><h2·id="input-requests"·class="section-heading">188 it.·The·<a·href="io.html"><code·class="inline">io</code></a>·module·typically·returns·it·&quot;as·is&quot;.</li></ul><h2·id="input-requests"·class="section-heading">
189 ··<a·href="#input-requests"·class="hover-link">189 ··<a·href="#input-requests"·class="hover-link">
190 ····<i·class="ri-link-m"·aria-hidden="true"></i>190 ····<i·class="ri-link-m"·aria-hidden="true"></i>
191 ··</a>191 ··</a>
192 ··<span·class="text">Input·Requests</span>192 ··<span·class="text">Input·Requests</span>
193 </h2>193 </h2>
194 <p>To·read·characters·from·an·I/O·device,·the·following·<code·class="inline">Request</code>s·exist:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0404976490-1">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Prompt</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·232,·SHA:·c4602bbbb4b68c2c7f3fe9987c8c6e7b49fef9c010c01ab90bf31f13b0f49289·...·]-1">}</span></code></pre><ul><li><p><code·class="inline">Encoding</code>·denotes·how·data·is·to·be·sent·back·to·the·client·and·what·data·is194 <p>To·read·characters·from·an·I/O·device,·the·following·<code·class="inline">Request</code>s·exist:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9341150993-1">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Prompt</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·232,·SHA:·e140eb126f480ec83bdcb2cec6594126a0a46242f9cbca94c5a71ab4d2468fd4·...·]-1">}</span></code></pre><ul><li><p><code·class="inline">Encoding</code>·denotes·how·data·is·to·be·sent·back·to·the·client·and·what·data·is
195 sent·to·the·function·denoted·by·<code·class="inline">Module</code>/<code·class="inline">Function</code>/<code·class="inline">ExtraArgs</code>.·If·the195 sent·to·the·function·denoted·by·<code·class="inline">Module</code>/<code·class="inline">Function</code>/<code·class="inline">ExtraArgs</code>.·If·the
196 function·supplied·returns·data·as·a·list,·the·data·is·converted·to·this196 function·supplied·returns·data·as·a·list,·the·data·is·converted·to·this
197 encoding.·If·the·function·supplied·returns·data·in·some·other·format,·no197 encoding.·If·the·function·supplied·returns·data·in·some·other·format,·no
198 conversion·can·be·done,·and·it·is·up·to·the·client-supplied·function·to·return198 conversion·can·be·done,·and·it·is·up·to·the·client-supplied·function·to·return
199 data·in·a·proper·way.</p><p>If·<code·class="inline">Encoding</code>·is·<code·class="inline">latin1</code>,·lists·of·integers·<code·class="inline">0..255</code>·or·binaries·containing199 data·in·a·proper·way.</p><p>If·<code·class="inline">Encoding</code>·is·<code·class="inline">latin1</code>,·lists·of·integers·<code·class="inline">0..255</code>·or·binaries·containing
200 plain·bytes·are·sent·back·to·the·client·when·possible.·If·<code·class="inline">Encoding</code>·is200 plain·bytes·are·sent·back·to·the·client·when·possible.·If·<code·class="inline">Encoding</code>·is
201 <code·class="inline">unicode</code>,·lists·with·integers·in·the·whole·Unicode·range·or·binaries·encoded201 <code·class="inline">unicode</code>,·lists·with·integers·in·the·whole·Unicode·range·or·binaries·encoded
Offset 203, 47 lines modifiedOffset 203, 47 lines modified
203 of·integers,·never·binaries,·but·the·list·can·contain·numbers·&gt;·255·if203 of·integers,·never·binaries,·but·the·list·can·contain·numbers·&gt;·255·if
204 <code·class="inline">Encoding</code>·is·<code·class="inline">unicode</code>.</p></li><li><p><code·class="inline">Prompt</code>·is·a·list·of·characters·(not·mixed,·no·binaries)·or·an·atom·to·be204 <code·class="inline">Encoding</code>·is·<code·class="inline">unicode</code>.</p></li><li><p><code·class="inline">Prompt</code>·is·a·list·of·characters·(not·mixed,·no·binaries)·or·an·atom·to·be
205 output·as·a·prompt·for·input·on·the·I/O·device.·<code·class="inline">Prompt</code>·is·often·ignored·by205 output·as·a·prompt·for·input·on·the·I/O·device.·<code·class="inline">Prompt</code>·is·often·ignored·by
206 the·I/O·server;·if·set·to·<code·class="inline">''</code>,·it·is·always·to·be·ignored·(and·results·in206 the·I/O·server;·if·set·to·<code·class="inline">''</code>,·it·is·always·to·be·ignored·(and·results·in
207 nothing·being·written·to·the·I/O·device).</p></li><li><p><code·class="inline">Module</code>,·<code·class="inline">Function</code>,·and·<code·class="inline">ExtraArgs</code>·denote·a·function·and·arguments·to207 nothing·being·written·to·the·I/O·device).</p></li><li><p><code·class="inline">Module</code>,·<code·class="inline">Function</code>,·and·<code·class="inline">ExtraArgs</code>·denote·a·function·and·arguments·to
208 determine·when·enough·data·is·written.·The·function·is·to·take·two·more208 determine·when·enough·data·is·written.·The·function·is·to·take·two·more
209 arguments,·the·last·state,·and·a·list·of·characters.·The·function·is·to·return209 arguments,·the·last·state,·and·a·list·of·characters.·The·function·is·to·return
210 one·of:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9889619358-1">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RestChars</span><span·class="p"·data-group-id="9889619358-1">}</span><span·class="w">210 one·of:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9972788507-1">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Result</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RestChars</span><span·class="p"·data-group-id="9972788507-1">}</span><span·class="w">
211 </span><span·class="p"·data-group-id="9889619358-2">{</span><span·class="ss">more</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Continuation</span><span·class="p"·data-group-id="9889619358-2">}</span></code></pre><p><code·class="inline">Result</code>·can·be·any·Erlang·term,·but·if·it·is·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a>,·the·I/O·server·can211 </span><span·class="p"·data-group-id="9972788507-2">{</span><span·class="ss">more</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Continuation</span><span·class="p"·data-group-id="9972788507-2">}</span></code></pre><p><code·class="inline">Result</code>·can·be·any·Erlang·term,·but·if·it·is·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a>,·the·I/O·server·can
212 convert·it·to·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0"><code·class="inline">binary/0</code></a>·of·appropriate·format·before·returning·it·to·the212 convert·it·to·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0"><code·class="inline">binary/0</code></a>·of·appropriate·format·before·returning·it·to·the
213 client,·if·the·I/O·server·is·set·in·binary·mode·(see·below).</p><p>The·function·is·called·with·the·data·the·I/O·server·finds·on·its·I/O·device,213 client,·if·the·I/O·server·is·set·in·binary·mode·(see·below).</p><p>The·function·is·called·with·the·data·the·I/O·server·finds·on·its·I/O·device,
214 returning·one·of:</p><ul><li><code·class="inline">{done,·Result,·RestChars}</code>·when·enough·data·is·read.·In·this·case·<code·class="inline">Result</code>214 returning·one·of:</p><ul><li><code·class="inline">{done,·Result,·RestChars}</code>·when·enough·data·is·read.·In·this·case·<code·class="inline">Result</code>
215 is·sent·to·the·client·and·<code·class="inline">RestChars</code>·is·kept·in·the·I/O·server·as·a·buffer215 is·sent·to·the·client·and·<code·class="inline">RestChars</code>·is·kept·in·the·I/O·server·as·a·buffer
216 for·later·input.</li><li><code·class="inline">{more,·Continuation}</code>,·which·indicates·that·more·characters·are·needed·to216 for·later·input.</li><li><code·class="inline">{more,·Continuation}</code>,·which·indicates·that·more·characters·are·needed·to
217 complete·the·request.</li></ul><p><code·class="inline">Continuation</code>·is·sent·as·the·state·in·later·calls·to·the·function·when·more217 complete·the·request.</li></ul><p><code·class="inline">Continuation</code>·is·sent·as·the·state·in·later·calls·to·the·function·when·more
218 characters·are·available.·When·no·more·characters·are·available,·the·function218 characters·are·available.·When·no·more·characters·are·available,·the·function
219 must·return·<code·class="inline">{done,·eof,·Rest}</code>.·The·initial·state·is·the·empty·list.·The·data219 must·return·<code·class="inline">{done,·eof,·Rest}</code>.·The·initial·state·is·the·empty·list.·The·data
220 when·an·end·of·file·is·reached·on·the·IO·device·is·the·atom·<code·class="inline">eof</code>.</p><p>An·emulation·of·the·<code·class="inline">get_line</code>·request·can·be·(inefficiently)·implemented220 when·an·end·of·file·is·reached·on·the·IO·device·is·the·atom·<code·class="inline">eof</code>.</p><p>An·emulation·of·the·<code·class="inline">get_line</code>·request·can·be·(inefficiently)·implemented
221 using·the·following·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0059650129-1">(</span><span·class="ss">demo</span><span·class="p"·data-group-id="0059650129-1">)</span><span·class="p">.</span><span·class="w">221 using·the·following·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0719760568-1">(</span><span·class="ss">demo</span><span·class="p"·data-group-id="0719760568-1">)</span><span·class="p">.</span><span·class="w">
222 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0059650129-2">(</span><span·class="p"·data-group-id="0059650129-3">[</span><span·class="ss">until_newline</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_line</span><span·class="p">[·...·truncated·by·diffoscope;·len:·127,·SHA:·f4c160a56e0ffbe1b7c7f28f4aa0580e38590d150b3e0cf0e2275b9ef762552c·...·]-2">)</span><span·class="p">.</span><span·class="w">222 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0719760568-2">(</span><span·class="p"·data-group-id="0719760568-3">[</span><span·class="ss">until_newline</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">get_line</span><span·class="p">[·...·truncated·by·diffoscope;·len:·127,·SHA:·e59a8183064ea9cfe9795dbc9756bf3b18f835f3f44cc0d8a3ed99676c3963af·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
223 </span><span·class="nf">until_newline</span><span·class="p"·data-group-id="0059650129-4">(</span><span·class="p">_</span><span·class="n">ThisFar</span><span·class="p">,</span><span·class="ss">eof</span><span·class="p">,</span><span·class="p">_</span><span·class="n">MyStopCharacter</span><span·class="p"·data-group-id="0059650129-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 </span><span·class="nf">until_newline</span><span·class="p"·data-group-id="0719760568-4">(</span><span·class="p">_</span><span·class="n">ThisFar</span><span·class="p">,</span><span·class="ss">eof</span><span·class="p">,</span><span·class="p">_</span><span·class="n">MyStopCharacter</span><span·class="p"·data-group-id="0719760568-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ····</span><span·class="p"·data-group-id="0059650129-5">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="ss">eof</span><span·class="p">,</span><span·class="p"·data-group-id="0059650129-6">[</span><span·class="p"·data-group-id="0059650129-6">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·9de0738dd23bf0cd8505e3d18e4f0bd74eb23939af235f00f66fb49d8525da83·...·]-5">}</span><span·class="p">;</span><span·class="w">224 ····</span><span·class="p"·data-group-id="0719760568-5">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="ss">eof</span><span·class="p">,</span><span·class="p"·data-group-id="0719760568-6">[</span><span·class="p"·data-group-id="0719760568-6">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·56a0df667e8868c057ce4670512ba89ed65ca3be0d6bfd6901e50c40052387d1·...·]-5">}</span><span·class="p">;</span><span·class="w">
225 </span><span·class="nf">until_newline</span><span·class="p"·data-group-id="0059650129-7">(</span><span·class="n">ThisFar</span><span·class="p">,</span><span·class="n">CharList</span><span·class="p">,</span><span·class="n">MyStopCharacter</span><span·class="p"·data-group-id="0059650129-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">225 </span><span·class="nf">until_newline</span><span·class="p"·data-group-id="0719760568-7">(</span><span·class="n">ThisFar</span><span·class="p">,</span><span·class="n">CharList</span><span·class="p">,</span><span·class="n">MyStopCharacter</span><span·class="p"·data-group-id="0719760568-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
226 ····</span><span·class="k">case</span><span·class="w">226 ····</span><span·class="k">case</span><span·class="w">
227 ········</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">splitwith</span><span·class="p"·data-group-id="0059650129-8">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0059650129-9">(</span><span·class="n">X</span><span·class="p"·data-group-id="0059650129-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·305,·SHA:·8c01b1ea4b51aa563501613fabe93438abcd10263e22e7f1bf40a611de58144b·...·]-8">)</span><span·class="w">227 ········</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">splitwith</span><span·class="p"·data-group-id="0719760568-8">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0719760568-9">(</span><span·class="n">X</span><span·class="p"·data-group-id="0719760568-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·305,·SHA:·938cee9efdf4a725d83bcd99e35463f4c44734def18afe70e8da06fbd8dd79ae·...·]-8">)</span><span·class="w">
228 ····</span><span·class="k">of</span><span·class="w">228 ····</span><span·class="k">of</span><span·class="w">
229 ··</span><span·class="p"·data-group-id="0059650129-10">{</span><span·class="n">L</span><span·class="p">,</span><span·class="p"·data-group-id="0059650129-11">[</span><span·class="p"·data-group-id="0059650129-11">]</span><span·class="p"·data-group-id="0059650129-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">229 ··</span><span·class="p"·data-group-id="0719760568-10">{</span><span·class="n">L</span><span·class="p">,</span><span·class="p"·data-group-id="0719760568-11">[</span><span·class="p"·data-group-id="0719760568-11">]</span><span·class="p"·data-group-id="0719760568-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
230 ············</span><span·class="p"·data-group-id="0059650129-12">{</span><span·class="ss">more</span><span·class="p">,</span><span·class="n">ThisFar</span><span·class="o">++</span><span·class="n">L</span><span·class="p"·data-group-id="0059650129-12">}</span><span·class="p">;</span><span·class="w">230 ············</span><span·class="p"·data-group-id="0719760568-12">{</span><span·class="ss">more</span><span·class="p">,</span><span·class="n">ThisFar</span><span·class="o">++</span><span·class="n">L</span><span·class="p"·data-group-id="0719760568-12">}</span><span·class="p">;</span><span·class="w">
231 ··</span><span·class="p"·data-group-id="0059650129-13">{</span><span·class="n">L2</span><span·class="p">,</span><span·class="p"·data-group-id="0059650129-14">[</span><span·class="n">MyStopCharacter</span><span·class="p">|</span><span·class="n">Rest</span><span·class="p"·data-group-id="0059650129-[·...·truncated·by·diffoscope;·len:·53,·SHA:·3db79d338adab6dfcbdb7f25923021d9388c2407b872d4bc000aef2d4940d618·...·]-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 ··</span><span·class="p"·data-group-id="0719760568-13">{</span><span·class="n">L2</span><span·class="p">,</span><span·class="p"·data-group-id="0719760568-14">[</span><span·class="n">MyStopCharacter</span><span·class="p">|</span><span·class="n">Rest</span><span·class="p"·data-group-id="0719760568-[·...·truncated·by·diffoscope;·len:·53,·SHA:·decb73b6bfced95193e0e38725c48ca48b81cce4a6ae0c93c9b8ca6baa696e49·...·]-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ······</span><span·class="p"·data-group-id="0059650129-15">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="n">ThisFar</span><span·class="o">++</span><span·class="n">L2</span><span·class="o">++</span><span·class="p"·data-group-id="0059650129-16">[</span><span·class="n">MyStopC[·...·truncated·by·diffoscope;·len:·161,·SHA:·9c08d626b66dd14b0f646334fbf7c3ed4fb6b31526f9e30814f671111e515b1e·...·]-15">}</span><span·class="w">232 ······</span><span·class="p"·data-group-id="0719760568-15">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="n">ThisFar</span><span·class="o">++</span><span·class="n">L2</span><span·class="o">++</span><span·class="p"·data-group-id="0719760568-16">[</span><span·class="n">MyStopC[·...·truncated·by·diffoscope;·len:·161,·SHA:·1161e57888f6da8d98b3ada41e4653162456b41c7d3d8aa5107127418867792c·...·]-15">}</span><span·class="w">
233 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">233 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
234 </span><span·class="nf">get_line</span><span·class="p"·data-group-id="0059650129-17">(</span><span·class="n">IoServer</span><span·class="p"·data-group-id="0059650129-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">234 </span><span·class="nf">get_line</span><span·class="p"·data-group-id="0719760568-17">(</span><span·class="n">IoServer</span><span·class="p"·data-group-id="0719760568-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
235 ····</span><span·class="n">IoServer</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0059650129-18">{</span><span·class="ss">io_request</span><span·class="p">,</span><span·class="w">235 ····</span><span·class="n">IoServer</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="0719760568-18">{</span><span·class="ss">io_request</span><span·class="p">,</span><span·class="w">
236 ················</span><span·class="nf">self</span><span·class="p"·data-group-id="0059650129-19">(</span><span·class="p"·data-group-id="0059650129-19">)</span><span·class="p">,</span><span·class="w">236 ················</span><span·class="nf">self</span><span·class="p"·data-group-id="0719760568-19">(</span><span·class="p"·data-group-id="0719760568-19">)</span><span·class="p">,</span><span·class="w">
237 ················</span><span·class="n">IoServer</span><span·class="p">,</span><span·class="w">237 ················</span><span·class="n">IoServer</span><span·class="p">,</span><span·class="w">
238 ················</span><span·class="p"·data-group-id="0059650129-20">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;&#39;</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·424,·SHA:·cdca9a375330b6cb51159f62140be9422e04e2b111e61bcee918eb8fc9ce8035·...·]-18">}</span><span·class="p">,</span><span·class="w">238 ················</span><span·class="p"·data-group-id="0719760568-20">{</span><span·class="ss">get_until</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;&#39;</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·424,·SHA:·269883dc64d023494b0d009da88e2ec22c19bf9f71843ed695c3c0fe40f032f4·...·]-18">}</span><span·class="p">,</span><span·class="w">
239 ····</span><span·class="k">receive</span><span·class="w">239 ····</span><span·class="k">receive</span><span·class="w">
240 ········</span><span·class="p"·data-group-id="0059650129-22">{</span><span·class="ss">io_reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IoServer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="0059650129-22">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">240 ········</span><span·class="p"·data-group-id="0719760568-22">{</span><span·class="ss">io_reply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">IoServer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="0719760568-22">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
241 ······</span><span·class="n">Data</span><span·class="w">241 ······</span><span·class="n">Data</span><span·class="w">
242 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Notice·that·the·last·element·in·the·<code·class="inline">Request</code>·tuple·(<code·class="inline">[$\n]</code>)·is·appended·to242 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>Notice·that·the·last·element·in·the·<code·class="inline">Request</code>·tuple·(<code·class="inline">[$\n]</code>)·is·appended·to
243 the·argument·list·when·the·function·is·called.·The·function·is·to·be·called243 the·argument·list·when·the·function·is·called.·The·function·is·to·be·called
244 like·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(Module,·Function,·[·State,·Data·|·ExtraArgs·])</code></a>·by244 like·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(Module,·Function,·[·State,·Data·|·ExtraArgs·])</code></a>·by
245 the·I/O·server.</p></li></ul><p>A·fixed·number·of·characters·is·requested·using·the·following·<code·class="inline">Request</code>:</p><pre><code·class="text">{get_chars,·Encoding,·Prompt,·N}</code></pre><ul><li><code·class="inline">Encoding</code>·and·<code·class="inline">Prompt</code>·as·for·<code·class="inline">get_until</code>.</li><li><code·class="inline">N</code>·is·the·number·of·characters·to·be·read·from·the·I/O·device.</li></ul><p>A·single·line·(as·in·former·example)·is·requested·with·the·following·<code·class="inline">Request</code>:</p><pre><code·class="text">{get_line,·Encoding,·Prompt}</code></pre><ul><li><code·class="inline">Encoding</code>·and·<code·class="inline">Prompt</code>·as·for·<code·class="inline">get_until</code>.</li></ul><p>Clearly,·<code·class="inline">get_chars</code>·and·<code·class="inline">get_line</code>·could·be·implemented·with·the·<code·class="inline">get_until</code>245 the·I/O·server.</p></li></ul><p>A·fixed·number·of·characters·is·requested·using·the·following·<code·class="inline">Request</code>:</p><pre><code·class="text">{get_chars,·Encoding,·Prompt,·N}</code></pre><ul><li><code·class="inline">Encoding</code>·and·<code·class="inline">Prompt</code>·as·for·<code·class="inline">get_until</code>.</li><li><code·class="inline">N</code>·is·the·number·of·characters·to·be·read·from·the·I/O·device.</li></ul><p>A·single·line·(as·in·former·example)·is·requested·with·the·following·<code·class="inline">Request</code>:</p><pre><code·class="text">{get_line,·Encoding,·Prompt}</code></pre><ul><li><code·class="inline">Encoding</code>·and·<code·class="inline">Prompt</code>·as·for·<code·class="inline">get_until</code>.</li></ul><p>Clearly,·<code·class="inline">get_chars</code>·and·<code·class="inline">get_line</code>·could·be·implemented·with·the·<code·class="inline">get_until</code>
246 request·(and·indeed·they·were·originally),·but·demands·for·efficiency·have·made246 request·(and·indeed·they·were·originally),·but·demands·for·efficiency·have·made
247 these·additions·necessary.</p><p>The·I/O·server·replies·to·the·client·with·an·<code·class="inline">io_reply</code>·tuple,·where·element247 these·additions·necessary.</p><p>The·I/O·server·replies·to·the·client·with·an·<code·class="inline">io_reply</code>·tuple,·where·element
Offset 273, 18 lines modifiedOffset 273, 18 lines modified
273 forms.·However,·the·I/O·server·is·to·convert·the·results·to·binaries·whenever273 forms.·However,·the·I/O·server·is·to·convert·the·results·to·binaries·whenever
274 possible·(that·is,·when·the·function·supplied·to·<code·class="inline">get_until</code>·returns·a·list).274 possible·(that·is,·when·the·function·supplied·to·<code·class="inline">get_until</code>·returns·a·list).
275 This·is·done·in·the·example·in·section275 This·is·done·in·the·example·in·section
276 <a·href="io_protocol.html#example_io_server">An·Annotated·and·Working·Example·I/O·Server</a>.</p><p>An·I/O·server·in·binary·mode·affects·the·data·sent·to·the·client,·so·that·it276 <a·href="io_protocol.html#example_io_server">An·Annotated·and·Working·Example·I/O·Server</a>.</p><p>An·I/O·server·in·binary·mode·affects·the·data·sent·to·the·client,·so·that·it
277 must·be·able·to·handle·binary·data.·For·convenience,·the·modes·of·an·I/O·server277 must·be·able·to·handle·binary·data.·For·convenience,·the·modes·of·an·I/O·server
278 can·be·set·and·retrieved·using·the·following·I/O·requests:</p><pre><code·class="text">{setopts,·Opts}</code></pre><ul><li><code·class="inline">Opts</code>·is·a·list·of·options·in·the·format·recognized·by·the·<a·href="proplists.html"><code·class="inline">proplists</code></a>278 can·be·set·and·retrieved·using·the·following·I/O·requests:</p><pre><code·class="text">{setopts,·Opts}</code></pre><ul><li><code·class="inline">Opts</code>·is·a·list·of·options·in·the·format·recognized·by·the·<a·href="proplists.html"><code·class="inline">proplists</code></a>
279 module·(and·by·the·I/O·server).</li></ul><p>As·an·example,·the·I/O·server·for·the·interactive·shell·(in·<code·class="inline">group.erl</code>)279 module·(and·by·the·I/O·server).</li></ul><p>As·an·example,·the·I/O·server·for·the·interactive·shell·(in·<code·class="inline">group.erl</code>)
280 understands·the·following·options:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0537875708-1">{</span><span·class="ss">binary</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="0537875708-2">(</span><span·class="p"·data-group-id="0537875708-2">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·284,·SHA:·a5e403e901e0575b1a9df671fae0e0172c4672b1fceaf207a6d5470ac4a9a02c·...·]-3">)</span><span·class="w">280 understands·the·following·options:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5988693081-1">{</span><span·class="ss">binary</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="5988693081-2">(</span><span·class="p"·data-group-id="5988693081-2">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·284,·SHA:·3617a0ad8613102522aaef5d5d8c07bcc88461bcd8d23702ea1335df8dfd0993·...·]-3">)</span><span·class="w">
281 </span><span·class="p"·data-group-id="0537875708-4">{</span><span·class="ss">echo</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="0537875708-5">(</span><span·class="p"·data-group-id="0537875708-5">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·3097a003d8dcfdb5d6bd03403c5786db05f8760d81bd796bac2058f4f08ea57f·...·]-4">}</span><span·class="w">281 </span><span·class="p"·data-group-id="5988693081-4">{</span><span·class="ss">echo</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">boolean</span><span·class="p"·data-group-id="5988693081-5">(</span><span·class="p"·data-group-id="5988693081-5">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·c58851dc0a80e4519c76e59c13b1dd5a56142d5e231b602ebda623ba4fd7d5bf·...·]-4">}</span><span·class="w">
282 </span><span·class="p"·data-group-id="0537875708-6">{</span><span·class="ss">expand_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="0537875708-7">(</span><span·class="p"·data-group-id="0537875708-7">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·457d96823b0775c6d5dceeefd5ac7e01802b7c39552c545418a6bfd47d1409c4·...·]-6">}</span><span·class="w">282 </span><span·class="p"·data-group-id="5988693081-6">{</span><span·class="ss">expand_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5988693081-7">(</span><span·class="p"·data-group-id="5988693081-7">)</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·33e10921583f9d79d96c8b8caa2bf6a493dc9bac036ecb9d456296834e926ca1·...·]-6">}</span><span·class="w">
283 </span><span·class="p"·data-group-id="0537875708-8">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="o">/</span><span·class="ss">latin1</span><span·class="p"·data-group-id="0537875708-8">}</span><span·class="w">[·...·truncated·by·diffoscope;·len:·237,·SHA:·f386304779af5da56555fc5cb5f1728f10a6df6f5469e5344a65af59b160acd5·...·]-9">)</span></code></pre><p>Options·<code·class="inline">binary</code>·and·<code·class="inline">encoding</code>·are·common·for·all·I/O·servers·in·OTP,·while283 </span><span·class="p"·data-group-id="5988693081-8">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="o">/</span><span·class="ss">latin1</span><span·class="p"·data-group-id="5988693081-8">}</span><span·class="w">[·...·truncated·by·diffoscope;·len:·237,·SHA:·9a428da090a766285cb12f687e55cd23d00f278fc29c6d6c73cbacc0ae774b0b·...·]-9">)</span></code></pre><p>Options·<code·class="inline">binary</code>·and·<code·class="inline">encoding</code>·are·common·for·all·I/O·servers·in·OTP,·while
284 <code·class="inline">echo</code>·and·<code·class="inline">expand</code>·are·valid·only·for·this·I/O·server.·Option·<code·class="inline">unicode</code>284 <code·class="inline">echo</code>·and·<code·class="inline">expand</code>·are·valid·only·for·this·I/O·server.·Option·<code·class="inline">unicode</code>
285 notifies·how·characters·are·put·on·the·physical·I/O·device,·that·is,·if·the285 notifies·how·characters·are·put·on·the·physical·I/O·device,·that·is,·if·the
286 terminal·itself·is·Unicode-aware.·It·does·not·affect·how·characters·are·sent·in286 terminal·itself·is·Unicode-aware.·It·does·not·affect·how·characters·are·sent·in
287 the·I/O·protocol,·where·each·request·contains·encoding·information·for·the287 the·I/O·protocol,·where·each·request·contains·encoding·information·for·the
288 provided·or·returned·data.</p><p>The·I/O·server·is·to·send·one·of·the·following·as·<code·class="inline">Reply</code>:</p><pre><code·class="text">ok288 provided·or·returned·data.</p><p>The·I/O·server·is·to·send·one·of·the·following·as·<code·class="inline">Reply</code>:</p><pre><code·class="text">ok
289 {error,·Error}</code></pre><p>An·error·(preferably·<code·class="inline">enotsup</code>)·is·to·be·expected·if·the·option·is·not·supported289 {error,·Error}</code></pre><p>An·error·(preferably·<code·class="inline">enotsup</code>)·is·to·be·expected·if·the·option·is·not·supported
290 by·the·I/O·server·(like·if·an·<code·class="inline">echo</code>·option·is·sent·in·a·<code·class="inline">setopts</code>·request·to·a290 by·the·I/O·server·(like·if·an·<code·class="inline">echo</code>·option·is·sent·in·a·<code·class="inline">setopts</code>·request·to·a
Offset 299, 17 lines modifiedOffset 299, 17 lines modified
299 </h2>299 </h2>
300 <p>The·<code·class="inline">Request</code>·element·can·in·itself·contain·many·<code·class="inline">Request</code>s·by·using·the300 <p>The·<code·class="inline">Request</code>·element·can·in·itself·contain·many·<code·class="inline">Request</code>s·by·using·the
301 following·format:</p><pre><code·class="text">{requests,·Requests}</code></pre><ul><li><code·class="inline">Requests</code>·is·a·list·of·valid·<code·class="inline">io_request</code>·tuples·for·the·protocol.·They·must301 following·format:</p><pre><code·class="text">{requests,·Requests}</code></pre><ul><li><code·class="inline">Requests</code>·is·a·list·of·valid·<code·class="inline">io_request</code>·tuples·for·the·protocol.·They·must
302 be·executed·in·the·order·that·they·appear·in·the·list.·The·execution·is·to302 be·executed·in·the·order·that·they·appear·in·the·list.·The·execution·is·to
303 continue·until·one·of·the·requests·results·in·an·error·or·the·list·is303 continue·until·one·of·the·requests·results·in·an·error·or·the·list·is
304 consumed.·The·result·of·the·last·request·is·sent·back·to·the·client.</li></ul><p>The·I/O·server·can,·for·a·list·of·requests,·send·any·of·the·following·valid304 consumed.·The·result·of·the·last·request·is·sent·back·to·the·client.</li></ul><p>The·I/O·server·can,·for·a·list·of·requests,·send·any·of·the·following·valid
305 results·in·the·reply,·depending·on·the·requests·in·the·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">305 results·in·the·reply,·depending·on·the·requests·in·the·list:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">ok</span><span·class="w">
306 </span><span·class="p"·data-group-id="3733281034-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="3733281034-1">}</span><span·class="w">306 </span><span·class="p"·data-group-id="2005378631-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Data</span><span·class="p"·data-group-id="2005378631-1">}</span><span·class="w">
307 </span><span·class="p"·data-group-id="3733281034-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Options</span><span·class="p"·data-group-id="3733281034-2">}</span><span·class="w">307 </span><span·class="p"·data-group-id="2005378631-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Options</span><span·class="p"·data-group-id="2005378631-2">}</span><span·class="w">
308 </span><span·class="p"·data-group-id="3733281034-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error</span><span·class="p"·data-group-id="3733281034-3">}</span></code></pre><h2·id="optional-i-o-request"·class="section-heading">308 </span><span·class="p"·data-group-id="2005378631-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error</span><span·class="p"·data-group-id="2005378631-3">}</span></code></pre><h2·id="optional-i-o-request"·class="section-heading">
Max diff block lines reached; 153040/188864 bytes (81.03%) of diff not shown.
28.8 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/json.html
    
Offset 909, 16 lines modifiedOffset 909, 16 lines modified
909 </h2>909 </h2>
910 <ul><li><code·class="inline">error(unexpected_end)</code>·if·<code·class="inline">Binary</code>·contains·incomplete·JSON·value</li><li><code·class="inline">error({invalid_byte,·Byte})</code>·if·<code·class="inline">Binary</code>·contains·unexpected·byte·or·invalid·UTF-8·byte</li><li><code·class="inline">error({invalid_sequence,·Bytes})</code>·if·<code·class="inline">Binary</code>·contains·invalid·UTF-8·escape</li></ul><h2·id="decode/1-example"·class="section-heading">910 <ul><li><code·class="inline">error(unexpected_end)</code>·if·<code·class="inline">Binary</code>·contains·incomplete·JSON·value</li><li><code·class="inline">error({invalid_byte,·Byte})</code>·if·<code·class="inline">Binary</code>·contains·unexpected·byte·or·invalid·UTF-8·byte</li><li><code·class="inline">error({invalid_sequence,·Bytes})</code>·if·<code·class="inline">Binary</code>·contains·invalid·UTF-8·escape</li></ul><h2·id="decode/1-example"·class="section-heading">
911 ··<a·href="#decode/1-example"·class="hover-link">911 ··<a·href="#decode/1-example"·class="hover-link">
912 ····<i·class="ri-link-m"·aria-hidden="true"></i>912 ····<i·class="ri-link-m"·aria-hidden="true"></i>
913 ··</a>913 ··</a>
914 ··<span·class="text">Example</span>914 ··<span·class="text">Example</span>
915 </h2>915 </h2>
916 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="1895857966-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;foo\&quot;:·1}&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1895857966-1">)</span><span·class="p">.</span><span·class="w">916 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="7310153857-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;foo\&quot;:·1}&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7310153857-1">)</span><span·class="p">.</span><span·class="w">
917 </span><span·class="p"·data-group-id="1895857966-2">#{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="1[·...·truncated·by·diffoscope;·len:·9,·SHA:·5beeae3c407885151abd074e66d798f241cd8d3a683883458332a6864b22d798·...·]-2">}</span></code></pre>917 </span><span·class="p"·data-group-id="7310153857-2">#{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo&quot;</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="7[·...·truncated·by·diffoscope;·len:·9,·SHA:·92fff4067f9013238ed5326c98cfa82f9e06cd3168782d5540d22cc954ce508c·...·]-2">}</span></code></pre>
918 ··</section>918 ··</section>
919 </section>919 </section>
920 <section·class="detail"·id="decode/3">920 <section·class="detail"·id="decode/3">
  
921 ··<div·class="detail-header">921 ··<div·class="detail-header">
922 ····<a·href="#decode/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">922 ····<a·href="#decode/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
923 ······<i·class="ri-link-m"·aria-hidden="true"></i>923 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 962, 17 lines modifiedOffset 962, 17 lines modified
962 </h2>962 </h2>
963 <ul><li><code·class="inline">error({invalid_byte,·Byte})</code>·if·<code·class="inline">Binary</code>·contains·unexpected·byte·or·invalid·UTF-8·byte</li><li><code·class="inline">error({invalid_sequence,·Bytes})</code>·if·<code·class="inline">Binary</code>·contains·invalid·UTF-8·escape</li><li><code·class="inline">error(unexpected_end)</code>·if·<code·class="inline">Binary</code>·contains·incomplete·JSON·value</li></ul><h2·id="decode/3-example"·class="section-heading">963 <ul><li><code·class="inline">error({invalid_byte,·Byte})</code>·if·<code·class="inline">Binary</code>·contains·unexpected·byte·or·invalid·UTF-8·byte</li><li><code·class="inline">error({invalid_sequence,·Bytes})</code>·if·<code·class="inline">Binary</code>·contains·invalid·UTF-8·escape</li><li><code·class="inline">error(unexpected_end)</code>·if·<code·class="inline">Binary</code>·contains·incomplete·JSON·value</li></ul><h2·id="decode/3-example"·class="section-heading">
964 ··<a·href="#decode/3-example"·class="hover-link">964 ··<a·href="#decode/3-example"·class="hover-link">
965 ····<i·class="ri-link-m"·aria-hidden="true"></i>965 ····<i·class="ri-link-m"·aria-hidden="true"></i>
966 ··</a>966 ··</a>
967 ··<span·class="text">Example</span>967 ··<span·class="text">Example</span>
968 </h2>968 </h2>
969 <p>Decoding·object·keys·as·atoms:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Push</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4710693601-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="4710693601-1">)</span><span[·...·truncated·by·diffoscope;·len:·624,·SHA:·f74470fb33ef2001740eb4ed98d66ee47fb6fa09d8da0de2e80595e49678408e·...·]-2">]</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="gp·unselectable">969 <p>Decoding·object·keys·as·atoms:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Push</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2411621000-1">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="2411621000-1">)</span><span[·...·truncated·by·diffoscope;·len:·624,·SHA:·620a860f0d6d0ca26b16bacaec8cbf38b589b1f6e9e50bccac7a960cb6cc587f·...·]-2">]</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="gp·unselectable">
970 &gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="4710693601-5">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;foo\&quot;:·1}&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·293,·SHA:·f3d44278dad03db70556f8beffc9d3a26bb085bc5593a117d949dd2d33ba1b35·...·]-5">)</span><span·class="p">.</span><span·class="w">970 &gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode</span><span·class="p"·data-group-id="2411621000-5">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;foo\&quot;:·1}&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·293,·SHA:·9a7ce64a2e40e288e4fb34b4583e59fa646b12f4870a48bb35e190c023d921e5·...·]-5">)</span><span·class="p">.</span><span·class="w">
971 </span><span·class="p"·data-group-id="4710693601-7">{</span><span·class="p"·data-group-id="4710693601-8">#{</span><span·class="ss">foo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="4710693601-8">}</span[·...·truncated·by·diffoscope;·len:·178,·SHA:·9e9e3d372faad4e0d7b8b02c5b1fe35a35500eae30d21a6eb8a1447d7395d8e4·...·]-7">}</span></code></pre>971 </span><span·class="p"·data-group-id="2411621000-7">{</span><span·class="p"·data-group-id="2411621000-8">#{</span><span·class="ss">foo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="2411621000-8">}</span[·...·truncated·by·diffoscope;·len:·178,·SHA:·920ebe24fc6b9d7c70128afa458c2509959232a35ab6cfe50da2c0571402277f·...·]-7">}</span></code></pre>
972 ··</section>972 ··</section>
973 </section>973 </section>
974 <section·class="detail"·id="decode_continue/2">974 <section·class="detail"·id="decode_continue/2">
  
975 ··<div·class="detail-header">975 ··<div·class="detail-header">
976 ····<a·href="#decode_continue/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">976 ····<a·href="#decode_continue/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
977 ······<i·class="ri-link-m"·aria-hidden="true"></i>977 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 997, 19 lines modifiedOffset 997, 19 lines modified
997 ··········<pre·translate="no"><span·class="attribute">-spec</span>·decode_continue(<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()·|·end_of_input,·Opaque·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->997 ··········<pre·translate="no"><span·class="attribute">-spec</span>·decode_continue(<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()·|·end_of_input,·Opaque·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>())·->
998 ·························{Result·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:dynamic/0">dynamic</a>(),·Acc·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:dynamic/0">dynamic</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()}·|998 ·························{Result·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:dynamic/0">dynamic</a>(),·Acc·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:dynamic/0">dynamic</a>(),·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()}·|
999 ·························{continue,·<a·href="#t:continuation_state/0">continuation_state</a>()}.</pre>999 ·························{continue,·<a·href="#t:continuation_state/0">continuation_state</a>()}.</pre>
  
1000 ······</div>1000 ······</div>
  
1001 <p>Continue·parsing·a·stream·of·bytes·of·a·JSON·value.</p><p>Similar·to·<a·href="#decode_start/3"><code·class="inline">decode_start/3</code></a>,·if·the·function·returns·<code·class="inline">{continue,·State}</code>·and1001 <p>Continue·parsing·a·stream·of·bytes·of·a·JSON·value.</p><p>Similar·to·<a·href="#decode_start/3"><code·class="inline">decode_start/3</code></a>,·if·the·function·returns·<code·class="inline">{continue,·State}</code>·and
1002 there·is·no·more·data,·use·<code·class="inline">end_of_input</code>·instead·of·a·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="5075090152-1">{</span><span·class="ss">continue</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5075090152-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·526,·SHA:·aa16c413383a8600ef50a3cd520b131f03fb4d58441cd1a60a89019deeaf0647·...·]-2">)</span><span·class="p">.</span><span·class="gp·unselectable">1002 there·is·no·more·data,·use·<code·class="inline">end_of_input</code>·instead·of·a·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="p"·data-group-id="0331118235-1">{</span><span·class="ss">continue</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="0331118235-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·526,·SHA:·fb314c8d61b462c658f96c59d04198cfbba419adf3a61d433e1f9aafe02ce926·...·]-2">)</span><span·class="p">.</span><span·class="gp·unselectable">
1003 &gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode_continue</span><span·class="p"·data-group-id="5075090152-4">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;1}&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5075090152-4">)</span><span·class="p">.</span><span·class="w">1003 &gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode_continue</span><span·class="p"·data-group-id="0331118235-4">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;1}&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="0331118235-4">)</span><span·class="p">.</span><span·class="w">
1004 </span><span·class="p"·data-group-id="5075090152-5">{</span><span·class="p"·data-group-id="5075090152-6">#{</span><span·class="ss">foo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="5075090152-6">}</span[·...·truncated·by·diffoscope;·len:·1090,·SHA:·bbf59952ec07b46d4282fa21aaec11f1962ff09c1fdeed44a37c3ba532419a6c·...·]-2">)</span><span·class="p">.</span><span·class="gp·unselectable">1004 </span><span·class="p"·data-group-id="0331118235-5">{</span><span·class="p"·data-group-id="0331118235-6">#{</span><span·class="ss">foo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id="0331118235-6">}</span[·...·truncated·by·diffoscope;·len:·1090,·SHA:·680db8f69196f8c082695e6b2fe2e419b3b7ce8d4a0647bc1a1ed34beecad55d·...·]-2">)</span><span·class="p">.</span><span·class="gp·unselectable">
1005 &gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode_continue</span><span·class="p"·data-group-id="5926561027-4">(</span><span·class="ss">end_of_input</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="5926561027-4">)</span><span·class="p">.</span><span·class="w">1005 &gt;·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">decode_continue</span><span·class="p"·data-group-id="3637215181-4">(</span><span·class="ss">end_of_input</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="3637215181-4">)</span><span·class="p">.</span><span·class="w">
1006 </span><span·class="p"·data-group-id="5926561027-5">{</span><span·class="mi">123</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5926561027-5">}</span></code></pre>1006 </span><span·class="p"·data-group-id="3637215181-5">{</span><span·class="mi">123</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3637215181-5">}</span></code></pre>
1007 ··</section>1007 ··</section>
1008 </section>1008 </section>
1009 <section·class="detail"·id="decode_start/3">1009 <section·class="detail"·id="decode_start/3">
  
1010 ··<div·class="detail-header">1010 ··<div·class="detail-header">
1011 ····<a·href="#decode_start/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1011 ····<a·href="#decode_start/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1012 ······<i·class="ri-link-m"·aria-hidden="true"></i>1012 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1071, 15 lines modifiedOffset 1071, 15 lines modified
  
1071 <p>Generates·JSON·corresponding·to·<code·class="inline">Term</code>.</p><p>Supports·basic·data·mapping:</p><table><thead><tr><th·style="text-align:·left;"><strong>Erlang</strong></th><th·style="text-align:·left;"><strong>JSON</strong></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">integer()·|·float()</code></td><td·style="text-align:·left;">Number</td></tr><tr><td·style="text-align:·left;"><code·class="inline">true·|·false</code></td><td·style="text-align:·left;">Boolean</td></tr><tr><td·style="text-align:·left;"><code·class="inline">null</code></td><td·style="text-align:·left;">Null</td></tr><tr><td·style="text-align:·left;"><code·class="inline">binary()</code></td><td·style="text-align:·left;">String</td></tr><tr><td·style="text-align:·left;"><code·class="inline">atom()</code></td><td·style="text-align:·left;">String</td></tr><tr><td·style="text-align:·left;"><code·class="inline">list()</code></td><td·style="text-align:·left;">Array</td></tr><tr><td·style="text-align:·left;"><code·class="inline">#{binary()·=&gt;·_}</code></td><td·style="text-align:·left;">Object</td></tr><tr><td·style="text-align:·left;"><code·class="inline">#{atom()·=&gt;·_}</code></td><td·style="text-align:·left;">Object</td></tr><tr><td·style="text-align:·left;"><code·class="inline">#{integer()·=&gt;·_}</code></td><td·style="text-align:·left;">Object</td></tr></tbody></table><p>This·is·equivalent·to·<code·class="inline">encode(Term,·fun·json:encode_value/2)</code>.</p><h2·id="encode/1-examples"·class="section-heading">1071 <p>Generates·JSON·corresponding·to·<code·class="inline">Term</code>.</p><p>Supports·basic·data·mapping:</p><table><thead><tr><th·style="text-align:·left;"><strong>Erlang</strong></th><th·style="text-align:·left;"><strong>JSON</strong></th></tr></thead><tbody><tr><td·style="text-align:·left;"><code·class="inline">integer()·|·float()</code></td><td·style="text-align:·left;">Number</td></tr><tr><td·style="text-align:·left;"><code·class="inline">true·|·false</code></td><td·style="text-align:·left;">Boolean</td></tr><tr><td·style="text-align:·left;"><code·class="inline">null</code></td><td·style="text-align:·left;">Null</td></tr><tr><td·style="text-align:·left;"><code·class="inline">binary()</code></td><td·style="text-align:·left;">String</td></tr><tr><td·style="text-align:·left;"><code·class="inline">atom()</code></td><td·style="text-align:·left;">String</td></tr><tr><td·style="text-align:·left;"><code·class="inline">list()</code></td><td·style="text-align:·left;">Array</td></tr><tr><td·style="text-align:·left;"><code·class="inline">#{binary()·=&gt;·_}</code></td><td·style="text-align:·left;">Object</td></tr><tr><td·style="text-align:·left;"><code·class="inline">#{atom()·=&gt;·_}</code></td><td·style="text-align:·left;">Object</td></tr><tr><td·style="text-align:·left;"><code·class="inline">#{integer()·=&gt;·_}</code></td><td·style="text-align:·left;">Object</td></tr></tbody></table><p>This·is·equivalent·to·<code·class="inline">encode(Term,·fun·json:encode_value/2)</code>.</p><h2·id="encode/1-examples"·class="section-heading">
1072 ··<a·href="#encode/1-examples"·class="hover-link">1072 ··<a·href="#encode/1-examples"·class="hover-link">
1073 ····<i·class="ri-link-m"·aria-hidden="true"></i>1073 ····<i·class="ri-link-m"·aria-hidden="true"></i>
1074 ··</a>1074 ··</a>
1075 ··<span·class="text">Examples</span>1075 ··<span·class="text">Examples</span>
1076 </h2>1076 </h2>
1077 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">iolist_to_binary</span><span·class="p"·data-group-id="2313440667-1">(</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="2313440667-2">(</span><span·class="p"·data-group-id="2313440667-3">#{</span><span·class="ss">foo</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·305,·SHA:·f54ff94f1e072cfed7ba385fa0be94d387fb072d119b40f00e282ce173c1c773·...·]-1">)</span><span·class="p">.</span><span·class="w">1077 <pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">iolist_to_binary</span><span·class="p"·data-group-id="8694799953-1">(</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="8694799953-2">(</span><span·class="p"·data-group-id="8694799953-3">#{</span><span·class="ss">foo</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·305,·SHA:·eda6f481655d00376b95075804765e52dae23fb26b2176877b316ab2a9214a50·...·]-1">)</span><span·class="p">.</span><span·class="w">
1078 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;foo\&quot;:\&quot;bar\&quot;}&quot;</span><span·class="p">&gt;&gt;</span></code></pre>1078 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;foo\&quot;:\&quot;bar\&quot;}&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
1079 ··</section>1079 ··</section>
1080 </section>1080 </section>
1081 <section·class="detail"·id="encode/2">1081 <section·class="detail"·id="encode/2">
  
1082 ··<div·class="detail-header">1082 ··<div·class="detail-header">
1083 ····<a·href="#encode/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1083 ····<a·href="#encode/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1113, 18 lines modifiedOffset 1113, 18 lines modified
1113 to·help·in·constructing·such·callbacks.</p><h2·id="encode/2-examples"·class="section-heading">1113 to·help·in·constructing·such·callbacks.</p><h2·id="encode/2-examples"·class="section-heading">
1114 ··<a·href="#encode/2-examples"·class="hover-link">1114 ··<a·href="#encode/2-examples"·class="hover-link">
1115 ····<i·class="ri-link-m"·aria-hidden="true"></i>1115 ····<i·class="ri-link-m"·aria-hidden="true"></i>
1116 ··</a>1116 ··</a>
1117 ··<span·class="text">Examples</span>1117 ··<span·class="text">Examples</span>
1118 </h2>1118 </h2>
1119 <p>An·encoder·that·uses·a·heuristic·to·differentiate·object-like1119 <p>An·encoder·that·uses·a·heuristic·to·differentiate·object-like
1120 lists·of·key-value·pairs·from·plain·lists:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">encoder</span><span·class="p"·data-group-id="1441864018-1">(</span><span·class="p"·data-group-id="1441864018-2">[</span><span·class="p"·data-group-id="1441864018-3">{</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="1441864018-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="1441864018-2">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="1441864018-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">encode_key_value_list</span><span·class="p"·data-group-id="1441864018-4">(</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="1441864018-4">)</span><span·class="p">;</span><span·class="gp·unselectable"> 
1121 &gt;·</span><span·class="nf">encoder</span><span·class="p"·data-group-id="1441864018-5">(</span><span·class="n">Other</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="1441864018-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">encode_value</span><span·class="p"·data-group-id="1441864018-6">(</span><span·class="n">Other</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="1441864018-6">)</span><span·class="p">.</span><span·class="gp·unselectable"> 
1122 &gt;·</span><span·class="nf">custom_encode</span><span·class="p"·data-group-id="1441864018-7">(</span><span·class="n">Value</span><span·class="p"·data-group-id="1441864018-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·892,·SHA:·cf564c928a195cd4d25bae224bc0d0e8b2db9fe007b6cbf3bdaa835fc0b239b0·...·]</span><span·class="gp·unselectable">1120 lists·of·key-value·pairs·from·plain·lists:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nf">encoder</span><span·class="p"·data-group-id="0318394046-1">(</span><span·class="p"·data-group-id="03183[·...·truncated·by·diffoscope;·len:·999,·SHA:·c162d5362177502255874167040e378a666f51fb4f9e5803f7c1007b8b867de6·...·]</span><span·class="gp·unselectable">
 1121 &gt;·</span><span·class="nf">encoder</span><span·class="p"·data-group-id="0318394046-5">(</span><span·class="n">Other</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="0318394046-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">encode_value</span><span·class="p"·data-group-id="0318394046-6">(</span><span·class="n">Other</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="0318394046-6">)</span><span·class="p">.</span><span·class="gp·unselectable">
 1122 &gt;·</span><span·class="nf">custom_encode</span><span·class="p"·data-group-id="0318394046-7">(</span><span·class="n">Value</span><span·class="p"·data-group-id="0318394046-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">json</span><span·class="p">:</span><span·class="nf">encode</span><span·class="p"·data-group-id="0318394046-8">(</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="0318394046-9">(</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="0318394046-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">encoder</span><span·class="p"·data-group-id="0318394046-10">(</span><span·class="n">Value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Encode</span><span·class="p"·data-group-id="0318394046-10">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p"·data-group-id="0318394046-8">)</span><span·class="p">.</span><span·class="gp·unselectable">
1123 &gt;·</span><span·class="nf">iolist_to_binary</span><span·class="p"·data-group-id="1441864018-11">(</span><span·class="nf">custom_encode</span><span·class="p"·data-group-id="1441864018-12">(</span><span·class="p"·data-group-id="1441864018-13">[</span><span·class="p"·data-group-id="1441864018-14">{</span><span·class="ss">a</span><span·cla[·...·truncated·by·diffoscope;·len:·604,·SHA:·66f3d63010b8cab12fde48fe52d612b1a4cf35517731d1ea3cf374a87ee64e17·...·]-11">)</span><span·class="p">.</span><span·class="w">1123 &gt;·</span><span·class="nf">iolist_to_binary</span><span·class="p"·data-group-id="0318394046-11">(</span><span·class="nf">custom_encode</span><span·class="p"·data-group-id="0318394046-12">(</span><span·class="p"·data-group-id="0318394046-13">[</span><span·class="p"·data-group-id="0318394046-14">{</span><span·class="ss">a</span><span·cla[·...·truncated·by·diffoscope;·len:·604,·SHA:·f0d5a34531746e2d8e092e8adf6a888f35d63e8e000be23fcd3988e468f2377b·...·]-11">)</span><span·class="p">.</span><span·class="w">
1124 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;a\&quot;:[],\&quot;b\&quot;:1}&quot;</span><span·class="p">&gt;&gt;</span></code></pre>1124 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;{\&quot;a\&quot;:[],\&quot;b\&quot;:1}&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
1125 ··</section>1125 ··</section>
1126 </section>1126 </section>
1127 <section·class="detail"·id="encode_atom/2">1127 <section·class="detail"·id="encode_atom/2">
  
1128 ··<div·class="detail-header">1128 ··<div·class="detail-header">
1129 ····<a·href="#encode_atom/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1129 ····<a·href="#encode_atom/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
164 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/lists.html
    
Offset 1163, 16 lines modifiedOffset 1163, 16 lines modified
  
1163 ······<div·class="specs">1163 ······<div·class="specs">
  
1164 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append(ListOfLists)·->·List1·when·ListOfLists·::·[List],·List·::·[T],·List1·::·[T],·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1164 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append(ListOfLists)·->·List1·when·ListOfLists·::·[List],·List·::·[T],·List1·::·[T],·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1165 ······</div>1165 ······</div>
  
1166 <p>Returns·a·list·in·which·all·the·sublists·of·<code·class="inline">ListOfLists</code>·have·been·appended.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="1759752293-1">(</span><span·class="p"·data-group-id="1759752293-2">[</span><span·class="p"·data-group-id="1759752293-3">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·767,·SHA:·63bdc52d705f44478c98a97c20eae096dd4b396a2703ac4a73d38edb4ab5f663·...·]-1">)</span><span·class="p">.</span><span·class="w">1166 <p>Returns·a·list·in·which·all·the·sublists·of·<code·class="inline">ListOfLists</code>·have·been·appended.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="4200678677-1">(</span><span·class="p"·data-group-id="4200678677-2">[</span><span·class="p"·data-group-id="4200678677-3">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·767,·SHA:·c96639e3ff0aaf19cdd4242e8ea08f080b9a6ac4a5b1914544e35e2ae149a0fa·...·]-1">)</span><span·class="p">.</span><span·class="w">
1167 </span><span·class="p"·data-group-id="1759752293-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="[·...·truncated·by·diffoscope;·len:·175,·SHA:·80d66282897bba92bbd57465a4a21c34350348af66b9ba89612ed4432bed8c50·...·]-6">]</span></code></pre>1167 </span><span·class="p"·data-group-id="4200678677-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="[·...·truncated·by·diffoscope;·len:·175,·SHA:·a63596c3f568ea501b265f7847c9fa1e6d89f2ea06bd550819860249b8dfea73·...·]-6">]</span></code></pre>
1168 ··</section>1168 ··</section>
1169 </section>1169 </section>
1170 <section·class="detail"·id="append/2">1170 <section·class="detail"·id="append/2">
  
1171 ··<div·class="detail-header">1171 ··<div·class="detail-header">
1172 ····<a·href="#append/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1172 ····<a·href="#append/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1173 ······<i·class="ri-link-m"·aria-hidden="true"></i>1173 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1193, 15 lines modifiedOffset 1193, 15 lines modified
1193 ······<div·class="specs">1193 ······<div·class="specs">
  
1194 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append(List1,·List2)·->·List3·when·List1·::·[T],·List2·::·[T],·List3·::·[T],·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1194 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append(List1,·List2)·->·List3·when·List1·::·[T],·List2·::·[T],·List3·::·[T],·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1195 ······</div>1195 ······</div>
  
1196 <p>Returns·a·new·list·<code·class="inline">List3</code>,·which·is·made·from·the·elements·of·<code·class="inline">List1</code>·followed1196 <p>Returns·a·new·list·<code·class="inline">List3</code>,·which·is·made·from·the·elements·of·<code·class="inline">List1</code>·followed
1197 by·the·elements·of·<code·class="inline">List2</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="5598806826-1">(</span><span·class="s">&quot;abc&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;def&quot;</span><span·class="p"·data-group-id="5598806826-1">)</span><span·class="p">.</span><span·class="w">1197 by·the·elements·of·<code·class="inline">List2</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="2155814306-1">(</span><span·class="s">&quot;abc&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;def&quot;</span><span·class="p"·data-group-id="2155814306-1">)</span><span·class="p">.</span><span·class="w">
1198 </span><span·class="s">&quot;abcdef&quot;</span></code></pre><p><code·class="inline">lists:append(A,·B)</code>·is·equivalent·to·<code·class="inline">A·++·B</code>.</p>1198 </span><span·class="s">&quot;abcdef&quot;</span></code></pre><p><code·class="inline">lists:append(A,·B)</code>·is·equivalent·to·<code·class="inline">A·++·B</code>.</p>
1199 ··</section>1199 ··</section>
1200 </section>1200 </section>
1201 <section·class="detail"·id="concat/1">1201 <section·class="detail"·id="concat/1">
  
1202 ··<div·class="detail-header">1202 ··<div·class="detail-header">
1203 ····<a·href="#concat/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1203 ····<a·href="#concat/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1224, 15 lines modifiedOffset 1224, 15 lines modified
  
1224 ··········<pre·translate="no"><span·class="attribute">-spec</span>·concat(Things)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()1224 ··········<pre·translate="no"><span·class="attribute">-spec</span>·concat(Things)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>()
1225 ················when·Things·::·[Thing],·Thing·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:float/0">float</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>().</pre>1225 ················when·Things·::·[Thing],·Thing·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:atom/0">atom</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:float/0">float</a>()·|·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:string/0">string</a>().</pre>
  
1226 ······</div>1226 ······</div>
  
1227 <p>Concatenates·the·text·representation·of·the·elements·of·<code·class="inline">Things</code>.·The·elements1227 <p>Concatenates·the·text·representation·of·the·elements·of·<code·class="inline">Things</code>.·The·elements
1228 of·<code·class="inline">Things</code>·can·be·atoms,·integers,·floats,·or·strings.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">concat</span><span·class="p"·data-group-id="5209453701-1">(</span><span·class="p"·data-group-id="5209453701-2">[</span><span·class="ss">doc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;/&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file</[·...·truncated·by·diffoscope;·len:·255,·SHA:·eca550c3c71294001f9019fcfa50e2efaeec6fd2ec8f7702c47858bc9efb2347·...·]-1">)</span><span·class="p">.</span><span·class="w">1228 of·<code·class="inline">Things</code>·can·be·atoms,·integers,·floats,·or·strings.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">concat</span><span·class="p"·data-group-id="1122247305-1">(</span><span·class="p"·data-group-id="1122247305-2">[</span><span·class="ss">doc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;/&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file</[·...·truncated·by·diffoscope;·len:·255,·SHA:·608b750b0be6f2908943d2c5b4a61eba1690b3a40aac75f836f321735a93b235·...·]-1">)</span><span·class="p">.</span><span·class="w">
1229 </span><span·class="s">&quot;doc/file.3&quot;</span></code></pre>1229 </span><span·class="s">&quot;doc/file.3&quot;</span></code></pre>
1230 ··</section>1230 ··</section>
1231 </section>1231 </section>
1232 <section·class="detail"·id="delete/2">1232 <section·class="detail"·id="delete/2">
  
1233 ··<div·class="detail-header">1233 ··<div·class="detail-header">
1234 ····<a·href="#delete/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1234 ····<a·href="#delete/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1343, 16 lines modifiedOffset 1343, 16 lines modified
  
1343 ······<div·class="specs">1343 ······<div·class="specs">
  
1344 ··········<pre·translate="no"><span·class="attribute">-spec</span>·duplicate(N,·Elem)·->·List·when·N·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·Elem·::·T,·List·::·[T],·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1344 ··········<pre·translate="no"><span·class="attribute">-spec</span>·duplicate(N,·Elem)·->·List·when·N·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>(),·Elem·::·T,·List·::·[T],·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1345 ······</div>1345 ······</div>
  
1346 <p>Returns·a·list·containing·<code·class="inline">N</code>·copies·of·term·<code·class="inline">Elem</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">duplicate</span><span·class="p"·data-group-id="5969305269-1">(</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">xx</span><span·class="p"·data-group-id="5969305269-1">)</span><span·class="p">.</span><span·class="w">1346 <p>Returns·a·list·containing·<code·class="inline">N</code>·copies·of·term·<code·class="inline">Elem</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">duplicate</span><span·class="p"·data-group-id="7173253779-1">(</span><span·class="mi">5</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">xx</span><span·class="p"·data-group-id="7173253779-1">)</span><span·class="p">.</span><span·class="w">
1347 </span><span·class="p"·data-group-id="5969305269-2">[</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·cl[·...·truncated·by·diffoscope;·len:·32,·SHA:·482bbf4f3027ecdd680cd84ffa2180876d1346580722681cd3560355b9ea3f5a·...·]9-2">]</span></code></pre>1347 </span><span·class="p"·data-group-id="7173253779-2">[</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·class="p">,</span><span·class="ss">xx</span><span·cl[·...·truncated·by·diffoscope;·len:·32,·SHA:·eee8a52a38befc98f839aa9c70a088bf2c0fd7cf6ea8850c17f2ed27235b7ec5·...·]9-2">]</span></code></pre>
1348 ··</section>1348 ··</section>
1349 </section>1349 </section>
1350 <section·class="detail"·id="enumerate/1">1350 <section·class="detail"·id="enumerate/1">
  
1351 ··<div·class="detail-header">1351 ··<div·class="detail-header">
1352 ····<a·href="#enumerate/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1352 ····<a·href="#enumerate/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1353 ······<i·class="ri-link-m"·aria-hidden="true"></i>1353 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1445, 20 lines modifiedOffset 1445, 20 lines modified
1445 ·······················T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1445 ·······················T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1446 ······</div>1446 ······</div>
  
1447 <p>Returns·<code·class="inline">List1</code>·with·each·element·<code·class="inline">H</code>·replaced·by·a·tuple·of·form·<code·class="inline">{I,·H}</code>·where1447 <p>Returns·<code·class="inline">List1</code>·with·each·element·<code·class="inline">H</code>·replaced·by·a·tuple·of·form·<code·class="inline">{I,·H}</code>·where
1448 <code·class="inline">I</code>·is·the·position·of·<code·class="inline">H</code>·in·<code·class="inline">List1</code>.·The·enumeration·starts·with·<code·class="inline">Index</code>·and1448 <code·class="inline">I</code>·is·the·position·of·<code·class="inline">H</code>·in·<code·class="inline">List1</code>.·The·enumeration·starts·with·<code·class="inline">Index</code>·and
1449 increases·by·<code·class="inline">Step</code>·in·each·step.</p><p>That·is,·<a·href="#enumerate/3"><code·class="inline">enumerate/3</code></a>·behaves·as·if·it·had·been·defined·as1449 increases·by·<code·class="inline">Step</code>·in·each·step.</p><p>That·is,·<a·href="#enumerate/3"><code·class="inline">enumerate/3</code></a>·behaves·as·if·it·had·been·defined·as
1450 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">enumerate</span><span·class="p"·data-group-id="6740920113-1">(</span><span·class="n">I</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="6740920113-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1450 follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">enumerate</span><span·class="p"·data-group-id="3368969311-1">(</span><span·class="n">I</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List</span><span·class="p"·data-group-id="3368969311-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1451 ··</span><span·class="p"·data-group-id="6740920113-2">{</span><span·class="n">List1</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="p"·data-group-id="6740920113-2">}</span><span·class="w">·</span><span·class="o">=</span><span·cla[·...·truncated·by·diffoscope;·len:·1130,·SHA:·a94a422123e16d24b6f97889d685195ff57efb28abfd5c391eb65cfe8994f9a7·...·]-3">)</span><span·class="p">,</span><span·class="w">1451 ··</span><span·class="p"·data-group-id="3368969311-2">{</span><span·class="n">List1</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="p"·data-group-id="3368969311-2">}</span><span·class="w">·</span><span·class="o">=</span><span·cla[·...·truncated·by·diffoscope;·len:·1130,·SHA:·525bab745a793f08daeecebec5e2446a5c0f4bb4c447a8c5148357dfc32737d0·...·]-3">)</span><span·class="p">,</span><span·class="w">
1452 ··</span><span·class="n">List1</span><span·class="p">.</span></code></pre><p>The·default·values·for·<code·class="inline">Index</code>·and·<code·class="inline">Step</code>·are·both·<code·class="inline">1</code>.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">enumerate</span><span·class="p"·data-group-id="1574577909-1">(</span><span·class="p"·data-group-id="1574577909-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1574577909-2">]</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·0f2c05de5ed02794dd7165d194244f1109435365cb05cd4a841546c0b8d39a9a·...·]9-1">)</span><span·class="p">.</span><span·class="w">1452 ··</span><span·class="n">List1</span><span·class="p">.</span></code></pre><p>The·default·values·for·<code·class="inline">Index</code>·and·<code·class="inline">Step</code>·are·both·<code·class="inline">1</code>.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">enumerate</span><span·class="p"·data-group-id="1779065949-1">(</span><span·class="p"·data-group-id="1779065949-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1779065949-2">]</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·3f1a72157858186f537a1eecb3b36f37d70bbf0192e33d7d01ed5fecda31f954·...·]9-1">)</span><span·class="p">.</span><span·class="w">
1453 </span><span·class="p"·data-group-id="1574577909-3">[</span><span·class="p"·data-group-id="1574577909-4">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1574577909-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="1574577909-5">{</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="1574577909-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="1574577909-6">{</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1574577909-6">}</span><span·class="p"·data-group-id="1574577909-3">]</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">enumerate</span><span·class="p"·data-group-id="3374242664-1">(</span><span·class="mi">10</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3374242664-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="3374242664-2">]</span><span·class="p"·data-group-id="3374242664-1">)</span><span·class="p">.</span><span·class="w"> 
1454 </span><span·class="p"·data-group-id="3374242664-3">[</span><span·class="p"·data-group-id="3374242664-4">{</span><span·class="mi">10</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="3374242664-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="3374242664-5">{</span><span·class="mi">11</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="3374242664-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="3374242664-6">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="3374242664-6">}</span><span·class="p"·data-group-id="3374242664-3">]</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">enumerate</span><span·class="p"·data-group-id="9979384233-1">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9979384233-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="9979384233-2">]</span><span·class="p"·data-group-id="9979384233-1">)</span><span·class="p">.</span><span·class="w"> 
1455 </span><span·class="p"·data-group-id="9979384233-3">[</span><span·class="p"·data-group-id="9979384233-4">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="9979384233-4">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·467,·SHA:·695997d1c4be309266b31ee0787969f9ced1825b05c43dc1091dad016dff5192·...·]>1453 </span><span·class="p"·data-group-id="1779065949-3">[</span><span·class="p"·data-group-id="1779065949-4">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1779065949-4">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·1044,·SHA:·3fafa0ec094f6aba58d542a4cae22fc564943d78a0b36ccbec5364a7c4dd9c57·...·]>
 1454 </span><span·class="p"·data-group-id="2261795550-3">[</span><span·class="p"·data-group-id="2261795550-4">{</span><span·class="mi">10</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="2261795550-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="2261795550-5">{</span><span·class="mi">11</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="2261795550-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="2261795550-6">{</span><span·class="mi">12</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="2261795550-6">}</span><span·class="p"·data-group-id="2261795550-3">]</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">enumerate</span><span·class="p"·data-group-id="1981819691-1">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1981819691-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1981819691-2">]</span><span·class="p"·data-group-id="1981819691-1">)</span><span·class="p">.</span><span·class="w">
 1455 </span><span·class="p"·data-group-id="1981819691-3">[</span><span·class="p"·data-group-id="1981819691-4">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1981819691-4">}</span><span·class="p">,</span><span·class="p"·data-group-id="1981819691-5">{</span><span·class="o">-</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="1981819691-5">}</span><span·class="p">,</span><span·class="p"·data-group-id="1981819691-6">{</span><span·class="o">-</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">c</span><span·class="p"·data-group-id="1981819691-6">}</span><span·class="p"·data-group-id="1981819691-3">]</span></code></pre>
1456 ··</section>1456 ··</section>
1457 </section>1457 </section>
1458 <section·class="detail"·id="filter/2">1458 <section·class="detail"·id="filter/2">
  
1459 ··<div·class="detail-header">1459 ··<div·class="detail-header">
1460 ····<a·href="#filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1460 ····<a·href="#filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1461 ······<i·class="ri-link-m"·aria-hidden="true"></i>1461 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1519, 23 lines modifiedOffset 1519, 23 lines modified
1519 ·······················Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1519 ·······················Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1520 ······</div>1520 ······</div>
  
1521 <p>Calls·<code·class="inline">Fun(Elem)</code>·on·successive·elements·<code·class="inline">Elem</code>·of·<code·class="inline">List1</code>·in·order·to·update·or1521 <p>Calls·<code·class="inline">Fun(Elem)</code>·on·successive·elements·<code·class="inline">Elem</code>·of·<code·class="inline">List1</code>·in·order·to·update·or
1522 remove·elements·from·<code·class="inline">List1</code>.</p><p><code·class="inline">Fun/1</code>·must·return·either·a·Boolean·or·a·tuple·<code·class="inline">{true,·Value}</code>.·The·function1522 remove·elements·from·<code·class="inline">List1</code>.</p><p><code·class="inline">Fun/1</code>·must·return·either·a·Boolean·or·a·tuple·<code·class="inline">{true,·Value}</code>.·The·function
1523 returns·the·list·of·elements·for·which·<code·class="inline">Fun</code>·returns·a·new·value,·where·a·value1523 returns·the·list·of·elements·for·which·<code·class="inline">Fun</code>·returns·a·new·value,·where·a·value
1524 of·<code·class="inline">true</code>·is·synonymous·with·<code·class="inline">{true,·Elem}</code>.</p><p>That·is,·<code·class="inline">filtermap</code>·behaves·as·if·it·had·been·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">filtermap</span><span·class="p"·data-group-id="3969800157-1">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="3969800157-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1524 of·<code·class="inline">true</code>·is·synonymous·with·<code·class="inline">{true,·Elem}</code>.</p><p>That·is,·<code·class="inline">filtermap</code>·behaves·as·if·it·had·been·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">filtermap</span><span·class="p"·data-group-id="0665043314-1">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="0665043314-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1525 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="3969800157-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="3969800157-3">(</span><span·class="n">Elem</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="3969800157-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1525 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="0665043314-2">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0665043314-3">(</span><span·class="n">Elem</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p"·data-group-id="0665043314-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1526 ·······················</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p"·data-group-id="3969800157-4">(</span><span·class="n">Elem</span><span·class="p"·data-group-id="3969800157-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1526 ·······················</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Fun</span><span·class="p"·data-group-id="0665043314-4">(</span><span·class="n">Elem</span><span·class="p"·data-group-id="0665043314-4">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1527 ···························</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">;</span><span·class="w">1527 ···························</span><span·class="ss">false</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">;</span><span·class="w">
1528 ···························</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3969800157-5">[</span><span·class="n">Elem</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="3969800157-5">]</span><span·class="p">;</span><span·class="w">1528 ···························</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="0665043314-5">[</span><span·class="n">Elem</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="0665043314-5">]</span><span·class="p">;</span><span·class="w">
1529 ···························</span><span·class="p"·data-group-id="3969800157-6">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="3969800157-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·147,·SHA:·d3b7f9f7ef95a43c9e7e7762b2a2654a48562a7066373553927d9cfdc2ef2c1b·...·]-7">]</span><span·class="w">1529 ···························</span><span·class="p"·data-group-id="0665043314-6">{</span><span·class="ss">true</span><span·class="p">,</span><span·class="n">Value</span><span·class="p"·data-group-id="0665043314-6">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·147,·SHA:·cfc1b7a11902cde45a9f09176f51f7dd74d74ceae14f83b8f4a87a61c1dfa176·...·]-7">]</span><span·class="w">
1530 ·······················</span><span·class="k">end</span><span·class="w">1530 ·······················</span><span·class="k">end</span><span·class="w">
1531 ················</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3969800157-8">[</span><span·class="p"·data-group-id="3969800157-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="3969800157-2">)</span><span·class="p">.</span></code></pre><p><em>Example:[·...·truncated·by·diffoscope;·len:·1819,·SHA:·11b3c984c97036a358dc9b1c71a217bb654442b7d372ac582d388519a3468cf8·...·]-1">)</span><span·class="p">.</span><span·class="w">1531 ················</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0665043314-8">[</span><span·class="p"·data-group-id="0665043314-8">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="0665043314-2">)</span><span·class="p">.</span></code></pre><p><em>Example:[·...·truncated·by·diffoscope;·len:·1819,·SHA:·fd35775a7a220d145a71a5c63ad73e82845a4cf9759341004c9228461a9cc95c·...·]-1">)</span><span·class="p">.</span><span·class="w">
1532 </span><span·class="p"·data-group-id="7545412091-5">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="7545412091-5">]</span></code></pre>1532 </span><span·class="p"·data-group-id="2937956922-5">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2937956922-5">]</span></code></pre>
1533 ··</section>1533 ··</section>
1534 </section>1534 </section>
1535 <section·class="detail"·id="flatlength/1">1535 <section·class="detail"·id="flatlength/1">
  
1536 ··<div·class="detail-header">1536 ··<div·class="detail-header">
1537 ····<a·href="#flatlength/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1537 ····<a·href="#flatlength/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1538 ······<i·class="ri-link-m"·aria-hidden="true"></i>1538 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1586, 17 lines modifiedOffset 1586, 17 lines modified
1586 ··········<pre·translate="no"><span·class="attribute">-spec</span>·flatmap(Fun,·List1)·->·List21586 ··········<pre·translate="no"><span·class="attribute">-spec</span>·flatmap(Fun,·List1)·->·List2
1587 ·················when·Fun·::·fun((A)·->·[B]),·List1·::·[A],·List2·::·[B],·A·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·B·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>1587 ·················when·Fun·::·fun((A)·->·[B]),·List1·::·[A],·List2·::·[B],·A·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·B·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
1588 ······</div>1588 ······</div>
  
1589 <p>Takes·a·function·from·<code·class="inline">A</code>s·to·lists·of·<code·class="inline">B</code>s,·and·a·list·of·<code·class="inline">A</code>s·(<code·class="inline">List1</code>)·and1589 <p>Takes·a·function·from·<code·class="inline">A</code>s·to·lists·of·<code·class="inline">B</code>s,·and·a·list·of·<code·class="inline">A</code>s·(<code·class="inline">List1</code>)·and
1590 produces·a·list·of·<code·class="inline">B</code>s·by·applying·the·function·to·every·element·in·<code·class="inline">List1</code>·and1590 produces·a·list·of·<code·class="inline">B</code>s·by·applying·the·function·to·every·element·in·<code·class="inline">List1</code>·and
1591 appending·the·resulting·lists.</p><p>That·is,·<code·class="inline">flatmap</code>·behaves·as·if·it·had·been·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">flatmap</span><span·class="p"·data-group-id="6793244718-1">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="6793244718-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1591 appending·the·resulting·lists.</p><p>That·is,·<code·class="inline">flatmap</code>·behaves·as·if·it·had·been·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">flatmap</span><span·class="p"·data-group-id="7315538811-1">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="7315538811-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1592 ····</span><span·class="nf">append</span><span·class="p"·data-group-id="6793244718-2">(</span><span·class="nf">map</span><span·class="p"·data-group-id="6793244718-3">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="6793244718-3">)</span[·...·truncated·by·diffoscope;·len:·1073,·SHA:·2c66359ef76af20bc58117e4c79a893744efd042a7e5791f6e2998fd663864a7·...·]-1">)</span><span·class="p">.</span><span·class="w">1592 ····</span><span·class="nf">append</span><span·class="p"·data-group-id="7315538811-2">(</span><span·class="nf">map</span><span·class="p"·data-group-id="7315538811-3">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">List1</span><span·class="p"·data-group-id="7315538811-3">)</span[·...·truncated·by·diffoscope;·len:·1073,·SHA:·12e4b2e56980e432948c0dfa2980fd1b711dd4c1b4dbe62e3c8d17b81662b4d3·...·]-1">)</span><span·class="p">.</span><span·class="w">
1593 </span><span·class="p"·data-group-id="4366134040-5">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="[·...·truncated·by·diffoscope;·len:·77,·SHA:·ceb1ec01b59eb9228892741bd0d84605de16681a4eb5e5897f09eedb01b8000a·...·]-5">]</span></code></pre>1593 </span><span·class="p"·data-group-id="2115499119-5">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·class="ss">c</span><span·class="[·...·truncated·by·diffoscope;·len:·77,·SHA:·74692d6a333974d3fdfb36c05cace0af203ed56c6deed9907067dce94bae230e·...·]-5">]</span></code></pre>
1594 ··</section>1594 ··</section>
1595 </section>1595 </section>
1596 <section·class="detail"·id="flatten/1">1596 <section·class="detail"·id="flatten/1">
  
Max diff block lines reached; 127212/167950 bytes (75.74%) of diff not shown.
205 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/maps.html
    
Offset 741, 18 lines modifiedOffset 741, 18 lines modified
741 ····················Pred·::·fun((Key,·Value)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()),741 ····················Pred·::·fun((Key,·Value)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()),
742 ····················MapOrIter·::·#{Key·=>·Value}·|·<a·href="#t:iterator/2">iterator</a>(Key,·Value),742 ····················MapOrIter·::·#{Key·=>·Value}·|·<a·href="#t:iterator/2">iterator</a>(Key,·Value),
743 ····················Map·::·#{Key·=>·Value}.</pre>743 ····················Map·::·#{Key·=>·Value}.</pre>
  
744 ······</div>744 ······</div>
  
745 <p>Returns·a·map·<code·class="inline">Map</code>·for·which·predicate·<code·class="inline">Pred</code>·holds·true·in·<code·class="inline">MapOrIter</code>.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">MapOrIter</code>·is·not·a·map·or745 <p>Returns·a·map·<code·class="inline">Map</code>·for·which·predicate·<code·class="inline">Pred</code>·holds·true·in·<code·class="inline">MapOrIter</code>.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">MapOrIter</code>·is·not·a·map·or
746 valid·iterator,·or·with·<code·class="inline">badarg</code>·if·<code·class="inline">Pred</code>·is·not·a·function·of·arity·2.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8332825976-1">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·812,·SHA:·6558c9512417fca14aadd7b08210800400af9439f9e849e1156a02ef288294ac·...·]-1">}</span><span·class="p">,</span><span·class="w">746 valid·iterator,·or·with·<code·class="inline">badarg</code>·if·<code·class="inline">Pred</code>·is·not·a·function·of·arity·2.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8085909031-1">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">b</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·812,·SHA:·dc998a2469a09e32d2f6474ec2c79ddd0b2d852ce5804fc7c85d97e43217c195·...·]-1">}</span><span·class="p">,</span><span·class="w">
747 ··</span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8332825976-2">(</span><span·class="n">K</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group-id="8332825976-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">is_atom</span><sp[·...·truncated·by·diffoscope;·len:·424,·SHA:·494501cbc709abd00c774938bc314502f40f0c4f00eb6fb83f7a2e3ffb4cde69·...·]-4">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">747 ··</span><span·class="n">Pred</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8085909031-2">(</span><span·class="n">K</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group-id="8085909031-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">is_atom</span><sp[·...·truncated·by·diffoscope;·len:·424,·SHA:·3cc23e6c66e9044d33b8b1ec37744f1198e140412e0496c1ad6837b3a632591e·...·]-4">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
748 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="8332825976-5">(</span><span·class="n">Pred</span><span·class="p">,</span><span·class="n">M</span><span·class="p"·data-group-id="8332825976-5">)</span><span·class="p">.</span><span·class="w">748 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="8085909031-5">(</span><span·class="n">Pred</span><span·class="p">,</span><span·class="n">M</span><span·class="p"·data-group-id="8085909031-5">)</span><span·class="p">.</span><span·class="w">
749 </span><span·class="p"·data-group-id="8332825976-6">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">c</span><span·class="w">·</span><span·class="p">=&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·d3cbf1cf86a08fe0512a9d58a04e2ed1ec2898a172f22587fa3d7a66202db3eb·...·]-6">}</span></code></pre>749 </span><span·class="p"·data-group-id="8085909031-6">#{</span><span·class="ss">a</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="ss">c</span><span·class="w">·</span><span·class="p">=&gt;</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·b23ba3fc8ad06b5af6085f45940d57a6ad9ed211520de2a0659955b018ef7f9d·...·]-6">}</span></code></pre>
750 ··</section>750 ··</section>
751 </section>751 </section>
752 <section·class="detail"·id="filtermap/2">752 <section·class="detail"·id="filtermap/2">
  
753 ··<div·class="detail-header">753 ··<div·class="detail-header">
754 ····<a·href="#filtermap/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">754 ····<a·href="#filtermap/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
755 ······<i·class="ri-link-m"·aria-hidden="true"></i>755 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 783, 18 lines modifiedOffset 783, 18 lines modified
783 ······</div>783 ······</div>
  
784 <p>Returns·a·map·<code·class="inline">Map</code>·that·is·the·result·of·calling·<code·class="inline">Fun(Key,·Value1)</code>·for·every784 <p>Returns·a·map·<code·class="inline">Map</code>·that·is·the·result·of·calling·<code·class="inline">Fun(Key,·Value1)</code>·for·every
785 <code·class="inline">Key</code>·to·value·<code·class="inline">Value1</code>·association·in·<code·class="inline">MapOrIter</code>·in·any·order.</p><p>If·<code·class="inline">Fun(Key,·Value1)</code>·returns·<code·class="inline">true</code>,·the·association·is·copied·to·the·result785 <code·class="inline">Key</code>·to·value·<code·class="inline">Value1</code>·association·in·<code·class="inline">MapOrIter</code>·in·any·order.</p><p>If·<code·class="inline">Fun(Key,·Value1)</code>·returns·<code·class="inline">true</code>,·the·association·is·copied·to·the·result
786 map.·If·it·returns·<code·class="inline">false</code>,·the·association·is·not·copied.·If·it·returns786 map.·If·it·returns·<code·class="inline">false</code>,·the·association·is·not·copied.·If·it·returns
787 <code·class="inline">{true,·NewValue}</code>,·the·value·for·<code·class="inline">Key</code>·is·replaced·with·<code·class="inline">NewValue</code>·in·the787 <code·class="inline">{true,·NewValue}</code>,·the·value·for·<code·class="inline">Key</code>·is·replaced·with·<code·class="inline">NewValue</code>·in·the
788 result·map.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">MapOrIter</code>·is·not·a·map·or788 result·map.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">MapOrIter</code>·is·not·a·map·or
789 valid·iterator,·or·with·<code·class="inline">badarg</code>·if·<code·class="inline">Fun</code>·is·not·a·function·of·arity·2.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3736123429-1">(</span><span·class="n">K</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group-id="3736123429-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_atom</span><spa[·...·truncated·by·diffoscope;·len:·977,·SHA:·953c8978d209f7bb9f47e9999597580467e3b9fc51e434c4106f7b25a1de3552·...·]-5">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">789 valid·iterator,·or·with·<code·class="inline">badarg</code>·if·<code·class="inline">Fun</code>·is·not·a·function·of·arity·2.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3506196397-1">(</span><span·class="n">K</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group-id="3506196397-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_atom</span><spa[·...·truncated·by·diffoscope;·len:·977,·SHA:·8ed4c11a32f426c0d797a464d38110d6cc43d7dab81f278f33a0d3b5f5c4ece2·...·]-5">)</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
790 ··</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3736123429-6">#{</span><span·class="ss">k1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;k2&quot;</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·306,·SHA:·17c96779f84e343161410b825733fa608d955f87e0bc5cbd9a676baaaba754c2·...·]-6">}</span><span·class="p">,</span><span·class="w">790 ··</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3506196397-6">#{</span><span·class="ss">k1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;k2&quot;</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·306,·SHA:·c69d12ce465c5fe15bda9b9feccc1a4647e3cdcbdf4f51a04f2e7b228b857634·...·]-6">}</span><span·class="p">,</span><span·class="w">
791 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">filtermap</span><span·class="p"·data-group-id="3736123429-7">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="3736123429-7">)</span><span·class="p">.</span><span·class="w">791 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">filtermap</span><span·class="p"·data-group-id="3506196397-7">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="3506196397-7">)</span><span·class="p">.</span><span·class="w">
792 </span><span·class="p"·data-group-id="3736123429-8">#{</span><span·class="ss">k1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="s">&quot;k2&quot;</span><span·class="w">·</span><span·class="p">=&gt;<[·...·truncated·by·diffoscope;·len:·96,·SHA:·82a182ed96975ed5ea750f1854ef9a28471b556a1baa0ff4f7d8b75cdb8a6f7f·...·]-8">}</span></code></pre>792 </span><span·class="p"·data-group-id="3506196397-8">#{</span><span·class="ss">k1</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="s">&quot;k2&quot;</span><span·class="w">·</span><span·class="p">=&gt;<[·...·truncated·by·diffoscope;·len:·96,·SHA:·b264e2905e37f7355ec76f435639976ce93d368f9273f145fc5b558cc7bf5507·...·]-8">}</span></code></pre>
793 ··</section>793 ··</section>
794 </section>794 </section>
795 <section·class="detail"·id="find/2">795 <section·class="detail"·id="find/2">
  
796 ··<div·class="detail-header">796 ··<div·class="detail-header">
797 ····<a·href="#find/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">797 ····<a·href="#find/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
798 ······<i·class="ri-link-m"·aria-hidden="true"></i>798 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 817, 18 lines modifiedOffset 817, 18 lines modified
817 ······<div·class="specs">817 ······<div·class="specs">
  
818 ··········<pre·translate="no"><span·class="attribute">-spec</span>·find(Key,·Map)·->·{ok,·Value}·|·error·when·Map·::·#{Key·=>·Value,·_·=>·_}.</pre>818 ··········<pre·translate="no"><span·class="attribute">-spec</span>·find(Key,·Map)·->·{ok,·Value}·|·error·when·Map·::·#{Key·=>·Value,·_·=>·_}.</pre>
  
819 ······</div>819 ······</div>
  
820 <p>Returns·a·tuple·<code·class="inline">{ok,·Value}</code>,·where·<code·class="inline">Value</code>·is·the·value·associated·with·<code·class="inline">Key</code>,820 <p>Returns·a·tuple·<code·class="inline">{ok,·Value}</code>,·where·<code·class="inline">Value</code>·is·the·value·associated·with·<code·class="inline">Key</code>,
821 or·<code·class="inline">error</code>·if·no·value·is·associated·with·<code·class="inline">Key</code>·in·<code·class="inline">Map</code>.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">Map</code>·is·not·a·map.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0407731070-1">#{</span><span·class="s">&quot;hi&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">42</span><span·class="p"·data-group-id="0407731070-1">}</span><span·class="p">,</span><span·class="w">821 or·<code·class="inline">error</code>·if·no·value·is·associated·with·<code·class="inline">Key</code>·in·<code·class="inline">Map</code>.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">Map</code>·is·not·a·map.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4541293281-1">#{</span><span·class="s">&quot;hi&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">42</span><span·class="p"·data-group-id="4541293281-1">}</span><span·class="p">,</span><span·class="w">
822 ··</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;hi&quot;</span><span·class="p">,</span><span·class="w">822 ··</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;hi&quot;</span><span·class="p">,</span><span·class="w">
823 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="0407731070-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="0407731070-2">)</span><span·class="p">.</span><span·class="w">823 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="4541293281-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="4541293281-2">)</span><span·class="p">.</span><span·class="w">
824 </span><span·class="p"·data-group-id="0407731070-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="0407731070-3">}</span></code></pre>824 </span><span·class="p"·data-group-id="4541293281-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="mi">42</span><span·class="p"·data-group-id="4541293281-3">}</span></code></pre>
825 ··</section>825 ··</section>
826 </section>826 </section>
827 <section·class="detail"·id="fold/3">827 <section·class="detail"·id="fold/3">
  
828 ··<div·class="detail-header">828 ··<div·class="detail-header">
829 ····<a·href="#fold/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">829 ····<a·href="#fold/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
830 ······<i·class="ri-link-m"·aria-hidden="true"></i>830 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 861, 17 lines modifiedOffset 861, 17 lines modified
861 ······</div>861 ······</div>
  
862 <p>Calls·<code·class="inline">F(Key,·Value,·AccIn)</code>·for·every·<code·class="inline">Key</code>·to·value·<code·class="inline">Value</code>·association·in862 <p>Calls·<code·class="inline">F(Key,·Value,·AccIn)</code>·for·every·<code·class="inline">Key</code>·to·value·<code·class="inline">Value</code>·association·in
863 <code·class="inline">MapOrIter</code>·in·any·order.·Function·<code·class="inline">fun·F/3</code>·must·return·a·new·accumulator,863 <code·class="inline">MapOrIter</code>·in·any·order.·Function·<code·class="inline">fun·F/3</code>·must·return·a·new·accumulator,
864 which·is·passed·to·the·next·successive·call.·This·function·returns·the·final864 which·is·passed·to·the·next·successive·call.·This·function·returns·the·final
865 value·of·the·accumulator.·The·initial·accumulator·value·<code·class="inline">Init</code>·is·returned·if865 value·of·the·accumulator.·The·initial·accumulator·value·<code·class="inline">Init</code>·is·returned·if
866 the·map·is·empty.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">MapOrIter</code>·is·not·a·map·or866 the·map·is·empty.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">MapOrIter</code>·is·not·a·map·or
867 valid·iterator,·or·with·<code·class="inline">badarg</code>·if·<code·class="inline">Fun</code>·is·not·a·function·of·arity·3.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6580863241-1">(</span><span·class="n">K</span><span·class="p">,</span><span·class="n">V</span><span·class="p">,</span><span·class="n">AccIn</span><span·class="p"·data-group-id="6580863241-1">)</span><span·class="w">·</span><span·class="k">when</span><span·[·...·truncated·by·diffoscope;·len:·167,·SHA:·0d96831f26a91e944d79fe5ca770732b0113128efe41e8cc28a076a86d397e89·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">AccIn</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">V</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">867 valid·iterator,·or·with·<code·class="inline">badarg</code>·if·<code·class="inline">Fun</code>·is·not·a·function·of·arity·3.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7875261328-1">(</span><span·class="n">K</span><span·class="p">,</span><span·class="n">V</span><span·class="p">,</span><span·class="n">AccIn</span><span·class="p"·data-group-id="7875261328-1">)</span><span·class="w">·</span><span·class="k">when</span><span·[·...·truncated·by·diffoscope;·len:·167,·SHA:·114e5d8c964c07ec610da06a1963e1b82550a4bbf74002d8bb65a69c4e55f961·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">AccIn</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">V</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
868 ··</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6580863241-3">#{</span><span·class="s">&quot;k1&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;k2&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·318,·SHA:·6bb8a4217d48fc3dbf955ee1cd8dca826e3ed1e14ec11874bc45cdc0af677443·...·]-3">}</span><span·class="p">,</span><span·class="w">868 ··</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7875261328-3">#{</span><span·class="s">&quot;k1&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;k2&quot;</span><span·clas[·...·truncated·by·diffoscope;·len:·318,·SHA:·f1302183495e2af0389ebfd13768954afa17773c61a8cf9571f905be205b08d3·...·]-3">}</span><span·class="p">,</span><span·class="w">
869 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">fold</span><span·class="p"·data-group-id="6580863241-4">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="6580863241-4">)</span><span·class="p">.</span><span·class="w">869 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">fold</span><span·class="p"·data-group-id="7875261328-4">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="7875261328-4">)</span><span·class="p">.</span><span·class="w">
870 </span><span·class="mi">6</span></code></pre>870 </span><span·class="mi">6</span></code></pre>
871 ··</section>871 ··</section>
872 </section>872 </section>
873 <section·class="detail"·id="foreach/2">873 <section·class="detail"·id="foreach/2">
  
874 ··<div·class="detail-header">874 ··<div·class="detail-header">
875 ····<a·href="#foreach/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">875 ····<a·href="#foreach/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 930, 16 lines modifiedOffset 930, 16 lines modified
930 ······<div·class="specs">930 ······<div·class="specs">
  
931 ··········<pre·translate="no"><span·class="attribute">-spec</span>·from_keys(Keys,·Value)·->·Map·when·Keys·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0">list</a>(),·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Map·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0">map</a>().</pre>931 ··········<pre·translate="no"><span·class="attribute">-spec</span>·from_keys(Keys,·Value)·->·Map·when·Keys·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0">list</a>(),·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Map·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0">map</a>().</pre>
  
932 ······</div>932 ······</div>
  
933 <p>Takes·a·list·of·keys·and·a·value·and·builds·a·map·where·all·keys·point·to·the933 <p>Takes·a·list·of·keys·and·a·value·and·builds·a·map·where·all·keys·point·to·the
934 same·value.·The·key·can·be·in·any·order,·and·keys·and·value·can·be·of·any·term.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Keys</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2975503389-1">[</span><span·class="s">&quot;a&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;b&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;c&quot;</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·351,·SHA:·afde660dc46dd83a9ab6f4ce44df18c477fa9882239cbbb3f57eee66fc78270f·...·]-2">)</span><span·class="p">.</span><span·class="w">934 same·value.·The·key·can·be·in·any·order,·and·keys·and·value·can·be·of·any·term.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Keys</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6594205202-1">[</span><span·class="s">&quot;a&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;b&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;c&quot;</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·351,·SHA:·4c8994b787619893cfa8c8eefa04bea6da12f0810256b90eaac66a179fedc264·...·]-2">)</span><span·class="p">.</span><span·class="w">
935 </span><span·class="p"·data-group-id="2975503389-3">#{</span><span·class="s">&quot;a&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="s">&quot;b&quot;</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·270,·SHA:·4db27ee08b4a1bac26b490497b22a2d0cca4428ebe85a39741fe861206c147db·...·]-3">}</span></code></pre>935 </span><span·class="p"·data-group-id="6594205202-3">#{</span><span·class="s">&quot;a&quot;</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="s">&quot;b&quot;</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·270,·SHA:·c8b3dd5d94180baafca6948df3e95a836fe502e8a39c1081814a616210512f47·...·]-3">}</span></code></pre>
936 ··</section>936 ··</section>
937 </section>937 </section>
938 <section·class="detail"·id="from_list/1">938 <section·class="detail"·id="from_list/1">
  
939 ··<div·class="detail-header">939 ··<div·class="detail-header">
940 ····<a·href="#from_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">940 ····<a·href="#from_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
941 ······<i·class="ri-link-m"·aria-hidden="true"></i>941 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 963, 17 lines modifiedOffset 963, 17 lines modified
  
963 ··········<pre·translate="no"><span·class="attribute">-spec</span>·from_list(List)·->·Map·when·List·::·[{Key,·Value}],·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Map·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0">map</a>().</pre>963 ··········<pre·translate="no"><span·class="attribute">-spec</span>·from_list(List)·->·Map·when·List·::·[{Key,·Value}],·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Map·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0">map</a>().</pre>
  
964 ······</div>964 ······</div>
  
965 <p>Takes·a·list·of·key-value·tuples·elements·and·builds·a·map.·The·associations·can965 <p>Takes·a·list·of·key-value·tuples·elements·and·builds·a·map.·The·associations·can
966 be·in·any·order,·and·both·keys·and·values·in·the·association·can·be·of·any·term.</p><p>If·the·same·key·appears·more·than·once,·the·latter·(right-most)·value·is·used966 be·in·any·order,·and·both·keys·and·values·in·the·association·can·be·of·any·term.</p><p>If·the·same·key·appears·more·than·once,·the·latter·(right-most)·value·is·used
967 and·the·previous·values·are·ignored.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">List</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="9929722381-1">[</span><span·class="p"·data-group-id="9929722381-2">{</span><span·class="s">&quot;a&quot;</span><span·class="p">,</span><span·class="ss">ignored</span><span·class="p"·data-group-id="9929722381-2">}</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·660,·SHA:·98d60b6ff08244205d312804c369320407e46da6e0e17f18041433c84428b06e·...·]-1">]</span><span·class="p">,</span><span·class="w">967 and·the·previous·values·are·ignored.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">List</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="6505853472-1">[</span><span·class="p"·data-group-id="6505853472-2">{</span><span·class="s">&quot;a&quot;</span><span·class="p">,</span><span·class="ss">ignored</span><span·class="p"·data-group-id="6505853472-2">}</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·660,·SHA:·fdbd61933c65bb4426e29552cfe58d8e209ecd73fb674dcec27f6d497745ceb8·...·]-1">]</span><span·class="p">,</span><span·class="w">
968 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="9929722381-6">(</span><span·class="n">List</span><span·class="p"·data-group-id="9929722381-6">)</span><span·class="p">.</span><span·class="w">968 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6505853472-6">(</span><span·class="n">List</span><span·class="p"·data-group-id="6505853472-6">)</span><span·class="p">.</span><span·class="w">
969 </span><span·class="p"·data-group-id="9929722381-7">#{</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">value_three</span><span·class="p">,</span><span·class="mi">1337</span><span·class="w">·</span><span·class="p">=&gt[·...·truncated·by·diffoscope;·len:·278,·SHA:·bb97ade82e9b5f16a8157ded53637bf240b61750c4fbd49786b96251efc29a1e·...·]-7">}</span></code></pre>969 </span><span·class="p"·data-group-id="6505853472-7">#{</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">value_three</span><span·class="p">,</span><span·class="mi">1337</span><span·class="w">·</span><span·class="p">=&gt[·...·truncated·by·diffoscope;·len:·278,·SHA:·192c6b2e4ab8947df5fd6e66cd75d71dd55a221780489f9533a2f55834fc531f·...·]-7">}</span></code></pre>
970 ··</section>970 ··</section>
971 </section>971 </section>
972 <section·class="detail"·id="get/2">972 <section·class="detail"·id="get/2">
  
973 ··<div·class="detail-header">973 ··<div·class="detail-header">
974 ····<a·href="#get/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">974 ····<a·href="#get/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
975 ······<i·class="ri-link-m"·aria-hidden="true"></i>975 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 997, 16 lines modifiedOffset 997, 16 lines modified
  
997 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get(Key,·Map)·->·Value·when·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Map·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0">map</a>(),·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>997 ··········<pre·translate="no"><span·class="attribute">-spec</span>·get(Key,·Map)·->·Value·when·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·Map·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:map/0">map</a>(),·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
998 ······</div>998 ······</div>
  
999 <p>Returns·value·<code·class="inline">Value</code>·associated·with·<code·class="inline">Key</code>·if·<code·class="inline">Map</code>·contains·<code·class="inline">Key</code>.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">Map</code>·is·not·a·map,·or·with·a999 <p>Returns·value·<code·class="inline">Value</code>·associated·with·<code·class="inline">Key</code>·if·<code·class="inline">Map</code>·contains·<code·class="inline">Key</code>.</p><p>The·call·fails·with·a·<code·class="inline">{badmap,Map}</code>·exception·if·<code·class="inline">Map</code>·is·not·a·map,·or·with·a
1000 <code·class="inline">{badkey,Key}</code>·exception·if·no·value·is·associated·with·<code·class="inline">Key</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1337</span><span·class="p">,</span><span·class="w">1000 <code·class="inline">{badkey,Key}</code>·exception·if·no·value·is·associated·with·<code·class="inline">Key</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Key</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1337</span><span·class="p">,</span><span·class="w">
1001 ··</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2348084496-1">#{</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">value_two</span><span·class="p">,</span><span·class="mi">1337</span><span·class="w">·</span><span·class="p">=&gt;<[·...·truncated·by·diffoscope;·len:·276,·SHA:·064e39b26beb680be2997c0581b1b396115f4c2b1c40a778198eb11d940b8ff0·...·]-1">}</span><span·class="p">,</span><span·class="w">1001 ··</span><span·class="n">Map</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1696692010-1">#{</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">value_two</span><span·class="p">,</span><span·class="mi">1337</span><span·class="w">·</span><span·class="p">=&gt;<[·...·truncated·by·diffoscope;·len:·276,·SHA:·073fb09051c6203ab8d97ece61a53cc9f9802ad2de1d745344a8fec36439c552·...·]-1">}</span><span·class="p">,</span><span·class="w">
1002 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="2348084496-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="2348084496-2">)</span><span·class="p">.</span><span·class="w">1002 ··</span><span·class="nc">maps</span><span·class="p">:</span><span·class="nf">get</span><span·class="p"·data-group-id="1696692010-2">(</span><span·class="n">Key</span><span·class="p">,</span><span·class="n">Map</span><span·class="p"·data-group-id="1696692010-2">)</span><span·class="p">.</span><span·class="w">
1003 </span><span·class="s">&quot;value·one&quot;</span></code></pre>1003 </span><span·class="s">&quot;value·one&quot;</span></code></pre>
1004 ··</section>1004 ··</section>
1005 </section>1005 </section>
1006 <section·class="detail"·id="get/3">1006 <section·class="detail"·id="get/3">
  
1007 ··<div·class="detail-header">1007 ··<div·class="detail-header">
1008 ····<a·href="#get/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1008 ····<a·href="#get/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1030, 19 lines modifiedOffset 1030, 19 lines modified
Max diff block lines reached; 172945/209381 bytes (82.60%) of diff not shown.
140 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/ms_transform.html
    
Offset 150, 55 lines modifiedOffset 150, 55 lines modified
150 ··</a>150 ··</a>
151 ··<span·class="text">Example·1</span>151 ··<span·class="text">Example·1</span>
152 </h2>152 </h2>
153 <p>Using·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·and·a·match·specification,·one·can·filter·out·rows·of·a153 <p>Using·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·and·a·match·specification,·one·can·filter·out·rows·of·a
154 table·and·construct·a·list·of·tuples·containing·relevant·parts·of·the·data·in154 table·and·construct·a·list·of·tuples·containing·relevant·parts·of·the·data·in
155 these·rows.·One·can·use·<a·href="ets.html#foldl/3"><code·class="inline">ets:foldl/3</code></a>·instead,·but·the·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·call·is155 these·rows.·One·can·use·<a·href="ets.html#foldl/3"><code·class="inline">ets:foldl/3</code></a>·instead,·but·the·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·call·is
156 far·more·efficient.·Without·the·translation·provided·by·<code·class="inline">ms_transform</code>,·one·must156 far·more·efficient.·Without·the·translation·provided·by·<code·class="inline">ms_transform</code>,·one·must
157 struggle·with·writing·match·specifications·terms·to·accommodate·this.</p><p>Consider·a·simple·table·of·employees:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0291801648-1">(</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0291801648-2">{</span><span·class="ss">empno</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%Employee·number·as·a·string,·the·key</span><span·class="w">157 struggle·with·writing·match·specifications·terms·to·accommodate·this.</p><p>Consider·a·simple·table·of·employees:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="6004638690-1">(</span><span·class="ss">emp</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6004638690-2">{</span><span·class="ss">empno</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%Employee·number·as·a·string,·the·key</span><span·class="w">
158 ··············</span><span·class="ss">surname</span><span·class="p">,</span><span·class="w">···</span><span·class="c1">%Surname·of·the·employee</span><span·class="w">158 ··············</span><span·class="ss">surname</span><span·class="p">,</span><span·class="w">···</span><span·class="c1">%Surname·of·the·employee</span><span·class="w">
159 ··············</span><span·class="ss">givenname</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%Given·name·of·employee</span><span·class="w">159 ··············</span><span·class="ss">givenname</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%Given·name·of·employee</span><span·class="w">
160 ··············</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">······</span><span·class="c1">%Department,·one·of·{dev,sales,prod,adm}</span><span·class="w">160 ··············</span><span·class="ss">dept</span><span·class="p">,</span><span·class="w">······</span><span·class="c1">%Department,·one·of·{dev,sales,prod,adm}</span><span·class="w">
161 ··············</span><span·class="ss">empyear</span><span·class="p"·data-group-id="0291801648-2">}</span><span·class="p"·data-group-id="0291801648-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%Year·the·employee·was·employed</span></code></pre><p>We·create·the·table·using:</p><pre><code·class="text">ets:new([·...·truncated·by·diffoscope;·len:·641,·SHA:·75b3f1dd0a6a970d55343f558788824a07046a1867f554e233c328cb41db2a27·...·]-2">}</span><span·class="p">,</span><span·class="w">161 ··············</span><span·class="ss">empyear</span><span·class="p"·data-group-id="6004638690-2">}</span><span·class="p"·data-group-id="6004638690-1">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%Year·the·employee·was·employed</span></code></pre><p>We·create·the·table·using:</p><pre><code·class="text">ets:new([·...·truncated·by·diffoscope;·len:·641,·SHA:·69ed46ab633eabeddeff9cf33e6aceed4d818610133a0aa067f56cb3fcaeba50·...·]-2">}</span><span·class="p">,</span><span·class="w">
162 ·</span><span·class="p"·data-group-id="5136269349-3">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;041231&quot;</span><span·class="p">,</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·128,·SHA:·d989ede03c1eafd14c849a6274b8f7ee85d958fcae4f37b6763b3689380771da·...·]-3">}</span><span·class="p">,</span><span·class="w">162 ·</span><span·class="p"·data-group-id="4363740753-3">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;041231&quot;</span><span·class="p">,</span><span·class="s">&quot;Doe&quot;</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p">,[·...·truncated·by·diffoscope;·len:·128,·SHA:·0955aebf3bcbac6be06f4ff4fe69b2353e46d3d297845ab703ef6d8b77df34d5·...·]-3">}</span><span·class="p">,</span><span·class="w">
163 ·</span><span·class="p"·data-group-id="5136269349-4">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;052341&quot;</span><span·class="p">,</span><span·class="s">&quot;Smith&quot;</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·129,·SHA:·e143086fe99bc42f7dae36ec1831862916de2adba6d611c3444cfa3dbbc85eb8·...·]-4">}</span><span·class="p">,</span><span·class="w">163 ·</span><span·class="p"·data-group-id="4363740753-4">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;052341&quot;</span><span·class="p">,</span><span·class="s">&quot;Smith&quot;</span><span·class="p">,</span><span·class="s">&quot;John&quot;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·129,·SHA:·d4b3b30c5f5a82e135ce97090e2d854678c1626054d176e7a1ca729fac1144a6·...·]-4">}</span><span·class="p">,</span><span·class="w">
164 ·</span><span·class="p"·data-group-id="5136269349-5">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;076324&quot;</span><span·class="p">,</span><span·class="s">&quot;Smith&quot;</span><span·class="p">,</span><span·class="s">&quot;Ella&quot;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·131,·SHA:·1f204b189b937fd1a163ac5a77ad6a402c90c655559c363d4d93cfc6c1398096·...·]-5">}</span><span·class="p">,</span><span·class="w">164 ·</span><span·class="p"·data-group-id="4363740753-5">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;076324&quot;</span><span·class="p">,</span><span·class="s">&quot;Smith&quot;</span><span·class="p">,</span><span·class="s">&quot;Ella&quot;</span><span·class="p"[·...·truncated·by·diffoscope;·len:·131,·SHA:·6b760958074fe4173fd9fbb68477b975439857e666ea5e4e9706de59e55c297e·...·]-5">}</span><span·class="p">,</span><span·class="w">
165 ·</span><span·class="p"·data-group-id="5136269349-6">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;122334&quot;</span><span·class="p">,</span><span·class="s">&quot;Weston&quot;</span><span·class="p">,</span><span·class="s">&quot;Anna&quot;</span><span·class="p[·...·truncated·by·diffoscope;·len:·131,·SHA:·a2221d13d99246fdb8af835b0d158fea5beda63c56f81d1e8ed61b304c6748fe·...·]-6">}</span><span·class="p">,</span><span·class="w">165 ·</span><span·class="p"·data-group-id="4363740753-6">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;122334&quot;</span><span·class="p">,</span><span·class="s">&quot;Weston&quot;</span><span·class="p">,</span><span·class="s">&quot;Anna&quot;</span><span·class="p[·...·truncated·by·diffoscope;·len:·131,·SHA:·1615e8ed2e1770b89c7282df785519850d374115b50badca11d67361c5e9bd88·...·]-6">}</span><span·class="p">,</span><span·class="w">
166 ·</span><span·class="p"·data-group-id="5136269349-7">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;535216&quot;</span><span·class="p">,</span><span·class="s">&quot;Chalker&quot;</span><span·class="p">,</span><span·class="s">&quot;Samuel&quot;</span><span·class[·...·truncated·by·diffoscope;·len:·133,·SHA:·024f72d3ffe98f4ed7edbdcd69d711d654287f97ec5aea9d2d2a730cca6fca0b·...·]-7">}</span><span·class="p">,</span><span·class="w">166 ·</span><span·class="p"·data-group-id="4363740753-7">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;535216&quot;</span><span·class="p">,</span><span·class="s">&quot;Chalker&quot;</span><span·class="p">,</span><span·class="s">&quot;Samuel&quot;</span><span·class[·...·truncated·by·diffoscope;·len:·133,·SHA:·0c1b53da393fb71eaf8007ed268ab8f5aa27e72fd10f9db4eb7f3c4ad8cb6b3a·...·]-7">}</span><span·class="p">,</span><span·class="w">
167 ·</span><span·class="p"·data-group-id="5136269349-8">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;789789&quot;</span><span·class="p">,</span><span·class="s">&quot;Harrysson&quot;</span><span·class="p">,</span><span·class="s">&quot;Joe&quot;</span><span·class=[·...·truncated·by·diffoscope;·len:·132,·SHA:·c4dbc8181af6e3bf41bcfd4bb407ed1f341f420c2486f999aecf947d39d7926a·...·]-8">}</span><span·class="p">,</span><span·class="w">167 ·</span><span·class="p"·data-group-id="4363740753-8">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;789789&quot;</span><span·class="p">,</span><span·class="s">&quot;Harrysson&quot;</span><span·class="p">,</span><span·class="s">&quot;Joe&quot;</span><span·class=[·...·truncated·by·diffoscope;·len:·132,·SHA:·e00fd1ca2ed46b9c7bc4fbfc114eba47816bbf04e75875a4859f22cae9bda2f8·...·]-8">}</span><span·class="p">,</span><span·class="w">
168 ·</span><span·class="p"·data-group-id="5136269349-9">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;963721&quot;</span><span·class="p">,</span><span·class="s">&quot;Scott&quot;</span><span·class="p">,</span><span·class="s">&quot;Juliana&quot;</span><span·class=[·...·truncated·by·diffoscope;·len:·132,·SHA:·6d12c371fa6512741a5949e7aeabbb76399bc5d0d5985d69d26e850263470c66·...·]-9">}</span><span·class="p">,</span><span·class="w">168 ·</span><span·class="p"·data-group-id="4363740753-9">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;963721&quot;</span><span·class="p">,</span><span·class="s">&quot;Scott&quot;</span><span·class="p">,</span><span·class="s">&quot;Juliana&quot;</span><span·class=[·...·truncated·by·diffoscope;·len:·132,·SHA:·995f254163973d9d38c9ed85e134cc76c68aa4c3cf51834f5f683180ea2db081·...·]-9">}</span><span·class="p">,</span><span·class="w">
169 ·</span><span·class="p"·data-group-id="5136269349-10">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;989891&quot;</span><span·class="p">,</span><span·class="s">&quot;Brown&quot;</span><span·class="p">,</span><span·class="s">&quot;Gabriel&quot;</span><span·class[·...·truncated·by·diffoscope;·len:·188,·SHA:·4434a63e6cc842b54f8451f408c0b86a7d4b030a5bdb6ed88074647d4ac9ef48·...·]-1">]</span></code></pre><p>Assuming·that·we·want·the·employee·numbers·of·everyone·in·the·sales·department,169 ·</span><span·class="p"·data-group-id="4363740753-10">{</span><span·class="ss">emp</span><span·class="p">,</span><span·class="s">&quot;989891&quot;</span><span·class="p">,</span><span·class="s">&quot;Brown&quot;</span><span·class="p">,</span><span·class="s">&quot;Gabriel&quot;</span><span·class[·...·truncated·by·diffoscope;·len:·188,·SHA:·94af26a1a12a411d1689e3e87d21d2a57fc9b7b9826580b9fc2a54142556cb15·...·]-1">]</span></code></pre><p>Assuming·that·we·want·the·employee·numbers·of·everyone·in·the·sales·department,
170 there·are·several·ways.</p><p><a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="8123665754-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8123665754-2">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#[·...·truncated·by·diffoscope;·len:·437,·SHA:·86fe32ade39acbe195a8bec45038aeee521dfe997f9e5751bdc49987470af04c·...·]-1">)</span><span·class="p">.</span><span·class="w">170 there·are·several·ways.</p><p><a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">match</span><span·class="p"·data-group-id="9646654988-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9646654988-2">{</span><span·class="ss">&#39;_&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#[·...·truncated·by·diffoscope;·len:·437,·SHA:·7305bf76eb3a05c1d3057fb9cd4aa067934b58873e7dbb89761395aaa95607bf·...·]-1">)</span><span·class="p">.</span><span·class="w">
171 </span><span·class="p"·data-group-id="8123665754-3">[</span><span·class="p"·data-group-id="8123665754-4">[</span><span·class="s">&quot;011103&quot;</span><span·class="p"·data-group-id="8123665754-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="8123665754-5">[</span><span·clas[·...·truncated·by·diffoscope;·len:·125,·SHA:·69534f3fa2e8b808118a2aaf23191a628affff0198a2c25655e6b28a4ef8ffa0·...·]-3">]</span></code></pre><p><a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·uses·a·simpler·type·of·match·specification,·but·it·is·still171 </span><span·class="p"·data-group-id="9646654988-3">[</span><span·class="p"·data-group-id="9646654988-4">[</span><span·class="s">&quot;011103&quot;</span><span·class="p"·data-group-id="9646654988-4">]</span><span·class="p">,</span><span·class="p"·data-group-id="9646654988-5">[</span><span·clas[·...·truncated·by·diffoscope;·len:·125,·SHA:·292f6bf4c240c889cc4ecdae79d21b57ca3f563259ef41a131cec05fcab4418f·...·]-3">]</span></code></pre><p><a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·uses·a·simpler·type·of·match·specification,·but·it·is·still
172 unreadable,·and·one·has·little·control·over·the·returned·result.·It·is·always·a172 unreadable,·and·one·has·little·control·over·the·returned·result.·It·is·always·a
173 list·of·lists.</p><p><a·href="ets.html#foldl/3"><code·class="inline">ets:foldl/3</code></a>·or·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·can·be·used·to·avoid·the·nested·lists:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="8804823346-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8804823346-2">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="8804823346-3">{</span><span·class="ss">empno</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·700,·SHA:·d0ddcc5f027d8783cf75f2da1d2cb5f67056a7643486f388a918520cf5bbf96b·...·]-4">]</span><span·class="p">;</span><span·class="w">173 list·of·lists.</p><p><a·href="ets.html#foldl/3"><code·class="inline">ets:foldl/3</code></a>·or·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·can·be·used·to·avoid·the·nested·lists:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="4440236520-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4440236520-2">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="4440236520-3">{</span><span·class="ss">empno</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·700,·SHA:·e1ffb8e7069322f16bad403364f9c24925a71bf57b29fbb1d6a2100b49400230·...·]-4">]</span><span·class="p">;</span><span·class="w">
174 ·············</span><span·class="p"·data-group-id="8804823346-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Acc</span><span·class="p"·data-group-id="8804823346-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">174 ·············</span><span·class="p"·data-group-id="4440236520-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Acc</span><span·class="p"·data-group-id="4440236520-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">
175 ··········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">175 ··········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
176 ··········</span><span·class="p"·data-group-id="8804823346-6">[</span><span·class="p"·data-group-id="8804823346-6">]</span><span·class="p">,</span><span·class="w">176 ··········</span><span·class="p"·data-group-id="4440236520-6">[</span><span·class="p"·data-group-id="4440236520-6">]</span><span·class="p">,</span><span·class="w">
177 ··········</span><span·class="ss">emp_tab</span><span·class="p"·data-group-id="8804823346-1">)</span><span·class="p">.</span></code></pre><p>The·result·is·<code·class="inline">[&quot;011103&quot;,&quot;076324&quot;]</code>.·The·fun·is·straightforward,·so·the·only177 ··········</span><span·class="ss">emp_tab</span><span·class="p"·data-group-id="4440236520-1">)</span><span·class="p">.</span></code></pre><p>The·result·is·<code·class="inline">[&quot;011103&quot;,&quot;076324&quot;]</code>.·The·fun·is·straightforward,·so·the·only
178 problem·is·that·all·the·data·from·the·table·must·be·transferred·from·the·table178 problem·is·that·all·the·data·from·the·table·must·be·transferred·from·the·table
179 to·the·calling·process·for·filtering.·That·is·inefficient·compared·to·the179 to·the·calling·process·for·filtering.·That·is·inefficient·compared·to·the
180 <a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·call·where·the·filtering·can·be·done·&quot;inside&quot;·the·emulator·and180 <a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·call·where·the·filtering·can·be·done·&quot;inside&quot;·the·emulator·and
181 only·the·result·is·transferred·to·the·process.</p><p>Consider·a·&quot;pure&quot;·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·call·that·does·what·<code·class="inline">ets:foldr</code>·does:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="0629932277-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0629932277-2">[</span><span·class="p"·data-group-id="0629932277-3">{</span><span·class="o">#</span><span·class="ss">emp</spa[·...·truncated·by·diffoscope;·len:·996,·SHA:·99f8d6d419c0781e515c12242a18b83e1b8dc9fd1b06c42c96ceab589c616a29·...·]-1">)</span><span·class="p">.</span></code></pre><p>Although·the·record·syntax·is·used,·it·is·still·hard·to·read·and·even·harder·to181 only·the·result·is·transferred·to·the·process.</p><p>Consider·a·&quot;pure&quot;·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·call·that·does·what·<code·class="inline">ets:foldr</code>·does:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="3482312021-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3482312021-2">[</span><span·class="p"·data-group-id="3482312021-3">{</span><span·class="o">#</span><span·class="ss">emp</spa[·...·truncated·by·diffoscope;·len:·996,·SHA:·b87351b8d4f1137991fb25b4b4330ca60532938706521aed58d93d9d617ec4a0·...·]-1">)</span><span·class="p">.</span></code></pre><p>Although·the·record·syntax·is·used,·it·is·still·hard·to·read·and·even·harder·to
182 write.·The·first·element·of·the·tuple,182 write.·The·first·element·of·the·tuple,
183 <code·class="inline">#emp{empno·=·'$1',·dept·=·sales,·_='_'}</code>,·tells·what·to·match.·Elements·not183 <code·class="inline">#emp{empno·=·'$1',·dept·=·sales,·_='_'}</code>,·tells·what·to·match.·Elements·not
184 matching·this·are·not·returned,·as·in·the·<a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·example.·The·second184 matching·this·are·not·returned,·as·in·the·<a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·example.·The·second
185 element,·the·empty·list,·is·a·list·of·guard·expressions,·which·we·do·not·need.185 element,·the·empty·list,·is·a·list·of·guard·expressions,·which·we·do·not·need.
186 The·third·element·is·the·list·of·expressions·constructing·the·return·value·(in186 The·third·element·is·the·list·of·expressions·constructing·the·return·value·(in
187 ETS·this·is·almost·always·a·list·containing·one·single·term).·In·our·case·<code·class="inline">'$1'</code>187 ETS·this·is·almost·always·a·list·containing·one·single·term).·In·our·case·<code·class="inline">'$1'</code>
188 is·bound·to·the·employee·number·in·the·head·(first·element·of·the·tuple),·and188 is·bound·to·the·employee·number·in·the·head·(first·element·of·the·tuple),·and
189 hence·the·employee·number·is·returned.·The·result·is·<code·class="inline">[&quot;011103&quot;,&quot;076324&quot;]</code>,·as189 hence·the·employee·number·is·returned.·The·result·is·<code·class="inline">[&quot;011103&quot;,&quot;076324&quot;]</code>,·as
190 in·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·example,·but·the·result·is·retrieved·much·more·efficiently190 in·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·example,·but·the·result·is·retrieved·much·more·efficiently
191 in·terms·of·execution·speed·and·memory·consumption.</p><p>Using·<a·href="ets.html#fun2ms/1"><code·class="inline">ets:fun2ms/1</code></a>,·we·can·combine·the·ease·of·use·of·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·and191 in·terms·of·execution·speed·and·memory·consumption.</p><p>Using·<a·href="ets.html#fun2ms/1"><code·class="inline">ets:fun2ms/1</code></a>,·we·can·combine·the·ease·of·use·of·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·and
192 the·efficiency·of·the·pure·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="4077264682-1">(</span><span·class="s">&quot;stdlib/include/ms_transform.hrl&quot;</span><span·class="p"·data-group-id="4077264682-1">)</span><span·class="p">.</span><span·class="w">192 the·efficiency·of·the·pure·<a·href="ets.html#select/2"><code·class="inline">ets:select/2</code></a>·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="2589453511-1">(</span><span·class="s">&quot;stdlib/include/ms_transform.hrl&quot;</span><span·class="p"·data-group-id="2589453511-1">)</span><span·class="p">.</span><span·class="w">
  
193 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="4077264682-2">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="4077264682-3">(</span><span·class="w">193 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="2589453511-2">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="2589453511-3">(</span><span·class="w">
194 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="4077264682-4">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="4077264682-5">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·266,·SHA:·95a65c81c201d03b2aa0264d2c97a21d77e55e3148f178c10c109804b471f4c7·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">194 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="2589453511-4">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="2589453511-5">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·266,·SHA:·1c5f593e15d0b8aee304b850240a852ee808b3edcb01fe0ee9a6c8cf790a4705·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
195 ······························</span><span·class="n">E</span><span·class="w">195 ······························</span><span·class="n">E</span><span·class="w">
196 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="4077264682-3">)</span><span·class="p"·data-group-id="4077264682-2">)</span><span·class="p">.</span></code></pre><p>This·example·requires·no·special·knowledge·of·match·specifications·to196 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="2589453511-3">)</span><span·class="p"·data-group-id="2589453511-2">)</span><span·class="p">.</span></code></pre><p>This·example·requires·no·special·knowledge·of·match·specifications·to
197 understand.·The·head·of·the·fun·matches·what·you·want·to·filter·out·and·the·body197 understand.·The·head·of·the·fun·matches·what·you·want·to·filter·out·and·the·body
198 returns·what·you·want·returned.·As·long·as·the·fun·can·be·kept·within·the·limits198 returns·what·you·want·returned.·As·long·as·the·fun·can·be·kept·within·the·limits
199 of·the·match·specifications,·there·is·no·need·to·transfer·all·table·data·to·the199 of·the·match·specifications,·there·is·no·need·to·transfer·all·table·data·to·the
200 process·for·filtering·as·in·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·example.·It·is·easier·to·read·than200 process·for·filtering·as·in·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·example.·It·is·easier·to·read·than
201 the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·example,·as·the·select·call·in·itself·discards·anything·that201 the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·example,·as·the·select·call·in·itself·discards·anything·that
202 does·not·match,·while·the·fun·of·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·call·needs·to·handle·both·the202 does·not·match,·while·the·fun·of·the·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·call·needs·to·handle·both·the
203 elements·matching·and·the·ones·not·matching.</p><p>In·the·<a·href="ets.html#fun2ms/1"><code·class="inline">ets:fun2ms/1</code></a>·example·above,·it·is·needed·to·include·<code·class="inline">ms_transform.hrl</code>203 elements·matching·and·the·ones·not·matching.</p><p>In·the·<a·href="ets.html#fun2ms/1"><code·class="inline">ets:fun2ms/1</code></a>·example·above,·it·is·needed·to·include·<code·class="inline">ms_transform.hrl</code>
Offset 212, 90 lines modifiedOffset 212, 90 lines modified
212 ····<i·class="ri-link-m"·aria-hidden="true"></i>212 ····<i·class="ri-link-m"·aria-hidden="true"></i>
213 ··</a>213 ··</a>
214 ··<span·class="text">Example·2</span>214 ··<span·class="text">Example·2</span>
215 </h2>215 </h2>
216 <p>Assume·that·we·want·to·get·all·the·employee·numbers·of·employees·hired·before216 <p>Assume·that·we·want·to·get·all·the·employee·numbers·of·employees·hired·before
217 year·2000.·Using·<a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·is·not·an·alternative·here,·as·relational217 year·2000.·Using·<a·href="ets.html#match/2"><code·class="inline">ets:match/2</code></a>·is·not·an·alternative·here,·as·relational
218 operators·cannot·be·expressed·there.·Once·again,·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·can·do·it218 operators·cannot·be·expressed·there.·Once·again,·<a·href="ets.html#foldr/3"><code·class="inline">ets:foldr/3</code></a>·can·do·it
219 (slowly,·but·correct):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="6622637127-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6622637127-2">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="6622637127-3">{</span><span·class="ss">empno</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·900,·SHA:·ae39b0887f25ec61b69ec133e015b5e4bf5b5be2a04964d949faf3f49c5ec36f·...·]-4">]</span><span·class="p">;</span><span·class="w">219 (slowly,·but·correct):</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">foldr</span><span·class="p"·data-group-id="4211136558-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4211136558-2">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="4211136558-3">{</span><span·class="ss">empno</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·900,·SHA:·0afd12f2763bfb26b7b124d28babe6ab27a287183e745b0d633835c167a8191e·...·]-4">]</span><span·class="p">;</span><span·class="w">
220 ··················</span><span·class="p"·data-group-id="6622637127-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Acc</span><span·class="p"·data-group-id="6622637127-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">220 ··················</span><span·class="p"·data-group-id="4211136558-5">(</span><span·class="p">_</span><span·class="p">,</span><span·class="n">Acc</span><span·class="p"·data-group-id="4211136558-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">
221 ··········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">221 ··········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
222 ··········</span><span·class="p"·data-group-id="6622637127-6">[</span><span·class="p"·data-group-id="6622637127-6">]</span><span·class="p">,</span><span·class="w">222 ··········</span><span·class="p"·data-group-id="4211136558-6">[</span><span·class="p"·data-group-id="4211136558-6">]</span><span·class="p">,</span><span·class="w">
223 ··········</span><span·class="ss">emp_tab</span><span·class="p"·data-group-id="6622637127-1">)</span><span·class="p">.</span></code></pre><p>The·result·is·<code·class="inline">[&quot;052341&quot;,&quot;076324&quot;,&quot;535216&quot;,&quot;789789&quot;,&quot;989891&quot;]</code>,·as·expected.·The223 ··········</span><span·class="ss">emp_tab</span><span·class="p"·data-group-id="4211136558-1">)</span><span·class="p">.</span></code></pre><p>The·result·is·<code·class="inline">[&quot;052341&quot;,&quot;076324&quot;,&quot;535216&quot;,&quot;789789&quot;,&quot;989891&quot;]</code>,·as·expected.·The
224 equivalent·expression·using·a·handwritten·match·specification·would·look·like224 equivalent·expression·using·a·handwritten·match·specification·would·look·like
225 this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="5050051032-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5050051032-2">[</span><span·class="p"·data-group-id="5050051032-3">{</span><span·class="o">#</span><span·class="ss">emp</spa[·...·truncated·by·diffoscope;·len:·551,·SHA:·29068ea09e3a47c05619ec5e00f07eb3392f309d0a3979c586855837e571f4c8·...·]-4">}</span><span·class="p">,</span><span·class="w">225 this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="6605473244-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6605473244-2">[</span><span·class="p"·data-group-id="6605473244-3">{</span><span·class="o">#</span><span·class="ss">emp</spa[·...·truncated·by·diffoscope;·len:·551,·SHA:·3330996177a97f8037e59e501854b801c92b978670077ab594db7f077e7a12b0·...·]-4">}</span><span·class="p">,</span><span·class="w">
226 ·····················</span><span·class="p"·data-group-id="5050051032-5">[</span><span·class="p"·data-group-id="5050051032-6">{</span><span·class="ss">&#39;&lt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·111,·SHA:·437143c1c6e6ebb9d2ef6d7269471b64e3372b99b0e8b0f5ebd4945235a63fcc·...·]-5">]</span><span·class="p">,</span><span·class="w">226 ·····················</span><span·class="p"·data-group-id="6605473244-5">[</span><span·class="p"·data-group-id="6605473244-6">{</span><span·class="ss">&#39;&lt;&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;$2&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·111,·SHA:·c1b04db8fae5c4a6b70ea09e5751fc8a850bc7e7fe42560e19333e06c4ae7d1f·...·]-5">]</span><span·class="p">,</span><span·class="w">
227 ·····················</span><span·class="p"·data-group-id="5050051032-7">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="5050051032-7">]</span><span·class="p"·data-group-id="5050051032-3">}</span><span·class="p"·data-group-id="5050051032-2">]</span><span·class="p"·data-group-id="50500510[·...·truncated·by·diffoscope;·len:·2,·SHA:·e29c9c180c6279b0b02abd6a1801c7c04082cf486ec027aa13515e4f3884bb6b·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·gives·the·same·result.·<code·class="inline">[{'&lt;',·'$2',·2000}]</code>·is·in·the·guard·part·and227 ·····················</span><span·class="p"·data-group-id="6605473244-7">[</span><span·class="ss">&#39;$1&#39;</span><span·class="p"·data-group-id="6605473244-7">]</span><span·class="p"·data-group-id="6605473244-3">}</span><span·class="p"·data-group-id="6605473244-2">]</span><span·class="p"·data-group-id="66054732[·...·truncated·by·diffoscope;·len:·2,·SHA:·71ee45a3c0db9a9865f7313dd3372cf60dca6479d46261f3542eb9346e4a04d6·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·gives·the·same·result.·<code·class="inline">[{'&lt;',·'$2',·2000}]</code>·is·in·the·guard·part·and
228 therefore·discards·anything·that·does·not·have·an·<code·class="inline">empyear</code>·(bound·to·<code·class="inline">'$2'</code>·in228 therefore·discards·anything·that·does·not·have·an·<code·class="inline">empyear</code>·(bound·to·<code·class="inline">'$2'</code>·in
229 the·head)·less·than·2000,·as·the·guard·in·the·<code·class="inline">foldr/3</code>·example.</p><p>We·write·it·using·<a·href="ets.html#fun2ms/1"><code·class="inline">ets:fun2ms/1</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="5735137938-1">(</span><span·class="s">&quot;stdlib/include/ms_transform.hrl&quot;</span><span·class="p"·data-group-id="5735137938-1">)</span><span·class="p">.</span><span·class="w">229 the·head)·less·than·2000,·as·the·guard·in·the·<code·class="inline">foldr/3</code>·example.</p><p>We·write·it·using·<a·href="ets.html#fun2ms/1"><code·class="inline">ets:fun2ms/1</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="9686813722-1">(</span><span·class="s">&quot;stdlib/include/ms_transform.hrl&quot;</span><span·class="p"·data-group-id="9686813722-1">)</span><span·class="p">.</span><span·class="w">
  
230 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="5735137938-2">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="5735137938-3">(</span><span·class="w">230 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="9686813722-2">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="9686813722-3">(</span><span·class="w">
231 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="5735137938-4">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="5735137938-5">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·264,·SHA:·1dbc1e6e1c0f31c70391d49a1c1aa057f3f4a02c064ff41d631dbce3c96597fb·...·]-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">2000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="9686813722-4">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="9686813722-5">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·264,·SHA:·bad7babee19943991c96534b39855899890f091833c46e5c34d14779e1e1ffd9·...·]-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">2000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ···························</span><span·class="n">E</span><span·class="w">232 ···························</span><span·class="n">E</span><span·class="w">
233 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="5735137938-3">)</span><span·class="p"·data-group-id="5735137938-2">)</span><span·class="p">.</span></code></pre><h2·id="module-example-3"·class="section-heading">233 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="9686813722-3">)</span><span·class="p"·data-group-id="9686813722-2">)</span><span·class="p">.</span></code></pre><h2·id="module-example-3"·class="section-heading">
234 ··<a·href="#module-example-3"·class="hover-link">234 ··<a·href="#module-example-3"·class="hover-link">
235 ····<i·class="ri-link-m"·aria-hidden="true"></i>235 ····<i·class="ri-link-m"·aria-hidden="true"></i>
236 ··</a>236 ··</a>
237 ··<span·class="text">Example·3</span>237 ··<span·class="text">Example·3</span>
238 </h2>238 </h2>
239 <p>Assume·that·we·want·the·whole·object·matching·instead·of·only·one·element.·One239 <p>Assume·that·we·want·the·whole·object·matching·instead·of·only·one·element.·One
240 alternative·is·to·assign·a·variable·to·every·part·of·the·record·and·build·it·up240 alternative·is·to·assign·a·variable·to·every·part·of·the·record·and·build·it·up
241 once·again·in·the·body·of·the·fun,·but·the·following·is·easier:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="9571762106-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="9571762106-2">(</span><span·class="w">241 once·again·in·the·body·of·the·fun,·but·the·following·is·easier:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="0810761251-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0810761251-2">(</span><span·class="w">
242 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="9571762106-3">(</span><span·class="n">Obj</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="9571762106-4">{</span><span·class="ss">empno</span><sp[·...·truncated·by·diffoscope;·len:·362,·SHA:·7be4411d634d672cc561ec29dd3bcbd9b246ddea51e609e2a00719ca236afc74·...·]-3">)</span><span·class="w">242 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="0810761251-3">(</span><span·class="n">Obj</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="0810761251-4">{</span><span·class="ss">empno</span><sp[·...·truncated·by·diffoscope;·len:·362,·SHA:·942d759a324ec7b3112ee7f3bfa666d9c40162dba3d60c1507f792fd61fb5265·...·]-3">)</span><span·class="w">
243 ·························</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">2000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">243 ·························</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">2000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
244 ······························</span><span·class="n">Obj</span><span·class="w">244 ······························</span><span·class="n">Obj</span><span·class="w">
245 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="9571762106-2">)</span><span·class="p"·data-group-id="9571762106-1">)</span><span·class="p">.</span></code></pre><p>As·in·ordinary·Erlang·matching,·you·can·bind·a·variable·to·the·whole·matched245 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="0810761251-2">)</span><span·class="p"·data-group-id="0810761251-1">)</span><span·class="p">.</span></code></pre><p>As·in·ordinary·Erlang·matching,·you·can·bind·a·variable·to·the·whole·matched
246 object·using·a·&quot;match·inside·the·match&quot;,·that·is,·a·<code·class="inline">=</code>.·Unfortunately·in·funs246 object·using·a·&quot;match·inside·the·match&quot;,·that·is,·a·<code·class="inline">=</code>.·Unfortunately·in·funs
247 translated·to·match·specifications,·it·is·allowed·only·at·the·&quot;top-level&quot;,·that247 translated·to·match·specifications,·it·is·allowed·only·at·the·&quot;top-level&quot;,·that
248 is,·matching·the·<em>whole</em>·object·arriving·to·be·matched·into·a·separate·variable.248 is,·matching·the·<em>whole</em>·object·arriving·to·be·matched·into·a·separate·variable.
249 If·you·are·used·to·writing·match·specifications·by·hand,·we·mention·that249 If·you·are·used·to·writing·match·specifications·by·hand,·we·mention·that
250 variable·A·is·simply·translated·into·'$_'.·Alternatively,·pseudo·function250 variable·A·is·simply·translated·into·'$_'.·Alternatively,·pseudo·function
251 <code·class="inline">object/0</code>·also·returns·the·whole·matched·object,·see·section251 <code·class="inline">object/0</code>·also·returns·the·whole·matched·object,·see·section
252 <a·href="ms_transform.html#warnings_and_restrictions">Warnings·and·Restrictions</a>.</p><h2·id="module-example-4"·class="section-heading">252 <a·href="ms_transform.html#warnings_and_restrictions">Warnings·and·Restrictions</a>.</p><h2·id="module-example-4"·class="section-heading">
253 ··<a·href="#module-example-4"·class="hover-link">253 ··<a·href="#module-example-4"·class="hover-link">
254 ····<i·class="ri-link-m"·aria-hidden="true"></i>254 ····<i·class="ri-link-m"·aria-hidden="true"></i>
255 ··</a>255 ··</a>
256 ··<span·class="text">Example·4</span>256 ··<span·class="text">Example·4</span>
257 </h2>257 </h2>
258 <p>This·example·concerns·the·body·of·the·fun.·Assume·that·all·employee·numbers258 <p>This·example·concerns·the·body·of·the·fun.·Assume·that·all·employee·numbers
259 beginning·with·zero·(<code·class="inline">0</code>)·must·be·changed·to·begin·with·one·(<code·class="inline">1</code>)·instead,·and259 beginning·with·zero·(<code·class="inline">0</code>)·must·be·changed·to·begin·with·one·(<code·class="inline">1</code>)·instead,·and
260 that·we·want·to·create·the·list·<code·class="inline">[{&lt;Old·empno&gt;,&lt;New·empno&gt;}]</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="2085325142-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="2085325142-2">(</span><span·class="w">260 that·we·want·to·create·the·list·<code·class="inline">[{&lt;Old·empno&gt;,&lt;New·empno&gt;}]</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="0715798827-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0715798827-2">(</span><span·class="w">
261 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="2085325142-3">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="2085325142-4">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·320,·SHA:·169be0f472fac20c247b913b3289de350a794e18cfdfba59a0c2655ca4966d40·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">261 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="0715798827-3">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="0715798827-4">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·320,·SHA:·45ca94ee2cbc28163f2f0533513868b7c476860e3d1d6d268647901403c0c485·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
262 ······························</span><span·class="p"·data-group-id="2085325142-6">{</span><span·class="p"·data-group-id="2085325142-7">[</span><span·class="sc">$0</span><span·class="p">|</span><span·class="n">Rest</span><span·class="p"·data-group-id="2085325142-7">]</span><span·class="p">,</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·197,·SHA:·10d924f91564784b72d930e8dedf0ed741fb1b7767c8ce320ee90b3451145e2e·...·]-6">}</span><span·class="w">262 ······························</span><span·class="p"·data-group-id="0715798827-6">{</span><span·class="p"·data-group-id="0715798827-7">[</span><span·class="sc">$0</span><span·class="p">|</span><span·class="n">Rest</span><span·class="p"·data-group-id="0715798827-7">]</span><span·class="p">,</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·197,·SHA:·2786e6dd1c7e83c1029565a37a32f40193109be24a230c6dcbcdade5095f0eb0·...·]-6">}</span><span·class="w">
263 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="2085325142-2">)</span><span·class="p"·data-group-id="2085325142-1">)</span><span·class="p">.</span></code></pre><p>This·query·hits·the·feature·of·partially·bound·keys·in·table·type·<code·class="inline">ordered_set</code>,263 ······················</span><span·class="k">end</span><span·class="p"·data-group-id="0715798827-2">)</span><span·class="p"·data-group-id="0715798827-1">)</span><span·class="p">.</span></code></pre><p>This·query·hits·the·feature·of·partially·bound·keys·in·table·type·<code·class="inline">ordered_set</code>,
264 so·that·not·the·whole·table·needs·to·be·searched,·only·the·part·containing·keys264 so·that·not·the·whole·table·needs·to·be·searched,·only·the·part·containing·keys
265 beginning·with·<code·class="inline">0</code>·is·looked·into.</p><h2·id="module-example-5"·class="section-heading">265 beginning·with·<code·class="inline">0</code>·is·looked·into.</p><h2·id="module-example-5"·class="section-heading">
266 ··<a·href="#module-example-5"·class="hover-link">266 ··<a·href="#module-example-5"·class="hover-link">
267 ····<i·class="ri-link-m"·aria-hidden="true"></i>267 ····<i·class="ri-link-m"·aria-hidden="true"></i>
268 ··</a>268 ··</a>
269 ··<span·class="text">Example·5</span>269 ··<span·class="text">Example·5</span>
270 </h2>270 </h2>
271 <p>The·fun·can·have·many·clauses.·Assume·that·we·want·to·do·the·following:</p><ul><li>If·an·employee·started·before·1997,·return·the·tuple271 <p>The·fun·can·have·many·clauses.·Assume·that·we·want·to·do·the·following:</p><ul><li>If·an·employee·started·before·1997,·return·the·tuple
272 <code·class="inline">{inventory,·&lt;employee·number&gt;}</code>.</li><li>If·an·employee·started·1997·or·later,·but·before·2001,·return272 <code·class="inline">{inventory,·&lt;employee·number&gt;}</code>.</li><li>If·an·employee·started·1997·or·later,·but·before·2001,·return
273 <code·class="inline">{rookie,·&lt;employee·number&gt;}</code>.</li><li>For·all·other·employees,·return·<code·class="inline">{newbie,·&lt;employee·number&gt;}</code>,·except·for273 <code·class="inline">{rookie,·&lt;employee·number&gt;}</code>.</li><li>For·all·other·employees,·return·<code·class="inline">{newbie,·&lt;employee·number&gt;}</code>,·except·for
274 those·named·<code·class="inline">Smith</code>·as·they·would·be·affronted·by·anything·other·than·the·tag274 those·named·<code·class="inline">Smith</code>·as·they·would·be·affronted·by·anything·other·than·the·tag
275 <code·class="inline">guru</code>·and·that·is·also·what·is·returned·for·their·numbers:275 <code·class="inline">guru</code>·and·that·is·also·what·is·returned·for·their·numbers:
276 <code·class="inline">{guru,·&lt;employee·number&gt;}</code>.</li></ul><p>This·is·accomplished·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="0800529018-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="0800529018-2">(</span><span·class="w">276 <code·class="inline">{guru,·&lt;employee·number&gt;}</code>.</li></ul><p>This·is·accomplished·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">select</span><span·class="p"·data-group-id="4047352106-1">(</span><span·class="ss">emp_tab</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ets</span><span·class="p">:</span><span·class="nf">fun2ms</span><span·class="p"·data-group-id="4047352106-2">(</span><span·class="w">
277 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="0800529018-3">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="0800529018-4">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·304,·SHA:·1701491675d0a48e734110fbe3a1675c16640ec493622a4b9a2946b6ce744b99·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">277 ······················</span><span·class="nf">fun</span><span·class="p"·data-group-id="4047352106-3">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="4047352106-4">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·304,·SHA:·c26b229ad3b4229fc5592d87c67dda4a517591e451bcce719ea2ed9b921ad246·...·]-3">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
278 ······························</span><span·class="p"·data-group-id="0800529018-5">{</span><span·class="ss">guru</span><span·class="p">,</span><span·class="n">E</span><span·class="p"·data-group-id="0800529018-5">}</span><span·class="p">;</span><span·class="w">278 ······························</span><span·class="p"·data-group-id="4047352106-5">{</span><span·class="ss">guru</span><span·class="p">,</span><span·class="n">E</span><span·class="p"·data-group-id="4047352106-5">}</span><span·class="p">;</span><span·class="w">
279 ·························</span><span·class="p"·data-group-id="0800529018-6">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="0800529018-7">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·264,·SHA:·a614819e5cadb82972f45506b2d0fd71d549e344ab05b10f963da33b4f3ae17f·...·]-6">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">1997</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">279 ·························</span><span·class="p"·data-group-id="4047352106-6">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="4047352106-7">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><span[·...·truncated·by·diffoscope;·len:·264,·SHA:·875c45db1a88793ff92174633b6f6842f9d4d551476d5c5e9ded9f2221da626b·...·]-6">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="mi">1997</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">
280 ······························</span><span·class="p"·data-group-id="0800529018-8">{</span><span·class="ss">inventory</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="0800529018-8">}</span><span·class="p">;</span><span·class="w">280 ······························</span><span·class="p"·data-group-id="4047352106-8">{</span><span·class="ss">inventory</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="4047352106-8">}</span><span·class="p">;</span><span·class="w">
281 ·························</span><span·class="p"·data-group-id="0800529018-9">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="0800529018-10">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><spa[·...·truncated·by·diffoscope;·len:·266,·SHA:·e86768070f25d8680c105313e0f85ded46c72f468b7f3130c48791de53873e7e·...·]-9">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">2001</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">281 ·························</span><span·class="p"·data-group-id="4047352106-9">(</span><span·class="o">#</span><span·class="ss">emp</span><span·class="p"·data-group-id="4047352106-10">{</span><span·class="ss">empno</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">E</span><spa[·...·truncated·by·diffoscope;·len:·266,·SHA:·e270c5aaee471adb339666d79b9be04f9265fde2a2c1c43bbf222589dbb2c4da·...·]-9">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">2001</span><span·class="w">··</span><span·class="p">-&gt;</span><span·class="w">
Max diff block lines reached; 75294/142885 bytes (52.70%) of diff not shown.
24.3 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/notes.html
    
Offset 156, 16 lines modifiedOffset 156, 16 lines modified
156 <a·href="binary.html#split/2"><code·class="inline">binary:split/2,3</code></a></p><p>The·call·<code·class="inline">binary:copy(&lt;&lt;1:1&gt;&gt;,·0)</code>·would·return·an·empty·binary·instead·of·raising·an·exception.·Similarly,·calls·to·<a·href="binary.html#part/2"><code·class="inline">binary:part/2,3</code></a>·attempting·to·extract·0·bytes·at·position·0·of·a·bitstring·would·return·an·empty·binary·instead·of·raising·an·exception.</p><p>Own·Id:·OTP-18743·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7607"·title="">PR-7607</a>,·<a·href="https://github.com/erlang/otp/pull/7628"·title="">PR-7628</a></p></li><li><p>The·documentation·for·the·preprocessor·now·mentions·that·<code·class="inline">defined(Name)</code>·can·be·called·in·the·condition·for·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·directive·to·test·whether·<code·class="inline">Name</code>·is·the·name·of·a·defined·macro.·(This·feature·was·implemented·in·OTP·21.)</p><p>If·a·function·call·in·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·with·a·name·that·is·not·the·name·of·a·guard·BIF,·there·would·not·be·a·compilation·error,·but·would·instead·cause·the·lines·following·the·directive·to·be·skipped.·This·has·now·been·changed·to·be·a·compilation·error.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18784·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/7706"·title="">GH-7706</a>,·<a·href="https://github.com/erlang/otp/pull/7726"·title="">PR-7726</a></p></li><li><p><code·class="inline">get_until</code>·requests·using·the·I/O·protocol·now·correctly·return·a·binary·or·list·when·<code·class="inline">eof</code>·is·the·last·item·returned·by·the·callback.</p><p>Own·Id:·OTP-18930·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7993"·title="">PR-7993</a>,·<a·href="https://github.com/erlang/otp/issues/4992"·title="">GH-4992</a></p></li><li><p>The·error·handling·the·<code·class="inline">simple_one_for_one</code>·supervisor·has·been·enhanced.·A·transient·child·returning·<code·class="inline">ignore</code>·will·no·longer·cause·a·crash.</p><p>Also,·automatic·shutdown·has·been·disabled·because·it·does·not·make·sense·for·this·supervisor·type.·That·is·was·allowed·is·considered·a·bug.·Therefore,·we·don't·consider·this·an·incompatible·change.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-19029·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8230"·title="">PR-8230</a></p></li><li><p>Fix·shell·expansion·to·not·crash·when·expanding·a·map·with·non-atom·keys·and·to·not·list·zero·arity·functions·when·an·argument·has·been·given.</p><p>Own·Id:·OTP-19073·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/8366"·title="">PR-8375</a>·<a·href="https://github.com/erlang/otp/issues/8364"·title="">GH-8365</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">156 <a·href="binary.html#split/2"><code·class="inline">binary:split/2,3</code></a></p><p>The·call·<code·class="inline">binary:copy(&lt;&lt;1:1&gt;&gt;,·0)</code>·would·return·an·empty·binary·instead·of·raising·an·exception.·Similarly,·calls·to·<a·href="binary.html#part/2"><code·class="inline">binary:part/2,3</code></a>·attempting·to·extract·0·bytes·at·position·0·of·a·bitstring·would·return·an·empty·binary·instead·of·raising·an·exception.</p><p>Own·Id:·OTP-18743·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7607"·title="">PR-7607</a>,·<a·href="https://github.com/erlang/otp/pull/7628"·title="">PR-7628</a></p></li><li><p>The·documentation·for·the·preprocessor·now·mentions·that·<code·class="inline">defined(Name)</code>·can·be·called·in·the·condition·for·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·directive·to·test·whether·<code·class="inline">Name</code>·is·the·name·of·a·defined·macro.·(This·feature·was·implemented·in·OTP·21.)</p><p>If·a·function·call·in·an·<code·class="inline">-if</code>·or·<code·class="inline">-elif</code>·with·a·name·that·is·not·the·name·of·a·guard·BIF,·there·would·not·be·a·compilation·error,·but·would·instead·cause·the·lines·following·the·directive·to·be·skipped.·This·has·now·been·changed·to·be·a·compilation·error.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18784·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/7706"·title="">GH-7706</a>,·<a·href="https://github.com/erlang/otp/pull/7726"·title="">PR-7726</a></p></li><li><p><code·class="inline">get_until</code>·requests·using·the·I/O·protocol·now·correctly·return·a·binary·or·list·when·<code·class="inline">eof</code>·is·the·last·item·returned·by·the·callback.</p><p>Own·Id:·OTP-18930·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7993"·title="">PR-7993</a>,·<a·href="https://github.com/erlang/otp/issues/4992"·title="">GH-4992</a></p></li><li><p>The·error·handling·the·<code·class="inline">simple_one_for_one</code>·supervisor·has·been·enhanced.·A·transient·child·returning·<code·class="inline">ignore</code>·will·no·longer·cause·a·crash.</p><p>Also,·automatic·shutdown·has·been·disabled·because·it·does·not·make·sense·for·this·supervisor·type.·That·is·was·allowed·is·considered·a·bug.·Therefore,·we·don't·consider·this·an·incompatible·change.</p><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-19029·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8230"·title="">PR-8230</a></p></li><li><p>Fix·shell·expansion·to·not·crash·when·expanding·a·map·with·non-atom·keys·and·to·not·list·zero·arity·functions·when·an·argument·has·been·given.</p><p>Own·Id:·OTP-19073·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/8366"·title="">PR-8375</a>·<a·href="https://github.com/erlang/otp/issues/8364"·title="">GH-8365</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">
157 ··<a·href="#improvements-and-new-features"·class="hover-link">157 ··<a·href="#improvements-and-new-features"·class="hover-link">
158 ····<i·class="ri-link-m"·aria-hidden="true"></i>158 ····<i·class="ri-link-m"·aria-hidden="true"></i>
159 ··</a>159 ··</a>
160 ··<span·class="text">Improvements·and·New·Features</span>160 ··<span·class="text">Improvements·and·New·Features</span>
161 </h3>161 </h3>
162 <ul><li><p>The·functions·<a·href="sets.html#is_equal/2"><code·class="inline">is_equal/2</code></a>,·<a·href="sets.html#map/2"><code·class="inline">map/2</code></a>,·and·<a·href="sets.html#filtermap/2"><code·class="inline">filtermap/2</code></a>·have·been·added·to·the·modules·<a·href="sets.html"><code·class="inline">sets</code></a>,·<a·href="ordsets.html"><code·class="inline">ordsets</code></a>,·and·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>.</p><p>Own·Id:·OTP-18622·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7183"·title="">PR-7183</a>,·<a·href="https://github.com/erlang/otp/pull/7232"·title="">PR-7232</a></p></li><li><p>The·compiler·now·emits·nicer·error·message·for·function·head·mismatches.162 <ul><li><p>The·functions·<a·href="sets.html#is_equal/2"><code·class="inline">is_equal/2</code></a>,·<a·href="sets.html#map/2"><code·class="inline">map/2</code></a>,·and·<a·href="sets.html#filtermap/2"><code·class="inline">filtermap/2</code></a>·have·been·added·to·the·modules·<a·href="sets.html"><code·class="inline">sets</code></a>,·<a·href="ordsets.html"><code·class="inline">ordsets</code></a>,·and·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>.</p><p>Own·Id:·OTP-18622·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7183"·title="">PR-7183</a>,·<a·href="https://github.com/erlang/otp/pull/7232"·title="">PR-7232</a></p></li><li><p>The·compiler·now·emits·nicer·error·message·for·function·head·mismatches.
163 For·example,·given:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">a</span><span·class="p"·data-group-id="5546817097-1">(</span><span·class="p"·data-group-id="5546817097-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">163 For·example,·given:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">a</span><span·class="p"·data-group-id="6752762781-1">(</span><span·class="p"·data-group-id="6752762781-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
164 </span><span·class="nf">a</span><span·class="p"·data-group-id="5546817097-2">(</span><span·class="p">_</span><span·class="p"·data-group-id="5546817097-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p>Erlang/OTP·26·and·earlier·would·emit·a·diagnostic·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch164 </span><span·class="nf">a</span><span·class="p"·data-group-id="6752762781-2">(</span><span·class="p">_</span><span·class="p"·data-group-id="6752762781-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">error</span><span·class="p">.</span></code></pre><p>Erlang/OTP·26·and·earlier·would·emit·a·diagnostic·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch
165 %····6|·a(_)·-&gt;·error.165 %····6|·a(_)·-&gt;·error.
166 %·····|·^</code></pre><p>while·in·Erlang/OTP·27·the·diagnostic·is·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch:·function·a·with·arities·0·and·1·is·regarded·as·two·distinct·functions.·Is·the·number·of·arguments·incorrect·or·is·the·semicolon·in·a/0·unwanted?166 %·····|·^</code></pre><p>while·in·Erlang/OTP·27·the·diagnostic·is·similar·to:</p><pre><code·class="text">t.erl:6:1:·head·mismatch:·function·a·with·arities·0·and·1·is·regarded·as·two·distinct·functions.·Is·the·number·of·arguments·incorrect·or·is·the·semicolon·in·a/0·unwanted?
167 %····6|·a(_)·-&gt;·error.167 %····6|·a(_)·-&gt;·error.
168 %·····|·^</code></pre><p>Own·Id:·OTP-18648·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7383"·title="">PR-7383</a></p></li><li><p><a·href="zip.html#create/2"><code·class="inline">zip:create/2,3</code></a>·will·now·tolerate·POSIX·timestamps·in·the·provided·<code·class="inline">file_info</code>·records.</p><p>Own·Id:·OTP-18668</p></li><li><p>The·callback·function·<a·href="gen_statem.html#c:handle_event/4"><code·class="inline">gen_statem:handle_event/4</code></a>·has·been·cached·in·the·<code·class="inline">gen_statem</code>·engine·to·optimize·callback·call·speed.</p><p>Own·Id:·OTP-18671·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7419"·title="">PR-7419</a></p></li><li><p>The·type·<code·class="inline">beam_lib:beam/0</code>·is·now·exported.</p><p>Own·Id:·OTP-18716·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7534"·title="">PR-7534</a></p></li><li><p>The·documentation·for·the·<a·href="binary.html"><code·class="inline">binary</code></a>·module·has·been·improved.</p><p>Own·Id:·OTP-18741·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7585"·title="">PR-7585</a></p></li><li><p><a·href="binary.html#replace/3"><code·class="inline">binary:replace/3,4</code></a>·now·supports·using·a·fun·for·supplying·the·replacement·binary.</p><p>Own·Id:·OTP-18742·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7590"·title="">PR-7590</a></p></li><li><p>Triple-Quoted·Strings·has·been·implemented·as·per·<a·href="https://www.erlang.org/eeps/eep-0064">EEP·64</a>.·See·<a·href="../../../../doc/system/data_types.html#string">String</a>·in·the·Reference·Manual.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;168 %·····|·^</code></pre><p>Own·Id:·OTP-18648·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7383"·title="">PR-7383</a></p></li><li><p><a·href="zip.html#create/2"><code·class="inline">zip:create/2,3</code></a>·will·now·tolerate·POSIX·timestamps·in·the·provided·<code·class="inline">file_info</code>·records.</p><p>Own·Id:·OTP-18668</p></li><li><p>The·callback·function·<a·href="gen_statem.html#c:handle_event/4"><code·class="inline">gen_statem:handle_event/4</code></a>·has·been·cached·in·the·<code·class="inline">gen_statem</code>·engine·to·optimize·callback·call·speed.</p><p>Own·Id:·OTP-18671·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7419"·title="">PR-7419</a></p></li><li><p>The·type·<code·class="inline">beam_lib:beam/0</code>·is·now·exported.</p><p>Own·Id:·OTP-18716·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7534"·title="">PR-7534</a></p></li><li><p>The·documentation·for·the·<a·href="binary.html"><code·class="inline">binary</code></a>·module·has·been·improved.</p><p>Own·Id:·OTP-18741·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7585"·title="">PR-7585</a></p></li><li><p><a·href="binary.html#replace/3"><code·class="inline">binary:replace/3,4</code></a>·now·supports·using·a·fun·for·supplying·the·replacement·binary.</p><p>Own·Id:·OTP-18742·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7590"·title="">PR-7590</a></p></li><li><p>Triple-Quoted·Strings·has·been·implemented·as·per·<a·href="https://www.erlang.org/eeps/eep-0064">EEP·64</a>.·See·<a·href="../../../../doc/system/data_types.html#string">String</a>·in·the·Reference·Manual.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;
169 ···a169 ···a
170 ···b170 ···b
171 ···c171 ···c
Offset 190, 20 lines modifiedOffset 190, 20 lines modified
190 3&gt;·</span><span·class="s">~S&quot;\s*(\w+)&quot;</span><span·class="p">.</span><span·class="w">190 3&gt;·</span><span·class="s">~S&quot;\s*(\w+)&quot;</span><span·class="p">.</span><span·class="w">
191 </span><span·class="s">&quot;\\s*(\\w+)&quot;</span><span·class="gp·unselectable">191 </span><span·class="s">&quot;\\s*(\\w+)&quot;</span><span·class="gp·unselectable">
192 4&gt;·</span><span·class="s">~B&quot;\s*(\w+)&quot;</span><span·class="p">.</span><span·class="w">192 4&gt;·</span><span·class="s">~B&quot;\s*(\w+)&quot;</span><span·class="p">.</span><span·class="w">
193 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;\\s*(\\w+)&quot;</span><span·class="p">&gt;&gt;</span></code></pre><p>Own·Id:·OTP-18825·Aux·Id:·OTP-18750,·<a·href="https://github.com/erlang/otp/pull/7684"·title="">PR-7684</a></p></li><li><p>Functions·<a·href="shell.html#default_multiline_prompt/1"><code·class="inline">shell:default_multiline_prompt/1</code></a>,·<a·href="shell.html#inverted_space_prompt/1"><code·class="inline">shell:inverted_space_prompt/1</code></a>,·and·193 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;\\s*(\\w+)&quot;</span><span·class="p">&gt;&gt;</span></code></pre><p>Own·Id:·OTP-18825·Aux·Id:·OTP-18750,·<a·href="https://github.com/erlang/otp/pull/7684"·title="">PR-7684</a></p></li><li><p>Functions·<a·href="shell.html#default_multiline_prompt/1"><code·class="inline">shell:default_multiline_prompt/1</code></a>,·<a·href="shell.html#inverted_space_prompt/1"><code·class="inline">shell:inverted_space_prompt/1</code></a>,·and·
194 <a·href="shell.html#prompt_width/1"><code·class="inline">shell:prompt_width/1</code></a>·have·been·exported·to·help·with·custom·prompt·implementations.</p><p>Own·Id:·OTP-18834·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7816"·title="">PR-7675</a></p></li><li><p>The·shell·now·pages·long·output·from·the·documentation·help·command·(<code·class="inline">h(Module)</code>),·auto·completions·and·the·search·command.</p><p>Own·Id:·OTP-18846·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7845"·title="">PR-7845</a></p></li><li><p>The·<code·class="inline">M-h</code>·hotkey·(Alt/Option-h)·now·outputs·help·for·the·module·or·function·directly·before·the·cursor.</p><p>Own·Id:·OTP-18847·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7846"·title="">PR-7846</a></p></li><li><p>Added·support·for·adding·a·custom·code·formatter·that·formats·your·multi-line·shell·commands·in·your·preferred·formatting·on·submission.·See·<code·class="inline">shell:format_shell_func/</code>·and·<a·href="shell.html#erl_pp_format_func/1"><code·class="inline">shell:erl_pp_format_func/1</code></a>.</p><p>Own·Id:·OTP-18848·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7847"·title="">PR-7847</a></p></li><li><p>Added·shell·functions·for·viewing,·forgetting·and·saving·locally·defined·functions,·types·and·records.</p><p>Own·Id:·OTP-18852·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7844"·title="">PR-7844</a></p></li><li><p>Added·<a·href="string.html#jaro_similarity/2"><code·class="inline">string:jaro_similarity/2</code></a>,·which·can·be·used·to·calculate·the·similarity·between·two·strings.</p><p>Own·Id:·OTP-18865·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7879"·title="">PR-7879</a></p></li><li><p>The·new·function·<a·href="ets.html#update_element/4"><code·class="inline">ets:update_element/4</code></a>·is·similar·to·<a·href="ets.html#update_element/3"><code·class="inline">ets:update_element/3</code></a>,·but·takes·a·default·tuple·as·the·fourth·argument,·which·will·be·inserted·if·no·previous·record·with·that·key·exists.</p><p>Own·Id:·OTP-18870·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7857"·title="">PR-7857</a></p></li><li><p>Added·functions·to·retrieve·the·next·higher·or·lower·key/element·from·<a·href="gb_trees.html"><code·class="inline">gb_trees</code></a>·and·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>,·as·well·as·returning·iterators·that·start·at·given·keys/elements.</p><p>Own·Id:·OTP-18874·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7745"·title="">PR-7745</a></p></li><li><p>When·the·shell·built-in·function·<a·href="c.html#c/1"·title=""><code·class="inline">c/1,2</code></a>·is·used·to·re-compile·a·module,·the·current·working·directory·of·the·original·compilation·is·now·added·to·the·include·path.</p><p>Own·Id:·OTP-18908·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7957"·title="">PR-7957</a></p></li><li><p>The·<code·class="inline">timer</code>·module·now·uses·a·private·table·for·its·internal·state,·slightly·improving·its·performance.</p><p>Own·Id:·OTP-18914·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7973"·title="">PR-7973</a></p></li><li><p><a·href="https://www.erlang.org/eeps/eep-0059">EEP-59·-·Documentation·Attributes</a>·has·been·implemented.</p><p>Documentation·attributes·can·be·used·to·document·functions,·types,·callbacks,·and·modules.194 <a·href="shell.html#prompt_width/1"><code·class="inline">shell:prompt_width/1</code></a>·have·been·exported·to·help·with·custom·prompt·implementations.</p><p>Own·Id:·OTP-18834·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7816"·title="">PR-7675</a></p></li><li><p>The·shell·now·pages·long·output·from·the·documentation·help·command·(<code·class="inline">h(Module)</code>),·auto·completions·and·the·search·command.</p><p>Own·Id:·OTP-18846·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7845"·title="">PR-7845</a></p></li><li><p>The·<code·class="inline">M-h</code>·hotkey·(Alt/Option-h)·now·outputs·help·for·the·module·or·function·directly·before·the·cursor.</p><p>Own·Id:·OTP-18847·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7846"·title="">PR-7846</a></p></li><li><p>Added·support·for·adding·a·custom·code·formatter·that·formats·your·multi-line·shell·commands·in·your·preferred·formatting·on·submission.·See·<code·class="inline">shell:format_shell_func/</code>·and·<a·href="shell.html#erl_pp_format_func/1"><code·class="inline">shell:erl_pp_format_func/1</code></a>.</p><p>Own·Id:·OTP-18848·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7847"·title="">PR-7847</a></p></li><li><p>Added·shell·functions·for·viewing,·forgetting·and·saving·locally·defined·functions,·types·and·records.</p><p>Own·Id:·OTP-18852·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7844"·title="">PR-7844</a></p></li><li><p>Added·<a·href="string.html#jaro_similarity/2"><code·class="inline">string:jaro_similarity/2</code></a>,·which·can·be·used·to·calculate·the·similarity·between·two·strings.</p><p>Own·Id:·OTP-18865·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7879"·title="">PR-7879</a></p></li><li><p>The·new·function·<a·href="ets.html#update_element/4"><code·class="inline">ets:update_element/4</code></a>·is·similar·to·<a·href="ets.html#update_element/3"><code·class="inline">ets:update_element/3</code></a>,·but·takes·a·default·tuple·as·the·fourth·argument,·which·will·be·inserted·if·no·previous·record·with·that·key·exists.</p><p>Own·Id:·OTP-18870·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7857"·title="">PR-7857</a></p></li><li><p>Added·functions·to·retrieve·the·next·higher·or·lower·key/element·from·<a·href="gb_trees.html"><code·class="inline">gb_trees</code></a>·and·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>,·as·well·as·returning·iterators·that·start·at·given·keys/elements.</p><p>Own·Id:·OTP-18874·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7745"·title="">PR-7745</a></p></li><li><p>When·the·shell·built-in·function·<a·href="c.html#c/1"·title=""><code·class="inline">c/1,2</code></a>·is·used·to·re-compile·a·module,·the·current·working·directory·of·the·original·compilation·is·now·added·to·the·include·path.</p><p>Own·Id:·OTP-18908·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7957"·title="">PR-7957</a></p></li><li><p>The·<code·class="inline">timer</code>·module·now·uses·a·private·table·for·its·internal·state,·slightly·improving·its·performance.</p><p>Own·Id:·OTP-18914·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7973"·title="">PR-7973</a></p></li><li><p><a·href="https://www.erlang.org/eeps/eep-0059">EEP-59·-·Documentation·Attributes</a>·has·been·implemented.</p><p>Documentation·attributes·can·be·used·to·document·functions,·types,·callbacks,·and·modules.
195 The·keyword·<code·class="inline">-moduledoc·&quot;Documentation·here&quot;.</code>·is·used·to·document·modules,·while·<code·class="inline">-doc·&quot;Documentation·here&quot;.</code>·can·be·used·on·top·of·functions,·types,·and·callbacks·to·document·them,·respectively.</p><ul><li><p>Types,·callbacks,·and·function·documentation·can·be·set·to·<code·class="inline">hidden</code>·either·via·<code·class="inline">-doc·false</code>·or·<code·class="inline">-doc·hidden</code>.·When·documentation·attributes·mark·a·type·as·hidden,·they·will·not·be·part·of·the·documentation.</p></li><li><p>The·documentation·from·<code·class="inline">moduledoc</code>·and·<code·class="inline">doc</code>·gets·added·by·default·to·the·binary·beam·file,·following·the·format·of·<a·href="https://www.erlang.org/eeps/eep-0048">EEP-48</a>.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_doc</code>·will·raise·a·warning·when195 The·keyword·<code·class="inline">-moduledoc·&quot;Documentation·here&quot;.</code>·is·used·to·document·modules,·while·<code·class="inline">-doc·&quot;Documentation·here&quot;.</code>·can·be·used·on·top·of·functions,·types,·and·callbacks·to·document·them,·respectively.</p><ul><li><p>Types,·callbacks,·and·function·documentation·can·be·set·to·<code·class="inline">hidden</code>·either·via·<code·class="inline">-doc·false</code>·or·<code·class="inline">-doc·hidden</code>.·When·documentation·attributes·mark·a·type·as·hidden,·they·will·not·be·part·of·the·documentation.</p></li><li><p>The·documentation·from·<code·class="inline">moduledoc</code>·and·<code·class="inline">doc</code>·gets·added·by·default·to·the·binary·beam·file,·following·the·format·of·<a·href="https://www.erlang.org/eeps/eep-0048">EEP-48</a>.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_doc</code>·will·raise·a·warning·when
196 <code·class="inline">-doc</code>·attributes·are·missing·in·exported·functions,·types,·and·callbacks.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_spec_documented</code>·will·raise·a·warning·when196 <code·class="inline">-doc</code>·attributes·are·missing·in·exported·functions,·types,·and·callbacks.</p></li><li><p>Using·the·compiler·flag·<code·class="inline">warn_missing_spec_documented</code>·will·raise·a·warning·when
197 spec·attributes·are·missing·in·documented·functions,·types,·and·callbacks.</p></li><li><p><code·class="inline">moduledoc</code>s·and·<code·class="inline">doc</code>s·may·refer·to·external·files·to·be·embedded,·such·as·<code·class="inline">-doc·{file,·&quot;README.md&quot;}.</code>,·which·refers·to·the·file·<code·class="inline">README.md</code>·found·in·the·current·working·directory.</p></li><li><p>The·compiler·warns·about·exported·functions·whose·specs·refer·to·hidden·types.·Thus,·there·will·be·warnings·when·a·hidden·type·(meaning,·the·type·is·not·part·of·the·documentation)·gets·used·in·an·exported·function.</p></li></ul><p>Own·Id:·OTP-18916·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7936"·title="">PR-7936</a></p></li><li><p>New·<a·href="ets.html"><code·class="inline">ets</code></a>·functions·<a·href="ets.html#first_lookup/1"><code·class="inline">ets:first_lookup/1</code></a>,·<a·href="ets.html#next_lookup/2"><code·class="inline">ets:next_lookup/2</code></a>,·<a·href="ets.html#prev_lookup/2"><code·class="inline">ets:prev_lookup/2</code></a>·and·<a·href="ets.html#last_lookup/1"><code·class="inline">ets:last_lookup/1</code></a>.·Example:·<code·class="inline">ets:next_lookup/1</code>·is·equivalent·to·<a·href="ets.html#next/2"><code·class="inline">ets:next/2</code></a>·followed·by·<a·href="ets.html#lookup/2"><code·class="inline">ets:lookup/2</code></a>·with·the·next·key.·The·new·combined·functions·are·more·efficient·and·with·guaranteed·atomicity.</p><p>Own·Id:·OTP-18923·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/6791"·title="">PR-6791</a></p></li><li><p>The·<code·class="inline">maybe</code>·expression·is·now·enabled·by·default.</p><p>To·use·<code·class="inline">maybe</code>·as·an·atom,·it·needs·to·be·single-quoted.·Alternatively,·the·<code·class="inline">maybe</code>·expression·can·be·disabled·by·disabling·the·<code·class="inline">maybe_expr</code>·feature.·That·can·be·done·by·placing·the·following·the·line·at·the·beginning·of·an·Erlang·source·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">feature</span><span·class="p"·data-group-id="3751961818-1">(</span><span·class="ss">maybe_expr</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disable</span><span·class="p"·data-group-id="3751961818-1">)</span><span·class="p">.</span></code></pre><p>Another·way·to·disable·the·<[·...·truncated·by·diffoscope;·len:·688,·SHA:·955df342333b95b2c605bb8f406b2d06632a1615db792beffa63d7b1780ce21b·...·]-1">)</span><span·class="p">.</span><span·class="w">197 spec·attributes·are·missing·in·documented·functions,·types,·and·callbacks.</p></li><li><p><code·class="inline">moduledoc</code>s·and·<code·class="inline">doc</code>s·may·refer·to·external·files·to·be·embedded,·such·as·<code·class="inline">-doc·{file,·&quot;README.md&quot;}.</code>,·which·refers·to·the·file·<code·class="inline">README.md</code>·found·in·the·current·working·directory.</p></li><li><p>The·compiler·warns·about·exported·functions·whose·specs·refer·to·hidden·types.·Thus,·there·will·be·warnings·when·a·hidden·type·(meaning,·the·type·is·not·part·of·the·documentation)·gets·used·in·an·exported·function.</p></li></ul><p>Own·Id:·OTP-18916·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7936"·title="">PR-7936</a></p></li><li><p>New·<a·href="ets.html"><code·class="inline">ets</code></a>·functions·<a·href="ets.html#first_lookup/1"><code·class="inline">ets:first_lookup/1</code></a>,·<a·href="ets.html#next_lookup/2"><code·class="inline">ets:next_lookup/2</code></a>,·<a·href="ets.html#prev_lookup/2"><code·class="inline">ets:prev_lookup/2</code></a>·and·<a·href="ets.html#last_lookup/1"><code·class="inline">ets:last_lookup/1</code></a>.·Example:·<code·class="inline">ets:next_lookup/1</code>·is·equivalent·to·<a·href="ets.html#next/2"><code·class="inline">ets:next/2</code></a>·followed·by·<a·href="ets.html#lookup/2"><code·class="inline">ets:lookup/2</code></a>·with·the·next·key.·The·new·combined·functions·are·more·efficient·and·with·guaranteed·atomicity.</p><p>Own·Id:·OTP-18923·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/6791"·title="">PR-6791</a></p></li><li><p>The·<code·class="inline">maybe</code>·expression·is·now·enabled·by·default.</p><p>To·use·<code·class="inline">maybe</code>·as·an·atom,·it·needs·to·be·single-quoted.·Alternatively,·the·<code·class="inline">maybe</code>·expression·can·be·disabled·by·disabling·the·<code·class="inline">maybe_expr</code>·feature.·That·can·be·done·by·placing·the·following·the·line·at·the·beginning·of·an·Erlang·source·file:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">feature</span><span·class="p"·data-group-id="5844310286-1">(</span><span·class="ss">maybe_expr</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">disable</span><span·class="p"·data-group-id="5844310286-1">)</span><span·class="p">.</span></code></pre><p>Another·way·to·disable·the·<[·...·truncated·by·diffoscope;·len:·688,·SHA:·7525ccc2a79d8471161eaa463b719e84d11b2392161c90003cabf831f10b718b·...·]-1">)</span><span·class="p">.</span><span·class="w">
198 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0112882237-2">(</span><span·class="p"·data-group-id="0112882237-3">[</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="0112882237-3">]</span><span·class="p"·data-group-id="0112882237-2">)</span><span·class="p">.</span><span·class="w">198 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4045454558-2">(</span><span·class="p"·data-group-id="4045454558-3">[</span><span·class="ss">f</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4045454558-3">]</span><span·class="p"·data-group-id="4045454558-2">)</span><span·class="p">.</span><span·class="w">
199 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="0112882237-4">(</span><span·class="ss">r</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0112882237-5">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·109,·SHA:·1e950c9155257c16274d8427fa7772249c463a0791ef87ee8e338263ea7d1fee·...·]-4">)</span><span·class="p">.</span><span·class="w">199 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="4045454558-4">(</span><span·class="ss">r</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4045454558-5">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·109,·SHA:·69733623249b267ec2e9d7cd7d811257dff903a129313def940f1519c2bcea38·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
200 </span><span·class="nf">f</span><span·class="p"·data-group-id="0112882237-6">(</span><span·class="p"·data-group-id="0112882237-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">200 </span><span·class="nf">f</span><span·class="p"·data-group-id="4045454558-6">(</span><span·class="p"·data-group-id="4045454558-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
201 ····</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="0112882237-7">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="mi">1</span><span·class="p"·data-group-id="0112882237-7">}</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="0112882237-8">{</span><span[·...·truncated·by·diffoscope;·len:·110,·SHA:·c4f713f63e23559088578407da770f69bf05b96a6cf7e15bba06376b3997da5b·...·]-8">}</span><span·class="p">.</span></code></pre><p>The·compiler·raises·the·following·warning:</p><pre><code·class="text">1&gt;·c(t).201 ····</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="4045454558-7">{</span><span·class="ss">a</span><span·class="o">=</span><span·class="mi">1</span><span·class="p"·data-group-id="4045454558-7">}</span><span·class="o">#</span><span·class="ss">r</span><span·class="p"·data-group-id="4045454558-8">{</span><span[·...·truncated·by·diffoscope;·len:·110,·SHA:·fa17402f939e2849ed786f3c1c320eab09b9bbb8e53dea9087533dc5c1c09487·...·]-8">}</span><span·class="p">.</span></code></pre><p>The·compiler·raises·the·following·warning:</p><pre><code·class="text">1&gt;·c(t).
202 t.erl:6:12:·Warning:·expression·updates·a·literal202 t.erl:6:12:·Warning:·expression·updates·a·literal
203 %····6|·····#r{a=1}#r{b=2}.203 %····6|·····#r{a=1}#r{b=2}.
204 %·····|············^</code></pre><p>Own·Id:·OTP-18951·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8069"·title="">PR-8069</a></p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>Optimized·<code·class="inline">ets:foldl</code>·and·<code·class="inline">ets:foldr</code>·to·use·new·<code·class="inline">ets:next_lookup</code>.·Also·made·them·immune·against·table·renaming.</p><p>Own·Id:·OTP-18993·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8048"·title="">PR-8048</a></p></li><li><p>Windows·now·supports·all·functions·in·<a·href="math.html"><code·class="inline">math</code></a>.</p><p>Own·Id:·OTP-19001·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8164"·title="">PR-8164</a></p></li><li><p><a·href="erl_lint.html"><code·class="inline">erl_lint</code></a>·(and·by·extension·the·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html"><code·class="inline">compiler</code></a>)·will·now·warn·for·code·using·deprecated·callbacks.</p><p>The·only·callback·currenly·deprecated·is·<code·class="inline">format_status/2</code>·in·<a·href="gen_server.html#c:format_status/2"><code·class="inline">gen_server</code></a>,·<a·href="gen_event.html#c:format_status/2"><code·class="inline">gen_event</code></a>·and·<a·href="gen_server.html#c:format_status/2"><code·class="inline">gen_statem</code></a>.</p><p>You·can·use·<code·class="inline">nowarn_deprecated_callback</code>·to·silence·the·warning.</p><p>Own·Id:·OTP-19010·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8205"·title="">PR-8205</a></p></li><li><p>There·is·a·new·module·<a·href="json.html"><code·class="inline">json</code></a>·for·encoding·and·decoding·<a·href="https://en.wikipedia.org/wiki/JSON">JSON</a>.</p><p>Both·encoding·and·decoding·can·be·customized.·Decoding·can·be·done·in·a·SAX-like·fashion·and·handle·multiple·documents·and·streams·of·data.</p><p>Own·Id:·OTP-19020·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8111"·title="">PR-8111</a></p></li></ul><h2·id="stdlib-5-2-3"·class="section-heading">204 %·····|············^</code></pre><p>Own·Id:·OTP-18951·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8069"·title="">PR-8069</a></p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>Optimized·<code·class="inline">ets:foldl</code>·and·<code·class="inline">ets:foldr</code>·to·use·new·<code·class="inline">ets:next_lookup</code>.·Also·made·them·immune·against·table·renaming.</p><p>Own·Id:·OTP-18993·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8048"·title="">PR-8048</a></p></li><li><p>Windows·now·supports·all·functions·in·<a·href="math.html"><code·class="inline">math</code></a>.</p><p>Own·Id:·OTP-19001·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8164"·title="">PR-8164</a></p></li><li><p><a·href="erl_lint.html"><code·class="inline">erl_lint</code></a>·(and·by·extension·the·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html"><code·class="inline">compiler</code></a>)·will·now·warn·for·code·using·deprecated·callbacks.</p><p>The·only·callback·currenly·deprecated·is·<code·class="inline">format_status/2</code>·in·<a·href="gen_server.html#c:format_status/2"><code·class="inline">gen_server</code></a>,·<a·href="gen_event.html#c:format_status/2"><code·class="inline">gen_event</code></a>·and·<a·href="gen_server.html#c:format_status/2"><code·class="inline">gen_statem</code></a>.</p><p>You·can·use·<code·class="inline">nowarn_deprecated_callback</code>·to·silence·the·warning.</p><p>Own·Id:·OTP-19010·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8205"·title="">PR-8205</a></p></li><li><p>There·is·a·new·module·<a·href="json.html"><code·class="inline">json</code></a>·for·encoding·and·decoding·<a·href="https://en.wikipedia.org/wiki/JSON">JSON</a>.</p><p>Both·encoding·and·decoding·can·be·customized.·Decoding·can·be·done·in·a·SAX-like·fashion·and·handle·multiple·documents·and·streams·of·data.</p><p>Own·Id:·OTP-19020·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8111"·title="">PR-8111</a></p></li></ul><h2·id="stdlib-5-2-3"·class="section-heading">
205 ··<a·href="#stdlib-5-2-3"·class="hover-link">205 ··<a·href="#stdlib-5-2-3"·class="hover-link">
206 ····<i·class="ri-link-m"·aria-hidden="true"></i>206 ····<i·class="ri-link-m"·aria-hidden="true"></i>
207 ··</a>207 ··</a>
208 ··<span·class="text">STDLIB·5.2.3</span>208 ··<span·class="text">STDLIB·5.2.3</span>
123 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/orddict.html
    
Offset 138, 21 lines modifiedOffset 138, 21 lines modified
138 ··<a·href="#module-notes"·class="hover-link">138 ··<a·href="#module-notes"·class="hover-link">
139 ····<i·class="ri-link-m"·aria-hidden="true"></i>139 ····<i·class="ri-link-m"·aria-hidden="true"></i>
140 ··</a>140 ··</a>
141 ··<span·class="text">Notes</span>141 ··<span·class="text">Notes</span>
142 </h2>142 </h2>
143 <p><a·href=""·id="notes"></a></p><p>Functions·<a·href="#append/3"><code·class="inline">append/3</code></a>·and·<a·href="#append_list/3"><code·class="inline">append_list/3</code></a>·are143 <p><a·href=""·id="notes"></a></p><p>Functions·<a·href="#append/3"><code·class="inline">append/3</code></a>·and·<a·href="#append_list/3"><code·class="inline">append_list/3</code></a>·are
144 included·so·that·keyed·values·can·be·stored·in·a·list·<em>accumulator</em>,·for144 included·so·that·keyed·values·can·be·stored·in·a·list·<em>accumulator</em>,·for
145 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">D0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="2473740971-1">(</span><span·class="p"·data-group-id="2473740971-1">)</span><span·class="p">,</span><span·class="w">145 example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">D0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="0722599137-1">(</span><span·class="p"·data-group-id="0722599137-1">)</span><span·class="p">,</span><span·class="w">
146 ··</span><span·class="n">D1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">store</span><span·class="p"·data-group-id="2473740971-2">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2473740971-3">[</span><span·class="p"·data-group-id="2473740971-3">]</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·63,·SHA:·92777d1725210a9d266271664d4c7276c0512cac1a5602b5c4e03f1b5db8183b·...·]-2">)</span><span·class="p">,</span><span·class="w">146 ··</span><span·class="n">D1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">store</span><span·class="p"·data-group-id="0722599137-2">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0722599137-3">[</span><span·class="p"·data-group-id="0722599137-3">]</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·63,·SHA:·45063ce1d6e75d643f8a6f3dcbe3bd1c33d948308814873abd251fba72b9de93·...·]-2">)</span><span·class="p">,</span><span·class="w">
147 ··</span><span·class="n">D2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="2473740971-4">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p"·data-group-id="2473740971-4">)</span><span·class="p">,</span><span·class="w">147 ··</span><span·class="n">D2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="0722599137-4">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D1</span><span·class="p"·data-group-id="0722599137-4">)</span><span·class="p">,</span><span·class="w">
148 ··</span><span·class="n">D3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="2473740971-5">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p"·data-group-id="2473740971-5">)</span><span·class="p">,</span><span·class="w">148 ··</span><span·class="n">D3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="0722599137-5">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D2</span><span·class="p"·data-group-id="0722599137-5">)</span><span·class="p">,</span><span·class="w">
149 ··</span><span·class="n">D4</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="2473740971-6">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D3</span><span·class="p"·data-group-id="2473740971-6">)</span><span·class="p">,</span><span·class="w">149 ··</span><span·class="n">D4</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="0722599137-6">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">f3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D3</span><span·class="p"·data-group-id="0722599137-6">)</span><span·class="p">,</span><span·class="w">
150 ··</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="2473740971-7">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D4</span><span·class="p"·data-group-id="2473740971-7">)</span><span·class="p">.</span><span·class="w">150 ··</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="0722599137-7">(</span><span·class="ss">files</span><span·class="p">,</span><span·class="w">·</span><span·class="n">D4</span><span·class="p"·data-group-id="0722599137-7">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p"·data-group-id="2473740971-8">[</span><span·class="ss">f1</span><span·class="p">,</span><span·class="ss">f2</span><span·class="p">,</span><span·class="ss">f3</span><span·class="p"·data-group-id="2473740971-8">]</span></code></pre><p>This·saves·the·trouble·of·first·fetching·a·keyed·value,·appending·a·new·value·to151 </span><span·class="p"·data-group-id="0722599137-8">[</span><span·class="ss">f1</span><span·class="p">,</span><span·class="ss">f2</span><span·class="p">,</span><span·class="ss">f3</span><span·class="p"·data-group-id="0722599137-8">]</span></code></pre><p>This·saves·the·trouble·of·first·fetching·a·keyed·value,·appending·a·new·value·to
152 the·list·of·stored·values,·and·storing·the·result.</p><p>Function·<a·href="#fetch/2"><code·class="inline">fetch/2</code></a>·is·to·be·used·if·the·key·is·known·to·be·in·the152 the·list·of·stored·values,·and·storing·the·result.</p><p>Function·<a·href="#fetch/2"><code·class="inline">fetch/2</code></a>·is·to·be·used·if·the·key·is·known·to·be·in·the
153 dictionary,·otherwise·function·<a·href="#find/2"><code·class="inline">find/2</code></a>.</p><h2·id="module-see-also"·class="section-heading">153 dictionary,·otherwise·function·<a·href="#find/2"><code·class="inline">find/2</code></a>.</p><h2·id="module-see-also"·class="section-heading">
154 ··<a·href="#module-see-also"·class="hover-link">154 ··<a·href="#module-see-also"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">See·Also</span>157 ··<span·class="text">See·Also</span>
158 </h2>158 </h2>
Offset 533, 24 lines modifiedOffset 533, 24 lines modified
533 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append(Key,·Value,·Orddict1)·->·Orddict2533 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append(Key,·Value,·Orddict1)·->·Orddict2
534 ················when·Orddict1·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value),·Orddict2·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>534 ················when·Orddict1·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value),·Orddict2·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>
  
535 ······</div>535 ······</div>
  
536 <p>Appends·a·new·<code·class="inline">Value</code>·to·the·current·list·of·values·associated·with·<code·class="inline">Key</code>.·An536 <p>Appends·a·new·<code·class="inline">Value</code>·to·the·current·list·of·values·associated·with·<code·class="inline">Key</code>.·An
537 exception·is·generated·if·the·initial·value·associated·with·<code·class="inline">Key</code>·is·not·a·list537 exception·is·generated·if·the·initial·value·associated·with·<code·class="inline">Key</code>·is·not·a·list
538 of·values.</p><p>See·also·section·<a·href="orddict.html#module-notes">Notes</a>.</p><p><em>Example·1:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6237233426-1">(</span><span·class="p"·data-group-id="6237233426-2">[</span><span·class="p"·data-group-id="6237233426-3">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6237233426-4">[</span><span·class="p"·data-group-id="6237233426-4">]</span><span·class="p"·data-group-id="6237233426-3">}</span><span·class="p"·data-group-id="6237233426-2">]</span><span·class="p"·data-group-id="6237233426-1">)</span><span·class="p">.</span><span·class="w"> 
539 </span><span·class="p"·data-group-id="6237233426-5">[</span><span·class="p"·data-group-id="6237233426-6">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6237233426-7">[</span><span·class="p"·data-group-id="6237233426[·...·truncated·by·diffoscope;·len:·146,·SHA:·2301900b36ae25ada8988feee4801ab6d3b4299bb09e35297bb084d1fdab816e·...·]">538 of·values.</p><p>See·also·section·<a·href="orddict.html#module-notes">Notes</a>.</p><p><em>Example·1:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·671,·SHA:·5b1c632d2013b23c6e9785cee9d835701e9f6d3527658393b3746418ea5af96e·...·]">
 539 </span><span·class="p"·data-group-id="6534296245-5">[</span><span·class="p"·data-group-id="6534296245-6">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6534296245-7">[</span><span·class="p"·data-group-id="6534296245-7">]</span><span·class="p"·data-group-id="6534296245-6">}</span><span·class="p"·data-group-id="6534296245-5">]</span><span·class="gp·unselectable">
540 2&gt;·</span><span·class="n">OrdDict2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6237233426-8">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="6237233426-8">)</span><span·class="p">.</span><span·class="w">540 2&gt;·</span><span·class="n">OrdDict2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6534296245-8">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="6534296245-8">)</span><span·class="p">.</span><span·class="w">
541 </span><span·class="p"·data-group-id="6237233426-9">[</span><span·class="p"·data-group-id="6237233426-10">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6237233426-11">[</span><span·class="mi">1</span><span·class="p"·data-group-id="6237233426-11">]</span[·...·truncated·by·diffoscope;·len:·96,·SHA:·208851080d0becd3d30459afb799ba7dc5fae73b9d4b29af8e5d0c10b65d10b8·...·]-9">]</span><span·class="gp·unselectable">541 </span><span·class="p"·data-group-id="6534296245-9">[</span><span·class="p"·data-group-id="6534296245-10">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6534296245-11">[</span><span·class="mi">1</span><span·class="p"·data-group-id="6534296245-11">]</span[·...·truncated·by·diffoscope;·len:·96,·SHA:·a0dcfc92e13c07af3ef1c72518bd33154e60e3297e3bd748ee96af9a87366619·...·]-9">]</span><span·class="gp·unselectable">
542 3&gt;·</span><span·class="n">OrdDict3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6237233426-12">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict2</span><span·class="p"·data-group-id="6237233426-12">)</span><span·class="p">.</span><span·class="w">542 3&gt;·</span><span·class="n">OrdDict3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6534296245-12">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict2</span><span·class="p"·data-group-id="6534296245-12">)</span><span·class="p">.</span><span·class="w">
543 </span><span·class="p"·data-group-id="6237233426-13">[</span><span·class="p"·data-group-id="6237233426-14">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6237233426-15">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><sp[·...·truncated·by·diffoscope;·len:·146,·SHA:·cbb7a5fedca74a98eb1d89965fac23d1791d7086973310af1892ee20c18c9f51·...·]-13">]</span><span·class="gp·unselectable">543 </span><span·class="p"·data-group-id="6534296245-13">[</span><span·class="p"·data-group-id="6534296245-14">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6534296245-15">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><sp[·...·truncated·by·diffoscope;·len:·146,·SHA:·7294915a57e91db7d5af69f37f8f9d445b37d29889e00a5df9639caf4870e308·...·]-13">]</span><span·class="gp·unselectable">
544 4&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6237233426-16">(</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict3</span><span·class="p"·data-group-id="6237233426-16">)</span><span·class="p">.</span><span·class="w">544 4&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6534296245-16">(</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict3</span><span·class="p"·data-group-id="6534296245-16">)</span><span·class="p">.</span><span·class="w">
545 </span><span·class="p"·data-group-id="6237233426-17">[</span><span·class="p"·data-group-id="6237233426-18">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6237233426-19">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><sp[·...·truncated·by·diffoscope;·len:·1204,·SHA:·5bb3d0aa2423ac9807ced75ea7d34f3331534ed7a5ecd0fe4894fc8e48d18ce2·...·]-1">)</span><span·class="p">.</span><span·class="w">545 </span><span·class="p"·data-group-id="6534296245-17">[</span><span·class="p"·data-group-id="6534296245-18">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="6534296245-19">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><sp[·...·truncated·by·diffoscope;·len:·1204,·SHA:·554db78cb61adb03dc1ec6816fa0f5fa7b3f62497554aaee14755f05aeaecfd6·...·]-1">)</span><span·class="p">.</span><span·class="w">
546 </span><span·class="p"·data-group-id="6452422228-4">[</span><span·class="p"·data-group-id="6452422228-5">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">no_list</span><span·class="p"·data-group-id="6452422228-5">}</span><span·class="p"·data-group-id="6452422228-4">]</span><span·class="gp·unselectable">546 </span><span·class="p"·data-group-id="7755718735-4">[</span><span·class="p"·data-group-id="7755718735-5">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">no_list</span><span·class="p"·data-group-id="7755718735-5">}</span><span·class="p"·data-group-id="7755718735-4">]</span><span·class="gp·unselectable">
547 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="6452422228-6">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="6452422228-6">)</span><span·class="p">.</span><span·class="w">547 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append</span><span·class="p"·data-group-id="7755718735-6">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="7755718735-6">)</span><span·class="p">.</span><span·class="w">
548 </span><span·class="gt">**·exception·error:·bad·argument548 </span><span·class="gt">**·exception·error:·bad·argument
549 ·····in·operator··++/2549 ·····in·operator··++/2
550 ········called·as·no_list·++·[1]</span></code></pre>550 ········called·as·no_list·++·[1]</span></code></pre>
551 ··</section>551 ··</section>
552 </section>552 </section>
553 <section·class="detail"·id="append_list/3">553 <section·class="detail"·id="append_list/3">
  
Offset 579, 20 lines modifiedOffset 579, 20 lines modified
579 ·························Orddict1·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value),579 ·························Orddict1·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value),
580 ·························Orddict2·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>580 ·························Orddict2·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>
  
581 ······</div>581 ······</div>
  
582 <p>Appends·a·list·of·values·<code·class="inline">ValList</code>·to·the·current·list·of·values·associated·with582 <p>Appends·a·list·of·values·<code·class="inline">ValList</code>·to·the·current·list·of·values·associated·with
583 <code·class="inline">Key</code>.·An·exception·is·generated·if·the·initial·value·associated·with·<code·class="inline">Key</code>·is583 <code·class="inline">Key</code>.·An·exception·is·generated·if·the·initial·value·associated·with·<code·class="inline">Key</code>·is
584 not·a·list·of·values.</p><p>See·also·section·<a·href="orddict.html#module-notes">Notes</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="8784009494-1">(</span><span·class="p"·data-group-id="8784009494-2">[</span><span·class="p"·data-group-id="8784009494-3">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8784009494-4">[</span><s[·...·truncated·by·diffoscope;·len:·198,·SHA:·2dfe33cc01a50d82c8b378596c6a33506fe48d1658bbf9b7237691fdcbd8e72e·...·]-1">)</span><span·class="p">.</span><span·class="w">584 not·a·list·of·values.</p><p>See·also·section·<a·href="orddict.html#module-notes">Notes</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="5457459381-1">(</span><span·class="p"·data-group-id="5457459381-2">[</span><span·class="p"·data-group-id="5457459381-3">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5457459381-4">[</span><s[·...·truncated·by·diffoscope;·len:·198,·SHA:·37def1e66085f96ba74c5656ba9fb0c8b3b3d06e5795cafce465c157d2ca99fc·...·]-1">)</span><span·class="p">.</span><span·class="w">
585 </span><span·class="p"·data-group-id="8784009494-5">[</span><span·class="p"·data-group-id="8784009494-6">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="8784009494-7">[</span><span·class="p"·data-group-id="8784009494-7">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·68,·SHA:·3a72370d6245bf21eeb357054b14f8d2d6d61bcf140f254e344e9200566214bb·...·]-5">]</span><span·class="gp·unselectable">585 </span><span·class="p"·data-group-id="5457459381-5">[</span><span·class="p"·data-group-id="5457459381-6">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="5457459381-7">[</span><span·class="p"·data-group-id="5457459381-7">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·68,·SHA:·cb51a498bf1761dac1e9aa18db857a08bc17833cb2e307865859e17b67620abb·...·]-5">]</span><span·class="gp·unselectable">
586 2&gt;·</span><span·class="n">OrdDict2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append_list</span><span·class="p"·data-group-id="8784009494-8">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8784009494-9">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="878[·...·truncated·by·diffoscope;·len:·139,·SHA:·265473ee4469680dd835269613976c50e0296a2b5259c0c40ab3090e81ee9a55·...·]-8">)</span><span·class="p">.</span><span·class="w">586 2&gt;·</span><span·class="n">OrdDict2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append_list</span><span·class="p"·data-group-id="5457459381-8">(</span><span·class="ss">x</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5457459381-9">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="545[·...·truncated·by·diffoscope;·len:·139,·SHA:·5a22d1d99f82cbdd9f61bc8e3fe21a07fd184dc62d02a04351182b3ff123bea1·...·]-8">)</span><span·class="p">.</span><span·class="w">
587 </span><span·class="p"·data-group-id="8784009494-10">[</span><span·class="p"·data-group-id="8784009494-11">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="8784009494-12">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><s[·...·truncated·by·diffoscope;·len:·147,·SHA:·edbf486fedbb16a8601a15847e8e47ef4258b517611859773a5d8edb9c15c831·...·]-10">]</span><span·class="gp·unselectable">587 </span><span·class="p"·data-group-id="5457459381-10">[</span><span·class="p"·data-group-id="5457459381-11">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="5457459381-12">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><s[·...·truncated·by·diffoscope;·len:·147,·SHA:·f45f1863800456bd2994a6543cad88d2164dfa4a119fd6816fc5a840bae3650c·...·]-10">]</span><span·class="gp·unselectable">
588 3&gt;·</span><span·class="n">OrdDict3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append_list</span><span·class="p"·data-group-id="8784009494-13">(</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8784009494-14">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="8[·...·truncated·by·diffoscope;·len:·142,·SHA:·ddab7448902a59ab1feafc11165d07a30ab81cd0a9cc3354353c46d2b7e489ce·...·]-13">)</span><span·class="p">.</span><span·class="w">588 3&gt;·</span><span·class="n">OrdDict3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">append_list</span><span·class="p"·data-group-id="5457459381-13">(</span><span·class="ss">y</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5457459381-14">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="5[·...·truncated·by·diffoscope;·len:·142,·SHA:·054810c9525ce39972f7130b818e5ed64697c8aa022f0194e0fd5deeb2980612·...·]-13">)</span><span·class="p">.</span><span·class="w">
589 </span><span·class="p"·data-group-id="8784009494-15">[</span><span·class="p"·data-group-id="8784009494-16">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="8784009494-17">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><s[·...·truncated·by·diffoscope;·len:·510,·SHA:·92cf53326664b37abb77f8a830b7514890f8d30844d7fb61b5ac83397c396da0·...·]-15">]</span></code></pre>589 </span><span·class="p"·data-group-id="5457459381-15">[</span><span·class="p"·data-group-id="5457459381-16">{</span><span·class="ss">x</span><span·class="p">,</span><span·class="p"·data-group-id="5457459381-17">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><s[·...·truncated·by·diffoscope;·len:·510,·SHA:·dc8a63eb7fe98afaa41ae96f1516aebbfbbed215a7a1481ef6f0f6f4ec40ce21·...·]-15">]</span></code></pre>
590 ··</section>590 ··</section>
591 </section>591 </section>
592 <section·class="detail"·id="erase/2">592 <section·class="detail"·id="erase/2">
  
593 ··<div·class="detail-header">593 ··<div·class="detail-header">
594 ····<a·href="#erase/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">594 ····<a·href="#erase/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
595 ······<i·class="ri-link-m"·aria-hidden="true"></i>595 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 613, 18 lines modifiedOffset 613, 18 lines modified
613 ······<div·class="specs">613 ······<div·class="specs">
  
614 ··········<pre·translate="no"><span·class="attribute">-spec</span>·erase(Key,·Orddict1)·->·Orddict2614 ··········<pre·translate="no"><span·class="attribute">-spec</span>·erase(Key,·Orddict1)·->·Orddict2
615 ···············when·Orddict1·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value),·Orddict2·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>615 ···············when·Orddict1·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value),·Orddict2·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>
  
616 ······</div>616 ······</div>
  
617 <p>Erases·all·items·with·a·specified·key·from·a·dictionary.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="3019707941-1">(</span><span·class="p"·data-group-id="3019707941-2">[</span><span·class="p"·data-group-id="3019707941-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·369,·SHA:·cc3dafca5d6b33bfb2fea68ceb977c24df6d3aa248a71d247e643d0b0a27c8cc·...·]-1">)</span><span·class="p">.</span><span·class="w">617 <p>Erases·all·items·with·a·specified·key·from·a·dictionary.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="4297108262-1">(</span><span·class="p"·data-group-id="4297108262-2">[</span><span·class="p"·data-group-id="4297108262-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·369,·SHA:·934bdc357413c6c6ef0422c3584c0b5b5da1d058db2d90384201b6bf99cd9737·...·]-1">)</span><span·class="p">.</span><span·class="w">
618 </span><span·class="p"·data-group-id="3019707941-5">[</span><span·class="p"·data-group-id="3019707941-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3019707941-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·f710927a8be4b99983a90fbc863018e4b9d19eb36399b6007f170625812f6876·...·]-5">]</span><span·class="gp·unselectable">618 </span><span·class="p"·data-group-id="4297108262-5">[</span><span·class="p"·data-group-id="4297108262-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4297108262-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·31bd88f6421e6c0d17fffb993068725f37982aef85fde7e59af9de9ab4d23ea1·...·]-5">]</span><span·class="gp·unselectable">
619 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">erase</span><span·class="p"·data-group-id="3019707941-8">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="3019707941-8">)</span><span·class="p">.</span><span·class="w">619 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">erase</span><span·class="p"·data-group-id="4297108262-8">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="4297108262-8">)</span><span·class="p">.</span><span·class="w">
620 </span><span·class="p"·data-group-id="3019707941-9">[</span><span·class="p"·data-group-id="3019707941-10">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3019707941-10">}</span><span·class="p"·data-group-id="3019707941-9">]</span></code></pre>620 </span><span·class="p"·data-group-id="4297108262-9">[</span><span·class="p"·data-group-id="4297108262-10">{</span><span·class="ss">b</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4297108262-10">}</span><span·class="p"·data-group-id="4297108262-9">]</span></code></pre>
621 ··</section>621 ··</section>
622 </section>622 </section>
623 <section·class="detail"·id="fetch/2">623 <section·class="detail"·id="fetch/2">
  
624 ··<div·class="detail-header">624 ··<div·class="detail-header">
625 ····<a·href="#fetch/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">625 ····<a·href="#fetch/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
626 ······<i·class="ri-link-m"·aria-hidden="true"></i>626 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 646, 19 lines modifiedOffset 646, 19 lines modified
  
646 ··········<pre·translate="no"><span·class="attribute">-spec</span>·fetch(Key,·Orddict)·->·Value·when·Orddict·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>646 ··········<pre·translate="no"><span·class="attribute">-spec</span>·fetch(Key,·Orddict)·->·Value·when·Orddict·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value).</pre>
  
647 ······</div>647 ······</div>
  
648 <p>Returns·the·value·associated·with·<code·class="inline">Key</code>·in·dictionary·<code·class="inline">Orddict</code>.·This·function648 <p>Returns·the·value·associated·with·<code·class="inline">Key</code>·in·dictionary·<code·class="inline">Orddict</code>.·This·function
649 assumes·that·the·<code·class="inline">Key</code>·is·present·in·the·dictionary.·An·exception·is·generated649 assumes·that·the·<code·class="inline">Key</code>·is·present·in·the·dictionary.·An·exception·is·generated
650 if·<code·class="inline">Key</code>·is·not·in·the·dictionary.</p><p>See·also·section·<a·href="orddict.html#module-notes">Notes</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="2995109003-1">(</span><span·class="p"·data-group-id="2995109003-2">[</span><span·class="p"·data-group-id="2995109003-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·369,·SHA:·e15e819828fce052001375e060d8a228d331f56d9616e5efc59661b83649ce69·...·]-1">)</span><span·class="p">.</span><span·class="w">650 if·<code·class="inline">Key</code>·is·not·in·the·dictionary.</p><p>See·also·section·<a·href="orddict.html#module-notes">Notes</a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="1692902038-1">(</span><span·class="p"·data-group-id="1692902038-2">[</span><span·class="p"·data-group-id="1692902038-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·369,·SHA:·784a1cd8dfe6fdefe32dae18f35cfa239cfc59a9deb750057a1b74d9685eda57·...·]-1">)</span><span·class="p">.</span><span·class="w">
651 </span><span·class="p"·data-group-id="2995109003-5">[</span><span·class="p"·data-group-id="2995109003-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="2995109003-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·8b3b85bb9421d9d9f72d06917f38b4acb2cbc3f2b37797957938ef8031cdc870·...·]-5">]</span><span·class="gp·unselectable">651 </span><span·class="p"·data-group-id="1692902038-5">[</span><span·class="p"·data-group-id="1692902038-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="1692902038-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·30fd9a3f976a19ec779eecba0e1725a22754d9fe189593db1f02883caf9a4ebc·...·]-5">]</span><span·class="gp·unselectable">
652 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="2995109003-8">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="2995109003-8">)</span><span·class="p">.</span><span·class="w">652 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="1692902038-8">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="1692902038-8">)</span><span·class="p">.</span><span·class="w">
653 </span><span·class="mi">1</span><span·class="gp·unselectable">653 </span><span·class="mi">1</span><span·class="gp·unselectable">
654 3&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="2995109003-9">(</span><span·class="ss">missing</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="2995109003-9">)</span><span·class="p">.</span><span·class="w">654 3&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch</span><span·class="p"·data-group-id="1692902038-9">(</span><span·class="ss">missing</span><span·class="p">,</span><span·class="w">·</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="1692902038-9">)</span><span·class="p">.</span><span·class="w">
655 </span><span·class="gt">**·exception·error:·no·function·clause·matching·orddict:fetch(missing,[])</span></code></pre>655 </span><span·class="gt">**·exception·error:·no·function·clause·matching·orddict:fetch(missing,[])</span></code></pre>
656 ··</section>656 ··</section>
657 </section>657 </section>
658 <section·class="detail"·id="fetch_keys/1">658 <section·class="detail"·id="fetch_keys/1">
  
659 ··<div·class="detail-header">659 ··<div·class="detail-header">
660 ····<a·href="#fetch_keys/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">660 ····<a·href="#fetch_keys/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 679, 18 lines modifiedOffset 679, 18 lines modified
  
679 ······<div·class="specs">679 ······<div·class="specs">
  
680 ··········<pre·translate="no"><span·class="attribute">-spec</span>·fetch_keys(Orddict)·->·Keys·when·Orddict·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()),·Keys·::·[Key].</pre>680 ··········<pre·translate="no"><span·class="attribute">-spec</span>·fetch_keys(Orddict)·->·Keys·when·Orddict·::·<a·href="#t:orddict/2">orddict</a>(Key,·Value·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()),·Keys·::·[Key].</pre>
  
681 ······</div>681 ······</div>
  
682 <p>Returns·a·list·of·all·keys·in·a·dictionary.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6737184225-1">(</span><span·class="p"·data-group-id="6737184225-2">[</span><span·class="p"·data-group-id="6737184225-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·369,·SHA:·bab2f7448e025a110122d0004b5349b56800243e8fea672d1712bee92d1609d3·...·]-1">)</span><span·class="p">.</span><span·class="w">682 <p>Returns·a·list·of·all·keys·in·a·dictionary.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">OrdDict1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="4860127498-1">(</span><span·class="p"·data-group-id="4860127498-2">[</span><span·class="p"·data-group-id="4860127498-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·369,·SHA:·a84c2d4e6c121e5067933180705ce1e78f5bdbef672173c6979e298b9d70d1d6·...·]-1">)</span><span·class="p">.</span><span·class="w">
683 </span><span·class="p"·data-group-id="6737184225-5">[</span><span·class="p"·data-group-id="6737184225-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6737184225-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·a30d45a8c3797779184b5b20de301cffd930ce37cf6514a00c41b680e49ee519·...·]-5">]</span><span·class="gp·unselectable">683 </span><span·class="p"·data-group-id="4860127498-5">[</span><span·class="p"·data-group-id="4860127498-6">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4860127498-6">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·0c3af6be2c0c825bcb807afc928bdaae6e89b24a6663fe0b84af3be66fbdc7a9·...·]-5">]</span><span·class="gp·unselectable">
684 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch_keys</span><span·class="p"·data-group-id="6737184225-8">(</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="6737184225-8">)</span><span·class="p">.</span><span·class="w">684 2&gt;·</span><span·class="nc">orddict</span><span·class="p">:</span><span·class="nf">fetch_keys</span><span·class="p"·data-group-id="4860127498-8">(</span><span·class="n">OrdDict1</span><span·class="p"·data-group-id="4860127498-8">)</span><span·class="p">.</span><span·class="w">
685 </span><span·class="p"·data-group-id="6737184225-9">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="6737184225-9">]</span></code></pre>685 </span><span·class="p"·data-group-id="4860127498-9">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="4860127498-9">]</span></code></pre>
686 ··</section>686 ··</section>
687 </section>687 </section>
688 <section·class="detail"·id="filter/2">688 <section·class="detail"·id="filter/2">
  
689 ··<div·class="detail-header">689 ··<div·class="detail-header">
690 ····<a·href="#filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">690 ····<a·href="#filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
691 ······<i·class="ri-link-m"·aria-hidden="true"></i>691 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 715, 18 lines modifiedOffset 715, 18 lines modified
Max diff block lines reached; 81765/126225 bytes (64.78%) of diff not shown.
90.3 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/peer.html
    
Offset 157, 135 lines modifiedOffset 157, 135 lines modified
157 employs·a·number·of·techniques·to·speed·up·testing·and·reliably·shut·down·peer157 employs·a·number·of·techniques·to·speed·up·testing·and·reliably·shut·down·peer
158 nodes:</p><ul><li>peers·start·linked·to·test·runner·process.·If·the·test·case·fails,·the·peer158 nodes:</p><ul><li>peers·start·linked·to·test·runner·process.·If·the·test·case·fails,·the·peer
159 node·is·stopped·automatically,·leaving·no·rogue·nodes·running·in·the159 node·is·stopped·automatically,·leaving·no·rogue·nodes·running·in·the
160 background</li><li>arguments·used·to·start·the·peer·are·saved·in·the·control·process·state·for160 background</li><li>arguments·used·to·start·the·peer·are·saved·in·the·control·process·state·for
161 manual·analysis.·If·the·test·case·fails,·the·CRASH·REPORT·contains·these161 manual·analysis.·If·the·test·case·fails,·the·CRASH·REPORT·contains·these
162 arguments</li><li>multiple·test·cases·can·run·concurrently·speeding·up·overall·testing·process,162 arguments</li><li>multiple·test·cases·can·run·concurrently·speeding·up·overall·testing·process,
163 peer·node·names·are·unique·even·when·there·are·multiple·instances·of·the·same163 peer·node·names·are·unique·even·when·there·are·multiple·instances·of·the·same
164 test·suite·running·in·parallel</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7092535768-1">(</span><span·class="ss">my_SUITE</span><span·class="p"·data-group-id="7092535768-1">)</span><span·class="p">.</span><span·class="w">164 test·suite·running·in·parallel</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0536778281-1">(</span><span·class="ss">my_SUITE</span><span·class="p"·data-group-id="0536778281-1">)</span><span·class="p">.</span><span·class="w">
165 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="7092535768-2">(</span><span·class="ss">ct_suite</span><span·class="p"·data-group-id="7092535768-2">)</span><span·class="p">.</span><span·class="w">165 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="0536778281-2">(</span><span·class="ss">ct_suite</span><span·class="p"·data-group-id="0536778281-2">)</span><span·class="p">.</span><span·class="w">
166 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7092535768-3">(</span><span·class="p"·data-group-id="7092535768-4">[</span><span·class="ss">all</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">groups</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·fdd5d8394bba61fb9c7ba1c2d3d1c7166af4e758a94c4e05d1286e46284661b9·...·]-3">)</span><span·class="p">.</span><span·class="w">166 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0536778281-3">(</span><span·class="p"·data-group-id="0536778281-4">[</span><span·class="ss">all</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">groups</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·116,·SHA:·625ec78099d8d245b9cf4f27f5608091976b38acd05a33dc43e688f22fb088e8·...·]-3">)</span><span·class="p">.</span><span·class="w">
167 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7092535768-5">(</span><span·class="p"·data-group-id="7092535768-6">[</span><span·class="ss">basic</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">args</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·506,·SHA:·dca479797913694dcdab5497600e1fae07cf9d1d8c779155244d43764be8a46a·...·]-5">)</span><span·class="p">.</span><span·class="w">167 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0536778281-5">(</span><span·class="p"·data-group-id="0536778281-6">[</span><span·class="ss">basic</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">args</span><span·class="p">/</span><sp[·...·truncated·by·diffoscope;·len:·506,·SHA:·4d80a17313627bd5e012b478830fa54d8628ed1b2266061d7026490ff7bff5da·...·]-5">)</span><span·class="p">.</span><span·class="w">
168 </span><span·class="w">168 </span><span·class="w">
169 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="7092535768-7">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="7092535768-7">)</span><span·class="p">.</span><span·class="w">169 </span><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0536778281-7">(</span><span·class="s">&quot;common_test/include/ct.hrl&quot;</span><span·class="p"·data-group-id="0536778281-7">)</span><span·class="p">.</span><span·class="w">
  
170 </span><span·class="nf">groups</span><span·class="p"·data-group-id="7092535768-8">(</span><span·class="p"·data-group-id="7092535768-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">170 </span><span·class="nf">groups</span><span·class="p"·data-group-id="0536778281-8">(</span><span·class="p"·data-group-id="0536778281-8">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
171 ····</span><span·class="p"·data-group-id="7092535768-9">[</span><span·class="p"·data-group-id="7092535768-10">{</span><span·class="ss">quick</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7092535768-11">[</span><span·class="ss">parallel</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·f3e8e9f0b11c4f2b3defabb2aacbf6b2ef7a771b3b59b61887a0147f07a918fa·...·]-11">]</span><span·class="p">,</span><span·class="w">171 ····</span><span·class="p"·data-group-id="0536778281-9">[</span><span·class="p"·data-group-id="0536778281-10">{</span><span·class="ss">quick</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0536778281-11">[</span><span·class="ss">parallel</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·22a20a3102a4416477a53a0f1867e10f6bdd974c08221cbab731532c95d843bc·...·]-11">]</span><span·class="p">,</span><span·class="w">
172 ········</span><span·class="p"·data-group-id="7092535768-12">[</span><span·class="ss">basic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">args</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">named</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·264,·SHA:·674cf22eb5efdc1ffe85fde393475f712d3eb06e870b0088d28c247a12f07762·...·]-9">]</span><span·class="p">.</span><span·class="w">172 ········</span><span·class="p"·data-group-id="0536778281-12">[</span><span·class="ss">basic</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">args</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">named</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·264,·SHA:·60cefec968dd036d6547059ecd78379e987c0ee80e8ea098f94122c7514d46b6·...·]-9">]</span><span·class="p">.</span><span·class="w">
  
173 </span><span·class="nf">all</span><span·class="p"·data-group-id="7092535768-13">(</span><span·class="p"·data-group-id="7092535768-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">173 </span><span·class="nf">all</span><span·class="p"·data-group-id="0536778281-13">(</span><span·class="p"·data-group-id="0536778281-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
174 ····</span><span·class="p"·data-group-id="7092535768-14">[</span><span·class="p"·data-group-id="7092535768-15">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">quick</span><span·class="p"·data-group-id="7092535768-15">}</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·82efd1b290ceaf42fdd5fe9b4c15164d2b32d9e9d4b88b48513affd7bd88e2fc·...·]-14">]</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="p"·data-group-id="0536778281-14">[</span><span·class="p"·data-group-id="0536778281-15">{</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">quick</span><span·class="p"·data-group-id="0536778281-15">}</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·4fc7431cd73081629da15e03f0a333985e00c12636cf94741812cd3614291e2b·...·]-14">]</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="nf">basic</span><span·class="p"·data-group-id="7092535768-16">(</span><span·class="n">Config</span><span·class="p"·data-group-id="7092535768-16">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="7092535768-17[·...·truncated·by·diffoscope;·len:·80,·SHA:·ca08a391b1eb128b47f9997db4f82117498055848c04641832986b6199ce3859·...·]-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 </span><span·class="nf">basic</span><span·class="p"·data-group-id="0536778281-16">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0536778281-16">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="0536778281-17[·...·truncated·by·diffoscope;·len:·80,·SHA:·a8c220855833afaabb63cd30440e6bd7c819ab0706c267347d5df8409bc1f7cc·...·]-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ····</span><span·class="p"·data-group-id="7092535768-18">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Node</span><span·class="p"·data-group-id="70[·...·truncated·by·diffoscope;·len:·242,·SHA:·dac33795e6d01e6a885c4804ea49fb7855a499dc6a001c3d7d2f9d468c6e05b0·...·]-19">)</span><span·class="p">,</span><span·class="w">176 ····</span><span·class="p"·data-group-id="0536778281-18">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Node</span><span·class="p"·data-group-id="05[·...·truncated·by·diffoscope;·len:·242,·SHA:·808004c649c253a33a3e17da5b08ba2053a35c4741c33fe50998d1268b0aae85·...·]-19">)</span><span·class="p">,</span><span·class="w">
177 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7092535768-20">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="7092535768-20">)</span><span·class="p">.</span><span·class="w">177 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0536778281-20">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="0536778281-20">)</span><span·class="p">.</span><span·class="w">
  
178 </span><span·class="nf">args</span><span·class="p"·data-group-id="7092535768-21">(</span><span·class="n">Config</span><span·class="p"·data-group-id="7092535768-21">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="7092535768-22[·...·truncated·by·diffoscope;·len:·80,·SHA:·ca08a391b1eb128b47f9997db4f82117498055848c04641832986b6199ce3859·...·]-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">args</span><span·class="p"·data-group-id="0536778281-21">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0536778281-21">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="0536778281-22[·...·truncated·by·diffoscope;·len:·80,·SHA:·a8c220855833afaabb63cd30440e6bd7c819ab0706c267347d5df8409bc1f7cc·...·]-22">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="c1">%%·specify·additional·arguments·to·the·new·node</span><span·class="w">179 ····</span><span·class="c1">%%·specify·additional·arguments·to·the·new·node</span><span·class="w">
180 ····</span><span·class="p"·data-group-id="7092535768-23">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Node</span><span·class="p"·data-group-id="70[·...·truncated·by·diffoscope;·len:·482,·SHA:·ca4240d5aa6cc1bab0acd9e65da107d28ca689d08ec82b8cf6980d4879c4b1a4·...·]-24">)</span><span·class="p">,</span><span·class="w">180 ····</span><span·class="p"·data-group-id="0536778281-23">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Node</span><span·class="p"·data-group-id="05[·...·truncated·by·diffoscope;·len:·482,·SHA:·64a71ba275fd230b1db41b643d79e590ae36e88164d38db33360a4c9d1016744·...·]-24">)</span><span·class="p">,</span><span·class="w">
181 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7092535768-26">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="7092535768-26">)</span><span·class="p">.</span><span·class="w">181 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0536778281-26">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="0536778281-26">)</span><span·class="p">.</span><span·class="w">
  
182 </span><span·class="nf">named</span><span·class="p"·data-group-id="7092535768-27">(</span><span·class="n">Config</span><span·class="p"·data-group-id="7092535768-27">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="7092535768-28[·...·truncated·by·diffoscope;·len:·80,·SHA:·ca08a391b1eb128b47f9997db4f82117498055848c04641832986b6199ce3859·...·]-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 </span><span·class="nf">named</span><span·class="p"·data-group-id="0536778281-27">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0536778281-27">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="0536778281-28[·...·truncated·by·diffoscope;·len:·80,·SHA:·a8c220855833afaabb63cd30440e6bd7c819ab0706c267347d5df8409bc1f7cc·...·]-28">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ····</span><span·class="c1">%%·pass·test·case·name·down·to·function·starting·nodes</span><span·class="w">183 ····</span><span·class="c1">%%·pass·test·case·name·down·to·function·starting·nodes</span><span·class="w">
184 ····</span><span·class="n">Peer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_node_impl</span><span·class="p"·data-group-id="7092535768-29">(</span><span·class="ss">named_test</span><span·class="p"·data-group-id="7092535768-29">)</span><span·class="p">,</span><span·class="w">184 ····</span><span·class="n">Peer</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">start_node_impl</span><span·class="p"·data-group-id="0536778281-29">(</span><span·class="ss">named_test</span><span·class="p"·data-group-id="0536778281-29">)</span><span·class="p">,</span><span·class="w">
185 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7092535768-30">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="7092535768-30">)</span><span·class="p">.</span><span·class="w">185 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0536778281-30">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="0536778281-30">)</span><span·class="p">.</span><span·class="w">
  
186 </span><span·class="nf">start_node_impl</span><span·class="p"·data-group-id="7092535768-31">(</span><span·class="n">ActualTestCase</span><span·class="p"·data-group-id="7092535768-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">186 </span><span·class="nf">start_node_impl</span><span·class="p"·data-group-id="0536778281-31">(</span><span·class="n">ActualTestCase</span><span·class="p"·data-group-id="0536778281-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
187 ····</span><span·class="p"·data-group-id="7092535768-32">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="7092535768-32">}</span><sp[·...·truncated·by·diffoscope;·len:·635,·SHA:·3bd04258e14c57baa75ef40c05b1a416c0df0a085398c91ee1293f3558b74410·...·]-33">)</span><span·class="p">,</span><span·class="w">187 ····</span><span·class="p"·data-group-id="0536778281-32">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="0536778281-32">}</span><sp[·...·truncated·by·diffoscope;·len:·635,·SHA:·a791e902594aa189dfba3a9bc5794dc614d4c302d7c97a775c312ea3a9d39d0c·...·]-33">)</span><span·class="p">,</span><span·class="w">
188 ····</span><span·class="c1">%%·extra·setup·needed·for·multiple·test·cases</span><span·class="w">188 ····</span><span·class="c1">%%·extra·setup·needed·for·multiple·test·cases</span><span·class="w">
189 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rpc</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7092535768-36">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">set_env</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·335,·SHA:·cd17192f1c7fac05c8048c4fdc8f133e75fe1b7cb0cc218fb1108ee3aeb757f8·...·]-36">)</span><span·class="p">,</span><span·class="w">189 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rpc</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="0536778281-36">(</span><span·class="n">Node</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">application</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">set_env</span><span·class="p">,</span><span·class="w">·</s[·...·truncated·by·diffoscope;·len:·335,·SHA:·3973ac371b2e368c7396309fa7914da19e175c877ed37df24617aa2159304922·...·]-36">)</span><span·class="p">,</span><span·class="w">
190 ····</span><span·class="n">Peer</span><span·class="p">.</span><span·class="w">190 ····</span><span·class="n">Peer</span><span·class="p">.</span><span·class="w">
  
191 </span><span·class="nf">restart_node</span><span·class="p"·data-group-id="7092535768-38">(</span><span·class="n">Config</span><span·class="p"·data-group-id="7092535768-38">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="7092535768-39[·...·truncated·by·diffoscope;·len:·80,·SHA:·ca08a391b1eb128b47f9997db4f82117498055848c04641832986b6199ce3859·...·]-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">191 </span><span·class="nf">restart_node</span><span·class="p"·data-group-id="0536778281-38">(</span><span·class="n">Config</span><span·class="p"·data-group-id="0536778281-38">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="0536778281-39[·...·truncated·by·diffoscope;·len:·80,·SHA:·a8c220855833afaabb63cd30440e6bd7c819ab0706c267347d5df8409bc1f7cc·...·]-39">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
192 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="n">CT_PEER_NAME</span><span·class="p"·data-group-id="7092535768-40">(</span><span·class="p"·data-group-id="7092535768-40">)</span><span·class="p">,</span><span·class="w">192 ····</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">?</span><span·class="n">CT_PEER_NAME</span><span·class="p"·data-group-id="0536778281-40">(</span><span·class="p"·data-group-id="0536778281-40">)</span><span·class="p">,</span><span·class="w">
193 ····</span><span·class="p"·data-group-id="7092535768-41">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="7092535768-41">}</span><sp[·...·truncated·by·diffoscope;·len:·458,·SHA:·bb1734bc56a28a0afa4ed629f7119817f1e7ef2d00f03776a2c6bb7272d1d446·...·]-42">)</span><span·class="p">,</span><span·class="w">193 ····</span><span·class="p"·data-group-id="0536778281-41">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="0536778281-41">}</span><sp[·...·truncated·by·diffoscope;·len:·458,·SHA:·4c63cd96a25cd531b3a734436a87a1663111616498093a9e99ac64dde9052c65·...·]-42">)</span><span·class="p">,</span><span·class="w">
194 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7092535768-44">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="7092535768-44">)</span><span·class="p">,</span><span·class="w">194 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0536778281-44">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="0536778281-44">)</span><span·class="p">,</span><span·class="w">
195 ····</span><span·class="c1">%%·restart·the·node·with·the·same·name·as·before</span><span·class="w">195 ····</span><span·class="c1">%%·restart·the·node·with·the·same·name·as·before</span><span·class="w">
196 ····</span><span·class="p"·data-group-id="7092535768-45">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="7092535768-45">}</span><s[·...·truncated·by·diffoscope;·len:·758,·SHA:·a42998f4fbbb0f04e8ccfc83174177c5942ac686cce4a93f9fa24117db0c1485·...·]-46">)</span><span·class="p">,</span><span·class="w">196 ····</span><span·class="p"·data-group-id="0536778281-45">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="0536778281-45">}</span><s[·...·truncated·by·diffoscope;·len:·758,·SHA:·89029cd05a742c088176bf312a73b759c80b39940fd10e1c45258dc700846608·...·]-46">)</span><span·class="p">,</span><span·class="w">
197 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7092535768-49">(</span><span·class="n">Peer2</span><span·class="p"·data-group-id="7092535768-49">)</span><span·class="p">.</span></code></pre><p>The·next·example·demonstrates·how·to·start·multiple·nodes·concurrently:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">multi_node</span><span·class="p"·data-group-id="1038240378-1">(</span><span·class="n">Config</span><span·class="p"·data-group-id="1038240378-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="1038240378-2">(</span><span·class="n">Config</span><span·class="p"·data-group-id="1038240378-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
198 ····</span><span·class="n">Peers</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1038240378-3">[</span><span·class="o">?</span><span·class="n">CT_PEER</span><span·class="p"·data-group-id="1038240378-4">(</span><span·clas[·...·truncated·by·diffoscope;·len:·567,·SHA:·5e31839811f4a91c12e0d2388a7094acfdc7597d86cadd500fe33b3b66e7bcb8·...·]</span><span·class="w">197 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="0536778281-49">(</span><span·class="n">Peer2</span><span·class="p"·data-group-id="0536778281-49">)</span><span·class="p">.</span></code></pre><p>The·next·examp[·...·truncated·by·diffoscope;·len:·564,·SHA:·4e1ac337abdaa3a3c85d91dedfbce4b198905b1ca5b7b9053d376511ad29b711·...·]</span><span·class="w">
 198 ····</span><span·class="n">Peers</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4323336450-3">[</span><span·class="o">?</span><span·class="n">CT_PEER</span><span·class="p"·data-group-id="4323336450-4">(</span><span·class="p"·data-group-id="4323336450-5">#{</span><span·class="ss">wait_boot</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4323336450-6">{</span><span·class="nf">self</span><span·class="p"·data-group-id="4323336450-7">(</span><span·class="p"·data-group-id="4323336450-7">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">tag</span><span·class="p"·data-group-id="4323336450-6">}</span><span·class="p"·data-group-id="4323336450-5">}</span><span·class="p"·data-group-id="4323336450-4">)</span><span·class="w">
199 ········</span><span·class="p">||</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="1038240378-8">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="1038240378-8">)</span><span·class="p"·data-group-id="1038240378-3">]</span><span·class="p">,</span><span·class="w">199 ········</span><span·class="p">||</span><span·class="w">·</span><span·class="p">_</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="4323336450-8">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">4</span><span·class="p"·data-group-id="4323336450-8">)</span><span·class="p"·data-group-id="4323336450-3">]</span><span·class="p">,</span><span·class="w">
200 ····</span><span·class="c1">%%·wait·for·all·nodes·to·complete·boot·process,·get·their·names:</span><span·class="w">200 ····</span><span·class="c1">%%·wait·for·all·nodes·to·complete·boot·process,·get·their·names:</span><span·class="w">
201 ····</span><span·class="p">_</span><span·class="n">Nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1038240378-9">[</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="1038240378-10">{</span><span·class="ss">tag</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1038240378-11">{</sp[·...·truncated·by·diffoscope;·len:·279,·SHA:·f75276c5d5b0def7937d7870eda029cd105c9bd6340c6e6af8f0c42d58fa8438·...·]-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">·</span><span·class="k">end</span><span·class="w">201 ····</span><span·class="p">_</span><span·class="n">Nodes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4323336450-9">[</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="4323336450-10">{</span><span·class="ss">tag</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4323336450-11">{</sp[·...·truncated·by·diffoscope;·len:·279,·SHA:·478145344c184fc4c04e187a465d5dfc3f30bc79affd9428a65bc0fb5819e4c9·...·]-10">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Node</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
202 ········</span><span·class="p">||</span><span·class="w">·</span><span·class="p"·data-group-id="1038240378-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p"·data-group-id="1038240378-12">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·67,·SHA:·19299ee4f0577e0bd9c28cf2ea5000566b0009b089a2c3ddb3a12ecf1ecf3807·...·]-9">]</span><span·class="p">,</span><span·class="w">202 ········</span><span·class="p">||</span><span·class="w">·</span><span·class="p"·data-group-id="4323336450-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p"·data-group-id="4323336450-12">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·67,·SHA:·b2ee627ccfabf99722f23e0f87b7de3ddb698943c3fdd26f8ca27077987396f0·...·]-9">]</span><span·class="p">,</span><span·class="w">
203 ····</span><span·class="p"·data-group-id="1038240378-13">[</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="1038240378-14">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="1038240378-14">)</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·409,·SHA:·977ffa4541bd16e203a06c42b880cde191b2561155198f5b8b9b8a25e544c7ae·...·]-13">]</span><span·class="p">.</span></code></pre><p>Start·a·peer·on·a·different·host.·Requires·<code·class="inline">ssh</code>·key-based·authentication·set203 ····</span><span·class="p"·data-group-id="4323336450-13">[</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="4323336450-14">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="4323336450-14">)</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·409,·SHA:·7d92e7bf1c2fd7a1cff7fe2ed064dab30b8f8c149243437e50dfc80718a46c27·...·]-13">]</span><span·class="p">.</span></code></pre><p>Start·a·peer·on·a·different·host.·Requires·<code·class="inline">ssh</code>·key-based·authentication·set
204 up,·allowing·&quot;another_host&quot;·connection·without·password·prompt.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Ssh</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">find_executable</span><span·class="p"·data-group-id="5430616729-1">(</span><span·class="s">&quot;ssh&quot;</span><span·class="p"·data-group-id="5430616729-1">)</span><span·class="p">,</span><span·class="w">204 up,·allowing·&quot;another_host&quot;·connection·without·password·prompt.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Ssh</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">find_executable</span><span·class="p"·data-group-id="5923690171-1">(</span><span·class="s">&quot;ssh&quot;</span><span·class="p"·data-group-id="5923690171-1">)</span><span·class="p">,</span><span·class="w">
205 </span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="5430616729-2">(</span><span·class="p"·data-group-id="5430616729-3">#{</span><span·class="ss">exec</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5430616729-4">{</span><span·class="n">Ssh</spa[·...·truncated·by·diffoscope;·len:·330,·SHA:·a843a849eba398a817a5aaba02d39d21136dcf9b79e54d15ae23e8f9be4590e2·...·]-4">}</span><span·class="p">,</span><span·class="w">205 </span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="5923690171-2">(</span><span·class="p"·data-group-id="5923690171-3">#{</span><span·class="ss">exec</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5923690171-4">{</span><span·class="n">Ssh</spa[·...·truncated·by·diffoscope;·len:·330,·SHA:·334739b7095820c9b7a3e7e0ea2db75e91f1a99d9becc7842c35098ffbf9e1ec·...·]-4">}</span><span·class="p">,</span><span·class="w">
206 ····</span><span·class="ss">connection</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">standard_io</span><span·class="p"·data-group-id="5430616729-3">}</span><span·class="p"·data-group-id="5430616729-2">)</span><span·class="p">,</span></code></pre><p>The·following·Common·Test·case·demonstrates·Docker·integration,·starting·two206 ····</span><span·class="ss">connection</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">standard_io</span><span·class="p"·data-group-id="5923690171-3">}</span><span·class="p"·data-group-id="5923690171-2">)</span><span·class="p">,</span></code></pre><p>The·following·Common·Test·case·demonstrates·Docker·integration,·starting·two
207 containers·with·hostnames·&quot;one&quot;·and·&quot;two&quot;.·In·this·example·Erlang·nodes·running207 containers·with·hostnames·&quot;one&quot;·and·&quot;two&quot;.·In·this·example·Erlang·nodes·running
208 inside·containers·form·an·Erlang·cluster.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">docker</span><span·class="p"·data-group-id="7128288540-1">(</span><span·class="n">Config</span><span·class="p"·data-group-id="7128288540-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="7128288540-2">([·...·truncated·by·diffoscope;·len:·77,·SHA:·738abdd8b4b0bfae95777198ccdeb63d2e4e2c4e1efa3b46693b7096410ecca3·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 inside·containers·form·an·Erlang·cluster.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">docker</span><span·class="p"·data-group-id="2171934329-1">(</span><span·class="n">Config</span><span·class="p"·data-group-id="2171934329-1">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">is_list</span><span·class="p"·data-group-id="2171934329-2">([·...·truncated·by·diffoscope;·len:·77,·SHA:·1becfc0e85ef4fdca508421905f710938f6d9d1c7cd518befef3fd57d0c2a50c·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 ····</span><span·class="n">Docker</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">find_executable</span><span·class="p"·data-group-id="7128288540-3">(</span><span·class="s">&quot;docker&quot;</span><span·class="p"·data-group-id="7128288540-3">)</span><span·class="p">,</span><span·class="w">209 ····</span><span·class="n">Docker</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">os</span><span·class="p">:</span><span·class="nf">find_executable</span><span·class="p"·data-group-id="2171934329-3">(</span><span·class="s">&quot;docker&quot;</span><span·class="p"·data-group-id="2171934329-3">)</span><span·class="p">,</span><span·class="w">
210 ····</span><span·class="n">PrivDir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="7128288540-4">(</span><span·class="ss">priv_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="7128288540-4">)</span><span·class="p">,</span><span·class="w">210 ····</span><span·class="n">PrivDir</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">proplists</span><span·class="p">:</span><span·class="nf">get_value</span><span·class="p"·data-group-id="2171934329-4">(</span><span·class="ss">priv_dir</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Config</span><span·class="p"·data-group-id="2171934329-4">)</span><span·class="p">,</span><span·class="w">
211 ····</span><span·class="nf">build_release</span><span·class="p"·data-group-id="7128288540-5">(</span><span·class="n">PrivDir</span><span·class="p"·data-group-id="7128288540-5">)</span><span·class="p">,</span><span·class="w">211 ····</span><span·class="nf">build_release</span><span·class="p"·data-group-id="2171934329-5">(</span><span·class="n">PrivDir</span><span·class="p"·data-group-id="2171934329-5">)</span><span·class="p">,</span><span·class="w">
212 ····</span><span·class="nf">build_image</span><span·class="p"·data-group-id="7128288540-6">(</span><span·class="n">PrivDir</span><span·class="p"·data-group-id="7128288540-6">)</span><span·class="p">,</span><span·class="w">212 ····</span><span·class="nf">build_image</span><span·class="p"·data-group-id="2171934329-6">(</span><span·class="n">PrivDir</span><span·class="p"·data-group-id="2171934329-6">)</span><span·class="p">,</span><span·class="w">
  
213 ····</span><span·class="c1">%%·start·two·Docker·containers</span><span·class="w">213 ····</span><span·class="c1">%%·start·two·Docker·containers</span><span·class="w">
214 ····</span><span·class="p"·data-group-id="7128288540-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="7128288540-7">}</span><span[·...·truncated·by·diffoscope;·len:·247,·SHA:·e516abbce4bdcac59f60fdfb00835ee65e02b71ce4108c577f0674b1ce953349·...·]-9">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">lambda</span><span·class="p">,</span><span·class="w">214 ····</span><span·class="p"·data-group-id="2171934329-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node</span><span·class="p"·data-group-id="2171934329-7">}</span><span[·...·truncated·by·diffoscope;·len:·247,·SHA:·e771a0e92b01729285040eec6de928370f9a77302d89b85f439d2c711a49a4fc·...·]-9">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">lambda</span><span·class="p">,</span><span·class="w">
215 ········</span><span·class="ss">connection</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">standard_io</span><span·class="p">,</span><span·class="w">215 ········</span><span·class="ss">connection</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">standard_io</span><span·class="p">,</span><span·class="w">
216 ········</span><span·class="ss">exec</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-10">{</span><span·class="n">Docker</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-11">[</span><span·class="s">&quot;run&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">[·...·truncated·by·diffoscope;·len:·483,·SHA:·8194dea37324d0cc81cef8553282db1860d64ff46cbbc9954388b6c3567a87cf·...·]-8">)</span><span·class="p">,</span><span·class="w">216 ········</span><span·class="ss">exec</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-10">{</span><span·class="n">Docker</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-11">[</span><span·class="s">&quot;run&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">[·...·truncated·by·diffoscope;·len:·483,·SHA:·529cf480867c7d71edebc95285000863133a67f6991b5a7e1a411cc6610083dd·...·]-8">)</span><span·class="p">,</span><span·class="w">
217 ····</span><span·class="p"·data-group-id="7128288540-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node2</span><span·class="p"·data-group-id="7128288540-12">}</span><[·...·truncated·by·diffoscope;·len:·252,·SHA:·4baae62754cd1618d1162a732e1a8eb10f76e40980f3d9cba2123431d2288ed1·...·]-14">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">lambda</span><span·class="p">,</span><span·class="w">217 ····</span><span·class="p"·data-group-id="2171934329-12">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Peer2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Node2</span><span·class="p"·data-group-id="2171934329-12">}</span><[·...·truncated·by·diffoscope;·len:·252,·SHA:·bceb27ffb536af468592f75a825f62a05966afa6b283e62b5e1d9bc6779b7350·...·]-14">#{</span><span·class="ss">name</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">lambda</span><span·class="p">,</span><span·class="w">
218 ········</span><span·class="ss">connection</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">standard_io</span><span·class="p">,</span><span·class="w">218 ········</span><span·class="ss">connection</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">standard_io</span><span·class="p">,</span><span·class="w">
219 ········</span><span·class="ss">exec</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-15">{</span><span·class="n">Docker</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-16">[</span><span·class="s">&quot;run&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">[·...·truncated·by·diffoscope;·len:·484,·SHA:·8754570c588b924d795228a455cef6eff33e7f6a35d09a55363cd9f144611097·...·]-13">)</span><span·class="p">,</span><span·class="w">219 ········</span><span·class="ss">exec</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-15">{</span><span·class="n">Docker</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-16">[</span><span·class="s">&quot;run&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">[·...·truncated·by·diffoscope;·len:·484,·SHA:·aac89c5f42f2a5e736bc68e42c85167f360c1e738704c75931ff67d6ab9c3fe9·...·]-13">)</span><span·class="p">,</span><span·class="w">
  
220 ····</span><span·class="c1">%%·find·IP·address·of·the·second·node·using·alternative·connection·RPC</span><span·class="w">220 ····</span><span·class="c1">%%·find·IP·address·of·the·second·node·using·alternative·connection·RPC</span><span·class="w">
221 ····</span><span·class="p"·data-group-id="7128288540-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ips</span><span·class="p"·data-group-id="7128288540-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·510,·SHA:·67f3567a5dc08bae72cccbbefa910d62583930676d6c533b8ea4821d1c8ca7c7·...·]-18">)</span><span·class="p">,</span><span·class="w">221 ····</span><span·class="p"·data-group-id="2171934329-17">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ips</span><span·class="p"·data-group-id="2171934329-17">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·510,·SHA:·af46e21d75b205a7ef98eb65224b905e163821bc271782f7a0cfc8c42d709cff·...·]-18">)</span><span·class="p">,</span><span·class="w">
222 ····</span><span·class="p"·data-group-id="7128288540-20">{</span><span·class="s">&quot;eth0&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Eth0</span><span·class="p"·data-group-id="7128288540-20">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·372,·SHA:·d6fc57a471cd0ad55443178b3751aa5a571509c78af6bd4f99b4458d2b11ab0b·...·]-21">)</span><span·class="p">,</span><span·class="w">222 ····</span><span·class="p"·data-group-id="2171934329-20">{</span><span·class="s">&quot;eth0&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Eth0</span><span·class="p"·data-group-id="2171934329-20">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·372,·SHA:·cc13a37196d1b43c4cae21113def799fdaac6d1b478d15f6b3506896355cf1dc·...·]-21">)</span><span·class="p">,</span><span·class="w">
223 ····</span><span·class="p"·data-group-id="7128288540-22">{</span><span·class="ss">addr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ip</span><span·class="p"·data-group-id="7128288540-22">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·349,·SHA:·c737fef0eb4b510b6c32e40c26156edbccfc0a8d6bbd1be3b3c62916d90ad2ed·...·]-23">)</span><span·class="p">,</span><span·class="w">223 ····</span><span·class="p"·data-group-id="2171934329-22">{</span><span·class="ss">addr</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ip</span><span·class="p"·data-group-id="2171934329-22">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·349,·SHA:·07324f7b48419c5b773f531a095b2cfd8baa6aaf8fc27ed225ae9b2b462ecf95·...·]-23">)</span><span·class="p">,</span><span·class="w">
  
224 ····</span><span·class="c1">%%·make·first·node·to·discover·second·one</span><span·class="w">224 ····</span><span·class="c1">%%·make·first·node·to·discover·second·one</span><span·class="w">
225 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7128288540-24">(</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inet_db</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">set_lookup</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·288,·SHA:·d1e115f0ba439979b32da57faa1cf64a00974614c764cb4a9df4930e502cecd3·...·]-24">)</span><span·class="p">,</span><span·class="w">225 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="2171934329-24">(</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inet_db</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">set_lookup</span><span·class="p">,</span><span·class="w">·</sp[·...·truncated·by·diffoscope;·len:·288,·SHA:·210d1726d2f635c2aa98ec365b3d3a89f41deda81ae9178be5a4bf76d29edceb·...·]-24">)</span><span·class="p">,</span><span·class="w">
226 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7128288540-27">(</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inet_db</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">add_host</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·369,·SHA:·42649f09c29ee01940a290a020712f71930bfe2584bb44a0ed4ef1fb05ebafa3·...·]-27">)</span><span·class="p">,</span><span·class="w">226 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="2171934329-27">(</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">inet_db</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">add_host</span><span·class="p">,</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·369,·SHA:·91430d571a34c46f953ee731ec07fd006330e347b1f5e920fdb7041067ef41b6·...·]-27">)</span><span·class="p">,</span><span·class="w">
  
227 ····</span><span·class="c1">%%·join·a·cluster</span><span·class="w">227 ····</span><span·class="c1">%%·join·a·cluster</span><span·class="w">
228 ····</span><span·class="ss">true</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7128288540-30">(</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">net_kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">connect_node</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·185,·SHA:·6d968b43048c5c2436d934dbce1f25d008fb8450c7a323d60d88127af6d4e9f2·...·]-30">)</span><span·class="p">,</span><span·class="w">228 ····</span><span·class="ss">true</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="2171934329-30">(</span><span·class="n">Peer</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">net_kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">connect_node</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·185,·SHA:·14ac25dc27c140061f518bbb744754ed272ff4f6c068aa17f54702250377b295·...·]-30">)</span><span·class="p">,</span><span·class="w">
229 ····</span><span·class="c1">%%·verify·that·second·peer·node·has·only·the·first·node·visible</span><span·class="w">229 ····</span><span·class="c1">%%·verify·that·second·peer·node·has·only·the·first·node·visible</span><span·class="w">
230 ····</span><span·class="p"·data-group-id="7128288540-32">[</span><span·class="n">Node</span><span·class="p"·data-group-id="7128288540-32">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span>[·...·truncated·by·diffoscope;·len:·434,·SHA:·155c84a7e7336c5c0c77785c89267bf4c3e8695d182d887e584fb0b70c4cc222·...·]-33">)</span><span·class="p">,</span><span·class="w">230 ····</span><span·class="p"·data-group-id="2171934329-32">[</span><span·class="n">Node</span><span·class="p"·data-group-id="2171934329-32">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">call</span>[·...·truncated·by·diffoscope;·len:·434,·SHA:·1acd1d4eef0ef1b6b4ef165821d29b85f58e0857570e990a8478a3a331e396dc·...·]-33">)</span><span·class="p">,</span><span·class="w">
  
231 ····</span><span·class="c1">%%·stop·peers,·causing·containers·to·also·stop</span><span·class="w">231 ····</span><span·class="c1">%%·stop·peers,·causing·containers·to·also·stop</span><span·class="w">
232 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7128288540-35">(</span><span·class="n">Peer2</span><span·class="p"·data-group-id="7128288540-35">)</span><span·class="p">,</span><span·class="w">232 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="2171934329-35">(</span><span·class="n">Peer2</span><span·class="p"·data-group-id="2171934329-35">)</span><span·class="p">,</span><span·class="w">
233 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7128288540-36">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="7128288540-36">)</span><span·class="p">.</span><span·class="w">233 ····</span><span·class="nc">peer</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="2171934329-36">(</span><span·class="n">Peer</span><span·class="p"·data-group-id="2171934329-36">)</span><span·class="p">.</span><span·class="w">
  
234 </span><span·class="nf">build_release</span><span·class="p"·data-group-id="7128288540-37">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="7128288540-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">234 </span><span·class="nf">build_release</span><span·class="p"·data-group-id="2171934329-37">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="2171934329-37">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
235 ····</span><span·class="c1">%%·load·sasl.app·file,·otherwise·application:get_key·will·fail</span><span·class="w">235 ····</span><span·class="c1">%%·load·sasl.app·file,·otherwise·application:get_key·will·fail</span><span·class="w">
236 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">load</span><span·class="p"·data-group-id="7128288540-38">(</span><span·class="ss">sasl</span><span·class="p"·data-group-id="7128288540-38">)</span><span·class="p">,</span><span·class="w">236 ····</span><span·class="nc">application</span><span·class="p">:</span><span·class="nf">load</span><span·class="p"·data-group-id="2171934329-38">(</span><span·class="ss">sasl</span><span·class="p"·data-group-id="2171934329-38">)</span><span·class="p">,</span><span·class="w">
237 ····</span><span·class="c1">%%·create·*.rel·-·release·file</span><span·class="w">237 ····</span><span·class="c1">%%·create·*.rel·-·release·file</span><span·class="w">
238 ····</span><span·class="n">RelFile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="7128288540-39">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;lambda.rel&quot;</span><span·class="p"·data-group-id="7128288540-39">)</span><span·class="p">,</span><span·class="w">238 ····</span><span·class="n">RelFile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2171934329-39">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;lambda.rel&quot;</span><span·class="p"·data-group-id="2171934329-39">)</span><span·class="p">,</span><span·class="w">
239 ····</span><span·class="n">Release</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-40">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-41">{</span><span·class="s">&quot;lambda&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·70,·SHA:·d59439c089fcd2eab6e968abddb1c96bdafd12ba0c4637f5e9f7f411a53e2935·...·]-41">}</span><span·class="p">,</span><span·class="w">239 ····</span><span·class="n">Release</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-40">{</span><span·class="ss">release</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-41">{</span><span·class="s">&quot;lambda&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·70,·SHA:·6d8d1745c9f4cbc826ce53482d51410d184081575048ec49908ddaf329333561·...·]-41">}</span><span·class="p">,</span><span·class="w">
240 ········</span><span·class="p"·data-group-id="7128288540-42">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="7128288540-43">(</span><span·class="s[·...·truncated·by·diffoscope;·len:·112,·SHA:·e097a32695337d459993937651f25d0d938e7cacad57e7142d31c4f0eb2b7510·...·]-42">}</span><span·class="p">,</span><span·class="w">240 ········</span><span·class="p"·data-group-id="2171934329-42">{</span><span·class="ss">erts</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="2171934329-43">(</span><span·class="s[·...·truncated·by·diffoscope;·len:·112,·SHA:·8ed4dd186c362e4baf2f722e3d1462902f10c50028e7119227e0de95e034294c·...·]-42">}</span><span·class="p">,</span><span·class="w">
241 ········</span><span·class="p"·data-group-id="7128288540-44">[</span><span·class="p"·data-group-id="7128288540-45">{</span><span·class="n">App</span><span·class="p">,</span><span·class="w">·</span><span·class="k">begin</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-46">{</span[·...·truncated·by·diffoscope;·len:·691,·SHA:·36ae226ed905f38f3bee642299e1852a834692d17c4986fdc9524e862e42f1cf·...·]-45">}</span><span·class="w">241 ········</span><span·class="p"·data-group-id="2171934329-44">[</span><span·class="p"·data-group-id="2171934329-45">{</span><span·class="n">App</span><span·class="p">,</span><span·class="w">·</span><span·class="k">begin</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-46">{</span[·...·truncated·by·diffoscope;·len:·691,·SHA:·b7f787ad2de469db5ee354d0c93e1d3e5d3f43a98e8658c4047c76430719ec42·...·]-45">}</span><span·class="w">
242 ············</span><span·class="p">||</span><span·class="w">·</span><span·class="n">App</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-48">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sasl</span><span·class="p"·data-group-id="7128288540-48">]</[·...·truncated·by·diffoscope;·len:·100,·SHA:·9662a6f87f19668ca82d035d23ed1ac81c4b0086175c6885a67fea6a562b7c0a·...·]-40">}</span><span·class="p">,</span><span·class="w">242 ············</span><span·class="p">||</span><span·class="w">·</span><span·class="n">App</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-48">[</span><span·class="ss">kernel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stdlib</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">sasl</span><span·class="p"·data-group-id="2171934329-48">]</[·...·truncated·by·diffoscope;·len:·100,·SHA:·6e2a5334c6cfac454bad1bdf079bcfcfbd1c00adf5b699eb63ce35057c90b9df·...·]-40">}</span><span·class="p">,</span><span·class="w">
243 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write_file</span><span·class="p"·data-group-id="7128288540-49">(</span><span·class="n">RelFile</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="7128288540-50">(</span><span·class="nc">lists</span><span·class="p">:</span><span·clas[·...·truncated·by·diffoscope;·len:·62,·SHA:·6033ac5b43f79b0b65b2d008f2034efb29d0e289df014c6d2c0dddc0de0e0499·...·]-51">(</span><span·class="w">243 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write_file</span><span·class="p"·data-group-id="2171934329-49">(</span><span·class="n">RelFile</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_binary</span><span·class="p"·data-group-id="2171934329-50">(</span><span·class="nc">lists</span><span·class="p">:</span><span·clas[·...·truncated·by·diffoscope;·len:·62,·SHA:·e50aa15f603da06cd062923d1148366942fa74dc9b871ee4f6a0687f28674838·...·]-51">(</span><span·class="w">
244 ········</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7128288540-52">(</span><span·class="s">&quot;~tp.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-53">[</span><span·class="n">Release</span><span·class="p"·data-group-id="7128288540-53">]</span><span·cl[·...·truncated·by·diffoscope;·len:·195,·SHA:·5dc995379624eb36879e2bf556b4b3ea64834380157c447ddf57af9bbd903956·...·]-49">)</span><span·class="p">,</span><span·class="w">244 ········</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2171934329-52">(</span><span·class="s">&quot;~tp.&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-53">[</span><span·class="n">Release</span><span·class="p"·data-group-id="2171934329-53">]</span><span·cl[·...·truncated·by·diffoscope;·len:·195,·SHA:·f828e1b937294321de865a24ae888c95eadd589537fb63f8cda3fd7b3ffd6679·...·]-49">)</span><span·class="p">,</span><span·class="w">
245 ····</span><span·class="n">RelFileNoExt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="7128288540-54">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;lambda&quot;</span><span·class="p"·data-group-id="7128288540-54">)</span><span·class="p">,</span><span·class="w">245 ····</span><span·class="n">RelFileNoExt</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2171934329-54">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;lambda&quot;</span><span·class="p"·data-group-id="2171934329-54">)</span><span·class="p">,</span><span·class="w">
  
246 ····</span><span·class="c1">%%·create·boot·script</span><span·class="w">246 ····</span><span·class="c1">%%·create·boot·script</span><span·class="w">
247 ····</span><span·class="p"·data-group-id="7128288540-55">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">systools_make</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-56">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·292,·SHA:·95ed691f598e91d1fdc8925a1b1dab95dcfb72eaeecc79016e65f61f660e6911·...·]-57">(</span><span·class="n">RelFileNoExt</span><span·class="p">,</span><span·class="w">247 ····</span><span·class="p"·data-group-id="2171934329-55">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">systools_make</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-56">[</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·292,·SHA:·0dacfb7a2ecb52241d55f60a96845e0b27796a59e4c1f83ac01828a317b90e27·...·]-57">(</span><span·class="n">RelFileNoExt</span><span·class="p">,</span><span·class="w">
248 ········</span><span·class="p"·data-group-id="7128288540-58">[</span><span·class="ss">silent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-59">{</span><span·class="ss">outdir</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dir</sp[·...·truncated·by·diffoscope;·len:·152,·SHA:·ad41bb2cbedc08d1c765232b2d9bc9f529374dafb5577a9b87251d90a05a83ad·...·]-57">)</span><span·class="p">,</span><span·class="w">248 ········</span><span·class="p"·data-group-id="2171934329-58">[</span><span·class="ss">silent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-59">{</span><span·class="ss">outdir</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Dir</sp[·...·truncated·by·diffoscope;·len:·152,·SHA:·9658851fafdb2d29da8e012606e0b3f27c084af8994592412b30422ee1867baf·...·]-57">)</span><span·class="p">,</span><span·class="w">
249 ····</span><span·class="c1">%%·package·release·into·*.tar.gz</span><span·class="w">249 ····</span><span·class="c1">%%·package·release·into·*.tar.gz</span><span·class="w">
250 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">systools</span><span·class="p">:</span><span·class="nf">make_tar</span><span·class="p"·data-group-id="7128288540-60">(</span><span·class="n">RelFileNoExt</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7128288540-61">[</span><span·class="p"·data-group-id="7128288540-62">{</span><span·class="ss">erts</span><span·class="p[·...·truncated·by·diffoscope;·len:·375,·SHA:·12b86fe17b6f125dce4045046a6904b975c01894d859146c6ef5f48c881e76dc·...·]-60">)</span><span·class="p">.</span><span·class="w">250 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">systools</span><span·class="p">:</span><span·class="nf">make_tar</span><span·class="p"·data-group-id="2171934329-60">(</span><span·class="n">RelFileNoExt</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2171934329-61">[</span><span·class="p"·data-group-id="2171934329-62">{</span><span·class="ss">erts</span><span·class="p[·...·truncated·by·diffoscope;·len:·375,·SHA:·cf6f86bf395c75286e3297f260a8aacba0aa5e9c7098df192439ac795981e690·...·]-60">)</span><span·class="p">.</span><span·class="w">
  
251 </span><span·class="nf">build_image</span><span·class="p"·data-group-id="7128288540-64">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="7128288540-64">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">251 </span><span·class="nf">build_image</span><span·class="p"·data-group-id="2171934329-64">(</span><span·class="n">Dir</span><span·class="p"·data-group-id="2171934329-64">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
252 ····</span><span·class="c1">%%·Create·Dockerfile·example,·working·only·for·Ubuntu·20.04</span><span·class="w">252 ····</span><span·class="c1">%%·Create·Dockerfile·example,·working·only·for·Ubuntu·20.04</span><span·class="w">
253 ····</span><span·class="c1">%%·Expose·port·4445,·and·make·Erlang·distribution·to·listen</span><span·class="w">253 ····</span><span·class="c1">%%·Expose·port·4445,·and·make·Erlang·distribution·to·listen</span><span·class="w">
254 ····</span><span·class="c1">%%··on·this·port,·and·connect·to·it·without·EPMD</span><span·class="w">254 ····</span><span·class="c1">%%··on·this·port,·and·connect·to·it·without·EPMD</span><span·class="w">
255 ····</span><span·class="c1">%%·Set·cookie·on·both·nodes·to·be·the·same.</span><span·class="w">255 ····</span><span·class="c1">%%·Set·cookie·on·both·nodes·to·be·the·same.</span><span·class="w">
256 ····</span><span·class="n">BuildScript</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="7128288540-65">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Dockerfile&quot;</span><span·class="p"·data-group-id="7128288540-65">)</span><span·class="p">,</span><span·class="w">256 ····</span><span·class="n">BuildScript</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">filename</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="2171934329-65">(</span><span·class="n">Dir</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Dockerfile&quot;</span><span·class="p"·data-group-id="2171934329-65">)</span><span·class="p">,</span><span·class="w">
257 ····</span><span·class="n">Dockerfile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">257 ····</span><span·class="n">Dockerfile</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
258 ······</span><span·class="s">&quot;FROM·ubuntu:20.04·as·runner\n&quot;</span><span·class="w">258 ······</span><span·class="s">&quot;FROM·ubuntu:20.04·as·runner\n&quot;</span><span·class="w">
259 ······</span><span·class="s">&quot;EXPOSE·4445\n&quot;</span><span·class="w">259 ······</span><span·class="s">&quot;EXPOSE·4445\n&quot;</span><span·class="w">
260 ······</span><span·class="s">&quot;WORKDIR·/opt/lambda\n&quot;</span><span·class="w">260 ······</span><span·class="s">&quot;WORKDIR·/opt/lambda\n&quot;</span><span·class="w">
261 ······</span><span·class="s">&quot;COPY·lambda.tar.gz·/tmp\n&quot;</span><span·class="w">261 ······</span><span·class="s">&quot;COPY·lambda.tar.gz·/tmp\n&quot;</span><span·class="w">
262 ······</span><span·class="s">&quot;RUN·tar·-zxvf·/tmp/lambda.tar.gz·-C·/opt/lambda\n&quot;</span><span·class="w">262 ······</span><span·class="s">&quot;RUN·tar·-zxvf·/tmp/lambda.tar.gz·-C·/opt/lambda\n&quot;</span><span·class="w">
263 ······</span><span·class="s">&quot;ENTRYPOINT·[\&quot;/opt/lambda/erts-&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="7128288540-66">(</span><span·class="ss">version</span><span·class="p"·data-group-id="7128288540-66">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">263 ······</span><span·class="s">&quot;ENTRYPOINT·[\&quot;/opt/lambda/erts-&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">system_info</span><span·class="p"·data-group-id="2171934329-66">(</span><span·class="ss">version</span><span·class="p"·data-group-id="2171934329-66">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">
264 ······</span><span·class="s">&quot;/bin/dyn_erl\&quot;,·\&quot;-boot\&quot;,·\&quot;/opt/lambda/releases/1.0.0/start\&quot;,&quot;</span><span·class="w">264 ······</span><span·class="s">&quot;/bin/dyn_erl\&quot;,·\&quot;-boot\&quot;,·\&quot;/opt/lambda/releases/1.0.0/start\&quot;,&quot;</span><span·class="w">
265 ······</span><span·class="s">&quot;·\&quot;-kernel\&quot;,·\&quot;inet_dist_listen_min\&quot;,·\&quot;4445\&quot;,&quot;</span><span·class="w">265 ······</span><span·class="s">&quot;·\&quot;-kernel\&quot;,·\&quot;inet_dist_listen_min\&quot;,·\&quot;4445\&quot;,&quot;</span><span·class="w">
266 ······</span><span·class="s">&quot;·\&quot;-erl_epmd_port\&quot;,·\&quot;4445\&quot;,&quot;</span><span·class="w">266 ······</span><span·class="s">&quot;·\&quot;-erl_epmd_port\&quot;,·\&quot;4445\&quot;,&quot;</span><span·class="w">
267 ······</span><span·class="s">&quot;·\&quot;-setcookie\&quot;,·\&quot;secret\&quot;]\n&quot;</span><span·class="p">,</span><span·class="w">267 ······</span><span·class="s">&quot;·\&quot;-setcookie\&quot;,·\&quot;secret\&quot;]\n&quot;</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 7885/92291 bytes (8.54%) of diff not shown.
18.9 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/proc_lib.html
    
Offset 991, 29 lines modifiedOffset 991, 29 lines modified
991 the·start·function·used.</p><p>If·neither·this·function·nor·<a·href="#init_fail/3"><code·class="inline">init_fail/2,3</code></a>·is·called·by·the991 the·start·function·used.</p><p>If·neither·this·function·nor·<a·href="#init_fail/3"><code·class="inline">init_fail/2,3</code></a>·is·called·by·the
992 started·process,·the·start·function·returns·an·error·tuple·when·the·started992 started·process,·the·start·function·returns·an·error·tuple·when·the·started
993 process·exits,·or·when·the·start·function·time-out·(if·used)·has·passed,·see993 process·exits,·or·when·the·start·function·time-out·(if·used)·has·passed,·see
994 <a·href="#start/5"><code·class="inline">start/3,4,5</code></a>.</p><blockquote><h4·class="warning">Warning</h4><p>Do·not·use·this·function·to·return·an·error·indicating·that·the·process·start994 <a·href="#start/5"><code·class="inline">start/3,4,5</code></a>.</p><blockquote><h4·class="warning">Warning</h4><p>Do·not·use·this·function·to·return·an·error·indicating·that·the·process·start
995 failed.·When·doing·so·the·start·function·can·return·before·the·failing·process995 failed.·When·doing·so·the·start·function·can·return·before·the·failing·process
996 has·exited,·which·may·block·VM·resources·required·for·a·new·start·attempt·to996 has·exited,·which·may·block·VM·resources·required·for·a·new·start·attempt·to
997 succeed.·Use·<a·href="#init_fail/3"><code·class="inline">init_fail/2,3</code></a>·for·that·purpose.</p></blockquote><p>The·following·example·illustrates·how·this·function·and·<a·href="#start_link/3"><code·class="inline">proc_lib:start_link/3</code></a>997 succeed.·Use·<a·href="#init_fail/3"><code·class="inline">init_fail/2,3</code></a>·for·that·purpose.</p></blockquote><p>The·following·example·illustrates·how·this·function·and·<a·href="#start_link/3"><code·class="inline">proc_lib:start_link/3</code></a>
998 are·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7835775505-1">(</span><span·class="ss">my_proc</span><span·class="p"·data-group-id="7835775505-1">)</span><span·class="p">.</span><span·class="w">998 are·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="1377751216-1">(</span><span·class="ss">my_proc</span><span·class="p"·data-group-id="1377751216-1">)</span><span·class="p">.</span><span·class="w">
999 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7835775505-2">(</span><span·class="p"·data-group-id="7835775505-3">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7835775505-3">]</span><span·class="p"·data-group-id="7835775505-2">)</span><span·class="p">.</span><span·class="w">999 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1377751216-2">(</span><span·class="p"·data-group-id="1377751216-3">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="1377751216-3">]</span><span·class="p"·data-group-id="1377751216-2">)</span><span·class="p">.</span><span·class="w">
1000 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7835775505-4">(</span><span·class="p"·data-group-id="7835775505-5">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="7835775505-5">]</span><span·class="p"·data-group-id="7835775505-4">)</span><span·class="p">.</span><span·class="w">1000 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="1377751216-4">(</span><span·class="p"·data-group-id="1377751216-5">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="1377751216-5">]</span><span·class="p"·data-group-id="1377751216-4">)</span><span·class="p">.</span><span·class="w">
  
1001 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="7835775505-6">(</span><span·class="p"·data-group-id="7835775505-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1001 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="1377751216-6">(</span><span·class="p"·data-group-id="1377751216-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1002 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="7835775505-7">(</span><span·class="ss">my_proc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7835775505-8">[</span><span·class="nf">self</spa[·...·truncated·by·diffoscope;·len:·202,·SHA:·f6e819852e9ccb62cc5e44d360f77e32549f2809a71776d8b1cff00c20665274·...·]-7">)</span><span·class="p">.</span><span·class="w">1002 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="1377751216-7">(</span><span·class="ss">my_proc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1377751216-8">[</span><span·class="nf">self</spa[·...·truncated·by·diffoscope;·len:·202,·SHA:·93d8f7706818ea323c5559ac008a67ce639d33aeef753a865df1021a3a15c161·...·]-7">)</span><span·class="p">.</span><span·class="w">
  
1003 </span><span·class="nf">init</span><span·class="p"·data-group-id="7835775505-10">(</span><span·class="n">Parent</span><span·class="p"·data-group-id="7835775505-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1003 </span><span·class="nf">init</span><span·class="p"·data-group-id="1377751216-10">(</span><span·class="n">Parent</span><span·class="p"·data-group-id="1377751216-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1004 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">do_initialization</span><span·class="p"·data-group-id="7835775505-11">(</span><span·class="p"·data-group-id="7835775505-11">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1004 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">do_initialization</span><span·class="p"·data-group-id="1377751216-11">(</span><span·class="p"·data-group-id="1377751216-11">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1005 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1005 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1006 ············</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_ack</span><span·class="p"·data-group-id="7835775505-12">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7835775505-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·203,·SHA:·98529bc6c02c33abc4c700764455960f83fd80b7311155e2e5150707a4b74dfa·...·]-12">)</span><span·class="p">;</span><span·class="w">1006 ············</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_ack</span><span·class="p"·data-group-id="1377751216-12">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1377751216-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·203,·SHA:·9b44922a93bf9da3d16a8bb8ad1e795e8a1667fa5c8fa58bf27b66d502e2b8fa·...·]-12">)</span><span·class="p">;</span><span·class="w">
1007 ········</span><span·class="p"·data-group-id="7835775505-15">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="7835775505-15">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1007 ········</span><span·class="p"·data-group-id="1377751216-15">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="1377751216-15">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1008 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="7835775505-16">(</span><span·class="n">Reason</span><span·class="p"·data-group-id="7835775505-16">)</span><span·class="w">1008 ············</span><span·class="nf">exit</span><span·class="p"·data-group-id="1377751216-16">(</span><span·class="n">Reason</span><span·class="p"·data-group-id="1377751216-16">)</span><span·class="w">
1009 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">1009 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
1010 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="7835775505-17">(</span><span·class="p"·data-group-id="7835775505-17">)</span><span·class="p">.</span><span·class="w">1010 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="1377751216-17">(</span><span·class="p"·data-group-id="1377751216-17">)</span><span·class="p">.</span><span·class="w">
  
1011 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>1011 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>
1012 ··</section>1012 ··</section>
1013 </section>1013 </section>
1014 <section·class="detail"·id="init_fail/2">1014 <section·class="detail"·id="init_fail/2">
  
1015 ··<div·class="detail-header">1015 ··<div·class="detail-header">
Offset 1078, 29 lines modifiedOffset 1078, 29 lines modified
1078 to·<code·class="inline">Exception</code>.·The·start·function·then·returns·<code·class="inline">Ret</code>.</p><p>See·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#raise/3"><code·class="inline">erlang:raise/3</code></a>·for·a·description·of·<code·class="inline">Class</code>,·<code·class="inline">Reason</code>·and·<code·class="inline">Stacktrace</code>.</p><blockquote><h4·class="warning">Warning</h4><p>Do·not·consider·catching·the·exception·from·this·function.·That·would·defeat1078 to·<code·class="inline">Exception</code>.·The·start·function·then·returns·<code·class="inline">Ret</code>.</p><p>See·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#raise/3"><code·class="inline">erlang:raise/3</code></a>·for·a·description·of·<code·class="inline">Class</code>,·<code·class="inline">Reason</code>·and·<code·class="inline">Stacktrace</code>.</p><blockquote><h4·class="warning">Warning</h4><p>Do·not·consider·catching·the·exception·from·this·function.·That·would·defeat
1079 its·purpose.·A·process·started·by·a·<a·href="#start/3"><code·class="inline">start[_link|_monitor]/3,4,5</code></a>1079 its·purpose.·A·process·started·by·a·<a·href="#start/3"><code·class="inline">start[_link|_monitor]/3,4,5</code></a>
1080 function·should·end·in·a·value·(that·will·be·ignored)·or·an·exception·that1080 function·should·end·in·a·value·(that·will·be·ignored)·or·an·exception·that
1081 will·be·handled·by·this·module.·See·<a·href="proc_lib.html">Description</a>.</p></blockquote><p>If·neither·this·function·nor·<a·href="#init_ack/1"><code·class="inline">init_ack/1,2</code></a>·is·called·by·the1081 will·be·handled·by·this·module.·See·<a·href="proc_lib.html">Description</a>.</p></blockquote><p>If·neither·this·function·nor·<a·href="#init_ack/1"><code·class="inline">init_ack/1,2</code></a>·is·called·by·the
1082 started·process,·the·start·function·returns·an·error·tuple·when·the·started1082 started·process,·the·start·function·returns·an·error·tuple·when·the·started
1083 process·exits,·or·when·the·start·function·time-out·(if·used)·has·passed,·see1083 process·exits,·or·when·the·start·function·time-out·(if·used)·has·passed,·see
1084 <a·href="#start/3"><code·class="inline">start/3,4,5</code></a>.</p><p>The·following·example·illustrates·how·this·function·and·<a·href="#start_link/3"><code·class="inline">proc_lib:start_link/3</code></a>1084 <a·href="#start/3"><code·class="inline">start/3,4,5</code></a>.</p><p>The·following·example·illustrates·how·this·function·and·<a·href="#start_link/3"><code·class="inline">proc_lib:start_link/3</code></a>
1085 can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3796984263-1">(</span><span·class="ss">my_proc</span><span·class="p"·data-group-id="3796984263-1">)</span><span·class="p">.</span><span·class="w">1085 can·be·used:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4755021818-1">(</span><span·class="ss">my_proc</span><span·class="p"·data-group-id="4755021818-1">)</span><span·class="p">.</span><span·class="w">
1086 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3796984263-2">(</span><span·class="p"·data-group-id="3796984263-3">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="3796984263-3">]</span><span·class="p"·data-group-id="3796984263-2">)</span><span·class="p">.</span><span·class="w">1086 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4755021818-2">(</span><span·class="p"·data-group-id="4755021818-3">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4755021818-3">]</span><span·class="p"·data-group-id="4755021818-2">)</span><span·class="p">.</span><span·class="w">
1087 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3796984263-4">(</span><span·class="p"·data-group-id="3796984263-5">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3796984263-5">]</span><span·class="p"·data-group-id="3796984263-4">)</span><span·class="p">.</span><span·class="w">1087 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4755021818-4">(</span><span·class="p"·data-group-id="4755021818-5">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4755021818-5">]</span><span·class="p"·data-group-id="4755021818-4">)</span><span·class="p">.</span><span·class="w">
  
1088 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="3796984263-6">(</span><span·class="p"·data-group-id="3796984263-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1088 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="4755021818-6">(</span><span·class="p"·data-group-id="4755021818-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1089 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="3796984263-7">(</span><span·class="ss">my_proc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3796984263-8">[</span><span·class="nf">self</spa[·...·truncated·by·diffoscope;·len:·202,·SHA:·cdcdd96ae7052aedba4118461c8ecad3c7eb99576b73cae8b810a880287d6a70·...·]-7">)</span><span·class="p">.</span><span·class="w">1089 ····</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="4755021818-7">(</span><span·class="ss">my_proc</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">init</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4755021818-8">[</span><span·class="nf">self</spa[·...·truncated·by·diffoscope;·len:·202,·SHA:·ef744be88fdbaf3ef4f2e6b43b13b7bfc40de22d7915e562e6cde2a455b359dd·...·]-7">)</span><span·class="p">.</span><span·class="w">
  
1090 </span><span·class="nf">init</span><span·class="p"·data-group-id="3796984263-10">(</span><span·class="n">Parent</span><span·class="p"·data-group-id="3796984263-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1090 </span><span·class="nf">init</span><span·class="p"·data-group-id="4755021818-10">(</span><span·class="n">Parent</span><span·class="p"·data-group-id="4755021818-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1091 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">do_initialization</span><span·class="p"·data-group-id="3796984263-11">(</span><span·class="p"·data-group-id="3796984263-11">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1091 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nf">do_initialization</span><span·class="p"·data-group-id="4755021818-11">(</span><span·class="p"·data-group-id="4755021818-11">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1092 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1092 ········</span><span·class="ss">ok</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1093 ············</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_ack</span><span·class="p"·data-group-id="3796984263-12">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3796984263-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·203,·SHA:·c9aa9184ed10fa486b32036ea6783eded0f01635db11173291a961cc8d262e5c·...·]-12">)</span><span·class="p">;</span><span·class="w">1093 ············</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_ack</span><span·class="p"·data-group-id="4755021818-12">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4755021818-13">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span>[·...·truncated·by·diffoscope;·len:·203,·SHA:·d1b10f12b9d3022b728f72c9d1c6d68569a4ed612e859b36d72abb9641d80b01·...·]-12">)</span><span·class="p">;</span><span·class="w">
1094 ········</span><span·class="p"·data-group-id="3796984263-15">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="3796984263-15">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1094 ········</span><span·class="p"·data-group-id="4755021818-15">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Reason</span><span·class="p"·data-group-id="4755021818-15">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Error</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1095 ············</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_fail</span><span·class="p"·data-group-id="3796984263-16">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3796984263-17">{</span><span·class="nb">exit</spa[·...·truncated·by·diffoscope;·len:·175,·SHA:·9aec5fc236802f2c88ca311323160472200054a958fb324622baf63594804088·...·]-16">)</span><span·class="w">1095 ············</span><span·class="nc">proc_lib</span><span·class="p">:</span><span·class="nf">init_fail</span><span·class="p"·data-group-id="4755021818-16">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Error</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4755021818-17">{</span><span·class="nb">exit</spa[·...·truncated·by·diffoscope;·len:·175,·SHA:·4e2b1c9caf832cd8fa5e8d6f1a5f198d8410f8636dd9eea254287be68ca2dfac·...·]-16">)</span><span·class="w">
1096 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">1096 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
1097 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="3796984263-18">(</span><span·class="p"·data-group-id="3796984263-18">)</span><span·class="p">.</span><span·class="w">1097 ····</span><span·class="nf">loop</span><span·class="p"·data-group-id="4755021818-18">(</span><span·class="p"·data-group-id="4755021818-18">)</span><span·class="p">.</span><span·class="w">
  
1098 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>1098 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre>
1099 ··</section>1099 ··</section>
1100 </section>1100 </section>
1101 <section·class="detail"·id="initial_call/1">1101 <section·class="detail"·id="initial_call/1">
  
1102 ··<div·class="detail-header">1102 ··<div·class="detail-header">
30.5 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/proplists.html
    
Offset 528, 15 lines modifiedOffset 528, 15 lines modified
  
528 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append_values(Key,·ListIn)·->·ListOut·when·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·ListIn·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],·ListOut·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>528 ··········<pre·translate="no"><span·class="attribute">-spec</span>·append_values(Key,·ListIn)·->·ListOut·when·Key·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>(),·ListIn·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],·ListOut·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>
  
529 ······</div>529 ······</div>
  
530 <p>Similar·to·<a·href="#get_all_values/2"><code·class="inline">get_all_values/2</code></a>,·but·each·value·is·wrapped·in·a·list·unless·it·is530 <p>Similar·to·<a·href="#get_all_values/2"><code·class="inline">get_all_values/2</code></a>,·but·each·value·is·wrapped·in·a·list·unless·it·is
531 already·itself·a·list.·The·resulting·list·of·lists·is·concatenated.·This·is531 already·itself·a·list.·The·resulting·list·of·lists·is·concatenated.·This·is
532 often·useful·for·&quot;incremental&quot;·options.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append_values</span><span·class="p"·data-group-id="7822454915-1">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7822454915-2">[</span><span·class="p"·data-group-id="7822454915-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·1837,·SHA:·02298792c75630055a216a28c01c65943adf0ed2c070441c9fdc196d0a065dc0·...·]-1">]</span></code></pre>532 often·useful·for·&quot;incremental&quot;·options.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">append_values</span><span·class="p"·data-group-id="3264892856-1">(</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3264892856-2">[</span><span·class="p"·data-group-id="3264892856-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·1837,·SHA:·7b9e7c3ef6b92b8be1d26c8d278a52c13d3da138127f8c934e80571f6b2207c1·...·]-1">]</span></code></pre>
533 ··</section>533 ··</section>
534 </section>534 </section>
535 <section·class="detail"·id="compact/1">535 <section·class="detail"·id="compact/1">
  
536 ··<div·class="detail-header">536 ··<div·class="detail-header">
537 ····<a·href="#compact/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">537 ····<a·href="#compact/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
538 ······<i·class="ri-link-m"·aria-hidden="true"></i>538 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 622, 18 lines modifiedOffset 622, 18 lines modified
622 ······</div>622 ······</div>
  
623 <p>Expands·particular·properties·to·corresponding·sets·of·properties·(or·other623 <p>Expands·particular·properties·to·corresponding·sets·of·properties·(or·other
624 terms).</p><p>For·each·pair·<code·class="inline">{Property,·Expansion}</code>·in·<code·class="inline">Expansions</code>:·if·<code·class="inline">E</code>·is·the624 terms).</p><p>For·each·pair·<code·class="inline">{Property,·Expansion}</code>·in·<code·class="inline">Expansions</code>:·if·<code·class="inline">E</code>·is·the
625 first·entry·in·<code·class="inline">ListIn</code>·with·the·same·key·as·<code·class="inline">Property</code>,·and·<code·class="inline">E</code>·and·<code·class="inline">Property</code>625 first·entry·in·<code·class="inline">ListIn</code>·with·the·same·key·as·<code·class="inline">Property</code>,·and·<code·class="inline">E</code>·and·<code·class="inline">Property</code>
626 have·equivalent·normal·forms,·then·<code·class="inline">E</code>·is·replaced·with·the·terms·in626 have·equivalent·normal·forms,·then·<code·class="inline">E</code>·is·replaced·with·the·terms·in
627 <code·class="inline">Expansion</code>,·and·any·following·entries·with·the·same·key·are·deleted·from627 <code·class="inline">Expansion</code>,·and·any·following·entries·with·the·same·key·are·deleted·from
628 <code·class="inline">ListIn</code>.</p><p>For·example,·the·following·expressions·all·return·<code·class="inline">[fie,·bar,·baz,·fum]</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expand</span><span·class="p"·data-group-id="4170868177-1">(</span><span·class="p"·data-group-id="4170868177-2">[</span><span·class="p"·data-group-id="4170868177-3">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-4">[</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p"·data-group-id="4170868177-4">]</span><span·class="p"·data-group-id="4170868177-3">}</span><span·class="p"·data-group-id="4170868177-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-5">[</span><span·class="ss">fie</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fum</span><span·class="p"·data-group-id="4170868177-5">]</span><span·class="p"·data-group-id="4170868177-1">)</span><span·class="w"> 
629 </span><span·class="nf">expand</span><span·class="p"·data-group-id="4170868177-6">(</span><span·class="p"·data-group-id="4170868177-7">[</span><span·class="p"·data-group-id="4170868177-8">{</span><span·class="p"·data-group-id="4170868177-9">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="4170868177-9">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-10">[</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p"·data-group-id="4170868177-10">]</span><span·class="p"·data-group-id="4170868177-8">}</span><span·class="p"·data-group-id="4170868177-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-11">[</span><span·class="ss">fie</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fum</span><span·class="p"·data-group-id="4170868177-11">]</span><span·class="p"·data-group-id="4170868177-6">)</span><span·class="w"> 
630 </span><span·class="nf">expand</span><span·class="p"·data-group-id="4170868177-12">(</span><span·class="p"·data-group-id="4170868177-13">[</span><span·class="p"·data-group-id="4170868177-14">{</span><span·class="p"·data-group-id="4170868177-15">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="4170868177-15">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-16">[</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p"·data-group-id="4170868177-16">]</span><span·class="p"·data-group-id="4170868177-14">}</span><span·class="p"·data-group-id="4170868177-13">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-17">[</span><span·class="ss">fie</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4170868177-18">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="4170868177-18">}</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fum</span><span·class="p"·data-group-id="4170868177-17">]</span><span·class="p"·data-group-id="4170868177-12">)</span></code></pre><p>However,·no·expansion·is·done·in·the·following·call·because·<code·class="inline">{foo,·false}</code> 
631 shadows·<code·class="inline">foo</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expand</span><span·class="p"·data-group-id="6219410692-1">(</span><span·class="p"·data-group-id="6219410692-2">[</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·1333,·SHA:·bf53e0dd1958e8c973701718f7498722a42161ffc799651b4db9d96ecbfb6138·...·]628 <code·class="inline">ListIn</code>.</p><p>For·example,·the·following·expressions·all·return·<code·class="inline">[fie,·bar,·baz,·fum]</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expand</span><span·class="p"·data-group-id="74[·...·truncated·by·diffoscope;·len:·915,·SHA:·642bf0945cc2ee243066ef74878c2432ec0e986389c6c9ed354d403839053870·...·]
 629 </span><span·class="nf">expand</span><span·class="p"·data-group-id="7494370451-6">(</span><span·class="p"·data-group-id="7494370451-7">[</span><span·class="p"·data-group-id="7494370451-8">{</span><span·class="p"·data-group-id="7494370451-9">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="7494370451-9">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7494370451-10">[</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p"·data-group-id="7494370451-10">]</span><span·class="p"·data-group-id="7494370451-8">}</span><span·class="p"·data-group-id="7494370451-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7494370451-11">[</span><span·class="ss">fie</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fum</span><span·class="p"·data-group-id="7494370451-11">]</span><span·class="p"·data-group-id="7494370451-6">)</span><span·class="w">
 630 </span><span·class="nf">expand</span><span·class="p"·data-group-id="7494370451-12">(</span><span·class="p"·data-group-id="7494370451-13">[</span><span·class="p"·data-group-id="7494370451-14">{</span><span·class="p"·data-group-id="7494370451-15">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="7494370451-15">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7494370451-16">[</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p"·data-group-id="7494370451-16">]</span><span·class="p"·data-group-id="7494370451-14">}</span><span·class="p"·data-group-id="7494370451-13">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7494370451-17">[</span><span·class="ss">fie</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7494370451-18">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="7494370451-18">}</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fum</span><span·class="p"·data-group-id="7494370451-17">]</span><span·class="p"·data-group-id="7494370451-12">)</span></code></pre><p>However,·no·expansion·is·done·in·the·following·call·because·<code·class="inline">{foo,·false}</code>
 631 shadows·<code·class="inline">foo</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">expand</span><span·class="p"·data-group-id="7455525728-1">(</span><span·class="p"·data-group-id="7455525728-2">[</span><span·class="p"·data-group-id="7455525728-3">{</span><span·class="p"·data-group-id="7455525728-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="7455525728-4">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7455525728-5">[</span><span·class="ss">bar</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p"·data-group-id="7455525728-5">]</span><span·class="p"·data-group-id="7455525728-3">}</span><span·class="p"·data-group-id="7455525728-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7455525728-6">[</span><span·class="p"·data-group-id="7455525728-7">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="7455525728-7">}</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fie</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">fum</span><span·class="p"·data-group-id="7455525728-6">]</span><span·class="p"·data-group-id="7455525728-1">)</span></code></pre><p>Notice·that·if·the·original·property·term·is·to·be·preserved·in·the·result·when
632 expanded,·it·must·be·included·in·the·expansion·list.·The·inserted·terms·are·not632 expanded,·it·must·be·included·in·the·expansion·list.·The·inserted·terms·are·not
633 expanded·recursively.·If·<code·class="inline">Expansions</code>·contains·more·than·one·property·with·the633 expanded·recursively.·If·<code·class="inline">Expansions</code>·contains·more·than·one·property·with·the
634 same·key,·only·the·first·occurrence·is·used.</p><p>See·also·<a·href="#normalize/2"><code·class="inline">normalize/2</code></a>.</p>634 same·key,·only·the·first·occurrence·is·used.</p><p>See·also·<a·href="#normalize/2"><code·class="inline">normalize/2</code></a>.</p>
635 ··</section>635 ··</section>
636 </section>636 </section>
637 <section·class="detail"·id="from_map/1">637 <section·class="detail"·id="from_map/1">
  
Offset 1030, 15 lines modifiedOffset 1030, 15 lines modified
1030 ···············when·List·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],·Keys·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],·Lists·::·[[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()]],·Rest·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>1030 ···············when·List·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],·Keys·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()],·Lists·::·[[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()]],·Rest·::·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>()].</pre>
  
1031 ······</div>1031 ······</div>
  
1032 <p>Partitions·<code·class="inline">List</code>·into·a·list·of·sublists·and·a·remainder.</p><p><code·class="inline">Lists</code>·contains·one·sublist·for·each·key·in·<code·class="inline">Keys</code>,·in·the·corresponding·order.1032 <p>Partitions·<code·class="inline">List</code>·into·a·list·of·sublists·and·a·remainder.</p><p><code·class="inline">Lists</code>·contains·one·sublist·for·each·key·in·<code·class="inline">Keys</code>,·in·the·corresponding·order.
1033 The·relative·order·of·the·elements·in·each·sublist·is·preserved·from·the·original·<code·class="inline">List</code>.1033 The·relative·order·of·the·elements·in·each·sublist·is·preserved·from·the·original·<code·class="inline">List</code>.
1034 <code·class="inline">Rest</code>·contains·the·elements·in·<code·class="inline">List</code>·that·are·not·associated·with·any·of·the1034 <code·class="inline">Rest</code>·contains·the·elements·in·<code·class="inline">List</code>·that·are·not·associated·with·any·of·the
1035 specified·keys,·also·with·their·original·relative·order·preserved.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">split</span><span·class="p"·data-group-id="1949966774-1">(</span><span·class="p"·data-group-id="1949966774-2">[</span><span·class="p"·data-group-id="1949966774-3">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·3431,·SHA:·3d8df7fa563f6dfea14c25eb272e5216a865d84ce6caa5faa751f18fe2513d93·...·]-1">}</span></code></pre>1035 specified·keys,·also·with·their·original·relative·order·preserved.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">split</span><span·class="p"·data-group-id="1506354334-1">(</span><span·class="p"·data-group-id="1506354334-2">[</span><span·class="p"·data-group-id="1506354334-3">{</span><span·class="ss">c</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">2</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·3431,·SHA:·2bdf7a810531a77178b45ef661db7f3a34f2ddafde10a8eb17545904a7c1625a·...·]-1">}</span></code></pre>
1036 ··</section>1036 ··</section>
1037 </section>1037 </section>
1038 <section·class="detail"·id="substitute_aliases/2">1038 <section·class="detail"·id="substitute_aliases/2">
  
1039 ··<div·class="detail-header">1039 ··<div·class="detail-header">
1040 ····<a·href="#substitute_aliases/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1040 ····<a·href="#substitute_aliases/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1041 ······<i·class="ri-link-m"·aria-hidden="true"></i>1041 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1153, 15 lines modifiedOffset 1153, 15 lines modified
1153 ······</div>1153 ······</div>
  
1154 <p>Converts·the·property·list·<code·class="inline">List</code>·to·a·map.</p><p>Shorthand·atom·values·in·<code·class="inline">List</code>·will·be·expanded·to·an·association·of·the·form1154 <p>Converts·the·property·list·<code·class="inline">List</code>·to·a·map.</p><p>Shorthand·atom·values·in·<code·class="inline">List</code>·will·be·expanded·to·an·association·of·the·form
1155 <code·class="inline">Atom·=&gt;·true</code>.·Tuples·of·the·form·<code·class="inline">{Key,·Value}</code>·in·<code·class="inline">List</code>·will·be·converted·to1155 <code·class="inline">Atom·=&gt;·true</code>.·Tuples·of·the·form·<code·class="inline">{Key,·Value}</code>·in·<code·class="inline">List</code>·will·be·converted·to
1156 an·association·of·the·form·<code·class="inline">Key·=&gt;·Value</code>.·Anything·else·will·be·silently1156 an·association·of·the·form·<code·class="inline">Key·=&gt;·Value</code>.·Anything·else·will·be·silently
1157 ignored.</p><p>If·the·same·key·appears·in·<code·class="inline">List</code>·multiple·times,·the·value·of·the·one·appearing1157 ignored.</p><p>If·the·same·key·appears·in·<code·class="inline">List</code>·multiple·times,·the·value·of·the·one·appearing
1158 nearest·to·the·head·of·<code·class="inline">List</code>·will·be·in·the·result·map,·that·is·the·value·that1158 nearest·to·the·head·of·<code·class="inline">List</code>·will·be·in·the·result·map,·that·is·the·value·that
1159 would·be·returned·by·a·call·to·<a·href="#get_value/2"><code·class="inline">get_value(Key,·List)</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">to_map</span><span·class="p"·data-group-id="3572211794-1">(</span><span·class="p"·data-group-id="3572211794-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3572211794-3">{</span><span·class="ss">b</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·1354,·SHA:·bd3298fb1776786d1854ea995f13e519846352c4ff8c34738483edd402ef534a·...·]-1">}</span></code></pre>1159 would·be·returned·by·a·call·to·<a·href="#get_value/2"><code·class="inline">get_value(Key,·List)</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">to_map</span><span·class="p"·data-group-id="8286766801-1">(</span><span·class="p"·data-group-id="8286766801-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8286766801-3">{</span><span·class="ss">b</span><span·class="p">,</span><span·[·...·truncated·by·diffoscope;·len:·1354,·SHA:·d9f732697b9cf40bbd7f7d43e96e0e2af41034b3debcce6eb862554d27ab6382·...·]-1">}</span></code></pre>
1160 ··</section>1160 ··</section>
1161 </section>1161 </section>
1162 <section·class="detail"·id="to_map/2">1162 <section·class="detail"·id="to_map/2">
  
1163 ··<div·class="detail-header">1163 ··<div·class="detail-header">
1164 ····<a·href="#to_map/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1164 ····<a·href="#to_map/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1165 ······<i·class="ri-link-m"·aria-hidden="true"></i>1165 ······<i·class="ri-link-m"·aria-hidden="true"></i>
216 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/qlc.html
    
Offset 281, 58 lines modifiedOffset 281, 58 lines modified
281 traverses·objects·from·many·tables·or·lists·after·each·other.·If,·for·example,281 traverses·objects·from·many·tables·or·lists·after·each·other.·If,·for·example,
282 you·want·to·traverse·all·answers·to·a·query·<code·class="inline">QH</code>·and·then·finish·off·by·a·term282 you·want·to·traverse·all·answers·to·a·query·<code·class="inline">QH</code>·and·then·finish·off·by·a·term
283 <code·class="inline">{finished}</code>,·you·can·do·that·by·calling·<code·class="inline">qlc:append(QH,·[{finished}])</code>.283 <code·class="inline">{finished}</code>,·you·can·do·that·by·calling·<code·class="inline">qlc:append(QH,·[{finished}])</code>.
284 <a·href="#append/2"><code·class="inline">append/2</code></a>·first·returns·all·objects·of·<code·class="inline">QH</code>,·then·<code·class="inline">{finished}</code>.284 <a·href="#append/2"><code·class="inline">append/2</code></a>·first·returns·all·objects·of·<code·class="inline">QH</code>,·then·<code·class="inline">{finished}</code>.
285 If·a·tuple·<code·class="inline">{finished}</code>·exists·among·the·answers·to·<code·class="inline">QH</code>,·it·is·returned·twice285 If·a·tuple·<code·class="inline">{finished}</code>·exists·among·the·answers·to·<code·class="inline">QH</code>,·it·is·returned·twice
286 from·<a·href="#append/2"><code·class="inline">append/2</code></a>.</p><p>As·another·example,·consider·concatenating·the·answers·to·two·queries·<code·class="inline">QH1</code>·and286 from·<a·href="#append/2"><code·class="inline">append/2</code></a>.</p><p>As·another·example,·consider·concatenating·the·answers·to·two·queries·<code·class="inline">QH1</code>·and
287 <code·class="inline">QH2</code>·while·removing·all·duplicates.·This·is·accomplished·by·using·option287 <code·class="inline">QH2</code>·while·removing·all·duplicates.·This·is·accomplished·by·using·option
288 <code·class="inline">unique</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="4375233227-1">(</span><span·class="p"·data-group-id="4375233227-2">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·cl[·...·truncated·by·diffoscope;·len:·657,·SHA:·2a5002dcc3345d2737f943f5e71e91bfe0a7d74ea0324c4bc8d618ca48124167·...·]-1">)</span></code></pre><p>The·cost·is·substantial:·every·returned·answer·is·stored·in·an·ETS·table.·Before288 <code·class="inline">unique</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="5716145500-1">(</span><span·class="p"·data-group-id="5716145500-2">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·cl[·...·truncated·by·diffoscope;·len:·657,·SHA:·caefd3d95d64fd6ed5eab66d650235098c54c92e0892dd9a38bc9a6291a6ea16·...·]-1">)</span></code></pre><p>The·cost·is·substantial:·every·returned·answer·is·stored·in·an·ETS·table.·Before
289 returning·an·answer,·it·is·looked·up·in·the·ETS·table·to·check·if·it·has·already289 returning·an·answer,·it·is·looked·up·in·the·ETS·table·to·check·if·it·has·already
290 been·returned.·Without·the·<code·class="inline">unique</code>·option,·all·answers·to·<code·class="inline">QH1</code>·would·be290 been·returned.·Without·the·<code·class="inline">unique</code>·option,·all·answers·to·<code·class="inline">QH1</code>·would·be
291 returned·followed·by·all·answers·to·<code·class="inline">QH2</code>.·The·<code·class="inline">unique</code>·option·keeps·the·order291 returned·followed·by·all·answers·to·<code·class="inline">QH2</code>.·The·<code·class="inline">unique</code>·option·keeps·the·order
292 between·the·remaining·answers.</p><p>If·the·order·of·the·answers·is·not·important,·there·is·an·alternative·to·the292 between·the·remaining·answers.</p><p>If·the·order·of·the·answers·is·not·important,·there·is·an·alternative·to·the
293 <code·class="inline">unique</code>·option,·namely·to·sort·the·answers·uniquely:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="3967198158-1">(</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="3967198158-2">(</span><span·class="p"·data-group-id="3967198158-3">[</span><span·class="n">X</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·839,·SHA:·6eddcd8618f4a7dbfbe7be8a4e33e19c522731261de2d553cd042e2add422890·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·query·also·removes·duplicates·but·the·answers·are·sorted.·If·there·are·many293 <code·class="inline">unique</code>·option,·namely·to·sort·the·answers·uniquely:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="0889620232-1">(</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="0889620232-2">(</span><span·class="p"·data-group-id="0889620232-3">[</span><span·class="n">X</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·839,·SHA:·0b638d4d135c428985052c390861d153502eac878f48a152f8274ee88c7d019d·...·]-1">)</span><span·class="p">.</span></code></pre><p>This·query·also·removes·duplicates·but·the·answers·are·sorted.·If·there·are·many
294 answers,·temporary·files·are·used.·Notice·that·to·get·the·first·unique·answer,294 answers,·temporary·files·are·used.·Notice·that·to·get·the·first·unique·answer,
295 all·answers·must·be·found·and·sorted.·Both·alternatives·find·duplicates·by295 all·answers·must·be·found·and·sorted.·Both·alternatives·find·duplicates·by
296 comparing·answers,·that·is,·if·<code·class="inline">A1</code>·and·<code·class="inline">A2</code>·are·answers·found·in·that·order,296 comparing·answers,·that·is,·if·<code·class="inline">A1</code>·and·<code·class="inline">A2</code>·are·answers·found·in·that·order,
297 then·<code·class="inline">A2</code>·is·a·removed·if·<code·class="inline">A1·==·A2</code>.</p><p>To·return·only·a·few·answers,·cursors·can·be·used.·The·following·code·returns·no297 then·<code·class="inline">A2</code>·is·a·removed·if·<code·class="inline">A1·==·A2</code>.</p><p>To·return·only·a·few·answers,·cursors·can·be·used.·The·following·code·returns·no
298 more·than·five·answers·using·an·ETS·table·for·storing·the·unique·answers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">cursor</span><span·class="p"·data-group-id="9969753058-1">(</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="9969753058-2">(</span><span·class="p"·data-group-id="9969753058-3">[</span><span·class="n">X</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·791,·SHA:·e5759d8989e455159b3737a310fb5be12f3c0c7da0b2c4c3bc9454b16f885671·...·]-1">)</span><span·class="p">,</span><span·class="w">298 more·than·five·answers·using·an·ETS·table·for·storing·the·unique·answers:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">C</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">cursor</span><span·class="p"·data-group-id="1960855683-1">(</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="1960855683-2">(</span><span·class="p"·data-group-id="1960855683-3">[</span><span·class="n">X</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·791,·SHA:·580b442ee1647578459cdff5ce94c385143b86e67cd099f411a385480f5cefc2·...·]-1">)</span><span·class="p">,</span><span·class="w">
299 </span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">next_answers</span><span·class="p"·data-group-id="9969753058-6">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="9969753058-6">)</span><span·class="p">,</span><span·class="w">299 </span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">next_answers</span><span·class="p"·data-group-id="1960855683-6">(</span><span·class="n">C</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">5</span><span·class="p"·data-group-id="1960855683-6">)</span><span·class="p">,</span><span·class="w">
300 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">delete_cursor</span><span·class="p"·data-group-id="9969753058-7">(</span><span·class="n">C</span><span·class="p"·data-group-id="9969753058-7">)</span><span·class="p">,</span><span·class="w">300 </span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">delete_cursor</span><span·class="p"·data-group-id="1960855683-7">(</span><span·class="n">C</span><span·class="p"·data-group-id="1960855683-7">)</span><span·class="p">,</span><span·class="w">
301 </span><span·class="n">R</span><span·class="p">.</span></code></pre><p>QLCs·are·convenient·for·stating·constraints·on·data·from·two·or·more·tables.·The301 </span><span·class="n">R</span><span·class="p">.</span></code></pre><p>QLCs·are·convenient·for·stating·constraints·on·data·from·two·or·more·tables.·The
302 following·example·does·a·natural·join·on·two·query·handles·on·position·2:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="3951369760-1">(</span><span·class="p"·data-group-id="3951369760-2">[</span><span·class="p"·data-group-id="3951369760-3">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span[·...·truncated·by·diffoscope;·len:·85,·SHA:·ea9db478e863964fc3361b760df6b5bb0404a665e2b2c2282ed7d42dcfc90f27·...·]-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">302 following·example·does·a·natural·join·on·two·query·handles·on·position·2:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="2601474206-1">(</span><span·class="p"·data-group-id="2601474206-2">[</span><span·class="p"·data-group-id="2601474206-3">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span[·...·truncated·by·diffoscope;·len:·85,·SHA:·17d613c34370b12c39de0cbf58749522829f5cf5c6bc3c33d9d973423010fd8c·...·]-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">
303 ··········</span><span·class="p"·data-group-id="3951369760-4">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span·class="p"·data-group-id="3951369760-4">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH1</span><span·class="p">,</span><span·class="w">303 ··········</span><span·class="p"·data-group-id="2601474206-4">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span·class="p"·data-group-id="2601474206-4">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH1</span><span·class="p">,</span><span·class="w">
304 ··········</span><span·class="p"·data-group-id="3951369760-5">{</span><span·class="n">Y1</span><span·class="p">,</span><span·class="n">Y2</span><span·class="p"·data-group-id="3951369760-5">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH2</span><span·class="p">,</span><span·class="w">304 ··········</span><span·class="p"·data-group-id="2601474206-5">{</span><span·class="n">Y1</span><span·class="p">,</span><span·class="n">Y2</span><span·class="p"·data-group-id="2601474206-5">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH2</span><span·class="p">,</span><span·class="w">
305 ··········</span><span·class="n">X2</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Y2</span><span·class="p"·data-group-id="3951369760-2">]</span><span·class="p"·data-group-id="3951369760-1">)</span></code></pre><p>The·<code·class="inline">qlc</code>·module·evaluates·this·differently·depending·on·the·query·handles·<code·class="inline">QH1</code>305 ··········</span><span·class="n">X2</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Y2</span><span·class="p"·data-group-id="2601474206-2">]</span><span·class="p"·data-group-id="2601474206-1">)</span></code></pre><p>The·<code·class="inline">qlc</code>·module·evaluates·this·differently·depending·on·the·query·handles·<code·class="inline">QH1</code>
306 and·<code·class="inline">QH2</code>.·If,·for·example,·<code·class="inline">X2</code>·is·matched·against·the·key·of·a·QLC·table,·the306 and·<code·class="inline">QH2</code>.·If,·for·example,·<code·class="inline">X2</code>·is·matched·against·the·key·of·a·QLC·table,·the
307 lookup·join·method·traverses·the·objects·of·<code·class="inline">QH2</code>·while·looking·up·key·values·in307 lookup·join·method·traverses·the·objects·of·<code·class="inline">QH2</code>·while·looking·up·key·values·in
308 the·table.·However,·if·not·<code·class="inline">X2</code>·or·<code·class="inline">Y2</code>·is·matched·against·the·key·or·an·indexed308 the·table.·However,·if·not·<code·class="inline">X2</code>·or·<code·class="inline">Y2</code>·is·matched·against·the·key·or·an·indexed
309 position·of·a·QLC·table,·the·merge·join·method·ensures·that·<code·class="inline">QH1</code>·and·<code·class="inline">QH2</code>·are309 position·of·a·QLC·table,·the·merge·join·method·ensures·that·<code·class="inline">QH1</code>·and·<code·class="inline">QH2</code>·are
310 both·sorted·on·position·2·and·next·do·the·join·by·traversing·the·objects·one·by310 both·sorted·on·position·2·and·next·do·the·join·by·traversing·the·objects·one·by
311 one.</p><p>Option·<code·class="inline">join</code>·can·be·used·to·force·the·<code·class="inline">qlc</code>·module·to·use·a·certain·join311 one.</p><p>Option·<code·class="inline">join</code>·can·be·used·to·force·the·<code·class="inline">qlc</code>·module·to·use·a·certain·join
312 method.·For·the·rest·of·this·section·it·is·assumed·that·the·excessively·slow312 method.·For·the·rest·of·this·section·it·is·assumed·that·the·excessively·slow
313 join·method·called·&quot;nested·loop&quot;·has·been·chosen:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="5340460167-1">(</span><span·class="p"·data-group-id="5340460167-2">[</span><span·class="p"·data-group-id="5340460167-3">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span[·...·truncated·by·diffoscope;·len:·84,·SHA:·855bb2569d7d10592af7d8491c7fd32f68d794db8261c5389c23db97c3a40a12·...·]7-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">313 join·method·called·&quot;nested·loop&quot;·has·been·chosen:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="6304170607-1">(</span><span·class="p"·data-group-id="6304170607-2">[</span><span·class="p"·data-group-id="6304170607-3">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span[·...·truncated·by·diffoscope;·len:·84,·SHA:·7fb12fb4e7a614757eaf79f2bc1aa339f182f227f6d33b6664114c6e762f11d9·...·]7-3">}</span><span·class="w">·</span><span·class="p">||</span><span·class="w">
314 ··········</span><span·class="p"·data-group-id="5340460167-4">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span·class="p"·data-group-id="5340460167-4">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH1</span><span·class="p">,</span><span·class="w">314 ··········</span><span·class="p"·data-group-id="6304170607-4">{</span><span·class="n">X1</span><span·class="p">,</span><span·class="n">X2</span><span·class="p">,</span><span·class="n">X3</span><span·class="p"·data-group-id="6304170607-4">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH1</span><span·class="p">,</span><span·class="w">
315 ··········</span><span·class="p"·data-group-id="5340460167-5">{</span><span·class="n">Y1</span><span·class="p">,</span><span·class="n">Y2</span><span·class="p"·data-group-id="5340460167-5">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH2</span><span·class="p">,</span><span·class="w">315 ··········</span><span·class="p"·data-group-id="6304170607-5">{</span><span·class="n">Y1</span><span·class="p">,</span><span·class="n">Y2</span><span·class="p"·data-group-id="6304170607-5">}</span><span·class="w">·</span><span·class="o">&lt;-</span><span·class="w">·</span><span·class="n">QH2</span><span·class="p">,</span><span·class="w">
316 ··········</span><span·class="n">X2</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Y2</span><span·class="p"·data-group-id="5340460167-2">]</span><span·class="p">,</span><span·class="w">316 ··········</span><span·class="n">X2</span><span·class="w">·</span><span·class="o">=:=</span><span·class="w">·</span><span·class="n">Y2</span><span·class="p"·data-group-id="6304170607-2">]</span><span·class="p">,</span><span·class="w">
317 ······</span><span·class="p"·data-group-id="5340460167-6">{</span><span·class="ss">join</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">nested_loop</span><span·class="p"·data-group-id="5340460167-6">}</span><span·class="p"·data-group-id="5340460167-1">)</span></code></pre><p>In·this·case·the·filter·is·applied·to·every·possible·pair·of·answers·to·<code·class="inline">QH1</code>317 ······</span><span·class="p"·data-group-id="6304170607-6">{</span><span·class="ss">join</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">nested_loop</span><span·class="p"·data-group-id="6304170607-6">}</span><span·class="p"·data-group-id="6304170607-1">)</span></code></pre><p>In·this·case·the·filter·is·applied·to·every·possible·pair·of·answers·to·<code·class="inline">QH1</code>
318 and·<code·class="inline">QH2</code>,·one·at·a·time.·If·there·are·M·answers·to·<code·class="inline">QH1</code>·and·N·answers·to318 and·<code·class="inline">QH2</code>,·one·at·a·time.·If·there·are·M·answers·to·<code·class="inline">QH1</code>·and·N·answers·to
319 <code·class="inline">QH2</code>,·the·filter·is·run·M*N·times.</p><p>If·<code·class="inline">QH2</code>·is·a·call·to·the·function·for·<a·href="gb_trees.html"><code·class="inline">gb_trees</code></a>,·as·defined·in·section319 <code·class="inline">QH2</code>,·the·filter·is·run·M*N·times.</p><p>If·<code·class="inline">QH2</code>·is·a·call·to·the·function·for·<a·href="gb_trees.html"><code·class="inline">gb_trees</code></a>,·as·defined·in·section
320 <a·href="qlc.html#implementing_a_qlc_table">Implementing·a·QLC·Table</a>,·then320 <a·href="qlc.html#implementing_a_qlc_table">Implementing·a·QLC·Table</a>,·then
321 <a·href="qlc.html#gb_table"><code·class="inline">gb_table:table/1</code>·</a>,·the·iterator·for·the·gb-tree·is321 <a·href="qlc.html#gb_table"><code·class="inline">gb_table:table/1</code>·</a>,·the·iterator·for·the·gb-tree·is
322 initiated·for·each·answer·to·<code·class="inline">QH1</code>.·The·objects·of·the·gb-tree·are·then·returned322 initiated·for·each·answer·to·<code·class="inline">QH1</code>.·The·objects·of·the·gb-tree·are·then·returned
323 one·by·one.·This·is·probably·the·most·efficient·way·of·traversing·the·table·in323 one·by·one.·This·is·probably·the·most·efficient·way·of·traversing·the·table·in
324 that·case,·as·it·takes·minimal·computational·power·to·get·the·following·object.324 that·case,·as·it·takes·minimal·computational·power·to·get·the·following·object.
325 But·if·<code·class="inline">QH2</code>·is·not·a·table·but·a·more·complicated·QLC,·it·can·be·more·efficient325 But·if·<code·class="inline">QH2</code>·is·not·a·table·but·a·more·complicated·QLC,·it·can·be·more·efficient
326 to·use·some·RAM·memory·for·collecting·the·answers·in·a·cache,·particularly·if326 to·use·some·RAM·memory·for·collecting·the·answers·in·a·cache,·particularly·if
327 there·are·only·a·few·answers.·It·must·then·be·assumed·that·evaluating·<code·class="inline">QH2</code>·has327 there·are·only·a·few·answers.·It·must·then·be·assumed·that·evaluating·<code·class="inline">QH2</code>·has
328 no·side·effects·so·that·the·meaning·of·the·query·does·not·change·if·<code·class="inline">QH2</code>·is328 no·side·effects·so·that·the·meaning·of·the·query·does·not·change·if·<code·class="inline">QH2</code>·is
329 evaluated·only·once.·One·way·of·caching·the·answers·is·to·evaluate·<code·class="inline">QH2</code>·first329 evaluated·only·once.·One·way·of·caching·the·answers·is·to·evaluate·<code·class="inline">QH2</code>·first
330 of·all·and·substitute·the·list·of·answers·for·<code·class="inline">QH2</code>·in·the·query.·Another·way·is330 of·all·and·substitute·the·list·of·answers·for·<code·class="inline">QH2</code>·in·the·query.·Another·way·is
331 to·use·option·<code·class="inline">cache</code>.·It·is·expressed·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">QH2</span><span·class="err">&#39;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="5153321216-1">(</span><span·class="p"·data-group-id="5153321216-2">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·cl[·...·truncated·by·diffoscope;·len:·394,·SHA:·747f0c5356a9b001e7977f19bdac9b68c32c6c72632581ed14f5a92009fd45e4·...·]-1">)</span></code></pre><p>or·only</p><pre><code·class="text">QH2'·=·qlc:q([X·||·X·&lt;-·QH2],·cache)</code></pre><p>The·effect·of·option·<code·class="inline">cache</code>·is·that·when·generator·<code·class="inline">QH2'</code>·is·run·the·first331 to·use·option·<code·class="inline">cache</code>.·It·is·expressed·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">QH2</span><span·class="err">&#39;</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="7425472197-1">(</span><span·class="p"·data-group-id="7425472197-2">[</span><span·class="n">X</span><span·class="w">·</span><span·class="p">||</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="o">&lt;-</span><span·cl[·...·truncated·by·diffoscope;·len:·394,·SHA:·89ebf9d41b2bf3c5f1e5439413c517cb23d71cd21bcb868d1f2b1f9fca2e225d·...·]-1">)</span></code></pre><p>or·only</p><pre><code·class="text">QH2'·=·qlc:q([X·||·X·&lt;-·QH2],·cache)</code></pre><p>The·effect·of·option·<code·class="inline">cache</code>·is·that·when·generator·<code·class="inline">QH2'</code>·is·run·the·first
332 time,·every·answer·is·stored·in·an·ETS·table.·When·the·next·answer·of·<code·class="inline">QH1</code>·is332 time,·every·answer·is·stored·in·an·ETS·table.·When·the·next·answer·of·<code·class="inline">QH1</code>·is
333 tried,·answers·to·<code·class="inline">QH2'</code>·are·copied·from·the·ETS·table,·which·is·very·fast.·As333 tried,·answers·to·<code·class="inline">QH2'</code>·are·copied·from·the·ETS·table,·which·is·very·fast.·As
334 for·option·<code·class="inline">unique</code>·the·cost·is·a·possibly·substantial·amount·of·RAM·memory.</p><p>Option·<code·class="inline">{cache, list}</code>·offers·the·possibility·to·store·the·answers·in·a·list·on334 for·option·<code·class="inline">unique</code>·the·cost·is·a·possibly·substantial·amount·of·RAM·memory.</p><p>Option·<code·class="inline">{cache, list}</code>·offers·the·possibility·to·store·the·answers·in·a·list·on
335 the·process·heap.·This·has·the·potential·of·being·faster·than·ETS·tables,·as335 the·process·heap.·This·has·the·potential·of·being·faster·than·ETS·tables,·as
336 there·is·no·need·to·copy·answers·from·the·table.·However,·it·can·often·result·in336 there·is·no·need·to·copy·answers·from·the·table.·However,·it·can·often·result·in
337 slower·evaluation·because·of·more·garbage·collections·of·the·process·heap·and337 slower·evaluation·because·of·more·garbage·collections·of·the·process·heap·and
338 increased·RAM·memory·consumption·because·of·larger·heaps.·Another·drawback·with338 increased·RAM·memory·consumption·because·of·larger·heaps.·Another·drawback·with
Offset 346, 70 lines modifiedOffset 346, 70 lines modified
346 is·needed·to·pinpoint·the·generators·that·are·to·be·cached.</p><p><a·href=""·id="implementing_a_qlc_table"></a></p><h2·id="module-implementing-a-qlc-table"·class="section-heading">346 is·needed·to·pinpoint·the·generators·that·are·to·be·cached.</p><p><a·href=""·id="implementing_a_qlc_table"></a></p><h2·id="module-implementing-a-qlc-table"·class="section-heading">
347 ··<a·href="#module-implementing-a-qlc-table"·class="hover-link">347 ··<a·href="#module-implementing-a-qlc-table"·class="hover-link">
348 ····<i·class="ri-link-m"·aria-hidden="true"></i>348 ····<i·class="ri-link-m"·aria-hidden="true"></i>
349 ··</a>349 ··</a>
350 ··<span·class="text">Implementing·a·QLC·Table</span>350 ··<span·class="text">Implementing·a·QLC·Table</span>
351 </h2>351 </h2>
352 <p>As·an·example·of·how·to·use·function·<a·href="#table/2"><code·class="inline">table/2</code></a>,·the·implementation·of·a·QLC352 <p>As·an·example·of·how·to·use·function·<a·href="#table/2"><code·class="inline">table/2</code></a>,·the·implementation·of·a·QLC
353 table·for·the·<a·href="gb_trees.html"><code·class="inline">gb_trees</code></a>·module·is·given:</p><p><a·href=""·id="gb_table"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3903408194-1">(</span><span·class="ss">gb_table</span><span·class="p"·data-group-id="3903408194-1">)</span><span·class="p">.</span><span·class="w">353 table·for·the·<a·href="gb_trees.html"><code·class="inline">gb_trees</code></a>·module·is·given:</p><p><a·href=""·id="gb_table"></a></p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8598428200-1">(</span><span·class="ss">gb_table</span><span·class="p"·data-group-id="8598428200-1">)</span><span·class="p">.</span><span·class="w">
354 </span><span·class="w">354 </span><span·class="w">
355 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3903408194-2">(</span><span·class="p"·data-group-id="3903408194-3">[</span><span·class="ss">table</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="3903408194-3">]</span><span·class="p"·data-group-id="3903408194-2">)</span><span·class="p">.</span><span·class="w">355 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8598428200-2">(</span><span·class="p"·data-group-id="8598428200-3">[</span><span·class="ss">table</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="8598428200-3">]</span><span·class="p"·data-group-id="8598428200-2">)</span><span·class="p">.</span><span·class="w">
  
356 </span><span·class="nf">table</span><span·class="p"·data-group-id="3903408194-4">(</span><span·class="n">T</span><span·class="p"·data-group-id="3903408194-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">356 </span><span·class="nf">table</span><span·class="p"·data-group-id="8598428200-4">(</span><span·class="n">T</span><span·class="p"·data-group-id="8598428200-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
357 ····</span><span·class="n">TF</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3903408194-5">(</span><span·class="p"·data-group-id="3903408194-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">qlc_next</span><span·class="p"·data-group-id="3903408194-6">(</span><span·class="nc">gb_[·...·truncated·by·diffoscope;·len:·429,·SHA:·823c1431fe517dbb50f14ef5a6b126a088982624dafd9fd406cff7350c125d3c·...·]-6">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">357 ····</span><span·class="n">TF</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8598428200-5">(</span><span·class="p"·data-group-id="8598428200-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">qlc_next</span><span·class="p"·data-group-id="8598428200-6">(</span><span·class="nc">gb_[·...·truncated·by·diffoscope;·len:·429,·SHA:·0a3d4f8e1271e8ba9cbdcc5b30ba624e507589ba8d76ec23b0c1b783e670424b·...·]-6">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
358 ····</span><span·class="n">InfoFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3903408194-9">(</span><span·class="ss">num_of_objects</span><span·class="p"·data-group-id="3903408194-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class[·...·truncated·by·diffoscope;·len:·136,·SHA:·3469044a412ad944513ba8a696783311666c1b492336f77807f68d19ce67a6f2·...·]-10">)</span><span·class="p">;</span><span·class="w">358 ····</span><span·class="n">InfoFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8598428200-9">(</span><span·class="ss">num_of_objects</span><span·class="p"·data-group-id="8598428200-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class[·...·truncated·by·diffoscope;·len:·136,·SHA:·6942c8aa85f8276cf74f489dc207f68f85c6282ff73470b2f239deef1acf17bc·...·]-10">)</span><span·class="p">;</span><span·class="w">
359 ·················</span><span·class="p"·data-group-id="3903408194-11">(</span><span·class="ss">keypos</span><span·class="p"·data-group-id="3903408194-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">359 ·················</span><span·class="p"·data-group-id="8598428200-11">(</span><span·class="ss">keypos</span><span·class="p"·data-group-id="8598428200-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">;</span><span·class="w">
360 ·················</span><span·class="p"·data-group-id="3903408194-12">(</span><span·class="ss">is_sorted_key</span><span·class="p"·data-group-id="3903408194-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">360 ·················</span><span·class="p"·data-group-id="8598428200-12">(</span><span·class="ss">is_sorted_key</span><span·class="p"·data-group-id="8598428200-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
361 ·················</span><span·class="p"·data-group-id="3903408194-13">(</span><span·class="ss">is_unique_objects</span><span·class="p"·data-group-id="3903408194-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">361 ·················</span><span·class="p"·data-group-id="8598428200-13">(</span><span·class="ss">is_unique_objects</span><span·class="p"·data-group-id="8598428200-13">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">true</span><span·class="p">;</span><span·class="w">
362 ·················</span><span·class="p"·data-group-id="3903408194-14">(</span><span·class="p">_</span><span·class="p"·data-group-id="3903408194-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="w">362 ·················</span><span·class="p"·data-group-id="8598428200-14">(</span><span·class="p">_</span><span·class="p"·data-group-id="8598428200-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="w">
363 ··············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">363 ··············</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
364 ····</span><span·class="n">LookupFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">364 ····</span><span·class="n">LookupFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
365 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="3903408194-15">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ks</span><span·class="p"·data-group-id="3903408194-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">365 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="8598428200-15">(</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ks</span><span·class="p"·data-group-id="8598428200-15">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
366 ················</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatmap</span><span·class="p"·data-group-id="3903408194-16">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="3903408194-17">(</span><span·class="n">K</span><span·class="p"·data-group-id="3903408194-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">366 ················</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatmap</span><span·class="p"·data-group-id="8598428200-16">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8598428200-17">(</span><span·class="n">K</span><span·class="p"·data-group-id="8598428200-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
367 ······································</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="3903408194-18">(</span><span·class="n">K</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="3903408194-18">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">367 ······································</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class="nf">lookup</span><span·class="p"·data-group-id="8598428200-18">(</span><span·class="n">K</span><span·class="p">,</span><span·class="w">·</span><span·class="n">T</span><span·class="p"·data-group-id="8598428200-18">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
368 ··········································</span><span·class="p"·data-group-id="3903408194-19">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p"·data-group-id="3903408194-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·273,·SHA:·19f5cae8011eacf4dccca8dfb47077c06dbf75ad943549c65a977448572dbe68·...·]-20">]</span><span·class="p">;</span><span·class="w">368 ··········································</span><span·class="p"·data-group-id="8598428200-19">{</span><span·class="ss">value</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p"·data-group-id="8598428200-19">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·273,·SHA:·d72fad7ccdf24420f87eb945dae97d7d92d070f365a825e5216ac468556a7d86·...·]-20">]</span><span·class="p">;</span><span·class="w">
369 ··········································</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="3903408194-22">[</span><span·class="p"·data-group-id="3903408194-22">]</span><span·class="w">369 ··········································</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="8598428200-22">[</span><span·class="p"·data-group-id="8598428200-22">]</span><span·class="w">
370 ······································</span><span·class="k">end</span><span·class="w">370 ······································</span><span·class="k">end</span><span·class="w">
371 ······························</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ks</span><span·class="p"·data-group-id="3903408194-16">)</span><span·class="w">371 ······························</span><span·class="k">end</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ks</span><span·class="p"·data-group-id="8598428200-16">)</span><span·class="w">
372 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">372 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
373 ····</span><span·class="n">FormatFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">373 ····</span><span·class="n">FormatFun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
374 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="3903408194-23">(</span><span·class="p"·data-group-id="3903408194-24">{</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NElements</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementF[·...·truncated·by·diffoscope;·len:·104,·SHA:·ae5bab03655fbf4708db3370b8775316bebe2ce198c0e659e274558ef88c5154·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">374 ········</span><span·class="nf">fun</span><span·class="p"·data-group-id="8598428200-23">(</span><span·class="p"·data-group-id="8598428200-24">{</span><span·class="ss">all</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NElements</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementF[·...·truncated·by·diffoscope;·len:·104,·SHA:·94f133e3e42f6fbd8aa5e0ab385316279a4c58779311c97add83ce73964e1d69·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
375 ················</span><span·class="n">ValsS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3903408194-25">(</span><span·class="s">&quot;gb_trees:from_orddict(</span><span·class="si">~w</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">375 ················</span><span·class="n">ValsS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8598428200-25">(</span><span·class="s">&quot;gb_trees:from_orddict(</span><span·class="si">~w</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">
376 ······································</span><span·class="p"·data-group-id="3903408194-26">[</span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="3903408194-27">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NElements</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·187,·SHA:·7cf28093422b7c90e1de3387ffce758d8a71f7343da7229d7fd39e49997c1fd0·...·]-25">)</span><span·class="p">,</span><span·class="w">376 ······································</span><span·class="p"·data-group-id="8598428200-26">[</span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="8598428200-27">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NElements</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·187,·SHA:·41a68fb48d94094e0bb23b0c6f51622bba2b634ade8cad0c29dc17c3744ac44c·...·]-25">)</span><span·class="p">,</span><span·class="w">
377 ················</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3903408194-28">(</span><span·class="s">&quot;gb_table:table(</span><span·class="si">~s</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3903408194-29">[</span><span·class="n">ValsS</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·51654559b73eab0ce23a047d64b53dd5cdeec09a1f7f7626c0f592f37183baf7·...·]-28">)</span><span·class="p">;</span><span·class="w">377 ················</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8598428200-28">(</span><span·class="s">&quot;gb_table:table(</span><span·class="si">~s</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8598428200-29">[</span><span·class="n">ValsS</span><sp[·...·truncated·by·diffoscope;·len:·92,·SHA:·72401bdff06ebd3e5fc1603d12a88085432de1d6920b296032987a44535bbfe3·...·]-28">)</span><span·class="p">;</span><span·class="w">
378 ···········</span><span·class="p"·data-group-id="3903408194-30">(</span><span·class="p"·data-group-id="3903408194-31">{</span><span·class="ss">lookup</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">KeyValues</s[·...·truncated·by·diffoscope;·len:·284,·SHA:·9c31457e5cd458f3933bb78bdc58b7aba87481b77cabcafdbbcf2bdddcce25e3·...·]-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">378 ···········</span><span·class="p"·data-group-id="8598428200-30">(</span><span·class="p"·data-group-id="8598428200-31">{</span><span·class="ss">lookup</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">KeyValues</s[·...·truncated·by·diffoscope;·len:·284,·SHA:·f2fd92b9d10daf724fb2dd82855344d8801f7e46c350435b6f183dfcad558312·...·]-30">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
379 ················</span><span·class="n">ValsS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3903408194-32">(</span><span·class="s">&quot;gb_trees:from_orddict(</span><span·class="si">~w</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">379 ················</span><span·class="n">ValsS</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8598428200-32">(</span><span·class="s">&quot;gb_trees:from_orddict(</span><span·class="si">~w</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">
380 ······································</span><span·class="p"·data-group-id="3903408194-33">[</span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="3903408194-34">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·187,·SHA:·49f95c4b4ea2bae98a14ae6e57d0726c328a2dd7af511bb0a0849f2421da7e21·...·]-32">)</span><span·class="p">,</span><span·class="w">380 ······································</span><span·class="p"·data-group-id="8598428200-33">[</span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="8598428200-34">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·187,·SHA:·04a0f4f65151ea25c733189d69b98259ce73c6b03622eddf21f84dea88a82e23·...·]-32">)</span><span·class="p">,</span><span·class="w">
381 ················</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="3903408194-35">(</span><span·class="s">&quot;lists:flatmap(fun(K)·-&gt;·&quot;</span><span·class="w">381 ················</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8598428200-35">(</span><span·class="s">&quot;lists:flatmap(fun(K)·-&gt;·&quot;</span><span·class="w">
382 ······························</span><span·class="s">&quot;case·gb_trees:lookup(K,·</span><span·class="si">~s</span><span·class="s">)·of·&quot;</span><span·class="w">382 ······························</span><span·class="s">&quot;case·gb_trees:lookup(K,·</span><span·class="si">~s</span><span·class="s">)·of·&quot;</span><span·class="w">
383 ······························</span><span·class="s">&quot;{value,·V}·-&gt;·[{K,V}];none·-&gt;·[]·end·&quot;</span><span·class="w">383 ······························</span><span·class="s">&quot;{value,·V}·-&gt;·[{K,V}];none·-&gt;·[]·end·&quot;</span><span·class="w">
384 ······························</span><span·class="s">&quot;end,·</span><span·class="si">~w</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">384 ······························</span><span·class="s">&quot;end,·</span><span·class="si">~w</span><span·class="s">)&quot;</span><span·class="p">,</span><span·class="w">
385 ······························</span><span·class="p"·data-group-id="3903408194-36">[</span><span·class="n">ValsS</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3903408194-37">[</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="3903408194-38">(</span><span·class="n">[·...·truncated·by·diffoscope;·len:·418,·SHA:·7f0242816852fc5241d902c716d7e1a5615d8b555629f2836ca1f07ed02b4a7f·...·]-35">)</span><span·class="w">385 ······························</span><span·class="p"·data-group-id="8598428200-36">[</span><span·class="n">ValsS</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8598428200-37">[</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="8598428200-38">(</span><span·class="n">[·...·truncated·by·diffoscope;·len:·418,·SHA:·0d491e521f6370a0a69d54546153e26dc0631b9df6ab4079f7f85243ad74a7aa·...·]-35">)</span><span·class="w">
386 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">386 ········</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
387 ····</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">table</span><span·class="p"·data-group-id="3903408194-39">(</span><span·class="n">TF</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3903408194-40">[</span><span·class="p"·data-group-id="3903408194-41">{</span><span·class="ss">info_fun</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·369,·SHA:·8675e5695465714cef49f73424241e870317c41dd3279864952a36731cc09cd9·...·]-42">}</span><span·class="p">,</span><span·class="w">387 ····</span><span·class="nc">qlc</span><span·class="p">:</span><span·class="nf">table</span><span·class="p"·data-group-id="8598428200-39">(</span><span·class="n">TF</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8598428200-40">[</span><span·class="p"·data-group-id="8598428200-41">{</span><span·class="ss">info_fun</span><span·class="p">,</s[·...·truncated·by·diffoscope;·len:·369,·SHA:·e73cd87253c6e016bd0d4ccb69a3bf9c319fe3144c4a56f9d1217da6a9fb6d86·...·]-42">}</span><span·class="p">,</span><span·class="w">
388 ···················</span><span·class="p"·data-group-id="3903408194-43">{</span><span·class="ss">lookup_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LookupFun</span><span·class="p"·data-group-id="3903408194-43">}</span><span·class="p">,</span><span·class="p"·data-group-id="3903408194[·...·truncated·by·diffoscope;·len:·258,·SHA:·cf4f30c6df1d378cd8e8118e627c6603de5dcb9de0e5b999ab7d3df6de643f9a·...·]-39">)</span><span·class="p">.</span><span·class="w">388 ···················</span><span·class="p"·data-group-id="8598428200-43">{</span><span·class="ss">lookup_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="n">LookupFun</span><span·class="p"·data-group-id="8598428200-43">}</span><span·class="p">,</span><span·class="p"·data-group-id="8598428200[·...·truncated·by·diffoscope;·len:·258,·SHA:·5780a8d91f5ca40389ba951fdbba832b0553709bb478f068d58960baa36045c5·...·]-39">)</span><span·class="p">.</span><span·class="w">
  
389 </span><span·class="nf">qlc_next</span><span·class="p"·data-group-id="3903408194-45">(</span><span·class="p"·data-group-id="3903408194-46">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class[·...·truncated·by·diffoscope;·len:·84,·SHA:·afcbb13417f0a62df9e13bba2a1c9dd4b77397228c08e462cd52022c3cbe35aa·...·]-45">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">389 </span><span·class="nf">qlc_next</span><span·class="p"·data-group-id="8598428200-45">(</span><span·class="p"·data-group-id="8598428200-46">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class[·...·truncated·by·diffoscope;·len:·84,·SHA:·9ea88b57d2ffb6034bfaeeee259e9a503e2458eca734c7a2ad18fe87d2c537fa·...·]-45">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
390 ····</span><span·class="p"·data-group-id="3903408194-47">[</span><span·class="p"·data-group-id="3903408194-48">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group-id="3903408194-48">}</span><span·class="w">·</span><span·class="p">|</span><span[·...·truncated·by·diffoscope;·len:·677,·SHA:·ca488149a14fca5abd97bbab176c3030022937e37b5aca8f6b9d7506d02a5087·...·]-47">]</span><span·class="p">;</span><span·class="w">390 ····</span><span·class="p"·data-group-id="8598428200-47">[</span><span·class="p"·data-group-id="8598428200-48">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group-id="8598428200-48">}</span><span·class="w">·</span><span·class="p">|</span><span[·...·truncated·by·diffoscope;·len:·677,·SHA:·e4de2f69b2b578222698739753c5afd68e649ddf6d771b72aa8ded174f4dc4a3·...·]-47">]</span><span·class="p">;</span><span·class="w">
391 </span><span·class="nf">qlc_next</span><span·class="p"·data-group-id="3903408194-52">(</span><span·class="ss">none</span><span·class="p"·data-group-id="3903408194-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">391 </span><span·class="nf">qlc_next</span><span·class="p"·data-group-id="8598428200-52">(</span><span·class="ss">none</span><span·class="p"·data-group-id="8598428200-52">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
392 ····</span><span·class="p"·data-group-id="3903408194-53">[</span><span·class="p"·data-group-id="3903408194-53">]</span><span·class="p">.</span><span·class="w">392 ····</span><span·class="p"·data-group-id="8598428200-53">[</span><span·class="p"·data-group-id="8598428200-53">]</span><span·class="p">.</span><span·class="w">
  
393 </span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="3903408194-54">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="3903408194-54">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">393 </span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="8598428200-54">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">infinity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="8598428200-54">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
394 ····</span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="3903408194-55">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·c53c2e5669c21eb32a01ec196cb1239e8fdfe8a6e0b1369a00373c2009b698df·...·]-55">)</span><span·class="p">;</span><span·class="w">394 ····</span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="8598428200-55">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·d3d7602d72cca16c0c6624b912b514d13dc83f78efbfedce0e3c9266b43a440e·...·]-55">)</span><span·class="p">;</span><span·class="w">
395 </span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="3903408194-56">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NElements</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="3903408194-56">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">395 </span><span·class="nf">gb_nodes</span><span·class="p"·data-group-id="8598428200-56">(</span><span·class="n">T</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NElements</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ElementFun</span><span·class="p"·data-group-id="8598428200-56">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
396 ····</span><span·class="nf">gb_iter</span><span·class="p"·data-group-id="3903408194-57">(</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class="nf">iterator</span><span·class="p"·data-group-id="3903408194-58">(</span><span·class="n">T</span><span·class="p"·data-group-id="3903408194-58">)</span><span·class="[·...·truncated·by·diffoscope;·len:·189,·SHA:·f965a33b3dffcdb55ce06f3b96f8f503911bc99b7c61de1e0277972b185b1519·...·]-57">)</span><span·class="p">.</span><span·class="w">396 ····</span><span·class="nf">gb_iter</span><span·class="p"·data-group-id="8598428200-57">(</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class="nf">iterator</span><span·class="p"·data-group-id="8598428200-58">(</span><span·class="n">T</span><span·class="p"·data-group-id="8598428200-58">)</span><span·class="[·...·truncated·by·diffoscope;·len:·189,·SHA:·4cefcb3a2b2fbbc07cc91f6cee40dd418c88e2eca5bb3a4cd25b24e01c1e8b72·...·]-57">)</span><span·class="p">.</span><span·class="w">
  
397 </span><span·class="nf">gb_iter</span><span·class="p"·data-group-id="3903408194-59">(</span><span·class="p">_</span><span·class="n">I</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">EFun</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·f555068c1b4b2f3691c00653cf4576a89aa12026dbcb9c73f45b4f03ebe6243c·...·]-59">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">397 </span><span·class="nf">gb_iter</span><span·class="p"·data-group-id="8598428200-59">(</span><span·class="p">_</span><span·class="n">I</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">EFun</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·edf508da0dbfbba26aa3ffee8cc1b286e660e53363235043bfbb5d4613420a92·...·]-59">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
398 ····</span><span·class="ss">&#39;...&#39;</span><span·class="p">;</span><span·class="w">398 ····</span><span·class="ss">&#39;...&#39;</span><span·class="p">;</span><span·class="w">
399 </span><span·class="nf">gb_iter</span><span·class="p"·data-group-id="3903408194-60">(</span><span·class="n">I0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EFun</span><span·class="p"·data-group-id="3903408194-60">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">399 </span><span·class="nf">gb_iter</span><span·class="p"·data-group-id="8598428200-60">(</span><span·class="n">I0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EFun</span><span·class="p"·data-group-id="8598428200-60">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
400 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class="nf">next</span><span·class="p"·data-group-id="3903408194-61">(</span><span·class="n">I0</span><span·class="p"·data-group-id="3903408194-61">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">400 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">gb_trees</span><span·class="p">:</span><span·class="nf">next</span><span·class="p"·data-group-id="8598428200-61">(</span><span·class="n">I0</span><span·class="p"·data-group-id="8598428200-61">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
401 ········</span><span·class="p"·data-group-id="3903408194-62">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p">,</span><span·class="w">·</span><span·class="n">I</span><span·class="p"·data-group-id="3903408194-62">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">401 ········</span><span·class="p"·data-group-id="8598428200-62">{</span><span·class="n">X</span><span·class="p">,</span><span·class="w">·</span><span·class="n">V</span><span·class="p">,</span><span·class="w">·</span><span·class="n">I</span><span·class="p"·data-group-id="8598428200-62">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
402 ············</span><span·class="p"·data-group-id="3903408194-63">[</span><span·class="n">EFun</span><span·class="p"·data-group-id="3903408194-64">(</span><span·class="p"·data-group-id="3903408194-65">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·554,·SHA:·21432d0c50d8ab588249114a074ca74abb50a031f2a932aa8225dc0421ff2bc8·...·]-63">]</span><span·class="p">;</span><span·class="w">402 ············</span><span·class="p"·data-group-id="8598428200-63">[</span><span·class="n">EFun</span><span·class="p"·data-group-id="8598428200-64">(</span><span·class="p"·data-group-id="8598428200-65">{</span><span·class="n">X</span><span·class="p">,</span><span·class="n">V</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·554,·SHA:·3774c6f82bfa035ad847bcfa5d7f691fb586b2c475b91741ea8fc1bdcf834785·...·]-63">]</span><span·class="p">;</span><span·class="w">
403 ········</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">403 ········</span><span·class="ss">none</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
404 ············</span><span·class="p"·data-group-id="3903408194-67">[</span><span·class="p"·data-group-id="3903408194-67">]</span><span·class="w">404 ············</span><span·class="p"·data-group-id="8598428200-67">[</span><span·class="p"·data-group-id="8598428200-67">]</span><span·class="w">
405 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p><code·class="inline">TF</code>·is·the·traversal·function.·The·<code·class="inline">qlc</code>·module·requires·that·there·is·a·way·of405 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p><code·class="inline">TF</code>·is·the·traversal·function.·The·<code·class="inline">qlc</code>·module·requires·that·there·is·a·way·of
406 traversing·all·objects·of·the·data·structure.·<code·class="inline">gb_trees</code>·has·an·iterator406 traversing·all·objects·of·the·data·structure.·<code·class="inline">gb_trees</code>·has·an·iterator
407 function·suitable·for·that·purpose.·Notice·that·for·each·object·returned,·a·new407 function·suitable·for·that·purpose.·Notice·that·for·each·object·returned,·a·new
408 fun·is·created.·As·long·as·the·list·is·not·terminated·by·<code·class="inline">[]</code>,·it·is·assumed408 fun·is·created.·As·long·as·the·list·is·not·terminated·by·<code·class="inline">[]</code>,·it·is·assumed
409 that·the·tail·of·the·list·is·a·nullary·function·and·that·calling·the·function409 that·the·tail·of·the·list·is·a·nullary·function·and·that·calling·the·function
Max diff block lines reached; 156860/221421 bytes (70.84%) of diff not shown.
159 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/queue.html
    
Offset 719, 18 lines modifiedOffset 719, 18 lines modified
719 ······<div·class="specs">719 ······<div·class="specs">
  
720 ··········<pre·translate="no"><span·class="attribute">-spec</span>·all(Pred,·Q·::·<a·href="#t:queue/1">queue</a>(Item))·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()·when·Pred·::·fun((Item)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()).</pre>720 ··········<pre·translate="no"><span·class="attribute">-spec</span>·all(Pred,·Q·::·<a·href="#t:queue/1">queue</a>(Item))·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()·when·Pred·::·fun((Item)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()).</pre>
  
721 ······</div>721 ······</div>
  
722 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">Pred(Item)</code>·returns·<code·class="inline">true</code>·for·all·items·<code·class="inline">Item</code>·in·<code·class="inline">Q</code>,722 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">Pred(Item)</code>·returns·<code·class="inline">true</code>·for·all·items·<code·class="inline">Item</code>·in·<code·class="inline">Q</code>,
723 otherwise·<code·class="inline">false</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="3492767456-1">(</span><span·class="p"·data-group-id="3492767456-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·134,·SHA:·0e3de16327f3ed3415c7330769032ea22c96600d4d1e8de6c60ebf8e335b2ecb·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">723 otherwise·<code·class="inline">false</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="7436917199-1">(</span><span·class="p"·data-group-id="7436917199-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·134,·SHA:·068b070740ddf75e681afdeed2fac0bf6d973465cb147483f882b5c7b2dd6756·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
724 2&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">all</span><span·class="p"·data-group-id="3492767456-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3492767456-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="3492767456-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·9c8864d1ba9ed25d65baf9d4529c6dd0cf4a95a436680c4ac8f6096ee5803845·...·]-3">)</span><span·class="p">.</span><span·class="w">724 2&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">all</span><span·class="p"·data-group-id="7436917199-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7436917199-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="7436917199-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·9dc5e1b2d210f812962138a1ee5f63b5e13b2476be3191905d6cb0b5c1dc45de·...·]-3">)</span><span·class="p">.</span><span·class="w">
725 </span><span·class="ss">false</span><span·class="gp·unselectable">725 </span><span·class="ss">false</span><span·class="gp·unselectable">
726 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">all</span><span·class="p"·data-group-id="3492767456-5">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3492767456-6">(</span><span·class="n">E</span><span·class="p"·data-group-id="3492767456-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·6d7eeca25621a8cec72e7165c6a91397aa2ac2ea517dcc23f14b7ea217d8b90f·...·]-5">)</span><span·class="p">.</span><span·class="w">726 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">all</span><span·class="p"·data-group-id="7436917199-5">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7436917199-6">(</span><span·class="n">E</span><span·class="p"·data-group-id="7436917199-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·0d7a7f69e70aecb77454e824ba63f0753bd15135c90dc2877a21b2de6de12529·...·]-5">)</span><span·class="p">.</span><span·class="w">
727 </span><span·class="ss">true</span></code></pre>727 </span><span·class="ss">true</span></code></pre>
728 ··</section>728 ··</section>
729 </section>729 </section>
730 <section·class="detail"·id="any/2">730 <section·class="detail"·id="any/2">
  
731 ··<div·class="detail-header">731 ··<div·class="detail-header">
732 ····<a·href="#any/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">732 ····<a·href="#any/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 754, 18 lines modifiedOffset 754, 18 lines modified
754 ······<div·class="specs">754 ······<div·class="specs">
  
755 ··········<pre·translate="no"><span·class="attribute">-spec</span>·any(Pred,·Q·::·<a·href="#t:queue/1">queue</a>(Item))·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()·when·Pred·::·fun((Item)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()).</pre>755 ··········<pre·translate="no"><span·class="attribute">-spec</span>·any(Pred,·Q·::·<a·href="#t:queue/1">queue</a>(Item))·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()·when·Pred·::·fun((Item)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()).</pre>
  
756 ······</div>756 ······</div>
  
757 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">Pred(Item)</code>·returns·<code·class="inline">true</code>·for·at·least·one·item·<code·class="inline">Item</code>·in757 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">Pred(Item)</code>·returns·<code·class="inline">true</code>·for·at·least·one·item·<code·class="inline">Item</code>·in
758 <code·class="inline">Q</code>,·otherwise·<code·class="inline">false</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6871648802-1">(</span><span·class="p"·data-group-id="6871648802-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·133,·SHA:·f467feff18d1088af4fc978c18c57980fd620ecbbb161607cea2822ba37d8734·...·]2-1">)</span><span·class="p">.</span><span·class="gp·unselectable">758 <code·class="inline">Q</code>,·otherwise·<code·class="inline">false</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="0190509712-1">(</span><span·class="p"·data-group-id="0190509712-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·133,·SHA:·f5cb4e45a0d911a41a74254e7c7039da0fc27af9107949b8dc01a8a99dd23b28·...·]2-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
759 2&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">any</span><span·class="p"·data-group-id="6871648802-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6871648802-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="6871648802-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·91ec5f19a548d3100b06a4c0d6c557335a9defdd4eb005595bbd004d490ad899·...·]2-3">)</span><span·class="p">.</span><span·class="w">759 2&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">any</span><span·class="p"·data-group-id="0190509712-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="0190509712-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="0190509712-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·2537f895632106e5518c57fe87bd0b1d9b7993527a18ef8a0df53d7fe880e443·...·]2-3">)</span><span·class="p">.</span><span·class="w">
760 </span><span·class="ss">false</span><span·class="gp·unselectable">760 </span><span·class="ss">false</span><span·class="gp·unselectable">
761 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">any</span><span·class="p"·data-group-id="6871648802-5">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6871648802-6">(</span><span·class="n">E</span><span·class="p"·data-group-id="6871648802-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·313,·SHA:·814ba948fa232675a5065dd07721829f8f48d41213cbf13449c12c4d39f696a6·...·]2-5">)</span><span·class="p">.</span><span·class="w">761 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">any</span><span·class="p"·data-group-id="0190509712-5">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="0190509712-6">(</span><span·class="n">E</span><span·class="p"·data-group-id="0190509712-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·313,·SHA:·3923e9b4e197775786abb672b6f827f13a627b44776ca72dcd7710c4c708d6d9·...·]2-5">)</span><span·class="p">.</span><span·class="w">
762 </span><span·class="ss">true</span></code></pre>762 </span><span·class="ss">true</span></code></pre>
763 ··</section>763 ··</section>
764 </section>764 </section>
765 <section·class="detail"·id="delete/2">765 <section·class="detail"·id="delete/2">
  
766 ··<div·class="detail-header">766 ··<div·class="detail-header">
767 ····<a·href="#delete/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">767 ····<a·href="#delete/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 789, 17 lines modifiedOffset 789, 17 lines modified
789 ······<div·class="specs">789 ······<div·class="specs">
  
790 ··········<pre·translate="no"><span·class="attribute">-spec</span>·delete(Item,·Q1)·->·Q2·when·Item·::·T,·Q1·::·<a·href="#t:queue/1">queue</a>(T),·Q2·::·<a·href="#t:queue/1">queue</a>(T),·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>790 ··········<pre·translate="no"><span·class="attribute">-spec</span>·delete(Item,·Q1)·->·Q2·when·Item·::·T,·Q1·::·<a·href="#t:queue/1">queue</a>(T),·Q2·::·<a·href="#t:queue/1">queue</a>(T),·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
791 ······</div>791 ······</div>
  
792 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·first·item·matching·<code·class="inline">Item</code>·is·deleted,·if·there792 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·first·item·matching·<code·class="inline">Item</code>·is·deleted,·if·there
793 is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="2140066121-1">(</span><span·class="p"·data-group-id="2140066121-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·134,·SHA:·9117424da23cf44ced44b210be2d354f0d4c91567f2ffe5d9f8be08e75686eef·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">793 is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="1050297530-1">(</span><span·class="p"·data-group-id="1050297530-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·134,·SHA:·5c29a2b76702453d04de34a85a5e3c36180518d620108af766ee6d168b747285·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
794 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="2140066121-3">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Queue</span><span·class="p"·data-group-id="2140066121-3">)</span><span·class="p">.</span><span·class="gp·unselectable">794 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete</span><span·class="p"·data-group-id="1050297530-3">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Queue</span><span·class="p"·data-group-id="1050297530-3">)</span><span·class="p">.</span><span·class="gp·unselectable">
795 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="2140066121-4">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Queue1</span><span·class="p"·data-group-id="2140066121-4">)</span><span·class="p">.</span><span·class="w">795 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">member</span><span·class="p"·data-group-id="1050297530-4">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Queue1</span><span·class="p"·data-group-id="1050297530-4">)</span><span·class="p">.</span><span·class="w">
796 </span><span·class="ss">false</span></code></pre>796 </span><span·class="ss">false</span></code></pre>
797 ··</section>797 ··</section>
798 </section>798 </section>
799 <section·class="detail"·id="delete_r/2">799 <section·class="detail"·id="delete_r/2">
  
800 ··<div·class="detail-header">800 ··<div·class="detail-header">
801 ····<a·href="#delete_r/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">801 ····<a·href="#delete_r/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 823, 18 lines modifiedOffset 823, 18 lines modified
823 ······<div·class="specs">823 ······<div·class="specs">
  
824 ··········<pre·translate="no"><span·class="attribute">-spec</span>·delete_r(Item,·Q1)·->·Q2·when·Item·::·T,·Q1·::·<a·href="#t:queue/1">queue</a>(T),·Q2·::·<a·href="#t:queue/1">queue</a>(T),·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>824 ··········<pre·translate="no"><span·class="attribute">-spec</span>·delete_r(Item,·Q1)·->·Q2·when·Item·::·T,·Q1·::·<a·href="#t:queue/1">queue</a>(T),·Q2·::·<a·href="#t:queue/1">queue</a>(T),·T·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
825 ······</div>825 ······</div>
  
826 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·last·item·matching·<code·class="inline">Item</code>·is·deleted,·if·there826 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·last·item·matching·<code·class="inline">Item</code>·is·deleted,·if·there
827 is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="8398538363-1">(</span><span·class="p"·data-group-id="8398538363-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·183,·SHA:·e7181ec56d10caed2ea78f4314202b56692d1124ddc112bc77277447965b244a·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">827 is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="2189890066-1">(</span><span·class="p"·data-group-id="2189890066-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·183,·SHA:·9ccdcf68ae83b23ba2b2f44e5438b6539360ac08ba89ad2dfdf9b97c38e9371a·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
828 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete_r</span><span·class="p"·data-group-id="8398538363-3">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Queue</span><span·class="p"·data-group-id="8398538363-3">)</span><span·class="p">.</span><span·class="gp·unselectable">828 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete_r</span><span·class="p"·data-group-id="2189890066-3">(</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Queue</span><span·class="p"·data-group-id="2189890066-3">)</span><span·class="p">.</span><span·class="gp·unselectable">
829 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="8398538363-4">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="8398538363-4">)</span><span·class="p">.</span><span·class="w">829 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="2189890066-4">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="2189890066-4">)</span><span·class="p">.</span><span·class="w">
830 </span><span·class="p"·data-group-id="8398538363-5">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·c9c93837bd7f893c02ec23bea70bcec55bf62af31846087b5d37a63d83decf82·...·]-5">]</span></code></pre>830 </span><span·class="p"·data-group-id="2189890066-5">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·978bfba8530960dee3a6f40470da1fa734e07261b15ba4c994634c2a85a8f3e9·...·]-5">]</span></code></pre>
831 ··</section>831 ··</section>
832 </section>832 </section>
833 <section·class="detail"·id="delete_with/2">833 <section·class="detail"·id="delete_with/2">
  
834 ··<div·class="detail-header">834 ··<div·class="detail-header">
835 ····<a·href="#delete_with/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">835 ····<a·href="#delete_with/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
836 ······<i·class="ri-link-m"·aria-hidden="true"></i>836 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 862, 18 lines modifiedOffset 862, 18 lines modified
862 ·························Q1·::·<a·href="#t:queue/1">queue</a>(Item),862 ·························Q1·::·<a·href="#t:queue/1">queue</a>(Item),
863 ·························Q2·::·<a·href="#t:queue/1">queue</a>(Item),863 ·························Q2·::·<a·href="#t:queue/1">queue</a>(Item),
864 ·························Item·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>864 ·························Item·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
865 ······</div>865 ······</div>
  
866 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·first·item·for·which·<code·class="inline">Pred</code>·returns·<code·class="inline">true</code>·is866 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·first·item·for·which·<code·class="inline">Pred</code>·returns·<code·class="inline">true</code>·is
867 deleted,·if·there·is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="7612352734-1">(</span><span·class="p"·data-group-id="7612352734-2">[</span><span·class="mi">100</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·c[·...·truncated·by·diffoscope;·len:·185,·SHA:·1cd401686b2ceb1b1cd927b029c163385257657c033d0dbaee5ebd83ca9d483e·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">867 deleted,·if·there·is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="3795916539-1">(</span><span·class="p"·data-group-id="3795916539-2">[</span><span·class="mi">100</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·c[·...·truncated·by·diffoscope;·len:·185,·SHA:·e45230289fd4e1b0374c64c53f4e8a1dacf04dcee3b384cfad6377d7708f1c9e·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
868 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete_with</span><span·class="p"·data-group-id="7612352734-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7612352734-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="7612352734-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·264,·SHA:·92a4c4acd24fe64a1312aead5e7d293bee7ea17f8f574a1445714e376a3bba76·...·]-3">)</span><span·class="p">.</span><span·class="gp·unselectable">868 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete_with</span><span·class="p"·data-group-id="3795916539-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3795916539-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="3795916539-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·264,·SHA:·8135986c3c2f1725788f51d7cb0118823fd6280694150b1dfdbafabbfe160b5d·...·]-3">)</span><span·class="p">.</span><span·class="gp·unselectable">
869 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="7612352734-5">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="7612352734-5">)</span><span·class="p">.</span><span·class="w">869 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="3795916539-5">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="3795916539-5">)</span><span·class="p">.</span><span·class="w">
870 </span><span·class="p"·data-group-id="7612352734-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·aa849a92d0cce86a4d7115b21e812c465568bb6ce00d4ef55b401cbe95152737·...·]-6">]</span></code></pre>870 </span><span·class="p"·data-group-id="3795916539-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="[·...·truncated·by·diffoscope;·len:·28,·SHA:·d4956a7e4447323b755b50606098ef9e1ea721556c00b15c5c088d47502532cd·...·]-6">]</span></code></pre>
871 ··</section>871 ··</section>
872 </section>872 </section>
873 <section·class="detail"·id="delete_with_r/2">873 <section·class="detail"·id="delete_with_r/2">
  
874 ··<div·class="detail-header">874 ··<div·class="detail-header">
875 ····<a·href="#delete_with_r/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">875 ····<a·href="#delete_with_r/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
876 ······<i·class="ri-link-m"·aria-hidden="true"></i>876 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 901, 18 lines modifiedOffset 901, 18 lines modified
901 ···························Q1·::·<a·href="#t:queue/1">queue</a>(Item),901 ···························Q1·::·<a·href="#t:queue/1">queue</a>(Item),
902 ···························Q2·::·<a·href="#t:queue/1">queue</a>(Item),902 ···························Q2·::·<a·href="#t:queue/1">queue</a>(Item),
903 ···························Item·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>903 ···························Item·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:term/0">term</a>().</pre>
  
904 ······</div>904 ······</div>
  
905 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·last·item·for·which·<code·class="inline">Pred</code>·returns·<code·class="inline">true</code>·is905 <p>Returns·a·copy·of·<code·class="inline">Q1</code>·where·the·last·item·for·which·<code·class="inline">Pred</code>·returns·<code·class="inline">true</code>·is
906 deleted,·if·there·is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6179822940-1">(</span><span·class="p"·data-group-id="6179822940-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·clas[·...·truncated·by·diffoscope;·len:·184,·SHA:·419a35835a13bae407783bbb7186db9a60753a03a2fef533e04f5da1656dbf5f·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">906 deleted,·if·there·is·such·an·item.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6765393051-1">(</span><span·class="p"·data-group-id="6765393051-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·clas[·...·truncated·by·diffoscope;·len:·184,·SHA:·a7e58c3b1f82cd58a13002215ef9430b5c69e5e755b1541e649413288350e466·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
907 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete_with</span><span·class="p"·data-group-id="6179822940-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6179822940-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="6179822940-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><s[·...·truncated·by·diffoscope;·len:·264,·SHA:·c028081aedc495fde3e0ebae63b9356776a2eadd2dd2a892af07f87ed807ee83·...·]-3">)</span><span·class="p">.</span><span·class="gp·unselectable">907 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">delete_with</span><span·class="p"·data-group-id="6765393051-3">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6765393051-4">(</span><span·class="n">E</span><span·class="p"·data-group-id="6765393051-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><s[·...·truncated·by·diffoscope;·len:·264,·SHA:·163d01df0bdd50896c25361eb348865dd3a77b575bffd71477a779add1470240·...·]-3">)</span><span·class="p">.</span><span·class="gp·unselectable">
908 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="6179822940-5">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="6179822940-5">)</span><span·class="p">.</span><span·class="w">908 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="6765393051-5">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="6765393051-5">)</span><span·class="p">.</span><span·class="w">
909 </span><span·class="p"·data-group-id="6179822940-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·6d8be1cee49cf8169c5a7406f11efffe95cd62652d360630e7259ea5ddefd0e0·...·]-6">]</span></code></pre>909 </span><span·class="p"·data-group-id="6765393051-6">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·9dc43bd5d1860536a266325b0e347f740abe02374e72041f6980065f947d36bd·...·]-6">]</span></code></pre>
910 ··</section>910 ··</section>
911 </section>911 </section>
912 <section·class="detail"·id="filter/2">912 <section·class="detail"·id="filter/2">
  
913 ··<div·class="detail-header">913 ··<div·class="detail-header">
914 ····<a·href="#filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">914 ····<a·href="#filter/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
915 ······<i·class="ri-link-m"·aria-hidden="true"></i>915 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 935, 27 lines modifiedOffset 935, 27 lines modified
935 ··········<pre·translate="no"><span·class="attribute">-spec</span>·filter(Fun,·Q1·::·<a·href="#t:queue/1">queue</a>(Item))·->·Q2·::·<a·href="#t:queue/1">queue</a>(Item)·when·Fun·::·fun((Item)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()·|·[Item]).</pre>935 ··········<pre·translate="no"><span·class="attribute">-spec</span>·filter(Fun,·Q1·::·<a·href="#t:queue/1">queue</a>(Item))·->·Q2·::·<a·href="#t:queue/1">queue</a>(Item)·when·Fun·::·fun((Item)·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>()·|·[Item]).</pre>
  
936 ······</div>936 ······</div>
  
937 <p>Returns·a·queue·<code·class="inline">Q2</code>·that·is·the·result·of·calling·<code·class="inline">Fun(Item)</code>·on·all·items·in937 <p>Returns·a·queue·<code·class="inline">Q2</code>·that·is·the·result·of·calling·<code·class="inline">Fun(Item)</code>·on·all·items·in
938 <code·class="inline">Q1</code>.</p><p>If·<code·class="inline">Fun(Item)</code>·returns·<code·class="inline">true</code>,·<code·class="inline">Item</code>·is·copied·to·the·result·queue.·If·it938 <code·class="inline">Q1</code>.</p><p>If·<code·class="inline">Fun(Item)</code>·returns·<code·class="inline">true</code>,·<code·class="inline">Item</code>·is·copied·to·the·result·queue.·If·it
939 returns·<code·class="inline">false</code>,·<code·class="inline">Item</code>·is·not·copied.·If·it·returns·a·list,·the·list·elements939 returns·<code·class="inline">false</code>,·<code·class="inline">Item</code>·is·not·copied.·If·it·returns·a·list,·the·list·elements
940 are·inserted·instead·of·<code·class="inline">Item</code>·in·the·result·queue.</p><p><em>Example·1:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="6633431954-1">(</span><span·class="p"·data-group-id="6633431954-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·134,·SHA:·8dfcc0da185ddb58f9fa3b57ad51e04a9a052cf8f900ab4bb8cf15ec0e46c9dc·...·]-1">)</span><span·class="p">.</span><span·class="w">940 are·inserted·instead·of·<code·class="inline">Item</code>·in·the·result·queue.</p><p><em>Example·1:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Queue</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="2128601616-1">(</span><span·class="p"·data-group-id="2128601616-2">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·cla[·...·truncated·by·diffoscope;·len:·134,·SHA:·2d29b6eb914b2c627be15d9f848d658a8beb1dbaa09ef45a81a1360d89ff91e0·...·]-1">)</span><span·class="p">.</span><span·class="w">
941 </span><span·class="p"·data-group-id="6633431954-3">{</span><span·class="p"·data-group-id="6633431954-4">[</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="6633431954-4">]</span><span[·...·truncated·by·diffoscope;·len:·240,·SHA:·886f46b919369d13ac35ca1ad026e20ce79c6a07be822b7c5bd6fe5529da9660·...·]-3">}</span><span·class="gp·unselectable">941 </span><span·class="p"·data-group-id="2128601616-3">{</span><span·class="p"·data-group-id="2128601616-4">[</span><span·class="mi">5</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="2128601616-4">]</span><span[·...·truncated·by·diffoscope;·len:·240,·SHA:·59daeb423a8761f881e981aa88076e1864e6f315a3b07513f8c23a88b6368ba8·...·]-3">}</span><span·class="gp·unselectable">
942 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="6633431954-6">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="6633431954-7">(</span><span·class="n">E</span><span·class="p"·data-group-id="6633431954-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·13ea040f85ea9db486de594788d33114c45311b750b3922e6bb9d38f322bf3f7·...·]-6">)</span><span·class="p">.</span><span·class="w">942 2&gt;·</span><span·class="n">Queue1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">filter</span><span·class="p"·data-group-id="2128601616-6">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2128601616-7">(</span><span·class="n">E</span><span·class="p"·data-group-id="2128601616-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·314,·SHA:·70f37e4d6d4a436ceb8361fac77210152710b426c3649209d4081147ad0ad1a0·...·]-6">)</span><span·class="p">.</span><span·class="w">
943 </span><span·class="p"·data-group-id="6633431954-8">{</span><span·class="p"·data-group-id="6633431954-9">[</span><span·class="mi">5</span><span·class="p"·data-group-id="6633431954-9">]</span><span·class="p">,</span><span·class="p"·data-group-id="6633431954-10">[</span><span·class="mi">3</span>[·...·truncated·by·diffoscope;·len:·144,·SHA:·576146e75933a39c574d6eb5babd320291c27be3d252efaa6fc2e0bd291f5c5b·...·]-8">}</span><span·class="gp·unselectable">943 </span><span·class="p"·data-group-id="2128601616-8">{</span><span·class="p"·data-group-id="2128601616-9">[</span><span·class="mi">5</span><span·class="p"·data-group-id="2128601616-9">]</span><span·class="p">,</span><span·class="p"·data-group-id="2128601616-10">[</span><span·class="mi">3</span>[·...·truncated·by·diffoscope;·len:·144,·SHA:·905e34a2ff5cc6bef4b99330422b8e21514f846aa966c254eea813faadb9001e·...·]-8">}</span><span·class="gp·unselectable">
944 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="6633431954-11">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="6633431954-11">)</span><span·class="p">.</span><span·class="w">944 3&gt;·</span><span·class="nc">queue</span><span·class="p">:</span><span·class="nf">to_list</span><span·class="p"·data-group-id="2128601616-11">(</span><span·class="n">Queue1</span><span·class="p"·data-group-id="2128601616-11">)</span><span·class="p">.</span><span·class="w">
945 </span><span·class="p"·data-group-id="6633431954-12">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="6633431954-12">]</span></code></pre><p>So,·<code·class="inline">Fun(Item)</code>·returning·<code·class="inline">[Item]</code>·is·thereby·semantically·equivalent·to945 </span><span·class="p"·data-group-id="2128601616-12">[</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="2128601616-12">]</span></code></pre><p>So,·<code·class="inline">Fun(Item)</code>·returning·<code·class="inline">[Item]</code>·is·thereby·semantically·equivalent·to
946 returning·<code·class="inline">true</code>,·just·as·returning·<code·class="inline">[]</code>·is·semantically·equivalent·to·returning946 returning·<code·class="inline">true</code>,·just·as·returning·<code·class="inline">[]</code>·is·semantically·equivalent·to·returning
Max diff block lines reached; 116342/162895 bytes (71.42%) of diff not shown.
28.1 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/rand.html
    
Offset 197, 32 lines modifiedOffset 197, 32 lines modified
197 or·be·an·explicit·argument·and·return·value.</p><p>The·functions·with·implicit·state·operates·on·a·state·stored197 or·be·an·explicit·argument·and·return·value.</p><p>The·functions·with·implicit·state·operates·on·a·state·stored
198 in·the·process·dictionary·under·the·key·<code·class="inline">rand_seed</code>.··If·that·key198 in·the·process·dictionary·under·the·key·<code·class="inline">rand_seed</code>.··If·that·key
199 doesn't·exist·when·the·function·is·called,·<a·href="#seed/1"><code·class="inline">seed/1</code></a>·is·called·automatically199 doesn't·exist·when·the·function·is·called,·<a·href="#seed/1"><code·class="inline">seed/1</code></a>·is·called·automatically
200 with·the·<a·href="#default-algorithm"><em>default·algorithm</em></a>·and·creates200 with·the·<a·href="#default-algorithm"><em>default·algorithm</em></a>·and·creates
201 a·reasonably·unpredictable·seed.</p><p>The·functions·with·explicit·state·don't·use·the·process·dictionary.</p><h4><em>Examples</em></h4><p>Simple·use;·create·and·seed·the201 a·reasonably·unpredictable·seed.</p><p>The·functions·with·explicit·state·don't·use·the·process·dictionary.</p><h4><em>Examples</em></h4><p>Simple·use;·create·and·seed·the
202 <a·href="#default-algorithm"><em>default·algorithm</em></a>·with·a·non-fixed·seed,202 <a·href="#default-algorithm"><em>default·algorithm</em></a>·with·a·non-fixed·seed,
203 if·not·already·done,·and·generate·two·uniformly·distibuted203 if·not·already·done,·and·generate·two·uniformly·distibuted
204 floating·point·numbers.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">R0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="0169650721-1">(</span><span·class="p"·data-group-id="0169650721-1">)</span><span·class="p">,</span><span·class="w">204 floating·point·numbers.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">R0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="7401215499-1">(</span><span·class="p"·data-group-id="7401215499-1">)</span><span·class="p">,</span><span·class="w">
205 </span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="0169650721-2">(</span><span·class="p"·data-group-id="0169650721-2">)</span><span·class="p">,</span></code></pre><p>Use·a·specified·algorithm:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o"[·...·truncated·by·diffoscope;·len:·239,·SHA:·0128a01cb01e0714bc77ab302234614b614a33a581db670617ebe20809d3b2be·...·]-1">)</span><span·class="p">,</span><span·class="w">205 </span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="7401215499-2">(</span><span·class="p"·data-group-id="7401215499-2">)</span><span·class="p">,</span></code></pre><p>Use·a·specified·algorithm:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</span><span·class="o"[·...·truncated·by·diffoscope;·len:·239,·SHA:·83d7967d9fd76cc42298d7724381aba1af1570d6e8fcc4fadca63e90edc0d75d·...·]-1">)</span><span·class="p">,</span><span·class="w">
206 </span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="6046541810-2">(</span><span·class="p"·data-group-id="6046541810-2">)</span><span·class="p">,</span></code></pre><p>Use·a·specified·algorithm·with·a·fixed·seed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·592,·SHA:·c10d3dfadbdca7f099638e83bf7e592ffeeb0ab939cf0863734994be773060ff·...·]9-1">)</span><span·class="p">,</span><span·class="w">206 </span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="6793506605-2">(</span><span·class="p"·data-group-id="6793506605-2">)</span><span·class="p">,</span></code></pre><p>Use·a·specified·algorithm·with·a·fixed·seed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">_</span><span·class="w">·</spa[·...·truncated·by·diffoscope;·len:·592,·SHA:·c07c1c41cfb39e20db595e01afe7acd29341284ac58a81ddc641b4f4fb652d3e·...·]9-1">)</span><span·class="p">,</span><span·class="w">
207 </span><span·class="n">R3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="0505878889-3">(</span><span·class="p"·data-group-id="0505878889-3">)</span><span·class="p">,</span></code></pre><p>Use·the·functional·API·with·a·non-fixed·seed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">S0</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·257,·SHA:·8d1373e68031c4678b8bcacea9ce8aca15f862a56c612d3da7269444aa7ccc6d·...·]3-1">)</span><span·class="p">,</span><span·class="w">207 </span><span·class="n">R3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="2950616559-3">(</span><span·class="p"·data-group-id="2950616559-3">)</span><span·class="p">,</span></code></pre><p>Use·the·functional·API·with·a·non-fixed·seed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">S0</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·257,·SHA:·eb373e1505046a3e6590e5dde3c41906f7a377e1b9312c13aad44f947b331483·...·]3-1">)</span><span·class="p">,</span><span·class="w">
208 </span><span·class="p"·data-group-id="6275334963-2">{</span><span·class="n">R4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S1</span><span·class="p"·data-group-id="6275334963-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·654,·SHA:·8514c992d936b00b46c917b2f2a1990faf78d36fa44d0603bd2ca89c17b8e251·...·]-1">)</span><span·class="p">,</span><span·class="w">208 </span><span·class="p"·data-group-id="1681402133-2">{</span><span·class="n">R4</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S1</span><span·class="p"·data-group-id="1681402133-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·654,·SHA:·7785dbcd1093d7157c2bd2841f594597bf8bd142b695b4076638024047bfebbb·...·]-1">)</span><span·class="p">,</span><span·class="w">
209 </span><span·class="n">R6</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5037328550-2">(</span><span·class="p"·data-group-id="5037328550-2">)</span><span·class="p">,</span><span·class="w">209 </span><span·class="n">R6</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5999489573-2">(</span><span·class="p"·data-group-id="5999489573-2">)</span><span·class="p">,</span><span·class="w">
210 </span><span·class="n">SND0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">math</span><span·class="p">:</span><span·class="nf">sqrt</span><span·class="p"·data-group-id="5037328550-3">(</span><span·class="o">-</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nc">math</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="5037[·...·truncated·by·diffoscope;·len:·2112,·SHA:·3a79d4145eaf360f2279ddbad24c2977988701ece9a2a32900f42ed9bc0d312b·...·]-2">)</span><span·class="p">,</span></code></pre><h4>Quality·of·the·Generated·Numbers</h4><blockquote><h4·class="info">Note</h4><p>The·builtin·random·number·generator·algorithms·are·not·cryptographically210 </span><span·class="n">SND0</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">math</span><span·class="p">:</span><span·class="nf">sqrt</span><span·class="p"·data-group-id="5999489573-3">(</span><span·class="o">-</span><span·class="mi">2</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="nc">math</span><span·class="p">:</span><span·class="nf">log</span><span·class="p"·data-group-id="5999[·...·truncated·by·diffoscope;·len:·2112,·SHA:·24db564ff51414f42ca858cb05421acad77c7618b5d10c316bc669cb7e3ae382·...·]-2">)</span><span·class="p">,</span></code></pre><h4>Quality·of·the·Generated·Numbers</h4><blockquote><h4·class="info">Note</h4><p>The·builtin·random·number·generator·algorithms·are·not·cryptographically
211 strong.·If·a·cryptographically·strong·random·number·generator·is·needed,211 strong.·If·a·cryptographically·strong·random·number·generator·is·needed,
212 use·something·like·<a·href="../../../../lib/crypto-5.5/doc/html/crypto.html#rand_seed/0"><code·class="inline">crypto:rand_seed/0</code></a>.</p></blockquote><p>For·all·these·generators·except·<code·class="inline">exro928ss</code>·and·<code·class="inline">exsss</code>·the·lowest·bit(s)212 use·something·like·<a·href="../../../../lib/crypto-5.5/doc/html/crypto.html#rand_seed/0"><code·class="inline">crypto:rand_seed/0</code></a>.</p></blockquote><p>For·all·these·generators·except·<code·class="inline">exro928ss</code>·and·<code·class="inline">exsss</code>·the·lowest·bit(s)
213 have·got·a·slightly·less·random·behaviour·than·all·other·bits.213 have·got·a·slightly·less·random·behaviour·than·all·other·bits.
214 1·bit·for·<code·class="inline">exrop</code>·(and·<code·class="inline">exsp</code>),·and·3·bits·for·<code·class="inline">exs1024s</code>.·See·for·example214 1·bit·for·<code·class="inline">exrop</code>·(and·<code·class="inline">exsp</code>),·and·3·bits·for·<code·class="inline">exs1024s</code>.·See·for·example
215 this·explanation·in·the215 this·explanation·in·the
216 <a·href="http://xoroshiro.di.unimi.it/xoroshiro128plus.c">Xoroshiro128+</a>216 <a·href="http://xoroshiro.di.unimi.it/xoroshiro128plus.c">Xoroshiro128+</a>
217 generator·source·code:</p><blockquote><p>Beside·passing·BigCrush,·this·generator·passes·the·PractRand·test·suite217 generator·source·code:</p><blockquote><p>Beside·passing·BigCrush,·this·generator·passes·the·PractRand·test·suite
218 up·to·(and·included)·16TB,·with·the·exception·of·binary·rank·tests,218 up·to·(and·included)·16TB,·with·the·exception·of·binary·rank·tests,
219 which·fail·due·to·the·lowest·bit·being·an·LFSR;·all·other·bits·pass·all219 which·fail·due·to·the·lowest·bit·being·an·LFSR;·all·other·bits·pass·all
220 tests.·We·suggest·to·use·a·sign·test·to·extract·a·random·Boolean·value.</p></blockquote><p>If·this·is·a·problem;·to·generate·a·boolean·with·these·algorithms,220 tests.·We·suggest·to·use·a·sign·test·to·extract·a·random·Boolean·value.</p></blockquote><p>If·this·is·a·problem;·to·generate·a·boolean·with·these·algorithms,
221 use·something·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2734978306-1">(</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="2734978306-2">(</span><span·class="mi">256</span><span·class="p"·data-group-id="2734978306-2">)</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·2110,·SHA:·81927b23a42d3cba837eaab6b5f19db7304fd1d0380e93f8dbe4be852ae32cc6·...·]-1">)</span></code></pre><p>The·floating·point·generating·functions·in·this·module·waste·the·lowest·bits221 use·something·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5794386907-1">(</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="5794386907-2">(</span><span·class="mi">256</span><span·class="p"·data-group-id="5794386907-2">)</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·2110,·SHA:·bb10b7a2865973329c8339247d69990a89cf5e825d911a911d36efbcc14aacd2·...·]-1">)</span></code></pre><p>The·floating·point·generating·functions·in·this·module·waste·the·lowest·bits
222 when·converting·from·an·integer·so·they·avoid·this·snag.</p><h2·id="module-niche-algorithms"·class="section-heading">222 when·converting·from·an·integer·so·they·avoid·this·snag.</p><h2·id="module-niche-algorithms"·class="section-heading">
223 ··<a·href="#module-niche-algorithms"·class="hover-link">223 ··<a·href="#module-niche-algorithms"·class="hover-link">
224 ····<i·class="ri-link-m"·aria-hidden="true"></i>224 ····<i·class="ri-link-m"·aria-hidden="true"></i>
225 ··</a>225 ··</a>
226 ··<span·class="text"><a·href=""·id="niche-algorithms"></a>·Niche·algorithms</span>226 ··<span·class="text"><a·href=""·id="niche-algorithms"></a>·Niche·algorithms</span>
227 </h2>227 </h2>
228 <p>The·<a·href="#niche-algorithms-api">niche·algorithms·API</a>·contains228 <p>The·<a·href="#niche-algorithms-api">niche·algorithms·API</a>·contains
Offset 1943, 18 lines modifiedOffset 1943, 18 lines modified
  
1943 <p>Generate·a·uniformly·distributed·random·number·<code·class="inline">0.0 =&lt; X &lt; 1.0</code>.</p><p>From·the·specified·<code·class="inline">State</code>,·generates·a·random·number·<code·class="inline">X ::</code> <a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:float/0"><code·class="inline">float/0</code></a>,1943 <p>Generate·a·uniformly·distributed·random·number·<code·class="inline">0.0 =&lt; X &lt; 1.0</code>.</p><p>From·the·specified·<code·class="inline">State</code>,·generates·a·random·number·<code·class="inline">X ::</code> <a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:float/0"><code·class="inline">float/0</code></a>,
1944 uniformly·distributed·in·the·value·range·<code·class="inline">0.0·=&lt;·X·&lt;·1.0</code>.1944 uniformly·distributed·in·the·value·range·<code·class="inline">0.0·=&lt;·X·&lt;·1.0</code>.
1945 Returns·the·number·<code·class="inline">X</code>·and·the·updated·<code·class="inline">NewState</code>.</p><p>The·generated·numbers·are·on·the·form·<code·class="inline">N * 2.0^(-53)</code>,·that·is;1945 Returns·the·number·<code·class="inline">X</code>·and·the·updated·<code·class="inline">NewState</code>.</p><p>The·generated·numbers·are·on·the·form·<code·class="inline">N * 2.0^(-53)</code>,·that·is;
1946 equally·spaced·in·the·interval.</p><blockquote><h4·class="warning">Warning</h4><p>This·function·may·return·exactly·<code·class="inline">0.0</code>·which·can·be·fatal·for·certain1946 equally·spaced·in·the·interval.</p><blockquote><h4·class="warning">Warning</h4><p>This·function·may·return·exactly·<code·class="inline">0.0</code>·which·can·be·fatal·for·certain
1947 applications.·If·that·is·undesired·you·can·use·<code·class="inline">(1.0 - rand:uniform())</code>1947 applications.·If·that·is·undesired·you·can·use·<code·class="inline">(1.0 - rand:uniform())</code>
1948 to·get·the·interval·<code·class="inline">0.0 &lt; X =&lt; 1.0</code>,·or·instead·use·<a·href="#uniform_real/0"><code·class="inline">uniform_real/0</code></a>.</p><p>If·neither·endpoint·is·desired·you·can·achieve·the·range1948 to·get·the·interval·<code·class="inline">0.0 &lt; X =&lt; 1.0</code>,·or·instead·use·<a·href="#uniform_real/0"><code·class="inline">uniform_real/0</code></a>.</p><p>If·neither·endpoint·is·desired·you·can·achieve·the·range
1949 <code·class="inline">0.0 &lt; X &lt; 1.0</code>·using·test·and·re-try·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_uniform</span><span·class="p"·data-group-id="8577739278-1">(</span><span·class="p"·data-group-id="8577739278-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1949 <code·class="inline">0.0 &lt; X &lt; 1.0</code>·using·test·and·re-try·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">my_uniform</span><span·class="p"·data-group-id="3506759518-1">(</span><span·class="p"·data-group-id="3506759518-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1950 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="8577739278-2">(</span><span·class="p"·data-group-id="8577739278-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1950 ····</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">uniform</span><span·class="p"·data-group-id="3506759518-2">(</span><span·class="p"·data-group-id="3506759518-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1951 ········</span><span·class="n">X</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="mf">0.0</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="p">;</span><span·class="w">1951 ········</span><span·class="n">X</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="mf">0.0</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="w">·</span><span·class="n">X</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">X</span><span·class="p">;</span><span·class="w">
1952 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">my_uniform</span><span·class="p"·data-group-id="8577739278-3">(</span><span·class="p"·data-group-id="8577739278-3">)</span><span·class="w">1952 ········</span><span·class="p">_</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">my_uniform</span><span·class="p"·data-group-id="3506759518-3">(</span><span·class="p"·data-group-id="3506759518-3">)</span><span·class="w">
1953 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre></blockquote>1953 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre></blockquote>
1954 ··</section>1954 ··</section>
1955 </section>1955 </section>
1956 <section·class="detail"·id="uniform_s/2">1956 <section·class="detail"·id="uniform_s/2">
  
1957 ··<div·class="detail-header">1957 ··<div·class="detail-header">
1958 ····<a·href="#uniform_s/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1958 ····<a·href="#uniform_s/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 2107, 15 lines modifiedOffset 2107, 15 lines modified
2107 a·new·state·<a·href="#t:mwc59_state/0"><code·class="inline">CX1</code></a>,·according·to·a·Multiply·With·Carry2107 a·new·state·<a·href="#t:mwc59_state/0"><code·class="inline">CX1</code></a>,·according·to·a·Multiply·With·Carry
2108 generator,·which·is·an·efficient·implementation·of2108 generator,·which·is·an·efficient·implementation·of
2109 a·Multiplicative·Congruential·Generator·with·a·power·of·2·multiplier2109 a·Multiplicative·Congruential·Generator·with·a·power·of·2·multiplier
2110 and·a·prime·modulus.</p><p>This·generator·uses·the·multiplier·<code·class="inline">2^32</code>·and·the·modulus2110 and·a·prime·modulus.</p><p>This·generator·uses·the·multiplier·<code·class="inline">2^32</code>·and·the·modulus
2111 <code·class="inline">16#7fa6502 * 2^32 - 1</code>,·which·have·been·selected,·in·collaboration·with2111 <code·class="inline">16#7fa6502 * 2^32 - 1</code>,·which·have·been·selected,·in·collaboration·with
2112 Sebastiano·Vigna,·to·avoid·bignum·operations·and·still·get2112 Sebastiano·Vigna,·to·avoid·bignum·operations·and·still·get
2113 good·statistical·quality.·It·has·been·named·&quot;MWC59&quot;·and·can·be·written·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">C</span><span·class="err"> </span><span·class="o">=</span><span·class="err"> </span><span·class="n">CX0</span><span·class="err"> </span><span·class="ow">bsr</span><span·class="err"> </span><span·class="mi">32</span><span·class="w">2113 good·statistical·quality.·It·has·been·named·&quot;MWC59&quot;·and·can·be·written·as:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">C</span><span·class="err"> </span><span·class="o">=</span><span·class="err"> </span><span·class="n">CX0</span><span·class="err"> </span><span·class="ow">bsr</span><span·class="err"> </span><span·class="mi">32</span><span·class="w">
2114 </span><span·class="n">X</span><span·class="err"> </span><span·class="o">=</span><span·class="err"> </span><span·class="n">CX0</span><span·class="err"> </span><span·class="ow">band</span><span·class="err"> </span><span·class="p"·data-group-id="5265674930-1">(</span><span·class="p"·data-group-id="5265674930-2">(</span><span·class="mi">1</span><span·class="err"> </span><span·class="ow">bsl</span><span·class="err"> </span><span·class="mi">32</span><span·class="p"·data-group-id="5265674930-2">)</spa[·...·truncated·by·diffoscope;·len:·92,·SHA:·c537f18ae5025bf49e12778a7185a1c64ade88f4f317a842f99d34b95148305b·...·]-1">)</span><span·class="p">)</span><span·class="w">2114 </span><span·class="n">X</span><span·class="err"> </span><span·class="o">=</span><span·class="err"> </span><span·class="n">CX0</span><span·class="err"> </span><span·class="ow">band</span><span·class="err"> </span><span·class="p"·data-group-id="9258772413-1">(</span><span·class="p"·data-group-id="9258772413-2">(</span><span·class="mi">1</span><span·class="err"> </span><span·class="ow">bsl</span><span·class="err"> </span><span·class="mi">32</span><span·class="p"·data-group-id="9258772413-2">)</spa[·...·truncated·by·diffoscope;·len:·92,·SHA:·3bbc6e573857bfa25a79020b5ea3cd607d63f5e9ef1408d5d9b12c3c8f11fa94·...·]-1">)</span><span·class="p">)</span><span·class="w">
2115 </span><span·class="n">CX1</span><span·class="err"> </span><span·class="o">=</span><span·class="err"> </span><span·class="mi">16#7fa6502</span><span·class="err"> </span><span·class="o">*</span><span·class="err"> </span><span·class="n">X</span><span·class="err"> </span><span·class="o">+</span><span·class="err"> </span><span·class="n">C</span></code></pre><p>Because·the·generator·uses·a·multiplier·that·is·a·power·of·2·it·gets2115 </span><span·class="n">CX1</span><span·class="err"> </span><span·class="o">=</span><span·class="err"> </span><span·class="mi">16#7fa6502</span><span·class="err"> </span><span·class="o">*</span><span·class="err"> </span><span·class="n">X</span><span·class="err"> </span><span·class="o">+</span><span·class="err"> </span><span·class="n">C</span></code></pre><p>Because·the·generator·uses·a·multiplier·that·is·a·power·of·2·it·gets
2116 statistical·flaws·for·collision·tests·and·birthday·spacings·tests2116 statistical·flaws·for·collision·tests·and·birthday·spacings·tests
2117 in·2·and·3·dimensions,·and·these·caveats·apply·even·when·looking2117 in·2·and·3·dimensions,·and·these·caveats·apply·even·when·looking
2118 only·at·the·MWC·&quot;digit&quot;,·that·is·the·low·32·bits·(the·multiplier)2118 only·at·the·MWC·&quot;digit&quot;,·that·is·the·low·32·bits·(the·multiplier)
2119 of·the·generator·state.··The·higher·bits·of·the·state·are·worse.</p><p>The·quality·of·the·output·value·improves·much·by·using·a·scrambler,2119 of·the·generator·state.··The·higher·bits·of·the·state·are·worse.</p><p>The·quality·of·the·output·value·improves·much·by·using·a·scrambler,
2120 instead·of·just·taking·the·low·bits.2120 instead·of·just·taking·the·low·bits.
2121 Function·<a·href="#mwc59_value32/1"><code·class="inline">mwc59_value32</code></a>·is·a·fast·scrambler2121 Function·<a·href="#mwc59_value32/1"><code·class="inline">mwc59_value32</code></a>·is·a·fast·scrambler
4.27 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/random.html
    
Offset 468, 17 lines modifiedOffset 468, 17 lines modified
468 ······<div·class="specs">468 ······<div·class="specs">
  
469 ··········<pre·translate="no"><span·class="attribute">-spec</span>·seed(A1,·A2,·A3)·->·undefined·|·<a·href="#t:ran/0">ran</a>()·when·A1·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·A2·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·A3·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>().</pre>469 ··········<pre·translate="no"><span·class="attribute">-spec</span>·seed(A1,·A2,·A3)·->·undefined·|·<a·href="#t:ran/0">ran</a>()·when·A1·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·A2·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>(),·A3·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:integer/0">integer</a>().</pre>
  
470 ······</div>470 ······</div>
  
471 <p>Seeds·random·number·generation·with·integer·values·in·the·process·dictionary·and471 <p>Seeds·random·number·generation·with·integer·values·in·the·process·dictionary·and
472 returns·the·old·state.</p><p>The·following·is·an·easy·way·of·obtaining·a·unique·value·to·seed·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">random</span><span·class="p">:</span><span·class="nf">seed</span><span·class="p"·data-group-id="6588589855-1">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">phash2</span><span·class="p"·data-group-id="6588589855-2">(</span><span·class="p"·data-group-id="6588589855-3">[</span><span·class="nf">node</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·184,·SHA:·da7214eebdb872efef5530be635636676b9de9080ffae8452f44afcc69e0b0c5·...·]-2">)</span><span·class="p">,</span><span·class="w">472 returns·the·old·state.</p><p>The·following·is·an·easy·way·of·obtaining·a·unique·value·to·seed·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">random</span><span·class="p">:</span><span·class="nf">seed</span><span·class="p"·data-group-id="2910342630-1">(</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">phash2</span><span·class="p"·data-group-id="2910342630-2">(</span><span·class="p"·data-group-id="2910342630-3">[</span><span·class="nf">node</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·184,·SHA:·ada862822ffcdc5aafd9fb47de39304ed8396683e7cba7d0f6c557a31fb49f61·...·]-2">)</span><span·class="p">,</span><span·class="w">
473 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="6588589855-5">(</span><span·class="p"·data-group-id="6588589855-5">)</span><span·class="p">,</span><span·class="w">473 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">monotonic_time</span><span·class="p"·data-group-id="2910342630-5">(</span><span·class="p"·data-group-id="2910342630-5">)</span><span·class="p">,</span><span·class="w">
474 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">unique_integer</span><span·class="p"·data-group-id="6588589855-6">(</span><span·class="p"·data-group-id="6588589855-6">)</span><span·class="p"·data-group-id="6588589855-1">)</span></code></pre><p>For·details,·see·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#phash2/1"><code·class="inline">erlang:phash2/1</code></a>,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#node/0"><code·class="inline">erlang:node/0</code></a>,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#monotonic_time/0"><code·class="inline">erlang:monotonic_time/0</code></a>,474 ············</span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nf">unique_integer</span><span·class="p"·data-group-id="2910342630-6">(</span><span·class="p"·data-group-id="2910342630-6">)</span><span·class="p"·data-group-id="2910342630-1">)</span></code></pre><p>For·details,·see·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#phash2/1"><code·class="inline">erlang:phash2/1</code></a>,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#node/0"><code·class="inline">erlang:node/0</code></a>,·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#monotonic_time/0"><code·class="inline">erlang:monotonic_time/0</code></a>,
475 and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#unique_integer/0"><code·class="inline">erlang:unique_integer/0</code></a>.</p>475 and·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#unique_integer/0"><code·class="inline">erlang:unique_integer/0</code></a>.</p>
476 ··</section>476 ··</section>
477 </section>477 </section>
478 <section·class="detail"·id="uniform/0">478 <section·class="detail"·id="uniform/0">
  
479 ··<div·class="detail-header">479 ··<div·class="detail-header">
480 ····<a·href="#uniform/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">480 ····<a·href="#uniform/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
108 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/re.html
    
Offset 1371, 17 lines modifiedOffset 1371, 17 lines modified
1371 been·passed,·<a·href="#run/2"><code·class="inline">run/2,3</code></a>·is·committed·to·find·a·match·at·the·current1371 been·passed,·<a·href="#run/2"><code·class="inline">run/2,3</code></a>·is·committed·to·find·a·match·at·the·current
1372 starting·point,·or·not·at·all,·for·example:</p><pre><code·class="text">a+(*COMMIT)b</code></pre><p>This·matches·&quot;xxaab&quot;·but·not·&quot;aacaab&quot;.·It·can·be·thought·of·as·a·kind·of·dynamic1372 starting·point,·or·not·at·all,·for·example:</p><pre><code·class="text">a+(*COMMIT)b</code></pre><p>This·matches·&quot;xxaab&quot;·but·not·&quot;aacaab&quot;.·It·can·be·thought·of·as·a·kind·of·dynamic
1373 anchor,·or·&quot;I've·started,·so·I·must·finish&quot;.·The·name·of·the·most·recently1373 anchor,·or·&quot;I've·started,·so·I·must·finish&quot;.·The·name·of·the·most·recently
1374 passed·(<em>MARK)·in·the·path·is·passed·back·when·(</em>COMMIT)·forces·a·match·failure.</p><p>If·more·than·one·backtracking·verb·exists·in·a·pattern,·a·different·one·that1374 passed·(<em>MARK)·in·the·path·is·passed·back·when·(</em>COMMIT)·forces·a·match·failure.</p><p>If·more·than·one·backtracking·verb·exists·in·a·pattern,·a·different·one·that
1375 follows·(<em>COMMIT)·can·be·triggered·first,·so·merely·passing·(</em>COMMIT)·during·a1375 follows·(<em>COMMIT)·can·be·triggered·first,·so·merely·passing·(</em>COMMIT)·during·a
1376 match·does·not·always·guarantee·that·a·match·must·be·at·this·starting·point.</p><p>Notice·that·(*COMMIT)·at·the·start·of·a·pattern·is·not·the·same·as·an·anchor,1376 match·does·not·always·guarantee·that·a·match·must·be·at·this·starting·point.</p><p>Notice·that·(*COMMIT)·at·the·start·of·a·pattern·is·not·the·same·as·an·anchor,
1377 unless·the·PCRE·start-of-match·optimizations·are·turned·off,·as·shown·in·the1377 unless·the·PCRE·start-of-match·optimizations·are·turned·off,·as·shown·in·the
1378 following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="6278810281-1">(</span><span·class="s">&quot;xyzabc&quot;</span><span·class="p">,</span><span·class="s">&quot;(*COMMIT)abc&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="6278810281-2">[</span><span·class="p"·data-group-id="6278810281-3">{</span><span·class="ss">capture</span><span·class="p">,</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">list</span><span·class="p"·data-group-id="6278810281-3">}</span><span·class="p"·data-group-id="6278810281-2">]</span><span·class="p"·data-group-id="6278810281-1">)</span><span·class="p">.</span><span·class="w"> 
1379 </span><span·class="p"·data-group-id="6278810281-4">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="6278810281-5">[</span><span·class="s">&quot;abc&quot;</span><span·class="p"·data-group-id="6278810281-5">]</span><span·class="p"·data-group-id="6278810281-4">}</span><span·class="gp·unselectable"> 
1380 2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="6278810281-6">(</span><span·class="s">&quot;xyzabc&quot;</span><span·class="p">,</span><span·class="s">&quot;(*COMMIT)abc&quot;</span><[·...·truncated·by·diffoscope;·len:·477,·SHA:·92e843757d4bc81f68006a7a7c9c896b36d82a9f69ddc65f79a1ef21df1af547·...·]">)</span><span·class="p">.</span><span·class="w">1378 following·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="5821517206-1">(</span><span·class="[·...·truncated·by·diffoscope;·len:·512,·SHA:·8f9954691c61a7944016e4e8fa35b3f47fd5c3a27362be8efe12ed2edad5736d·...·]">)</span><span·class="p">.</span><span·class="w">
 1379 </span><span·class="p"·data-group-id="5821517206-4">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="5821517206-5">[</span><span·class="s">&quot;abc&quot;</span><span·class="p"·data-group-id="5821517206-5">]</span><span·class="p"·data-group-id="5821517206-4">}</span><span·class="gp·unselectable">
 1380 2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="5821517206-6">(</span><span·class="s">&quot;xyzabc&quot;</span><span·class="p">,</span><span·class="s">&quot;(*COMMIT)abc&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="5821517206-7">[</span><span·class="p"·data-group-id="5821517206-8">{</span><span·class="ss">capture</span><span·class="p">,</span><span·class="ss">all</span><span·class="p">,</span><span·class="ss">list</span><span·class="p"·data-group-id="5821517206-8">}</span><span·class="p">,</span><span·class="ss">no_start_optimize</span><span·class="p"·data-group-id="5821517206-7">]</span><span·class="p"·data-group-id="5821517206-6">)</span><span·class="p">.</span><span·class="w">
1381 </span><span·class="ss">nomatch</span></code></pre><p>For·this·pattern,·PCRE·knows·that·any·match·must·start·with·&quot;a&quot;,·so·the1381 </span><span·class="ss">nomatch</span></code></pre><p>For·this·pattern,·PCRE·knows·that·any·match·must·start·with·&quot;a&quot;,·so·the
1382 optimization·skips·along·the·subject·to·&quot;a&quot;·before·applying·the·pattern·to·the1382 optimization·skips·along·the·subject·to·&quot;a&quot;·before·applying·the·pattern·to·the
1383 first·set·of·data.·The·match·attempt·then·succeeds.·In·the·second·call·the1383 first·set·of·data.·The·match·attempt·then·succeeds.·In·the·second·call·the
1384 <code·class="inline">no_start_optimize</code>·disables·the·optimization·that·skips·along·to·the·first1384 <code·class="inline">no_start_optimize</code>·disables·the·optimization·that·skips·along·to·the·first
1385 character.·The·pattern·is·now·applied·starting·at·&quot;x&quot;,·and·so·the·(*COMMIT)1385 character.·The·pattern·is·now·applied·starting·at·&quot;x&quot;,·and·so·the·(*COMMIT)
1386 causes·the·match·to·fail·without·trying·any·other·starting·points.</p><p>The·following·verb·causes·the·match·to·fail·at·the·current·starting·position·in1386 causes·the·match·to·fail·without·trying·any·other·starting·points.</p><p>The·following·verb·causes·the·match·to·fail·at·the·current·starting·position·in
1387 the·subject·if·there·is·a·later·matching·failure·that·causes·backtracking·to1387 the·subject·if·there·is·a·later·matching·failure·that·causes·backtracking·to
Offset 2106, 40 lines modifiedOffset 2106, 40 lines modified
  
2106 ··········<pre·translate="no"><span·class="attribute">-spec</span>·inspect(MP,·Item)·->·{namelist,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()]}·when·MP·::·<a·href="#t:mp/0">mp</a>(),·Item·::·namelist.</pre>2106 ··········<pre·translate="no"><span·class="attribute">-spec</span>·inspect(MP,·Item)·->·{namelist,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:binary/0">binary</a>()]}·when·MP·::·<a·href="#t:mp/0">mp</a>(),·Item·::·namelist.</pre>
  
2107 ······</div>2107 ······</div>
  
2108 <p>Takes·a·compiled·regular·expression·and·an·item,·and·returns·the·relevant·data2108 <p>Takes·a·compiled·regular·expression·and·an·item,·and·returns·the·relevant·data
2109 from·the·regular·expression.</p><p>The·only·supported·item·is·<code·class="inline">namelist</code>,·which·returns·the·tuple·<code·class="inline">{namelist,·[binary()]}</code>,2109 from·the·regular·expression.</p><p>The·only·supported·item·is·<code·class="inline">namelist</code>,·which·returns·the·tuple·<code·class="inline">{namelist,·[binary()]}</code>,
2110 containing·the·names·of·all·(unique)·named·subpatterns·in·the·regular·expression.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="3495015057-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">MP</span><span·class="p"·data-group-id="3495015057-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·cl[·...·truncated·by·diffoscope;·len:·217,·SHA:·3bd3c4d280443ec053deacfaabf09d356bf6de0324bb47335d992e4a5671498f·...·]-2">)</span><span·class="p">.</span><span·class="w">2110 containing·the·names·of·all·(unique)·named·subpatterns·in·the·regular·expression.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="4593665234-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">MP</span><span·class="p"·data-group-id="4593665234-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·cl[·...·truncated·by·diffoscope;·len:·217,·SHA:·688b9f307a2dc346612e251a5966f443366105245e0ab280c66a9e129b0dc53c·...·]-2">)</span><span·class="p">.</span><span·class="w">
2111 </span><span·class="p"·data-group-id="3495015057-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3495015057-4">{</span><span·class="ss">re_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">2111 </span><span·class="p"·data-group-id="4593665234-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4593665234-4">{</span><span·class="ss">re_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
2112 ················</span><span·class="p">&lt;&lt;</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="w">2112 ················</span><span·class="p">&lt;&lt;</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="w">
2113 ··················</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3495015057-4">}</span><span·class="p"·data-group-id="3495015057-3">}</span><span·class="gp·unselectable">2113 ··················</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4593665234-4">}</span><span·class="p"·data-group-id="4593665234-3">}</span><span·class="gp·unselectable">
2114 2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">inspect</span><span·class="p"·data-group-id="3495015057-5">(</span><span·class="n">MP</span><span·class="p">,</span><span·class="ss">namelist</span><span·class="p"·data-group-id="3495015057-5">)</span><span·class="p">.</span><span·class="w">2114 2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">inspect</span><span·class="p"·data-group-id="4593665234-5">(</span><span·class="n">MP</span><span·class="p">,</span><span·class="ss">namelist</span><span·class="p"·data-group-id="4593665234-5">)</span><span·class="p">.</span><span·class="w">
2115 </span><span·class="p"·data-group-id="3495015057-6">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="p"·data-group-id="3495015057-7">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·311,·SHA:·8aee4303c7540fff73260daeefc8d895ac40b73229092ccb1621a4dfe7d84e49·...·]-6">}</span><span·class="gp·unselectable">2115 </span><span·class="p"·data-group-id="4593665234-6">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="p"·data-group-id="4593665234-7">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·311,·SHA:·5eadc6df4d090fd54a7400aaf22255c334d6dc45671030874d3cb70ac109d9c1·...·]-6">}</span><span·class="gp·unselectable">
2116 3&gt;·</span><span·class="p"·data-group-id="3495015057-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">MPD</span><span·class="p"·data-group-id="3495015057-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·c[·...·truncated·by·diffoscope;·len:·382,·SHA:·3872b1720be15b7563753b5d2e3e3f3bb0fb43518fe81fb48c3453fc873817af·...·]-9">)</span><span·class="p">.</span><span·class="w">2116 3&gt;·</span><span·class="p"·data-group-id="4593665234-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">MPD</span><span·class="p"·data-group-id="4593665234-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·c[·...·truncated·by·diffoscope;·len:·382,·SHA:·3c2f74adc3460bccb1672f366b726d2d7241044b32d69397fdcde021c83de443·...·]-9">)</span><span·class="p">.</span><span·class="w">
2117 </span><span·class="p"·data-group-id="3495015057-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3495015057-12">{</span><span·class="ss">re_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">2117 </span><span·class="p"·data-group-id="4593665234-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4593665234-12">{</span><span·class="ss">re_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
2118 ················</span><span·class="p">&lt;&lt;</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="w">2118 ················</span><span·class="p">&lt;&lt;</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">8</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="w">
2119 ··················</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="3495015057-12">}</span><span·class="p"·data-group-id="3495015057-11">}</span><span·class="gp·unselectable">2119 ··················</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4593665234-12">}</span><span·class="p"·data-group-id="4593665234-11">}</span><span·class="gp·unselectable">
2120 4&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">inspect</span><span·class="p"·data-group-id="3495015057-13">(</span><span·class="n">MPD</span><span·class="p">,</span><span·class="ss">namelist</span><span·class="p"·data-group-id="3495015057-13">)</span><span·class="p">.</span><span·class="w">2120 4&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">inspect</span><span·class="p"·data-group-id="4593665234-13">(</span><span·class="n">MPD</span><span·class="p">,</span><span·class="ss">namelist</span><span·class="p"·data-group-id="4593665234-13">)</span><span·class="p">.</span><span·class="w">
2121 </span><span·class="p"·data-group-id="3495015057-14">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="p"·data-group-id="3495015057-15">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;B&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·192,·SHA:·10f252dd6ad01dcddb5f1e7737be681f3c02ffe9977c074de6a5eeadac77c70d·...·]-14">}</span></code></pre><p>Notice·in·the·second·example·that·the·duplicate·name·only·occurs·once·in·the2121 </span><span·class="p"·data-group-id="4593665234-14">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="p"·data-group-id="4593665234-15">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;B&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·192,·SHA:·3d460240d6c86dcf97b5b7edaba16febcafe1a055e8d08c2a9d9d3417ed42326·...·]-14">}</span></code></pre><p>Notice·in·the·second·example·that·the·duplicate·name·only·occurs·once·in·the
2122 returned·list,·and·that·the·list·is·in·alphabetical·order·regardless·of·where2122 returned·list,·and·that·the·list·is·in·alphabetical·order·regardless·of·where
2123 the·names·are·positioned·in·the·regular·expression.·The·order·of·the·names·is2123 the·names·are·positioned·in·the·regular·expression.·The·order·of·the·names·is
2124 the·same·as·the·order·of·captured·subexpressions·if·<code·class="inline">{capture,·all_names}</code>·is2124 the·same·as·the·order·of·captured·subexpressions·if·<code·class="inline">{capture,·all_names}</code>·is
2125 specified·as·an·option·to·<a·href="#run/3"><code·class="inline">run/3</code></a>.·You·can·therefore·create·a·name-to-value2125 specified·as·an·option·to·<a·href="#run/3"><code·class="inline">run/3</code></a>.·You·can·therefore·create·a·name-to-value
2126 mapping·from·the·result·of·<a·href="#run/3"><code·class="inline">run/3</code></a>·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="7797582814-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">MP</span><span·class="p"·data-group-id="7797582814-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·cl[·...·truncated·by·diffoscope;·len:·216,·SHA:·fdfc0a507f55ce0a537c3e2ae3eb717789a23496f9da4d4aaf2592e093fa5c6b·...·]4-2">)</span><span·class="p">.</span><span·class="w">2126 mapping·from·the·result·of·<a·href="#run/3"><code·class="inline">run/3</code></a>·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="4615234994-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">MP</span><span·class="p"·data-group-id="4615234994-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·cl[·...·truncated·by·diffoscope;·len:·216,·SHA:·1143976ffdabab6cb70d43e2edb337ae12e90e412736469741dd881745673a7b·...·]4-2">)</span><span·class="p">.</span><span·class="w">
2127 </span><span·class="p"·data-group-id="7797582814-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7797582814-4">{</span><span·class="ss">re_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">2127 </span><span·class="p"·data-group-id="4615234994-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4615234994-4">{</span><span·class="ss">re_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
2128 ················</span><span·class="p">&lt;&lt;</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="w">2128 ················</span><span·class="p">&lt;&lt;</span><span·class="mi">69</span><span·class="p">,</span><span·class="mi">82</span><span·class="p">,</span><span·class="mi">67</span><span·class="p">,</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">119</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="w">
2129 ··················</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7797582814-4">}</span><span·class="p"·data-group-id="7797582814-3">}</span><span·class="gp·unselectable">2129 ··················</span><span·class="mi">255</span><span·class="p">,</span><span·class="mi">255</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4615234994-4">}</span><span·class="p"·data-group-id="4615234994-3">}</span><span·class="gp·unselectable">
2130 2&gt;·</span><span·class="p"·data-group-id="7797582814-5">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="7797582814-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·250,·SHA:·cf91828a5e131ebe766a25480de8526aec066dcd6d5996259027820690a600ee·...·]4-6">)</span><span·class="p">.</span><span·class="w">2130 2&gt;·</span><span·class="p"·data-group-id="4615234994-5">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="4615234994-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·250,·SHA:·e835e14a65ef75df0dcc5a0aecfb54be7026daeb6ba470f48cfafbe752ef8762·...·]4-6">)</span><span·class="p">.</span><span·class="w">
2131 </span><span·class="p"·data-group-id="7797582814-7">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="p"·data-group-id="7797582814-8">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·310,·SHA:·1a4af61ea65130e594375dfaeb2e8e3810c58235a6f49cb8c1084a80848fe2ce·...·]4-7">}</span><span·class="gp·unselectable">2131 </span><span·class="p"·data-group-id="4615234994-7">{</span><span·class="ss">namelist</span><span·class="p">,</span><span·class="p"·data-group-id="4615234994-8">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·310,·SHA:·74472447b4dcbf14ad492ec0226593447ab2628d0c83ac2ba5c2f775c618086c·...·]4-7">}</span><span·class="gp·unselectable">
2132 3&gt;·</span><span·class="p"·data-group-id="7797582814-9">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="n">L</span><span·class="p"·data-group-id="7797582814-9">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·[·...·truncated·by·diffoscope;·len:·607,·SHA:·e16ff6e2667420c238226f9e6230bf255541854834b33c812c7e61bf7acc8f3d·...·]4-10">)</span><span·class="p">.</span><span·class="w">2132 3&gt;·</span><span·class="p"·data-group-id="4615234994-9">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="n">L</span><span·class="p"·data-group-id="4615234994-9">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">re</span><span·[·...·truncated·by·diffoscope;·len:·607,·SHA:·0a0df6707dea4ceedfbe0f293b15658b9f73e1aaf1eae0dcd216fabf27b8133f·...·]4-10">)</span><span·class="p">.</span><span·class="w">
2133 </span><span·class="p"·data-group-id="7797582814-13">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="7797582814-14">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·238,·SHA:·8b9195517d525ee3160ef82768e3eb3b06b5863c38e3e21305252c19bc21c79b·...·]4-13">}</span><span·class="gp·unselectable">2133 </span><span·class="p"·data-group-id="4615234994-13">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="4615234994-14">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><spa[·...·truncated·by·diffoscope;·len:·238,·SHA:·b9d8a9a049293c1bf809a0912af396c2797f54df958be9495f06be7c753c19b8·...·]4-13">}</span><span·class="gp·unselectable">
2134 4&gt;·</span><span·class="n">NameMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">zip</span><span·class="p"·data-group-id="7797582814-15">(</span><span·class="n">N</span><span·class="p">,</span><span·class="n">L</span><span·class="p"·data-group-id="7797582814-15">)</span><span·class="p">.</span><span·class="w">2134 4&gt;·</span><span·class="n">NameMap</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">zip</span><span·class="p"·data-group-id="4615234994-15">(</span><span·class="n">N</span><span·class="p">,</span><span·class="n">L</span><span·class="p"·data-group-id="4615234994-15">)</span><span·class="p">.</span><span·class="w">
2135 </span><span·class="p"·data-group-id="7797582814-16">[</span><span·class="p"·data-group-id="7797582814-17">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&qu[·...·truncated·by·diffoscope;·len:·767,·SHA:·7afefd75b0796d859b0724e06e5d0a7a08eeb28d7f8aea6475dcbc816c2d202b·...·]4-16">]</span></code></pre>2135 </span><span·class="p"·data-group-id="4615234994-16">[</span><span·class="p"·data-group-id="4615234994-17">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;A&qu[·...·truncated·by·diffoscope;·len:·767,·SHA:·7a16e24a4a8f1d6d1730e7654eb1452a7d9d79da4f1d483c04389295771916a9·...·]4-16">]</span></code></pre>
2136 ··</section>2136 ··</section>
2137 </section>2137 </section>
2138 <section·class="detail"·id="replace/3">2138 <section·class="detail"·id="replace/3">
  
2139 ··<div·class="detail-header">2139 ··<div·class="detail-header">
2140 ····<a·href="#replace/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2140 ····<a·href="#replace/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2141 ······<i·class="ri-link-m"·aria-hidden="true"></i>2141 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 2224, 24 lines modifiedOffset 2224, 24 lines modified
2224 both·the·regular·expression·and·<code·class="inline">Subject</code>·are·to·specified·as·valid·Unicode2224 both·the·regular·expression·and·<code·class="inline">Subject</code>·are·to·specified·as·valid·Unicode
2225 <code·class="inline">charlist()</code>s.</p><p>If·the·replacement·is·given·as·a·string,·it·can·contain·the·special·character2225 <code·class="inline">charlist()</code>s.</p><p>If·the·replacement·is·given·as·a·string,·it·can·contain·the·special·character
2226 <code·class="inline">&amp;</code>,·which·inserts·the·whole·matching·expression·in·the·result,·and·the·special2226 <code·class="inline">&amp;</code>,·which·inserts·the·whole·matching·expression·in·the·result,·and·the·special
2227 sequence·<code·class="inline">\</code>N·(where·N·is·an·integer·&gt;·0),·<code·class="inline">\g</code>N,·or·<code·class="inline">\g{</code>N<code·class="inline">}</code>,·resulting·in·the2227 sequence·<code·class="inline">\</code>N·(where·N·is·an·integer·&gt;·0),·<code·class="inline">\g</code>N,·or·<code·class="inline">\g{</code>N<code·class="inline">}</code>,·resulting·in·the
2228 subexpression·number·N,·is·inserted·in·the·result.·If·no·subexpression·with·that2228 subexpression·number·N,·is·inserted·in·the·result.·If·no·subexpression·with·that
2229 number·is·generated·by·the·regular·expression,·nothing·is·inserted.</p><p>To·insert·an·&amp;·or·a·\·in·the·result,·precede·it·with·a·\.·Notice·that·Erlang2229 number·is·generated·by·the·regular·expression,·nothing·is·inserted.</p><p>To·insert·an·&amp;·or·a·\·in·the·result,·precede·it·with·a·\.·Notice·that·Erlang
2230 already·gives·a·special·meaning·to·\·in·literal·strings,·so·a·single·\·must·be2230 already·gives·a·special·meaning·to·\·in·literal·strings,·so·a·single·\·must·be
2231 written·as·<code·class="inline">&quot;\\&quot;</code>·and·therefore·a·double·\·as·<code·class="inline">&quot;\\\\&quot;</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">replace</span><span·class="p"·data-group-id="3317834580-1">(</span><span·class="s">&quot;abcd&quot;</span><span·class="p">,</span><span·class="s">&quot;c&quot;</span><span·class="p">,</span><span·class="s">&quot;[&amp;]&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3317834580-2">[</span><span·class="p"·data-group-id="3317834580-3">{</span><span·class="ss">return</span><span·class="p">,</span><span·class="ss">list</span><span·class="p"·data-group-id="3317834580-3">}</span><span·class="p"·data-group-id="3317834580-2">]</span><span·class="p"·data-group-id="3317834580-1">)</span><span·class="p">.</span><span·class="w"> 
2232 </span><span·class="s">&quot;ab[c]d&quot;</span></code></pre><p>while</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">replace</span><span·class[·...·truncated·by·diffoscope;·len:·568,·SHA:·73508fae8912b6825756c2aa0660f6b316973f845c6c77493fd8ba15d6afb640·...·]-1">)</span><span·class="p">.</span><span·class="w">2231 written·as·<code·class="inline">&quot;\\&quot;</code>·and·therefore·a·double·\·as·<code·class="inline">&quot;\\\\&quot;</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·clas[·...·truncated·by·diffoscope;·len:·648,·SHA:·c8bfc63e79571607acd09e049bf7150ebbc1ca3bfc39902b19d6824c85d879da·...·]-1">)</span><span·class="p">.</span><span·class="w">
 2232 </span><span·class="s">&quot;ab[c]d&quot;</span></code></pre><p>while</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">replace</span><span·class="p"·data-group-id="1672786791-1">(</span><span·class="s">&quot;abcd&quot;</span><span·class="p">,</span><span·class="s">&quot;c&quot;</span><span·class="p">,</span><span·class="s">&quot;[\\&amp;]&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1672786791-2">[</span><span·class="p"·data-group-id="1672786791-3">{</span><span·class="ss">return</span><span·class="p">,</span><span·class="ss">list</span><span·class="p"·data-group-id="1672786791-3">}</span><span·class="p"·data-group-id="1672786791-2">]</span><span·class="p"·data-group-id="1672786791-1">)</span><span·class="p">.</span><span·class="w">
2233 </span><span·class="s">&quot;ab[&amp;]d&quot;</span></code></pre><p>If·the·replacement·is·given·as·a·fun,·it·will·be·called·with·the·whole·matching2233 </span><span·class="s">&quot;ab[&amp;]d&quot;</span></code></pre><p>If·the·replacement·is·given·as·a·fun,·it·will·be·called·with·the·whole·matching
2234 expression·as·the·first·argument·and·a·list·of·subexpression·matches·in·the2234 expression·as·the·first·argument·and·a·list·of·subexpression·matches·in·the
2235 order·in·which·they·appear·in·the·regular·expression.·The·returned·value·will·be2235 order·in·which·they·appear·in·the·regular·expression.·The·returned·value·will·be
2236 inserted·in·the·result.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">replace</span><span·class="p"·data-group-id="5598508074-1">(</span><span·class="s">&quot;abcd&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.(.)&quot;</span><span·class="p">,</span><span·class="w">2236 inserted·in·the·result.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">replace</span><span·class="p"·data-group-id="7591769195-1">(</span><span·class="s">&quot;abcd&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.(.)&quot;</span><span·class="p">,</span><span·class="w">
2237 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="5598508074-2">(</span><span·class="n">Whole</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5598508074-3">[</span><span·class="p">&lt;&lt;</span><span·class="n">C</span><span·class="p">&gt;&gt;</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·75,·SHA:·f40d02c61d693720e07a41d3405a33644f95d7253998acf38142ca2c2ac5498f·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">2237 ····</span><span·class="nf">fun</span><span·class="p"·data-group-id="7591769195-2">(</span><span·class="n">Whole</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7591769195-3">[</span><span·class="p">&lt;&lt;</span><span·class="n">C</span><span·class="p">&gt;&gt;</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·75,·SHA:·98fff112edf74531cbe4322a125322dceefc61e44eee989fbe6e08e426ced7ac·...·]-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
2238 ·········</span><span·class="p">&lt;&lt;</span><span·class="sc">$#</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Whole</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$-</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5598508074-4">(</span><span·class="n">C</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="sc">$a</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="sc">$A</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·28f03b7a5b92f6785dd94f957ff5baba2d41915de1ec86849674d680ef138c5b·...·]-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$#</span><span·class="p">&gt;&gt;</span><span·class="w">2238 ·········</span><span·class="p">&lt;&lt;</span><span·class="sc">$#</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Whole</span><span·class="o">/</span><span·class="ss">binary</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$-</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7591769195-4">(</span><span·class="n">C</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="sc">$a</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="sc">$A</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·ff3bb1aebf3a386d705125bd4b4a3c93edcb315b6d968b6a7ef03b97d06d944a·...·]-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="sc">$#</span><span·class="p">&gt;&gt;</span><span·class="w">
2239 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">2239 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
2240 ····</span><span·class="p"·data-group-id="5598508074-5">[</span><span·class="p"·data-group-id="5598508074-6">{</span><span·class="ss">return</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">list</span><span·class="p"·data-group-id="5598508074-6">}</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·ef4dd3c5c0f558c4ffbdfa2dae1664f41ee8a12e1fe3bbdb1db8409fd18d3513·...·]-1">)</span><span·class="p">.</span><span·class="w">2240 ····</span><span·class="p"·data-group-id="7591769195-5">[</span><span·class="p"·data-group-id="7591769195-6">{</span><span·class="ss">return</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">list</span><span·class="p"·data-group-id="7591769195-6">}</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·72,·SHA:·65cc4396ab357c88ccff105260102ae8e3466d768d9b74298c401cb4f88c1ed4·...·]-1">)</span><span·class="p">.</span><span·class="w">
2241 </span><span·class="s">&quot;#ab-B#cd&quot;</span></code></pre><blockquote><h4·class="info">Note</h4><p>Non-matching·optional·subexpressions·will·not·be·included·in·the·list·of2241 </span><span·class="s">&quot;#ab-B#cd&quot;</span></code></pre><blockquote><h4·class="info">Note</h4><p>Non-matching·optional·subexpressions·will·not·be·included·in·the·list·of
2242 subexpression·matches·if·they·are·the·last·subexpressions·in·the·regular2242 subexpression·matches·if·they·are·the·last·subexpressions·in·the·regular
2243 expression.</p><p><em>Example:</em></p><p>The·regular·expression·<code·class="inline">&quot;(a)(b)?(c)?&quot;</code>·(&quot;a&quot;,·optionally·followed·by·&quot;b&quot;,2243 expression.</p><p><em>Example:</em></p><p>The·regular·expression·<code·class="inline">&quot;(a)(b)?(c)?&quot;</code>·(&quot;a&quot;,·optionally·followed·by·&quot;b&quot;,
2244 optionally·followed·by·&quot;c&quot;)·will·create·the·following·subexpression·lists:</p><ul><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;,·&lt;&lt;&quot;b&quot;&gt;&gt;,·&lt;&lt;&quot;c&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;abc&quot;</code></li><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;,·&lt;&lt;&gt;&gt;,·&lt;&lt;&quot;c&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;acx&quot;</code></li><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;,·&lt;&lt;&quot;b&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;abx&quot;</code></li><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;axx&quot;</code></li></ul></blockquote><p>As·with·<a·href="#run/3"><code·class="inline">run/3</code></a>,·compilation·errors·raise·the·<code·class="inline">badarg</code>·exception.2244 optionally·followed·by·&quot;c&quot;)·will·create·the·following·subexpression·lists:</p><ul><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;,·&lt;&lt;&quot;b&quot;&gt;&gt;,·&lt;&lt;&quot;c&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;abc&quot;</code></li><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;,·&lt;&lt;&gt;&gt;,·&lt;&lt;&quot;c&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;acx&quot;</code></li><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;,·&lt;&lt;&quot;b&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;abx&quot;</code></li><li><code·class="inline">[&lt;&lt;&quot;a&quot;&gt;&gt;]</code>·when·applied·to·the·string·<code·class="inline">&quot;axx&quot;</code></li></ul></blockquote><p>As·with·<a·href="#run/3"><code·class="inline">run/3</code></a>,·compilation·errors·raise·the·<code·class="inline">badarg</code>·exception.
2245 <a·href="#compile/2"><code·class="inline">compile/2</code></a>·can·be·used·to·get·more·information·about·the·error.</p>2245 <a·href="#compile/2"><code·class="inline">compile/2</code></a>·can·be·used·to·get·more·information·about·the·error.</p>
2246 ··</section>2246 ··</section>
2247 </section>2247 </section>
Offset 2350, 27 lines modifiedOffset 2350, 27 lines modified
2350 any·matching·subexpressions·(or·as·specified·by·option·<code·class="inline">capture</code>.·The2350 any·matching·subexpressions·(or·as·specified·by·option·<code·class="inline">capture</code>.·The
2351 <code·class="inline">Captured</code>·part·of·the·return·value·is·hence·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a>·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a>s·when2351 <code·class="inline">Captured</code>·part·of·the·return·value·is·hence·a·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a>·of·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:list/0"><code·class="inline">list/0</code></a>s·when
2352 this·option·is·specified.</p><p>The·interaction·of·option·<code·class="inline">global</code>·with·a·regular·expression·that·matches·an2352 this·option·is·specified.</p><p>The·interaction·of·option·<code·class="inline">global</code>·with·a·regular·expression·that·matches·an
2353 empty·string·surprises·some·users.·When·option·<code·class="inline">global</code>·is·specified,2353 empty·string·surprises·some·users.·When·option·<code·class="inline">global</code>·is·specified,
2354 <a·href="#run/3"><code·class="inline">run/3</code></a>·handles·empty·matches·in·the·same·way·as·Perl:·a2354 <a·href="#run/3"><code·class="inline">run/3</code></a>·handles·empty·matches·in·the·same·way·as·Perl:·a
2355 zero-length·match·at·any·point·is·also·retried·with·options2355 zero-length·match·at·any·point·is·also·retried·with·options
2356 <code·class="inline">[anchored,·notempty_atstart]</code>.·If·that·search·gives·a·result·of·length·&gt;·0,2356 <code·class="inline">[anchored,·notempty_atstart]</code>.·If·that·search·gives·a·result·of·length·&gt;·0,
2357 the·result·is·included.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="8909576829-1">(</span><span·class="s">&quot;cat&quot;</span><span·class="p">,</span><span·class="s">&quot;(|at)&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8909576829-2">[</span><span·class="ss">global</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·69,·SHA:·632f95676bcd1e6848998ef0bdb0b1de7964dc487cbb481d755e8450ae470645·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·following·matchings·are·performed:</p><ul><li><p><strong>At·offset·<code·class="inline">0</code></strong>·-·The·regular·expression·<code·class="inline">(|at)</code>·first·match·at·the2357 the·result·is·included.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="1970220546-1">(</span><span·class="s">&quot;cat&quot;</span><span·class="p">,</span><span·class="s">&quot;(|at)&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1970220546-2">[</span><span·class="ss">global</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·69,·SHA:·828b878c7e5c7e4dd48231d73d414d5759f85406235d469c9c8c645548edb624·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·following·matchings·are·performed:</p><ul><li><p><strong>At·offset·<code·class="inline">0</code></strong>·-·The·regular·expression·<code·class="inline">(|at)</code>·first·match·at·the
2358 initial·position·of·string·<code·class="inline">cat</code>,·giving·the·result·set·<code·class="inline">[{0,0},{0,0}]</code>·(the2358 initial·position·of·string·<code·class="inline">cat</code>,·giving·the·result·set·<code·class="inline">[{0,0},{0,0}]</code>·(the
2359 second·<code·class="inline">{0,0}</code>·is·because·of·the·subexpression·marked·by·the·parentheses).2359 second·<code·class="inline">{0,0}</code>·is·because·of·the·subexpression·marked·by·the·parentheses).
2360 As·the·length·of·the·match·is·0,·we·do·not·advance·to·the·next·position·yet.</p></li><li><p><strong>At·offset·<code·class="inline">0</code>·with·<code·class="inline">[anchored,·notempty_atstart]</code></strong>·-·The·search·is2360 As·the·length·of·the·match·is·0,·we·do·not·advance·to·the·next·position·yet.</p></li><li><p><strong>At·offset·<code·class="inline">0</code>·with·<code·class="inline">[anchored,·notempty_atstart]</code></strong>·-·The·search·is
2361 retried·with·options·<code·class="inline">[anchored,·notempty_atstart]</code>·at·the·same·position,2361 retried·with·options·<code·class="inline">[anchored,·notempty_atstart]</code>·at·the·same·position,
2362 which·does·not·give·any·interesting·result·of·longer·length,·so·the·search2362 which·does·not·give·any·interesting·result·of·longer·length,·so·the·search
2363 position·is·advanced·to·the·next·character·(<code·class="inline">a</code>).</p></li><li><p><strong>At·offset·<code·class="inline">1</code></strong>·-·The·search·results·in·<code·class="inline">[{1,0},{1,0}]</code>,·so·this·search·is2363 position·is·advanced·to·the·next·character·(<code·class="inline">a</code>).</p></li><li><p><strong>At·offset·<code·class="inline">1</code></strong>·-·The·search·results·in·<code·class="inline">[{1,0},{1,0}]</code>,·so·this·search·is
2364 also·repeated·with·the·extra·options.</p></li><li><p><strong>At·offset·<code·class="inline">1</code>·with·<code·class="inline">[anchored,·notempty_atstart]</code></strong>·-·Alternative·<code·class="inline">ab</code>·is2364 also·repeated·with·the·extra·options.</p></li><li><p><strong>At·offset·<code·class="inline">1</code>·with·<code·class="inline">[anchored,·notempty_atstart]</code></strong>·-·Alternative·<code·class="inline">ab</code>·is
2365 found·and·the·result·is·[{1,2},{1,2}].·The·result·is·added·to·the·list2365 found·and·the·result·is·[{1,2},{1,2}].·The·result·is·added·to·the·list
2366 of·results·and·the·position·in·the·search·string·is·advanced·two·steps.</p></li><li><p><strong>At·offset·<code·class="inline">3</code></strong>·-·The·search·once·again·matches·the·empty·string,·giving2366 of·results·and·the·position·in·the·search·string·is·advanced·two·steps.</p></li><li><p><strong>At·offset·<code·class="inline">3</code></strong>·-·The·search·once·again·matches·the·empty·string,·giving
2367 <code·class="inline">[{3,0},{3,0}]</code>.</p></li><li><p><strong>At·offset·<code·class="inline">1</code>·with·<code·class="inline">[anchored,·notempty_atstart]</code></strong>·-·This·gives·no·result2367 <code·class="inline">[{3,0},{3,0}]</code>.</p></li><li><p><strong>At·offset·<code·class="inline">1</code>·with·<code·class="inline">[anchored,·notempty_atstart]</code></strong>·-·This·gives·no·result
2368 of·length·&gt;·0·and·we·are·at·the·last·position,·so·the·global·search·is2368 of·length·&gt;·0·and·we·are·at·the·last·position,·so·the·global·search·is
2369 complete.</p></li></ul><p>The·result·of·the·call·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3490082187-1">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="3490082187-2">[</span><span·class="p"·data-group-id="3490082187-3">[</span><span·class="p"·data-group-id="3490082187-4">{</span><span·class="mi">0</sp[·...·truncated·by·diffoscope;·len:·2008,·SHA:·f04c2384bdcdedbfff8d71210a56b3c9ef83f05b48c648eae5bf79996d5f2527·...·]-1">}</span></code></pre></li><li><p><strong><code·class="inline">notempty</code></strong>·-·An·empty·string·is·not·considered·to·be·a·valid·match·if·this2369 complete.</p></li></ul><p>The·result·of·the·call·is:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9601406956-1">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="9601406956-2">[</span><span·class="p"·data-group-id="9601406956-3">[</span><span·class="p"·data-group-id="9601406956-4">{</span><span·class="mi">0</sp[·...·truncated·by·diffoscope;·len:·2008,·SHA:·7e297c852b0e544d21fd01d4ef472a110c06c4b09235a9cb7a81a81654b611dc·...·]-1">}</span></code></pre></li><li><p><strong><code·class="inline">notempty</code></strong>·-·An·empty·string·is·not·considered·to·be·a·valid·match·if·this
2370 option·is·specified.·If·alternatives·in·the·pattern·exist,·they·are·tried.·If2370 option·is·specified.·If·alternatives·in·the·pattern·exist,·they·are·tried.·If
2371 all·the·alternatives·match·the·empty·string,·the·entire·match·fails.</p><p><em>Example:</em></p><p>If·the·following·pattern·is·applied·to·a·string·not·beginning·with·&quot;a&quot;·or·&quot;b&quot;,2371 all·the·alternatives·match·the·empty·string,·the·entire·match·fails.</p><p><em>Example:</em></p><p>If·the·following·pattern·is·applied·to·a·string·not·beginning·with·&quot;a&quot;·or·&quot;b&quot;,
2372 it·would·normally·match·the·empty·string·at·the·start·of·the·subject:</p><pre><code·class="text">a?b?</code></pre><p>With·option·<code·class="inline">notempty</code>,·this·match·is·invalid,·so·<a·href="#run/3"><code·class="inline">run/3</code></a>·searches2372 it·would·normally·match·the·empty·string·at·the·start·of·the·subject:</p><pre><code·class="text">a?b?</code></pre><p>With·option·<code·class="inline">notempty</code>,·this·match·is·invalid,·so·<a·href="#run/3"><code·class="inline">run/3</code></a>·searches
2373 further·into·the·string·for·occurrences·of·&quot;a&quot;·or·&quot;b&quot;.</p></li><li><p><strong><code·class="inline">notempty_atstart</code></strong>·-·Like·<code·class="inline">notempty</code>,·except·that·an·empty·string·match2373 further·into·the·string·for·occurrences·of·&quot;a&quot;·or·&quot;b&quot;.</p></li><li><p><strong><code·class="inline">notempty_atstart</code></strong>·-·Like·<code·class="inline">notempty</code>,·except·that·an·empty·string·match
2374 that·is·not·at·the·start·of·the·subject·is·permitted.·If·the·pattern·is2374 that·is·not·at·the·start·of·the·subject·is·permitted.·If·the·pattern·is
2375 anchored,·such·a·match·can·occur·only·if·the·pattern·contains·\K.</p><p>Perl·has·no·direct·equivalent·of·<code·class="inline">notempty</code>·or·<code·class="inline">notempty_atstart</code>,·but·it·does2375 anchored,·such·a·match·can·occur·only·if·the·pattern·contains·\K.</p><p>Perl·has·no·direct·equivalent·of·<code·class="inline">notempty</code>·or·<code·class="inline">notempty_atstart</code>,·but·it·does
2376 make·a·special·case·of·a·pattern·match·of·the·empty·string·within·its·split()2376 make·a·special·case·of·a·pattern·match·of·the·empty·string·within·its·split()
Offset 2433, 20 lines modifiedOffset 2433, 20 lines modified
2433 than·the·total·number·of·calls,·because·not·all·calls·to·match()·are2433 than·the·total·number·of·calls,·because·not·all·calls·to·match()·are
2434 recursive.·This·limit·is·of·use·only·if·it·is·set·smaller·than2434 recursive.·This·limit·is·of·use·only·if·it·is·set·smaller·than
2435 match_limit.</p><p>Limiting·the·recursion·depth·limits·the·amount·of·machine·stack·that2435 match_limit.</p><p>Limiting·the·recursion·depth·limits·the·amount·of·machine·stack·that
2436 can·be·used,·or,·when·PCRE·has·been·compiled·to·use·memory·on·the·heap2436 can·be·used,·or,·when·PCRE·has·been·compiled·to·use·memory·on·the·heap
2437 instead·of·the·stack,·the·amount·of·heap·memory·that·can·be·used.</p></blockquote><p>The·Erlang·VM·uses·a·PCRE·library·where·heap·memory·is·used·when·regular2437 instead·of·the·stack,·the·amount·of·heap·memory·that·can·be·used.</p></blockquote><p>The·Erlang·VM·uses·a·PCRE·library·where·heap·memory·is·used·when·regular
2438 expression·match·recursion·occurs.·This·therefore·limits·the·use·of·machine2438 expression·match·recursion·occurs.·This·therefore·limits·the·use·of·machine
2439 heap,·not·C·stack.</p><p>Specifying·a·lower·value·can·result·in·matches·with·deep·recursion·failing,2439 heap,·not·C·stack.</p><p>Specifying·a·lower·value·can·result·in·matches·with·deep·recursion·failing,
2440 when·they·should·have·matched:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="3257391176-1">(</span><span·class="s">&quot;aaaaaaaaaaaaaz&quot;</span><span·class="p">,</span><span·class="s">&quot;(a+)*z&quot;</span><span·class="p"·data-group-id="3257391176-1">)</span><span·class="p">.</span><span·class="w">2440 when·they·should·have·matched:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="0698469659-1">(</span><span·class="s">&quot;aaaaaaaaaaaaaz&quot;</span><span·class="p">,</span><span·class="s">&quot;(a+)*z&quot;</span><span·class="p"·data-group-id="0698469659-1">)</span><span·class="p">.</span><span·class="w">
2441 </span><span·class="p"·data-group-id="3257391176-2">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="3257391176-3">[</span><span·class="p"·data-group-id="3257391176-4">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">14</span>[·...·truncated·by·diffoscope;·len:·352,·SHA:·158e80c6f81c328d1a19c67b28ff8e2968e221e31538476e47fc048c0460bd2a·...·]-2">}</span><span·class="gp·unselectable">2441 </span><span·class="p"·data-group-id="0698469659-2">{</span><span·class="ss">match</span><span·class="p">,</span><span·class="p"·data-group-id="0698469659-3">[</span><span·class="p"·data-group-id="0698469659-4">{</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">14</span>[·...·truncated·by·diffoscope;·len:·352,·SHA:·e7c783ba9724cf6e3bdc9af8910749e7034557dcec8e41d41f7ba0cf1313d4ed·...·]-2">}</span><span·class="gp·unselectable">
2442 2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="3257391176-6">(</span><span·class="s">&quot;aaaaaaaaaaaaaz&quot;</span><span·class="p">,</span><span·class="s">&quot;(a+)*z&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3257391176-7">[</span><span·class="p"·data-group-id="3257391176-8[·...·truncated·by·diffoscope;·len:·251,·SHA:·ed7c4c6d026c6848840f140130f8b50c675fa528c2e8f2fdf24e555beab33836·...·]-6">)</span><span·class="p">.</span><span·class="w">2442 2&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="0698469659-6">(</span><span·class="s">&quot;aaaaaaaaaaaaaz&quot;</span><span·class="p">,</span><span·class="s">&quot;(a+)*z&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="0698469659-7">[</span><span·class="p"·data-group-id="0698469659-8[·...·truncated·by·diffoscope;·len:·251,·SHA:·f87c5fe35b7e2332a83deaa224f368f2814a5ab2959dc203ab2c54f95bc9ed01·...·]-6">)</span><span·class="p">.</span><span·class="w">
2443 </span><span·class="ss">nomatch</span><span·class="gp·unselectable">2443 </span><span·class="ss">nomatch</span><span·class="gp·unselectable">
2444 3&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="3257391176-9">(</span><span·class="s">&quot;aaaaaaaaaaaaaz&quot;</span><span·class="p">,</span><span·class="s">&quot;(a+)*z&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="3257391176-10">[</span><span·class="p"·data-group-id="3257391176-[·...·truncated·by·diffoscope;·len:·316,·SHA:·6b4b126a403f8f09a69f6314f590d1590677662e3a3fece38e38086981e478cc·...·]-9">)</span><span·class="p">.</span><span·class="w">2444 3&gt;·</span><span·class="nc">re</span><span·class="p">:</span><span·class="nf">run</span><span·class="p"·data-group-id="0698469659-9">(</span><span·class="s">&quot;aaaaaaaaaaaaaz&quot;</span><span·class="p">,</span><span·class="s">&quot;(a+)*z&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="0698469659-10">[</span><span·class="p"·data-group-id="0698469659-[·...·truncated·by·diffoscope;·len:·316,·SHA:·60fa688e453fb78a32fc3efe080148f06cccccefd82b4d3c62e3d5b5ad8db526·...·]-9">)</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 51232/110175 bytes (46.50%) of diff not shown.
630 B
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-FDA2E906.js"></script>124 <script·src="dist/search_data-0EFEC9CF.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
7.08 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/sets.html
    
Offset 152, 19 lines modifiedOffset 152, 19 lines modified
152 <p>The·following·functions·in·this·module·also·exist·and·provide·the·same152 <p>The·following·functions·in·this·module·also·exist·and·provide·the·same
153 functionality·in·the·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>·and·<a·href="ordsets.html"><code·class="inline">ordsets</code></a>·modules.·That·is,·by·only153 functionality·in·the·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>·and·<a·href="ordsets.html"><code·class="inline">ordsets</code></a>·modules.·That·is,·by·only
154 changing·the·module·name·for·each·call,·you·can·try·out·different·set154 changing·the·module·name·for·each·call,·you·can·try·out·different·set
155 representations.</p><ul><li><a·href="#add_element/2"><code·class="inline">add_element/2</code></a></li><li><a·href="#del_element/2"><code·class="inline">del_element/2</code></a></li><li><a·href="#filter/2"><code·class="inline">filter/2</code></a></li><li><a·href="#filtermap/2"><code·class="inline">filtermap/2</code></a></li><li><a·href="#fold/3"><code·class="inline">fold/3</code></a></li><li><a·href="#from_list/1"><code·class="inline">from_list/1</code></a></li><li><a·href="#intersection/1"><code·class="inline">intersection/1</code></a></li><li><a·href="#intersection/2"><code·class="inline">intersection/2</code></a></li><li><a·href="#is_element/2"><code·class="inline">is_element/2</code></a></li><li><a·href="#is_empty/1"><code·class="inline">is_empty/1</code></a></li><li><a·href="#is_equal/2"><code·class="inline">is_equal/2</code></a></li><li><a·href="#is_set/1"><code·class="inline">is_set/1</code></a></li><li><a·href="#is_subset/2"><code·class="inline">is_subset/2</code></a></li><li><a·href="#map/2"><code·class="inline">map/2</code></a></li><li><a·href="#new/0"><code·class="inline">new/0</code></a></li><li><a·href="#size/1"><code·class="inline">size/1</code></a></li><li><a·href="#subtract/2"><code·class="inline">subtract/2</code></a></li><li><a·href="#to_list/1"><code·class="inline">to_list/1</code></a></li><li><a·href="#union/1"><code·class="inline">union/1</code></a></li><li><a·href="#union/2"><code·class="inline">union/2</code></a></li></ul><blockquote><h4·class="info">Note</h4><p>While·the·three·set·implementations·offer·the·same·<em>functionality</em>·with155 representations.</p><ul><li><a·href="#add_element/2"><code·class="inline">add_element/2</code></a></li><li><a·href="#del_element/2"><code·class="inline">del_element/2</code></a></li><li><a·href="#filter/2"><code·class="inline">filter/2</code></a></li><li><a·href="#filtermap/2"><code·class="inline">filtermap/2</code></a></li><li><a·href="#fold/3"><code·class="inline">fold/3</code></a></li><li><a·href="#from_list/1"><code·class="inline">from_list/1</code></a></li><li><a·href="#intersection/1"><code·class="inline">intersection/1</code></a></li><li><a·href="#intersection/2"><code·class="inline">intersection/2</code></a></li><li><a·href="#is_element/2"><code·class="inline">is_element/2</code></a></li><li><a·href="#is_empty/1"><code·class="inline">is_empty/1</code></a></li><li><a·href="#is_equal/2"><code·class="inline">is_equal/2</code></a></li><li><a·href="#is_set/1"><code·class="inline">is_set/1</code></a></li><li><a·href="#is_subset/2"><code·class="inline">is_subset/2</code></a></li><li><a·href="#map/2"><code·class="inline">map/2</code></a></li><li><a·href="#new/0"><code·class="inline">new/0</code></a></li><li><a·href="#size/1"><code·class="inline">size/1</code></a></li><li><a·href="#subtract/2"><code·class="inline">subtract/2</code></a></li><li><a·href="#to_list/1"><code·class="inline">to_list/1</code></a></li><li><a·href="#union/1"><code·class="inline">union/1</code></a></li><li><a·href="#union/2"><code·class="inline">union/2</code></a></li></ul><blockquote><h4·class="info">Note</h4><p>While·the·three·set·implementations·offer·the·same·<em>functionality</em>·with
156 respect·to·the·aforementioned·functions,·their·overall·<em>behavior</em>·may·differ.156 respect·to·the·aforementioned·functions,·their·overall·<em>behavior</em>·may·differ.
157 As·mentioned,·this·module·considers·elements·as·different·if·and·only·if·they157 As·mentioned,·this·module·considers·elements·as·different·if·and·only·if·they
158 do·not·match·(<code·class="inline">=:=</code>),·while·both·<a·href="ordsets.html"><code·class="inline">ordsets</code></a>·and·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>·consider·elements158 do·not·match·(<code·class="inline">=:=</code>),·while·both·<a·href="ordsets.html"><code·class="inline">ordsets</code></a>·and·<a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>·consider·elements
159 as·different·if·and·only·if·they·do·not·compare·equal·(<code·class="inline">==</code>).</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">is_element</span><span·class="p"·data-group-id="7754797904-1">(</span><span·class="mf">1.0</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="7754797904-2">(</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·204,·SHA:·642c1061eb811aae7efaf616d23eaa0cdfb7afe6144bc7364582a7ebe8fc9a65·...·]-1">)</span><span·class="p">.</span><span·class="w">159 as·different·if·and·only·if·they·do·not·compare·equal·(<code·class="inline">==</code>).</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">is_element</span><span·class="p"·data-group-id="8169709085-1">(</span><span·class="mf">1.0</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">sets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="8169709085-2">(</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·204,·SHA:·d5c52bf8ef0fa06b66f8b3027f41d1476762faf66c928a0341f6a697104cdcef·...·]-1">)</span><span·class="p">.</span><span·class="w">
160 </span><span·class="ss">false</span><span·class="gp·unselectable">160 </span><span·class="ss">false</span><span·class="gp·unselectable">
161 2&gt;·</span><span·class="nc">ordsets</span><span·class="p">:</span><span·class="nf">is_element</span><span·class="p"·data-group-id="7754797904-4">(</span><span·class="mf">1.0</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ordsets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="7754797904-5">(</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·207,·SHA:·c0d56140459836949bce693c4d2020da800636d49e573704282467f883f7822a·...·]-4">)</span><span·class="p">.</span><span·class="w">161 2&gt;·</span><span·class="nc">ordsets</span><span·class="p">:</span><span·class="nf">is_element</span><span·class="p"·data-group-id="8169709085-4">(</span><span·class="mf">1.0</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">ordsets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="8169709085-5">(</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·207,·SHA:·52fe1db915e61b1fe1027cdbcf66a027d7c65d6e6ed8cd752c40fad9d0df4243·...·]-4">)</span><span·class="p">.</span><span·class="w">
162 </span><span·class="ss">true</span><span·class="gp·unselectable">162 </span><span·class="ss">true</span><span·class="gp·unselectable">
163 2&gt;·</span><span·class="nc">gb_sets</span><span·class="p">:</span><span·class="nf">is_element</span><span·class="p"·data-group-id="7754797904-7">(</span><span·class="mf">1.0</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">gb_sets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="7754797904-8">(</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·207,·SHA:·e95c682f46350eaba3f3acbd0791a0e669e9f5cf88c8af24fa8452414d3e5eb6·...·]-7">)</span><span·class="p">.</span><span·class="w">163 2&gt;·</span><span·class="nc">gb_sets</span><span·class="p">:</span><span·class="nf">is_element</span><span·class="p"·data-group-id="8169709085-7">(</span><span·class="mf">1.0</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">gb_sets</span><span·class="p">:</span><span·class="nf">from_list</span><span·class="p"·data-group-id="8169709085-8">(</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·207,·SHA:·107399ff92a6beb735359fcf933b52aacae54bfa16a869c75a4defd90ac86c48·...·]-7">)</span><span·class="p">.</span><span·class="w">
164 </span><span·class="ss">true</span></code></pre></blockquote><h2·id="module-see-also"·class="section-heading">164 </span><span·class="ss">true</span></code></pre></blockquote><h2·id="module-see-also"·class="section-heading">
165 ··<a·href="#module-see-also"·class="hover-link">165 ··<a·href="#module-see-also"·class="hover-link">
166 ····<i·class="ri-link-m"·aria-hidden="true"></i>166 ····<i·class="ri-link-m"·aria-hidden="true"></i>
167 ··</a>167 ··</a>
168 ··<span·class="text">See·Also</span>168 ··<span·class="text">See·Also</span>
169 </h2>169 </h2>
170 <p><a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>,·<a·href="ordsets.html"><code·class="inline">ordsets</code></a></p>170 <p><a·href="gb_sets.html"><code·class="inline">gb_sets</code></a>,·<a·href="ordsets.html"><code·class="inline">ordsets</code></a></p>
73.1 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/shell.html
    
Offset 162, 15 lines modifiedOffset 162, 15 lines modified
162 used·by·the·compiler·are·unavailable·at·runtime.·So,·to·read·the·record·syntax162 used·by·the·compiler·are·unavailable·at·runtime.·So,·to·read·the·record·syntax
163 and·print·tuples·as·records·when·possible,·record·definitions·must·be·maintained163 and·print·tuples·as·records·when·possible,·record·definitions·must·be·maintained
164 by·the·shell·itself.</p><p>The·shell·commands·for·reading,·defining,·forgetting,·listing,·and·printing164 by·the·shell·itself.</p><p>The·shell·commands·for·reading,·defining,·forgetting,·listing,·and·printing
165 records·are·described·below.·Notice·that·each·job·has·its·own·set·of·record165 records·are·described·below.·Notice·that·each·job·has·its·own·set·of·record
166 definitions.·To·facilitate·matters,·record·definitions·in·modules166 definitions.·To·facilitate·matters,·record·definitions·in·modules
167 <code·class="inline">shell_default</code>·and·<code·class="inline">user_default</code>·(if·loaded)·are·read·each·time·a·new·job·is167 <code·class="inline">shell_default</code>·and·<code·class="inline">user_default</code>·(if·loaded)·are·read·each·time·a·new·job·is
168 started.·For·example,·adding·the·following·line·to·<code·class="inline">user_default</code>·makes·the168 started.·For·example,·adding·the·following·line·to·<code·class="inline">user_default</code>·makes·the
169 definition·of·<code·class="inline">file_info</code>·readily·available·in·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="8461554107-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="8461554107-1">)</span><span·class="p">.</span></code></pre><p>The·shell·runs·in·two·modes:</p><ul><li><code·class="inline">Normal·(possibly·restricted)</code>·mode,·in·which·commands·can·be·edited·and169 definition·of·<code·class="inline">file_info</code>·readily·available·in·the·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include_lib</span><span·class="p"·data-group-id="0975799448-1">(</span><span·class="s">&quot;kernel/include/file.hrl&quot;</span><span·class="p"·data-group-id="0975799448-1">)</span><span·class="p">.</span></code></pre><p>The·shell·runs·in·two·modes:</p><ul><li><code·class="inline">Normal·(possibly·restricted)</code>·mode,·in·which·commands·can·be·edited·and
170 expressions·evaluated</li><li>Job·Control·Mode,·<code·class="inline">JCL</code>,·in·which·jobs·can·be·started,·killed,·detached,·and170 expressions·evaluated</li><li>Job·Control·Mode,·<code·class="inline">JCL</code>,·in·which·jobs·can·be·started,·killed,·detached,·and
171 connected</li></ul><p>Only·the·currently·connected·job·can·'talk'·to·the·shell.</p><h2·id="module-shell-commands"·class="section-heading">171 connected</li></ul><p>Only·the·currently·connected·job·can·'talk'·to·the·shell.</p><h2·id="module-shell-commands"·class="section-heading">
172 ··<a·href="#module-shell-commands"·class="hover-link">172 ··<a·href="#module-shell-commands"·class="hover-link">
173 ····<i·class="ri-link-m"·aria-hidden="true"></i>173 ····<i·class="ri-link-m"·aria-hidden="true"></i>
174 ··</a>174 ··</a>
175 ··<span·class="text">Shell·Commands</span>175 ··<span·class="text">Shell·Commands</span>
176 </h2>176 </h2>
Offset 230, 114 lines modifiedOffset 230, 114 lines modified
230 ··<a·href="#module-example"·class="hover-link">230 ··<a·href="#module-example"·class="hover-link">
231 ····<i·class="ri-link-m"·aria-hidden="true"></i>231 ····<i·class="ri-link-m"·aria-hidden="true"></i>
232 ··</a>232 ··</a>
233 ··<span·class="text">Example</span>233 ··<span·class="text">Example</span>
234 </h2>234 </h2>
235 <p>The·following·example·is·a·long·dialog·with·the·shell.·Commands·starting·with235 <p>The·following·example·is·a·long·dialog·with·the·shell.·Commands·starting·with
236 <code·class="inline">&gt;</code>·are·inputs·to·the·shell.·All·other·lines·are·output·from·the·shell.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">strider</span><span·class="w">·</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">236 <code·class="inline">&gt;</code>·are·inputs·to·the·shell.·All·other·lines·are·output·from·the·shell.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="ss">strider</span><span·class="w">·</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">
237 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="2459539786-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="2459539786-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.[·...·truncated·by·diffoscope;·len:·364,·SHA:·202c6a32e513a366ebd53957e2f0441148ef6f2b50464a6b12a9e6d739cd6358·...·]-3">]</span><span·class="w">237 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="p"·data-group-id="5034758177-1">(</span><span·class="n">BEAM</span><span·class="p"·data-group-id="5034758177-1">)</span><span·class="w">·</span><span·class="ss">emulator</span><span·class="w">·</span><span·class="ss">version</span><span·class="w">·</span><span·class="mf">5.[·...·truncated·by·diffoscope;·len:·364,·SHA:·b26725dc7abf4c38182781925bcb50313da7d16aa3171df2831fab11e6478f8f·...·]-3">]</span><span·class="w">
  
238 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="2459539786-4">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2459539786-4">)</span><span·class="gp·unselectable">238 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5034758177-4">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5034758177-4">)</span><span·class="gp·unselectable">
239 1&gt;·</span><span·class="n">Str</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;abcd&quot;</span><span·class="p">.</span><span·class="w">239 1&gt;·</span><span·class="n">Str</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;abcd&quot;</span><span·class="p">.</span><span·class="w">
240 </span><span·class="s">&quot;abcd&quot;</span></code></pre><p>Command·1·sets·variable·<code·class="inline">Str</code>·to·string·<code·class="inline">&quot;abcd&quot;</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">L</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">length</span><span·class="p"·data-group-id="9987909751-1">(</span><span·class="n">Str</span><span·class="p"·data-group-id="9987909751-1">)</span><span·class="p">.</span><span·class="w">240 </span><span·class="s">&quot;abcd&quot;</span></code></pre><p>Command·1·sets·variable·<code·class="inline">Str</code>·to·string·<code·class="inline">&quot;abcd&quot;</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="n">L</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">length</span><span·class="p"·data-group-id="6219679148-1">(</span><span·class="n">Str</span><span·class="p"·data-group-id="6219679148-1">)</span><span·class="p">.</span><span·class="w">
241 </span><span·class="mi">4</span></code></pre><p>Command·2·sets·<code·class="inline">L</code>·to·the·length·of·string·<code·class="inline">Str</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="n">Descriptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="4996366564-1">{</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_atom</span><span·class="p"·data-group-id="4996366564-2">(</span><span·class="n">Str</span><span·class="p"·data-group-id="4996366564-2">)<[·...·truncated·by·diffoscope;·len:·47,·SHA:·f3e48d4cc6dc65e73842b9af687b6a9ed38d5baed5a51c9cee42ba0344b474c9·...·]-1">}</span><span·class="p">.</span><span·class="w">241 </span><span·class="mi">4</span></code></pre><p>Command·2·sets·<code·class="inline">L</code>·to·the·length·of·string·<code·class="inline">Str</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="n">Descriptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="5535141545-1">{</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">list_to_atom</span><span·class="p"·data-group-id="5535141545-2">(</span><span·class="n">Str</span><span·class="p"·data-group-id="5535141545-2">)<[·...·truncated·by·diffoscope;·len:·47,·SHA:·48f4b0d2534fd3cfcad8b3efdb51975daaa34c7a418c64a41825523ee6dcc096·...·]-1">}</span><span·class="p">.</span><span·class="w">
242 </span><span·class="p"·data-group-id="4996366564-3">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="4996366564-3">}</span></code></pre><p>Command·3·builds·the·tuple·<code·class="inline">Descriptor</code>,·evaluating·the·BIF242 </span><span·class="p"·data-group-id="5535141545-3">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="5535141545-3">}</span></code></pre><p>Command·3·builds·the·tuple·<code·class="inline">Descriptor</code>,·evaluating·the·BIF
243 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#list_to_atom/1"><code·class="inline">list_to_atom/1</code>·</a>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="n">L</span><span·class="p">.</span><span·class="w">243 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#list_to_atom/1"><code·class="inline">list_to_atom/1</code>·</a>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="n">L</span><span·class="p">.</span><span·class="w">
244 </span><span·class="mi">4</span></code></pre><p>Command·4·prints·the·value·of·variable·<code·class="inline">L</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nf">b</span><span·class="p"·data-group-id="2408263980-1">(</span><span·class="p"·data-group-id="2408263980-1">)</span><span·class="p">.</span><span·class="w">244 </span><span·class="mi">4</span></code></pre><p>Command·4·prints·the·value·of·variable·<code·class="inline">L</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nf">b</span><span·class="p"·data-group-id="2557203258-1">(</span><span·class="p"·data-group-id="2557203258-1">)</span><span·class="p">.</span><span·class="w">
245 </span><span·class="n">Descriptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2408263980-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="2408263980-2">}</span><span·class="w">245 </span><span·class="n">Descriptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2557203258-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="2557203258-2">}</span><span·class="w">
246 </span><span·class="n">L</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">246 </span><span·class="n">L</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">4</span><span·class="w">
247 </span><span·class="n">Str</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;abcd&quot;</span><span·class="w">247 </span><span·class="n">Str</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;abcd&quot;</span><span·class="w">
248 </span><span·class="ss">ok</span></code></pre><p>Command·5·evaluates·the·internal·shell·command·<code·class="inline">b()</code>,·which·is·an·abbreviation248 </span><span·class="ss">ok</span></code></pre><p>Command·5·evaluates·the·internal·shell·command·<code·class="inline">b()</code>,·which·is·an·abbreviation
249 of·&quot;bindings&quot;.·This·prints·the·current·shell·variables·and·their·bindings.·<code·class="inline">ok</code>249 of·&quot;bindings&quot;.·This·prints·the·current·shell·variables·and·their·bindings.·<code·class="inline">ok</code>
250 at·the·end·is·the·return·value·of·function·<code·class="inline">b()</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="0326490399-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="0326490399-1">)</span><span·class="p">.</span><span·class="w">250 at·the·end·is·the·return·value·of·function·<code·class="inline">b()</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="3520825895-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="3520825895-1">)</span><span·class="p">.</span><span·class="w">
251 </span><span·class="ss">ok</span></code></pre><p>Command·6·evaluates·the·internal·shell·command·<code·class="inline">f(L)</code>·(abbreviation·of251 </span><span·class="ss">ok</span></code></pre><p>Command·6·evaluates·the·internal·shell·command·<code·class="inline">f(L)</code>·(abbreviation·of
252 &quot;forget&quot;).·The·value·of·variable·<code·class="inline">L</code>·is·removed.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nf">b</span><span·class="p"·data-group-id="0261485641-1">(</span><span·class="p"·data-group-id="0261485641-1">)</span><span·class="p">.</span><span·class="w">252 &quot;forget&quot;).·The·value·of·variable·<code·class="inline">L</code>·is·removed.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nf">b</span><span·class="p"·data-group-id="7812107025-1">(</span><span·class="p"·data-group-id="7812107025-1">)</span><span·class="p">.</span><span·class="w">
253 </span><span·class="n">Descriptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0261485641-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="0261485641-2">}</span><span·class="w">253 </span><span·class="n">Descriptor</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="7812107025-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="7812107025-2">}</span><span·class="w">
254 </span><span·class="n">Str</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;abcd&quot;</span><span·class="w">254 </span><span·class="n">Str</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;abcd&quot;</span><span·class="w">
255 </span><span·class="ss">ok</span></code></pre><p>Command·7·prints·the·new·bindings.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="0103565708-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="0103565708-1">)</span><span·class="p">.</span><span·class="w">255 </span><span·class="ss">ok</span></code></pre><p>Command·7·prints·the·new·bindings.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">8&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="1588972847-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="1588972847-1">)</span><span·class="p">.</span><span·class="w">
256 </span><span·class="ss">ok</span></code></pre><p>Command·8·has·no·effect,·as·<code·class="inline">L</code>·has·no·value.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="p"·data-group-id="6966693547-1">{</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="6966693547-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">256 </span><span·class="ss">ok</span></code></pre><p>Command·8·has·no·effect,·as·<code·class="inline">L</code>·has·no·value.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">9&gt;·</span><span·class="p"·data-group-id="7467232371-1">{</span><span·class="n">L</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="7467232371-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">
257 </span><span·class="p"·data-group-id="6966693547-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="6966693547-2">}</span></code></pre><p>Command·9·performs·a·pattern·matching·operation·on·<code·class="inline">Descriptor</code>,·binding·a·new257 </span><span·class="p"·data-group-id="7467232371-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="7467232371-2">}</span></code></pre><p>Command·9·performs·a·pattern·matching·operation·on·<code·class="inline">Descriptor</code>,·binding·a·new
258 value·to·<code·class="inline">L</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">10&gt;·</span><span·class="n">L</span><span·class="p">.</span><span·class="w">258 value·to·<code·class="inline">L</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">10&gt;·</span><span·class="n">L</span><span·class="p">.</span><span·class="w">
259 </span><span·class="mi">4</span></code></pre><p>Command·10·prints·the·current·value·of·<code·class="inline">L</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">11&gt;·</span><span·class="p"·data-group-id="8160671060-1">{</span><span·class="n">P</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Q</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p"·data-group-id="8160671060-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">259 </span><span·class="mi">4</span></code></pre><p>Command·10·prints·the·current·value·of·<code·class="inline">L</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">11&gt;·</span><span·class="p"·data-group-id="6702749351-1">{</span><span·class="n">P</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Q</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p"·data-group-id="6702749351-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">
260 </span><span·class="gt">**·exception·error:·no·match·of·right·hand·side·value·{4,abcd}</span></code></pre><p>Command·11·tries·to·match·<code·class="inline">{P,·Q,·R}</code>·against·<code·class="inline">Descriptor</code>,·which·is·<code·class="inline">{4,·abc}</code>.260 </span><span·class="gt">**·exception·error:·no·match·of·right·hand·side·value·{4,abcd}</span></code></pre><p>Command·11·tries·to·match·<code·class="inline">{P,·Q,·R}</code>·against·<code·class="inline">Descriptor</code>,·which·is·<code·class="inline">{4,·abc}</code>.
261 The·match·fails·and·none·of·the·new·variables·become·bound.·The·printout261 The·match·fails·and·none·of·the·new·variables·become·bound.·The·printout
262 starting·with·&quot;<code·class="inline">**·exception·error:</code>&quot;·is·not·the·value·of·the·expression·(the262 starting·with·&quot;<code·class="inline">**·exception·error:</code>&quot;·is·not·the·value·of·the·expression·(the
263 expression·had·no·value·because·its·evaluation·failed),·but·a·warning·printed·by263 expression·had·no·value·because·its·evaluation·failed),·but·a·warning·printed·by
264 the·system·to·inform·the·user·that·an·error·has·occurred.·The·values·of·the264 the·system·to·inform·the·user·that·an·error·has·occurred.·The·values·of·the
265 other·variables·(<code·class="inline">L</code>,·<code·class="inline">Str</code>,·and·so·on)·are·unchanged.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">12&gt;·</span><span·class="n">P</span><span·class="p">.</span><span·class="w">265 other·variables·(<code·class="inline">L</code>,·<code·class="inline">Str</code>,·and·so·on)·are·unchanged.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">12&gt;·</span><span·class="n">P</span><span·class="p">.</span><span·class="w">
266 </span><span·class="gt">*·1:1:·variable·&#39;P&#39;·is·unbound</span><span·class="gp·unselectable">266 </span><span·class="gt">*·1:1:·variable·&#39;P&#39;·is·unbound</span><span·class="gp·unselectable">
267 13&gt;·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">267 13&gt;·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">
268 </span><span·class="p"·data-group-id="4634250355-1">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="4634250355-1">}</span></code></pre><p>Commands·12·and·13·show·that·<code·class="inline">P</code>·is·unbound·because·the·previous·command·failed,268 </span><span·class="p"·data-group-id="0141192686-1">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="0141192686-1">}</span></code></pre><p>Commands·12·and·13·show·that·<code·class="inline">P</code>·is·unbound·because·the·previous·command·failed,
269 and·that·<code·class="inline">Descriptor</code>·has·not·changed.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">14</span><span·class="o">&gt;</span><span·class="p"·data-group-id="3923943452-1">{</span><span·class="n">P</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Q</span><span·class="p"·data-group-id="3923943452-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">269 and·that·<code·class="inline">Descriptor</code>·has·not·changed.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">14</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5492121790-1">{</span><span·class="n">P</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Q</span><span·class="p"·data-group-id="5492121790-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Descriptor</span><span·class="p">.</span><span·class="w">
270 </span><span·class="p"·data-group-id="3923943452-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="3923943452-2">}</span><span·class="gp·unselectable">270 </span><span·class="p"·data-group-id="5492121790-2">{</span><span·class="mi">4</span><span·class="p">,</span><span·class="ss">abcd</span><span·class="p"·data-group-id="5492121790-2">}</span><span·class="gp·unselectable">
271 15&gt;·</span><span·class="n">P</span><span·class="p">.</span><span·class="w">271 15&gt;·</span><span·class="n">P</span><span·class="p">.</span><span·class="w">
272 </span><span·class="mi">4</span></code></pre><p>Commands·14·and·15·show·a·correct·match·where·<code·class="inline">P</code>·and·<code·class="inline">Q</code>·are·bound.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">16&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="8776311457-1">(</span><span·class="p"·data-group-id="8776311457-1">)</span><span·class="p">.</span><span·class="w">272 </span><span·class="mi">4</span></code></pre><p>Commands·14·and·15·show·a·correct·match·where·<code·class="inline">P</code>·and·<code·class="inline">Q</code>·are·bound.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">16&gt;·</span><span·class="nf">f</span><span·class="p"·data-group-id="4178607791-1">(</span><span·class="p"·data-group-id="4178607791-1">)</span><span·class="p">.</span><span·class="w">
273 </span><span·class="ss">ok</span></code></pre><p>Command·16·clears·all·bindings.</p><p>The·next·few·commands·assume·that·<code·class="inline">test1:demo(X)</code>·is·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">demo</span><span·class="p"·data-group-id="3350619296-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="3350619296-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">273 </span><span·class="ss">ok</span></code></pre><p>Command·16·clears·all·bindings.</p><p>The·next·few·commands·assume·that·<code·class="inline">test1:demo(X)</code>·is·defined·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">demo</span><span·class="p"·data-group-id="7579410724-1">(</span><span·class="n">X</span><span·class="p"·data-group-id="7579410724-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
274 </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="nf">put</span><span·class="p"·data-group-id="3350619296-2">(</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">worked</span><span·class="p"·data-group-id="3350619296-2">)</span><span·class="p">,</span><span·class="w">274 </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="nf">put</span><span·class="p"·data-group-id="7579410724-2">(</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">worked</span><span·class="p"·data-group-id="7579410724-2">)</span><span·class="p">,</span><span·class="w">
275 </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">275 </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="n">X</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
276 </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="n">X</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">10</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">17&gt;·</span><span·class="nf">put</span><span·class="p"·data-group-id="7033612973-1">(</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hello</span><span·class="p"·data-group-id="7033612973-1">)</span><span·class="p">.</span><span·class="w">276 </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="err"> </span><span·class="n">X</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="mi">10</span><span·class="p">.</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">17&gt;·</span><span·class="nf">put</span><span·class="p"·data-group-id="8682577282-1">(</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hello</span><span·class="p"·data-group-id="8682577282-1">)</span><span·class="p">.</span><span·class="w">
277 </span><span·class="ss">undefined</span><span·class="gp·unselectable">277 </span><span·class="ss">undefined</span><span·class="gp·unselectable">
278 18&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="7033612973-2">(</span><span·class="ss">aa</span><span·class="p"·data-group-id="7033612973-2">)</span><span·class="p">.</span><span·class="w">278 18&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="8682577282-2">(</span><span·class="ss">aa</span><span·class="p"·data-group-id="8682577282-2">)</span><span·class="p">.</span><span·class="w">
279 </span><span·class="ss">hello</span></code></pre><p>Commands·17·and·18·set·and·inspect·the·value·of·item·<code·class="inline">aa</code>·in·the·process279 </span><span·class="ss">hello</span></code></pre><p>Commands·17·and·18·set·and·inspect·the·value·of·item·<code·class="inline">aa</code>·in·the·process
280 dictionary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">19&gt;·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">test1</span><span·class="p">:</span><span·class="nf">demo</span><span·class="p"·data-group-id="2997047961-1">(</span><span·class="mi">1</span><span·class="p"·data-group-id="2997047961-1">)</span><span·class="p">.</span><span·class="w">280 dictionary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">19&gt;·</span><span·class="n">Y</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">test1</span><span·class="p">:</span><span·class="nf">demo</span><span·class="p"·data-group-id="5432261037-1">(</span><span·class="mi">1</span><span·class="p"·data-group-id="5432261037-1">)</span><span·class="p">.</span><span·class="w">
281 </span><span·class="mi">11</span></code></pre><p>Command·19·evaluates·<code·class="inline">test1:demo(1)</code>.·The·evaluation·succeeds·and·the·changes281 </span><span·class="mi">11</span></code></pre><p>Command·19·evaluates·<code·class="inline">test1:demo(1)</code>.·The·evaluation·succeeds·and·the·changes
282 made·in·the·process·dictionary·become·visible·to·the·shell.·The·new·value·of282 made·in·the·process·dictionary·become·visible·to·the·shell.·The·new·value·of
283 dictionary·item·<code·class="inline">aa</code>·can·be·seen·in·command·20.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">20&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="6495869267-1">(</span><span·class="p"·data-group-id="6495869267-1">)</span><span·class="p">.</span><span·class="w">283 dictionary·item·<code·class="inline">aa</code>·can·be·seen·in·command·20.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">20&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="0204205944-1">(</span><span·class="p"·data-group-id="0204205944-1">)</span><span·class="p">.</span><span·class="w">
284 </span><span·class="p"·data-group-id="6495869267-2">[</span><span·class="p"·data-group-id="6495869267-3">{</span><span·class="ss">aa</span><span·class="p">,</span><span·class="ss">worked</span><span·class="p"·data-group-id="6495869267-3">}</span><span·class="p"·data-group-id="6495869267-2">]</span><span·class="gp·unselectable">284 </span><span·class="p"·data-group-id="0204205944-2">[</span><span·class="p"·data-group-id="0204205944-3">{</span><span·class="ss">aa</span><span·class="p">,</span><span·class="ss">worked</span><span·class="p"·data-group-id="0204205944-3">}</span><span·class="p"·data-group-id="0204205944-2">]</span><span·class="gp·unselectable">
285 21&gt;·</span><span·class="nf">put</span><span·class="p"·data-group-id="6495869267-4">(</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hello</span><span·class="p"·data-group-id="6495869267-4">)</span><span·class="p">.</span><span·class="w">285 21&gt;·</span><span·class="nf">put</span><span·class="p"·data-group-id="0204205944-4">(</span><span·class="ss">aa</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">hello</span><span·class="p"·data-group-id="0204205944-4">)</span><span·class="p">.</span><span·class="w">
286 </span><span·class="ss">worked</span><span·class="gp·unselectable">286 </span><span·class="ss">worked</span><span·class="gp·unselectable">
287 22&gt;·</span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">test1</span><span·class="p">:</span><span·class="nf">demo</span><span·class="p"·data-group-id="6495869267-5">(</span><span·class="mi">2</span><span·class="p"·data-group-id="6495869267-5">)</span><span·class="p">.</span><span·class="w">287 22&gt;·</span><span·class="n">Z</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">test1</span><span·class="p">:</span><span·class="nf">demo</span><span·class="p"·data-group-id="0204205944-5">(</span><span·class="mi">2</span><span·class="p"·data-group-id="0204205944-5">)</span><span·class="p">.</span><span·class="w">
288 </span><span·class="gt">**·exception·error:·no·match·of·right·hand·side·value·1288 </span><span·class="gt">**·exception·error:·no·match·of·right·hand·side·value·1
289 ·····in·function··test1:demo/1</span></code></pre><p>Commands·21·and·22·change·the·value·of·dictionary·item·<code·class="inline">aa</code>·to·<code·class="inline">hello</code>·and·call289 ·····in·function··test1:demo/1</span></code></pre><p>Commands·21·and·22·change·the·value·of·dictionary·item·<code·class="inline">aa</code>·to·<code·class="inline">hello</code>·and·call
290 <code·class="inline">test1:demo(2)</code>.·Evaluation·fails·and·the·changes·made·to·the·dictionary·in290 <code·class="inline">test1:demo(2)</code>.·Evaluation·fails·and·the·changes·made·to·the·dictionary·in
291 <code·class="inline">test1:demo(2)</code>,·before·the·error·occurred,·are·discarded.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">23&gt;·</span><span·class="n">Z</span><span·class="p">.</span><span·class="w">291 <code·class="inline">test1:demo(2)</code>,·before·the·error·occurred,·are·discarded.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">23&gt;·</span><span·class="n">Z</span><span·class="p">.</span><span·class="w">
292 </span><span·class="gt">*·1:1:·variable·&#39;Z&#39;·is·unbound</span><span·class="gp·unselectable">292 </span><span·class="gt">*·1:1:·variable·&#39;Z&#39;·is·unbound</span><span·class="gp·unselectable">
293 24&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="1872083761-1">(</span><span·class="ss">aa</span><span·class="p"·data-group-id="1872083761-1">)</span><span·class="p">.</span><span·class="w">293 24&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="7668359334-1">(</span><span·class="ss">aa</span><span·class="p"·data-group-id="7668359334-1">)</span><span·class="p">.</span><span·class="w">
294 </span><span·class="ss">hello</span></code></pre><p>Commands·23·and·24·show·that·<code·class="inline">Z</code>·was·not·bound·and·that·dictionary·item·<code·class="inline">aa</code>·has294 </span><span·class="ss">hello</span></code></pre><p>Commands·23·and·24·show·that·<code·class="inline">Z</code>·was·not·bound·and·that·dictionary·item·<code·class="inline">aa</code>·has
295 retained·its·original·value.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">25&gt;·</span><span·class="nf">erase</span><span·class="p"·data-group-id="0910485747-1">(</span><span·class="p"·data-group-id="0910485747-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">put</span><span·class="p"·data-group-id="0910485747-2">(</span><span·class="ss">aa</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·3c410329e868949024c7510d094ec66ef7c2fed44baba3fa8f1702eaeea42227·...·]-2">)</span><span·class="p">.</span><span·class="w">295 retained·its·original·value.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">25&gt;·</span><span·class="nf">erase</span><span·class="p"·data-group-id="5138137493-1">(</span><span·class="p"·data-group-id="5138137493-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">put</span><span·class="p"·data-group-id="5138137493-2">(</span><span·class="ss">aa</span><span·class="p">,</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·dd492904049ac207d8740d7fe3ede0f3c769ef0fcb86636e9b34d3d80aa6d286·...·]-2">)</span><span·class="p">.</span><span·class="w">
296 </span><span·class="ss">undefined</span><span·class="gp·unselectable">296 </span><span·class="ss">undefined</span><span·class="gp·unselectable">
297 26&gt;·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0910485747-3">(</span><span·class="ss">test1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">demo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0910485747-4">[</span><span·class="mi">1</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·365481f3746128e2859266dcb74a261aa0dd34bc98136356b07d4cf2cfbc6972·...·]-3">)</span><span·class="p">.</span><span·class="w">297 26&gt;·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="5138137493-3">(</span><span·class="ss">test1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">demo</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5138137493-4">[</span><span·class="mi">1</span><sp[·...·truncated·by·diffoscope;·len:·91,·SHA:·ae9fac1f9efb94c8880f95e572004c46f4ff1ef14de25108a1c6f494e286ba36·...·]-3">)</span><span·class="p">.</span><span·class="w">
298 </span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">298 </span><span·class="o">&lt;</span><span·class="mf">0.57</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
299 27&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="0910485747-5">(</span><span·class="ss">aa</span><span·class="p"·data-group-id="0910485747-5">)</span><span·class="p">.</span><span·class="w">299 27&gt;·</span><span·class="nf">get</span><span·class="p"·data-group-id="5138137493-5">(</span><span·class="ss">aa</span><span·class="p"·data-group-id="5138137493-5">)</span><span·class="p">.</span><span·class="w">
300 </span><span·class="ss">hello</span></code></pre><p>Commands·25,·26,·and·27·show·the·effect·of·evaluating·<code·class="inline">test1:demo(1)</code>·in·the300 </span><span·class="ss">hello</span></code></pre><p>Commands·25,·26,·and·27·show·the·effect·of·evaluating·<code·class="inline">test1:demo(1)</code>·in·the
301 background.·In·this·case,·the·expression·is·evaluated·in·a·newly·spawned301 background.·In·this·case,·the·expression·is·evaluated·in·a·newly·spawned
302 process.·Any·changes·made·in·the·process·dictionary·are·local·to·the·newly302 process.·Any·changes·made·in·the·process·dictionary·are·local·to·the·newly
303 spawned·process·and·therefore·not·visible·to·the·shell.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">28&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2411566935-1">(</span><span·class="s">&quot;hello·hello\n&quot;</span><span·class="p"·data-group-id="2411566935-1">)</span><span·class="p">.</span><span·class="w">303 spawned·process·and·therefore·not·visible·to·the·shell.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">28&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6008216620-1">(</span><span·class="s">&quot;hello·hello\n&quot;</span><span·class="p"·data-group-id="6008216620-1">)</span><span·class="p">.</span><span·class="w">
304 </span><span·class="ss">hello</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">304 </span><span·class="ss">hello</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">
305 </span><span·class="ss">ok</span><span·class="gp·unselectable">305 </span><span·class="ss">ok</span><span·class="gp·unselectable">
306 29&gt;·</span><span·class="nf">e</span><span·class="p"·data-group-id="2411566935-2">(</span><span·class="mi">28</span><span·class="p"·data-group-id="2411566935-2">)</span><span·class="p">.</span><span·class="w">306 29&gt;·</span><span·class="nf">e</span><span·class="p"·data-group-id="6008216620-2">(</span><span·class="mi">28</span><span·class="p"·data-group-id="6008216620-2">)</span><span·class="p">.</span><span·class="w">
307 </span><span·class="ss">hello</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">307 </span><span·class="ss">hello</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">
308 </span><span·class="ss">ok</span><span·class="gp·unselectable">308 </span><span·class="ss">ok</span><span·class="gp·unselectable">
309 30&gt;·</span><span·class="nf">v</span><span·class="p"·data-group-id="2411566935-3">(</span><span·class="mi">28</span><span·class="p"·data-group-id="2411566935-3">)</span><span·class="p">.</span><span·class="w">309 30&gt;·</span><span·class="nf">v</span><span·class="p"·data-group-id="6008216620-3">(</span><span·class="mi">28</span><span·class="p"·data-group-id="6008216620-3">)</span><span·class="p">.</span><span·class="w">
310 </span><span·class="ss">ok</span></code></pre><p>Commands·28,·29·and·30·use·the·history·facilities·of·the·shell.·Command·29310 </span><span·class="ss">ok</span></code></pre><p>Commands·28,·29·and·30·use·the·history·facilities·of·the·shell.·Command·29
311 re-evaluates·command·28.·Command·30·uses·the·value·(result)·of·command·28.·In311 re-evaluates·command·28.·Command·30·uses·the·value·(result)·of·command·28.·In
312 the·cases·of·a·pure·function·(a·function·with·no·side·effects),·the·result·is312 the·cases·of·a·pure·function·(a·function·with·no·side·effects),·the·result·is
313 the·same.·For·a·function·with·side·effects,·the·result·can·be·different.</p><p>The·next·few·commands·show·some·record·manipulation.·It·is·assumed·that·<code·class="inline">ex.erl</code>313 the·same.·For·a·function·with·side·effects,·the·result·can·be·different.</p><p>The·next·few·commands·show·some·record·manipulation.·It·is·assumed·that·<code·class="inline">ex.erl</code>
314 defines·a·record·as·follows:</p><p><code·class="inline">-record(rec,·{a,·b·=·val()}).</code></p><p><code·class="inline">val()·-&gt;</code><br/>    <code·class="inline">3.</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">31&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="0249338763-1">(</span><span·class="ss">ex</span><span·class="p"·data-group-id="0249338763-1">)</span><span·class="p">.</span><span·class="w">314 defines·a·record·as·follows:</p><p><code·class="inline">-record(rec,·{a,·b·=·val()}).</code></p><p><code·class="inline">val()·-&gt;</code><br/>    <code·class="inline">3.</code></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">31&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="0497912212-1">(</span><span·class="ss">ex</span><span·class="p"·data-group-id="0497912212-1">)</span><span·class="p">.</span><span·class="w">
315 </span><span·class="p"·data-group-id="0249338763-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">ex</span><span·class="p"·data-group-id="0249338763-2">}</span><span·class="gp·unselectable">315 </span><span·class="p"·data-group-id="0497912212-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">ex</span><span·class="p"·data-group-id="0497912212-2">}</span><span·class="gp·unselectable">
316 32&gt;·</span><span·class="nf">rr</span><span·class="p"·data-group-id="0249338763-3">(</span><span·class="ss">ex</span><span·class="p"·data-group-id="0249338763-3">)</span><span·class="p">.</span><span·class="w">316 32&gt;·</span><span·class="nf">rr</span><span·class="p"·data-group-id="0497912212-3">(</span><span·class="ss">ex</span><span·class="p"·data-group-id="0497912212-3">)</span><span·class="p">.</span><span·class="w">
317 </span><span·class="p"·data-group-id="0249338763-4">[</span><span·class="ss">rec</span><span·class="p"·data-group-id="0249338763-4">]</span></code></pre><p>Commands·31·and·32·compile·file·<code·class="inline">ex.erl</code>·and·read·the·record·definitions·in317 </span><span·class="p"·data-group-id="0497912212-4">[</span><span·class="ss">rec</span><span·class="p"·data-group-id="0497912212-4">]</span></code></pre><p>Commands·31·and·32·compile·file·<code·class="inline">ex.erl</code>·and·read·the·record·definitions·in
318 <code·class="inline">ex.beam</code>.·If·the·compiler·did·not·output·any·record·definitions·on·the·BEAM318 <code·class="inline">ex.beam</code>.·If·the·compiler·did·not·output·any·record·definitions·on·the·BEAM
319 file,·<code·class="inline">rr(ex)</code>·tries·to·read·record·definitions·from·the·source·file·instead.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">33&gt;·</span><span·class="nf">rl</span><span·class="p"·data-group-id="5720485957-1">(</span><span·class="ss">rec</span><span·class="p"·data-group-id="5720485957-1">)</span><span·class="p">.</span><span·class="w">319 file,·<code·class="inline">rr(ex)</code>·tries·to·read·record·definitions·from·the·source·file·instead.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">33&gt;·</span><span·class="nf">rl</span><span·class="p"·data-group-id="7458796534-1">(</span><span·class="ss">rec</span><span·class="p"·data-group-id="7458796534-1">)</span><span·class="p">.</span><span·class="w">
320 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="5720485957-2">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="p"·data-group-id="5720485957-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·243,·SHA:·d52c62f530930b1de5e189d5e492c51bdc9af255c5070b0422108b1ddd301438·...·]-2">)</span><span·class="p">.</span><span·class="w">320 </span><span·class="p">-</span><span·class="na">record</span><span·class="p"·data-group-id="7458796534-2">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="p"·data-group-id="7458796534-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·cl[·...·truncated·by·diffoscope;·len:·243,·SHA:·b48b1b66e238c5bc49def64cd61384437ab8f0bfcf2d055cd1c7c3f5ce4ba9e2·...·]-2">)</span><span·class="p">.</span><span·class="w">
321 </span><span·class="ss">ok</span></code></pre><p>Command·33·prints·the·definition·of·the·record·named·<code·class="inline">rec</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">34&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="9728241059-1">{</span><span·class="p"·data-group-id="9728241059-1">}</span><span·class="p">.</span><span·class="w">321 </span><span·class="ss">ok</span></code></pre><p>Command·33·prints·the·definition·of·the·record·named·<code·class="inline">rec</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">34&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="6293944967-1">{</span><span·class="p"·data-group-id="6293944967-1">}</span><span·class="p">.</span><span·class="w">
322 </span><span·class="gt">**·exception·error:·undefined·shell·command·val/0</span></code></pre><p>Command·34·tries·to·create·a·<code·class="inline">rec</code>·record,·but·fails·as·function·<code·class="inline">val/0</code>·is322 </span><span·class="gt">**·exception·error:·undefined·shell·command·val/0</span></code></pre><p>Command·34·tries·to·create·a·<code·class="inline">rec</code>·record,·but·fails·as·function·<code·class="inline">val/0</code>·is
323 undefined.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">35&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="2362286587-1">{</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="2362286587-1">}</span><span·class="p">.</span><span·class="w">323 undefined.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">35&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="8105739141-1">{</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">3</span><span·class="p"·data-group-id="8105739141-1">}</span><span·class="p">.</span><span·class="w">
324 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="2362286587-2">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·818448bb88caa6fe865b9883061a0a40ed979f5a052834c3f7b88a44613626a7·...·]-2">}</span></code></pre><p>Command·35·shows·the·workaround:·explicitly·assign·values·to·record·fields·that324 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="8105739141-2">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·3d146cc5cf5b851d7d6e4810ba2631c9e9f59ff5de9e2b3b146056ba356d332c·...·]-2">}</span></code></pre><p>Command·35·shows·the·workaround:·explicitly·assign·values·to·record·fields·that
325 cannot·otherwise·be·initialized.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">36&gt;·</span><span·class="nf">rp</span><span·class="p"·data-group-id="0816075036-1">(</span><span·class="nf">v</span><span·class="p"·data-group-id="0816075036-2">(</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="0816075036-2">)</span><span·class="p"·data-group-id="0816075036-1">)</span><span·class="p">.</span><span·class="w">325 cannot·otherwise·be·initialized.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">36&gt;·</span><span·class="nf">rp</span><span·class="p"·data-group-id="3157705133-1">(</span><span·class="nf">v</span><span·class="p"·data-group-id="3157705133-2">(</span><span·class="o">-</span><span·class="mi">1</span><span·class="p"·data-group-id="3157705133-2">)</span><span·class="p"·data-group-id="3157705133-1">)</span><span·class="p">.</span><span·class="w">
326 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="0816075036-3">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·9332b31883e73cbceb92441e604f8c19c6e6d5a5cb167d21620f9b2ffd79f5db·...·]-3">}</span><span·class="w">326 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="3157705133-3">{</span><span·class="ss">a</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="ss">b</span><span·class="w">·</span><span·class="o">=</span><span·c[·...·truncated·by·diffoscope;·len:·83,·SHA:·e494ba20a108edb181279e2dedd5dcf0f1e5643f36252afcf63342808a2ee7ea·...·]-3">}</span><span·class="w">
327 </span><span·class="ss">ok</span></code></pre><p>Command·36·prints·the·newly·created·record·using·record·definitions·maintained327 </span><span·class="ss">ok</span></code></pre><p>Command·36·prints·the·newly·created·record·using·record·definitions·maintained
328 by·the·shell.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">37&gt;·</span><span·class="nf">rd</span><span·class="p"·data-group-id="1990962560-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1990962560-2">{</span><span·class="ss">f</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·272,·SHA:·83b7e6cacb28b2dc653ed72fcb7dd812d7dbf2a3eb852b81fc3ac0bcc8e764e1·...·]-1">)</span><span·class="p">.</span><span·class="w">328 by·the·shell.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">37&gt;·</span><span·class="nf">rd</span><span·class="p"·data-group-id="1088672419-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1088672419-2">{</span><span·class="ss">f</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·clas[·...·truncated·by·diffoscope;·len:·272,·SHA:·6519da5e450332001bc21f76b2fd6fb3ce9ec17174c61e11b826c970032e91be·...·]-1">)</span><span·class="p">.</span><span·class="w">
329 </span><span·class="ss">rec</span></code></pre><p>Command·37·defines·a·record·directly·in·the·shell.·The·definition·replaces·the329 </span><span·class="ss">rec</span></code></pre><p>Command·37·defines·a·record·directly·in·the·shell.·The·definition·replaces·the
330 one·read·from·file·<code·class="inline">ex.beam</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">38&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1365687277-1">{</span><span·class="p"·data-group-id="1365687277-1">}</span><span·class="p">.</span><span·class="w">330 one·read·from·file·<code·class="inline">ex.beam</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">38&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="3174651056-1">{</span><span·class="p"·data-group-id="3174651056-1">}</span><span·class="p">.</span><span·class="w">
331 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="1365687277-2">{</span><span·class="ss">f</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="1365687277-3">[</span><span·class="p"·data-group-id="1365687277-3">]</span><span·class="p"·data-group-id="1365687277-2">}</span><span·class="w"> 
332 </span><span·class="ss">ok</span></code></pre><p>Command·38·creates·a·record·using·the·new·definition,·and·prints·the·result.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">39&gt;·</span><span·class="nf">rd</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·372,·SHA:·cb019941e35ac2efcf4c7fa8fe4ec7bf2da54c71fd467a290809aa9ac7bd2fce·...·]</span><span·class="w">331 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="3174651056-2">{</span><span·class="ss">f</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3174651056-3">[</span><span·class="p"[·...·truncated·by·diffoscope;·len:·84,·SHA:·206b2b9845ae01b35952d2a1d3158124ddc97518a93296213e7be493550d44cc·...·]</span><span·class="w">
 332 </span><span·class="ss">ok</span></code></pre><p>Command·38·creates·a·record·using·the·new·definition,·and·prints·the·result.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">39&gt;·</span><span·class="nf">rd</span><span·class="p"·data-group-id="4725772787-1">(</span><span·class="ss">rec</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4725772787-2">{</span><span·class="ss">c</span><span·class="p"·data-group-id="4725772787-2">}</span><span·class="p"·data-group-id="4725772787-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">A</span><span·class="p">.</span><span·class="w">
333 </span><span·class="gt">*·1:15:·variable·&#39;A&#39;·is·unbound</span><span·class="gp·unselectable">333 </span><span·class="gt">*·1:15:·variable·&#39;A&#39;·is·unbound</span><span·class="gp·unselectable">
334 40&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="0375360498-3">{</span><span·class="p"·data-group-id="0375360498-3">}</span><span·class="p">.</span><span·class="w">334 40&gt;·</span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="4725772787-3">{</span><span·class="p"·data-group-id="4725772787-3">}</span><span·class="p">.</span><span·class="w">
335 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="0375360498-4">{</span><span·class="ss">c</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p"·data-group-id="0375360498-4">}</span><span·class="w">335 </span><span·class="o">#</span><span·class="ss">rec</span><span·class="p"·data-group-id="4725772787-4">{</span><span·class="ss">c</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p"·data-group-id="4725772787-4">}</span><span·class="w">
336 </span><span·class="ss">ok</span></code></pre><p>Command·39·and·40·show·that·record·definitions·are·updated·as·side·effects.·The336 </span><span·class="ss">ok</span></code></pre><p>Command·39·and·40·show·that·record·definitions·are·updated·as·side·effects.·The
337 evaluation·of·the·command·fails,·but·the·definition·of·<code·class="inline">rec</code>·has·been·carried337 evaluation·of·the·command·fails,·but·the·definition·of·<code·class="inline">rec</code>·has·been·carried
338 out.</p><p>For·the·next·command,·it·is·assumed·that·<code·class="inline">test1:loop(N)</code>·is·defined·as·follows:</p><p><code·class="inline">loop(N)·-&gt;</code><br/>    <code·class="inline">io:format(&quot;Hello·Number:·~w~n&quot;,·[N]),</code><br/>    <code·class="inline">loop(N+1).</code></p><pre><code·class="text">41&gt;·test1:loop(0).338 out.</p><p>For·the·next·command,·it·is·assumed·that·<code·class="inline">test1:loop(N)</code>·is·defined·as·follows:</p><p><code·class="inline">loop(N)·-&gt;</code><br/>    <code·class="inline">io:format(&quot;Hello·Number:·~w~n&quot;,·[N]),</code><br/>    <code·class="inline">loop(N+1).</code></p><pre><code·class="text">41&gt;·test1:loop(0).
Max diff block lines reached; 22910/74675 bytes (30.68%) of diff not shown.
3.0 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/shell_default.html
    
Offset 125, 18 lines modifiedOffset 125, 18 lines modified
125 ····<small·class="app-vsn"·translate="no">(stdlib·v6.0.1)</small>125 ····<small·class="app-vsn"·translate="no">(stdlib·v6.0.1)</small>
  
126 ··</h1>126 ··</h1>
  
  
127 ····<section·id="moduledoc">127 ····<section·id="moduledoc">
128 <p>Customizing·the·Erlang·environment.</p><p>The·functions·in·this·module·are·called·when·no·module·name·is·specified·in·a128 <p>Customizing·the·Erlang·environment.</p><p>The·functions·in·this·module·are·called·when·no·module·name·is·specified·in·a
129 shell·command.</p><p>Consider·the·following·shell·dialog:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="3207039609-1">(</span><span·class="s">&quot;abc&quot;</span><span·class="p"·data-group-id="3207039609-1">)</span><span·class="p">.</span><span·class="w">129 shell·command.</p><p>Consider·the·following·shell·dialog:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">reverse</span><span·class="p"·data-group-id="9010178265-1">(</span><span·class="s">&quot;abc&quot;</span><span·class="p"·data-group-id="9010178265-1">)</span><span·class="p">.</span><span·class="w">
130 </span><span·class="s">&quot;cba&quot;</span><span·class="gp·unselectable">130 </span><span·class="s">&quot;cba&quot;</span><span·class="gp·unselectable">
131 2&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="3207039609-2">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="3207039609-2">)</span><span·class="p">.</span><span·class="w">131 2&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="9010178265-2">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="9010178265-2">)</span><span·class="p">.</span><span·class="w">
132 </span><span·class="p"·data-group-id="3207039609-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p"·data-group-id="3207039609-3">}</span></code></pre><p>In·command·one,·module·<a·href="lists.html"><code·class="inline">lists</code></a>·is·called.·In·command·two,·no·module·name·is132 </span><span·class="p"·data-group-id="9010178265-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p"·data-group-id="9010178265-3">}</span></code></pre><p>In·command·one,·module·<a·href="lists.html"><code·class="inline">lists</code></a>·is·called.·In·command·two,·no·module·name·is
133 specified.·The·shell·searches·module·<code·class="inline">user_default</code>·followed·by·module133 specified.·The·shell·searches·module·<code·class="inline">user_default</code>·followed·by·module
134 <code·class="inline">shell_default</code>·for·function·<code·class="inline">c/1</code>.</p><p><code·class="inline">shell_default</code>·is·intended·for·&quot;system·wide&quot;·customizations·to·the·shell.134 <code·class="inline">shell_default</code>·for·function·<code·class="inline">c/1</code>.</p><p><code·class="inline">shell_default</code>·is·intended·for·&quot;system·wide&quot;·customizations·to·the·shell.
135 <code·class="inline">user_default</code>·is·intended·for·&quot;local&quot;·or·individual·user·customizations.</p><h2·id="module-hint"·class="section-heading">135 <code·class="inline">user_default</code>·is·intended·for·&quot;local&quot;·or·individual·user·customizations.</p><h2·id="module-hint"·class="section-heading">
136 ··<a·href="#module-hint"·class="hover-link">136 ··<a·href="#module-hint"·class="hover-link">
137 ····<i·class="ri-link-m"·aria-hidden="true"></i>137 ····<i·class="ri-link-m"·aria-hidden="true"></i>
138 ··</a>138 ··</a>
139 ··<span·class="text">Hint</span>139 ··<span·class="text">Hint</span>
8.02 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/slave.html
    
Offset 371, 15 lines modifiedOffset 371, 15 lines modified
371 ······</div>371 ······</div>
  
372 <p>Starts·a·number·of·pseudo·servers.·A·pseudo·server·is·a·server·with·a·registered372 <p>Starts·a·number·of·pseudo·servers.·A·pseudo·server·is·a·server·with·a·registered
373 name·that·does·nothing·but·pass·on·all·message·to·the·real·server·that·executes373 name·that·does·nothing·but·pass·on·all·message·to·the·real·server·that·executes
374 at·a·master·node.·A·pseudo·server·is·an·intermediary·that·only·has·the·same374 at·a·master·node.·A·pseudo·server·is·an·intermediary·that·only·has·the·same
375 registered·name·as·the·real·server.</p><p>For·example,·if·you·have·started·a·slave·node·<code·class="inline">N</code>·and·want·to·execute·<code·class="inline">pxw</code>375 registered·name·as·the·real·server.</p><p>For·example,·if·you·have·started·a·slave·node·<code·class="inline">N</code>·and·want·to·execute·<code·class="inline">pxw</code>
376 graphics·code·on·this·node,·you·can·start·server·<code·class="inline">pxw_server</code>·as·a·pseudo·server376 graphics·code·on·this·node,·you·can·start·server·<code·class="inline">pxw_server</code>·as·a·pseudo·server
377 at·the·slave·node.·This·is·illustrated·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">rpc</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8243448135-1">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">slave</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pseudo</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·461,·SHA:·799a04dcf17e99802bbc64f058ca8262d1d127a316a3931865b28fc2065844b8·...·]-1">)</span><span·class="p">.</span></code></pre>377 at·the·slave·node.·This·is·illustrated·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">rpc</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8983135887-1">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">slave</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pseudo</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·461,·SHA:·d89f5be1a937512684fa7d896e67dcd9f7c896b1fd343584f67486b78509e1a0·...·]-1">)</span><span·class="p">.</span></code></pre>
378 ··</section>378 ··</section>
379 </section>379 </section>
380 <section·class="detail"·id="relay/1">380 <section·class="detail"·id="relay/1">
  
381 ··<div·class="detail-header">381 ··<div·class="detail-header">
382 ····<a·href="#relay/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">382 ····<a·href="#relay/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
383 ······<i·class="ri-link-m"·aria-hidden="true"></i>383 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 525, 17 lines modifiedOffset 525, 17 lines modified
525 as·fully·qualified·names;·short·names·can·also·be·used.·This·is·the·same525 as·fully·qualified·names;·short·names·can·also·be·used.·This·is·the·same
526 condition·that·applies·to·names·of·distributed·Erlang·nodes.</p><p>The·name·of·the·started·node·becomes·<code·class="inline">Name@Host</code>.</p><p>The·slave·node·resets·its·<a·href="io.html#t:user/0"><code·class="inline">io:user/0</code></a>·process·so·that·all·terminal·I/O·that·is526 condition·that·applies·to·names·of·distributed·Erlang·nodes.</p><p>The·name·of·the·started·node·becomes·<code·class="inline">Name@Host</code>.</p><p>The·slave·node·resets·its·<a·href="io.html#t:user/0"><code·class="inline">io:user/0</code></a>·process·so·that·all·terminal·I/O·that·is
527 produced·at·the·slave·is·automatically·relayed·to·the·master.·Also,·the·file527 produced·at·the·slave·is·automatically·relayed·to·the·master.·Also,·the·file
528 server·is·relayed·to·the·master.</p><p>Argument·<code·class="inline">Args</code>·is·used·to·set·<code·class="inline">erl</code>·command-line·arguments.·It·is528 server·is·relayed·to·the·master.</p><p>Argument·<code·class="inline">Args</code>·is·used·to·set·<code·class="inline">erl</code>·command-line·arguments.·It·is
529 passed·to·the·new·node·and·can·be·used·for·a·variety·of·purposes;·see529 passed·to·the·new·node·and·can·be·used·for·a·variety·of·purposes;·see
530 <a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html"><code·class="inline">erl(1)</code></a>.</p><p>As·an·example,·suppose·that·you·want·to·start·a·slave·node·at·host·<code·class="inline">H</code>·with·node530 <a·href="../../../../erts-15.0.1/doc/html/erl_cmd.html"><code·class="inline">erl(1)</code></a>.</p><p>As·an·example,·suppose·that·you·want·to·start·a·slave·node·at·host·<code·class="inline">H</code>·with·node
531 name·<code·class="inline">Name@H</code>·and·want·the·slave·node·to·have·the·following·properties:</p><ul><li>Directory·<code·class="inline">Dir</code>·is·to·be·added·to·the·code·path.</li><li>The·Mnesia·directory·is·to·be·set·to·<code·class="inline">M</code>.</li><li>The·Unix·<code·class="inline">DISPLAY</code>·environment·variable·is·to·be·set·to·the·display·of·the531 name·<code·class="inline">Name@H</code>·and·want·the·slave·node·to·have·the·following·properties:</p><ul><li>Directory·<code·class="inline">Dir</code>·is·to·be·added·to·the·code·path.</li><li>The·Mnesia·directory·is·to·be·set·to·<code·class="inline">M</code>.</li><li>The·Unix·<code·class="inline">DISPLAY</code>·environment·variable·is·to·be·set·to·the·display·of·the
532 master·node.</li></ul><p>The·following·code·is·executed·to·achieve·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;·-env·DISPLAY·&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nc">net_adm</span><span·class="p">:</span><span·class="nf">localhost</span><span·class="p"·data-group-id="9090488684-1">(</span><span·class="p"·data-group-id="9090488684-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;:0·&quot;</span><span·class="p">,</span><span·class="w">532 master·node.</li></ul><p>The·following·code·is·executed·to·achieve·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;·-env·DISPLAY·&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nc">net_adm</span><span·class="p">:</span><span·class="nf">localhost</span><span·class="p"·data-group-id="3589092660-1">(</span><span·class="p"·data-group-id="3589092660-1">)</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;:0·&quot;</span><span·class="p">,</span><span·class="w">
533 </span><span·class="n">Arg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;-mnesia_dir·&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;·-pa·&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">E</span><span·class="p">,</span><span·class="w">533 </span><span·class="n">Arg</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;-mnesia_dir·&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">M</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="s">&quot;·-pa·&quot;</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">Dir</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="n">E</span><span·class="p">,</span><span·class="w">
534 </span><span·class="nc">slave</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9090488684-2">(</span><span·class="n">H</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arg</span><span·class="p"·data-group-id="9090488684-2">)</span><span·class="p">.</span></code></pre><p>The·function·returns·<code·class="inline">{ok,·Node}</code>,·where·<code·class="inline">Node</code>·is·the·name·of·the·new·node,534 </span><span·class="nc">slave</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="3589092660-2">(</span><span·class="n">H</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Arg</span><span·class="p"·data-group-id="3589092660-2">)</span><span·class="p">.</span></code></pre><p>The·function·returns·<code·class="inline">{ok,·Node}</code>,·where·<code·class="inline">Node</code>·is·the·name·of·the·new·node,
535 otherwise·<code·class="inline">{error,·Reason}</code>,·where·<code·class="inline">Reason</code>·can·be·one·of:</p><ul><li><p><strong><code·class="inline">timeout</code></strong>·-·The·master·node·failed·to·get·in·contact·with·the·slave·node.535 otherwise·<code·class="inline">{error,·Reason}</code>,·where·<code·class="inline">Reason</code>·can·be·one·of:</p><ul><li><p><strong><code·class="inline">timeout</code></strong>·-·The·master·node·failed·to·get·in·contact·with·the·slave·node.
536 This·can·occur·in·a·number·of·circumstances:</p><ul><li>Erlang/OTP·is·not·installed·on·the·remote·host.</li><li>The·file·system·on·the·other·host·has·a·different·structure·to·the·the536 This·can·occur·in·a·number·of·circumstances:</p><ul><li>Erlang/OTP·is·not·installed·on·the·remote·host.</li><li>The·file·system·on·the·other·host·has·a·different·structure·to·the·the
537 master.</li><li>The·Erlang·nodes·have·different·cookies.</li></ul></li><li><p><strong><code·class="inline">no_rsh</code></strong>·-·No·remote·shell·program·was·found·on·the·computer.·Note·that537 master.</li><li>The·Erlang·nodes·have·different·cookies.</li></ul></li><li><p><strong><code·class="inline">no_rsh</code></strong>·-·No·remote·shell·program·was·found·on·the·computer.·Note·that
538 <code·class="inline">ssh</code>·is·used·by·default,·but·this·can·be·overridden·with·the·<code·class="inline">-rsh</code>·flag.</p></li><li><p><strong><code·class="inline">{already_running,·Node}</code></strong>·-·A·node·with·name·<code·class="inline">Name@Host</code>·already·exists.</p></li></ul>538 <code·class="inline">ssh</code>·is·used·by·default,·but·this·can·be·overridden·with·the·<code·class="inline">-rsh</code>·flag.</p></li><li><p><strong><code·class="inline">{already_running,·Node}</code></strong>·-·A·node·with·name·<code·class="inline">Name@Host</code>·already·exists.</p></li></ul>
539 ··</section>539 ··</section>
540 </section>540 </section>
541 <section·class="detail"·id="start_link/1">541 <section·class="detail"·id="start_link/1">
391 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/sofs.html
    
Offset 258, 19 lines modifiedOffset 258, 19 lines modified
258 However,·this·optimization·can·only·be·used·when·the·elements·of·the·unordered258 However,·this·optimization·can·only·be·used·when·the·elements·of·the·unordered
259 set·are·atomic·or·ordered·sets.·It·must·also·be·the·case·that·the·type·of·the259 set·are·atomic·or·ordered·sets.·It·must·also·be·the·case·that·the·type·of·the
260 elements·matches·some·clause·of·Fun·(the·type·of·the·created·set·is·the·result260 elements·matches·some·clause·of·Fun·(the·type·of·the·created·set·is·the·result
261 of·applying·Fun·to·the·type·of·the·given·set),·and·that·Fun·does·nothing·but261 of·applying·Fun·to·the·type·of·the·given·set),·and·that·Fun·does·nothing·but
262 selecting,·duplicating,·or·rearranging·parts·of·the·elements.</li><li>Specifying·a·SetFun·as·an·integer·I·is·equivalent·to·specifying262 selecting,·duplicating,·or·rearranging·parts·of·the·elements.</li><li>Specifying·a·SetFun·as·an·integer·I·is·equivalent·to·specifying
263 <code·class="inline">{external,·fun(X) -&gt;·element(I, X) end}</code>,·but·is·to·be·preferred,·as·it·makes263 <code·class="inline">{external,·fun(X) -&gt;·element(I, X) end}</code>,·but·is·to·be·preferred,·as·it·makes
264 it·possible·to·handle·this·case·even·more·efficiently.</li></ul><p>Examples·of·SetFuns:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">fun</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="ss">union</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">264 it·possible·to·handle·this·case·even·more·efficiently.</li></ul><p>Examples·of·SetFuns:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="k">fun</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="ss">union</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">
265 </span><span·class="nf">fun</span><span·class="p"·data-group-id="6898213780-1">(</span><span·class="n">S</span><span·class="p"·data-group-id="6898213780-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">partition</s[·...·truncated·by·diffoscope;·len:·195,·SHA:·e0f8c92de05bc53fe85a66b6ca724c33cc1e02e0c80cbc2b12b15410bca34b7a·...·]-2">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">265 </span><span·class="nf">fun</span><span·class="p"·data-group-id="1765229605-1">(</span><span·class="n">S</span><span·class="p"·data-group-id="1765229605-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">partition</s[·...·truncated·by·diffoscope;·len:·195,·SHA:·96757d6e96a290752fc1dbc676c9748adbadff7ba95318af41d0c33333c24a90·...·]-2">)</span><span·class="w">·</span><span·class="k">end</span><span·class="w">
266 </span><span·class="p"·data-group-id="6898213780-3">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6898213780-4">(</span><span·class="n">A</span><span·class="p"·data-group-id="6898213780-4">)</sp[·...·truncated·by·diffoscope;·len:·194,·SHA:·bb510a4936d278f536dd8ce11d2d4901a4e86cd5f8efb8fcb2cc05291d74c153·...·]-3">}</span><span·class="w">266 </span><span·class="p"·data-group-id="1765229605-3">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1765229605-4">(</span><span·class="n">A</span><span·class="p"·data-group-id="1765229605-4">)</sp[·...·truncated·by·diffoscope;·len:·194,·SHA:·2c182b561919bd8e23c6a4bda33ca17c84ae269f86242f786e196819eb051200·...·]-3">}</span><span·class="w">
267 </span><span·class="p"·data-group-id="6898213780-5">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6898213780-6">(</span><span·class="p"·data-group-id="6898213780-7">{</span><span·class="n">A</sp[·...·truncated·by·diffoscope;·len:·550,·SHA:·5043c2cc03bdf4370cbe2b2f7fbe7461a97b8400aefe7135da4c769b15618fa1·...·]-5">}</span><span·class="w">267 </span><span·class="p"·data-group-id="1765229605-5">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1765229605-6">(</span><span·class="p"·data-group-id="1765229605-7">{</span><span·class="n">A</sp[·...·truncated·by·diffoscope;·len:·550,·SHA:·2d393ad10dab97c3ae8a7d456349ab3d474b70f0db32e2b2b73bb5c9b0aec054·...·]-5">}</span><span·class="w">
268 </span><span·class="p"·data-group-id="6898213780-9">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6898213780-10">(</span><span·class="p"·data-group-id="6898213780-11">{</span><span·class="p">_</[·...·truncated·by·diffoscope;·len:·508,·SHA:·1ad3e8490a58441e51a0433ba54ee280a51a37e2987f71a7b5fddb773cf670e8·...·]-9">}</span><span·class="w">268 </span><span·class="p"·data-group-id="1765229605-9">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1765229605-10">(</span><span·class="p"·data-group-id="1765229605-11">{</span><span·class="p">_</[·...·truncated·by·diffoscope;·len:·508,·SHA:·cb897e6f443ae0e4903bf44c2c554da4eef892d8a18a3003dde89efffde8ab36·...·]-9">}</span><span·class="w">
269 </span><span·class="p"·data-group-id="6898213780-13">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6898213780-14">(</span><span·class="p"·data-group-id="6898213780-15">{</span><span·class="p">_<[·...·truncated·by·diffoscope;·len:·1025,·SHA:·e09cbcba39c23644963b5c8789da0841fe03b878f85203f06fb91093f0bd7285·...·]-13">}</span><span·class="w">269 </span><span·class="p"·data-group-id="1765229605-13">{</span><span·class="ss">external</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1765229605-14">(</span><span·class="p"·data-group-id="1765229605-15">{</span><span·class="p">_<[·...·truncated·by·diffoscope;·len:·1025,·SHA:·87d662b4e9345c4e9f85bd3ec1ba9a70f9b621f650eb20c5e057a9346d077065·...·]-13">}</span><span·class="w">
270 </span><span·class="mi">2</span></code></pre><p>The·order·in·which·a·SetFun·is·applied·to·the·elements·of·an·unordered·set·is270 </span><span·class="mi">2</span></code></pre><p>The·order·in·which·a·SetFun·is·applied·to·the·elements·of·an·unordered·set·is
271 not·specified,·and·can·change·in·future·versions·of·this·module.</p><p>The·execution·time·of·the·functions·of·this·module·is·dominated·by·the·time·it271 not·specified,·and·can·change·in·future·versions·of·this·module.</p><p>The·execution·time·of·the·functions·of·this·module·is·dominated·by·the·time·it
272 takes·to·sort·lists.·When·no·sorting·is·needed,·the·execution·time·is·in·the272 takes·to·sort·lists.·When·no·sorting·is·needed,·the·execution·time·is·in·the
273 worst·case·proportional·to·the·sum·of·the·sizes·of·the·input·arguments·and·the273 worst·case·proportional·to·the·sum·of·the·sizes·of·the·input·arguments·and·the
274 returned·value.·A·few·functions·execute·in·constant·time:·<a·href="#from_external/2"><code·class="inline">from_external/2</code></a>,274 returned·value.·A·few·functions·execute·in·constant·time:·<a·href="#from_external/2"><code·class="inline">from_external/2</code></a>,
275 <a·href="#is_empty_set/1"><code·class="inline">is_empty_set/1</code></a>,·<a·href="#is_set/1"><code·class="inline">is_set/1</code></a>,·<a·href="#is_sofs_set/1"><code·class="inline">is_sofs_set/1</code></a>,·<a·href="#to_external/1"><code·class="inline">to_external/1</code></a>·<a·href="#type/1"><code·class="inline">type/1</code></a>.</p><p>The·functions·of·this·module·exit·the·process·with·a·<code·class="inline">badarg</code>,·<code·class="inline">bad_function</code>,275 <a·href="#is_empty_set/1"><code·class="inline">is_empty_set/1</code></a>,·<a·href="#is_set/1"><code·class="inline">is_set/1</code></a>,·<a·href="#is_sofs_set/1"><code·class="inline">is_sofs_set/1</code></a>,·<a·href="#to_external/1"><code·class="inline">to_external/1</code></a>·<a·href="#type/1"><code·class="inline">type/1</code></a>.</p><p>The·functions·of·this·module·exit·the·process·with·a·<code·class="inline">badarg</code>,·<code·class="inline">bad_function</code>,
276 or·<code·class="inline">type_mismatch</code>·message·when·given·badly·formed·arguments·or·sets·the·types276 or·<code·class="inline">type_mismatch</code>·message·when·given·badly·formed·arguments·or·sets·the·types
Offset 1828, 18 lines modifiedOffset 1828, 18 lines modified
  
1828 ······</div>1828 ······</div>
  
1829 <p>Returns·the·binary·relation·containing·the·elements·(E, Set)·such·that·Set1829 <p>Returns·the·binary·relation·containing·the·elements·(E, Set)·such·that·Set
1830 belongs·to·<code·class="inline">SetOfSets</code>·and·E·belongs·to·Set.</p><p>If·<code·class="inline">SetOfSets</code>·is·a·<a·href="sofs.html#partition">partition</a>·of·a·set·X·and·R·is·the1830 belongs·to·<code·class="inline">SetOfSets</code>·and·E·belongs·to·Set.</p><p>If·<code·class="inline">SetOfSets</code>·is·a·<a·href="sofs.html#partition">partition</a>·of·a·set·X·and·R·is·the
1831 equivalence·relation·in·X·induced·by·<code·class="inline">SetOfSets</code>,·then·the·returned·relation·is·the1831 equivalence·relation·in·X·induced·by·<code·class="inline">SetOfSets</code>,·then·the·returned·relation·is·the
1832 <a·href="sofs.html#canonical_map">canonical·map</a>·from·X·onto·the·equivalence·classes·with1832 <a·href="sofs.html#canonical_map">canonical·map</a>·from·X·onto·the·equivalence·classes·with
1833 respect·to·R.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Ss</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">from_term</span><span·class="p"·data-group-id="9516103039-1">(</span><span·class="p"·data-group-id="9516103039-2">[</span><span·class="p"·data-group-id="9516103039-3">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="9516103039-3">]</span><[·...·truncated·by·diffoscope;·len:·297,·SHA:·c365c4abd4d9a77e79a5b894082c09863b717f99b927882ded69f7df7abc7330·...·]-1">)</span><span·class="p">,</span><span·class="w">1833 respect·to·R.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Ss</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">from_term</span><span·class="p"·data-group-id="1100424240-1">(</span><span·class="p"·data-group-id="1100424240-2">[</span><span·class="p"·data-group-id="1100424240-3">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="1100424240-3">]</span><[·...·truncated·by·diffoscope;·len:·297,·SHA:·26779db117b00874cae08205f963301cee9b84811927ce679cccd20279bddc2e·...·]-1">)</span><span·class="p">,</span><span·class="w">
1834 </span><span·class="n">CR</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">canonical_relation</span><span·class="p"·data-group-id="9516103039-5">(</span><span·class="n">Ss</span><span·class="p"·data-group-id="9516103039-5">)</span><span·class="p">,</span><span·class="w">1834 </span><span·class="n">CR</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">canonical_relation</span><span·class="p"·data-group-id="1100424240-5">(</span><span·class="n">Ss</span><span·class="p"·data-group-id="1100424240-5">)</span><span·class="p">,</span><span·class="w">
1835 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="9516103039-6">(</span><span·class="n">CR</span><span·class="p"·data-group-id="9516103039-6">)</span><span·class="p">.</span><span·class="w">1835 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="1100424240-6">(</span><span·class="n">CR</span><span·class="p"·data-group-id="1100424240-6">)</span><span·class="p">.</span><span·class="w">
1836 </span><span·class="p"·data-group-id="9516103039-7">[</span><span·class="p"·data-group-id="9516103039-8">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="p"·data-group-id="9516103039-9">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span[·...·truncated·by·diffoscope;·len:·1231,·SHA:·9c6d7173d992760602317bac620bebfcf38ae6e6ce0a97acaea0cbfc847f247a·...·]-7">]</span></code></pre>1836 </span><span·class="p"·data-group-id="1100424240-7">[</span><span·class="p"·data-group-id="1100424240-8">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="p"·data-group-id="1100424240-9">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span[·...·truncated·by·diffoscope;·len:·1231,·SHA:·3824f49a22c6bda79e1fa6ed028adb4979859c17c8f5b67c76cae479f36a12de·...·]-7">]</span></code></pre>
1837 ··</section>1837 ··</section>
1838 </section>1838 </section>
1839 <section·class="detail"·id="composite/2">1839 <section·class="detail"·id="composite/2">
  
1840 ··<div·class="detail-header">1840 ··<div·class="detail-header">
1841 ····<a·href="#composite/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1841 ····<a·href="#composite/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1842 ······<i·class="ri-link-m"·aria-hidden="true"></i>1842 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1861, 19 lines modifiedOffset 1861, 19 lines modified
  
1861 ··········<pre·translate="no"><span·class="attribute">-spec</span>·composite(Function1,·Function2)·->·Function31861 ··········<pre·translate="no"><span·class="attribute">-spec</span>·composite(Function1,·Function2)·->·Function3
1862 ···················when·Function1·::·<a·href="#t:a_function/0">a_function</a>(),·Function2·::·<a·href="#t:a_function/0">a_function</a>(),·Function3·::·<a·href="#t:a_function/0">a_function</a>().</pre>1862 ···················when·Function1·::·<a·href="#t:a_function/0">a_function</a>(),·Function2·::·<a·href="#t:a_function/0">a_function</a>(),·Function3·::·<a·href="#t:a_function/0">a_function</a>().</pre>
  
1863 ······</div>1863 ······</div>
  
1864 <p>Returns·the·<a·href="sofs.html#composite">composite</a>·of·the·functions·<code·class="inline">Function1</code>·and1864 <p>Returns·the·<a·href="sofs.html#composite">composite</a>·of·the·functions·<code·class="inline">Function1</code>·and
1865 <code·class="inline">Function2</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">F1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">a_function</span><span·class="p"·data-group-id="7627848121-1">(</span><span·class="p"·data-group-id="7627848121-2">[</span><span·class="p"·data-group-id="7627848121-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7627848121-3">}</span><[·...·truncated·by·diffoscope;·len:·501,·SHA:·7620e4e194104141343817816d844b21e145a0af4d4215d0f0e5c777518afee1·...·]-1">)</span><span·class="p">,</span><span·class="w">1865 <code·class="inline">Function2</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">F1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">a_function</span><span·class="p"·data-group-id="1893780356-1">(</span><span·class="p"·data-group-id="1893780356-2">[</span><span·class="p"·data-group-id="1893780356-3">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="1893780356-3">}</span><[·...·truncated·by·diffoscope;·len:·501,·SHA:·f2ff13d8e0eaaf47d7ccec4f06b057f3f118212b3ee86c818e707915faba4b70·...·]-1">)</span><span·class="p">,</span><span·class="w">
1866 </span><span·class="n">F2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">a_function</span><span·class="p"·data-group-id="7627848121-6">(</span><span·class="p"·data-group-id="7627848121-7">[</span><span·class="p"·data-group-id="7627848121-8">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">x</span><span·class="p"·data-group-id="7627848121-8">}</span><[·...·truncated·by·diffoscope;·len:·503,·SHA:·2e9fca46970170dbe01bd5fd63b9f5062b9b21903d41e57f6a587a0ffdc1e7cb·...·]-6">)</span><span·class="p">,</span><span·class="w">1866 </span><span·class="n">F2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">a_function</span><span·class="p"·data-group-id="1893780356-6">(</span><span·class="p"·data-group-id="1893780356-7">[</span><span·class="p"·data-group-id="1893780356-8">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">x</span><span·class="p"·data-group-id="1893780356-8">}</span><[·...·truncated·by·diffoscope;·len:·503,·SHA:·0ede35257bd4245e1b647422d1fe83a6f532a207edf76b2169448bcff3e42e6a·...·]-6">)</span><span·class="p">,</span><span·class="w">
1867 </span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">composite</span><span·class="p"·data-group-id="7627848121-11">(</span><span·class="n">F1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F2</span><span·class="p"·data-group-id="7627848121-11">)</span><span·class="p">,</span><span·class="w">1867 </span><span·class="n">F</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">composite</span><span·class="p"·data-group-id="1893780356-11">(</span><span·class="n">F1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">F2</span><span·class="p"·data-group-id="1893780356-11">)</span><span·class="p">,</span><span·class="w">
1868 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="7627848121-12">(</span><span·class="n">F</span><span·class="p"·data-group-id="7627848121-12">)</span><span·class="p">.</span><span·class="w">1868 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="1893780356-12">(</span><span·class="n">F</span><span·class="p"·data-group-id="1893780356-12">)</span><span·class="p">.</span><span·class="w">
1869 </span><span·class="p"·data-group-id="7627848121-13">[</span><span·class="p"·data-group-id="7627848121-14">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">x</span><span·class="p"·data-group-id="7627848121-14">}</span><span·class="p">,</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·402,·SHA:·0f7c394cfa6785d31c30c6a907d5539dc5769b23204c8dbb0160f4f1528bdbed·...·]-13">]</span></code></pre>1869 </span><span·class="p"·data-group-id="1893780356-13">[</span><span·class="p"·data-group-id="1893780356-14">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">x</span><span·class="p"·data-group-id="1893780356-14">}</span><span·class="p">,</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·402,·SHA:·062bbac23d9ff6139b7f37dc90e7cf3de01b937fa8899722be8124132be19792·...·]-13">]</span></code></pre>
1870 ··</section>1870 ··</section>
1871 </section>1871 </section>
1872 <section·class="detail"·id="constant_function/2">1872 <section·class="detail"·id="constant_function/2">
  
1873 ··<div·class="detail-header">1873 ··<div·class="detail-header">
1874 ····<a·href="#constant_function/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1874 ····<a·href="#constant_function/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1875 ······<i·class="ri-link-m"·aria-hidden="true"></i>1875 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1895, 19 lines modifiedOffset 1895, 19 lines modified
  
1895 ··········<pre·translate="no"><span·class="attribute">-spec</span>·constant_function(Set,·AnySet)·->·Function1895 ··········<pre·translate="no"><span·class="attribute">-spec</span>·constant_function(Set,·AnySet)·->·Function
1896 ···························when·AnySet·::·<a·href="#t:anyset/0">anyset</a>(),·Function·::·<a·href="#t:a_function/0">a_function</a>(),·Set·::·<a·href="#t:a_set/0">a_set</a>().</pre>1896 ···························when·AnySet·::·<a·href="#t:anyset/0">anyset</a>(),·Function·::·<a·href="#t:a_function/0">a_function</a>(),·Set·::·<a·href="#t:a_set/0">a_set</a>().</pre>
  
1897 ······</div>1897 ······</div>
  
1898 <p>Creates·the·<a·href="sofs.html#function">function</a>·that·maps·each·element·of·set·<code·class="inline">Set</code>1898 <p>Creates·the·<a·href="sofs.html#function">function</a>·that·maps·each·element·of·set·<code·class="inline">Set</code>
1899 onto·<code·class="inline">AnySet</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">S</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="4738244147-1">(</span><span·class="p"·data-group-id="4738244147-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="4738244147-2">]</span><span·class="p"·data-group-id="4738244147-1">)</span><span·class="p">,</span><span·class="w">1899 onto·<code·class="inline">AnySet</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">S</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="3960826783-1">(</span><span·class="p"·data-group-id="3960826783-2">[</span><span·class="ss">a</span><span·class="p">,</span><span·class="ss">b</span><span·class="p"·data-group-id="3960826783-2">]</span><span·class="p"·data-group-id="3960826783-1">)</span><span·class="p">,</span><span·class="w">
1900 </span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">from_term</span><span·class="p"·data-group-id="4738244147-3">(</span><span·class="mi">1</span><span·class="p"·data-group-id="4738244147-3">)</span><span·class="p">,</span><span·class="w">1900 </span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">from_term</span><span·class="p"·data-group-id="3960826783-3">(</span><span·class="mi">1</span><span·class="p"·data-group-id="3960826783-3">)</span><span·class="p">,</span><span·class="w">
1901 </span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">constant_function</span><span·class="p"·data-group-id="4738244147-4">(</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="4738244147-4">)</span><span·class="p">,</span><span·class="w">1901 </span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">constant_function</span><span·class="p"·data-group-id="3960826783-4">(</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="3960826783-4">)</span><span·class="p">,</span><span·class="w">
1902 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="4738244147-5">(</span><span·class="n">R</span><span·class="p"·data-group-id="4738244147-5">)</span><span·class="p">.</span><span·class="w">1902 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="3960826783-5">(</span><span·class="n">R</span><span·class="p"·data-group-id="3960826783-5">)</span><span·class="p">.</span><span·class="w">
1903 </span><span·class="p"·data-group-id="4738244147-6">[</span><span·class="p"·data-group-id="4738244147-7">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4738244147-7">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·aece4a6cfc860350979ea393a2b307acae5c8ec8363a799b5e8268c2aef16ec9·...·]-6">]</span></code></pre>1903 </span><span·class="p"·data-group-id="3960826783-6">[</span><span·class="p"·data-group-id="3960826783-7">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3960826783-7">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·191,·SHA:·76d140fe256c2a8d998810dde19906a8021b88d73ad58ebcbcc40d43982d83b3·...·]-6">]</span></code></pre>
1904 ··</section>1904 ··</section>
1905 </section>1905 </section>
1906 <section·class="detail"·id="converse/1">1906 <section·class="detail"·id="converse/1">
  
1907 ··<div·class="detail-header">1907 ··<div·class="detail-header">
1908 ····<a·href="#converse/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1908 ····<a·href="#converse/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1909 ······<i·class="ri-link-m"·aria-hidden="true"></i>1909 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1927, 18 lines modifiedOffset 1927, 18 lines modified
  
1927 ······<div·class="specs">1927 ······<div·class="specs">
  
1928 ··········<pre·translate="no"><span·class="attribute">-spec</span>·converse(BinRel1)·->·BinRel2·when·BinRel1·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·BinRel2·::·<a·href="#t:binary_relation/0">binary_relation</a>().</pre>1928 ··········<pre·translate="no"><span·class="attribute">-spec</span>·converse(BinRel1)·->·BinRel2·when·BinRel1·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·BinRel2·::·<a·href="#t:binary_relation/0">binary_relation</a>().</pre>
  
1929 ······</div>1929 ······</div>
  
1930 <p>Returns·the·<a·href="sofs.html#converse">converse</a>·of·the·binary·relation·<code·class="inline">BinRel1</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">relation</span><span·class="p"·data-group-id="3532995806-1">(</span><span·class="p"·data-group-id="3532995806-2">[</span><span·class="p"·data-group-id="3532995806-3">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="3532995806-3">}</span><[·...·truncated·by·diffoscope;·len:·501,·SHA:·e8f7ca2fa59849e1c5c2d4321dd54df7b078cb640becf1178db10ec2c50b0f5a·...·]-1">)</span><span·class="p">,</span><span·class="w">1930 <p>Returns·the·<a·href="sofs.html#converse">converse</a>·of·the·binary·relation·<code·class="inline">BinRel1</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">relation</span><span·class="p"·data-group-id="1673869259-1">(</span><span·class="p"·data-group-id="1673869259-2">[</span><span·class="p"·data-group-id="1673869259-3">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="1673869259-3">}</span><[·...·truncated·by·diffoscope;·len:·501,·SHA:·2661cc27450ae0b6ce4d63b1dc7c35cb332201d0ed429d52095fc5d8f7e9341d·...·]-1">)</span><span·class="p">,</span><span·class="w">
1931 </span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">converse</span><span·class="p"·data-group-id="3532995806-6">(</span><span·class="n">R1</span><span·class="p"·data-group-id="3532995806-6">)</span><span·class="p">,</span><span·class="w">1931 </span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">converse</span><span·class="p"·data-group-id="1673869259-6">(</span><span·class="n">R1</span><span·class="p"·data-group-id="1673869259-6">)</span><span·class="p">,</span><span·class="w">
1932 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="3532995806-7">(</span><span·class="n">R2</span><span·class="p"·data-group-id="3532995806-7">)</span><span·class="p">.</span><span·class="w">1932 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="1673869259-7">(</span><span·class="n">R2</span><span·class="p"·data-group-id="1673869259-7">)</span><span·class="p">.</span><span·class="w">
1933 </span><span·class="p"·data-group-id="3532995806-8">[</span><span·class="p"·data-group-id="3532995806-9">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3532995806-9">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·399,·SHA:·22b74d77de9140760c4556117f09cf648c5a4ec23b419550c88f7c9c9f9ba346·...·]-8">]</span></code></pre>1933 </span><span·class="p"·data-group-id="1673869259-8">[</span><span·class="p"·data-group-id="1673869259-9">{</span><span·class="ss">a</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="1673869259-9">}</span><span·class="p">,</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·399,·SHA:·ae64ece73e6da17e1cd58e945cc783ba1d34d6124ad8714c72fbe44a85fde5a7·...·]-8">]</span></code></pre>
1934 ··</section>1934 ··</section>
1935 </section>1935 </section>
1936 <section·class="detail"·id="difference/2">1936 <section·class="detail"·id="difference/2">
  
1937 ··<div·class="detail-header">1937 ··<div·class="detail-header">
1938 ····<a·href="#difference/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1938 ····<a·href="#difference/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1939 ······<i·class="ri-link-m"·aria-hidden="true"></i>1939 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 2048, 18 lines modifiedOffset 2048, 18 lines modified
  
2048 ······<div·class="specs">2048 ······<div·class="specs">
  
2049 ··········<pre·translate="no"><span·class="attribute">-spec</span>·domain(BinRel)·->·Set·when·BinRel·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·Set·::·<a·href="#t:a_set/0">a_set</a>().</pre>2049 ··········<pre·translate="no"><span·class="attribute">-spec</span>·domain(BinRel)·->·Set·when·BinRel·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·Set·::·<a·href="#t:a_set/0">a_set</a>().</pre>
  
2050 ······</div>2050 ······</div>
  
2051 <p>Returns·the·<a·href="sofs.html#domain">domain</a>·of·the·binary·relation·<code·class="inline">BinRel</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">relation</span><span·class="p"·data-group-id="2072940923-1">(</span><span·class="p"·data-group-id="2072940923-2">[</span><span·class="p"·data-group-id="2072940923-3">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="2072940923-3">}</span><s[·...·truncated·by·diffoscope;·len:·704,·SHA:·ec5ac71fdd833d0b2f03fe41653be332360f969fd0f89124f1108911f1072183·...·]-1">)</span><span·class="p">,</span><span·class="w">2051 <p>Returns·the·<a·href="sofs.html#domain">domain</a>·of·the·binary·relation·<code·class="inline">BinRel</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">relation</span><span·class="p"·data-group-id="2753622198-1">(</span><span·class="p"·data-group-id="2753622198-2">[</span><span·class="p"·data-group-id="2753622198-3">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="2753622198-3">}</span><s[·...·truncated·by·diffoscope;·len:·704,·SHA:·372dc1eba16ed2a7e5e79bcf5397aa1e84ce1b836f49e498c4622989a5ff02f3·...·]-1">)</span><span·class="p">,</span><span·class="w">
2052 </span><span·class="n">S</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">domain</span><span·class="p"·data-group-id="2072940923-7">(</span><span·class="n">R</span><span·class="p"·data-group-id="2072940923-7">)</span><span·class="p">,</span><span·class="w">2052 </span><span·class="n">S</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">domain</span><span·class="p"·data-group-id="2753622198-7">(</span><span·class="n">R</span><span·class="p"·data-group-id="2753622198-7">)</span><span·class="p">,</span><span·class="w">
2053 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="2072940923-8">(</span><span·class="n">S</span><span·class="p"·data-group-id="2072940923-8">)</span><span·class="p">.</span><span·class="w">2053 </span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">to_external</span><span·class="p"·data-group-id="2753622198-8">(</span><span·class="n">S</span><span·class="p"·data-group-id="2753622198-8">)</span><span·class="p">.</span><span·class="w">
2054 </span><span·class="p"·data-group-id="2072940923-9">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2072940923-9">]</span></code></pre>2054 </span><span·class="p"·data-group-id="2753622198-9">[</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="2753622198-9">]</span></code></pre>
2055 ··</section>2055 ··</section>
2056 </section>2056 </section>
2057 <section·class="detail"·id="drestriction/2">2057 <section·class="detail"·id="drestriction/2">
  
2058 ··<div·class="detail-header">2058 ··<div·class="detail-header">
2059 ····<a·href="#drestriction/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">2059 ····<a·href="#drestriction/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
2060 ······<i·class="ri-link-m"·aria-hidden="true"></i>2060 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 2081, 19 lines modifiedOffset 2081, 19 lines modified
  
2081 ··········<pre·translate="no"><span·class="attribute">-spec</span>·drestriction(BinRel1,·Set)·->·BinRel22081 ··········<pre·translate="no"><span·class="attribute">-spec</span>·drestriction(BinRel1,·Set)·->·BinRel2
2082 ······················when·BinRel1·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·BinRel2·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·Set·::·<a·href="#t:a_set/0">a_set</a>().</pre>2082 ······················when·BinRel1·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·BinRel2·::·<a·href="#t:binary_relation/0">binary_relation</a>(),·Set·::·<a·href="#t:a_set/0">a_set</a>().</pre>
  
2083 ······</div>2083 ······</div>
  
2084 <p>Returns·the·difference·between·the·binary·relation·<code·class="inline">BinRel1</code>·and·the2084 <p>Returns·the·difference·between·the·binary·relation·<code·class="inline">BinRel1</code>·and·the
2085 <a·href="sofs.html#restriction">restriction</a>·of·<code·class="inline">BinRel1</code>·to·<code·class="inline">Set</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">relation</span><span·class="p"·data-group-id="2025512906-1">(</span><span·class="p"·data-group-id="2025512906-2">[</span><span·class="p"·data-group-id="2025512906-3">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="2025512906-3">}</span><[·...·truncated·by·diffoscope;·len:·501,·SHA:·23eb1d14816a8e8ae165556d4fe10b620670904507415ff22ef3fc17b95ecc90·...·]-1">)</span><span·class="p">,</span><span·class="w">2085 <a·href="sofs.html#restriction">restriction</a>·of·<code·class="inline">BinRel1</code>·to·<code·class="inline">Set</code>.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">R1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">relation</span><span·class="p"·data-group-id="7994736302-1">(</span><span·class="p"·data-group-id="7994736302-2">[</span><span·class="p"·data-group-id="7994736302-3">{</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">a</span><span·class="p"·data-group-id="7994736302-3">}</span><[·...·truncated·by·diffoscope;·len:·501,·SHA:·0bec9a7bd2e6e7218d768d3161a60266910d434cdc55798a3f4c48fc949b8838·...·]-1">)</span><span·class="p">,</span><span·class="w">
2086 </span><span·class="n">S</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="2025512906-6">(</span><span·class="p"·data-group-id="2025512906-7">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="2025512906-7">]</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·718848072b45fdb8baa49b51c7d6be0dbfa2d17c7620b76fa87507f241d4fdd1·...·]-6">)</span><span·class="p">,</span><span·class="w">2086 </span><span·class="n">S</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">set</span><span·class="p"·data-group-id="7994736302-6">(</span><span·class="p"·data-group-id="7994736302-7">[</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7994736302-7">]</span><span[·...·truncated·by·diffoscope;·len:·36,·SHA:·c4356c5b391b55f531d4afbb5f6ab13d024ca20cf1e4998fdb29e7826dd70493·...·]-6">)</span><span·class="p">,</span><span·class="w">
2087 </span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">drestriction</span><span·class="p"·data-group-id="2025512906-8">(</span><span·class="n">R1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class="p"·data-group-id="2025512906-8">)</span><span·class="p">,</span><span·class="w">2087 </span><span·class="n">R2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">sofs</span><span·class="p">:</span><span·class="nf">drestriction</span><span·class="p"·data-group-id="7994736302-8">(</span><span·class="n">R1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">S</span><span·class="p"·data-group-id="7994736302-8">)</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 352554/400647 bytes (88.00%) of diff not shown.
3.92 MB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/stdlib.epub
13.0 KB
zipinfo {}
Max HTML report size reached
245 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
32.8 KB
OEBPS/zip.xhtml
Max HTML report size reached
38.6 KB
OEBPS/uri_string_usage.xhtml
Max HTML report size reached
81.9 KB
OEBPS/uri_string.xhtml
Max HTML report size reached
150 KB
OEBPS/unicode_usage.xhtml
Max HTML report size reached
33.5 KB
OEBPS/unicode.xhtml
Max HTML report size reached
19.3 KB
OEBPS/timer.xhtml
Max HTML report size reached
12.9 KB
OEBPS/supervisor.xhtml
Max HTML report size reached
139 KB
OEBPS/string.xhtml
Max HTML report size reached
8.32 KB
OEBPS/stdlib_app.xhtml
Max HTML report size reached
391 KB
OEBPS/sofs.xhtml
Max HTML report size reached
7.92 KB
OEBPS/slave.xhtml
Max HTML report size reached
2.9 KB
OEBPS/shell_default.xhtml
    
Offset 20, 18 lines modifiedOffset 20, 18 lines modified
20 ····<h1·id="content">20 ····<h1·id="content">
21 shell_default·21 shell_default·
22 ····</h1>22 ····</h1>
  
  
23 ······<section·id="moduledoc"·class="docstring">23 ······<section·id="moduledoc"·class="docstring">
24 <p>Customizing·the·Erlang·environment.</p><p>The·functions·in·this·module·are·called·when·no·module·name·is·specified·in·a24 <p>Customizing·the·Erlang·environment.</p><p>The·functions·in·this·module·are·called·when·no·module·name·is·specified·in·a
25 shell·command.</p><p>Consider·the·following·shell·dialog:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">1&gt;·</samp><samp·class="nc">lists</samp><samp·class="p">:</samp><samp·class="nf">reverse</samp><samp·class="p"·data-group-id="7015128581-1">(</samp><samp·class="s">&quot;abc&quot;</samp><samp·class="p"·data-group-id="7015128581-1">)</samp><samp·class="p">.</samp><samp·class="w">25 shell·command.</p><p>Consider·the·following·shell·dialog:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="gp·unselectable">1&gt;·</samp><samp·class="nc">lists</samp><samp·class="p">:</samp><samp·class="nf">reverse</samp><samp·class="p"·data-group-id="2273493043-1">(</samp><samp·class="s">&quot;abc&quot;</samp><samp·class="p"·data-group-id="2273493043-1">)</samp><samp·class="p">.</samp><samp·class="w">
26 </samp><samp·class="s">&quot;cba&quot;</samp><samp·class="gp·unselectable">26 </samp><samp·class="s">&quot;cba&quot;</samp><samp·class="gp·unselectable">
27 2&gt;·</samp><samp·class="nf">c</samp><samp·class="p"·data-group-id="7015128581-2">(</samp><samp·class="ss">foo</samp><samp·class="p"·data-group-id="7015128581-2">)</samp><samp·class="p">.</samp><samp·class="w">27 2&gt;·</samp><samp·class="nf">c</samp><samp·class="p"·data-group-id="2273493043-2">(</samp><samp·class="ss">foo</samp><samp·class="p"·data-group-id="2273493043-2">)</samp><samp·class="p">.</samp><samp·class="w">
28 </samp><samp·class="p"·data-group-id="7015128581-3">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">foo</samp><samp·class="p"·data-group-id="7015128581-3">}</samp></code></pre><p>In·command·one,·module·<a·href="lists.xhtml"><code·class="inline">lists</code></a>·is·called.·In·command·two,·no·module·name·is28 </samp><samp·class="p"·data-group-id="2273493043-3">{</samp><samp·class="ss">ok</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="ss">foo</samp><samp·class="p"·data-group-id="2273493043-3">}</samp></code></pre><p>In·command·one,·module·<a·href="lists.xhtml"><code·class="inline">lists</code></a>·is·called.·In·command·two,·no·module·name·is
29 specified.·The·shell·searches·module·<code·class="inline">user_default</code>·followed·by·module29 specified.·The·shell·searches·module·<code·class="inline">user_default</code>·followed·by·module
30 <code·class="inline">shell_default</code>·for·function·<code·class="inline">c/1</code>.</p><p><code·class="inline">shell_default</code>·is·intended·for·&quot;system·wide&quot;·customizations·to·the·shell.30 <code·class="inline">shell_default</code>·for·function·<code·class="inline">c/1</code>.</p><p><code·class="inline">shell_default</code>·is·intended·for·&quot;system·wide&quot;·customizations·to·the·shell.
31 <code·class="inline">user_default</code>·is·intended·for·&quot;local&quot;·or·individual·user·customizations.</p><h2·id="module-hint"·class="section-heading">31 <code·class="inline">user_default</code>·is·intended·for·&quot;local&quot;·or·individual·user·customizations.</p><h2·id="module-hint"·class="section-heading">
32 ··<a·href="#module-hint"·class="hover-link">32 ··<a·href="#module-hint"·class="hover-link">
33 ····<i·class="ri-link-m"·aria-hidden="true"></i>33 ····<i·class="ri-link-m"·aria-hidden="true"></i>
34 ··</a>34 ··</a>
35 ··<span·class="text">Hint</span>35 ··<span·class="text">Hint</span>
73.0 KB
OEBPS/shell.xhtml
Max HTML report size reached
6.99 KB
OEBPS/sets.xhtml
Max HTML report size reached
108 KB
OEBPS/re.xhtml
Max HTML report size reached
4.17 KB
OEBPS/random.xhtml
Max HTML report size reached
28.0 KB
OEBPS/rand.xhtml
Max HTML report size reached
159 KB
OEBPS/queue.xhtml
Max HTML report size reached
216 KB
OEBPS/qlc.xhtml
Max HTML report size reached
30.4 KB
OEBPS/proplists.xhtml
Max HTML report size reached
18.8 KB
OEBPS/proc_lib.xhtml
Max HTML report size reached
90.2 KB
OEBPS/peer.xhtml
Max HTML report size reached
123 KB
OEBPS/orddict.xhtml
Max HTML report size reached
24.3 KB
OEBPS/notes.xhtml
Max HTML report size reached
140 KB
OEBPS/ms_transform.xhtml
Max HTML report size reached
204 KB
OEBPS/maps.xhtml
Max HTML report size reached
164 KB
OEBPS/lists.xhtml
Max HTML report size reached
28.7 KB
OEBPS/json.xhtml
Max HTML report size reached
184 KB
OEBPS/io_protocol.xhtml
Max HTML report size reached
13.2 KB
OEBPS/io_lib.xhtml
Max HTML report size reached
366 KB
OEBPS/io.xhtml
Max HTML report size reached
56.5 KB
OEBPS/gen_statem.xhtml
Max HTML report size reached
11.9 KB
OEBPS/gen_server.xhtml
Max HTML report size reached
77.9 KB
OEBPS/gen_fsm.xhtml
Max HTML report size reached
11.9 KB
OEBPS/gen_event.xhtml
Max HTML report size reached
83.2 KB
OEBPS/filename.xhtml
Max HTML report size reached
5.99 KB
OEBPS/filelib.xhtml
Max HTML report size reached
18.7 KB
OEBPS/file_sorter.xhtml
Max HTML report size reached
119 KB
OEBPS/ets.xhtml
Max HTML report size reached
70.8 KB
OEBPS/escript.xhtml
Max HTML report size reached
13.1 KB
OEBPS/erl_tar.xhtml
Max HTML report size reached
2.35 KB
OEBPS/erl_scan.xhtml
    
Offset 27, 15 lines modifiedOffset 27, 15 lines modified
27 tokens.</p><h2·id="module-error-information"·class="section-heading">27 tokens.</p><h2·id="module-error-information"·class="section-heading">
28 ··<a·href="#module-error-information"·class="hover-link">28 ··<a·href="#module-error-information"·class="hover-link">
29 ····<i·class="ri-link-m"·aria-hidden="true"></i>29 ····<i·class="ri-link-m"·aria-hidden="true"></i>
30 ··</a>30 ··</a>
31 ··<span·class="text">Error·Information</span>31 ··<span·class="text">Error·Information</span>
32 </h2>32 </h2>
33 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O33 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O
34 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="3096269658-1">{</samp><samp·class="n">ErrorLocation</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="3096[·...·truncated·by·diffoscope;·len:·373,·SHA:·d1d96a2595c3ae902d616acbab2f89031ad2af51fe9ab649cce646eabbb048e0·...·]-1">)</samp></code></pre><h2·id="module-notes"·class="section-heading">34 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="5152387949-1">{</samp><samp·class="n">ErrorLocation</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="5152[·...·truncated·by·diffoscope;·len:·373,·SHA:·df03bc465f8c87e174b289d80c4f3c556a925af4b9cae608926999cd08899dad·...·]-1">)</samp></code></pre><h2·id="module-notes"·class="section-heading">
35 ··<a·href="#module-notes"·class="hover-link">35 ··<a·href="#module-notes"·class="hover-link">
36 ····<i·class="ri-link-m"·aria-hidden="true"></i>36 ····<i·class="ri-link-m"·aria-hidden="true"></i>
37 ··</a>37 ··</a>
38 ··<span·class="text">Notes</span>38 ··<span·class="text">Notes</span>
39 </h2>39 </h2>
40 <p>The·continuation·of·the·first·call·to·the·re-entrant·input·functions·must·be40 <p>The·continuation·of·the·first·call·to·the·re-entrant·input·functions·must·be
41 <code·class="inline">[]</code>.·For·a·complete·description·of·how·the·re-entrant·input·scheme·works,·see41 <code·class="inline">[]</code>.·For·a·complete·description·of·how·the·re-entrant·input·scheme·works,·see
2.49 KB
OEBPS/erl_parse.xhtml
    
Offset 29, 15 lines modifiedOffset 29, 15 lines modified
29 (see·the·<a·href="erl_scan.xhtml"><code·class="inline">erl_scan</code></a>)·module.</p><h2·id="module-error-information"·class="section-heading">29 (see·the·<a·href="erl_scan.xhtml"><code·class="inline">erl_scan</code></a>)·module.</p><h2·id="module-error-information"·class="section-heading">
30 ··<a·href="#module-error-information"·class="hover-link">30 ··<a·href="#module-error-information"·class="hover-link">
31 ····<i·class="ri-link-m"·aria-hidden="true"></i>31 ····<i·class="ri-link-m"·aria-hidden="true"></i>
32 ··</a>32 ··</a>
33 ··<span·class="text">Error·Information</span>33 ··<span·class="text">Error·Information</span>
34 </h2>34 </h2>
35 <p>ErrorInfo·is·the·standard·ErrorInfo·structure·that·is·returned·from·all·I/O·modules.35 <p>ErrorInfo·is·the·standard·ErrorInfo·structure·that·is·returned·from·all·I/O·modules.
36 The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="6969792341-1">{</samp><samp·class="n">ErrorLine</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="69697923[·...·truncated·by·diffoscope;·len:·369,·SHA:·f3e5df2c9786afeb4de4f8a00977a87a07e6d36810673585a85ab25ee3ed0b44·...·]-1">)</samp></code></pre><h2·id="module-see-also"·class="section-heading">36 The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="5781970209-1">{</samp><samp·class="n">ErrorLine</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="57819702[·...·truncated·by·diffoscope;·len:·369,·SHA:·fc3e586ac35fa6c96d4c841cff4899548048965b517bf9021111649c13451330·...·]-1">)</samp></code></pre><h2·id="module-see-also"·class="section-heading">
37 ··<a·href="#module-see-also"·class="hover-link">37 ··<a·href="#module-see-also"·class="hover-link">
38 ····<i·class="ri-link-m"·aria-hidden="true"></i>38 ····<i·class="ri-link-m"·aria-hidden="true"></i>
39 ··</a>39 ··</a>
40 ··<span·class="text">See·Also</span>40 ··<span·class="text">See·Also</span>
41 </h2>41 </h2>
42 <p><a·href="erl_anno.xhtml"><code·class="inline">erl_anno</code></a>,·<a·href="erl_scan.xhtml"><code·class="inline">erl_scan</code></a>,·<a·href="io.xhtml"><code·class="inline">io</code></a>,·section·<a·href="../../../../lib/../erts/doc/html/absform.xhtml">The·Abstract·Format</a>42 <p><a·href="erl_anno.xhtml"><code·class="inline">erl_anno</code></a>,·<a·href="erl_scan.xhtml"><code·class="inline">erl_scan</code></a>,·<a·href="io.xhtml"><code·class="inline">io</code></a>,·section·<a·href="../../../../lib/../erts/doc/html/absform.xhtml">The·Abstract·Format</a>
43 in·the·ERTS·User's·Guide.</p>43 in·the·ERTS·User's·Guide.</p>
2.34 KB
OEBPS/erl_lint.xhtml
    
Offset 30, 15 lines modifiedOffset 30, 15 lines modified
30 your·own·Erlang·compiler.</p><h2·id="module-error-information"·class="section-heading">30 your·own·Erlang·compiler.</p><h2·id="module-error-information"·class="section-heading">
31 ··<a·href="#module-error-information"·class="hover-link">31 ··<a·href="#module-error-information"·class="hover-link">
32 ····<i·class="ri-link-m"·aria-hidden="true"></i>32 ····<i·class="ri-link-m"·aria-hidden="true"></i>
33 ··</a>33 ··</a>
34 ··<span·class="text">Error·Information</span>34 ··<span·class="text">Error·Information</span>
35 </h2>35 </h2>
36 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O36 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O
37 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="6372996215-1">{</samp><samp·class="n">ErrorLine</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="63729962[·...·truncated·by·diffoscope;·len:·369,·SHA:·a1d15177222c3b417fbd728887b96afd67946e99bb765208ddd0db8ef19b4b9c·...·]-1">)</samp></code></pre><h2·id="module-see-also"·class="section-heading">37 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="9738969192-1">{</samp><samp·class="n">ErrorLine</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="97389691[·...·truncated·by·diffoscope;·len:·369,·SHA:·05c75d12c7ecbedb380301843b3357f042a2e3173bebef08615269c4588c152c·...·]-1">)</samp></code></pre><h2·id="module-see-also"·class="section-heading">
38 ··<a·href="#module-see-also"·class="hover-link">38 ··<a·href="#module-see-also"·class="hover-link">
39 ····<i·class="ri-link-m"·aria-hidden="true"></i>39 ····<i·class="ri-link-m"·aria-hidden="true"></i>
40 ··</a>40 ··</a>
41 ··<span·class="text">See·Also</span>41 ··<span·class="text">See·Also</span>
42 </h2>42 </h2>
43 <p><a·href="epp.xhtml"><code·class="inline">epp</code></a>,·<a·href="erl_parse.xhtml"><code·class="inline">erl_parse</code></a></p>43 <p><a·href="epp.xhtml"><code·class="inline">epp</code></a>,·<a·href="erl_parse.xhtml"><code·class="inline">erl_parse</code></a></p>
44 ······</section>44 ······</section>
8.31 KB
OEBPS/erl_eval.xhtml
Max HTML report size reached
25.7 KB
OEBPS/erl_error.xhtml
Max HTML report size reached
2.74 KB
OEBPS/epp.xhtml
    
Offset 31, 15 lines modifiedOffset 31, 15 lines modified
31 <code·class="inline">Latin-1</code>·and·<code·class="inline">UTF-8</code>,·where·the·case·of·the·characters·can·be·chosen·freely.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="c1">%%·coding:·utf-8</samp></code></pre><pre><code·class="makeup·erlang"·translate="no"><samp·class="c1">%%·For·this·file·we·have·chosen·encoding·=·Latin-1</samp></code></pre><pre><code·class="makeup·erlang"·translate="no"><samp·class="c1">%%·-*-·coding:·latin-1·-*-</samp></code></pre><h2·id="module-error-information"·class="section-heading">31 <code·class="inline">Latin-1</code>·and·<code·class="inline">UTF-8</code>,·where·the·case·of·the·characters·can·be·chosen·freely.</p><p><em>Examples:</em></p><pre><code·class="makeup·erlang"·translate="no"><samp·class="c1">%%·coding:·utf-8</samp></code></pre><pre><code·class="makeup·erlang"·translate="no"><samp·class="c1">%%·For·this·file·we·have·chosen·encoding·=·Latin-1</samp></code></pre><pre><code·class="makeup·erlang"·translate="no"><samp·class="c1">%%·-*-·coding:·latin-1·-*-</samp></code></pre><h2·id="module-error-information"·class="section-heading">
32 ··<a·href="#module-error-information"·class="hover-link">32 ··<a·href="#module-error-information"·class="hover-link">
33 ····<i·class="ri-link-m"·aria-hidden="true"></i>33 ····<i·class="ri-link-m"·aria-hidden="true"></i>
34 ··</a>34 ··</a>
35 ··<span·class="text">Error·Information</span>35 ··<span·class="text">Error·Information</span>
36 </h2>36 </h2>
37 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O37 <p><code·class="inline">ErrorInfo</code>·is·the·standard·<code·class="inline">ErrorInfo</code>·structure·that·is·returned·from·all·I/O
38 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="4209321844-1">{</samp><samp·class="n">ErrorLine</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="42093218[·...·truncated·by·diffoscope;·len:·369,·SHA:·03a6353b93f3baabba707dd70a385e47b41332e2ab21fd0f50b397e2db69abaf·...·]-1">)</samp></code></pre><h2·id="module-see-also"·class="section-heading">38 modules.·The·format·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="p"·data-group-id="5951638414-1">{</samp><samp·class="n">ErrorLine</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Module</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">ErrorDescriptor</samp><samp·class="p"·data-group-id="59516384[·...·truncated·by·diffoscope;·len:·369,·SHA:·709b522d14e20989d101d0f61ebe56f656820da61dbdb9071e2a82d5942220c0·...·]-1">)</samp></code></pre><h2·id="module-see-also"·class="section-heading">
39 ··<a·href="#module-see-also"·class="hover-link">39 ··<a·href="#module-see-also"·class="hover-link">
40 ····<i·class="ri-link-m"·aria-hidden="true"></i>40 ····<i·class="ri-link-m"·aria-hidden="true"></i>
41 ··</a>41 ··</a>
42 ··<span·class="text">See·Also</span>42 ··<span·class="text">See·Also</span>
43 </h2>43 </h2>
44 <p><a·href="erl_parse.xhtml"><code·class="inline">erl_parse</code></a></p>44 <p><a·href="erl_parse.xhtml"><code·class="inline">erl_parse</code></a></p>
45 ······</section>45 ······</section>
19.4 KB
OEBPS/dict.xhtml
Max HTML report size reached
25.2 KB
OEBPS/dets.xhtml
Max HTML report size reached
1.22 KB
OEBPS/content.opf
1.19 KB
OEBPS/content.opf
Max HTML report size reached
12.1 KB
OEBPS/calendar.xhtml
Max HTML report size reached
2.09 KB
OEBPS/c.xhtml
    
Offset 1630, 15 lines modifiedOffset 1630, 15 lines modified
1630 ················Options·::·[Option]·|·Option,1630 ················Options·::·[Option]·|·Option,
1631 ················Option·::·<a·href="../../../../lib/compiler/doc/html/compile.html#t:option/0">compile:option</a>(),1631 ················Option·::·<a·href="../../../../lib/compiler/doc/html/compile.html#t:option/0">compile:option</a>(),
1632 ················Module·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:module/0">module</a>().</pre>1632 ················Module·::·<a·href="../../../../lib/../erts/doc/html/erlang.html#t:module/0">module</a>().</pre>
  
1633 ······</div>1633 ······</div>
  
1634 <p>Compiles·and·then·loads·the·code·for·a·file·on·all·nodes.·<code·class="inline">Options</code>·defaults·to1634 <p>Compiles·and·then·loads·the·code·for·a·file·on·all·nodes.·<code·class="inline">Options</code>·defaults·to
1635 <code·class="inline">[]</code>.·Compilation·is·equivalent·to:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nc">compile</samp><samp·class="p">:</samp><samp·class="nf">file</samp><samp·class="p"·data-group-id="4001860137-1">(</samp><samp·class="n">File</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Options</samp><samp·class="w">·</samp><samp·class="o">++</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="4001860137-2">[</samp><sa[·...·truncated·by·diffoscope;·len:·215,·SHA:·a7aa9196045c34a28e061ff5a6112c8164f44a087fa9a92a13be5f93728d674c·...·]-1">)</samp></code></pre>1635 <code·class="inline">[]</code>.·Compilation·is·equivalent·to:</p><pre><code·class="makeup·erlang"·translate="no"><samp·class="nc">compile</samp><samp·class="p">:</samp><samp·class="nf">file</samp><samp·class="p"·data-group-id="3874377442-1">(</samp><samp·class="n">File</samp><samp·class="p">,</samp><samp·class="w">·</samp><samp·class="n">Options</samp><samp·class="w">·</samp><samp·class="o">++</samp><samp·class="w">·</samp><samp·class="p"·data-group-id="3874377442-2">[</samp><sa[·...·truncated·by·diffoscope;·len:·215,·SHA:·05cc336144d812967351a0bccc5a2c9b5e69cfeef5a675a570c9a75055aa6e37·...·]-1">)</samp></code></pre>
1636 ··</section>1636 ··</section>
1637 </section>1637 </section>
1638 <section·class="detail"·id="ni/0">1638 <section·class="detail"·id="ni/0">
  
1639 ··<div·class="detail-header">1639 ··<div·class="detail-header">
1640 ····<a·href="#ni/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1640 ····<a·href="#ni/0"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1641 ······<i·class="ri-link-m"·aria-hidden="true"></i>1641 ······<i·class="ri-link-m"·aria-hidden="true"></i>
92.3 KB
OEBPS/binary.xhtml
Max HTML report size reached
25.2 KB
OEBPS/beam_lib.xhtml
Max HTML report size reached
8.29 KB
OEBPS/base64.xhtml
Max HTML report size reached
7.17 KB
OEBPS/assert_hrl.xhtml
Max HTML report size reached
24.9 KB
OEBPS/array.xhtml
Max HTML report size reached
125 KB
OEBPS/argparse.xhtml
Max HTML report size reached
8.42 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/stdlib_app.html
    
Offset 157, 21 lines modifiedOffset 157, 21 lines modified
157 string·and·returns·a·formatted·expressions·as·a·string.·See157 string·and·returns·a·formatted·expressions·as·a·string.·See
158 <a·href="shell.html#format_shell_func/1"><code·class="inline">shell:format_shell_func/1</code></a>·for·how·to·set·it·from·inside·the·shell.</p><p>If·instead·a·string·is·provided,·it·will·be·used·as·a·shell·command.·Your158 <a·href="shell.html#format_shell_func/1"><code·class="inline">shell:format_shell_func/1</code></a>·for·how·to·set·it·from·inside·the·shell.</p><p>If·instead·a·string·is·provided,·it·will·be·used·as·a·shell·command.·Your
159 command·must·include·<code·class="inline">${file}</code>·somewhere·in·the·string,·for·the·shell·to·know159 command·must·include·<code·class="inline">${file}</code>·somewhere·in·the·string,·for·the·shell·to·know
160 where·the·file·goes·in·the·command.</p><pre><code·class="text">-stdlib·format_shell_func·&quot;\&quot;emacs·-batch·\${file}·-l·~/erlang-format/emacs-format-file·-f·emacs-format-function\&quot;&quot;</code></pre><pre><code·class="text">-stdlib·format_shell_func·&quot;{shell,·erl_pp_format_func}&quot;</code></pre></li><li><p><strong><code·class="inline"·id="shell_prompt_func">shell_prompt_func·=·{Mod,·Func}·|·default</code></strong>·-·where</p><ul><li><code·class="inline">Mod·=·atom()</code></li><li><code·class="inline">Func·=·atom()</code></li></ul><p>Can·be·used·to·set·a·customized·Erlang·shell·prompt·function.</p></li><li><p><strong><code·class="inline"·id="shell_multiline_prompt">shell_multiline_prompt·=·{Mod,·Func}·|·string()·|·default</code></strong>·-·where</p><ul><li><code·class="inline">Mod·=·atom()</code></li><li><code·class="inline">Func·=·atom()</code></li></ul><p>Can·be·used·to·set·a·customized·multiline·shell·prompt·function.·The·multiline160 where·the·file·goes·in·the·command.</p><pre><code·class="text">-stdlib·format_shell_func·&quot;\&quot;emacs·-batch·\${file}·-l·~/erlang-format/emacs-format-file·-f·emacs-format-function\&quot;&quot;</code></pre><pre><code·class="text">-stdlib·format_shell_func·&quot;{shell,·erl_pp_format_func}&quot;</code></pre></li><li><p><strong><code·class="inline"·id="shell_prompt_func">shell_prompt_func·=·{Mod,·Func}·|·default</code></strong>·-·where</p><ul><li><code·class="inline">Mod·=·atom()</code></li><li><code·class="inline">Func·=·atom()</code></li></ul><p>Can·be·used·to·set·a·customized·Erlang·shell·prompt·function.</p></li><li><p><strong><code·class="inline"·id="shell_multiline_prompt">shell_multiline_prompt·=·{Mod,·Func}·|·string()·|·default</code></strong>·-·where</p><ul><li><code·class="inline">Mod·=·atom()</code></li><li><code·class="inline">Func·=·atom()</code></li></ul><p>Can·be·used·to·set·a·customized·multiline·shell·prompt·function.·The·multiline
161 prompt·function·takes·the·main·prompt·as·its·only·parameter.</p></li><li><p><strong><code·class="inline"·id="shell_saved_results">shell_saved_results·=·integer()·&gt;=·0</code></strong>·-·Can·be161 prompt·function·takes·the·main·prompt·as·its·only·parameter.</p></li><li><p><strong><code·class="inline"·id="shell_saved_results">shell_saved_results·=·integer()·&gt;=·0</code></strong>·-·Can·be
162 used·to·determine·how·many·results·are·saved·by·the·Erlang·shell.</p></li><li><p><strong><code·class="inline"·id="shell_session_slogan">shell_session_slogan·=·string()·|·fun()·-&gt;·string())</code></strong>·-·The·slogan·printed·when·starting·an·Erlang·shell.162 used·to·determine·how·many·results·are·saved·by·the·Erlang·shell.</p></li><li><p><strong><code·class="inline"·id="shell_session_slogan">shell_session_slogan·=·string()·|·fun()·-&gt;·string())</code></strong>·-·The·slogan·printed·when·starting·an·Erlang·shell.
163 Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">stdlib</span><span·class="w">·</span><span·class="ss">shell_session_slogan</span><span·class="w">·</span><span·class="ss">&#39;&quot;Test·slogan&quot;&#39;</span><span·class="w">163 Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">stdlib</span><span·class="w">·</span><span·class="ss">shell_session_slogan</span><span·class="w">·</span><span·class="ss">&#39;&quot;Test·slogan&quot;&#39;</span><span·class="w">
164 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="p"·data-group-id="0921855628-1">[</span><span·class="n">DEVELOPMENT</span><span·class="p"·data-group-id="0921855628-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="0921855628-2">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">1[·...·truncated·by·diffoscope;·len:·1496,·SHA:·50991b4b02f32db9230ec13a87b996aed94b4d7585c3984f8d68abb6e69e6077·...·]-8">]</span><span·class="w">164 </span><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">26</span><span·class="w">·</span><span·class="p"·data-group-id="6436289679-1">[</span><span·class="n">DEVELOPMENT</span><span·class="p"·data-group-id="6436289679-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="6436289679-2">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">1[·...·truncated·by·diffoscope;·len:·1496,·SHA:·aa866de96edd50525c2f9dfe5ebd49569af4d71bc59bbb55c2e102a2a6dbac5f·...·]-8">]</span><span·class="w">
  
165 </span><span·class="n">Test</span><span·class="w">·</span><span·class="ss">slogan</span><span·class="w">165 </span><span·class="n">Test</span><span·class="w">·</span><span·class="ss">slogan</span><span·class="w">
166 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre></li><li><p><strong><code·class="inline"·id="shell_slogan">shell_slogan·=·string()·|·fun(()·-&gt;·string())</code></strong>·-·The166 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre></li><li><p><strong><code·class="inline"·id="shell_slogan">shell_slogan·=·string()·|·fun(()·-&gt;·string())</code></strong>·-·The
167 slogan·printed·when·starting·the·Erlang·shell·subsystem.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">stdlib</span><span·class="w">·</span><span·class="ss">shell_slogan</span><span·class="w">·</span><span·class="ss">&#39;&quot;Test·slogan&quot;&#39;</span><span·class="w">167 slogan·printed·when·starting·the·Erlang·shell·subsystem.·Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">-</span><span·class="ss">stdlib</span><span·class="w">·</span><span·class="ss">shell_slogan</span><span·class="w">·</span><span·class="ss">&#39;&quot;Test·slogan&quot;&#39;</span><span·class="w">
168 </span><span·class="n">Test</span><span·class="w">·</span><span·class="ss">slogan</span><span·class="w">168 </span><span·class="n">Test</span><span·class="w">·</span><span·class="ss">slogan</span><span·class="w">
169 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V13</span><span·class="p">.</span><span·class="mf">0.2</span><span·class="w">··</span><span·class="p"·data-group-id="8004672936-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="8004672936-1">)</span><span·class="w">169 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V13</span><span·class="p">.</span><span·class="mf">0.2</span><span·class="w">··</span><span·class="p"·data-group-id="6391643933-1">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="6391643933-1">)</span><span·class="w">
170 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre><p>The·default·is·the·return·value·of170 </span><span·class="mi">1</span><span·class="o">&gt;</span></code></pre><p>The·default·is·the·return·value·of
171 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#system_info_system_version"><code·class="inline">erlang:system_info(system_version)</code></a>.</p></li><li><p><strong><code·class="inline"·id="shell_strings">shell_strings·=·boolean()</code></strong>·-·Can·be·used·to·determine171 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#system_info_system_version"><code·class="inline">erlang:system_info(system_version)</code></a>.</p></li><li><p><strong><code·class="inline"·id="shell_strings">shell_strings·=·boolean()</code></strong>·-·Can·be·used·to·determine
172 how·the·Erlang·shell·outputs·lists·of·integers.</p></li></ul><h2·id="see-also"·class="section-heading">172 how·the·Erlang·shell·outputs·lists·of·integers.</p></li></ul><h2·id="see-also"·class="section-heading">
173 ··<a·href="#see-also"·class="hover-link">173 ··<a·href="#see-also"·class="hover-link">
174 ····<i·class="ri-link-m"·aria-hidden="true"></i>174 ····<i·class="ri-link-m"·aria-hidden="true"></i>
175 ··</a>175 ··</a>
176 ··<span·class="text">See·Also</span>176 ··<span·class="text">See·Also</span>
139 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/string.html
    
Offset 145, 22 lines modifiedOffset 145, 22 lines modified
145 <a·href="#replace/3"><code·class="inline">replace/3</code></a>,·<a·href="#split/2"><code·class="inline">split/2</code></a>,·<a·href="#split/3"><code·class="inline">split/3</code></a>·and·<a·href="#trim/3"><code·class="inline">trim/3</code></a>.</p><p>Splitting·and·appending·strings·is·to·be·done·on·grapheme·clusters·borders.145 <a·href="#replace/3"><code·class="inline">replace/3</code></a>,·<a·href="#split/2"><code·class="inline">split/2</code></a>,·<a·href="#split/3"><code·class="inline">split/3</code></a>·and·<a·href="#trim/3"><code·class="inline">trim/3</code></a>.</p><p>Splitting·and·appending·strings·is·to·be·done·on·grapheme·clusters·borders.
146 There·is·no·verification·that·the·results·of·appending·strings·are·valid·or146 There·is·no·verification·that·the·results·of·appending·strings·are·valid·or
147 normalized.</p><p>Most·of·the·functions·expect·all·input·to·be·normalized·to·one·form,·see·for147 normalized.</p><p>Most·of·the·functions·expect·all·input·to·be·normalized·to·one·form,·see·for
148 example·<a·href="unicode.html#characters_to_nfc_list/1"><code·class="inline">unicode:characters_to_nfc_list/1</code></a>.</p><p>Language·or·locale·specific·handling·of·input·is·not·considered·in·any·function.</p><p>The·functions·can·crash·for·non-valid·input·strings.·For·example,·the·functions148 example·<a·href="unicode.html#characters_to_nfc_list/1"><code·class="inline">unicode:characters_to_nfc_list/1</code></a>.</p><p>Language·or·locale·specific·handling·of·input·is·not·considered·in·any·function.</p><p>The·functions·can·crash·for·non-valid·input·strings.·For·example,·the·functions
149 expect·UTF-8·binaries·but·not·all·functions·verify·that·all·binaries·are·encoded149 expect·UTF-8·binaries·but·not·all·functions·verify·that·all·binaries·are·encoded
150 correctly.</p><p>Unless·otherwise·specified·the·return·value·type·is·the·same·as·the·input·type.150 correctly.</p><p>Unless·otherwise·specified·the·return·value·type·is·the·same·as·the·input·type.
151 That·is,·binary·input·returns·binary·output,·list·input·returns·a·list·output,151 That·is,·binary·input·returns·binary·output,·list·input·returns·a·list·output,
152 and·mixed·input·can·return·a·mixed·output.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">trim</span><span·class="p"·data-group-id="6339059394-1">(</span><span·class="s">&quot;··sarah··&quot;</span><span·class="p"·data-group-id="6339059394-1">)</span><span·class="p">.</span><span·class="w">152 and·mixed·input·can·return·a·mixed·output.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">trim</span><span·class="p"·data-group-id="6993540052-1">(</span><span·class="s">&quot;··sarah··&quot;</span><span·class="p"·data-group-id="6993540052-1">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="s">&quot;sarah&quot;</span><span·class="gp·unselectable">153 </span><span·class="s">&quot;sarah&quot;</span><span·class="gp·unselectable">
154 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">trim</span><span·class="p"·data-group-id="6339059394-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;··sarah··&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6339059394-2">)</span><span·class="p">.</span><span·class="w">154 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">trim</span><span·class="p"·data-group-id="6993540052-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;··sarah··&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6993540052-2">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;sarah&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">155 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;sarah&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
156 3&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">lexemes</span><span·class="p"·data-group-id="6339059394-3">(</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;·&quot;</span><span·class="p"·data-group-id="6339059394-3">)</span><span·class="p">.</span><span·class="w">156 3&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">lexemes</span><span·class="p"·data-group-id="6993540052-3">(</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;·&quot;</span><span·class="p"·data-group-id="6993540052-3">)</span><span·class="p">.</span><span·class="w">
157 </span><span·class="p"·data-group-id="6339059394-4">[</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="s">&quot;bar&quot;</span><span·class="p"·data-group-id="6339059394-4">]</span><span·class="gp·unselectable">157 </span><span·class="p"·data-group-id="6993540052-4">[</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="s">&quot;bar&quot;</span><span·class="p"·data-group-id="6993540052-4">]</span><span·class="gp·unselectable">
158 4&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">lexemes</span><span·class="p"·data-group-id="6339059394-5">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;·&quot;</span><span·class="p"·data-group-id="6339059394-5">)</span><span·class="p">.</span><span·class="w">158 4&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">lexemes</span><span·class="p"·data-group-id="6993540052-5">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;·&quot;</span><span·class="p"·data-group-id="6993540052-5">)</span><span·class="p">.</span><span·class="w">
159 </span><span·class="p"·data-group-id="6339059394-6">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;bar&quot;</span><span·class="p">&gt;&gt;</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·b66c04e36ad13cf6c06c8403c3409b6ccf7ae2f0207989d804325df9300745f9·...·]-6">]</span></code></pre><p>This·module·has·been·reworked·in·Erlang/OTP·20·to·handle·<a·href="unicode.html#t:chardata/0"><code·class="inline">unicode:chardata/0</code></a>159 </span><span·class="p"·data-group-id="6993540052-6">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;bar&quot;</span><span·class="p">&gt;&gt;</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·e1342088fdf84ad14f725b4b4d705b1b0aa17123d3c139d57a62b109439c3f7e·...·]-6">]</span></code></pre><p>This·module·has·been·reworked·in·Erlang/OTP·20·to·handle·<a·href="unicode.html#t:chardata/0"><code·class="inline">unicode:chardata/0</code></a>
160 and·operate·on·grapheme·clusters.·The160 and·operate·on·grapheme·clusters.·The
161 <a·href="string.html#obsolete-api-functions"><code·class="inline">old·functions</code></a>·that·only·work·on·Latin-1161 <a·href="string.html#obsolete-api-functions"><code·class="inline">old·functions</code></a>·that·only·work·on·Latin-1
162 lists·as·input·are·still·available·but·should·not·be·used,·they·will·be162 lists·as·input·are·still·available·but·should·not·be·used,·they·will·be
163 deprecated·in·a·future·release.</p><h2·id="module-notes"·class="section-heading">163 deprecated·in·a·future·release.</p><h2·id="module-notes"·class="section-heading">
164 ··<a·href="#module-notes"·class="hover-link">164 ··<a·href="#module-notes"·class="hover-link">
165 ····<i·class="ri-link-m"·aria-hidden="true"></i>165 ····<i·class="ri-link-m"·aria-hidden="true"></i>
166 ··</a>166 ··</a>
Offset 1068, 15 lines modifiedOffset 1068, 15 lines modified
  
1068 ··········<pre·translate="no"><span·class="attribute">-spec</span>·casefold(String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>())·->·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>().</pre>1068 ··········<pre·translate="no"><span·class="attribute">-spec</span>·casefold(String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>())·->·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>().</pre>
  
1069 ······</div>1069 ······</div>
  
1070 <p>Converts·<code·class="inline">String</code>·to·a·case-agnostic·comparable·string.·Function1070 <p>Converts·<code·class="inline">String</code>·to·a·case-agnostic·comparable·string.·Function
1071 <a·href="#casefold/1"><code·class="inline">casefold/1</code></a>·is·preferred·over·<a·href="#lowercase/1"><code·class="inline">lowercase/1</code></a>1071 <a·href="#casefold/1"><code·class="inline">casefold/1</code></a>·is·preferred·over·<a·href="#lowercase/1"><code·class="inline">lowercase/1</code></a>
1072 when·two·strings·are·to·be·compared·for·equality.·See·also·<a·href="#equal/4"><code·class="inline">equal/4</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">casefold</span><span·class="p"·data-group-id="0299039823-1">(</span><span·class="s">&quot;Ω·and··SHARP·S&quot;</span><span·class="p"·data-group-id="0299039823-1">)</span><span·class="p">.</span><span·class="w">1072 when·two·strings·are·to·be·compared·for·equality.·See·also·<a·href="#equal/4"><code·class="inline">equal/4</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">casefold</span><span·class="p"·data-group-id="4382549932-1">(</span><span·class="s">&quot;Ω·and··SHARP·S&quot;</span><span·class="p"·data-group-id="4382549932-1">)</span><span·class="p">.</span><span·class="w">
1073 </span><span·class="s">&quot;ω·and·ss·sharp·s&quot;</span></code></pre>1073 </span><span·class="s">&quot;ω·and·ss·sharp·s&quot;</span></code></pre>
1074 ··</section>1074 ··</section>
1075 </section>1075 </section>
1076 <section·class="detail"·id="chomp/1">1076 <section·class="detail"·id="chomp/1">
  
1077 ··<div·class="detail-header">1077 ··<div·class="detail-header">
1078 ····<a·href="#chomp/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1078 ····<a·href="#chomp/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1100, 17 lines modifiedOffset 1100, 17 lines modified
1100 ······<div·class="specs">1100 ······<div·class="specs">
  
1101 ··········<pre·translate="no"><span·class="attribute">-spec</span>·chomp(String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>())·->·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>().</pre>1101 ··········<pre·translate="no"><span·class="attribute">-spec</span>·chomp(String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>())·->·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>().</pre>
  
1102 ······</div>1102 ······</div>
  
1103 <p>Returns·a·string·where·any·trailing·<code·class="inline">\n</code>·or·<code·class="inline">\r\n</code>·have·been·removed·from1103 <p>Returns·a·string·where·any·trailing·<code·class="inline">\n</code>·or·<code·class="inline">\r\n</code>·have·been·removed·from
1104 <code·class="inline">String</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">182&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">chomp</span><span·class="p"·data-group-id="1783851097-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;\nHello\n\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="1783851097-1">)</span><span·class="p">.</span><span·class="w">1104 <code·class="inline">String</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">182&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">chomp</span><span·class="p"·data-group-id="2968748396-1">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;\nHello\n\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2968748396-1">)</span><span·class="p">.</span><span·class="w">
1105 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;\nHello&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">1105 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;\nHello&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
1106 183&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">chomp</span><span·class="p"·data-group-id="1783851097-2">(</span><span·class="s">&quot;\nHello\r\r\n&quot;</span><span·class="p"·data-group-id="1783851097-2">)</span><span·class="p">.</span><span·class="w">1106 183&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">chomp</span><span·class="p"·data-group-id="2968748396-2">(</span><span·class="s">&quot;\nHello\r\r\n&quot;</span><span·class="p"·data-group-id="2968748396-2">)</span><span·class="p">.</span><span·class="w">
1107 </span><span·class="s">&quot;\nHello\r&quot;</span></code></pre>1107 </span><span·class="s">&quot;\nHello\r&quot;</span></code></pre>
1108 ··</section>1108 ··</section>
1109 </section>1109 </section>
1110 <section·class="detail"·id="equal/2">1110 <section·class="detail"·id="equal/2">
  
1111 ··<div·class="detail-header">1111 ··<div·class="detail-header">
1112 ····<a·href="#equal/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1112 ····<a·href="#equal/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1203, 19 lines modifiedOffset 1203, 19 lines modified
  
1203 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">A</code>·and·<code·class="inline">B</code>·are·equal,·otherwise·<code·class="inline">false</code>.</p><p>If·<code·class="inline">IgnoreCase</code>·is·<code·class="inline">true</code>·the·function·does·<a·href="#casefold/1"><code·class="inline">casefold</code>ing</a>·on·the1203 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">A</code>·and·<code·class="inline">B</code>·are·equal,·otherwise·<code·class="inline">false</code>.</p><p>If·<code·class="inline">IgnoreCase</code>·is·<code·class="inline">true</code>·the·function·does·<a·href="#casefold/1"><code·class="inline">casefold</code>ing</a>·on·the
1204 fly·before·the·equality·test.</p><p>If·<code·class="inline">Norm</code>·is·not·<code·class="inline">none</code>·the·function·applies·normalization·on·the·fly·before·the1204 fly·before·the·equality·test.</p><p>If·<code·class="inline">Norm</code>·is·not·<code·class="inline">none</code>·the·function·applies·normalization·on·the·fly·before·the
1205 equality·test.·There·are·four·available·normalization·forms:1205 equality·test.·There·are·four·available·normalization·forms:
1206 <a·href="unicode.html#characters_to_nfc_list/1"><code·class="inline">nfc</code></a>,1206 <a·href="unicode.html#characters_to_nfc_list/1"><code·class="inline">nfc</code></a>,
1207 <a·href="unicode.html#characters_to_nfd_list/1"><code·class="inline">nfd</code></a>,1207 <a·href="unicode.html#characters_to_nfd_list/1"><code·class="inline">nfd</code></a>,
1208 <a·href="unicode.html#characters_to_nfkc_list/1"><code·class="inline">nfkc</code></a>,·and1208 <a·href="unicode.html#characters_to_nfkc_list/1"><code·class="inline">nfkc</code></a>,·and
1209 <a·href="unicode.html#characters_to_nfkd_list/1"><code·class="inline">nfkd</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">equal</span><span·class="p"·data-group-id="3673871732-1">(</span><span·class="s">&quot;åäö&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·a511c6a423181917b99a943e38261a108845039ec02e32e614dc3f9fb847c178·...·]-1">)</span><span·class="p">.</span><span·class="w">1209 <a·href="unicode.html#characters_to_nfkd_list/1"><code·class="inline">nfkd</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">equal</span><span·class="p"·data-group-id="8160413498-1">(</span><span·class="s">&quot;åäö&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</s[·...·truncated·by·diffoscope;·len:·45,·SHA:·657cfc62f61e2c5a13bc69e19ae33f7b6686e0a757bd13b888f3d95fde2ec442·...·]-1">)</span><span·class="p">.</span><span·class="w">
1210 </span><span·class="ss">true</span><span·class="gp·unselectable">1210 </span><span·class="ss">true</span><span·class="gp·unselectable">
1211 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">equal</span><span·class="p"·data-group-id="3673871732-2">(</span><span·class="s">&quot;åäö&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_binary</span><span·class="p"·data-group-id="3673871732-3">[·...·truncated·by·diffoscope;·len:·140,·SHA:·e2a6335455a83da77e3c3fcca2d7fb6f7fcf9142d050d3105a1051b99092e5af·...·]-2">)</span><span·class="p">.</span><span·class="w">1211 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">equal</span><span·class="p"·data-group-id="8160413498-2">(</span><span·class="s">&quot;åäö&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_binary</span><span·class="p"·data-group-id="8160413498-3">[·...·truncated·by·diffoscope;·len:·140,·SHA:·f38f8810403c23ed381643eee8b19bb36a5854b2ab9ec270dec5505a7ccc9cdb·...·]-2">)</span><span·class="p">.</span><span·class="w">
1212 </span><span·class="ss">false</span><span·class="gp·unselectable">1212 </span><span·class="ss">false</span><span·class="gp·unselectable">
1213 3&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">equal</span><span·class="p"·data-group-id="3673871732-4">(</span><span·class="s">&quot;åäö&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_binary</span><span·class="p"·data-group-id="3673871732-5">[·...·truncated·by·diffoscope;·len:·291,·SHA:·11d44a0ea7b58b931cb027a1dedc7a9fa5534ac3e88fca841eed8b544bd5b093·...·]-4">)</span><span·class="p">.</span><span·class="w">1213 3&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">equal</span><span·class="p"·data-group-id="8160413498-4">(</span><span·class="s">&quot;åäö&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_binary</span><span·class="p"·data-group-id="8160413498-5">[·...·truncated·by·diffoscope;·len:·291,·SHA:·22e53caa9f4ed5546a64ee0b9d1e32d68ca30edf2869faacaf9977c7f7c5235d·...·]-4">)</span><span·class="p">.</span><span·class="w">
1214 </span><span·class="ss">true</span></code></pre>1214 </span><span·class="ss">true</span></code></pre>
1215 ··</section>1215 ··</section>
1216 </section>1216 </section>
1217 <section·class="detail"·id="find/2">1217 <section·class="detail"·id="find/2">
  
1218 ··<div·class="detail-header">1218 ··<div·class="detail-header">
1219 ····<a·href="#find/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1219 ····<a·href="#find/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1273, 21 lines modifiedOffset 1273, 21 lines modified
1273 ··············when·String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>(),·SearchPattern·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>(),·Dir·::·<a·href="#t:direction/0">direction</a>().</pre>1273 ··············when·String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>(),·SearchPattern·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>(),·Dir·::·<a·href="#t:direction/0">direction</a>().</pre>
  
1274 ······</div>1274 ······</div>
  
1275 <p>Removes·anything·before·<code·class="inline">SearchPattern</code>·in·<code·class="inline">String</code>·and·returns·the·remainder·of1275 <p>Removes·anything·before·<code·class="inline">SearchPattern</code>·in·<code·class="inline">String</code>·and·returns·the·remainder·of
1276 the·string·or·<code·class="inline">nomatch</code>·if·<code·class="inline">SearchPattern</code>·is·not·found.·<code·class="inline">Dir</code>,·which·can·be1276 the·string·or·<code·class="inline">nomatch</code>·if·<code·class="inline">SearchPattern</code>·is·not·found.·<code·class="inline">Dir</code>,·which·can·be
1277 <code·class="inline">leading</code>·or·<code·class="inline">trailing</code>,·indicates·from·which·direction·characters·are·to·be1277 <code·class="inline">leading</code>·or·<code·class="inline">trailing</code>,·indicates·from·which·direction·characters·are·to·be
1278 searched.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="4956848717-1">(</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.&quot;</span><span·class="p"·data-group-id="4956848717-1">)</span><span·class="p">.</span><span·class="w">1278 searched.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="0669411938-1">(</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;.&quot;</span><span·class="p"·data-group-id="0669411938-1">)</span><span·class="p">.</span><span·class="w">
1279 </span><span·class="s">&quot;..cd..ef&quot;</span><span·class="gp·unselectable">1279 </span><span·class="s">&quot;..cd..ef&quot;</span><span·class="gp·unselectable">
1280 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="4956848717-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;..&quot;</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·79,·SHA:·be25588641ed4770621181aa604bc1c1c15516b53abf15b0e40c609174450b0a·...·]-2">)</span><span·class="p">.</span><span·class="w">1280 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="0669411938-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;..&quot;</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·79,·SHA:·5096f9082ba37b37b4797950334df3c1a119b924d2fbd1accc9106bcdf72ccb0·...·]-2">)</span><span·class="p">.</span><span·class="w">
1281 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;..ef&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">1281 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;..ef&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
1282 3&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="4956848717-3">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;x&quot;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·77,·SHA:·a24b7d6cf7893069eee5ae1568c21f9a4045fb576e9a8a39148131eaf3d22be3·...·]-3">)</span><span·class="p">.</span><span·class="w">1282 3&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="0669411938-3">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;x&quot;</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·77,·SHA:·d60b37af2a163ddf9c0abc0aecf344660a71c2ed14bc44fb39b3b0bfdc07afa5·...·]-3">)</span><span·class="p">.</span><span·class="w">
1283 </span><span·class="ss">nomatch</span><span·class="gp·unselectable">1283 </span><span·class="ss">nomatch</span><span·class="gp·unselectable">
1284 4&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="4956848717-4">(</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;x&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">trailing</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·966e493114bcb674d69305a38cd6ab3aa9971465ddaec5b76eb06bb23084b5ef·...·]-4">)</span><span·class="p">.</span><span·class="w">1284 4&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">find</span><span·class="p"·data-group-id="0669411938-4">(</span><span·class="s">&quot;ab..cd..ef&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;x&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">trailing</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·b744b20d68396323ef51715e8f23b7a927db654746a8ada9c644c87fde32a197·...·]-4">)</span><span·class="p">.</span><span·class="w">
1285 </span><span·class="ss">nomatch</span></code></pre>1285 </span><span·class="ss">nomatch</span></code></pre>
1286 ··</section>1286 ··</section>
1287 </section>1287 </section>
1288 <section·class="detail"·id="is_empty/1">1288 <section·class="detail"·id="is_empty/1">
  
1289 ··<div·class="detail-header">1289 ··<div·class="detail-header">
1290 ····<a·href="#is_empty/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1290 ····<a·href="#is_empty/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1310, 17 lines modifiedOffset 1310, 17 lines modified
  
1310 ······<div·class="specs">1310 ······<div·class="specs">
  
1311 ··········<pre·translate="no"><span·class="attribute">-spec</span>·is_empty(String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>().</pre>1311 ··········<pre·translate="no"><span·class="attribute">-spec</span>·is_empty(String·::·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>())·->·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:boolean/0">boolean</a>().</pre>
  
1312 ······</div>1312 ······</div>
  
1313 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">String</code>·is·the·empty·string,·otherwise·<code·class="inline">false</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">is_empty</span><span·class="p"·data-group-id="2156370598-1">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="2156370598-1">)</span><span·class="p">.</span><span·class="w">1313 <p>Returns·<code·class="inline">true</code>·if·<code·class="inline">String</code>·is·the·empty·string,·otherwise·<code·class="inline">false</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">is_empty</span><span·class="p"·data-group-id="0264232850-1">(</span><span·class="s">&quot;foo&quot;</span><span·class="p"·data-group-id="0264232850-1">)</span><span·class="p">.</span><span·class="w">
1314 </span><span·class="ss">false</span><span·class="gp·unselectable">1314 </span><span·class="ss">false</span><span·class="gp·unselectable">
1315 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">is_empty</span><span·class="p"·data-group-id="2156370598-2">(</span><span·class="p"·data-group-id="2156370598-3">[</span><span·class="s">&quot;&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2156370598-3">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·b803ffbee471202e366625a5a3ceb29c531192c8e2fbb90a064bf22b99dbfa1f·...·]-2">)</span><span·class="p">.</span><span·class="w">1315 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">is_empty</span><span·class="p"·data-group-id="0264232850-2">(</span><span·class="p"·data-group-id="0264232850-3">[</span><span·class="s">&quot;&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="0264232850-3">]</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·ad4d4dc25e217ebff60a6414d420b57469e57d939972e14d5efd36b989ea64ad·...·]-2">)</span><span·class="p">.</span><span·class="w">
1316 </span><span·class="ss">true</span></code></pre>1316 </span><span·class="ss">true</span></code></pre>
1317 ··</section>1317 ··</section>
1318 </section>1318 </section>
1319 <section·class="detail"·id="jaro_similarity/2">1319 <section·class="detail"·id="jaro_similarity/2">
  
1320 ··<div·class="detail-header">1320 ··<div·class="detail-header">
1321 ····<a·href="#jaro_similarity/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1321 ····<a·href="#jaro_similarity/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1351, 21 lines modifiedOffset 1351, 21 lines modified
  
1351 ······</div>1351 ······</div>
  
1352 <p>Returns·a·float·between·<code·class="inline">+0.0</code>·and·<code·class="inline">1.0</code>·representing·the1352 <p>Returns·a·float·between·<code·class="inline">+0.0</code>·and·<code·class="inline">1.0</code>·representing·the
1353 <a·href="https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">Jaro·similarity</a>1353 <a·href="https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">Jaro·similarity</a>
1354 between·the·given·strings.·Strings·with·many·letters·in·common·relative·to·their1354 between·the·given·strings.·Strings·with·many·letters·in·common·relative·to·their
1355 lengths·will·score·closer·to·<code·class="inline">1.0</code>.</p><p>The·Jaro·distance·between·two·strings·can·be·calculated·with1355 lengths·will·score·closer·to·<code·class="inline">1.0</code>.</p><p>The·Jaro·distance·between·two·strings·can·be·calculated·with
1356 <code·class="inline">JaroDistance·=·1.0-JaroSimilarity</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">jaro_similarity</span><span·class="p"·data-group-id="3321657318-1">(</span><span·class="s">&quot;ditto&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ditto&quot;</span><span·class="p"·data-group-id="3321657318-1">)</span><span·class="p">.</span><span·class="w">1356 <code·class="inline">JaroDistance·=·1.0-JaroSimilarity</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">jaro_similarity</span><span·class="p"·data-group-id="5390337557-1">(</span><span·class="s">&quot;ditto&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;ditto&quot;</span><span·class="p"·data-group-id="5390337557-1">)</span><span·class="p">.</span><span·class="w">
1357 </span><span·class="mf">1.0</span><span·class="gp·unselectable">1357 </span><span·class="mf">1.0</span><span·class="gp·unselectable">
1358 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">jaro_similarity</span><span·class="p"·data-group-id="3321657318-2">(</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;bar&quot;</span><span·class="p"·data-group-id="3321657318-2">)</span><span·class="p">.</span><span·class="w">1358 2&gt;·</span><span·class="nc">string</span><span·class="p">:</span><span·class="nf">jaro_similarity</span><span·class="p"·data-group-id="5390337557-2">(</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;bar&quot;</span><span·class="p"·data-group-id="5390337557-2">)</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 116482/142506 bytes (81.74%) of diff not shown.
13.0 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/supervisor.html
    
Offset 154, 18 lines modifiedOffset 154, 18 lines modified
154 left.</p><p><a·href=""·id="sup_flags"></a></p><h3·id="module-supervisor-flags"·class="section-heading">154 left.</p><p><a·href=""·id="sup_flags"></a></p><h3·id="module-supervisor-flags"·class="section-heading">
155 ··<a·href="#module-supervisor-flags"·class="hover-link">155 ··<a·href="#module-supervisor-flags"·class="hover-link">
156 ····<i·class="ri-link-m"·aria-hidden="true"></i>156 ····<i·class="ri-link-m"·aria-hidden="true"></i>
157 ··</a>157 ··</a>
158 ··<span·class="text">Supervisor·flags</span>158 ··<span·class="text">Supervisor·flags</span>
159 </h3>159 </h3>
160 <p>The·supervisor·properties·are·defined·by·the·supervisor·flags.·The·type160 <p>The·supervisor·properties·are·defined·by·the·supervisor·flags.·The·type
161 definition·for·the·supervisor·flags·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sup_flags</span><span·class="p"·data-group-id="3143701331-1">(</span><span·class="p"·data-group-id="3143701331-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3143701331-2">#{</span><span·class="ss">strategy</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·179,·SHA:·de95accc62dee95c5bd0db122c7aaf81683605b4eec157b2f1a89e0ed9862dd4·...·]-3">)</span><span·class="p">,</span><span·class="w">···········</span><span·class="c1">%·optional</span><span·class="w">161 definition·for·the·supervisor·flags·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">sup_flags</span><span·class="p"·data-group-id="8112751349-1">(</span><span·class="p"·data-group-id="8112751349-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8112751349-2">#{</span><span·class="ss">strategy</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·179,·SHA:·2fc2dde8426fc0e6db506574fe7dc2c2f943e8e49bb2dd687399e96e7f2a1310·...·]-3">)</span><span·class="p">,</span><span·class="w">···········</span><span·class="c1">%·optional</span><span·class="w">
162 ················</span><span·class="ss">intensity</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="3143701331-4">(</span><span·class="p"·data-group-id="3143701331-4">)</span><span·class="p">,</span><span·class="w">···</span><span·class="c1">%·optional</span><span·class="w">162 ················</span><span·class="ss">intensity</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">non_neg_integer</span><span·class="p"·data-group-id="8112751349-4">(</span><span·class="p"·data-group-id="8112751349-4">)</span><span·class="p">,</span><span·class="w">···</span><span·class="c1">%·optional</span><span·class="w">
163 ················</span><span·class="ss">period</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="3143701331-5">(</span><span·class="p"·data-group-id="3143701331-5">)</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·optional</span><span·class="w">163 ················</span><span·class="ss">period</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">pos_integer</span><span·class="p"·data-group-id="8112751349-5">(</span><span·class="p"·data-group-id="8112751349-5">)</span><span·class="p">,</span><span·class="w">··········</span><span·class="c1">%·optional</span><span·class="w">
164 ················</span><span·class="ss">auto_shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">auto_shutdown</span><span·class="p"·data-group-id="3143701331-6">(</span><span·class="p"·data-group-id="3143701331-6">)</span><span·class="p"·data-group-id="3143701331-2">}</span><span·class="w">·</span><span·class="c1">%·optional</span></code></pre><h4>Restart·Strategies</h4><p>A·supervisor·can·have·one·of·the·following·<em>restart·strategies</em>·specified·with164 ················</span><span·class="ss">auto_shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">auto_shutdown</span><span·class="p"·data-group-id="8112751349-6">(</span><span·class="p"·data-group-id="8112751349-6">)</span><span·class="p"·data-group-id="8112751349-2">}</span><span·class="w">·</span><span·class="c1">%·optional</span></code></pre><h4>Restart·Strategies</h4><p>A·supervisor·can·have·one·of·the·following·<em>restart·strategies</em>·specified·with
165 the·<code·class="inline">strategy</code>·key·in·the·above·map:</p><ul><li><p><code·class="inline">one_for_one</code>·-·If·one·child·process·terminates·and·is·to·be·restarted,·only165 the·<code·class="inline">strategy</code>·key·in·the·above·map:</p><ul><li><p><code·class="inline">one_for_one</code>·-·If·one·child·process·terminates·and·is·to·be·restarted,·only
166 that·child·process·is·affected.·This·is·the·default·restart·strategy.</p></li><li><p><code·class="inline">one_for_all</code>·-·If·one·child·process·terminates·and·is·to·be·restarted,·all166 that·child·process·is·affected.·This·is·the·default·restart·strategy.</p></li><li><p><code·class="inline">one_for_all</code>·-·If·one·child·process·terminates·and·is·to·be·restarted,·all
167 other·child·processes·are·terminated·and·then·all·child·processes·are167 other·child·processes·are·terminated·and·then·all·child·processes·are
168 restarted.</p></li><li><p><code·class="inline">rest_for_one</code>·-·If·one·child·process·terminates·and·is·to·be·restarted,·the168 restarted.</p></li><li><p><code·class="inline">rest_for_one</code>·-·If·one·child·process·terminates·and·is·to·be·restarted,·the
169 'rest'·of·the·child·processes·(that·is,·the·child·processes·after·the169 'rest'·of·the·child·processes·(that·is,·the·child·processes·after·the
170 terminated·child·process·in·the·start·order)·are·terminated.·Then·the170 terminated·child·process·in·the·start·order)·are·terminated.·Then·the
171 terminated·child·process·and·all·child·processes·after·it·are·restarted.</p></li><li><p><code·class="inline">simple_one_for_one</code>·-·A·simplified·<code·class="inline">one_for_one</code>·supervisor,·where·all·child171 terminated·child·process·and·all·child·processes·after·it·are·restarted.</p></li><li><p><code·class="inline">simple_one_for_one</code>·-·A·simplified·<code·class="inline">one_for_one</code>·supervisor,·where·all·child
Offset 201, 21 lines modifiedOffset 201, 21 lines modified
201 the·automatic·shutdowns·they·rely·on·will·not·happen.</p><p>It·is·up·to·implementors·to·take·proper·precautions·if·they·expect·that·their201 the·automatic·shutdowns·they·rely·on·will·not·happen.</p><p>It·is·up·to·implementors·to·take·proper·precautions·if·they·expect·that·their
202 applications·may·be·compiled·with·older·OTP·versions.</p></blockquote><p><a·href=""·id="child_spec"></a></p><h3·id="module-child-specification"·class="section-heading">202 applications·may·be·compiled·with·older·OTP·versions.</p></blockquote><p><a·href=""·id="child_spec"></a></p><h3·id="module-child-specification"·class="section-heading">
203 ··<a·href="#module-child-specification"·class="hover-link">203 ··<a·href="#module-child-specification"·class="hover-link">
204 ····<i·class="ri-link-m"·aria-hidden="true"></i>204 ····<i·class="ri-link-m"·aria-hidden="true"></i>
205 ··</a>205 ··</a>
206 ··<span·class="text">Child·specification</span>206 ··<span·class="text">Child·specification</span>
207 </h3>207 </h3>
208 <p>The·type·definition·of·a·child·specification·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">child_spec</span><span·class="p"·data-group-id="8831620348-1">(</span><span·class="p"·data-group-id="8831620348-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="8831620348-2">#{</span><span·class="ss">id</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·173,·SHA:·67f85e727740fe77b15ae7d4d654978779f5ebca0e4d6c795b1ac8ec5265e801·...·]-3">)</span><span·class="p">,</span><span·class="w">·············</span><span·class="c1">%·mandatory</span><span·class="w">208 <p>The·type·definition·of·a·child·specification·is·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">child_spec</span><span·class="p"·data-group-id="0111326427-1">(</span><span·class="p"·data-group-id="0111326427-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0111326427-2">#{</span><span·class="ss">id</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·173,·SHA:·e5936799e1198833646592b170fc838de6373d728c8e817a2239e61af641c7d1·...·]-3">)</span><span·class="p">,</span><span·class="w">·············</span><span·class="c1">%·mandatory</span><span·class="w">
209 ·················</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">mfargs</span><span·class="p"·data-group-id="8831620348-4">(</span><span·class="p"·data-group-id="8831620348-4">)</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·mandatory</span><span·class="w">209 ·················</span><span·class="ss">start</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">mfargs</span><span·class="p"·data-group-id="0111326427-4">(</span><span·class="p"·data-group-id="0111326427-4">)</span><span·class="p">,</span><span·class="w">············</span><span·class="c1">%·mandatory</span><span·class="w">
210 ·················</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">restart</span><span·class="p"·data-group-id="8831620348-5">(</span><span·class="p"·data-group-id="8831620348-5">)</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·optional</span><span·class="w">210 ·················</span><span·class="ss">restart</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">restart</span><span·class="p"·data-group-id="0111326427-5">(</span><span·class="p"·data-group-id="0111326427-5">)</span><span·class="p">,</span><span·class="w">·········</span><span·class="c1">%·optional</span><span·class="w">
211 ·················</span><span·class="ss">significant</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">significant</span><span·class="p"·data-group-id="8831620348-6">(</span><span·class="p"·data-group-id="8831620348-6">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·optional</span><span·class="w">211 ·················</span><span·class="ss">significant</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">significant</span><span·class="p"·data-group-id="0111326427-6">(</span><span·class="p"·data-group-id="0111326427-6">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·optional</span><span·class="w">
212 ·················</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="8831620348-7">(</span><span·class="p"·data-group-id="8831620348-7">)</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·optional</span><span·class="w">212 ·················</span><span·class="ss">shutdown</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">shutdown</span><span·class="p"·data-group-id="0111326427-7">(</span><span·class="p"·data-group-id="0111326427-7">)</span><span·class="p">,</span><span·class="w">·······</span><span·class="c1">%·optional</span><span·class="w">
213 ·················</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">worker</span><span·class="p"·data-group-id="8831620348-8">(</span><span·class="p"·data-group-id="8831620348-8">)</span><span·class="p">,</span><span·class="w">·············</span><span·class="c1">%·optional</span><span·class="w">213 ·················</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">worker</span><span·class="p"·data-group-id="0111326427-8">(</span><span·class="p"·data-group-id="0111326427-8">)</span><span·class="p">,</span><span·class="w">·············</span><span·class="c1">%·optional</span><span·class="w">
214 ·················</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="8831620348-9">(</span><span·class="p"·data-group-id="8831620348-9">)</span><span·class="p"·data-group-id="8831620348-2">}</span><span·class="w">·········</span><span·class="c1">%·optional</span></code></pre><p>The·old·tuple·format·is·kept·for·backwards·compatibility,·see·<a·href="#t:child_spec/0"><code·class="inline">child_spec/0</code></a>,214 ·················</span><span·class="ss">modules</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="nf">modules</span><span·class="p"·data-group-id="0111326427-9">(</span><span·class="p"·data-group-id="0111326427-9">)</span><span·class="p"·data-group-id="0111326427-2">}</span><span·class="w">·········</span><span·class="c1">%·optional</span></code></pre><p>The·old·tuple·format·is·kept·for·backwards·compatibility,·see·<a·href="#t:child_spec/0"><code·class="inline">child_spec/0</code></a>,
215 but·the·map·is·preferred.</p><ul><li><p><code·class="inline">id</code>·is·used·to·identify·the·child·specification·internally·by·the·supervisor.</p><p>The·<code·class="inline">id</code>·key·is·mandatory.</p><p>Notice·that·this·identifier·on·occations·has·been·called·&quot;name&quot;.·As·far·as215 but·the·map·is·preferred.</p><ul><li><p><code·class="inline">id</code>·is·used·to·identify·the·child·specification·internally·by·the·supervisor.</p><p>The·<code·class="inline">id</code>·key·is·mandatory.</p><p>Notice·that·this·identifier·on·occations·has·been·called·&quot;name&quot;.·As·far·as
216 possible,·the·terms·&quot;identifier&quot;·or·&quot;id&quot;·are·now·used·but·to·keep·backward216 possible,·the·terms·&quot;identifier&quot;·or·&quot;id&quot;·are·now·used·but·to·keep·backward
217 compatibility,·some·occurences·of·&quot;name&quot;·can·still·be·found,·for·example·in217 compatibility,·some·occurences·of·&quot;name&quot;·can·still·be·found,·for·example·in
218 error·messages.</p></li><li><p><code·class="inline">start</code>·defines·the·function·call·used·to·start·the·child·process.·It·must·be218 error·messages.</p></li><li><p><code·class="inline">start</code>·defines·the·function·call·used·to·start·the·child·process.·It·must·be
219 a·module-function-arguments·tuple·<code·class="inline">{M,F,A}</code>·used·as219 a·module-function-arguments·tuple·<code·class="inline">{M,F,A}</code>·used·as
220 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,F,A)</code></a>.</p><p>The·start·function·<em>must·create·and·link·to</em>·the·child·process,·and·must220 <a·href="../../../../erts-15.0.1/doc/html/erlang.html#apply/3"><code·class="inline">apply(M,F,A)</code></a>.</p><p>The·start·function·<em>must·create·and·link·to</em>·the·child·process,·and·must
221 return·<code·class="inline">{ok,Child}</code>·or·<code·class="inline">{ok,Child,Info}</code>,·where·<code·class="inline">Child</code>·is·the·pid·of·the221 return·<code·class="inline">{ok,Child}</code>·or·<code·class="inline">{ok,Child,Info}</code>,·where·<code·class="inline">Child</code>·is·the·pid·of·the
19.4 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/timer.html
    
Offset 139, 23 lines modifiedOffset 139, 23 lines modified
139 susceptible·to·being·overloaded.·See139 susceptible·to·being·overloaded.·See
140 <a·href="../../../../doc/system/commoncaveats.html#timer-module">the·Timer·Module·section·in·the·Efficiency·Guide</a>.</p><h2·id="module-examples"·class="section-heading">140 <a·href="../../../../doc/system/commoncaveats.html#timer-module">the·Timer·Module·section·in·the·Efficiency·Guide</a>.</p><h2·id="module-examples"·class="section-heading">
141 ··<a·href="#module-examples"·class="hover-link">141 ··<a·href="#module-examples"·class="hover-link">
142 ····<i·class="ri-link-m"·aria-hidden="true"></i>142 ····<i·class="ri-link-m"·aria-hidden="true"></i>
143 ··</a>143 ··</a>
144 ··<span·class="text">Examples</span>144 ··<span·class="text">Examples</span>
145 </h2>145 </h2>
146 <p><em>Example·1</em></p><p>The·following·example·shows·how·to·print·&quot;Hello·World!&quot;·in·5·seconds:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="7016791820-1">(</span><span·class="mi">5000</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">io</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">format</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·440,·SHA:·4903e3f61ce1d5bb10deafc9a0393bb24e2a11f4cd15b2f2cc4e5a442c299c3e·...·]-1">)</span><span·class="p">.</span><span·class="w">146 <p><em>Example·1</em></p><p>The·following·example·shows·how·to·print·&quot;Hello·World!&quot;·in·5·seconds:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="2223537518-1">(</span><span·class="mi">5000</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">io</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">format</span><span·class="p">,</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·440,·SHA:·7e2c86c7dc99af88d808c42b53fd40ea91a67294de2b14dc5e8de881aa782675·...·]-1">)</span><span·class="p">.</span><span·class="w">
147 </span><span·class="p"·data-group-id="7016791820-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="7016791820-4">}</span><span·class="w">147 </span><span·class="p"·data-group-id="2223537518-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="2223537518-4">}</span><span·class="w">
148 </span><span·class="n">Hello</span><span·class="w">·</span><span·class="n">World</span><span·class="o">!</span></code></pre><p><em>Example·2</em></p><p>The·following·example·shows·a·process·performing·a·certain·action,·and·if·this148 </span><span·class="n">Hello</span><span·class="w">·</span><span·class="n">World</span><span·class="o">!</span></code></pre><p><em>Example·2</em></p><p>The·following·example·shows·a·process·performing·a·certain·action,·and·if·this
149 action·is·not·completed·within·a·certain·limit,·the·process·is·killed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="7846295178-1">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7846295178-2">[</span><span·class="ss">foo</span><span[·...·truncated·by·diffoscope;·len:·164,·SHA:·7ae67ae28a3d035d2074c6f9de0a2c05a5bdbb5ee9afc89b0f960190b4dbcff4·...·]-1">)</span><span·class="p">,</span><span·class="w">149 action·is·not·completed·within·a·certain·limit,·the·process·is·killed:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Pid</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn</span><span·class="p"·data-group-id="5176537215-1">(</span><span·class="ss">mod</span><span·class="p">,</span><span·class="w">·</span><span·class="k">fun</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5176537215-2">[</span><span·class="ss">foo</span><span[·...·truncated·by·diffoscope;·len:·164,·SHA:·223b26fdbd076fa01386a67ea7ea27c57d0a6f50a339a3df726869d86612ebf9·...·]-1">)</span><span·class="p">,</span><span·class="w">
150 </span><span·class="c1">%%·If·pid·is·not·finished·in·10·seconds,·kill·him</span><span·class="w">150 </span><span·class="c1">%%·If·pid·is·not·finished·in·10·seconds,·kill·him</span><span·class="w">
151 </span><span·class="p"·data-group-id="7846295178-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p"·data-group-id="7846295178-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·460,·SHA:·e7e784e501d00f768cbc96ac4bf07b27facfa29454c20f3b8ab69a9028d7b577·...·]-4">)</span><span·class="p">,</span><span·class="w">151 </span><span·class="p"·data-group-id="5176537215-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">R</span><span·class="p"·data-group-id="5176537215-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·460,·SHA:·f979099840826d944a998bac1135bbcbab24d537da626763f48230c2ef4cf79e·...·]-4">)</span><span·class="p">,</span><span·class="w">
152 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">152 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
153 </span><span·class="c1">%%·We·change·our·mind...</span><span·class="w">153 </span><span·class="c1">%%·We·change·our·mind...</span><span·class="w">
154 </span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">cancel</span><span·class="p"·data-group-id="7846295178-6">(</span><span·class="n">R</span><span·class="p"·data-group-id="7846295178-6">)</span><span·class="p">,</span><span·class="w">154 </span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">cancel</span><span·class="p"·data-group-id="5176537215-6">(</span><span·class="n">R</span><span·class="p"·data-group-id="5176537215-6">)</span><span·class="p">,</span><span·class="w">
155 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="module-notes"·class="section-heading">155 </span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="module-notes"·class="section-heading">
156 ··<a·href="#module-notes"·class="hover-link">156 ··<a·href="#module-notes"·class="hover-link">
157 ····<i·class="ri-link-m"·aria-hidden="true"></i>157 ····<i·class="ri-link-m"·aria-hidden="true"></i>
158 ··</a>158 ··</a>
159 ··<span·class="text">Notes</span>159 ··<span·class="text">Notes</span>
160 </h2>160 </h2>
161 <p>A·timer·can·always·be·removed·by·calling·<a·href="#cancel/1"><code·class="inline">cancel/1</code></a>.</p><p>An·interval·timer,·that·is,·a·timer·created·by·evaluating·any·of·the·functions161 <p>A·timer·can·always·be·removed·by·calling·<a·href="#cancel/1"><code·class="inline">cancel/1</code></a>.</p><p>An·interval·timer,·that·is,·a·timer·created·by·evaluating·any·of·the·functions
Offset 174, 28 lines modifiedOffset 174, 28 lines modified
174 process,·and·therefore·calls·to·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·in·those·functions·will·return·the·Pid174 process,·and·therefore·calls·to·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·in·those·functions·will·return·the·Pid
175 of·this·process,·which·is·different·from·the·process·that·called175 of·this·process,·which·is·different·from·the·process·that·called
176 <code·class="inline">timer:apply_*</code>.</p><p><em>Example</em></p><p>In·the·following·example,·the·intention·is·to·set·a·timer·to·execute·a·function176 <code·class="inline">timer:apply_*</code>.</p><p><em>Example</em></p><p>In·the·following·example,·the·intention·is·to·set·a·timer·to·execute·a·function
177 after·1·second,·which·performs·a·fictional·task,·and·then·wants·to·inform·the177 after·1·second,·which·performs·a·fictional·task,·and·then·wants·to·inform·the
178 process·which·set·the·timer·about·its·completion,·by·sending·it·a·<code·class="inline">done</code>178 process·which·set·the·timer·about·its·completion,·by·sending·it·a·<code·class="inline">done</code>
179 message.</p><p>Using·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·<em>inside</em>·the·timed·function,·the·code·below·does·not·work·as179 message.</p><p>Using·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·<em>inside</em>·the·timed·function,·the·code·below·does·not·work·as
180 intended.·The·task·gets·done,·but·the·<code·class="inline">done</code>·message·gets·sent·to·the·wrong180 intended.·The·task·gets·done,·but·the·<code·class="inline">done</code>·message·gets·sent·to·the·wrong
181 process·and·is·lost.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="1244683299-1">(</span><span·class="mi">1000</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1244683299-2">(</span><span·class="p"·data-group-id="1244683299-2">)</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·565,·SHA:·b7373112506e197e218569323d27d2d3e05c22d77a19ff4669e65043bdf4aa95·...·]9-1">)</span><span·class="p">.</span><span·class="w">181 process·and·is·lost.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="4430554209-1">(</span><span·class="mi">1000</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4430554209-2">(</span><span·class="p"·data-group-id="4430554209-2">)</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·565,·SHA:·4b4155f5444f6f9872a14bdb429660865eb88cf76e71770437be7bd9abeb6b83·...·]9-1">)</span><span·class="p">.</span><span·class="w">
182 </span><span·class="p"·data-group-id="1244683299-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="1244683299-5">}</span><span·class="gp·unselectable">182 </span><span·class="p"·data-group-id="4430554209-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="4430554209-5">}</span><span·class="gp·unselectable">
183 2&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">183 2&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
184 </span><span·class="c1">%%·...·5s·pass...</span><span·class="w">184 </span><span·class="c1">%%·...·5s·pass...</span><span·class="w">
185 </span><span·class="ss">timeout</span></code></pre><p>The·code·below·calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·in·the·process·which·sets·the·timer·and·assigns·it185 </span><span·class="ss">timeout</span></code></pre><p>The·code·below·calls·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#self/0"><code·class="inline">self/0</code></a>·in·the·process·which·sets·the·timer·and·assigns·it
186 to·a·variable,·which·is·then·used·in·the·function·to·send·the·<code·class="inline">done</code>·message·to,186 to·a·variable,·which·is·then·used·in·the·function·to·send·the·<code·class="inline">done</code>·message·to,
187 and·so·works·as·intended.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Target</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="8020405871-1">(</span><span·class="p"·data-group-id="8020405871-1">)</span><span·class="w">187 and·so·works·as·intended.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="n">Target</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7498641833-1">(</span><span·class="p"·data-group-id="7498641833-1">)</span><span·class="w">
188 </span><span·class="o">&lt;</span><span·class="mf">0.82</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">188 </span><span·class="o">&lt;</span><span·class="mf">0.82</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="gp·unselectable">
189 2&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="8020405871-2">(</span><span·class="mi">1000</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8020405871-3">(</span><span·class="p"·data-group-id="8020405871-3">)</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·461,·SHA:·7d646677a60c4ac20dd6f36eb0405561a81e4b2d5fcc84ff1cfd169458516fbc·...·]-2">)</span><span·class="p">.</span><span·class="w">189 2&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="7498641833-2">(</span><span·class="mi">1000</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7498641833-3">(</span><span·class="p"·data-group-id="7498641833-3">)</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·461,·SHA:·c4fbfe43ebb35b9fd52570118b9319b61efdbac0a25903a28818ccbecc5839fc·...·]-2">)</span><span·class="p">.</span><span·class="w">
190 </span><span·class="p"·data-group-id="8020405871-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="8020405871-5">}</span><span·class="gp·unselectable">190 </span><span·class="p"·data-group-id="7498641833-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="7498641833-5">}</span><span·class="gp·unselectable">
191 3&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">191 3&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
192 </span><span·class="c1">%%·...·1s·passes...</span><span·class="w">192 </span><span·class="c1">%%·...·1s·passes...</span><span·class="w">
193 </span><span·class="ss">done</span></code></pre><p>Another·option·is·to·pass·the·message·target·as·a·parameter·to·the·function.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="8352967186-1">(</span><span·class="mi">1000</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8352967186-2">(</span><span·class="n">Target</span><span·class="p"·data-group-id="8352967186-2">)</s[·...·truncated·by·diffoscope;·len:·778,·SHA:·c4d569eb3c27086d9d4f93461b884338fdaba24f0ff4b6da934b3b071f538a70·...·]-1">)</span><span·class="p">.</span><span·class="w">193 </span><span·class="ss">done</span></code></pre><p>Another·option·is·to·pass·the·message·target·as·a·parameter·to·the·function.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">apply_after</span><span·class="p"·data-group-id="6247843534-1">(</span><span·class="mi">1000</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6247843534-2">(</span><span·class="n">Target</span><span·class="p"·data-group-id="6247843534-2">)</s[·...·truncated·by·diffoscope;·len:·778,·SHA:·2b82ba1140309450044baeccb220dae99c00d5a5bc99a82cdb621daf821abd45·...·]-1">)</span><span·class="p">.</span><span·class="w">
194 </span><span·class="p"·data-group-id="8352967186-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="8352967186-6">}</span><span·class="gp·unselectable">194 </span><span·class="p"·data-group-id="6247843534-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">TRef</span><span·class="p"·data-group-id="6247843534-6">}</span><span·class="gp·unselectable">
195 2&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">195 2&gt;·</span><span·class="k">receive</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">done</span><span·class="w">·</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">5000</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">timeout</span><span·class="w">·</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
196 </span><span·class="c1">%%·...·1s·passes...</span><span·class="w">196 </span><span·class="c1">%%·...·1s·passes...</span><span·class="w">
197 </span><span·class="ss">done</span></code></pre>197 </span><span·class="ss">done</span></code></pre>
198 ····</section>198 ····</section>
  
199 </div>199 </div>
  
33.6 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/unicode.html
    
Offset 1067, 21 lines modifiedOffset 1067, 21 lines modified
1067 binaries·in·other·ways·are·split·on·non-UTF·character·boundaries.·An1067 binaries·in·other·ways·are·split·on·non-UTF·character·boundaries.·An
1068 <code·class="inline">incomplete</code>·tuple·is·then·returned·instead·of·the·<code·class="inline">error</code>·tuple.·It·consists·of1068 <code·class="inline">incomplete</code>·tuple·is·then·returned·instead·of·the·<code·class="inline">error</code>·tuple.·It·consists·of
1069 the·same·parts·as·the·<code·class="inline">error</code>·tuple,·but·the·tag·is·<code·class="inline">incomplete</code>·instead·of1069 the·same·parts·as·the·<code·class="inline">error</code>·tuple,·but·the·tag·is·<code·class="inline">incomplete</code>·instead·of
1070 <code·class="inline">error</code>·and·the·last·element·is·always·guaranteed·to·be·a·binary·consisting·of1070 <code·class="inline">error</code>·and·the·last·element·is·always·guaranteed·to·be·a·binary·consisting·of
1071 the·first·part·of·a·(so·far)·valid·UTF·character.</p><p>If·one·UTF·character·is·split·over·two·consecutive·binaries·in·the·<code·class="inline">Data</code>,·the1071 the·first·part·of·a·(so·far)·valid·UTF·character.</p><p>If·one·UTF·character·is·split·over·two·consecutive·binaries·in·the·<code·class="inline">Data</code>,·the
1072 conversion·succeeds.·This·means·that·a·character·can·be·decoded·from·a·range·of1072 conversion·succeeds.·This·means·that·a·character·can·be·decoded·from·a·range·of
1073 binaries·as·long·as·the·whole·range·is·specified·as·input·without·errors1073 binaries·as·long·as·the·whole·range·is·specified·as·input·without·errors
1074 occurring.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">decode_data</span><span·class="p"·data-group-id="2167725664-1">(</span><span·class="n">Data</span><span·class="p"·data-group-id="2167725664-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1074 occurring.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">decode_data</span><span·class="p"·data-group-id="7830358468-1">(</span><span·class="n">Data</span><span·class="p"·data-group-id="7830358468-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1075 ···</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_list</span><span·class="p"·data-group-id="2167725664-2">(</span><span·class="n">Data</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p"·data-group-id="2167725664-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">1075 ···</span><span·class="k">case</span><span·class="w">·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_list</span><span·class="p"·data-group-id="7830358468-2">(</span><span·class="n">Data</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p"·data-group-id="7830358468-2">)</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
1076 ······</span><span·class="p"·data-group-id="2167725664-3">{</span><span·class="ss">incomplete</span><span·class="p">,</span><span·class="n">Encoded</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rest</span><span·class="p"·data-group-id="2167725664-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1076 ······</span><span·class="p"·data-group-id="7830358468-3">{</span><span·class="ss">incomplete</span><span·class="p">,</span><span·class="n">Encoded</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rest</span><span·class="p"·data-group-id="7830358468-3">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1077 ············</span><span·class="n">More</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">get_some_more_data</span><span·class="p"·data-group-id="2167725664-4">(</span><span·class="p"·data-group-id="2167725664-4">)</span><span·class="p">,</span><span·class="w">1077 ············</span><span·class="n">More</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">get_some_more_data</span><span·class="p"·data-group-id="7830358468-4">(</span><span·class="p"·data-group-id="7830358468-4">)</span><span·class="p">,</span><span·class="w">
1078 ············</span><span·class="n">Encoded</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nf">decode_data</span><span·class="p"·data-group-id="2167725664-5">(</span><span·class="p"·data-group-id="2167725664-6">[</span><span·class="n">Rest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">More</span><span·class="p"·data-group-id="2167725664-6">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·4b6a2affef1d532d7b4f8f778e2f0afdf0abab17c28842d7c5eee632b5787915·...·]-5">)</span><span·class="p">;</span><span·class="w">1078 ············</span><span·class="n">Encoded</span><span·class="w">·</span><span·class="o">++</span><span·class="w">·</span><span·class="nf">decode_data</span><span·class="p"·data-group-id="7830358468-5">(</span><span·class="p"·data-group-id="7830358468-6">[</span><span·class="n">Rest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">More</span><span·class="p"·data-group-id="7830358468-6">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·3bffcedcf22bf0e2ebe65c342b2f0e5b6f3c9ed53fca92f891300c87e4271322·...·]-5">)</span><span·class="p">;</span><span·class="w">
1079 ······</span><span·class="p"·data-group-id="2167725664-7">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Encoded</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="2167725664-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1079 ······</span><span·class="p"·data-group-id="7830358468-7">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="n">Encoded</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="7830358468-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1080 ············</span><span·class="nf">handle_error</span><span·class="p"·data-group-id="2167725664-8">(</span><span·class="n">Encoded</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="2167725664-8">)</span><span·class="p">;</span><span·class="w">1080 ············</span><span·class="nf">handle_error</span><span·class="p"·data-group-id="7830358468-8">(</span><span·class="n">Encoded</span><span·class="p">,</span><span·class="n">Rest</span><span·class="p"·data-group-id="7830358468-8">)</span><span·class="p">;</span><span·class="w">
1081 ······</span><span·class="n">List</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">1081 ······</span><span·class="n">List</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
1082 ············</span><span·class="n">List</span><span·class="w">1082 ············</span><span·class="n">List</span><span·class="w">
1083 ···</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>However,·bit·strings·that·are·not·whole·bytes·are·not·allowed,·so·a·UTF1083 ···</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>However,·bit·strings·that·are·not·whole·bytes·are·not·allowed,·so·a·UTF
1084 character·must·be·split·along·8-bit·boundaries·to·ever·be·decoded.</p><p>A·<code·class="inline">badarg</code>·exception·is·thrown·for·the·following·cases:</p><ul><li>Any·parameters·are·of·the·wrong·type.</li><li>The·list·structure·is·invalid·(a·number·as·tail).</li><li>The·binaries·do·not·contain·whole·bytes·(bit·strings).</li></ul>1084 character·must·be·split·along·8-bit·boundaries·to·ever·be·decoded.</p><p>A·<code·class="inline">badarg</code>·exception·is·thrown·for·the·following·cases:</p><ul><li>Any·parameters·are·of·the·wrong·type.</li><li>The·list·structure·is·invalid·(a·number·as·tail).</li><li>The·binaries·do·not·contain·whole·bytes·(bit·strings).</li></ul>
1085 ··</section>1085 ··</section>
1086 </section>1086 </section>
1087 <section·class="detail"·id="characters_to_nfc_binary/1">1087 <section·class="detail"·id="characters_to_nfc_binary/1">
Offset 1108, 15 lines modifiedOffset 1108, 15 lines modified
1108 ······<div·class="specs">1108 ······<div·class="specs">
  
1109 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfc_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>1109 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfc_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1110 ······</div>1110 ······</div>
  
1111 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1111 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1112 of·canonical·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfc_binary</span><span·class="p"·data-group-id="5631756789-1">(</span><span·class="p"·data-group-id="5631756789-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="5631756789-3">[</span><[·...·truncated·by·diffoscope;·len:·587,·SHA:·e0ed3ca2d1b65e127f2d5b9c5853a836074da6377bfb3460236e5a117ef4673a·...·]-1">)</span><span·class="p">.</span><span·class="w">1112 of·canonical·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfc_binary</span><span·class="p"·data-group-id="1968826318-1">(</span><span·class="p"·data-group-id="1968826318-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="1968826318-3">[</span><[·...·truncated·by·diffoscope;·len:·587,·SHA:·b3c7a7d10fad6c1317e495c98cd0fb70df156cf7b4ba5d4a38d072b3370aa57f·...·]-1">)</span><span·class="p">.</span><span·class="w">
1113 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre>1113 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre>
1114 ··</section>1114 ··</section>
1115 </section>1115 </section>
1116 <section·class="detail"·id="characters_to_nfc_list/1">1116 <section·class="detail"·id="characters_to_nfc_list/1">
  
1117 ··<div·class="detail-header">1117 ··<div·class="detail-header">
1118 ····<a·href="#characters_to_nfc_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1118 ····<a·href="#characters_to_nfc_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1140, 15 lines modifiedOffset 1140, 15 lines modified
1140 ······<div·class="specs">1140 ······<div·class="specs">
  
1141 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfc_list(<a·href="#t:chardata/0">chardata</a>())·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()]·|·{error,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()],·<a·href="#t:chardata/0">chardata</a>()}.</pre>1141 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfc_list(<a·href="#t:chardata/0">chardata</a>())·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()]·|·{error,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()],·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1142 ······</div>1142 ······</div>
  
1143 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1143 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1144 of·canonical·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·a·list·of·characters.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfc_list</span><span·class="p"·data-group-id="7106249916-1">(</span><span·class="p"·data-group-id="7106249916-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="7106249916-3">[</span><s[·...·truncated·by·diffoscope;·len:·586,·SHA:·bc957a3b1aa4b46ea446ae46be9a5c0ef65719795fddce464af9338e7df3a7e4·...·]-1">)</span><span·class="p">.</span><span·class="w">1144 of·canonical·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·a·list·of·characters.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfc_list</span><span·class="p"·data-group-id="7028557625-1">(</span><span·class="p"·data-group-id="7028557625-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="7028557625-3">[</span><s[·...·truncated·by·diffoscope;·len:·586,·SHA:·2e2b03c404e685e7d655c03510aec3857bfe26d3438ee357c84b17bd89adadc1·...·]-1">)</span><span·class="p">.</span><span·class="w">
1145 </span><span·class="s">&quot;abc..åäö&quot;</span></code></pre>1145 </span><span·class="s">&quot;abc..åäö&quot;</span></code></pre>
1146 ··</section>1146 ··</section>
1147 </section>1147 </section>
1148 <section·class="detail"·id="characters_to_nfd_binary/1">1148 <section·class="detail"·id="characters_to_nfd_binary/1">
  
1149 ··<div·class="detail-header">1149 ··<div·class="detail-header">
1150 ····<a·href="#characters_to_nfd_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1150 ····<a·href="#characters_to_nfd_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1172, 15 lines modifiedOffset 1172, 15 lines modified
1172 ······<div·class="specs">1172 ······<div·class="specs">
  
1173 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfd_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>1173 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfd_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1174 ······</div>1174 ······</div>
  
1175 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1175 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1176 of·canonical·equivalent·Decomposed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_binary</span><span·class="p"·data-group-id="9602147216-1">(</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="p"·data-group-id="9602147216-1">)</span><span·class="p">.</span><span·class="w">1176 of·canonical·equivalent·Decomposed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_binary</span><span·class="p"·data-group-id="9874714909-1">(</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="p"·data-group-id="9874714909-1">)</span><span·class="p">.</span><span·class="w">
1177 </span><span·class="p">&lt;&lt;</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">46</span><span·class="p">,</span><span·class="mi">46</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="mi">136</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="mi">136</span><span·class="p">&gt;&gt;</span></code></pre>1177 </span><span·class="p">&lt;&lt;</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">46</span><span·class="p">,</span><span·class="mi">46</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="mi">138</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="mi">136</span><span·class="p">,</span><span·class="mi">111</span><span·class="p">,</span><span·class="mi">204</span><span·class="p">,</span><span·class="mi">136</span><span·class="p">&gt;&gt;</span></code></pre>
1178 ··</section>1178 ··</section>
1179 </section>1179 </section>
1180 <section·class="detail"·id="characters_to_nfd_list/1">1180 <section·class="detail"·id="characters_to_nfd_list/1">
  
1181 ··<div·class="detail-header">1181 ··<div·class="detail-header">
1182 ····<a·href="#characters_to_nfd_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1182 ····<a·href="#characters_to_nfd_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1204, 16 lines modifiedOffset 1204, 16 lines modified
1204 ······<div·class="specs">1204 ······<div·class="specs">
  
1205 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfd_list(<a·href="#t:chardata/0">chardata</a>())·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()]·|·{error,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()],·<a·href="#t:chardata/0">chardata</a>()}.</pre>1205 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfd_list(<a·href="#t:chardata/0">chardata</a>())·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()]·|·{error,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()],·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1206 ······</div>1206 ······</div>
  
1207 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1207 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1208 of·canonical·equivalent·Decomposed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·a·list·of·characters.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_list</span><span·class="p"·data-group-id="2870460628-1">(</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="p"·data-group-id="2870460628-1">)</span><span·class="p">.</span><span·class="w">1208 of·canonical·equivalent·Decomposed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·a·list·of·characters.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfd_list</span><span·class="p"·data-group-id="1637989419-1">(</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="p"·data-group-id="1637989419-1">)</span><span·class="p">.</span><span·class="w">
1209 </span><span·class="p"·data-group-id="2870460628-2">[</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">46</span><span·class="p">,</span><span·class="mi">46</span><span·cl[·...·truncated·by·diffoscope;·len:·337,·SHA:·f7ba95bd4bc8136003e8d90c06b12c99d02b820422cde393c0f01331a3d34ecc·...·]-2">]</span></code></pre>1209 </span><span·class="p"·data-group-id="1637989419-2">[</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">,</span><span·class="mi">46</span><span·class="p">,</span><span·class="mi">46</span><span·cl[·...·truncated·by·diffoscope;·len:·337,·SHA:·b5ae4aa0a61ba69f19eaaf5df3d3df7c86f22a52931623221822d243bab34e9e·...·]-2">]</span></code></pre>
1210 ··</section>1210 ··</section>
1211 </section>1211 </section>
1212 <section·class="detail"·id="characters_to_nfkc_binary/1">1212 <section·class="detail"·id="characters_to_nfkc_binary/1">
  
1213 ··<div·class="detail-header">1213 ··<div·class="detail-header">
1214 ····<a·href="#characters_to_nfkc_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1214 ····<a·href="#characters_to_nfkc_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1215 ······<i·class="ri-link-m"·aria-hidden="true"></i>1215 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1236, 15 lines modifiedOffset 1236, 15 lines modified
1236 ······<div·class="specs">1236 ······<div·class="specs">
  
1237 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfkc_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>1237 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfkc_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1238 ······</div>1238 ······</div>
  
1239 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1239 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1240 of·compatibly·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfkc_binary</span><span·class="p"·data-group-id="3292729681-1">(</span><span·class="p"·data-group-id="3292729681-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="3292729681-3">[</span><sp[·...·truncated·by·diffoscope;·len:·796,·SHA:·73bdbb079ed035ef505e9c5e7b8fb6d38fd5d74123fa588c7691d7e561e98982·...·]1-1">)</span><span·class="p">.</span><span·class="w">1240 of·compatibly·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfkc_binary</span><span·class="p"·data-group-id="3266058011-1">(</span><span·class="p"·data-group-id="3266058011-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="3266058011-3">[</span><sp[·...·truncated·by·diffoscope;·len:·796,·SHA:·242c297953cb5dba39dd691d6dbf0de00ffab93f22d39b37e3ca71baa2682f5b·...·]1-1">)</span><span·class="p">.</span><span·class="w">
1241 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..åäö32&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre>1241 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..åäö32&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre>
1242 ··</section>1242 ··</section>
1243 </section>1243 </section>
1244 <section·class="detail"·id="characters_to_nfkc_list/1">1244 <section·class="detail"·id="characters_to_nfkc_list/1">
  
1245 ··<div·class="detail-header">1245 ··<div·class="detail-header">
1246 ····<a·href="#characters_to_nfkc_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1246 ····<a·href="#characters_to_nfkc_list/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1268, 15 lines modifiedOffset 1268, 15 lines modified
1268 ······<div·class="specs">1268 ······<div·class="specs">
  
1269 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfkc_list(<a·href="#t:chardata/0">chardata</a>())·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()]·|·{error,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()],·<a·href="#t:chardata/0">chardata</a>()}.</pre>1269 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfkc_list(<a·href="#t:chardata/0">chardata</a>())·->·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()]·|·{error,·[<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:char/0">char</a>()],·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1270 ······</div>1270 ······</div>
  
1271 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1271 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1272 of·compatibly·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·a·list·of·characters.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfkc_list</span><span·class="p"·data-group-id="5061281483-1">(</span><span·class="p"·data-group-id="5061281483-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="5061281483-3">[</span><[·...·truncated·by·diffoscope;·len:·799,·SHA:·9bfd19155039b2f94aeaede61a5cca062e36d356a169bc25aef51e99f7e265e2·...·]-1">)</span><span·class="p">.</span><span·class="w">1272 of·compatibly·equivalent·Composed·characters·according·to·the·Unicode·standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·a·list·of·characters.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfkc_list</span><span·class="p"·data-group-id="1705556912-1">(</span><span·class="p"·data-group-id="1705556912-2">[</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc..a&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p"·data-group-id="1705556912-3">[</span><[·...·truncated·by·diffoscope;·len:·799,·SHA:·f4120c6c0c4a8d4e7814215ef4223807765f20e0dac5c694bb8756496a1d420c·...·]-1">)</span><span·class="p">.</span><span·class="w">
1273 </span><span·class="s">&quot;abc..åäö32&quot;</span></code></pre>1273 </span><span·class="s">&quot;abc..åäö32&quot;</span></code></pre>
1274 ··</section>1274 ··</section>
1275 </section>1275 </section>
1276 <section·class="detail"·id="characters_to_nfkd_binary/1">1276 <section·class="detail"·id="characters_to_nfkd_binary/1">
  
1277 ··<div·class="detail-header">1277 ··<div·class="detail-header">
1278 ····<a·href="#characters_to_nfkd_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1278 ····<a·href="#characters_to_nfkd_binary/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 1301, 15 lines modifiedOffset 1301, 15 lines modified
  
1301 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfkd_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>1301 ··········<pre·translate="no"><span·class="attribute">-spec</span>·characters_to_nfkd_binary(<a·href="#t:chardata/0">chardata</a>())·->·<a·href="#t:unicode_binary/0">unicode_binary</a>()·|·{error,·<a·href="#t:unicode_binary/0">unicode_binary</a>(),·<a·href="#t:chardata/0">chardata</a>()}.</pre>
  
1302 ······</div>1302 ······</div>
  
1303 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form1303 <p>Converts·a·possibly·deep·list·of·characters·and·binaries·into·a·Normalized·Form
1304 of·compatibly·equivalent·Decomposed·characters·according·to·the·Unicode1304 of·compatibly·equivalent·Decomposed·characters·according·to·the·Unicode
1305 standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfkd_binary</span><span·class="p"·data-group-id="1086972126-1">(</span><span·class="p"·data-group-id="1086972126-2">[</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="1086972126-3">[</span><span·class="mi">65299</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·168,·SHA:·6144d14b52e5f556c1b52416c78856df9a7b28794d465fa2495118226af397ca·...·]-1">)</span><span·class="p">.</span><span·class="w">1305 standard.</p><p>Any·binaries·in·the·input·must·be·encoded·with·utf8·encoding.</p><p>The·result·is·an·utf8·encoded·binary.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">unicode</span><span·class="p">:</span><span·class="nf">characters_to_nfkd_binary</span><span·class="p"·data-group-id="5859685109-1">(</span><span·class="p"·data-group-id="5859685109-2">[</span><span·class="s">&quot;abc..åäö&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="5859685109-3">[</span><span·class="mi">65299</span><span·class="p">,</span><span·cl[·...·truncated·by·diffoscope;·len:·168,·SHA:·d4ff5cf982c354453c155a775bbc8eda3d2c83043b3b8b6596c6620ce8453e62·...·]-1">)</span><span·class="p">.</span><span·class="w">
Max diff block lines reached; 4200/34305 bytes (12.24%) of diff not shown.
150 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/unicode_usage.html
    
Offset 335, 28 lines modifiedOffset 335, 28 lines modified
335 communicating·externally.·Functions·and·bit·syntax·exist·to·encode·and·decode335 communicating·externally.·Functions·and·bit·syntax·exist·to·encode·and·decode
336 both·UTF-8,·UTF-16,·and·UTF-32·in·binaries.·However,·library·functions·dealing336 both·UTF-8,·UTF-16,·and·UTF-32·in·binaries.·However,·library·functions·dealing
337 with·binaries·and·Unicode·in·general·only·deal·with·the·default·encoding.</p><p>Character·data·can·be·combined·from·many·sources,·sometimes·available·in·a·mix337 with·binaries·and·Unicode·in·general·only·deal·with·the·default·encoding.</p><p>Character·data·can·be·combined·from·many·sources,·sometimes·available·in·a·mix
338 of·strings·and·binaries.·Erlang·has·for·long·had·the·concept·of·<code·class="inline">iodata</code>·or338 of·strings·and·binaries.·Erlang·has·for·long·had·the·concept·of·<code·class="inline">iodata</code>·or
339 <code·class="inline">iolist</code>s,·where·binaries·and·lists·can·be·combined·to·represent·a·sequence·of339 <code·class="inline">iolist</code>s,·where·binaries·and·lists·can·be·combined·to·represent·a·sequence·of
340 bytes.·In·the·same·way,·the·Unicode-aware·modules·often·allow·for·combinations340 bytes.·In·the·same·way,·the·Unicode-aware·modules·often·allow·for·combinations
341 of·binaries·and·lists,·where·the·binaries·have·characters·encoded·in·UTF-8·and341 of·binaries·and·lists,·where·the·binaries·have·characters·encoded·in·UTF-8·and
342 the·lists·contain·such·binaries·or·numbers·representing·Unicode·code·points:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">unicode_binary</span><span·class="p"·data-group-id="5769398954-1">(</span><span·class="p"·data-group-id="5769398954-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="5769398954-2">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·5d6b3498de9253eb8dbd7bf53e4867f95c642a74a75323e3ea0e1ae0c8759e44·...·]-2">)</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="ss">characters</span><span·class="w">·</span><span·class="ss">encoded</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">8</span><span·class="w">·</span><span·class="ss">coding</span><span·class="w">·</span><span·class="ss">standard</span><span·class="w">342 the·lists·contain·such·binaries·or·numbers·representing·Unicode·code·points:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">unicode_binary</span><span·class="p"·data-group-id="9886672871-1">(</span><span·class="p"·data-group-id="9886672871-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="9886672871-2">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·85b224279584566a5773cfa6aec53f17fef56afe06fab18a416da235e74b45ca·...·]-2">)</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="ss">characters</span><span·class="w">·</span><span·class="ss">encoded</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">8</span><span·class="w">·</span><span·class="ss">coding</span><span·class="w">·</span><span·class="ss">standard</span><span·class="w">
  
343 </span><span·class="nf">chardata</span><span·class="p"·data-group-id="5769398954-3">(</span><span·class="p"·data-group-id="5769398954-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">charlist</span><span·class="p"·data-group-id="5769398954-4">(</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·233,·SHA:·998473615be3161c4a478ab62d42696e9a74d6495b9c55625f9e19d51f383336·...·]-5">)</span><span·class="w">343 </span><span·class="nf">chardata</span><span·class="p"·data-group-id="9886672871-3">(</span><span·class="p"·data-group-id="9886672871-3">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">charlist</span><span·class="p"·data-group-id="9886672871-4">(</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·233,·SHA:·ca5be1ea48eae968f9b88a4cc0c641e8a3319f880e2964b1c390449b9553352f·...·]-5">)</span><span·class="w">
  
344 </span><span·class="nf">charlist</span><span·class="p"·data-group-id="5769398954-6">(</span><span·class="p"·data-group-id="5769398954-6">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">maybe_improper_list</span><span·class="p"·data-group-id="5769398954-7">(</span><span·class="[·...·truncated·by·diffoscope;·len:·536,·SHA:·003de27098df583793e02d2318d8467040474c24c1ebb28619792a49cc60313a·...·]-10">)</span><span·class="p">,</span><span·class="w">344 </span><span·class="nf">charlist</span><span·class="p"·data-group-id="9886672871-6">(</span><span·class="p"·data-group-id="9886672871-6">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">maybe_improper_list</span><span·class="p"·data-group-id="9886672871-7">(</span><span·class="[·...·truncated·by·diffoscope;·len:·536,·SHA:·02a9027ee6a5bc6ad27cb945865992774cfb4791bab7ae1de5e782c9a2d15884·...·]-10">)</span><span·class="p">,</span><span·class="w">
345 ··</span><span·class="nf">unicode_binary</span><span·class="p"·data-group-id="5769398954-11">(</span><span·class="p"·data-group-id="5769398954-11">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">nil</span><span·class="p"·data-group-id="5769398954-12">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·69,·SHA:·9902de5ea7f2a4c65eb600a349c6b3a3fd2d4da556411c5ba14bfd3c18fb9d73·...·]-7">)</span></code></pre><p>The·module·<a·href="unicode.html"><code·class="inline">unicode</code></a>·even·supports·similar·mixes·with·binaries·containing345 ··</span><span·class="nf">unicode_binary</span><span·class="p"·data-group-id="9886672871-11">(</span><span·class="p"·data-group-id="9886672871-11">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">nil</span><span·class="p"·data-group-id="9886672871-12">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·69,·SHA:·ec45195d716ca0ae203afc3dc33620d894c54f515e8f2e27e893eab76d9da871·...·]-7">)</span></code></pre><p>The·module·<a·href="unicode.html"><code·class="inline">unicode</code></a>·even·supports·similar·mixes·with·binaries·containing
346 other·encodings·than·UTF-8,·but·that·is·a·special·case·to·allow·for·conversions346 other·encodings·than·UTF-8,·but·that·is·a·special·case·to·allow·for·conversions
347 to·and·from·external·data:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">external_unicode_binary</span><span·class="p"·data-group-id="3092732542-1">(</span><span·class="p"·data-group-id="3092732542-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="3092732542-2">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·250771acd400289a4f100200fd272cb9d12e20146059ddc50f4495f1e8de68b2·...·]-2">)</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="ss">characters</span><span·class="w">·</span><span·class="ss">coded</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="ss">user</span><span·class="o">-</span><span·class="ss">specified</span><span·class="w">347 to·and·from·external·data:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">external_unicode_binary</span><span·class="p"·data-group-id="7004823079-1">(</span><span·class="p"·data-group-id="7004823079-1">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">binary</span><span·class="p"·data-group-id="7004823079-2">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·8a15ef314155e8007683900b7e8c0c64146eeed3e25ea090317a67d40fb316a5·...·]-2">)</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="ss">characters</span><span·class="w">·</span><span·class="ss">coded</span><span·class="w">·</span><span·class="ss">in</span><span·class="w">·</span><span·class="ss">a</span><span·class="w">·</span><span·class="ss">user</span><span·class="o">-</span><span·class="ss">specified</span><span·class="w">
348 ··</span><span·class="n">Unicode</span><span·class="w">·</span><span·class="ss">encoding</span><span·class="w">·</span><span·class="ss">other</span><span·class="w">·</span><span·class="ss">than</span><span·class="w">·</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">8</span><span·class="w">·</span><span·class="p"·data-group-id="3092732542-3">(</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">16</span><span·class="w">·</span><span·class="ow">or</span><span·class="w">·</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">32</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·54b1c574ba9b0b8f67473270a22b35b3a0561cb6de5aadc5788111b4208cd31d·...·]-3">)</span><span·class="w">348 ··</span><span·class="n">Unicode</span><span·class="w">·</span><span·class="ss">encoding</span><span·class="w">·</span><span·class="ss">other</span><span·class="w">·</span><span·class="ss">than</span><span·class="w">·</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">8</span><span·class="w">·</span><span·class="p"·data-group-id="7004823079-3">(</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">16</span><span·class="w">·</span><span·class="ow">or</span><span·class="w">·</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">32</span><span·cl[·...·truncated·by·diffoscope;·len:·33,·SHA:·9d3a5c47f7c63d16e576415f3b37f656207bf9715ace3a2a9f911c206367fa69·...·]-3">)</span><span·class="w">
  
349 </span><span·class="nf">external_chardata</span><span·class="p"·data-group-id="3092732542-4">(</span><span·class="p"·data-group-id="3092732542-4">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">external_charlist</span><span·class="p"·data-group-id="3092732542-5">(</span><span·class="p"[·...·truncated·by·diffoscope;·len:·251,·SHA:·4082972afbe65b35208225fcb631268e4b0bbdeb2418aa4a1b9cf01bce84359c·...·]-6">)</span><span·class="w">349 </span><span·class="nf">external_chardata</span><span·class="p"·data-group-id="7004823079-4">(</span><span·class="p"·data-group-id="7004823079-4">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">external_charlist</span><span·class="p"·data-group-id="7004823079-5">(</span><span·class="p"[·...·truncated·by·diffoscope;·len:·251,·SHA:·ce5ad8057a98d3997ab5e0529ef23248c8dcb768ea156c38e3b0958ca9acb5dd·...·]-6">)</span><span·class="w">
  
350 </span><span·class="nf">external_charlist</span><span·class="p"·data-group-id="3092732542-7">(</span><span·class="p"·data-group-id="3092732542-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">maybe_improper_list</span><span·class="p"·data-group-id="3092732542-8">(</span><span·class="nf">char</span><span·class="p"·data-group-id="3092732542-9">(</span><span·class="p"·data-group-id="3092732542-9">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">external_unicode_binary</span><span·class="p"·data-group-id="3092732542-10">(</span><span·class="p"·data-group-id="3092732542-10">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w"> 
351 ··</span><span·class="nf">external_charlist</span><span·class="p"·data-group-id="3092732542-11">(</span><span·class="p"·data-group-id="3092732542-11">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">external_unicode_binary</span><sp[·...·truncated·by·diffoscope;·len:·432,·SHA:·40a9347bf4fc2304702be0ce7c3232325643b74bdb02095fa7752f07430f4fe7·...·]">350 </span><span·class="nf">external_charlist</span><span·class="p"·data-group-id="7004823079-7">(</span><span·class="p"·data-group-id="7004823079-7">)</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">maybe_imprope[·...·truncated·by·diffoscope;·len:·489,·SHA:·f49e33a0d33b82019dae56bf5a11e42e229a1690a0335ce86fe0e756af269e97·...·]">
 351 ··</span><span·class="nf">external_charlist</span><span·class="p"·data-group-id="7004823079-11">(</span><span·class="p"·data-group-id="7004823079-11">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">external_unicode_binary</span><span·class="p"·data-group-id="7004823079-12">(</span><span·class="p"·data-group-id="7004823079-12">)</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="nf">nil</span><span·class="p"·data-group-id="7004823079-13">(</span><span·class="p"·data-group-id="7004823079-13">)</span><span·class="p"·data-group-id="7004823079-8">)</span></code></pre><h2·id="basic-language-support"·class="section-heading">
352 ··<a·href="#basic-language-support"·class="hover-link">352 ··<a·href="#basic-language-support"·class="hover-link">
353 ····<i·class="ri-link-m"·aria-hidden="true"></i>353 ····<i·class="ri-link-m"·aria-hidden="true"></i>
354 ··</a>354 ··</a>
355 ··<span·class="text">Basic·Language·Support</span>355 ··<span·class="text">Basic·Language·Support</span>
356 </h2>356 </h2>
357 <p><a·href=""·id="unicode_in_erlang"></a>·As·from·Erlang/OTP·R16,·Erlang·source·files·can·be357 <p><a·href=""·id="unicode_in_erlang"></a>·As·from·Erlang/OTP·R16,·Erlang·source·files·can·be
358 written·in·UTF-8·or·bytewise·(<code·class="inline">latin1</code>)·encoding.·For·information·about·how·to358 written·in·UTF-8·or·bytewise·(<code·class="inline">latin1</code>)·encoding.·For·information·about·how·to
Offset 396, 15 lines modifiedOffset 396, 15 lines modified
396 ··<a·href="#heuristic-string-detection"·class="hover-link">396 ··<a·href="#heuristic-string-detection"·class="hover-link">
397 ····<i·class="ri-link-m"·aria-hidden="true"></i>397 ····<i·class="ri-link-m"·aria-hidden="true"></i>
398 ··</a>398 ··</a>
399 ··<span·class="text">Heuristic·String·Detection</span>399 ··<span·class="text">Heuristic·String·Detection</span>
400 </h3>400 </h3>
401 <p>In·certain·output·functions·and·in·the·output·of·return·values·in·the·shell,401 <p>In·certain·output·functions·and·in·the·output·of·return·values·in·the·shell,
402 Erlang·tries·to·detect·string·data·in·lists·and·binaries·heuristically.402 Erlang·tries·to·detect·string·data·in·lists·and·binaries·heuristically.
403 Typically·you·will·see·heuristic·detection·in·a·situation·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="9260630090-1">[</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p"·data-group-id="9260630090-1">]</span><span·class="p">.</span><span·class="w">403 Typically·you·will·see·heuristic·detection·in·a·situation·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="p"·data-group-id="2205704037-1">[</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p"·data-group-id="2205704037-1">]</span><span·class="p">.</span><span·class="w">
404 </span><span·class="s">&quot;abc&quot;</span><span·class="gp·unselectable">404 </span><span·class="s">&quot;abc&quot;</span><span·class="gp·unselectable">
405 2&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">405 2&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">98</span><span·class="p">,</span><span·class="mi">99</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
406 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">406 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;abc&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
407 3&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">165</span><span·class="p">,</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">164</span><span·class="p">,</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">182</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">407 3&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">165</span><span·class="p">,</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">164</span><span·class="p">,</span><span·class="mi">195</span><span·class="p">,</span><span·class="mi">182</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
408 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre><p>Here·the·shell·detects·lists·containing·printable·characters·or·binaries408 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre><p>Here·the·shell·detects·lists·containing·printable·characters·or·binaries
409 containing·printable·characters·in·bytewise·or·UTF-8·encoding.·But·what·is·a409 containing·printable·characters·in·bytewise·or·UTF-8·encoding.·But·what·is·a
410 printable·character?·One·view·is·that·anything·the·Unicode·standard·thinks·is410 printable·character?·One·view·is·that·anything·the·Unicode·standard·thinks·is
Offset 416, 58 lines modifiedOffset 416, 58 lines modified
416 to·detect·a·string.·A·third·way·is·to·let·the·user·decide·exactly·what·Unicode416 to·detect·a·string.·A·third·way·is·to·let·the·user·decide·exactly·what·Unicode
417 ranges·that·are·to·be·viewed·as·characters.</p><p>As·from·Erlang/OTP·R16B·you·can·select·the·ISO·Latin-1·range·or·the·whole417 ranges·that·are·to·be·viewed·as·characters.</p><p>As·from·Erlang/OTP·R16B·you·can·select·the·ISO·Latin-1·range·or·the·whole
418 Unicode·range·by·supplying·startup·flag·<code·class="inline">+pc·latin1</code>·or·<code·class="inline">+pc·unicode</code>,418 Unicode·range·by·supplying·startup·flag·<code·class="inline">+pc·latin1</code>·or·<code·class="inline">+pc·unicode</code>,
419 respectively.·For·backward·compatibility,·<code·class="inline">latin1</code>·is·default.·This·only419 respectively.·For·backward·compatibility,·<code·class="inline">latin1</code>·is·default.·This·only
420 controls·how·heuristic·string·detection·is·done.·More·ranges·are·expected·to·be420 controls·how·heuristic·string·detection·is·done.·More·ranges·are·expected·to·be
421 added·in·the·future,·enabling·tailoring·of·the·heuristics·to·the·language·and421 added·in·the·future,·enabling·tailoring·of·the·heuristics·to·the·language·and
422 region·relevant·to·the·user.</p><p>The·following·examples·show·the·two·startup·options:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">422 region·relevant·to·the·user.</p><p>The·following·examples·show·the·two·startup·options:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">
423 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="6707105552-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="6707105552-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·ecc83c69c988dde9686c53c04079084c7e81db560c179019ebd5394e60de3940·...·]-5">]</span><span·class="w">423 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="5156370864-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="5156370864-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·e0883b68510bc6e9a4aae9beaf1db37ec24d56b25d696216c3b17a48ffe1d97f·...·]-5">]</span><span·class="w">
  
424 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="6707105552-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="6707105552-6">)</span><span·class="gp·unselectable">424 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="5156370864-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="5156370864-6">)</span><span·class="gp·unselectable">
425 1&gt;·</span><span·class="p"·data-group-id="6707105552-7">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="6707105552-7">]</span><span·class="p">.</span><span·class="w">425 1&gt;·</span><span·class="p"·data-group-id="5156370864-7">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="5156370864-7">]</span><span·class="p">.</span><span·class="w">
426 </span><span·class="p"·data-group-id="6707105552-8">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="6707105552-8">]</span><span·class="gp·unselectable">426 </span><span·class="p"·data-group-id="5156370864-8">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="5156370864-8">]</span><span·class="gp·unselectable">
427 2&gt;·</span><span·class="p"·data-group-id="6707105552-9">[</span><span·class="mi">1070</span><span·class="p">,</span><span·class="mi">1085</span><span·class="p">,</span><span·class="mi">1080</span><span·class="p">,</span><span·class="mi">1082</span><span·class="p">,</span><span·class="mi">1086</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·15df3db236adf28a6bd06557132416be98809e6f0f886d222dfa3189cd82bf26·...·]-9">]</span><span·class="p">.</span><span·class="w">427 2&gt;·</span><span·class="p"·data-group-id="5156370864-9">[</span><span·class="mi">1070</span><span·class="p">,</span><span·class="mi">1085</span><span·class="p">,</span><span·class="mi">1080</span><span·class="p">,</span><span·class="mi">1082</span><span·class="p">,</span><span·class="mi">1086</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·6b3338577a59028d6d42ccbeb74d99bcbae2153b6676324585ae5da8c11c9051·...·]-9">]</span><span·class="p">.</span><span·class="w">
428 </span><span·class="p"·data-group-id="6707105552-10">[</span><span·class="mi">1070</span><span·class="p">,</span><span·class="mi">1085</span><span·class="p">,</span><span·class="mi">1080</span><span·class="p">,</span><span·class="mi">1082</span><span·class="p">,</span><span·class="mi">1086</sp[·...·truncated·by·diffoscope;·len:·96,·SHA:·be5b56060b86aa531f0b1717c653915b3258debfda29e3ea13423c118e7c01e5·...·]-10">]</span><span·class="gp·unselectable">428 </span><span·class="p"·data-group-id="5156370864-10">[</span><span·class="mi">1070</span><span·class="p">,</span><span·class="mi">1085</span><span·class="p">,</span><span·class="mi">1080</span><span·class="p">,</span><span·class="mi">1082</span><span·class="p">,</span><span·class="mi">1086</sp[·...·truncated·by·diffoscope;·len:·96,·SHA:·de94b8dc72820a9a71a8ba9c497b03518067d32e22a3d6827bd8904493eb4240·...·]-10">]</span><span·class="gp·unselectable">
429 3&gt;·</span><span·class="p"·data-group-id="6707105552-11">[</span><span·class="mi">229</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">246</span><span·class="p"·data-group-id="6707105552-11">]</span><span·class="p">.</span><span·class="w">429 3&gt;·</span><span·class="p"·data-group-id="5156370864-11">[</span><span·class="mi">229</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">246</span><span·class="p"·data-group-id="5156370864-11">]</span><span·class="p">.</span><span·class="w">
430 </span><span·class="s">&quot;åäö&quot;</span><span·class="gp·unselectable">430 </span><span·class="s">&quot;åäö&quot;</span><span·class="gp·unselectable">
431 4&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">174</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">184</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">186</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">180</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">431 4&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">174</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">184</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">186</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">180</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
432 </span><span·class="p">&lt;&lt;</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">174</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">184</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">186</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">180</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">432 </span><span·class="p">&lt;&lt;</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">174</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">184</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">186</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">180</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
433 5&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">229</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">228</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">246</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">433 5&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">229</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">228</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">246</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
434 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="w">434 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="w">
435 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="6921105812-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="6921105812-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·94c5d96a165832a86676074d6267b96ff7ab9fb2b073c47aaf59d1fc0e68ff9c·...·]-5">]</span><span·class="w">435 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="1084709890-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="1084709890-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·869136581364fc720e20741ba6e5f915b8da056b09b0d1fd6c18640164a9cdcf·...·]-5">]</span><span·class="w">
  
436 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="6921105812-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="6921105812-6">)</span><span·class="gp·unselectable">436 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="1084709890-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="1084709890-6">)</span><span·class="gp·unselectable">
437 1&gt;·</span><span·class="p"·data-group-id="6921105812-7">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="6921105812-7">]</span><span·class="p">.</span><span·class="w">437 1&gt;·</span><span·class="p"·data-group-id="1084709890-7">[</span><span·class="mi">1024</span><span·class="p"·data-group-id="1084709890-7">]</span><span·class="p">.</span><span·class="w">
438 </span><span·class="s">&quot;Ѐ&quot;</span><span·class="gp·unselectable">438 </span><span·class="s">&quot;Ѐ&quot;</span><span·class="gp·unselectable">
439 2&gt;·</span><span·class="p"·data-group-id="6921105812-8">[</span><span·class="mi">1070</span><span·class="p">,</span><span·class="mi">1085</span><span·class="p">,</span><span·class="mi">1080</span><span·class="p">,</span><span·class="mi">1082</span><span·class="p">,</span><span·class="mi">1086</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·ff086ff0b56a018c68012e0e89466c5cb31a0c2f3f202c90d79dbb8eff5eba93·...·]-8">]</span><span·class="p">.</span><span·class="w">439 2&gt;·</span><span·class="p"·data-group-id="1084709890-8">[</span><span·class="mi">1070</span><span·class="p">,</span><span·class="mi">1085</span><span·class="p">,</span><span·class="mi">1080</span><span·class="p">,</span><span·class="mi">1082</span><span·class="p">,</span><span·class="mi">1086</spa[·...·truncated·by·diffoscope;·len:·95,·SHA:·6b59b99b26ee652d5052a6434e1ccedec8d5d50999f88e08b64613b18ac64b88·...·]-8">]</span><span·class="p">.</span><span·class="w">
440 </span><span·class="s">&quot;Юникод&quot;</span><span·class="gp·unselectable">440 </span><span·class="s">&quot;Юникод&quot;</span><span·class="gp·unselectable">
441 3&gt;·</span><span·class="p"·data-group-id="6921105812-9">[</span><span·class="mi">229</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">246</span><span·class="p"·data-group-id="6921105812-9">]</span><span·class="p">.</span><span·class="w">441 3&gt;·</span><span·class="p"·data-group-id="1084709890-9">[</span><span·class="mi">229</span><span·class="p">,</span><span·class="mi">228</span><span·class="p">,</span><span·class="mi">246</span><span·class="p"·data-group-id="1084709890-9">]</span><span·class="p">.</span><span·class="w">
442 </span><span·class="s">&quot;åäö&quot;</span><span·class="gp·unselectable">442 </span><span·class="s">&quot;åäö&quot;</span><span·class="gp·unselectable">
443 4&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">174</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">184</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">186</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">180</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">443 4&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">174</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">189</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">184</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">186</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">190</span><span·class="p">,</span><span·class="mi">208</span><span·class="p">,</span><span·class="mi">180</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
444 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Юникод&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">444 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Юникод&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
445 5&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">229</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">228</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">246</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">445 5&gt;·</span><span·class="p">&lt;&lt;</span><span·class="mi">229</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">228</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">,</span><span·class="mi">246</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span><span·class="p">.</span><span·class="w">
446 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre><p>In·the·examples,·you·can·see·that·the·default·Erlang·shell·interprets·only446 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss">utf8</span><span·class="p">&gt;&gt;</span></code></pre><p>In·the·examples,·you·can·see·that·the·default·Erlang·shell·interprets·only
447 characters·from·the·ISO·Latin1·range·as·printable·and·only·detects·lists·or447 characters·from·the·ISO·Latin1·range·as·printable·and·only·detects·lists·or
448 binaries·with·those·&quot;printable&quot;·characters·as·containing·string·data.·The·valid448 binaries·with·those·&quot;printable&quot;·characters·as·containing·string·data.·The·valid
449 UTF-8·binary·containing·the·Russian·word·&quot;Юникод&quot;,·is·not·printed·as·a·string.449 UTF-8·binary·containing·the·Russian·word·&quot;Юникод&quot;,·is·not·printed·as·a·string.
450 When·started·with·all·Unicode·characters·printable·(<code·class="inline">+pc·unicode</code>),·the·shell450 When·started·with·all·Unicode·characters·printable·(<code·class="inline">+pc·unicode</code>),·the·shell
451 outputs·anything·containing·printable·Unicode·data·(in·binaries,·either·UTF-8·or451 outputs·anything·containing·printable·Unicode·data·(in·binaries,·either·UTF-8·or
452 bytewise·encoded)·as·string·data.</p><p>These·heuristics·are·also·used·by·<a·href="io.html#format/2"><code·class="inline">io:format/2</code></a>,·<a·href="io_lib.html#format/2"><code·class="inline">io_lib:format/2</code></a>,·and·friends452 bytewise·encoded)·as·string·data.</p><p>These·heuristics·are·also·used·by·<a·href="io.html#format/2"><code·class="inline">io:format/2</code></a>,·<a·href="io_lib.html#format/2"><code·class="inline">io_lib:format/2</code></a>,·and·friends
453 when·modifier·<code·class="inline">t</code>·is·used·with·<code·class="inline">~p</code>·or·<code·class="inline">~P</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">453 when·modifier·<code·class="inline">t</code>·is·used·with·<code·class="inline">~p</code>·or·<code·class="inline">~P</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="w">
454 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="8493684236-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="8493684236-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·538db166c9b10fb5d3ffdb7fb1f04f7b351e2a274487afa1b29d6c21dfdf16e2·...·]-5">]</span><span·class="w">454 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="4025148123-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="4025148123-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·6437526ffde4f94820060ffb6e56d9227b6a59c40443f110296fa6adc7912786·...·]-5">]</span><span·class="w">
  
455 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="8493684236-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="8493684236-6">)</span><span·class="gp·unselectable">455 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="4025148123-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="4025148123-6">)</span><span·class="gp·unselectable">
456 1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="8493684236-7">(</span><span·class="s">&quot;~tp</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="8493684236-8">[</span><span·class="p"·data-group-id="8493684236-9">{</span><span·class="p">&[·...·truncated·by·diffoscope;·len:·1128,·SHA:·c785cbb7c43585077abd756dbb2712257ee71681c3e8acc11b5f1321f7710ec1·...·]-7">)</span><span·class="p">.</span><span·class="w">456 1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4025148123-7">(</span><span·class="s">&quot;~tp</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="4025148123-8">[</span><span·class="p"·data-group-id="4025148123-9">{</span><span·class="p">&[·...·truncated·by·diffoscope;·len:·1128,·SHA:·fa27b86698072dadea82c7cdd4f0ed4d881f3f0c4b679403eacbcc85133af9a6·...·]-7">)</span><span·class="p">.</span><span·class="w">
457 </span><span·class="p"·data-group-id="8493684236-10">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·758,·SHA:·ed48f1be879c25870e5949b25dfdbc2b8817d89353b523387cec6afc146e241c·...·]-10">}</span><span·class="w">457 </span><span·class="p"·data-group-id="4025148123-10">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·758,·SHA:·21a20f6bc473d2f8f2410370c0f51a5a34590d84bd7ec743bef73109ad849383·...·]-10">}</span><span·class="w">
458 </span><span·class="ss">ok</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="w">458 </span><span·class="ss">ok</span></code></pre><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="ss">erl</span><span·class="w">·</span><span·class="o">+</span><span·class="ss">pc</span><span·class="w">·</span><span·class="ss">unicode</span><span·class="w">
459 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="7806839755-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="7806839755-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·781,·SHA:·41fe68c8c816023d494247b1326cbe1d65afd594cee7222518d807b9e85ef4b1·...·]5-5">]</span><span·class="w">459 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="0310354935-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="0310354935-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·781,·SHA:·4abf67eb720653b4d16e6b93211d410e110b17ff0c07320aed6bfd4e3fa964f8·...·]5-5">]</span><span·class="w">
  
460 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="7806839755-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7806839755-6">)</span><span·class="gp·unselectable">460 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="0310354935-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="0310354935-6">)</span><span·class="gp·unselectable">
461 1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7806839755-7">(</span><span·class="s">&quot;~tp</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="7806839755-8">[</span><span·class="p"·data-group-id="7806839755-9">{</span><span·class="p">&[·...·truncated·by·diffoscope;·len:·1127,·SHA:·1d46607489502b501fb97e77777a112fc91502c85f14a8ad376af1db626b4526·...·]5-7">)</span><span·class="p">.</span><span·class="w">461 1&gt;·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0310354935-7">(</span><span·class="s">&quot;~tp</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="0310354935-8">[</span><span·class="p"·data-group-id="0310354935-9">{</span><span·class="p">&[·...·truncated·by·diffoscope;·len:·1127,·SHA:·76ec6a3543421d8cb954cd8dc8bb687e64218d5a9f6a2a3f12bcc81634d59499·...·]5-7">)</span><span·class="p">.</span><span·class="w">
462 </span><span·class="p"·data-group-id="7806839755-10">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·262,·SHA:·2ff961a6824e422e6da0f2f6d95f10331067207f0c4f67499898346f2b2b0f69·...·]5-10">}</span><span·class="w">462 </span><span·class="p"·data-group-id="0310354935-10">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;åäö&quot;</span><span·class="o">/</span><span·class="ss"[·...·truncated·by·diffoscope;·len:·262,·SHA:·b7708c35ee2cb094e9d2dc2c9a7cdd9b853d76f816ed8dbeb7da5389f8454b66·...·]5-10">}</span><span·class="w">
463 </span><span·class="ss">ok</span></code></pre><p>Notice·that·this·only·affects·<em>heuristic</em>·interpretation·of·lists·and·binaries463 </span><span·class="ss">ok</span></code></pre><p>Notice·that·this·only·affects·<em>heuristic</em>·interpretation·of·lists·and·binaries
464 on·output.·For·example,·the·<code·class="inline">~ts</code>·format·sequence·always·outputs·a·valid·list·of464 on·output.·For·example,·the·<code·class="inline">~ts</code>·format·sequence·always·outputs·a·valid·list·of
465 characters,·regardless·of·the·<code·class="inline">+pc</code>·setting,·as·the·programmer·has·explicitly465 characters,·regardless·of·the·<code·class="inline">+pc</code>·setting,·as·the·programmer·has·explicitly
466 requested·string·output.</p><h2·id="the-interactive-shell"·class="section-heading">466 requested·string·output.</p><h2·id="the-interactive-shell"·class="section-heading">
467 ··<a·href="#the-interactive-shell"·class="hover-link">467 ··<a·href="#the-interactive-shell"·class="hover-link">
468 ····<i·class="ri-link-m"·aria-hidden="true"></i>468 ····<i·class="ri-link-m"·aria-hidden="true"></i>
469 ··</a>469 ··</a>
Offset 482, 47 lines modifiedOffset 482, 47 lines modified
482 example,·a·<code·class="inline">LANG</code>·environment·variable·can·be·set·as·follows:</p><pre><code·class="text">$·echo·$LANG482 example,·a·<code·class="inline">LANG</code>·environment·variable·can·be·set·as·follows:</p><pre><code·class="text">$·echo·$LANG
483 en_US.UTF-8</code></pre><p>Most·systems·handle·variable·<code·class="inline">LC_CTYPE</code>·before·<code·class="inline">LANG</code>,·so·if·that·is·set,·it483 en_US.UTF-8</code></pre><p>Most·systems·handle·variable·<code·class="inline">LC_CTYPE</code>·before·<code·class="inline">LANG</code>,·so·if·that·is·set,·it
484 must·be·set·to·<code·class="inline">UTF-8</code>:</p><pre><code·class="text">$·echo·$LC_CTYPE484 must·be·set·to·<code·class="inline">UTF-8</code>:</p><pre><code·class="text">$·echo·$LC_CTYPE
485 en_US.UTF-8</code></pre><p>The·<code·class="inline">LANG</code>·or·<code·class="inline">LC_CTYPE</code>·setting·are·to·be·consistent·with·what·the·terminal·is485 en_US.UTF-8</code></pre><p>The·<code·class="inline">LANG</code>·or·<code·class="inline">LC_CTYPE</code>·setting·are·to·be·consistent·with·what·the·terminal·is
486 capable·of.·There·is·no·portable·way·for·Erlang·to·ask·the·terminal·about·its486 capable·of.·There·is·no·portable·way·for·Erlang·to·ask·the·terminal·about·its
487 UTF-8·capacity,·we·have·to·rely·on·the·language·and·character·type·settings.</p><p>To·investigate·what·Erlang·thinks·about·the·terminal,·the·call487 UTF-8·capacity,·we·have·to·rely·on·the·language·and·character·type·settings.</p><p>To·investigate·what·Erlang·thinks·about·the·terminal,·the·call
488 <a·href="io.html#getopts/1"><code·class="inline">io:getopts()</code></a>·can·be·used·when·the·shell·is·started:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="n">LC_CTYPE</span><span·class="o">=</span><span·class="ss">en_US</span><span·class="p">.</span><span·class="n">ISO</span><span·class="o">-</span><span·class="mi">8859</span><span·class="o">-</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">488 <a·href="io.html#getopts/1"><code·class="inline">io:getopts()</code></a>·can·be·used·when·the·shell·is·started:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="sc">$·</span><span·class="n">LC_CTYPE</span><span·class="o">=</span><span·class="ss">en_US</span><span·class="p">.</span><span·class="n">ISO</span><span·class="o">-</span><span·class="mi">8859</span><span·class="o">-</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">
489 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="2976346845-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="2976346845-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·c995eb3f1befdc6fb861c81fdb7179849d77c58f07bf3b21a9a47b09426e1f77·...·]-5">]</span><span·class="w">489 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="7960106326-1">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="7960106326-1">)</span><span·class="w">·</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·782,·SHA:·80c905f0be6cfe8765e34676d2688b9ad43b70a4ee8b4ca8218feaea1deeb07d·...·]-5">]</span><span·class="w">
  
490 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="2976346845-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2976346845-6">)</span><span·class="gp·unselectable">490 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="7960106326-6">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7960106326-6">)</span><span·class="gp·unselectable">
491 1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="2976346845-7">(</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">getopts</span>[·...·truncated·by·diffoscope;·len:·147,·SHA:·f8814d9bcfb5cad894a4ba1a012f92e0b8e9e1b3a4bac5ab0fbef6584d21394f·...·]-7">)</span><span·class="p">.</span><span·class="w">491 1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="7960106326-7">(</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">getopts</span>[·...·truncated·by·diffoscope;·len:·147,·SHA:·d83732dd6383cf2900c260c957a57b9316bce8e3ad4ea8c1c0af532723de72c9·...·]-7">)</span><span·class="p">.</span><span·class="w">
492 </span><span·class="p"·data-group-id="2976346845-9">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="ss">latin1</span><span·class="p"·data-group-id="2976346845-9">}</span><span·class="gp·unselectable">492 </span><span·class="p"·data-group-id="7960106326-9">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="ss">latin1</span><span·class="p"·data-group-id="7960106326-9">}</span><span·class="gp·unselectable">
493 2&gt;·</span><span·class="nf">q</span><span·class="p"·data-group-id="2976346845-10">(</span><span·class="p"·data-group-id="2976346845-10">)</span><span·class="p">.</span><span·class="w">493 2&gt;·</span><span·class="nf">q</span><span·class="p"·data-group-id="7960106326-10">(</span><span·class="p"·data-group-id="7960106326-10">)</span><span·class="p">.</span><span·class="w">
494 </span><span·class="ss">ok</span><span·class="w">494 </span><span·class="ss">ok</span><span·class="w">
495 </span><span·class="sc">$·</span><span·class="n">LC_CTYPE</span><span·class="o">=</span><span·class="ss">en_US</span><span·class="p">.</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">8</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">495 </span><span·class="sc">$·</span><span·class="n">LC_CTYPE</span><span·class="o">=</span><span·class="ss">en_US</span><span·class="p">.</span><span·class="n">UTF</span><span·class="o">-</span><span·class="mi">8</span><span·class="w">·</span><span·class="ss">erl</span><span·class="w">
496 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="2976346845-11">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="2976346845-11">)</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·791,·SHA:·26484ae3bbb72cc46472e84a0dd7d5e2903d72adf6edfac4645193d19509c2c6·...·]-15">]</span><span·class="w">496 </span><span·class="n">Erlang</span><span·class="w">·</span><span·class="n">R16B</span><span·class="w">·</span><span·class="p"·data-group-id="7960106326-11">(</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">5.10</span><span·class="p">.</span><span·class="mi">1</span><span·class="p"·data-group-id="7960106326-11">)</span><span·class="w">·</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·791,·SHA:·011e94d67e7cb4c6268d4082cdec18f9d8d0deba98bf006339cfcae51251bbc5·...·]-15">]</span><span·class="w">
  
497 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="2976346845-16">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="2976346845-16">)</span><span·class="gp·unselectable">497 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V5</span><span·class="p">.</span><span·class="mf">10.1</span><span·class="w">··</span><span·class="p"·data-group-id="7960106326-16">(</span><span·class="ss">abort</span><span·class="w">·</span><span·class="ss">with</span><span·class="w">·</span><span·class="err">^</span><span·class="n">G</span><span·class="p"·data-group-id="7960106326-16">)</span><span·class="gp·unselectable">
498 1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="2976346845-17">(</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">getopts</span[·...·truncated·by·diffoscope;·len:·150,·SHA:·590006f0c0e0ebcb5867e437b91fcf8d47567c761698d4bb992857f876eb419c·...·]-17">)</span><span·class="p">.</span><span·class="w">498 1&gt;·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">keyfind</span><span·class="p"·data-group-id="7960106326-17">(</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">getopts</span[·...·truncated·by·diffoscope;·len:·150,·SHA:·637179e91e0d0ad68e18d3e9cf9c44abddb10bd69930048172770614539c245b·...·]-17">)</span><span·class="p">.</span><span·class="w">
499 </span><span·class="p"·data-group-id="2976346845-19">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p"·data-group-id="2976346845-19">}</span><span·class="w">499 </span><span·class="p"·data-group-id="7960106326-19">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="ss">unicode</span><span·class="p"·data-group-id="7960106326-19">}</span><span·class="w">
500 </span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>When·(finally?)·everything·is·in·order·with·the·locale·settings,·fonts.·and·the500 </span><span·class="mi">2</span><span·class="o">&gt;</span></code></pre><p>When·(finally?)·everything·is·in·order·with·the·locale·settings,·fonts.·and·the
501 terminal·emulator,·you·have·probably·found·a·way·to·input·characters·in·the501 terminal·emulator,·you·have·probably·found·a·way·to·input·characters·in·the
Max diff block lines reached; 90106/153879 bytes (58.56%) of diff not shown.
82.0 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/uri_string.html
    
Offset 597, 18 lines modifiedOffset 597, 18 lines modified
597 ···························QueryString·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:error/0">error</a>().</pre>597 ···························QueryString·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:error/0">error</a>().</pre>
  
598 ······</div>598 ······</div>
  
599 <p>Composes·a·form-urlencoded·<code·class="inline">QueryString</code>·based·on·a·<code·class="inline">QueryList</code>,·a·list·of599 <p>Composes·a·form-urlencoded·<code·class="inline">QueryString</code>·based·on·a·<code·class="inline">QueryList</code>,·a·list·of
600 non-percent-encoded·key-value·pairs.</p><p>Form-urlencoding·is·defined·in·section·4.10.21.6·of·the·<a·href="https://www.w3.org/TR/html52/">HTML·5.2</a>600 non-percent-encoded·key-value·pairs.</p><p>Form-urlencoding·is·defined·in·section·4.10.21.6·of·the·<a·href="https://www.w3.org/TR/html52/">HTML·5.2</a>
601 specification·and·in·section·4.10.22.6·of·the·<a·href="https://www.w3.org/TR/html50/">HTML·5.0</a>601 specification·and·in·section·4.10.22.6·of·the·<a·href="https://www.w3.org/TR/html50/">HTML·5.0</a>
602 specification·for·non-UTF-8·encodings.</p><p>See·also·the·opposite·operation·<a·href="#dissect_query/1"><code·class="inline">dissect_query/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="2705517553-1">(</span><span·class="p"·data-group-id="2705517553-2">[</span><span·class="p"·data-group-id="2705517553-3">{</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·354,·SHA:·527ce29b57e04abb0bd9e19f6d8ce5ccfa61d829a37a31d4d4a0cc251c5bcabd·...·]-1">)</span><span·class="p">.</span><span·class="w">602 specification·for·non-UTF-8·encodings.</p><p>See·also·the·opposite·operation·<a·href="#dissect_query/1"><code·class="inline">dissect_query/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="2467460459-1">(</span><span·class="p"·data-group-id="2467460459-2">[</span><span·class="p"·data-group-id="2467460459-3">{</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·354,·SHA:·9a8065166635b0486651e92b42760cc7df464e3d75fe19a28951cb4482b71186·...·]-1">)</span><span·class="p">.</span><span·class="w">
603 </span><span·class="s">&quot;foo+bar=1&amp;city=%C3%B6rebro&quot;</span><span·class="gp·unselectable">603 </span><span·class="s">&quot;foo+bar=1&amp;city=%C3%B6rebro&quot;</span><span·class="gp·unselectable">
604 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="2705517553-5">(</span><span·class="p"·data-group-id="2705517553-6">[</span><span·class="p"·data-group-id="2705517553-7">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·138,·SHA:·22d85f259709fe4f75507666b110e80367c7ae4b4f8566ac2179448ebbe5b761·...·]-7">}</span><span·class="p">,</span><span·class="gp·unselectable">604 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="2467460459-5">(</span><span·class="p"·data-group-id="2467460459-6">[</span><span·class="p"·data-group-id="2467460459-7">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·138,·SHA:·20963be35dd03c7568ef0840d7e46e3257526fa12331d4e77f25da0d62ec5f88·...·]-7">}</span><span·class="p">,</span><span·class="gp·unselectable">
605 2&gt;·</span><span·class="p"·data-group-id="2705517553-8">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;city&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;örebro&quot;</span><span·class="o">/</span><span·class="s[·...·truncated·by·diffoscope;·len:·192,·SHA:·8ec9a099d542f791e7f0c77c389d12c5513fe316bc97e858c69e4f0cacfbac09·...·]-5">)</span><span·class="p">.</span><span·class="w">605 2&gt;·</span><span·class="p"·data-group-id="2467460459-8">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;city&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;örebro&quot;</span><span·class="o">/</span><span·class="s[·...·truncated·by·diffoscope;·len:·192,·SHA:·12561d86513aba7a00936bf80ebb5c854a81d5763956a8291266bd54df6ecca4·...·]-5">)</span><span·class="p">.</span><span·class="w">
606 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo+bar=1&amp;city=%C3%B6rebro&quot;</span><span·class="p">&gt;&gt;</span></code></pre>606 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo+bar=1&amp;city=%C3%B6rebro&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
607 ··</section>607 ··</section>
608 </section>608 </section>
609 <section·class="detail"·id="compose_query/2">609 <section·class="detail"·id="compose_query/2">
  
610 ··<div·class="detail-header">610 ··<div·class="detail-header">
611 ····<a·href="#compose_query/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">611 ····<a·href="#compose_query/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 644, 19 lines modifiedOffset 644, 19 lines modified
644 algorithm.</p><p>There·are·two·supported·encodings:·<code·class="inline">utf8</code>·(or·<code·class="inline">unicode</code>)·and·<code·class="inline">latin1</code>.</p><p>Each·character·in·the·entry's·name·and·value·that·cannot·be·expressed·using·the644 algorithm.</p><p>There·are·two·supported·encodings:·<code·class="inline">utf8</code>·(or·<code·class="inline">unicode</code>)·and·<code·class="inline">latin1</code>.</p><p>Each·character·in·the·entry's·name·and·value·that·cannot·be·expressed·using·the
645 selected·character·encoding,·is·replaced·by·a·string·consisting·of·a·U+0026645 selected·character·encoding,·is·replaced·by·a·string·consisting·of·a·U+0026
646 AMPERSAND·character·(&amp;),·a·&quot;#&quot;·(U+0023)·character,·one·or·more·ASCII·digits646 AMPERSAND·character·(&amp;),·a·&quot;#&quot;·(U+0023)·character,·one·or·more·ASCII·digits
647 representing·the·Unicode·code·point·of·the·character·in·base·ten,·and·finally·a647 representing·the·Unicode·code·point·of·the·character·in·base·ten,·and·finally·a
648 &quot;;&quot;·(U+003B)·character.</p><p>Bytes·that·are·out·of·the·range·0x2A,·0x2D,·0x2E,·0x30·to·0x39,·0x41·to·0x5A,648 &quot;;&quot;·(U+003B)·character.</p><p>Bytes·that·are·out·of·the·range·0x2A,·0x2D,·0x2E,·0x30·to·0x39,·0x41·to·0x5A,
649 0x5F,·0x61·to·0x7A,·are·percent-encoded·(U+0025·PERCENT·SIGN·character·(%)649 0x5F,·0x61·to·0x7A,·are·percent-encoded·(U+0025·PERCENT·SIGN·character·(%)
650 followed·by·uppercase·ASCII·hex·digits·representing·the·hexadecimal·value·of·the650 followed·by·uppercase·ASCII·hex·digits·representing·the·hexadecimal·value·of·the
651 byte).</p><p>See·also·the·opposite·operation·<a·href="#dissect_query/1"><code·class="inline">dissect_query/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="5720536630-1">(</span><span·class="p"·data-group-id="5720536630-2">[</span><span·class="p"·data-group-id="5720536630-3">{</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="5720536630-3">}</span><span·class="p">,</span><span·class="p"·data-group-id="5720536630-4">{</span><span·class="s">&quot;city&quot;</span><span·class="p">,</span><span·class="s">&quot;örebro&quot;</span><span·class="p"·data-group-id="5720536630-4">}</span><span·class="p"·data-group-id="5720536630-2">]</span><span·class="p">,</span><span·class="gp·unselectable"> 
652 1&gt;·</span><span·class="p"·data-group-id="5720536630-5">[</span><span·class="p"·data-group-id="5720536630-6">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·170,·SHA:·913c0bbec51a19f94a2649fe7aae1775f6c79a864bcb0495dd6b6a143a69b555·...·]">651 byte).</p><p>See·also·the·opposite·operation·<a·href="#dissect_query/1"><code·class="inline">dissect_query/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">[·...·truncated·by·diffoscope;·len:·731,·SHA:·9691a1752d985e919f8e7fbcc3111180bf4b0af8ed4923a4854b48cb5c14453a·...·]">
 652 1&gt;·</span><span·class="p"·data-group-id="5240450874-5">[</span><span·class="p"·data-group-id="5240450874-6">{</span><span·class="ss">encoding</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">latin1</span><span·class="p"·data-group-id="5240450874-6">}</span><span·class="p"·data-group-id="5240450874-5">]</span><span·class="p"·data-group-id="5240450874-1">)</span><span·class="p">.</span><span·class="w">
653 </span><span·class="s">&quot;foo+bar=1&amp;city=%F6rebro&quot;</span><span·class="gp·unselectable">653 </span><span·class="s">&quot;foo+bar=1&amp;city=%F6rebro&quot;</span><span·class="gp·unselectable">
654 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="5720536630-7">(</span><span·class="p"·data-group-id="5720536630-8">[</span><span·class="p"·data-group-id="5720536630-9">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·138,·SHA:·3a7de0c2c6441edbd8e3041032f30db7a1b6461f8b8e57fe8813a3412486e310·...·]-9">}</span><span·class="p">,</span><span·class="gp·unselectable">654 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">compose_query</span><span·class="p"·data-group-id="5240450874-7">(</span><span·class="p"·data-group-id="5240450874-8">[</span><span·class="p"·data-group-id="5240450874-9">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·138,·SHA:·391bd237f483fd367c14b64424cbc8f65fd93c94ea1e3a24225093efbbe03377·...·]-9">}</span><span·class="p">,</span><span·class="gp·unselectable">
655 2&gt;·</span><span·class="p"·data-group-id="5720536630-10">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;city&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;東京&quot;</span><span·class="o">/</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·564,·SHA:·cad0c8a2697877427b4ef3cd98ecd7e6f128dc554e85c28835d3178e567043f4·...·]-7">)</span><span·class="p">.</span><span·class="w">655 2&gt;·</span><span·class="p"·data-group-id="5240450874-10">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;city&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;東京&quot;</span><span·class="o">/</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·564,·SHA:·842a4c0468690ee15d29a970a26e47f5a991804ad9d30f1555a16d7cbd2207d8·...·]-7">)</span><span·class="p">.</span><span·class="w">
656 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo+bar=1&amp;city=%26%2326481%3B%26%2320140%3B&quot;</span><span·class="p">&gt;&gt;</span></code></pre>656 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo+bar=1&amp;city=%26%2326481%3B%26%2320140%3B&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
657 ··</section>657 ··</section>
658 </section>658 </section>
659 <section·class="detail"·id="dissect_query/1">659 <section·class="detail"·id="dissect_query/1">
  
660 ··<div·class="detail-header">660 ··<div·class="detail-header">
661 ····<a·href="#dissect_query/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">661 ····<a·href="#dissect_query/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 685, 19 lines modifiedOffset 685, 19 lines modified
685 ···························QueryList·::·[{<a·href="unicode.html#t:chardata/0">unicode:chardata</a>(),·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>()·|·true}]·|·<a·href="#t:error/0">error</a>().</pre>685 ···························QueryList·::·[{<a·href="unicode.html#t:chardata/0">unicode:chardata</a>(),·<a·href="unicode.html#t:chardata/0">unicode:chardata</a>()·|·true}]·|·<a·href="#t:error/0">error</a>().</pre>
  
686 ······</div>686 ······</div>
  
687 <p>Dissects·an·urlencoded·<code·class="inline">QueryString</code>·and·returns·a·<code·class="inline">QueryList</code>,·a·list·of687 <p>Dissects·an·urlencoded·<code·class="inline">QueryString</code>·and·returns·a·<code·class="inline">QueryList</code>,·a·list·of
688 non-percent-encoded·key-value·pairs.</p><p>Form-urlencoding·is·defined·in·section·4.10.21.6·of·the·<a·href="https://www.w3.org/TR/html52/">HTML·5.2</a>688 non-percent-encoded·key-value·pairs.</p><p>Form-urlencoding·is·defined·in·section·4.10.21.6·of·the·<a·href="https://www.w3.org/TR/html52/">HTML·5.2</a>
689 specification·and·in·section·4.10.22.6·of·the·<a·href="https://www.w3.org/TR/html50/">HTML·5.0</a>689 specification·and·in·section·4.10.22.6·of·the·<a·href="https://www.w3.org/TR/html50/">HTML·5.0</a>
690 specification·for·non-UTF-8·encodings.</p><p>See·also·the·opposite·operation·<a·href="#compose_query/1"><code·class="inline">compose_query/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">dissect_query</span><span·class="p"·data-group-id="4307433249-1">(</span><span·class="s">&quot;foo+bar=1&amp;city=%C3%B6rebro&quot;</span><span·class="p"·data-group-id="4307433249-1">)</span><span·class="p">.</span><span·class="w">690 specification·for·non-UTF-8·encodings.</p><p>See·also·the·opposite·operation·<a·href="#compose_query/1"><code·class="inline">compose_query/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">dissect_query</span><span·class="p"·data-group-id="7329017027-1">(</span><span·class="s">&quot;foo+bar=1&amp;city=%C3%B6rebro&quot;</span><span·class="p"·data-group-id="7329017027-1">)</span><span·class="p">.</span><span·class="w">
691 </span><span·class="p"·data-group-id="4307433249-2">[</span><span·class="p"·data-group-id="4307433249-3">{</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="4307433249-3">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·249,·SHA:·9013924a89de4ef412cd6a45908e59331db36550217c4e21052ae239a6d65fb5·...·]-2">]</span><span·class="gp·unselectable">691 </span><span·class="p"·data-group-id="7329017027-2">[</span><span·class="p"·data-group-id="7329017027-3">{</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="s">&quot;1&quot;</span><span·class="p"·data-group-id="7329017027-3">}</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·249,·SHA:·80d4d4c47b8a9d838e031ebb31f5a5be4912b192b00b47c0afe0c138c7d42299·...·]-2">]</span><span·class="gp·unselectable">
692 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">dissect_query</span><span·class="p"·data-group-id="4307433249-5">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo+bar=1&amp;city=%26%2326481%3B%26%2320140%3B&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4307433249-5">)</span><span·class="p">.</span><span·class="w">692 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">dissect_query</span><span·class="p"·data-group-id="7329017027-5">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo+bar=1&amp;city=%26%2326481%3B%26%2320140%3B&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7329017027-5">)</span><span·class="p">.</span><span·class="w">
693 </span><span·class="p"·data-group-id="4307433249-6">[</span><span·class="p"·data-group-id="4307433249-7">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;[·...·truncated·by·diffoscope;·len:·86,·SHA:·69dfc0b18c082b72fbe7dfc59c7d519b224e9cbabf7c0bfefa5b1d092cd600da·...·]-7">}</span><span·class="p">,</span><span·class="w">693 </span><span·class="p"·data-group-id="7329017027-6">[</span><span·class="p"·data-group-id="7329017027-7">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;[·...·truncated·by·diffoscope;·len:·86,·SHA:·e0a5a30894ae8d35643e9b71ee162c6c7bf31713caaa42566e82ee763166fb0f·...·]-7">}</span><span·class="p">,</span><span·class="w">
694 ·</span><span·class="p"·data-group-id="4307433249-8">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;city&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">157</span>[·...·truncated·by·diffoscope;·len:·329,·SHA:·78f2bad572d00eb74f782d0d998839413fad346ecb718146a240ee8df4e80145·...·]-6">]</span></code></pre>694 ·</span><span·class="p"·data-group-id="7329017027-8">{</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;city&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="mi">230</span><span·class="p">,</span><span·class="mi">157</span>[·...·truncated·by·diffoscope;·len:·329,·SHA:·35c4c0f1f7741678e1fe409b57d01a36ab95e5b872e0c12f440f9905fb74d17d·...·]-6">]</span></code></pre>
695 ··</section>695 ··</section>
696 </section>696 </section>
697 <section·class="detail"·id="normalize/1">697 <section·class="detail"·id="normalize/1">
  
698 ··<div·class="detail-header">698 ··<div·class="detail-header">
699 ····<a·href="#normalize/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">699 ····<a·href="#normalize/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
700 ······<i·class="ri-link-m"·aria-hidden="true"></i>700 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 723, 22 lines modifiedOffset 723, 22 lines modified
723 ···················when·URI·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:uri_map/0">uri_map</a>(),·NormalizedURI·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:error/0">error</a>().</pre>723 ···················when·URI·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:uri_map/0">uri_map</a>(),·NormalizedURI·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:error/0">error</a>().</pre>
  
724 ······</div>724 ······</div>
  
725 <p>Transforms·an·<code·class="inline">URI</code>·into·a·normalized·form·using·Syntax-Based·Normalization·as725 <p>Transforms·an·<code·class="inline">URI</code>·into·a·normalized·form·using·Syntax-Based·Normalization·as
726 defined·by·<a·href="https://www.ietf.org/rfc/rfc3986.txt">RFC·3986</a>.</p><p>This·function·implements·case·normalization,·percent-encoding·normalization,726 defined·by·<a·href="https://www.ietf.org/rfc/rfc3986.txt">RFC·3986</a>.</p><p>This·function·implements·case·normalization,·percent-encoding·normalization,
727 path·segment·normalization·and·scheme·based·normalization·for·HTTP(S)·with·basic727 path·segment·normalization·and·scheme·based·normalization·for·HTTP(S)·with·basic
728 support·for·FTP,·SSH,·SFTP·and·TFTP.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="7050057282-1">(</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p"·data-group-id="7050057282-1">)</span><span·class="p">.</span><span·class="w">728 support·for·FTP,·SSH,·SFTP·and·TFTP.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="5837123153-1">(</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p"·data-group-id="5837123153-1">)</span><span·class="p">.</span><span·class="w">
729 </span><span·class="s">&quot;/a/g&quot;</span><span·class="gp·unselectable">729 </span><span·class="s">&quot;/a/g&quot;</span><span·class="gp·unselectable">
730 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="7050057282-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/content=5/../6&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7050057282-2">)</span><span·class="p">.</span><span·class="w">730 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="5837123153-2">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/content=5/../6&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5837123153-2">)</span><span·class="p">.</span><span·class="w">
731 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/6&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">731 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/6&quot;</span><span·class="p">&gt;&gt;</span><span·class="gp·unselectable">
732 3&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="7050057282-3">(</span><span·class="s">&quot;http://localhost:80&quot;</span><span·class="p"·data-group-id="7050057282-3">)</span><span·class="p">.</span><span·class="w">732 3&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="5837123153-3">(</span><span·class="s">&quot;http://localhost:80&quot;</span><span·class="p"·data-group-id="5837123153-3">)</span><span·class="p">.</span><span·class="w">
733 </span><span·class="s">&quot;http://localhost/&quot;</span><span·class="gp·unselectable">733 </span><span·class="s">&quot;http://localhost/&quot;</span><span·class="gp·unselectable">
734 4&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="7050057282-4">(</span><span·class="p"·data-group-id="7050057282-5">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p">,</span><span·class="gp·unselectable">734 4&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="5837123153-4">(</span><span·class="p"·data-group-id="5837123153-5">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p">,</span><span·class="gp·unselectable">
735 4&gt;·</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;localhost-örebro&quot;</span><span·class="p"·data-group-id="7050057282-5">}</span><span·class="p"·data-group-id="7050057282-4">)</span><span·class="p">.</span><span·class="w">735 4&gt;·</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;localhost-örebro&quot;</span><span·class="p"·data-group-id="5837123153-5">}</span><span·class="p"·data-group-id="5837123153-4">)</span><span·class="p">.</span><span·class="w">
736 </span><span·class="s">&quot;http://localhost-%C3%B6rebro/a/g&quot;</span></code></pre>736 </span><span·class="s">&quot;http://localhost-%C3%B6rebro/a/g&quot;</span></code></pre>
737 ··</section>737 ··</section>
738 </section>738 </section>
739 <section·class="detail"·id="normalize/2">739 <section·class="detail"·id="normalize/2">
  
740 ··<div·class="detail-header">740 ··<div·class="detail-header">
741 ····<a·href="#normalize/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">741 ····<a·href="#normalize/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
Offset 767, 23 lines modifiedOffset 767, 23 lines modified
767 ·······················Options·::·[return_map],767 ·······················Options·::·[return_map],
768 ·······················NormalizedURI·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:uri_map/0">uri_map</a>()·|·<a·href="#t:error/0">error</a>().</pre>768 ·······················NormalizedURI·::·<a·href="#t:uri_string/0">uri_string</a>()·|·<a·href="#t:uri_map/0">uri_map</a>()·|·<a·href="#t:error/0">error</a>().</pre>
  
769 ······</div>769 ······</div>
  
770 <p>Same·as·<a·href="#normalize/1"><code·class="inline">normalize/1</code></a>·but·with·an·additional·<code·class="inline">Options</code>770 <p>Same·as·<a·href="#normalize/1"><code·class="inline">normalize/1</code></a>·but·with·an·additional·<code·class="inline">Options</code>
771 parameter,·that·controls·whether·the·normalized·URI·shall·be·returned·as·an771 parameter,·that·controls·whether·the·normalized·URI·shall·be·returned·as·an
772 uri_map().</p><p>There·is·one·supported·option:·<code·class="inline">return_map</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="0570854708-1">(</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0570854708-2">[</span><span·class="ss">return_map</span><span·class="p"·data-group-id="0570854708-2">]</[·...·truncated·by·diffoscope;·len:·46,·SHA:·be0dfda0be54cb894479264a7d147739486a91ceae3935c6b71a0848b200c77a·...·]-1">)</span><span·class="p">.</span><span·class="w">772 uri_map().</p><p>There·is·one·supported·option:·<code·class="inline">return_map</code>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="2684090092-1">(</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2684090092-2">[</span><span·class="ss">return_map</span><span·class="p"·data-group-id="2684090092-2">]</[·...·truncated·by·diffoscope;·len:·46,·SHA:·275b14dc939c655166d1629f828a028f44352a467afcf24ec91446d4751baaed·...·]-1">)</span><span·class="p">.</span><span·class="w">
773 </span><span·class="p"·data-group-id="0570854708-3">#{</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/a/g&quot;</span><span·class="p"·data-group-id="0570854708-3">}</span><span·class="gp·unselectable">773 </span><span·class="p"·data-group-id="2684090092-3">#{</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/a/g&quot;</span><span·class="p"·data-group-id="2684090092-3">}</span><span·class="gp·unselectable">
774 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="0570854708-4">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/content=5/../6&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0570854708-5">[</span><span·class="ss">r[·...·truncated·by·diffoscope;·len:·110,·SHA:·719b19ed126459d1445f6b8f4fc7f29cf1380a96a6b1dd6a2eaa529ebb367ae0·...·]-4">)</span><span·class="p">.</span><span·class="w">774 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="2684090092-4">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/content=5/../6&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2684090092-5">[</span><span·class="ss">r[·...·truncated·by·diffoscope;·len:·110,·SHA:·1aa0d69a423007001a53365c0fa7d96f7cb72ee9d2cd21f1272163687f79d083·...·]-4">)</span><span·class="p">.</span><span·class="w">
775 </span><span·class="p"·data-group-id="0570854708-6">#{</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/6&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·14,·SHA:·f6d9066e5297480e2624694a68fdc804ddf0782969ca304a6050dda934567598·...·]-6">}</span><span·class="gp·unselectable">775 </span><span·class="p"·data-group-id="2684090092-6">#{</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;mid/6&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·14,·SHA:·4975e9ec0cfed3fdd31ec81469fd6a93fed59c1f0eb43b0b3226b4c06d09cb7b·...·]-6">}</span><span·class="gp·unselectable">
776 3&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="0570854708-7">(</span><span·class="s">&quot;http://localhost:80&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0570854708-8">[</span><span·class="ss">return_map</span><span·class="p"·data-group-id="0570854708-8">[·...·truncated·by·diffoscope;·len:·49,·SHA:·dab1a28b4440e34f4e065fc7c1f18ef75b270d78b8beac746044d6d3c094799e·...·]-7">)</span><span·class="p">.</span><span·class="w">776 3&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="2684090092-7">(</span><span·class="s">&quot;http://localhost:80&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2684090092-8">[</span><span·class="ss">return_map</span><span·class="p"·data-group-id="2684090092-8">[·...·truncated·by·diffoscope;·len:·49,·SHA:·b1436f143b12f2ab376b64305f4297f3595bb91f39b572ad972da1c83698225f·...·]-7">)</span><span·class="p">.</span><span·class="w">
777 </span><span·class="p"·data-group-id="0570854708-9">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·289,·SHA:·c2a2d6860251e57b1488ead77654b49d54824f7d9136874859f14178b3091add·...·]-9">}</span><span·class="gp·unselectable">777 </span><span·class="p"·data-group-id="2684090092-9">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·289,·SHA:·59f8c060c8e20d2d8c9f57c247967db6986636182db05671b52aaba8bb062942·...·]-9">}</span><span·class="gp·unselectable">
778 4&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="0570854708-10">(</span><span·class="p"·data-group-id="0570854708-11">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p">,</span><span·class="gp·unselectable">778 4&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="2684090092-10">(</span><span·class="p"·data-group-id="2684090092-11">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">80</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/a/b/c/./../../g&quot;</span><span·class="p">,</span><span·class="gp·unselectable">
779 4&gt;·</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;localhost-örebro&quot;</span><span·class="p"·data-group-id="0570854708-11">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0570854708-12">[</span><span·class="ss">return_map</span><span·class="p"·data-group-id="0570854708-12">]</span><span·class="p"·data-group-id="0570854708-10">)</span><span·class="p">.</span><span·class="w">779 4&gt;·</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;localhost-örebro&quot;</span><span·class="p"·data-group-id="2684090092-11">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2684090092-12">[</span><span·class="ss">return_map</span><span·class="p"·data-group-id="2684090092-12">]</span><span·class="p"·data-group-id="2684090092-10">)</span><span·class="p">.</span><span·class="w">
780 </span><span·class="p"·data-group-id="0570854708-13">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·300,·SHA:·6aedb8d9e1b0026b826f5332349b95c6fd1a6fe9c8ab9d21ef32ed693a4ebc90·...·]-13">}</span></code></pre>780 </span><span·class="p"·data-group-id="2684090092-13">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·300,·SHA:·ccacfc74597c326484ed5270ad74ae493918ef2f47506a8b85293efd2228e78c·...·]-13">}</span></code></pre>
781 ··</section>781 ··</section>
782 </section>782 </section>
783 <section·class="detail"·id="parse/1">783 <section·class="detail"·id="parse/1">
  
784 ··<div·class="detail-header">784 ··<div·class="detail-header">
785 ····<a·href="#parse/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">785 ····<a·href="#parse/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
786 ······<i·class="ri-link-m"·aria-hidden="true"></i>786 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 807, 22 lines modifiedOffset 807, 22 lines modified
  
807 ··········<pre·translate="no"><span·class="attribute">-spec</span>·parse(URIString)·->·URIMap·when·URIString·::·<a·href="#t:uri_string/0">uri_string</a>(),·URIMap·::·<a·href="#t:uri_map/0">uri_map</a>()·|·<a·href="#t:error/0">error</a>().</pre>807 ··········<pre·translate="no"><span·class="attribute">-spec</span>·parse(URIString)·->·URIMap·when·URIString·::·<a·href="#t:uri_string/0">uri_string</a>(),·URIMap·::·<a·href="#t:uri_map/0">uri_map</a>()·|·<a·href="#t:error/0">error</a>().</pre>
  
808 ······</div>808 ······</div>
  
809 <p>Parses·an·<a·href="https://www.ietf.org/rfc/rfc3986.txt">RFC·3986</a>·compliant809 <p>Parses·an·<a·href="https://www.ietf.org/rfc/rfc3986.txt">RFC·3986</a>·compliant
810 <a·href="#t:uri_string/0"><code·class="inline">uri_string/0</code></a>·into·a·<a·href="#t:uri_map/0"><code·class="inline">uri_map/0</code></a>,·that·holds·the·parsed·components·of·the810 <a·href="#t:uri_string/0"><code·class="inline">uri_string/0</code></a>·into·a·<a·href="#t:uri_map/0"><code·class="inline">uri_map/0</code></a>,·that·holds·the·parsed·components·of·the
811 <code·class="inline">URI</code>.·If·parsing·fails,·an·error·tuple·is·returned.</p><p>See·also·the·opposite·operation·<a·href="#recompose/1"><code·class="inline">recompose/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="5827119548-1">(</span><span·class="s">&quot;foo://user@example.com:8042/over/there?name=ferret#nose&quot;</span><span·class="p"·data-group-id="5827119548-1">)</span><span·class="p">.</span><span·class="w">811 <code·class="inline">URI</code>.·If·parsing·fails,·an·error·tuple·is·returned.</p><p>See·also·the·opposite·operation·<a·href="#recompose/1"><code·class="inline">recompose/1</code></a>.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="2350723087-1">(</span><span·class="s">&quot;foo://user@example.com:8042/over/there?name=ferret#nose&quot;</span><span·class="p"·data-group-id="2350723087-1">)</span><span·class="p">.</span><span·class="w">
812 </span><span·class="p"·data-group-id="5827119548-2">#{</span><span·class="ss">fragment</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;nose&quot;</span><span·class="p">,</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;example.com&quot;</span><span·class="p">,</span><span·class="w">812 </span><span·class="p"·data-group-id="2350723087-2">#{</span><span·class="ss">fragment</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;nose&quot;</span><span·class="p">,</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;example.com&quot;</span><span·class="p">,</span><span·class="w">
813 ··</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/over/there&quot;</span><span·class="p">,</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">8042</span><span·class="p">,</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;name=ferret&quot;</span><span·class="p">,</span><span·class="w">813 ··</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/over/there&quot;</span><span·class="p">,</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">8042</span><span·class="p">,</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;name=ferret&quot;</span><span·class="p">,</span><span·class="w">
814 ··</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">userinfo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;user&quot;</span><span·class="p"·data-group-id="5827119548-2">}</span><span·class="gp·unselectable">814 ··</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">userinfo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;user&quot;</span><span·class="p"·data-group-id="2350723087-2">}</span><span·class="gp·unselectable">
815 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="5827119548-3">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo://user@example.com:8042/over/there?name=ferret&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5827119548-3">)</span><span·class="p">.</span><span·class="w">815 2&gt;·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="2350723087-3">(</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo://user@example.com:8042/over/there?name=ferret&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2350723087-3">)</span><span·class="p">.</span><span·class="w">
816 </span><span·class="p"·data-group-id="5827119548-4">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;example.com&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/over/there&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">816 </span><span·class="p"·data-group-id="2350723087-4">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;example.com&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/over/there&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
817 ··</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">8042</span><span·class="p">,</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;name=ferret&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">817 ··</span><span·class="ss">port</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="mi">8042</span><span·class="p">,</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;name=ferret&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;foo&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
818 ··</span><span·class="ss">userinfo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;user&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="5827119548-4">}</span></code></pre>818 ··</span><span·class="ss">userinfo</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;user&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="2350723087-4">}</span></code></pre>
819 ··</section>819 ··</section>
820 </section>820 </section>
821 <section·class="detail"·id="percent_decode/1">821 <section·class="detail"·id="percent_decode/1">
  
822 ··<div·class="detail-header">822 ··<div·class="detail-header">
Max diff block lines reached; 41668/83776 bytes (49.74%) of diff not shown.
38.7 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/uri_string_usage.html
    
Offset 190, 27 lines modifiedOffset 190, 27 lines modified
190 URI·components·using·<a·href="unicode_usage.html#what-unicode-is">Unicode</a>·characters.190 URI·components·using·<a·href="unicode_usage.html#what-unicode-is">Unicode</a>·characters.
191 <a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>·is·a·convenient·choice·for·enabling191 <a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>·is·a·convenient·choice·for·enabling
192 operations·such·as·producing·standard·compliant·URIs·out·of·components·that·have192 operations·such·as·producing·standard·compliant·URIs·out·of·components·that·have
193 special·or·<a·href="unicode_usage.html#what-unicode-is">Unicode</a>·characters.·It·is·easier193 special·or·<a·href="unicode_usage.html#what-unicode-is">Unicode</a>·characters.·It·is·easier
194 to·explain·this·by·an·example.</p><p>Let's·say·that·we·would·like·to·create·the·following·URI·and·send·it·over·the194 to·explain·this·by·an·example.</p><p>Let's·say·that·we·would·like·to·create·the·following·URI·and·send·it·over·the
195 network:·<code·class="inline">http://cities/örebro?foo·bar</code>.·This·is·not·a·valid·URI·as·it·contains195 network:·<code·class="inline">http://cities/örebro?foo·bar</code>.·This·is·not·a·valid·URI·as·it·contains
196 characters·that·are·not·allowed·in·a·URI·such·as·&quot;ö&quot;·and·the·space.·We·can196 characters·that·are·not·allowed·in·a·URI·such·as·&quot;ö&quot;·and·the·space.·We·can
197 verify·this·by·parsing·the·URI:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="9068379466-1">(</span><span·class="s">&quot;http://cities/örebro?foo·bar&quot;</span><span·class="p"·data-group-id="9068379466-1">)</span><span·class="p">.</span><span·class="w">197 verify·this·by·parsing·the·URI:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="8445694312-1">(</span><span·class="s">&quot;http://cities/örebro?foo·bar&quot;</span><span·class="p"·data-group-id="8445694312-1">)</span><span·class="p">.</span><span·class="w">
198 ··</span><span·class="p"·data-group-id="9068379466-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">invalid_uri</span><span·class="p">,</span><span·class="s">&quot;:&quot;</span><span·class="p"·data-group-id="9068379466-2">}</span></code></pre><p>The·URI·parser·tries·all·possible·combinations·to·interpret·the·input·and·fails198 ··</span><span·class="p"·data-group-id="8445694312-2">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">invalid_uri</span><span·class="p">,</span><span·class="s">&quot;:&quot;</span><span·class="p"·data-group-id="8445694312-2">}</span></code></pre><p>The·URI·parser·tries·all·possible·combinations·to·interpret·the·input·and·fails
199 at·the·last·attempt·when·it·encounters·the·colon·character·<code·class="inline">&quot;:&quot;</code>.·Note,·that·the199 at·the·last·attempt·when·it·encounters·the·colon·character·<code·class="inline">&quot;:&quot;</code>.·Note,·that·the
200 inital·fault·occurs·when·the·parser·attempts·to·interpret·the·character·<code·class="inline">&quot;ö&quot;</code>200 inital·fault·occurs·when·the·parser·attempts·to·interpret·the·character·<code·class="inline">&quot;ö&quot;</code>
201 and·after·a·failure·back-tracks·to·the·point·where·it·has·another·possible201 and·after·a·failure·back-tracks·to·the·point·where·it·has·another·possible
202 parsing·alternative.</p><p>The·proper·way·to·solve·this·problem·is·to·use·<a·href="uri_string.html#recompose/1"><code·class="inline">uri_string:recompose/1</code></a>·with·a202 parsing·alternative.</p><p>The·proper·way·to·solve·this·problem·is·to·use·<a·href="uri_string.html#recompose/1"><code·class="inline">uri_string:recompose/1</code></a>·with·a
203 <a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>·as·input:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">recompose</span><span·class="p"·data-group-id="9154066521-1">(</span><span·class="p"·data-group-id="9154066521-2">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;cities&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/örebro&quot;</span><span·class="p">,</span><span·class="w">203 <a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>·as·input:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">recompose</span><span·class="p"·data-group-id="3157020039-1">(</span><span·class="p"·data-group-id="3157020039-2">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;cities&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/örebro&quot;</span><span·class="p">,</span><span·class="w">
204 ··</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p"·data-group-id="9154066521-2">}</span><span·class="p"·data-group-id="9154066521-1">)</span><span·class="p">.</span><span·class="w">204 ··</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p"·data-group-id="3157020039-2">}</span><span·class="p"·data-group-id="3157020039-1">)</span><span·class="p">.</span><span·class="w">
205 ··</span><span·class="s">&quot;http://cities/%C3%B6rebro?foo%20bar&quot;</span></code></pre><p>The·result·is·a·valid·URI·where·all·the·special·characters·are·encoded·as205 ··</span><span·class="s">&quot;http://cities/%C3%B6rebro?foo%20bar&quot;</span></code></pre><p>The·result·is·a·valid·URI·where·all·the·special·characters·are·encoded·as
206 defined·by·the·standard.·Applying·<a·href="uri_string.html#parse/1"><code·class="inline">uri_string:parse/1</code></a>·and206 defined·by·the·standard.·Applying·<a·href="uri_string.html#parse/1"><code·class="inline">uri_string:parse/1</code></a>·and
207 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>·on·the·URI·returns·the·original·input:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="6720245440-1">(</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="6720245440-2">(</span><span·class="s">&quot;http://cities/%C3%B6rebro?foo%20bar&quot;</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·d2b52e7b457fefdb895fe91566c14d357d7a3da8d648b731fed7882485157148·...·]-1">)</span><span·class="p">.</span><span·class="w">207 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>·on·the·URI·returns·the·original·input:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="5754198016-1">(</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="5754198016-2">(</span><span·class="s">&quot;http://cities/%C3%B6rebro?foo%20bar&quot;</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·a84fcdecb52c368c412ca653938df074aa4f04914442e55112ed26f3d7435665·...·]-1">)</span><span·class="p">.</span><span·class="w">
208 ··</span><span·class="p"·data-group-id="6720245440-3">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;cities&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/örebro&quot;</span><span·class="p">,</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="w">208 ··</span><span·class="p"·data-group-id="5754198016-3">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;cities&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/örebro&quot;</span><span·class="p">,</span><span·class="k">query</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;foo·bar&quot;</span><span·class="p">,</span><span·class="w">
209 ··</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p"·data-group-id="6720245440-3">}</span></code></pre><p>This·symmetric·property·is·heavily·used·in·our·property·test·suite.</p><h2·id="percent-encoding"·class="section-heading">209 ··</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p"·data-group-id="5754198016-3">}</span></code></pre><p>This·symmetric·property·is·heavily·used·in·our·property·test·suite.</p><h2·id="percent-encoding"·class="section-heading">
210 ··<a·href="#percent-encoding"·class="hover-link">210 ··<a·href="#percent-encoding"·class="hover-link">
211 ····<i·class="ri-link-m"·aria-hidden="true"></i>211 ····<i·class="ri-link-m"·aria-hidden="true"></i>
212 ··</a>212 ··</a>
213 ··<span·class="text">Percent-encoding</span>213 ··<span·class="text">Percent-encoding</span>
214 </h2>214 </h2>
215 <p>As·you·have·seen·in·the·previous·chapter,·a·standard·URI·can·only·contain·a215 <p>As·you·have·seen·in·the·previous·chapter,·a·standard·URI·can·only·contain·a
216 strict·subset·of·the·US·ASCII·character·set,·moreover·the·allowed·set·of216 strict·subset·of·the·US·ASCII·character·set,·moreover·the·allowed·set·of
Offset 225, 72 lines modifiedOffset 225, 72 lines modified
225 <a·href="unicode_usage.html#what-unicode-is">Unicode</a>·and·it·is·encoded·using·a·single225 <a·href="unicode_usage.html#what-unicode-is">Unicode</a>·and·it·is·encoded·using·a·single
226 octet·<code·class="inline">0x20</code>.</p><blockquote><h4·class="info">Note</h4><p><a·href="unicode_usage.html#what-unicode-is">Unicode</a>·is·backward·compatible·with·ASCII,226 octet·<code·class="inline">0x20</code>.</p><blockquote><h4·class="info">Note</h4><p><a·href="unicode_usage.html#what-unicode-is">Unicode</a>·is·backward·compatible·with·ASCII,
227 the·encoding·of·the·first·128·characters·is·the·same·binary·value·as·in·ASCII.</p></blockquote><p><a·href=""·id="percent_encoding"></a>·It·is·a·major·source·of·confusion·exactly·which227 the·encoding·of·the·first·128·characters·is·the·same·binary·value·as·in·ASCII.</p></blockquote><p><a·href=""·id="percent_encoding"></a>·It·is·a·major·source·of·confusion·exactly·which
228 characters·will·be·percent-encoded.·In·order·to·make·it·easier·to·answer·this228 characters·will·be·percent-encoded.·In·order·to·make·it·easier·to·answer·this
229 question·the·library·provides·a·utility·function,229 question·the·library·provides·a·utility·function,
230 <a·href="uri_string.html#allowed_characters/0"><code·class="inline">uri_string:allowed_characters/0</code></a>,·that230 <a·href="uri_string.html#allowed_characters/0"><code·class="inline">uri_string:allowed_characters/0</code></a>,·that
231 lists·the·allowed·set·of·characters·in·each·major·URI·component,·and·also·in·the231 lists·the·allowed·set·of·characters·in·each·major·URI·component,·and·also·in·the
232 most·important·standard·character·sets.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">allowed_characters</span><span·class="p"·data-group-id="5844305502-1">(</span><span·class="p"·data-group-id="5844305502-1">)</span><span·class="p">.</span><span·class="w">232 most·important·standard·character·sets.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">allowed_characters</span><span·class="p"·data-group-id="7613885207-1">(</span><span·class="p"·data-group-id="7613885207-1">)</span><span·class="p">.</span><span·class="w">
233 ····</span><span·class="p"·data-group-id="5844305502-2">[</span><span·class="p"·data-group-id="5844305502-3">{</span><span·class="ss">scheme</span><span·class="p">,</span><span·class="w">233 ····</span><span·class="p"·data-group-id="7613885207-2">[</span><span·class="p"·data-group-id="7613885207-3">{</span><span·class="ss">scheme</span><span·class="p">,</span><span·class="w">
234 ·····</span><span·class="s">&quot;+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&quot;</span><span·class="p"·data-group-id="5844305502-3">}</span><span·class="p">,</span><span·class="w">234 ·····</span><span·class="s">&quot;+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&quot;</span><span·class="p"·data-group-id="7613885207-3">}</span><span·class="p">,</span><span·class="w">
235 ····</span><span·class="p"·data-group-id="5844305502-4">{</span><span·class="ss">userinfo</span><span·class="p">,</span><span·class="w">235 ····</span><span·class="p"·data-group-id="7613885207-4">{</span><span·class="ss">userinfo</span><span·class="p">,</span><span·class="w">
236 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-.0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-4">}</span><span·class="p">,</span><span·class="w">236 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-.0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-4">}</span><span·class="p">,</span><span·class="w">
237 ····</span><span·class="p"·data-group-id="5844305502-5">{</span><span·class="ss">host</span><span·class="p">,</span><span·class="w">237 ····</span><span·class="p"·data-group-id="7613885207-5">{</span><span·class="ss">host</span><span·class="p">,</span><span·class="w">
238 ·····</span><span·class="s">&quot;!$&amp;&#39;()*+,-.0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-5">}</span><span·class="p">,</span><span·class="w">238 ·····</span><span·class="s">&quot;!$&amp;&#39;()*+,-.0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-5">}</span><span·class="p">,</span><span·class="w">
239 ····</span><span·class="p"·data-group-id="5844305502-6">{</span><span·class="ss">ipv4</span><span·class="p">,</span><span·class="s">&quot;.0123456789&quot;</span><span·class="p"·data-group-id="5844305502-6">}</span><span·class="p">,</span><span·class="w">239 ····</span><span·class="p"·data-group-id="7613885207-6">{</span><span·class="ss">ipv4</span><span·class="p">,</span><span·class="s">&quot;.0123456789&quot;</span><span·class="p"·data-group-id="7613885207-6">}</span><span·class="p">,</span><span·class="w">
240 ····</span><span·class="p"·data-group-id="5844305502-7">{</span><span·class="ss">ipv6</span><span·class="p">,</span><span·class="s">&quot;.0123456789:ABCDEFabcdef&quot;</span><span·class="p"·data-group-id="5844305502-7">}</span><span·class="p">,</span><span·class="w">240 ····</span><span·class="p"·data-group-id="7613885207-7">{</span><span·class="ss">ipv6</span><span·class="p">,</span><span·class="s">&quot;.0123456789:ABCDEFabcdef&quot;</span><span·class="p"·data-group-id="7613885207-7">}</span><span·class="p">,</span><span·class="w">
241 ····</span><span·class="p"·data-group-id="5844305502-8">{</span><span·class="ss">regname</span><span·class="p">,</span><span·class="w">241 ····</span><span·class="p"·data-group-id="7613885207-8">{</span><span·class="ss">regname</span><span·class="p">,</span><span·class="w">
242 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-.0123456789;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-8">}</span><span·class="p">,</span><span·class="w">242 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-.0123456789;=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-8">}</span><span·class="p">,</span><span·class="w">
243 ····</span><span·class="p"·data-group-id="5844305502-9">{</span><span·class="ss">path</span><span·class="p">,</span><span·class="w">243 ····</span><span·class="p"·data-group-id="7613885207-9">{</span><span·class="ss">path</span><span·class="p">,</span><span·class="w">
244 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-./0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-9">}</span><span·class="p">,</span><span·class="w">244 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-./0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-9">}</span><span·class="p">,</span><span·class="w">
245 ····</span><span·class="p"·data-group-id="5844305502-10">{</span><span·class="k">query</span><span·class="p">,</span><span·class="w">245 ····</span><span·class="p"·data-group-id="7613885207-10">{</span><span·class="k">query</span><span·class="p">,</span><span·class="w">
246 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-10">}</span><span·class="p">,</span><span·class="w">246 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-10">}</span><span·class="p">,</span><span·class="w">
247 ····</span><span·class="p"·data-group-id="5844305502-11">{</span><span·class="ss">fragment</span><span·class="p">,</span><span·class="w">247 ····</span><span·class="p"·data-group-id="7613885207-11">{</span><span·class="ss">fragment</span><span·class="p">,</span><span·class="w">
248 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-11">}</span><span·class="p">,</span><span·class="w">248 ·····</span><span·class="s">&quot;!$%&amp;&#39;()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-11">}</span><span·class="p">,</span><span·class="w">
249 ····</span><span·class="p"·data-group-id="5844305502-12">{</span><span·class="ss">reserved</span><span·class="p">,</span><span·class="s">&quot;!#$&amp;&#39;()*+,/:;=?@[]&quot;</span><span·class="p"·data-group-id="5844305502-12">}</span><span·class="p">,</span><span·class="w">249 ····</span><span·class="p"·data-group-id="7613885207-12">{</span><span·class="ss">reserved</span><span·class="p">,</span><span·class="s">&quot;!#$&amp;&#39;()*+,/:;=?@[]&quot;</span><span·class="p"·data-group-id="7613885207-12">}</span><span·class="p">,</span><span·class="w">
250 ····</span><span·class="p"·data-group-id="5844305502-13">{</span><span·class="ss">unreserved</span><span·class="p">,</span><span·class="w">250 ····</span><span·class="p"·data-group-id="7613885207-13">{</span><span·class="ss">unreserved</span><span·class="p">,</span><span·class="w">
251 ·····</span><span·class="s">&quot;-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="5844305502-13">}</span><span·class="p"·data-group-id="5844305502-2">]</span></code></pre><p>If·a·URI·component·has·a·character·that·is·not·allowed,·it·will·be251 ·····</span><span·class="s">&quot;-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~&quot;</span><span·class="p"·data-group-id="7613885207-13">}</span><span·class="p"·data-group-id="7613885207-2">]</span></code></pre><p>If·a·URI·component·has·a·character·that·is·not·allowed,·it·will·be
252 percent-encoded·when·the·URI·is·produced:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">recompose</span><span·class="p"·data-group-id="9521676838-1">(</span><span·class="p"·data-group-id="9521676838-2">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;https&quot;</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·444,·SHA:·6bf70a77bb6692783435d98c3cd8afb5c7bb578ccedc5ca66b518733d87da96b·...·]-1">)</span><span·class="p">.</span><span·class="w">252 percent-encoded·when·the·URI·is·produced:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">recompose</span><span·class="p"·data-group-id="0247504683-1">(</span><span·class="p"·data-group-id="0247504683-2">#{</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;https&quot;</span><span·class="p">,</span><span·clas[·...·truncated·by·diffoscope;·len:·444,·SHA:·188f71afa85d949f3c2a8757f8ddbb249442d9314df174b4da0bae33b659c1f6·...·]-1">)</span><span·class="p">.</span><span·class="w">
253 ····</span><span·class="s">&quot;https://local%23host&quot;</span></code></pre><p>Consuming·a·URI·containing·percent-encoded·triplets·can·take·many·steps.·The253 ····</span><span·class="s">&quot;https://local%23host&quot;</span></code></pre><p>Consuming·a·URI·containing·percent-encoded·triplets·can·take·many·steps.·The
254 following·example·shows·how·to·handle·an·input·URI·that·is·not·normalized·and254 following·example·shows·how·to·handle·an·input·URI·that·is·not·normalized·and
255 contains·multiple·percent-encoded·triplets.·First,·the·input255 contains·multiple·percent-encoded·triplets.·First,·the·input
256 <a·href="uri_string.html#t:uri_string/0"><code·class="inline">uri_string()</code></a>·is·to·be·parsed·into·a256 <a·href="uri_string.html#t:uri_string/0"><code·class="inline">uri_string()</code></a>·is·to·be·parsed·into·a
257 <a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>.·The·parsing·only·splits·the·URI·into257 <a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>.·The·parsing·only·splits·the·URI·into
258 its·components·without·doing·any·decoding:</p><pre><code·class="text">····3&gt;·uri_string:parse(&quot;http://%6C%6Fcal%23host/%F6re%26bro%20&quot;).258 its·components·without·doing·any·decoding:</p><pre><code·class="text">····3&gt;·uri_string:parse(&quot;http://%6C%6Fcal%23host/%F6re%26bro%20&quot;).
259 ····#{host·=&gt;·&quot;%6C%6Fcal%23host&quot;,path·=&gt;·&quot;/%F6re%26bro%20&quot;,259 ····#{host·=&gt;·&quot;%6C%6Fcal%23host&quot;,path·=&gt;·&quot;/%F6re%26bro%20&quot;,
260 ······scheme·=&gt;·&quot;http&quot;}}</code></pre><p>The·input·is·a·valid·URI·but·how·can·you·decode·those·percent-encoded·octets?260 ······scheme·=&gt;·&quot;http&quot;}}</code></pre><p>The·input·is·a·valid·URI·but·how·can·you·decode·those·percent-encoded·octets?
261 You·can·try·to·normalize·the·input·with·<a·href="uri_string.html#normalize/1"><code·class="inline">uri_string:normalize/1</code></a>.·The·normalize261 You·can·try·to·normalize·the·input·with·<a·href="uri_string.html#normalize/1"><code·class="inline">uri_string:normalize/1</code></a>.·The·normalize
262 operation·decodes·those·percent-encoded·triplets·that·correspond·to·a·character262 operation·decodes·those·percent-encoded·triplets·that·correspond·to·a·character
263 in·the·unreserved·set.·Normalization·is·a·safe,·idempotent·operation·that263 in·the·unreserved·set.·Normalization·is·a·safe,·idempotent·operation·that
264 converts·a·URI·into·its·canonical·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="9401503426-1">(</span><span·class="s">&quot;http://%6C%6Fcal%23host/%F6re%26bro%20&quot;</span><span·class="p"·data-group-id="9401503426-1">)</span><span·class="p">.</span><span·class="w">264 converts·a·URI·into·its·canonical·form:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">4</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="0374522859-1">(</span><span·class="s">&quot;http://%6C%6Fcal%23host/%F6re%26bro%20&quot;</span><span·class="p"·data-group-id="0374522859-1">)</span><span·class="p">.</span><span·class="w">
265 ····</span><span·class="s">&quot;http://local%23host/%F6re%26bro%20&quot;</span><span·class="w">265 ····</span><span·class="s">&quot;http://local%23host/%F6re%26bro%20&quot;</span><span·class="w">
266 ····</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="9401503426-2">(</span><span·class="s">&quot;http://%6C%6Fcal%23host/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9401503426-3">[</span><span·class="ss">return_map</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·68,·SHA:·b4dd755ad30d55fec91b1314d0784623c3db22040c3a98906869b439a4360284·...·]-2">)</span><span·class="p">.</span><span·class="w">266 ····</span><span·class="mi">5</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">normalize</span><span·class="p"·data-group-id="0374522859-2">(</span><span·class="s">&quot;http://%6C%6Fcal%23host/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0374522859-3">[</span><span·class="ss">return_map</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·68,·SHA:·248592c3f302e8c1899ab05ae0de0389ae0b0de4472b87736cf7d9cf20d117fc·...·]-2">)</span><span·class="p">.</span><span·class="w">
267 ····</span><span·class="p"·data-group-id="9401503426-4">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;local%23host&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">267 ····</span><span·class="p"·data-group-id="0374522859-4">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;local%23host&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">
268 ······</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p"·data-group-id="9401503426-4">}</span></code></pre><p>There·are·still·a·few·percent-encoded·triplets·left·in·the·output.·At·this268 ······</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p"·data-group-id="0374522859-4">}</span></code></pre><p>There·are·still·a·few·percent-encoded·triplets·left·in·the·output.·At·this
269 point,·when·the·URI·is·already·parsed,·it·is·safe·to·apply·application·specific269 point,·when·the·URI·is·already·parsed,·it·is·safe·to·apply·application·specific
270 decoding·on·the·remaining·character·triplets.·Erlang/OTP·provides·a·function,270 decoding·on·the·remaining·character·triplets.·Erlang/OTP·provides·a·function,
271 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>·for·raw·percent·decoding·that·you·can·use·on·the271 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>·for·raw·percent·decoding·that·you·can·use·on·the
272 host·and·path·components,·or·on·the·whole·map:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="0987592409-1">(</span><span·class="s">&quot;local%23host&quot;</span><span·class="p"·data-group-id="0987592409-1">)</span><span·class="p">.</span><span·class="w">272 host·and·path·components,·or·on·the·whole·map:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">6</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="9225686948-1">(</span><span·class="s">&quot;local%23host&quot;</span><span·class="p"·data-group-id="9225686948-1">)</span><span·class="p">.</span><span·class="w">
273 ····</span><span·class="s">&quot;local#host&quot;</span><span·class="w">273 ····</span><span·class="s">&quot;local#host&quot;</span><span·class="w">
274 ····</span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="0987592409-2">(</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p"·data-group-id="0987592409-2">)</span><span·class="p">.</span><span·class="w">274 ····</span><span·class="mi">7</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="9225686948-2">(</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p"·data-group-id="9225686948-2">)</span><span·class="p">.</span><span·class="w">
275 ····</span><span·class="p"·data-group-id="0987592409-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">invalid_utf8</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/öre&amp;bro·&quot;</span><span·class="p">&gt;&gt;</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·4befba942b31cd9b16897cfca1241ae4ff047adf8430aff9da59daedf70ec69c·...·]-3">}</span><span·class="w">275 ····</span><span·class="p"·data-group-id="9225686948-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">invalid_utf8</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;/öre&amp;bro·&quot;</span><span·class="p">&gt;&gt;</span><span·class[·...·truncated·by·diffoscope;·len:·30,·SHA:·9138ea06cc98251bf0b3e20045496795599c49a13502b3df4650df5b9f64c8db·...·]-3">}</span><span·class="w">
276 ····</span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="0987592409-4">(</span><span·class="p"·data-group-id="0987592409-5">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;local%23host&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">276 ····</span><span·class="mi">8</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="9225686948-4">(</span><span·class="p"·data-group-id="9225686948-5">#{</span><span·class="ss">host</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;local%23host&quot;</span><span·class="p">,</span><span·class="ss">path</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">
277 ····</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p"·data-group-id="0987592409-5">}</span><span·class="p"·data-group-id="0987592409-4">)</span><span·class="p">.</span><span·class="w">277 ····</span><span·class="ss">scheme</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="s">&quot;http&quot;</span><span·class="p"·data-group-id="9225686948-5">}</span><span·class="p"·data-group-id="9225686948-4">)</span><span·class="p">.</span><span·class="w">
278 ····</span><span·class="p"·data-group-id="0987592409-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p"·data-group-id="0987592409-7">{</span><span·class="ss">invalid</span><span·class="p">,</span><span·class="p"·data-group-id="0987592409-8">{</span><span·class="ss">pat[·...·truncated·by·diffoscope;·len:·455,·SHA:·621d462c1a0a5aa6b18d89d53737ecb335351f22611893acf8fc26bf3d9ce2f9·...·]-6">}</span></code></pre><p>The·<code·class="inline">host</code>·was·successfully·decoded·but·the·path·contains·at·least·one·character278 ····</span><span·class="p"·data-group-id="9225686948-6">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="p"·data-group-id="9225686948-7">{</span><span·class="ss">invalid</span><span·class="p">,</span><span·class="p"·data-group-id="9225686948-8">{</span><span·class="ss">pat[·...·truncated·by·diffoscope;·len:·455,·SHA:·08c4ad8c7bebe7b1af7f4ec01e756d54522028da5336be0e0cce47b13f37dcec·...·]-6">}</span></code></pre><p>The·<code·class="inline">host</code>·was·successfully·decoded·but·the·path·contains·at·least·one·character
279 with·non-UTF-8·encoding.·In·order·to·be·able·to·decode·this,·you·have·to·make279 with·non-UTF-8·encoding.·In·order·to·be·able·to·decode·this,·you·have·to·make
280 assumptions·about·the·encoding·used·in·these·triplets.·The·most·obvious·choice280 assumptions·about·the·encoding·used·in·these·triplets.·The·most·obvious·choice
281 is·<em>latin-1</em>,·so·you·can·try·<a·href="uri_string.html#transcode/2"><code·class="inline">uri_string:transcode/2</code></a>,·to·transcode·the·path·to281 is·<em>latin-1</em>,·so·you·can·try·<a·href="uri_string.html#transcode/2"><code·class="inline">uri_string:transcode/2</code></a>,·to·transcode·the·path·to
282 UTF-8·and·run·the·percent-decode·operation·on·the·transcoded·string:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">9</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">transcode</span><span·class="p"·data-group-id="6586317599-1">(</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6586317599-2">[</span><span·class="p"·data-group-id="6586317599-3">{</span><span·class="ss">in_encoding</[·...·truncated·by·diffoscope;·len:·230,·SHA:·54dd593b2616b36e49f4eedf4d7c72da3be93ec04a2384e1cc3a527ae7b899d3·...·]-1">)</span><span·class="p">.</span><span·class="w">282 UTF-8·and·run·the·percent-decode·operation·on·the·transcoded·string:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">9</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">transcode</span><span·class="p"·data-group-id="4536170440-1">(</span><span·class="s">&quot;/%F6re%26bro%20&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4536170440-2">[</span><span·class="p"·data-group-id="4536170440-3">{</span><span·class="ss">in_encoding</[·...·truncated·by·diffoscope;·len:·230,·SHA:·4819936134937e048681743fbb20aaa4f5be79b89cc49b1adc36038f46f05a34·...·]-1">)</span><span·class="p">.</span><span·class="w">
283 ····</span><span·class="s">&quot;/%C3%B6re%26bro%20&quot;</span><span·class="w">283 ····</span><span·class="s">&quot;/%C3%B6re%26bro%20&quot;</span><span·class="w">
284 ····</span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="6586317599-4">(</span><span·class="s">&quot;/%C3%B6re%26bro%20&quot;</span><span·class="p"·data-group-id="6586317599-4">)</span><span·class="p">.</span><span·class="w">284 ····</span><span·class="mi">10</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="4536170440-4">(</span><span·class="s">&quot;/%C3%B6re%26bro%20&quot;</span><span·class="p"·data-group-id="4536170440-4">)</span><span·class="p">.</span><span·class="w">
285 ····</span><span·class="s">&quot;/öre&amp;bro·&quot;</span></code></pre><p>It·is·important·to·emphasize·that·it·is·not·safe·to·apply285 ····</span><span·class="s">&quot;/öre&amp;bro·&quot;</span></code></pre><p>It·is·important·to·emphasize·that·it·is·not·safe·to·apply
286 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>·directly·on·an·input·URI:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">11</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="7436671092-1">(</span><span·class="s">&quot;http://%6C%6Fcal%23host/%C3%B6re%26bro%20&quot;</span><span·class="p"·data-group-id="7436671092-1">)</span><span·class="p">.</span><span·class="w">286 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>·directly·on·an·input·URI:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="mi">11</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">percent_decode</span><span·class="p"·data-group-id="7265047819-1">(</span><span·class="s">&quot;http://%6C%6Fcal%23host/%C3%B6re%26bro%20&quot;</span><span·class="p"·data-group-id="7265047819-1">)</span><span·class="p">.</span><span·class="w">
287 ····</span><span·class="s">&quot;http://local#host/öre&amp;bro·&quot;</span><span·class="w">287 ····</span><span·class="s">&quot;http://local#host/öre&amp;bro·&quot;</span><span·class="w">
288 ····</span><span·class="mi">12</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="7436671092-2">(</span><span·class="s">&quot;http://local#host/öre&amp;bro·&quot;</span><span·class="p"·data-group-id="7436671092-2">)</span><span·class="p">.</span><span·class="w">288 ····</span><span·class="mi">12</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="nc">uri_string</span><span·class="p">:</span><span·class="nf">parse</span><span·class="p"·data-group-id="7265047819-2">(</span><span·class="s">&quot;http://local#host/öre&amp;bro·&quot;</span><span·class="p"·data-group-id="7265047819-2">)</span><span·class="p">.</span><span·class="w">
289 ····</span><span·class="p"·data-group-id="7436671092-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">invalid_uri</span><span·class="p">,</span><span·class="s">&quot;:&quot;</span><span·class="p"·data-group-id="7436671092-3">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>Percent-encoding·is·implemented·in·<a·href="uri_string.html#recompose/1"><code·class="inline">uri_string:recompose/1</code></a>·and·it·happens289 ····</span><span·class="p"·data-group-id="7265047819-3">{</span><span·class="ss">error</span><span·class="p">,</span><span·class="ss">invalid_uri</span><span·class="p">,</span><span·class="s">&quot;:&quot;</span><span·class="p"·data-group-id="7265047819-3">}</span></code></pre><blockquote><h4·class="info">Note</h4><p>Percent-encoding·is·implemented·in·<a·href="uri_string.html#recompose/1"><code·class="inline">uri_string:recompose/1</code></a>·and·it·happens
290 when·converting·a·<a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>·into·a290 when·converting·a·<a·href="uri_string.html#t:uri_map/0"><code·class="inline">uri_map()</code></a>·into·a
291 <a·href="uri_string.html#t:uri_string/0"><code·class="inline">uri_string()</code></a>.·Applying·any·percent-encoding291 <a·href="uri_string.html#t:uri_string/0"><code·class="inline">uri_string()</code></a>.·Applying·any·percent-encoding
292 directly·on·an·input·URI·would·not·be·safe·just·as·in·the·case·of292 directly·on·an·input·URI·would·not·be·safe·just·as·in·the·case·of
293 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>,·the·output·could·be·an·invalid·URI.·Quoting293 <a·href="uri_string.html#percent_decode/1"><code·class="inline">uri_string:percent_decode/1</code></a>,·the·output·could·be·an·invalid·URI.·Quoting
294 functions·allow·users·to·perform·raw·percent·encoding·and·decoding·on294 functions·allow·users·to·perform·raw·percent·encoding·and·decoding·on
295 application·data·which·cannot·be·handled·automatically·by295 application·data·which·cannot·be·handled·automatically·by
296 <a·href="uri_string.html#recompose/1"><code·class="inline">uri_string:recompose/1</code></a>.·For·example·in·scenario·when·user·would·need·to·use296 <a·href="uri_string.html#recompose/1"><code·class="inline">uri_string:recompose/1</code></a>.·For·example·in·scenario·when·user·would·need·to·use
32.9 KB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/zip.html
    
Offset 997, 36 lines modifiedOffset 997, 36 lines modified
997 <code·class="inline">Archive</code>,·starting·with·<code·class="inline">AccIn·==·Acc0</code>.</p><p><code·class="inline">FileInArchive</code>·is·the·name·that·the·file·has·in·the·archive.</p><p><code·class="inline">GetInfo</code>·is·a·fun·that·returns·information·about·the·file.</p><p><code·class="inline">GetBin</code>·returns·the·file·contents.</p><p>Both·<code·class="inline">GetInfo</code>·and·<code·class="inline">GetBin</code>·must·be·called·within·the·<code·class="inline">Fun</code>.·Their·behavior·is997 <code·class="inline">Archive</code>,·starting·with·<code·class="inline">AccIn·==·Acc0</code>.</p><p><code·class="inline">FileInArchive</code>·is·the·name·that·the·file·has·in·the·archive.</p><p><code·class="inline">GetInfo</code>·is·a·fun·that·returns·information·about·the·file.</p><p><code·class="inline">GetBin</code>·returns·the·file·contents.</p><p>Both·<code·class="inline">GetInfo</code>·and·<code·class="inline">GetBin</code>·must·be·called·within·the·<code·class="inline">Fun</code>.·Their·behavior·is
998 undefined·if·they·are·called·outside·the·context·of·<code·class="inline">Fun</code>.</p><p>The·<code·class="inline">Fun</code>·must·return·a·new·accumulator,·which·is·passed·to·the·next·call.998 undefined·if·they·are·called·outside·the·context·of·<code·class="inline">Fun</code>.</p><p>The·<code·class="inline">Fun</code>·must·return·a·new·accumulator,·which·is·passed·to·the·next·call.
999 <a·href="#foldl/3"><code·class="inline">foldl/3</code></a>·returns·the·final·accumulator·value.·<code·class="inline">Acc0</code>·is·returned999 <a·href="#foldl/3"><code·class="inline">foldl/3</code></a>·returns·the·final·accumulator·value.·<code·class="inline">Acc0</code>·is·returned
1000 if·the·archive·is·empty.·It·is·not·necessary·to·iterate·over·all·files·in·the1000 if·the·archive·is·empty.·It·is·not·necessary·to·iterate·over·all·files·in·the
1001 archive.·The·iteration·can·be·ended·prematurely·in·a·controlled·manner·by1001 archive.·The·iteration·can·be·ended·prematurely·in·a·controlled·manner·by
1002 throwing·an·exception.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;dummy.zip&quot;</span><span·class="p">.</span><span·class="w">1002 throwing·an·exception.</p><p><em>Example:</em></p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">&gt;·</span><span·class="n">Name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="s">&quot;dummy.zip&quot;</span><span·class="p">.</span><span·class="w">
1003 </span><span·class="s">&quot;dummy.zip&quot;</span><span·class="gp·unselectable">1003 </span><span·class="s">&quot;dummy.zip&quot;</span><span·class="gp·unselectable">
1004 &gt;·</span><span·class="p"·data-group-id="8521232826-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8521232826-2">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·[·...·truncated·by·diffoscope;·len:·1344,·SHA:·6d9308185771ac174d3d785cc0cae554c57d4722c04038afe19284539f8c62ed·...·]-3">)</span><span·class="p">.</span><span·class="w">1004 &gt;·</span><span·class="p"·data-group-id="7780037651-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7780037651-2">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><span·[·...·truncated·by·diffoscope;·len:·1344,·SHA:·464f865bf62d2265bd2b2a352da650f5f892c9c35e098a55070ca2817e7f9487·...·]-3">)</span><span·class="p">.</span><span·class="w">
1005 </span><span·class="p"·data-group-id="8521232826-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8521232826-9">{</span><span·class="s">&quot;dummy.zip&quot;</span><span·class="p">,</span><span·class="w">1005 </span><span·class="p"·data-group-id="7780037651-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7780037651-9">{</span><span·class="s">&quot;dummy.zip&quot;</span><span·class="p">,</span><span·class="w">
1006 ·····</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">74</span><span·class="p">,</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">171</span><span·class="p">,</span><span·class="mi">39</span><span·class="p">,</span><span·class="mi">212</span><span·class="p">,</span><span·class="mi">26</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">1006 ·····</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">74</span><span·class="p">,</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">171</span><span·class="p">,</span><span·class="mi">39</span><span·class="p">,</span><span·class="mi">212</span><span·class="p">,</span><span·class="mi">26</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
1007 ·······</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8521232826-9">}</span><span·class="p"·data-group-id="8521232826-8">}</span><span·class="gp·unselectable">1007 ·······</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7780037651-9">}</span><span·class="p"·data-group-id="7780037651-8">}</span><span·class="gp·unselectable">
1008 &gt;·</span><span·class="p"·data-group-id="8521232826-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FileSpec</span><span·class="p"·data-group-id="8521232826-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·1787,·SHA:·67c768ba907c26f8a63f76b2ad3a064a390ad5c78ba5d84664ff5ad4dae6c4df·...·]-11">)</span><span·class="p">.</span><span·class="w">1008 &gt;·</span><span·class="p"·data-group-id="7780037651-10">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FileSpec</span><span·class="p"·data-group-id="7780037651-10">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·1787,·SHA:·eef710a74e440835761bbdd072ab783a00b8d2da9531f729253bc9abc38f9fa3·...·]-11">)</span><span·class="p">.</span><span·class="w">
1009 </span><span·class="p"·data-group-id="8521232826-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8521232826-20">[</span><span·class="p"·data-group-id="8521232826-21">{</span><span·class="s">&quot;bar&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;BAR&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">1009 </span><span·class="p"·data-group-id="7780037651-19">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7780037651-20">[</span><span·class="p"·data-group-id="7780037651-21">{</span><span·class="s">&quot;bar&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;BAR&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
1010 ······</span><span·class="p"·data-group-id="8521232826-22">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">1010 ······</span><span·class="p"·data-group-id="7780037651-22">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">
1011 ·················</span><span·class="p"·data-group-id="8521232826-23">{</span><span·class="p"·data-group-id="8521232826-24">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8521232826-24">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·2eafc462d5d18d58173e38927b8f4aeda3afd78f8a592ba793400db809268e53·...·]-23">}</span><span·class="p">,</span><span·class="w">1011 ·················</span><span·class="p"·data-group-id="7780037651-23">{</span><span·class="p"·data-group-id="7780037651-24">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7780037651-24">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·28e24d2c976b685f43143b382609f5734e0c026b3dd3d84b097399f4ef61c681·...·]-23">}</span><span·class="p">,</span><span·class="w">
1012 ·················</span><span·class="p"·data-group-id="8521232826-26">{</span><span·class="p"·data-group-id="8521232826-27">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8521232826-27">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·c219b6e482002feb67d5493cab6423a1d45729d8a6b6f6f965fad75ee87e4c81·...·]-26">}</span><span·class="p">,</span><span·class="w">1012 ·················</span><span·class="p"·data-group-id="7780037651-26">{</span><span·class="p"·data-group-id="7780037651-27">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7780037651-27">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·3492113a3b96baa33684d4f48beffcaef1434260600718c147a871849055c216·...·]-26">}</span><span·class="p">,</span><span·class="w">
1013 ·················</span><span·class="p"·data-group-id="8521232826-29">{</span><span·class="p"·data-group-id="8521232826-30">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8521232826-30">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·dec299c3749246c1e87ffe493141ece78ab45568a833a2aea488d83f877635af·...·]-29">}</span><span·class="p">,</span><span·class="w">1013 ·················</span><span·class="p"·data-group-id="7780037651-29">{</span><span·class="p"·data-group-id="7780037651-30">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7780037651-30">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·5d69752369432f9a53778ba8e355a59bf878152bba4d03f784783ce1bf16901a·...·]-29">}</span><span·class="p">,</span><span·class="w">
1014 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="8521232826-22">}</span><span·class="p"·data-group-id="8521232826-21">}</span><span·class="p">,</span><span·class="w">1014 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="7780037651-22">}</span><span·class="p"·data-group-id="7780037651-21">}</span><span·class="p">,</span><span·class="w">
1015 ·····</span><span·class="p"·data-group-id="8521232826-32">{</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;FOO&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">1015 ·····</span><span·class="p"·data-group-id="7780037651-32">{</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;FOO&quot;</span><span·class="p">&gt;&gt;</span><span·class="p">,</span><span·class="w">
1016 ······</span><span·class="p"·data-group-id="8521232826-33">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">1016 ······</span><span·class="p"·data-group-id="7780037651-33">{</span><span·class="ss">file_info</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="ss">regular</span><span·class="p">,</span><span·class="ss">read_write</span><span·class="p">,</span><span·class="w">
1017 ·················</span><span·class="p"·data-group-id="8521232826-34">{</span><span·class="p"·data-group-id="8521232826-35">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8521232826-35">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·bc295cef438e2faaedc9bff36c708b304d1ca6a1e38bed51be7de9e79199b614·...·]-34">}</span><span·class="p">,</span><span·class="w">1017 ·················</span><span·class="p"·data-group-id="7780037651-34">{</span><span·class="p"·data-group-id="7780037651-35">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7780037651-35">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·33c5542b0ea8b9331c528c5d647a4d06ddd90a60af0e9f8cf62117136872d862·...·]-34">}</span><span·class="p">,</span><span·class="w">
1018 ·················</span><span·class="p"·data-group-id="8521232826-37">{</span><span·class="p"·data-group-id="8521232826-38">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8521232826-38">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·8d119ff2cef96ff892ce1f820d5581b05cb7503e001e5e8783bd81e9e521a7f9·...·]-37">}</span><span·class="p">,</span><span·class="w">1018 ·················</span><span·class="p"·data-group-id="7780037651-37">{</span><span·class="p"·data-group-id="7780037651-38">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7780037651-38">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·d324acbec2aab425550d7bc4e1c02b51d4f35bd78a58336e04ac98d7276aeae3·...·]-37">}</span><span·class="p">,</span><span·class="w">
1019 ·················</span><span·class="p"·data-group-id="8521232826-40">{</span><span·class="p"·data-group-id="8521232826-41">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8521232826-41">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·5f5e2f5363074bff7e47c652eb763d6fd4a5be47592e87283520f6f5fefed071·...·]-40">}</span><span·class="p">,</span><span·class="w">1019 ·················</span><span·class="p"·data-group-id="7780037651-40">{</span><span·class="p"·data-group-id="7780037651-41">{</span><span·class="mi">2010</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7780037651-41">}</span[·...·truncated·by·diffoscope;·len:·299,·SHA:·77a73d84f48f5aac4717aa7e63d506cc439515d9997426f995acd93891d82438·...·]-40">}</span><span·class="p">,</span><span·class="w">
1020 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="8521232826-33">}</span><span·class="p"·data-group-id="8521232826-32">}</span><span·class="p"·data-group-id="8521232826-20">]</span><span·class="p"·data-group-id="8521232826-19">}</span><span·class="gp·unselectable">1020 ·················</span><span·class="mi">54</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="7780037651-33">}</span><span·class="p"·data-group-id="7780037651-32">}</span><span·class="p"·data-group-id="7780037651-20">]</span><span·class="p"·data-group-id="7780037651-19">}</span><span·class="gp·unselectable">
1021 &gt;·</span><span·class="p"·data-group-id="8521232826-43">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8521232826-44">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><spa[·...·truncated·by·diffoscope;·len:·836,·SHA:·e88d8f7ab6a2b49ac49b988163e1cc16e3cb0cf190bebcbbbb248a854127e500·...·]-45">)</span><span·class="p">.</span><span·class="w">1021 &gt;·</span><span·class="p"·data-group-id="7780037651-43">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7780037651-44">{</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Bin</span><spa[·...·truncated·by·diffoscope;·len:·836,·SHA:·9b4e8ad2507e5bdd714f6e8a358b48d35420506ae9309c1685ab4d9af1934605·...·]-45">)</span><span·class="p">.</span><span·class="w">
1022 </span><span·class="p"·data-group-id="8521232826-48">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8521232826-49">{</span><span·class="s">&quot;dummy.zip&quot;</span><span·class="p">,</span><span·class="w">1022 </span><span·class="p"·data-group-id="7780037651-48">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7780037651-49">{</span><span·class="s">&quot;dummy.zip&quot;</span><span·class="p">,</span><span·class="w">
1023 ·····</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">74</span><span·class="p">,</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">171</span><span·class="p">,</span><span·class="mi">39</span><span·class="p">,</span><span·class="mi">212</span><span·class="p">,</span><span·class="mi">26</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">1023 ·····</span><span·class="p">&lt;&lt;</span><span·class="mi">80</span><span·class="p">,</span><span·class="mi">75</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">4</span><span·class="p">,</span><span·class="mi">20</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">74</span><span·class="p">,</span><span·class="mi">152</span><span·class="p">,</span><span·class="mi">97</span><span·class="p">,</span><span·class="mi">60</span><span·class="p">,</span><span·class="mi">171</span><span·class="p">,</span><span·class="mi">39</span><span·class="p">,</span><span·class="mi">212</span><span·class="p">,</span><span·class="mi">26</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
1024 ·······</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="8521232826-49">}</span><span·class="p"·data-group-id="8521232826-48">}</span><span·class="gp·unselectable">1024 ·······</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="7780037651-49">}</span><span·class="p"·data-group-id="7780037651-48">}</span><span·class="gp·unselectable">
1025 &gt;·</span><span·class="k">catch</span><span·class="w">·</span><span·class="nc">zip</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="8521232826-50">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="8521232826-51">(</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·1433,·SHA:·72e5bc5b4470076d619cd2e5a68a987baef88666e274edc699593404f75b2d68·...·]-50">)</span><span·class="p">.</span><span·class="w">1025 &gt;·</span><span·class="k">catch</span><span·class="w">·</span><span·class="nc">zip</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="7780037651-50">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="7780037651-51">(</span><span·class="s">&quot;foo&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·1433,·SHA:·e16a04e902e970f7e1cca93256bc0b9be2ff177f2190a29444f030920423a3d9·...·]-50">)</span><span·class="p">.</span><span·class="w">
1026 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;FOO&quot;</span><span·class="p">&gt;&gt;</span></code></pre>1026 </span><span·class="p">&lt;&lt;</span><span·class="s">&quot;FOO&quot;</span><span·class="p">&gt;&gt;</span></code></pre>
1027 ··</section>1027 ··</section>
1028 </section>1028 </section>
1029 <section·class="detail"·id="list_dir/1">1029 <section·class="detail"·id="list_dir/1">
  
1030 ··<div·class="detail-header">1030 ··<div·class="detail-header">
1031 ····<a·href="#list_dir/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1031 ····<a·href="#list_dir/1"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
6.24 KB
./usr/share/doc/erlang-doc/html/lib/tftp-1.2/doc/html/getting_started.html
    
Offset 143, 17 lines modifiedOffset 143, 17 lines modified
143 user·is·registered·using·option·<code·class="inline">callback</code>,·see·<a·href="tftp.html#options">DATA·TYPES</a>.</p><h2·id="using-the-tftp-client-and-server"·class="section-heading">143 user·is·registered·using·option·<code·class="inline">callback</code>,·see·<a·href="tftp.html#options">DATA·TYPES</a>.</p><h2·id="using-the-tftp-client-and-server"·class="section-heading">
144 ··<a·href="#using-the-tftp-client-and-server"·class="hover-link">144 ··<a·href="#using-the-tftp-client-and-server"·class="hover-link">
145 ····<i·class="ri-link-m"·aria-hidden="true"></i>145 ····<i·class="ri-link-m"·aria-hidden="true"></i>
146 ··</a>146 ··</a>
147 ··<span·class="text">Using·the·TFTP·client·and·server</span>147 ··<span·class="text">Using·the·TFTP·client·and·server</span>
148 </h2>148 </h2>
149 <p>This·is·a·simple·example·of·starting·the·TFTP·server·and·reading·the·content·of149 <p>This·is·a·simple·example·of·starting·the·TFTP·server·and·reading·the·content·of
150 a·sample·file·using·the·TFTP·client.</p><p><em>Step·1.</em>·Create·a·sample·file·to·be·used·for·the·transfer:</p><pre><code·class="text">······$·echo·&quot;Erlang/OTP·21&quot;·&gt;·file.txt</code></pre><p><em>Step·2.</em>·Start·the·TFTP·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5659115810-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="5659115810-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·483,·SHA:·b8b5ec64fe8a3966d2a76a09206a78cd6e51cab73e82d4fac00f057a140afbed·...·]-2">)</span><span·class="p">.</span><span·class="w">150 a·sample·file·using·the·TFTP·client.</p><p><em>Step·1.</em>·Create·a·sample·file·to·be·used·for·the·transfer:</p><pre><code·class="text">······$·echo·&quot;Erlang/OTP·21&quot;·&gt;·file.txt</code></pre><p><em>Step·2.</em>·Start·the·TFTP·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">······</span><span·class="mi">1</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="4018029854-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pid</span><span·class="p"·data-group-id="4018029854-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·483,·SHA:·d2fbaf5cbb71393b13c7068353d9fa54f8d42accd1f171b38da046a92f533d4f·...·]-2">)</span><span·class="p">.</span><span·class="w">
151 ······</span><span·class="p"·data-group-id="5659115810-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.65</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5659115810-5">}</span>[·...·truncated·by·diffoscope;·len:·896,·SHA:·4e308a525dafe0d9cf2e6353ae781244643354820b9f0c8d85fc5e8ab373a259·...·]-1">)</span><span·class="p">.</span><span·class="w">151 ······</span><span·class="p"·data-group-id="4018029854-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.65</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="4018029854-5">}</span>[·...·truncated·by·diffoscope;·len:·896,·SHA:·27f47d9f965ff1c3d833aa33d4e762c9937be6d2283a0e8f6dbf4df030cd85fc·...·]-1">)</span><span·class="p">.</span><span·class="w">
152 ······</span><span·class="p"·data-group-id="6261521763-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Erlang/OTP·21\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="6261521763-4">}</span></code></pre>152 ······</span><span·class="p"·data-group-id="4158298688-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p">&lt;&lt;</span><span·class="s">&quot;Erlang/OTP·21\n&quot;</span><span·class="p">&gt;&gt;</span><span·class="p"·data-group-id="4158298688-4">}</span></code></pre>
153 </div>153 </div>
  
154 <div·class="bottom-actions"·id="bottom-actions">154 <div·class="bottom-actions"·id="bottom-actions">
155 ··<div·class="bottom-actions-item">155 ··<div·class="bottom-actions-item">
  
156 ······<a·href="introduction.html"·class="bottom-actions-button"·rel="prev">156 ······<a·href="introduction.html"·class="bottom-actions-button"·rel="prev">
157 ········<span·class="subheader">157 ········<span·class="subheader">
27.6 KB
./usr/share/doc/erlang-doc/html/lib/tftp-1.2/doc/html/tftp.epub
2.27 KB
zipinfo {}
    
Offset 1, 16 lines modifiedOffset 1, 16 lines modified
1 Zip·file·size:·28163·bytes,·number·of·entries:·141 Zip·file·size:·28163·bytes,·number·of·entries:·14
2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:21·mimetype2 ?rw-r--r--··2.0·unx·······20·b-·stor·24-Oct-11·20:59·mimetype
3 ?rw-r--r--··2.0·unx······708·b-·defN·24-Oct-11·20:21·OEBPS/title.xhtml3 ?rw-r--r--··2.0·unx······708·b-·defN·24-Oct-11·20:59·OEBPS/title.xhtml
4 ?rw-r--r--··2.0·unx·····6346·b-·defN·24-Oct-11·20:21·OEBPS/tftp_logger.xhtml4 ?rw-r--r--··2.0·unx·····6346·b-·defN·24-Oct-11·20:59·OEBPS/tftp_logger.xhtml
5 ?rw-r--r--··2.0·unx····37424·b-·defN·24-Oct-11·20:21·OEBPS/tftp.xhtml5 ?rw-r--r--··2.0·unx····37424·b-·defN·24-Oct-11·20:59·OEBPS/tftp.xhtml
6 ?rw-r--r--··2.0·unx·····7375·b-·defN·24-Oct-11·20:21·OEBPS/notes.xhtml6 ?rw-r--r--··2.0·unx·····7375·b-·defN·24-Oct-11·20:59·OEBPS/notes.xhtml
7 ?rw-r--r--··2.0·unx·····1193·b-·defN·24-Oct-11·20:21·OEBPS/nav.xhtml7 ?rw-r--r--··2.0·unx·····1193·b-·defN·24-Oct-11·20:59·OEBPS/nav.xhtml
8 ?rw-r--r--··2.0·unx·····2087·b-·defN·24-Oct-11·20:21·OEBPS/introduction.xhtml8 ?rw-r--r--··2.0·unx·····2087·b-·defN·24-Oct-11·20:59·OEBPS/introduction.xhtml
9 ?rw-r--r--··2.0·unx·····5007·b-·defN·24-Oct-11·20:21·OEBPS/getting_started.xhtml9 ?rw-r--r--··2.0·unx·····5007·b-·defN·24-Oct-11·20:59·OEBPS/getting_started.xhtml
10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-erlang-2EWSTWER.css10 ?rw-r--r--··2.0·unx····14646·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-erlang-2EWSTWER.css
11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:21·OEBPS/dist/epub-CB7BJMUW.js11 ?rw-r--r--··2.0·unx·····2251·b-·defN·24-Oct-11·20:59·OEBPS/dist/epub-CB7BJMUW.js
12 ?rw-r--r--··2.0·unx·····1785·b-·defN·24-Oct-11·20:21·OEBPS/content.opf12 ?rw-r--r--··2.0·unx·····1785·b-·defN·24-Oct-11·20:59·OEBPS/content.opf
13 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:21·OEBPS/assets/logo.png13 ?rw-r--r--··2.0·unx·····5837·b-·defN·24-Oct-11·20:59·OEBPS/assets/logo.png
14 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:21·META-INF/container.xml14 ?rw-r--r--··2.0·unx······252·b-·defN·24-Oct-11·20:59·META-INF/container.xml
15 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:21·META-INF/com.apple.ibooks.display-options.xml15 ?rw-r--r--··2.0·unx······162·b-·defN·24-Oct-11·20:59·META-INF/com.apple.ibooks.display-options.xml
16 14·files,·85093·bytes·uncompressed,·26449·bytes·compressed:··68.9%16 14·files,·85093·bytes·uncompressed,·26449·bytes·compressed:··68.9%
18.0 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
5.96 KB
OEBPS/getting_started.xhtml
Max HTML report size reached
1.22 KB
OEBPS/content.opf
1.19 KB
OEBPS/content.opf
Max HTML report size reached
7.41 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/cover.html
    
Offset 1557, 15 lines modifiedOffset 1557, 15 lines modified
1557 ······</div>1557 ······</div>
  
1558 <p>Analyzes·one·or·more·modules·as·specified·by·<code·class="inline">Arg</code>.</p><p>If·<code·class="inline">Arg</code>·is·one·of·the·values·in·<a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>,·this1558 <p>Analyzes·one·or·more·modules·as·specified·by·<code·class="inline">Arg</code>.</p><p>If·<code·class="inline">Arg</code>·is·one·of·the·values·in·<a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>,·this
1559 call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse('_',·Arg,·function)</code></a>.</p><p>If·<code·class="inline">Arg</code>·is·one·of·the·values·in·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·this1559 call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse('_',·Arg,·function)</code></a>.</p><p>If·<code·class="inline">Arg</code>·is·one·of·the·values·in·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·this
1560 call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse('_',·coverage,·Arg)</code></a>.</p><p>Otherwise·<code·class="inline">Arg</code>·is·assumed·to·be·a·module·name,·and·this·call·is·equivalent1560 call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse('_',·coverage,·Arg)</code></a>.</p><p>Otherwise·<code·class="inline">Arg</code>·is·assumed·to·be·a·module·name,·and·this·call·is·equivalent
1561 to·<a·href="#analyse/3"><code·class="inline">analyse(Arg,·coverage,·function)</code></a>.</p><blockquote><h4·class="info">Note</h4><p>To·analyze·a·module·whose·name·overlaps·with·one·the·values·in1561 to·<a·href="#analyse/3"><code·class="inline">analyse(Arg,·coverage,·function)</code></a>.</p><blockquote><h4·class="info">Note</h4><p>To·analyze·a·module·whose·name·overlaps·with·one·the·values·in
1562 <a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>·or·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·the·module1562 <a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>·or·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·the·module
1563 name·has·to·be·in·a·list.·For·example,·to·analyze·a·module·named·<code·class="inline">calls</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="0590948499-1">(</span><span·class="p"·data-group-id="0590948499-2">[</span><span·class="ss">calls</span><span·class="p"·data-group-id="0590948499-2">]</span><span·class="p"·data-group-id="0590948499-1">)</span><span·class="p">.</span></code></pre></blockquote>1563 name·has·to·be·in·a·list.·For·example,·to·analyze·a·module·named·<code·class="inline">calls</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="9488914988-1">(</span><span·class="p"·data-group-id="9488914988-2">[</span><span·class="ss">calls</span><span·class="p"·data-group-id="9488914988-2">]</span><span·class="p"·data-group-id="9488914988-1">)</span><span·class="p">.</span></code></pre></blockquote>
1564 ··</section>1564 ··</section>
1565 </section>1565 </section>
1566 <section·class="detail"·id="analyse/2">1566 <section·class="detail"·id="analyse/2">
  
1567 ··<div·class="detail-header">1567 ··<div·class="detail-header">
1568 ····<a·href="#analyse/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1568 ····<a·href="#analyse/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1569 ······<i·class="ri-link-m"·aria-hidden="true"></i>1569 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1599, 15 lines modifiedOffset 1599, 15 lines modified
1599 <p>Analyzes·one·or·more·modules·as·specified·by·<code·class="inline">Arg1</code>·and·<code·class="inline">Arg2</code>.</p><p>If·<code·class="inline">Arg1</code>·is·one·of·the·values·in·<a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>·and1599 <p>Analyzes·one·or·more·modules·as·specified·by·<code·class="inline">Arg1</code>·and·<code·class="inline">Arg2</code>.</p><p>If·<code·class="inline">Arg1</code>·is·one·of·the·values·in·<a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>·and
1600 <code·class="inline">Arg2</code>·is·one·of·the·values·in·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·this1600 <code·class="inline">Arg2</code>·is·one·of·the·values·in·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·this
1601 call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse('_',·Arg1,·Arg2)</code></a>.</p><p>If·<code·class="inline">Arg2</code>·is·one·of·the·values·in·<a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>,1601 call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse('_',·Arg1,·Arg2)</code></a>.</p><p>If·<code·class="inline">Arg2</code>·is·one·of·the·values·in·<a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>,
1602 <code·class="inline">Arg1</code>·is·assumed·to·be·a·module·and·this·call·is·equivalent·to1602 <code·class="inline">Arg1</code>·is·assumed·to·be·a·module·and·this·call·is·equivalent·to
1603 <a·href="#analyse/3"><code·class="inline">analyse(Arg1,·Arg2,·function)</code></a>.</p><p>If·<code·class="inline">Arg2</code>·is·one·of·the·values·in·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·<code·class="inline">Arg1</code>·is1603 <a·href="#analyse/3"><code·class="inline">analyse(Arg1,·Arg2,·function)</code></a>.</p><p>If·<code·class="inline">Arg2</code>·is·one·of·the·values·in·<a·href="#t:level/0"><code·class="inline">level()</code></a>,·<code·class="inline">Arg1</code>·is
1604 assumed·to·be·a·module·and·this·call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse(Arg1,·coverage,·Arg2)</code></a>.</p><blockquote><h4·class="info">Note</h4><p>To·analyze·a·module·whose·name·overlaps·with·one·of·the·values·in1604 assumed·to·be·a·module·and·this·call·is·equivalent·to·<a·href="#analyse/3"><code·class="inline">analyse(Arg1,·coverage,·Arg2)</code></a>.</p><blockquote><h4·class="info">Note</h4><p>To·analyze·a·module·whose·name·overlaps·with·one·of·the·values·in
1605 <a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>,·the·module·name·needs·to·be·in·a1605 <a·href="#t:analysis/0"><code·class="inline">analysis()</code></a>,·the·module·name·needs·to·be·in·a
1606 list.·For·example,·to·analyze·a·module·named·<code·class="inline">calls</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="4844281139-1">(</span><span·class="p"·data-group-id="4844281139-2">[</span><span·class="ss">calls</span><span·class="p"·data-group-id="4844281139-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">function</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·3b05ec9f71caae3bcb8e50048ee4cd32ecc79a7470e0629a6f43e9dc17b4de16·...·]-1">)</span><span·class="p">.</span></code></pre></blockquote>1606 list.·For·example,·to·analyze·a·module·named·<code·class="inline">calls</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="6542691390-1">(</span><span·class="p"·data-group-id="6542691390-2">[</span><span·class="ss">calls</span><span·class="p"·data-group-id="6542691390-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">function</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·22,·SHA:·48591e97feb72e80801dea6dfc3f71d7a693c008248a5eefe72a0c8bf77ffce9·...·]-1">)</span><span·class="p">.</span></code></pre></blockquote>
1607 ··</section>1607 ··</section>
1608 </section>1608 </section>
1609 <section·class="detail"·id="analyse/3">1609 <section·class="detail"·id="analyse/3">
  
1610 ··<div·class="detail-header">1610 ··<div·class="detail-header">
1611 ····<a·href="#analyse/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1611 ····<a·href="#analyse/3"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1612 ······<i·class="ri-link-m"·aria-hidden="true"></i>1612 ······<i·class="ri-link-m"·aria-hidden="true"></i>
Offset 1708, 15 lines modifiedOffset 1708, 15 lines modified
  
1708 ······</div>1708 ······</div>
  
1709 <p>If·<code·class="inline">Arg</code>·is·a·list·of·<a·href="#t:analyse_option/0"><code·class="inline">analyse_option()</code></a>1709 <p>If·<code·class="inline">Arg</code>·is·a·list·of·<a·href="#t:analyse_option/0"><code·class="inline">analyse_option()</code></a>
1710 options,·this·call·is·equivalent·to·<a·href="#analyse_to_file/2"><code·class="inline">analyse_to_file('_',·Arg)</code></a>.</p><p>Otherwise·<code·class="inline">Arg</code>·is·assumed·to·be·a·module,·and·this·call·is·equivalent·to1710 options,·this·call·is·equivalent·to·<a·href="#analyse_to_file/2"><code·class="inline">analyse_to_file('_',·Arg)</code></a>.</p><p>Otherwise·<code·class="inline">Arg</code>·is·assumed·to·be·a·module,·and·this·call·is·equivalent·to
1711 <a·href="#analyse_to_file/2"><code·class="inline">analyse_to_file(Arg,·[])</code></a>.</p><blockquote><h4·class="info">Note</h4><p>To·analyze·a·module·of·the·name·<code·class="inline">html</code>·(which·overlaps·with·an·option1711 <a·href="#analyse_to_file/2"><code·class="inline">analyse_to_file(Arg,·[])</code></a>.</p><blockquote><h4·class="info">Note</h4><p>To·analyze·a·module·of·the·name·<code·class="inline">html</code>·(which·overlaps·with·an·option
1712 in·<a·href="#t:analyse_option/0"><code·class="inline">analyse_option()</code></a>),·it·is·necessary·to1712 in·<a·href="#t:analyse_option/0"><code·class="inline">analyse_option()</code></a>),·it·is·necessary·to
1713 use·<a·href="#analyse_to_file/2"><code·class="inline">cover:analyse_to_file/2</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse_to_file</span><span·class="p"·data-group-id="1438473606-1">(</span><span·class="p"·data-group-id="1438473606-2">[</span><span·class="ss">html</span><span·class="p"·data-group-id="1438473606-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1438473606-3">[</span[·...·truncated·by·diffoscope;·len:·95,·SHA:·5f86dbb7583928d59dd117c261727c36247ad9cddc0df2368c4063057214e37a·...·]-1">)</span><span·class="p">.</span></code></pre></blockquote>1713 use·<a·href="#analyse_to_file/2"><code·class="inline">cover:analyse_to_file/2</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse_to_file</span><span·class="p"·data-group-id="8483241142-1">(</span><span·class="p"·data-group-id="8483241142-2">[</span><span·class="ss">html</span><span·class="p"·data-group-id="8483241142-2">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8483241142-3">[</span[·...·truncated·by·diffoscope;·len:·95,·SHA:·f4173d00b93c14fcdc580f734a60bb8dd0e02de6be262cf0386cf3b76b996794·...·]-1">)</span><span·class="p">.</span></code></pre></blockquote>
1714 ··</section>1714 ··</section>
1715 </section>1715 </section>
1716 <section·class="detail"·id="analyse_to_file/2">1716 <section·class="detail"·id="analyse_to_file/2">
  
1717 ··<div·class="detail-header">1717 ··<div·class="detail-header">
1718 ····<a·href="#analyse_to_file/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">1718 ····<a·href="#analyse_to_file/2"·class="detail-link"·data-no-tooltip·title="Link·to·this·function">
1719 ······<i·class="ri-link-m"·aria-hidden="true"></i>1719 ······<i·class="ri-link-m"·aria-hidden="true"></i>
173 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/cover_chapter.html
    
Offset 142, 89 lines modifiedOffset 142, 89 lines modified
142 </h2>142 </h2>
143 <h3·id="example"·class="section-heading">143 <h3·id="example"·class="section-heading">
144 ··<a·href="#example"·class="hover-link">144 ··<a·href="#example"·class="hover-link">
145 ····<i·class="ri-link-m"·aria-hidden="true"></i>145 ····<i·class="ri-link-m"·aria-hidden="true"></i>
146 ··</a>146 ··</a>
147 ··<span·class="text">Example</span>147 ··<span·class="text">Example</span>
148 </h3>148 </h3>
149 <p>Assume·that·a·test·case·for·the·following·program·should·be·verified:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8125483400-1">(</span><span·class="ss">channel</span><span·class="p"·data-group-id="8125483400-1">)</span><span·class="p">.</span><span·class="w">149 <p>Assume·that·a·test·case·for·the·following·program·should·be·verified:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0309424855-1">(</span><span·class="ss">channel</span><span·class="p"·data-group-id="0309424855-1">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="8125483400-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="8125483400-2">)</span><span·class="p">.</span><span·class="w">150 </span><span·class="p">-</span><span·class="na">behaviour</span><span·class="p"·data-group-id="0309424855-2">(</span><span·class="ss">gen_server</span><span·class="p"·data-group-id="0309424855-2">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="w">151 </span><span·class="w">
152 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8125483400-3">(</span><span·class="p"·data-group-id="8125483400-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">stop</span><span·class="p">/</span><span·class="mi">0</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·cb572ee8bead8a0ca119abff58183242ac68645b13e402c04a9f8d7e3f1f482e·...·]-3">)</span><span·class="p">.</span><span·class="w">152 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0309424855-3">(</span><span·class="p"·data-group-id="0309424855-4">[</span><span·class="ss">start_link</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">stop</span><span·class="p">/</span><span·class="mi">0</sp[·...·truncated·by·diffoscope;·len:·97,·SHA:·86bd5007f7b9332a3982fbfb03bb055b99c37a67f85423c44dfb76e7b1af72ce·...·]-3">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8125483400-5">(</span><span·class="p"·data-group-id="8125483400-6">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">/</span><span·class="mi">1</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·6f8e48f840d19b5c177ab16894a1932c7e03de18bb1c1ad4e13bf331d4d061b4·...·]-5">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·client·interface</span><span·class="w">153 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0309424855-5">(</span><span·class="p"·data-group-id="0309424855-6">[</span><span·class="ss">alloc</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">/</span><span·class="mi">1</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·a2f152ab4776f4d1c02ca9c3e708a5189479b93e6afeb08ee8b34864da164ed5·...·]-5">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·client·interface</span><span·class="w">
154 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8125483400-7">(</span><span·class="p"·data-group-id="8125483400-8">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">/</span><span·class="mi">3</s[·...·truncated·by·diffoscope;·len:·204,·SHA:·ac152c63b44b8ce05e7b9810a209033d32c00428ab127003451e3639087c9391·...·]-7">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·callback·functions</span><span·class="w">154 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0309424855-7">(</span><span·class="p"·data-group-id="0309424855-8">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">/</span><span·class="mi">3</s[·...·truncated·by·diffoscope;·len:·204,·SHA:·73f71cdd2bd9cb0ca69a7366c4c9a4265194ddd725c6b1c20f2276a713968cd4·...·]-7">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·callback·functions</span><span·class="w">
  
155 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="8125483400-9">(</span><span·class="p"·data-group-id="8125483400-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">155 </span><span·class="nf">start_link</span><span·class="p"·data-group-id="0309424855-9">(</span><span·class="p"·data-group-id="0309424855-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
156 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="8125483400-10">(</span><span·class="p"·data-group-id="8125483400-11">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">channel</span><span·class="p"·data-group-id="8125483400-11">}</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·391,·SHA:·0d97bc679ca6f22a7053790b61517ac9131fa70cc09bc28659650669b5394290·...·]-10">)</span><span·class="p">.</span><span·class="w">156 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="0309424855-10">(</span><span·class="p"·data-group-id="0309424855-11">{</span><span·class="ss">local</span><span·class="p">,</span><span·class="ss">channel</span><span·class="p"·data-group-id="0309424855-11">}</span><span·class="p">,</span><span·class="w">·[·...·truncated·by·diffoscope;·len:·391,·SHA:·7f8a955e9b003dad1cd607cea3d795f6ceb09f9160426fa50bed4e3cf840b9a7·...·]-10">)</span><span·class="p">.</span><span·class="w">
  
157 </span><span·class="nf">stop</span><span·class="p"·data-group-id="8125483400-14">(</span><span·class="p"·data-group-id="8125483400-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 </span><span·class="nf">stop</span><span·class="p"·data-group-id="0309424855-14">(</span><span·class="p"·data-group-id="0309424855-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8125483400-15">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="8125483400-15">)</span><span·class="p">.</span><span·class="w">158 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="0309424855-15">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">stop</span><span·class="p"·data-group-id="0309424855-15">)</span><span·class="p">.</span><span·class="w">
  
159 </span><span·class="c1">%%%-Client·interface·functions-------------------------------------------</span><span·class="w">159 </span><span·class="c1">%%%-Client·interface·functions-------------------------------------------</span><span·class="w">
  
160 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="8125483400-16">(</span><span·class="p"·data-group-id="8125483400-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">160 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="0309424855-16">(</span><span·class="p"·data-group-id="0309424855-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
161 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8125483400-17">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="8125483400-17">)</span><span·class="p">.</span><span·class="w">161 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="0309424855-17">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">alloc</span><span·class="p"·data-group-id="0309424855-17">)</span><span·class="p">.</span><span·class="w">
  
162 </span><span·class="nf">free</span><span·class="p"·data-group-id="8125483400-18">(</span><span·class="n">Channel</span><span·class="p"·data-group-id="8125483400-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">162 </span><span·class="nf">free</span><span·class="p"·data-group-id="0309424855-18">(</span><span·class="n">Channel</span><span·class="p"·data-group-id="0309424855-18">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
163 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="8125483400-19">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8125483400-20">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="n">Channel</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·77,·SHA:·2a6ef2d946b2f48e7b081044219b893c2ccbcd4ab9625a63c135acb5fa729e38·...·]-19">)</span><span·class="p">.</span><span·class="w">163 ····</span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="0309424855-19">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0309424855-20">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="n">Channel</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·77,·SHA:·ccf6529720bf76d9f647d819bf9babf3fd027de1e7532f6649486054ac67eabc·...·]-19">)</span><span·class="p">.</span><span·class="w">
  
164 </span><span·class="c1">%%%-gen_server·callback·functions----------------------------------------</span><span·class="w">164 </span><span·class="c1">%%%-gen_server·callback·functions----------------------------------------</span><span·class="w">
  
165 </span><span·class="nf">init</span><span·class="p"·data-group-id="8125483400-21">(</span><span·class="p">_</span><span·class="n">Arg</span><span·class="p"·data-group-id="8125483400-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">165 </span><span·class="nf">init</span><span·class="p"·data-group-id="0309424855-21">(</span><span·class="p">_</span><span·class="n">Arg</span><span·class="p"·data-group-id="0309424855-21">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
166 ····</span><span·class="p"·data-group-id="8125483400-22">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="nf">channels</span><span·class="p"·data-group-id="8125483400-23">(</span><span·class="p"·data-group-id="8125483400-23">)</span><span·class="p"·data-group-id="8125483400-22">}</span><span·class="p">.</span><span·class="w">166 ····</span><span·class="p"·data-group-id="0309424855-22">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="nf">channels</span><span·class="p"·data-group-id="0309424855-23">(</span><span·class="p"·data-group-id="0309424855-23">)</span><span·class="p"·data-group-id="0309424855-22">}</span><span·class="p">.</span><span·class="w">
  
167 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="8125483400-24">(</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Client</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·980b0d1fb4d3b5abd7017c05c39f36aff98e60e6c3f2a4ca6e7f2ff15e1ccfc9·...·]-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="0309424855-24">(</span><span·class="ss">stop</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Client</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·e5861323e33294fd460b7114bd8c0a16bbd53cc52de8093a259cd75b2850dc8e·...·]-24">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ····</span><span·class="p"·data-group-id="8125483400-25">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="ss">normal</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-25">}</span><span·class="p">;</span><span·class="w">168 ····</span><span·class="p"·data-group-id="0309424855-25">{</span><span·class="ss">stop</span><span·class="p">,</span><span·class="ss">normal</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-25">}</span><span·class="p">;</span><span·class="w">
  
169 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="8125483400-26">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Client</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·f28056b6a6feeac48bfd20ec0e523a60efb6f4233b8e3f6c053c9f4b0672f75e·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">169 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="0309424855-26">(</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Client</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·17,·SHA:·134f012a74499c9f1bff621fa43a0605e5e08764bc046a6254d908bb746c33d1·...·]-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
170 ····</span><span·class="p"·data-group-id="8125483400-27">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="n">Channels2</span><span·class="p"·data-group-id="8125483400-27">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">alloc</sp[·...·truncated·by·diffoscope;·len:·129,·SHA:·ffb0bfdc03f1b5bef580e154d0ee4aa3dc7325ccd28dd8b7189270dbc40f67c1·...·]-28">)</span><span·class="p">,</span><span·class="w">170 ····</span><span·class="p"·data-group-id="0309424855-27">{</span><span·class="n">Ch</span><span·class="p">,</span><span·class="n">Channels2</span><span·class="p"·data-group-id="0309424855-27">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">alloc</sp[·...·truncated·by·diffoscope;·len:·129,·SHA:·c04a4ff0c887263ee4bf481a0ad1861f9bd2436df0ead6ed8668ec319230e7c4·...·]-28">)</span><span·class="p">,</span><span·class="w">
171 ····</span><span·class="p"·data-group-id="8125483400-29">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="p"·data-group-id="8125483400-30">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Ch</span><span·class="p"·data-group-id="8125483400-30">}</sp[·...·truncated·by·diffoscope;·len:·100,·SHA:·8a746cc122fa4dbcb1375801e6a1bfe831b1564862ebe2e24cc30c5300877d8d·...·]-29">}</span><span·class="p">;</span><span·class="w">171 ····</span><span·class="p"·data-group-id="0309424855-29">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="p"·data-group-id="0309424855-30">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Ch</span><span·class="p"·data-group-id="0309424855-30">}</sp[·...·truncated·by·diffoscope;·len:·100,·SHA:·e7c4679720e2dd42aee40e43849cdb0f1406e798081ce7a2aef78f8cd29a44a1·...·]-29">}</span><span·class="p">;</span><span·class="w">
  
172 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="8125483400-31">(</span><span·class="p"·data-group-id="8125483400-32">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="n">Channel</span><span·class="p"·data-group-id="8125483400-32">}</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·178,·SHA:·763c45c85c9af693081af2ca02f026ff2e2783f39c224d607b72ea9fff5a5ac3·...·]-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">172 </span><span·class="nf">handle_call</span><span·class="p"·data-group-id="0309424855-31">(</span><span·class="p"·data-group-id="0309424855-32">{</span><span·class="ss">free</span><span·class="p">,</span><span·class="n">Channel</span><span·class="p"·data-group-id="0309424855-32">}</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·178,·SHA:·cedf1ab22e5c185e3e630419c917be825804673190d742d55dab38deb626c5eb·...·]-31">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
173 ····</span><span·class="n">Channels2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="8125483400-33">(</span><span·class="n">Channel</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-33">)</span><span·class="p">,</span><span·class="w">173 ····</span><span·class="n">Channels2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">free</span><span·class="p"·data-group-id="0309424855-33">(</span><span·class="n">Channel</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-33">)</span><span·class="p">,</span><span·class="w">
174 ····</span><span·class="p"·data-group-id="8125483400-34">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Channels2</span><span·class="p"·data-group-id="8125483400-34">}</span><span·class="p">.</span><span·class="w">174 ····</span><span·class="p"·data-group-id="0309424855-34">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Channels2</span><span·class="p"·data-group-id="0309424855-34">}</span><span·class="p">.</span><span·class="w">
  
175 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="8125483400-35">(</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-35">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 </span><span·class="nf">terminate</span><span·class="p"·data-group-id="0309424855-35">(</span><span·class="p">_</span><span·class="n">Reason</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-35">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">176 ····</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
  
177 </span><span·class="c1">%%%-Internal·functions---------------------------------------------------</span><span·class="w">177 </span><span·class="c1">%%%-Internal·functions---------------------------------------------------</span><span·class="w">
  
178 </span><span·class="nf">channels</span><span·class="p"·data-group-id="8125483400-36">(</span><span·class="p"·data-group-id="8125483400-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 </span><span·class="nf">channels</span><span·class="p"·data-group-id="0309424855-36">(</span><span·class="p"·data-group-id="0309424855-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ····</span><span·class="p"·data-group-id="8125483400-37">[</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="ss">ch2</span><span·class="p">,</span><span·class="ss">ch3</span><span·class="p"·data-group-id="8125483400-37">]</span><span·class="p">.</span><span·class="w">179 ····</span><span·class="p"·data-group-id="0309424855-37">[</span><span·class="ss">ch1</span><span·class="p">,</span><span·class="ss">ch2</span><span·class="p">,</span><span·class="ss">ch3</span><span·class="p"·data-group-id="0309424855-37">]</span><span·class="p">.</span><span·class="w">
  
180 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="8125483400-38">(</span><span·class="p"·data-group-id="8125483400-39">[</span><span·class="n">Channel</span><span·class="p">|</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-39">]</span><span·class="p"·data-group-id="812548340[·...·truncated·by·diffoscope;·len:·1,·SHA:·5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="0309424855-38">(</span><span·class="p"·data-group-id="0309424855-39">[</span><span·class="n">Channel</span><span·class="p">|</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-39">]</span><span·class="p"·data-group-id="030942485[·...·truncated·by·diffoscope;·len:·1,·SHA:·ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ····</span><span·class="p"·data-group-id="8125483400-40">{</span><span·class="n">Channel</span><span·class="p">,</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-40">}</span><span·class="p">;</span><span·class="w">181 ····</span><span·class="p"·data-group-id="0309424855-40">{</span><span·class="n">Channel</span><span·class="p">,</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-40">}</span><span·class="p">;</span><span·class="w">
182 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="8125483400-41">(</span><span·class="p"·data-group-id="8125483400-42">[</span><span·class="p"·data-group-id="8125483400-42">]</span><span·class="p"·data-group-id="8125483400-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">182 </span><span·class="nf">alloc</span><span·class="p"·data-group-id="0309424855-41">(</span><span·class="p"·data-group-id="0309424855-42">[</span><span·class="p"·data-group-id="0309424855-42">]</span><span·class="p"·data-group-id="0309424855-41">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
183 ····</span><span·class="ss">false</span><span·class="p">.</span><span·class="w">183 ····</span><span·class="ss">false</span><span·class="p">.</span><span·class="w">
  
184 </span><span·class="nf">free</span><span·class="p"·data-group-id="8125483400-43">(</span><span·class="n">Channel</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-43">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">184 </span><span·class="nf">free</span><span·class="p"·data-group-id="0309424855-43">(</span><span·class="n">Channel</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-43">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
185 ····</span><span·class="p"·data-group-id="8125483400-44">[</span><span·class="n">Channel</span><span·class="p">|</span><span·class="n">Channels</span><span·class="p"·data-group-id="8125483400-44">]</span><span·class="p">.</span></code></pre><p>The·test·case·is·implemented·as·follows:</p><pre><code[·...·truncated·by·diffoscope;·len:·214,·SHA:·99fa4caac359f9eb6767a356e7d4fcdbb528cc66c2bc24ec96dd0233f4405790·...·]-1">)</span><span·class="p">.</span><span·class="w">185 ····</span><span·class="p"·data-group-id="0309424855-44">[</span><span·class="n">Channel</span><span·class="p">|</span><span·class="n">Channels</span><span·class="p"·data-group-id="0309424855-44">]</span><span·class="p">.</span></code></pre><p>The·test·case·is·implemented·as·follows:</p><pre><code[·...·truncated·by·diffoscope;·len:·214,·SHA:·0e51ea70eb344ece1c0098c62c2e12a62761ef5777dfea03605b5232bb808a59·...·]-1">)</span><span·class="p">.</span><span·class="w">
186 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7015278532-2">(</span><span·class="p"·data-group-id="7015278532-3">[</span><span·class="ss">s</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7015278532-3">]</span><span·class="p"·data-group-id="7015278532-2">)</span><span·class="p">.</span><span·class="w">186 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4343158546-2">(</span><span·class="p"·data-group-id="4343158546-3">[</span><span·class="ss">s</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="4343158546-3">]</span><span·class="p"·data-group-id="4343158546-2">)</span><span·class="p">.</span><span·class="w">
  
187 </span><span·class="nf">s</span><span·class="p"·data-group-id="7015278532-4">(</span><span·class="p"·data-group-id="7015278532-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">187 </span><span·class="nf">s</span><span·class="p"·data-group-id="4343158546-4">(</span><span·class="p"·data-group-id="4343158546-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
188 ····</span><span·class="p"·data-group-id="7015278532-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Pid</span><span·class="p"·data-group-id="7015278532-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><s[·...·truncated·by·diffoscope;·len:·150,·SHA:·e3b011d56b2c4f8c15938f1060d2277d6b49de740050bb54aaba566e325f4c54·...·]-6">)</span><span·class="p">,</span><span·class="w">188 ····</span><span·class="p"·data-group-id="4343158546-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Pid</span><span·class="p"·data-group-id="4343158546-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><s[·...·truncated·by·diffoscope;·len:·150,·SHA:·cf8adc0b92e7fec0fe4bc40c808bee820438c6f88b00b778ebd98572704a327c·...·]-6">)</span><span·class="p">,</span><span·class="w">
189 ····</span><span·class="p"·data-group-id="7015278532-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Ch1</span><span·class="p"·data-group-id="7015278532-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><s[·...·truncated·by·diffoscope;·len:·145,·SHA:·26fbb79d1a23f2b486eb854374b6289dc103f8335522d3d4085e8881b7419458·...·]-8">)</span><span·class="p">,</span><span·class="w">189 ····</span><span·class="p"·data-group-id="4343158546-7">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">Ch1</span><span·class="p"·data-group-id="4343158546-7">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><s[·...·truncated·by·diffoscope;·len:·145,·SHA:·c3092abcba71774b50ec418843e5f85714528c5e9f4cb3f7e9e424f1b6bbf61a·...·]-8">)</span><span·class="p">,</span><span·class="w">
190 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><span·class="p">:</span><span·class="nf">free</span><span·class="p"·data-group-id="7015278532-9">(</span><span·class="n">Ch1</span><span·class="p"·data-group-id="7015278532-9">)</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><span·class="p">:</span><span·class="nf">free</span><span·class="p"·data-group-id="4343158546-9">(</span><span·class="n">Ch1</span><span·class="p"·data-group-id="4343158546-9">)</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="7015278532-10">(</span><span·class="p"·data-group-id="7015278532-10">)</span><span·class="p">.</span></code></pre><h3·id="preparation"·class="section-heading">191 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">channel</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="4343158546-10">(</span><span·class="p"·data-group-id="4343158546-10">)</span><span·class="p">.</span></code></pre><h3·id="preparation"·class="section-heading">
192 ··<a·href="#preparation"·class="hover-link">192 ··<a·href="#preparation"·class="hover-link">
193 ····<i·class="ri-link-m"·aria-hidden="true"></i>193 ····<i·class="ri-link-m"·aria-hidden="true"></i>
194 ··</a>194 ··</a>
195 ··<span·class="text">Preparation</span>195 ··<span·class="text">Preparation</span>
196 </h3>196 </h3>
197 <p>First·of·all,·Cover·must·be·started.·This·spawns·a·process·which·owns·the·Cover197 <p>First·of·all,·Cover·must·be·started.·This·spawns·a·process·which·owns·the·Cover
198 database·where·all·coverage·data·will·be·stored.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="9099921834-1">(</span><span·class="p"·data-group-id="9099921834-1">)</span><span·class="p">.</span><span·class="w">198 database·where·all·coverage·data·will·be·stored.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="1822373075-1">(</span><span·class="p"·data-group-id="1822373075-1">)</span><span·class="p">.</span><span·class="w">
199 </span><span·class="p"·data-group-id="9099921834-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="9099921834-2">}</span></code></pre><p>To·include·other·nodes·in·the·coverage·analysis,·use199 </span><span·class="p"·data-group-id="1822373075-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.90</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1822373075-2">}</span></code></pre><p>To·include·other·nodes·in·the·coverage·analysis,·use
200 <a·href="cover.html#start/1"><code·class="inline">cover:start/1</code></a>.·All·cover-compiled·modules·will·then·be·loaded·on·all200 <a·href="cover.html#start/1"><code·class="inline">cover:start/1</code></a>.·All·cover-compiled·modules·will·then·be·loaded·on·all
201 nodes,·and·data·from·all·nodes·will·be·summed·up·when·analysing.·For201 nodes,·and·data·from·all·nodes·will·be·summed·up·when·analysing.·For
202 simplicity·this·example·only·involves·the·current·node.</p><p>Before·any·analysis·can·take·place,·the·involved·modules·must·be202 simplicity·this·example·only·involves·the·current·node.</p><p>Before·any·analysis·can·take·place,·the·involved·modules·must·be
203 <em>cover-compiled</em>.·This·means·that·some·extra·information·is·added·to203 <em>cover-compiled</em>.·This·means·that·some·extra·information·is·added·to
204 the·module·before·beging·compiled·into·a·binary·and204 the·module·before·beging·compiled·into·a·binary·and
205 <a·href="cover_chapter.html#loading">loaded</a>.··The·source·file·of·the·module·is205 <a·href="cover_chapter.html#loading">loaded</a>.··The·source·file·of·the·module·is
206 not·affected·and·no·<code·class="inline">.beam</code>·file·is·created.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">compile_module</span><span·class="p"·data-group-id="8737028949-1">(</span><span·class="ss">channel</span><span·class="p"·data-group-id="8737028949-1">)</span><span·class="p">.</span><span·class="w">206 not·affected·and·no·<code·class="inline">.beam</code>·file·is·created.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">compile_module</span><span·class="p"·data-group-id="8091809251-1">(</span><span·class="ss">channel</span><span·class="p"·data-group-id="8091809251-1">)</span><span·class="p">.</span><span·class="w">
207 </span><span·class="p"·data-group-id="8737028949-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">channel</span><span·class="p"·data-group-id="8737028949-2">}</span></code></pre><p>Each·time·a·function·in·the·cover-compiled·module·<code·class="inline">channel</code>·is·called,207 </span><span·class="p"·data-group-id="8091809251-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">channel</span><span·class="p"·data-group-id="8091809251-2">}</span></code></pre><p>Each·time·a·function·in·the·cover-compiled·module·<code·class="inline">channel</code>·is·called,
208 information·about·the·call·will·be·added·to·the·Cover·database.·Run·the·test208 information·about·the·call·will·be·added·to·the·Cover·database.·Run·the·test
209 case:</p><pre><code·class="text">3&gt;·test:s().209 case:</p><pre><code·class="text">3&gt;·test:s().
210 ok</code></pre><p>Cover·analysis·is·performed·by·examining·the·contents·of·the·Cover·database.·The210 ok</code></pre><p>Cover·analysis·is·performed·by·examining·the·contents·of·the·Cover·database.·The
211 output·is·determined·by·two·parameters,·<code·class="inline">Level</code>·and·<code·class="inline">Analysis</code>.·<code·class="inline">Analysis</code>·is211 output·is·determined·by·two·parameters,·<code·class="inline">Level</code>·and·<code·class="inline">Analysis</code>.·<code·class="inline">Analysis</code>·is
212 either·<code·class="inline">coverage</code>·or·<code·class="inline">calls</code>·and·determines·the·type·of·the·analysis.·<code·class="inline">Level</code>·is212 either·<code·class="inline">coverage</code>·or·<code·class="inline">calls</code>·and·determines·the·type·of·the·analysis.·<code·class="inline">Level</code>·is
213 either·<code·class="inline">module</code>,·<code·class="inline">function</code>,·<code·class="inline">clause</code>,·or·<code·class="inline">line</code>·and·determines·the·level·of·the213 either·<code·class="inline">module</code>,·<code·class="inline">function</code>,·<code·class="inline">clause</code>,·or·<code·class="inline">line</code>·and·determines·the·level·of·the
214 analysis.</p><h3·id="coverage-analysis"·class="section-heading">214 analysis.</p><h3·id="coverage-analysis"·class="section-heading">
Offset 234, 200 lines modifiedOffset 234, 200 lines modified
234 ··<span·class="text">Coverage·Analysis</span>234 ··<span·class="text">Coverage·Analysis</span>
235 </h3>235 </h3>
236 <p>Analysis·of·type·<code·class="inline">coverage</code>·is·used·to·find·out·how·much·of·the·code·has·been236 <p>Analysis·of·type·<code·class="inline">coverage</code>·is·used·to·find·out·how·much·of·the·code·has·been
237 executed·and·how·much·has·not·been·executed.·Coverage·is·represented·by·a·tuple237 executed·and·how·much·has·not·been·executed.·Coverage·is·represented·by·a·tuple
238 <code·class="inline">{Cov,NotCov}</code>,·where·<code·class="inline">Cov</code>·is·the·number·of·executable·lines·that·have·been238 <code·class="inline">{Cov,NotCov}</code>,·where·<code·class="inline">Cov</code>·is·the·number·of·executable·lines·that·have·been
239 executed·at·least·once·and·<code·class="inline">NotCov</code>·is·the·number·of·executable·lines·that·have239 executed·at·least·once·and·<code·class="inline">NotCov</code>·is·the·number·of·executable·lines·that·have
240 not·been·executed.</p><p>If·the·analysis·is·made·on·module·level,·the·result·is·given·for·the·entire240 not·been·executed.</p><p>If·the·analysis·is·made·on·module·level,·the·result·is·given·for·the·entire
241 module·as·a·tuple·<code·class="inline">{Module,{Cov,NotCov}}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="7581492332-1">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">module</span><span·class="p"·data-group-id="7581492332-1">)</span><span·class="p">.</span><span·class="w">241 module·as·a·tuple·<code·class="inline">{Module,{Cov,NotCov}}</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="7214837117-1">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">module</span><span·class="p"·data-group-id="7214837117-1">)</span><span·class="p">.</span><span·class="w">
242 </span><span·class="p"·data-group-id="7581492332-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7581492332-3">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="p"·data-group-id="7581492332-4">{</span><span·class="mi">14</spa[·...·truncated·by·diffoscope;·len:·198,·SHA:·e0423e92c1ff2d4b52d4131d9718938413d032741a0daaac874187d00eae5be9·...·]-2">}</span></code></pre><p>For·<code·class="inline">channel</code>,·the·result·shows·that·14·lines·in·the·module·are·covered·but·one242 </span><span·class="p"·data-group-id="7214837117-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7214837117-3">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="p"·data-group-id="7214837117-4">{</span><span·class="mi">14</spa[·...·truncated·by·diffoscope;·len:·198,·SHA:·065f4cb5cd6f5a0d08689c7895cbb562f27e8a508cc6a3628e257957ed58b7d3·...·]-2">}</span></code></pre><p>For·<code·class="inline">channel</code>,·the·result·shows·that·14·lines·in·the·module·are·covered·but·one
243 line·is·not·covered.</p><p>If·the·analysis·is·made·on·function·level,·the·result·is·given·as·a·list·of243 line·is·not·covered.</p><p>If·the·analysis·is·made·on·function·level,·the·result·is·given·as·a·list·of
244 tuples·<code·class="inline">{Function,{Cov,NotCov}}</code>,·one·for·each·function·in·the·module.·A244 tuples·<code·class="inline">{Function,{Cov,NotCov}}</code>,·one·for·each·function·in·the·module.·A
245 function·is·specified·by·its·module·name,·function·name·and·arity:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="8155989405-1">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">function</span><span·class="p"·data-group-id="8155989405-1">)</span><span·class="p">.</span><span·class="w">245 function·is·specified·by·its·module·name,·function·name·and·arity:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">5&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="4304681752-1">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">function</span><span·class="p"·data-group-id="4304681752-1">)</span><span·class="p">.</span><span·class="w">
246 </span><span·class="p"·data-group-id="8155989405-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="8155989405-3">[</span><span·class="p"·data-group-id="8155989405-4">{</span><span·class="p"·data-group-id="8155989405-5">{</span><span·class="ss">channel<[·...·truncated·by·diffoscope;·len:·411,·SHA:·82297e45b25138a1b7d6baeefd4f50bdd79e58ffd4d50849bc03c36a84f93d0d·...·]-4">}</span><span·class="p">,</span><span·class="w">246 </span><span·class="p"·data-group-id="4304681752-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4304681752-3">[</span><span·class="p"·data-group-id="4304681752-4">{</span><span·class="p"·data-group-id="4304681752-5">{</span><span·class="ss">channel<[·...·truncated·by·diffoscope;·len:·411,·SHA:·60fb1143ff19b9628cee0246812fa618b5f8ad5e5d2a4edfbfd9644df338a7d4·...·]-4">}</span><span·class="p">,</span><span·class="w">
247 ·····</span><span·class="p"·data-group-id="8155989405-7">{</span><span·class="p"·data-group-id="8155989405-8">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">stop</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="8155989405-8">}</s[·...·truncated·by·diffoscope;·len:·249,·SHA:·744aa56f63e50cd08652556c584e6b9ea979c4a1dfe1dc07a665cc525ca9031c·...·]-7">}</span><span·class="p">,</span><span·class="w">247 ·····</span><span·class="p"·data-group-id="4304681752-7">{</span><span·class="p"·data-group-id="4304681752-8">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">stop</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4304681752-8">}</s[·...·truncated·by·diffoscope;·len:·249,·SHA:·8afa10538bd6c4d71532e01871f0e852864e9aa41597583c5b0d2405720c7b3c·...·]-7">}</span><span·class="p">,</span><span·class="w">
248 ·····</span><span·class="p"·data-group-id="8155989405-10">{</span><span·class="p"·data-group-id="8155989405-11">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="8155989405-11">[·...·truncated·by·diffoscope;·len:·255,·SHA:·495fe12cb2397360919887b515934c1d22a72fbddb2e8e4805ab6e48d6b625f0·...·]-10">}</span><span·class="p">,</span><span·class="w">248 ·····</span><span·class="p"·data-group-id="4304681752-10">{</span><span·class="p"·data-group-id="4304681752-11">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4304681752-11">[·...·truncated·by·diffoscope;·len:·255,·SHA:·16fa67925b409cf09b6afdb7844ad54dc30a98a4ff07bcb0d7075ff7bc759992·...·]-10">}</span><span·class="p">,</span><span·class="w">
249 ·····</span><span·class="p"·data-group-id="8155989405-13">{</span><span·class="p"·data-group-id="8155989405-14">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8155989405-14">}[·...·truncated·by·diffoscope;·len:·254,·SHA:·39dde5ea293361d71e47d9df7ac6543397f76083e8a7461752f8734b986344b3·...·]-13">}</span><span·class="p">,</span><span·class="w">249 ·····</span><span·class="p"·data-group-id="4304681752-13">{</span><span·class="p"·data-group-id="4304681752-14">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4304681752-14">}[·...·truncated·by·diffoscope;·len:·254,·SHA:·529cae56d9321c5ab29e2d808d67230834d644618705fec33d67130863d4170c·...·]-13">}</span><span·class="p">,</span><span·class="w">
250 ·····</span><span·class="p"·data-group-id="8155989405-16">{</span><span·class="p"·data-group-id="8155989405-17">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">init</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8155989405-17">}[·...·truncated·by·diffoscope;·len:·254,·SHA:·f1a2c834542e7017154881800aa15877799120ad26f06e05d2872f769002dac6·...·]-16">}</span><span·class="p">,</span><span·class="w">250 ·····</span><span·class="p"·data-group-id="4304681752-16">{</span><span·class="p"·data-group-id="4304681752-17">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">init</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4304681752-17">}[·...·truncated·by·diffoscope;·len:·254,·SHA:·b18d11d175612284b111f770e9146dd341c1c4a1a989368f6677ad6186652705·...·]-16">}</span><span·class="p">,</span><span·class="w">
251 ·····</span><span·class="p"·data-group-id="8155989405-19">{</span><span·class="p"·data-group-id="8155989405-20">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="815598940[·...·truncated·by·diffoscope;·len:·261,·SHA:·59d9b693464d500a96bcdafe7bb60b85511587e1f4f606ee8ea828fdb231e4a2·...·]-19">}</span><span·class="p">,</span><span·class="w">251 ·····</span><span·class="p"·data-group-id="4304681752-19">{</span><span·class="p"·data-group-id="4304681752-20">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="430468175[·...·truncated·by·diffoscope;·len:·261,·SHA:·b3b7424225d4c123ac3daffda4c0d0acd175b61289ef16a6101b26b600af5403·...·]-19">}</span><span·class="p">,</span><span·class="w">
252 ·····</span><span·class="p"·data-group-id="8155989405-22">{</span><span·class="p"·data-group-id="8155989405-23">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">terminate</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8155989405-[·...·truncated·by·diffoscope;·len:·259,·SHA:·884dcf2802a58e0d097eb577f93048b3c7efce3d59ac60a6edf578c8e98ed592·...·]-22">}</span><span·class="p">,</span><span·class="w">252 ·····</span><span·class="p"·data-group-id="4304681752-22">{</span><span·class="p"·data-group-id="4304681752-23">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">terminate</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4304681752-[·...·truncated·by·diffoscope;·len:·259,·SHA:·d087d4f3a4593624e171660dd7d7042a68bbf388b08a59d687fb21bafcae6e43·...·]-22">}</span><span·class="p">,</span><span·class="w">
253 ·····</span><span·class="p"·data-group-id="8155989405-25">{</span><span·class="p"·data-group-id="8155989405-26">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">channels</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="8155989405-2[·...·truncated·by·diffoscope;·len:·258,·SHA:·99ab33c27452ce9322b71e04408ea1808ed80e7fbc428b636f411bf2d0f524a0·...·]-25">}</span><span·class="p">,</span><span·class="w">253 ·····</span><span·class="p"·data-group-id="4304681752-25">{</span><span·class="p"·data-group-id="4304681752-26">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">channels</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="4304681752-2[·...·truncated·by·diffoscope;·len:·258,·SHA:·1fe2acdd42b9d59ed11a57ae559a74f8ef3525c5b3319fb59637aaebbba0948b·...·]-25">}</span><span·class="p">,</span><span·class="w">
254 ·····</span><span·class="p"·data-group-id="8155989405-28">{</span><span·class="p"·data-group-id="8155989405-29">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="8155989405-29">[·...·truncated·by·diffoscope;·len:·255,·SHA:·a7dce48d8b13a440680e4b36f3168726a52870bd897358c859b5b057257c6f9b·...·]-28">}</span><span·class="p">,</span><span·class="w">254 ·····</span><span·class="p"·data-group-id="4304681752-28">{</span><span·class="p"·data-group-id="4304681752-29">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4304681752-29">[·...·truncated·by·diffoscope;·len:·255,·SHA:·8f472b8a7cf20b3fb7cb3600c2c8f1b2ef8469c4f2a6d078db5b8e3df7f6a2af·...·]-28">}</span><span·class="p">,</span><span·class="w">
255 ·····</span><span·class="p"·data-group-id="8155989405-31">{</span><span·class="p"·data-group-id="8155989405-32">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8155989405-32">}[·...·truncated·by·diffoscope;·len:·361,·SHA:·3d2427b3d936693dbb75f7c2398e8dca4013917ffff033d61cb83e539063991f·...·]-2">}</span></code></pre><p>For·<code·class="inline">channel</code>,·the·result·shows·that·the·uncovered·line·is·in·the·function255 ·····</span><span·class="p"·data-group-id="4304681752-31">{</span><span·class="p"·data-group-id="4304681752-32">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4304681752-32">}[·...·truncated·by·diffoscope;·len:·361,·SHA:·d29f5713c08c542dc104d2b1e84b88826dcadeb19bed549cafe49d981e96dd7b·...·]-2">}</span></code></pre><p>For·<code·class="inline">channel</code>,·the·result·shows·that·the·uncovered·line·is·in·the·function
256 <code·class="inline">channel:alloc/1</code>.</p><p>If·the·analysis·is·made·on·clause·level,·the·result·is·given·as·a·list·of·tuples256 <code·class="inline">channel:alloc/1</code>.</p><p>If·the·analysis·is·made·on·clause·level,·the·result·is·given·as·a·list·of·tuples
257 <code·class="inline">{Clause,{Cov,NotCov}}</code>,·one·for·each·function·clause·in·the·module.·A·clause·is257 <code·class="inline">{Clause,{Cov,NotCov}}</code>,·one·for·each·function·clause·in·the·module.·A·clause·is
258 specified·by·its·module·name,·function·name,·arity·and·position·within·the258 specified·by·its·module·name,·function·name,·arity·and·position·within·the
259 function·definition:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="1792784338-1">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">clause</span><span·class="p"·data-group-id="1792784338-1">)</span><span·class="p">.</span><span·class="w">259 function·definition:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">6&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="3543488890-1">(</span><span·class="ss">channel</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">clause</span><span·class="p"·data-group-id="3543488890-1">)</span><span·class="p">.</span><span·class="w">
260 </span><span·class="p"·data-group-id="1792784338-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="1792784338-3">[</span><span·class="p"·data-group-id="1792784338-4">{</span><span·class="p"·data-group-id="1792784338-5">{</span><span·class="ss">channel<[·...·truncated·by·diffoscope;·len:·460,·SHA:·5c397f10a81049d85bd2525f76d654ceb32474646de4a77440c2074588a1ed02·...·]-4">}</span><span·class="p">,</span><span·class="w">260 </span><span·class="p"·data-group-id="3543488890-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3543488890-3">[</span><span·class="p"·data-group-id="3543488890-4">{</span><span·class="p"·data-group-id="3543488890-5">{</span><span·class="ss">channel<[·...·truncated·by·diffoscope;·len:·460,·SHA:·1d8ad80ee1b568228d0f0f72274097951cdacbf6fc8c1c43cbfefcaf2492b461·...·]-4">}</span><span·class="p">,</span><span·class="w">
261 ·····</span><span·class="p"·data-group-id="1792784338-7">{</span><span·class="p"·data-group-id="1792784338-8">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">stop</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span>[·...·truncated·by·diffoscope;·len:·298,·SHA:·bde0d2896f7bf949a9cefb7c1a03fc4078dc822da1acf162d7dda13c499cbc36·...·]-7">}</span><span·class="p">,</span><span·class="w">261 ·····</span><span·class="p"·data-group-id="3543488890-7">{</span><span·class="p"·data-group-id="3543488890-8">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">stop</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span>[·...·truncated·by·diffoscope;·len:·298,·SHA:·00c28c1f23e3f98d19f2431a4a9416b2edf305365f50112d337888b7cf06efda·...·]-7">}</span><span·class="p">,</span><span·class="w">
262 ·····</span><span·class="p"·data-group-id="1792784338-10">{</span><span·class="p"·data-group-id="1792784338-11">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</sp[·...·truncated·by·diffoscope;·len:·304,·SHA:·cf29a82ef212f7f263f92962e1a88d8bd2abb9fc2020820196506905b3f6d9a4·...·]-10">}</span><span·class="p">,</span><span·class="w">262 ·····</span><span·class="p"·data-group-id="3543488890-10">{</span><span·class="p"·data-group-id="3543488890-11">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</sp[·...·truncated·by·diffoscope;·len:·304,·SHA:·3cdc7c568c297a6b64bc601f92e00727ce522a7bca5449105f42507ed69facf7·...·]-10">}</span><span·class="p">,</span><span·class="w">
263 ·····</span><span·class="p"·data-group-id="1792784338-13">{</span><span·class="p"·data-group-id="1792784338-14">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</spa[·...·truncated·by·diffoscope;·len:·303,·SHA:·fe4355620c7a4178bba34f8d129c64f2d4f34145a6a0cdefc1559fdbb6fd9893·...·]-13">}</span><span·class="p">,</span><span·class="w">263 ·····</span><span·class="p"·data-group-id="3543488890-13">{</span><span·class="p"·data-group-id="3543488890-14">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">free</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</spa[·...·truncated·by·diffoscope;·len:·303,·SHA:·29ca66b3a8366a71da763bb17ca56c3e86a01295f767d16e0fa852ce0530ad69·...·]-13">}</span><span·class="p">,</span><span·class="w">
264 ·····</span><span·class="p"·data-group-id="1792784338-16">{</span><span·class="p"·data-group-id="1792784338-17">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">init</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</spa[·...·truncated·by·diffoscope;·len:·303,·SHA:·b5a3c92ba617bb17f175741024c2cf31f31b0c0e6b3c47d461b5c59594d6e3a4·...·]-16">}</span><span·class="p">,</span><span·class="w">264 ·····</span><span·class="p"·data-group-id="3543488890-16">{</span><span·class="p"·data-group-id="3543488890-17">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">init</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</spa[·...·truncated·by·diffoscope;·len:·303,·SHA:·5ae881acf6954b5382ae456d0b0b2bea2e0f07ae398d595a30188dd7e50e3f46·...·]-16">}</span><span·class="p">,</span><span·class="w">
265 ·····</span><span·class="p"·data-group-id="1792784338-19">{</span><span·class="p"·data-group-id="1792784338-20">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·310,·SHA:·d5caf2c82f17d197687fcb528b7072ca45f0ce2ccf5ff2e0bb08f3a578d72a88·...·]-19">}</span><span·class="p">,</span><span·class="w">265 ·····</span><span·class="p"·data-group-id="3543488890-19">{</span><span·class="p"·data-group-id="3543488890-20">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·310,·SHA:·842f9e5b4b3c0719cba3b79760cbc06717fbc92e38677284542d0a9d944a70bc·...·]-19">}</span><span·class="p">,</span><span·class="w">
266 ·····</span><span·class="p"·data-group-id="1792784338-22">{</span><span·class="p"·data-group-id="1792784338-23">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·310,·SHA:·ab233869b55da25f35aca653c8004ccedc645ba994b901753f3b8a1b953d1832·...·]-22">}</span><span·class="p">,</span><span·class="w">266 ·····</span><span·class="p"·data-group-id="3543488890-22">{</span><span·class="p"·data-group-id="3543488890-23">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·310,·SHA:·bfdb5cad68c895a53c5d798c3df830b199b6c9ebb152091ddc5fabc4f20fed22·...·]-22">}</span><span·class="p">,</span><span·class="w">
267 ·····</span><span·class="p"·data-group-id="1792784338-25">{</span><span·class="p"·data-group-id="1792784338-26">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·310,·SHA:·654b6a48963332609798348dbabefae86eff28225e47be68e5fce65ef02ccb19·...·]-25">}</span><span·class="p">,</span><span·class="w">267 ·····</span><span·class="p"·data-group-id="3543488890-25">{</span><span·class="p"·data-group-id="3543488890-26">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">handle_call</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·310,·SHA:·d21d84f8cccc0f39561fb003f8f81333952e14a805cc4d5944224c6f179ef092·...·]-25">}</span><span·class="p">,</span><span·class="w">
268 ·····</span><span·class="p"·data-group-id="1792784338-28">{</span><span·class="p"·data-group-id="1792784338-29">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">terminate</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1[·...·truncated·by·diffoscope;·len:·308,·SHA:·d4c91dfbd029097a2b3dc0075c0776e9538c56bfbe1941f16bf812df0ccf695b·...·]-28">}</span><span·class="p">,</span><span·class="w">268 ·····</span><span·class="p"·data-group-id="3543488890-28">{</span><span·class="p"·data-group-id="3543488890-29">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">terminate</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="mi">1[·...·truncated·by·diffoscope;·len:·308,·SHA:·ff0984019b34f6425e7fc3a88f2745ae1cea5848299220a6a6cbb6a8abb8101c·...·]-28">}</span><span·class="p">,</span><span·class="w">
269 ·····</span><span·class="p"·data-group-id="1792784338-31">{</span><span·class="p"·data-group-id="1792784338-32">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">channels</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1<[·...·truncated·by·diffoscope;·len:·307,·SHA:·fc9c2beb7d7cfadca5b8ae3f796d2ba7fa59599eae35d62976113369fc4067a3·...·]-31">}</span><span·class="p">,</span><span·class="w">269 ·····</span><span·class="p"·data-group-id="3543488890-31">{</span><span·class="p"·data-group-id="3543488890-32">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">channels</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1<[·...·truncated·by·diffoscope;·len:·307,·SHA:·67cd6ff36bc485cf5ce5226747d1d8ab58c97efb6e4267035ca56e1ab7801774·...·]-31">}</span><span·class="p">,</span><span·class="w">
270 ·····</span><span·class="p"·data-group-id="1792784338-34">{</span><span·class="p"·data-group-id="1792784338-35">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</sp[·...·truncated·by·diffoscope;·len:·304,·SHA:·e1e5a34d4b1741310b4203ed6ce550f95bf823ae5cb366448a5da90aafba482e·...·]-34">}</span><span·class="p">,</span><span·class="w">270 ·····</span><span·class="p"·data-group-id="3543488890-34">{</span><span·class="p"·data-group-id="3543488890-35">{</span><span·class="ss">channel</span><span·class="p">,</span><span·class="ss">alloc</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</sp[·...·truncated·by·diffoscope;·len:·304,·SHA:·ddaafc7a68b9a6a3cc2632dae88d7ca4074969a235612ccce394fcd0141c73d2·...·]-34">}</span><span·class="p">,</span><span·class="w">
Max diff block lines reached; 106042/176801 bytes (59.98%) of diff not shown.
3.58 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/cprof.html
    
Offset 586, 15 lines modifiedOffset 586, 15 lines modified
586 ······<div·class="specs">586 ······<div·class="specs">
  
587 ··········<pre·translate="no"><span·class="attribute">-spec</span>·analyse(Mod,·Limit)·->·ModAnalysis·::·<a·href="#t:mod_analysis/0">mod_analysis</a>()587 ··········<pre·translate="no"><span·class="attribute">-spec</span>·analyse(Mod,·Limit)·->·ModAnalysis·::·<a·href="#t:mod_analysis/0">mod_analysis</a>()
588 ·················when·Mod·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:module/0">module</a>(),·Limit·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>().</pre>588 ·················when·Mod·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:module/0">module</a>(),·Limit·::·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#t:non_neg_integer/0">non_neg_integer</a>().</pre>
  
589 ······</div>589 ······</div>
  
590 <p>Collects·and·analyses·all·call·counters·for·module·<code·class="inline">Module</code>.</p><p>This·function·returns:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3245847697-1">{</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ModuleCount</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FuncAnalysisList</span><span·class="p"·data-group-id="32458[·...·truncated·by·diffoscope;·len:·651,·SHA:·b44387ce414636ed2d76b6563f2274663f9daa94f74f5750d93d3e0f9b6b6813·...·]-1">}</span></code></pre><p>If·call·counters·are·still·running·while·<code·class="inline">analyse/0,1,2</code>·is·executing,·the·result590 <p>Collects·and·analyses·all·call·counters·for·module·<code·class="inline">Module</code>.</p><p>This·function·returns:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6023771507-1">{</span><span·class="n">Module</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ModuleCount</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FuncAnalysisList</span><span·class="p"·data-group-id="60237[·...·truncated·by·diffoscope;·len:·651,·SHA:·ef98daa873dfa433c0c637b991f7fcfe5eb74c6049a81e6cd70e907d81802de8·...·]-1">}</span></code></pre><p>If·call·counters·are·still·running·while·<code·class="inline">analyse/0,1,2</code>·is·executing,·the·result
591 could·be·inconsistent.·This·happens·if·the·process·executing·<code·class="inline">analyse/0,1,2</code>591 could·be·inconsistent.·This·happens·if·the·process·executing·<code·class="inline">analyse/0,1,2</code>
592 is·scheduled·out·so·some·other·process·can·increment·the·counters·that·are592 is·scheduled·out·so·some·other·process·can·increment·the·counters·that·are
593 being·analysed.·Calling·<a·href="#pause/0"><code·class="inline">pause()</code></a>·before·analysing·takes·care·of593 being·analysed.·Calling·<a·href="#pause/0"><code·class="inline">pause()</code></a>·before·analysing·takes·care·of
594 that·problem.</p><p>All·functions·with·a·<code·class="inline">FuncCallCount</code>·lower·than·<code·class="inline">Limit</code>·are·excluded·from594 that·problem.</p><p>All·functions·with·a·<code·class="inline">FuncCallCount</code>·lower·than·<code·class="inline">Limit</code>·are·excluded·from
595 <code·class="inline">FuncAnalysisList</code>.·They·are·still·included·in·<code·class="inline">ModCallCount</code>,·though.</p>595 <code·class="inline">FuncAnalysisList</code>.·They·are·still·included·in·<code·class="inline">ModCallCount</code>,·though.</p>
596 ··</section>596 ··</section>
597 </section>597 </section>
83.1 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/cprof_chapter.html
    
Offset 152, 130 lines modifiedOffset 152, 130 lines modified
152 no·trace·message·has·to·be·generated.·Some·measurements·indicates·performance152 no·trace·message·has·to·be·generated.·Some·measurements·indicates·performance
153 degradations·in·the·vicinity·of·10·percent.</p><p>The·following·sections·show·some·examples·of·profiling·with·<a·href="cprof.html"><code·class="inline">cprof</code></a>.</p><h2·id="example-background-work"·class="section-heading">153 degradations·in·the·vicinity·of·10·percent.</p><p>The·following·sections·show·some·examples·of·profiling·with·<a·href="cprof.html"><code·class="inline">cprof</code></a>.</p><h2·id="example-background-work"·class="section-heading">
154 ··<a·href="#example-background-work"·class="hover-link">154 ··<a·href="#example-background-work"·class="hover-link">
155 ····<i·class="ri-link-m"·aria-hidden="true"></i>155 ····<i·class="ri-link-m"·aria-hidden="true"></i>
156 ··</a>156 ··</a>
157 ··<span·class="text">Example:·Background·work</span>157 ··<span·class="text">Example:·Background·work</span>
158 </h2>158 </h2>
159 <p>From·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="6323073875-1">(</span><span·class="p"·data-group-id="6323073875-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">pause</span><span·class="p"·data-group-id="6323073875-2">(</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·65e4f9e2ab609c45a0264be2f2144c4c73ada7d47f5a942480a04bc2ddb9bcc1·...·]-2">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Stop·counters·just·after·start</span><span·class="w">159 <p>From·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5143716467-1">(</span><span·class="p"·data-group-id="5143716467-1">)</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">pause</span><span·class="p"·data-group-id="5143716467-2">(</spa[·...·truncated·by·diffoscope;·len:·43,·SHA:·6b93f66cb8868b128abf456daf55c138bdb286e0c67c12b350820747ba49ca2a·...·]-2">)</span><span·class="p">.</span><span·class="w">·</span><span·class="c1">%·Stop·counters·just·after·start</span><span·class="w">
160 </span><span·class="mi">8492</span><span·class="gp·unselectable">160 </span><span·class="mi">8492</span><span·class="gp·unselectable">
161 2&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="6323073875-3">(</span><span·class="p"·data-group-id="6323073875-3">)</span><span·class="p">.</span><span·class="w">161 2&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="5143716467-3">(</span><span·class="p"·data-group-id="5143716467-3">)</span><span·class="p">.</span><span·class="w">
162 </span><span·class="p"·data-group-id="6323073875-4">{</span><span·class="mi">539</span><span·class="p">,</span><span·class="w">162 </span><span·class="p"·data-group-id="5143716467-4">{</span><span·class="mi">539</span><span·class="p">,</span><span·class="w">
163 ·</span><span·class="p"·data-group-id="6323073875-5">[</span><span·class="p"·data-group-id="6323073875-6">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="mi">155</span><span·class="p">,</span><span·class="w">163 ·</span><span·class="p"·data-group-id="5143716467-5">[</span><span·class="p"·data-group-id="5143716467-6">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="mi">155</span><span·class="p">,</span><span·class="w">
164 ·········</span><span·class="p"·data-group-id="6323073875-7">[</span><span·class="p"·data-group-id="6323073875-8">{</span><span·class="p"·data-group-id="6323073875-9">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">prep_check</span><span·class="p">,</span><span·class="mi">[·...·truncated·by·diffoscope;·len:·152,·SHA:·d0617019e21eeb5ffc2a1d8d98d11ea9bff7ae4e8f16fa2e9fc8efdc68a62a4c·...·]-8">}</span><span·class="p">,</span><span·class="w">164 ·········</span><span·class="p"·data-group-id="5143716467-7">[</span><span·class="p"·data-group-id="5143716467-8">{</span><span·class="p"·data-group-id="5143716467-9">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">prep_check</span><span·class="p">,</span><span·class="mi">[·...·truncated·by·diffoscope;·len:·152,·SHA:·41e3d497792e92500e2f4a4e092be54195bb5e07e9d80e0785048ab20aec87cd·...·]-8">}</span><span·class="p">,</span><span·class="w">
165 ··········</span><span·class="p"·data-group-id="6323073875-10">{</span><span·class="p"·data-group-id="6323073875-11">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">used_records</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="6323073875[·...·truncated·by·diffoscope;·len:·104,·SHA:·407a6dacdc1899f6bda17f38b49fdb53cdbab44d0d495913272e8808e32e6936·...·]-10">}</span><span·class="p">,</span><span·class="w">165 ··········</span><span·class="p"·data-group-id="5143716467-10">{</span><span·class="p"·data-group-id="5143716467-11">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">used_records</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="5143716467[·...·truncated·by·diffoscope;·len:·104,·SHA:·1b23d6d04501c5728f5f0612da9b74a8065c9ba47266d5e5e779329b611ba733·...·]-10">}</span><span·class="p">,</span><span·class="w">
166 ··········</span><span·class="p"·data-group-id="6323073875-12">{</span><span·class="p"·data-group-id="6323073875-13">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">used_records</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6323073875[·...·truncated·by·diffoscope;·len:·104,·SHA:·e79334de44a9fd320e6e14f1e4f8a63d1b75878640e46499cc4003f9f3cc4b35·...·]-12">}</span><span·class="p">,</span><span·class="w">166 ··········</span><span·class="p"·data-group-id="5143716467-12">{</span><span·class="p"·data-group-id="5143716467-13">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">used_records</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5143716467[·...·truncated·by·diffoscope;·len:·104,·SHA:·ff9dc217780cf4998f16da879be7bcdfe6485f416c9f4e527e94640b1574ccbc·...·]-12">}</span><span·class="p">,</span><span·class="w">
167 ··········</span><span·class="p"·data-group-id="6323073875-14">{</span><span·class="p"·data-group-id="6323073875-15">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">used_record_defs</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="632307[·...·truncated·by·diffoscope;·len:·107,·SHA:·d9909395df85313523cdb99315452ec57fbe1a8e620ec50853dfa9949b91b719·...·]-14">}</span><span·class="p">,</span><span·class="w">167 ··········</span><span·class="p"·data-group-id="5143716467-14">{</span><span·class="p"·data-group-id="5143716467-15">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">used_record_defs</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="514371[·...·truncated·by·diffoscope;·len:·107,·SHA:·2cb452f7ec1c57de5619a2652b9e5fa19d62d463160aa04ae0a9245cf9dd9ddc·...·]-14">}</span><span·class="p">,</span><span·class="w">
168 ··········</span><span·class="p"·data-group-id="6323073875-16">{</span><span·class="p"·data-group-id="6323073875-17">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">record_defs</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="6323073875-[·...·truncated·by·diffoscope;·len:·102,·SHA:·4c1972af5f2c5b3e6618839e8a4353d1d637cba79fa9877085af67819e3eb29e·...·]-16">}</span><span·class="p">,</span><span·class="w">168 ··········</span><span·class="p"·data-group-id="5143716467-16">{</span><span·class="p"·data-group-id="5143716467-17">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">record_defs</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5143716467-[·...·truncated·by·diffoscope;·len:·102,·SHA:·cdef9286d8c26c47656501140d47ae6ed4e1f810e51d52ecb6b9764cfcb015e0·...·]-16">}</span><span·class="p">,</span><span·class="w">
169 ··········</span><span·class="p"·data-group-id="6323073875-18">{</span><span·class="p"·data-group-id="6323073875-19">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">record_bindings</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="6323073[·...·truncated·by·diffoscope;·len:·106,·SHA:·b227a4ff2bdc0f1f18706eeac57cff74755aa0ddcb75ac9872be9d5cc776f4bc·...·]-18">}</span><span·class="p">,</span><span·class="w">169 ··········</span><span·class="p"·data-group-id="5143716467-18">{</span><span·class="p"·data-group-id="5143716467-19">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">record_bindings</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5143716[·...·truncated·by·diffoscope;·len:·106,·SHA:·325d423d59199d81426e93e612a1fedba15d70693d98c4357a7de6bd083fd1f4·...·]-18">}</span><span·class="p">,</span><span·class="w">
170 ··········</span><span·class="p"·data-group-id="6323073875-20">{</span><span·class="p"·data-group-id="6323073875-21">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="6323073875-21">}<[·...·truncated·by·diffoscope;·len:·96,·SHA:·ec9f960c29e8384ff018beded9213e9e8273681214a26cd2a843f71f7efbd139·...·]-20">}</span><span·class="p">,</span><span·class="w">170 ··········</span><span·class="p"·data-group-id="5143716467-20">{</span><span·class="p"·data-group-id="5143716467-21">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">exprs</span><span·class="p">,</span><span·class="mi">7</span><span·class="p"·data-group-id="5143716467-21">}<[·...·truncated·by·diffoscope;·len:·96,·SHA:·93e14194b9a414049b570612957a018e03e3c763eccbd1a4bcca624af4e88d45·...·]-20">}</span><span·class="p">,</span><span·class="w">
171 ··········</span><span·class="p"·data-group-id="6323073875-22">{</span><span·class="p"·data-group-id="6323073875-23">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">expr</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="6323073875-23">}</[·...·truncated·by·diffoscope;·len:·95,·SHA:·449aef9b9f15990102f87643615a941318bf91ba02f7134daf8beb9e47f5374e·...·]-22">}</span><span·class="p">,</span><span·class="w">171 ··········</span><span·class="p"·data-group-id="5143716467-22">{</span><span·class="p"·data-group-id="5143716467-23">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">expr</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="5143716467-23">}</[·...·truncated·by·diffoscope;·len:·95,·SHA:·6186ffeac9e3be2feaed8dacace606887244025b9162c7839b24cf89a4e40109·...·]-22">}</span><span·class="p">,</span><span·class="w">
172 ··········</span><span·class="p"·data-group-id="6323073875-24">{</span><span·class="p"·data-group-id="6323073875-25">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">expand_records</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="63230738[·...·truncated·by·diffoscope;·len:·105,·SHA:·4a7cc1c7a0c87d1967c7c4ec00613ddd2f2320ab3b6f9ec70b803a469ff9e095·...·]-24">}</span><span·class="p">,</span><span·class="w">172 ··········</span><span·class="p"·data-group-id="5143716467-24">{</span><span·class="p"·data-group-id="5143716467-25">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">expand_records</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="51437164[·...·truncated·by·diffoscope;·len:·105,·SHA:·451b93c2589a265ec9270ea10fbbabd05492a939cf5b7e8b2421c3d24092fce4·...·]-24">}</span><span·class="p">,</span><span·class="w">
173 ··········</span><span·class="p"·data-group-id="6323073875-26">{</span><span·class="p"·data-group-id="6323073875-27">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">check_command</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="632307387[·...·truncated·by·diffoscope;·len:·104,·SHA:·db7916683590ff11e4fc63a7ba0a8fa3f66dccd1b8489e1c24000307254fbd65·...·]-26">}</span><span·class="p">,</span><span·class="w">173 ··········</span><span·class="p"·data-group-id="5143716467-26">{</span><span·class="p"·data-group-id="5143716467-27">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">check_command</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="514371646[·...·truncated·by·diffoscope;·len:·104,·SHA:·3039098232a03f7c019190b2d4b8fb3e4e100fa75adb7f41c34f9b4709d19fe7·...·]-26">}</span><span·class="p">,</span><span·class="w">
174 ··········</span><span·class="p"·data-group-id="6323073875-28">{</span><span·class="p"·data-group-id="6323073875-29">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">apply_fun</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="6323073875-29[·...·truncated·by·diffoscope;·len:·100,·SHA:·382a9ad02578d563472d244b30dcc88ddc3442366a60d81f6fdc074645407968·...·]-28">}</span><span·class="p">,</span><span·class="w">174 ··········</span><span·class="p"·data-group-id="5143716467-28">{</span><span·class="p"·data-group-id="5143716467-29">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">apply_fun</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="5143716467-29[·...·truncated·by·diffoscope;·len:·100,·SHA:·9b777d6d6f2d4d4d1c8d71a6364a8acc49c7246684e1bb0bf28a81fc26df6a1f·...·]-28">}</span><span·class="p">,</span><span·class="w">
175 ··········</span><span·class="p"·data-group-id="6323073875-30">{</span><span·class="p"·data-group-id="6323073875-31">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">&#39;-exprs/7-lc$^0/1-0-&#39;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·120,·SHA:·9a4e2b201570776b546e3f9d360b90897092c0b103f74f1692e26fc18aaa45db·...·]-30">}</span><span·class="p">,</span><span·class="w">175 ··········</span><span·class="p"·data-group-id="5143716467-30">{</span><span·class="p"·data-group-id="5143716467-31">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">&#39;-exprs/7-lc$^0/1-0-&#39;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·120,·SHA:·559c05f2a832539a24f3bbf813b923f982e816e98792230a2e9527cf457f2eaa·...·]-30">}</span><span·class="p">,</span><span·class="w">
176 ··········</span><span·class="p"·data-group-id="6323073875-32">{</span><span·class="p"·data-group-id="6323073875-33">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">&#39;-eval_loop/3-fun-0-&#39;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·227,·SHA:·1af73f47e2df3daf2804170d1ddd9f6e25348c76723301db6317d12f2eb5f5d0·...·]-6">}</span><span·class="p">,</span><span·class="w">176 ··········</span><span·class="p"·data-group-id="5143716467-32">{</span><span·class="p"·data-group-id="5143716467-33">{</span><span·class="ss">shell</span><span·class="p">,</span><span·class="ss">&#39;-eval_loop/3-fun-0-&#39;</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·227,·SHA:·6fd29e1b7df0977ec21f9a14d9b456d7f21451709c43e4a3cbf18d5165020b6e·...·]-6">}</span><span·class="p">,</span><span·class="w">
177 ··</span><span·class="c1">%%·Information·about·many·modules·omitted.</span><span·class="w">177 ··</span><span·class="c1">%%·Information·about·many·modules·omitted.</span><span·class="w">
178 ·····················</span><span·class="p">.</span><span·class="w">178 ·····················</span><span·class="p">.</span><span·class="w">
179 ·····················</span><span·class="p">.</span><span·class="w">179 ·····················</span><span·class="p">.</span><span·class="w">
180 ·····················</span><span·class="p">.</span><span·class="w">180 ·····················</span><span·class="p">.</span><span·class="w">
181 ··</span><span·class="c1">%%·Here·is·the·last·part.</span><span·class="w">181 ··</span><span·class="c1">%%·Here·is·the·last·part.</span><span·class="w">
182 ··</span><span·class="p"·data-group-id="6323073875-34">{</span><span·class="ss">erts_internal</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="p"·data-group-id="6323073875-35">[</span><span·class="p"·data-group-id="6323073875-36">{</span><span·class="p"[·...·truncated·by·diffoscope;·len:·438,·SHA:·38c2d141c90b9eebf4ca5679374aba3b15e77c2241d1d18bccb04e2146139297·...·]-34">}</span><span·class="p">,</span><span·class="w">182 ··</span><span·class="p"·data-group-id="5143716467-34">{</span><span·class="ss">erts_internal</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="p"·data-group-id="5143716467-35">[</span><span·class="p"·data-group-id="5143716467-36">{</span><span·class="p"[·...·truncated·by·diffoscope;·len:·438,·SHA:·fb1022bc50ae171fa8f4193ca1b2f714a21219d24f3a6a0cfa48c1d52aa5c98e·...·]-34">}</span><span·class="p">,</span><span·class="w">
183 ··</span><span·class="p"·data-group-id="6323073875-38">{</span><span·class="ss">otp_internal</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group-id="6323073875-39">[</span><span·class="p"·data-group-id="6323073875-40">{</span><span·class="p"·data-group-id="6323073875-41">{</span><span·class="ss">otp_internal</span><span·class="p">,</span><span·class="ss">obsolete</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="6323073875-41">}</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6323073875-40">}</span><span·class="p"·data-group-id="6323073875-39">]</span><span·class="p"·data-group-id="6323073875-38">}</span><span·class="p">,</span><span·class="w"> 
184 ··</span><span·class="p"·data-group-id="6323073875-42">{</span><span·class="ss">maps</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group-id="6323073875-43">[</span><span·class="p"·data-group-id="6323073875-44">{</span><span·class="p"·data-group-id="6323073875-45">{</span><span·class="ss">maps</span><span·class="p">,</span><span·class="ss">from_list</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6323073875-45">}</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6323073875-44">}</span><span·class="p"·data-group-id="6323073875-43">]</span><span·class="p"·data-group-id="6323073875-42">}</span><span·class="p">,</span><span·class="w"> 
185 ··</span><span·class="p"·data-group-id="6323073875-46">{</span><span·class="ss">erl_internal</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group-id="6323073875-47">[</span><span·class="p"·data-group-id="6323073875-48">{</span><span·class="p"·data-group-id="6323073875-49">{</span><span·class="ss">erl_internal</span><span·class="p">,</span><span·class="ss">bif</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="6323073875-49">}</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6323073875-48">}</span><span·class="p"·data-group-id="6323073875-47">]</span><span·class="p"·data-group-id="6323073875-46">}</span><span·class="p"·data-group-id="6323073875-5">]</span><span·class="p"·data-group-id="6323073875-4">}</span><span·class="gp·unselectable"> 
186 3&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="6323073875-50">(</span><span·class="ss">cprof</span><span·class="p"·data-group-id="6323073875-50">)</span><span·class="p">.</span><span·class="w"> 
187 </span><span·class="p"·data-group-id="6323073875-51">{</span><span·class="ss">cprof</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-group-id="6323073875-52">[</span><span·class="p"·data-group-id="63230738[·...·truncated·by·diffoscope;·len:·910,·SHA:·55d24a3f2f1f3cfd129485effcb8cf8690d0032abadaf9478f5693dceda32436·...·]">183 ··</span><span·class="p"·data-group-id="5143716467-38">{</span><span·class="ss">otp_internal</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group-id="5143716467-39">[</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·522,·SHA:·1a8d417ca11a92a3b887b6b147b6fdb217f53fb2150e2e14e88e47cfeade047a·...·]">
 184 ··</span><span·class="p"·data-group-id="5143716467-42">{</span><span·class="ss">maps</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group-id="5143716467-43">[</span><span·class="p"·data-group-id="5143716467-44">{</span><span·class="p"·data-group-id="5143716467-45">{</span><span·class="ss">maps</span><span·class="p">,</span><span·class="ss">from_list</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5143716467-45">}</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5143716467-44">}</span><span·class="p"·data-group-id="5143716467-43">]</span><span·class="p"·data-group-id="5143716467-42">}</span><span·class="p">,</span><span·class="w">
 185 ··</span><span·class="p"·data-group-id="5143716467-46">{</span><span·class="ss">erl_internal</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="p"·data-group-id="5143716467-47">[</span><span·class="p"·data-group-id="5143716467-48">{</span><span·class="p"·data-group-id="5143716467-49">{</span><span·class="ss">erl_internal</span><span·class="p">,</span><span·class="ss">bif</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="5143716467-49">}</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5143716467-48">}</span><span·class="p"·data-group-id="5143716467-47">]</span><span·class="p"·data-group-id="5143716467-46">}</span><span·class="p"·data-group-id="5143716467-5">]</span><span·class="p"·data-group-id="5143716467-4">}</span><span·class="gp·unselectable">
 186 3&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="5143716467-50">(</span><span·class="ss">cprof</span><span·class="p"·data-group-id="5143716467-50">)</span><span·class="p">.</span><span·class="w">
 187 </span><span·class="p"·data-group-id="5143716467-51">{</span><span·class="ss">cprof</span><span·class="p">,</span><span·class="mi">3</span><span·class="p">,</span><span·class="p"·data-group-id="5143716467-52">[</span><span·class="p"·data-group-id="5143716467-53">{</span><span·class="p"·data-group-id="5143716467-54">{</span><span·class="ss">cprof</span><span·class="p">,</span><span·class="ss">tr</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5143716467-54">}</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5143716467-53">}</span><span·class="p">,</span><span·class="p"·data-group-id="5143716467-55">{</span><span·class="p"·data-group-id="5143716467-56">{</span><span·class="ss">cprof</span><span·class="p">,</span><span·class="ss">pause</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="5143716467-56">}</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5143716467-55">}</span><span·class="p"·data-group-id="5143716467-52">]</span><span·class="p"·data-group-id="5143716467-51">}</span><span·class="gp·unselectable">
188 4&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="6323073875-57">(</span><span·class="p"·data-group-id="6323073875-57">)</span><span·class="p">.</span><span·class="w">188 4&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="5143716467-57">(</span><span·class="p"·data-group-id="5143716467-57">)</span><span·class="p">.</span><span·class="w">
189 </span><span·class="mi">8586</span></code></pre><p>The·example·showed·some·of·the·background·work·that·the·shell·performs·just·to189 </span><span·class="mi">8586</span></code></pre><p>The·example·showed·some·of·the·background·work·that·the·shell·performs·just·to
190 interpret·the·first·command·line.</p><p>What·is·captured·in·this·example·is·the·part·of·the·work·the·shell·does·while190 interpret·the·first·command·line.</p><p>What·is·captured·in·this·example·is·the·part·of·the·work·the·shell·does·while
191 interpreting·the·command·line·that·occurs·between·the·actual·calls·to191 interpreting·the·command·line·that·occurs·between·the·actual·calls·to
192 <a·href="cprof.html#start/0"><code·class="inline">cprof:start()</code></a>·and·<a·href="cprof.html#analyse/1"><code·class="inline">cprof:analyse()</code></a>.</p><h2·id="example-one-module"·class="section-heading">192 <a·href="cprof.html#start/0"><code·class="inline">cprof:start()</code></a>·and·<a·href="cprof.html#analyse/1"><code·class="inline">cprof:analyse()</code></a>.</p><h2·id="example-one-module"·class="section-heading">
193 ··<a·href="#example-one-module"·class="hover-link">193 ··<a·href="#example-one-module"·class="hover-link">
194 ····<i·class="ri-link-m"·aria-hidden="true"></i>194 ····<i·class="ri-link-m"·aria-hidden="true"></i>
195 ··</a>195 ··</a>
196 ··<span·class="text">Example:·One·module</span>196 ··<span·class="text">Example:·One·module</span>
197 </h2>197 </h2>
198 <p>From·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="5366200105-1">(</span><span·class="p"·data-group-id="5366200105-1">)</span><span·class="p">,</span><span·class="n">R</span><span·class="o">=</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">day_of_the_week</span><span·class="p[·...·truncated·by·diffoscope;·len:·418,·SHA:·49dd56fc31854550f30d28675095451f1fd97b0a6b9e7738e2eb90464315cede·...·]5-3">)</span><span·class="p">,</span><span·class="n">R</span><span·class="p">.</span><span·class="w">198 <p>From·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4004033935-1">(</span><span·class="p"·data-group-id="4004033935-1">)</span><span·class="p">,</span><span·class="n">R</span><span·class="o">=</span><span·class="nc">calendar</span><span·class="p">:</span><span·class="nf">day_of_the_week</span><span·class="p[·...·truncated·by·diffoscope;·len:·418,·SHA:·c30151120d153d12e26b21b13da1d318b0a75feb684b494b695f72c1d9954ea0·...·]5-3">)</span><span·class="p">,</span><span·class="n">R</span><span·class="p">.</span><span·class="w">
199 </span><span·class="mi">1</span><span·class="gp·unselectable">199 </span><span·class="mi">1</span><span·class="gp·unselectable">
200 2&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="5366200105-4">(</span><span·class="ss">calendar</span><span·class="p"·data-group-id="5366200105-4">)</span><span·class="p">.</span><span·class="w">200 2&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="4004033935-4">(</span><span·class="ss">calendar</span><span·class="p"·data-group-id="4004033935-4">)</span><span·class="p">.</span><span·class="w">
201 </span><span·class="p"·data-group-id="5366200105-5">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">201 </span><span·class="p"·data-group-id="4004033935-5">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="mi">9</span><span·class="p">,</span><span·class="w">
202 ··········</span><span·class="p"·data-group-id="5366200105-6">[</span><span·class="p"·data-group-id="5366200105-7">{</span><span·class="p"·data-group-id="5366200105-8">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">last_day_of_the_month1</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·165,·SHA:·c7e6dcb03056976ca4931b8e74de1027169badc7f23a2d723da3b52f13cbda9d·...·]5-7">}</span><span·class="p">,</span><span·class="w">202 ··········</span><span·class="p"·data-group-id="4004033935-6">[</span><span·class="p"·data-group-id="4004033935-7">{</span><span·class="p"·data-group-id="4004033935-8">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">last_day_of_the_month1</span><span·class="p">,</span><s[·...·truncated·by·diffoscope;·len:·165,·SHA:·1338de88a556d1b409ae13b029dd2b09967c13e019ca5c80fcb3d85fc00a4e32·...·]5-7">}</span><span·class="p">,</span><span·class="w">
203 ···········</span><span·class="p"·data-group-id="5366200105-9">{</span><span·class="p"·data-group-id="5366200105-10">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">last_day_of_the_month</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·113,·SHA:·97079e1263358030280f686f88519606120b6c2d4ae7ce561ce93a1f1075cfda·...·]5-9">}</span><span·class="p">,</span><span·class="w">203 ···········</span><span·class="p"·data-group-id="4004033935-9">{</span><span·class="p"·data-group-id="4004033935-10">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">last_day_of_the_month</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·113,·SHA:·ca23e126caa49883a085f7f4ccb6eb9d3884feb21245a0656ff36a4ad8215536·...·]5-9">}</span><span·class="p">,</span><span·class="w">
204 ···········</span><span·class="p"·data-group-id="5366200105-11">{</span><span·class="p"·data-group-id="5366200105-12">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">is_leap_year1</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="536620[·...·truncated·by·diffoscope;·len:·106,·SHA:·61afea903eb814ec224745998f53ddbfc51cd527721a275a5872e8abf109c06f·...·]5-11">}</span><span·class="p">,</span><span·class="w">204 ···········</span><span·class="p"·data-group-id="4004033935-11">{</span><span·class="p"·data-group-id="4004033935-12">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">is_leap_year1</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="400403[·...·truncated·by·diffoscope;·len:·106,·SHA:·c34d22a1fb55dd2f0dbe0a6c04551bd83bc98dccea4ffce98f1625d03b6bfc08·...·]5-11">}</span><span·class="p">,</span><span·class="w">
205 ···········</span><span·class="p"·data-group-id="5366200105-13">{</span><span·class="p"·data-group-id="5366200105-14">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">is_leap_year</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5366200[·...·truncated·by·diffoscope;·len:·105,·SHA:·3073b51d54735c424de0afcb9fd3cf20fab252f78ff5ee644405bb7a5e9caca4·...·]5-13">}</span><span·class="p">,</span><span·class="w">205 ···········</span><span·class="p"·data-group-id="4004033935-13">{</span><span·class="p"·data-group-id="4004033935-14">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">is_leap_year</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4004033[·...·truncated·by·diffoscope;·len:·105,·SHA:·6d8d2f1c267f01f13afe3b94cf80a26d274feb786ed9f4de831a52cdc957b0aa·...·]5-13">}</span><span·class="p">,</span><span·class="w">
206 ···········</span><span·class="p"·data-group-id="5366200105-15">{</span><span·class="p"·data-group-id="5366200105-16">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">dy</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5366200105-16">}<[·...·truncated·by·diffoscope;·len:·95,·SHA:·337f86b67b4ccb967b130a29bd42bb3582ebed28eac363f58a7dde573c0be3e3·...·]5-15">}</span><span·class="p">,</span><span·class="w">206 ···········</span><span·class="p"·data-group-id="4004033935-15">{</span><span·class="p"·data-group-id="4004033935-16">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">dy</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4004033935-16">}<[·...·truncated·by·diffoscope;·len:·95,·SHA:·caa2489b6275dbdd93b756d99ce63fac3374f0838a99aee0c6236abba0d3df7c·...·]5-15">}</span><span·class="p">,</span><span·class="w">
207 ···········</span><span·class="p"·data-group-id="5366200105-17">{</span><span·class="p"·data-group-id="5366200105-18">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">dm</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="5366200105-18">}<[·...·truncated·by·diffoscope;·len:·95,·SHA:·337f86b67b4ccb967b130a29bd42bb3582ebed28eac363f58a7dde573c0be3e3·...·]5-17">}</span><span·class="p">,</span><span·class="w">207 ···········</span><span·class="p"·data-group-id="4004033935-17">{</span><span·class="p"·data-group-id="4004033935-18">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">dm</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="4004033935-18">}<[·...·truncated·by·diffoscope;·len:·95,·SHA:·caa2489b6275dbdd93b756d99ce63fac3374f0838a99aee0c6236abba0d3df7c·...·]5-17">}</span><span·class="p">,</span><span·class="w">
208 ···········</span><span·class="p"·data-group-id="5366200105-19">{</span><span·class="p"·data-group-id="5366200105-20">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">df</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5366200105-20">}<[·...·truncated·by·diffoscope;·len:·95,·SHA:·337f86b67b4ccb967b130a29bd42bb3582ebed28eac363f58a7dde573c0be3e3·...·]5-19">}</span><span·class="p">,</span><span·class="w">208 ···········</span><span·class="p"·data-group-id="4004033935-19">{</span><span·class="p"·data-group-id="4004033935-20">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">df</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4004033935-20">}<[·...·truncated·by·diffoscope;·len:·95,·SHA:·caa2489b6275dbdd93b756d99ce63fac3374f0838a99aee0c6236abba0d3df7c·...·]5-19">}</span><span·class="p">,</span><span·class="w">
209 ···········</span><span·class="p"·data-group-id="5366200105-21">{</span><span·class="p"·data-group-id="5366200105-22">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">day_of_the_week</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="5366[·...·truncated·by·diffoscope;·len:·108,·SHA:·99d2e97b8bd30bbdae90f87aea5749d500d60b5f85892fcaee2a00eb9d10461c·...·]5-21">}</span><span·class="p">,</span><span·class="w">209 ···········</span><span·class="p"·data-group-id="4004033935-21">{</span><span·class="p"·data-group-id="4004033935-22">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">day_of_the_week</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="4004[·...·truncated·by·diffoscope;·len:·108,·SHA:·e872903798430c1671a10d1ddb6a80380db55589531d5542975c7c83ce55dace·...·]5-21">}</span><span·class="p">,</span><span·class="w">
210 ···········</span><span·class="p"·data-group-id="5366200105-23">{</span><span·class="p"·data-group-id="5366200105-24">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">date_to_gregorian_days</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·222,·SHA:·49b2112d335a6574e343c2215454cd7833612f42c55910791825c39c781e0558·...·]5-5">}</span><span·class="gp·unselectable">210 ···········</span><span·class="p"·data-group-id="4004033935-23">{</span><span·class="p"·data-group-id="4004033935-24">{</span><span·class="ss">calendar</span><span·class="p">,</span><span·class="ss">date_to_gregorian_days</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-i[·...·truncated·by·diffoscope;·len:·222,·SHA:·6a9b45489c089031624dc4fa157ca0dea55e17aa0e20fd46cf7fa801607060e1·...·]5-5">}</span><span·class="gp·unselectable">
211 3&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="5366200105-25">(</span><span·class="p"·data-group-id="5366200105-25">)</span><span·class="p">.</span><span·class="w">211 3&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="4004033935-25">(</span><span·class="p"·data-group-id="4004033935-25">)</span><span·class="p">.</span><span·class="w">
212 </span><span·class="mi">8648</span></code></pre><p>The·example·tells·us·that·&quot;Aktiebolaget·LM·Ericsson·&amp;·Co&quot;·was·registered·on·a212 </span><span·class="mi">8648</span></code></pre><p>The·example·tells·us·that·&quot;Aktiebolaget·LM·Ericsson·&amp;·Co&quot;·was·registered·on·a
213 Monday·(since·the·return·value·of·the·first·command·is·1),·and·that·the213 Monday·(since·the·return·value·of·the·first·command·is·1),·and·that·the
214 <code·class="inline">calendar</code>·module·needed·9·function·calls·to·calculate·that.</p><p>Using·<code·class="inline">cprof:analyse()</code>·in·this·example·also·shows·approximately·the·same214 <code·class="inline">calendar</code>·module·needed·9·function·calls·to·calculate·that.</p><p>Using·<code·class="inline">cprof:analyse()</code>·in·this·example·also·shows·approximately·the·same
215 background·work·as·in·the·first·example.</p><h2·id="example-in-the-code"·class="section-heading">215 background·work·as·in·the·first·example.</p><h2·id="example-in-the-code"·class="section-heading">
216 ··<a·href="#example-in-the-code"·class="hover-link">216 ··<a·href="#example-in-the-code"·class="hover-link">
217 ····<i·class="ri-link-m"·aria-hidden="true"></i>217 ····<i·class="ri-link-m"·aria-hidden="true"></i>
218 ··</a>218 ··</a>
219 ··<span·class="text">Example:·In·the·code</span>219 ··<span·class="text">Example:·In·the·code</span>
220 </h2>220 </h2>
221 <p>Write·a·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8804413522-1">(</span><span·class="ss">sort</span><span·class="p"·data-group-id="8804413522-1">)</span><span·class="p">.</span><span·class="w"> 
222 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8804413522-2">(</span><span·class="p"·data-group-id="8804413522-3">[</span><span·class="ss">do</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"[·...·truncated·by·diffoscope;·len:·81,·SHA:·9f914716896bdf32f3a5e69ee9fb63145ff8a698ebcdcfc8d4ee368bbfa3dfd9·...·]">)</span><span·class="p">.</span><span·class="w">221 <p>Write·a·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4272034816-1">(</span><span·class="ss">sort</span><span·class="p"·data-group-id="4272034816-1">)</span><span·class="p">.</span><span·class="w">
 222 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4272034816-2">(</span><span·class="p"·data-group-id="4272034816-3">[</span><span·class="ss">do</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4272034816-3">]</span><span·class="p"·data-group-id="4272034816-2">)</span><span·class="p">.</span><span·class="w">
  
223 </span><span·class="nf">do</span><span·class="p"·data-group-id="8804413522-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="8804413522-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 </span><span·class="nf">do</span><span·class="p"·data-group-id="4272034816-4">(</span><span·class="n">N</span><span·class="p"·data-group-id="4272034816-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ····</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="8804413522-5">(</span><span·class="p"·data-group-id="8804413522-5">)</span><span·class="p">,</span><span·class="w">224 ····</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">stop</span><span·class="p"·data-group-id="4272034816-5">(</span><span·class="p"·data-group-id="4272034816-5">)</span><span·class="p">,</span><span·class="w">
225 ····</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="8804413522-6">(</span><span·class="p"·data-group-id="8804413522-6">)</span><span·class="p">,</span><span·class="w">225 ····</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="4272034816-6">(</span><span·class="p"·data-group-id="4272034816-6">)</span><span·class="p">,</span><span·class="w">
226 ····</span><span·class="nf">do</span><span·class="p"·data-group-id="8804413522-7">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8804413522-8">[</span><span·class="p"·data-group-id="8804413522-8">]</span><span·class="p"·data-group-id="8804413522-7">)</span><span·class="p">.</span><span·class="w">226 ····</span><span·class="nf">do</span><span·class="p"·data-group-id="4272034816-7">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4272034816-8">[</span><span·class="p"·data-group-id="4272034816-8">]</span><span·class="p"·data-group-id="4272034816-7">)</span><span·class="p">.</span><span·class="w">
  
227 </span><span·class="nf">do</span><span·class="p"·data-group-id="8804413522-9">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="8804413522-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 </span><span·class="nf">do</span><span·class="p"·data-group-id="4272034816-9">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="4272034816-9">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="8804413522-10">(</span><span·class="n">L</span><span·class="p"·data-group-id="8804413522-10">)</span><span·class="p">,</span><span·class="w">228 ····</span><span·class="n">R</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">sort</span><span·class="p"·data-group-id="4272034816-10">(</span><span·class="n">L</span><span·class="p"·data-group-id="4272034816-10">)</span><span·class="p">,</span><span·class="w">
229 ····</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">pause</span><span·class="p"·data-group-id="8804413522-11">(</span><span·class="p"·data-group-id="8804413522-11">)</span><span·class="p">,</span><span·class="w">229 ····</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">pause</span><span·class="p"·data-group-id="4272034816-11">(</span><span·class="p"·data-group-id="4272034816-11">)</span><span·class="p">,</span><span·class="w">
230 ····</span><span·class="n">R</span><span·class="p">;</span><span·class="w">230 ····</span><span·class="n">R</span><span·class="p">;</span><span·class="w">
231 </span><span·class="nf">do</span><span·class="p"·data-group-id="8804413522-12">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="8804413522-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 </span><span·class="nf">do</span><span·class="p"·data-group-id="4272034816-12">(</span><span·class="n">N</span><span·class="p">,</span><span·class="w">·</span><span·class="n">L</span><span·class="p"·data-group-id="4272034816-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ····</span><span·class="nf">do</span><span·class="p"·data-group-id="8804413522-13">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8804413522-14">[</span><span·class="nc">rand</span><span·class="p">:</span><span·[·...·truncated·by·diffoscope;·len:·717,·SHA:·ea9100f592008c8cfccb98e09bcb850153656c120bd5e28728c3ea658858958b·...·]-1">)</span><span·class="p">.</span><span·class="w">232 ····</span><span·class="nf">do</span><span·class="p"·data-group-id="4272034816-13">(</span><span·class="n">N</span><span·class="o">-</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4272034816-14">[</span><span·class="nc">rand</span><span·class="p">:</span><span·[·...·truncated·by·diffoscope;·len:·717,·SHA:·68abe3463c58f8564df04be910d1ad9579ecee3c44c01475ac9853e99cc42f00·...·]-1">)</span><span·class="p">.</span><span·class="w">
233 </span><span·class="p"·data-group-id="7630715350-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">sort</span><span·class="p"·data-group-id="7630715350-2">}</span><span·class="gp·unselectable">233 </span><span·class="p"·data-group-id="3609123702-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">sort</span><span·class="p"·data-group-id="3609123702-2">}</span><span·class="gp·unselectable">
234 2&gt;·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">seed</span><span·class="p"·data-group-id="7630715350-3">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">42</span><span·class="p"·data-group-id="7630715350-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">234 2&gt;·</span><span·class="nc">rand</span><span·class="p">:</span><span·class="nf">seed</span><span·class="p"·data-group-id="3609123702-3">(</span><span·class="ss">default</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">42</span><span·class="p"·data-group-id="3609123702-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
235 </span><span·class="ss">ok</span><span·class="p">.</span><span·class="gp·unselectable">235 </span><span·class="ss">ok</span><span·class="p">.</span><span·class="gp·unselectable">
236 3&gt;·</span><span·class="nc">sort</span><span·class="p">:</span><span·class="nf">do</span><span·class="p"·data-group-id="7630715350-4">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="7630715350-4">)</span><span·class="p">.</span><span·class="w">236 3&gt;·</span><span·class="nc">sort</span><span·class="p">:</span><span·class="nf">do</span><span·class="p"·data-group-id="3609123702-4">(</span><span·class="mi">1000</span><span·class="p"·data-group-id="3609123702-4">)</span><span·class="p">.</span><span·class="w">
237 </span><span·class="p"·data-group-id="7630715350-5">[</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</span><span·class="[·...·truncated·by·diffoscope;·len:·1300,·SHA:·6e7ed8e91c55a79d0bce4d59eabe75d720910fe918b1ae6973b14beba253c747·...·]-5">]</span><span·class="gp·unselectable">237 </span><span·class="p"·data-group-id="3609123702-5">[</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">0</span><span·class="p">,</span><span·class="mi">1</span><span·class="p">,</span><span·class="mi">1</span><span·class="[·...·truncated·by·diffoscope;·len:·1300,·SHA:·b2d776cfe448374d0e035fc8ff778288344dc1b36d43922fa87e999bfd269d85·...·]-5">]</span><span·class="gp·unselectable">
238 4&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="7630715350-6">(</span><span·class="p"·data-group-id="7630715350-6">)</span><span·class="p">.</span><span·class="w">238 4&gt;·</span><span·class="nc">cprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="3609123702-6">(</span><span·class="p"·data-group-id="3609123702-6">)</span><span·class="p">.</span><span·class="w">
239 </span><span·class="p"·data-group-id="7630715350-7">{</span><span·class="mi">13180</span><span·class="p">,</span><span·class="w">239 </span><span·class="p"·data-group-id="3609123702-7">{</span><span·class="mi">13180</span><span·class="p">,</span><span·class="w">
240 ·</span><span·class="p"·data-group-id="7630715350-8">[</span><span·class="p"·data-group-id="7630715350-9">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="mi">6173</span><span·class="p">,</span><span·class="w">240 ·</span><span·class="p"·data-group-id="3609123702-8">[</span><span·class="p"·data-group-id="3609123702-9">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="mi">6173</span><span·class="p">,</span><span·class="w">
241 ·········</span><span·class="p"·data-group-id="7630715350-10">[</span><span·class="p"·data-group-id="7630715350-11">{</span><span·class="p"·data-group-id="7630715350-12">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_1</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·157,·SHA:·a15daf4fa0986d3ae825b947fad9405996d6935a90735dce8f7a17f853418f9b·...·]-11">}</span><span·class="p">,</span><span·class="w">241 ·········</span><span·class="p"·data-group-id="3609123702-10">[</span><span·class="p"·data-group-id="3609123702-11">{</span><span·class="p"·data-group-id="3609123702-12">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_1</span><span·class="p">,</span><span·class="mi[·...·truncated·by·diffoscope;·len:·157,·SHA:·91eddd84b77a186e92336cb6448baed7e2293fe44594b37f4aabe75f9bb71991·...·]-11">}</span><span·class="p">,</span><span·class="w">
242 ··········</span><span·class="p"·data-group-id="7630715350-13">{</span><span·class="p"·data-group-id="7630715350-14">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_2</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350-14[·...·truncated·by·diffoscope;·len:·102,·SHA:·58636c348c0f0d613f650e7509b85fd40fcbe9dd890bd80528251a4b5d94f531·...·]-13">}</span><span·class="p">,</span><span·class="w">242 ··········</span><span·class="p"·data-group-id="3609123702-13">{</span><span·class="p"·data-group-id="3609123702-14">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_2</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702-14[·...·truncated·by·diffoscope;·len:·102,·SHA:·cac1a7dea16680c2154e457e52049202a7678132c8e8f9e88c66f7d842773d10·...·]-13">}</span><span·class="p">,</span><span·class="w">
243 ··········</span><span·class="p"·data-group-id="7630715350-15">{</span><span·class="p"·data-group-id="7630715350-16">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">split_1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7630715350-16">[·...·truncated·by·diffoscope;·len:·100,·SHA:·bb0b6b5a88b2f2d2de5cbaf5aa911ca42190bfa2a30b1c0026d97e257814b0cd·...·]-15">}</span><span·class="p">,</span><span·class="w">243 ··········</span><span·class="p"·data-group-id="3609123702-15">{</span><span·class="p"·data-group-id="3609123702-16">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">split_1</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="3609123702-16">[·...·truncated·by·diffoscope;·len:·100,·SHA:·5adf67c8e3362dc57642deaff79e2ca65207b70187b9f80c286f2a9ee58011ad·...·]-15">}</span><span·class="p">,</span><span·class="w">
244 ··········</span><span·class="p"·data-group-id="7630715350-17">{</span><span·class="p"·data-group-id="7630715350-18">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350-18"[·...·truncated·by·diffoscope;·len:·101,·SHA:·c87695bf2c9879cf0cefa25f6380f7c46fdb5957e279e19c331b90f7101ef4e3·...·]-17">}</span><span·class="p">,</span><span·class="w">244 ··········</span><span·class="p"·data-group-id="3609123702-17">{</span><span·class="p"·data-group-id="3609123702-18">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702-18"[·...·truncated·by·diffoscope;·len:·101,·SHA:·898fc838960c6eaa05b7c49e239ca3973e659f82ce882cfd0cbd33c7b43d5236·...·]-17">}</span><span·class="p">,</span><span·class="w">
245 ··········</span><span·class="p"·data-group-id="7630715350-19">{</span><span·class="p"·data-group-id="7630715350-20">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_2</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350-20"[·...·truncated·by·diffoscope;·len:·101,·SHA:·7547e9a84cc14155f38c853980c7f90b4d222f7573d82139964c42401f0249af·...·]-19">}</span><span·class="p">,</span><span·class="w">245 ··········</span><span·class="p"·data-group-id="3609123702-19">{</span><span·class="p"·data-group-id="3609123702-20">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_2</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702-20"[·...·truncated·by·diffoscope;·len:·101,·SHA:·8e91c2be4a1567118de2df72900c27e0d4eb271553893b2473911245b455fd8c·...·]-19">}</span><span·class="p">,</span><span·class="w">
246 ··········</span><span·class="p"·data-group-id="7630715350-21">{</span><span·class="p"·data-group-id="7630715350-22">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_12_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350[·...·truncated·by·diffoscope;·len:·105,·SHA:·5f1da63da741742235a63caa0c49cbfed659493f4a49fe4bcaec77bb4c50dfc9·...·]-21">}</span><span·class="p">,</span><span·class="w">246 ··········</span><span·class="p"·data-group-id="3609123702-21">{</span><span·class="p"·data-group-id="3609123702-22">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_12_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702[·...·truncated·by·diffoscope;·len:·105,·SHA:·aad26e9afb05b2af895850dffa19da1ae0a64f4361b97efbe155b62762d50704·...·]-21">}</span><span·class="p">,</span><span·class="w">
247 ··········</span><span·class="p"·data-group-id="7630715350-23">{</span><span·class="p"·data-group-id="7630715350-24">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">split_1_1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350-24[·...·truncated·by·diffoscope;·len:·102,·SHA:·b507e1e02dd4562e431b1d4f361dc0fb6f1ba765d49adfbf03cde9e2d21d5214·...·]-23">}</span><span·class="p">,</span><span·class="w">247 ··········</span><span·class="p"·data-group-id="3609123702-23">{</span><span·class="p"·data-group-id="3609123702-24">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">split_1_1</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702-24[·...·truncated·by·diffoscope;·len:·102,·SHA:·9b5a4dd6e075e035210c834d34b073cf6f8ae44e2b929f19e488fc3d06fd71c5·...·]-23">}</span><span·class="p">,</span><span·class="w">
248 ··········</span><span·class="p"·data-group-id="7630715350-25">{</span><span·class="p"·data-group-id="7630715350-26">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_12_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350-[·...·truncated·by·diffoscope;·len:·104,·SHA:·7c583d08107fc5403239d4af40208a759b28827017c13d7ad9ca1d9922d6440c·...·]-25">}</span><span·class="p">,</span><span·class="w">248 ··········</span><span·class="p"·data-group-id="3609123702-25">{</span><span·class="p"·data-group-id="3609123702-26">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_12_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702-[·...·truncated·by·diffoscope;·len:·104,·SHA:·56d2fb9031fe3381ea3034696f53e480ba55df5396e520547ee0d0a8174c1ac8·...·]-25">}</span><span·class="p">,</span><span·class="w">
249 ··········</span><span·class="p"·data-group-id="7630715350-27">{</span><span·class="p"·data-group-id="7630715350-28">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_21_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350[·...·truncated·by·diffoscope;·len:·105,·SHA:·e81990989aec1255e65db81d6c8c60e7964aedc8651d660b98f74ba1706cd401·...·]-27">}</span><span·class="p">,</span><span·class="w">249 ··········</span><span·class="p"·data-group-id="3609123702-27">{</span><span·class="p"·data-group-id="3609123702-28">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge3_21_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702[·...·truncated·by·diffoscope;·len:·105,·SHA:·926d7f91fe59d1ceba77f1c1eae1657b49c00c557beb6412160e30ce10b79564·...·]-27">}</span><span·class="p">,</span><span·class="w">
250 ··········</span><span·class="p"·data-group-id="7630715350-29">{</span><span·class="p"·data-group-id="7630715350-30">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_21_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="7630715350-[·...·truncated·by·diffoscope;·len:·104,·SHA:·b59f7953f22be3116df21d94ba1c6e206855807a6f63612148dc1a978a0ee526·...·]-29">}</span><span·class="p">,</span><span·class="w">250 ··········</span><span·class="p"·data-group-id="3609123702-29">{</span><span·class="p"·data-group-id="3609123702-30">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge3_21_3</span><span·class="p">,</span><span·class="mi">6</span><span·class="p"·data-group-id="3609123702-[·...·truncated·by·diffoscope;·len:·104,·SHA:·fc1db8af36a14500b242d9b66f9c846c5a2f8971ea80c3085ca0c411c99a2482·...·]-29">}</span><span·class="p">,</span><span·class="w">
251 ··········</span><span·class="p"·data-group-id="7630715350-31">{</span><span·class="p"·data-group-id="7630715350-32">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge2_1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="7630715350-32"[·...·truncated·by·diffoscope;·len:·101,·SHA:·e8d276d10fc015bc7cdbbcf98c07731d75ccff703646530f1f9c3c857a4a5c51·...·]-31">}</span><span·class="p">,</span><span·class="w">251 ··········</span><span·class="p"·data-group-id="3609123702-31">{</span><span·class="p"·data-group-id="3609123702-32">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge2_1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="3609123702-32"[·...·truncated·by·diffoscope;·len:·101,·SHA:·d9d9da198a4d50bb6763f542a38ed08c62bd4549f786e137945e410def3036f6·...·]-31">}</span><span·class="p">,</span><span·class="w">
252 ··········</span><span·class="p"·data-group-id="7630715350-33">{</span><span·class="p"·data-group-id="7630715350-34">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge2_2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7630715350-34"[·...·truncated·by·diffoscope;·len:·101,·SHA:·951b475f45c2f8a3d4eaf0b282541587638d9ace6a797ea51d13167d85af82c1·...·]-33">}</span><span·class="p">,</span><span·class="w">252 ··········</span><span·class="p"·data-group-id="3609123702-33">{</span><span·class="p"·data-group-id="3609123702-34">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">merge2_2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="3609123702-34"[·...·truncated·by·diffoscope;·len:·101,·SHA:·2fea951dd131b44dae45b6ff1ad5555b1e5fe90ca000269e77f93ae649a15985·...·]-33">}</span><span·class="p">,</span><span·class="w">
253 ··········</span><span·class="p"·data-group-id="7630715350-35">{</span><span·class="p"·data-group-id="7630715350-36">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">reverse</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="7630715350-36">[·...·truncated·by·diffoscope;·len:·100,·SHA:·2cbb2d9ae698569e89187d62e1dcb2cff1722d897722acce7f00fd94095a7f49·...·]-35">}</span><span·class="p">,</span><span·class="w">253 ··········</span><span·class="p"·data-group-id="3609123702-35">{</span><span·class="p"·data-group-id="3609123702-36">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">reverse</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3609123702-36">[·...·truncated·by·diffoscope;·len:·100,·SHA:·d67d03c094954425be579c7afd9faec9e8b5faa49282adb862f4739b38e9f85e·...·]-35">}</span><span·class="p">,</span><span·class="w">
254 ··········</span><span·class="p"·data-group-id="7630715350-37">{</span><span·class="p"·data-group-id="7630715350-38">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge2_2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="7630715350-38[·...·truncated·by·diffoscope;·len:·101,·SHA:·96308041e7c271c70dc80ea48ab04312680cdd0796c4c466cd9efda34d6b85d6·...·]-37">}</span><span·class="p">,</span><span·class="w">254 ··········</span><span·class="p"·data-group-id="3609123702-37">{</span><span·class="p"·data-group-id="3609123702-38">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge2_2</span><span·class="p">,</span><span·class="mi">5</span><span·class="p"·data-group-id="3609123702-38[·...·truncated·by·diffoscope;·len:·101,·SHA:·6682b1024bbb473f8e661d44ca68537fc8af8a5f67505e088f67120a2a44e84b·...·]-37">}</span><span·class="p">,</span><span·class="w">
255 ··········</span><span·class="p"·data-group-id="7630715350-39">{</span><span·class="p"·data-group-id="7630715350-40">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmergel</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="7630715350-40">[·...·truncated·by·diffoscope;·len:·99,·SHA:·c74d8e0e62bfe40ade5bc6698fb7797a587c4d268a0d798a30ee23020c842450·...·]-39">}</span><span·class="p">,</span><span·class="w">255 ··········</span><span·class="p"·data-group-id="3609123702-39">{</span><span·class="p"·data-group-id="3609123702-40">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmergel</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3609123702-40">[·...·truncated·by·diffoscope;·len:·99,·SHA:·af5da4da958d9008699fab5cd84a6eadf8b3b4e2645040e6bdc148058edb4e1a·...·]-39">}</span><span·class="p">,</span><span·class="w">
256 ··········</span><span·class="p"·data-group-id="7630715350-41">{</span><span·class="p"·data-group-id="7630715350-42">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge2_1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="7630715350-42[·...·truncated·by·diffoscope;·len:·101,·SHA:·afb1128bc241205e1d1fa995a4cd1282b6383e68dbe03700cfd1cfb2afa2161f·...·]-41">}</span><span·class="p">,</span><span·class="w">256 ··········</span><span·class="p"·data-group-id="3609123702-41">{</span><span·class="p"·data-group-id="3609123702-42">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">rmerge2_1</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="3609123702-42[·...·truncated·by·diffoscope;·len:·101,·SHA:·41752386857617574b00e340d75777f128a23921535f37c57d4d395f3da47a01·...·]-41">}</span><span·class="p">,</span><span·class="w">
257 ··········</span><span·class="p"·data-group-id="7630715350-43">{</span><span·class="p"·data-group-id="7630715350-44">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">mergel</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="7630715350-44">}[·...·truncated·by·diffoscope;·len:·98,·SHA:·aeaf51fb009ac830ebb8dfb28e3802929e22d20247d8c59a24ae59c5d6238558·...·]-43">}</span><span·class="p">,</span><span·class="w">257 ··········</span><span·class="p"·data-group-id="3609123702-43">{</span><span·class="p"·data-group-id="3609123702-44">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">mergel</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3609123702-44">}[·...·truncated·by·diffoscope;·len:·98,·SHA:·d8dd9cbaf2bb357073e38dd73e3041d2fb5e4d8037b759b212112b7dc0196959·...·]-43">}</span><span·class="p">,</span><span·class="w">
258 ··········</span><span·class="p"·data-group-id="7630715350-45">{</span><span·class="p"·data-group-id="7630715350-46">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">keyfind</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="7630715350-46">[·...·truncated·by·diffoscope;·len:·98,·SHA:·d21142fa7c732a591381f7995bb8d48e1daf61787404d14cd777595210ec6196·...·]-45">}</span><span·class="p">,</span><span·class="w">258 ··········</span><span·class="p"·data-group-id="3609123702-45">{</span><span·class="p"·data-group-id="3609123702-46">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">keyfind</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="3609123702-46">[·...·truncated·by·diffoscope;·len:·98,·SHA:·9aa4e9efd0a936eb5ab4a357add06e70a640647d9a2241edf86bba434dd7b98b·...·]-45">}</span><span·class="p">,</span><span·class="w">
259 ··········</span><span·class="p"·data-group-id="7630715350-47">{</span><span·class="p"·data-group-id="7630715350-48">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">sort</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7630715350-48">}</[·...·truncated·by·diffoscope;·len:·203,·SHA:·bdc08b392e42df50ed4e2112db648321ea362944e05ea9bc9dce5b20c6ba0aa6·...·]-9">}</span><span·class="p">,</span><span·class="w">259 ··········</span><span·class="p"·data-group-id="3609123702-47">{</span><span·class="p"·data-group-id="3609123702-48">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">sort</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3609123702-48">}</[·...·truncated·by·diffoscope;·len:·203,·SHA:·a0d283cb02e56e4a65108f5659f0e963787b9a006ba1cb94254f96bb66ad4880·...·]-9">}</span><span·class="p">,</span><span·class="w">
260 ··</span><span·class="p"·data-group-id="7630715350-49">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="mi">5000</span><span·class="p">,</span><span·class="w">260 ··</span><span·class="p"·data-group-id="3609123702-49">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="mi">5000</span><span·class="p">,</span><span·class="w">
261 ········</span><span·class="p"·data-group-id="7630715350-50">[</span><span·class="p"·data-group-id="7630715350-51">{</span><span·class="p"·data-group-id="7630715350-52">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">uniform_s</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·156,·SHA:·2afaa50d5934d158ae8f4fe9bef833fc2daae00f81cfbd47a80602639d379bf3·...·]-51">}</span><span·class="p">,</span><span·class="w">261 ········</span><span·class="p"·data-group-id="3609123702-50">[</span><span·class="p"·data-group-id="3609123702-51">{</span><span·class="p"·data-group-id="3609123702-52">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">uniform_s</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·156,·SHA:·976efcb2d9ee625e458e68687e66c16fe794de75cb0dc0b746f47fc394b4d3da·...·]-51">}</span><span·class="p">,</span><span·class="w">
262 ·········</span><span·class="p"·data-group-id="7630715350-53">{</span><span·class="p"·data-group-id="7630715350-54">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">uniform</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7630715350-54">}[·...·truncated·by·diffoscope;·len:·100,·SHA:·d1f0f87f68ad1c6d2595c23927461bfcb6170a7add3a1314048f18ae52b0c913·...·]-53">}</span><span·class="p">,</span><span·class="w">262 ·········</span><span·class="p"·data-group-id="3609123702-53">{</span><span·class="p"·data-group-id="3609123702-54">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">uniform</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3609123702-54">}[·...·truncated·by·diffoscope;·len:·100,·SHA:·75a04c6965883f21f2deae0c29b2b84005f3b0c0a34bd94f3932fd108780feb8·...·]-53">}</span><span·class="p">,</span><span·class="w">
263 ·········</span><span·class="p"·data-group-id="7630715350-55">{</span><span·class="p"·data-group-id="7630715350-56">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">seed_put</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="7630715350-56">[·...·truncated·by·diffoscope;·len:·101,·SHA:·cb5be8e7cb8d116df1a4062d68746f37f54d7a7d37b1c5338723e56672c963e2·...·]-55">}</span><span·class="p">,</span><span·class="w">263 ·········</span><span·class="p"·data-group-id="3609123702-55">{</span><span·class="p"·data-group-id="3609123702-56">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">seed_put</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="3609123702-56">[·...·truncated·by·diffoscope;·len:·101,·SHA:·79df2954caead08def7034e8ad95cca9fe4f77a241f3fa7e24954b6ce28257ce·...·]-55">}</span><span·class="p">,</span><span·class="w">
264 ·········</span><span·class="p"·data-group-id="7630715350-57">{</span><span·class="p"·data-group-id="7630715350-58">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">seed_get</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="7630715350-58">[·...·truncated·by·diffoscope;·len:·101,·SHA:·cb5be8e7cb8d116df1a4062d68746f37f54d7a7d37b1c5338723e56672c963e2·...·]-57">}</span><span·class="p">,</span><span·class="w">264 ·········</span><span·class="p"·data-group-id="3609123702-57">{</span><span·class="p"·data-group-id="3609123702-58">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">seed_get</span><span·class="p">,</span><span·class="mi">0</span><span·class="p"·data-group-id="3609123702-58">[·...·truncated·by·diffoscope;·len:·101,·SHA:·79df2954caead08def7034e8ad95cca9fe4f77a241f3fa7e24954b6ce28257ce·...·]-57">}</span><span·class="p">,</span><span·class="w">
265 ·········</span><span·class="p"·data-group-id="7630715350-59">{</span><span·class="p"·data-group-id="7630715350-60">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">exsss_uniform</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="7630715350[·...·truncated·by·diffoscope;·len:·214,·SHA:·f3778cfd5e9fcbd4c967e6599c889095ee9c46b5fbcea59beace4b4a94c73369·...·]-49">}</span><span·class="p">,</span><span·class="w">265 ·········</span><span·class="p"·data-group-id="3609123702-59">{</span><span·class="p"·data-group-id="3609123702-60">{</span><span·class="ss">rand</span><span·class="p">,</span><span·class="ss">exsss_uniform</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="3609123702[·...·truncated·by·diffoscope;·len:·214,·SHA:·22dda2cbccfb524b44e85e2a90d72b78eaa63422d6b43a6654c2edf1d78ec55f·...·]-49">}</span><span·class="p">,</span><span·class="w">
266 ··</span><span·class="p"·data-group-id="7630715350-61">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="mi">1004</span><span·class="p">,</span><span·class="w">266 ··</span><span·class="p"·data-group-id="3609123702-61">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="mi">1004</span><span·class="p">,</span><span·class="w">
267 ··········</span><span·class="p"·data-group-id="7630715350-62">[</span><span·class="p"·data-group-id="7630715350-63">{</span><span·class="p"·data-group-id="7630715350-64">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">put</span><span·class="p">,</span><span·class="mi">2</[·...·truncated·by·diffoscope;·len:·152,·SHA:·8f1f124e677e8c651675be129b65dc94d3a8d154675e1df2b486bc51503d1a5d·...·]-63">}</span><span·class="p">,</span><span·class="w">267 ··········</span><span·class="p"·data-group-id="3609123702-62">[</span><span·class="p"·data-group-id="3609123702-63">{</span><span·class="p"·data-group-id="3609123702-64">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">put</span><span·class="p">,</span><span·class="mi">2</[·...·truncated·by·diffoscope;·len:·152,·SHA:·e1cc01c96dca76e6abbe15529264061d49659f6a8c1963120170ebac1cf2381e·...·]-63">}</span><span·class="p">,</span><span·class="w">
268 ···········</span><span·class="p"·data-group-id="7630715350-65">{</span><span·class="p"·data-group-id="7630715350-66">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">trace_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="76307153[·...·truncated·by·diffoscope;·len:·105,·SHA:·70f2756cf9f5372cc79fb564fcf5d0918865c817010c43b5be1186ae292c9794·...·]-65">}</span><span·class="p">,</span><span·class="w">268 ···········</span><span·class="p"·data-group-id="3609123702-65">{</span><span·class="p"·data-group-id="3609123702-66">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">trace_pattern</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="36091237[·...·truncated·by·diffoscope;·len:·105,·SHA:·f072616023f5bb71baf4bb3fb7da7b22542b44cd84b40736cfdf7b04b6740bf8·...·]-65">}</span><span·class="p">,</span><span·class="w">
269 ···········</span><span·class="p"·data-group-id="7630715350-67">{</span><span·class="p"·data-group-id="7630715350-68">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="ss">ensure_tracer_module_loaded</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·227,·SHA:·f2c0267fa0e3d7af66e83587a1c3c41dd63cd84865d5f1f0aa2d1e30a67e7a77·...·]-61">}</span><span·class="p">,</span><span·class="w">269 ···········</span><span·class="p"·data-group-id="3609123702-67">{</span><span·class="p"·data-group-id="3609123702-68">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="ss">ensure_tracer_module_loaded</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·227,·SHA:·e443ed98f36f8b98d4e879098f8801ea9fcb23b0efe5afe6316a5fafe7943b0c·...·]-61">}</span><span·class="p">,</span><span·class="w">
270 ··</span><span·class="p"·data-group-id="7630715350-69">{</span><span·class="ss">sort</span><span·class="p">,</span><span·class="mi">1001</span><span·class="p">,</span><span·class="p"·data-group-id="7630715350-70">[</span><span·class="p"·data-group-id="7630715350-71">{</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·415,·SHA:·b71359e13f0b23041d8bba7f9d03a6ea8deaf331243f5e6900b9846df2ea0139·...·]-69">}</span><span·class="p">,</span><span·class="w">270 ··</span><span·class="p"·data-group-id="3609123702-69">{</span><span·class="ss">sort</span><span·class="p">,</span><span·class="mi">1001</span><span·class="p">,</span><span·class="p"·data-group-id="3609123702-70">[</span><span·class="p"·data-group-id="3609123702-71">{</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·415,·SHA:·11f7bd5d43c1190d46c10f5d5bd5b5d103ce32a1ea654d678f96526da3113b7f·...·]-69">}</span><span·class="p">,</span><span·class="w">
271 ··</span><span·class="p"·data-group-id="7630715350-73">{</span><span·class="ss">erts_internal</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="p"·data-group-id="7630715350-74">[</span><span·class="p"·data-group-id="7630715350-75">{</span><span·class="p"[·...·truncated·by·diffoscope;·len:·545,·SHA:·2832a551a838e6a0ffc592e91d54745dad79d13f556a8e6e2e0a9a2f635d7171·...·]-7">}</span><span·class="gp·unselectable">271 ··</span><span·class="p"·data-group-id="3609123702-73">{</span><span·class="ss">erts_internal</span><span·class="p">,</span><span·class="mi">2</span><span·class="p">,</span><span·class="p"·data-group-id="3609123702-74">[</span><span·class="p"·data-group-id="3609123702-75">{</span><span·class="p"[·...·truncated·by·diffoscope;·len:·545,·SHA:·2d7d9c72b384a82dd7dc3b58f1e574a82cce9a7bd3e447e4ecca15a241434bbf·...·]-7">}</span><span·class="gp·unselectable">
Max diff block lines reached; 416/84913 bytes (0.49%) of diff not shown.
14.6 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/erlang-el.html
    
Offset 207, 31 lines modifiedOffset 207, 31 lines modified
207 ····<i·class="ri-link-m"·aria-hidden="true"></i>207 ····<i·class="ri-link-m"·aria-hidden="true"></i>
208 ··</a>208 ··</a>
209 ··<span·class="text">Edit·-·Alignment</span>209 ··<span·class="text">Edit·-·Alignment</span>
210 </h2>210 </h2>
211 <ul><li>··<em><code·class="inline">C-c·C-a</code></em>·(<code·class="inline">align-current</code>)·-·aligns·comments,·arrows,·assignments,211 <ul><li>··<em><code·class="inline">C-c·C-a</code></em>·(<code·class="inline">align-current</code>)·-·aligns·comments,·arrows,·assignments,
212 and·type·annotations·around·the·cursor.</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Example</span><span·class="p">:</span><span·class="w">212 and·type·annotations·around·the·cursor.</li></ul><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Example</span><span·class="p">:</span><span·class="w">
  
213 </span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="1413341713-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-2">(</span><[·...·truncated·by·diffoscope;·len:·137,·SHA:·f909a8d7d75291872190a65694cac60105d1aef94ec2e668141d62b0983bc962·...·]-2">)</span><span·class="p">.</span><span·class="w">213 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-1">(</span><span·class="n">L</span><span·class="p"·data-group-id="2021698381-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-2">(</span><[·...·truncated·by·diffoscope;·len:·137,·SHA:·f5aa50651087c95613990044a9b3f13d20309b4c28943cabbb43489a59a9f3cd·...·]-2">)</span><span·class="p">.</span><span·class="w">
214 </span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-3">(</span><span·class="p"·data-group-id="1413341713-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="1413341713-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·462,·SHA:·e77aef91099aeb0584f3e3c3264d04f9b77fb8957209a66ebe6f7c531ff31122·...·]-5">)</span><span·class="p">;</span><span·class="w">··</span><span·class="c1">%·recurse</span><span·class="w">214 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-3">(</span><span·class="p"·data-group-id="2021698381-4">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2021698381-4">]</span><span·class="p">,</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·462,·SHA:·f845c5e47234e5de632d89dc286de4863f00f187bf156ce47eb9efc0ad16d681·...·]-5">)</span><span·class="p">;</span><span·class="w">··</span><span·class="c1">%·recurse</span><span·class="w">
215 </span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-6">(</span><span·class="p"·data-group-id="1413341713-7">[</span><span·class="p"·data-group-id="1413341713-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="1413341713-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·base·case</span><span·class="w">215 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-6">(</span><span·class="p"·data-group-id="2021698381-7">[</span><span·class="p"·data-group-id="2021698381-7">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="2021698381-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%·base·case</span><span·class="w">
216 </span><span·class="w">216 </span><span·class="w">
217 </span><span·class="p">-</span><span·class="na">record</span><span·class="w">·</span><span·class="p"·data-group-id="1413341713-8">{</span><span·class="w">·</span><span·class="ss">two</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="1413341713-9">(</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·6097d3dae353b0df712aed376ce8d1180ff1a3f33c6153c182145f984ab9eb64·...·]-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·hello</span><span·class="w">217 </span><span·class="p">-</span><span·class="na">record</span><span·class="w">·</span><span·class="p"·data-group-id="2021698381-8">{</span><span·class="w">·</span><span·class="ss">two</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="2021698381-9">(</span><span·c[·...·truncated·by·diffoscope;·len:·34,·SHA:·a26ab17b687005d17170ab5b4e6bffe758db3fcacecc1704f927352b8b6a6a7b·...·]-9">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·hello</span><span·class="w">
218 ··········</span><span·class="ss">three</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="1413341713-10">(</span><span·class="p"·data-group-id="1413341713-10">)</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%·there</span><span·class="w">218 ··········</span><span·class="ss">three</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2021698381-10">(</span><span·class="p"·data-group-id="2021698381-10">)</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%·there</span><span·class="w">
219 ··········</span><span·class="ss">four</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="1413341713-11">(</span><span·class="p"·data-group-id="1413341713-11">)</span><span·class="w">·</span><span·class="p"·data-group-id="1413341713-8">}</span><span·class="p">.</span><span·class="w">219 ··········</span><span·class="ss">four</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="2021698381-11">(</span><span·class="p"·data-group-id="2021698381-11">)</span><span·class="w">·</span><span·class="p"·data-group-id="2021698381-8">}</span><span·class="p">.</span><span·class="w">
  
220 </span><span·class="nc">becomes</span><span·class="p">:</span><span·class="w">220 </span><span·class="nc">becomes</span><span·class="p">:</span><span·class="w">
  
221 </span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-12">(</span><span·class="n">L</span><span·class="p"·data-group-id="1413341713-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-13">(</spa[·...·truncated·by·diffoscope;·len:·140,·SHA:·07665688b62a0dd3d1284aa9528b173c0c201821fda323a5c6d35746a6acea6e·...·]-13">)</span><span·class="p">.</span><span·class="w">221 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-12">(</span><span·class="n">L</span><span·class="p"·data-group-id="2021698381-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-13">(</spa[·...·truncated·by·diffoscope;·len:·140,·SHA:·468579e5343eae0dadc144036d00b86887b64cb3793b630be48917c0a82c1f5e·...·]-13">)</span><span·class="p">.</span><span·class="w">
222 </span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-14">(</span><span·class="p"·data-group-id="1413341713-15">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="1413341713-15">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·467,·SHA:·3872a8d54a36f6ad93fc698d6f9c6d59007e4df909673553162eec5cafd489ed·...·]-16">)</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·recurse</span><span·class="w">222 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-14">(</span><span·class="p"·data-group-id="2021698381-15">[</span><span·class="n">H</span><span·class="p">|</span><span·class="n">T</span><span·class="p"·data-group-id="2021698381-15">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·467,·SHA:·abab0fbe06fe0c1bc4f940931c159bd67312c1c1799af66699536dd24582d7fe·...·]-16">)</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·recurse</span><span·class="w">
223 </span><span·class="nf">sum</span><span·class="p"·data-group-id="1413341713-17">(</span><span·class="p"·data-group-id="1413341713-18">[</span><span·class="p"·data-group-id="1413341713-18">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="1413341713-17">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p">.</span><span·class="w">·············</span><span·class="c1">%·base·case</span><span·class="w">223 </span><span·class="nf">sum</span><span·class="p"·data-group-id="2021698381-17">(</span><span·class="p"·data-group-id="2021698381-18">[</span><span·class="p"·data-group-id="2021698381-18">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="2021698381-17">)</span><span·class="w">····</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p">.</span><span·class="w">·············</span><span·class="c1">%·base·case</span><span·class="w">
224 </span><span·class="w">224 </span><span·class="w">
225 </span><span·class="p">-</span><span·class="na">record</span><span·class="w">·</span><span·class="p"·data-group-id="1413341713-19">{</span><span·class="w">·</span><span·class="ss">two</span><span·class="w">···········</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="1413341713-20">(</[·...·truncated·by·diffoscope;·len:·46,·SHA:·1c86c849b0fe980c5dc38acc66e7bd7846a197daa20fb517a7d3999842ad3a49·...·]-20">)</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%·hello</span><span·class="w">225 </span><span·class="p">-</span><span·class="na">record</span><span·class="w">·</span><span·class="p"·data-group-id="2021698381-19">{</span><span·class="w">·</span><span·class="ss">two</span><span·class="w">···········</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="2021698381-20">(</[·...·truncated·by·diffoscope;·len:·46,·SHA:·650d5456e80c906ba957e4426b043607616fc6c57db4b6ed1238bdcb1f2cea82·...·]-20">)</span><span·class="p">,</span><span·class="w">····</span><span·class="c1">%·hello</span><span·class="w">
226 ··········</span><span·class="ss">three</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="1413341713-21">(</span><span·class="p"·data-group-id="1413341713-21">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·there</span><span·class="w">226 ··········</span><span·class="ss">three</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">hello</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">string</span><span·class="p"·data-group-id="2021698381-21">(</span><span·class="p"·data-group-id="2021698381-21">)</span><span·class="p">,</span><span·class="w">·</span><span·class="c1">%·there</span><span·class="w">
227 ··········</span><span·class="ss">four</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">····</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="1413341713-22">(</span><span·class="p"·data-group-id="1413341713-22">)</span><span·class="w">·</span><span·class="p"·data-group-id="1413341713-19">}</span><span·class="p">.</span></code></pre><h2·id="syntax-highlighting"·class="section-heading">227 ··········</span><span·class="ss">four</span><span·class="w">··</span><span·class="o">=</span><span·class="w">·</span><span·class="mi">42</span><span·class="w">····</span><span·class="p">:</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">int</span><span·class="p"·data-group-id="2021698381-22">(</span><span·class="p"·data-group-id="2021698381-22">)</span><span·class="w">·</span><span·class="p"·data-group-id="2021698381-19">}</span><span·class="p">.</span></code></pre><h2·id="syntax-highlighting"·class="section-heading">
228 ··<a·href="#syntax-highlighting"·class="hover-link">228 ··<a·href="#syntax-highlighting"·class="hover-link">
229 ····<i·class="ri-link-m"·aria-hidden="true"></i>229 ····<i·class="ri-link-m"·aria-hidden="true"></i>
230 ··</a>230 ··</a>
231 ··<span·class="text">Syntax·highlighting</span>231 ··<span·class="text">Syntax·highlighting</span>
232 </h2>232 </h2>
233 <p>The·syntax·highlighting·can·be·activated·from·the·Erlang·menu.·There·are·four233 <p>The·syntax·highlighting·can·be·activated·from·the·Erlang·menu.·There·are·four
234 different·alternatives:</p><ul><li>··Off:·Normal·black·and·white·display.</li><li>··Level·1:·Function·headers,·reserved·words,·comments,·strings,·quoted·atoms,234 different·alternatives:</p><ul><li>··Off:·Normal·black·and·white·display.</li><li>··Level·1:·Function·headers,·reserved·words,·comments,·strings,·quoted·atoms,
135 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/fprof.html
    
Offset 171, 69 lines modifiedOffset 171, 69 lines modified
171 </h2>171 </h2>
172 <p>This·section·describes·the·output·format·of·the·<a·href="#analyse/1"><code·class="inline">analyse/1</code></a>·function.</p><p>The·format·is·parsable·with·the·standard·Erlang·parsing·tools172 <p>This·section·describes·the·output·format·of·the·<a·href="#analyse/1"><code·class="inline">analyse/1</code></a>·function.</p><p>The·format·is·parsable·with·the·standard·Erlang·parsing·tools
173 <a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_scan.html"><code·class="inline">erl_scan</code></a>·and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_parse.html"><code·class="inline">erl_parse</code></a>,·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#consult/1"><code·class="inline">file:consult/1</code></a>,·or·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#read/2"><code·class="inline">io:read/2</code></a>.·The173 <a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_scan.html"><code·class="inline">erl_scan</code></a>·and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/erl_parse.html"><code·class="inline">erl_parse</code></a>,·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#consult/1"><code·class="inline">file:consult/1</code></a>,·or·<a·href="../../../../lib/stdlib-6.0.1/doc/html/io.html#read/2"><code·class="inline">io:read/2</code></a>.·The
174 parse·format·is·not·described·here··it·should·be·easy·enough·for·the174 parse·format·is·not·described·here··it·should·be·easy·enough·for·the
175 interested·reader·to·try·it·out.·Note·that·some·flags·to175 interested·reader·to·try·it·out.·Note·that·some·flags·to
176 <a·href="#analyse/1"><code·class="inline">analyse/1</code></a>·will·affect·the·format.</p><p>The·following·example·was·run·on·Erlang/OTP·R8·on·Solaris·8;·all·OTP176 <a·href="#analyse/1"><code·class="inline">analyse/1</code></a>·will·affect·the·format.</p><p>The·following·example·was·run·on·Erlang/OTP·R8·on·Solaris·8;·all·OTP
177 internals·in·this·example·are·version·dependent.</p><p>As·an·example,·we·will·use·the·following·function,·which·is·a177 internals·in·this·example·are·version·dependent.</p><p>As·an·example,·we·will·use·the·following·function,·which·is·a
178 slightly·modified·benchmark·function·from·module·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2041934640-1">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="2041934640-1">)</span><span·class="p">.</span><span·class="w">178 slightly·modified·benchmark·function·from·module·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html"><code·class="inline">file</code></a>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="3280454869-1">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="3280454869-1">)</span><span·class="p">.</span><span·class="w">
179 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2041934640-2">(</span><span·class="p"·data-group-id="2041934640-3">[</span><span·class="ss">create_file_slow</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="2041934640-3">]</span><span·class="p"·data-group-id="20419346[·...·truncated·by·diffoscope;·len:·2,·SHA:·d59eced1ded07f84c145592f65bdf854358e009c5cd705f5215bf18697fed103·...·]-2">)</span><span·class="p">.</span><span·class="w">179 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="3280454869-2">(</span><span·class="p"·data-group-id="3280454869-3">[</span><span·class="ss">create_file_slow</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="3280454869-3">]</span><span·class="p"·data-group-id="32804548[·...·truncated·by·diffoscope;·len:·2,·SHA:·c75cb66ae28d8ebc6eded002c28a8ba0d06d3a78c6b5cbf9b2ade051f0775ac4·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
180 </span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="2041934640-4">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="2041934640-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·145,·SHA:·b28750ab7cd045a9865e4a577f95e1b3f5f722020822d3e35328c470d9e37c0b·...·]-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">180 </span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="3280454869-4">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="3280454869-4">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·c[·...·truncated·by·diffoscope;·len:·145,·SHA:·74d8807d7e9de7560130f8885f8814f51589e389233dbc86a75ee737dba212e6·...·]-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;=</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
181 ····</span><span·class="p"·data-group-id="2041934640-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FD</span><span·class="p"·data-group-id="2041934640-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">181 ····</span><span·class="p"·data-group-id="3280454869-6">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FD</span><span·class="p"·data-group-id="3280454869-6">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
182 ········</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="2041934640-7">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2041934640-8">[</span><span·class="ss">raw</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">write</span><s[·...·truncated·by·diffoscope;·len:·255,·SHA:·9db328554779fb27703d386015bbe0e469216755192cc8db08994d5ef6446f71·...·]-7">)</span><span·class="p">,</span><span·class="w">182 ········</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">open</span><span·class="p"·data-group-id="3280454869-7">(</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3280454869-8">[</span><span·class="ss">raw</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">write</span><s[·...·truncated·by·diffoscope;·len:·255,·SHA:·3ac2ebb6178f830201ac66bf686118e36fb791823427e48759c36fe367ce0e03·...·]-7">)</span><span·class="p">,</span><span·class="w">
183 ····</span><span·class="k">if</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">256</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">183 ····</span><span·class="k">if</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">&gt;</span><span·class="w">·</span><span·class="mi">256</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
184 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2041934640-9">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">184 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="3280454869-9">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">
185 ····························</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="2041934640-10">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="2041934640-11">(</span><span·class="n">X</span><span·class="p"·data-group-id="2041934640-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">unsigned</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">185 ····························</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="3280454869-10">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="3280454869-11">(</span><span·class="n">X</span><span·class="p"·data-group-id="3280454869-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">X</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">unsigned</span><span·class="p">&gt;&gt;</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
186 ····························</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="2041934640-12">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">255</span><span·class="p"·data-group-id="2041934640-12">)</span><span·class="p"·data-group-id="2041934640-10">)</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·3b7bee9b31d8f431323613861395c0f08a97d39e48c7b378dfffca5f88642fc6·...·]-9">)</span><span·class="p">,</span><span·class="w">186 ····························</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">seq</span><span·class="p"·data-group-id="3280454869-12">(</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">255</span><span·class="p"·data-group-id="3280454869-12">)</span><span·class="p"·data-group-id="3280454869-10">)</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·16,·SHA:·87ed77ce14e2ff25abb827dcf4cdd6d926fcc4a83370f5109ddf2a74070c8d77·...·]-9">)</span><span·class="p">,</span><span·class="w">
187 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="2041934640-13">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">256</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="2041934640-13">)</span><span·class="p">;</span><span·class="w">187 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="3280454869-13">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">256</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="3280454869-13">)</span><span·class="p">;</span><span·class="w">
188 ·······</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">188 ·······</span><span·class="ss">true</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
189 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="2041934640-14">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="2041934640-14">)</span><span·class="w">189 ············</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="3280454869-14">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="3280454869-14">)</span><span·class="w">
190 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="2041934640-15">(</span><span·class="n">FD</span><span·class="p"·data-group-id="2041934640-15">)</span><span·class="p">.</span><span·class="w">191 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">close</span><span·class="p"·data-group-id="3280454869-15">(</span><span·class="n">FD</span><span·class="p"·data-group-id="3280454869-15">)</span><span·class="p">.</span><span·class="w">
  
192 </span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="2041934640-16">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="2041934640-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 </span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="3280454869-16">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p"·data-group-id="3280454869-16">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">193 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
194 </span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="2041934640-17">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="2041934640-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">194 </span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="3280454869-17">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="3280454869-17">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
195 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="2041934640-18">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">M</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">unsigned</span[·...·truncated·by·diffoscope;·len:·73,·SHA:·7440babc764e6ad79de5cbf74599e9af10d8c6086190899c902fd34e994deadd·...·]-18">)</span><span·class="p">,</span><span·class="w">195 ····</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">file</span><span·class="p">:</span><span·class="nf">write</span><span·class="p"·data-group-id="3280454869-18">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="p">&lt;&lt;</span><span·class="n">M</span><span·class="p">:</span><span·class="mi">32</span><span·class="o">/</span><span·class="ss">unsigned</span[·...·truncated·by·diffoscope;·len:·73,·SHA:·4d9ecf3e6c099403881e7e7965236090c8332516cb861555687a07cd33ac15ca·...·]-18">)</span><span·class="p">,</span><span·class="w">
196 ····</span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="2041934640-19">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"[·...·truncated·by·diffoscope;·len:·772,·SHA:·604d080c32e9c838952aa207c1b042d70f2059af42d00b896dc2121a49c69a7c·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">196 ····</span><span·class="nf">create_file_slow</span><span·class="p"·data-group-id="3280454869-19">(</span><span·class="n">FD</span><span·class="p">,</span><span·class="w">·</span><span·class="n">M</span><span·class="o">+</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"[·...·truncated·by·diffoscope;·len:·772,·SHA:·77df3a0e475a86bc671b19dcdcd5ab9cd11a239596e0e2d4a3a1e77e33f69484·...·]-1">)</span><span·class="p">.</span><span·class="gp·unselectable">
197 2&gt;·</span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="5431613893-3">(</span><span·class="p"·data-group-id="5431613893-3">)</span><span·class="p">.</span><span·class="gp·unselectable">197 2&gt;·</span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="6576877721-3">(</span><span·class="p"·data-group-id="6576877721-3">)</span><span·class="p">.</span><span·class="gp·unselectable">
198 3&gt;·</span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="5431613893-4">(</span><span·class="p"·data-group-id="5431613893-4">)</span><span·class="p">.</span></code></pre><p>The·printout·starts·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Analysis·results:</span><span·class="w">198 3&gt;·</span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="6576877721-4">(</span><span·class="p"·data-group-id="6576877721-4">)</span><span·class="p">.</span></code></pre><p>The·printout·starts·with:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·Analysis·results:</span><span·class="w">
199 </span><span·class="p"·data-group-id="5165453717-1">{</span><span·class="w">··</span><span·class="ss">analysis_options</span><span·class="p">,</span><span·class="w">199 </span><span·class="p"·data-group-id="2105420843-1">{</span><span·class="w">··</span><span·class="ss">analysis_options</span><span·class="p">,</span><span·class="w">
200 ·</span><span·class="p"·data-group-id="5165453717-2">[</span><span·class="p"·data-group-id="5165453717-3">{</span><span·class="ss">callers</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="5165453717-3">}</span><span·class="p">,</span><span·class="w">200 ·</span><span·class="p"·data-group-id="2105420843-2">[</span><span·class="p"·data-group-id="2105420843-3">{</span><span·class="ss">callers</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="2105420843-3">}</span><span·class="p">,</span><span·class="w">
201 ··</span><span·class="p"·data-group-id="5165453717-4">{</span><span·class="ss">sort</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">acc</span><span·class="p"·data-group-id="5165453717-4">}</span><span·class="p">,</span><span·class="w">201 ··</span><span·class="p"·data-group-id="2105420843-4">{</span><span·class="ss">sort</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">acc</span><span·class="p"·data-group-id="2105420843-4">}</span><span·class="p">,</span><span·class="w">
202 ··</span><span·class="p"·data-group-id="5165453717-5">{</span><span·class="ss">totals</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="5165453717-5">}</span><span·class="p">,</span><span·class="w">202 ··</span><span·class="p"·data-group-id="2105420843-5">{</span><span·class="ss">totals</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·class="p"·data-group-id="2105420843-5">}</span><span·class="p">,</span><span·class="w">
203 ··</span><span·class="p"·data-group-id="5165453717-6">{</span><span·class="ss">details</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="5165453717-6">}</span><span·class="p"·data-group-id="5165453717-2">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·65069acf0e24f6289e4ee47268c6d0e3306483a30818f3dbbc04e5ab93f2cd22·...·]-1">}</span><span·class="p">.</span><span·class="w">203 ··</span><span·class="p"·data-group-id="2105420843-6">{</span><span·class="ss">details</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">true</span><span·class="p"·data-group-id="2105420843-6">}</span><span·class="p"·data-group-id="2105420843-2">]</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·46e4d8ca976d13e1eabbe4042b79436ab12ab9f391bab7cb980c4b65afb45564·...·]-1">}</span><span·class="p">.</span><span·class="w">
  
204 </span><span·class="c1">%·······································CNT·······ACC·······OWN</span><span·class="w">204 </span><span·class="c1">%·······································CNT·······ACC·······OWN</span><span·class="w">
205 </span><span·class="p"·data-group-id="5165453717-7">[</span><span·class="p"·data-group-id="5165453717-8">{</span><span·class="w">·</span><span·class="ss">totals</span><span·class="p">,</span><span·class="w">·····························</span><span·class="mi">9627</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·231,·SHA:·4558d3cea7b386ed38bb321fde91a09dbb8aad6970ee603556da27650ccbd69b·...·]-7">]</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%%%</span></code></pre><p>The·<code·class="inline">CNT</code>·column·shows·the·total·number·of·function·calls·that·was·found·in·the205 </span><span·class="p"·data-group-id="2105420843-7">[</span><span·class="p"·data-group-id="2105420843-8">{</span><span·class="w">·</span><span·class="ss">totals</span><span·class="p">,</span><span·class="w">·····························</span><span·class="mi">9627</span><span·class="p">,</span[·...·truncated·by·diffoscope;·len:·231,·SHA:·2605b4ae4f7b8718f42cbab3c350a9e0f28908ea53f7d1185722d3d3a7a2027e·...·]-7">]</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%%%</span></code></pre><p>The·<code·class="inline">CNT</code>·column·shows·the·total·number·of·function·calls·that·was·found·in·the
206 trace.·In·the·<code·class="inline">ACC</code>·column·is·the·total·time·of·the·trace·from·first·timestamp·to206 trace.·In·the·<code·class="inline">ACC</code>·column·is·the·total·time·of·the·trace·from·first·timestamp·to
207 last.·And·in·the·<code·class="inline">OWN</code>·column·is·the·sum·of·the·execution·time·in·functions·found207 last.·And·in·the·<code·class="inline">OWN</code>·column·is·the·sum·of·the·execution·time·in·functions·found
208 in·the·trace,·not·including·called·functions.·In·this·case·it·is·very·close·to208 in·the·trace,·not·including·called·functions.·In·this·case·it·is·very·close·to
209 the·<code·class="inline">ACC</code>·time·since·the·emulator·had·practically·nothing·to·do·except209 the·<code·class="inline">ACC</code>·time·since·the·emulator·had·practically·nothing·to·do·except
210 executing·our·test·program.</p><p>All·time·values·in·the·printout·are·in·milliseconds.</p><p>The·printout·continues:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·······································CNT·······ACC·······OWN</span><span·class="w">210 executing·our·test·program.</p><p>All·time·values·in·the·printout·are·in·milliseconds.</p><p>The·printout·continues:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%·······································CNT·······ACC·······OWN</span><span·class="w">
211 </span><span·class="p"·data-group-id="6574388374-1">[</span><span·class="p"·data-group-id="6574388374-2">{</span><span·class="w">·</span><span·class="s">&quot;&lt;0.28.0&gt;&quot;</span><span·class="p">,</span><span·class="w">·························</span><span·class="mi">9627</span><span·cl[·...·truncated·by·diffoscope;·len:·223,·SHA:·2d0f4db5fb2761109a7fe1f4766581cdec9ad0cbee23ca1e65bacec754d5007a·...·]-1">]</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%%</span></code></pre><p>This·is·the·printout·header·of·one·process.·The·printout·contains·only·this·one211 </span><span·class="p"·data-group-id="0717633536-1">[</span><span·class="p"·data-group-id="0717633536-2">{</span><span·class="w">·</span><span·class="s">&quot;&lt;0.28.0&gt;&quot;</span><span·class="p">,</span><span·class="w">·························</span><span·class="mi">9627</span><span·cl[·...·truncated·by·diffoscope;·len:·223,·SHA:·a6afd26a9950844149b4eb691499e49a338805b977d2413a8752a2ebbd078d52·...·]-1">]</span><span·class="p">.</span><span·class="w">···</span><span·class="c1">%%</span></code></pre><p>This·is·the·printout·header·of·one·process.·The·printout·contains·only·this·one
212 process·since·we·called·<a·href="#apply/3"><code·class="inline">fprof:apply/3</code></a>·that·traces·only·the·current·process.212 process·since·we·called·<a·href="#apply/3"><code·class="inline">fprof:apply/3</code></a>·that·traces·only·the·current·process.
213 Therefore·the·<code·class="inline">CNT</code>·and·<code·class="inline">OWN</code>·columns·perfectly·matches·the·totals·above.·The·<code·class="inline">ACC</code>213 Therefore·the·<code·class="inline">CNT</code>·and·<code·class="inline">OWN</code>·columns·perfectly·matches·the·totals·above.·The·<code·class="inline">ACC</code>
214 column·is·undefined·since·summing·the·<code·class="inline">ACC</code>·times·of·all·calls·in·the·process214 column·is·undefined·since·summing·the·<code·class="inline">ACC</code>·times·of·all·calls·in·the·process
215 makes·no·sense··one·would·get·something·like·the·<code·class="inline">ACC</code>·value·from·totals·above215 makes·no·sense··one·would·get·something·like·the·<code·class="inline">ACC</code>·value·from·totals·above
216 multiplied·by·the·average·depth·of·the·call·stack.</p><p>All·paragraphs·up·to·the·next·process·header·only·concerns·function·calls·within216 multiplied·by·the·average·depth·of·the·call·stack.</p><p>All·paragraphs·up·to·the·next·process·header·only·concerns·function·calls·within
217 this·process.</p><p>Now·we·come·to·something·more·interesting:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4760165235-1">{</span><span·class="p"·data-group-id="4760165235-2">[</span><span·class="p"·data-group-id="4760165235-3">{</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="w">·····························</span><span·class="mi">0</[·...·truncated·by·diffoscope;·len:·259,·SHA:·0a77024d74d7577e60a8aba945e704f2a39237f4fd2ba040540e8c7fecd412ee·...·]-2">]</span><span·class="p">,</span><span·class="w">217 this·process.</p><p>Now·we·come·to·something·more·interesting:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4625759886-1">{</span><span·class="p"·data-group-id="4625759886-2">[</span><span·class="p"·data-group-id="4625759886-3">{</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="w">·····························</span><span·class="mi">0</[·...·truncated·by·diffoscope;·len:·259,·SHA:·3906486ea934c2bcbd6dc0a8f82126e3224e4608f8ddac0d1b6ebbf598f7240c·...·]-2">]</span><span·class="p">,</span><span·class="w">
218 ·</span><span·class="p"·data-group-id="4760165235-4">{</span><span·class="w">·</span><span·class="p"·data-group-id="4760165235-5">{</span><span·class="ss">fprof</span><span·class="p">,</span><span·class="ss">apply_start_stop</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·322,·SHA:·72dd463fb8408300ce8a35a30cd4a06f3406f5bd7cf2edc16bcc29ce89a34513·...·]-4">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">218 ·</span><span·class="p"·data-group-id="4625759886-4">{</span><span·class="w">·</span><span·class="p"·data-group-id="4625759886-5">{</span><span·class="ss">fprof</span><span·class="p">,</span><span·class="ss">apply_start_stop</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·322,·SHA:·a73da6a6e3250f58a2c84d1ad4548c7818ff728a0d5f744e400b05f526d23a5b·...·]-4">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">
219 ·</span><span·class="p"·data-group-id="4760165235-6">[</span><span·class="p"·data-group-id="4760165235-7">{</span><span·class="p"·data-group-id="4760165235-8">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="m[·...·truncated·by·diffoscope;·len:·351,·SHA:·2bf1c4fa06522513c1e2715b58c97dd78d44131acf7535a818749fa79a3bec5f·...·]-7">}</span><span·class="p">,</span><span·class="w">219 ·</span><span·class="p"·data-group-id="4625759886-6">[</span><span·class="p"·data-group-id="4625759886-7">{</span><span·class="p"·data-group-id="4625759886-8">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="m[·...·truncated·by·diffoscope;·len:·351,·SHA:·474c88e866d1b0b3c9b232a0567c305b0d3a7ca0067b3c5a9c5349a20076ec05·...·]-7">}</span><span·class="p">,</span><span·class="w">
220 ··</span><span·class="p"·data-group-id="4760165235-9">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">·······························</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">0.000</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·206,·SHA:·f9eed7e76b3d916b98ae97734ab5ee60d0c17804d40a757a134ec3817617d856·...·]-1">}</span><span·class="p">.</span><span·class="w">220 ··</span><span·class="p"·data-group-id="4625759886-9">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">·······························</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">0.000</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·206,·SHA:·9cced18e44d78be271fa56430985623e3dce2043cb00ebf960d1299d22edc5c9·...·]-1">}</span><span·class="p">.</span><span·class="w">
  
221 </span><span·class="p"·data-group-id="4760165235-10">{</span><span·class="p"·data-group-id="4760165235-11">[</span><span·class="p"·data-group-id="4760165235-12">{</span><span·class="p"·data-group-id="4760165235-13">{</span><span·class="ss">fprof</span><span·class="p">,</span><span·class="ss">ap[·...·truncated·by·diffoscope;·len:·463,·SHA:·b13e0d255edf8086cc2e43009745ec54c4c7b87d91741d98def9f1a08f54119b·...·]-11">]</span><span·class="p">,</span><span·class="w">221 </span><span·class="p"·data-group-id="4625759886-10">{</span><span·class="p"·data-group-id="4625759886-11">[</span><span·class="p"·data-group-id="4625759886-12">{</span><span·class="p"·data-group-id="4625759886-13">{</span><span·class="ss">fprof</span><span·class="p">,</span><span·class="ss">ap[·...·truncated·by·diffoscope;·len:·463,·SHA:·0abc20e112afc298b66b38004a3031828a9a122b73670f85d282dd16219476a1·...·]-11">]</span><span·class="p">,</span><span·class="w">
222 ·</span><span·class="p"·data-group-id="4760165235-14">{</span><span·class="w">·</span><span·class="p"·data-group-id="4760165235-15">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·325,·SHA:·78a9a8e4c886a0a53ac23617570d9d91bdcdc891982d03ecc9a4015a4ee88447·...·]-14">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">222 ·</span><span·class="p"·data-group-id="4625759886-14">{</span><span·class="w">·</span><span·class="p"·data-group-id="4625759886-15">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·325,·SHA:·c671a1cbb0f6eece9e2977ab09111f647df9a02955b670e8d2ded84ca36acc6a·...·]-14">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">
223 ·</span><span·class="p"·data-group-id="4760165235-16">[</span><span·class="p"·data-group-id="4760165235-17">{</span><span·class="p"·data-group-id="4760165235-18">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">close</span><span·class="p">,</span><span·class="mi">1</s[·...·truncated·by·diffoscope;·len:·355,·SHA:·9515dccc416bdb786e7aaacb83fe0d1dcd58b987a4c5b10c92ceeef35e19f5bc·...·]-17">}</span><span·class="p">,</span><span·class="w">223 ·</span><span·class="p"·data-group-id="4625759886-16">[</span><span·class="p"·data-group-id="4625759886-17">{</span><span·class="p"·data-group-id="4625759886-18">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">close</span><span·class="p">,</span><span·class="mi">1</s[·...·truncated·by·diffoscope;·len:·355,·SHA:·48306dcfd646f04dc5afc1c8d3658742a950d353fdd949921a1402814bae7f6a·...·]-17">}</span><span·class="p">,</span><span·class="w">
224 ··</span><span·class="p"·data-group-id="4760165235-19">{</span><span·class="p"·data-group-id="4760165235-20">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="476016523[·...·truncated·by·diffoscope;·len:·301,·SHA:·f75395aa42d7cd161c8341d4c0a94f9b0f078700e1e563d0506b16beced78d94·...·]-19">}</span><span·class="p">,</span><span·class="w">224 ··</span><span·class="p"·data-group-id="4625759886-19">{</span><span·class="p"·data-group-id="4625759886-20">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="462575988[·...·truncated·by·diffoscope;·len:·301,·SHA:·8d6716369f9d9d2d3e13110a0efbcf82f61c551efa190330754ca9cc6e9a70c1·...·]-19">}</span><span·class="p">,</span><span·class="w">
225 ··</span><span·class="p"·data-group-id="4760165235-21">{</span><span·class="p"·data-group-id="4760165235-22">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">open</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4760165235-22">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·cb45106f32e224dea57fd2e10329110c345690229f136f066879ab599c0051c0·...·]-21">}</span><span·class="p">,</span><span·class="w">225 ··</span><span·class="p"·data-group-id="4625759886-21">{</span><span·class="p"·data-group-id="4625759886-22">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">open</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4625759886-22">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·c56e2e20c3b300b37f315653c7f639074c80e72d43db5fd52f7b9660cbd3621f·...·]-21">}</span><span·class="p">,</span><span·class="w">
226 ··</span><span·class="p"·data-group-id="4760165235-23">{</span><span·class="p"·data-group-id="4760165235-24">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">map</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4760165235-24">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·d327a4245a7b1c3cd2fce3588ddea18f8e672437443aaacd1f2bf95b3c32eea2·...·]-23">}</span><span·class="p">,</span><span·class="w">226 ··</span><span·class="p"·data-group-id="4625759886-23">{</span><span·class="p"·data-group-id="4625759886-24">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">map</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4625759886-24">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·bae1d1e9cf7ce5ba594e945be7226c479a504379504e20ca3f6f52a09a416625·...·]-23">}</span><span·class="p">,</span><span·class="w">
227 ··</span><span·class="p"·data-group-id="4760165235-25">{</span><span·class="p"·data-group-id="4760165235-26">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">seq</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4760165235-26">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·f71bdadb071647d1249c3d7d99b005ab5ba31de96a890683964eaf17427e89bf·...·]-25">}</span><span·class="p">,</span><span·class="w">227 ··</span><span·class="p"·data-group-id="4625759886-25">{</span><span·class="p"·data-group-id="4625759886-26">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">seq</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4625759886-26">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·46b9844fca49c3048dd8906bf581e25202d69b75f6a20b30bfde2fbed81fe78f·...·]-25">}</span><span·class="p">,</span><span·class="w">
228 ··</span><span·class="p"·data-group-id="4760165235-27">{</span><span·class="p"·data-group-id="4760165235-28">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4760165235-28">}</s[·...·truncated·by·diffoscope;·len:·409,·SHA:·74dc7c303482f04882db053392f5b2b789e0840bb81b9285436b4da75261b31c·...·]-10">}</span><span·class="p">.</span></code></pre><p>The·printout·consists·of·one·paragraph·per·called·function.·The·function228 ··</span><span·class="p"·data-group-id="4625759886-27">{</span><span·class="p"·data-group-id="4625759886-28">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="4625759886-28">}</s[·...·truncated·by·diffoscope;·len:·409,·SHA:·5fca4dfa02b21fa62e26a4115d2b368c1423e51c343c5ac9f3f5367f38b0fd79·...·]-10">}</span><span·class="p">.</span></code></pre><p>The·printout·consists·of·one·paragraph·per·called·function.·The·function
229 <em>marked</em>·with·<code·class="inline">%</code>·is·the·one·the·paragraph·concerns··<code·class="inline">foo:create_file_slow/2</code>.229 <em>marked</em>·with·<code·class="inline">%</code>·is·the·one·the·paragraph·concerns··<code·class="inline">foo:create_file_slow/2</code>.
230 Above·the·marked·function·are·the·<em>calling</em>·functions··those·that·has·called230 Above·the·marked·function·are·the·<em>calling</em>·functions··those·that·has·called
231 the·marked,·and·below·are·those·<em>called</em>·by·the·marked·function.</p><p>The·paragraphs·are·per·default·sorted·in·descending·order·of·the·<code·class="inline">ACC</code>·column·for231 the·marked,·and·below·are·those·<em>called</em>·by·the·marked·function.</p><p>The·paragraphs·are·per·default·sorted·in·descending·order·of·the·<code·class="inline">ACC</code>·column·for
232 the·marked·function.·The·calling·list·and·called·list·within·one·paragraph·are232 the·marked·function.·The·calling·list·and·called·list·within·one·paragraph·are
233 also·per·default·sorted·in·descending·order·of·their·<code·class="inline">ACC</code>·column.</p><p>The·columns·are:</p><ul><li><code·class="inline">CNT</code>·-·the·number·of·times·the·function·has·been·called</li><li><code·class="inline">ACC</code>·-·the·time·spent·in·the·function·including·called·functions</li><li><code·class="inline">OWN</code>·-·the·time·spent·in·the·function·not·including·called·functions</li></ul><p>The·rows·for·the·<em>calling</em>·functions·contain·statistics·for·the·<em>marked</em>233 also·per·default·sorted·in·descending·order·of·their·<code·class="inline">ACC</code>·column.</p><p>The·columns·are:</p><ul><li><code·class="inline">CNT</code>·-·the·number·of·times·the·function·has·been·called</li><li><code·class="inline">ACC</code>·-·the·time·spent·in·the·function·including·called·functions</li><li><code·class="inline">OWN</code>·-·the·time·spent·in·the·function·not·including·called·functions</li></ul><p>The·rows·for·the·<em>calling</em>·functions·contain·statistics·for·the·<em>marked</em>
234 function·with·the·constraint·that·only·the·occasions·when·a·call·was·made·from234 function·with·the·constraint·that·only·the·occasions·when·a·call·was·made·from
235 the·<em>row's</em>·function·to·the·<em>marked</em>·function·are·accounted·for.</p><p>The·row·for·the·<em>marked</em>·function·simply·contains·the·sum·of·all·<em>calling</em>·rows.</p><p>The·rows·for·the·<em>called</em>·functions·contains·statistics·for·the·<em>row's</em>·function235 the·<em>row's</em>·function·to·the·<em>marked</em>·function·are·accounted·for.</p><p>The·row·for·the·<em>marked</em>·function·simply·contains·the·sum·of·all·<em>calling</em>·rows.</p><p>The·rows·for·the·<em>called</em>·functions·contains·statistics·for·the·<em>row's</em>·function
Offset 242, 109 lines modifiedOffset 242, 109 lines modified
242 execution.·It·spent·most·of·its·time·in·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#close/1"><code·class="inline">file:close/1</code></a>.·The·function242 execution.·It·spent·most·of·its·time·in·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#close/1"><code·class="inline">file:close/1</code></a>.·The·function
243 <code·class="inline">foo:create_file_slow/3</code>·that·writes·3/4·of·the·file·contents·is·the·second243 <code·class="inline">foo:create_file_slow/3</code>·that·writes·3/4·of·the·file·contents·is·the·second
244 biggest·time·thief.</p><p>We·also·see·that·the·call·to·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>·that·writes·1/4·of·the·file·contents244 biggest·time·thief.</p><p>We·also·see·that·the·call·to·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>·that·writes·1/4·of·the·file·contents
245 takes·very·little·time·in·itself.·What·takes·time·is·to·build·the·data245 takes·very·little·time·in·itself.·What·takes·time·is·to·build·the·data
246 (<a·href="../../../../lib/stdlib-6.0.1/doc/html/lists.html#seq/2"><code·class="inline">lists:seq/2</code></a>·and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/lists.html#map/2"><code·class="inline">lists:map/2</code></a>).</p><p>The·function·<code·class="inline">undefined</code>·that·has·called·<code·class="inline">fprof:apply_start_stop/4</code>·is·an246 (<a·href="../../../../lib/stdlib-6.0.1/doc/html/lists.html#seq/2"><code·class="inline">lists:seq/2</code></a>·and·<a·href="../../../../lib/stdlib-6.0.1/doc/html/lists.html#map/2"><code·class="inline">lists:map/2</code></a>).</p><p>The·function·<code·class="inline">undefined</code>·that·has·called·<code·class="inline">fprof:apply_start_stop/4</code>·is·an
247 unknown·function·because·that·call·was·not·recorded·in·the·trace.·It·was·only247 unknown·function·because·that·call·was·not·recorded·in·the·trace.·It·was·only
248 recorded·that·the·execution·returned·from·<code·class="inline">fprof:apply_start_stop/4</code>·to·some248 recorded·that·the·execution·returned·from·<code·class="inline">fprof:apply_start_stop/4</code>·to·some
249 other·function·above·in·the·call·stack,·or·that·the·process·exited·from·there.</p><p>Let·us·continue·down·the·printout·to·find:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="0296614603-1">{</span><span·class="p"·data-group-id="0296614603-2">[</span><span·class="p"·data-group-id="0296614603-3">{</span><span·class="p"·data-group-id="0296614603-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_[·...·truncated·by·diffoscope;·len:·405,·SHA:·f1dbd8fc67b0324cfc81d1fbe98da3df8a88bd66c0bc88453731346d605fbf19·...·]-3">}</span><span·class="p">,</span><span·class="w">249 other·function·above·in·the·call·stack,·or·that·the·process·exited·from·there.</p><p>Let·us·continue·down·the·printout·to·find:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5636148456-1">{</span><span·class="p"·data-group-id="5636148456-2">[</span><span·class="p"·data-group-id="5636148456-3">{</span><span·class="p"·data-group-id="5636148456-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_[·...·truncated·by·diffoscope;·len:·405,·SHA:·12e1255596bcf53f4b7ef2afc6444b83c238460ad3a085f077d978b52279b8c9·...·]-3">}</span><span·class="p">,</span><span·class="w">
250 ··</span><span·class="p"·data-group-id="0296614603-5">{</span><span·class="p"·data-group-id="0296614603-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="0296614603[·...·truncated·by·diffoscope;·len:·352,·SHA:·39fbe2c303faf6d811f71dff8704ddf298939225c8b204c1f16302032e9da438·...·]-2">]</span><span·class="p">,</span><span·class="w">250 ··</span><span·class="p"·data-group-id="5636148456-5">{</span><span·class="p"·data-group-id="5636148456-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="5636148456[·...·truncated·by·diffoscope;·len:·352,·SHA:·9c9fd9a8afd61dfbcc42286122eba00e5235ecc92c3d26370e05d32bc6fd9753·...·]-2">]</span><span·class="p">,</span><span·class="w">
251 ·</span><span·class="p"·data-group-id="0296614603-7">{</span><span·class="w">·</span><span·class="p"·data-group-id="0296614603-8">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·323,·SHA:·b640a5da19c526141e68defa9459540f1ac1386d0dce6dd40a19ab321d3dd890·...·]-7">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">251 ·</span><span·class="p"·data-group-id="5636148456-7">{</span><span·class="w">·</span><span·class="p"·data-group-id="5636148456-8">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·323,·SHA:·b1190a7388dd65b794167013a4ae859deda9edfe511a3e8d399bae3bca6b94ac·...·]-7">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">
252 ·</span><span·class="p"·data-group-id="0296614603-9">[</span><span·class="p"·data-group-id="0296614603-10">{</span><span·class="p"·data-group-id="0296614603-11">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</s[·...·truncated·by·diffoscope;·len:·355,·SHA:·276813b7eb8a14be69c7f3b0961eeb332bc2ac9b142cf4e95af327cb8ccfbbb3·...·]-10">}</span><span·class="p">,</span><span·class="w">252 ·</span><span·class="p"·data-group-id="5636148456-9">[</span><span·class="p"·data-group-id="5636148456-10">{</span><span·class="p"·data-group-id="5636148456-11">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</s[·...·truncated·by·diffoscope;·len:·355,·SHA:·7e959d4119201f60647727291286447060ff3a62408db896240cbfe07bc08494·...·]-10">}</span><span·class="p">,</span><span·class="w">
253 ··</span><span·class="p"·data-group-id="0296614603-12">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">······························</span><span·class="mi">57</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">6.041</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·102,·SHA:·02ccf24feda274f54894d635d1e4e45c2ab2cfd6a49a9b82658356b666e8ccbd·...·]-12">}</span><span·class="p">,</span><span·class="w">253 ··</span><span·class="p"·data-group-id="5636148456-12">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">······························</span><span·class="mi">57</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">6.041</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·102,·SHA:·dcd3f397c4f350155eed7c86f70b5c102e1fa8a432d3bcf47827a1e71e6a0d4a·...·]-12">}</span><span·class="p">,</span><span·class="w">
254 ··</span><span·class="p"·data-group-id="0296614603-13">{</span><span·class="p"·data-group-id="0296614603-14">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="02966146[·...·truncated·by·diffoscope;·len:·409,·SHA:·5e2651b074dc98f54d8c9053f119805451cdc32f0f28f784fc96b5447db036ab·...·]-1">}</span><span·class="p">.</span></code></pre><p>If·you·compare·with·the·code·you·will·see·there·also·that254 ··</span><span·class="p"·data-group-id="5636148456-13">{</span><span·class="p"·data-group-id="5636148456-14">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="56361484[·...·truncated·by·diffoscope;·len:·409,·SHA:·74a6c648870463dee7a7ba8e4f47c57654a93866146a75d2627950d72f4beb7a·...·]-1">}</span><span·class="p">.</span></code></pre><p>If·you·compare·with·the·code·you·will·see·there·also·that
255 <code·class="inline">foo:create_file_slow/3</code>·was·called·only·from·<code·class="inline">foo:create_file_slow/2</code>·and255 <code·class="inline">foo:create_file_slow/3</code>·was·called·only·from·<code·class="inline">foo:create_file_slow/2</code>·and
256 itself,·and·called·only·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>,·note·the·number·of·calls·to256 itself,·and·called·only·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>,·note·the·number·of·calls·to
257 <a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>.·But·here·we·see·that·<code·class="inline">suspend</code>·was·called·a·few·times.·This·is·a257 <a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>.·But·here·we·see·that·<code·class="inline">suspend</code>·was·called·a·few·times.·This·is·a
258 pseudo·function·that·indicates·that·the·process·was·suspended·while·executing·in258 pseudo·function·that·indicates·that·the·process·was·suspended·while·executing·in
259 <code·class="inline">foo:create_file_slow/3</code>,·and·since·there·is·no·<code·class="inline">receive</code>·or·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#yield/0"><code·class="inline">erlang:yield/0</code></a>·in259 <code·class="inline">foo:create_file_slow/3</code>,·and·since·there·is·no·<code·class="inline">receive</code>·or·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#yield/0"><code·class="inline">erlang:yield/0</code></a>·in
260 the·code,·it·must·be·Erlang·scheduling·suspensions,·or·the·trace·file·driver260 the·code,·it·must·be·Erlang·scheduling·suspensions,·or·the·trace·file·driver
261 compensating·for·large·file·write·operations·(these·are·regarded·as·a·schedule261 compensating·for·large·file·write·operations·(these·are·regarded·as·a·schedule
262 out·followed·by·a·schedule·in·to·the·same·process).</p><p>Let·us·find·the·<code·class="inline">suspend</code>·entry:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9090200450-1">{</span><span·class="p"·data-group-id="9090200450-2">[</span><span·class="p"·data-group-id="9090200450-3">{</span><span·class="p"·data-group-id="9090200450-4">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</[·...·truncated·by·diffoscope;·len:·404,·SHA:·77b4191ae8b0681a10c8c4a775fefaabacbf0a55cc2a0a00e346b1df6642cc9f·...·]-3">}</span><span·class="p">,</span><span·class="w">262 out·followed·by·a·schedule·in·to·the·same·process).</p><p>Let·us·find·the·<code·class="inline">suspend</code>·entry:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9792855597-1">{</span><span·class="p"·data-group-id="9792855597-2">[</span><span·class="p"·data-group-id="9792855597-3">{</span><span·class="p"·data-group-id="9792855597-4">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</[·...·truncated·by·diffoscope;·len:·404,·SHA:·193da0ca6a754b20f880cc9edf707ce23f1a6f9185e4286e3fbe71120a4a75d3·...·]-3">}</span><span·class="p">,</span><span·class="w">
263 ··</span><span·class="p"·data-group-id="9090200450-5">{</span><span·class="p"·data-group-id="9090200450-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="9090200450-[·...·truncated·by·diffoscope;·len:·298,·SHA:·c9dafa24a7fd4bd75a4fe55ec0d16eeec148273629d02822ed82a772d14c19e5·...·]-5">}</span><span·class="p">,</span><span·class="w">263 ··</span><span·class="p"·data-group-id="9792855597-5">{</span><span·class="p"·data-group-id="9792855597-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="9792855597-[·...·truncated·by·diffoscope;·len:·298,·SHA:·c7fc6656a6db0fb4ec31147deec5d3ecdfd659281af3af646059e9ab1c2b628f·...·]-5">}</span><span·class="p">,</span><span·class="w">
264 ··</span><span·class="p"·data-group-id="9090200450-7">{</span><span·class="p"·data-group-id="9090200450-8">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">drv_command</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9090200450[·...·truncated·by·diffoscope;·len:·298,·SHA:·0c1cd2c1be7a5163625ba0c615ae04a6959572e72f92858f526f84ab2e415639·...·]-7">}</span><span·class="p">,</span><span·class="w">264 ··</span><span·class="p"·data-group-id="9792855597-7">{</span><span·class="p"·data-group-id="9792855597-8">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">drv_command</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9792855597[·...·truncated·by·diffoscope;·len:·298,·SHA:·30689b8052b52f3fbdc260f9e9e0de20a02447de14aa23fac0743ae0024a2687·...·]-7">}</span><span·class="p">,</span><span·class="w">
265 ··</span><span·class="p"·data-group-id="9090200450-9">{</span><span·class="p"·data-group-id="9090200450-10">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">drv_get_response</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="9090[·...·truncated·by·diffoscope;·len:·300,·SHA:·4ce62180cce44a204af900d27549c869ad44290fa9a1dd6871cac32b882cf64f·...·]-9">}</span><span·class="p">,</span><span·class="w">265 ··</span><span·class="p"·data-group-id="9792855597-9">{</span><span·class="p"·data-group-id="9792855597-10">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">drv_get_response</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="9792[·...·truncated·by·diffoscope;·len:·300,·SHA:·af60de19632f63f027adf60c4957fb509a268bbfe72adeadaff1fa1200c9a46c·...·]-9">}</span><span·class="p">,</span><span·class="w">
266 ··</span><span·class="p"·data-group-id="9090200450-11">{</span><span·class="p"·data-group-id="9090200450-12">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">map</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9090200450-12">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·59b7853de2550d4b998c00944f18350c19ea77b7a83b6f90ad35cdd9ea28b1af·...·]-11">}</span><span·class="p">,</span><span·class="w">266 ··</span><span·class="p"·data-group-id="9792855597-11">{</span><span·class="p"·data-group-id="9792855597-12">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">map</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9792855597-12">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·3d49a222c2b809fd9755020665df90c43f05461b309c7aa51686f9b315eccdf6·...·]-11">}</span><span·class="p">,</span><span·class="w">
267 ··</span><span·class="p"·data-group-id="9090200450-13">{</span><span·class="p"·data-group-id="9090200450-14">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9090200450-14"[·...·truncated·by·diffoscope;·len:·301,·SHA:·1fa4ad654223269190eb03a90e66c54ef6f27d925c21a0e42170c4de9a5a52f2·...·]-13">}</span><span·class="p">,</span><span·class="w">267 ··</span><span·class="p"·data-group-id="9792855597-13">{</span><span·class="p"·data-group-id="9792855597-14">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9792855597-14"[·...·truncated·by·diffoscope;·len:·301,·SHA:·34236567554edf4dde4ece75e5c9ba382f963a635048b86c9e877cf01b985b58·...·]-13">}</span><span·class="p">,</span><span·class="w">
268 ··</span><span·class="p"·data-group-id="9090200450-15">{</span><span·class="p"·data-group-id="9090200450-16">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">port_command</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9090200450[·...·truncated·by·diffoscope;·len:·301,·SHA:·66306cb73a2346ef9841a845a8d2030afe8866e516118abf6c0d6b9a0fabdddf·...·]-15">}</span><span·class="p">,</span><span·class="w">268 ··</span><span·class="p"·data-group-id="9792855597-15">{</span><span·class="p"·data-group-id="9792855597-16">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">port_command</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9792855597[·...·truncated·by·diffoscope;·len:·301,·SHA:·5b12b59a2eeb7ef3f17e3661aad75dab0c861253c119182b73d8679ca6cde732·...·]-15">}</span><span·class="p">,</span><span·class="w">
269 ··</span><span·class="p"·data-group-id="9090200450-17">{</span><span·class="p"·data-group-id="9090200450-18">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">drv_command</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="90902004[·...·truncated·by·diffoscope;·len:·301,·SHA:·d371aae1791a098a3c2355397ec3ff55971edb8c6e6912942df662253a7f1c15·...·]-17">}</span><span·class="p">,</span><span·class="w">269 ··</span><span·class="p"·data-group-id="9792855597-17">{</span><span·class="p"·data-group-id="9792855597-18">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">drv_command</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="97928555[·...·truncated·by·diffoscope;·len:·301,·SHA:·e8ae2aecab887220e9044bbf4c1fdbfe84c9d5df7eb34eb275f8f531b2625216·...·]-17">}</span><span·class="p">,</span><span·class="w">
270 ··</span><span·class="p"·data-group-id="9090200450-19">{</span><span·class="p"·data-group-id="9090200450-20">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">translate_response</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9[·...·truncated·by·diffoscope;·len:·301,·SHA:·7706247080a2e584c6064dc4cc34ffdd64c7481527b1c303796734221ae5ac93·...·]-19">}</span><span·class="p">,</span><span·class="w">270 ··</span><span·class="p"·data-group-id="9792855597-19">{</span><span·class="p"·data-group-id="9792855597-20">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">translate_response</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9[·...·truncated·by·diffoscope;·len:·301,·SHA:·f8147b3c8f2193647a73d6ba855d12b369b6b91501f35872f8dbb51660599844·...·]-19">}</span><span·class="p">,</span><span·class="w">
271 ··</span><span·class="p"·data-group-id="9090200450-21">{</span><span·class="p"·data-group-id="9090200450-22">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">&#39;-drv_command/2-fun-0-&#39;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·311,·SHA:·fa6f6191f1b8863c28abec94ee05ebae95a5b8e531fde6ddb7758eab8d958e2c·...·]-21">}</span><span·class="p">,</span><span·class="w">271 ··</span><span·class="p"·data-group-id="9792855597-21">{</span><span·class="p"·data-group-id="9792855597-22">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">&#39;-drv_command/2-fun-0-&#39;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·311,·SHA:·63e6d31a7299c880f7737a69ceea6acd514614615cb939d5563af8e8b60aa0be·...·]-21">}</span><span·class="p">,</span><span·class="w">
272 ··</span><span·class="p"·data-group-id="9090200450-23">{</span><span·class="p"·data-group-id="9090200450-24">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">seq</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9090200450-24">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·6f7c301f81cc332542b700a84af9dca3bc4c51aa0d4b1e2b926f76b3ebab16a3·...·]-23">}</span><span·class="p">,</span><span·class="w">272 ··</span><span·class="p"·data-group-id="9792855597-23">{</span><span·class="p"·data-group-id="9792855597-24">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">seq</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9792855597-24">}</sp[·...·truncated·by·diffoscope;·len:·301,·SHA:·7933245a1fe3553f282d47ffc8cf05cdcf09a80ff040e0eb9a5a20623504852c·...·]-23">}</span><span·class="p">,</span><span·class="w">
273 ··</span><span·class="p"·data-group-id="9090200450-25">{</span><span·class="p"·data-group-id="9090200450-26">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">&#39;-create_file_slow/2-fun-0-&#39;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·310,·SHA:·ed18f057755af9e26e055969566f2cffd0b6f6bef81bb828921f1d7c5854d24c·...·]-25">}</span><span·class="p">,</span><span·class="w">273 ··</span><span·class="p"·data-group-id="9792855597-25">{</span><span·class="p"·data-group-id="9792855597-26">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">&#39;-create_file_slow/2-fun-0-&#39;</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·310,·SHA:·d5d7f36fbe3651645bda9d9eaa0c24833dfd30b1a5b3fa6fd0d9b3164f86c371·...·]-25">}</span><span·class="p">,</span><span·class="w">
274 ··</span><span·class="p"·data-group-id="9090200450-27">{</span><span·class="p"·data-group-id="9090200450-28">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">bump_reductions</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="9090200[·...·truncated·by·diffoscope;·len:·301,·SHA:·c8fc4895e87332453b35dcbb409bfa650ee5cf5c4320a538d20e72a3dfdacb8d·...·]-27">}</span><span·class="p">,</span><span·class="w">274 ··</span><span·class="p"·data-group-id="9792855597-27">{</span><span·class="p"·data-group-id="9792855597-28">{</span><span·class="ss">erlang</span><span·class="p">,</span><span·class="nb">bump_reductions</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="9792855[·...·truncated·by·diffoscope;·len:·301,·SHA:·084d93d36523bd4cfac67a8e7fd06ed43e4cff733164a3bc8202fa111a7374ec·...·]-27">}</span><span·class="p">,</span><span·class="w">
275 ··</span><span·class="p"·data-group-id="9090200450-29">{</span><span·class="p"·data-group-id="9090200450-30">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">open_int_setopts</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="909[·...·truncated·by·diffoscope;·len:·301,·SHA:·2c5c762b521a57d8f8b5d731e9fe222bf2bdd7eab067d8ac01d95eb110a31963·...·]-29">}</span><span·class="p">,</span><span·class="w">275 ··</span><span·class="p"·data-group-id="9792855597-29">{</span><span·class="p"·data-group-id="9792855597-30">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">open_int_setopts</span><span·class="p">,</span><span·class="mi">3</span><span·class="p"·data-group-id="979[·...·truncated·by·diffoscope;·len:·301,·SHA:·7677bdbf3ed080da273f7258a4670647d9d0d9e4a3ec562cdc7515fc197eb8d4·...·]-29">}</span><span·class="p">,</span><span·class="w">
276 ··</span><span·class="p"·data-group-id="9090200450-31">{</span><span·class="p"·data-group-id="9090200450-32">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">i32</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9090200450-32">}[·...·truncated·by·diffoscope;·len:·301,·SHA:·84c8dcda4b9084043942c778474b27d9f0f59694a4b62b0def462fada7cc4ae1·...·]-31">}</span><span·class="p">,</span><span·class="w">276 ··</span><span·class="p"·data-group-id="9792855597-31">{</span><span·class="p"·data-group-id="9792855597-32">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">i32</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9792855597-32">}[·...·truncated·by·diffoscope;·len:·301,·SHA:·6c4a81806077e9eae8c5ed40c49d43753d72a1f9aa353a8c39f355a1de00c1b9·...·]-31">}</span><span·class="p">,</span><span·class="w">
277 ··</span><span·class="p"·data-group-id="9090200450-33">{</span><span·class="p"·data-group-id="9090200450-34">{</span><span·class="ss">fprof</span><span·class="p">,</span><span·class="ss">apply_start_stop</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9090200[·...·truncated·by·diffoscope;·len:·355,·SHA:·9982f56865be439a00832905d5e0049285bba6688f0b2b0646362a05dc8030df·...·]-2">]</span><span·class="p">,</span><span·class="w">277 ··</span><span·class="p"·data-group-id="9792855597-33">{</span><span·class="p"·data-group-id="9792855597-34">{</span><span·class="ss">fprof</span><span·class="p">,</span><span·class="ss">apply_start_stop</span><span·class="p">,</span><span·class="mi">4</span><span·class="p"·data-group-id="9792855[·...·truncated·by·diffoscope;·len:·355,·SHA:·d042226889b9bcdd1cfda6dff0e61f8bfb8dcd8e6796995f39b116634dd98158·...·]-2">]</span><span·class="p">,</span><span·class="w">
278 ·</span><span·class="p"·data-group-id="9090200450-35">{</span><span·class="w">·</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">·····························</span><span·class="mi">299</span><span·class="p">,</span><span·class="w">···</span><span·class="mf">32.002</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·a6d51541e88d0f6c9a1c3162c18ef05776082659cef01b1eb76844de6a17bebd·...·]-35">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">278 ·</span><span·class="p"·data-group-id="9792855597-35">{</span><span·class="w">·</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">·····························</span><span·class="mi">299</span><span·class="p">,</span><span·class="w">···</span><span·class="mf">32.002</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·5cc370d9e82670f90aadb0dd84662f4a87f87c91aa9f402a057a9741013320d8·...·]-35">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">
279 ·</span><span·class="p"·data-group-id="9090200450-36">[</span><span·class="w">·</span><span·class="p"·data-group-id="9090200450-36">]</span><span·class="p"·data-group-id="9090200450-1">}</span><span·class="p">.</span></code></pre><p>We·find·no·particularly·long·suspend·times,·so·no·function·seems·to·have·waited279 ·</span><span·class="p"·data-group-id="9792855597-36">[</span><span·class="w">·</span><span·class="p"·data-group-id="9792855597-36">]</span><span·class="p"·data-group-id="9792855597-1">}</span><span·class="p">.</span></code></pre><p>We·find·no·particularly·long·suspend·times,·so·no·function·seems·to·have·waited
280 in·a·receive·statement.·Actually,·<code·class="inline">prim_file:drv_command/4</code>·contains·a·receive280 in·a·receive·statement.·Actually,·<code·class="inline">prim_file:drv_command/4</code>·contains·a·receive
281 statement,·but·in·this·test·program,·the·message·lies·in·the·process·receive281 statement,·but·in·this·test·program,·the·message·lies·in·the·process·receive
282 buffer·when·the·receive·statement·is·entered.·We·also·see·that·the·total·suspend282 buffer·when·the·receive·statement·is·entered.·We·also·see·that·the·total·suspend
283 time·for·the·test·run·is·small.</p><p>The·<code·class="inline">suspend</code>·pseudo·function·has·an·<code·class="inline">OWN</code>·time·of·zero.·This·is·to·prevent283 time·for·the·test·run·is·small.</p><p>The·<code·class="inline">suspend</code>·pseudo·function·has·an·<code·class="inline">OWN</code>·time·of·zero.·This·is·to·prevent
284 the·process·total·<code·class="inline">OWN</code>·time·from·including·time·in·suspension.·Whether·suspend284 the·process·total·<code·class="inline">OWN</code>·time·from·including·time·in·suspension.·Whether·suspend
285 time·is·really·<code·class="inline">ACC</code>·or·<code·class="inline">OWN</code>·time·is·more·of·a·philosophical·question.</p><p>Now·we·look·at·another·interesting·pseudo·function,·<code·class="inline">garbage_collect</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1472966802-1">{</span><span·class="p"·data-group-id="1472966802-2">[</span><span·class="p"·data-group-id="1472966802-3">{</span><span·class="p"·data-group-id="1472966802-4">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">d[·...·truncated·by·diffoscope;·len:·405,·SHA:·5d7dd3d77ef2fb3f82d038677f3331d14aa4dea06e5d236d35beec9329fbcf31·...·]-3">}</span><span·class="p">,</span><span·class="w">285 time·is·really·<code·class="inline">ACC</code>·or·<code·class="inline">OWN</code>·time·is·more·of·a·philosophical·question.</p><p>Now·we·look·at·another·interesting·pseudo·function,·<code·class="inline">garbage_collect</code>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8346185988-1">{</span><span·class="p"·data-group-id="8346185988-2">[</span><span·class="p"·data-group-id="8346185988-3">{</span><span·class="p"·data-group-id="8346185988-4">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">d[·...·truncated·by·diffoscope;·len:·405,·SHA:·9fb8fe6757cf9657a23337021d135742ffaa8adfb6ec1a3eff3ea4e5adc9159f·...·]-3">}</span><span·class="p">,</span><span·class="w">
286 ··</span><span·class="p"·data-group-id="1472966802-5">{</span><span·class="p"·data-group-id="1472966802-6">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1472966802-6">}[·...·truncated·by·diffoscope;·len:·299,·SHA:·5d8503205ea4874d70ae470f5ebe0edd31091a8999b467ffaee575a75a3880a2·...·]-5">}</span><span·class="p">,</span><span·class="w">286 ··</span><span·class="p"·data-group-id="8346185988-5">{</span><span·class="p"·data-group-id="8346185988-6">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8346185988-6">}[·...·truncated·by·diffoscope;·len:·299,·SHA:·6666b7e9868129d3428ec900343e1407470c6b3f93b3b34f00087e949a0c3eb7·...·]-5">}</span><span·class="p">,</span><span·class="w">
287 ··</span><span·class="p"·data-group-id="1472966802-7">{</span><span·class="p"·data-group-id="1472966802-8">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">map</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="1472966802-8">}</span[·...·truncated·by·diffoscope;·len:·352,·SHA:·7c9ee3a585e30c3586b0d97010e43b6114cf2d22582692a39f83b22bd40877dd·...·]-2">]</span><span·class="p">,</span><span·class="w">287 ··</span><span·class="p"·data-group-id="8346185988-7">{</span><span·class="p"·data-group-id="8346185988-8">{</span><span·class="ss">lists</span><span·class="p">,</span><span·class="ss">map</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="8346185988-8">}</span[·...·truncated·by·diffoscope;·len:·352,·SHA:·d661617842827cf7daab37227c12beb6ef090646d364130a3707a55ba794e0c8·...·]-2">]</span><span·class="p">,</span><span·class="w">
288 ·</span><span·class="p"·data-group-id="1472966802-9">{</span><span·class="w">·</span><span·class="nb">garbage_collect</span><span·class="p">,</span><span·class="w">······················</span><span·class="mi">43</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">1.760</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·8c7645274b6fdddccb2b3ae87641817f705bd86648c5cfb79fd8df2eadd8e366·...·]-9">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">288 ·</span><span·class="p"·data-group-id="8346185988-9">{</span><span·class="w">·</span><span·class="nb">garbage_collect</span><span·class="p">,</span><span·class="w">······················</span><span·class="mi">43</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">1.760</s[·...·truncated·by·diffoscope;·len:·125,·SHA:·5ce86a0083a42aef9f6e0da89b8a00fd7456726be98abd5d10ab11b3a5a1b66f·...·]-9">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">
289 ·</span><span·class="p"·data-group-id="1472966802-10">[</span><span·class="w">·</span><span·class="p"·data-group-id="1472966802-10">]</span><span·class="p"·data-group-id="1472966802-1">}</span><span·class="p">.</span></code></pre><p>Here·we·see·that·no·function·stands·out,·which·is·very·normal.</p><p>The·<code·class="inline">garbage_collect</code>·pseudo·function·has·not·an·<code·class="inline">OWN</code>·time·of·zero·like289 ·</span><span·class="p"·data-group-id="8346185988-10">[</span><span·class="w">·</span><span·class="p"·data-group-id="8346185988-10">]</span><span·class="p"·data-group-id="8346185988-1">}</span><span·class="p">.</span></code></pre><p>Here·we·see·that·no·function·stands·out,·which·is·very·normal.</p><p>The·<code·class="inline">garbage_collect</code>·pseudo·function·has·not·an·<code·class="inline">OWN</code>·time·of·zero·like
290 <code·class="inline">suspend</code>,·instead·it·is·equal·to·the·<code·class="inline">ACC</code>·time.</p><p>Garbage·collection·often·occurs·while·a·process·is·suspended,·but·<code·class="inline">fprof</code>·hides290 <code·class="inline">suspend</code>,·instead·it·is·equal·to·the·<code·class="inline">ACC</code>·time.</p><p>Garbage·collection·often·occurs·while·a·process·is·suspended,·but·<code·class="inline">fprof</code>·hides
291 this·fact·by·pretending·that·the·suspended·function·was·first·unsuspended·and291 this·fact·by·pretending·that·the·suspended·function·was·first·unsuspended·and
292 then·garbage·collected.·Otherwise·the·printout·would·show·<code·class="inline">garbage_collect</code>292 then·garbage·collected.·Otherwise·the·printout·would·show·<code·class="inline">garbage_collect</code>
293 being·called·from·<code·class="inline">suspend</code>,·but·not·which·function·that·might·have·caused·the293 being·called·from·<code·class="inline">suspend</code>,·but·not·which·function·that·might·have·caused·the
294 garbage·collection.</p><p>Let·us·now·get·back·to·the·test·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9809405657-1">{</span><span·class="p"·data-group-id="9809405657-2">[</span><span·class="p"·data-group-id="9809405657-3">{</span><span·class="p"·data-group-id="9809405657-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_[·...·truncated·by·diffoscope;·len:·405,·SHA:·b82f8806ba22062c17a5425520b2967dc8e6af0d0e4a5ac2296fae352eb78b93·...·]-3">}</span><span·class="p">,</span><span·class="w">294 garbage·collection.</p><p>Let·us·now·get·back·to·the·test·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5295843629-1">{</span><span·class="p"·data-group-id="5295843629-2">[</span><span·class="p"·data-group-id="5295843629-3">{</span><span·class="p"·data-group-id="5295843629-4">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_[·...·truncated·by·diffoscope;·len:·405,·SHA:·ae68a99695e578c4cf7687804de14a3f02efa7ce0a32f8712e72f59bf8219bbc·...·]-3">}</span><span·class="p">,</span><span·class="w">
295 ··</span><span·class="p"·data-group-id="9809405657-5">{</span><span·class="p"·data-group-id="9809405657-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="9809405657[·...·truncated·by·diffoscope;·len:·352,·SHA:·02081eddaf61fc76bb440baa706f841b70ad798f6aa88d0ecc2752b5f3415f9c·...·]-2">]</span><span·class="p">,</span><span·class="w">295 ··</span><span·class="p"·data-group-id="5295843629-5">{</span><span·class="p"·data-group-id="5295843629-6">{</span><span·class="ss">foo</span><span·class="p">,</span><span·class="ss">create_file_slow</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="5295843629[·...·truncated·by·diffoscope;·len:·352,·SHA:·2cf8ccef6a3747d08246976915d0a5f147e5a44871159b87a7d9782532413c7f·...·]-2">]</span><span·class="p">,</span><span·class="w">
296 ·</span><span·class="p"·data-group-id="9809405657-7">{</span><span·class="w">·</span><span·class="p"·data-group-id="9809405657-8">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·323,·SHA:·79c5ddfb5a395f5f3ea70cfcd3152abf247558e21beb7441d6d50c9b226896aa·...·]-7">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">296 ·</span><span·class="p"·data-group-id="5295843629-7">{</span><span·class="w">·</span><span·class="p"·data-group-id="5295843629-8">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·323,·SHA:·d67b666bb9a51936c896bcc918196c0b83e55cea6fe5d505efa2471251c4cac5·...·]-7">}</span><span·class="p">,</span><span·class="w">·····</span><span·class="c1">%</span><span·class="w">
297 ·</span><span·class="p"·data-group-id="9809405657-9">[</span><span·class="p"·data-group-id="9809405657-10">{</span><span·class="p"·data-group-id="9809405657-11">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·355,·SHA:·0e533a96fc9a99df6b7f51a69d5b7224d09a95f0a8dc5aae1d8a33a48ac362a8·...·]-10">}</span><span·class="p">,</span><span·class="w">297 ·</span><span·class="p"·data-group-id="5295843629-9">[</span><span·class="p"·data-group-id="5295843629-10">{</span><span·class="p"·data-group-id="5295843629-11">{</span><span·class="ss">prim_file</span><span·class="p">,</span><span·class="ss">write</span><span·class="p">,</span><span·class="mi"[·...·truncated·by·diffoscope;·len:·355,·SHA:·1cd0c0aaac121764f1a9ba8ec960f6e679f3966d9eeaae25a490279e0ac39f7f·...·]-10">}</span><span·class="p">,</span><span·class="w">
298 ··</span><span·class="p"·data-group-id="9809405657-12">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">······························</span><span·class="mi">53</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">6.281</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·209,·SHA:·cf681791f8358317c4311fb3f02aed3936c0a0cef1ef6ec1b6888cd4be25d635·...·]-1">}</span><span·class="p">.</span></code></pre><p>Not·unexpectedly,·we·see·that·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>·was·called·from298 ··</span><span·class="p"·data-group-id="5295843629-12">{</span><span·class="ss">suspend</span><span·class="p">,</span><span·class="w">······························</span><span·class="mi">53</span><span·class="p">,</span><span·class="w">····</span><span·class="mf">6.281</span><span·class="p">,</[·...·truncated·by·diffoscope;·len:·209,·SHA:·c8e18a1caf3c2c1da0c8843fdee78b374a46686965c08490c6848234e2607e3c·...·]-1">}</span><span·class="p">.</span></code></pre><p>Not·unexpectedly,·we·see·that·<a·href="../../../../lib/kernel-10.0.1/doc/html/file.html#write/2"><code·class="inline">file:write/2</code></a>·was·called·from
Max diff block lines reached; 45366/138486 bytes (32.76%) of diff not shown.
3.97 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/fprof_chapter.html
    
Offset 172, 18 lines modifiedOffset 172, 18 lines modified
172 ··<a·href="#immediate-profiling"·class="hover-link">172 ··<a·href="#immediate-profiling"·class="hover-link">
173 ····<i·class="ri-link-m"·aria-hidden="true"></i>173 ····<i·class="ri-link-m"·aria-hidden="true"></i>
174 ··</a>174 ··</a>
175 ··<span·class="text">Immediate·profiling</span>175 ··<span·class="text">Immediate·profiling</span>
176 </h2>176 </h2>
177 <p>It·is·also·possible·to·trace·immediately·into·the·profiling·process·that·creates177 <p>It·is·also·possible·to·trace·immediately·into·the·profiling·process·that·creates
178 the·raw·profile·data,·that·is·to·short·circuit·the·tracing·and·profiling·steps178 the·raw·profile·data,·that·is·to·short·circuit·the·tracing·and·profiling·steps
179 so·that·the·filesystem·is·not·used·for·tracing.</p><p>Do·something·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1665020662-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tracer</span><span·class="p"·data-group-id="1665020662-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·201,·SHA:·1a098a5d20b670a70f07f1cedd713c4e0766b0a5f2a557fe3102719bee37e8e7·...·]-2">)</span><span·class="p">,</span><span·class="w">179 so·that·the·filesystem·is·not·used·for·tracing.</p><p>Do·something·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9112445639-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tracer</span><span·class="p"·data-group-id="9112445639-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·[·...·truncated·by·diffoscope;·len:·201,·SHA:·368076e2ba965123bad8b2ca54a3e674893fd037c5cf6a4ed3bd089abaf16a83·...·]-2">)</span><span·class="p">,</span><span·class="w">
180 </span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="1665020662-3">(</span><span·class="p"·data-group-id="1665020662-4">[</span><span·class="ss">start</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="1665020662-5">{</span><span·class="ss">tracer</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·203,·SHA:·0ca1786d3f04174c12a9e4e3ae1dc7b5913b31663b2a816d7e8982c2f49c33c2·...·]-3">)</span><span·class="p">,</span><span·class="w">180 </span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="9112445639-3">(</span><span·class="p"·data-group-id="9112445639-4">[</span><span·class="ss">start</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9112445639-5">{</span><span·class="ss">tracer</span><span·class="p">,</sp[·...·truncated·by·diffoscope;·len:·203,·SHA:·9c3dee767db1029920c507f8e7900109b923824b20003b4e0a89c86ea07b1307·...·]-3">)</span><span·class="p">,</span><span·class="w">
181 </span><span·class="c1">%%·Run·code·to·profile</span><span·class="w">181 </span><span·class="c1">%%·Run·code·to·profile</span><span·class="w">
182 </span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="1665020662-6">(</span><span·class="ss">stop</span><span·class="p"·data-group-id="1665020662-6">)</span><span·class="p">;</span></code></pre><p>This·puts·less·load·on·the·filesystem,·but·much·more·load·on·the·Erlang·runtime182 </span><span·class="nc">fprof</span><span·class="p">:</span><span·class="nf">trace</span><span·class="p"·data-group-id="9112445639-6">(</span><span·class="ss">stop</span><span·class="p"·data-group-id="9112445639-6">)</span><span·class="p">;</span></code></pre><p>This·puts·less·load·on·the·filesystem,·but·much·more·load·on·the·Erlang·runtime
183 system.</p>183 system.</p>
184 </div>184 </div>
  
185 <div·class="bottom-actions"·id="bottom-actions">185 <div·class="bottom-actions"·id="bottom-actions">
186 ··<div·class="bottom-actions-item">186 ··<div·class="bottom-actions-item">
  
187 ······<a·href="erlang_mode_chapter.html"·class="bottom-actions-button"·rel="prev">187 ······<a·href="erlang_mode_chapter.html"·class="bottom-actions-button"·rel="prev">
57.3 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/lcnt_chapter.html
    
Offset 229, 28 lines modifiedOffset 229, 28 lines modified
229 ··&lt;nonode@nohost.104.0&gt;····5140··········0.7782········108229 ··&lt;nonode@nohost.104.0&gt;····5140··········0.7782········108
230 ok</code></pre><h2·id="example-with-mnesia-transaction-benchmark"·class="section-heading">230 ok</code></pre><h2·id="example-with-mnesia-transaction-benchmark"·class="section-heading">
231 ··<a·href="#example-with-mnesia-transaction-benchmark"·class="hover-link">231 ··<a·href="#example-with-mnesia-transaction-benchmark"·class="hover-link">
232 ····<i·class="ri-link-m"·aria-hidden="true"></i>232 ····<i·class="ri-link-m"·aria-hidden="true"></i>
233 ··</a>233 ··</a>
234 ··<span·class="text">Example·with·Mnesia·Transaction·Benchmark</span>234 ··<span·class="text">Example·with·Mnesia·Transaction·Benchmark</span>
235 </h2>235 </h2>
236 <p>From·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">27</span><span·class="w">·</span><span·class="p"·data-group-id="3277338810-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">15.0</span><span·class="p"·data-group-id="3277338810-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="3277338810-2">[</span><span·class="mi">64</spa[·...·truncated·by·diffoscope;·len:·1287,·SHA:·dd244853c4866ff8203cd699dd1d8d2f4238c103665ddc4c845094ef31d04455·...·]-7">]</span><span·class="w">236 <p>From·the·Erlang·shell:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Erlang</span><span·class="o">/</span><span·class="n">OTP</span><span·class="w">·</span><span·class="mi">27</span><span·class="w">·</span><span·class="p"·data-group-id="2420128815-1">[</span><span·class="ss">erts</span><span·class="o">-</span><span·class="mf">15.0</span><span·class="p"·data-group-id="2420128815-1">]</span><span·class="w">·</span><span·class="p"·data-group-id="2420128815-2">[</span><span·class="mi">64</spa[·...·truncated·by·diffoscope;·len:·1287,·SHA:·4482451a4ff09c7dbc8ba7b11aea676e731f938480a5f95548f7eebfd5e23eda·...·]-7">]</span><span·class="w">
  
237 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V15</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="3277338810-8">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·399,·SHA:·23843cbbbea9cc9a08664d43588204bca5a82353110f8078a27c300f1599dd88·...·]-8">)</span><span·class="gp·unselectable">237 </span><span·class="n">Eshell</span><span·class="w">·</span><span·class="n">V15</span><span·class="p">.</span><span·class="mi">0</span><span·class="w">·</span><span·class="p"·data-group-id="2420128815-8">(</span><span·class="ss">press</span><span·class="w">·</span><span·class="n">Ctrl</span><span·class="o">+</span><span·class="n">G</span><span·class="w">·</span><span·class="ss">to</span><span·class="w">·</span><span·class="ss">abort</span><sp[·...·truncated·by·diffoscope;·len:·399,·SHA:·77d3b50d3ed7a92e56229dfd761a42d20df3c11fee44864eb662db3a331022d5·...·]-8">)</span><span·class="gp·unselectable">
238 1&gt;·</span><span·class="n">Conf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="3277338810-10">[</span><span·class="p"·data-group-id="3277338810-11">{</span><span·class="ss">db_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3277338810-12">[</span><span·class="nf">node</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·1155,·SHA:·c05e3bbc57a2c75a73bd85313077947d3f0531877fb223c54daa7921563eb8b6·...·]-17">}</span><span·class="p">,</span><span·class="w">238 1&gt;·</span><span·class="n">Conf</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="2420128815-10">[</span><span·class="p"·data-group-id="2420128815-11">{</span><span·class="ss">db_nodes</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2420128815-12">[</span><span·class="nf">node</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·1155,·SHA:·2ed99a12da720a51e1ce23c005a3d8e9a06221a55e9286f0ad30be1cd493ddd3·...·]-17">}</span><span·class="p">,</span><span·class="w">
239 ····</span><span·class="p"·data-group-id="3277338810-20">{</span><span·class="ss">n_drivers_per_node</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p"·data-group-id="3277338810-20">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"[·...·truncated·by·diffoscope;·len:·465,·SHA:·df85e110e562f05343f02cb9f06f305b48247468bd34357bac1a79465db1d146·...·]-22">}</span><span·class="p">,</span><span·class="w">239 ····</span><span·class="p"·data-group-id="2420128815-20">{</span><span·class="ss">n_drivers_per_node</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">10</span><span·class="p"·data-group-id="2420128815-20">}</span><span·class="p">,</span><span·class="w">·</span><span·class="p"[·...·truncated·by·diffoscope;·len:·465,·SHA:·ae201bbb326faadd33e203f5ec2dc698424292f113b53a9170010db050a2dfd9·...·]-22">}</span><span·class="p">,</span><span·class="w">
240 ····</span><span·class="p"·data-group-id="3277338810-23">{</span><span·class="ss">replica_type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ram_copies</span><span·class="p"·data-group-id="3277338810-23">}</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·519,·SHA:·15be5f5258d37a569d25e760af9032d19e9987abc3f4be087d672aac2b468ead·...·]-10">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">240 ····</span><span·class="p"·data-group-id="2420128815-23">{</span><span·class="ss">replica_type</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ram_copies</span><span·class="p"·data-group-id="2420128815-23">}</span><span·class="p">,</span><span·class="w">·</span><span·class="[·...·truncated·by·diffoscope;·len:·519,·SHA:·3a66f3e3f0bcb9c2020f81c223255de194a125f1823288d6f47bfab7ca12a920·...·]-10">]</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">
241 </span><span·class="ss">ok</span><span·class="gp·unselectable">241 </span><span·class="ss">ok</span><span·class="gp·unselectable">
242 2&gt;·</span><span·class="nc">mnesia_tpcb</span><span·class="p">:</span><span·class="nf">init</span><span·class="p"·data-group-id="3277338810-26">(</span><span·class="p"·data-group-id="3277338810-27">[</span><span·class="p"·data-group-id="3277338810-28">{</span><span·class="ss">use_running_mnesia</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·[·...·truncated·by·diffoscope;·len:·194,·SHA:·76e8d310faf9ad56a368db790b2f814bd2b3553c82ecfd1006a1e5ed80afbeaa·...·]-26">)</span><span·class="p">.</span><span·class="w">242 2&gt;·</span><span·class="nc">mnesia_tpcb</span><span·class="p">:</span><span·class="nf">init</span><span·class="p"·data-group-id="2420128815-26">(</span><span·class="p"·data-group-id="2420128815-27">[</span><span·class="p"·data-group-id="2420128815-28">{</span><span·class="ss">use_running_mnesia</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">false</span><span·[·...·truncated·by·diffoscope;·len:·194,·SHA:·ff96b00d5c95c09cd09d136e5992eccf55c4f94c161db2ae27a8b7d6671058d4·...·]-26">)</span><span·class="p">.</span><span·class="w">
243 ····</span><span·class="p">.</span><span·class="w">243 ····</span><span·class="p">.</span><span·class="w">
244 ····</span><span·class="p">.</span><span·class="w">244 ····</span><span·class="p">.</span><span·class="w">
245 ····</span><span·class="p">.</span><span·class="w">245 ····</span><span·class="p">.</span><span·class="w">
246 </span><span·class="ss">ignore</span></code></pre><p>Initial·configuring·of·the·benchmark·is·done.·It·is·time·to·profile·the·actual246 </span><span·class="ss">ignore</span></code></pre><p>Initial·configuring·of·the·benchmark·is·done.·It·is·time·to·profile·the·actual
247 Mnesia·benchmark:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">lcnt</span><span·class="p">:</span><span·class="nf">apply</span><span·class="p"·data-group-id="6836413339-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6836413339-2">(</span><span·class="p"·data-group-id="6836413339-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·836,·SHA:·b5e0ce43e3d9d5fc45fa1990522f8628354e3d540f60c0bfc12ba14e62206f81·...·]-7">{</span><span·class="ss">use_running_mnesia</span><span·class="p">,</span><span·class="w">247 Mnesia·benchmark:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="nc">lcnt</span><span·class="p">:</span><span·class="nf">apply</span><span·class="p"·data-group-id="1636123738-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1636123738-2">(</span><span·class="p"·data-group-id="1636123738-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="p"·data-grou[·...·truncated·by·diffoscope;·len:·836,·SHA:·a52f6aadd19e83861312069bf7933776d53d914b2770b2fdb5be453bee7205ff·...·]-7">{</span><span·class="ss">use_running_mnesia</span><span·class="p">,</span><span·class="w">
248 ····</span><span·class="ss">true</span><span·class="p"·data-group-id="6836413339-7">}</span><span·class="p">|</span><span·class="n">Conf</span><span·class="p"·data-group-id="6836413339-6">]</span><span·class="p"·data-group-id="6836413339-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tps</span><sp[·...·truncated·by·diffoscope;·len:·138,·SHA:·852b63f8218b744b2dd2b6859c7feb77c8c3a5b2b19e5551b18934a12f6b7801·...·]-1">)</span><span·class="p">.</span><span·class="w">248 ····</span><span·class="ss">true</span><span·class="p"·data-group-id="1636123738-7">}</span><span·class="p">|</span><span·class="n">Conf</span><span·class="p"·data-group-id="1636123738-6">]</span><span·class="p"·data-group-id="1636123738-5">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tps</span><sp[·...·truncated·by·diffoscope;·len:·138,·SHA:·fd907e5de5c26402dc7aaf2f917dcf867095fe4495707075d730cfb7ee4734b3·...·]-1">)</span><span·class="p">.</span><span·class="w">
249 ······</span><span·class="p">.</span><span·class="w">249 ······</span><span·class="p">.</span><span·class="w">
250 ······</span><span·class="p">.</span><span·class="w">250 ······</span><span·class="p">.</span><span·class="w">
251 ······</span><span·class="p">.</span><span·class="w">251 ······</span><span·class="p">.</span><span·class="w">
252 </span><span·class="mf">50204.666666666664</span></code></pre><p>The·benchmark·runs·for·60·seconds·(followed·by·verification·and252 </span><span·class="mf">50204.666666666664</span></code></pre><p>The·benchmark·runs·for·60·seconds·(followed·by·verification·and
253 analysis),·and·then·returns·the·number·of·transactions·per·seconds.</p><pre><code·class="text">4&gt;·lcnt:swap_pid_keys().253 analysis),·and·then·returns·the·number·of·transactions·per·seconds.</p><pre><code·class="text">4&gt;·lcnt:swap_pid_keys().
254 ok254 ok
255 5&gt;·lcnt:conflicts().255 5&gt;·lcnt:conflicts().
Offset 346, 71 lines modifiedOffset 346, 71 lines modified
346 problematic·if·they·begin·to·have·conflicts·even·if·it·is·not·shown·in·a346 problematic·if·they·begin·to·have·conflicts·even·if·it·is·not·shown·in·a
347 particular·test.</p><h2·id="the-big-bang-benchmark"·class="section-heading">347 particular·test.</p><h2·id="the-big-bang-benchmark"·class="section-heading">
348 ··<a·href="#the-big-bang-benchmark"·class="hover-link">348 ··<a·href="#the-big-bang-benchmark"·class="hover-link">
349 ····<i·class="ri-link-m"·aria-hidden="true"></i>349 ····<i·class="ri-link-m"·aria-hidden="true"></i>
350 ··</a>350 ··</a>
351 ··<span·class="text">The·Big·Bang·Benchmark</span>351 ··<span·class="text">The·Big·Bang·Benchmark</span>
352 </h2>352 </h2>
353 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="4724502230-1">(</span><span·class="ss">big</span><span·class="p"·data-group-id="4724502230-1">)</span><span·class="p">.</span><span·class="w">353 <pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7556882023-1">(</span><span·class="ss">big</span><span·class="p"·data-group-id="7556882023-1">)</span><span·class="p">.</span><span·class="w">
354 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="4724502230-2">(</span><span·class="p"·data-group-id="4724502230-3">[</span><span·class="ss">bang</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="4724502230-3">]</span><span·class="p"·data-group-id="4724502230-2">)</span><span·class="p">.</span><span·class="w">354 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7556882023-2">(</span><span·class="p"·data-group-id="7556882023-3">[</span><span·class="ss">bang</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="7556882023-3">]</span><span·class="p"·data-group-id="7556882023-2">)</span><span·class="p">.</span><span·class="w">
  
355 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-4">(</span><span·class="p"·data-group-id="4724502230-5">[</span><span·class="p"·data-group-id="4724502230-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-6">[</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·143,·SHA:·b6094627457e61c31efd2a70fa83ef0ce8b86042d62b7e649c713d862bac0836·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">355 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-4">(</span><span·class="p"·data-group-id="7556882023-5">[</span><span·class="p"·data-group-id="7556882023-5">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-6">[</span><span·class="p"·data-group-[·...·truncated·by·diffoscope;·len:·143,·SHA:·0627ee0dc390b390caef2fe6c5a783a4bffbc7243980bcb87976e9fc5d4527a7·...·]-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
356 ····</span><span·class="k">receive</span><span·class="w">356 ····</span><span·class="k">receive</span><span·class="w">
357 »       </span><span·class="p"·data-group-id="4724502230-7">{</span><span·class="ss">procs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Procs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReportTo</span><span·class="p"·data-group-id="4724502230-7">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w"> 
358 »       ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-8">(</span><span·class="n">Procs</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-9">[</span><span·class="p"·data-group-id="47[·...·truncated·by·diffoscope;·len:·145,·SHA:·e77810c0476415f03756761f17beea9e42d5e6c7050a58720b800978efc9369b·...·]</span><span·class="w">357 »       </span><span·class="p"·data-group-id="7556882023-7">{</span><span·class="ss">procs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Procs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReportTo</span><span·class=[·...·truncated·by·diffoscope;·len:·86,·SHA:·76435399e9314803890d9fe1a46b10baaddb718941be94cf4a545a4ba5e238c7·...·]</span><span·class="w">
 358 »       ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-8">(</span><span·class="n">Procs</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-9">[</span><span·class="p"·data-group-id="7556882023-9">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReportTo</span><span·class="p"·data-group-id="7556882023-8">)</span><span·class="w">
359 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">359 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
360 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-10">(</span><span·class="p"·data-group-id="4724502230-11">[</span><span·class="p"·data-group-id="4724502230-11">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-12">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·149,·SHA:·419e262f156feb8d08afb3f93bcb4b0772d4ca0545f826d41206cca835a68116·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">360 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-10">(</span><span·class="p"·data-group-id="7556882023-11">[</span><span·class="p"·data-group-id="7556882023-11">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-12">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·149,·SHA:·0a086e6a1c356d3995065fda8c924d80126079a002cf3adaf819e8123329fe48·...·]-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
361 ····</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-13">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="4724502230-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·406,·SHA:·7d0e5d1ae6c41249fc47e18cb143376d0dcec1df13400982e38f951beb5b18b6·...·]-14">}</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">361 ····</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-13">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="7556882023-13">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·406,·SHA:·ad3b57dae3804fe6bf477cb1847a262fa5023bc407c1c70921072d5480d7241c·...·]-14">}</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
362 ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-16">(</span><span·class="p"·data-group-id="4724502230-17">[</span><span·class="p"·data-group-id="4724502230-17">]</span><span·class="p">,</span><span·class="p"·data-group-id="4724502230-18">[</span><span·class="p"·data-group-id="4724502230-18">][·...·truncated·by·diffoscope;·len:·101,·SHA:·e6f5fd100b7960f30df60e258b78b0b21bea7d54c526d43c91c00b38cf36d7a4·...·]-16">)</span><span·class="p">;</span><span·class="w">362 ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-16">(</span><span·class="p"·data-group-id="7556882023-17">[</span><span·class="p"·data-group-id="7556882023-17">]</span><span·class="p">,</span><span·class="p"·data-group-id="7556882023-18">[</span><span·class="p"·data-group-id="7556882023-18">][·...·truncated·by·diffoscope;·len:·101,·SHA:·3a37155308938ce017bf02fd7c66a74c7283d736fe72dc73b6851313e41db65e·...·]-16">)</span><span·class="p">;</span><span·class="w">
363 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-19">(</span><span·class="p"·data-group-id="4724502230-20">[</span><span·class="p"·data-group-id="4724502230-20">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-21">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·151,·SHA:·df953e4da31c37fddffe5a76502261b04eea39f7f028c6dbe8ce9e9781b862cc·...·]-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">363 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-19">(</span><span·class="p"·data-group-id="7556882023-20">[</span><span·class="p"·data-group-id="7556882023-20">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-21">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·151,·SHA:·2e664b5d7eb03fc8ec46adf80831901351eedcc7682beda8ea04bce11d86d807·...·]-19">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
364 ····</span><span·class="n">ReportTo</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-22">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="4724502230-23">(</span><span·class="p"·data-group-id="4724502230-23">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·5001d354c1f036fed3dc34bcdb9e0a1b764fa6ec8365f56a7149e57394234497·...·]-22">}</span><span·class="p">,</span><span·class="w">364 ····</span><span·class="n">ReportTo</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-22">{</span><span·class="ss">done</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7556882023-23">(</span><span·class="p"·data-group-id="7556882023-23">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·cd44ba45f020aef688c508a6e69c7b9fe19ff84eb68667f0a9799487d797a9fb·...·]-22">}</span><span·class="p">,</span><span·class="w">
365 ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-24">(</span><span·class="p"·data-group-id="4724502230-25">[</span><span·class="p"·data-group-id="4724502230-25">]</span><span·class="p">,</span><span·class="p"·data-group-id="4724502230-26">[</span><span·class="p"·data-group-id="4724502230-26">]</span><span·class="p">,</span><span·class="ss">false</span><span·class="p"·data-group-id="4724502230-24">)</span><span·class="p">;</span><span·class="w"> 
366 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-27">(</span><span·class="p"·data-group-id="4724502230-28">[</span><span·class="p"·data-group-id="4724502230-28">]</span><span·class="p">,</span><span·class="w">·</span><span·cla[·...·truncated·by·diffoscope;·len:·453,·SHA:·f1050bc72131e469b10c9e8c4ddc50be7f83cce2b7af52e6355ab113712b6d41·...·];</span><span·class="w">365 ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-24">(</span><span·class="p"·data-group-id="7556882023-25">[</span><span·class="p"·data-group-id="7556882023-25">]</span><span·class="p">,</span><span·class="p"·data-group-id[·...·truncated·by·diffoscope;·len:·202,·SHA:·6435d8a5692e63bfb71b49fd31948078494454766094e3fe1df5d7ca6848acb1·...·];</span><span·class="w">
 366 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-27">(</span><span·class="p"·data-group-id="7556882023-28">[</span><span·class="p"·data-group-id="7556882023-28">]</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-29">[</span><span·class="n">Po</span><span·class="p">|</span><span·class="n">Pos</span><span·class="p"·data-group-id="7556882023-29">]</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">Pongers</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReportTo</span><span·class="p"·data-group-id="7556882023-27">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
367 ····</span><span·class="k">receive</span><span·class="w">367 ····</span><span·class="k">receive</span><span·class="w">
368 »       </span><span·class="p"·data-group-id="4724502230-30">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="4724502230-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">368 »       </span><span·class="p"·data-group-id="7556882023-30">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="7556882023-30">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
369 »       ····</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-31">{</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="4724502230-32">(</span><span·class="p"·data-group-id="4724502230-32">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·5001d354c1f036fed3dc34bcdb9e0a1b764fa6ec8365f56a7149e57394234497·...·]-31">}</span><span·class="p">,</span><span·class="w">369 »       ····</span><span·class="n">From</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-31">{</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7556882023-32">(</span><span·class="p"·data-group-id="7556882023-32">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·cd44ba45f020aef688c508a6e69c7b9fe19ff84eb68667f0a9799487d797a9fb·...·]-31">}</span><span·class="p">,</span><span·class="w">
370 »       ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-33">(</span><span·class="p"·data-group-id="4724502230-34">[</span><span·class="p"·data-group-id="4724502230-34">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pongers</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReportTo</span><span·class="p"·data-group-id="4724502230-33">)</span><span·class="p">;</span><span·class="w"> 
371 »       </span><span·class="p"·data-group-id="4724502230-35">{</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Po</span><span·class="p"·data-group-id="4724502230-35">}</span><span·class="w">·</span><span·class="p">[·...·truncated·by·diffoscope;·len:·4,·SHA:·a12e3d05a0d1154352e53ac5689df7d784621a18b602fad08c64dad7c7402a1f·...·];</span><span·class="w">370 »       ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-33">(</span><span·class="p"·data-group-id="7556882023-34">[</span><span·class="p"·data-group-id="7556882023-34">]</span><span·class="p">,</span><span·class="w">·</span><span[·...·truncated·by·diffoscope;·len:·174,·SHA:·eae8882a89f97590556717b08ae3ed33129f6dbe370959c043ba0ed1e11ec694·...·];</span><span·class="w">
 371 »       </span><span·class="p"·data-group-id="7556882023-35">{</span><span·class="ss">pong</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Po</span><span·class="p"·data-group-id="7556882023-35">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
372 »       ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-36">(</span><span·class="p"·data-group-id="4724502230-37">[</span><span·class="p"·data-group-id="4724502230-37">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pos</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·f63ec1adc872cd66e36918df6fa2ed0b11ba4333ea52c4362b576ee213387ffd·...·]-36">)</span><span·class="w">372 »       ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-36">(</span><span·class="p"·data-group-id="7556882023-37">[</span><span·class="p"·data-group-id="7556882023-37">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Pos</span><span·class="p">,</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·69,·SHA:·b6d3aa0e53ccbe85221726aab6a93826dc8d39f53fea9a32b0af91920e9f080c·...·]-36">)</span><span·class="w">
373 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">373 ····</span><span·class="k">end</span><span·class="p">;</span><span·class="w">
374 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-38">(</span><span·class="p"·data-group-id="4724502230-39">[</span><span·class="n">Pi</span><span·class="p">|</span><span·class="n">Pis</span><span·class="p"·data-group-id="4724502230-39">]</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·148,·SHA:·eab1ca1a58a9328ce6b2907188709539a57b1389f1d87cc9764ce59e720761ad·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">374 </span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-38">(</span><span·class="p"·data-group-id="7556882023-39">[</span><span·class="n">Pi</span><span·class="p">|</span><span·class="n">Pis</span><span·class="p"·data-group-id="7556882023-39">]</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·148,·SHA:·a021cc89c9eab591cd488e6264af111edecbc44f75c9a5cce21b69fc0c2091b7·...·]-38">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
375 ····</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-40">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="4724502230-40">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·406,·SHA:·43fb4b1a2df39064d34dd6bd0469f7c1f8f4bdacef988d50aa28bde8a5428905·...·]-41">}</span><span·class="w">375 ····</span><span·class="k">receive</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-40">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="n">From</span><span·class="p"·data-group-id="7556882023-40">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·406,·SHA:·8d427a18d3992e2ce301ebf759404bdbc1cd71c7ddc9855d816ebda8ace44b8b·...·]-41">}</span><span·class="w">
376 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">376 ····</span><span·class="k">after</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="w">
377 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">377 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
378 ····</span><span·class="n">Pi</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-43">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="4724502230-44">(</span><span·class="p"·data-group-id="4724502230-44">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·5001d354c1f036fed3dc34bcdb9e0a1b764fa6ec8365f56a7149e57394234497·...·]-43">}</span><span·class="p">,</span><span·class="w">378 ····</span><span·class="n">Pi</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-43">{</span><span·class="ss">ping</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="7556882023-44">(</span><span·class="p"·data-group-id="7556882023-44">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·cd44ba45f020aef688c508a6e69c7b9fe19ff84eb68667f0a9799487d797a9fb·...·]-43">}</span><span·class="p">,</span><span·class="w">
379 ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="4724502230-45">(</span><span·class="n">Pis</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-46">[</span><span·class="n">Pi</span><span·class="p">|</span><span·class="n">Pongers</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·148,·SHA:·8e0c087a5c6c24b11a5cbc016309d52c930f89db75ad124e085fcc83ec755fff·...·]-45">)</span><span·class="p">.</span><span·class="w">379 ····</span><span·class="nf">pinger</span><span·class="p"·data-group-id="7556882023-45">(</span><span·class="n">Pis</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-46">[</span><span·class="n">Pi</span><span·class="p">|</span><span·class="n">Pongers</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·148,·SHA:·fae588913072b0a7c4b7ca7498f007b709d467208740279b4b6ea98fdbd1e64b·...·]-45">)</span><span·class="p">.</span><span·class="w">
  
380 </span><span·class="nf">spawn_procs</span><span·class="p"·data-group-id="4724502230-47">(</span><span·class="n">N</span><span·class="p"·data-group-id="4724502230-47">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">380 </span><span·class="nf">spawn_procs</span><span·class="p"·data-group-id="7556882023-47">(</span><span·class="n">N</span><span·class="p"·data-group-id="7556882023-47">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="n">N</span><span·class="w">·</span><span·class="o">=&lt;</span><span·class="w">·</span><span·class="mi">0</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
381 ····</span><span·class="p"·data-group-id="4724502230-48">[</span><span·class="p"·data-group-id="4724502230-48">]</span><span·class="p">;</span><span·class="w">381 ····</span><span·class="p"·data-group-id="7556882023-48">[</span><span·class="p"·data-group-id="7556882023-48">]</span><span·class="p">;</span><span·class="w">
382 </span><span·class="nf">spawn_procs</span><span·class="p"·data-group-id="4724502230-49">(</span><span·class="n">N</span><span·class="p"·data-group-id="4724502230-49">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">382 </span><span·class="nf">spawn_procs</span><span·class="p"·data-group-id="7556882023-49">(</span><span·class="n">N</span><span·class="p"·data-group-id="7556882023-49">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
383 ····</span><span·class="p"·data-group-id="4724502230-50">[</span><span·class="nf">spawn_link</span><span·class="p"·data-group-id="4724502230-51">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-52">(</span><span·class="p"·data-group-id="472450223[·...·truncated·by·diffoscope;·len:·953,·SHA:·eecf8b363551015708b247b08a7f7b0ce45d4fa9c5e372f863fcbdc15e2cef9d·...·]-50">]</span><span·class="p">.</span><span·class="w">383 ····</span><span·class="p"·data-group-id="7556882023-50">[</span><span·class="nf">spawn_link</span><span·class="p"·data-group-id="7556882023-51">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-52">(</span><span·class="p"·data-group-id="755688202[·...·truncated·by·diffoscope;·len:·953,·SHA:·14373748bdeed3705a20a47e8d46454160412bf127a93313deb40214834a7e03·...·]-50">]</span><span·class="p">.</span><span·class="w">
  
384 </span><span·class="nf">send_procs</span><span·class="p"·data-group-id="4724502230-57">(</span><span·class="p"·data-group-id="4724502230-58">[</span><span·class="p"·data-group-id="4724502230-58">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="4724502230-57">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">384 </span><span·class="nf">send_procs</span><span·class="p"·data-group-id="7556882023-57">(</span><span·class="p"·data-group-id="7556882023-58">[</span><span·class="p"·data-group-id="7556882023-58">]</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7556882023-57">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
385 ····</span><span·class="n">Msg</span><span·class="p">;</span><span·class="w">385 ····</span><span·class="n">Msg</span><span·class="p">;</span><span·class="w">
386 </span><span·class="nf">send_procs</span><span·class="p"·data-group-id="4724502230-59">(</span><span·class="p"·data-group-id="4724502230-60">[</span><span·class="n">P</span><span·class="p">|</span><span·class="n">Ps</span><span·class="p"·data-group-id="4724502230-60">]</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·63,·SHA:·786e250569cfa7c251dd87c35dadb2fc88671838e2fde0ba97d70452324e89bc·...·]-59">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">386 </span><span·class="nf">send_procs</span><span·class="p"·data-group-id="7556882023-59">(</span><span·class="p"·data-group-id="7556882023-60">[</span><span·class="n">P</span><span·class="p">|</span><span·class="n">Ps</span><span·class="p"·data-group-id="7556882023-60">]</span><span·class="p">,</span><span·class="w">·</span><spa[·...·truncated·by·diffoscope;·len:·63,·SHA:·474ad35584771df0b21b6ee720c038da56f074bff13e2da604fd2021b405dc1c·...·]-59">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
387 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">387 ····</span><span·class="n">P</span><span·class="w">·</span><span·class="o">!</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p">,</span><span·class="w">
388 ····</span><span·class="nf">send_procs</span><span·class="p"·data-group-id="4724502230-61">(</span><span·class="n">Ps</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="4724502230-61">)</span><span·class="p">.</span><span·class="w">388 ····</span><span·class="nf">send_procs</span><span·class="p"·data-group-id="7556882023-61">(</span><span·class="n">Ps</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7556882023-61">)</span><span·class="p">.</span><span·class="w">
  
389 </span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="4724502230-62">(</span><span·class="p"·data-group-id="4724502230-63">[</span><span·class="p"·data-group-id="4724502230-63">]</span><span·class="p"·data-group-id="4724502230-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">389 </span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="7556882023-62">(</span><span·class="p"·data-group-id="7556882023-63">[</span><span·class="p"·data-group-id="7556882023-63">]</span><span·class="p"·data-group-id="7556882023-62">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
390 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">390 ····</span><span·class="ss">ok</span><span·class="p">;</span><span·class="w">
391 </span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="4724502230-64">(</span><span·class="p"·data-group-id="4724502230-65">[</span><span·class="n">M</span><span·class="p">|</span><span·class="n">Ms</span><span·class="p"·data-group-id="4724502230-65">]</span><span·class="p"·data-group-id="4724502230-64">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">391 </span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="7556882023-64">(</span><span·class="p"·data-group-id="7556882023-65">[</span><span·class="n">M</span><span·class="p">|</span><span·class="n">Ms</span><span·class="p"·data-group-id="7556882023-65">]</span><span·class="p"·data-group-id="7556882023-64">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
392 ····</span><span·class="k">receive</span><span·class="w">392 ····</span><span·class="k">receive</span><span·class="w">
393 »       </span><span·class="n">M</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">393 »       </span><span·class="n">M</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
394 »       ····</span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="4724502230-66">(</span><span·class="n">Ms</span><span·class="p"·data-group-id="4724502230-66">)</span><span·class="w">394 »       ····</span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="7556882023-66">(</span><span·class="n">Ms</span><span·class="p"·data-group-id="7556882023-66">)</span><span·class="w">
395 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">395 ····</span><span·class="k">end</span><span·class="p">.</span><span·class="w">
  
396 </span><span·class="nf">bang</span><span·class="p"·data-group-id="4724502230-67">(</span><span·class="n">N</span><span·class="p"·data-group-id="4724502230-67">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="4724502230-68">(</[·...·truncated·by·diffoscope;·len:·70,·SHA:·37800eb679a0e328318a9a99ffe20cdfdf6d0333429a0c8dd1eac19e39d01597·...·]-68">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">396 </span><span·class="nf">bang</span><span·class="p"·data-group-id="7556882023-67">(</span><span·class="n">N</span><span·class="p"·data-group-id="7556882023-67">)</span><span·class="w">·</span><span·class="k">when</span><span·class="w">·</span><span·class="nf">integer</span><span·class="p"·data-group-id="7556882023-68">(</[·...·truncated·by·diffoscope;·len:·70,·SHA:·ccb1a54d38ade90dd0ee805c821bd2e8ec2ea645b4c66eefd1ec5a7c1557fdb3·...·]-68">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
397 ····</span><span·class="n">Procs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn_procs</span><span·class="p"·data-group-id="4724502230-69">(</span><span·class="n">N</span><span·class="p"·data-group-id="4724502230-69">)</span><span·class="p">,</span><span·class="w">397 ····</span><span·class="n">Procs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">spawn_procs</span><span·class="p"·data-group-id="7556882023-69">(</span><span·class="n">N</span><span·class="p"·data-group-id="7556882023-69">)</span><span·class="p">,</span><span·class="w">
398 ····</span><span·class="n">RMsgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="4724502230-70">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-71">(</span><span·class="n">P</span><span·class="p"·data-group-id="4724502230-71">)</span><span·class="w">·</span><span·class="p">-&gt;</spa[·...·truncated·by·diffoscope;·len:·401,·SHA:·422861f0fb9963cc073e4862de476d87ebab3551c8df911a3cf30efbeeaceabd·...·]-70">)</span><span·class="p">,</span><span·class="w">398 ····</span><span·class="n">RMsgs</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">map</span><span·class="p"·data-group-id="7556882023-70">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-71">(</span><span·class="n">P</span><span·class="p"·data-group-id="7556882023-71">)</span><span·class="w">·</span><span·class="p">-&gt;</spa[·...·truncated·by·diffoscope;·len:·401,·SHA:·0fc0a33c9287378dd97c1cb6600d84532d102f00b54d529cb64d7b003db3b82a·...·]-70">)</span><span·class="p">,</span><span·class="w">
399 ····</span><span·class="n">Start</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">now</span><span·class="p"·data-group-id="4724502230-73">(</span><span·class="p"·data-group-id="4724502230-73">)</span><span·class="p">,</span><span·class="w">399 ····</span><span·class="n">Start</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">now</span><span·class="p"·data-group-id="7556882023-73">(</span><span·class="p"·data-group-id="7556882023-73">)</span><span·class="p">,</span><span·class="w">
400 ····</span><span·class="nf">send_procs</span><span·class="p"·data-group-id="4724502230-74">(</span><span·class="n">Procs</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-75">{</span><span·class="ss">procs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Procs</spa[·...·truncated·by·diffoscope;·len:·281,·SHA:·12ced6043741065a8fb6f00c87f3aeeb2c7c63a3b190ee485e3bb50451418dc5·...·]-74">)</span><span·class="p">,</span><span·class="w">400 ····</span><span·class="nf">send_procs</span><span·class="p"·data-group-id="7556882023-74">(</span><span·class="n">Procs</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-75">{</span><span·class="ss">procs</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Procs</spa[·...·truncated·by·diffoscope;·len:·281,·SHA:·5510665c735db4abf72e3386c2142a456e093a29e2f99796dbeacf6212fb10f3·...·]-74">)</span><span·class="p">,</span><span·class="w">
401 ····</span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="4724502230-77">(</span><span·class="n">RMsgs</span><span·class="p"·data-group-id="4724502230-77">)</span><span·class="p">,</span><span·class="w">401 ····</span><span·class="nf">receive_msgs</span><span·class="p"·data-group-id="7556882023-77">(</span><span·class="n">RMsgs</span><span·class="p"·data-group-id="7556882023-77">)</span><span·class="p">,</span><span·class="w">
402 ····</span><span·class="n">Stop</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">now</span><span·class="p"·data-group-id="4724502230-78">(</span><span·class="p"·data-group-id="4724502230-78">)</span><span·class="p">,</span><span·class="w">402 ····</span><span·class="n">Stop</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">now</span><span·class="p"·data-group-id="7556882023-78">(</span><span·class="p"·data-group-id="7556882023-78">)</span><span·class="p">,</span><span·class="w">
403 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foreach</span><span·class="p"·data-group-id="4724502230-79">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="4724502230-80">(</span><span·class="n">P</span><span·class="p"·data-group-id="4724502230-80">)</span><span·class="w">·</span><span·class="p">-&gt;</spa[·...·truncated·by·diffoscope;·len:·431,·SHA:·e270ffede53f5200ef11c077eec9d3fd1ff600b6eaf0c95986009c1249117b72·...·]-79">)</span><span·class="p">,</span><span·class="w">403 ····</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foreach</span><span·class="p"·data-group-id="7556882023-79">(</span><span·class="nf">fun</span><span·class="w">·</span><span·class="p"·data-group-id="7556882023-80">(</span><span·class="n">P</span><span·class="p"·data-group-id="7556882023-80">)</span><span·class="w">·</span><span·class="p">-&gt;</spa[·...·truncated·by·diffoscope;·len:·431,·SHA:·a9900e3904fa4e822228d437d43bb1bfae1366d6feccdd88bc584cb59b95b9d9·...·]-79">)</span><span·class="p">,</span><span·class="w">
404 ····</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">now_diff</span><span·class="p"·data-group-id="4724502230-82">(</span><span·class="n">Stop</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Start</span><span·class="p"·data-group-id="4724502230-82">)</span><span·class="p">.</span></code></pre><h2·id="see-also"·class="section-heading">404 ····</span><span·class="nc">timer</span><span·class="p">:</span><span·class="nf">now_diff</span><span·class="p"·data-group-id="7556882023-82">(</span><span·class="n">Stop</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Start</span><span·class="p"·data-group-id="7556882023-82">)</span><span·class="p">.</span></code></pre><h2·id="see-also"·class="section-heading">
405 ··<a·href="#see-also"·class="hover-link">405 ··<a·href="#see-also"·class="hover-link">
406 ····<i·class="ri-link-m"·aria-hidden="true"></i>406 ····<i·class="ri-link-m"·aria-hidden="true"></i>
407 ··</a>407 ··</a>
408 ··<span·class="text">See·Also</span>408 ··<span·class="text">See·Also</span>
409 </h2>409 </h2>
410 <p><a·href="lcnt.html">LCNT·Reference·Manual</a></p>410 <p><a·href="lcnt.html">LCNT·Reference·Manual</a></p>
411 </div>411 </div>
3.99 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/make.html
    
Offset 138, 16 lines modifiedOffset 138, 16 lines modified
138 <p><a·href="#all/1"><code·class="inline">make:all/0,1</code></a>·and·<a·href="#files/2"><code·class="inline">make:files/1,2</code></a>·first·looks·for138 <p><a·href="#all/1"><code·class="inline">make:all/0,1</code></a>·and·<a·href="#files/2"><code·class="inline">make:files/1,2</code></a>·first·looks·for
139 <code·class="inline">{emake,·Emake}</code>·in·options,·then·in·the·current·working·directory·for·a·file139 <code·class="inline">{emake,·Emake}</code>·in·options,·then·in·the·current·working·directory·for·a·file
140 named·<code·class="inline">Emakefile</code>.·If·present·<code·class="inline">Emake</code>·should·contain·elements·like·this:</p><pre><code·class="text">Modules.140 named·<code·class="inline">Emakefile</code>.·If·present·<code·class="inline">Emake</code>·should·contain·elements·like·this:</p><pre><code·class="text">Modules.
141 {Modules,Options}.</code></pre><p><code·class="inline">Modules</code>·is·an·atom·or·a·list·of·atoms.·It·can·be</p><ul><li>a·module·name,·for·exmaple,··<code·class="inline">file1</code></li><li>a·module·name·in·another·directory,·for·exmaple,·<code·class="inline">'../foo/file3'</code></li><li>a·set·of·modules·specified·with·a·wildcards,·for·exmaple,·<code·class="inline">'file*'</code></li><li>a·wildcard·indicating·all·modules·in·current·directory,·that·is:·<code·class="inline">'*'</code></li><li>a·list·of·any·of·the·above,·for·exmaple,·<code·class="inline">['file*','../foo/file3','File4']</code></li></ul><p><code·class="inline">Options</code>·is·a·list·of·compiler·options.</p><p><code·class="inline">Emakefile</code>·is·read·from·top·to·bottom.·If·a·module·matches·more·than·one·entry,141 {Modules,Options}.</code></pre><p><code·class="inline">Modules</code>·is·an·atom·or·a·list·of·atoms.·It·can·be</p><ul><li>a·module·name,·for·exmaple,··<code·class="inline">file1</code></li><li>a·module·name·in·another·directory,·for·exmaple,·<code·class="inline">'../foo/file3'</code></li><li>a·set·of·modules·specified·with·a·wildcards,·for·exmaple,·<code·class="inline">'file*'</code></li><li>a·wildcard·indicating·all·modules·in·current·directory,·that·is:·<code·class="inline">'*'</code></li><li>a·list·of·any·of·the·above,·for·exmaple,·<code·class="inline">['file*','../foo/file3','File4']</code></li></ul><p><code·class="inline">Options</code>·is·a·list·of·compiler·options.</p><p><code·class="inline">Emakefile</code>·is·read·from·top·to·bottom.·If·a·module·matches·more·than·one·entry,
142 the·first·match·is·used.·For·example,·the·following·<code·class="inline">Emakefile</code>·means·that142 the·first·match·is·used.·For·example,·the·following·<code·class="inline">Emakefile</code>·means·that
143 <code·class="inline">file1</code>·should·be·compiled·with·the·options·<code·class="inline">[debug_info,{i,&quot;../foo&quot;}]</code>,·while143 <code·class="inline">file1</code>·should·be·compiled·with·the·options·<code·class="inline">[debug_info,{i,&quot;../foo&quot;}]</code>,·while
144 all·other·files·in·the·current·directory·should·be·compiled·with·only·the144 all·other·files·in·the·current·directory·should·be·compiled·with·only·the
145 <code·class="inline">debug_info</code>·flag.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9687503224-1">{</span><span·class="ss">&#39;file1&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="9687503224-2">[</span><span·class="ss">debug_info</span><span·class="p">,</span><span·class="p"·data-group-id="9687503224-3">{</span><span·class="ss">i</span><span·class="p">,</span><span·class="s">&quot;../foo&quot;</span><span·class="p"·data-group-id="9687503224-3">}</span><span·class="p"·data-group-id="9687503224-2">]</span><span·class="p"·data-group-id="9687503224-1">}</span><span·class="p">.</span><span·class="w"> 
146 </span><span·class="p"·data-group-id="9687503224-4">{</span><span·class="ss">&#39;*&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="9687503224-5">[</span><span·class="ss">debug_info</span><span·class="p"·data-group-id="9687503224-5">]</spa[·...·truncated·by·diffoscope;·len:·139,·SHA:·a24c77c081d2f4b610c66efb08befb3a61acb7451f6725cc6c3cb7eae17e7c92·...·]">145 <code·class="inline">debug_info</code>·flag.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4016911277-1">{</span><span·class="ss">&#39;file1&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="4016911277-2">[·...·truncated·by·diffoscope;·len:·406,·SHA:·f3a5d6dd6587c38a0fb147d2e9a6f75292cbc87b81f5d6e22c6d6921bb5014b9·...·]">
 146 </span><span·class="p"·data-group-id="4016911277-4">{</span><span·class="ss">&#39;*&#39;</span><span·class="p">,</span><span·class="p"·data-group-id="4016911277-5">[</span><span·class="ss">debug_info</span><span·class="p"·data-group-id="4016911277-5">]</span><span·class="p"·data-group-id="4016911277-4">}</span><span·class="p">.</span></code></pre><h2·id="module-see-also"·class="section-heading">
147 ··<a·href="#module-see-also"·class="hover-link">147 ··<a·href="#module-see-also"·class="hover-link">
148 ····<i·class="ri-link-m"·aria-hidden="true"></i>148 ····<i·class="ri-link-m"·aria-hidden="true"></i>
149 ··</a>149 ··</a>
150 ··<span·class="text">See·Also</span>150 ··<span·class="text">See·Also</span>
151 </h2>151 </h2>
152 <p><a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html">The·Compiler·Application</a></p>152 <p><a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html">The·Compiler·Application</a></p>
153 ····</section>153 ····</section>
28.8 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/notes.html
    
Offset 133, 51 lines modifiedOffset 133, 51 lines modified
133 </h2>133 </h2>
134 <h3·id="fixed-bugs-and-malfunctions"·class="section-heading">134 <h3·id="fixed-bugs-and-malfunctions"·class="section-heading">
135 ··<a·href="#fixed-bugs-and-malfunctions"·class="hover-link">135 ··<a·href="#fixed-bugs-and-malfunctions"·class="hover-link">
136 ····<i·class="ri-link-m"·aria-hidden="true"></i>136 ····<i·class="ri-link-m"·aria-hidden="true"></i>
137 ··</a>137 ··</a>
138 ··<span·class="text">Fixed·Bugs·and·Malfunctions</span>138 ··<span·class="text">Fixed·Bugs·and·Malfunctions</span>
139 </h3>139 </h3>
140 <ul><li><p>Dialyzer·warnings·due·to·type·specs·added·in·<a·href="../../../../lib/runtime_tools-2.1/doc/html/dbg.html"><code·class="inline">dbg</code></a>·have·been·eliminated.</p><p>Own·Id:·OTP-18860</p></li><li><p>In·Erlang/OTP·26,·doing·a·<a·href="cover.html"><code·class="inline">cover</code></a>·analysis·on·the·<code·class="inline">line</code>·level·would·return·multiple·entries·for·lines·on·which·multiple·functions·were·defined.</p><p>For·example,·consider·this·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2649428910-1">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="2649428910-1">)</span><span·class="p">.</span><span·class="w">140 <ul><li><p>Dialyzer·warnings·due·to·type·specs·added·in·<a·href="../../../../lib/runtime_tools-2.1/doc/html/dbg.html"><code·class="inline">dbg</code></a>·have·been·eliminated.</p><p>Own·Id:·OTP-18860</p></li><li><p>In·Erlang/OTP·26,·doing·a·<a·href="cover.html"><code·class="inline">cover</code></a>·analysis·on·the·<code·class="inline">line</code>·level·would·return·multiple·entries·for·lines·on·which·multiple·functions·were·defined.</p><p>For·example,·consider·this·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2145338237-1">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="2145338237-1">)</span><span·class="p">.</span><span·class="w">
141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2649428910-2">(</span><span·class="p"·data-group-id="2649428910-3">[</span><span·class="ss">bar</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p">/</span><span·c[·...·truncated·by·diffoscope;·len:·112,·SHA:·c06383995c4c2ed8f39eba4779cab4a390de8154c5944f8887d19cb997bd5939·...·]-2">)</span><span·class="p">.</span><span·class="w">141 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2145338237-2">(</span><span·class="p"·data-group-id="2145338237-3">[</span><span·class="ss">bar</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">baz</span><span·class="p">/</span><span·c[·...·truncated·by·diffoscope;·len:·112,·SHA:·b182fabf4605fa17a6c0554d0291cd17e1a8db20107fd05e7336e5ee35aef4c0·...·]-2">)</span><span·class="p">.</span><span·class="w">
  
142 </span><span·class="nf">bar</span><span·class="p"·data-group-id="2649428910-4">(</span><span·class="p"·data-group-id="2649428910-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">·</span><span·class="nf">baz</span><span[·...·truncated·by·diffoscope;·len:·89,·SHA:·a37b59c8aeb86b8c5c34b03c6119550e59f9a9ee536497aada228c90b4509ff1·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">not_ok</span><span·class="p">.</span></code></pre><p>In·Erlang/OTP·26,·analysing·on·the·<code·class="inline">line</code>·level·would·return·two·entries142 </span><span·class="nf">bar</span><span·class="p"·data-group-id="2145338237-4">(</span><span·class="p"·data-group-id="2145338237-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">.</span><span·class="w">·</span><span·class="nf">baz</span><span[·...·truncated·by·diffoscope;·len:·89,·SHA:·15f9f6e9798d49c4c4ce48d01017d6fb6b9ca0414a87c28c00bfbc416b64c69e·...·]-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="ss">not_ok</span><span·class="p">.</span></code></pre><p>In·Erlang/OTP·26,·analysing·on·the·<code·class="inline">line</code>·level·would·return·two·entries
143 for·line·4:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">compile_module</span><span·class="p"·data-group-id="4472503009-1">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="4472503009-1">)</span><span·class="p">.</span><span·class="w">143 for·line·4:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">compile_module</span><span·class="p"·data-group-id="2293852152-1">(</span><span·class="ss">foo</span><span·class="p"·data-group-id="2293852152-1">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="p"·data-group-id="4472503009-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">foo</span><span·class="p"·data-group-id="4472503009-2">}</span><span·class="gp·unselectable">144 </span><span·class="p"·data-group-id="2293852152-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">foo</span><span·class="p"·data-group-id="2293852152-2">}</span><span·class="gp·unselectable">
145 2&gt;·</span><span·class="nc">foo</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="4472503009-3">(</span><span·class="p"·data-group-id="4472503009-3">)</span><span·class="p">.</span><span·class="w">145 2&gt;·</span><span·class="nc">foo</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="2293852152-3">(</span><span·class="p"·data-group-id="2293852152-3">)</span><span·class="p">.</span><span·class="w">
146 </span><span·class="ss">ok</span><span·class="gp·unselectable">146 </span><span·class="ss">ok</span><span·class="gp·unselectable">
147 3&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="4472503009-4">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="4472503009-4">)</span><span·class="p">.</span><span·class="w">147 3&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="2293852152-4">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="2293852152-4">)</span><span·class="p">.</span><span·class="w">
148 </span><span·class="p"·data-group-id="4472503009-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4472503009-6">[</span><span·class="p"·data-group-id="4472503009-7">{</span><span·class="p"·data-group-id="4472503009-8">{</span><span·class="ss">foo</spa[·...·truncated·by·diffoscope;·len:·977,·SHA:·63f5a049ba5ff02f36d74dab93ac9884e21ca785ee4c0914269847d69c196840·...·]-5">}</span><span·class="gp·unselectable">148 </span><span·class="p"·data-group-id="2293852152-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2293852152-6">[</span><span·class="p"·data-group-id="2293852152-7">{</span><span·class="p"·data-group-id="2293852152-8">{</span><span·class="ss">foo</spa[·...·truncated·by·diffoscope;·len:·977,·SHA:·0c660f348ddffc84dc26017299f8414a0700c18fca84208ce7438dca2a6b29d2·...·]-5">}</span><span·class="gp·unselectable">
149 4&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="4472503009-13">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">calls</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="4472503009-13">)</span><span·class="p">.</span><span·class="w">149 4&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="2293852152-13">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">calls</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="2293852152-13">)</span><span·class="p">.</span><span·class="w">
150 </span><span·class="p"·data-group-id="4472503009-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4472503009-15">[</span><span·class="p"·data-group-id="4472503009-16">{</span><span·class="p"·data-group-id="4472503009-17">{</span><span·class="ss">foo<[·...·truncated·by·diffoscope;·len:·1071,·SHA:·ecec631f1082c37208bafcfdffbb864e1d5978cc1a33eae70fa5541cc16eb95f·...·]-1">)</span><span·class="p">.</span><span·class="w">150 </span><span·class="p"·data-group-id="2293852152-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2293852152-15">[</span><span·class="p"·data-group-id="2293852152-16">{</span><span·class="p"·data-group-id="2293852152-17">{</span><span·class="ss">foo<[·...·truncated·by·diffoscope;·len:·1071,·SHA:·0fb2cbd8609c9c3a125508c583c0eb9a894e4939004497056b191d3f86cdb395·...·]-1">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p"·data-group-id="7851840403-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">foo</span><span·class="p"·data-group-id="7851840403-2">}</span><span·class="gp·unselectable">151 </span><span·class="p"·data-group-id="2313104742-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">foo</span><span·class="p"·data-group-id="2313104742-2">}</span><span·class="gp·unselectable">
152 2&gt;·</span><span·class="nc">foo</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="7851840403-3">(</span><span·class="p"·data-group-id="7851840403-3">)</span><span·class="p">.</span><span·class="w">152 2&gt;·</span><span·class="nc">foo</span><span·class="p">:</span><span·class="nf">bar</span><span·class="p"·data-group-id="2313104742-3">(</span><span·class="p"·data-group-id="2313104742-3">)</span><span·class="p">.</span><span·class="w">
153 </span><span·class="ss">ok</span><span·class="gp·unselectable">153 </span><span·class="ss">ok</span><span·class="gp·unselectable">
154 3&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="7851840403-4">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="7851840403-4">)</span><span·class="p">.</span><span·class="w">154 3&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="2313104742-4">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">coverage</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="2313104742-4">)</span><span·class="p">.</span><span·class="w">
155 </span><span·class="p"·data-group-id="7851840403-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7851840403-6">[</span><span·class="p"·data-group-id="7851840403-7">{</span><span·class="p"·data-group-id="7851840403-8">{</span><span·class="ss">foo</spa[·...·truncated·by·diffoscope;·len:·455,·SHA:·f8f10e715437ada207eddfbcf58d76c6ad9221204e9d0aea7ad1bde8bf214697·...·]-5">}</span><span·class="gp·unselectable">155 </span><span·class="p"·data-group-id="2313104742-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2313104742-6">[</span><span·class="p"·data-group-id="2313104742-7">{</span><span·class="p"·data-group-id="2313104742-8">{</span><span·class="ss">foo</spa[·...·truncated·by·diffoscope;·len:·455,·SHA:·c9208a0be33394af0bccdf3954870266cd75d746d383730be427bbb868d76012·...·]-5">}</span><span·class="gp·unselectable">
156 4&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="7851840403-10">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">calls</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="7851840403-10">)</span><span·class="p">.</span><span·class="w">156 4&gt;·</span><span·class="nc">cover</span><span·class="p">:</span><span·class="nf">analyse</span><span·class="p"·data-group-id="2313104742-10">(</span><span·class="ss">foo</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">calls</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">line</span><span·class="p"·data-group-id="2313104742-10">)</span><span·class="p">.</span><span·class="w">
157 </span><span·class="p"·data-group-id="7851840403-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="7851840403-12">[</span><span·class="p"·data-group-id="7851840403-13">{</span><span·class="p"·data-group-id="7851840403-14">{</span><span·class="ss">foo<[·...·truncated·by·diffoscope;·len:·307,·SHA:·fc5436c115d374b4453105a887325e46ace258a3ab3be09caedad6f0278923df·...·]-11">}</span></code></pre><p>Own·Id:·OTP-18998·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/8159"·title="">GH-8159</a>,·<a·href="https://github.com/erlang/otp/pull/8182"·title="">PR-8182</a></p></li><li><p>Fixed·align·command·in·emacs·mode.</p><p>Own·Id:·OTP-19026·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8155"·title="">PR-8155</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">157 </span><span·class="p"·data-group-id="2313104742-11">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="2313104742-12">[</span><span·class="p"·data-group-id="2313104742-13">{</span><span·class="p"·data-group-id="2313104742-14">{</span><span·class="ss">foo<[·...·truncated·by·diffoscope;·len:·307,·SHA:·be80fdd3ae945f286884ee2155ccfa53e86551915a3fcd157ce1e45f88739b1d·...·]-11">}</span></code></pre><p>Own·Id:·OTP-18998·Aux·Id:·<a·href="https://github.com/erlang/otp/issues/8159"·title="">GH-8159</a>,·<a·href="https://github.com/erlang/otp/pull/8182"·title="">PR-8182</a></p></li><li><p>Fixed·align·command·in·emacs·mode.</p><p>Own·Id:·OTP-19026·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8155"·title="">PR-8155</a></p></li></ul><h3·id="improvements-and-new-features"·class="section-heading">
158 ··<a·href="#improvements-and-new-features"·class="hover-link">158 ··<a·href="#improvements-and-new-features"·class="hover-link">
159 ····<i·class="ri-link-m"·aria-hidden="true"></i>159 ····<i·class="ri-link-m"·aria-hidden="true"></i>
160 ··</a>160 ··</a>
161 ··<span·class="text">Improvements·and·New·Features</span>161 ··<span·class="text">Improvements·and·New·Features</span>
162 </h3>162 </h3>
163 <ul><li><p>Triple-Quoted·Strings·has·been·implemented·as·per·<a·href="https://www.erlang.org/eeps/eep-0064">EEP·64</a>.·See·<a·href="../../../../doc/system/data_types.html#string">String</a>·in·the·Reference·Manual.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;163 <ul><li><p>Triple-Quoted·Strings·has·been·implemented·as·per·<a·href="https://www.erlang.org/eeps/eep-0064">EEP·64</a>.·See·<a·href="../../../../doc/system/data_types.html#string">String</a>·in·the·Reference·Manual.</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="s">&quot;&quot;</span><span·class="s">&quot;
164 ···a164 ···a
165 ···b165 ···b
166 ···c166 ···c
167 ···&quot;</span><span·class="s">&quot;&quot;</span><span·class="p">.</span><span·class="w">167 ···&quot;</span><span·class="s">&quot;&quot;</span><span·class="p">.</span><span·class="w">
168 </span><span·class="s">&quot;a\nb\nc&quot;</span></code></pre><p>Adjacent·string·literals·without·intervening·white·space·is·now·a·syntax·error,·to·avoid·possible·confusion·with·triple-quoted·strings.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="s">&quot;abc&quot;</span><span·class="s">&quot;xyz&quot;</span><span·class="p">.</span><span·class="w">168 </span><span·class="s">&quot;a\nb\nc&quot;</span></code></pre><p>Adjacent·string·literals·without·intervening·white·space·is·now·a·syntax·error,·to·avoid·possible·confusion·with·triple-quoted·strings.·For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="s">&quot;abc&quot;</span><span·class="s">&quot;xyz&quot;</span><span·class="p">.</span><span·class="w">
169 </span><span·class="s">&quot;xyz&quot;</span><span·class="p">.</span><span·class="w">169 </span><span·class="s">&quot;xyz&quot;</span><span·class="p">.</span><span·class="w">
170 </span><span·class="gt">*·1:6:·adjacent·string·literals·without·intervening·white·space</span></code></pre><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18750·Aux·Id:·OTP-18746,·<a·href="https://github.com/erlang/otp/pull/7313"·title="">PR-7313</a>,·<a·href="https://github.com/erlang/otp/pull/7451"·title="">PR-7451</a></p></li><li><p>There·is·a·new·tool·<a·href="tprof.html"><code·class="inline">tprof</code></a>,·which·combines·the·functionality·of·<a·href="eprof.html"><code·class="inline">eprof</code></a>·and·<a·href="cprof.html"><code·class="inline">cprof</code></a>·under·one·interface·and·adds·heap·profiling.·It·also·has·functionality·to·help·with·profiling·process·hierarchies.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="2182837472-1">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">seq</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2182837472-2">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·458,·SHA:·2d21bb73177dbce748e2891c26ae82e473f10bb4384d9a0413304a68b08e2abc·...·]-1">)</span><span·class="p">.</span><span·class="w">170 </span><span·class="gt">*·1:6:·adjacent·string·literals·without·intervening·white·space</span></code></pre><p><strong><em>·POTENTIAL·INCOMPATIBILITY·</em></strong></p><p>Own·Id:·OTP-18750·Aux·Id:·OTP-18746,·<a·href="https://github.com/erlang/otp/pull/7313"·title="">PR-7313</a>,·<a·href="https://github.com/erlang/otp/pull/7451"·title="">PR-7451</a></p></li><li><p>There·is·a·new·tool·<a·href="tprof.html"><code·class="inline">tprof</code></a>,·which·combines·the·functionality·of·<a·href="eprof.html"><code·class="inline">eprof</code></a>·and·<a·href="cprof.html"><code·class="inline">cprof</code></a>·under·one·interface·and·adds·heap·profiling.·It·also·has·functionality·to·help·with·profiling·process·hierarchies.</p><p><em>Example</em>:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="5475530757-1">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">seq</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5475530757-2">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·458,·SHA:·d22890c6a0806f8d86660935edf09fa517415aa68c3430eca813d1cd05910e3b·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
171 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">171 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">
172 </span><span·class="n">FUNCTION</span><span·class="w">··········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="2182837472-4">[</span><span·class="w">·····</span><span·class="c1">%]</span><span·class="w">172 </span><span·class="n">FUNCTION</span><span·class="w">··········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="5475530757-4">[</span><span·class="w">·····</span><span·class="c1">%]</span><span·class="w">
173 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="2182837472-5">[</span><span·class="mf">100.00</span><span·class="p"·data-group-id="2182837472-5">]</span><span·class="w">173 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="5475530757-5">[</span><span·class="mf">100.00</span><span·class="p"·data-group-id="5475530757-5">]</span><span·class="w">
174 ····························</span><span·class="mi">32</span><span·class="w">············</span><span·class="p"·data-group-id="2182837472-6">[</span><span·class="w">·</span><span·class="mf">100.0</span><span·class="p"·data-group-id="2182837472-6">]</span><span·class="w">174 ····························</span><span·class="mi">32</span><span·class="w">············</span><span·class="p"·data-group-id="5475530757-6">[</span><span·class="w">·</span><span·class="mf">100.0</span><span·class="p"·data-group-id="5475530757-6">]</span><span·class="w">
175 </span><span·class="ss">ok</span></code></pre><p>Own·Id:·OTP-18756·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/6639"·title="">PR-6639</a></p></li><li><p>Native·coverage·support·has·been·implemented·in·the·JIT.·It·will··automatically·be·used·by·the·<a·href="cover.html"><code·class="inline">cover</code></a>·tool·to·reduce·the·execution·overhead·when·running·cover-compiled·code.</p><p>There·are·also·new·APIs·to·support·native·coverage·without·using·the·<code·class="inline">cover</code>·tool.</p><p>To·instrument·code·for·native·coverage·it·must·be·compiled·with·the·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html#line_coverage"><code·class="inline">line_coverage</code></a>·option.</p><p>To·enable·native·coverage·in·the·runtime·system,·start·it·like·so:</p><pre><code·class="text">$·erl·+JPcover·true</code></pre><p>There·are·also·the·following·new·functions·for·supporting·native·coverage:</p><ul><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#coverage_support/0"><code·class="inline">code:coverage_support/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage/2"><code·class="inline">code:get_coverage/2</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#reset_coverage/1"><code·class="inline">code:reset_coverage/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/0"><code·class="inline">code:get_coverage_mode/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/1"><code·class="inline">code:get_coverage_mode/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#set_coverage_mode/1"><code·class="inline">code:set_coverage_mode/1</code></a></li></ul><p>Own·Id:·OTP-18856·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7856"·title="">PR-7856</a></p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>Improved·the·align·command·in·emacs·mode.</p><p>Own·Id:·OTP-19080·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8288"·title="">PR-8288</a></p></li></ul><h2·id="tools-3-6"·class="section-heading">175 </span><span·class="ss">ok</span></code></pre><p>Own·Id:·OTP-18756·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/6639"·title="">PR-6639</a></p></li><li><p>Native·coverage·support·has·been·implemented·in·the·JIT.·It·will··automatically·be·used·by·the·<a·href="cover.html"><code·class="inline">cover</code></a>·tool·to·reduce·the·execution·overhead·when·running·cover-compiled·code.</p><p>There·are·also·new·APIs·to·support·native·coverage·without·using·the·<code·class="inline">cover</code>·tool.</p><p>To·instrument·code·for·native·coverage·it·must·be·compiled·with·the·<a·href="../../../../lib/compiler-8.5.1/doc/html/compile.html#line_coverage"><code·class="inline">line_coverage</code></a>·option.</p><p>To·enable·native·coverage·in·the·runtime·system,·start·it·like·so:</p><pre><code·class="text">$·erl·+JPcover·true</code></pre><p>There·are·also·the·following·new·functions·for·supporting·native·coverage:</p><ul><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#coverage_support/0"><code·class="inline">code:coverage_support/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage/2"><code·class="inline">code:get_coverage/2</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#reset_coverage/1"><code·class="inline">code:reset_coverage/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/0"><code·class="inline">code:get_coverage_mode/0</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#get_coverage_mode/1"><code·class="inline">code:get_coverage_mode/1</code></a></li><li><a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#set_coverage_mode/1"><code·class="inline">code:set_coverage_mode/1</code></a></li></ul><p>Own·Id:·OTP-18856·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/7856"·title="">PR-7856</a></p></li><li><p>The·documentation·has·been·migrated·to·use·Markdown·and·ExDoc.</p><p>Own·Id:·OTP-18955·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8026"·title="">PR-8026</a></p></li><li><p>Improved·the·align·command·in·emacs·mode.</p><p>Own·Id:·OTP-19080·Aux·Id:·<a·href="https://github.com/erlang/otp/pull/8288"·title="">PR-8288</a></p></li></ul><h2·id="tools-3-6"·class="section-heading">
176 ··<a·href="#tools-3-6"·class="hover-link">176 ··<a·href="#tools-3-6"·class="hover-link">
177 ····<i·class="ri-link-m"·aria-hidden="true"></i>177 ····<i·class="ri-link-m"·aria-hidden="true"></i>
178 ··</a>178 ··</a>
179 ··<span·class="text">Tools·3.6</span>179 ··<span·class="text">Tools·3.6</span>
180 </h2>180 </h2>
181 <h3·id="improvements-and-new-features-1"·class="section-heading">181 <h3·id="improvements-and-new-features-1"·class="section-heading">
789 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/tools.epub
4.44 KB
zipinfo {}
Max HTML report size reached
76.8 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
40.8 KB
OEBPS/xref_chapter.xhtml
Max HTML report size reached
156 KB
OEBPS/tprof.xhtml
Max HTML report size reached
28.7 KB
OEBPS/notes.xhtml
Max HTML report size reached
3.89 KB
OEBPS/make.xhtml
Max HTML report size reached
57.2 KB
OEBPS/lcnt_chapter.xhtml
Max HTML report size reached
3.72 KB
OEBPS/fprof_chapter.xhtml
Max HTML report size reached
135 KB
OEBPS/fprof.xhtml
Max HTML report size reached
14.6 KB
OEBPS/erlang-el.xhtml
Max HTML report size reached
82.9 KB
OEBPS/cprof_chapter.xhtml
Max HTML report size reached
3.48 KB
OEBPS/cprof.xhtml
Max HTML report size reached
173 KB
OEBPS/cover_chapter.xhtml
Max HTML report size reached
7.32 KB
OEBPS/cover.xhtml
Max HTML report size reached
1.22 KB
OEBPS/content.opf
1.19 KB
OEBPS/content.opf
Max HTML report size reached
156 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/tprof.html
    
Offset 156, 199 lines modifiedOffset 156, 199 lines modified
156 The·<code·class="inline">tprof</code>·results·will·probably·be·incorrect·when·the·profiled·code·was156 The·<code·class="inline">tprof</code>·results·will·probably·be·incorrect·when·the·profiled·code·was
157 reloading·during·a·profiling·session.</p></blockquote><h2·id="module-ad-hoc-profiling"·class="section-heading">157 reloading·during·a·profiling·session.</p></blockquote><h2·id="module-ad-hoc-profiling"·class="section-heading">
158 ··<a·href="#module-ad-hoc-profiling"·class="hover-link">158 ··<a·href="#module-ad-hoc-profiling"·class="hover-link">
159 ····<i·class="ri-link-m"·aria-hidden="true"></i>159 ····<i·class="ri-link-m"·aria-hidden="true"></i>
160 ··</a>160 ··</a>
161 ··<span·class="text">Ad-hoc·profiling</span>161 ··<span·class="text">Ad-hoc·profiling</span>
162 </h2>162 </h2>
163 <p>Ad-hoc·profiling·is·convenient·for·profiling·a·single·function·call.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="7283796526-1">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">seq</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7283796526-2">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·458,·SHA:·f94d336a3442854e71c4ef17fbb690d807341fb5a092edb2b3b4d40a06639918·...·]-1">)</span><span·class="p">.</span><span·class="w">163 <p>Ad-hoc·profiling·is·convenient·for·profiling·a·single·function·call.</p><p>For·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="2814700247-1">(</span><span·class="ss">lists</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">seq</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="2814700247-2">[</span><span·class="mi">1</span><spa[·...·truncated·by·diffoscope;·len:·458,·SHA:·6e036fda0ef3db47d6b68d1fa3a49ce179dd59e447a179609152ecebc9c7d38e·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
164 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">164 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.92</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">
165 </span><span·class="n">FUNCTION</span><span·class="w">··········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="7283796526-4">[</span><span·class="w">·····</span><span·class="c1">%]</span><span·class="w">165 </span><span·class="n">FUNCTION</span><span·class="w">··········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="2814700247-4">[</span><span·class="w">·····</span><span·class="c1">%]</span><span·class="w">
166 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="7283796526-5">[</span><span·class="mf">100.00</span><span·class="p"·data-group-id="7283796526-5">]</span><span·class="w">166 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="2814700247-5">[</span><span·class="mf">100.00</span><span·class="p"·data-group-id="2814700247-5">]</span><span·class="w">
167 ····························</span><span·class="mi">32</span><span·class="w">············</span><span·class="p"·data-group-id="7283796526-6">[</span><span·class="w">·</span><span·class="mf">100.0</span><span·class="p"·data-group-id="7283796526-6">]</span><span·class="w">167 ····························</span><span·class="mi">32</span><span·class="w">············</span><span·class="p"·data-group-id="2814700247-6">[</span><span·class="w">·</span><span·class="mf">100.0</span><span·class="p"·data-group-id="2814700247-6">]</span><span·class="w">
168 </span><span·class="ss">ok</span></code></pre><p>By·default·tracing·is·enabled·for·all·functions·in·all·modules.·When·funs168 </span><span·class="ss">ok</span></code></pre><p>By·default·tracing·is·enabled·for·all·functions·in·all·modules.·When·funs
169 are·created·in·the·interactive·shell,·parts·of·shell·code·are·also·traced:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="2250294068-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="2250294068-2">(</span><span·class="p"·data-group-id="2250294068-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">lists</s[·...·truncated·by·diffoscope;·len:·645,·SHA:·2135cb399519ac74dbc4d69de6e3d3209287c78d9a414c7f3cf2399dd5f8a036·...·]-1">)</span><span·class="p">.</span><span·class="w">169 are·created·in·the·interactive·shell,·parts·of·shell·code·are·also·traced:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="6651210116-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="6651210116-2">(</span><span·class="p"·data-group-id="6651210116-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">lists</s[·...·truncated·by·diffoscope;·len:·645,·SHA:·f524aa58906573886b6192c014a081565f27627261f5cb7b99ba7124754b82f1·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
170 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.95</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">170 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.95</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">
171 </span><span·class="n">FUNCTION</span><span·class="w">···················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-5">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">171 </span><span·class="n">FUNCTION</span><span·class="w">···················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-5">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
172 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">do_apply</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">············</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">······</span><span·class="mf">3.00</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-6">[</span><span·class="w">·</span><span·class="mf">3.61</span><span·class="p"·data-group-id="2250294068-6">]</span><span·class="w">172 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">do_apply</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">············</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">······</span><span·class="mf">3.00</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-6">[</span><span·class="w">·</span><span·class="mf">3.61</span><span·class="p"·data-group-id="6651210116-6">]</span><span·class="w">
173 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">match_list</span><span·class="p">/</span><span·class="mi">6</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">······</span><span·class="mf">3.00</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-7">[</span><span·class="w">·</span><span·class="mf">3.61</span><span·class="p"·data-group-id="2250294068-7">]</span><span·class="w">173 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">match_list</span><span·class="p">/</span><span·class="mi">6</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">······</span><span·class="mf">3.00</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-7">[</span><span·class="w">·</span><span·class="mf">3.61</span><span·class="p"·data-group-id="6651210116-7">]</span><span·class="w">
174 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">reverse</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">······</span><span·class="mf">4.00</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-8">[</span><span·class="w">·</span><span·class="mf">4.82</span><span·class="p"·data-group-id="2250294068-8">]</span><span·class="w">174 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">reverse</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">······</span><span·class="mf">4.00</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-8">[</span><span·class="w">·</span><span·class="mf">4.82</span><span·class="p"·data-group-id="6651210116-8">]</span><span·class="w">
175 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">expr_list</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">···········</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">······</span><span·class="mf">2.33</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-9">[</span><span·class="w">·</span><span·class="mf">8.43</span><span·class="p"·data-group-id="2250294068-9">]</span><span·class="w">175 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">expr_list</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">···········</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">······</span><span·class="mf">2.33</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-9">[</span><span·class="w">·</span><span·class="mf">8.43</span><span·class="p"·data-group-id="6651210116-9">]</span><span·class="w">
176 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">ret_expr</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">············</span><span·class="mi">4</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">······</span><span·class="mf">4.00</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-10">[</span><span·class="mf">19.28</span><span·class="p"·data-group-id="2250294068-10">]</span><span·class="w">176 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">ret_expr</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">············</span><span·class="mi">4</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">······</span><span·class="mf">4.00</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-10">[</span><span·class="mf">19.28</span><span·class="p"·data-group-id="6651210116-10">]</span><span·class="w">
177 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">merge_bindings</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·····</span><span·class="mi">18</span><span·class="w">······</span><span·class="mf">6.00</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-11">[</span><span·class="mf">21.69</span><span·class="p"·data-group-id="2250294068-11">]</span><span·class="w">177 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">merge_bindings</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·····</span><span·class="mi">18</span><span·class="w">······</span><span·class="mf">6.00</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-11">[</span><span·class="mf">21.69</span><span·class="p"·data-group-id="6651210116-11">]</span><span·class="w">
178 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">···············</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="2250294068-12">[</span><span·class="mf">38.55</span><span·class="p"·data-group-id="2250294068-12">]</span><span·class="w">178 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">···············</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="6651210116-12">[</span><span·class="mf">38.55</span><span·class="p"·data-group-id="6651210116-12">]</span><span·class="w">
179 ·····································</span><span·class="mi">83</span><span·class="w">············</span><span·class="p"·data-group-id="2250294068-13">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="2250294068-13">]</span><span·class="w">179 ·····································</span><span·class="mi">83</span><span·class="w">············</span><span·class="p"·data-group-id="6651210116-13">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="6651210116-13">]</span><span·class="w">
180 </span><span·class="ss">ok</span></code></pre><p>However,·it·is·possible·to·limit·the·trace·to·specific·functions·or·modules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="4314397323-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="4314397323-2">(</span><span·class="p"·data-group-id="4314397323-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">lists</s[·...·truncated·by·diffoscope;·len:·248,·SHA:·1efe0bbc6ff5f4b26bbde0fb72db4da3f91da5fefb9f0e7fc3f30fecc49e68ba·...·]-3">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">180 </span><span·class="ss">ok</span></code></pre><p>However,·it·is·possible·to·limit·the·trace·to·specific·functions·or·modules:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="5662578726-1">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5662578726-2">(</span><span·class="p"·data-group-id="5662578726-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">lists</s[·...·truncated·by·diffoscope;·len:·248,·SHA:·89c133c1ad213e2770d046a6697e0a692e912de7ffe79fcc9ca897831c0fa934·...·]-3">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
181 ·················</span><span·class="p"·data-group-id="4314397323-4">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pattern</span><span·class="w"[·...·truncated·by·diffoscope;·len:·559,·SHA:·7f821c5dae93a423fd16e7f7a4581f40c21ae86de174d4cf712f02c0a0f92a31·...·]-1">)</span><span·class="p">.</span><span·class="w">181 ·················</span><span·class="p"·data-group-id="5662578726-4">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">pattern</span><span·class="w"[·...·truncated·by·diffoscope;·len:·559,·SHA:·bff9327fac167857c65b48f574e679baeeff6b3d10d4d07bc141823fa0267a3c·...·]-1">)</span><span·class="p">.</span><span·class="w">
182 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.98</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">182 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.98</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">··</span><span·class="o">--</span><span·class="w">··</span><span·class="mf">100.00</span><span·class="c1">%·of·total·***·</span><span·class="w">
183 </span><span·class="n">FUNCTION</span><span·class="w">··········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="4314397323-7">[</span><span·class="w">·····</span><span·class="c1">%]</span><span·class="w">183 </span><span·class="n">FUNCTION</span><span·class="w">··········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="5662578726-7">[</span><span·class="w">·····</span><span·class="c1">%]</span><span·class="w">
184 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="4314397323-8">[</span><span·class="mf">100.00</span><span·class="p"·data-group-id="4314397323-8">]</span><span·class="w">184 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·····</span><span·class="mi">32</span><span·class="w">······</span><span·class="mf">6.40</span><span·class="w">··</span><span·class="p"·data-group-id="5662578726-8">[</span><span·class="mf">100.00</span><span·class="p"·data-group-id="5662578726-8">]</span><span·class="w">
185 ····························</span><span·class="mi">32</span><span·class="w">············</span><span·class="p"·data-group-id="4314397323-9">[</span><span·class="w">·</span><span·class="mf">100.0</span><span·class="p"·data-group-id="4314397323-9">]</span><span·class="w">185 ····························</span><span·class="mi">32</span><span·class="w">············</span><span·class="p"·data-group-id="5662578726-9">[</span><span·class="w">·</span><span·class="mf">100.0</span><span·class="p"·data-group-id="5662578726-9">]</span><span·class="w">
  
186 </span><span·class="ss">ok</span></code></pre><p>Ad-hoc·profiling·results·can·be·printed·in·a·few·different·ways.·The·following186 </span><span·class="ss">ok</span></code></pre><p>Ad-hoc·profiling·results·can·be·printed·in·a·few·different·ways.·The·following
187 examples·use·the·<code·class="inline">test</code>·module·defined·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7102404568-1">(</span><span·class="ss">test</span><span·class="p"·data-group-id="7102404568-1">)</span><span·class="p">.</span><span·class="w">187 examples·use·the·<code·class="inline">test</code>·module·defined·like·this:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="6705845288-1">(</span><span·class="ss">test</span><span·class="p"·data-group-id="6705845288-1">)</span><span·class="p">.</span><span·class="w">
188 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7102404568-2">(</span><span·class="p"·data-group-id="7102404568-3">[</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="7102404568-3">]</span><span·class="p"·data-group-id="7102404568-2">)</span><span·class="p">.</span><span·class="w">188 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="6705845288-2">(</span><span·class="p"·data-group-id="6705845288-3">[</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="p"·data-group-id="6705845288-3">]</span><span·class="p"·data-group-id="6705845288-2">)</span><span·class="p">.</span><span·class="w">
189 </span><span·class="nf">test_spawn</span><span·class="p"·data-group-id="7102404568-4">(</span><span·class="p"·data-group-id="7102404568-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">189 </span><span·class="nf">test_spawn</span><span·class="p"·data-group-id="6705845288-4">(</span><span·class="p"·data-group-id="6705845288-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
190 ····</span><span·class="p"·data-group-id="7102404568-5">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p"·data-group-id="7102404568-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·690,·SHA:·aeb475207993c63f387321cbbd7d00b3fd6c98561c816917d32fe6e1ef7b98f2·...·]8-6">)</span><span·class="p">,</span><span·class="w">190 ····</span><span·class="p"·data-group-id="6705845288-5">{</span><span·class="n">Pid</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p"·data-group-id="6705845288-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·690,·SHA:·901d2602387bd58109b19457dddfa00e0e29f260d1bc47130e53a3141c3abb4c·...·]8-6">)</span><span·class="p">,</span><span·class="w">
191 ····</span><span·class="k">receive</span><span·class="w">191 ····</span><span·class="k">receive</span><span·class="w">
192 ········</span><span·class="p"·data-group-id="7102404568-9">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·150,·SHA:·6e3df3efdef639b2d922d98084fdd1614f33436d82b3d1e548390fc2846fabf9·...·]8-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">192 ········</span><span·class="p"·data-group-id="6705845288-9">{</span><span·class="ss">&#39;DOWN&#39;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MRef</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">process</span><span·class="p">,</span><span·class="w">·<[·...·truncated·by·diffoscope;·len:·150,·SHA:·7c8fa6480700aed0876873df2a199272a2c10a1d965ea24cc49aa99c72c8d997·...·]8-9">}</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
193 ············</span><span·class="ss">done</span><span·class="w">193 ············</span><span·class="ss">done</span><span·class="w">
194 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>By·default·per-process·statistics·is·shown:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="8664366943-1">(</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">test_spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8664366943-2">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·365,·SHA:·b92e66034454611e5866beef5d596a02a8c8e1c305857086628cbc0365f8919f·...·]-1">)</span><span·class="p">.</span><span·class="w">194 ····</span><span·class="k">end</span><span·class="p">.</span></code></pre><p>By·default·per-process·statistics·is·shown:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="9359566427-1">(</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">test_spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9359566427-2">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·365,·SHA:·3ae36beca89eca512efc715e6d060452ac8621fe6658694685b328ba87c3f76b·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
195 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.176</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">23.66</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">195 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.176</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">23.66</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
196 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-4">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">196 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-4">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
197 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-5">[</span><span·class="w">·</span><span·class="mf">9.09</span><span·class="p"·data-group-id="8664366943-5">]</span><span·class="w">197 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-5">[</span><span·class="w">·</span><span·class="mf">9.09</span><span·class="p"·data-group-id="9359566427-5">]</span><span·class="w">
198 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-6">[</span><span·class="mf">27.27</span><span·class="p"·data-group-id="8664366943-6">]</span><span·class="w">198 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-6">[</span><span·class="mf">27.27</span><span·class="p"·data-group-id="9359566427-6">]</span><span·class="w">
199 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-7">[</span><span·class="mf">63.64</span><span·class="p"·data-group-id="8664366943-7">]</span><span·class="w">199 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-7">[</span><span·class="mf">63.64</span><span·class="p"·data-group-id="9359566427-7">]</span><span·class="w">
200 ··································</span><span·class="mi">22</span><span·class="w">············</span><span·class="p"·data-group-id="8664366943-8">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="8664366943-8">]</span><span·class="w">200 ··································</span><span·class="mi">22</span><span·class="w">············</span><span·class="p"·data-group-id="9359566427-8">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="9359566427-8">]</span><span·class="w">
  
201 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.177</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">76.34</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">201 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.177</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">76.34</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
202 </span><span·class="n">FUNCTION</span><span·class="w">···········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-9">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">202 </span><span·class="n">FUNCTION</span><span·class="w">···········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-9">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
203 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">apply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-10">[</span><span·class="w">·</span><span·class="mf">9.86</span><span·class="p"·data-group-id="8664366943-10">]</span><span·class="w">203 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">apply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-10">[</span><span·class="w">·</span><span·class="mf">9.86</span><span·class="p"·data-group-id="9359566427-10">]</span><span·class="w">
204 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">·······</span><span·class="mi">9</span><span·class="w">·····</span><span·class="mi">64</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="8664366943-11">[</span><span·class="mf">90.14</span><span·class="p"·data-group-id="8664366943-11">]</span><span·class="w">204 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">·······</span><span·class="mi">9</span><span·class="w">·····</span><span·class="mi">64</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="9359566427-11">[</span><span·class="mf">90.14</span><span·class="p"·data-group-id="9359566427-11">]</span><span·class="w">
205 ·····························</span><span·class="mi">71</span><span·class="w">············</span><span·class="p"·data-group-id="8664366943-12">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="8664366943-12">]</span></code></pre><p>The·following·example·prints·the·combined·memory·allocation·of·all205 ·····························</span><span·class="mi">71</span><span·class="w">············</span><span·class="p"·data-group-id="9359566427-12">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="9359566427-12">]</span></code></pre><p>The·following·example·prints·the·combined·memory·allocation·of·all
206 processes,·sorted·by·the·total·number·of·allocated·words·in·descending206 processes,·sorted·by·the·total·number·of·allocated·words·in·descending
207 order:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="3839475761-1">(</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">test_spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3839475761-2">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·35600e97c9cd8834abe0e0986c7ecb19fa70516cc25e08d61aa1de1cf23f3827·...·]-2">]</span><span·class="p">,</span><span·class="w">207 order:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="9153467435-1">(</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">test_spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9153467435-2">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·c0de3b9d75f27f5bf783986838a541d6e9854c35186c4e75a2f3b4cbd088c18f·...·]-2">]</span><span·class="p">,</span><span·class="w">
208 ·················</span><span·class="p"·data-group-id="3839475761-3">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">report</span><span·class="w">[·...·truncated·by·diffoscope;·len:·560,·SHA:·960066fe30f71a949d82e500e6764fcbacc06aff77ee9c08e61ea36b4d2dc1cf·...·]-1">)</span><span·class="p">.</span><span·class="w">208 ·················</span><span·class="p"·data-group-id="9153467435-3">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">report</span><span·class="w">[·...·truncated·by·diffoscope;·len:·560,·SHA:·3693811bb358828ace2316361a3841695706e5d27b835850e545a9b5da4a1ecc·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
209 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="3839475761-6">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">209 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="9153467435-6">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
210 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">············</span><span·class="mi">9</span><span·class="w">·····</span><span·class="mi">64</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="3839475761-7">[</span><span·class="mf">68.82</span><span·class="p"·data-group-id="3839475761-7">]</span><span·class="w">210 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">············</span><span·class="mi">9</span><span·class="w">·····</span><span·class="mi">64</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="9153467435-7">[</span><span·class="mf">68.82</span><span·class="p"·data-group-id="9153467435-7">]</span><span·class="w">
211 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="3839475761-8">[</span><span·class="mf">15.05</span><span·class="p"·data-group-id="3839475761-8">]</span><span·class="w">211 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="9153467435-8">[</span><span·class="mf">15.05</span><span·class="p"·data-group-id="9153467435-8">]</span><span·class="w">
212 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">apply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">··············</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="3839475761-9">[</span><span·class="w">·</span><span·class="mf">7.53</span><span·class="p"·data-group-id="3839475761-9">]</span><span·class="w">212 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">apply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">··············</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="9153467435-9">[</span><span·class="w">·</span><span·class="mf">7.53</span><span·class="p"·data-group-id="9153467435-9">]</span><span·class="w">
213 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="3839475761-10">[</span><span·class="w">·</span><span·class="mf">6.45</span><span·class="p"·data-group-id="3839475761-10">]</span><span·class="w">213 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="9153467435-10">[</span><span·class="w">·</span><span·class="mf">6.45</span><span·class="p"·data-group-id="9153467435-10">]</span><span·class="w">
214 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="3839475761-11">[</span><span·class="w">·</span><span·class="mf">2.15</span><span·class="p"·data-group-id="3839475761-11">]</span><span·class="w">214 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="9153467435-11">[</span><span·class="w">·</span><span·class="mf">2.15</span><span·class="p"·data-group-id="9153467435-11">]</span><span·class="w">
215 ··································</span><span·class="mi">93</span><span·class="w">············</span><span·class="p"·data-group-id="3839475761-12">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="3839475761-12">]</span></code></pre><p>The·profiling·data·can·also·be·collected·for·further·inspection:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·un[·...·truncated·by·diffoscope;·len:·438,·SHA:·6bd13728e5da92bae9f711823f2b3f8d1a172696a4e47f9cdfe0958acb39b3ac·...·]-2">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">215 ··································</span><span·class="mi">93</span><span·class="w">············</span><span·class="p"·data-group-id="9153467435-12">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="9153467435-12">]</span></code></pre><p>The·profiling·data·can·also·be·collected·for·further·inspection:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·un[·...·truncated·by·diffoscope;·len:·438,·SHA:·090aa82d0453db76972d9293401b6c2ec10bb5828e8dd1b2f7e431e791807f07·...·]-2">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">
216 ·······································</span><span·class="p"·data-group-id="2596141213-3">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">report</span><span·class="w">[·...·truncated·by·diffoscope;·len:·184,·SHA:·814bdc56700d9170989aa92b5841b926b22d221f552fe537c779cb6a82cc6073·...·]-2">)</span><span·class="p">.</span><span·class="w">216 ·······································</span><span·class="p"·data-group-id="6609605702-3">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">report</span><span·class="w">[·...·truncated·by·diffoscope;·len:·184,·SHA:·f54a36c611d11b008f856d55659eddb53e7293c3f1aed69587cd4f2908f390d6·...·]-2">)</span><span·class="p">.</span><span·class="w">
217 </span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="o">&gt;</span><span·class="gp·unselectable">217 </span><span·class="o">&lt;</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="o">&gt;</span><span·class="gp·unselectable">
218 4&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2596141213-4">(</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">inspect</span><span·class="p"·data-group-id="2596141213-5">(</span><span·class="n">ProfileData</span><span·class="p">,</span><span·class="w">·</span><span·class="ss[·...·truncated·by·diffoscope;·len:·377,·SHA:·f889a4df5e68de15b1dc0c523c0612c4a577ba2934c914d9701268b7b05e9a9e·...·]-4">)</span><span·class="p">.</span><span·class="w">218 4&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="6609605702-4">(</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">inspect</span><span·class="p"·data-group-id="6609605702-5">(</span><span·class="n">ProfileData</span><span·class="p">,</span><span·class="w">·</span><span·class="ss[·...·truncated·by·diffoscope;·len:·377,·SHA:·364741529f46ac1beec5dfeb74cf66ddc7574c8340e9ae35fb7604f877d684f0·...·]-4">)</span><span·class="p">.</span><span·class="w">
  
219 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.223</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">23.66</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">219 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.223</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">23.66</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
220 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-7">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">220 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-7">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
221 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-8">[</span><span·class="mf">63.64</span><span·class="p"·data-group-id="2596141213-8">]</span><span·class="w">221 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-8">[</span><span·class="mf">63.64</span><span·class="p"·data-group-id="6609605702-8">]</span><span·class="w">
222 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-9">[</span><span·class="mf">27.27</span><span·class="p"·data-group-id="2596141213-9">]</span><span·class="w">222 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-9">[</span><span·class="mf">27.27</span><span·class="p"·data-group-id="6609605702-9">]</span><span·class="w">
223 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-10">[</span><span·class="w">·</span><span·class="mf">9.09</span><span·class="p"·data-group-id="2596141213-10">]</span><span·class="w">223 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-10">[</span><span·class="w">·</span><span·class="mf">9.09</span><span·class="p"·data-group-id="6609605702-10">]</span><span·class="w">
224 ··································</span><span·class="mi">22</span><span·class="w">············</span><span·class="p"·data-group-id="2596141213-11">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="2596141213-11">]</span><span·class="w">224 ··································</span><span·class="mi">22</span><span·class="w">············</span><span·class="p"·data-group-id="6609605702-11">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="6609605702-11">]</span><span·class="w">
  
225 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.224</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">76.34</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">225 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.224</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">76.34</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
226 </span><span·class="n">FUNCTION</span><span·class="w">···········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-12">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">226 </span><span·class="n">FUNCTION</span><span·class="w">···········</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-12">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
227 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">·······</span><span·class="mi">9</span><span·class="w">·····</span><span·class="mi">64</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-13">[</span><span·class="mf">90.14</span><span·class="p"·data-group-id="2596141213-13">]</span><span·class="w">227 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">seq_loop</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">·······</span><span·class="mi">9</span><span·class="w">·····</span><span·class="mi">64</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-13">[</span><span·class="mf">90.14</span><span·class="p"·data-group-id="6609605702-13">]</span><span·class="w">
228 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">apply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="2596141213-14">[</span><span·class="w">·</span><span·class="mf">9.86</span><span·class="p"·data-group-id="2596141213-14">]</span><span·class="w">228 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">apply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">7</span><span·class="w">·········</span><span·class="mi">7</span><span·class="w">··</span><span·class="p"·data-group-id="6609605702-14">[</span><span·class="w">·</span><span·class="mf">9.86</span><span·class="p"·data-group-id="6609605702-14">]</span><span·class="w">
229 ·····························</span><span·class="mi">71</span><span·class="w">············</span><span·class="p"·data-group-id="2596141213-15">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="2596141213-15">]</span></code></pre><p>Which·processes·that·are·profiled·depends·on·the·profiling·type.</p><ul><li><p><code·class="inline">call_count</code>·(default)·counts·calls·in·all·processes.</p></li><li><p><code·class="inline">call_time</code>·and·<code·class="inline">call_memory</code>·limits·the·profiling·to·the·processes229 ·····························</span><span·class="mi">71</span><span·class="w">············</span><span·class="p"·data-group-id="6609605702-15">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="6609605702-15">]</span></code></pre><p>Which·processes·that·are·profiled·depends·on·the·profiling·type.</p><ul><li><p><code·class="inline">call_count</code>·(default)·counts·calls·in·all·processes.</p></li><li><p><code·class="inline">call_time</code>·and·<code·class="inline">call_memory</code>·limits·the·profiling·to·the·processes
230 spawned·from·the·user-provided·function·(using·the·<code·class="inline">set_on_spawn</code>230 spawned·from·the·user-provided·function·(using·the·<code·class="inline">set_on_spawn</code>
231 option·for·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>).</p></li></ul><p><code·class="inline">call_time</code>·and·<code·class="inline">call_memory</code>·can·be·restricted·to·profile·a·single·process:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="5135028766-1">(</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">test_spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="5135028766-2">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·9cf90a4bc5728accb7eeaa71515395619f9c43eafbae18408c96fd95e25ae0e5·...·]-2">]</span><span·class="p">,</span><span·class="w">231 option·for·<a·href="../../../../erts-15.0.1/doc/html/erlang.html#trace/3"><code·class="inline">erlang:trace/3</code></a>).</p></li></ul><p><code·class="inline">call_time</code>·and·<code·class="inline">call_memory</code>·can·be·restricted·to·profile·a·single·process:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="0724611430-1">(</span><span·class="ss">test</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">test_spawn</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0724611430-2">[</span><span·class="p"·data-gr[·...·truncated·by·diffoscope;·len:·18,·SHA:·f2c2e09ae060b109381f5f46d3443e76a76358218a342ffe668885fb940dacab·...·]-2">]</span><span·class="p">,</span><span·class="w">
232 ·················</span><span·class="p"·data-group-id="5135028766-3">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">set_on_spawn</span><span·clas[·...·truncated·by·diffoscope;·len:·189,·SHA:·ed4bdbb30de07ade9bddbe0461b961dbb96cd63b062e14c8fd6be41fe4517a56·...·]-1">)</span><span·class="p">.</span><span·class="w">232 ·················</span><span·class="p"·data-group-id="0724611430-3">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">set_on_spawn</span><span·clas[·...·truncated·by·diffoscope;·len:·189,·SHA:·88f09841952b9f7d25e44817ff034f267bb16d2fc09d3efbf17d258154bb3852·...·]-1">)</span><span·class="p">.</span><span·class="w">
  
233 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.183</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">100.00</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">233 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.183</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">100.00</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
234 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="5135028766-4">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">234 </span><span·class="n">FUNCTION</span><span·class="w">················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="0724611430-4">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
235 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="5135028766-5">[</span><span·class="w">·</span><span·class="mf">9.09</span><span·class="p"·data-group-id="5135028766-5">]</span><span·class="w">235 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_monitor</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="0724611430-5">[</span><span·class="w">·</span><span·class="mf">9.09</span><span·class="p"·data-group-id="0724611430-5">]</span><span·class="w">
236 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="5135028766-6">[</span><span·class="mf">27.27</span><span·class="p"·data-group-id="5135028766-6">]</span><span·class="w">236 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">spawn_opt</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="0724611430-6">[</span><span·class="mf">27.27</span><span·class="p"·data-group-id="0724611430-6">]</span><span·class="w">
237 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="5135028766-7">[</span><span·class="mf">63.64</span><span·class="p"·data-group-id="5135028766-7">]</span></code></pre><p><a·href=""·id="pg_example"></a></p><p>Erlang·programs·can·perform·expensive·operations·in·other·processes237 </span><span·class="nc">test</span><span·class="p">:</span><span·class="ss">test_spawn</span><span·class="p">/</span><span·class="mi">0</span><span·class="w">···········</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">14</span><span·class="w">········</span><span·class="mi">14</span><span·class="w">··</span><span·class="p"·data-group-id="0724611430-7">[</span><span·class="mf">63.64</span><span·class="p"·data-group-id="0724611430-7">]</span></code></pre><p><a·href=""·id="pg_example"></a></p><p>Erlang·programs·can·perform·expensive·operations·in·other·processes
238 than·the·original·one.·You·can·include·multiple,·new,·or·even·all238 than·the·original·one.·You·can·include·multiple,·new,·or·even·all
239 processes·in·the·trace·when·measuring·time·or·memory:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nc">pg</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="1894837532-1">(</span><span·class="p"·data-group-id="1894837532-1">)</span><span·class="p">.</span><span·class="w">239 processes·in·the·trace·when·measuring·time·or·memory:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">7&gt;·</span><span·class="nc">pg</span><span·class="p">:</span><span·class="nf">start_link</span><span·class="p"·data-group-id="5488752013-1">(</span><span·class="p"·data-group-id="5488752013-1">)</span><span·class="p">.</span><span·class="w">
240 </span><span·class="p"·data-group-id="1894837532-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.252</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1894837532-2">}</span><span·class="gp·unselectable">240 </span><span·class="p"·data-group-id="5488752013-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.252</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="5488752013-2">}</span><span·class="gp·unselectable">
241 8&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="1894837532-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1894837532-4">(</span><span·class="p"·data-group-id="1894837532-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">pg</span><span·class="p">:</span><span·class="nf">join</span><span·class="p"·data-group-id="1894837532-5">(</span><span·class="ss">group</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">self</span><span·class="p"·data-group-id="1894837532-6">(</span><span·class="p"·data-group-id="1894837532-6">)</span><span·class="p"·data-group-id="1894837532-5">)</span><span·class="w">·</span><span·class="k">end</span><span·class="p">,</span><span·class="w"> 
242 ·················</span><span·class="p"·data-group-id="1894837532-7">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·371,·SHA:·eaa4ef43f776197c759e8920096418b421e974c6fc7ad80da1631ff6b859cf09·...·]</span><span·class="w">241 8&gt;·</span><span·class="nc">tprof</span><span·class="p">:</span><span·class="nf">profile</span><span·class="p"·data-group-id="5488752013-3">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="5488752013-4">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·565,·SHA:·c53a6d36e789d8b6f323679ece8fffe57b769f66e385ddee139331cd7211c643·...·]</span><span·class="w">
 242 ·················</span><span·class="p"·data-group-id="5488752013-7">#{</span><span·class="ss">type</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="ss">call_memory</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">rootset</span><span·class="w">·</span><span·class="p">=&gt;</span><span·class="w">·</span><span·class="p"·data-group-id="5488752013-8">[</span><span·class="ss">pg</span><span·class="p"·data-group-id="5488752013-8">]</span><span·class="p"·data-group-id="5488752013-7">}</span><span·class="p"·data-group-id="5488752013-3">)</span><span·class="p">.</span><span·class="w">
243 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.252</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">52.86</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">243 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.252</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">52.86</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
244 </span><span·class="n">FUNCTION</span><span·class="w">······················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-9">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">244 </span><span·class="n">FUNCTION</span><span·class="w">······················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-9">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
245 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">leave_local_update_ets</span><span·class="p">/</span><span·class="mi">5</span><span·class="w">·······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-10">[</span><span·class="w">·</span><span·class="mf">1.80</span><span·class="p"·data-group-id="1894837532-10">]</span><span·class="w">245 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">leave_local_update_ets</span><span·class="p">/</span><span·class="mi">5</span><span·class="w">·······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">2</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-10">[</span><span·class="w">·</span><span·class="mf">1.80</span><span·class="p"·data-group-id="5488752013-10">]</span><span·class="w">
246 </span><span·class="nc">gen</span><span·class="p">:</span><span·class="ss">reply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·······················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-11">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="1894837532-11">]</span><span·class="w">246 </span><span·class="nc">gen</span><span·class="p">:</span><span·class="ss">reply</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·······················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-11">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="5488752013-11">]</span><span·class="w">
247 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">monitor</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-12">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="1894837532-12">]</span><span·class="w">247 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">monitor</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-12">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="5488752013-12">]</span><span·class="w">
248 </span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="ss">try_handle_call</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-13">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="1894837532-13">]</span><span·class="w">248 </span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="ss">try_handle_call</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">······</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-13">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="5488752013-13">]</span><span·class="w">
249 </span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="ss">try_dispatch</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-14">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="1894837532-14">]</span><span·class="w">249 </span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="ss">try_dispatch</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-14">[</span><span·class="w">·</span><span·class="mf">2.70</span><span·class="p"·data-group-id="5488752013-14">]</span><span·class="w">
250 </span><span·class="nc">maps</span><span·class="p">:</span><span·class="ss">iterator</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">···················</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-15">[</span><span·class="w">·</span><span·class="mf">3.60</span><span·class="p"·data-group-id="1894837532-15">]</span><span·class="w">250 </span><span·class="nc">maps</span><span·class="p">:</span><span·class="ss">iterator</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">···················</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-15">[</span><span·class="w">·</span><span·class="mf">3.60</span><span·class="p"·data-group-id="5488752013-15">]</span><span·class="w">
251 </span><span·class="nc">maps</span><span·class="p">:</span><span·class="ss">take</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·······················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-16">[</span><span·class="w">·</span><span·class="mf">5.41</span><span·class="p"·data-group-id="1894837532-16">]</span><span·class="w">251 </span><span·class="nc">maps</span><span·class="p">:</span><span·class="ss">take</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">·······················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">6</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-16">[</span><span·class="w">·</span><span·class="mf">5.41</span><span·class="p"·data-group-id="5488752013-16">]</span><span·class="w">
252 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">join_local_update_ets</span><span·class="p">/</span><span·class="mi">5</span><span·class="w">········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">8</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-17">[</span><span·class="w">·</span><span·class="mf">7.21</span><span·class="p"·data-group-id="1894837532-17">]</span><span·class="w">252 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">join_local_update_ets</span><span·class="p">/</span><span·class="mi">5</span><span·class="w">········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">8</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-17">[</span><span·class="w">·</span><span·class="mf">7.21</span><span·class="p"·data-group-id="5488752013-17">]</span><span·class="w">
253 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">handle_info</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">8</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-18">[</span><span·class="w">·</span><span·class="mf">7.21</span><span·class="p"·data-group-id="1894837532-18">]</span><span·class="w">253 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">handle_info</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">8</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-18">[</span><span·class="w">·</span><span·class="mf">7.21</span><span·class="p"·data-group-id="5488752013-18">]</span><span·class="w">
254 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">handle_call</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">9</span><span·class="w">·········</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-19">[</span><span·class="w">·</span><span·class="mf">8.11</span><span·class="p"·data-group-id="1894837532-19">]</span><span·class="w">254 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">handle_call</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">9</span><span·class="w">·········</span><span·class="mi">9</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-19">[</span><span·class="w">·</span><span·class="mf">8.11</span><span·class="p"·data-group-id="5488752013-19">]</span><span·class="w">
255 </span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="ss">loop</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">·················</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">9</span><span·class="w">·········</span><span·class="mi">4</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-20">[</span><span·class="w">·</span><span·class="mf">8.11</span><span·class="p"·data-group-id="1894837532-20">]</span><span·class="w">255 </span><span·class="nc">gen_server</span><span·class="p">:</span><span·class="ss">loop</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">·················</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">9</span><span·class="w">·········</span><span·class="mi">4</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-20">[</span><span·class="w">·</span><span·class="mf">8.11</span><span·class="p"·data-group-id="5488752013-20">]</span><span·class="w">
256 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="ss">lookup</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">······················</span><span·class="mi">2</span><span·class="w">·····</span><span·class="mi">10</span><span·class="w">·········</span><span·class="mi">5</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-21">[</span><span·class="w">·</span><span·class="mf">9.01</span><span·class="p"·data-group-id="1894837532-21">]</span><span·class="w">256 </span><span·class="nc">ets</span><span·class="p">:</span><span·class="ss">lookup</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">······················</span><span·class="mi">2</span><span·class="w">·····</span><span·class="mi">10</span><span·class="w">·········</span><span·class="mi">5</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-21">[</span><span·class="w">·</span><span·class="mf">9.01</span><span·class="p"·data-group-id="5488752013-21">]</span><span·class="w">
257 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">join_local</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">···················</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">11</span><span·class="w">········</span><span·class="mi">11</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-22">[</span><span·class="w">·</span><span·class="mf">9.91</span><span·class="p"·data-group-id="1894837532-22">]</span><span·class="w">257 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">join_local</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">···················</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">11</span><span·class="w">········</span><span·class="mi">11</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-22">[</span><span·class="w">·</span><span·class="mf">9.91</span><span·class="p"·data-group-id="5488752013-22">]</span><span·class="w">
258 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">notify_group</span><span·class="p">/</span><span·class="mi">5</span><span·class="w">·················</span><span·class="mi">2</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-23">[</span><span·class="mf">14.41</span><span·class="p"·data-group-id="1894837532-23">]</span><span·class="w">258 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">notify_group</span><span·class="p">/</span><span·class="mi">5</span><span·class="w">·················</span><span·class="mi">2</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-23">[</span><span·class="mf">14.41</span><span·class="p"·data-group-id="5488752013-23">]</span><span·class="w">
259 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">setelement</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">···············</span><span·class="mi">2</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-24">[</span><span·class="mf">14.41</span><span·class="p"·data-group-id="1894837532-24">]</span><span·class="w">259 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">setelement</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">···············</span><span·class="mi">2</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-24">[</span><span·class="mf">14.41</span><span·class="p"·data-group-id="5488752013-24">]</span><span·class="w">
260 ·······································</span><span·class="mi">111</span><span·class="w">············</span><span·class="p"·data-group-id="1894837532-25">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="1894837532-25">]</span><span·class="w">260 ·······································</span><span·class="mi">111</span><span·class="w">············</span><span·class="p"·data-group-id="5488752013-25">[</span><span·class="mf">100.0</span><span·class="p"·data-group-id="5488752013-25">]</span><span·class="w">
  
261 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.255</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">47.14</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">261 </span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="o">*</span><span·class="w">·</span><span·class="n">Process</span><span·class="w">·</span><span·class="o">&lt;</span><span·class="mf">0.255</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="w">····</span><span·class="o">--</span><span·class="w">·</span><span·class="mf">47.14</span><span·class="w">·</span><span·class="c1">%·of·total·allocations·***</span><span·class="w">
262 </span><span·class="n">FUNCTION</span><span·class="w">···················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-26">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">262 </span><span·class="n">FUNCTION</span><span·class="w">···················</span><span·class="n">CALLS</span><span·class="w">··</span><span·class="n">WORDS</span><span·class="w">··</span><span·class="n">PER</span><span·class="w">·</span><span·class="n">CALL</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-26">[</span><span·class="w">····</span><span·class="c1">%]</span><span·class="w">
263 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">match_list</span><span·class="p">/</span><span·class="mi">6</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-27">[</span><span·class="w">·</span><span·class="mf">3.03</span><span·class="p"·data-group-id="1894837532-27">]</span><span·class="w">263 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">match_list</span><span·class="p">/</span><span·class="mi">6</span><span·class="w">··········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-27">[</span><span·class="w">·</span><span·class="mf">3.03</span><span·class="p"·data-group-id="5488752013-27">]</span><span·class="w">
264 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">monitor</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">···············</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-28">[</span><span·class="w">·</span><span·class="mf">3.03</span><span·class="p"·data-group-id="1894837532-28">]</span><span·class="w">264 </span><span·class="nc">erlang</span><span·class="p">:</span><span·class="nb">monitor</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">···············</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">3</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-28">[</span><span·class="w">·</span><span·class="mf">3.03</span><span·class="p"·data-group-id="5488752013-28">]</span><span·class="w">
265 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">reverse</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">················</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-29">[</span><span·class="w">·</span><span·class="mf">4.04</span><span·class="p"·data-group-id="1894837532-29">]</span><span·class="w">265 </span><span·class="nc">lists</span><span·class="p">:</span><span·class="ss">reverse</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">················</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-29">[</span><span·class="w">·</span><span·class="mf">4.04</span><span·class="p"·data-group-id="5488752013-29">]</span><span·class="w">
266 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">join</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">4</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-30">[</span><span·class="w">·</span><span·class="mf">4.04</span><span·class="p"·data-group-id="1894837532-30">]</span><span·class="w">266 </span><span·class="nc">pg</span><span·class="p">:</span><span·class="ss">join</span><span·class="p">/</span><span·class="mi">3</span><span·class="w">······················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">4</span><span·class="w">·········</span><span·class="mi">4</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-30">[</span><span·class="w">·</span><span·class="mf">4.04</span><span·class="p"·data-group-id="5488752013-30">]</span><span·class="w">
267 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">add_bindings</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·········</span><span·class="mi">5</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-31">[</span><span·class="w">·</span><span·class="mf">5.05</span><span·class="p"·data-group-id="1894837532-31">]</span><span·class="w">267 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">add_bindings</span><span·class="p">/</span><span·class="mi">2</span><span·class="w">········</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">5</span><span·class="w">·········</span><span·class="mi">5</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-31">[</span><span·class="w">·</span><span·class="mf">5.05</span><span·class="p"·data-group-id="5488752013-31">]</span><span·class="w">
268 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">do_apply</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">············</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-32">[</span><span·class="w">·</span><span·class="mf">6.06</span><span·class="p"·data-group-id="1894837532-32">]</span><span·class="w">268 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">do_apply</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">············</span><span·class="mi">2</span><span·class="w">······</span><span·class="mi">6</span><span·class="w">·········</span><span·class="mi">3</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-32">[</span><span·class="w">·</span><span·class="mf">6.06</span><span·class="p"·data-group-id="5488752013-32">]</span><span·class="w">
269 </span><span·class="nc">gen</span><span·class="p">:</span><span·class="ss">call</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">·····················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">8</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-33">[</span><span·class="w">·</span><span·class="mf">8.08</span><span·class="p"·data-group-id="1894837532-33">]</span><span·class="w">269 </span><span·class="nc">gen</span><span·class="p">:</span><span·class="ss">call</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">·····················</span><span·class="mi">1</span><span·class="w">······</span><span·class="mi">8</span><span·class="w">·········</span><span·class="mi">8</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-33">[</span><span·class="w">·</span><span·class="mf">8.08</span><span·class="p"·data-group-id="5488752013-33">]</span><span·class="w">
270 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">expr_list</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">···········</span><span·class="mi">4</span><span·class="w">·····</span><span·class="mi">10</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-34">[</span><span·class="mf">10.10</span><span·class="p"·data-group-id="1894837532-34">]</span><span·class="w">270 </span><span·class="nc">erl_eval</span><span·class="p">:</span><span·class="ss">expr_list</span><span·class="p">/</span><span·class="mi">7</span><span·class="w">···········</span><span·class="mi">4</span><span·class="w">·····</span><span·class="mi">10</span><span·class="w">·········</span><span·class="mi">2</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-34">[</span><span·class="mf">10.10</span><span·class="p"·data-group-id="5488752013-34">]</span><span·class="w">
271 </span><span·class="nc">gen</span><span·class="p">:</span><span·class="ss">do_call</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">········</span><span·class="mi">16</span><span·class="w">··</span><span·class="p"·data-group-id="1894837532-35">[</span><span·class="mf">16.16</span><span·class="p"·data-group-id="1894837532-35">]</span><span·class="w">271 </span><span·class="nc">gen</span><span·class="p">:</span><span·class="ss">do_call</span><span·class="p">/</span><span·class="mi">4</span><span·class="w">··················</span><span·class="mi">1</span><span·class="w">·····</span><span·class="mi">16</span><span·class="w">········</span><span·class="mi">16</span><span·class="w">··</span><span·class="p"·data-group-id="5488752013-35">[</span><span·class="mf">16.16</span><span·class="p"·data-group-id="5488752013-35">]</span><span·class="w">
Max diff block lines reached; 54231/159917 bytes (33.91%) of diff not shown.
40.9 KB
./usr/share/doc/erlang-doc/html/lib/tools-4.0/doc/html/xref_chapter.html
    
Offset 136, 69 lines modifiedOffset 136, 69 lines modified
136 reading;·not·all·of·the·concepts·used·are·explained,·and·it·is·assumed·that·the136 reading;·not·all·of·the·concepts·used·are·explained,·and·it·is·assumed·that·the
137 <a·href="xref.html">reference·manual</a>·has·been·at·least·skimmed.</p><h2·id="module-check"·class="section-heading">137 <a·href="xref.html">reference·manual</a>·has·been·at·least·skimmed.</p><h2·id="module-check"·class="section-heading">
138 ··<a·href="#module-check"·class="hover-link">138 ··<a·href="#module-check"·class="hover-link">
139 ····<i·class="ri-link-m"·aria-hidden="true"></i>139 ····<i·class="ri-link-m"·aria-hidden="true"></i>
140 ··</a>140 ··</a>
141 ··<span·class="text">Module·Check</span>141 ··<span·class="text">Module·Check</span>
142 </h2>142 </h2>
143 <p>Assume·we·want·to·check·the·following·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="8811624670-1">(</span><span·class="ss">my_module</span><span·class="p"·data-group-id="8811624670-1">)</span><span·class="p">.</span><span·class="w">143 <p>Assume·we·want·to·check·the·following·module:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7564157833-1">(</span><span·class="ss">my_module</span><span·class="p"·data-group-id="7564157833-1">)</span><span·class="p">.</span><span·class="w">
144 </span><span·class="w">144 </span><span·class="w">
145 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="8811624670-2">(</span><span·class="p"·data-group-id="8811624670-3">[</span><span·class="ss">t</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="8811624670-3">]</span><span·class="p"·data-group-id="8811624670-2">)</span><span·class="p">.</span><span·class="w">145 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7564157833-2">(</span><span·class="p"·data-group-id="7564157833-3">[</span><span·class="ss">t</span><span·class="p">/</span><span·class="mi">1</span><span·class="p"·data-group-id="7564157833-3">]</span><span·class="p"·data-group-id="7564157833-2">)</span><span·class="p">.</span><span·class="w">
  
146 </span><span·class="nf">t</span><span·class="p"·data-group-id="8811624670-4">(</span><span·class="n">A</span><span·class="p"·data-group-id="8811624670-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">146 </span><span·class="nf">t</span><span·class="p"·data-group-id="7564157833-4">(</span><span·class="n">A</span><span·class="p"·data-group-id="7564157833-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
147 ··</span><span·class="nc">my_module</span><span·class="p">:</span><span·class="nf">t2</span><span·class="p"·data-group-id="8811624670-5">(</span><span·class="n">A</span><span·class="p"·data-group-id="8811624670-5">)</span><span·class="p">.</span><span·class="w">147 ··</span><span·class="nc">my_module</span><span·class="p">:</span><span·class="nf">t2</span><span·class="p"·data-group-id="7564157833-5">(</span><span·class="n">A</span><span·class="p"·data-group-id="7564157833-5">)</span><span·class="p">.</span><span·class="w">
  
148 </span><span·class="nf">t2</span><span·class="p"·data-group-id="8811624670-6">(</span><span·class="p">_</span><span·class="p"·data-group-id="8811624670-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">148 </span><span·class="nf">t2</span><span·class="p"·data-group-id="7564157833-6">(</span><span·class="p">_</span><span·class="p"·data-group-id="7564157833-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
149 ··</span><span·class="ss">true</span><span·class="p">.</span></code></pre><p>Cross·reference·data·are·read·from·BEAM·files,·so·the·first·step·when·checking149 ··</span><span·class="ss">true</span><span·class="p">.</span></code></pre><p>Cross·reference·data·are·read·from·BEAM·files,·so·the·first·step·when·checking
150 an·edited·module·is·to·compile·it:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="7234168312-1">(</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug_info</span><span·class="p"·data-group-id="7234168312-1">)</span><span·class="p">.</span><span·class="w">150 an·edited·module·is·to·compile·it:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nf">c</span><span·class="p"·data-group-id="2018844609-1">(</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">debug_info</span><span·class="p"·data-group-id="2018844609-1">)</span><span·class="p">.</span><span·class="w">
151 </span><span·class="p">.</span><span·class="o">/</span><span·class="ss">my_module</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">10</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="ss">t2</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">unused</span><span·class="w">151 </span><span·class="p">.</span><span·class="o">/</span><span·class="ss">my_module</span><span·class="p">.</span><span·class="nc">erl</span><span·class="p">:</span><span·class="mi">10</span><span·class="p">:</span><span·class="w">·</span><span·class="n">Warning</span><span·class="p">:</span><span·class="w">·</span><span·class="ss">function</span><span·class="w">·</span><span·class="ss">t2</span><span·class="p">/</span><span·class="mi">1</span><span·class="w">·</span><span·class="ss">is</span><span·class="w">·</span><span·class="ss">unused</span><span·class="w">
152 </span><span·class="p"·data-group-id="7234168312-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_module</span><span·class="p"·data-group-id="7234168312-2">}</span></code></pre><p>The·<code·class="inline">debug_info</code>·option·ensures·that·the·BEAM·file·contains·debug·information,152 </span><span·class="p"·data-group-id="2018844609-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">my_module</span><span·class="p"·data-group-id="2018844609-2">}</span></code></pre><p>The·<code·class="inline">debug_info</code>·option·ensures·that·the·BEAM·file·contains·debug·information,
153 which·makes·it·possible·to·find·unused·local·functions.</p><p>The·module·can·now·be·checked·for·calls·to153 which·makes·it·possible·to·find·unused·local·functions.</p><p>The·module·can·now·be·checked·for·calls·to
154 <a·href="xref.html#deprecated_function">deprecated·functions</a>,·calls·to154 <a·href="xref.html#deprecated_function">deprecated·functions</a>,·calls·to
155 <a·href="xref.html#undefined_function">undefined·functions</a>,·and·for·unused·local155 <a·href="xref.html#undefined_function">undefined·functions</a>,·and·for·unused·local
156 functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">m</span><span·class="p"·data-group-id="9596805230-1">(</span><span·class="ss">my_module</span><span·class="p"·data-group-id="9596805230-1">)</span><span·class="w">156 functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">m</span><span·class="p"·data-group-id="8487017379-1">(</span><span·class="ss">my_module</span><span·class="p"·data-group-id="8487017379-1">)</span><span·class="w">
157 </span><span·class="p"·data-group-id="9596805230-2">[</span><span·class="p"·data-group-id="9596805230-3">{</span><span·class="ss">deprecated</span><span·class="p">,</span><span·class="p"·data-group-id="9596805230-4">[</span><span·class="p"·data-group-id="9596805230-4">]</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·8510118f92c7b73b07fb09edb5c6e477286060088e0a0a471bf87daeef925bb4·...·]-3">}</span><span·class="p">,</span><span·class="w">157 </span><span·class="p"·data-group-id="8487017379-2">[</span><span·class="p"·data-group-id="8487017379-3">{</span><span·class="ss">deprecated</span><span·class="p">,</span><span·class="p"·data-group-id="8487017379-4">[</span><span·class="p"·data-group-id="8487017379-4">]</span><span·class="p"·d[·...·truncated·by·diffoscope;·len:·24,·SHA:·284effcb26d3f02e281857f05917995c6ebadadb2b7bfe2d63a020b3257ebedb·...·]-3">}</span><span·class="p">,</span><span·class="w">
158 ·</span><span·class="p"·data-group-id="9596805230-5">{</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="p"·data-group-id="9596805230-6">[</span><span·class="p"·data-group-id="9596805230-7">{</span><span·class="p"·data-group-id="9596805230-8">{</span><span·class="ss">m[·...·truncated·by·diffoscope;·len:·575,·SHA:·796fb85b80a596e88856bbc79e63f7a41bebaa703f0a22c37673d1c4ddcfe783·...·]-5">}</span><span·class="p">,</span><span·class="w">158 ·</span><span·class="p"·data-group-id="8487017379-5">{</span><span·class="ss">undefined</span><span·class="p">,</span><span·class="p"·data-group-id="8487017379-6">[</span><span·class="p"·data-group-id="8487017379-7">{</span><span·class="p"·data-group-id="8487017379-8">{</span><span·class="ss">m[·...·truncated·by·diffoscope;·len:·575,·SHA:·adb4175e3fc33ab0ec65b83b2682e898972f01ac501c5354a9269092db7aa350·...·]-5">}</span><span·class="p">,</span><span·class="w">
159 ·</span><span·class="p"·data-group-id="9596805230-10">{</span><span·class="ss">unused</span><span·class="p">,</span><span·class="p"·data-group-id="9596805230-11">[</span><span·class="p"·data-group-id="9596805230-12">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="s[·...·truncated·by·diffoscope;·len:·264,·SHA:·06709ba80a491cf4c8184c58a2f3bbf21006873d841d8a72bcab926a5383e159·...·]-2">]</span></code></pre><p><code·class="inline">m/1</code>·is·also·suitable·for·checking·that·the·BEAM·file·of·a·module·that·is·about159 ·</span><span·class="p"·data-group-id="8487017379-10">{</span><span·class="ss">unused</span><span·class="p">,</span><span·class="p"·data-group-id="8487017379-11">[</span><span·class="p"·data-group-id="8487017379-12">{</span><span·class="ss">my_module</span><span·class="p">,</span><span·class="s[·...·truncated·by·diffoscope;·len:·264,·SHA:·ad54253e00d592aec552a00698b3f1b4901a503008c3f166eedc27fafc6f8196·...·]-2">]</span></code></pre><p><code·class="inline">m/1</code>·is·also·suitable·for·checking·that·the·BEAM·file·of·a·module·that·is·about
160 to·be·loaded·into·a·running·a·system·does·not·call·any·undefined·functions.·In160 to·be·loaded·into·a·running·a·system·does·not·call·any·undefined·functions.·In
161 either·case,·the·code·path·of·the·code·server·(see·the·module·<code·class="inline">code</code>)·is·used161 either·case,·the·code·path·of·the·code·server·(see·the·module·<code·class="inline">code</code>)·is·used
162 for·finding·modules·that·export·externally·called·functions·not·exported·by·the162 for·finding·modules·that·export·externally·called·functions·not·exported·by·the
163 checked·module·itself,·so·called·<a·href="xref.html#library_module">library·modules</a>.</p><h2·id="predefined-analysis"·class="section-heading">163 checked·module·itself,·so·called·<a·href="xref.html#library_module">library·modules</a>.</p><h2·id="predefined-analysis"·class="section-heading">
164 ··<a·href="#predefined-analysis"·class="hover-link">164 ··<a·href="#predefined-analysis"·class="hover-link">
165 ····<i·class="ri-link-m"·aria-hidden="true"></i>165 ····<i·class="ri-link-m"·aria-hidden="true"></i>
166 ··</a>166 ··</a>
167 ··<span·class="text">Predefined·Analysis</span>167 ··<span·class="text">Predefined·Analysis</span>
168 </h2>168 </h2>
169 <p>In·the·last·example·the·module·to·analyze·was·given·as·an·argument·to·<code·class="inline">m/1</code>,·and169 <p>In·the·last·example·the·module·to·analyze·was·given·as·an·argument·to·<code·class="inline">m/1</code>,·and
170 the·code·path·was·(implicitly)·used·as·<a·href="xref.html#library_path">library·path</a>.·In170 the·code·path·was·(implicitly)·used·as·<a·href="xref.html#library_path">library·path</a>.·In
171 this·example·an·<a·href="xref.html#xref_server">xref·server</a>·will·be·used,·which·makes·it171 this·example·an·<a·href="xref.html#xref_server">xref·server</a>·will·be·used,·which·makes·it
172 possible·to·analyze·applications·and·releases,·and·also·to·select·the·library172 possible·to·analyze·applications·and·releases,·and·also·to·select·the·library
173 path·explicitly.</p><p>Each·Xref·server·is·referred·to·by·a·unique·name.·The·name·is·given·when173 path·explicitly.</p><p>Each·Xref·server·is·referred·to·by·a·unique·name.·The·name·is·given·when
174 creating·the·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2325294287-1">(</span><span·class="ss">s</span><span·class="p"·data-group-id="2325294287-1">)</span><span·class="p">.</span><span·class="w">174 creating·the·server:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">1&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="1052373164-1">(</span><span·class="ss">s</span><span·class="p"·data-group-id="1052373164-1">)</span><span·class="p">.</span><span·class="w">
175 </span><span·class="p"·data-group-id="2325294287-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.27</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="2325294287-2">}</span></code></pre><p>Next·the·system·to·be·analyzed·is·added·to·the·Xref·server.·Here·the·system·will175 </span><span·class="p"·data-group-id="1052373164-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="o">&lt;</span><span·class="mf">0.27</span><span·class="p">.</span><span·class="mi">0</span><span·class="o">&gt;</span><span·class="p"·data-group-id="1052373164-2">}</span></code></pre><p>Next·the·system·to·be·analyzed·is·added·to·the·Xref·server.·Here·the·system·will
176 be·OTP,·so·no·library·path·will·be·needed.·Otherwise,·when·analyzing·a·system176 be·OTP,·so·no·library·path·will·be·needed.·Otherwise,·when·analyzing·a·system
177 that·uses·OTP,·the·OTP·modules·are·typically·made·library·modules·by·setting·the177 that·uses·OTP,·the·OTP·modules·are·typically·made·library·modules·by·setting·the
178 library·path·to·the·default·OTP·code·path·(or·to·<code·class="inline">code_path</code>,·see·the178 library·path·to·the·default·OTP·code·path·(or·to·<code·class="inline">code_path</code>,·see·the
179 <a·href="xref.html#code_path">reference·manual</a>).·By·default,·the·names·of·read·BEAM179 <a·href="xref.html#code_path">reference·manual</a>).·By·default,·the·names·of·read·BEAM
180 files·and·warnings·are·output·when·adding·analyzed·modules,·but·these·messages180 files·and·warnings·are·output·when·adding·analyzed·modules,·but·these·messages
181 can·be·avoided·by·setting·default·values·of·some·options:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">set_default</span><span·class="p"·data-group-id="7661709431-1">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7661709431-2">[</span><span·class="p"·data-group-id="7661709431-3">{</span><span·class="ss">verbose</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·414,·SHA:·ca91c42c6599c07ac2f1588434b76c419cf585be49efaa9f4183a988a6c69fa2·...·]-1">)</span><span·class="p">.</span><span·class="w">181 can·be·avoided·by·setting·default·values·of·some·options:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">2&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">set_default</span><span·class="p"·data-group-id="7758676843-1">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7758676843-2">[</span><span·class="p"·data-group-id="7758676843-3">{</span><span·class="ss">verbose</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·414,·SHA:·f6fff02cf0009deab0c88bba2902de7f37d3857bd182f6fda9eb7c051788a006·...·]-1">)</span><span·class="p">.</span><span·class="w">
182 </span><span·class="ss">ok</span><span·class="gp·unselectable">182 </span><span·class="ss">ok</span><span·class="gp·unselectable">
183 3&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">add_release</span><span·class="p"·data-group-id="7661709431-5">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="7661709431-6">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·325,·SHA:·cef1539c2f777c1580b5ff7b6fee25bcbbfeda8226ebc5854766920e1dd7049e·...·]-5">)</span><span·class="p">.</span><span·class="w">183 3&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">add_release</span><span·class="p"·data-group-id="7758676843-5">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">lib_dir</span><span·class="p"·data-group-id="7758676843-6">(</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·325,·SHA:·dee4a82fb6b3b4c551a5703e260e3c2b354d512e0632a253157c275726ef567f·...·]-5">)</span><span·class="p">.</span><span·class="w">
184 </span><span·class="p"·data-group-id="7661709431-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">otp</span><span·class="p"·data-group-id="7661709431-8">}</span></code></pre><p><code·class="inline">add_release/3</code>·assumes·that·all·subdirectories·of·the·library·directory184 </span><span·class="p"·data-group-id="7758676843-8">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="ss">otp</span><span·class="p"·data-group-id="7758676843-8">}</span></code></pre><p><code·class="inline">add_release/3</code>·assumes·that·all·subdirectories·of·the·library·directory
185 returned·by·<a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#lib_dir/0"><code·class="inline">code:lib_dir()</code></a>·contain·applications;185 returned·by·<a·href="../../../../lib/kernel-10.0.1/doc/html/code.html#lib_dir/0"><code·class="inline">code:lib_dir()</code></a>·contain·applications;
186 the·effect·is·that·of·reading·all·BEAM·files·for·the·application.</p><p>It·is·now·easy·to·check·the·release·for·calls·to·undefined·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">analyze</span><span·class="p"·data-group-id="9723130657-1">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefined_function_calls</span><span·class="p"·data-group-id="9723130657-1">)</span><span·class="p">.</span><span·class="w">186 the·effect·is·that·of·reading·all·BEAM·files·for·the·application.</p><p>It·is·now·easy·to·check·the·release·for·calls·to·undefined·functions:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">analyze</span><span·class="p"·data-group-id="8237965637-1">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">undefined_function_calls</span><span·class="p"·data-group-id="8237965637-1">)</span><span·class="p">.</span><span·class="w">
187 </span><span·class="p"·data-group-id="9723130657-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="9723130657-3">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="9723[·...·truncated·by·diffoscope;·len:·457,·SHA:·d14023ad5f1aa5b8cf28b4b898633c040cac4b237cc46d76ed9c157a216100eb·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·check·for·calls·to·undefined·functions·is·an·example·of·a·predefined187 </span><span·class="p"·data-group-id="8237965637-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8237965637-3">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="8237[·...·truncated·by·diffoscope;·len:·457,·SHA:·a5c98bca019388df31ed94d68ff0e2ff04298f44095d51ba476c3a0c46716891·...·]-1">)</span><span·class="p">.</span></code></pre><p>The·check·for·calls·to·undefined·functions·is·an·example·of·a·predefined
188 analysis,·probably·the·most·useful·one.·Other·examples·are·the·analyses·that188 analysis,·probably·the·most·useful·one.·Other·examples·are·the·analyses·that
189 find·unused·local·functions,·or·functions·that·call·some·given·functions.·See189 find·unused·local·functions,·or·functions·that·call·some·given·functions.·See
190 the·<a·href="xref.html#analyze">analyze/2,3</a>·functions·for·a·complete·list·of·predefined190 the·<a·href="xref.html#analyze">analyze/2,3</a>·functions·for·a·complete·list·of·predefined
191 analyses.</p><p>Each·predefined·analysis·is·a·shorthand·for·a·<a·href="xref.html#query">query</a>,·a191 analyses.</p><p>Each·predefined·analysis·is·a·shorthand·for·a·<a·href="xref.html#query">query</a>,·a
192 sentence·of·a·tiny·language·providing·cross·reference·data·as·values·of192 sentence·of·a·tiny·language·providing·cross·reference·data·as·values·of
193 <a·href="xref.html#predefined_variable">predefined·variables</a>.·The·check·for·calls·to193 <a·href="xref.html#predefined_variable">predefined·variables</a>.·The·check·for·calls·to
194 undefined·functions·can·thus·be·stated·as·a·query:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="4597600564-1">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;(XC·-·UC)·||·(XU·-·X·-·B)&quot;</span><span·class="p"·data-group-id="4597600564-1">)</span><span·class="p">.</span><span·class="w">194 undefined·functions·can·thus·be·stated·as·a·query:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">4&gt;·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">q</span><span·class="p"·data-group-id="3775452397-1">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;(XC·-·UC)·||·(XU·-·X·-·B)&quot;</span><span·class="p"·data-group-id="3775452397-1">)</span><span·class="p">.</span><span·class="w">
195 </span><span·class="p"·data-group-id="4597600564-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="4597600564-3">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="4597600564-3">]</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·fce28d2ea1811e820bc8fc62fd2a236b2cba2081379eb078a90db202058865d1·...·]-2">}</span></code></pre><p>The·query·asks·for·the·restriction·of·external·calls·except·the·unresolved·calls195 </span><span·class="p"·data-group-id="3775452397-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="p"·data-group-id="3775452397-3">[</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="3775452397-3">]</span><span·[·...·truncated·by·diffoscope;·len:·35,·SHA:·1d2d4073746b65db0908fd2a24b38603d20c8baa5bce740651285310416fb1ef·...·]-2">}</span></code></pre><p>The·query·asks·for·the·restriction·of·external·calls·except·the·unresolved·calls
196 to·calls·to·functions·that·are·externally·used·but·neither·exported·nor·built-in196 to·calls·to·functions·that·are·externally·used·but·neither·exported·nor·built-in
197 functions·(the·<code·class="inline">||</code>·operator·restricts·the·used·functions·while·the·<code·class="inline">|</code>·operator197 functions·(the·<code·class="inline">||</code>·operator·restricts·the·used·functions·while·the·<code·class="inline">|</code>·operator
198 restricts·the·calling·functions).·The·<code·class="inline">-</code>·operator·returns·the·difference·of·two198 restricts·the·calling·functions).·The·<code·class="inline">-</code>·operator·returns·the·difference·of·two
199 sets,·and·the·<code·class="inline">+</code>·operator·to·be·used·below·returns·the·union·of·two·sets.</p><p>The·relationships·between·the·predefined·variables·<code·class="inline">XU</code>,·<code·class="inline">X</code>,·<code·class="inline">B</code>·and·a·few199 sets,·and·the·<code·class="inline">+</code>·operator·to·be·used·below·returns·the·union·of·two·sets.</p><p>The·relationships·between·the·predefined·variables·<code·class="inline">XU</code>,·<code·class="inline">X</code>,·<code·class="inline">B</code>·and·a·few
200 others·are·worth·elaborating·upon.·The·reference·manual·mentions·two·ways·of200 others·are·worth·elaborating·upon.·The·reference·manual·mentions·two·ways·of
201 expressing·the·set·of·all·functions,·one·that·focuses·on·how·they·are·defined:201 expressing·the·set·of·all·functions,·one·that·focuses·on·how·they·are·defined:
202 <code·class="inline">X + L + B + U</code>,·and·one·that·focuses·on·how·they·are·used:·<code·class="inline">UU + LU + XU</code>.·The202 <code·class="inline">X + L + B + U</code>,·and·one·that·focuses·on·how·they·are·used:·<code·class="inline">UU + LU + XU</code>.·The
Offset 220, 16 lines modifiedOffset 220, 16 lines modified
220 </h2>220 </h2>
221 <p>The·module·check·and·the·predefined·analyses·are·useful,·but·limited.·Sometimes221 <p>The·module·check·and·the·predefined·analyses·are·useful,·but·limited.·Sometimes
222 more·flexibility·is·needed,·for·instance·one·might·not·need·to·apply·a·graph222 more·flexibility·is·needed,·for·instance·one·might·not·need·to·apply·a·graph
223 analysis·on·all·calls,·but·some·subset·will·do·equally·well.·That·flexibility·is223 analysis·on·all·calls,·but·some·subset·will·do·equally·well.·That·flexibility·is
224 provided·with·a·simple·language.·Below·are·some·expressions·of·the·language·with224 provided·with·a·simple·language.·Below·are·some·expressions·of·the·language·with
225 comments,·focusing·on·elements·of·the·language·rather·than·providing·useful225 comments,·focusing·on·elements·of·the·language·rather·than·providing·useful
226 examples.·The·analyzed·system·is·assumed·to·be·OTP,·so·in·order·to·run·the226 examples.·The·analyzed·system·is·assumed·to·be·OTP,·so·in·order·to·run·the
227 queries,·first·evaluate·these·calls:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="0747011456-1">(</span><span·class="ss">s</span><span·class="p"·data-group-id="0747011456-1">)</span><span·class="p">.</span><span·class="w">227 queries,·first·evaluate·these·calls:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="2065453293-1">(</span><span·class="ss">s</span><span·class="p"·data-group-id="2065453293-1">)</span><span·class="p">.</span><span·class="w">
228 </span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">add_release</span><span·class="p"·data-group-id="0747011456-2">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">root_dir</span><span·class="p"·data-group-id="0747011456-3">(</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·ffbe1e2adfacd8a01b838b53bf3cfd8a4ae8b2fad5f92216f4457c504cccf725·...·]-2">)</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">xref:q(s,·&quot;(Fun)·xref·:·Mod&quot;).</code></strong>·-·All·functions·of·the·<code·class="inline">xref</code>·module.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;xref·:·Mod·*·X&quot;).</code></strong>·-·All·exported·functions·of·the·<code·class="inline">xref</code>228 </span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">add_release</span><span·class="p"·data-group-id="2065453293-2">(</span><span·class="ss">s</span><span·class="p">,</span><span·class="w">·</span><span·class="nc">code</span><span·class="p">:</span><span·class="nf">root_dir</span><span·class="p"·data-group-id="2065453293-3">(</span><span·class="p"·data-gro[·...·truncated·by·diffoscope;·len:·70,·SHA:·0d5c18c3f4a58f517db3107ad4a7131f25e6b7a8033ce23e49f539b5fd27e200·...·]-2">)</span><span·class="p">.</span></code></pre><ul><li><p><strong><code·class="inline">xref:q(s,·&quot;(Fun)·xref·:·Mod&quot;).</code></strong>·-·All·functions·of·the·<code·class="inline">xref</code>·module.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;xref·:·Mod·*·X&quot;).</code></strong>·-·All·exported·functions·of·the·<code·class="inline">xref</code>
229 module.·The·first·operand·of·the·intersection·operator·<code·class="inline">*</code>·is·implicitly229 module.·The·first·operand·of·the·intersection·operator·<code·class="inline">*</code>·is·implicitly
230 converted·to·the·more·special·type·of·the·second·operand.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;(Mod)·tools&quot;).</code></strong>·-·All·modules·of·the·Tools·application.</p></li><li><p><strong><code·class="inline">xref:q(s,·'&quot;xref_.*&quot;·:·Mod').</code></strong>·-·All·modules·with·a·name·beginning·with230 converted·to·the·more·special·type·of·the·second·operand.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;(Mod)·tools&quot;).</code></strong>·-·All·modules·of·the·Tools·application.</p></li><li><p><strong><code·class="inline">xref:q(s,·'&quot;xref_.*&quot;·:·Mod').</code></strong>·-·All·modules·with·a·name·beginning·with
231 <code·class="inline">xref_</code>.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;#·E | X &quot;).</code></strong>·-·Number·of·calls·from·exported·functions.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;XC || L &quot;).</code></strong>·-·All·external·calls·to·local·functions.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;XC * LC&quot;).</code></strong>·-·All·calls·that·have·both·an·external·and·a·local231 <code·class="inline">xref_</code>.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;#·E | X &quot;).</code></strong>·-·Number·of·calls·from·exported·functions.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;XC || L &quot;).</code></strong>·-·All·external·calls·to·local·functions.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;XC * LC&quot;).</code></strong>·-·All·calls·that·have·both·an·external·and·a·local
232 version.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;(LLin)·(LC·*·XC)&quot;).</code></strong>·-·The·lines·where·the·local·calls·of·the232 version.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;(LLin)·(LC·*·XC)&quot;).</code></strong>·-·The·lines·where·the·local·calls·of·the
233 last·example·are·made.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;(XLin)·(LC·*·XC)&quot;).</code></strong>·-·The·lines·where·the·external·calls·of233 last·example·are·made.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;(XLin)·(LC·*·XC)&quot;).</code></strong>·-·The·lines·where·the·external·calls·of
234 the·example·before·last·are·made.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;XC·*·(ME·-·strict·ME)&quot;).</code></strong>·-·External·calls·within·some·module.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;E ||| kernel&quot;).</code></strong>·-·All·calls·within·the·Kernel·application.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;closure E | kernel || kernel&quot;).</code></strong>·-·All·direct·and·indirect234 the·example·before·last·are·made.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;XC·*·(ME·-·strict·ME)&quot;).</code></strong>·-·External·calls·within·some·module.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;E ||| kernel&quot;).</code></strong>·-·All·calls·within·the·Kernel·application.</p></li><li><p><strong><code·class="inline">xref:q(s,·&quot;closure E | kernel || kernel&quot;).</code></strong>·-·All·direct·and·indirect
235 calls·within·the·Kernel·application.·Both·the·calling·and·the·used·functions235 calls·within·the·Kernel·application.·Both·the·calling·and·the·used·functions
Offset 264, 26 lines modifiedOffset 264, 26 lines modified
264 <code·class="inline">digraph</code>·representation·of·graphs)·has·to·be·explicitly·applied.</p><p>As·an·example·of·analyzing·indirect·calls,·the·following·Erlang·function·tries264 <code·class="inline">digraph</code>·representation·of·graphs)·has·to·be·explicitly·applied.</p><p>As·an·example·of·analyzing·indirect·calls,·the·following·Erlang·function·tries
265 to·answer·the·question:·if·we·want·to·know·which·modules·are·used·indirectly·by265 to·answer·the·question:·if·we·want·to·know·which·modules·are·used·indirectly·by
266 some·module(s),·is·it·worth·while·using·the266 some·module(s),·is·it·worth·while·using·the
267 <a·href="xref.html#call_graph">function·graph</a>·rather·than·the·module·graph?·Recall·that267 <a·href="xref.html#call_graph">function·graph</a>·rather·than·the·module·graph?·Recall·that
268 a·module·M1·is·said·to·call·a·module·M2·if·there·is·some·function·in·M1·that268 a·module·M1·is·said·to·call·a·module·M2·if·there·is·some·function·in·M1·that
269 calls·some·function·in·M2.·It·would·be·nice·if·we·could·use·the·much·smaller269 calls·some·function·in·M2.·It·would·be·nice·if·we·could·use·the·much·smaller
270 module·graph,·since·it·is·available·also·in·the·light·weight270 module·graph,·since·it·is·available·also·in·the·light·weight
271 <code·class="inline">modules</code><a·href="xref.html#mode">mode</a>·of·Xref·servers.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t</span><span·class="p"·data-group-id="4399556719-1">(</span><span·class="n">S</span><span·class="p"·data-group-id="4399556719-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">271 <code·class="inline">modules</code><a·href="xref.html#mode">mode</a>·of·Xref·servers.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">t</span><span·class="p"·data-group-id="4706320638-1">(</span><span·class="n">S</span><span·class="p"·data-group-id="4706320638-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
272 ··</span><span·class="p"·data-group-id="4399556719-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="4399556719-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·284,·SHA:·93d5cbd625d3c83116330297101d62cd69126f5a8fefc50631989a6113e80749·...·]-3">)</span><span·class="p">,</span><span·class="w">272 ··</span><span·class="p"·data-group-id="4706320638-2">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="p"·data-group-id="4706320638-2">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class=[·...·truncated·by·diffoscope;·len:·284,·SHA:·852e85227c7d127b8ebc73066326daef28940edda2178653724d43c3cd318961·...·]-3">)</span><span·class="p">,</span><span·class="w">
273 ··</span><span·class="p"·data-group-id="4399556719-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ms</span><span·class="p"·data-group-id="4399556719-4">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·269,·SHA:·a08ac9de89a2db82dfd9f005664d198403ae395f4f24d5044ab650e59cb70163·...·]-5">)</span><span·class="p">,</span><span·class="w">273 ··</span><span·class="p"·data-group-id="4706320638-4">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ms</span><span·class="p"·data-group-id="4706320638-4">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·269,·SHA:·4742bc11000a87628c0739d2282b03e9d87b2d93fa3e81f24383dfd7f2053336·...·]-5">)</span><span·class="p">,</span><span·class="w">
274 ··</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4399556719-6">(</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="4399556719-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">274 ··</span><span·class="n">Fun</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4706320638-6">(</span><span·class="n">M</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N</span><span·class="p"·data-group-id="4706320638-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
275 ······</span><span·class="n">Q</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4399556719-7">(</span><span·class="s">&quot;#·(Mod)·(Eplus·|·</span><span·class="si">~p</span><span·class="s">·:·Mod)&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4399556719-8">[</span><span·class="n">M</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·1e5e56c6b5cff15c0e7c29c650010524958fc9fdab4161ecbbd7b6f93711bc5c·...·]-7">)</span><span·class="p">,</span><span·class="w">275 ······</span><span·class="n">Q</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">io_lib</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4706320638-7">(</span><span·class="s">&quot;#·(Mod)·(Eplus·|·</span><span·class="si">~p</span><span·class="s">·:·Mod)&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="4706320638-8">[</span><span·class="n">M</span><s[·...·truncated·by·diffoscope;·len:·92,·SHA:·c77b34e20f93a53722ef354e2390cfa54c579aac1b39248c6b63af03f31c3d69·...·]-7">)</span><span·class="p">,</span><span·class="w">
276 ······</span><span·class="p"·data-group-id="4399556719-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N0</span><span·class="p"·data-group-id="4399556719-9">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·449,·SHA:·1471e2e8452aba6c0afaa894255368c010d85470c4740554d2ef14fba83035cf·...·]-10">)</span><span·class="p">,</span><span·class="w">276 ······</span><span·class="p"·data-group-id="4706320638-9">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">N0</span><span·class="p"·data-group-id="4706320638-9">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class[·...·truncated·by·diffoscope;·len:·449,·SHA:·7ea203bb4cd72c1c8ccfe42992106abbde7d2721d7a70703da2df01463a2e833·...·]-10">)</span><span·class="p">,</span><span·class="w">
277 ······</span><span·class="n">N</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">N0</span><span·class="w">277 ······</span><span·class="n">N</span><span·class="w">·</span><span·class="o">+</span><span·class="w">·</span><span·class="n">N0</span><span·class="w">
278 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">278 ····</span><span·class="k">end</span><span·class="p">,</span><span·class="w">
279 ··</span><span·class="n">Sum</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="4399556719-12">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ms</span><span·class="p"·data-group-id="4399556719-12">)</span><span·class="p">,</span><span·class="w">279 ··</span><span·class="n">Sum</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">foldl</span><span·class="p"·data-group-id="4706320638-12">(</span><span·class="n">Fun</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">0</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Ms</span><span·class="p"·data-group-id="4706320638-12">)</span><span·class="p">,</span><span·class="w">
280 ··</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">forget</span><span·class="p"·data-group-id="4399556719-13">(</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Eplus&#39;</span><span·class="p"·data-group-id="4399556719-13">)</span><span·class="p">,</span><span·class="w">280 ··</span><span·class="ss">ok</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xref</span><span·class="p">:</span><span·class="nf">forget</span><span·class="p"·data-group-id="4706320638-13">(</span><span·class="n">S</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">&#39;Eplus&#39;</span><span·class="p"·data-group-id="4706320638-13">)</span><span·class="p">,</span><span·class="w">
281 ··</span><span·class="p"·data-group-id="4399556719-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tot</span><span·class="p"·data-group-id="4399556719-14">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·290,·SHA:·b6dd6610f2b5880914e1a22b57d7e8d07e6a77044f556de30c3443fc5f0dc521·...·]-15">)</span><span·class="p">,</span><span·class="w">281 ··</span><span·class="p"·data-group-id="4706320638-14">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Tot</span><span·class="p"·data-group-id="4706320638-14">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·cl[·...·truncated·by·diffoscope;·len:·290,·SHA:·0d00030d8795daa8393438b461d9cdd122dc2669773a93afe48b65a56ed5914b·...·]-15">)</span><span·class="p">,</span><span·class="w">
282 ··</span><span·class="mi">100</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="p"·data-group-id="4399556719-16">(</span><span·class="p"·data-group-id="4399556719-17">(</span><span·class="n">Tot</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="4399556719-17">)</span><s[·...·truncated·by·diffoscope;·len:·137,·SHA:·153e1af617fdd10a2fa00f23b95a07e3180e1b7e0706e1be381712a7109474b1·...·]-16">)</span><span·class="p">.</span></code></pre><p>Comments·on·the·code:</p><ul><li>We·want·to·find·the·reduction·of·the·closure·of·the·function·graph·to·modules.282 ··</span><span·class="mi">100</span><span·class="w">·</span><span·class="o">*</span><span·class="w">·</span><span·class="p"·data-group-id="4706320638-16">(</span><span·class="p"·data-group-id="4706320638-17">(</span><span·class="n">Tot</span><span·class="w">·</span><span·class="o">-</span><span·class="w">·</span><span·class="n">Sum</span><span·class="p"·data-group-id="4706320638-17">)</span><s[·...·truncated·by·diffoscope;·len:·137,·SHA:·2b18520fa0a4e0371715d4d7701295a931be7e0b20e1f651f6e9721fce94f1ce·...·]-16">)</span><span·class="p">.</span></code></pre><p>Comments·on·the·code:</p><ul><li>We·want·to·find·the·reduction·of·the·closure·of·the·function·graph·to·modules.
283 The·direct·expression·for·doing·that·would·be·<code·class="inline">(Mod) (closure E | AM)</code>,·but283 The·direct·expression·for·doing·that·would·be·<code·class="inline">(Mod) (closure E | AM)</code>,·but
284 then·we·would·have·to·represent·all·of·the·transitive·closure·of·E·in·memory.284 then·we·would·have·to·represent·all·of·the·transitive·closure·of·E·in·memory.
285 Instead·the·number·of·indirectly·used·modules·is·found·for·each·analyzed285 Instead·the·number·of·indirectly·used·modules·is·found·for·each·analyzed
286 module,·and·the·sum·over·all·modules·is·calculated.</li><li>A·user·variable·is·employed·for·holding·the·<code·class="inline">digraph</code>·representation·of·the286 module,·and·the·sum·over·all·modules·is·calculated.</li><li>A·user·variable·is·employed·for·holding·the·<code·class="inline">digraph</code>·representation·of·the
287 function·graph·for·use·in·many·queries.·The·reason·is·efficiency.·As·opposed287 function·graph·for·use·in·many·queries.·The·reason·is·efficiency.·As·opposed
288 to·the·<code·class="inline">=</code>·operator,·the·<code·class="inline">:=</code>·operator·saves·a·value·for·subsequent·analyses.288 to·the·<code·class="inline">=</code>·operator,·the·<code·class="inline">:=</code>·operator·saves·a·value·for·subsequent·analyses.
289 Here·might·be·the·place·to·note·that·equal·subexpressions·within·a·query·are289 Here·might·be·the·place·to·note·that·equal·subexpressions·within·a·query·are
12.8 KB
./usr/share/doc/erlang-doc/html/lib/wx-2.4.2/doc/html/chapter.html
    
Offset 157, 21 lines modifiedOffset 157, 21 lines modified
157 that·object.·Type·checking·is·done·so·that·a·module·only·operates·on·it's157 that·object.·Type·checking·is·done·so·that·a·module·only·operates·on·it's
158 objects·or·inherited·classes.</p><p>An·object·is·created·with·<em>new</em>·and·destroyed·with·<em>destroy</em>.·Most·functions·in158 objects·or·inherited·classes.</p><p>An·object·is·created·with·<em>new</em>·and·destroyed·with·<em>destroy</em>.·Most·functions·in
159 the·classes·are·named·the·same·as·their·C++·counterpart,·except·that·for159 the·classes·are·named·the·same·as·their·C++·counterpart,·except·that·for
160 convenience,·in·erlang·they·start·with·a·lowercase·letter·and·the·first·argument160 convenience,·in·erlang·they·start·with·a·lowercase·letter·and·the·first·argument
161 is·the·object·reference.·Optional·arguments·are·last·and·expressed·as·tagged161 is·the·object·reference.·Optional·arguments·are·last·and·expressed·as·tagged
162 tuples·in·any·order.</p><p>For·example·the·<em>wxWindow</em>·C++·class·is·implemented·in·the·<em>wxWindow</em>·erlang162 tuples·in·any·order.</p><p>For·example·the·<em>wxWindow</em>·C++·class·is·implemented·in·the·<em>wxWindow</em>·erlang
163 module·and·the·member·<em>wxWindow::CenterOnParent</em>·is·thus163 module·and·the·member·<em>wxWindow::CenterOnParent</em>·is·thus
164 <em>wxWindow:centerOnParent</em>.·The·following·C++·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="ss">wxWindow</span><span·class="w">·</span><span·class="n">MyWin</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">new</span><span·class="w">·</span><span·class="nf">wxWindow</span><span·class="p"·data-group-id="4623456829-1">(</span><span·class="p"·data-group-id="4623456829-1">)</span><span·class="p">;</span><span·class="w">164 <em>wxWindow:centerOnParent</em>.·The·following·C++·code:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="ss">wxWindow</span><span·class="w">·</span><span·class="n">MyWin</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">new</span><span·class="w">·</span><span·class="nf">wxWindow</span><span·class="p"·data-group-id="5055799475-1">(</span><span·class="p"·data-group-id="5055799475-1">)</span><span·class="p">;</span><span·class="w">
165 ··</span><span·class="n">MyWin</span><span·class="p">.</span><span·class="n">CenterOnParent</span><span·class="p"·data-group-id="4623456829-2">(</span><span·class="ss">wxVERTICAL</span><span·class="p"·data-group-id="4623456829-2">)</span><span·class="p">;</span><span·class="w">165 ··</span><span·class="n">MyWin</span><span·class="p">.</span><span·class="n">CenterOnParent</span><span·class="p"·data-group-id="5055799475-2">(</span><span·class="ss">wxVERTICAL</span><span·class="p"·data-group-id="5055799475-2">)</span><span·class="p">;</span><span·class="w">
166 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">166 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
167 ··</span><span·class="ss">delete</span><span·class="w">·</span><span·class="n">MyWin</span><span·class="p">;</span></code></pre><p>would·in·erlang·look·like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="n">MyWin</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wxWindow</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="8087018955-1">(</span><span·class="p"·data-group-id="8087018955-1">)</span><span·class="p">,</span><span·class="w">167 ··</span><span·class="ss">delete</span><span·class="w">·</span><span·class="n">MyWin</span><span·class="p">;</span></code></pre><p>would·in·erlang·look·like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="n">MyWin</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wxWindow</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="6715996351-1">(</span><span·class="p"·data-group-id="6715996351-1">)</span><span·class="p">,</span><span·class="w">
168 ··</span><span·class="nc">wxWindow</span><span·class="p">:</span><span·class="nf">centerOnParent</span><span·class="p"·data-group-id="8087018955-2">(</span><span·class="n">MyWin</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="8087018955-3">[</span><span·class="p"·data-group-id="8087018955-4">{</span><span·class="ss">dir</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·204,·SHA:·d2dcbbcbbc6e49d7becab9243bf01110ba25c28a09b4d2996f4c801e32651474·...·]-2">)</span><span·class="p">,</span><span·class="w">168 ··</span><span·class="nc">wxWindow</span><span·class="p">:</span><span·class="nf">centerOnParent</span><span·class="p"·data-group-id="6715996351-2">(</span><span·class="n">MyWin</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="6715996351-3">[</span><span·class="p"·data-group-id="6715996351-4">{</span><span·class="ss">dir</span><span·class="p">,</span><[·...·truncated·by·diffoscope;·len:·204,·SHA:·4ff722bf5dcd94a40d8fd6bf692477a45a1ca7b64b7bb42396fdc866b0e85ad9·...·]-2">)</span><span·class="p">,</span><span·class="w">
169 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">169 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
170 ··</span><span·class="nc">wxWindow</span><span·class="p">:</span><span·class="nf">destroy</span><span·class="p"·data-group-id="8087018955-5">(</span><span·class="n">MyWin</span><span·class="p"·data-group-id="8087018955-5">)</span><span·class="p">,</span></code></pre><p>When·you·are·reading·wxWidgets·documentation·or·the·examples,·you·will·notice170 ··</span><span·class="nc">wxWindow</span><span·class="p">:</span><span·class="nf">destroy</span><span·class="p"·data-group-id="6715996351-5">(</span><span·class="n">MyWin</span><span·class="p"·data-group-id="6715996351-5">)</span><span·class="p">,</span></code></pre><p>When·you·are·reading·wxWidgets·documentation·or·the·examples,·you·will·notice
171 that·some·of·the·most·basic·classes·are·missing·in·<em>wx</em>,·they·are·directly171 that·some·of·the·most·basic·classes·are·missing·in·<em>wx</em>,·they·are·directly
172 mapped·to·corresponding·erlang·terms:</p><ul><li><p><strong><em>wxPoint</em>·is·represented·by·{Xcoord,Ycoord}</strong></p></li><li><p><strong><em>wxSize</em>·is·represented·by·{Width,Height}</strong></p></li><li><p><strong><em>wxRect</em>·is·represented·by·{Xcoord,Ycoord,Width,Height}</strong></p></li><li><p><strong><em>wxColour</em>·is·represented·by·{Red,Green,Blue[,Alpha]}</strong></p></li><li><p><strong><em>wxString</em>·is·represented·by172 mapped·to·corresponding·erlang·terms:</p><ul><li><p><strong><em>wxPoint</em>·is·represented·by·{Xcoord,Ycoord}</strong></p></li><li><p><strong><em>wxSize</em>·is·represented·by·{Width,Height}</strong></p></li><li><p><strong><em>wxRect</em>·is·represented·by·{Xcoord,Ycoord,Width,Height}</strong></p></li><li><p><strong><em>wxColour</em>·is·represented·by·{Red,Green,Blue[,Alpha]}</strong></p></li><li><p><strong><em>wxString</em>·is·represented·by
173 <a·href="../../../../lib/stdlib-6.0.1/doc/html/unicode.html#t:charlist/0">unicode:charlist()</a></strong></p></li><li><p><strong><em>wxGBPosition</em>·is·represented·by·{Row,Column}</strong></p></li><li><p><strong><em>wxGBSpan</em>·is·represented·by·{RowSpan,ColumnSPan}</strong></p></li><li><p><strong><em>wxGridCellCoords</em>·is·represented·by·{Row,Column}</strong></p></li></ul><p>In·the·places·where·the·erlang·API·differs·from·the·original·one·it·should·be173 <a·href="../../../../lib/stdlib-6.0.1/doc/html/unicode.html#t:charlist/0">unicode:charlist()</a></strong></p></li><li><p><strong><em>wxGBPosition</em>·is·represented·by·{Row,Column}</strong></p></li><li><p><strong><em>wxGBSpan</em>·is·represented·by·{RowSpan,ColumnSPan}</strong></p></li><li><p><strong><em>wxGridCellCoords</em>·is·represented·by·{Row,Column}</strong></p></li></ul><p>In·the·places·where·the·erlang·API·differs·from·the·original·one·it·should·be
174 obvious·from·the·erlang·documentation·which·representation·has·been·used.·E.g.174 obvious·from·the·erlang·documentation·which·representation·has·been·used.·E.g.
175 the·C++·arrays·and/or·lists·are·sometimes·represented·as·erlang·lists·and175 the·C++·arrays·and/or·lists·are·sometimes·represented·as·erlang·lists·and
176 sometimes·as·tuples.</p><p>Colours·are·represented·with·{Red,Green,Blue[,Alpha]},·the·Alpha·value·is176 sometimes·as·tuples.</p><p>Colours·are·represented·with·{Red,Green,Blue[,Alpha]},·the·Alpha·value·is
177 optional·when·used·as·an·argument·to·functions,·but·it·will·always·be·returned177 optional·when·used·as·an·argument·to·functions,·but·it·will·always·be·returned
Offset 191, 22 lines modifiedOffset 191, 22 lines modified
191 ··<span·class="text">Multiple·processes·and·memory·handling</span>191 ··<span·class="text">Multiple·processes·and·memory·handling</span>
192 </h2>192 </h2>
193 <p>The·intention·is·that·each·erlang·application·calls·wx:new()·once·to·setup·it's193 <p>The·intention·is·that·each·erlang·application·calls·wx:new()·once·to·setup·it's
194 GUI·which·creates·an·environment·and·a·memory·mapping.·To·be·able·to·use·<em>wx</em>194 GUI·which·creates·an·environment·and·a·memory·mapping.·To·be·able·to·use·<em>wx</em>
195 from·several·processes·in·your·application,·you·must·share·the·environment.·You195 from·several·processes·in·your·application,·you·must·share·the·environment.·You
196 can·get·the·active·environment·with·<a·href="wx.html#get_env/0"><code·class="inline">wx:get_env/0</code></a>·and·set·it·in·the·new196 can·get·the·active·environment·with·<a·href="wx.html#get_env/0"><code·class="inline">wx:get_env/0</code></a>·and·set·it·in·the·new
197 processes·with·<a·href="wx.html#set_env/1"><code·class="inline">wx:set_env/1</code></a>.·Two·processes·or·applications·which·have·both197 processes·with·<a·href="wx.html#set_env/1"><code·class="inline">wx:set_env/1</code></a>.·Two·processes·or·applications·which·have·both
198 called·wx:new()·will·not·be·able·use·each·others·objects.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="1673413130-1">(</span><span·class="p"·data-group-id="1673413130-1">)</span><span·class="p">,</span><span·class="w">198 called·wx:new()·will·not·be·able·use·each·others·objects.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="0940868198-1">(</span><span·class="p"·data-group-id="0940868198-1">)</span><span·class="p">,</span><span·class="w">
199 ··</span><span·class="n">MyWin</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wxFrame</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="1673413130-2">(</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">null</span><span·class="p"·data-group-id="1673413130-3">(</span><span·class="p"·data-group-id="1673413130-3">)</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·309,·SHA:·5a839cfb2822d7b45f33bf4e5ba144df11c2ba8181f748742e44b4886cc17508·...·]-2">)</span><span·class="p">,</span><span·class="w">199 ··</span><span·class="n">MyWin</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wxFrame</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="0940868198-2">(</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">null</span><span·class="p"·data-group-id="0940868198-3">(</span><span·class="p"·data-group-id="0940868198-3">)</span><span·class="p">,</span><span·class="w">·</span><s[·...·truncated·by·diffoscope;·len:·309,·SHA:·78935b65d5e2956334939f27cb1da7f2b1ab5cf0e430fbf5428e1c2b04b484f3·...·]-2">)</span><span·class="p">,</span><span·class="w">
200 ··</span><span·class="n">Env</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">get_env</span><span·class="p"·data-group-id="1673413130-5">(</span><span·class="p"·data-group-id="1673413130-5">)</span><span·class="p">,</span><span·class="w">200 ··</span><span·class="n">Env</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">get_env</span><span·class="p"·data-group-id="0940868198-5">(</span><span·class="p"·data-group-id="0940868198-5">)</span><span·class="p">,</span><span·class="w">
201 ··</span><span·class="nf">spawn</span><span·class="p"·data-group-id="1673413130-6">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="1673413130-7">(</span><span·class="p"·data-group-id="1673413130-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">201 ··</span><span·class="nf">spawn</span><span·class="p"·data-group-id="0940868198-6">(</span><span·class="nf">fun</span><span·class="p"·data-group-id="0940868198-7">(</span><span·class="p"·data-group-id="0940868198-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
202 ···········</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">set_env</span><span·class="p"·data-group-id="1673413130-8">(</span><span·class="n">Env</span><span·class="p"·data-group-id="1673413130-8">)</span><span·class="p">,</span><span·class="w">202 ···········</span><span·class="nc">wx</span><span·class="p">:</span><span·class="nf">set_env</span><span·class="p"·data-group-id="0940868198-8">(</span><span·class="n">Env</span><span·class="p"·data-group-id="0940868198-8">)</span><span·class="p">,</span><span·class="w">
203 ···········</span><span·class="c1">%%·Here·you·can·do·wx·calls·from·your·helper·process.</span><span·class="w">203 ···········</span><span·class="c1">%%·Here·you·can·do·wx·calls·from·your·helper·process.</span><span·class="w">
204 ···········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">204 ···········</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
205 ········</span><span·class="k">end</span><span·class="p"·data-group-id="1673413130-6">)</span><span·class="p">,</span><span·class="w">205 ········</span><span·class="k">end</span><span·class="p"·data-group-id="0940868198-6">)</span><span·class="p">,</span><span·class="w">
206 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>When·<a·href="wx.html#destroy/0"><code·class="inline">wx:destroy/0</code></a>·is·invoked·or·when·all·processes·in·the·application·have206 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><p>When·<a·href="wx.html#destroy/0"><code·class="inline">wx:destroy/0</code></a>·is·invoked·or·when·all·processes·in·the·application·have
207 died,·the·memory·is·deleted·and·all·windows·created·by·that·application·are207 died,·the·memory·is·deleted·and·all·windows·created·by·that·application·are
208 closed.</p><p>The·<em>wx</em>·application·never·cleans·or·garbage·collects·memory·as·long·as·the·user208 closed.</p><p>The·<em>wx</em>·application·never·cleans·or·garbage·collects·memory·as·long·as·the·user
209 application·is·alive.·Most·of·the·objects·are·deleted·when·a·window·is·closed,209 application·is·alive.·Most·of·the·objects·are·deleted·when·a·window·is·closed,
210 or·at·least·all·the·objects·which·have·a·parent·argument·that·is·non·null.·By210 or·at·least·all·the·objects·which·have·a·parent·argument·that·is·non·null.·By
211 using·<code·class="inline">wxCLASS:destroy/1</code>·when·possible·you·can·avoid·an·increasing·memory211 using·<code·class="inline">wxCLASS:destroy/1</code>·when·possible·you·can·avoid·an·increasing·memory
212 usage.·This·is·especially·important·when·<em>wxWidgets</em>·assumes·or·recommends·that212 usage.·This·is·especially·important·when·<em>wxWidgets</em>·assumes·or·recommends·that
659 KB
./usr/share/doc/erlang-doc/html/lib/wx-2.4.2/doc/html/wx.epub
39.3 KB
zipinfo {}
Max HTML report size reached
586 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
19.5 KB
OEBPS/wx_object.xhtml
Max HTML report size reached
1.18 KB
OEBPS/content.opf
1.14 KB
OEBPS/content.opf
Max HTML report size reached
12.7 KB
OEBPS/chapter.xhtml
Max HTML report size reached
19.6 KB
./usr/share/doc/erlang-doc/html/lib/wx-2.4.2/doc/html/wx_object.html
    
Offset 132, 44 lines modifiedOffset 132, 44 lines modified
132 works·like·a·regular·gen_server·module·and·creates·a·server·per·object.</p><p>NOTE:·Currently·no·form·of·inheritance·is·implemented.</p><p>The·user·module·should·export:</p><p>init(Args)·should·return<br/>{wxWindow,·State}·|·{wxWindow,·State,·Timeout}·|·ignore·|·{stop,·Reason}</p><p>Asynchronous·window·event·handling:<br/>handle_event(#wx{},·State)·should·return<br/>{noreply,·State}·|·{noreply,·State,·Timeout}·|·{stop,·Reason,·State}</p><p>The·user·module·can·export·the·following·callback·functions:</p><p>handle_call(Msg,·{From,·Tag},·State)·should·return<br/>{reply,·Reply,·State}·|·{reply,·Reply,·State,·Timeout}·|·{noreply,·State}132 works·like·a·regular·gen_server·module·and·creates·a·server·per·object.</p><p>NOTE:·Currently·no·form·of·inheritance·is·implemented.</p><p>The·user·module·should·export:</p><p>init(Args)·should·return<br/>{wxWindow,·State}·|·{wxWindow,·State,·Timeout}·|·ignore·|·{stop,·Reason}</p><p>Asynchronous·window·event·handling:<br/>handle_event(#wx{},·State)·should·return<br/>{noreply,·State}·|·{noreply,·State,·Timeout}·|·{stop,·Reason,·State}</p><p>The·user·module·can·export·the·following·callback·functions:</p><p>handle_call(Msg,·{From,·Tag},·State)·should·return<br/>{reply,·Reply,·State}·|·{reply,·Reply,·State,·Timeout}·|·{noreply,·State}
133 |·{noreply,·State,·Timeout}·|·{stop,·Reason,·Reply,·State}</p><p>handle_cast(Msg,·State)·should·return<br/>{noreply,·State}·|·{noreply,·State,·Timeout}·|·{stop,·Reason,·State}</p><p>If·the·above·are·not·exported·but·called,·the·wx_object·process·will·crash.·The133 |·{noreply,·State,·Timeout}·|·{stop,·Reason,·Reply,·State}</p><p>handle_cast(Msg,·State)·should·return<br/>{noreply,·State}·|·{noreply,·State,·Timeout}·|·{stop,·Reason,·State}</p><p>If·the·above·are·not·exported·but·called,·the·wx_object·process·will·crash.·The
134 user·module·can·also·export:</p><p>Info·is·message·e.g.·{'EXIT',·P,·R},·{nodedown,·N},·...<br/>handle_info(Info,·State)·should·return·,·...<br/>{noreply,·State}·|·{noreply,·State,·Timeout}·|·{stop,·Reason,·State}</p><p>If·a·message·is·sent·to·the·wx_object·process·when·handle_info·is·not·exported,134 user·module·can·also·export:</p><p>Info·is·message·e.g.·{'EXIT',·P,·R},·{nodedown,·N},·...<br/>handle_info(Info,·State)·should·return·,·...<br/>{noreply,·State}·|·{noreply,·State,·Timeout}·|·{stop,·Reason,·State}</p><p>If·a·message·is·sent·to·the·wx_object·process·when·handle_info·is·not·exported,
135 the·message·will·be·dropped·and·ignored.</p><p>When·stop·is·returned·in·one·of·the·functions·above·with·Reason·=·normal·|135 the·message·will·be·dropped·and·ignored.</p><p>When·stop·is·returned·in·one·of·the·functions·above·with·Reason·=·normal·|
136 shutdown·|·Term,·terminate(State)·is·called.·It·lets·the·user·module·clean·up,136 shutdown·|·Term,·terminate(State)·is·called.·It·lets·the·user·module·clean·up,
137 it·is·always·called·when·server·terminates·or·when·wx_object()·in·the·driver·is137 it·is·always·called·when·server·terminates·or·when·wx_object()·in·the·driver·is
138 deleted.·If·the·Parent·process·terminates·the·Module:terminate/2·function·is138 deleted.·If·the·Parent·process·terminates·the·Module:terminate/2·function·is
139 called.<br/>terminate(Reason,·State)</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="7455613755-1">(</span><span·class="ss">myDialog</span><span·class="p"·data-group-id="7455613755-1">)</span><span·class="p">.</span><span·class="w">139 called.<br/>terminate(Reason,·State)</p><p>Example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">··</span><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="0864427083-1">(</span><span·class="ss">myDialog</span><span·class="p"·data-group-id="0864427083-1">)</span><span·class="p">.</span><span·class="w">
140 </span><span·class="w">··</span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7455613755-2">(</span><span·class="p"·data-group-id="7455613755-3">[</span><span·class="ss">new</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">show</span><span·class="p">/</span><span[·...·truncated·by·diffoscope;·len:·242,·SHA:·f6c7281ce307c39575be1a72be60a5f45239f972fc7206f3a0cec43a71ae88af·...·]-2">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%%·API</span><span·class="w">140 </span><span·class="w">··</span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0864427083-2">(</span><span·class="p"·data-group-id="0864427083-3">[</span><span·class="ss">new</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">show</span><span·class="p">/</span><span[·...·truncated·by·diffoscope;·len:·242,·SHA:·9ab9aa7d1edef4196ee8b05031e403be997630f08c201f798dc29f72493ca999·...·]-2">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%%·API</span><span·class="w">
141 </span><span·class="w">··</span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="7455613755-4">(</span><span·class="p"·data-group-id="7455613755-5">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">141 </span><span·class="w">··</span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="0864427083-4">(</span><span·class="p"·data-group-id="0864427083-5">[</span><span·class="ss">init</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_call</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">handle_event</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
142 ···········</span><span·class="ss">handle_info</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="7455613755-5">]</span><span·class="p"·data-group-id="7455613755-4">)</span><span·class="p">.</span><span·class="w">142 ···········</span><span·class="ss">handle_info</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">code_change</span><span·class="p">/</span><span·class="mi">3</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">terminate</span><span·class="p">/</span><span·class="mi">2</span><span·class="p"·data-group-id="0864427083-5">]</span><span·class="p"·data-group-id="0864427083-4">)</span><span·class="p">.</span><span·class="w">
143 ···········</span><span·class="ss">new</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">showModal</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">destroy</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">]</span><span·class="p">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%%·Callbacks</span><span·class="w">143 ···········</span><span·class="ss">new</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">showModal</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">destroy</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">]</span><span·class="p">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%%·Callbacks</span><span·class="w">
  
144 ··</span><span·class="c1">%%·Client·API</span><span·class="w">144 ··</span><span·class="c1">%%·Client·API</span><span·class="w">
145 ··</span><span·class="nf">new</span><span·class="p"·data-group-id="7455613755-6">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="7455613755-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">145 ··</span><span·class="nf">new</span><span·class="p"·data-group-id="0864427083-6">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Msg</span><span·class="p"·data-group-id="0864427083-6">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
146 ·····</span><span·class="nc">wx_object</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="7455613755-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="7455613755-8">[</span><span·class="n">Parent</span><span·class="p">,</span><span·class="n">Id</span><s[·...·truncated·by·diffoscope;·len:·246,·SHA:·8960e2cd20165dc8e560cd61a2ece88c3be7d00a8292fde27889b6e92d87c716·...·]-7">)</span><span·class="p">.</span><span·class="w">146 ·····</span><span·class="nc">wx_object</span><span·class="p">:</span><span·class="nf">start</span><span·class="p"·data-group-id="0864427083-7">(</span><span·class="o">?</span><span·class="n">MODULE</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0864427083-8">[</span><span·class="n">Parent</span><span·class="p">,</span><span·class="n">Id</span><s[·...·truncated·by·diffoscope;·len:·246,·SHA:·ed417748e75176900a4eacfc7781cc07064161f15d23c58e9552eb84f4bdedc9·...·]-7">)</span><span·class="p">.</span><span·class="w">
  
147 ··</span><span·class="nf">show</span><span·class="p"·data-group-id="7455613755-10">(</span><span·class="n">Dialog</span><span·class="p"·data-group-id="7455613755-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">147 ··</span><span·class="nf">show</span><span·class="p"·data-group-id="0864427083-10">(</span><span·class="n">Dialog</span><span·class="p"·data-group-id="0864427083-10">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
148 ·····</span><span·class="nc">wx_object</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7455613755-11">(</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">show_modal</span><span·class="p"·data-group-id="7455613755-11">)</span><span·class="p">.</span><span·class="w">148 ·····</span><span·class="nc">wx_object</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="0864427083-11">(</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">show_modal</span><span·class="p"·data-group-id="0864427083-11">)</span><span·class="p">.</span><span·class="w">
  
149 ··</span><span·class="nf">destroy</span><span·class="p"·data-group-id="7455613755-12">(</span><span·class="n">Dialog</span><span·class="p"·data-group-id="7455613755-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">149 ··</span><span·class="nf">destroy</span><span·class="p"·data-group-id="0864427083-12">(</span><span·class="n">Dialog</span><span·class="p"·data-group-id="0864427083-12">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
150 ·····</span><span·class="nc">wx_object</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="7455613755-13">(</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">destroy</span><span·class="p"·data-group-id="7455613755-13">)</span><span·class="p">.</span><span·class="w">150 ·····</span><span·class="nc">wx_object</span><span·class="p">:</span><span·class="nf">call</span><span·class="p"·data-group-id="0864427083-13">(</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">destroy</span><span·class="p"·data-group-id="0864427083-13">)</span><span·class="p">.</span><span·class="w">
  
151 ··</span><span·class="c1">%%·Server·Implementation·ala·gen_server</span><span·class="w">151 ··</span><span·class="c1">%%·Server·Implementation·ala·gen_server</span><span·class="w">
152 ··</span><span·class="nf">init</span><span·class="p"·data-group-id="7455613755-14">(</span><span·class="p"·data-group-id="7455613755-15">[</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Str</span><span·class="p"·data-group-id="7455613755-15">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·61ccdae42d243b3c8594f412f0c2643dd2d8d717947f0727fcfb05ab467c8ba2·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">152 ··</span><span·class="nf">init</span><span·class="p"·data-group-id="0864427083-14">(</span><span·class="p"·data-group-id="0864427083-15">[</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Str</span><span·class="p"·data-group-id="0864427083-15">]</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·19,·SHA:·cbc87ee05ac8021b928e023f755aa51399d83983a79640f68bfe20c4e2b0cc05·...·]-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
153 ·····</span><span·class="n">Dialog</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wxDialog</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="7455613755-16">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Testing&quot;</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·157,·SHA:·ffe2b7408c0e497f5947a1bd3cd0f24be8dbb97eabf238458fe8938320006809·...·]-16">)</span><span·class="p">,</span><span·class="w">153 ·····</span><span·class="n">Dialog</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">wxDialog</span><span·class="p">:</span><span·class="nf">new</span><span·class="p"·data-group-id="0864427083-16">(</span><span·class="n">Parent</span><span·class="p">,</span><span·class="w">·</span><span·class="mi">42</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;Testing&quot;</span><span·class="p">,</span><span·class="w">[·...·truncated·by·diffoscope;·len:·157,·SHA:·91d2926c5ce8466f7a473be37d8952b28848f94d0bd09db6e9ec287ac2c6e3de·...·]-16">)</span><span·class="p">,</span><span·class="w">
154 ·····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">154 ·····</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
155 ·····</span><span·class="nc">wxDialog</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="7455613755-18">(</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">command_button_clicked</span><span·class="p"·data-group-id="7455613755-18">)</span><span·class="p">,</span><span·class="w">155 ·····</span><span·class="nc">wxDialog</span><span·class="p">:</span><span·class="nf">connect</span><span·class="p"·data-group-id="0864427083-18">(</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">command_button_clicked</span><span·class="p"·data-group-id="0864427083-18">)</span><span·class="p">,</span><span·class="w">
156 ·····</span><span·class="p"·data-group-id="7455613755-19">{</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyState</span><span·class="p"·data-group-id="7455613755-19">}</span><span·class="p">.</span><span·class="w">156 ·····</span><span·class="p"·data-group-id="0864427083-19">{</span><span·class="n">Dialog</span><span·class="p">,</span><span·class="w">·</span><span·class="n">MyState</span><span·class="p"·data-group-id="0864427083-19">}</span><span·class="p">.</span><span·class="w">
  
157 ··</span><span·class="nf">handle_call</span><span·class="p"·data-group-id="7455613755-20">(</span><span·class="ss">show</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·0d58619ee574a3b0c0eedd056d85e8a2321dba5b2b883ae7c1609eb8c146b668·...·]-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">157 ··</span><span·class="nf">handle_call</span><span·class="p"·data-group-id="0864427083-20">(</span><span·class="ss">show</span><span·class="p">,</span><span·class="w">·</span><span·class="p">_</span><span·class="n">From</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id=[·...·truncated·by·diffoscope;·len:·11,·SHA:·f6b5f7671ea1c5618f111b9c362698a4b525dacac9897db6805ac196b90fdc96·...·]-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
158 ·····</span><span·class="nc">wxDialog</span><span·class="p">:</span><span·class="nf">show</span><span·class="p"·data-group-id="7455613755-21">(</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">win</span><span·class="p"·data-group-id="7455613755-21">)</span><span·class="p">,</span><span·class="w">158 ·····</span><span·class="nc">wxDialog</span><span·class="p">:</span><span·class="nf">show</span><span·class="p"·data-group-id="0864427083-21">(</span><span·class="n">State</span><span·class="o">#</span><span·class="ss">state</span><span·class="p">.</span><span·class="ss">win</span><span·class="p"·data-group-id="0864427083-21">)</span><span·class="p">,</span><span·class="w">
159 ·····</span><span·class="p"·data-group-id="7455613755-22">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7455613755-22">}</span><span·class="p">;</span><span·class="w">159 ·····</span><span·class="p"·data-group-id="0864427083-22">{</span><span·class="ss">reply</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="0864427083-22">}</span><span·class="p">;</span><span·class="w">
160 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">160 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
161 ··</span><span·class="nf">handle_event</span><span·class="p"·data-group-id="7455613755-23">(</span><span·class="o">#</span><span·class="ss">wx</span><span·class="p"·data-group-id="7455613755-24">{</span><span·class="p"·data-group-id="7455613755-24">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·28fab181563b2aced0506128bb38751f79f7052cdae629442314de2ded015f49·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">161 ··</span><span·class="nf">handle_event</span><span·class="p"·data-group-id="0864427083-23">(</span><span·class="o">#</span><span·class="ss">wx</span><span·class="p"·data-group-id="0864427083-24">{</span><span·class="p"·data-group-id="0864427083-24">}</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span[·...·truncated·by·diffoscope;·len:·42,·SHA:·6f3aa2ae6d50d9d9224dda0d13d4cd8ff03b0a7d2660610548b5360f43e8c34f·...·]-23">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
162 ·····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="7455613755-25">(</span><span·class="s">&quot;Users·clicked·button</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="7455613755-26">[</span><span·class="p"·data-group-id="7455613755-26">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·6f3ea014c0d897adb0b6c6d0b0c7e9a5ec289f843337890c9d309d81813f3d50·...·]-25">)</span><span·class="p">,</span><span·class="w">162 ·····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="0864427083-25">(</span><span·class="s">&quot;Users·clicked·button</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="0864427083-26">[</span><span·class="p"·data-group-id="0864427083-26">]</sp[·...·truncated·by·diffoscope;·len:·44,·SHA:·eefb8cb4f2b937760cd06822b4341ca8acc28aba9f20e17615ea452e2a2ae5c2·...·]-25">)</span><span·class="p">,</span><span·class="w">
163 ·····</span><span·class="p"·data-group-id="7455613755-27">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="7455613755-27">}</span><span·class="p">;</span><span·class="w">163 ·····</span><span·class="p"·data-group-id="0864427083-27">{</span><span·class="ss">noreply</span><span·class="p">,</span><span·class="w">·</span><span·class="n">State</span><span·class="p"·data-group-id="0864427083-27">}</span><span·class="p">;</span><span·class="w">
164 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="module-data-types"·class="section-heading">164 ··</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span></code></pre><h2·id="module-data-types"·class="section-heading">
165 ··<a·href="#module-data-types"·class="hover-link">165 ··<a·href="#module-data-types"·class="hover-link">
166 ····<i·class="ri-link-m"·aria-hidden="true"></i>166 ····<i·class="ri-link-m"·aria-hidden="true"></i>
167 ··</a>167 ··</a>
168 ··<span·class="text">DATA·TYPES</span>168 ··<span·class="text">DATA·TYPES</span>
169 </h2>169 </h2>
170 <ul><li><p><strong><a·href=""·id="type-request_id"></a>·request_id()·=·term()</strong></p></li><li><p><strong><a·href=""·id="type-server_ref"></a>·server_ref()·=170 <ul><li><p><strong><a·href=""·id="type-request_id"></a>·request_id()·=·term()</strong></p></li><li><p><strong><a·href=""·id="type-server_ref"></a>·server_ref()·=
624 B
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/.build
    
Offset 26, 15 lines modifiedOffset 26, 15 lines modified
26 dist/lato-latin-300-normal-YUMVEFOL.woff226 dist/lato-latin-300-normal-YUMVEFOL.woff2
27 dist/lato-latin-400-normal-W7754I4D.woff227 dist/lato-latin-400-normal-W7754I4D.woff2
28 dist/lato-latin-700-normal-2XVSBPG4.woff228 dist/lato-latin-700-normal-2XVSBPG4.woff2
29 dist/lato-latin-ext-300-normal-VPGGJKJL.woff229 dist/lato-latin-ext-300-normal-VPGGJKJL.woff2
30 dist/lato-latin-ext-400-normal-N27NCBWW.woff230 dist/lato-latin-ext-400-normal-N27NCBWW.woff2
31 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff231 dist/lato-latin-ext-700-normal-Q2L5DVMW.woff2
32 dist/remixicon-NKANDIL5.woff232 dist/remixicon-NKANDIL5.woff2
33 dist/search_data-06D6C8D4.js33 dist/search_data-26651B8B.js
34 dist/sidebar_items-5992068F.js34 dist/sidebar_items-5992068F.js
35 index.html35 index.html
36 notes.html36 notes.html
37 search.html37 search.html
38 xmerl.html38 xmerl.html
39 xmerl_eventp.html39 xmerl_eventp.html
40 xmerl_examples.html40 xmerl_examples.html
624 B
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/search.html
    
Offset 118, 15 lines modifiedOffset 118, 15 lines modified
118 <div·id="search">118 <div·id="search">
119 ··<h1>119 ··<h1>
120 ····<span></span>120 ····<span></span>
121 ··</h1>121 ··</h1>
  
122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>122 ··<div·class="loading"><div></div><div></div><div></div><div></div></div>
123 </div>123 </div>
124 <script·src="dist/search_data-06D6C8D4.js"></script>124 <script·src="dist/search_data-26651B8B.js"></script>
125 ····<footer·class="footer">125 ····<footer·class="footer">
126 ······<p>126 ······<p>
  
127 ········<span·class="line">127 ········<span·class="line">
128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">128 ··········<button·class="a-main·footer-button·display-quick-switch"·title="Search·HexDocs·packages">
129 ············Search·HexDocs129 ············Search·HexDocs
130 ··········</button>130 ··········</button>
59.7 KB
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/xmerl_examples.html
    
Offset 142, 100 lines modifiedOffset 142, 100 lines modified
142 forms·are·<code·class="inline">{Tag, Fun}</code>,·or·<code·class="inline">{Tag, Fun, LocalState}</code>.·The·second·form·can·be·used142 forms·are·<code·class="inline">{Tag, Fun}</code>,·or·<code·class="inline">{Tag, Fun, LocalState}</code>.·The·second·form·can·be·used
143 to·initialize·the·state·variable·in·question.</p><h4>1.1·User·State</h4><p>All·customization·functions·are·free·to·access·a·&quot;User·state&quot;·variable.·Care143 to·initialize·the·state·variable·in·question.</p><h4>1.1·User·State</h4><p>All·customization·functions·are·free·to·access·a·&quot;User·state&quot;·variable.·Care
144 must·of·course·be·taken·to·coordinate·the·use·of·this·state.·It·is·recommended144 must·of·course·be·taken·to·coordinate·the·use·of·this·state.·It·is·recommended
145 that·functions,·which·do·not·really·have·anything·to·contribute·to·the·&quot;global&quot;145 that·functions,·which·do·not·really·have·anything·to·contribute·to·the·&quot;global&quot;
146 user·state,·use·their·own·state·variable·instead.·Another·option·(used·in·e.g.146 user·state,·use·their·own·state·variable·instead.·Another·option·(used·in·e.g.
147 <code·class="inline">xmerl_eventp.erl</code>)·is·for·customization·functions·to·share·one·of·the·local147 <code·class="inline">xmerl_eventp.erl</code>)·is·for·customization·functions·to·share·one·of·the·local
148 states·(in·<code·class="inline">xmerl_eventp.erl</code>,·the·continuation·function·and·the·fetch·function148 states·(in·<code·class="inline">xmerl_eventp.erl</code>,·the·continuation·function·and·the·fetch·function
149 both·access·the·cont_state.)</p><p>Functions·to·access·user·state:</p><ul><li>··<code·class="inline">xmerl_scan:user_state(GlobalState)</code></li><li>··<code·class="inline">xmerl_scan:user_state(UserState,·GlobalState)</code></li></ul><h4>1.2·Event·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="1577150819-1">{</span><span·class="ss">event_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="1577150819-2">(</span><span·class="p"·data-group-id="1577150819-2">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·494,·SHA:·969bc841cbd55fbadb20bf07731f86f89b1010a967a4eb6718161842aa51dbf7·...·]-3">}</span></code></pre><p>The·event·function·is·called·at·the·beginning·and·at·the·end·of·a·parsed·entity.149 both·access·the·cont_state.)</p><p>Functions·to·access·user·state:</p><ul><li>··<code·class="inline">xmerl_scan:user_state(GlobalState)</code></li><li>··<code·class="inline">xmerl_scan:user_state(UserState,·GlobalState)</code></li></ul><h4>1.2·Event·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="6892776694-1">{</span><span·class="ss">event_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="6892776694-2">(</span><span·class="p"·data-group-id="6892776694-2">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·494,·SHA:·d9504292999cb0c306cf738523b24208f5b3cbabb5d9dfeb537cc76a68f6d814·...·]-3">}</span></code></pre><p>The·event·function·is·called·at·the·beginning·and·at·the·end·of·a·parsed·entity.
150 It·has·the·following·format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="4091006766-1">(</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4091006766-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">150 It·has·the·following·format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="8247822073-1">(</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="8247822073-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
151 ···</span><span·class="n">EventState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">event_state</span><span·class="p"·data-group-id="4091006766-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4091006766-2">)</span><span·class="p">,</span><span·class="w">151 ···</span><span·class="n">EventState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">event_state</span><span·class="p"·data-group-id="8247822073-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="8247822073-2">)</span><span·class="p">,</span><span·class="w">
152 ···</span><span·class="n">EventState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="4091006766-3">(</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventState</span><span·class="p"·data-group-id="4091006766-3">)</span><span·class="p">,</span><span·class="w">152 ···</span><span·class="n">EventState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="8247822073-3">(</span><span·class="n">Event</span><span·class="p">,</span><span·class="w">·</span><span·class="n">EventState</span><span·class="p"·data-group-id="8247822073-3">)</span><span·class="p">,</span><span·class="w">
153 ···</span><span·class="n">GlobalState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">event_state</span><span·class="p"·data-group-id="4091006766-4">(</span><span·class="n">EventState2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4091006766-4">)</span><span·class="w">153 ···</span><span·class="n">GlobalState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">event_state</span><span·class="p"·data-group-id="8247822073-4">(</span><span·class="n">EventState2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="8247822073-4">)</span><span·class="w">
154 </span><span·class="k">end</span><span·class="p">.</span></code></pre><h4>1.3·Hook·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="5870082244-1">{</span><span·class="ss">hook_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="5870082244-2">(</span><span·class="p"·data-group-id="5870082244-2">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·491,·SHA:·383292ee4cc877fc105cbf038b38268e4b4209a565beb99e88cfbcfae81db822·...·]-3">}</span></code></pre><p>The·hook·function·is·called·when·the·processor·has·parsed·a·complete·entity.154 </span><span·class="k">end</span><span·class="p">.</span></code></pre><h4>1.3·Hook·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="2824527837-1">{</span><span·class="ss">hook_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="2824527837-2">(</span><span·class="p"·data-group-id="2824527837-2">)</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·491,·SHA:·2248a9a84bed545550a7d44d0e0b78cfab9b532230754bf8dff7cfc792be506a·...·]-3">}</span></code></pre><p>The·hook·function·is·called·when·the·processor·has·parsed·a·complete·entity.
155 Format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="4423677146-1">(</span><span·class="n">Entity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4423677146-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">155 Format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="6706473425-1">(</span><span·class="n">Entity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6706473425-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
156 ···</span><span·class="n">HookState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">hook_state</span><span·class="p"·data-group-id="4423677146-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4423677146-2">)</span><span·class="p">,</span><span·class="w">156 ···</span><span·class="n">HookState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">hook_state</span><span·class="p"·data-group-id="6706473425-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6706473425-2">)</span><span·class="p">,</span><span·class="w">
157 ···</span><span·class="p"·data-group-id="4423677146-3">{</span><span·class="n">TransformedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HookState2</span><span·class="p"·data-group-id="4423677146-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class=[·...·truncated·by·diffoscope;·len:·242,·SHA:·1e0b4cb7e94beaa2de610c3de027e96c8d51428bdb70659712fcf2df6d1c5976·...·]-4">)</span><span·class="p">,</span><span·class="w">157 ···</span><span·class="p"·data-group-id="6706473425-3">{</span><span·class="n">TransformedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">HookState2</span><span·class="p"·data-group-id="6706473425-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class=[·...·truncated·by·diffoscope;·len:·242,·SHA:·3a3fcf6eea244d70d0809ecbca282bd15d09fb759cdc0ab08702f72b3b978bdc·...·]-4">)</span><span·class="p">,</span><span·class="w">
158 ···</span><span·class="n">GlobalState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">hook_state</span><span·class="p"·data-group-id="4423677146-5">(</span><span·class="n">HookState2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4423677146-5">)</span><span·class="p">,</span><span·class="w">158 ···</span><span·class="n">GlobalState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">hook_state</span><span·class="p"·data-group-id="6706473425-5">(</span><span·class="n">HookState2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6706473425-5">)</span><span·class="p">,</span><span·class="w">
159 ···</span><span·class="p"·data-group-id="4423677146-6">{</span><span·class="n">TransformedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState2</span><span·class="p"·data-group-id="4423677146-6">}</span><span·class="w">159 ···</span><span·class="p"·data-group-id="6706473425-6">{</span><span·class="n">TransformedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState2</span><span·class="p"·data-group-id="6706473425-6">}</span><span·class="w">
160 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·relationship·between·the·event·function,·the·hook·function·and·the160 </span><span·class="k">end</span><span·class="p">.</span></code></pre><p>The·relationship·between·the·event·function,·the·hook·function·and·the
161 accumulator·function·is·as·follows:</p><ol><li>·The·event·function·is·first·called·with·an·'ended'·event·for·the·parsed161 accumulator·function·is·as·follows:</p><ol><li>·The·event·function·is·first·called·with·an·'ended'·event·for·the·parsed
162 entity.</li><li>·The·hook·function·is·called,·possibly·re-formatting·the·entity.</li><li>·The·acc·function·is·called·in·order·to·(optionally)·add·the·re-formatted162 entity.</li><li>·The·hook·function·is·called,·possibly·re-formatting·the·entity.</li><li>·The·acc·function·is·called·in·order·to·(optionally)·add·the·re-formatted
163 entity·to·the·contents·of·its·parent·element.</li></ol><h4>1.4·Fetch·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9136114632-1">{</span><span·class="ss">fetch_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="9136114632-2">(</span><span·class="p"·data-group-id="9136114632-2">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·494,·SHA:·80630344d3148c3d2de2830592d2a974ee8655ff52f9db79b806990bfac39d15·...·]-3">}</span></code></pre><p>The·fetch·function·is·called·in·order·to·fetch·an·external·resource·(e.g.·a163 entity·to·the·contents·of·its·parent·element.</li></ol><h4>1.4·Fetch·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8843453988-1">{</span><span·class="ss">fetch_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8843453988-2">(</span><span·class="p"·data-group-id="8843453988-2">)</span><span·class="p"·data[·...·truncated·by·diffoscope;·len:·494,·SHA:·80001a925ece121fa85adfcfca34a13f408c3c518683c87b57941c555cbcf47a·...·]-3">}</span></code></pre><p>The·fetch·function·is·called·in·order·to·fetch·an·external·resource·(e.g.·a
164 DTD).</p><p>The·fetch·function·can·respond·with·three·different·return·values:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Result</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">164 DTD).</p><p>The·fetch·function·can·respond·with·three·different·return·values:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Result</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">
165 ···</span><span·class="p"·data-group-id="3792526068-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3792526068-2">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filename</span>[·...·truncated·by·diffoscope;·len:·179,·SHA:·99c2901c5bbe45aed92cc6c20d066519e1baf5eb54fd0f93aca9a781f3d2151d·...·]-1">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">165 ···</span><span·class="p"·data-group-id="0089513104-1">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0089513104-2">{</span><span·class="ss">file</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Filename</span>[·...·truncated·by·diffoscope;·len:·179,·SHA:·096d9774d11dbd1d581363ca9e3016f89f43b1bb3fd029a715b3351176624878·...·]-1">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
166 ···</span><span·class="p"·data-group-id="3792526068-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="3792526068-4">{</span><span·class="ss">string</span><span·class="p">,</span><span·class="w">·</span><span·class="n">String</span>[·...·truncated·by·diffoscope;·len:·179,·SHA:·28e3c3eed27cafd40c4e11707be35e3bfcbc87ec22062c63ee5c04f606b98d1e·...·]-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">166 ···</span><span·class="p"·data-group-id="0089513104-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="p"·data-group-id="0089513104-4">{</span><span·class="ss">string</span><span·class="p">,</span><span·class="w">·</span><span·class="n">String</span>[·...·truncated·by·diffoscope;·len:·179,·SHA:·6cdbea4b55d5cc3f16ddc00b1a43de9921ce50b9f91736bb86f62b6d9d536c58·...·]-3">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">
167 ···</span><span·class="p"·data-group-id="3792526068-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">not_fetched</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewGlobalState</span><span·class="p"·data-group-id="379252606[·...·truncated·by·diffoscope;·len:·331,·SHA:·3281156ea623e1f825f6a9c7bada1bcad45035b3e8b49c9ae4b54584c818b01a·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">167 ···</span><span·class="p"·data-group-id="0089513104-5">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">not_fetched</span><span·class="p">,</span><span·class="w">·</span><span·class="n">NewGlobalState</span><span·class="p"·data-group-id="008951310[·...·truncated·by·diffoscope;·len:·331,·SHA:·eb403e0e73db6a71531c26efe5cdc3922de6417e6211a9e19b5b7af95bd0251d·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
168 ···</span><span·class="n">FetchState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">fetch_state</span><span·class="p"·data-group-id="6760059617-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6760059617-2">)</span><span·class="p">,</span><span·class="w">168 ···</span><span·class="n">FetchState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">fetch_state</span><span·class="p"·data-group-id="4548424663-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="4548424663-2">)</span><span·class="p">,</span><span·class="w">
169 ···</span><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="6760059617-3">(</span><span·class="n">URI</span><span·class="p">,</span><span·class="w">·</span><span·class="n">FetchState</span><span·class="p"·data-group-id="6760059617-3">)</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·Result·being·one·of·the·above</span><span·class="w"> 
170 </span><span·class="k">end</span><span·class="p">.</span></code></pre><h4>1.5·Continuation·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="9539829179-1">{</span><span·class="ss">continuation_fun</span><span·class[·...·truncated·by·diffoscope;·len:·803,·SHA:·1f7821aaa7106758cae4e3b4bfbb52ba7fc0ecc1e4236df224ab65bbc7bfbcea·...·]169 ···</span><span·class="n">Result</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">foo</span><span·class="p"·data-group-id="4548424663-3">(</span><span·class="n">URI</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·215,·SHA:·a770132ad2159fddbcbedbe44ac8b602661e274c00ad0568ca13f9494e8a95c9·...·]
 170 </span><span·class="k">end</span><span·class="p">.</span></code></pre><h4>1.5·Continuation·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="3168844257-1">{</span><span·class="ss">continuation_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3168844257-2">(</span><span·class="p"·data-group-id="3168844257-2">)</span><span·class="p"·data-group-id="3168844257-1">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="3168844257-3">{</span><span·class="ss">continuation_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3168844257-4">(</span><span·class="p"·data-group-id="3168844257-4">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContinuationState</span><span·class="p"·data-group-id="3168844257-3">}</span></code></pre><p>The·continuation·function·is·called·when·the·parser·encounters·the·end·of·the
171 byte·stream.·Format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="5501396920-1">(</span><span·class="n">Continue</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Exception</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="5501396920-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">171 byte·stream.·Format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="6587942737-1">(</span><span·class="n">Continue</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Exception</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6587942737-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
172 ···</span><span·class="n">ContState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">cont_state</span><span·class="p"·data-group-id="5501396920-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="5501396920-2">)</span><span·class="p">,</span><span·class="w">172 ···</span><span·class="n">ContState</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">cont_state</span><span·class="p"·data-group-id="6587942737-2">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6587942737-2">)</span><span·class="p">,</span><span·class="w">
173 ···</span><span·class="p"·data-group-id="5501396920-3">{</span><span·class="n">Result</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContState2</span><span·class="p"·data-group-id="5501396920-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·165,·SHA:·5d753938b82dd168b41d3912c81b50c4a2c58abb6711e2f207d8e44b035a5f94·...·]-4">)</span><span·class="p">,</span><span·class="w">173 ···</span><span·class="p"·data-group-id="6587942737-3">{</span><span·class="n">Result</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContState2</span><span·class="p"·data-group-id="6587942737-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span[·...·truncated·by·diffoscope;·len:·165,·SHA:·76195ca7d4c867d9823d6be367bc2b1b35765149b81b9729f4cb8996e123a70a·...·]-4">)</span><span·class="p">,</span><span·class="w">
174 ···</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Result</span><span·class="w">·</span><span·class="k">of</span><span·class="w">174 ···</span><span·class="k">case</span><span·class="w">·</span><span·class="n">Result</span><span·class="w">·</span><span·class="k">of</span><span·class="w">
175 ······</span><span·class="p"·data-group-id="5501396920-5">[</span><span·class="p"·data-group-id="5501396920-5">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">175 ······</span><span·class="p"·data-group-id="6587942737-5">[</span><span·class="p"·data-group-id="6587942737-5">]</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
176 ·········</span><span·class="n">GlobalState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">cont_state</span><span·class="p"·data-group-id="5501396920-6">(</span><span·class="n">ContState2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="5501396920-6">)</span><span·class="p">,</span><span·class="w">176 ·········</span><span·class="n">GlobalState2</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">cont_state</span><span·class="p"·data-group-id="6587942737-6">(</span><span·class="n">ContState2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6587942737-6">)</span><span·class="p">,</span><span·class="w">
177 ·········</span><span·class="n">Exception</span><span·class="p"·data-group-id="5501396920-7">(</span><span·class="n">GlobalState2</span><span·class="p"·data-group-id="5501396920-7">)</span><span·class="p">;</span><span·class="w">177 ·········</span><span·class="n">Exception</span><span·class="p"·data-group-id="6587942737-7">(</span><span·class="n">GlobalState2</span><span·class="p"·data-group-id="6587942737-7">)</span><span·class="p">;</span><span·class="w">
178 ······</span><span·class="n">MoreBytes</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">178 ······</span><span·class="n">MoreBytes</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
179 ·········</span><span·class="p"·data-group-id="5501396920-8">{</span><span·class="n">MoreBytes2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rest</span><span·class="p"·data-group-id="5501396920-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·171,·SHA:·4e7e3cd8f8b10eb97eba048b8b69e35b5c5020c26082a9409966068474a807f7·...·]-9">)</span><span·class="p">,</span><span·class="w">179 ·········</span><span·class="p"·data-group-id="6587942737-8">{</span><span·class="n">MoreBytes2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Rest</span><span·class="p"·data-group-id="6587942737-8">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·171,·SHA:·0875beccaab3b137f10bad183b95b48f79909f5926e9787a990b0a8a3240cdf0·...·]-9">)</span><span·class="p">,</span><span·class="w">
180 ·········</span><span·class="n">ContState3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">update_cont_state</span><span·class="p"·data-group-id="5501396920-10">(</span><span·class="n">Rest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContState2</span><span·class="p"·data-group-id="5501396920-10">)</span><span·class="p">,</span><span·class="w">180 ·········</span><span·class="n">ContState3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nf">update_cont_state</span><span·class="p"·data-group-id="6587942737-10">(</span><span·class="n">Rest</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ContState2</span><span·class="p"·data-group-id="6587942737-10">)</span><span·class="p">,</span><span·class="w">
181 ·········</span><span·class="n">GlobalState3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">cont_state</span><span·class="p"·data-group-id="5501396920-11">(</span><span·class="n">ContState3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="5501396920-11">)</span><span·class="p">,</span><span·class="w">181 ·········</span><span·class="n">GlobalState3</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">cont_state</span><span·class="p"·data-group-id="6587942737-11">(</span><span·class="n">ContState3</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="6587942737-11">)</span><span·class="p">,</span><span·class="w">
182 ·········</span><span·class="n">Continue</span><span·class="p"·data-group-id="5501396920-12">(</span><span·class="n">MoreBytes2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState3</span><span·class="p"·data-group-id="5501396920-12">)</span><span·class="w">182 ·········</span><span·class="n">Continue</span><span·class="p"·data-group-id="6587942737-12">(</span><span·class="n">MoreBytes2</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState3</span><span·class="p"·data-group-id="6587942737-12">)</span><span·class="w">
183 ···</span><span·class="k">end</span><span·class="w">183 ···</span><span·class="k">end</span><span·class="w">
184 </span><span·class="k">end</span><span·class="p">.</span></code></pre><h4>1.6·Rules·Functions</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4751154039-1">{</span><span·class="ss">rules</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ReadFun</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4751154039-2">(</span><span·class="p"·data-group-id="4751154039-2">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">WriteFun</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="4751154039-3">(</span><span·class="p"·data-group-id="4751154039-3">)</span><span·class="p">,</span><span·class="w">·</span><span·class="n">RulesState</span><span·class="p"·data-group-id="4751154039-1">}</span><span·class="w">·</span><span·class="p">|</span><span·class="w"> 
185 </span><span·class="p"·data-group-id="4751154039-4">{</span><span·class="ss">rules</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Table</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">ets</span><span·class=[·...·truncated·by·diffoscope;·len:·234,·SHA:·8c9369c3982a975f6b62c3a49f77f9efebf12c93c792ba79fce6a6748ce37547·...·]184 </span><span·class="k">end</span><span·class="p">.</span></code></pre><h4>1.6·Rules·Functions</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="4978575672-1">{</span><span·class="ss">rules</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·717,·SHA:·4378040461d2bf867bd913c62a6ab7d493b78fe1c70d6beaf9ceda3e42affd45·...·]
 185 </span><span·class="p"·data-group-id="4978575672-4">{</span><span·class="ss">rules</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Table</span><span·class="w">·</span><span·class="p">:</span><span·class="w">·</span><span·class="nf">ets</span><span·class="p"·data-group-id="4978575672-5">(</span><span·class="p"·data-group-id="4978575672-5">)</span><span·class="p"·data-group-id="4978575672-4">}</span></code></pre><p>The·rules·functions·take·care·of·storing·scanner·information·in·a·rules
186 database.·User-provided·rules·functions·may·opt·to·store·the·information·in186 database.·User-provided·rules·functions·may·opt·to·store·the·information·in
187 mnesia,·or·perhaps·in·the·user_state(RulesState).</p><p>The·following·modes·exist:</p><ul><li>··If·the·user·doesn't·specify·an·option,·the·scanner·creates·an·ets·table,·and187 mnesia,·or·perhaps·in·the·user_state(RulesState).</p><p>The·following·modes·exist:</p><ul><li>··If·the·user·doesn't·specify·an·option,·the·scanner·creates·an·ets·table,·and
188 uses·built-in·functions·to·read·and·write·data·to·it.·When·the·scanner·is188 uses·built-in·functions·to·read·and·write·data·to·it.·When·the·scanner·is
189 done,·the·ets·table·is·deleted.</li><li>··If·the·user·specifies·an·ets·table·via·the·<code·class="inline">{rules, Table}</code>·option,·the189 done,·the·ets·table·is·deleted.</li><li>··If·the·user·specifies·an·ets·table·via·the·<code·class="inline">{rules, Table}</code>·option,·the
190 scanner·uses·this·table.·When·the·scanner·is·done,·it·does·<em>not</em>·delete·the190 scanner·uses·this·table.·When·the·scanner·is·done,·it·does·<em>not</em>·delete·the
191 table.</li><li>··If·the·user·specifies·read·and·write·functions,·the·scanner·will·use·them191 table.</li><li>··If·the·user·specifies·read·and·write·functions,·the·scanner·will·use·them
192 instead.</li></ul><p>The·format·for·the·read·and·write·functions·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="n">WriteFun</span><span·class="p"·data-group-id="0344521344-1">(</span><span·class="n">Context</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Definition</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·76,·SHA:·9a407cfc814a5fd36868a3ffe28a9431fd07ee14e818eb3f40759f6482fc0260·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">NewScannerState</span><span·class="p">.</span><span·class="w">192 instead.</li></ul><p>The·format·for·the·read·and·write·functions·are·as·follows:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">·</span><span·class="n">WriteFun</span><span·class="p"·data-group-id="2515302658-1">(</span><span·class="n">Context</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Definition</span><span·class="p">,</span><span·class="w">·</span>[·...·truncated·by·diffoscope;·len:·76,·SHA:·4e0aaa987dc210459f6399128cac56a76e6092ef71393c8ccc5738e25048f937·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">NewScannerState</span><span·class="p">.</span><span·class="w">
193 ·</span><span·class="n">ReadFun</span><span·class="p"·data-group-id="0344521344-2">(</span><span·class="n">Context</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ScannerState</span><span·class="p"·data-group-id="0344521344-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Definition</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">.</span></code></pre><p>Here·is·a·summary·of·the·data·objects·currently·being·written·by·the·scanner:</p><table><thead><tr><th·style="text-align:·left;">Context</th><th·style="text-align:·left;">Key·Value</th><th·style="text-align:·left;">Definition</th></tr></thead><tbody><tr><td·style="text-align:·left;">notation</td><td·style="text-align:·left;">NotationName</td><td·style="text-align:·left;"><code·class="inline">{system, SL}·|·{public, PIDL, SL}</code></td></tr><tr><td·style="text-align:·left;">elem_def</td><td·style="text-align:·left;">ElementName</td><td·style="text-align:·left;"><code·class="inline">#xmlElement{content·=·ContentSpec}</code></td></tr><tr><td·style="text-align:·left;">parameter_entity</td><td·style="text-align:·left;">PEName</td><td·style="text-align:·left;"><code·class="inline">PEDef</code></td></tr><tr><td·style="text-align:·left;">entity</td><td·style="text-align:·left;">EntityName</td><td·style="text-align:·left;"><code·class="inline">EntityDef</code></td></tr></tbody></table><p><strong>·Table·1:</strong>·Scanner·data·objects</p><p>where</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">ContentSpec</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">empty</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">any</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">ElemContent</span><span·class="w">193 ·</span><span·class="n">ReadFun</span><span·class="p"·data-group-id="2515302658-2">(</span><span·class="n">Context</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Name</span><span·class="p">,</span><span·class="w">·</span><span·class="n">ScannerState</span><span·class="p"·data-group-id="2515302658-2">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Definition</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">undefined</span><span·class="p">.</span></code></pre><p>Here·is·a·summary·of·the·data·objects·currently·being·written·by·the·scanner:</p><table><thead><tr><th·style="text-align:·left;">Context</th><th·style="text-align:·left;">Key·Value</th><th·style="text-align:·left;">Definition</th></tr></thead><tbody><tr><td·style="text-align:·left;">notation</td><td·style="text-align:·left;">NotationName</td><td·style="text-align:·left;"><code·class="inline">{system, SL}·|·{public, PIDL, SL}</code></td></tr><tr><td·style="text-align:·left;">elem_def</td><td·style="text-align:·left;">ElementName</td><td·style="text-align:·left;"><code·class="inline">#xmlElement{content·=·ContentSpec}</code></td></tr><tr><td·style="text-align:·left;">parameter_entity</td><td·style="text-align:·left;">PEName</td><td·style="text-align:·left;"><code·class="inline">PEDef</code></td></tr><tr><td·style="text-align:·left;">entity</td><td·style="text-align:·left;">EntityName</td><td·style="text-align:·left;"><code·class="inline">EntityDef</code></td></tr></tbody></table><p><strong>·Table·1:</strong>·Scanner·data·objects</p><p>where</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">ContentSpec</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">empty</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">any</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">ElemContent</span><span·class="w">
194 </span><span·class="n">ElemContent</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="p"·data-group-id="8799880020-1">{</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Elems</span><span·class="p"·data-group-id="8799880020-1">}</span><span·class="w">194 </span><span·class="n">ElemContent</span><span·class="w">·</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="p"·data-group-id="1691372757-1">{</span><span·class="n">Mode</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Elems</span><span·class="p"·data-group-id="1691372757-1">}</span><span·class="w">
195 </span><span·class="n">Mode</span><span·class="w">········</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">seq</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">choice</span><span·class="w">195 </span><span·class="n">Mode</span><span·class="w">········</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">seq</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">choice</span><span·class="w">
196 </span><span·class="n">Elems</span><span·class="w">·······</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="p"·data-group-id="8799880020-2">[</span><span·class="n">Elem</span><span·class="p"·data-group-id="8799880020-2">]</span><span·class="w">196 </span><span·class="n">Elems</span><span·class="w">·······</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="p"·data-group-id="1691372757-2">[</span><span·class="n">Elem</span><span·class="p"·data-group-id="1691372757-2">]</span><span·class="w">
197 </span><span·class="n">Elem</span><span·class="w">········</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">&#39;#PCDATA&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Name</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">ElemContent</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="8799880020-3">{</span><span·class="n">Occurrence</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Elems</span><span·class="p"·data-group-id="8799880020-3">}</span><span·class="w">197 </span><span·class="n">Elem</span><span·class="w">········</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">&#39;#PCDATA&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">Name</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="n">ElemContent</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="p"·data-group-id="1691372757-3">{</span><span·class="n">Occurrence</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Elems</span><span·class="p"·data-group-id="1691372757-3">}</span><span·class="w">
198 </span><span·class="n">Occurrence</span><span·class="w">··</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">&#39;*&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;?&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;+&#39;</span></code></pre><p>NOTE:·<em>When·&lt;Elem&gt;·is·not·wrapped·with·&lt;Occurrence&gt;,·(Occurrence·=·once)·is198 </span><span·class="n">Occurrence</span><span·class="w">··</span><span·class="p">:</span><span·class="p">:=</span><span·class="w">·</span><span·class="ss">&#39;*&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;?&#39;</span><span·class="w">·</span><span·class="p">|</span><span·class="w">·</span><span·class="ss">&#39;+&#39;</span></code></pre><p>NOTE:·<em>When·&lt;Elem&gt;·is·not·wrapped·with·&lt;Occurrence&gt;,·(Occurrence·=·once)·is
199 implied.</em></p><h4>1.7·Accumulator·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="7488996807-1">{</span><span·class="ss">acc_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="7488996807-2">(</span><span·class="p"·data-group-id="7488996807-2">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·058690ff4dfdc3ad32ee28d86eb4555ad8bcece189708580d0b229a00db36518·...·]7-1">}</span></code></pre><p>The·accumulator·function·is·called·to·accumulate·the·contents·of·an·entity.When199 implied.</em></p><h4>1.7·Accumulator·Function</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="p"·data-group-id="8827844927-1">{</span><span·class="ss">acc_fun</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="8827844927-2">(</span><span·class="p"·data-group-id="8827844927-2">)</span><span·class="p"·data-g[·...·truncated·by·diffoscope;·len:·18,·SHA:·44ce05e3a3008039df3db100642fbd690dd9440157d165da5bfb3ce9ba59cbf3·...·]7-1">}</span></code></pre><p>The·accumulator·function·is·called·to·accumulate·the·contents·of·an·entity.When
200 parsing·very·large·files,·it·may·not·be·desirable·to·do·so.In·this·case,·an·acc200 parsing·very·large·files,·it·may·not·be·desirable·to·do·so.In·this·case,·an·acc
201 function·can·be·provided·that·simply·doesn't·accumulate.</p><p>Note·that·it·is·possible·to·even·modify·the·parsed·entity·before·accumulating201 function·can·be·provided·that·simply·doesn't·accumulate.</p><p>Note·that·it·is·possible·to·even·modify·the·parsed·entity·before·accumulating
202 it,·but·this·must·be·done·with·care.·xmerl_scan·performs·post-processing·of·the202 it,·but·this·must·be·done·with·care.·xmerl_scan·performs·post-processing·of·the
203 element·for·namespace·management.·Thus,·the·element·must·keep·its·original203 element·for·namespace·management.·Thus,·the·element·must·keep·its·original
204 structure·for·this·to·work.</p><p>The·acc·function·has·the·following·format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·default·accumulating·acc·fun</span><span·class="w">204 structure·for·this·to·work.</p><p>The·acc·function·has·the·following·format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="c1">%%·default·accumulating·acc·fun</span><span·class="w">
205 </span><span·class="nf">fun</span><span·class="p"·data-group-id="3352029741-1">(</span><span·class="n">ParsedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="3352029741-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">205 </span><span·class="nf">fun</span><span·class="p"·data-group-id="8537103583-1">(</span><span·class="n">ParsedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="8537103583-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
206 ···</span><span·class="p"·data-group-id="3352029741-2">{</span><span·class="p"·data-group-id="3352029741-3">[</span><span·class="n">ParsedEntity</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="3352029741-3">]</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·80,·SHA:·a6c312d4757f04624518e5473995eba365f45759a562d986bb56e4d61a18816e·...·]-2">}</span><span·class="p">.</span><span·class="w">206 ···</span><span·class="p"·data-group-id="8537103583-2">{</span><span·class="p"·data-group-id="8537103583-3">[</span><span·class="n">ParsedEntity</span><span·class="p">|</span><span·class="n">Acc</span><span·class="p"·data-group-id="8537103583-3">]</span><span·class="p">,</span><span·class="w">·</[·...·truncated·by·diffoscope;·len:·80,·SHA:·f6c30b2f822122f34903f1c6655c9372bd1667a392f75e812e595ed00619c671·...·]-2">}</span><span·class="p">.</span><span·class="w">
  
207 </span><span·class="c1">%%·non-accumulating·acc·fun</span><span·class="w">207 </span><span·class="c1">%%·non-accumulating·acc·fun</span><span·class="w">
208 </span><span·class="nf">fun</span><span·class="p"·data-group-id="3352029741-4">(</span><span·class="n">ParsedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="3352029741-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">208 </span><span·class="nf">fun</span><span·class="p"·data-group-id="8537103583-4">(</span><span·class="n">ParsedEntity</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="8537103583-4">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
209 ···</span><span·class="p"·data-group-id="3352029741-5">{</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="3352029741-5">}</span><span·class="p">.</span></code></pre><h4>1.8·Close·Function</h4><p>The·close·function·is·called·when·a·document·(either·the·main·document·or·an209 ···</span><span·class="p"·data-group-id="8537103583-5">{</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="8537103583-5">}</span><span·class="p">.</span></code></pre><h4>1.8·Close·Function</h4><p>The·close·function·is·called·when·a·document·(either·the·main·document·or·an
210 external·DTD)·has·been·completely·parsed.·When·xmerl_scan·was·started·using210 external·DTD)·has·been·completely·parsed.·When·xmerl_scan·was·started·using
211 <code·class="inline">xmerl_scan:file/[1,2]</code>,·the·file·will·be·read·in·full,·and·closed·immediately,211 <code·class="inline">xmerl_scan:file/[1,2]</code>,·the·file·will·be·read·in·full,·and·closed·immediately,
212 before·the·parsing·starts,·so·when·the·close·function·is·called,·it·will·not212 before·the·parsing·starts,·so·when·the·close·function·is·called,·it·will·not
213 need·to·actually·close·the·file.·In·this·case,·the·close·function·will·be·a·good213 need·to·actually·close·the·file.·In·this·case,·the·close·function·will·be·a·good
214 place·to·modify·the·state·variables.</p><p>Format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="3156935569-1">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="3156935569-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">214 place·to·modify·the·state·variables.</p><p>Format·and·semantics:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">fun</span><span·class="p"·data-group-id="9084539313-1">(</span><span·class="n">GlobalState</span><span·class="p"·data-group-id="9084539313-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
215 ···</span><span·class="n">GlobalState1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·state·variables·may·be·altered</span></code></pre><h3·id="2-examples"·class="section-heading">215 ···</span><span·class="n">GlobalState1</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">··</span><span·class="c1">%·state·variables·may·be·altered</span></code></pre><h3·id="2-examples"·class="section-heading">
216 ··<a·href="#2-examples"·class="hover-link">216 ··<a·href="#2-examples"·class="hover-link">
217 ····<i·class="ri-link-m"·aria-hidden="true"></i>217 ····<i·class="ri-link-m"·aria-hidden="true"></i>
218 ··</a>218 ··</a>
219 ··<span·class="text">2·Examples</span>219 ··<span·class="text">2·Examples</span>
220 </h3>220 </h3>
221 <p>See·<code·class="inline">xmerl_test.erl</code>·for·more·examples.</p><h4>2.1·Handling·spaces</h4><p>The·following·sample·program·illustrates·three·ways·of·scanning·a·document:</p><ol><li>·the·default·scan,·which·leaves·whitespace·untouched</li><li>·normalizing·spaces</li><li>·normalizing·spaces,·then·removing·text·elements·that·only·contain·one·space.</li></ol><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="2781335203-1">(</span><span·class="ss">tmp</span><span·class="p"·data-group-id="2781335203-1">)</span><span·class="p">.</span><span·class="w">221 <p>See·<code·class="inline">xmerl_test.erl</code>·for·more·examples.</p><h4>2.1·Handling·spaces</h4><p>The·following·sample·program·illustrates·three·ways·of·scanning·a·document:</p><ol><li>·the·default·scan,·which·leaves·whitespace·untouched</li><li>·normalizing·spaces</li><li>·normalizing·spaces,·then·removing·text·elements·that·only·contain·one·space.</li></ol><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">module</span><span·class="p"·data-group-id="9636622769-1">(</span><span·class="ss">tmp</span><span·class="p"·data-group-id="9636622769-1">)</span><span·class="p">.</span><span·class="w">
222 </span><span·class="w">222 </span><span·class="w">
223 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="2781335203-2">(</span><span·class="s">&quot;xmerl.hrl&quot;</span><span·class="p"·data-group-id="2781335203-2">)</span><span·class="p">.</span><span·class="w">223 </span><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="9636622769-2">(</span><span·class="s">&quot;xmerl.hrl&quot;</span><span·class="p"·data-group-id="9636622769-2">)</span><span·class="p">.</span><span·class="w">
224 </span><span·class="w">224 </span><span·class="w">
225 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="2781335203-3">(</span><span·class="p"·data-group-id="2781335203-4">[</span><span·class="ss">file1</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file2</span><span·class="p">/</span><s[·...·truncated·by·diffoscope;·len:·243,·SHA:·9f72c653a5d2e64e91b51f69fb38feb866e6f5509016eb32dd6db1d77160e66a·...·]-3">)</span><span·class="p">.</span><span·class="w">225 </span><span·class="p">-</span><span·class="na">export</span><span·class="p"·data-group-id="9636622769-3">(</span><span·class="p"·data-group-id="9636622769-4">[</span><span·class="ss">file1</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">file2</span><span·class="p">/</span><s[·...·truncated·by·diffoscope;·len:·243,·SHA:·96f3b8bcc2d6af6f9edc5db5e047b79747781a4577d6856a5989509c8c4f133b·...·]-3">)</span><span·class="p">.</span><span·class="w">
  
226 </span><span·class="nf">file1</span><span·class="p"·data-group-id="2781335203-5">(</span><span·class="n">F</span><span·class="p"·data-group-id="2781335203-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">file</[·...·truncated·by·diffoscope;·len:·123,·SHA:·f2a1bb4275cc0e4e1dfdf03edc38eaf0cead68d4198bfd2819ce9fe2656d30b8·...·]-6">)</span><span·class="p">.</span><span·class="w">226 </span><span·class="nf">file1</span><span·class="p"·data-group-id="9636622769-5">(</span><span·class="n">F</span><span·class="p"·data-group-id="9636622769-5">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">file</[·...·truncated·by·diffoscope;·len:·123,·SHA:·309353751ea6dbce1f458c2b7e63e774931b8ca2da9a5f5df391fc53b56768e4·...·]-6">)</span><span·class="p">.</span><span·class="w">
  
227 </span><span·class="nf">file2</span><span·class="p"·data-group-id="2781335203-7">(</span><span·class="n">F</span><span·class="p"·data-group-id="2781335203-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">file</[·...·truncated·by·diffoscope;·len:·471,·SHA:·10f83ca5fdbf735055985a06513916f560591664913b0cf14c07114045b46560·...·]-8">)</span><span·class="p">.</span><span·class="w">227 </span><span·class="nf">file2</span><span·class="p"·data-group-id="9636622769-7">(</span><span·class="n">F</span><span·class="p"·data-group-id="9636622769-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">file</[·...·truncated·by·diffoscope;·len:·471,·SHA:·f57b08752a4b4b238d408865c0f35929b42d167a3bc80d04417bb47d4d5a1fef·...·]-8">)</span><span·class="p">.</span><span·class="w">
  
228 </span><span·class="nf">file3</span><span·class="p"·data-group-id="2781335203-11">(</span><span·class="n">F</span><span·class="p"·data-group-id="2781335203-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><span·class="o">=</span><span[·...·truncated·by·diffoscope;·len:·888,·SHA:·472c78342f2b1c571088bf1e96bcbbcfc0601b971ccb815d4658c85028ffb3c6·...·]-14">{</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><span·class="p">,</span><span·class="w">228 </span><span·class="nf">file3</span><span·class="p"·data-group-id="9636622769-11">(</span><span·class="n">F</span><span·class="p"·data-group-id="9636622769-11">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">·</span><span·class="n">Acc</span><span·class="w">·</span><span·class="o">=</span><span[·...·truncated·by·diffoscope;·len:·888,·SHA:·349cb695368802a196cff8a69678253341426231d12dc7e52f77522620670bae·...·]-14">{</span><span·class="n">Acc</span><span·class="p">,</span><span·class="w">·</span><span·class="n">P</span><span·class="p">,</span><span·class="w">
229 </span><span·class="n">S</span><span·class="p"·data-group-id="2781335203-14">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·new·return·format·(X,·Acc,·S)·-&gt;·{[X|Acc],·S}·end,·xmerl_scan:file(F,</span><span·class="w">229 </span><span·class="n">S</span><span·class="p"·data-group-id="9636622769-14">}</span><span·class="p">;</span><span·class="w">·</span><span·class="c1">%·new·return·format·(X,·Acc,·S)·-&gt;·{[X|Acc],·S}·end,·xmerl_scan:file(F,</span><span·class="w">
230 </span><span·class="p"·data-group-id="2781335203-15">[</span><span·class="p"·data-group-id="2781335203-16">{</span><span·class="ss">space</span><span·class="p">,</span><span·class="ss">normalize</span><span·class="p"·data-group-id="2781335203-16">}</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·263,·SHA:·f3591dce6570416c94b03f1426f2affeae527a6a7b7f59e7e0742aac1a892f2c·...·]-15">]</span><span·class="p">)</span><span·class="p">.</span></code></pre>230 </span><span·class="p"·data-group-id="9636622769-15">[</span><span·class="p"·data-group-id="9636622769-16">{</span><span·class="ss">space</span><span·class="p">,</span><span·class="ss">normalize</span><span·class="p"·data-group-id="9636622769-16">}</span><span·class="p">,</span><span·class="w"[·...·truncated·by·diffoscope;·len:·263,·SHA:·086cedb47b8fcc25ff1bd6682470893def65e5c3bf6e1c6ab86841eddf4836df·...·]-15">]</span><span·class="p">)</span><span·class="p">.</span></code></pre>
231 </div>231 </div>
  
232 <div·class="bottom-actions"·id="bottom-actions">232 <div·class="bottom-actions"·id="bottom-actions">
233 ··<div·class="bottom-actions-item">233 ··<div·class="bottom-actions-item">
  
234 ······<a·href="xmerl_ug.html"·class="bottom-actions-button"·rel="prev">234 ······<a·href="xmerl_ug.html"·class="bottom-actions-button"·rel="prev">
235 ········<span·class="subheader">235 ········<span·class="subheader">
159 KB
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/xmerl_ug.html
    
Offset 189, 24 lines modifiedOffset 189, 24 lines modified
189 first·element·in·each·tuple·is·the·name·of·the·parent·element.·The·list·is·in189 first·element·in·each·tuple·is·the·name·of·the·parent·element.·The·list·is·in
190 reverse·order.</p><p>The·record·<code·class="inline">#xmlAttribute{}</code>·holds·the·name·and·value·of·an·attribute190 reverse·order.</p><p>The·record·<code·class="inline">#xmlAttribute{}</code>·holds·the·name·and·value·of·an·attribute
191 in·the·fields·<code·class="inline">name</code>·and·<code·class="inline">value</code>.·All·attributes·of·an·element·is·a·list·of191 in·the·fields·<code·class="inline">name</code>·and·<code·class="inline">value</code>.·All·attributes·of·an·element·is·a·list·of
192 <code·class="inline">#xmlAttribute{}</code>·in·the·field·<code·class="inline">attributes</code>·of·the·<code·class="inline">#xmlElement{}</code>·record.</p><p>The·<code·class="inline">content</code>·field·of·the·top·element·is·a·list·of·records·that·shows·the192 <code·class="inline">#xmlAttribute{}</code>·in·the·field·<code·class="inline">attributes</code>·of·the·<code·class="inline">#xmlElement{}</code>·record.</p><p>The·<code·class="inline">content</code>·field·of·the·top·element·is·a·list·of·records·that·shows·the
193 structure·and·data·of·the·document.·If·it·is·a·simple·document·like:</p><pre><code·class="text">&lt;?xml·version=&quot;1.0&quot;?&gt;193 structure·and·data·of·the·document.·If·it·is·a·simple·document·like:</p><pre><code·class="text">&lt;?xml·version=&quot;1.0&quot;?&gt;
194 &lt;dog&gt;194 &lt;dog&gt;
195 Grand·Danois195 Grand·Danois
196 &lt;/dog&gt;</code></pre><p>The·parse·result·will·be:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="0517667980-1">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">dog</span><span·class="p">,</span><span·class="w">196 &lt;/dog&gt;</code></pre><p>The·parse·result·will·be:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="0351938622-1">{</span><span·class="ss">name</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="ss">dog</span><span·class="p">,</span><span·class="w">
197 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">197 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
198 ············</span><span·class="ss">parents</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0517667980-2">[</span><span·class="p"·data-group-id="0517667980-2">]</span><span·class="p">,</span><span·class="w">198 ············</span><span·class="ss">parents</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0351938622-2">[</span><span·class="p"·data-group-id="0351938622-2">]</span><span·class="p">,</span><span·class="w">
199 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">199 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
200 ············</span><span·class="ss">attributes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0517667980-3">[</span><span·class="p"·data-group-id="0517667980-3">]</span><span·class="p">,</span><span·class="w">200 ············</span><span·class="ss">attributes</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0351938622-3">[</span><span·class="p"·data-group-id="0351938622-3">]</span><span·class="p">,</span><span·class="w">
201 ············</span><span·class="ss">content</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0517667980-4">[</span><span·class="p"·data-group-id="0517667980-5">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="0517667980-6">[</span><span·class="p"·data-group-id="0517667980-7">{</span><span·class="ss">dog<[·...·truncated·by·diffoscope;·len:·328,·SHA:·762473e98af98ddd8525c1aa679ec59906c141e03bc5893244b20f3face94220·...·]-8">]</span><span·class="p">,</span><span·class="s">&quot;\201 ············</span><span·class="ss">content</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="p"·data-group-id="0351938622-4">[</span><span·class="p"·data-group-id="0351938622-5">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="0351938622-6">[</span><span·class="p"·data-group-id="0351938622-7">{</span><span·class="ss">dog<[·...·truncated·by·diffoscope;·len:·328,·SHA:·eb19ce1702787c0416e0bb881ea2934af67ed4b30022ca7d7fd6324b9c75a3a3·...·]-8">]</span><span·class="p">,</span><span·class="s">&quot;\
202 Grand·Danois\202 Grand·Danois\
203 &quot;</span><span·class="p">,</span><span·class="ss">text</span><span·class="p"·data-group-id="0517667980-5">}</span><span·class="p"·data-group-id="0517667980-4">]</span><span·class="p">,</span><span·class="w">203 &quot;</span><span·class="p">,</span><span·class="ss">text</span><span·class="p"·data-group-id="0351938622-5">}</span><span·class="p"·data-group-id="0351938622-4">]</span><span·class="p">,</span><span·class="w">
204 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">204 ············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
205 ············</span><span·class="p"·data-group-id="0517667980-1">}</span></code></pre><p>Where·the·content·of·the·top·element·is:205 ············</span><span·class="p"·data-group-id="0351938622-1">}</span></code></pre><p>Where·the·content·of·the·top·element·is:
206 <code·class="inline">[{xmlText,[{dog,1}],1,[],&quot;\·Grand·Danois\·&quot;,text}]</code>.·Text·will·be·returned·in206 <code·class="inline">[{xmlText,[{dog,1}],1,[],&quot;\·Grand·Danois\·&quot;,text}]</code>.·Text·will·be·returned·in
207 <code·class="inline">xmlText</code>·records.·Though,·usually·documents·are·more·complex,·and·the·content207 <code·class="inline">xmlText</code>·records.·Though,·usually·documents·are·more·complex,·and·the·content
208 of·the·top·element·will·in·that·case·be·a·nested·structure·with·<code·class="inline">#xmlElement{}</code>208 of·the·top·element·will·in·that·case·be·a·nested·structure·with·<code·class="inline">#xmlElement{}</code>
209 records·that·in·turn·may·have·complex·content.·All·of·this·reflects·the209 records·that·in·turn·may·have·complex·content.·All·of·this·reflects·the
210 structure·of·the·XML·document.</p><p>Space·characters·between·mark-up·as·<code·class="inline">space</code>,·<code·class="inline">tab</code>·and·<code·class="inline">line·feed</code>·are210 structure·of·the·XML·document.</p><p>Space·characters·between·mark-up·as·<code·class="inline">space</code>,·<code·class="inline">tab</code>·and·<code·class="inline">line·feed</code>·are
211 normalized·and·returned·as·xmlText·records.</p><h3·id="errors"·class="section-heading">211 normalized·and·returned·as·xmlText·records.</p><h3·id="errors"·class="section-heading">
212 ··<a·href="#errors"·class="hover-link">212 ··<a·href="#errors"·class="hover-link">
Offset 267, 49 lines modifiedOffset 267, 49 lines modified
  
267 &lt;!--·Date·of·the·format·yyyy.mm.dd·--&gt;267 &lt;!--·Date·of·the·format·yyyy.mm.dd·--&gt;
268 &lt;!ELEMENT·date··············(#PCDATA)&gt;268 &lt;!ELEMENT·date··············(#PCDATA)&gt;
269 &lt;!ATTLIST··bike·year·NMTOKEN·#REQUIRED269 &lt;!ATTLIST··bike·year·NMTOKEN·#REQUIRED
270 ················color·NMTOKENS·#REQUIRED270 ················color·NMTOKENS·#REQUIRED
271 ················condition·(useless·|·bad·|·serviceable·|·moderate·|·good·|271 ················condition·(useless·|·bad·|·serviceable·|·moderate·|·good·|
272 ···························excellent·|·new·|·outstanding)·&quot;excellent&quot;·&gt;</code></pre><p>If·you·want·to·parse·the·XML·file·motorcycles.xml·you·run·it·in·the·Erlang·shell272 ···························excellent·|·new·|·outstanding)·&quot;excellent&quot;·&gt;</code></pre><p>If·you·want·to·parse·the·XML·file·motorcycles.xml·you·run·it·in·the·Erlang·shell
273 like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="p"·data-group-id="6508376777-1">{</span><span·class="n">ParseResult</span><span·class="p">,</span><span·class="n">Misc</span><span·class="p"·data-group-id="6508376777-1">}</span><span·class="o">=</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf[·...·truncated·by·diffoscope;·len:·157,·SHA:·49b8791b7e175f95ae4ce08b648e4fbd731f7e310c1c6aa7f892e5a76c44bd6c·...·]-2">)</span><span·class="p">.</span><span·class="w">273 like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="gp·unselectable">3&gt;·</span><span·class="p"·data-group-id="6387298294-1">{</span><span·class="n">ParseResult</span><span·class="p">,</span><span·class="n">Misc</span><span·class="p"·data-group-id="6387298294-1">}</span><span·class="o">=</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf[·...·truncated·by·diffoscope;·len:·157,·SHA:·ebc2a44e29ba0ff13c2afbe0992a6ca4a3986e4949999847c38df6a09fc3a7b9·...·]-2">)</span><span·class="p">.</span><span·class="w">
274 </span><span·class="p"·data-group-id="6508376777-3">{</span><span·class="p"·data-group-id="6508376777-4">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">motorcycles</span><span·class="p">,</span><span·class="w">274 </span><span·class="p"·data-group-id="6387298294-3">{</span><span·class="p"·data-group-id="6387298294-4">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">motorcycles</span><span·class="p">,</span><span·class="w">
275 ·············</span><span·class="ss">motorcycles</span><span·class="p">,</span><span·class="w">275 ·············</span><span·class="ss">motorcycles</span><span·class="p">,</span><span·class="w">
276 ·············</span><span·class="p"·data-group-id="6508376777-5">[</span><span·class="p"·data-group-id="6508376777-5">]</span><span·class="p">,</span><span·class="w">276 ·············</span><span·class="p"·data-group-id="6387298294-5">[</span><span·class="p"·data-group-id="6387298294-5">]</span><span·class="p">,</span><span·class="w">
277 ·············</span><span·class="p"·data-group-id="6508376777-6">{</span><span·class="ss">xmlNamespace</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-7">[</span><span·class="p"·data-group-id="6508376777-7">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-8">[·...·truncated·by·diffoscope;·len:·102,·SHA:·1acec44edb29afebeb53c4f676e239b9e0d7d98df06ae7a0196f0bfcfa1ab7f6·...·]-6">}</span><span·class="p">,</span><span·class="w">277 ·············</span><span·class="p"·data-group-id="6387298294-6">{</span><span·class="ss">xmlNamespace</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-7">[</span><span·class="p"·data-group-id="6387298294-7">]</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-8">[·...·truncated·by·diffoscope;·len:·102,·SHA:·050253c39b5c7ea56d12cfb80cea87e6ecf87e7d6ebe82fc46e9ef522e18bca6·...·]-6">}</span><span·class="p">,</span><span·class="w">
278 ·············</span><span·class="p"·data-group-id="6508376777-9">[</span><span·class="p"·data-group-id="6508376777-9">]</span><span·class="p">,</span><span·class="w">278 ·············</span><span·class="p"·data-group-id="6387298294-9">[</span><span·class="p"·data-group-id="6387298294-9">]</span><span·class="p">,</span><span·class="w">
279 ·············</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">279 ·············</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
280 ·············</span><span·class="p"·data-group-id="6508376777-10">[</span><span·class="p"·data-group-id="6508376777-10">]</span><span·class="p">,</span><span·class="w">280 ·············</span><span·class="p"·data-group-id="6387298294-10">[</span><span·class="p"·data-group-id="6387298294-10">]</span><span·class="p">,</span><span·class="w">
281 ·············</span><span·class="p"·data-group-id="6508376777-11">[</span><span·class="p"·data-group-id="6508376777-12">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-13">[</span><span·class="p"·data-group-id="6508376777-14">{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·343,·SHA:·cd4af93428459aaa098e8722ee4a884f0f433be14521c9e8fa2ba25e910d9bdb·...·]-15">]</span><span·class="p">,</span><span·class="s">&quot;\281 ·············</span><span·class="p"·data-group-id="6387298294-11">[</span><span·class="p"·data-group-id="6387298294-12">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-13">[</span><span·class="p"·data-group-id="6387298294-14">{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·343,·SHA:·df2d0295f8733022d221edf7d41f8315a6872d20354abfe08c0b1e26b40e5943·...·]-15">]</span><span·class="p">,</span><span·class="s">&quot;\
282 ··&quot;</span><span·class="p">,</span><span·class="ss">text</span><span·class="p"·data-group-id="6508376777-12">}</span><span·class="p">,</span><span·class="w">282 ··&quot;</span><span·class="p">,</span><span·class="ss">text</span><span·class="p"·data-group-id="6387298294-12">}</span><span·class="p">,</span><span·class="w">
283 ··············</span><span·class="p"·data-group-id="6508376777-16">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">bike</span><span·class="p">,</span><span·class="w">283 ··············</span><span·class="p"·data-group-id="6387298294-16">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">bike</span><span·class="p">,</span><span·class="w">
284 ··························</span><span·class="ss">bike</span><span·class="p">,</span><span·class="w">284 ··························</span><span·class="ss">bike</span><span·class="p">,</span><span·class="w">
285 ··························</span><span·class="p"·data-group-id="6508376777-17">[</span><span·class="p"·data-group-id="6508376777-17">]</span><span·class="p">,</span><span·class="w">285 ··························</span><span·class="p"·data-group-id="6387298294-17">[</span><span·class="p"·data-group-id="6387298294-17">]</span><span·class="p">,</span><span·class="w">
286 ··························</span><span·class="p"·data-group-id="6508376777-18">{</span><span·class="ss">xmlNamespace</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-19">[</span><span·class="p"·data-group-id="6508376777-19">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-20">[</span><span·class="p"·data-group-id="6508376777-20">]</span><span·class="p"·data-group-id="6508376777-18">}</span><span·class="p">,</span><span·class="w"> 
287 ··························</span><span·class="p"·data-group-id="6508376777-21">[</span><span·class="p"·data-group-id="6508376777-22">{</span><span·class="ss">motorcycles</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6508376777-22">}</span><span·class="p"·data-group-id="6508376777-[·...·truncated·by·diffoscope;·len:·5,·SHA:·588b35f549235e4a89db29628bd0b6e21b8e0d9a1e02f01f6d3a96609a80a330·...·]</span><span·class="p">,</span><span·class="w">286 ··························</span><span·class="p"·data-group-id="6387298294-18">{</span><span·class="ss">xmlNamespace</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-19">[</span><span·class="p"·data-group-id="6387298294-19">]</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-[·...·truncated·by·diffoscope;·len:·113,·SHA:·8ddb840387674347db24dc7e514fc85e79771a22c09f136a9e31c5cd966a25f7·...·]</span><span·class="p">,</span><span·class="w">
 287 ··························</span><span·class="p"·data-group-id="6387298294-21">[</span><span·class="p"·data-group-id="6387298294-22">{</span><span·class="ss">motorcycles</span><span·class="p">,</span><span·class="mi">1</span><span·class="p"·data-group-id="6387298294-22">}</span><span·class="p"·data-group-id="6387298294-21">]</span><span·class="p">,</span><span·class="w">
288 ··························</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">288 ··························</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">
289 ··························</span><span·class="p"·data-group-id="6508376777-23">[</span><span·class="p"·data-group-id="6508376777-24">{</span><span·class="ss">xmlAttribute</span><span·class="p">,</span><span·class="ss">year</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-25">[</span><span·class="p"·data-group-id="6508376777-25">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-26">[</span><span·class="p"·data-group-id="6508376777-26">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-27">[</span><span·class="p"·data-group-id="6508376777-27">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-28">[</span><span·class="p"·data-group-id="6508376777-28">]</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6508376777-24">}</span><span·class="p">,</span><span·class="w"> 
290 ···························</span><span·class="p"·data-group-id="6508376777-29">{</span><span·class="ss">xmlAttribute</span><span·class="p">,</span><span·class="ss">color</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-30">[</span><span·class="p"·data-group-id="6508376777-30">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-31">[</span><span·class="p"·data-group-id="6508376777-31">]</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-32">[</span><span·class="p"·data-group-id="6508376777-32">]</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6508376777-29">}</span><span·class="p"·data-group-id="6508376777-23">]</span><span·class="p">,</span><span·class="w"> 
291 ··························</span><span·class="p"·data-group-id="6508376777-33">[</span><span·class="p"·data-group-id="6508376777-34">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-35">[</span><span·class="p"·data-group-id="6508376777-36">{</span><span·class="ss">[·...·truncated·by·diffoscope;·len:·424,·SHA:·cdf491983b2a4d4afb801dfaa25f03a655aa0591490892c063944c29a4d3176d·...·]</span><span·class="p">,</span><span·class="w">289 ··························</span><span·class="p"·data-group-id="6387298294-23">[</span><span·class="p"·data-group-id="6387298294-24">{</span><span·class="ss">xmlAttribute</span><span·class="p">,</span><span·class="ss">year</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-25">[</span><span·class="p[·...·truncated·by·diffoscope;·len:·579,·SHA:·db7f089abdbd35b0bea88ab2839fec4618d381b363adc6e58c4919a3740f9223·...·]</span><span·class="p">,</span><span·class="w">
 290 ···························</span><span·class="p"·data-group-id="6387298294-29">{</span><span·class="ss">xmlAttribute</span><span·class="p">,</span><span·class="ss">color</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-30">[</span><span·class="p"·data-group-id="6387298294-30">]</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-31">[</span><span·class="p"·data-group-id="6387298294-31">]</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-32">[</span><span·class="p"·data-group-id="6387298294-32">]</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6387298294-29">}</span><span·class="p"·data-group-id="6387298294-23">]</span><span·class="p">,</span><span·class="w">
 291 ··························</span><span·class="p"·data-group-id="6387298294-33">[</span><span·class="p"·data-group-id="6387298294-34">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-35">[</span><span·class="p"·data-group-id="6387298294-36">{</span><span·class="ss">bike</span><span·class="p">,</span><span·class="mi">2</span><span·class="p"·data-group-id="6387298294-36">}</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-37">{</span><span·class="ss">motorcycles</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6387298294-37">}</span><span·class="p"·data-group-id="6387298294-35">]</span><span·class="p">,</span><span·class="w">
292 ····································</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">292 ····································</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">
293 ····································</span><span·class="p"·data-group-id="6508376777-38">[</span><span·class="p"·data-group-id="6508376777-38">]</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6508376777-34">}</span><span·class="p">,</span><span·class="w">293 ····································</span><span·class="p"·data-group-id="6387298294-38">[</span><span·class="p"·data-group-id="6387298294-38">]</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6387298294-34">}</span><span·class="p">,</span><span·class="w">
294 ···························</span><span·class="p"·data-group-id="6508376777-39">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">name</span><span·class="p">,</span><span·class="ss">name</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-40">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·173,·SHA:·f7b297e2859637b7bc0238e1c37d84a2a0210dab8f422869f069276cf027dc98·...·]-39">}</span><span·class="p">,</span><span·class="w">294 ···························</span><span·class="p"·data-group-id="6387298294-39">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">name</span><span·class="p">,</span><span·class="ss">name</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-40">[</span><span·class="p"·da[·...·truncated·by·diffoscope;·len:·173,·SHA:·d3032d3adae813bb5597bd610a218e556cc051afd0b67eefde59976e0c79296b·...·]-39">}</span><span·class="p">,</span><span·class="w">
295 ···························</span><span·class="p"·data-group-id="6508376777-41">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="6508376777-42">[</span><span·class="p"·data-group-id="6508376777-43">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·391,·SHA:·7c9aec6ce4153e3f38a292cf108053c967de0140178280c038c70903580f999e·...·]-41">}</span><span·class="p">,</span><span·class="w">295 ···························</span><span·class="p"·data-group-id="6387298294-41">{</span><span·class="ss">xmlText</span><span·class="p">,</span><span·class="p"·data-group-id="6387298294-42">[</span><span·class="p"·data-group-id="6387298294-43">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span[·...·truncated·by·diffoscope;·len:·391,·SHA:·d5d5fd9e86e037d46bd9ebac0418fb0368d69b8881a285d1dc841a8d03804650·...·]-41">}</span><span·class="p">,</span><span·class="w">
296 ···························</span><span·class="p"·data-group-id="6508376777-44">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">engine</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6508376777-44">}</span><span·class="p">,</span><span·class="w">296 ···························</span><span·class="p"·data-group-id="6387298294-44">{</span><span·class="ss">xmlElement</span><span·class="p">,</span><span·class="ss">engine</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6387298294-44">}</span><span·class="p">,</span><span·class="w">
297 ···························</span><span·class="p"·data-group-id="6508376777-45">{</span><span·class="ss">xmlText</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6508376777-45">}</span><span·class="p">,</span><span·class="w">297 ···························</span><span·class="p"·data-group-id="6387298294-45">{</span><span·class="ss">xmlText</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6387298294-45">}</span><span·class="p">,</span><span·class="w">
298 ···························</span><span·class="p"·data-group-id="6508376777-46">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6508376777-46">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·f03d2c1ae606c2f755b1980e49bc79a8ad650d806b8aceaef64508e685ada94e·...·]-33">]</span><span·class="p">,</span><span·class="w">298 ···························</span><span·class="p"·data-group-id="6387298294-46">{</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="p"·data-group-id="6387298294-46">}</span><span·class="p">|</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class=[·...·truncated·by·diffoscope;·len:·29,·SHA:·374de0833f901fd041f59f6f0e57cab94cb4629653413b94468bf9cee7fd553a·...·]-33">]</span><span·class="p">,</span><span·class="w">
299 ··························</span><span·class="p"·data-group-id="6508376777-47">[</span><span·class="p"·data-group-id="6508376777-47">]</span><span·class="p">,</span><span·class="w">299 ··························</span><span·class="p"·data-group-id="6387298294-47">[</span><span·class="p"·data-group-id="6387298294-47">]</span><span·class="p">,</span><span·class="w">
300 ··························</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">300 ··························</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">
301 ··························</span><span·class="ss">undeclared</span><span·class="p"·data-group-id="6508376777-16">}</span><span·class="p">,</span><span·class="w">301 ··························</span><span·class="ss">undeclared</span><span·class="p"·data-group-id="6387298294-16">}</span><span·class="p">,</span><span·class="w">
302 ··············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">302 ··············</span><span·class="p">.</span><span·class="p">.</span><span·class="p">.</span><span·class="w">
303 ··············</span><span·class="p"·data-group-id="6508376777-11">]</span><span·class="p">,</span><span·class="w">303 ··············</span><span·class="p"·data-group-id="6387298294-11">]</span><span·class="p">,</span><span·class="w">
304 ·············</span><span·class="p"·data-group-id="6508376777-48">[</span><span·class="p"·data-group-id="6508376777-48">]</span><span·class="p">,</span><span·class="w">304 ·············</span><span·class="p"·data-group-id="6387298294-48">[</span><span·class="p"·data-group-id="6387298294-48">]</span><span·class="p">,</span><span·class="w">
305 ·············</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">305 ·············</span><span·class="s">&quot;.&quot;</span><span·class="p">,</span><span·class="w">
306 ·············</span><span·class="ss">undeclared</span><span·class="p"·data-group-id="6508376777-4">}</span><span·class="p">,</span><span·class="w">306 ·············</span><span·class="ss">undeclared</span><span·class="p"·data-group-id="6387298294-4">}</span><span·class="p">,</span><span·class="w">
307 ·</span><span·class="p"·data-group-id="6508376777-49">[</span><span·class="p"·data-group-id="6508376777-49">]</span><span·class="p"·data-group-id="6508376777-3">}</span><span·class="w">307 ·</span><span·class="p"·data-group-id="6387298294-49">[</span><span·class="p"·data-group-id="6387298294-49">]</span><span·class="p"·data-group-id="6387298294-3">}</span><span·class="w">
308 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><p>If·you·instead·receives·the·XML·doc·as·a·string·you·can·parse·it·by308 </span><span·class="mi">4</span><span·class="o">&gt;</span></code></pre><p>If·you·instead·receives·the·XML·doc·as·a·string·you·can·parse·it·by
309 <a·href="xmerl_scan.html#string/1"><code·class="inline">xmerl_scan:string/1</code></a>.·Both·file/2·and·string/2·exists·where·the·second·argument309 <a·href="xmerl_scan.html#string/1"><code·class="inline">xmerl_scan:string/1</code></a>.·Both·file/2·and·string/2·exists·where·the·second·argument
310 is·a·list·of·options·to·the·parser,·see·the·<a·href="xmerl_scan.html">reference·manual</a>.</p><h2·id="example-extracting-data-from-xml-content"·class="section-heading">310 is·a·list·of·options·to·the·parser,·see·the·<a·href="xmerl_scan.html">reference·manual</a>.</p><h2·id="example-extracting-data-from-xml-content"·class="section-heading">
311 ··<a·href="#example-extracting-data-from-xml-content"·class="hover-link">311 ··<a·href="#example-extracting-data-from-xml-content"·class="hover-link">
312 ····<i·class="ri-link-m"·aria-hidden="true"></i>312 ····<i·class="ri-link-m"·aria-hidden="true"></i>
313 ··</a>313 ··</a>
314 ··<span·class="text">Example:·Extracting·Data·From·XML·Content</span>314 ··<span·class="text">Example:·Extracting·Data·From·XML·Content</span>
Offset 338, 30 lines modifiedOffset 338, 30 lines modified
338 fields·of·the·appropriate·element.</p><p>There·is·support·for·this·in·Xmerl·by·the·&quot;simple-form&quot;·format.·You·can·put·your338 fields·of·the·appropriate·element.</p><p>There·is·support·for·this·in·Xmerl·by·the·&quot;simple-form&quot;·format.·You·can·put·your
339 data·in·a·simple-form·data·structure·and·feed·it·into339 data·in·a·simple-form·data·structure·and·feed·it·into
340 <code·class="inline">xmerl:export_simple(Content,Callback,RootAttributes)</code>.·Content·may·be·a·mixture340 <code·class="inline">xmerl:export_simple(Content,Callback,RootAttributes)</code>.·Content·may·be·a·mixture
341 of·simple-form·and·Xmerl·records·as·<code·class="inline">#xmlElement{}</code>·and·<code·class="inline">#xmlText{}</code>.</p><p>The·Types·are:</p><ul><li>Content·=·[Element]</li><li>Callback·=·atom()</li><li>RootAttributes·=·[Attributes]</li></ul><p>Element·is·any·of:</p><ul><li>{Tag,·Attributes,·Content}</li><li>{Tag,·Content}</li><li>Tag</li><li>IOString</li><li>#xmlText{}</li><li>#xmlElement{}</li><li>#xmlPI{}</li><li>#xmlComment{}</li><li>#xmlDecl{}</li></ul><p>The·simple-form·structure·is·any·of·<code·class="inline">{Tag,·Attributes,·Content}</code>,341 of·simple-form·and·Xmerl·records·as·<code·class="inline">#xmlElement{}</code>·and·<code·class="inline">#xmlText{}</code>.</p><p>The·Types·are:</p><ul><li>Content·=·[Element]</li><li>Callback·=·atom()</li><li>RootAttributes·=·[Attributes]</li></ul><p>Element·is·any·of:</p><ul><li>{Tag,·Attributes,·Content}</li><li>{Tag,·Content}</li><li>Tag</li><li>IOString</li><li>#xmlText{}</li><li>#xmlElement{}</li><li>#xmlPI{}</li><li>#xmlComment{}</li><li>#xmlDecl{}</li></ul><p>The·simple-form·structure·is·any·of·<code·class="inline">{Tag,·Attributes,·Content}</code>,
342 <code·class="inline">{Tag,·Content}</code>·or·<code·class="inline">Tag</code>·where:</p><ul><li>Tag·=·atom()</li><li>Attributes·=·[{Name,·Value}|·#xmlAttribute{}]</li><li>Name·=·atom()</li><li><p>Value·=·IOString·|·atom()·|·integer()</p></li></ul><p>See·also·reference·manual·for·<a·href="xmerl.html#export_simple/3">xmerl</a></p><p>If·you·want·to·add·the·information·about·a·black·Harley·Davidsson·1200·cc342 <code·class="inline">{Tag,·Content}</code>·or·<code·class="inline">Tag</code>·where:</p><ul><li>Tag·=·atom()</li><li>Attributes·=·[{Name,·Value}|·#xmlAttribute{}]</li><li>Name·=·atom()</li><li><p>Value·=·IOString·|·atom()·|·integer()</p></li></ul><p>See·also·reference·manual·for·<a·href="xmerl.html#export_simple/3">xmerl</a></p><p>If·you·want·to·add·the·information·about·a·black·Harley·Davidsson·1200·cc
343 Sportster·motorcycle·from·2003·that·is·in·shape·as·new·in·the·motorcycles.xml343 Sportster·motorcycle·from·2003·that·is·in·shape·as·new·in·the·motorcycles.xml
344 document·you·can·put·the·data·in·a·simple-form·data·structure·like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">344 document·you·can·put·the·data·in·a·simple-form·data·structure·like:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
345 ··</span><span·class="p"·data-group-id="0298905251-1">{</span><span·class="ss">bike</span><span·class="p">,</span><span·class="w">345 ··</span><span·class="p"·data-group-id="2574091447-1">{</span><span·class="ss">bike</span><span·class="p">,</span><span·class="w">
346 ·····</span><span·class="p"·data-group-id="0298905251-2">[</span><span·class="p"·data-group-id="0298905251-3">{</span><span·class="ss">year</span><span·class="p">,</span><span·class="s">&quot;2003&quot;</span><span·class="p"·data-group-id="0298905251-3">}</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·452,·SHA:·9e3a5c8c0c4e7ffcc612396a9ab3f940f73359de9493a10391619b18a5a6e9dc·...·]-2">]</span><span·class="p">,</span><span·class="w">346 ·····</span><span·class="p"·data-group-id="2574091447-2">[</span><span·class="p"·data-group-id="2574091447-3">{</span><span·class="ss">year</span><span·class="p">,</span><span·class="s">&quot;2003&quot;</span><span·class="p"·data-group-id="2574091447-3">}</span><span·class="p">,</span><span·class="[·...·truncated·by·diffoscope;·len:·452,·SHA:·8f692af1a3cc3577ef1013eab29691d1ec88a2215dceb8d601f86632d4b6b3c2·...·]-2">]</span><span·class="p">,</span><span·class="w">
347 ·····</span><span·class="p"·data-group-id="0298905251-6">[</span><span·class="p"·data-group-id="0298905251-7">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">347 ·····</span><span·class="p"·data-group-id="2574091447-6">[</span><span·class="p"·data-group-id="2574091447-7">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="w">
348 ·········</span><span·class="p"·data-group-id="0298905251-8">[</span><span·class="p"·data-group-id="0298905251-9">{</span><span·class="ss">manufacturer</span><span·class="p">,</span><span·class="p"·data-group-id="0298905251-10">[</span><span·class="s">&quot;Harley·Davidsson&quot;</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·79,·SHA:·489a741ac2c9e91ec4fca090f900903bec4b9d12f25bb7cf48c992bd2888ef39·...·]-9">}</span><span·class="p">,</span><span·class="w">348 ·········</span><span·class="p"·data-group-id="2574091447-8">[</span><span·class="p"·data-group-id="2574091447-9">{</span><span·class="ss">manufacturer</span><span·class="p">,</span><span·class="p"·data-group-id="2574091447-10">[</span><span·class="s">&quot;Harley·Davidsson&quot;</span><span·class="p"·[·...·truncated·by·diffoscope;·len:·79,·SHA:·89d59e6d4760ea65ae59a6bf6653135c7417dc27892da0a387809cd1598868c6·...·]-9">}</span><span·class="p">,</span><span·class="w">
349 ··········</span><span·class="p"·data-group-id="0298905251-11">{</span><span·class="ss">brandName</span><span·class="p">,</span><span·class="p"·data-group-id="0298905251-12">[</span><span·class="s">&quot;XL1200C&quot;</span><span·class="p"·data-group-id="0298905251-12">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·2d311891df9a1e0af65ae56dc74c7755384a275aab50a8b7c3a4911e33ed232a·...·]-11">}</span><span·class="p">,</span><span·class="w">349 ··········</span><span·class="p"·data-group-id="2574091447-11">{</span><span·class="ss">brandName</span><span·class="p">,</span><span·class="p"·data-group-id="2574091447-12">[</span><span·class="s">&quot;XL1200C&quot;</span><span·class="p"·data-group-id="2574091447-12">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·90643b161152014540966149f71b55a3b98eecfa9545a96fc11b8516a2cf8f2c·...·]-11">}</span><span·class="p">,</span><span·class="w">
350 ··········</span><span·class="p"·data-group-id="0298905251-13">{</span><span·class="ss">additionalName</span><span·class="p">,</span><span·class="p"·data-group-id="0298905251-14">[</span><span·class="s">&quot;Sportster&quot;</span><span·class="p"·data-group-id="0298905251-14">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·129,·SHA:·08a04b6fb7013fd28101188305024d5ff1f18d28570d9b4c7309b0e6af7395b6·...·]-7">}</span><span·class="p">,</span><span·class="w">350 ··········</span><span·class="p"·data-group-id="2574091447-13">{</span><span·class="ss">additionalName</span><span·class="p">,</span><span·class="p"·data-group-id="2574091447-14">[</span><span·class="s">&quot;Sportster&quot;</span><span·class="p"·data-group-id="2574091447-14">]</span><span·class="p"·dat[·...·truncated·by·diffoscope;·len:·129,·SHA:·52047bbcd4b7a53b1afb08d2978027c9ea13a1733966065e40abfd7eb23df179·...·]-7">}</span><span·class="p">,</span><span·class="w">
351 ······</span><span·class="p"·data-group-id="0298905251-15">{</span><span·class="ss">engine</span><span·class="p">,</span><span·class="w">351 ······</span><span·class="p"·data-group-id="2574091447-15">{</span><span·class="ss">engine</span><span·class="p">,</span><span·class="w">
352 ·········</span><span·class="p"·data-group-id="0298905251-16">[</span><span·class="s">&quot;V-engine,·2-cylinders,·1200·cc&quot;</span><span·class="p"·data-group-id="0298905251-16">]</span><span·class="p"·data-group-id="0298905251-15">}</span><span·class="p">,</span><span·class="w">352 ·········</span><span·class="p"·data-group-id="2574091447-16">[</span><span·class="s">&quot;V-engine,·2-cylinders,·1200·cc&quot;</span><span·class="p"·data-group-id="2574091447-16">]</span><span·class="p"·data-group-id="2574091447-15">}</span><span·class="p">,</span><span·class="w">
353 ······</span><span·class="p"·data-group-id="0298905251-17">{</span><span·class="ss">kind</span><span·class="p">,</span><span·class="p"·data-group-id="0298905251-18">[</span><span·class="s">&quot;custom&quot;</span><span·class="p"·data-group-id="0298905251-18">]</span><span·class="p"·data-group-id="0[·...·truncated·by·diffoscope;·len:·9,·SHA:·043e0988d70036f1342b3461a930337dbb2e9495c93b99539abc1ab990e9cf10·...·]-17">}</span><span·class="p">,</span><span·class="w">353 ······</span><span·class="p"·data-group-id="2574091447-17">{</span><span·class="ss">kind</span><span·class="p">,</span><span·class="p"·data-group-id="2574091447-18">[</span><span·class="s">&quot;custom&quot;</span><span·class="p"·data-group-id="2574091447-18">]</span><span·class="p"·data-group-id="2[·...·truncated·by·diffoscope;·len:·9,·SHA:·5a55b50df1795c9ba228cd586ed89fc175e86a6ef81e02c2841a1fb999ab202e·...·]-17">}</span><span·class="p">,</span><span·class="w">
354 ······</span><span·class="p"·data-group-id="0298905251-19">{</span><span·class="ss">drive</span><span·class="p">,</span><span·class="p"·data-group-id="0298905251-20">[</span><span·class="s">&quot;belt&quot;</span><span·class="p"·data-group-id="0298905251-20">]</span><span·class="p"·data-group-id="02[·...·truncated·by·diffoscope;·len:·115,·SHA:·b6bb81573f1a2c3c78892ecdcd9d89eec6bc702681b725b820e1f0e076838177·...·]-1">}</span></code></pre><p>In·order·to·append·this·data·to·the·end·of·the·motorcycles.xml·document·you·have354 ······</span><span·class="p"·data-group-id="2574091447-19">{</span><span·class="ss">drive</span><span·class="p">,</span><span·class="p"·data-group-id="2574091447-20">[</span><span·class="s">&quot;belt&quot;</span><span·class="p"·data-group-id="2574091447-20">]</span><span·class="p"·data-group-id="25[·...·truncated·by·diffoscope;·len:·115,·SHA:·453d0ea03fdbe1e574ad3a53b8985518243f3a37cb523c68134730bd104a8a1d·...·]-1">}</span></code></pre><p>In·order·to·append·this·data·to·the·end·of·the·motorcycles.xml·document·you·have
355 to·parse·the·file·and·add·Data·to·the·end·of·the·root·element·content.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p"·data-group-id="0189674282-1">{</span><span·class="n">RootEl</span><span·class="p">,</span><span·class="n">Misc</span><span·class="p"·data-group-id="0189674282-1">}</span><span·class="o">=</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">fi[·...·truncated·by·diffoscope;·len:·152,·SHA:·7d267f8602c5260b9587e7bb1d98bbf25ca576fe147ad9e11454a2e37817bc38·...·]-2">)</span><span·class="p">,</span><span·class="w">355 to·parse·the·file·and·add·Data·to·the·end·of·the·root·element·content.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="p"·data-group-id="6187720986-1">{</span><span·class="n">RootEl</span><span·class="p">,</span><span·class="n">Misc</span><span·class="p"·data-group-id="6187720986-1">}</span><span·class="o">=</span><span·class="nc">xmerl_scan</span><span·class="p">:</span><span·class="nf">fi[·...·truncated·by·diffoscope;·len:·152,·SHA:·b62857dbb551850fb25b1c29071c071ced00acbeaef44a0846cca5f9c03d2bde·...·]-2">)</span><span·class="p">,</span><span·class="w">
356 ····</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="0189674282-3">{</span><span·class="ss">content</span><span·class="o">=</span><span·class="n">Content</span><span·class="p"·data-group-id="0189674282-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RootEl</span><span·class="p">,</span><span·class="w">356 ····</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="6187720986-3">{</span><span·class="ss">content</span><span·class="o">=</span><span·class="n">Content</span><span·class="p"·data-group-id="6187720986-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="n">RootEl</span><span·class="p">,</span><span·class="w">
357 ····</span><span·class="n">NewContent</span><span·class="o">=</span><span·class="n">Content</span><span·class="o">++</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="0189674282-4">(</span><span·class="p"·data-group-id="0189674282-5">[</span><span·class="n">Data</span><span·class="p"·data-group-id="0189674282-5">]</span><span·class="p"·data-group-id="0189674282-4">)</span><span·class="p">,</span><span·class="w">357 ····</span><span·class="n">NewContent</span><span·class="o">=</span><span·class="n">Content</span><span·class="o">++</span><span·class="nc">lists</span><span·class="p">:</span><span·class="nf">flatten</span><span·class="p"·data-group-id="6187720986-4">(</span><span·class="p"·data-group-id="6187720986-5">[</span><span·class="n">Data</span><span·class="p"·data-group-id="6187720986-5">]</span><span·class="p"·data-group-id="6187720986-4">)</span><span·class="p">,</span><span·class="w">
358 ····</span><span·class="n">NewRootEl</span><span·class="o">=</span><span·class="n">RootEl</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="0189674282-6">{</span><span·class="ss">content</span><span·class="o">=</span><span·class="n">NewContent</span><span·class="p"·data-group-id="0189674282-6">}</span><span·class="p">,</span></code></pre><p>Then·you·can·run·it·through·the·export_simple/2·funct[·...·truncated·by·diffoscope;·len:·674,·SHA:·075a30b6f949fa701ba2f4d6c07a7df040358671009e353801b3a9c4307db895·...·]8-2">)</span><span·class="p">,</span><span·class="w">358 ····</span><span·class="n">NewRootEl</span><span·class="o">=</span><span·class="n">RootEl</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="6187720986-6">{</span><span·class="ss">content</span><span·class="o">=</span><span·class="n">NewContent</span><span·class="p"·data-group-id="6187720986-6">}</span><span·class="p">,</span></code></pre><p>Then·you·can·run·it·through·the·export_simple/2·funct[·...·truncated·by·diffoscope;·len:·674,·SHA:·cba343d5bc538cee2fd8bce42dd33810cdbe7809bb0491630cdda20b8c4e8b74·...·]8-2">)</span><span·class="p">,</span><span·class="w">
359 ····</span><span·class="n">Export</span><span·class="o">=</span><span·class="nc">xmerl</span><span·class="p">:</span><span·class="nf">export_simple</span><span·class="p"·data-group-id="2569641018-4">(</span><span·class="p"·data-group-id="2569641018-5">[</span><span·class="n">NewRootEl</span><span·class="p"·data-group-id="2569641018-5">]</span><span·class="p">,</span><span·class="ss">xmerl_xml</span><span·class="p"·data-group-id="25696410[·...·truncated·by·diffoscope;·len:·1,·SHA:·6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b·...·]8-4">)</span><span·class="p">,</span><span·class="w">359 ····</span><span·class="n">Export</span><span·class="o">=</span><span·class="nc">xmerl</span><span·class="p">:</span><span·class="nf">export_simple</span><span·class="p"·data-group-id="4216483468-4">(</span><span·class="p"·data-group-id="4216483468-5">[</span><span·class="n">NewRootEl</span><span·class="p"·data-group-id="4216483468-5">]</span><span·class="p">,</span><span·class="ss">xmerl_xml</span><span·class="p"·data-group-id="42164834[·...·truncated·by·diffoscope;·len:·1,·SHA:·e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683·...·]8-4">)</span><span·class="p">,</span><span·class="w">
360 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="2569641018-6">(</span><span·class="n">IOF</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="2569641018-7">[</sp[·...·truncated·by·diffoscope;·len:·315,·SHA:·4bed51c91ce706fe7895d3d3bb07e7d70e03c502c489ba3963d6c2696a184993·...·]8-6">)</span><span·class="p">,</span></code></pre><p><a·href=""·id="new_motorcyclesxml"></a></p><p>The·result·would·be:</p><pre><code·class="text">360 ····</span><span·class="nc">io</span><span·class="p">:</span><span·class="nf">format</span><span·class="p"·data-group-id="4216483468-6">(</span><span·class="n">IOF</span><span·class="p">,</span><span·class="s">&quot;</span><span·class="si">~s</span><span·class="si">~n</span><span·class="s">&quot;</span><span·class="p">,</span><span·class="p"·data-group-id="4216483468-7">[</sp[·...·truncated·by·diffoscope;·len:·315,·SHA:·eb9749c162bfdfac0a39f8de64902857e25e9c89aacc9a33a5963ad5fc440160·...·]8-6">)</span><span·class="p">,</span></code></pre><p><a·href=""·id="new_motorcyclesxml"></a></p><p>The·result·would·be:</p><pre><code·class="text">
361 &lt;?xml·version=&quot;1.0&quot;?&gt;&lt;motorcycles&gt;361 &lt;?xml·version=&quot;1.0&quot;?&gt;&lt;motorcycles&gt;
362 ··&lt;bike·year=&quot;2000&quot;·color=&quot;black&quot;&gt;362 ··&lt;bike·year=&quot;2000&quot;·color=&quot;black&quot;&gt;
363 ····&lt;name&gt;363 ····&lt;name&gt;
364 ······&lt;manufacturer&gt;Suzuki&lt;/manufacturer&gt;364 ······&lt;manufacturer&gt;Suzuki&lt;/manufacturer&gt;
365 ······&lt;brandName&gt;Suzuki·VL·1500&lt;/brandName&gt;365 ······&lt;brandName&gt;Suzuki·VL·1500&lt;/brandName&gt;
366 ······&lt;additionalName&gt;Intruder&lt;/additionalName&gt;366 ······&lt;additionalName&gt;Intruder&lt;/additionalName&gt;
367 ····&lt;/name&gt;367 ····&lt;/name&gt;
Offset 383, 48 lines modifiedOffset 383, 48 lines modified
383 ··&lt;/bike&gt;383 ··&lt;/bike&gt;
384 &lt;bike·year=&quot;2003&quot;·color=&quot;black&quot;·condition=&quot;new&quot;&gt;&lt;name&gt;&lt;manufacturer&gt;Harley·Davidsson&lt;/manufacturer&gt;&lt;brandName&gt;XL1200C&lt;/brandName&gt;&lt;additionalName&gt;Sportster&lt;/additionalName&gt;&lt;/name&gt;&lt;engine&gt;V-engine,·2-cylinders,·1200·cc&lt;/engine&gt;&lt;kind&gt;custom&lt;/kind&gt;&lt;drive&gt;belt&lt;/drive&gt;&lt;/bike&gt;&lt;/motorcycles&gt;</code></pre><p>If·it·is·important·to·get·similar·indentation·and·newlines·as·in·the·original384 &lt;bike·year=&quot;2003&quot;·color=&quot;black&quot;·condition=&quot;new&quot;&gt;&lt;name&gt;&lt;manufacturer&gt;Harley·Davidsson&lt;/manufacturer&gt;&lt;brandName&gt;XL1200C&lt;/brandName&gt;&lt;additionalName&gt;Sportster&lt;/additionalName&gt;&lt;/name&gt;&lt;engine&gt;V-engine,·2-cylinders,·1200·cc&lt;/engine&gt;&lt;kind&gt;custom&lt;/kind&gt;&lt;drive&gt;belt&lt;/drive&gt;&lt;/bike&gt;&lt;/motorcycles&gt;</code></pre><p>If·it·is·important·to·get·similar·indentation·and·newlines·as·in·the·original
385 document·you·have·to·add·<code·class="inline">#xmlText{}</code>·records·with·space·and·newline·values·in385 document·you·have·to·add·<code·class="inline">#xmlText{}</code>·records·with·space·and·newline·values·in
386 appropriate·places.·It·may·also·be·necessary·to·keep·the·original·prolog·where386 appropriate·places.·It·may·also·be·necessary·to·keep·the·original·prolog·where
387 the·DTD·is·referenced.·If·so,·it·is·possible·to·pass·a·RootAttribute387 the·DTD·is·referenced.·If·so,·it·is·possible·to·pass·a·RootAttribute
388 <code·class="inline">{prolog,Value}</code>·to·<code·class="inline">export_simple/3</code>.·The·following·example·code·fixes·those388 <code·class="inline">{prolog,Value}</code>·to·<code·class="inline">export_simple/3</code>.·The·following·example·code·fixes·those
389 changes·in·the·previous·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">389 changes·in·the·previous·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="w">····</span><span·class="n">Data</span><span·class="w">·</span><span·class="o">=</span><span·class="w">
390 ······</span><span·class="p"·data-group-id="5756365281-1">[</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="5756365281-2">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;··&quot;</span><span·class="p"·data-group-id="57563[·...·truncated·by·diffoscope;·len:·5,·SHA:·fe133895832b899fcab9bbede164ad3708ee1fca292a9fc140ce508006ab727a·...·]-2">}</span><span·class="p">,</span><span·class="w">390 ······</span><span·class="p"·data-group-id="9136553415-1">[</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="9136553415-2">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;··&quot;</span><span·class="p"·data-group-id="91365[·...·truncated·by·diffoscope;·len:·5,·SHA:·703b36298fb8053f1fe6367d32dc49e9e30fe00e383fe6aa9eff4065db807068·...·]-2">}</span><span·class="p">,</span><span·class="w">
391 ·······</span><span·class="p"·data-group-id="5756365281-3">{</span><span·class="ss">bike</span><span·class="p">,</span><span·class="p"·data-group-id="5756365281-4">[</span><span·class="p"·data-group-id="5756365281-5">{</span><span·class="ss">year</span><span·class="p">,</span><span·class="s">&quot;20[·...·truncated·by·diffoscope;·len:·557,·SHA:·063bbab6f5dcf838b6f5cac7fabfa98f4c3706fb0aab825e6d7e74af4005496d·...·]-4">]</span><span·class="p">,</span><span·class="w">391 ·······</span><span·class="p"·data-group-id="9136553415-3">{</span><span·class="ss">bike</span><span·class="p">,</span><span·class="p"·data-group-id="9136553415-4">[</span><span·class="p"·data-group-id="9136553415-5">{</span><span·class="ss">year</span><span·class="p">,</span><span·class="s">&quot;20[·...·truncated·by·diffoscope;·len:·557,·SHA:·3bd56053df1631e8e8927ea27124b231ca6ce882561f53fdcd602bdcfb5cad91·...·]-4">]</span><span·class="p">,</span><span·class="w">
392 ·············</span><span·class="p"·data-group-id="5756365281-8">[</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="5756365281-9">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\392 ·············</span><span·class="p"·data-group-id="9136553415-8">[</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="9136553415-9">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\
393 ····&quot;</span><span·class="p"·data-group-id="5756365281-9">}</span><span·class="p">,</span><span·class="w">393 ····&quot;</span><span·class="p"·data-group-id="9136553415-9">}</span><span·class="p">,</span><span·class="w">
394 ··············</span><span·class="p"·data-group-id="5756365281-10">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="p"·data-group-id="5756365281-11">[</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="5756365281-12">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\394 ··············</span><span·class="p"·data-group-id="9136553415-10">{</span><span·class="ss">name</span><span·class="p">,</span><span·class="p"·data-group-id="9136553415-11">[</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="9136553415-12">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\
395 ······&quot;</span><span·class="p"·data-group-id="5756365281-12">}</span><span·class="p">,</span><span·class="w">395 ······&quot;</span><span·class="p"·data-group-id="9136553415-12">}</span><span·class="p">,</span><span·class="w">
396 ·····················</span><span·class="p"·data-group-id="5756365281-13">{</span><span·class="ss">manufacturer</span><span·class="p">,</span><span·class="p"·data-group-id="5756365281-14">[</span><span·class="s">&quot;Harley·Davidsson&quot;</span><span·class="p"·data-group-id="5756365281-14">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·b5d9f6f102a03a90335896ae84ae439e659d3006b82138d7e3b4e459339d779e·...·]-13">}</span><span·class="p">,</span><span·class="w">396 ·····················</span><span·class="p"·data-group-id="9136553415-13">{</span><span·class="ss">manufacturer</span><span·class="p">,</span><span·class="p"·data-group-id="9136553415-14">[</span><span·class="s">&quot;Harley·Davidsson&quot;</span><span·class="p"·data-group-id="9136553415-14">]</span><span·class="p[·...·truncated·by·diffoscope;·len:·27,·SHA:·615a6afce4fa2d8cc1f2005130a41a3e10e35527b653d7a317b4b2e8a0182e13·...·]-13">}</span><span·class="p">,</span><span·class="w">
397 ·····················</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="5756365281-15">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\397 ·····················</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="9136553415-15">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\
398 ······&quot;</span><span·class="p"·data-group-id="5756365281-15">}</span><span·class="p">,</span><span·class="w">398 ······&quot;</span><span·class="p"·data-group-id="9136553415-15">}</span><span·class="p">,</span><span·class="w">
399 ·····················</span><span·class="p"·data-group-id="5756365281-16">{</span><span·class="ss">brandName</span><span·class="p">,</span><span·class="p"·data-group-id="5756365281-17">[</span><span·class="s">&quot;XL1200C&quot;</span><span·class="p"·data-group-id="5756365281-17">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·a939264f9b0480c4a8a1587a43a06748040056e363baa5a52f22b33194e3e383·...·]-16">}</span><span·class="p">,</span><span·class="w">399 ·····················</span><span·class="p"·data-group-id="9136553415-16">{</span><span·class="ss">brandName</span><span·class="p">,</span><span·class="p"·data-group-id="9136553415-17">[</span><span·class="s">&quot;XL1200C&quot;</span><span·class="p"·data-group-id="9136553415-17">]</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·15,·SHA:·b341624e2102d56eb8c1758c48a081cfe86a41ca09590467cacb707e4b39ee1a·...·]-16">}</span><span·class="p">,</span><span·class="w">
400 ·····················</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="5756365281-18">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\400 ·····················</span><span·class="o">#</span><span·class="ss">xmlText</span><span·class="p"·data-group-id="9136553415-18">{</span><span·class="ss">value</span><span·class="o">=</span><span·class="s">&quot;\
Max diff block lines reached; 101933/162913 bytes (62.57%) of diff not shown.
59.1 KB
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/xmerl_xs_examples.html
    
Offset 131, 21 lines modifiedOffset 131, 21 lines modified
131 ··</a>131 ··</a>
132 ··<span·class="text">Examples</span>132 ··<span·class="text">Examples</span>
133 </h3>133 </h3>
134 <hr·class="thin"/><h4>Example·1·Using·xslapply</h4><p>original·XSLT:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;doc/title&quot;</span><span·class="o">&gt;</span><span·class="w">134 <hr·class="thin"/><h4>Example·1·Using·xslapply</h4><p>original·XSLT:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;doc/title&quot;</span><span·class="o">&gt;</span><span·class="w">
135 ····</span><span·class="o">&lt;</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="w">135 ····</span><span·class="o">&lt;</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="w">
136 ······</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="nb">apply</span><span·class="o">-</span><span·class="ss">templates</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">136 ······</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="nb">apply</span><span·class="o">-</span><span·class="ss">templates</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">
137 ····</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="w">137 ····</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="w">
138 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span></code></pre><p>becomes·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="4590411667-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="4590411667-2">{</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·630,·SHA:·8d75e1696fefc122fab217061ce765ba91befce71e95a950cb7607c587d441df·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">138 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span></code></pre><p>becomes·in·Erlang:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="5125551591-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5125551591-2">{</span><span·class="w">·</span><sp[·...·truncated·by·diffoscope;·len:·630,·SHA:·08b3ca2208e6eb3c9c9250e20db1e446a8cc035ecae958e44de996218edb6846·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
139 ····</span><span·class="p"·data-group-id="4590411667-5">[</span><span·class="s">&quot;&lt;h1&gt;&quot;</span><span·class="p">,</span><span·class="w">139 ····</span><span·class="p"·data-group-id="5125551591-5">[</span><span·class="s">&quot;&lt;h1&gt;&quot;</span><span·class="p">,</span><span·class="w">
140 ·········</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="4590411667-6">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·4c60bd02cc8301bfd721a3a60e345d2c96047f6e9298f0095784778f88afefe7·...·]-6">)</span><span·class="p">,</span><span·class="w">140 ·········</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5125551591-6">(</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·class="p"·data-group-id="[·...·truncated·by·diffoscope;·len:·10,·SHA:·8122fa43de8250fcc5db3bcbf1a4135418f9451ec53179df964b4c027581bb96·...·]-6">)</span><span·class="p">,</span><span·class="w">
141 ·····</span><span·class="s">&quot;&lt;/h1&gt;&quot;</span><span·class="p"·data-group-id="4590411667-5">]</span><span·class="p">;</span></code></pre><hr·class="thin"/><hr·class="thin"/><h4>Example·2·Using·value_of·and·select</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;title&quot;</span><span·class="o">&gt;</span><span·class="w">141 ·····</span><span·class="s">&quot;&lt;/h1&gt;&quot;</span><span·class="p"·data-group-id="5125551591-5">]</span><span·class="p">;</span></code></pre><hr·class="thin"/><hr·class="thin"/><h4>Example·2·Using·value_of·and·select</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;title&quot;</span><span·class="o">&gt;</span><span·class="w">
142 ··</span><span·class="o">&lt;</span><span·class="ow">div</span><span·class="w">·</span><span·class="ss">align</span><span·class="o">=</span><span·class="s">&quot;center&quot;</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">value</span><span·class="o">-</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">select</span><span·class="o">=</span><span·class="s">&quot;.&quot;</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ow">div</span><span·class="o">&gt;</span><span·class="w">142 ··</span><span·class="o">&lt;</span><span·class="ow">div</span><span·class="w">·</span><span·class="ss">align</span><span·class="o">=</span><span·class="s">&quot;center&quot;</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">value</span><span·class="o">-</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">select</span><span·class="o">=</span><span·class="s">&quot;.&quot;</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">h1</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ow">div</span><span·class="o">&gt;</span><span·class="w">
143 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span></code></pre><p>becomes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="0854986631-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="0854986631-2">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·157,·SHA:·63bfc683f306accea2bae38a9d78a50c4da8ee91a5fe59352a1c2a8360dbbfd8·...·]1-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">143 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span></code></pre><p>becomes:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="8983104041-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="8983104041-2">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·157,·SHA:·0f3a0fa85377cc9671a90e173d35a6dde3007520cd474e2fcdc9f57b3c35a2ba·...·]1-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
144 ····</span><span·class="p"·data-group-id="0854986631-3">[</span><span·class="s">&quot;&lt;div·align=\&quot;center\&quot;&gt;&lt;h1&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="0854986631-4">(</span><span·class="nf">s[·...·truncated·by·diffoscope;·len:·425,·SHA:·801b87b40874591a7024948ad2a1dcd9b86f871b682e40e9c0f43dd9edc2f6ab·...·]1-3">]</span><span·class="p">;</span></code></pre><hr·class="thin"/><hr·class="thin"/><h4>Example·3·Simple·xsl·stylesheet</h4><p>A·complete·example·with·the·XSLT·sheet·in·the·xmerl·distribution.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">stylesheet</span><span·class="w">·</span><span·class="ss">version</span><span·class="o">=</span><span·class="s">&quot;1.0&quot;</span><span·class="w">144 ····</span><span·class="p"·data-group-id="8983104041-3">[</span><span·class="s">&quot;&lt;div·align=\&quot;center\&quot;&gt;&lt;h1&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="8983104041-4">(</span><span·class="nf">s[·...·truncated·by·diffoscope;·len:·425,·SHA:·7ea06eb2d564eb21c01d0c452cdc89431c0cda957f14494dea4b8700829779d2·...·]1-3">]</span><span·class="p">;</span></code></pre><hr·class="thin"/><hr·class="thin"/><h4>Example·3·Simple·xsl·stylesheet</h4><p>A·complete·example·with·the·XSLT·sheet·in·the·xmerl·distribution.</p><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">stylesheet</span><span·class="w">·</span><span·class="ss">version</span><span·class="o">=</span><span·class="s">&quot;1.0&quot;</span><span·class="w">
145 ········</span><span·class="nc">xmlns</span><span·class="p">:</span><span·class="ss">xsl</span><span·class="o">=</span><span·class="s">&quot;http://www.w3.org/1999/XSL/Transform&quot;</span><span·class="w">145 ········</span><span·class="nc">xmlns</span><span·class="p">:</span><span·class="ss">xsl</span><span·class="o">=</span><span·class="s">&quot;http://www.w3.org/1999/XSL/Transform&quot;</span><span·class="w">
146 ········</span><span·class="ss">xmlns</span><span·class="o">=</span><span·class="s">&quot;http://www.w3.org/TR/xhtml1/strict&quot;</span><span·class="o">&gt;</span><span·class="w">146 ········</span><span·class="ss">xmlns</span><span·class="o">=</span><span·class="s">&quot;http://www.w3.org/TR/xhtml1/strict&quot;</span><span·class="o">&gt;</span><span·class="w">
  
147 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">strip</span><span·class="o">-</span><span·class="ss">space</span><span·class="w">·</span><span·class="ss">elements</span><span·class="o">=</span><span·class="s">&quot;doc·chapter·section&quot;</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">147 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">strip</span><span·class="o">-</span><span·class="ss">space</span><span·class="w">·</span><span·class="ss">elements</span><span·class="o">=</span><span·class="s">&quot;doc·chapter·section&quot;</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">
148 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">output</span><span·class="w">148 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">output</span><span·class="w">
149 ····</span><span·class="ss">method</span><span·class="o">=</span><span·class="s">&quot;xml&quot;</span><span·class="w">149 ····</span><span·class="ss">method</span><span·class="o">=</span><span·class="s">&quot;xml&quot;</span><span·class="w">
150 ····</span><span·class="ss">indent</span><span·class="o">=</span><span·class="s">&quot;yes&quot;</span><span·class="w">150 ····</span><span·class="ss">indent</span><span·class="o">=</span><span·class="s">&quot;yes&quot;</span><span·class="w">
Offset 198, 68 lines modifiedOffset 198, 68 lines modified
  
198 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;emph&quot;</span><span·class="o">&gt;</span><span·class="w">198 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;emph&quot;</span><span·class="o">&gt;</span><span·class="w">
199 ····</span><span·class="o">&lt;</span><span·class="ss">em</span><span·class="o">&gt;</span><span·class="w">199 ····</span><span·class="o">&lt;</span><span·class="ss">em</span><span·class="o">&gt;</span><span·class="w">
200 ······</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="nb">apply</span><span·class="o">-</span><span·class="ss">templates</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">200 ······</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="nb">apply</span><span·class="o">-</span><span·class="ss">templates</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">
201 ····</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">em</span><span·class="o">&gt;</span><span·class="w">201 ····</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">em</span><span·class="o">&gt;</span><span·class="w">
202 ··</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span><span·class="w">202 ··</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span><span·class="w">
  
203 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">stylesheet</span><span·class="o">&gt;</span></code></pre><hr·class="thin"/><hr·class="thin"/><h4>Example·4·Erlang·version</h4><p>Erlang·transformation·of·previous·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="5416009983-1">(</span><span·class="s">&quot;xmerl.hrl&quot;</span><span·class="p"·data-group-id="5416009983-1">)</span><span·class="p">.</span><span·class="w">203 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">stylesheet</span><span·class="o">&gt;</span></code></pre><hr·class="thin"/><hr·class="thin"/><h4>Example·4·Erlang·version</h4><p>Erlang·transformation·of·previous·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="p">-</span><span·class="na">include</span><span·class="p"·data-group-id="9049045223-1">(</span><span·class="s">&quot;xmerl.hrl&quot;</span><span·class="p"·data-group-id="9049045223-1">)</span><span·class="p">.</span><span·class="w">
204 </span><span·class="w">204 </span><span·class="w">
205 </span><span·class="p">-</span><span·class="na">import</span><span·class="p"·data-group-id="5416009983-2">(</span><span·class="ss">xmerl_xs</span><span·class="p">,</span><span·class="w">205 </span><span·class="p">-</span><span·class="na">import</span><span·class="p"·data-group-id="9049045223-2">(</span><span·class="ss">xmerl_xs</span><span·class="p">,</span><span·class="w">
206 ····</span><span·class="p"·data-group-id="5416009983-3">[</span><span·class="w">·</span><span·class="ss">xslapply</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">value_of</span><span·class="p">/</span><span·class="mi">1</span>[·...·truncated·by·diffoscope;·len:·379,·SHA:·3559514b57b64e7f69ee6f0648007ae5e97163c9dafc0107afa50b4638191c46·...·]3-2">)</span><span·class="p">.</span><span·class="w">206 ····</span><span·class="p"·data-group-id="9049045223-3">[</span><span·class="w">·</span><span·class="ss">xslapply</span><span·class="p">/</span><span·class="mi">2</span><span·class="p">,</span><span·class="w">·</span><span·class="ss">value_of</span><span·class="p">/</span><span·class="mi">1</span>[·...·truncated·by·diffoscope;·len:·379,·SHA:·4dd4a5bddcd56a1a8bb2184a199826a3467cf60a14f54742b5ac9b9f5d342697·...·]3-2">)</span><span·class="p">.</span><span·class="w">
  
207 </span><span·class="nf">doctype</span><span·class="p"·data-group-id="5416009983-4">(</span><span·class="p"·data-group-id="5416009983-4">)</span><span·class="p">-&gt;</span><span·class="w">207 </span><span·class="nf">doctype</span><span·class="p"·data-group-id="9049045223-4">(</span><span·class="p"·data-group-id="9049045223-4">)</span><span·class="p">-&gt;</span><span·class="w">
208 ····</span><span·class="s">&quot;&lt;!DOCTYPE·html·PUBLIC·\&quot;-//W3C//DTD·XHTML·1.0·Transitional//EN\&quot;\208 ····</span><span·class="s">&quot;&lt;!DOCTYPE·html·PUBLIC·\&quot;-//W3C//DTD·XHTML·1.0·Transitional//EN\&quot;\
209 ·\&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd·\&quot;&gt;&quot;</span><span·class="p">.</span><span·class="w">209 ·\&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd·\&quot;&gt;&quot;</span><span·class="p">.</span><span·class="w">
  
210 </span><span·class="nf">process_xml</span><span·class="p"·data-group-id="5416009983-5">(</span><span·class="n">Doc</span><span·class="p"·data-group-id="5416009983-5">)</span><span·class="p">-&gt;</span><span·class="w">210 </span><span·class="nf">process_xml</span><span·class="p"·data-group-id="9049045223-5">(</span><span·class="n">Doc</span><span·class="p"·data-group-id="9049045223-5">)</span><span·class="p">-&gt;</span><span·class="w">
211 ····</span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-6">(</span><span·class="n">Doc</span><span·class="p"·data-group-id="5416009983-6">)</span><span·class="p">.</span><span·class="w">211 ····</span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-6">(</span><span·class="n">Doc</span><span·class="p"·data-group-id="9049045223-6">)</span><span·class="p">.</span><span·class="w">
  
212 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-7">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-8">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·155,·SHA:·43e0f173342bfa8fd8e36d4536cfb587cab743180af53da5ff57829948544fd0·...·]3-7">)</span><span·class="p">-&gt;</span><span·class="w">212 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-7">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-8">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·155,·SHA:·710468d5c6e54b7f8a95a2c07eb050409694f6e33d16421c2329e0d9a942e53a·...·]3-7">)</span><span·class="p">-&gt;</span><span·class="w">
213 ····</span><span·class="p"·data-group-id="5416009983-9">[</span><span·class="w">·</span><span·class="s">&quot;&lt;\?xml·version=\&quot;1.0\&quot;·encoding=\&quot;iso-8859-1\&quot;\?&gt;&quot;</span><span·class="p">,</span><span·class="w">213 ····</span><span·class="p"·data-group-id="9049045223-9">[</span><span·class="w">·</span><span·class="s">&quot;&lt;\?xml·version=\&quot;1.0\&quot;·encoding=\&quot;iso-8859-1\&quot;\?&gt;&quot;</span><span·class="p">,</span><span·class="w">
214 ······</span><span·class="nf">doctype</span><span·class="p"·data-group-id="5416009983-10">(</span><span·class="p"·data-group-id="5416009983-10">)</span><span·class="p">,</span><span·class="w">214 ······</span><span·class="nf">doctype</span><span·class="p"·data-group-id="9049045223-10">(</span><span·class="p"·data-group-id="9049045223-10">)</span><span·class="p">,</span><span·class="w">
215 ······</span><span·class="s">&quot;&lt;html·xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;·&gt;&quot;</span><span·class="w">215 ······</span><span·class="s">&quot;&lt;html·xmlns=\&quot;http://www.w3.org/1999/xhtml\&quot;·&gt;&quot;</span><span·class="w">
216 ······</span><span·class="s">&quot;&lt;head&gt;&quot;</span><span·class="w">216 ······</span><span·class="s">&quot;&lt;head&gt;&quot;</span><span·class="w">
217 ······</span><span·class="s">&quot;&lt;title&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="5416009983-11">(</span><span·class="nf">select</span><span·class="p"·data-group-id="5416009983-12">(</span><span·class="s">&quot;title&quot;</span><span·class="p">,</span><span·class="n">E</span><span·class="p"·data-group-id="5416009983-12">)</span><span·c[·...·truncated·by·diffoscope;·len:·33,·SHA:·98c23c9a627fffc7b750a52f8df3b8498168445020443c93e9cd8db49e8ac6f1·...·]3-11">)</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&lt;/title&gt;&quot;</span><span·class="w">217 ······</span><span·class="s">&quot;&lt;title&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="9049045223-11">(</span><span·class="nf">select</span><span·class="p"·data-group-id="9049045223-12">(</span><span·class="s">&quot;title&quot;</span><span·class="p">,</span><span·class="n">E</span><span·class="p"·data-group-id="9049045223-12">)</span><span·c[·...·truncated·by·diffoscope;·len:·33,·SHA:·65b926d37258dde1a6bd84dfb4279528cf4051a2ff2039ee9f5e14a91424835a·...·]3-11">)</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&lt;/title&gt;&quot;</span><span·class="w">
218 ······</span><span·class="s">&quot;&lt;/head&gt;&quot;</span><span·class="w">218 ······</span><span·class="s">&quot;&lt;/head&gt;&quot;</span><span·class="w">
219 ······</span><span·class="s">&quot;&lt;body&gt;&quot;</span><span·class="p">,</span><span·class="w">219 ······</span><span·class="s">&quot;&lt;body&gt;&quot;</span><span·class="p">,</span><span·class="w">
220 ······</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-13">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·eb2dfa823e36ea80ebea7b0cccc4086fbb09186ffc89ccbce0c7577443cd4293·...·]3-13">)</span><span·class="p">,</span><span·class="w">220 ······</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-13">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·f2dcfeb2fc568c64eb695e430d290d981e34bb1503797a6716c878407993d0cd·...·]3-13">)</span><span·class="p">,</span><span·class="w">
221 ······</span><span·class="s">&quot;&lt;/body&gt;&quot;</span><span·class="w">221 ······</span><span·class="s">&quot;&lt;/body&gt;&quot;</span><span·class="w">
222 ······</span><span·class="s">&quot;&lt;/html&gt;&quot;</span><span·class="w">·</span><span·class="p"·data-group-id="5416009983-9">]</span><span·class="p">;</span><span·class="w">222 ······</span><span·class="s">&quot;&lt;/html&gt;&quot;</span><span·class="w">·</span><span·class="p"·data-group-id="9049045223-9">]</span><span·class="p">;</span><span·class="w">
  
  
223 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-14">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-15">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·636,·SHA:·14c6b775fa74bff646c953609be1958615804319d898f67717303ebc0f928725·...·]3-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">223 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-14">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-15">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·636,·SHA:·022e3c8de05b55ee6f8f34ee3d9cbab9490c3196ab2f90f68afdee640a440951·...·]3-14">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
224 ····</span><span·class="p"·data-group-id="5416009983-18">[</span><span·class="s">&quot;&lt;h1&gt;&quot;</span><span·class="p">,</span><span·class="w">224 ····</span><span·class="p"·data-group-id="9049045223-18">[</span><span·class="s">&quot;&lt;h1&gt;&quot;</span><span·class="p">,</span><span·class="w">
225 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-19">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·eb2dfa823e36ea80ebea7b0cccc4086fbb09186ffc89ccbce0c7577443cd4293·...·]3-19">)</span><span·class="p">,</span><span·class="w">225 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-19">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·f2dcfeb2fc568c64eb695e430d290d981e34bb1503797a6716c878407993d0cd·...·]3-19">)</span><span·class="p">,</span><span·class="w">
226 ·····</span><span·class="s">&quot;&lt;/h1&gt;&quot;</span><span·class="p"·data-group-id="5416009983-18">]</span><span·class="p">;</span><span·class="w">226 ·····</span><span·class="s">&quot;&lt;/h1&gt;&quot;</span><span·class="p"·data-group-id="9049045223-18">]</span><span·class="p">;</span><span·class="w">
  
227 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-20">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-21">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·640,·SHA:·f8e466607af08d43c96a994c87f5773597ef99fc371afea8133c32c618f3bc45·...·]3-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">227 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-20">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-21">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·640,·SHA:·4ae07c250b3779c85fd8f49e0492bf2a244c98a2b260498ff082294f35c2abf8·...·]3-20">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
228 ····</span><span·class="p"·data-group-id="5416009983-24">[</span><span·class="s">&quot;&lt;h2&gt;&quot;</span><span·class="p">,</span><span·class="w">228 ····</span><span·class="p"·data-group-id="9049045223-24">[</span><span·class="s">&quot;&lt;h2&gt;&quot;</span><span·class="p">,</span><span·class="w">
229 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-25">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·eb2dfa823e36ea80ebea7b0cccc4086fbb09186ffc89ccbce0c7577443cd4293·...·]3-25">)</span><span·class="p">,</span><span·class="w">229 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-25">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·f2dcfeb2fc568c64eb695e430d290d981e34bb1503797a6716c878407993d0cd·...·]3-25">)</span><span·class="p">,</span><span·class="w">
230 ·····</span><span·class="s">&quot;&lt;/h2&gt;&quot;</span><span·class="p"·data-group-id="5416009983-24">]</span><span·class="p">;</span><span·class="w">230 ·····</span><span·class="s">&quot;&lt;/h2&gt;&quot;</span><span·class="p"·data-group-id="9049045223-24">]</span><span·class="p">;</span><span·class="w">
  
231 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-26">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-27">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·640,·SHA:·26c3a6739c31c3392b7bc61b77a56440b9bb38c8c8eb72d3981377473b26abba·...·]3-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">231 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-26">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-27">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·640,·SHA:·3c80dfe52c5bc4cd8e622ac1e687ec97692900441aaa7a0e791ab410e2fbac5f·...·]3-26">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
232 ····</span><span·class="p"·data-group-id="5416009983-30">[</span><span·class="s">&quot;&lt;h3&gt;&quot;</span><span·class="p">,</span><span·class="w">232 ····</span><span·class="p"·data-group-id="9049045223-30">[</span><span·class="s">&quot;&lt;h3&gt;&quot;</span><span·class="p">,</span><span·class="w">
233 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-31">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·eb2dfa823e36ea80ebea7b0cccc4086fbb09186ffc89ccbce0c7577443cd4293·...·]3-31">)</span><span·class="p">,</span><span·class="w">233 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-31">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·f2dcfeb2fc568c64eb695e430d290d981e34bb1503797a6716c878407993d0cd·...·]3-31">)</span><span·class="p">,</span><span·class="w">
234 ·····</span><span·class="s">&quot;&lt;/h3&gt;&quot;</span><span·class="p"·data-group-id="5416009983-30">]</span><span·class="p">;</span><span·class="w">234 ·····</span><span·class="s">&quot;&lt;/h3&gt;&quot;</span><span·class="p"·data-group-id="9049045223-30">]</span><span·class="p">;</span><span·class="w">
  
235 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-32">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-33">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·183,·SHA:·29c0f5981ebd60e5cdce605df241777d75187c1d1312837f7e65a5f6d64295f6·...·]3-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">235 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-32">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-33">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·183,·SHA:·c0a1ae9c6f80891acdef7399cdbefbdf7c8bd8af583788603a167d67d1b4bda7·...·]3-32">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
236 ····</span><span·class="p"·data-group-id="5416009983-34">[</span><span·class="s">&quot;&lt;p&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-35">(</span><span·class="w">·</span><span·class="k">fun</span><span[·...·truncated·by·diffoscope;·len:·359,·SHA:·e4f13785cef183fa3cb80edeafaac7763021afab5913b99d77bae3cecabda7f5·...·]3-34">]</span><span·class="p">;</span><span·class="w">236 ····</span><span·class="p"·data-group-id="9049045223-34">[</span><span·class="s">&quot;&lt;p&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-35">(</span><span·class="w">·</span><span·class="k">fun</span><span[·...·truncated·by·diffoscope;·len:·359,·SHA:·8187dce3c079ed58d13228234691d4db124f51badb5665de390bc70b3c7f7d6b·...·]3-34">]</span><span·class="p">;</span><span·class="w">
  
237 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-36">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-37">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·183,·SHA:·8be5e415ef595e630ef74e393b0c154ff4f4ea4310883f11ba44b56eadcc87a6·...·]3-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">237 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-36">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-37">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·183,·SHA:·705f141a4983f21cafc61c87d21eb41616401464c3502859b0a28c47b26337c7·...·]3-36">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
238 ····</span><span·class="p"·data-group-id="5416009983-38">[</span><span·class="s">&quot;&lt;p·class=\&quot;note\&quot;&gt;&quot;</span><span·class="w">238 ····</span><span·class="p"·data-group-id="9049045223-38">[</span><span·class="s">&quot;&lt;p·class=\&quot;note\&quot;&gt;&quot;</span><span·class="w">
239 ·····</span><span·class="s">&quot;&lt;b&gt;NOTE:·&lt;/b&gt;&quot;</span><span·class="p">,</span><span·class="w">239 ·····</span><span·class="s">&quot;&lt;b&gt;NOTE:·&lt;/b&gt;&quot;</span><span·class="p">,</span><span·class="w">
240 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-39">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·eb2dfa823e36ea80ebea7b0cccc4086fbb09186ffc89ccbce0c7577443cd4293·...·]3-39">)</span><span·class="p">,</span><span·class="w">240 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-39">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·f2dcfeb2fc568c64eb695e430d290d981e34bb1503797a6716c878407993d0cd·...·]3-39">)</span><span·class="p">,</span><span·class="w">
241 ·····</span><span·class="s">&quot;&lt;/p&gt;&quot;</span><span·class="p"·data-group-id="5416009983-38">]</span><span·class="p">;</span><span·class="w">241 ·····</span><span·class="s">&quot;&lt;/p&gt;&quot;</span><span·class="p"·data-group-id="9049045223-38">]</span><span·class="p">;</span><span·class="w">
  
242 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-40">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="5416009983-41">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·183,·SHA:·8e25f3d46cdcf2978e41e8bbc245dc22239ed33728faf13ab11b9b28d1e300e5·...·]3-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">242 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-40">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="9049045223-41">{</span><span·class="w">·</span><[·...·truncated·by·diffoscope;·len:·183,·SHA:·a641544eb9cf066e08eb8a1ead137e3a947cf797abc47aec507ff3fbc5a1280a·...·]3-40">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
243 ····</span><span·class="p"·data-group-id="5416009983-42">[</span><span·class="s">&quot;&lt;em&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="5416009983-43">(</span><span·class="w">·</span><span·class="k">fun</span><spa[·...·truncated·by·diffoscope;·len:·361,·SHA:·183918f96444bd66ffde7928edf7f47975a4a01a9447e0f481fd38d77301f4f2·...·]3-42">]</span><span·class="p">;</span><span·class="w">243 ····</span><span·class="p"·data-group-id="9049045223-42">[</span><span·class="s">&quot;&lt;em&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="9049045223-43">(</span><span·class="w">·</span><span·class="k">fun</span><spa[·...·truncated·by·diffoscope;·len:·361,·SHA:·77ae63a321eeac13e47600c03744d803d8d563f7d962cbd8ac701639a4fa4d6c·...·]3-42">]</span><span·class="p">;</span><span·class="w">
  
244 </span><span·class="nf">template</span><span·class="p"·data-group-id="5416009983-44">(</span><span·class="n">E</span><span·class="p"·data-group-id="5416009983-44">)</span><span·class="p">-&gt;</span><span·class="w">244 </span><span·class="nf">template</span><span·class="p"·data-group-id="9049045223-44">(</span><span·class="n">E</span><span·class="p"·data-group-id="9049045223-44">)</span><span·class="p">-&gt;</span><span·class="w">
245 ····</span><span·class="nf">built_in_rules</span><span·class="p"·data-group-id="5416009983-45">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·eb2dfa823e36ea80ebea7b0cccc4086fbb09186ffc89ccbce0c7577443cd4293·...·]3-45">)</span><span·class="p">.</span></code></pre><p>It·is·important·to·end·with·a·call·to·<a·href="xmerl_xs.html#built_in_rules/2"><code·class="inline">xmerl_xs:built_in_rules/2</code></a>·if·you·want·any245 ····</span><span·class="nf">built_in_rules</span><span·class="p"·data-group-id="9049045223-45">(</span><span·class="w">·</span><span·class="k">fun</span><span·class="w">·</span><span·class="ss">template</span><span·class="p">/</span><span·class="mi">1</span><span·class="p">,</span><span·class="w">·</span><span·class="n">E</span><span·[·...·truncated·by·diffoscope;·len:·34,·SHA:·f2dcfeb2fc568c64eb695e430d290d981e34bb1503797a6716c878407993d0cd·...·]3-45">)</span><span·class="p">.</span></code></pre><p>It·is·important·to·end·with·a·call·to·<a·href="xmerl_xs.html#built_in_rules/2"><code·class="inline">xmerl_xs:built_in_rules/2</code></a>·if·you·want·any
246 text·to·be·written·in·&quot;push&quot;·transforms.·That·are·the·ones·using·a·lot·<code·class="inline">xslapply(·fun·template/1,·E·)</code>·instead·of·<code·class="inline">value_of(select(&quot;xpath&quot;,E))</code>,·which·is·pull...</p><hr·class="thin"/><p>The·largest·example·is·the·stylesheet·to·transform·this·document·from·the246 text·to·be·written·in·&quot;push&quot;·transforms.·That·are·the·ones·using·a·lot·<code·class="inline">xslapply(·fun·template/1,·E·)</code>·instead·of·<code·class="inline">value_of(select(&quot;xpath&quot;,E))</code>,·which·is·pull...</p><hr·class="thin"/><p>The·largest·example·is·the·stylesheet·to·transform·this·document·from·the
247 Simplified·Docbook·XML·format·to·xhtml.·The·source·file·is·sdocbook2xhtml.erl.</p><h3·id="tips-and-tricks"·class="section-heading">247 Simplified·Docbook·XML·format·to·xhtml.·The·source·file·is·sdocbook2xhtml.erl.</p><h3·id="tips-and-tricks"·class="section-heading">
248 ··<a·href="#tips-and-tricks"·class="hover-link">248 ··<a·href="#tips-and-tricks"·class="hover-link">
249 ····<i·class="ri-link-m"·aria-hidden="true"></i>249 ····<i·class="ri-link-m"·aria-hidden="true"></i>
250 ··</a>250 ··</a>
251 ··<span·class="text">Tips·and·tricks</span>251 ··<span·class="text">Tips·and·tricks</span>
252 </h3>252 </h3>
Offset 270, 29 lines modifiedOffset 270, 29 lines modified
270 position·in·Erlang.</p><hr·class="thin"/><h4>Example·5·Counting·positions</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;stanza&quot;</span><span·class="o">&gt;</span><span·class="w">270 position·in·Erlang.</p><hr·class="thin"/><h4>Example·5·Counting·positions</h4><pre><code·class="makeup·erlang"·translate="no"><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;stanza&quot;</span><span·class="o">&gt;</span><span·class="w">
271 ··</span><span·class="o">&lt;</span><span·class="ss">p</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="nb">apply</span><span·class="o">-</span><span·class="ss">templates</span><span·class="w">·</span><span·class="ss">select</span><span·class="o">=</span><span·class="s">&quot;line&quot;</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">p</span><span·class="o">&gt;</span><span·class="w">271 ··</span><span·class="o">&lt;</span><span·class="ss">p</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="nb">apply</span><span·class="o">-</span><span·class="ss">templates</span><span·class="w">·</span><span·class="ss">select</span><span·class="o">=</span><span·class="s">&quot;line&quot;</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="ss">p</span><span·class="o">&gt;</span><span·class="w">
272 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span><span·class="w">272 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span><span·class="w">
  
273 </span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;line&quot;</span><span·class="o">&gt;</span><span·class="w">273 </span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="w">·</span><span·class="ss">match</span><span·class="o">=</span><span·class="s">&quot;line&quot;</span><span·class="o">&gt;</span><span·class="w">
274 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="k">if</span><span·class="w">·</span><span·class="ss">test</span><span·class="o">=</span><span·class="s">&quot;position()·mod·2·=·0&quot;</span><span·class="o">&gt;</span><span·class="err">&amp;</span><span·class="p">#</span><span·class="mi">160</span><span·class="p">;</span><span·class="err">&amp;</span><span·class="p">#</span><span·class="mi">160</span><span·class="p">;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="k">if</span><span·class="o">&gt;</span><span·class="w">274 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="k">if</span><span·class="w">·</span><span·class="ss">test</span><span·class="o">=</span><span·class="s">&quot;position()·mod·2·=·0&quot;</span><span·class="o">&gt;</span><span·class="err">&amp;</span><span·class="p">#</span><span·class="mi">160</span><span·class="p">;</span><span·class="err">&amp;</span><span·class="p">#</span><span·class="mi">160</span><span·class="p">;</span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="k">if</span><span·class="o">&gt;</span><span·class="w">
275 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">value</span><span·class="o">-</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">select</span><span·class="o">=</span><span·class="s">&quot;.&quot;</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="ss">br</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">275 ··</span><span·class="o">&lt;</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">value</span><span·class="o">-</span><span·class="k">of</span><span·class="w">·</span><span·class="ss">select</span><span·class="o">=</span><span·class="s">&quot;.&quot;</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="o">&lt;</span><span·class="ss">br</span><span·class="w">·</span><span·class="o">/</span><span·class="o">&gt;</span><span·class="w">
276 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span></code></pre><p>Can·be·written·as</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="8849065841-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="8849065841-2">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·159,·SHA:·999fd5d82af0bdfabde47cc4c4044a75104cd5a9996ee4263619b111518485d6·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">276 </span><span·class="o">&lt;</span><span·class="o">/</span><span·class="nc">xsl</span><span·class="p">:</span><span·class="ss">template</span><span·class="o">&gt;</span></code></pre><p>Can·be·written·as</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="4769356298-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="4769356298-2">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·159,·SHA:·12a751f83e91465a2d28f8092c072372ab43131774b46ce4cb608afdeb0371fb·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
277 ····</span><span·class="p"·data-group-id="8849065841-3">{</span><span·class="n">Lines</span><span·class="p">,</span><span·class="n">LineNo</span><span·class="p"·data-group-id="8849065841-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span[·...·truncated·by·diffoscope;·len:·654,·SHA:·038c7f8ba019a37eed51a364514e560b552466e01c4f789f6d4325a22e82af43·...·]-4">)</span><span·class="p">,</span><span·class="w">277 ····</span><span·class="p"·data-group-id="4769356298-3">{</span><span·class="n">Lines</span><span·class="p">,</span><span·class="n">LineNo</span><span·class="p"·data-group-id="4769356298-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">lists</span[·...·truncated·by·diffoscope;·len:·654,·SHA:·3c54984b7293e8063deb330e2122ea059128ce3301404d8d8f4a6de7d7202415·...·]-4">)</span><span·class="p">,</span><span·class="w">
278 ····</span><span·class="p"·data-group-id="8849065841-6">[</span><span·class="s">&quot;&lt;p&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Lines</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&lt;/p&gt;&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·467527da97bfe39236a16931eb83d1785c0048b99acf7d8f098dd6dec62b02b8·...·]-6">]</span><span·class="p">.</span><span·class="w">278 ····</span><span·class="p"·data-group-id="4769356298-6">[</span><span·class="s">&quot;&lt;p&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="n">Lines</span><span·class="p">,</span><span·class="w">·</span><span·class="s">&quot;&lt;/p&gt;&quot;</span><span·class="p"·data-[·...·truncated·by·diffoscope;·len:·20,·SHA:·d9cada1cb2cc7801e619973145a1d3da2e8349c4a6175a2323f401cd07ba58b6·...·]-6">]</span><span·class="p">.</span><span·class="w">
  
279 </span><span·class="nf">template_pos</span><span·class="p"·data-group-id="8849065841-7">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="8849065841-8">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·229,·SHA:·795910a4d32198708d510a79da21c1abac79a3feb4c96d7928dd8ac818750601·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">279 </span><span·class="nf">template_pos</span><span·class="p"·data-group-id="4769356298-7">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="4769356298-8">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·229,·SHA:·15c226246fdafbae882e5b82854837db2eb9e803b101b203ac940e40a3a74499·...·]-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
280 ····</span><span·class="p"·data-group-id="8849065841-9">{</span><span·class="p"·data-group-id="8849065841-10">[</span><span·class="nf">indent_line</span><span·class="p"·data-group-id="8849065841-11">(</span><span·class="n">P</span><span·class="w">·</span><span·class="ow">rem</span><span·class="w">[·...·truncated·by·diffoscope;·len:·795,·SHA:·2947515e327fefed7c13377a55aad12220a700b847cab4b53c4d5b88000e8215·...·]-9">}</span><span·class="p">.</span><span·class="w">280 ····</span><span·class="p"·data-group-id="4769356298-9">{</span><span·class="p"·data-group-id="4769356298-10">[</span><span·class="nf">indent_line</span><span·class="p"·data-group-id="4769356298-11">(</span><span·class="n">P</span><span·class="w">·</span><span·class="ow">rem</span><span·class="w">[·...·truncated·by·diffoscope;·len:·795,·SHA:·4add9c95ef1b4f86c83e71968165f5aeba2bef54069bc33cba73ee9ce5c81374·...·]-9">}</span><span·class="p">.</span><span·class="w">
  
281 </span><span·class="nf">indent_line</span><span·class="p"·data-group-id="8849065841-13">(</span><span·class="mi">0</span><span·class="p"·data-group-id="8849065841-13">)</span><span·class="p">-&gt;</span><span·class="s">&quot;&amp;#160;&amp;#160;&quot;</span><span·class="p">;</span><span·class="w">281 </span><span·class="nf">indent_line</span><span·class="p"·data-group-id="4769356298-13">(</span><span·class="mi">0</span><span·class="p"·data-group-id="4769356298-13">)</span><span·class="p">-&gt;</span><span·class="s">&quot;&amp;#160;&amp;#160;&quot;</span><span·class="p">;</span><span·class="w">
282 </span><span·class="nf">indent_line</span><span·class="p"·data-group-id="8849065841-14">(</span><span·class="p">_</span><span·class="p"·data-group-id="8849065841-14">)</span><span·class="p">-&gt;</span><span·class="s">&quot;&quot;</span><span·class="p">.</span></code></pre><hr·class="thin"/><h4>Global·tree·awareness</h4><p>In·XSLT·you·have·&quot;root&quot;·access·to·the·top·of·the·tree·with·XPath,·even·though282 </span><span·class="nf">indent_line</span><span·class="p"·data-group-id="4769356298-14">(</span><span·class="p">_</span><span·class="p"·data-group-id="4769356298-14">)</span><span·class="p">-&gt;</span><span·class="s">&quot;&quot;</span><span·class="p">.</span></code></pre><hr·class="thin"/><h4>Global·tree·awareness</h4><p>In·XSLT·you·have·&quot;root&quot;·access·to·the·top·of·the·tree·with·XPath,·even·though
283 you·are·somewhere·deep·in·your·tree.</p><p>The·xslapply/2·function·only·carries·back·the·child·part·of·the·tree·to·the283 you·are·somewhere·deep·in·your·tree.</p><p>The·xslapply/2·function·only·carries·back·the·child·part·of·the·tree·to·the
284 template·fun.·But·it·is·quite·easy·to·write·template·funs·that·handles·both·the284 template·fun.·But·it·is·quite·easy·to·write·template·funs·that·handles·both·the
285 child·and·top·tree.</p><hr·class="thin"/><h4>Example·6·Passing·the·root·tree</h4><p>The·following·example·piece·will·prepend·the·article·title·to·any·section·title</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="3998568289-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="3998568289-2">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·257,·SHA:·455313cc966dded32dd6016c95a819b47a8800b80d3821da82abcbcb5198727b·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">285 child·and·top·tree.</p><hr·class="thin"/><h4>Example·6·Passing·the·root·tree</h4><p>The·following·example·piece·will·prepend·the·article·title·to·any·section·title</p><pre><code·class="makeup·erlang"·translate="no"><span·class="nf">template</span><span·class="p"·data-group-id="0798962752-1">(</span><span·class="n">E</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="o">#</span><span·class="ss">xmlElement</span><span·class="p"·data-group-id="0798962752-2">{</span><span·class="ss">name</span[·...·truncated·by·diffoscope;·len:·257,·SHA:·65cc5343117201f92e4d52536d8b196bb899dd51af40f3f1432d78fb034e2144·...·]-1">)</span><span·class="w">·</span><span·class="p">-&gt;</span><span·class="w">
286 ····</span><span·class="p"·data-group-id="3998568289-3">[</span><span·class="s">&quot;&lt;h3&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="3998568289-4">(</span><span·class="nf">select</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·236,·SHA:·d247876142fffdf832c4cad68557687cd6bad0045f4b1aab08a0a918d07f1e41·...·]-4">)</span><span·class="p">,</span><span·class="s">&quot;·-·&quot;</span><span·class="p">,</span><span·class="w">286 ····</span><span·class="p"·data-group-id="0798962752-3">[</span><span·class="s">&quot;&lt;h3&gt;&quot;</span><span·class="p">,</span><span·class="w">·</span><span·class="nf">value_of</span><span·class="p"·data-group-id="0798962752-4">(</span><span·class="nf">select</span><span·class="p"·data-group[·...·truncated·by·diffoscope;·len:·236,·SHA:·4bb410fa528fa6adecea34efbec8e2e5d8a648a8cbc669767d6b89a976ed32fa·...·]-4">)</span><span·class="p">,</span><span·class="s">&quot;·-·&quot;</span><span·class="p">,</span><span·class="w">
287 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="3998568289-6">(</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="3998568289-7">(</span><span·class="n">A</span><span·class="p"·data-group-id="3998568289-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·423,·SHA:·d542d37af6b450773bd7fc09c239c65b3e39f7a7fc34f88ce77625b27b2f39fc·...·]-6">)</span><span·class="p">,</span><span·class="w">287 ·····</span><span·class="nf">xslapply</span><span·class="p"·data-group-id="0798962752-6">(</span><span·class="w">·</span><span·class="nf">fun</span><span·class="p"·data-group-id="0798962752-7">(</span><span·class="n">A</span><span·class="p"·data-group-id="0798962752-7">)</span><span·class="w">·</span><span·class="p">-&gt;</span><[·...·truncated·by·diffoscope;·len:·423,·SHA:·5f975e52ca58a5189abd85dcd5be89a272763db2a2c42eb0f3bc3926e46074b1·...·]-6">)</span><span·class="p">,</span><span·class="w">
288 ·····</span><span·class="s">&quot;&lt;/h3&gt;&quot;</span><span·class="p"·data-group-id="3998568289-3">]</span><span·class="p">;</span></code></pre><hr·class="thin"/>288 ·····</span><span·class="s">&quot;&lt;/h3&gt;&quot;</span><span·class="p"·data-group-id="0798962752-3">]</span><span·class="p">;</span></code></pre><hr·class="thin"/>
289 </div>289 </div>
  
290 <div·class="bottom-actions"·id="bottom-actions">290 <div·class="bottom-actions"·id="bottom-actions">
291 ··<div·class="bottom-actions-item">291 ··<div·class="bottom-actions-item">
  
292 ······<a·href="xmerl_examples.html"·class="bottom-actions-button"·rel="prev">292 ······<a·href="xmerl_examples.html"·class="bottom-actions-button"·rel="prev">
293 ········<span·class="subheader">293 ········<span·class="subheader">
4.87 KB
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/xmerl_xsd.html
    
Offset 802, 17 lines modifiedOffset 802, 17 lines modified
802 parsed·XML·<a·href="xmerl.html#t:xmlElement/0"><code·class="inline">Element :: #xmlElement{}</code></a>802 parsed·XML·<a·href="xmerl.html#t:xmlElement/0"><code·class="inline">Element :: #xmlElement{}</code></a>
803 and·a·State,·<a·href="#t:global_state/0"><code·class="inline">global_state/0</code></a>,·which·holds·necessary·information803 and·a·State,·<a·href="#t:global_state/0"><code·class="inline">global_state/0</code></a>,·which·holds·necessary·information
804 from·an·already·processed·schema.··Thus·validate·enables·reuse804 from·an·already·processed·schema.··Thus·validate·enables·reuse
805 of·the·schema·information·and·therefore·if·one·shall·validate805 of·the·schema·information·and·therefore·if·one·shall·validate
806 several·times·towards·the·same·schema·it·reduces·time·consumption.</p><p>The·result,·<code·class="inline">ValidElement</code>,·is·the·valid·element·that·conforms·to·the806 several·times·towards·the·same·schema·it·reduces·time·consumption.</p><p>The·result,·<code·class="inline">ValidElement</code>,·is·the·valid·element·that·conforms·to·the
807 post-schema-validation·infoset.·When·the·validator·finds·an·error·it·tries·to807 post-schema-validation·infoset.·When·the·validator·finds·an·error·it·tries·to
808 continue·and·reports·a·list·of·all·errors·found.·In·those·cases·an·unexpected808 continue·and·reports·a·list·of·all·errors·found.·In·those·cases·an·unexpected
809 error·is·found·it·may·cause·a·single·error·reason.</p><p>Usage·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7312552757-1">{</span><span·class="n">E</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7312552757-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><spa[·...·truncated·by·diffoscope;·len:·196,·SHA:·a8c3b0ad479ea12e66c07c65842f5c498694dc3a03003d5830c7c6c14dcaaf78·...·]-2">)</span><span·class="p">.</span><span·class="w">809 error·is·found·it·may·cause·a·single·error·reason.</p><p>Usage·example:</p><pre><code·class="makeup·erlang"·translate="no"><span·class="mi">1</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7849935626-1">{</span><span·class="n">E</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7849935626-1">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_scan</span><spa[·...·truncated·by·diffoscope;·len:·196,·SHA:·623446d896a355b3d8b0dd738f6f1baec8e4d83f21e064d69494ff4d3007d29f·...·]-2">)</span><span·class="p">.</span><span·class="w">
810 </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7312552757-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">S</span><span·class="p"·data-group-id="7312552757-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_xsd</span><sp[·...·truncated·by·diffoscope;·len:·205,·SHA:·b5104de8109ee71139deadfb6f9ba2ac8dfba83e5595432753dbec701884635f·...·]-4">)</span><span·class="p">.</span><span·class="w">810 </span><span·class="mi">2</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7849935626-3">{</span><span·class="ss">ok</span><span·class="p">,</span><span·class="n">S</span><span·class="p"·data-group-id="7849935626-3">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_xsd</span><sp[·...·truncated·by·diffoscope;·len:·205,·SHA:·22ebeb98422a24f63319f4045ec26b56ffc70dbf6775368f349d5e062c3ce16c·...·]-4">)</span><span·class="p">.</span><span·class="w">
811 </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7312552757-5">{</span><span·class="n">E2</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7312552757-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_xsd</span><spa[·...·truncated·by·diffoscope;·len:·218,·SHA:·60872a5e6d67a13049c644e07b4451138d7be514cf736be2ae028197e9072870·...·]-6">)</span><span·class="p">.</span></code></pre><p>Observe·that·E2·may·differ·from·E·if·for·instance·there·are·default·values811 </span><span·class="mi">3</span><span·class="o">&gt;</span><span·class="p"·data-group-id="7849935626-5">{</span><span·class="n">E2</span><span·class="p">,</span><span·class="p">_</span><span·class="p"·data-group-id="7849935626-5">}</span><span·class="w">·</span><span·class="o">=</span><span·class="w">·</span><span·class="nc">xmerl_xsd</span><spa[·...·truncated·by·diffoscope;·len:·218,·SHA:·fca9ae931c34ccef0ba75e2c5fd918f6038942b7e90b1eb1617cdd8321db2593·...·]-6">)</span><span·class="p">.</span></code></pre><p>Observe·that·E2·may·differ·from·E·if·for·instance·there·are·default·values
812 defined·in·<code·class="inline">my_XML_Schema.xsd</code>.</p>812 defined·in·<code·class="inline">my_XML_Schema.xsd</code>.</p>
813 ··</section>813 ··</section>
814 </section>814 </section>
  
815 ····</div>815 ····</div>
816 ··</section>816 ··</section>
  
206 KB
./usr/share/doc/erlang-doc/html/doc/dist/search_data-6667DB87.js vs.
./usr/share/doc/erlang-doc/html/doc/dist/search_data-6DCAA4BB.js
Files 96% similar despite different names
206 KB
js-beautify {}
Max HTML report size reached
4.39 MB
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/search_data-BB699C42.js vs.
./usr/share/doc/erlang-doc/html/erts-15.0.1/doc/html/dist/search_data-D123FCA0.js
Files 99% similar despite different names
4.39 MB
js-beautify {}
Max HTML report size reached
169 KB
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/dist/search_data-614FD7B8.js vs.
./usr/share/doc/erlang-doc/html/lib/asn1-5.3/doc/html/dist/search_data-29151339.js
Files 98% similar despite different names
169 KB
js-beautify {}
Max HTML report size reached
145 KB
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/dist/search_data-009BAE67.js vs.
./usr/share/doc/erlang-doc/html/lib/dialyzer-5.2/doc/html/dist/search_data-1DB1C954.js
Files 98% similar despite different names
144 KB
js-beautify {}
Max HTML report size reached
203 KB
./usr/share/doc/erlang-doc/html/lib/edoc-1.3.1/doc/html/dist/search_data-EEF082FF.js vs.
./usr/share/doc/erlang-doc/html/lib/edoc-1.3.1/doc/html/dist/search_data-4C4A2C52.js
Files 98% similar despite different names
203 KB
js-beautify {}
Max HTML report size reached
235 KB
./usr/share/doc/erlang-doc/html/lib/erl_interface-5.5.2/doc/html/dist/search_data-73A3D537.js vs.
./usr/share/doc/erlang-doc/html/lib/erl_interface-5.5.2/doc/html/dist/search_data-E56B0CB2.js
Files 98% similar despite different names
234 KB
js-beautify {}
Max HTML report size reached
57.4 KB
./usr/share/doc/erlang-doc/html/lib/ftp-1.2.2/doc/html/dist/search_data-F6750343.js vs.
./usr/share/doc/erlang-doc/html/lib/ftp-1.2.2/doc/html/dist/search_data-73EEAED9.js
Files 98% similar despite different names
57.2 KB
js-beautify {}
Max HTML report size reached
64.0 KB
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/dist/search_data-62425A17.js vs.
./usr/share/doc/erlang-doc/html/lib/jinterface-1.14.1/doc/html/dist/search_data-074FBB44.js
Files 99% similar despite different names
63.8 KB
js-beautify {}
Max HTML report size reached
102 KB
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/dist/search_data-888771CF.js vs.
./usr/share/doc/erlang-doc/html/lib/parsetools-2.6/doc/html/dist/search_data-F88FF550.js
Files 97% similar despite different names
102 KB
js-beautify {}
Max HTML report size reached
245 KB
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/dist/search_data-E998F0E5.js vs.
./usr/share/doc/erlang-doc/html/lib/public_key-1.16.1/doc/html/dist/search_data-118C23D3.js
Files 99% similar despite different names
245 KB
js-beautify {}
Max HTML report size reached
170 KB
./usr/share/doc/erlang-doc/html/lib/reltool-1.0.1/doc/html/dist/search_data-780E66E8.js vs.
./usr/share/doc/erlang-doc/html/lib/reltool-1.0.1/doc/html/dist/search_data-A7BB32CF.js
Files 98% similar despite different names
170 KB
js-beautify {}
Max HTML report size reached
278 KB
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/dist/search_data-95FEDC9E.js vs.
./usr/share/doc/erlang-doc/html/lib/sasl-4.2.2/doc/html/dist/search_data-51E6247B.js
Files 98% similar despite different names
278 KB
js-beautify {}
Max HTML report size reached
657 KB
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/dist/search_data-8ECD707F.js vs.
./usr/share/doc/erlang-doc/html/lib/ssh-5.2.1/doc/html/dist/search_data-86E587B3.js
Files 97% similar despite different names
657 KB
js-beautify {}
Max HTML report size reached
3.33 MB
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/dist/search_data-FDA2E906.js vs.
./usr/share/doc/erlang-doc/html/lib/stdlib-6.0.1/doc/html/dist/search_data-0EFEC9CF.js
Files 98% similar despite different names
3.33 MB
js-beautify {}
Max HTML report size reached
242 KB
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/dist/search_data-06D6C8D4.js vs.
./usr/share/doc/erlang-doc/html/lib/xmerl-2.0/doc/html/dist/search_data-26651B8B.js
Files 98% similar despite different names
241 KB
js-beautify {}
Max HTML report size reached
15.3 KB
erlang-edoc_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1692·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1692·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···457380·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···457408·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.8 KB
data.tar.xz
14.8 KB
data.tar
1.94 KB
file list
    
Offset 35, 15 lines modifiedOffset 35, 15 lines modified
35 -rw-r--r--···0·root·········(0)·root·········(0)·····3247·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/edoc.dtd35 -rw-r--r--···0·root·········(0)·root·········(0)·····3247·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/edoc.dtd
36 -rwxr-xr-x···0·root·········(0)·root·········(0)·····1322·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/edoc_generate36 -rwxr-xr-x···0·root·········(0)·root·········(0)·····1322·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/edoc_generate
37 -rw-r--r--···0·root·········(0)·root·········(0)·····2109·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/erlang.png37 -rw-r--r--···0·root·········(0)·root·········(0)·····2109·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/erlang.png
38 -rw-r--r--···0·root·········(0)·root·········(0)······869·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/stylesheet.css38 -rw-r--r--···0·root·········(0)·root·········(0)······869·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/edoc-1.3.1/priv/stylesheet.css
39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/
42 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/AUTHORS.gz42 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/AUTHORS.gz
43 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/README.Debian43 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/README.Debian
44 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/changelog.Debian.gz44 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/changelog.Debian.gz
45 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/copyright45 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-edoc/copyright
46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/
47 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/47 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/
48 -rw-r--r--···0·root·········(0)·root·········(0)·······35·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-edoc48 -rw-r--r--···0·root·········(0)·root·········(0)·······35·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-edoc
49 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/49 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
12.8 KB
./usr/share/doc/erlang-edoc/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-eldap_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0······984·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0······984·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···136456·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···136484·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.5 KB
file list
    
Offset 9, 11 lines modifiedOffset 9, 11 lines modified
9 -rw-r--r--···0·root·········(0)·root·········(0)·····2915·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/ELDAPv3.hrl9 -rw-r--r--···0·root·········(0)·root·········(0)·····2915·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/ELDAPv3.hrl
10 -rw-r--r--···0·root·········(0)·root·········(0)······275·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/eldap.app10 -rw-r--r--···0·root·········(0)·root·········(0)······275·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/eldap.app
11 -rw-r--r--···0·root·········(0)·root·········(0)······792·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/eldap.appup11 -rw-r--r--···0·root·········(0)·root·········(0)······792·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/eldap.appup
12 -rw-r--r--···0·root·········(0)·root·········(0)····76260·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/eldap.beam12 -rw-r--r--···0·root·········(0)·root·········(0)····76260·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eldap-1.2.13/ebin/eldap.beam
13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
15 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/15 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/
16 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/AUTHORS.gz16 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/AUTHORS.gz
17 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/README.Debian17 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/README.Debian
18 -rw-r--r--···0·root·········(0)·root·········(0)·····4422·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/changelog.Debian.gz18 -rw-r--r--···0·root·········(0)·root·········(0)·····4422·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/changelog.Debian.gz
19 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/copyright19 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eldap/copyright
12.8 KB
./usr/share/doc/erlang-eldap/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-et_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1080·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1080·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···183924·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···183940·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.5 KB
file list
    
Offset 12, 11 lines modifiedOffset 12, 11 lines modified
12 -rw-r--r--···0·root·········(0)·root·········(0)····18328·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_selector.beam12 -rw-r--r--···0·root·········(0)·root·········(0)····18328·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_selector.beam
13 -rw-r--r--···0·root·········(0)·root·········(0)·····6692·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_viewer.beam13 -rw-r--r--···0·root·········(0)·root·········(0)·····6692·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_viewer.beam
14 -rw-r--r--···0·root·········(0)·root·········(0)····38804·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_wx_contents_viewer.beam14 -rw-r--r--···0·root·········(0)·root·········(0)····38804·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_wx_contents_viewer.beam
15 -rw-r--r--···0·root·········(0)·root·········(0)···101508·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_wx_viewer.beam15 -rw-r--r--···0·root·········(0)·root·········(0)···101508·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/et-1.7.1/ebin/et_wx_viewer.beam
16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/
19 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/AUTHORS.gz19 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/AUTHORS.gz
20 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/README.Debian20 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/README.Debian
21 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/changelog.Debian.gz21 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/changelog.Debian.gz
22 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/copyright22 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-et/copyright
12.8 KB
./usr/share/doc/erlang-et/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-eunit_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1200·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1200·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···170028·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···170056·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.52 KB
file list
    
Offset 19, 11 lines modifiedOffset 19, 11 lines modified
19 -rw-r--r--···0·root·········(0)·root·········(0)····21984·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_surefire.beam19 -rw-r--r--···0·root·········(0)·root·········(0)····21984·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_surefire.beam
20 -rw-r--r--···0·root·········(0)·root·········(0)····26416·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_test.beam20 -rw-r--r--···0·root·········(0)·root·········(0)····26416·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_test.beam
21 -rw-r--r--···0·root·········(0)·root·········(0)·····5920·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_tests.beam21 -rw-r--r--···0·root·········(0)·root·········(0)·····5920·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_tests.beam
22 -rw-r--r--···0·root·········(0)·root·········(0)····12472·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_tty.beam22 -rw-r--r--···0·root·········(0)·root·········(0)····12472·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/eunit-2.9.1/ebin/eunit_tty.beam
23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
25 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/25 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/
26 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/AUTHORS.gz26 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/AUTHORS.gz
27 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/README.Debian27 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/README.Debian
28 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/changelog.Debian.gz28 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/changelog.Debian.gz
29 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/copyright29 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-eunit/copyright
12.8 KB
./usr/share/doc/erlang-eunit/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.3 KB
erlang-examples_27.0.1+dfsg-3_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····8364·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····8364·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···954744·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···954760·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.8 KB
data.tar.xz
14.8 KB
data.tar
1.92 KB
file list
    
Offset 379, 14 lines modifiedOffset 379, 14 lines modified
379 -rw-r--r--···0·root·········(0)·root·········(0)····38072·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_game.beam379 -rw-r--r--···0·root·········(0)·root·········(0)····38072·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_game.beam
380 -rw-r--r--···0·root·········(0)·root·········(0)····14137·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_game.erl380 -rw-r--r--···0·root·········(0)·root·········(0)····14137·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_game.erl
381 -rw-r--r--···0·root·········(0)·root·········(0)····28984·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_gui.beam381 -rw-r--r--···0·root·········(0)·root·········(0)····28984·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_gui.beam
382 -rw-r--r--···0·root·········(0)·root·········(0)····13098·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_gui.erl382 -rw-r--r--···0·root·········(0)·root·········(0)····13098·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/examples/sudoku/sudoku_gui.erl
383 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/383 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
384 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/384 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
385 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/385 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/
386 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/AUTHORS.gz386 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/AUTHORS.gz
387 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/README.Debian387 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/README.Debian
388 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/changelog.Debian.gz388 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/changelog.Debian.gz
389 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/copyright389 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-examples/copyright
390 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/390 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/
391 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/391 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/
392 -rw-r--r--···0·root·········(0)·root·········(0)······206·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-examples392 -rw-r--r--···0·root·········(0)·root·········(0)······206·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-examples
12.8 KB
./usr/share/doc/erlang-examples/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.0 KB
erlang-ftp_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1072·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1076·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···104344·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···104364·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.5 KB
file list
    
Offset 12, 11 lines modifiedOffset 12, 11 lines modified
12 -rw-r--r--···0·root·········(0)·root·········(0)····88584·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_internal.beam12 -rw-r--r--···0·root·········(0)·root·········(0)····88584·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_internal.beam
13 -rw-r--r--···0·root·········(0)·root·········(0)·····4480·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_progress.beam13 -rw-r--r--···0·root·········(0)·root·········(0)·····4480·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_progress.beam
14 -rw-r--r--···0·root·········(0)·root·········(0)·····7016·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_response.beam14 -rw-r--r--···0·root·········(0)·root·········(0)·····7016·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_response.beam
15 -rw-r--r--···0·root·········(0)·root·········(0)·····2332·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_sup.beam15 -rw-r--r--···0·root·········(0)·root·········(0)·····2332·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ftp-1.2.2/ebin/ftp_sup.beam
16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/
19 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/AUTHORS.gz19 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/AUTHORS.gz
20 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/README.Debian20 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/README.Debian
21 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/changelog.Debian.gz21 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/changelog.Debian.gz
22 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/copyright22 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ftp/copyright
12.8 KB
./usr/share/doc/erlang-ftp/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-inets_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2552·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2552·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···664920·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···664936·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.3 KB
data.tar
1.49 KB
file list
    
Offset 75, 11 lines modifiedOffset 75, 11 lines modified
75 -rw-r--r--···0·root·········(0)·root·········(0)······858·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/include/mod_auth.hrl75 -rw-r--r--···0·root·········(0)·root·········(0)······858·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/include/mod_auth.hrl
76 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/priv/76 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/priv/
77 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/priv/bin/77 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/priv/bin/
78 -rwxr-xr-x···0·root·········(0)·root·········(0)·······36·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/priv/bin/runcgi.sh78 -rwxr-xr-x···0·root·········(0)·root·········(0)·······36·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/inets-9.2/priv/bin/runcgi.sh
79 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/79 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
80 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/80 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
81 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/81 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/
82 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/AUTHORS.gz82 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/AUTHORS.gz
83 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/README.Debian83 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/README.Debian
84 -rw-r--r--···0·root·········(0)·root·········(0)·····4424·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/changelog.Debian.gz84 -rw-r--r--···0·root·········(0)·root·········(0)·····4424·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/changelog.Debian.gz
85 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/copyright85 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-inets/copyright
12.8 KB
./usr/share/doc/erlang-inets/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
126 KB
erlang-jinterface_27.0.1+dfsg-3_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0······836·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0······836·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···112224·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···112208·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
126 KB
data.tar.xz
126 KB
data.tar
2.01 KB
file list
    
Offset 8, 14 lines modifiedOffset 8, 14 lines modified
8 -rw-r--r--···0·root·········(0)·root·········(0)······893·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/ebin/jinterface.app8 -rw-r--r--···0·root·········(0)·root·········(0)······893·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/ebin/jinterface.app
9 -rw-r--r--···0·root·········(0)·root·········(0)······700·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/ebin/jinterface.appup9 -rw-r--r--···0·root·········(0)·root·········(0)······700·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/ebin/jinterface.appup
10 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/priv/10 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/priv/
11 -rw-r--r--···0·root·········(0)·root·········(0)···106853·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar11 -rw-r--r--···0·root·········(0)·root·········(0)···106853·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar
12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/
15 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/AUTHORS.gz15 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/AUTHORS.gz
16 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/README.Debian16 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/README.Debian
17 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/changelog.Debian.gz17 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/changelog.Debian.gz
18 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/copyright18 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-jinterface/copyright
19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/java/19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/java/
20 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/java/OtpErlang-1.14.1.jar·->·../../lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar20 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/java/OtpErlang-1.14.1.jar·->·../../lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar
21 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/java/OtpErlang.jar·->·../../lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar21 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/java/OtpErlang.jar·->·../../lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar
111 KB
./usr/lib/erlang/lib/jinterface-1.14.1/priv/OtpErlang.jar
13.4 KB
zipinfo {}
Max HTML report size reached
97.3 KB
zipdetails --redact --scan --utc {}
Max HTML report size reached
12.8 KB
./usr/share/doc/erlang-jinterface/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-megaco_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2640·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2640·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··3683824·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··3683848·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.53 KB
file list
    
Offset 75, 11 lines modifiedOffset 75, 11 lines modified
75 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/75 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/
76 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/lib/76 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/lib/
77 -rw-r--r--···0·root·········(0)·root·········(0)···210476·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/lib/megaco_flex_scanner_drv.so77 -rw-r--r--···0·root·········(0)·root·········(0)···210476·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/lib/megaco_flex_scanner_drv.so
78 -rw-r--r--···0·root·········(0)·root·········(0)···194064·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/lib/megaco_flex_scanner_drv_mt.so78 -rw-r--r--···0·root·········(0)·root·········(0)···194064·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/megaco-4.6/priv/lib/megaco_flex_scanner_drv_mt.so
79 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/79 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
80 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/80 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
81 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/81 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/
82 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/AUTHORS.gz82 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/AUTHORS.gz
83 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/README.Debian83 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/README.Debian
84 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/changelog.Debian.gz84 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/changelog.Debian.gz
85 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/copyright85 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-megaco/copyright
12.8 KB
./usr/share/doc/erlang-megaco/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-mnesia_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1744·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1744·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···895816·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···895844·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.54 KB
file list
    
Offset 37, 11 lines modifiedOffset 37, 11 lines modified
37 -rw-r--r--···0·root·········(0)·root·········(0)····22628·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_subscr.beam37 -rw-r--r--···0·root·········(0)·root·········(0)····22628·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_subscr.beam
38 -rw-r--r--···0·root·········(0)·root·········(0)·····5292·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_sup.beam38 -rw-r--r--···0·root·········(0)·root·········(0)·····5292·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_sup.beam
39 -rw-r--r--···0·root·········(0)·root·········(0)·····9916·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_text.beam39 -rw-r--r--···0·root·········(0)·root·········(0)·····9916·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_text.beam
40 -rw-r--r--···0·root·········(0)·root·········(0)···102440·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_tm.beam40 -rw-r--r--···0·root·········(0)·root·········(0)···102440·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/mnesia-4.23.2/ebin/mnesia_tm.beam
41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
42 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/42 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
43 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/43 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/
44 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/AUTHORS.gz44 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/AUTHORS.gz
45 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/README.Debian45 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/README.Debian
46 -rw-r--r--···0·root·········(0)·root·········(0)·····4422·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/changelog.Debian.gz46 -rw-r--r--···0·root·········(0)·root·········(0)·····4422·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/changelog.Debian.gz
47 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/copyright47 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mnesia/copyright
12.8 KB
./usr/share/doc/erlang-mnesia/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.3 KB
erlang-mode_27.0.1+dfsg-3_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1552·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1552·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0····91060·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0····91100·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.8 KB
data.tar.xz
14.8 KB
data.tar
1.94 KB
file list
    
Offset 12, 15 lines modifiedOffset 12, 15 lines modified
12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/install/12 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/install/
13 -rwxr-xr-x···0·root·········(0)·root·········(0)·····1463·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/install/erlang-mode13 -rwxr-xr-x···0·root·········(0)·root·········(0)·····1463·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/install/erlang-mode
14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/remove/14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/remove/
15 -rwxr-xr-x···0·root·········(0)·root·········(0)······468·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/remove/erlang-mode15 -rwxr-xr-x···0·root·········(0)·root·········(0)······468·2024-08-29·10:53:40.000000·./usr/lib/emacsen-common/packages/remove/erlang-mode
16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/
19 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/AUTHORS.gz19 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/AUTHORS.gz
20 -rw-r--r--···0·root·········(0)·root·········(0)·····1895·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/README20 -rw-r--r--···0·root·········(0)·root·········(0)·····1895·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/README
21 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/README.Debian21 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/README.Debian
22 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/changelog.Debian.gz22 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/changelog.Debian.gz
23 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/copyright23 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-mode/copyright
24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/emacs/24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/emacs/
25 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/emacs/site-lisp/25 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/emacs/site-lisp/
26 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/emacs/site-lisp/erlang/26 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/emacs/site-lisp/erlang/
12.8 KB
./usr/share/doc/erlang-mode/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.5 KB
erlang-nox_27.0.1+dfsg-3_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0······832·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0······832·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0····13488·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0····13508·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.0 KB
data.tar.xz
14.0 KB
data.tar
1.14 KB
file list
    
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./
2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/
3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/
6 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/AUTHORS.gz6 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/AUTHORS.gz
7 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/README.Debian7 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/README.Debian
8 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/changelog.Debian.gz8 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/changelog.Debian.gz
9 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/copyright9 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-nox/copyright
12.8 KB
./usr/share/doc/erlang-nox/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.4 KB
erlang-observer_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2256·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2256·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1025364·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1025388·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.9 KB
data.tar.xz
14.8 KB
data.tar
1.97 KB
file list
    
Offset 58, 15 lines modifiedOffset 58, 15 lines modified
58 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/bin/58 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/bin/
59 -rwxr-xr-x···0·root·········(0)·root·········(0)·······92·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/bin/cdv59 -rwxr-xr-x···0·root·········(0)·root·········(0)·······92·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/bin/cdv
60 -rwxr-xr-x···0·root·········(0)·root·········(0)·······88·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/bin/etop60 -rwxr-xr-x···0·root·········(0)·root·········(0)·······88·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/bin/etop
61 -rw-r--r--···0·root·········(0)·root·········(0)·····3698·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/erlang_observer.png61 -rw-r--r--···0·root·········(0)·root·········(0)·····3698·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/observer-2.16/priv/erlang_observer.png
62 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/62 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
63 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/63 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
64 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/64 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/
65 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/AUTHORS.gz65 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/AUTHORS.gz
66 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/README.Debian66 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/README.Debian
67 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/changelog.Debian.gz67 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/changelog.Debian.gz
68 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/copyright68 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-observer/copyright
69 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/69 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/
70 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/70 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/
71 -rw-r--r--···0·root·········(0)·root·········(0)·······39·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-observer71 -rw-r--r--···0·root·········(0)·root·········(0)·······39·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-observer
72 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/72 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
12.8 KB
./usr/share/doc/erlang-observer/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-odbc_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1008·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1008·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0····62792·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0····62804·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.3 KB
data.tar
1.49 KB
file list
    
Offset 12, 11 lines modifiedOffset 12, 11 lines modified
12 -rw-r--r--···0·root·········(0)·root·········(0)·····1924·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/ebin/odbc_sup.beam12 -rw-r--r--···0·root·········(0)·root·········(0)·····1924·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/ebin/odbc_sup.beam
13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/priv/13 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/priv/
14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/priv/bin/14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/priv/bin/
15 -rwxr-xr-x···0·root·········(0)·root·········(0)····26264·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/priv/bin/odbcserver15 -rwxr-xr-x···0·root·········(0)·root·········(0)····26264·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/odbc-2.14.3/priv/bin/odbcserver
16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/17 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/
19 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/AUTHORS.gz19 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/AUTHORS.gz
20 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/README.Debian20 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/README.Debian
21 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/changelog.Debian.gz21 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/changelog.Debian.gz
22 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/copyright22 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-odbc/copyright
12.8 KB
./usr/share/doc/erlang-odbc/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.0 KB
erlang-os-mon_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1168·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1172·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···109784·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···109808·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.3 KB
data.tar
1.49 KB
file list
    
Offset 18, 11 lines modifiedOffset 18, 11 lines modified
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/
19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/bin/19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/bin/
20 -rwxr-xr-x···0·root·········(0)·root·········(0)·····5648·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/bin/cpu_sup20 -rwxr-xr-x···0·root·········(0)·root·········(0)·····5648·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/bin/cpu_sup
21 -rwxr-xr-x···0·root·········(0)·root·········(0)·····9748·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/bin/memsup21 -rwxr-xr-x···0·root·········(0)·root·········(0)·····9748·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/os_mon-2.10/priv/bin/memsup
22 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/22 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/
25 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/AUTHORS.gz25 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/AUTHORS.gz
26 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/README.Debian26 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/README.Debian
27 -rw-r--r--···0·root·········(0)·root·········(0)·····4425·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/changelog.Debian.gz27 -rw-r--r--···0·root·········(0)·root·········(0)·····4425·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/changelog.Debian.gz
28 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/copyright28 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-os-mon/copyright
12.8 KB
./usr/share/doc/erlang-os-mon/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.0 KB
erlang-parsetools_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1084·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1084·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···209300·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···209324·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.55 KB
file list
    
Offset 10, 11 lines modifiedOffset 10, 11 lines modified
10 -rw-r--r--···0·root·········(0)·root·········(0)······789·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/parsetools.appup10 -rw-r--r--···0·root·········(0)·root·········(0)······789·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/parsetools.appup
11 -rw-r--r--···0·root·········(0)·root·········(0)···151316·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/yecc.beam11 -rw-r--r--···0·root·········(0)·root·········(0)···151316·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/yecc.beam
12 -rw-r--r--···0·root·········(0)·root·········(0)····30696·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/yeccparser.beam12 -rw-r--r--···0·root·········(0)·root·········(0)····30696·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/yeccparser.beam
13 -rw-r--r--···0·root·········(0)·root·········(0)·····3716·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/yeccscan.beam13 -rw-r--r--···0·root·········(0)·root·········(0)·····3716·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/parsetools-2.6/ebin/yeccscan.beam
14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/14 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
15 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/15 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/16 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/
17 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/AUTHORS.gz17 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/AUTHORS.gz
18 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/README.Debian18 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/README.Debian
19 -rw-r--r--···0·root·········(0)·root·········(0)·····4427·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/changelog.Debian.gz19 -rw-r--r--···0·root·········(0)·root·········(0)·····4427·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/changelog.Debian.gz
20 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/copyright20 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-parsetools/copyright
12.8 KB
./usr/share/doc/erlang-parsetools/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.1 KB
erlang-public-key_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1244·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1248·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···776464·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···776480·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.5 KB
data.tar.xz
14.4 KB
data.tar
1.57 KB
file list
    
Offset 18, 11 lines modifiedOffset 18, 11 lines modified
18 -rw-r--r--···0·root·········(0)·root·········(0)····23864·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/pubkey_ssh.beam18 -rw-r--r--···0·root·········(0)·root·········(0)····23864·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/pubkey_ssh.beam
19 -rw-r--r--···0·root·········(0)·root·········(0)······643·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/public_key.app19 -rw-r--r--···0·root·········(0)·root·········(0)······643·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/public_key.app
20 -rw-r--r--···0·root·········(0)·root·········(0)······792·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/public_key.appup20 -rw-r--r--···0·root·········(0)·root·········(0)······792·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/public_key.appup
21 -rw-r--r--···0·root·········(0)·root·········(0)···126096·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/public_key.beam21 -rw-r--r--···0·root·········(0)·root·········(0)···126096·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/public_key-1.16.1/ebin/public_key.beam
22 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/22 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/24 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/
25 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/AUTHORS.gz25 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/AUTHORS.gz
26 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/README.Debian26 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/README.Debian
27 -rw-r--r--···0·root·········(0)·root·········(0)·····4426·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/changelog.Debian.gz27 -rw-r--r--···0·root·········(0)·root·········(0)·····4426·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/changelog.Debian.gz
28 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/copyright28 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-public-key/copyright
12.8 KB
./usr/share/doc/erlang-public-key/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.0 KB
erlang-reltool_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1240·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1240·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···382732·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···382752·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.56 KB
file list
    
Offset 15, 11 lines modifiedOffset 15, 11 lines modified
15 -rw-r--r--···0·root·········(0)·root·········(0)····94764·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_server.beam15 -rw-r--r--···0·root·········(0)·root·········(0)····94764·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_server.beam
16 -rw-r--r--···0·root·········(0)·root·········(0)····89528·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_sys_win.beam16 -rw-r--r--···0·root·········(0)·root·········(0)····89528·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_sys_win.beam
17 -rw-r--r--···0·root·········(0)·root·········(0)····67584·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_target.beam17 -rw-r--r--···0·root·········(0)·root·········(0)····67584·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_target.beam
18 -rw-r--r--···0·root·········(0)·root·········(0)····44016·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_utils.beam18 -rw-r--r--···0·root·········(0)·root·········(0)····44016·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/reltool-1.0.1/ebin/reltool_utils.beam
19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
20 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/20 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
21 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/21 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/
22 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/AUTHORS.gz22 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/AUTHORS.gz
23 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/README.Debian23 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/README.Debian
24 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/changelog.Debian.gz24 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/changelog.Debian.gz
25 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/copyright25 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-reltool/copyright
12.8 KB
./usr/share/doc/erlang-reltool/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.0 KB
erlang-runtime-tools_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1928·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1928·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···240716·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···240728·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.5 KB
data.tar.xz
14.5 KB
data.tar
1.59 KB
file list
    
Offset 46, 11 lines modifiedOffset 46, 11 lines modified
46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/
47 -rw-r--r--···0·root·········(0)·root·········(0)·····5464·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/dyntrace.so47 -rw-r--r--···0·root·········(0)·root·········(0)·····5464·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/dyntrace.so
48 -rw-r--r--···0·root·········(0)·root·········(0)·····9688·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/trace_file_drv.so48 -rw-r--r--···0·root·········(0)·root·········(0)·····9688·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/trace_file_drv.so
49 -rw-r--r--···0·root·········(0)·root·········(0)·····9708·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/trace_ip_drv.so49 -rw-r--r--···0·root·········(0)·root·········(0)·····9708·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/runtime_tools-2.1/priv/lib/trace_ip_drv.so
50 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/50 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
51 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/51 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
52 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/52 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/
53 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/AUTHORS.gz53 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/AUTHORS.gz
54 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/README.Debian54 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/README.Debian
55 -rw-r--r--···0·root·········(0)·root·········(0)·····4430·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/changelog.Debian.gz55 -rw-r--r--···0·root·········(0)·root·········(0)·····4430·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/changelog.Debian.gz
56 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/copyright56 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-runtime-tools/copyright
12.9 KB
./usr/share/doc/erlang-runtime-tools/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.4 KB
erlang-snmp_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····5220·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····5220·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1945100·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1945128·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.9 KB
data.tar.xz
14.8 KB
data.tar
2.0 KB
file list
    
Offset 186, 15 lines modifiedOffset 186, 15 lines modified
186 -rw-r--r--···0·root·········(0)·root·········(0)····11251·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/SNMPv2-MIB.bin186 -rw-r--r--···0·root·········(0)·root·········(0)····11251·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/SNMPv2-MIB.bin
187 -rw-r--r--···0·root·········(0)·root·········(0)·····1948·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/SNMPv2-TM.bin187 -rw-r--r--···0·root·········(0)·root·········(0)·····1948·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/SNMPv2-TM.bin
188 -rw-r--r--···0·root·········(0)·root·········(0)····11740·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/STANDARD-MIB.bin188 -rw-r--r--···0·root·········(0)·root·········(0)····11740·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/STANDARD-MIB.bin
189 -rw-r--r--···0·root·········(0)·root·········(0)·····3718·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/TRANSPORT-ADDRESS-MIB.bin189 -rw-r--r--···0·root·········(0)·root·········(0)·····3718·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/snmp-5.16/priv/mibs/TRANSPORT-ADDRESS-MIB.bin
190 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/190 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
191 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/191 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
192 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/192 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/
193 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/AUTHORS.gz193 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/AUTHORS.gz
194 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/README.Debian194 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/README.Debian
195 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/changelog.Debian.gz195 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/changelog.Debian.gz
196 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/copyright196 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-snmp/copyright
197 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/197 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/
198 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/198 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/man/man1/
199 -rw-r--r--···0·root·········(0)·root·········(0)·····1533·2024-08-29·10:53:40.000000·./usr/share/man/man1/snmpc.1.gz199 -rw-r--r--···0·root·········(0)·root·········(0)·····1533·2024-08-29·10:53:40.000000·./usr/share/man/man1/snmpc.1.gz
200 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/bin/snmpc·->·../lib/erlang/lib/snmp-5.16/bin/snmpc200 lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/bin/snmpc·->·../lib/erlang/lib/snmp-5.16/bin/snmpc
12.8 KB
./usr/share/doc/erlang-snmp/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-src_27.0.1+dfsg-3_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0····38904·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0····38908·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··6071544·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··6071564·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.3 KB
data.tar.xz
14.3 KB
data.tar
1.47 KB
file list
    
Offset 1717, 11 lines modifiedOffset 1717, 11 lines modified
1717 -rw-r--r--···0·root·········(0)·root·········(0)···194898·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/src/xmerl_xsd.erl1717 -rw-r--r--···0·root·········(0)·root·········(0)···194898·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/src/xmerl_xsd.erl
1718 -rw-r--r--···0·root·········(0)·root·········(0)····43807·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/src/xmerl_xsd_type.erl1718 -rw-r--r--···0·root·········(0)·root·········(0)····43807·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/src/xmerl_xsd_type.erl
1719 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/releases/1719 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/releases/
1720 -rw-r--r--···0·root·········(0)·root·········(0)······254·2024-08-29·10:53:40.000000·./usr/lib/erlang/releases/RELEASES.src1720 -rw-r--r--···0·root·········(0)·root·········(0)······254·2024-08-29·10:53:40.000000·./usr/lib/erlang/releases/RELEASES.src
1721 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/1721 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
1722 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/1722 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
1723 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/1723 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/
1724 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/AUTHORS.gz1724 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/AUTHORS.gz
1725 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/README.Debian1725 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/README.Debian
1726 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/changelog.Debian.gz1726 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/changelog.Debian.gz
1727 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/copyright1727 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-src/copyright
12.8 KB
./usr/share/doc/erlang-src/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
71.7 KB
erlang-ssh_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1928·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1932·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1002144·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1001956·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
71.1 KB
data.tar.xz
71.1 KB
data.tar
1.53 KB
file list
    
Offset 47, 11 lines modifiedOffset 47, 11 lines modified
47 -rw-r--r--···0·root·········(0)·root·········(0)·····4104·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_tcpip_forward_client.beam47 -rw-r--r--···0·root·········(0)·root·········(0)·····4104·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_tcpip_forward_client.beam
48 -rw-r--r--···0·root·········(0)·root·········(0)·····3532·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_tcpip_forward_srv.beam48 -rw-r--r--···0·root·········(0)·root·········(0)·····3532·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_tcpip_forward_srv.beam
49 -rw-r--r--···0·root·········(0)·root·········(0)···120696·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_transport.beam49 -rw-r--r--···0·root·········(0)·root·········(0)···120696·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_transport.beam
50 -rw-r--r--···0·root·········(0)·root·········(0)····51016·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_xfer.beam50 -rw-r--r--···0·root·········(0)·root·········(0)····51016·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_xfer.beam
51 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/51 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
52 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/52 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
53 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/53 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/
54 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/AUTHORS.gz54 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/AUTHORS.gz
55 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/README.Debian55 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/README.Debian
56 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/changelog.Debian.gz56 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/changelog.Debian.gz
57 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/copyright57 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssh/copyright
43.5 KB
./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_options.beam
    
Offset 3628, 18 lines modifiedOffset 3628, 18 lines modified
0000e2b0:·696f·6e73·6100·6c00·0000·0268·0277·0466··ionsa.l....h.w.f0000e2b0:·696f·6e73·6100·6c00·0000·0268·0277·0466··ionsa.l....h.w.f
0000e2c0:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w0000e2c0:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w
0000e2d0:·086c·6f63·6174·696f·6e68·0262·0000·04a0··.locationh.b....0000e2d0:·086c·6f63·6174·696f·6e68·0262·0000·04a0··.locationh.b....
0000e2e0:·6102·6a6c·0000·0001·6d00·0000·176f·7061··a.jl....m....opa0000e2e0:·6102·6a6c·0000·0001·6d00·0000·176f·7061··a.jl....m....opa
0000e2f0:·7175·655f·6461·656d·6f6e·5f6f·7074·696f··que_daemon_optio0000e2f0:·7175·655f·6461·656d·6f6e·5f6f·7074·696f··que_daemon_optio
0000e300:·6e73·2829·6a77·046e·6f6e·6574·0000·0003··ns()jw.nonet....0000e300:·6e73·2829·6a77·046e·6f6e·6574·0000·0003··ns()jw.nonet....
0000e310:·7705·7469·746c·656d·0000·0010·4f74·6865··w.titlem....Othe0000e310:·7705·7469·746c·656d·0000·0010·4f74·6865··w.titlem....Othe
0000e320:·7220·6461·7461·2074·7970·6573·7705·6571··r·data·typesw.eq0000e320:·7220·6461·7461·2074·7970·6573·7708·6578··r·data·typesw.ex
 0000e330:·706f·7274·6564·7705·6661·6c73·6577·0565··portedw.falsew.e
0000e330:·7569·766d·0000·0017·6f70·6171·7565·5f63··uivm....opaque_c0000e340:·7175·6976·6d00·0000·176f·7061·7175·655f··quivm....opaque_
 0000e350:·636f·6d6d·6f6e·5f6f·7074·696f·6e73·2f30··common_options/0
0000e340:·6f6d·6d6f·6e5f·6f70·7469·6f6e·732f·3077··ommon_options/0w 
0000e350:·0865·7870·6f72·7465·6477·0566·616c·7365··.exportedw.false 
0000e360:·6805·6803·7704·7479·7065·7718·6361·6c6c··h.h.w.typew.call0000e360:·6805·6803·7704·7479·7065·7718·6361·6c6c··h.h.w.typew.call
0000e370:·6261·636b·735f·6461·656d·6f6e·5f6f·7074··backs_daemon_opt0000e370:·6261·636b·735f·6461·656d·6f6e·5f6f·7074··backs_daemon_opt
0000e380:·696f·6e73·6100·6c00·0000·0268·0277·0466··ionsa.l....h.w.f0000e380:·696f·6e73·6100·6c00·0000·0268·0277·0466··ionsa.l....h.w.f
0000e390:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w0000e390:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w
0000e3a0:·086c·6f63·6174·696f·6e68·0262·0000·0492··.locationh.b....0000e3a0:·086c·6f63·6174·696f·6e68·0262·0000·0492··.locationh.b....
0000e3b0:·6102·6a6c·0000·0001·6d00·0000·1a63·616c··a.jl....m....cal0000e3b0:·6102·6a6c·0000·0001·6d00·0000·1a63·616c··a.jl....m....cal
0000e3c0:·6c62·6163·6b73·5f64·6165·6d6f·6e5f·6f70··lbacks_daemon_op0000e3c0:·6c62·6163·6b73·5f64·6165·6d6f·6e5f·6f70··lbacks_daemon_op
Offset 4019, 47 lines modifiedOffset 4019, 47 lines modified
0000fb20:·6669·6c65·6b00·0773·7368·2e68·726c·6802··filek..ssh.hrlh.0000fb20:·6669·6c65·6b00·0773·7368·2e68·726c·6802··filek..ssh.hrlh.
0000fb30:·7708·6c6f·6361·7469·6f6e·6802·6200·0004··w.locationh.b...0000fb30:·7708·6c6f·6361·7469·6f6e·6802·6200·0004··w.locationh.b...
0000fb40:·1761·026a·6c00·0000·016d·0000·0015·6578··.a.jl....m....ex0000fb40:·1761·026a·6c00·0000·016d·0000·0015·6578··.a.jl....m....ex
0000fb50:·706c·6963·6974·5f67·726f·7570·5f66·696c··plicit_group_fil0000fb50:·706c·6963·6974·5f67·726f·7570·5f66·696c··plicit_group_fil
0000fb60:·6528·296a·7704·6e6f·6e65·7400·0000·0377··e()jw.nonet....w0000fb60:·6528·296a·7704·6e6f·6e65·7400·0000·0377··e()jw.nonet....w
0000fb70:·0574·6974·6c65·6d00·0000·1f44·6165·6d6f··.titlem....Daemo0000fb70:·0574·6974·6c65·6d00·0000·1f44·6165·6d6f··.titlem....Daemo
0000fb80:·6e20·4f70·7469·6f6e·7320·2853·6572·7665··n·Options·(Serve0000fb80:·6e20·4f70·7469·6f6e·7320·2853·6572·7665··n·Options·(Serve
0000fb90:·7220·4f70·7469·6f6e·7329·7705·6571·7569··r·Options)w.equi0000fb90:·7220·4f70·7469·6f6e·7329·7708·6578·706f··r·Options)w.expo
0000fba0:·766d·0000·0011·7373·685f·6d6f·6475·6c69··vm....ssh_moduli 
0000fbb0:·5f66·696c·652f·3077·0865·7870·6f72·7465··_file/0w.exporte0000fba0:·7274·6564·7705·6661·6c73·6577·0565·7175··rtedw.falsew.equ
 0000fbb0:·6976·6d00·0000·1173·7368·5f6d·6f64·756c··ivm....ssh_modul
0000fbc0:·6477·0566·616c·7365·6805·6803·7704·7479··dw.falseh.h.w.ty0000fbc0:·695f·6669·6c65·2f30·6805·6803·7704·7479··i_file/0h.h.w.ty
0000fbd0:·7065·770e·6578·706c·6963·6974·5f67·726f··pew.explicit_gro0000fbd0:·7065·770e·6578·706c·6963·6974·5f67·726f··pew.explicit_gro
0000fbe0:·7570·6100·6c00·0000·0268·0277·0466·696c··upa.l....h.w.fil0000fbe0:·7570·6100·6c00·0000·0268·0277·0466·696c··upa.l....h.w.fil
0000fbf0:·656b·0007·7373·682e·6872·6c68·0277·086c··ek..ssh.hrlh.w.l0000fbf0:·656b·0007·7373·682e·6872·6c68·0277·086c··ek..ssh.hrlh.w.l
0000fc00:·6f63·6174·696f·6e68·0262·0000·0414·6102··ocationh.b....a.0000fc00:·6f63·6174·696f·6e68·0262·0000·0414·6102··ocationh.b....a.
0000fc10:·6a6c·0000·0001·6d00·0000·1065·7870·6c69··jl....m....expli0000fc10:·6a6c·0000·0001·6d00·0000·1065·7870·6c69··jl....m....expli
0000fc20:·6369·745f·6772·6f75·7028·296a·7704·6e6f··cit_group()jw.no0000fc20:·6369·745f·6772·6f75·7028·296a·7704·6e6f··cit_group()jw.no
0000fc30:·6e65·7400·0000·0377·0574·6974·6c65·6d00··net....w.titlem.0000fc30:·6e65·7400·0000·0377·0574·6974·6c65·6d00··net....w.titlem.
0000fc40:·0000·1f44·6165·6d6f·6e20·4f70·7469·6f6e··...Daemon·Option0000fc40:·0000·1f44·6165·6d6f·6e20·4f70·7469·6f6e··...Daemon·Option
0000fc50:·7320·2853·6572·7665·7220·4f70·7469·6f6e··s·(Server·Option0000fc50:·7320·2853·6572·7665·7220·4f70·7469·6f6e··s·(Server·Option
0000fc60:·7329·7705·6571·7569·766d·0000·0011·7373··s)w.equivm....ss 
0000fc70:·685f·6d6f·6475·6c69·5f66·696c·652f·3077··h_moduli_file/0w 
0000fc80:·0865·7870·6f72·7465·6477·0566·616c·7365··.exportedw.false0000fc60:·7329·7708·6578·706f·7274·6564·7705·6661··s)w.exportedw.fa
 0000fc70:·6c73·6577·0565·7175·6976·6d00·0000·1173··lsew.equivm....s
 0000fc80:·7368·5f6d·6f64·756c·695f·6669·6c65·2f30··sh_moduli_file/0
0000fc90:·6805·6803·7704·7479·7065·772b·6469·6666··h.h.w.typew+diff0000fc90:·6805·6803·7704·7479·7065·772b·6469·6666··h.h.w.typew+diff
0000fca0:·6965·5f68·656c·6c6d·616e·5f67·726f·7570··ie_hellman_group0000fca0:·6965·5f68·656c·6c6d·616e·5f67·726f·7570··ie_hellman_group
0000fcb0:·5f65·7863·6861·6e67·655f·6461·656d·6f6e··_exchange_daemon0000fcb0:·5f65·7863·6861·6e67·655f·6461·656d·6f6e··_exchange_daemon
0000fcc0:·5f6f·7074·696f·6e61·006c·0000·0002·6802··_optiona.l....h.0000fcc0:·5f6f·7074·696f·6e61·006c·0000·0002·6802··_optiona.l....h.
0000fcd0:·7704·6669·6c65·6b00·0773·7368·2e68·726c··w.filek..ssh.hrl0000fcd0:·7704·6669·6c65·6b00·0773·7368·2e68·726c··w.filek..ssh.hrl
0000fce0:·6802·7708·6c6f·6361·7469·6f6e·6802·6200··h.w.locationh.b.0000fce0:·6802·7708·6c6f·6361·7469·6f6e·6802·6200··h.w.locationh.b.
0000fcf0:·0004·0e61·026a·6c00·0000·016d·0000·002d··...a.jl....m...-0000fcf0:·0004·0e61·026a·6c00·0000·016d·0000·002d··...a.jl....m...-
0000fd00:·6469·6666·6965·5f68·656c·6c6d·616e·5f67··diffie_hellman_g0000fd00:·6469·6666·6965·5f68·656c·6c6d·616e·5f67··diffie_hellman_g
0000fd10:·726f·7570·5f65·7863·6861·6e67·655f·6461··roup_exchange_da0000fd10:·726f·7570·5f65·7863·6861·6e67·655f·6461··roup_exchange_da
0000fd20:·656d·6f6e·5f6f·7074·696f·6e28·296a·7704··emon_option()jw.0000fd20:·656d·6f6e·5f6f·7074·696f·6e28·296a·7704··emon_option()jw.
0000fd30:·6e6f·6e65·7400·0000·0377·0574·6974·6c65··nonet....w.title0000fd30:·6e6f·6e65·7400·0000·0377·0574·6974·6c65··nonet....w.title
0000fd40:·6d00·0000·1f44·6165·6d6f·6e20·4f70·7469··m....Daemon·Opti0000fd40:·6d00·0000·1f44·6165·6d6f·6e20·4f70·7469··m....Daemon·Opti
0000fd50:·6f6e·7320·2853·6572·7665·7220·4f70·7469··ons·(Server·Opti0000fd50:·6f6e·7320·2853·6572·7665·7220·4f70·7469··ons·(Server·Opti
0000fd60:·6f6e·7329·7705·6571·7569·766d·0000·0011··ons)w.equivm.... 
0000fd70:·7373·685f·6d6f·6475·6c69·5f66·696c·652f··ssh_moduli_file/ 
0000fd80:·3077·0865·7870·6f72·7465·6477·0566·616c··0w.exportedw.fal0000fd60:·6f6e·7329·7708·6578·706f·7274·6564·7705··ons)w.exportedw.
 0000fd70:·6661·6c73·6577·0565·7175·6976·6d00·0000··falsew.equivm...
 0000fd80:·1173·7368·5f6d·6f64·756c·695f·6669·6c65··.ssh_moduli_file
0000fd90:·7365·6805·6803·7704·7479·7065·7708·7077··seh.h.w.typew.pw0000fd90:·2f30·6805·6803·7704·7479·7065·7708·7077··/0h.h.w.typew.pw
0000fda0:·6466·756e·5f34·6100·6c00·0000·0268·0277··dfun_4a.l....h.w0000fda0:·6466·756e·5f34·6100·6c00·0000·0268·0277··dfun_4a.l....h.w
0000fdb0:·0466·696c·656b·0007·7373·682e·6872·6c68··.filek..ssh.hrlh0000fdb0:·0466·696c·656b·0007·7373·682e·6872·6c68··.filek..ssh.hrlh
0000fdc0:·0277·086c·6f63·6174·696f·6e68·0262·0000··.w.locationh.b..0000fdc0:·0277·086c·6f63·6174·696f·6e68·0262·0000··.w.locationh.b..
0000fdd0:·03a3·6102·6a6c·0000·0001·6d00·0000·0a70··..a.jl....m....p0000fdd0:·03a3·6102·6a6c·0000·0001·6d00·0000·0a70··..a.jl....m....p
0000fde0:·7764·6675·6e5f·3428·296a·7400·0000·016d··wdfun_4()jt....m0000fde0:·7764·6675·6e5f·3428·296a·7400·0000·016d··wdfun_4()jt....m
0000fdf0:·0000·0002·656e·6d00·0010·742d·202a·2a60··....enm...t-·**`0000fdf0:·0000·0002·656e·6d00·0010·742d·202a·2a60··....enm...t-·**`
0000fe00:·6175·7468·5f6d·6574·686f·645f·6b62·5f69··auth_method_kb_i0000fe00:·6175·7468·5f6d·6574·686f·645f·6b62·5f69··auth_method_kb_i
Offset 4333, 79 lines modifiedOffset 4333, 79 lines modified
00010ec0:·756e·5f32·6100·6c00·0000·0268·0277·0466··un_2a.l....h.w.f00010ec0:·756e·5f32·6100·6c00·0000·0268·0277·0466··un_2a.l....h.w.f
00010ed0:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w00010ed0:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w
00010ee0:·086c·6f63·6174·696f·6e68·0262·0000·03a2··.locationh.b....00010ee0:·086c·6f63·6174·696f·6e68·0262·0000·03a2··.locationh.b....
00010ef0:·6102·6a6c·0000·0001·6d00·0000·0a70·7764··a.jl....m....pwd00010ef0:·6102·6a6c·0000·0001·6d00·0000·0a70·7764··a.jl....m....pwd
00010f00:·6675·6e5f·3228·296a·7704·6e6f·6e65·7400··fun_2()jw.nonet.00010f00:·6675·6e5f·3228·296a·7704·6e6f·6e65·7400··fun_2()jw.nonet.
00010f10:·0000·0377·0574·6974·6c65·6d00·0000·1f44··...w.titlem....D00010f10:·0000·0377·0574·6974·6c65·6d00·0000·1f44··...w.titlem....D
00010f20:·6165·6d6f·6e20·4f70·7469·6f6e·7320·2853··aemon·Options·(S00010f20:·6165·6d6f·6e20·4f70·7469·6f6e·7320·2853··aemon·Options·(S
00010f30:·6572·7665·7220·4f70·7469·6f6e·7329·7705··erver·Options)w.00010f30:·6572·7665·7220·4f70·7469·6f6e·7329·7708··erver·Options)w.
 00010f40:·6578·706f·7274·6564·7705·6661·6c73·6577··exportedw.falsew
00010f40:·6571·7569·766d·0000·000a·7077·6466·756e··equivm....pwdfun00010f50:·0565·7175·6976·6d00·0000·0a70·7764·6675··.equivm....pwdfu
00010f50:·5f34·2f30·7708·6578·706f·7274·6564·7705··_4/0w.exportedw. 
00010f60:·6661·6c73·6568·0568·0377·0474·7970·6577··falseh.h.w.typew00010f60:·6e5f·342f·3068·0568·0377·0474·7970·6577··n_4/0h.h.w.typew
00010f70:·0c6b·625f·696e·745f·7475·706c·6561·006c··.kb_int_tuplea.l00010f70:·0c6b·625f·696e·745f·7475·706c·6561·006c··.kb_int_tuplea.l
00010f80:·0000·0002·6802·7704·6669·6c65·6b00·0773··....h.w.filek..s00010f80:·0000·0002·6802·7704·6669·6c65·6b00·0773··....h.w.filek..s
00010f90:·7368·2e68·726c·6802·7708·6c6f·6361·7469··sh.hrlh.w.locati00010f90:·7368·2e68·726c·6802·7708·6c6f·6361·7469··sh.hrlh.w.locati
00010fa0:·6f6e·6802·6200·0003·9e61·026a·6c00·0000··onh.b....a.jl...00010fa0:·6f6e·6802·6200·0003·9e61·026a·6c00·0000··onh.b....a.jl...
00010fb0:·016d·0000·000e·6b62·5f69·6e74·5f74·7570··.m....kb_int_tup00010fb0:·016d·0000·000e·6b62·5f69·6e74·5f74·7570··.m....kb_int_tup
00010fc0:·6c65·2829·6a77·046e·6f6e·6574·0000·0003··le()jw.nonet....00010fc0:·6c65·2829·6a77·046e·6f6e·6574·0000·0003··le()jw.nonet....
00010fd0:·7705·7469·746c·656d·0000·001f·4461·656d··w.titlem....Daem00010fd0:·7705·7469·746c·656d·0000·001f·4461·656d··w.titlem....Daem
00010fe0:·6f6e·204f·7074·696f·6e73·2028·5365·7276··on·Options·(Serv00010fe0:·6f6e·204f·7074·696f·6e73·2028·5365·7276··on·Options·(Serv
00010ff0:·6572·204f·7074·696f·6e73·2977·0565·7175··er·Options)w.equ00010ff0:·6572·204f·7074·696f·6e73·2977·0865·7870··er·Options)w.exp
00011000:·6976·6d00·0000·0a70·7764·6675·6e5f·342f··ivm....pwdfun_4/ 
00011010:·3077·0865·7870·6f72·7465·6477·0566·616c··0w.exportedw.fal00011000:·6f72·7465·6477·0566·616c·7365·7705·6571··ortedw.falsew.eq
 00011010:·7569·766d·0000·000a·7077·6466·756e·5f34··uivm....pwdfun_4
00011020:·7365·6805·6803·7704·7479·7065·770c·6b62··seh.h.w.typew.kb00011020:·2f30·6805·6803·7704·7479·7065·770c·6b62··/0h.h.w.typew.kb
00011030:·5f69·6e74·5f66·756e·5f34·6100·6c00·0000··_int_fun_4a.l...00011030:·5f69·6e74·5f66·756e·5f34·6100·6c00·0000··_int_fun_4a.l...
00011040:·0268·0277·0466·696c·656b·0007·7373·682e··.h.w.filek..ssh.00011040:·0268·0277·0466·696c·656b·0007·7373·682e··.h.w.filek..ssh.
00011050:·6872·6c68·0277·086c·6f63·6174·696f·6e68··hrlh.w.locationh00011050:·6872·6c68·0277·086c·6f63·6174·696f·6e68··hrlh.w.locationh
00011060:·0262·0000·039b·6102·6a6c·0000·0001·6d00··.b....a.jl....m.00011060:·0262·0000·039b·6102·6a6c·0000·0001·6d00··.b....a.jl....m.
00011070:·0000·0e6b·625f·696e·745f·6675·6e5f·3428··...kb_int_fun_4(00011070:·0000·0e6b·625f·696e·745f·6675·6e5f·3428··...kb_int_fun_4(
00011080:·296a·7704·6e6f·6e65·7400·0000·0377·0574··)jw.nonet....w.t00011080:·296a·7704·6e6f·6e65·7400·0000·0377·0574··)jw.nonet....w.t
00011090:·6974·6c65·6d00·0000·1f44·6165·6d6f·6e20··itlem....Daemon·00011090:·6974·6c65·6d00·0000·1f44·6165·6d6f·6e20··itlem....Daemon·
000110a0:·4f70·7469·6f6e·7320·2853·6572·7665·7220··Options·(Server·000110a0:·4f70·7469·6f6e·7320·2853·6572·7665·7220··Options·(Server·
000110b0:·4f70·7469·6f6e·7329·7705·6571·7569·766d··Options)w.equivm000110b0:·4f70·7469·6f6e·7329·7708·6578·706f·7274··Options)w.export
000110c0:·0000·000a·7077·6466·756e·5f34·2f30·7708··....pwdfun_4/0w. 
000110d0:·6578·706f·7274·6564·7705·6661·6c73·6568··exportedw.falseh000110c0:·6564·7705·6661·6c73·6577·0565·7175·6976··edw.falsew.equiv
 000110d0:·6d00·0000·0a70·7764·6675·6e5f·342f·3068··m....pwdfun_4/0h
000110e0:·0568·0377·0474·7970·6577·0c6b·625f·696e··.h.w.typew.kb_in000110e0:·0568·0377·0474·7970·6577·0c6b·625f·696e··.h.w.typew.kb_in
000110f0:·745f·6675·6e5f·3361·006c·0000·0002·6802··t_fun_3a.l....h.000110f0:·745f·6675·6e5f·3361·006c·0000·0002·6802··t_fun_3a.l....h.
00011100:·7704·6669·6c65·6b00·0773·7368·2e68·726c··w.filek..ssh.hrl00011100:·7704·6669·6c65·6b00·0773·7368·2e68·726c··w.filek..ssh.hrl
00011110:·6802·7708·6c6f·6361·7469·6f6e·6802·6200··h.w.locationh.b.00011110:·6802·7708·6c6f·6361·7469·6f6e·6802·6200··h.w.locationh.b.
00011120:·0003·9861·026a·6c00·0000·016d·0000·000e··...a.jl....m....00011120:·0003·9861·026a·6c00·0000·016d·0000·000e··...a.jl....m....
00011130:·6b62·5f69·6e74·5f66·756e·5f33·2829·6a77··kb_int_fun_3()jw00011130:·6b62·5f69·6e74·5f66·756e·5f33·2829·6a77··kb_int_fun_3()jw
00011140:·046e·6f6e·6574·0000·0003·7705·7469·746c··.nonet....w.titl00011140:·046e·6f6e·6574·0000·0003·7705·7469·746c··.nonet....w.titl
00011150:·656d·0000·001f·4461·656d·6f6e·204f·7074··em....Daemon·Opt00011150:·656d·0000·001f·4461·656d·6f6e·204f·7074··em....Daemon·Opt
00011160:·696f·6e73·2028·5365·7276·6572·204f·7074··ions·(Server·Opt00011160:·696f·6e73·2028·5365·7276·6572·204f·7074··ions·(Server·Opt
00011170:·696f·6e73·2977·0565·7175·6976·6d00·0000··ions)w.equivm... 
00011180:·0a70·7764·6675·6e5f·342f·3077·0865·7870··.pwdfun_4/0w.exp 
00011190:·6f72·7465·6477·0566·616c·7365·6805·6803··ortedw.falseh.h.00011170:·696f·6e73·2977·0865·7870·6f72·7465·6477··ions)w.exportedw
 00011180:·0566·616c·7365·7705·6571·7569·766d·0000··.falsew.equivm..
 00011190:·000a·7077·6466·756e·5f34·2f30·6805·6803··..pwdfun_4/0h.h.
000111a0:·7704·7479·7065·770c·7072·6f6d·7074·5f74··w.typew.prompt_t000111a0:·7704·7479·7065·770c·7072·6f6d·7074·5f74··w.typew.prompt_t
000111b0:·6578·7473·6100·6c00·0000·0268·0277·0466··extsa.l....h.w.f000111b0:·6578·7473·6100·6c00·0000·0268·0277·0466··extsa.l....h.w.f
Max diff block lines reached; 34509/44448 bytes (77.64%) of diff not shown.
6.23 KB
./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_sftp.beam
    
Offset 4727, 17 lines modifiedOffset 4727, 17 lines modified
00012760:·6c73·6568·0568·0377·0474·7970·6577·0a63··lseh.h.w.typew.c00012760:·6c73·6568·0568·0377·0474·7970·6577·0a63··lseh.h.w.typew.c
00012770:·6875·6e6b·5f73·697a·6561·0068·0262·0000··hunk_sizea.h.b..00012770:·6875·6e6b·5f73·697a·6561·0068·0262·0000··hunk_sizea.h.b..
00012780:·0177·6102·6c00·0000·016d·0000·000c·6368··.wa.l....m....ch00012780:·0177·6102·6c00·0000·016d·0000·000c·6368··.wa.l....m....ch
00012790:·756e·6b5f·7369·7a65·2829·6a77·046e·6f6e··unk_size()jw.non00012790:·756e·6b5f·7369·7a65·2829·6a77·046e·6f6e··unk_size()jw.non
000127a0:·6574·0000·0003·7705·7469·746c·656d·0000··et....w.titlem..000127a0:·6574·0000·0003·7705·7469·746c·656d·0000··et....w.titlem..
000127b0:·001e·4372·7970·746f·206f·7065·7261·7469··..Crypto·operati000127b0:·001e·4372·7970·746f·206f·7065·7261·7469··..Crypto·operati
000127c0:·6f6e·7320·666f·7220·6f70·656e·5f74·6172··ons·for·open_tar000127c0:·6f6e·7320·666f·7220·6f70·656e·5f74·6172··ons·for·open_tar
 000127d0:·7708·6578·706f·7274·6564·7705·6661·6c73··w.exportedw.fals
000127d0:·7705·6571·7569·766d·0000·000e·6372·7970··w.equivm....cryp000127e0:·6577·0565·7175·6976·6d00·0000·0e63·7279··ew.equivm....cry
 000127f0:·7074·6f5f·7374·6174·652f·3068·0568·0377··pto_state/0h.h.w
000127e0:·746f·5f73·7461·7465·2f30·7708·6578·706f··to_state/0w.expo 
000127f0:·7274·6564·7705·6661·6c73·6568·0568·0377··rtedw.falseh.h.w 
00012800:·0474·7970·6577·0966·696e·616c·5f66·756e··.typew.final_fun00012800:·0474·7970·6577·0966·696e·616c·5f66·756e··.typew.final_fun
00012810:·6100·6802·6200·0001·6c61·026c·0000·0001··a.h.b...la.l....00012810:·6100·6802·6200·0001·6c61·026c·0000·0001··a.h.b...la.l....
00012820:·6d00·0000·0b66·696e·616c·5f66·756e·2829··m....final_fun()00012820:·6d00·0000·0b66·696e·616c·5f66·756e·2829··m....final_fun()
00012830:·6a74·0000·0001·6d00·0000·0265·6e6d·0000··jt....m....enm..00012830:·6a74·0000·0001·6d00·0000·0265·6e6d·0000··jt....m....enm..
00012840:·00dc·4966·2064·6f69·6e67·2065·6e63·7279··..If·doing·encry00012840:·00dc·4966·2064·6f69·6e67·2065·6e63·7279··..If·doing·encry
00012850:·7074·696f·6e2c·2074·6865·2060·743a·6669··ption,·the·`t:fi00012850:·7074·696f·6e2c·2074·6865·2060·743a·6669··ption,·the·`t:fi
00012860:·6e61·6c5f·6675·6e2f·3060·2069·6e20·7468··nal_fun/0`·in·th00012860:·6e61·6c5f·6675·6e2f·3060·2069·6e20·7468··nal_fun/0`·in·th
Offset 4795, 27 lines modifiedOffset 4795, 27 lines modified
00012ba0:·0865·7870·6f72·7465·6477·0566·616c·7365··.exportedw.false00012ba0:·0865·7870·6f72·7465·6477·0566·616c·7365··.exportedw.false
00012bb0:·6805·6803·7704·7479·7065·770a·6372·7970··h.h.w.typew.cryp00012bb0:·6805·6803·7704·7479·7065·770a·6372·7970··h.h.w.typew.cryp
00012bc0:·746f·5f66·756e·6100·6802·6200·0001·5d61··to_funa.h.b...]a00012bc0:·746f·5f66·756e·6100·6802·6200·0001·5d61··to_funa.h.b...]a
00012bd0:·026c·0000·0001·6d00·0000·0c63·7279·7074··.l....m....crypt00012bd0:·026c·0000·0001·6d00·0000·0c63·7279·7074··.l....m....crypt
00012be0:·6f5f·6675·6e28·296a·7704·6e6f·6e65·7400··o_fun()jw.nonet.00012be0:·6f5f·6675·6e28·296a·7704·6e6f·6e65·7400··o_fun()jw.nonet.
00012bf0:·0000·0377·0574·6974·6c65·6d00·0000·1e43··...w.titlem....C00012bf0:·0000·0377·0574·6974·6c65·6d00·0000·1e43··...w.titlem....C
00012c00:·7279·7074·6f20·6f70·6572·6174·696f·6e73··rypto·operations00012c00:·7279·7074·6f20·6f70·6572·6174·696f·6e73··rypto·operations
00012c10:·2066·6f72·206f·7065·6e5f·7461·7277·0565···for·open_tarw.e00012c10:·2066·6f72·206f·7065·6e5f·7461·7277·0865···for·open_tarw.e
 00012c20:·7870·6f72·7465·6477·0566·616c·7365·7705··xportedw.falsew.
00012c20:·7175·6976·6d00·0000·0f63·7279·7074·6f5f··quivm....crypto_00012c30:·6571·7569·766d·0000·000f·6372·7970·746f··equivm....crypto
 00012c40:·5f72·6573·756c·742f·3068·0568·0377·0474··_result/0h.h.w.t
00012c30:·7265·7375·6c74·2f30·7708·6578·706f·7274··result/0w.export 
00012c40:·6564·7705·6661·6c73·6568·0568·0377·0474··edw.falseh.h.w.t 
00012c50:·7970·6577·0869·6e69·745f·6675·6e61·0068··ypew.init_funa.h00012c50:·7970·6577·0869·6e69·745f·6675·6e61·0068··ypew.init_funa.h
00012c60:·0262·0000·0158·6102·6c00·0000·016d·0000··.b...Xa.l....m..00012c60:·0262·0000·0158·6102·6c00·0000·016d·0000··.b...Xa.l....m..
00012c70:·000a·696e·6974·5f66·756e·2829·6a77·046e··..init_fun()jw.n00012c70:·000a·696e·6974·5f66·756e·2829·6a77·046e··..init_fun()jw.n
00012c80:·6f6e·6574·0000·0003·7705·7469·746c·656d··onet....w.titlem00012c80:·6f6e·6574·0000·0003·7705·7469·746c·656d··onet....w.titlem
00012c90:·0000·001e·4372·7970·746f·206f·7065·7261··....Crypto·opera00012c90:·0000·001e·4372·7970·746f·206f·7065·7261··....Crypto·opera
00012ca0:·7469·6f6e·7320·666f·7220·6f70·656e·5f74··tions·for·open_t00012ca0:·7469·6f6e·7320·666f·7220·6f70·656e·5f74··tions·for·open_t
00012cb0:·6172·7705·6571·7569·766d·0000·000e·6372··arw.equivm....cr 
00012cc0:·7970·746f·5f73·7461·7465·2f30·7708·6578··ypto_state/0w.ex 
00012cd0:·706f·7274·6564·7705·6661·6c73·6568·0568··portedw.falseh.h00012cb0:·6172·7708·6578·706f·7274·6564·7705·6661··arw.exportedw.fa
 00012cc0:·6c73·6577·0565·7175·6976·6d00·0000·0e63··lsew.equivm....c
 00012cd0:·7279·7074·6f5f·7374·6174·652f·3068·0568··rypto_state/0h.h
00012ce0:·0377·0474·7970·6577·0c64·6563·7279·7074··.w.typew.decrypt00012ce0:·0377·0474·7970·6577·0c64·6563·7279·7074··.w.typew.decrypt
00012cf0:·5f73·7065·6361·0068·0262·0000·0148·6102··_speca.h.b...Ha.00012cf0:·5f73·7065·6361·0068·0262·0000·0148·6102··_speca.h.b...Ha.
00012d00:·6c00·0000·016d·0000·000e·6465·6372·7970··l....m....decryp00012d00:·6c00·0000·016d·0000·000e·6465·6372·7970··l....m....decryp
00012d10:·745f·7370·6563·2829·6a74·0000·0001·6d00··t_spec()jt....m.00012d10:·745f·7370·6563·2829·6a74·0000·0001·6d00··t_spec()jt....m.
00012d20:·0000·0265·6e6d·0000·015f·5370·6563·6966··...enm..._Specif00012d20:·0000·0265·6e6d·0000·015f·5370·6563·6966··...enm..._Specif
00012d30:·6965·7320·7468·6520·656e·6372·7970·7469··ies·the·encrypti00012d30:·6965·7320·7468·6520·656e·6372·7970·7469··ies·the·encrypti
00012d40:·6f6e·206f·7220·6465·6372·7970·7469·6f6e··on·or·decryption00012d40:·6f6e·206f·7220·6465·6372·7970·7469·6f6e··on·or·decryption
Offset 4845, 28 lines modifiedOffset 4845, 28 lines modified
00012ec0:·6564·7705·6661·6c73·6568·0568·0377·0474··edw.falseh.h.w.t00012ec0:·6564·7705·6661·6c73·6568·0568·0377·0474··edw.falseh.h.w.t
00012ed0:·7970·6577·0c65·6e63·7279·7074·5f73·7065··ypew.encrypt_spe00012ed0:·7970·6577·0c65·6e63·7279·7074·5f73·7065··ypew.encrypt_spe
00012ee0:·6361·0068·0262·0000·0147·6102·6c00·0000··ca.h.b...Ga.l...00012ee0:·6361·0068·0262·0000·0147·6102·6c00·0000··ca.h.b...Ga.l...
00012ef0:·016d·0000·000e·656e·6372·7970·745f·7370··.m....encrypt_sp00012ef0:·016d·0000·000e·656e·6372·7970·745f·7370··.m....encrypt_sp
00012f00:·6563·2829·6a77·046e·6f6e·6574·0000·0003··ec()jw.nonet....00012f00:·6563·2829·6a77·046e·6f6e·6574·0000·0003··ec()jw.nonet....
00012f10:·7705·7469·746c·656d·0000·001e·4372·7970··w.titlem....Cryp00012f10:·7705·7469·746c·656d·0000·001e·4372·7970··w.titlem....Cryp
00012f20:·746f·206f·7065·7261·7469·6f6e·7320·666f··to·operations·fo00012f20:·746f·206f·7065·7261·7469·6f6e·7320·666f··to·operations·fo
00012f30:·7220·6f70·656e·5f74·6172·7705·6571·7569··r·open_tarw.equi00012f30:·7220·6f70·656e·5f74·6172·7708·6578·706f··r·open_tarw.expo
 00012f40:·7274·6564·7705·6661·6c73·6577·0565·7175··rtedw.falsew.equ
00012f40:·766d·0000·000e·6465·6372·7970·745f·7370··vm....decrypt_sp00012f50:·6976·6d00·0000·0e64·6563·7279·7074·5f73··ivm....decrypt_s
00012f50:·6563·2f30·7708·6578·706f·7274·6564·7705··ec/0w.exportedw. 
00012f60:·6661·6c73·6568·0568·0377·0474·7970·6577··falseh.h.w.typew00012f60:·7065·632f·3068·0568·0377·0474·7970·6577··pec/0h.h.w.typew
00012f70:·0f74·6172·5f63·7279·7074·6f5f·7370·6563··.tar_crypto_spec00012f70:·0f74·6172·5f63·7279·7074·6f5f·7370·6563··.tar_crypto_spec
00012f80:·6100·6802·6200·0001·4361·026c·0000·0001··a.h.b...Ca.l....00012f80:·6100·6802·6200·0001·4361·026c·0000·0001··a.h.b...Ca.l....
00012f90:·6d00·0000·1174·6172·5f63·7279·7074·6f5f··m....tar_crypto_00012f90:·6d00·0000·1174·6172·5f63·7279·7074·6f5f··m....tar_crypto_
00012fa0:·7370·6563·2829·6a77·046e·6f6e·6574·0000··spec()jw.nonet..00012fa0:·7370·6563·2829·6a77·046e·6f6e·6574·0000··spec()jw.nonet..
00012fb0:·0003·7705·7469·746c·656d·0000·001e·4372··..w.titlem....Cr00012fb0:·0003·7705·7469·746c·656d·0000·001e·4372··..w.titlem....Cr
00012fc0:·7970·746f·206f·7065·7261·7469·6f6e·7320··ypto·operations·00012fc0:·7970·746f·206f·7065·7261·7469·6f6e·7320··ypto·operations·
00012fd0:·666f·7220·6f70·656e·5f74·6172·7705·6571··for·open_tarw.eq00012fd0:·666f·7220·6f70·656e·5f74·6172·7708·6578··for·open_tarw.ex
 00012fe0:·706f·7274·6564·7705·6661·6c73·6577·0565··portedw.falsew.e
00012fe0:·7569·766d·0000·000e·6465·6372·7970·745f··uivm....decrypt_00012ff0:·7175·6976·6d00·0000·0e64·6563·7279·7074··quivm....decrypt
00012ff0:·7370·6563·2f30·7708·6578·706f·7274·6564··spec/0w.exported 
00013000:·7705·6661·6c73·6568·0568·0377·0474·7970··w.falseh.h.w.typ00013000:·5f73·7065·632f·3068·0568·0377·0474·7970··_spec/0h.h.w.typ
00013010:·6577·0672·6561·736f·6e61·0068·0261·7161··ew.reasona.h.aqa00013010:·6577·0672·6561·736f·6e61·0068·0261·7161··ew.reasona.h.aqa
00013020:·026c·0000·0001·6d00·0000·0872·6561·736f··.l....m....reaso00013020:·026c·0000·0001·6d00·0000·0872·6561·736f··.l....m....reaso
00013030:·6e28·296a·7400·0000·016d·0000·0002·656e··n()jt....m....en00013030:·6e28·296a·7400·0000·016d·0000·0002·656e··n()jt....m....en
00013040:·6d00·0002·ab41·2064·6573·6372·6970·7469··m....A·descripti00013040:·6d00·0002·ab41·2064·6573·6372·6970·7469··m....A·descripti
00013050:·6f6e·206f·6620·7468·6520·7265·6173·6f6e··on·of·the·reason00013050:·6f6e·206f·6620·7468·6520·7265·6173·6f6e··on·of·the·reason
00013060:·2077·6879·2061·6e20·6f70·6572·6174·696f···why·an·operatio00013060:·2077·6879·2061·6e20·6f70·6572·6174·696f···why·an·operatio
00013070:·6e20·6661·696c·6564·2e0a·0a54·6865·2060··n·failed...The·`00013070:·6e20·6661·696c·6564·2e0a·0a54·6865·2060··n·failed...The·`
7.0 KB
./usr/lib/erlang/lib/ssh-5.2.1/ebin/ssh_transport.beam
    
Offset 7122, 79 lines modifiedOffset 7122, 79 lines modified
0001bd10:·6e5f·616c·6761·006c·0000·0002·6802·7704··n_alga.l....h.w.0001bd10:·6e5f·616c·6761·006c·0000·0002·6802·7704··n_alga.l....h.w.
0001bd20:·6669·6c65·6b00·0773·7368·2e68·726c·6802··filek..ssh.hrlh.0001bd20:·6669·6c65·6b00·0773·7368·2e68·726c·6802··filek..ssh.hrlh.
0001bd30:·7708·6c6f·6361·7469·6f6e·6802·61e4·6102··w.locationh.a.a.0001bd30:·7708·6c6f·6361·7469·6f6e·6802·61e4·6102··w.locationh.a.a.
0001bd40:·6a6c·0000·0001·6d00·0000·1163·6f6d·7072··jl....m....compr0001bd40:·6a6c·0000·0001·6d00·0000·1163·6f6d·7072··jl....m....compr
0001bd50:·6573·7369·6f6e·5f61·6c67·2829·6a77·046e··ession_alg()jw.n0001bd50:·6573·7369·6f6e·5f61·6c67·2829·6a77·046e··ession_alg()jw.n
0001bd60:·6f6e·6574·0000·0003·7705·7469·746c·656d··onet....w.titlem0001bd60:·6f6e·6574·0000·0003·7705·7469·746c·656d··onet....w.titlem
0001bd70:·0000·000e·436f·6d6d·6f6e·204f·7074·696f··....Common·Optio0001bd70:·0000·000e·436f·6d6d·6f6e·204f·7074·696f··....Common·Optio
0001bd80:·6e73·7708·6578·706f·7274·6564·7705·6661··nsw.exportedw.fa 
0001bd90:·6c73·6577·0565·7175·6976·6d00·0000·0d64··lsew.equivm....d 
0001bda0:·6f75·626c·655f·616c·6773·2f31·6805·6803··ouble_algs/1h.h.0001bd80:·6e73·7705·6571·7569·766d·0000·000d·646f··nsw.equivm....do
 0001bd90:·7562·6c65·5f61·6c67·732f·3177·0865·7870··uble_algs/1w.exp
 0001bda0:·6f72·7465·6477·0566·616c·7365·6805·6803··ortedw.falseh.h.
0001bdb0:·7704·7479·7065·7707·6d61·635f·616c·6761··w.typew.mac_alga0001bdb0:·7704·7479·7065·7707·6d61·635f·616c·6761··w.typew.mac_alga
0001bdc0:·006c·0000·0002·6802·7704·6669·6c65·6b00··.l....h.w.filek.0001bdc0:·006c·0000·0002·6802·7704·6669·6c65·6b00··.l....h.w.filek.
0001bdd0:·0773·7368·2e68·726c·6802·7708·6c6f·6361··.ssh.hrlh.w.loca0001bdd0:·0773·7368·2e68·726c·6802·7708·6c6f·6361··.ssh.hrlh.w.loca
0001bde0:·7469·6f6e·6802·61d7·6102·6a6c·0000·0001··tionh.a.a.jl....0001bde0:·7469·6f6e·6802·61d7·6102·6a6c·0000·0001··tionh.a.a.jl....
0001bdf0:·6d00·0000·096d·6163·5f61·6c67·2829·6a77··m....mac_alg()jw0001bdf0:·6d00·0000·096d·6163·5f61·6c67·2829·6a77··m....mac_alg()jw
0001be00:·046e·6f6e·6574·0000·0003·7705·7469·746c··.nonet....w.titl0001be00:·046e·6f6e·6574·0000·0003·7705·7469·746c··.nonet....w.titl
0001be10:·656d·0000·000e·436f·6d6d·6f6e·204f·7074··em....Common·Opt0001be10:·656d·0000·000e·436f·6d6d·6f6e·204f·7074··em....Common·Opt
0001be20:·696f·6e73·7708·6578·706f·7274·6564·7705··ionsw.exportedw. 
0001be30:·6661·6c73·6577·0565·7175·6976·6d00·0000··falsew.equivm... 
0001be40:·0d64·6f75·626c·655f·616c·6773·2f31·6805··.double_algs/1h.0001be20:·696f·6e73·7705·6571·7569·766d·0000·000d··ionsw.equivm....
 0001be30:·646f·7562·6c65·5f61·6c67·732f·3177·0865··double_algs/1w.e
 0001be40:·7870·6f72·7465·6477·0566·616c·7365·6805··xportedw.falseh.
0001be50:·6803·7704·7479·7065·770a·6369·7068·6572··h.w.typew.cipher0001be50:·6803·7704·7479·7065·770a·6369·7068·6572··h.w.typew.cipher
0001be60:·5f61·6c67·6100·6c00·0000·0268·0277·0466··_alga.l....h.w.f0001be60:·5f61·6c67·6100·6c00·0000·0268·0277·0466··_alga.l....h.w.f
0001be70:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w0001be70:·696c·656b·0007·7373·682e·6872·6c68·0277··ilek..ssh.hrlh.w
0001be80:·086c·6f63·6174·696f·6e68·0261·c761·026a··.locationh.a.a.j0001be80:·086c·6f63·6174·696f·6e68·0261·c761·026a··.locationh.a.a.j
0001be90:·6c00·0000·016d·0000·000c·6369·7068·6572··l....m....cipher0001be90:·6c00·0000·016d·0000·000c·6369·7068·6572··l....m....cipher
0001bea0:·5f61·6c67·2829·6a77·046e·6f6e·6574·0000··_alg()jw.nonet..0001bea0:·5f61·6c67·2829·6a77·046e·6f6e·6574·0000··_alg()jw.nonet..
0001beb0:·0003·7705·7469·746c·656d·0000·000e·436f··..w.titlem....Co0001beb0:·0003·7705·7469·746c·656d·0000·000e·436f··..w.titlem....Co
0001bec0:·6d6d·6f6e·204f·7074·696f·6e73·7708·6578··mmon·Optionsw.ex0001bec0:·6d6d·6f6e·204f·7074·696f·6e73·7705·6571··mmon·Optionsw.eq
0001bed0:·706f·7274·6564·7705·6661·6c73·6577·0565··portedw.falsew.e 
0001bee0:·7175·6976·6d00·0000·0d64·6f75·626c·655f··quivm....double_0001bed0:·7569·766d·0000·000d·646f·7562·6c65·5f61··uivm....double_a
 0001bee0:·6c67·732f·3177·0865·7870·6f72·7465·6477··lgs/1w.exportedw
0001bef0:·616c·6773·2f31·6805·6803·7704·7479·7065··algs/1h.h.w.type0001bef0:·0566·616c·7365·6805·6803·7704·7479·7065··.falseh.h.w.type
0001bf00:·770a·7075·626b·6579·5f61·6c67·6100·6c00··w.pubkey_alga.l.0001bf00:·770a·7075·626b·6579·5f61·6c67·6100·6c00··w.pubkey_alga.l.
0001bf10:·0000·0268·0277·0466·696c·656b·0007·7373··...h.w.filek..ss0001bf10:·0000·0268·0277·0466·696c·656b·0007·7373··...h.w.filek..ss
0001bf20:·682e·6872·6c68·0277·086c·6f63·6174·696f··h.hrlh.w.locatio0001bf20:·682e·6872·6c68·0277·086c·6f63·6174·696f··h.hrlh.w.locatio
0001bf30:·6e68·0261·ba61·026a·6c00·0000·016d·0000··nh.a.a.jl....m..0001bf30:·6e68·0261·ba61·026a·6c00·0000·016d·0000··nh.a.a.jl....m..
0001bf40:·000c·7075·626b·6579·5f61·6c67·2829·6a77··..pubkey_alg()jw0001bf40:·000c·7075·626b·6579·5f61·6c67·2829·6a77··..pubkey_alg()jw
0001bf50:·046e·6f6e·6574·0000·0003·7705·7469·746c··.nonet....w.titl0001bf50:·046e·6f6e·6574·0000·0003·7705·7469·746c··.nonet....w.titl
0001bf60:·656d·0000·000e·436f·6d6d·6f6e·204f·7074··em....Common·Opt0001bf60:·656d·0000·000e·436f·6d6d·6f6e·204f·7074··em....Common·Opt
0001bf70:·696f·6e73·7708·6578·706f·7274·6564·7705··ionsw.exportedw. 
0001bf80:·6661·6c73·6577·0565·7175·6976·6d00·0000··falsew.equivm... 
0001bf90:·0d64·6f75·626c·655f·616c·6773·2f31·6805··.double_algs/1h.0001bf70:·696f·6e73·7705·6571·7569·766d·0000·000d··ionsw.equivm....
 0001bf80:·646f·7562·6c65·5f61·6c67·732f·3177·0865··double_algs/1w.e
 0001bf90:·7870·6f72·7465·6477·0566·616c·7365·6805··xportedw.falseh.
0001bfa0:·6803·7704·7479·7065·7707·6b65·785f·616c··h.w.typew.kex_al0001bfa0:·6803·7704·7479·7065·7707·6b65·785f·616c··h.w.typew.kex_al
0001bfb0:·6761·006c·0000·0002·6802·7704·6669·6c65··ga.l....h.w.file0001bfb0:·6761·006c·0000·0002·6802·7704·6669·6c65··ga.l....h.w.file
0001bfc0:·6b00·0773·7368·2e68·726c·6802·7708·6c6f··k..ssh.hrlh.w.lo0001bfc0:·6b00·0773·7368·2e68·726c·6802·7708·6c6f··k..ssh.hrlh.w.lo
0001bfd0:·6361·7469·6f6e·6802·61a9·6102·6a6c·0000··cationh.a.a.jl..0001bfd0:·6361·7469·6f6e·6802·61a9·6102·6a6c·0000··cationh.a.a.jl..
0001bfe0:·0001·6d00·0000·096b·6578·5f61·6c67·2829··..m....kex_alg()0001bfe0:·0001·6d00·0000·096b·6578·5f61·6c67·2829··..m....kex_alg()
0001bff0:·6a77·046e·6f6e·6574·0000·0003·7705·7469··jw.nonet....w.ti0001bff0:·6a77·046e·6f6e·6574·0000·0003·7705·7469··jw.nonet....w.ti
0001c000:·746c·656d·0000·000e·436f·6d6d·6f6e·204f··tlem....Common·O0001c000:·746c·656d·0000·000e·436f·6d6d·6f6e·204f··tlem....Common·O
0001c010:·7074·696f·6e73·7708·6578·706f·7274·6564··ptionsw.exported 
0001c020:·7705·6661·6c73·6577·0565·7175·6976·6d00··w.falsew.equivm. 
0001c030:·0000·0d64·6f75·626c·655f·616c·6773·2f31··...double_algs/10001c010:·7074·696f·6e73·7705·6571·7569·766d·0000··ptionsw.equivm..
 0001c020:·000d·646f·7562·6c65·5f61·6c67·732f·3177··..double_algs/1w
 0001c030:·0865·7870·6f72·7465·6477·0566·616c·7365··.exportedw.false
0001c040:·6805·6803·7704·7479·7065·7709·616c·675f··h.h.w.typew.alg_0001c040:·6805·6803·7704·7479·7065·7709·616c·675f··h.h.w.typew.alg_
0001c050:·656e·7472·7961·006c·0000·0002·6802·7704··entrya.l....h.w.0001c050:·656e·7472·7961·006c·0000·0002·6802·7704··entrya.l....h.w.
0001c060:·6669·6c65·6b00·0773·7368·2e68·726c·6802··filek..ssh.hrlh.0001c060:·6669·6c65·6b00·0773·7368·2e68·726c·6802··filek..ssh.hrlh.
0001c070:·7708·6c6f·6361·7469·6f6e·6802·61a1·6102··w.locationh.a.a.0001c070:·7708·6c6f·6361·7469·6f6e·6802·61a1·6102··w.locationh.a.a.
0001c080:·6a6c·0000·0001·6d00·0000·0b61·6c67·5f65··jl....m....alg_e0001c080:·6a6c·0000·0001·6d00·0000·0b61·6c67·5f65··jl....m....alg_e
0001c090:·6e74·7279·2829·6a77·046e·6f6e·6574·0000··ntry()jw.nonet..0001c090:·6e74·7279·2829·6a77·046e·6f6e·6574·0000··ntry()jw.nonet..
0001c0a0:·0003·7705·7469·746c·656d·0000·000e·436f··..w.titlem....Co0001c0a0:·0003·7705·7469·746c·656d·0000·000e·436f··..w.titlem....Co
0001c0b0:·6d6d·6f6e·204f·7074·696f·6e73·7708·6578··mmon·Optionsw.ex0001c0b0:·6d6d·6f6e·204f·7074·696f·6e73·7705·6571··mmon·Optionsw.eq
0001c0c0:·706f·7274·6564·7705·6661·6c73·6577·0565··portedw.falsew.e 
0001c0d0:·7175·6976·6d00·0000·0d64·6f75·626c·655f··quivm....double_0001c0c0:·7569·766d·0000·000d·646f·7562·6c65·5f61··uivm....double_a
 0001c0d0:·6c67·732f·3177·0865·7870·6f72·7465·6477··lgs/1w.exportedw
0001c0e0:·616c·6773·2f31·6805·6803·7704·7479·7065··algs/1h.h.w.type0001c0e0:·0566·616c·7365·6805·6803·7704·7479·7065··.falseh.h.w.type
0001c0f0:·7709·616c·6773·5f6c·6973·7461·006c·0000··w.algs_lista.l..0001c0f0:·7709·616c·6773·5f6c·6973·7461·006c·0000··w.algs_lista.l..
0001c100:·0002·6802·7704·6669·6c65·6b00·0773·7368··..h.w.filek..ssh0001c100:·0002·6802·7704·6669·6c65·6b00·0773·7368··..h.w.filek..ssh
0001c110:·2e68·726c·6802·7708·6c6f·6361·7469·6f6e··.hrlh.w.location0001c110:·2e68·726c·6802·7708·6c6f·6361·7469·6f6e··.hrlh.w.location
0001c120:·6802·619e·6102·6a6c·0000·0001·6d00·0000··h.a.a.jl....m...0001c120:·6802·619e·6102·6a6c·0000·0001·6d00·0000··h.a.a.jl....m...
0001c130:·0b61·6c67·735f·6c69·7374·2829·6a77·046e··.algs_list()jw.n0001c130:·0b61·6c67·735f·6c69·7374·2829·6a77·046e··.algs_list()jw.n
0001c140:·6f6e·6574·0000·0003·7705·7469·746c·656d··onet....w.titlem0001c140:·6f6e·6574·0000·0003·7705·7469·746c·656d··onet....w.titlem
0001c150:·0000·000e·436f·6d6d·6f6e·204f·7074·696f··....Common·Optio0001c150:·0000·000e·436f·6d6d·6f6e·204f·7074·696f··....Common·Optio
0001c160:·6e73·7708·6578·706f·7274·6564·7705·6661··nsw.exportedw.fa 
0001c170:·6c73·6577·0565·7175·6976·6d00·0000·0d64··lsew.equivm....d 
0001c180:·6f75·626c·655f·616c·6773·2f31·6805·6803··ouble_algs/1h.h.0001c160:·6e73·7705·6571·7569·766d·0000·000d·646f··nsw.equivm....do
 0001c170:·7562·6c65·5f61·6c67·732f·3177·0865·7870··uble_algs/1w.exp
 0001c180:·6f72·7465·6477·0566·616c·7365·6805·6803··ortedw.falseh.h.
0001c190:·7708·6675·6e63·7469·6f6e·770e·7373·685f··w.functionw.ssh_0001c190:·7708·6675·6e63·7469·6f6e·770e·7373·685f··w.functionw.ssh_
0001c1a0:·6462·675f·666f·726d·6174·6102·6802·6200··dbg_formata.h.b.0001c1a0:·6462·675f·666f·726d·6174·6102·6802·6200··dbg_formata.h.b.
0001c1b0:·0008·ff61·016c·0000·0001·6d00·0000·1073··...a.l....m....s0001c1b0:·0008·ff61·016c·0000·0001·6d00·0000·1073··...a.l....m....s
0001c1c0:·7368·5f64·6267·5f66·6f72·6d61·742f·326a··sh_dbg_format/2j0001c1c0:·7368·5f64·6267·5f66·6f72·6d61·742f·326a··sh_dbg_format/2j
0001c1d0:·7704·6e6f·6e65·7400·0000·0068·0568·0377··w.nonet....h.h.w0001c1d0:·7704·6e6f·6e65·7400·0000·0068·0568·0377··w.nonet....h.h.w
0001c1e0:·0866·756e·6374·696f·6e77·0b73·7368·5f64··.functionw.ssh_d0001c1e0:·0866·756e·6374·696f·6e77·0b73·7368·5f64··.functionw.ssh_d
0001c1f0:·6267·5f6f·6666·6101·6802·6200·0008·f661··bg_offa.h.b....a0001c1f0:·6267·5f6f·6666·6101·6802·6200·0008·f661··bg_offa.h.b....a
12.8 KB
./usr/share/doc/erlang-ssh/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-ssl_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2832·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2832·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1790512·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1790524·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.5 KB
file list
    
Offset 82, 11 lines modifiedOffset 82, 11 lines modified
82 -rw-r--r--···0·root·········(0)·root·········(0)·····3028·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_server_sup.beam82 -rw-r--r--···0·root·········(0)·root·········(0)·····3028·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_server_sup.beam
83 -rw-r--r--···0·root·········(0)·root·········(0)····33812·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_socket.beam83 -rw-r--r--···0·root·········(0)·root·········(0)····33812·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_socket.beam
84 -rw-r--r--···0·root·········(0)·root·········(0)·····2504·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_sup.beam84 -rw-r--r--···0·root·········(0)·root·········(0)·····2504·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_sup.beam
85 -rw-r--r--···0·root·········(0)·root·········(0)····60060·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_v1.beam85 -rw-r--r--···0·root·········(0)·root·········(0)····60060·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/ssl-11.2.1/ebin/tls_v1.beam
86 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/86 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
87 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/87 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
88 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/88 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/
89 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/AUTHORS.gz89 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/AUTHORS.gz
90 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/README.Debian90 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/README.Debian
91 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/changelog.Debian.gz91 -rw-r--r--···0·root·········(0)·root·········(0)·····4423·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/changelog.Debian.gz
92 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/copyright92 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-ssl/copyright
12.8 KB
./usr/share/doc/erlang-ssl/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.0 KB
erlang-syntax-tools_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1308·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1308·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···336116·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···336128·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.5 KB
data.tar.xz
14.4 KB
data.tar
1.57 KB
file list
    
Offset 17, 11 lines modifiedOffset 17, 11 lines modified
17 -rw-r--r--···0·root·········(0)·root·········(0)······454·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/ebin/syntax_tools.app17 -rw-r--r--···0·root·········(0)·root·········(0)······454·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/ebin/syntax_tools.app
18 -rw-r--r--···0·root·········(0)·root·········(0)······793·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/ebin/syntax_tools.appup18 -rw-r--r--···0·root·········(0)·root·········(0)······793·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/ebin/syntax_tools.appup
19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/include/19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/include/
20 -rw-r--r--···0·root·········(0)·root·········(0)······951·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/include/merl.hrl20 -rw-r--r--···0·root·········(0)·root·········(0)······951·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/syntax_tools-3.2/include/merl.hrl
21 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/21 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
22 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/22 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/23 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/
24 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/AUTHORS.gz24 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/AUTHORS.gz
25 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/README.Debian25 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/README.Debian
26 -rw-r--r--···0·root·········(0)·root·········(0)·····4428·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/changelog.Debian.gz26 -rw-r--r--···0·root·········(0)·root·········(0)·····4428·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/changelog.Debian.gz
27 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/copyright27 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-syntax-tools/copyright
12.9 KB
./usr/share/doc/erlang-syntax-tools/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-tftp_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1116·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1116·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···111848·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···111876·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.5 KB
file list
    
Offset 14, 11 lines modifiedOffset 14, 11 lines modified
14 -rw-r--r--···0·root·········(0)·root·········(0)····12308·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_file.beam14 -rw-r--r--···0·root·········(0)·root·········(0)····12308·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_file.beam
15 -rw-r--r--···0·root·········(0)·root·········(0)····19196·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_lib.beam15 -rw-r--r--···0·root·········(0)·root·········(0)····19196·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_lib.beam
16 -rw-r--r--···0·root·········(0)·root·········(0)·····3812·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_logger.beam16 -rw-r--r--···0·root·········(0)·root·········(0)·····3812·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_logger.beam
17 -rw-r--r--···0·root·········(0)·root·········(0)·····4712·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_sup.beam17 -rw-r--r--···0·root·········(0)·root·········(0)·····4712·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tftp-1.2/ebin/tftp_sup.beam
18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/18 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/19 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
20 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/20 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/
21 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/AUTHORS.gz21 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/AUTHORS.gz
22 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/README.Debian22 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/README.Debian
23 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/changelog.Debian.gz23 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/changelog.Debian.gz
24 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/copyright24 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tftp/copyright
12.8 KB
./usr/share/doc/erlang-tftp/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-tools_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····2016·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····2016·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0···618604·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0···618624·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.3 KB
data.tar
1.49 KB
file list
    
Offset 35, 11 lines modifiedOffset 35, 11 lines modified
35 -rw-r--r--···0·root·········(0)·root·········(0)····45703·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/emacs/erlang_appwiz.el35 -rw-r--r--···0·root·········(0)·root·········(0)····45703·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/emacs/erlang_appwiz.el
36 -rw-r--r--···0·root·········(0)·root·········(0)····22237·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/emacs/erldoc.el36 -rw-r--r--···0·root·········(0)·root·········(0)····22237·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/emacs/erldoc.el
37 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/priv/37 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/priv/
38 -rw-r--r--···0·root·········(0)·root·········(0)·····1564·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/priv/styles.css38 -rw-r--r--···0·root·········(0)·root·········(0)·····1564·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/tools-4.0/priv/styles.css
39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/39 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/40 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/41 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/
42 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/AUTHORS.gz42 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/AUTHORS.gz
43 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/README.Debian43 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/README.Debian
44 -rw-r--r--···0·root·········(0)·root·········(0)·····4424·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/changelog.Debian.gz44 -rw-r--r--···0·root·········(0)·root·········(0)·····4424·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/changelog.Debian.gz
45 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/copyright45 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-tools/copyright
12.8 KB
./usr/share/doc/erlang-tools/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
15.3 KB
erlang-wx_27.0.1+dfsg-3_armhf.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····7076·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····7072·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··4416848·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··4416856·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.7 KB
data.tar.xz
14.7 KB
data.tar
1.84 KB
file list
    
Offset 253, 14 lines modifiedOffset 253, 14 lines modified
253 -rw-r--r--···0·root·········(0)·root·········(0)·····6268·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/erlang-logo128.png253 -rw-r--r--···0·root·········(0)·root·········(0)·····6268·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/erlang-logo128.png
254 -rw-r--r--···0·root·········(0)·root·········(0)·····1291·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/erlang-logo32.png254 -rw-r--r--···0·root·········(0)·root·········(0)·····1291·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/erlang-logo32.png
255 -rw-r--r--···0·root·········(0)·root·········(0)·····2647·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/erlang-logo64.png255 -rw-r--r--···0·root·········(0)·root·········(0)·····2647·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/erlang-logo64.png
256 -rw-r--r--···0·root·········(0)·root·········(0)··2929236·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/wxe_driver.so256 -rw-r--r--···0·root·········(0)·root·········(0)··2929236·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/wx-2.4.2/priv/wxe_driver.so
257 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/257 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
258 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/258 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
259 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/259 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/
260 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/AUTHORS.gz260 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/AUTHORS.gz
261 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/README.Debian261 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/README.Debian
262 -rw-r--r--···0·root·········(0)·root·········(0)·····4418·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/changelog.Debian.gz262 -rw-r--r--···0·root·········(0)·root·········(0)·····4418·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/changelog.Debian.gz
263 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/copyright263 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-wx/copyright
264 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/264 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/
265 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/265 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/
266 -rw-r--r--···0·root·········(0)·root·········(0)·······33·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-wx266 -rw-r--r--···0·root·········(0)·root·········(0)·······33·2024-08-29·10:53:40.000000·./usr/share/lintian/overrides/erlang-wx
12.8 KB
./usr/share/doc/erlang-wx/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.5 KB
erlang-x11_27.0.1+dfsg-3_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0······792·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0······792·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0····13488·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0····13508·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.0 KB
data.tar.xz
14.0 KB
data.tar
1.14 KB
file list
    
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./
2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/
3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/
6 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/AUTHORS.gz6 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/AUTHORS.gz
7 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/README.Debian7 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/README.Debian
8 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/changelog.Debian.gz8 -rw-r--r--···0·root·········(0)·root·········(0)·····4419·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/changelog.Debian.gz
9 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/copyright9 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-x11/copyright
12.8 KB
./usr/share/doc/erlang-x11/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.9 KB
erlang-xmerl_27.0.1+dfsg-3_armhf.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1712·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1712·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0··1329856·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0··1329872·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.4 KB
data.tar.xz
14.4 KB
data.tar
1.52 KB
file list
    
Offset 40, 11 lines modifiedOffset 40, 11 lines modified
40 -rw-r--r--···0·root·········(0)·root·········(0)····14752·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xpath_scan.beam40 -rw-r--r--···0·root·········(0)·root·········(0)····14752·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xpath_scan.beam
41 -rw-r--r--···0·root·········(0)·root·········(0)·····7076·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xs.beam41 -rw-r--r--···0·root·········(0)·root·········(0)·····7076·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xs.beam
42 -rw-r--r--···0·root·········(0)·root·········(0)···237204·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xsd.beam42 -rw-r--r--···0·root·········(0)·root·········(0)···237204·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xsd.beam
43 -rw-r--r--···0·root·········(0)·root·········(0)····72040·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xsd_type.beam43 -rw-r--r--···0·root·········(0)·root·········(0)····72040·2024-08-29·10:53:40.000000·./usr/lib/erlang/lib/xmerl-2.0/ebin/xmerl_xsd_type.beam
44 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/44 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
45 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/45 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/46 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/
47 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/AUTHORS.gz47 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/AUTHORS.gz
48 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/README.Debian48 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/README.Debian
49 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/changelog.Debian.gz49 -rw-r--r--···0·root·········(0)·root·········(0)·····4421·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/changelog.Debian.gz
50 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/copyright50 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang-xmerl/copyright
12.8 KB
./usr/share/doc/erlang-xmerl/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached
14.5 KB
erlang_27.0.1+dfsg-3_all.deb
367 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary1 -rw-r--r--···0········0········0········4·2024-08-29·10:53:40.000000·debian-binary
2 -rw-r--r--···0········0········0·····1188·2024-08-29·10:53:40.000000·control.tar.xz2 -rw-r--r--···0········0········0·····1188·2024-08-29·10:53:40.000000·control.tar.xz
3 -rw-r--r--···0········0········0····13492·2024-08-29·10:53:40.000000·data.tar.xz3 -rw-r--r--···0········0········0····13496·2024-08-29·10:53:40.000000·data.tar.xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
14.0 KB
data.tar.xz
14.0 KB
data.tar
1.11 KB
file list
    
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./1 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./
2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/2 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/
3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/3 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/
4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/
5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/
6 -rw-r--r--···0·root·········(0)·root·········(0)·····4587·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/AUTHORS.gz6 -rw-r--r--···0·root·········(0)·root·········(0)·····4608·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/AUTHORS.gz
7 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/README.Debian7 -rw-r--r--···0·root·········(0)·root·········(0)·····2595·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/README.Debian
8 -rw-r--r--···0·root·········(0)·root·········(0)·····4418·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/changelog.Debian.gz8 -rw-r--r--···0·root·········(0)·root·········(0)·····4418·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/changelog.Debian.gz
9 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/copyright9 -rw-r--r--···0·root·········(0)·root·········(0)·····8970·2024-08-29·10:53:40.000000·./usr/share/doc/erlang/copyright
12.8 KB
./usr/share/doc/erlang/AUTHORS.gz
12.8 KB
AUTHORS
Max HTML report size reached